PageSourceSearch

https://kusart.com/_next/static/chunks/4eb4471d6ed8382f.js

js kusart.com collected 2026-10-08 05:48:28 UTC 44,691 bytes, 4 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f13b-7c84-7330-8e25-985f2b121b1b")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,306636,e=>{"use strict";e.i(678116);var t=e.i(515653),r=e.i(583979);function a({locale:e,...a}){if(!e)throw Error(void 0);return(0,t.jsx)(r.IntlProvider,{locale:e,...a})}function i({children:e,locale:r,messages:i}){return(0,t.jsx)(a,{locale:r,messages:i,timeZone:"UTC",onError:e=>{"object"==typeof e&&null!==e&&"code"in e&&"MISSING_MESSAGE"===e.code||console.error(e)},getMessageFallback:({namespace:e,key:t})=>e?`${e}.${t}`:t,children:e})}e.s(["IntlProvider",()=>i],306636)},765911,e=>{"use strict";let t=(0,e.i(499688).default)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],765911)},925490,70828,e=>{"use strict";let t=(0,e.i(499688).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t],70828),e.s(["AlertCircle",()=>t],925490)},257987,e=>{"use strict";var t=e.i(292568);e.i(287359);var r=e.i(493739),a=e.i(515653),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{let s=(0,r.createSlot)(`Primitive.${i}`),n=t.forwardRef((e,t)=>{let{asChild:r,...n}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(r?s:i,{...n,ref:t})});return n.displayName=`Primitive.${i}`,{...e,[i]:n}},{});e.s(["Primitive",()=>i])},10708,e=>{"use strict";var t=e.i(515653),r=e.i(292568),a=e.i(257987),i=r.forwardRef((e,r)=>(0,t.jsx)(a.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var s=e.i(294237),n=e.i(647163);let o=(0,s.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),l=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(i,{ref:a,className:(0,n.cn)(o(),e),...r}));l.displayName=i.displayName,e.s(["Label",()=>l],10708)},854117,e=>{"use strict";let t=(0,e.i(499688).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],854117)},913480,e=>{"use strict";let t=(0,e.i(499688).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],913480)},23750,e=>{"use strict";var t=e.i(515653),r=e.i(292568),a=e.i(647163);let i=r.forwardRef(({className:e,type:r,...i},s)=>(0,t.jsx)("input",{type:r,className:(0,a.cn)("flex h-10 w-full rounded-md border-0 bg-muted/40 px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...i}));i.displayName="Input",e.s(["Input",()=>i])},924770,e=>{"use strict";let t=(0,e.i(499688).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],924770)},809641,e=>{"use strict";var t=e.i(292568);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},527069,e=>{"use strict";function t(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>t])},994179,e=>{"use strict";var t=e.i(515653),r=e.i(294237),a=e.i(647163);let i=(0,r.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(i({variant:r}),e),...s})}e.s(["Badge",()=>s])},970065,e=>{"use strict";var t=e.i(515653),r=e.i(292568),a=e.i(647163);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("rounded-lg border-0 bg-card text-card-foreground shadow-sm",e),...r}));
1i.displayName="Card";let s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",e),...r}));s.displayName="CardHeader";let n=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",e),...r}));n.displayName="CardTitle";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));o.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("p-6 pt-0",e),...r}));l.displayName="CardContent",r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",()=>i,"CardContent",()=>l,"CardDescription",()=>o,"CardHeader",()=>s,"CardTitle",()=>n])},832793,e=>{"use strict";let t=(0,e.i(499688).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],832793)},473168,e=>{"use strict";let t=(0,e.i(499688).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],473168)},936557,e=>{"use strict";let t=(0,e.i(499688).default)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>t],936557)},95635,e=>{"use strict";let t=(0,e.i(499688).default)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],95635)},276765,e=>{"use strict";var t=e.i(868729);e.i(263046);var r=e.i(425495),a=e.i(838645),i=e.i(197071),s=e.i(491719);function n(){let e=s.MINIMAX_H3_CAMPAIGN_ACTIVITY_ID.trim(),{data:a}=(0,t.useQuery)({queryKey:["campaign-activities","get",e],queryFn:()=>r.campaignActivitiesApi.getActivity({id:e}),enabled:!!e,staleTime:6e4}),i=a?.data;return{active:i?.status==="RUNNING",freeTaskEnabled:i?.free_task_status==="ENABLED",activity:i??null}}function o(){let{user:e}=(0,a.useAuthState)(),{data:t}=(0,i.default)();return e&&!t?null:t?.has_active_subscription?"PREMIUM"===t.plan_type?"premium":"plus":"free"}e.s(["useMinimaxH3Campaign",()=>n,"useMinimaxH3Tier",()=>o])},197895,e=>{"use strict";let t,r="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));e.s(["v4",0,function(e,s,n){if(r&&!s&&!e)return r();let o=(e=e||{}).random??e.rng?.()??function(){if(!t){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");t=crypto.getRandomValues.bind(crypto)}return t(a)}();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,s){if((n=n||0)<0||n+16>s.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[n+e]=o[e];return s}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(o)}],197895)},431612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let a=e.r(182443);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},59272,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}
1Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},889533,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return l}});let a=e.r(515653),i=e.r(287359),s=e.r(821502),n=e.r(59272),o=e.r(408542);function l({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let l=(0,o.getDeploymentIdQueryOrEmptyString)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,n.encodeURIPath)(e)}${l}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},329120,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(515653),i=e.r(292568),s=e.r(431612),n=e.r(889533);function o(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},d=function(e){let t={...l,...e},r=(0,i.lazy)(()=>t.loader().then(o)),d=t.loading;function c(e){let o=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,c=l?i.Suspense:i.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(n.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...l?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},190572,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let a=e.r(481258)._(e.r(329120));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,a.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},137949,e=>{"use strict";let t=(0,e.i(499688).default)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Mail",()=>t],137949)},625959,e=>{"use strict";var t=e.i(515653),r=e.i(292568),a=e.i(922353),i=e.i(9413),s=e.i(291967),n=e.i(136567),o=e.i(809641),l=e.i(570391),d=e.i(690816),c=e.i(285565),u="Checkbox",[m,f]=(0,i.createContextScope)(u),[h,p]=m(u);function x(e){let{__scopeCheckbox:a,checked:i,children:s,defaultChecked:o,disabled:l,form:d,name:c,onCheckedChange:m,required:f,value:p="on",internal_do_not_use_render:x}=e,[g,v]=(0,n.useControllableState)({prop:i,defaultProp:o??!1,onChange:m,caller:u}),[y,b]=r.useState(null),[w,j]=r.useState(null),k=r.useRef(!1),C=!y||!!d||!!y.closest("form"),_={checked:g,disabled:l,setChecked:v,control:y,setControl:b,name:c,form:d,value:p,hasConsumerStoppedPropagationRef:k,required:f,defaultChecked:!N(o)&&o,isFormControl:C,bubbleInput:w,setBubbleInput:j};return(0,t.jsx)(h,{scope:a,..._,children:"function"==typeof x?x(_):s})}var g="CheckboxTrigger",v=r.forwardRef(({__scopeCheckbox:e,onKeyDown:i,onClick:n,...o},l)=>{let{control:d,value:u,disabled:m,checked:f,required:h,setControl:x,setChecked:v,hasConsumerStoppedPropagationRef:y,isFormControl:b,bubbleInput:w}=p(g,e),j=(0,a.useComposedRefs)(l,x),k=r.useRef(f);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>v(k.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,v]),(0,t.jsx)(c.Primitive.button,{type:"button",role:"checkbox","aria-checked":N(f)?"mixed":f,"aria-required":h,"data-state":C(f),"data-disabled":m?"":void 0,disabled:m,value:u,...o,ref:j,onKeyDown:(0,s.composeEventHandlers)(i,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,s.composeEventHandlers)(n,e=>{v(e=>!!N(e)||!e),w&&b&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})});v.displayName=g;var y=r.forwardRef((e,r)=>{let{__scopeCheckbox:a,name:i,checked:s,defaultChecked:n,required:o,disabled:l,value:d,onCheckedChange:c,form:u,...m}=e;return(0,t.jsx)(x,{__scopeCheckbox:a,checked:s,defaultChecked:n,disabled:l,required:o,onCheckedChange:c,name:i,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{...m,ref:r,__scopeCheckbox:a}),e&&(0,t.jsx)(k,{__scopeCheckbox:a})]})})});y.displayName=u;var b="CheckboxIndicator",w=r.forwardRef((e,r)=>{let{__scopeCheckbox:a,forceMount:i,...s}=e,n=p(b,a);return(0,t.jsx)(d.Presence,{present:i||N(n.checked)||!0===n.checked,children:(0,t.jsx)(c.Primitive.span,{"data-state":C(n.checked),"data-disabled":n.disabled?"":void 0,...s,ref:r,
1style:{pointerEvents:"none",...e.style}})})});w.displayName=b;var j="CheckboxBubbleInput",k=r.forwardRef(({__scopeCheckbox:e,...i},s)=>{let{control:n,hasConsumerStoppedPropagationRef:d,checked:u,defaultChecked:m,required:f,disabled:h,name:x,value:g,form:v,bubbleInput:y,setBubbleInput:b}=p(j,e),w=(0,a.useComposedRefs)(s,b),k=(0,o.usePrevious)(u),C=(0,l.useSize)(n);r.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!d.current;if(k!==u&&e){let r=new Event("click",{bubbles:t});y.indeterminate=N(u),e.call(y,!N(u)&&u),y.dispatchEvent(r)}},[y,k,u,d]);let _=r.useRef(!N(u)&&u);return(0,t.jsx)(c.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:m??_.current,required:f,disabled:h,name:x,value:g,form:v,...i,tabIndex:-1,ref:w,style:{...i.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function N(e){return"indeterminate"===e}function C(e){return N(e)?"indeterminate":e?"checked":"unchecked"}k.displayName=j;var _=e.i(782666),E=e.i(647163);let S=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(y,{ref:a,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...r,children:(0,t.jsx)(w,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,t.jsx)(_.Check,{className:"h-4 w-4"})})}));S.displayName=y.displayName,e.s(["Checkbox",()=>S],625959)},786130,e=>{"use strict";let t="https://auth-redirect.local";function r(e,t){let r=new URL("/auth-action",e);return r.searchParams.set("redirect",a(t)),r.toString()}function a(e,r="/"){let i=e?.trim();if(!i||!i.startsWith("/"))return r;try{let e=new URL(i,t);if(e.origin!==t)return r;return`${e.pathname}${e.search}${e.hash}`}catch{return r}}function i(e,t="/"){if(!e)return t;try{let r=new URL(e);return a(r.searchParams.get("redirect"),t)}catch{return t}}e.s(["buildAuthActionUrl",()=>r,"getAuthRedirectFromContinueUrl",()=>i,"getSafeAuthRedirectPath",()=>a])},914409,902369,e=>{"use strict";e.i(2933);var t=e.i(951099),r=e.i(197895),a=e.i(176009),i=e.i(786130);let s="temporary-verified-email",n="temporary-verified-password";function o({email:e,password:t}){localStorage.setItem(s,e),localStorage.setItem(n,t)}function l(){let e=localStorage.getItem(s),t=localStorage.getItem(n);return e&&t?{email:e,password:t}:null}function d(){localStorage.removeItem(s),localStorage.removeItem(n)}async function c(e,r,i){let s=window.location.origin,n=i?`?redirect=${encodeURIComponent(i)}`:"",l=(await (0,t.signInWithEmailAndPassword)(a.auth,e,r)).user;if(!l.emailVerified){try{o({email:e,password:r}),await (0,t.sendEmailVerification)(l,{url:`${s}/auth-action${n}`,handleCodeInApp:!1})}catch{}await (0,t.signOut)(a.auth);let i=Error("EMAIL_NOT_VERIFIED");throw i.isEmailNotVerified=!0,i.emailSent=!0,i}return l}async function u(e,s){let n=window.location.origin,o=(0,i.buildAuthActionUrl)(n,s),l=`Kusa!1aA-${(0,r.v4)()}`,d=(await (0,t.createUserWithEmailAndPassword)(a.auth,e,l)).user;try{await (0,t.sendPasswordResetEmail)(a.auth,e,{url:o,handleCodeInApp:!1})}catch(e){try{await (0,t.deleteUser)(d)}catch{await (0,t.signOut)(a.auth).catch(()=>void 0)}throw e}return await (0,t.signOut)(a.auth),d}async function m(e,r){let s=window.location.origin,n=(0,i.buildAuthActionUrl)(s,r);await (0,t.sendPasswordResetEmail)(a.auth,e,{url:n,handleCodeInApp:!1})}async function f(e,r,i){let s=window.location.origin,n=i?`?redirect=${encodeURIComponent(i)}`:"",o=(await (0,t.signInWithEmailAndPassword)(a.auth,e,r)).user;if(o.emailVerified)throw await (0,t.signOut)(a.auth),Error("EMAIL_ALREADY_VERIFIED");await (0,t.sendEmailVerification)(o,{url:`${s}/auth-action${n}`,handleCodeInApp:!1}),await (0,t.signOut)(a.auth)}e.s(["clearTemporaryVerifiedAccount",()=>d,"getTemporaryVerifiedAccount",()=>l,"setTemporaryVerifiedAccount",()=>o],902369),e.s(["resendVerificationEmail",()=>f,"resetPassword",()=>m,"signIn",()=>c,"signUp",()=>u],914409)},575888,e=>{"use strict";var t=e.i(730687);
1let r=new Set(["@gmail.com","@outlook.com","@hotmail.com","@yahoo.com","@icloud.com","@protonmail.com","@zoho.com","@fastmail.com","@mail.com","@gmx.com","@aol.com","@earthlink.net","@mail.ru","@yandex.com","@yandex.ru","@icloud.hk","@qq.com","@163.com","@126.com","@sohu.com","@sina.com","@yeah.net","@aliyun.com","@aliyunmail.cn","@mail.qq.com","@vip.qq.com","@gmail.co.jp","@gmail.co.uk","@gmail.jp","@hotmail.co.jp","@yahoo.co.jp","@outlook.jp","@naver.com","@daum.net","@nate.com","@hanmail.net","@rediffmail.com","@netti.fi","@outlook.fr","@orange.fr","@neuf.fr","@web.de","@gmx.de","@t-online.de","@libero.it","@virgilio.it","@alice.it","@outlook.de","@icloud.de","@kazama.inc","@ymail.com","@rocketmail.com","@onlyfolks.app"]);function a(e){var a;let i,s,n=-1===(s=(i=e.trim().toLowerCase()).lastIndexOf("@"))?null:{name:i.slice(0,s),domain:i.slice(s)};return!!n&&(r.has(n.domain)?!((a=n.name).includes("+")||a.includes("."))||(t.toast.error("Please use your original email address without dots or plus aliases.",{style:{background:"#dc2626",color:"#ffffff"}}),!1):(t.toast.error("Oops! This email address cannot be used for registration. Please try a different, commonly used provider such as Gmail, Outlook, or Yahoo. etc.",{style:{background:"#dc2626",color:"#ffffff"}}),!1))}e.s(["isEmailAllowedAndShowMessage",()=>a])},786549,e=>{"use strict";var t=e.i(678116);e.i(160889);let r="kusart.com";function a(){let e=(t.default.env.NEW_FRONTEND_HOST??"kusart.com"??t.default.env.NEXT_PUBLIC_BASE_URL?.replace(/^https?:\/\//,"").split("/")[0]??r).trim();return e?e.startsWith("http://")||e.startsWith("https://")?e.replace(/kusa\.pics/i,"kusart.com").replace(/\/$/,""):`https://${e.replace(/kusa\.pics/i,"kusart.com").replace(/\/$/,"")}`:`https://${r}`}e.s(["getSiteOrigin",()=>a])},506237,502472,e=>{"use strict";var t=e.i(292568),r=e.i(868729),a=e.i(830616),i=e.i(838645);e.i(989082);var s=e.i(9275),n=e.i(40983);function o(){let{user:e}=(0,i.useAuthState)(),o=e?.uid,l=(0,a.useQueryClient)(),d=(0,n.readInviteFilledCache)(o),c=(0,r.useQuery)({queryKey:["invite","bind-status",o],queryFn:()=>
1s.InviteCodeApi.bindStatus(),enabled:!!o&&!d,staleTime:3e5,gcTime:18e5,retry:1,refetchOnWindowFocus:!1}),u=!!c.data?.data?.has_filled_invite_code,m=c.data?.data?.can_fill_invite_code??!0,f=!!o&&(d||u||!m);return(0,t.useEffect)(()=>{o&&u&&(0,n.markInviteFilledCache)(o)},[u,o]),{...c,shouldHideInvitePrompt:f,markFilled:()=>{(0,n.markInviteFilledCache)(o),l.setQueryData(["invite","bind-status",o],{code:0,message:"ok",data:{has_filled_invite_code:!0}})}}}function l(e,t){let r=t&&"/"!==t?t.startsWith("/")?t:`/${t}`:"/";return"en"===e?r:"/"===r?`/${e}`:`/${e}${r}`}e.s(["useInviteBindStatus",()=>o],506237),e.i(786549),e.s(["getLocalizedPath",()=>l],502472)},770407,e=>{"use strict";var t=e.i(515653),r=e.i(292568),a=e.i(630374),i=e.i(624644),s=e.i(914409),n=e.i(750843),o=e.i(730687);e.i(175873);var l=e.i(820617),d=e.i(366602),c=e.i(167881),u=e.i(625959),m=e.i(10708),f=e.i(137949),h=e.i(431267);function p({onGoogleSignIn:e,onEmailSignIn:r,onSignUp:a,isSigningIn:i,isSubmitting:s,acceptEDM:n,onAcceptEDMChange:o}){let l=(0,d.useTranslations)("auth");return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)(c.Button,{className:"h-14 w-full rounded-xl border-2 border-border bg-card font-medium text-foreground hover:bg-muted",onClick:e,disabled:i||s,children:[i?(0,t.jsx)(h.Loader2,{className:"h-4 w-4 mr-2 animate-spin"}):(0,t.jsxs)("svg",{className:"h-6 w-6 mr-3",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]}),l("continueWithGoogle")]}),(0,t.jsxs)(c.Button,{variant:"default",className:"h-14 w-full rounded-xl font-medium",onClick:r,disabled:i||s,children:[(0,t.jsx)(f.Mail,{className:"h-5 w-5 mr-3"}),l("continueWithEmail")]}),(0,t.jsxs)("div",{className:"flex items-start mt-4",children:[(0,t.jsx)(u.Checkbox,{id:"landing-edm",checked:n,onCheckedChange:e=>o(e),className:"mr-2 mt-1",disabled:i||s}),(0,t.jsx)(m.Label,{htmlFor:"landing-edm",className:"text-sm text-muted-foreground cursor-pointer leading-relaxed",children:"I agree to receive newsletters and promotional emails from Kazama."})]}),(0,t.jsx)("div",{className:"text-center mt-2",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["By continuing, you agree to our"," ",(0,t.jsx)("a",{href:"/terms",className:"text-pink-500 hover:underline",children:"Terms of Service"})," ","and"," ",(0,t.jsx)("a",{href:"/privacy",className:"text-pink-500 hover:underline",children:"Privacy Policy"}),"."]})}),(0,t.jsx)("div",{className:"text-center mt-6",children:(0,t.jsxs)("p",{className:"text-base text-muted-foreground",children:[l("noAccountQuestion")," ",(0,t.jsx)("button",{type:"button",onClick:a,className:"text-pink-500 hover:underline font-medium",disabled:i||s,children:l("signUp")})]})})]})}var x=e.i(23750),g=e.i(473168),v=e.i(936557),y=e.i(832793);function b({formData:e,onFormDataChange:a,isSubmitting:i,onSubmit:s,onBack:n,onSwitchToSignUp:o,onForgotPassword:l}){let u=(0,d.useTranslations)("auth"),[f,p]=(0,r.useState)(!1);return(0,t.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.Label,{htmlFor:"signin-email",className:"text-sm text-foreground",children:u("email")}),(0,t.jsx)(x.Input,{id:"signin-email",type:"email",placeholder:u("enterEmail"),value:e.email,onChange:e=>a({email:e.target.value}),required:!0,disabled:i,className:"rounded-xl border-tool-line focus:border-tool-fill focus:ring-tool-fill/30 h-12"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.Label,{htmlFor:"signin-password",className:"text-sm text-foreground",children:u("password")}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Input,{id:"signin-password",type:f?"text":"password",placeholder:u("enterPassword"),value:e.password,onChange:e=>a({password:e.target.value}),required:!0,disabled:i,className:"rounded-xl border-tool-line focus:border-tool-fill focus:ring-tool-fill/30 h-12 pr-10"}),(0,t.jsx)("button",{type:"button",onClick:()=>
1p(!f),className:"absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-muted-foreground transition-colors",disabled:i,children:f?(0,t.jsx)(v.EyeOff,{className:"h-4 w-4"}):(0,t.jsx)(g.Eye,{className:"h-4 w-4"})})]})]}),(0,t.jsx)("div",{className:"text-right",children:(0,t.jsx)("button",{type:"button",onClick:l,className:"text-sm text-pink-500 hover:text-pink-600 hover:underline transition-colors",disabled:i,children:"Forgot password?"})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-6",children:[(0,t.jsxs)(c.Button,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-pink-500",onClick:n,disabled:i,children:[(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4 mr-1"}),u("back")]}),(0,t.jsx)(c.Button,{type:"submit",variant:"default",className:"rounded-xl px-6 py-2 text-base disabled:cursor-not-allowed disabled:opacity-50",disabled:i,children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 mr-2 animate-spin"}),u("signingIn")]}):u("signIn")})]}),(0,t.jsx)("div",{className:"text-center mt-2",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["By continuing, you agree to our"," ",(0,t.jsx)("a",{href:"/terms",className:"text-pink-500 hover:underline",children:"Terms of Service"})," ","and"," ",(0,t.jsx)("a",{href:"/privacy",className:"text-pink-500 hover:underline",children:"Privacy Policy"}),"."]})}),(0,t.jsxs)("p",{className:"text-center text-base text-muted-foreground mt-4",children:[u("noAccountQuestion")," ",(0,t.jsx)("button",{type:"button",onClick:o,className:"text-pink-500 hover:underline font-medium",disabled:i,children:u("signUp")})]})]})}var w=e.i(506237);function j({formData:e,onFormDataChange:r,isSubmitting:a,onSubmit:i,onBack:s,onSwitchToSignIn:n}){let o=(0,d.useTranslations)("auth"),{shouldHideInvitePrompt:l}=(0,w.useInviteBindStatus)();return(0,t.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.Label,{htmlFor:"signup-email",className:"text-sm text-foreground",children:o("email")}),(0,t.jsx)(x.Input,{id:"signup-email",type:"email",placeholder:o("enterEmail"),value:e.email,onChange:e=>r({email:e.target.value}),required:!0,disabled:a,className:"rounded-xl border-tool-line focus:border-tool-fill focus:ring-tool-fill/30 h-12"})]}),!l&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.Label,{htmlFor:"signup-invite-code",className:"text-sm text-foreground",children:o("inviteCodeOptional")}),(0,t.jsx)(x.Input,{id:"signup-invite-code",type:"text",placeholder:o("inviteCodePlaceholder"),value:e.inviteCode??"",onChange:e=>r({inviteCode:e.target.value}),disabled:a,className:"h-12 rounded-xl border-tool-line focus:border-tool-fill focus:ring-tool-fill/30"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("inviteCodeHint")})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-6",children:[(0,t.jsxs)(c.Button,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-pink-500",onClick:s,disabled:a,children:[(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4 mr-1"}),o("backToSignIn")]}),(0,t.jsx)(c.Button,{type:"submit",variant:"default",className:"rounded-xl px-6 py-2 text-base disabled:cursor-not-allowed disabled:opacity-50",disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 mr-2 animate-spin"}),o("creating")]}):o("createAccount")})]}),(0,t.jsx)("div",{className:"text-center mt-2",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["By continuing, you agree to our"," ",(0,t.jsx)("a",{href:"/terms",className:"text-pink-500 hover:underline",children:"Terms of Service"})," ","and"," ",(0,t.jsx)("a",{href:"/privacy",className:"text-pink-500 hover:underline",children:"Privacy Policy"}),"."]})}),(0,t.jsxs)("p",{className:"text-center text-base text-muted-foreground mt-4",children:[o("alreadyHaveAccount")," ",(0,t.jsx)("button",{type:"button",onClick:n,className:"text-pink-500 hover:underline font-medium",disabled:a,children:o("sign
1In")})]})]})}var k=e.i(734881);function N({email:e,countdown:r,isSubmitting:a,onResend:i,onChangeEmail:s,onBackToLogin:n}){let o=(0,d.useTranslations)("auth");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-pink-100 rounded-full flex items-center justify-center",children:(0,t.jsx)(f.Mail,{className:"w-8 h-8 text-pink-500"})})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:o("verificationSentTo",{email:e})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o("clickVerifyLink")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o("checkSpam5Min")})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(c.Button,{variant:"default",onClick:i,disabled:r>0||a,className:"w-full rounded-xl disabled:cursor-not-allowed disabled:opacity-50",children:a?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(h.Loader2,{className:"w-4 h-4 mr-2 animate-spin"}),o("sending")]}):r>0?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.Clock,{className:"w-4 h-4 mr-2"}),o("resendIn",{seconds:r})]}):o("resendVerificationEmail")}),(0,t.jsxs)(c.Button,{onClick:s,variant:"outline",className:"w-full border-2 border-tool-line hover:bg-tool-subtle/80 hover:border-tool-line rounded-xl",disabled:a,children:[(0,t.jsx)(y.ArrowLeft,{className:"w-4 h-4 mr-2"}),o("changeEmail")]}),(0,t.jsx)(c.Button,{onClick:n,variant:"ghost",className:"w-full",disabled:a,children:o("backToLogin")})]}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o("accountActivatedAfterVerification")})})]})}function C({email:e,onEmailChange:r,isSubmitting:a,onSubmit:i,onBack:s}){let n=(0,d.useTranslations)("auth");return(0,t.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-center space-y-2 mb-6",children:(0,t.jsx)("p",{className:"text-muted-foreground",children:"Enter your email address and we'll send you a link to reset your password."})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.Label,{htmlFor:"forgot-email",className:"text-sm text-foreground",children:n("email")}),(0,t.jsx)(x.Input,{id:"forgot-email",type:"email",placeholder:n("enterEmail"),value:e,onChange:e=>r(e.target.value),required:!0,disabled:a,className:"rounded-xl border-tool-line focus:border-tool-fill focus:ring-tool-fill/30 h-12"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-6",children:[(0,t.jsxs)(c.Button,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-pink-500",onClick:s,disabled:a,children:[(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4 mr-1"}),n("back")]}),(0,t.jsx)(c.Button,{type:"submit",variant:"default",className:"rounded-xl px-6 py-2 text-base",disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Sending..."]}):n("sendResetLink")})]})]})}function _({email:e,countdown:r,isSubmitting:a,onResend:i,onBackToSignIn:s}){let n=(0,d.useTranslations)("auth");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-pink-100 rounded-full flex items-center justify-center",children:(0,t.jsx)(f.Mail,{className:"w-8 h-8 text-pink-500"})})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:n("resetLinkSentTo",{email:e})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("clickResetLink")})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(c.Button,{variant:"default",onClick:i,disabled:r>0||a,className:"w-full rounded-xl disabled:cursor-not-allowed disabled:opacity-50",children:a?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(h.Loader2,{className:"w-4 h-4 mr-2 animate-spin"}),n("sending")]}):r>0?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.Clock,{className:"w-4 h-4 mr-2"}),n("resendIn",{seconds:r})]}
1):n("resendResetLink")}),(0,t.jsxs)(c.Button,{onClick:s,variant:"outline",className:"w-full border-2 border-tool-line hover:bg-tool-subtle/80 hover:border-tool-line rounded-xl",disabled:a,children:[(0,t.jsx)(y.ArrowLeft,{className:"w-4 h-4 mr-2"}),n("backToSignIn")]})]}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("checkSpamFolder")})})]})}var E=e.i(575888),S=e.i(583979),A=e.i(40983),I=e.i(502472),R=e.i(240074);e.i(678116);let P="/user-info";function M({isOpen:e,onClose:c,onContinueWithGoogle:u,onContinueWithEmail:m,isSigningIn:f,isLimitReached:h=!1,showAnimeRoastPrompt:x=!1,customPrompt:g}){let[v,y]=(0,r.useState)("landing"),[w,k]=(0,r.useState)({email:"",password:"",confirmPassword:"",inviteCode:"",acceptEDM:!0}),[M,T]=(0,r.useState)(!1),[L,D]=(0,r.useState)(0),F=(0,r.useRef)(!1),U=(0,d.useTranslations)("auth"),O=(0,S.useLocale)(),B=function(){let e="kusa.pics".trim();if(!e)return"";let t=e.replace(/^https?:\/\//i,"").split("/")[0]?.split(":")[0]??"";if(!t)return"";let r=P.startsWith("/")?P:`/${P}`;return`https://${t}${r}`}(),$=()=>window.location.pathname+window.location.search+window.location.hash;(0,r.useEffect)(()=>{if(e&&!F.current){F.current=!0;let e=(0,R.getAuthTrigger)();h&&(e="limit_reached"),x&&(e="anime_roast"),(0,R.trackAuthModalShown)({trigger:e,source_page:window.location.pathname,is_limit_reached:h,custom_prompt:g})}e||(F.current=!1,(0,R.clearAuthTrigger)())},[e,h,x,g]),(0,r.useEffect)(()=>{e||(y("landing"),k({email:"",password:"",confirmPassword:"",inviteCode:"",acceptEDM:!0}),T(!1),D(0))},[e]),(0,r.useEffect)(()=>{if(!e||w.inviteCode)return;let t=new URLSearchParams(window.location.search);for(let e of A.INVITE_URL_QUERY_KEYS){let r=(0,A.normalizeInviteCode)(t.get(e));if(r){k(e=>e.inviteCode?e:{...e,inviteCode:r});break}}},[w.inviteCode,e]),(0,r.useEffect)(()=>{if(L<=0)return;let e=setTimeout(()=>D(e=>e-1),1e3);return()=>clearTimeout(e)},[L]);let V=e=>{k(t=>({...t,...e}))},q=async e=>{if(e.preventDefault(),(0,E.isEmailAllowedAndShowMessage)(w.email)){T(!0),(0,R.trackAuthSubmitted)({auth_type:"signup",auth_method:"email"});try{let e=(()=>{let e=(0,A.normalizeInviteCode)(w.inviteCode);if(!e)return $();let t=(0,I.getLocalizedPath)(O,"/invite");return`${t}?invite_code=${encodeURIComponent(e)}`})(),t=await (0,s.signUp)(w.email,e);if(t){let e=(0,A.normalizeInviteCode)(w.inviteCode);e&&(0,A.setPendingInviteCode)(e),(0,R.trackUserSignedUp)({user_id:t.uid,auth_method:"email",email_domain:(0,R.extractEmailDomain)(w.email),accepted_edm:w.acceptEDM})}if(w.acceptEDM)try{await l.edmApi.setStatus({is_accept_edm:w.acceptEDM})}catch(e){console.error("Failed to set EDM status:",e)}y("reset-sent"),D(60),o.toast.success(U("passwordResetSent"))}catch(e){(0,R.trackAuthFailed)({auth_type:"signup",auth_method:"email",error_code:e.code,error_message:e.message||"Unknown error"}),"auth/email-already-in-use"===e.code?o.toast.error(U("emailAlreadyRegistered")):"auth/invalid-email"===e.code?o.toast.error(U("invalidEmail")):o.toast.error(U("registrationFailed"))}finally{T(!1)}}},z=async e=>{e.preventDefault(),T(!0),(0,R.trackAuthSubmitted)({auth_type:"login",auth_method:"email"});try{let e=$(),t=await (0,s.signIn)(w.email,w.password,e);t&&(0,R.trackAuthSuccess)({auth_type:"login",auth_method:"email",user_id:t.uid}),o.toast.success(U("loginSuccessful")),c(),setTimeout(()=>{m(w.email,w.password),w.acceptEDM&&l.edmApi.setStatus({is_accept_edm:w.acceptEDM})},100)}catch(e){(0,R.trackAuthFailed)({auth_type:"login",auth_method:"email",error_code:e.code||(e.isEmailNotVerified?"email_not_verified":void 0),error_message:e.message||"Unknown error"}),e.isEmailNotVerified||"EMAIL_NOT_VERIFIED"===e.message?(e.emailSent?(o.toast.success(U("verificationSentCheckInbox")),y("verify-waiting"),D(60)):(o.toast.error(U("verifyEmailFirst")),y("verify-waiting")),(0,R.trackEmailVerificationRequired)({email_domain:(0,R.extractEmailDomain)(w.email)})):"auth/wrong-password"===e.code||"auth/user-not-found"===e.code||"auth/invalid-credential"===e.code?o.toast.error(U("invalidCredentials")):o.toast.error(U("loginFailed"))}finally{T(!1)}},H=async()=>
1{if(!(L>0)&&!M){T(!0);try{await (0,s.resendVerificationEmail)(w.email,w.password,$()),D(60),o.toast.success(U("verificationResent"))}catch(e){"EMAIL_ALREADY_VERIFIED"===e.message?(o.toast.success(U("emailAlreadyVerified")),y("signin")):o.toast.error(U("failedToResendEmail"))}finally{T(!1)}}},G=async e=>{if(e.preventDefault(),!w.email)return void o.toast.error(U("enterEmailAddress"));T(!0);try{await (0,s.resetPassword)(w.email,$()),o.toast.success(U("passwordResetSent")),y("reset-sent"),D(60),(0,R.trackPasswordResetRequested)({email_domain:(0,R.extractEmailDomain)(w.email)})}catch(e){"auth/user-not-found"===e.code?o.toast.error(U("noAccountFound")):"auth/invalid-email"===e.code?o.toast.error(U("invalidEmail")):o.toast.error(U("failedToSendReset"))}finally{T(!1)}},W=async()=>{if(!(L>0)&&!M){T(!0);try{await (0,s.resetPassword)(w.email,$()),o.toast.success(U("passwordResetResent")),D(60)}catch(e){"auth/user-not-found"===e.code?o.toast.error(U("noAccountFound")):"auth/invalid-email"===e.code?o.toast.error(U("invalidEmail")):o.toast.error(U("failedToResendReset"))}finally{T(!1)}}},K=async()=>{T(!0),(0,R.trackAuthSubmitted)({auth_type:"login",auth_method:"google"});try{if(!await u())return;if(w.acceptEDM)try{await l.edmApi.setStatus({is_accept_edm:w.acceptEDM})}catch(e){console.error("Failed to set EDM status:",e)}c()}catch(e){e?.code==="auth/inapp-browser"?o.toast.error(n.GOOGLE_AUTH_ERRORS.inAppBrowser,{duration:6e3}):e?.code==="auth/popup-blocked"?o.toast.error(n.GOOGLE_AUTH_ERRORS.popupBlocked,{duration:5e3}):o.toast.error(U("googleLoginFailed")),(0,R.trackAuthFailed)({auth_type:"login",auth_method:"google",error_code:e?.code,error_message:e?.message||"Google sign-in failed"})}finally{T(!1)}};return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||c()},children:(0,t.jsxs)(a.DialogContent,{className:"!left-4 !right-4 !translate-x-0 w-auto md:!left-[50%] md:!right-auto md:!translate-x-[-50%] md:w-full md:max-w-lg max-h-[90dvh] overflow-y-auto p-6 bg-card rounded-2xl border-2 border-tool-line shadow-kawaii",children:[(0,t.jsxs)(a.DialogHeader,{className:"text-center",children:[(0,t.jsx)("div",{className:"mx-auto mb-4 w-32",children:(0,t.jsx)(i.default,{src:"/logo.png",alt:"KusArt Logo",width:150,height:75,className:"w-full h-auto"})}),(0,t.jsx)(a.DialogTitle,{className:"text-2xl font-bold text-foreground text-center",children:(()=>{switch(v){case"verify-waiting":case"reset-sent":return U("checkYourEmail");case"signup":return U("signUpForKusArt");case"forgot-password":return U("resetPasswordTitle");default:return U("signInToKusArt")}})()}),("landing"===v||"signin"===v)&&B.length>0&&(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-2 text-center",children:(0,t.jsx)("a",{href:B,target:"_blank",rel:"noopener noreferrer",className:"text-pink-500 font-medium hover:text-pink-600 underline underline-offset-2 decoration-pink-300 hover:decoration-pink-500 transition-colors",children:U("legacySiteUserInfoLink")})}),"landing"===v&&g&&(0,t.jsx)("div",{className:"mb-4 mt-2 p-3 bg-pink-50 text-pink-600 rounded-xl border border-pink-200",children:(0,t.jsx)("p",{className:"text-sm font-medium",children:g})}),"landing"===v&&h&&(0,t.jsx)("div",{className:"mb-4 p-3 bg-pink-50 text-pink-600 rounded-xl border border-pink-200",children:(0,t.jsx)("p",{className:"text-sm font-medium",children:U("limitReachedMessage")})}),"landing"===v&&x&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-pink-50 text-pink-600 rounded-xl border border-pink-200",children:[(0,t.jsx)("div",{className:"flex items-center justify-center mb-2"}),(0,t.jsxs)("p",{className:"text-sm font-medium text-center leading-relaxed",children:[U("animeRoastMessage"),(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-red-600 font-semibold",children:U("freeOncePerDay")})]})]}),"signup"===v&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1 text-center",children:U("signUpBonus",{credits:"200"})}),("landing"===v||"signin"===v)&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground mt-1 text-center",children:[U("joinCommunity")," ",(0,t.jsx)("span",{className:"text-pink-500 font-bold text-base md:text-lg",children:U("freeCreditsDaily")})]})]}),(0,t.jsxs)("div",{className:"mt-4",children:["landing"===v&&(0,t.jsx)(p,{onGoogleSignIn:K,onEmailSignIn:()=>{(0,R.trackAuthStepChanged)({from_step:"landing",to_step:"signin"}),y("signin")},onSignUp:()=>{(0,R.trackAuthStepChanged)({from_step:"landing",to_step:"signup"}),y("signup")}
1,isSigningIn:f,isSubmitting:M,acceptEDM:w.acceptEDM,onAcceptEDMChange:e=>V({acceptEDM:e})}),"signin"===v&&(0,t.jsx)(b,{formData:w,onFormDataChange:V,isSubmitting:M,onSubmit:z,onBack:()=>{(0,R.trackAuthStepChanged)({from_step:"signin",to_step:"landing"}),y("landing")},onSwitchToSignUp:()=>{(0,R.trackAuthStepChanged)({from_step:"signin",to_step:"signup"}),y("signup")},onForgotPassword:()=>{(0,R.trackAuthStepChanged)({from_step:"signin",to_step:"forgot-password"}),y("forgot-password")}}),"signup"===v&&(0,t.jsx)(j,{formData:w,onFormDataChange:V,isSubmitting:M,onSubmit:q,onBack:()=>{(0,R.trackAuthStepChanged)({from_step:"signup",to_step:"landing"}),y("landing")},onSwitchToSignIn:()=>{(0,R.trackAuthStepChanged)({from_step:"signup",to_step:"signin"}),y("signin")}}),"verify-waiting"===v&&(0,t.jsx)(N,{email:w.email,countdown:L,isSubmitting:M,onResend:H,onChangeEmail:()=>{(0,R.trackAuthStepChanged)({from_step:"verify-waiting",to_step:"signin"}),y("signin")},onBackToLogin:()=>{(0,R.trackAuthStepChanged)({from_step:"verify-waiting",to_step:"landing"}),y("landing")}}),"forgot-password"===v&&(0,t.jsx)(C,{email:w.email,onEmailChange:e=>V({email:e}),isSubmitting:M,onSubmit:G,onBack:()=>{(0,R.trackAuthStepChanged)({from_step:"forgot-password",to_step:"signin"}),y("signin")}}),"reset-sent"===v&&(0,t.jsx)(_,{email:w.email,countdown:L,isSubmitting:M,onResend:W,onBackToSignIn:()=>{(0,R.trackAuthStepChanged)({from_step:"reset-sent",to_step:"signin"}),y("signin")}})]})]})})}e.s(["SignInModal",()=>M],770407)},885783,e=>{e.v(t=>Promise.all(["static/chunks/13eff7ee9ea55753.js","static/chunks/84118b34c95caf16.js"].map(t=>e.l(t))).then(()=>t(478362)))},744059,e=>{e.v(t=>Promise.all(["static/chunks/d21ac2881cc94288.js"].map(t=>e.l(t))).then(()=>t(346243)))},986210,e=>{e.v(t=>Promise.all(["static/chunks/7b337327f33722b0.js","static/chunks/6999d000172b93ad.css"].map(t=>e.l(t))).then(()=>t(847059)))},873234,e=>{e.v(t=>Promise.all(["static/chunks/c42e80ebb0664786.js"].map(t=>e.l(t))).then(()=>t(235295)))},580424,e=>{e.v(t=>Promise.all(["static/chunks/408b7fe0310394a8.js"].map(t=>e.l(t))).then(()=>t(912402)))}]);
2
3//# sourceMappingURL=ea30d0878c56e4a1.js.map
4//# chunkId=01a0f13b-7c84-7330-8e25-985f2b121b1b

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.