1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fdea8fea-b9a7-4dcf-80ee-e4d8761960ee",e._sentryDebugIdIdentifier="sentry-dbid-fdea8fea-b9a7-4dcf-80ee-e4d8761960ee")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5824],{55824:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var a=r(2860),n=r(55729),i=r(98986),l=r(15553),s=r(47126),o=r(86528),c=r(57226),d=r(39891),m=r(1909),u=r(16491),p=r(41090),h=r(95005),g=r(51965),f=r(80272),b=r(37674),y=r(5415),w=r(71465),x=r(96848),v=r(79798);let{rE:_}=d;function N(e){let{prefillEmail:t}=e,{t:r,i18n:n}=(0,i.Bd)(),l=(0,w.r)(),{openAuthModal:o,onSuccess:c,onError:d,onRequest:N}=(0,x.As)(),{control:Y,handleSubmit:k,formState:{isSubmitting:E}}=(0,m.mN)({defaultValues:{name:"",email:t||"",password:""}}),I=()=>(0,h.e)({apiDomain:"https://api.wordup.com.tw/api",stage:"production",domain:".wordup.com.tw",lang:n.resolvedLanguage,clientInfo:`shop/${_}`}),D=async(e,a)=>{var n,i,s;if(!e.ok)return void d({type:"sign-up"===a?"email":a,res:e.res,status:e.status,errCode:e.errCode,msg:e.msg});let o=null==(s=e.data)||null==(i=s.data)||null==(n=i.attributes)?void 0:n.email;if(t&&o&&o.toLowerCase()!==t.toLowerCase()){y.tt.clear(),await b.A.fire({icon:"warning",title:r("crowdin:thank-you-page.alert-title.email-mismatch","ç»å
¥å¸³èèè¨å® Email ä¸ç¬¦"),text:r("crowdin:thank-you-page.alert-text.email-mismatch",{defaultValue:"æ¤è¨å®æ¯ä»¥ {{guestEmail}} 購買ï¼è«ç»åºå¾ä½¿ç¨ç¸å Email ç»å
¥ï¼æåæè³è©²å¸³èæ¥çè¨å®ã",guestEmail:t}),confirmButtonText:r("common:common.confirm")});return}c({type:a,data:e.data}),l.replace(l.asPath)},C=async e=>{N();try{let t=await I().signUp(e);await D(t,"sign-up")}catch(e){d({type:"email",res:e,msg:r("common:common.generic_err_msg_with_contact_us")})}},F=async(e,t)=>{N();try{let r=await I().signInWithSocial(e,t);await D(r,e)}catch(t){d({type:e,res:t,msg:r("common:common.generic_err_msg_with_contact_us")})}},A="184428973344-r06g0jaefo8a86uovvbe0t83vr42gi66.apps.googleusercontent.com",z=n.resolvedLanguage??"zh-TW",K=f.IB[z].signup;return(0,a.FD)("div",{className:"flex flex-col gap-y-300 rounded-500 border border-solid border-border-subtle p-400",children:[(0,a.FD)("div",{className:"flex items-center gap-200",children:[(0,a.Y)(s.I,{type:"person_add",size:20}),(0,a.Y)("h5",{className:"text-heading-s text-content-primary",children:r("crowdin:guest-checkout.register-and-redeem","註å並å
æææ")})]}),(0,a.Y)("span",{className:"text-body-s text-content-secondary",children:r("crowdin:guest-checkout.register-description","註å帳èå¾å¯èªåå
æææï¼é¨æé¨å°éå§å¸ç¿ã")}),(0,a.Y)(u.G_,{clientId:A??"",children:(0,a.FD)("div",{className:"flex flex-col gap-300",children:[(0,a.FD)("div",{className:"flex items-center gap-300",children:[(0,a.Y)("div",{className:"h-px flex-1 bg-border-subtle"}),(0,a.Y)("span",{className:"text-body-s text-content-secondary",children:K.oneClick}),(0,a.Y)("div",{className:"h-px flex-1 bg-border-subtle"})]}),(0,a.Y)("div",{className:"flex justify-center gap-500",children:(0,a.Y)(g.A,{fbAppId:"407289366313573",googleClientId:A,appleClientId:"com.wordup.web",appleRedirectUri:"https://shop.wordup.com.tw",onSuccess:F,onError:e=>d({type:e.type,res:e.res,status:e.status,errCode:e.errCode,msg:e.msg})})})]})}),(0,a.FD)("div",{className:"flex items-center gap-300",children:[(0,a.Y)("div",{className:"h-px flex-1 bg-border-subtle"}),(0,a.Y)("span",{className:"text-body-s text-content-secondary",children:K.useEmail}),(0,a.Y)("div",{className:"h-px flex-1 bg-border-subtle"})]}),(0,a.FD)("form",{onSubmit:k(C),className:"flex flex-col gap-500",children:[(0,a.Y)(m.xI,{name:"name",control:Y,rules:{required:{value:!0,message:r("common:form.required_field_empty")}},render:e=>{var t;let{field:n,fieldState:i}=e;return(0,a.Y)(p.A_,{...n,size:"md",label:r("crowdin:guest-checkout.name","å§å"),placeholder:r("crowdin:guest-checkout.name-placeholder","è«è¼¸å
¥å§å"),error:null==(t=i.error)?void 0:t.message})}}),(0,a.Y)(m.xI,{name:"email",control:Y,rules:{required:{value:!0,message:r("common:form.required_field_empty")},pattern:{value:v.G,message:r("crowdin:guest-checkout.invalid-email","è«è¼¸å
¥ææç Email æ ¼å¼")}},render:e=>{var r;let{field:n,fieldState:i}=e;return(0,a.Y)(p.A_,{...n,size:"md",type:"email",label:"Email",error:null==(r=i.error)?void 0:r.message,disabled:!!t})}}),(0,a.Y)(m.xI,{name:"password",control:Y,rules:{required:{value:!0,message:r("common:form.required_field_empty")},minLength:{value:6,message:r("crowdin:guest-checkout.password-min-length","å¯ç¢¼è³å°éè¦ 6 ååå
")}},render:e=>{var t;let{field:n,fieldState:i}=e;return(0,a.Y)(p.A_,{...n,size:"md",type:"password",label:r("crowdin:guest-checkout.password","å¯ç¢¼"),placeholder:r("crowdin:guest-checkout.password-placeholder","è³å° 6 ååå
"),error:null==(t=i.error)?void 0:t.message})}}),(0,a.Y)(p.$n,{type:"submit",size:"lg",fullWidth:!0,disabled:E,children:E?r("crowdin:common.loading","è¼å
¥ä¸..."):r("crowdin:guest-checkout.register-and-redeem","註å並å
æææ")})]}),(0,a.Y)("button",{type:"button",onClick:()=>o({layout:"sign-in"}),className:"cursor-pointer border-0 bg-transparent p-0 text-label-m text-content-brand",children:r("crowdin:guest-checkout.already-have-account","å·²æå¸³èï¼ç»å
¥")})]})}let Y=e=>({code:e.code,useUp:"used"===e.status,canIRedeem:!1,materialExpiryKind:"na",materialExpiryOptions:null});function k(e){let{email:t,redeemCodes:r=[],lineItems:d=[],isOrderCompleted:m}=e,{t:u,i18n:p}
1=(0,i.Bd)(),[h,g]=(0,n.useState)(!1),f=async()=>{g(!0);try{o.oR.success({message:u("crowdin:guest-checkout.resend-success","確èªä¿¡å·²éæ°å¯é")})}catch{o.oR.error({message:u("common:common.generic_err_msg_with_contact_us")})}finally{g(!1)}};if(!m)return(0,a.FD)("div",{className:"flex flex-col gap-500",children:[(0,a.FD)("div",{className:"flex flex-col items-center rounded-lg bg-warning-50 p-6",children:[(0,a.Y)(s.I,{type:"timer",size:32,className:"mb-2 text-warning-500"}),(0,a.Y)(l.E,{variant:"body_m_500",className:"mb-1",children:u("crowdin:guest-checkout.payment-pending-title","çå¾
仿¬¾ç¢ºèª")}),(0,a.Y)(l.E,{variant:"body_s_400",color:"grayscale-500",className:"text-center",children:u("crowdin:guest-checkout.payment-pending-description","仿¬¾èçä¸ï¼è«ç¨åã宿å¾å°å¯é確èªä¿¡è³æ¨çä¿¡ç®±ã")})]}),(0,a.Y)("div",{className:"text-center",children:(0,a.Y)(l.E,{variant:"body_s_400",color:"grayscale-400",children:u("crowdin:guest-checkout.confirmation-email-sent",{defaultValue:"確èªä¿¡å·²å¯éè³ {{email}}",email:t})})})]});let b=new Set,y=d.map(e=>{let t=r.filter((t,r)=>!b.has(r)&&!!((e,t)=>{let r=e.attributes.name;return r===t||r.includes(t)||t.includes(r)})(e,t.redeemableName)&&(b.add(r),!0));return{lineItem:e,codes:t.map(Y)}}).filter(e=>e.codes.length>0),w=r.filter((e,t)=>!b.has(t)).map(Y);return w.length>0&&d[0]&&y.push({lineItem:d[0],codes:w}),(0,a.FD)("article",{className:"flex w-full flex-col",children:[(0,a.Y)("section",{className:"border-b border-solid border-border-subtle py-500",children:(0,a.Y)("p",{className:"body_m_400 m-0",children:u("crowdin:guest-checkout.order-success-description","æ¨å·²ç¶ä»æ¬¾æåï¼ææå
æç¢¼å·²å¯éè³ {{email}}ï¼è«æ¥æ¶ä¿¡ä»¶ãæ¨å¯ä»¥ç´æ¥è¤è£½ä¸æ¹å
æç¢¼ä½¿ç¨ï¼æè¨»å帳è以鍿æ¥ç並å
æææã",{email:t})})}),(0,a.FD)("section",{className:"flex flex-col gap-300 py-500",children:[(0,a.Y)("h3",{className:"heading_m_500 m-0",children:u("crowdin:common.order-details","è¨å®æç´°")}),(0,a.Y)("div",{className:"flex flex-col gap-300",children:y.map(e=>{let{lineItem:t,codes:r}=e;return(0,a.Y)(c.A,{locale:p.resolvedLanguage,productTitle:t.attributes.name,thumbnail:t.attributes.thumbnail,variantKey:t.attributes.variantKey,redeemCodes:r,mode:"copy",hideExpiryTitle:!0,t:u},t.id)})})]}),(0,a.Y)("section",{className:"border-t border-solid border-border-subtle py-500",children:(0,a.Y)(N,{prefillEmail:t})}),(0,a.Y)("section",{className:"pt-300 text-center",children:(0,a.Y)("button",{type:"button",onClick:f,disabled:h,className:"cursor-pointer border-0 bg-transparent p-0",children:(0,a.Y)(l.E,{variant:"body_s_400",color:"primary-500",children:h?u("crowdin:common.loading","è¼å
¥ä¸..."):u("crowdin:guest-checkout.resend-email","éæ°å¯é確èªä¿¡")})})})]})}},57226:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(2860),n=r(55729),i=r(41090),l=r(53031),s=r(47126),o=r(15570),c=r(86528),d=r(50993),m=r(48945);let u=e=>{let{locale:t,productTitle:r,thumbnail:u,redeemCodes:p,variantKey:h,onUseBySelf:g,onGiveAsGift:f,mode:b="default",hideExpiryTitle:y=!1,isSubscription:w=!1,isAutoRedeemed:x=!1,t:v}=e,[_,N]=(0,n.useState)(null),Y=p&&p.length>0,k=(0,n.useMemo)(()=>p?((e,t)=>{let r={};return t.forEach(t=>{if(t.materialExpiryKind)switch(t.materialExpiryKind){case"na":r[t.materialExpiryKind]||(r[t.materialExpiryKind]=[]),r[t.materialExpiryKind].push(t);break;case"period_after_enrolment":{let e=`${t.materialExpiryOptions.value}-${t.materialExpiryOptions.unit}`;r[e]||(r[e]=[]),r[e].push(t);break}case"exact_time":{let a,n=(a=t.materialExpiryOptions.endsAt,new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"Asia/Taipei"}).format(new Date(a)));r[n]||(r[n]=[]),r[n].push(t)}}}),Object.entries(r)})(t,p):[],[t,p]),E=async e=>{await (0,o.F)({text:e}),N(e),c.oR.success({message:v("crowdin:guest-checkout.code-copied","å·²è¤è£½å
æç¢¼")}),setTimeout(()=>N(t=>t===e?null:t),2e3)};return(0,a.FD)("div",{className:"rounded-500 bg-gradient-to-r from-[#f3f3f4] to-[#fbfbfc] p-400",children:[(0,a.FD)("div",{className:"mb-300 flex items-center gap-300",children:[u?(0,a.Y)(l._,{src:u,className:"h-[56px] w-[75px] shrink-0 rounded-300 object-cover",height:"56",width:"75",alt:"product"}):null,(0,a.Y)("span",{className:"body_s_500",children:r})]}),Y?k.map(e=>{let[t,r]=e;return(0,a.FD)("div",{className:"mb-300 last:mb-0",children:[y?null:w&&"na"===r[0].materialExpiryKind?(0,a.Y)("h5",{className:"m-0 mb-2
100 body_s_400 text-content-secondary",children:v(x?"crowdin:wu-components.line-item-info.redeem-code.title--subscription-activated":"crowdin:wu-components.line-item-info.redeem-code.title--subscription")}):(0,a.Y)(d.A,{titleInfo:t,redeemCode:r[0],t:v}),r.map((e,t)=>(0,a.FD)("div",{className:"mb-300 flex items-center last:mb-0",children:[(0,a.Y)("div",{className:"bg-background-brand-light text-content-brand mr-300 flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-999 body_s_500",children:t+1}),(0,a.Y)("div",{className:"flex-1",children:(e=>{if(e.useUp){let e=x&&w?v("crowdin:wu-components.line-item-info.auto-redeemed"):void 0;return(0,a.Y)(m.A,{t:v,label:e})}if("copy"===b){let t=_===e.code;return(0,a.Y)(i.$n,{variant:"outlined",color:"primary",size:"sm",fullWidth:!0,startIcon:(0,a.Y)(s.I,{type:t?"check":"content_copy",size:14}),onClick:()=>E(e.code),children:t?v("crowdin:guest-checkout.copied","å·²è¤è£½"):v("crowdin:guest-checkout.copy-code","è¤è£½å
æç¢¼")})}return(0,a.FD)("div",{className:"flex items-center gap-200",children:[(0,a.Y)(i.$n,{variant:"outlined",color:"primary",size:"sm",className:"flex-1",onClick:()=>null==f?void 0:f(e),children:v("crowdin:wu-components.line-item-info.give-a-gift")}),(0,a.Y)(i.$n,{size:"sm",className:"flex-1",disabled:!e.canIRedeem,onClick:()=>null==g?void 0:g(e),children:e.canIRedeem?v("crowdin:wu-components.line-item-info.use-by-self"):v("crowdin:wu-components.line-item-info.already-have")})]})})(e)})]},e.code))]},r[0].materialExpiryKind+t)}):null,"enrollment"!==h&&"enrollment_installments"!==h||Y?null:(0,a.Y)(m.A,{t:v})]})}},79798:(e,t,r)=>{r.d(t,{C:()=>n,G:()=>a});let a=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,n=/^09\d{8}$/}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.