PageSourceSearch

https://www.seedance20.com/_next/static/chunks/app/layout-de10b86e…?dpl=dpl_CgrhfoKTacJZoTmV6aTDScQ6GLNy

js seedance20.com collected 2026-10-08 07:24:39 UTC 24,865 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{5196:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(19946).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},6472:(e,t,r)=>{"use strict";r.d(t,{Navbar:()=>z});var s=r(95155),a=r(12115),n=r(35695),l=r(6874),o=r.n(l),i=r(66766),d=r(97168),c=r(5743),u=r(66474),m=r(19946);let x=(0,m.A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]),h=(0,m.A)("menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);var f=r(21260),p=r(54416),g=r(53999);function b(e){let{...t}=e;return(0,s.jsx)(f.bL,{"data-slot":"sheet",...t})}function v(e){let{...t}=e;return(0,s.jsx)(f.l9,{"data-slot":"sheet-trigger",...t})}function y(e){let{...t}=e;return(0,s.jsx)(f.bm,{"data-slot":"sheet-close",...t})}function j(e){let{...t}=e;return(0,s.jsx)(f.ZL,{"data-slot":"sheet-portal",...t})}function w(e){let{className:t,...r}=e;return(0,s.jsx)(f.hJ,{"data-slot":"sheet-overlay",className:(0,g.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function N(e){let{className:t,children:r,side:a="right",...n}=e;return(0,s.jsxs)(j,{children:[(0,s.jsx)(w,{}),(0,s.jsxs)(f.UC,{"data-slot":"sheet-content",className:(0,g.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===a&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===a&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===a&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===a&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...n,children:[r,(0,s.jsxs)(f.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,s.jsx)(p.A,{className:"size-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function k(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"sheet-header",className:(0,g.cn)("flex flex-col gap-1.5 p-4",t),...r})}function _(e){let{className:t,...r}=e;return(0,s.jsx)(f.hE,{"data-slot":"sheet-title",className:(0,g.cn)("text-foreground font-semibold",t),...r})}var P=r(61976),C=r(72367),I=r(82666);function z(){let e=(0,n.usePathname)(),[t,r]=(0,a.useState)(!1),{isSignedIn:l}=(0,P.Jd)(),{userInfo:m,isLoadingUserInfo:f}=(0,C.Py)(),p=(I.A.logo.alt||"Seedio logo").trim()||"Seedio logo",j=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e=>/^https?:\/\//.test(e),a=r=>(0,g.cn)("nav-link-item py-2 rounded-md transition-colors",t?"px-4":"px-1 lg:px-1.5 xl:px-2 2xl:px-4 whitespace-nowrap",e===r?"text-primary font-medium":"text-foreground/80 hover:text-primary"),n=I.A.navMenus.QuickLinks;return t?(0,s.jsx)(s.Fragment,{children:n.map(e=>e.children&&e.children.length>0?(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(y,{asChild:!0,children:(0,s.jsx)(o(),{href:e.href,className:a(e.href),target:r(e.href)?"_blank":void 0,rel:r(e.href)?"noopener noreferrer":void 0,children:e.label})}),(0,s.jsx)("div",{className:"pl-4 mt-1 space-y-2",children:e.children.map(e=>(0,s.jsx)(y,{asChild:!0,children:(0,s.jsx)("div",{children:(0,s.jsxs)(o(),{href:e.href,className:(0,g.cn)(a(e.href),"text-sm"),target:r(e.href)?"_blank":void 0,rel:r(e.href)?"noopener noreferrer":void 0,children:[e.label,e.cornerIcon&&(0,s.jsx)("span",{className:(0,g.cn)("ml-2 text-[11px] font-bold px-2 py-1 rounded leading-none","hot"===e.cornerIcon&&"bg-red-500 text-white","new"===e.cornerIcon&&"bg-red-500 text-white","free"===e.cornerIcon&&"bg-blue-500 text-white",!["hot","new","free"].includes(e.cornerIcon)&&"bg-blue-500 text-white"),children:e.cornerIcon.toUpperCase()})]})})},e.href))})]},e.href):(0,s.jsx)(y,{asChild:!0,children:(0,s.jsx)(o(),{href:e.href,className:a(e.href),target:r(e.href)?"_blank":void 0,rel:r(e.href)?"noopener noreferrer":void 0,children:e.label})},e.href))}):(0,s.jsx)(s.Fragment,{children:n.map(t=>{let n="Loved By Creators"===t.label;if(t.children&&t.children.length>0){var l;return(0,s.jsxs)("div",{className:(0,g.cn)("relative group",n&&"hidden xl:block"),children:[(0,s.jsxs)(o(),{href:t.href,className:(0,g.cn)(a(t.href),"flex items-center gap-1"),target:r(t.href)?"_blank":void 0,rel:r(t.href)?"noopener noreferrer":void 0,children:[t.label,(0,s.jsx)(u.A,{className:"h-3 w-3 transition-transform group-hover:rotate-180"})]}),(0,s.jsx)("div",{className:"absolute top-full left-0 mt-1 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 min-w-[240px] pointer-events-none group-hover:pointer-events-auto",children:(0,s.jsx)("div",{className:"bg-popover border rounded-md shadow-lg py-2 pointer-events-auto",children:null==(l=t.children)?void 0:l.map(t=>(0,s.jsx)(o(),{href:t.href,className:(0,g.cn)("block px-4 py-2.5 text-sm text-foreground
1/80 hover:text-primary hover:bg-accent transition-colors",e===t.href&&"text-primary font-medium bg-accent"),target:r(t.href)?"_blank":void 0,rel:r(t.href)?"noopener noreferrer":void 0,children:(0,s.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"truncate",children:t.label}),t.cornerIcon&&(0,s.jsxs)("span",{className:(0,g.cn)("text-[11px] font-bold px-2 py-1 rounded leading-none whitespace-nowrap shrink-0","hot"===t.cornerIcon&&"bg-red-500 text-white","new"===t.cornerIcon&&"bg-red-500 text-white","free"===t.cornerIcon&&"bg-blue-500 text-white"),children:["hot"===t.cornerIcon&&"HOT","new"===t.cornerIcon&&"NEW","free"===t.cornerIcon&&"FREE",!["hot","new","free"].includes(t.cornerIcon)&&t.cornerIcon.toUpperCase()]})]})},t.href))})})]},t.href)}return(0,s.jsx)("div",{className:(0,g.cn)("relative",n&&"hidden xl:inline-block"),children:(0,s.jsx)(o(),{href:t.href,className:a(t.href),target:r(t.href)?"_blank":void 0,rel:r(t.href)?"noopener noreferrer":void 0,children:t.label})},t.href)})})};return(0,s.jsx)("header",{className:"fixed inset-x-0 top-0 z-50",children:(0,s.jsx)("div",{className:"px-4 pt-4 sm:px-6",children:(0,s.jsx)("nav",{className:"max-w-7xl mx-auto rounded-full bg-white/10 dark:bg-white/10 backdrop-blur-xl border border-white/20 shadow-xl px-4 sm:px-6 py-2.5",children:(0,s.jsxs)("div",{className:"flex items-center justify-between h-12",children:[(0,s.jsx)("div",{className:"shrink-0",children:(0,s.jsxs)(o(),{href:"/",className:"flex items-center gap-0",onClick:()=>r(!1),children:[(0,s.jsx)(i.default,{width:I.A.logo.width,height:I.A.logo.height,src:I.A.logo.url,alt:p,unoptimized:!0,className:"w-[28px] sm:w-[28px]"}),(0,s.jsx)("span",{className:"text-xl sm:text-2xl font-bold bg-gradient-to-r from-indigo-500 to-purple-500 bg-clip-text text-transparent",children:"Seedio"})]})}),(0,s.jsx)("div",{className:"hidden lg:flex items-center justify-center flex-1",children:(0,s.jsx)("div",{className:"flex items-center space-x-0 lg:space-x-0.5 xl:space-x-1 2xl:space-x-2",children:j(!1)})}),(0,s.jsxs)("div",{className:"w-[180px] 2xl:w-[200px] flex items-center justify-end gap-2",children:[(0,s.jsxs)("div",{className:"hidden lg:flex items-center gap-4",children:[l&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:f?"...":(null==m?void 0:m.total_credits)||"0"})]}),(0,s.jsx)(c.default,{})]}),(0,s.jsxs)("div",{className:"flex lg:hidden items-center gap-2",children:[l&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[(0,s.jsx)(x,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:f?"...":(null==m?void 0:m.total_credits)||"0"})]}),(0,s.jsx)(c.default,{}),(0,s.jsxs)(b,{open:t,onOpenChange:r,children:[(0,s.jsx)(v,{asChild:!0,children:(0,s.jsxs)(d.$,{variant:"ghost",size:"icon",className:"text-foreground hover:text-primary hover:bg-muted",children:[(0,s.jsx)(h,{className:"h-6 w-6"}),(0,s.jsx)("span",{className:"sr-only",children:"Open menu"})]})}),(0,s.jsxs)(N,{side:"right",className:"w-[300px] sm:w-[340px] px-6 pt-12 pb-8 bg-background",children:[(0,s.jsx)(k,{className:"mb-4 text-left",children:(0,s.jsx)(_,{className:"text-lg font-semibold",children:"Menu"})}),(0,s.jsx)("nav",{className:"flex flex-col space-y-4",children:j(!0)})]})]})]})]})]})})})})}},8618:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var s=r(95155),a=r(12115),n=r(35695),l=r(72367);function o(){let e=(0,n.useSearchParams)(),t=(0,n.useRouter)(),r=(0,n.usePathname)(),{refreshUserInfo:o}=(0,l.Py)(),[i,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)({title:"",message:"",buttonText:"Confirm"}),[m,x]=(0,a.useState)(null);return((0,a.useEffect)(()=>{let s=e.get("paysuccess"),a=e.get("payfail");if("1"===s&&"/pricing"===r)try{let e=JSON.parse(localStorage.getItem("selectedPlan")||"{}"),r="string"==typeof e.returnUrl?e.returnUrl:"";if(r.startsWith("/")&&!r.startsWith("//")&&!r.startsWith("/pricing")){let[e,s]=r.split("#",2),a=e.includes("?")?"&":"?";t.replace("".concat(e).concat(a,"paysuccess=1").concat(s?"#".concat(s):""),{scroll:!1});return}}catch(e){}let n={title:"",message:"",buttonText:"Confirm"},l=!1,i=null;
1if("1"===s?(n={title:"Credits added",message:"Payment completed. Your credit balance has been refreshed and you can continue generating.",buttonText:"Continue"},l=!0,i=!0):"1"===a&&(n={title:"Payment not completed",message:"Your account is still signed in. No credits were charged. Please retry or choose another payment method.",buttonText:"Close"},l=!0,i=!1),l){u(n),x(i),d(!0);let s=new URLSearchParams(e.toString());s.delete("paysuccess"),s.delete("payfail"),t.replace("".concat(r,"?").concat(s.toString()),{scroll:!1}),i&&o()}},[e,r,t,o]),i)?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,s.jsxs)("div",{className:"relative z-50 w-full max-w-md p-6 mx-4 bg-white rounded-lg shadow-xl dark:bg-gray-800",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white mb-2",children:c.title}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:c.message})}),(0,s.jsx)("div",{className:"mt-5 sm:mt-6",children:(0,s.jsx)("button",{type:"button",className:"inline-flex justify-center w-full rounded-md border border-transparent bg-blue-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 sm:text-sm dark:bg-blue-500 dark:hover:bg-blue-600 dark:focus:ring-offset-gray-800",onClick:()=>{d(!1)},children:c.buttonText})})]})}):null}},19324:()=>{},32165:(e,t,r)=>{"use strict";r.d(t,{ToastProvider:()=>i,d:()=>d});var s=r(95155),a=r(12115),n=r(54416);let l=e=>{let{message:t,type:r,onClose:l}=e;return(0,a.useEffect)(()=>{let e=setTimeout(()=>{l()},5e3);return()=>clearTimeout(e)},[l]),(0,s.jsxs)("div",{className:"fixed right-4 top-4 z-[100000] flex max-w-[calc(100vw-2rem)] items-start rounded-lg border-l-4 p-4 shadow-lg sm:max-w-md ".concat("success"===r?"bg-green-100 border-green-500":"error"===r?"bg-red-100 border-red-500":"bg-blue-100 border-blue-500"),role:"alert",children:[(0,s.jsx)("div",{className:"text-sm font-medium leading-relaxed ".concat("success"===r?"text-green-800":"error"===r?"text-red-800":"text-blue-800"),children:t}),(0,s.jsx)("button",{type:"button",className:"ml-auto -mx-1.5 -my-1.5 ".concat("success"===r?"text-green-500":"error"===r?"text-red-500":"text-blue-500"," rounded-lg p-1.5 hover:opacity-75 inline-flex items-center justify-center h-8 w-8"),onClick:l,children:(0,s.jsx)(n.A,{size:16})})]})},o=(0,a.createContext)(void 0),i=e=>{let{children:t}=e,[r,n]=(0,a.useState)({show:!1,message:"",type:"info"}),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";n({show:!0,message:e,type:t})};return(0,s.jsxs)(o.Provider,{value:{showToast:i,success:e=>{console.log("Success:",e),i(e,"success")},error:e=>{console.error("Error:",e),i(e,"error")},info:e=>{console.log("Info:",e),i(e,"info")}},children:[t,r.show&&(0,s.jsx)(l,{message:r.message,type:r.type,onClose:()=>{n(e=>({...e,show:!1}))}})]})},d=()=>{let e=(0,a.useContext)(o);if(void 0===e)throw Error("useToast must be used within a ToastProvider");return e}},36826:(e,t,r)=>{"use strict";r.d(t,{UpgradeModalProvider:()=>p,v:()=>f});var s=r(95155),a=r(12115),n=r(5196),l=r(51154),o=r(61976),i=r(82666),d=r(31886),c=r(53999),u=r(32165),m=r(7337),x=r(99840);let h=(0,a.createContext)(null);function f(){let e=(0,a.useContext)(h);return e||{openUpgradeModal:()=>{}}}function p(e){var t;let{children:r}=e,[f,p]=(0,a.useState)(!1),[g,b]=(0,a.useState)(null),[v,y]=(0,a.useState)(null),{isSignedIn:j,user:w}=(0,o.Jd)(),{openSignIn:N}=(0,o.ho)(),{showToast:k}=(0,u.d)(),_=(0,a.useCallback)(e=>{b(null!=e?e:null),y(null),p(!0)},[]),P=(0,a.useCallback)(e=>{p(e),e||y(null)},[]),C=(0,a.useCallback)(async e=>{if(!j){p(!1),N((0,m.$_)());return}if(!(null==w?void 0:w.id))return void k("Could not load your account. Please refresh and try again.","error");let t=i.A.pricingPlans.find(t=>t.key===e);if(!t)return void k("This credit pack is unavailable. Please choose another pack.","error");localStorage.setItem("selectedPlan",JSON.stringify({key:t.key,title:t.title,price:t.price,credits:t.credits,features:t.features,timestamp:Date.now(),source:null==g?void 0:g.source,productId:null==g?void 0:g.productId,returnUrl:(0,m.eO)()})),y(t.key);try{var r;let e=await d.FH.payment.createPaypalSession(t.priceId),s=null==e||null==(r=e.data)?void 0:r.url;if(!s)throw Error("Checkout URL is missing. Please try again later.");window.location.href=s}catch(e){console.error("Credit checkout error:",e),k(e instanceof Error?e.message:"Payment c
1ould not be started. Please try again.","error"),y(null)}},[j,N,null==g?void 0:g.productId,null==g?void 0:g.source,k,null==w?void 0:w.id]),I=(null==g?void 0:g.requiredCredits)!=null?"This generation needs ".concat(g.requiredCredits," credits. Your balance is ").concat(null!=(t=g.currentCredits)?t:0,"."):null==g?void 0:g.reason;return(0,s.jsxs)(h.Provider,{value:{openUpgradeModal:_},children:[r,(0,s.jsx)(x.lG,{open:f,onOpenChange:P,children:(0,s.jsx)(x.Cf,{className:"max-h-[calc(100dvh-2rem)] overflow-hidden border-purple-400/25 bg-[#0b0d1f] p-0 text-zinc-100 shadow-[0_28px_90px_rgba(49,46,129,0.42)] sm:max-w-[72rem]",children:(0,s.jsxs)("div",{className:"scrollbar-unified overflow-y-auto p-5 sm:p-7 lg:p-8",children:[(0,s.jsxs)(x.c7,{className:"mx-auto max-w-2xl text-center sm:text-center",children:[(0,s.jsx)(x.L3,{className:"text-2xl font-semibold tracking-tight text-zinc-50 sm:text-3xl",children:"Choose a credit pack"}),(0,s.jsx)(x.rr,{className:"text-sm leading-6 text-zinc-400 sm:text-base",children:null!=I?I:"Purchase credits once and continue generating immediately."})]}),(0,s.jsx)("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4",children:i.A.pricingPlans.map(e=>(0,s.jsxs)("article",{className:(0,c.cn)("relative flex min-w-0 flex-col rounded-2xl border bg-[#121426] p-5 transition-colors",e.popular?"border-purple-400/70 pt-8 shadow-[inset_0_1px_0_rgba(192,132,252,0.2),0_16px_42px_rgba(96,165,250,0.1)]":"border-white/10 hover:border-purple-400/30"),children:[e.popular&&(0,s.jsx)("span",{className:"absolute -top-4 left-1/2 z-10 -translate-x-1/2 whitespace-nowrap rounded-full bg-gradient-to-r from-[#b983ff] to-[#68a4ff] px-5 py-2 text-sm font-semibold text-white shadow-[0_10px_28px_rgba(104,164,255,0.28)]",children:"Most popular"}),(0,s.jsx)("h3",{className:"text-lg font-semibold text-zinc-100",children:e.title}),(0,s.jsxs)("p",{className:"mt-3 text-3xl font-semibold tracking-tight text-white",children:[e.credits,(0,s.jsx)("span",{className:"ml-1.5 text-sm font-medium text-zinc-400",children:"credits"})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-zinc-400",children:[e.price," one-time"]}),(0,s.jsx)("ul",{className:"mt-5 flex-1 space-y-2.5 text-sm leading-5 text-zinc-300",children:e.features.slice(1,7).map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2",children:[(0,s.jsx)(n.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-purple-300","aria-hidden":"true"}),(0,s.jsx)("span",{children:e})]},e))}),(0,s.jsx)("button",{type:"button",onClick:()=>C(e.key),disabled:null!==v,className:(0,c.cn)("mt-6 inline-flex min-h-11 w-full items-center justify-center rounded-xl px-4 text-sm font-semibold transition active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60",e.popular?"bg-gradient-to-r from-[#b983ff] to-[#68a4ff] text-[#090b18] hover:brightness-105":"border border-purple-300/20 bg-purple-400/[0.06] text-zinc-100 hover:border-purple-300/35 hover:bg-purple-400/[0.11]"),children:v===e.key?(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)(l.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Opening checkout"]}):"Buy ".concat(e.credits," credits")})]},e.key))})]})})})]})}},42919:(e,t,r)=>{"use strict";r.d(t,{UserProvider:()=>u,useUserInfo:()=>m});var s=r(95155),a=r(12115),n=r(61976),l=r(27016),o=r(31886),i=r(32165);let d=(0,a.createContext)(void 0),c={};function u(e){let{children:t}=e,{user:r,isSignedIn:u}=(0,n.Jd)(),{getToken:m}=(0,l.d)(),[x,h]=(0,a.useState)(null),[f,p]=(0,a.useState)(!1),{error:g}=(0,i.d)(),b=async()=>{var e,t;if(console.log("User________________",r),!u||!(null==r?void 0:r.id)||!(null==r||null==(e=r.primaryEmailAddress)?void 0:e.emailAddress))return;let s=r.id;if(!c[s]){c[s]=!0;try{let e=null,a=null;for(let t=0;t<3&&!e;t+=1){try{e=await m()}catch(e){a=e}!e&&t<2&&await new Promise(e=>window.setTimeout(e,400*(t+1)))}if(!e){console.error("UserProvider: Clerk token is not ready after retry",a),delete c[s],g("Your session is still active, but account data could not be refreshed. Please retry in a moment.");return}let n={uuid:s,email:r.primaryEmailAddress.emailAddress,nickname:r.fullName||void 0,avatar:r.imageUrl||void 0,from_login:"google",token:e};console.log("UserProvider: 开始同步用户数据",{...n,token:"***"});let l=await o.FH.auth.syncUser(n);if(console.log("UserProvider: 用户数据同步成功",l),!l||200!==l.code)throw Error("Sync failed: ".concat((null==l?void 0:l.message)||(null==l?void 0:l.msg)||"Unknown error"));if(!(null==(t=l.data)?void 0:t.access_token))throw Error("Sync succeeded but no access_token received");console.log("UserProvider: 用户数据同步成功,Token已保存"),await v(!0)}catch(e){console.error("UserProvider: 用户数据同步失败,保留 Clerk 登录状态",{error:e instanceof Error?e.message:String(e),userId:s,email:r.primaryEmailAddress.emailAddress,timestamp:new Date().toISOString()}),delete c[s],o.FH.auth.clearTokens(),g("You are still signed in, but account data could not be refreshed. Please try again shortly.");return}}},v=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!u||!(null==r?void 0:r.id))return void h(null);if(!o.FH.auth.isTokenValid())return void console.log("Token not available yet, waiting...");e&&p(!0);try{let e=await o.FH.user.getUserInfo();if(200===e.code&&e.data){var t;let r={uuid:e.data.uuid,email:e.data.email,from_login:e.data.from_login,nickname:e.data.nickname,avatar:e.data.avatar,free_limit:e.data.free_limit,remaining_limit:e.data.remaining_limit,total_limit:e.data.total_limit,use_limit:e.data.use_limit,vip_last_time:e.data.vip_last_time,level:e.data.level,created_at:e.data.created_at,updated_at:e.data.updated_at,status:e.data.status,id:e.data.id,total_credits:e.data.free_limit+e.data.remaining_limit,free_times:null!=(t=e.data.free_times)?t:0};h(r)}else console.warn("User info API returned success code but no data for:",r.id),h(null)}catch(t){console.error("Failed to fetch user info:",t),h(null),e&&g(t instanceof Error?t.message:"Failed to fetch user info")}finally{e&&p(!1)}},y=async()=>{await v(!0)};return(0,a.useEffect)(()=>{u&&(null==r?void 0:r.id)?(h(null),b()):(h(null),(null==r?void 0:r.id)&&delete c[r.id])},[u,null==r?void 0:r.id]),(0,a.useEffect)(()=>
1{if(!u||!(null==r?void 0:r.id))return;let e=setInterval(()=>{o.FH.auth.isTokenValid()&&v(!1)},1e4);return()=>clearInterval(e)},[u,null==r?void 0:r.id]),(0,s.jsx)(d.Provider,{value:{userInfo:x,isLoadingUserInfo:f,refreshUserInfo:y},children:t})}function m(){let e=(0,a.useContext)(d);if(void 0===e)throw Error("useUserInfo must be used within a UserProvider");return e}},51154:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(19946).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},51832:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,19324,23)),Promise.resolve().then(r.bind(r,43291)),Promise.resolve().then(r.bind(r,6472)),Promise.resolve().then(r.bind(r,8618)),Promise.resolve().then(r.bind(r,32165)),Promise.resolve().then(r.bind(r,36826)),Promise.resolve().then(r.bind(r,85132)),Promise.resolve().then(r.bind(r,42919)),Promise.resolve().then(r.t.bind(r,69243,23)),Promise.resolve().then(r.t.bind(r,68891,23))},66474:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(19946).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},68891:e=>{e.exports={style:{fontFamily:"'Roboto', 'Roboto Fallback'",fontStyle:"normal"},className:"__className_a1d03f"}},72367:(e,t,r)=>{"use strict";r.d(t,{Ou:()=>a.useFooterLinks,Py:()=>s.useUserInfo});var s=r(42919),a=r(85132)},85132:(e,t,r)=>{"use strict";r.d(t,{FooterLinksProvider:()=>l,useFooterLinks:()=>o});var s=r(95155),a=r(12115);let n=(0,a.createContext)([]);function l(e){let{children:t,links:r}=e;return(0,s.jsx)(n.Provider,{value:r,children:t})}function o(){return(0,a.useContext)(n)}},99840:(e,t,r)=>{"use strict";r.d(t,{Cf:()=>u,Es:()=>x,L3:()=>h,c7:()=>m,lG:()=>o,rr:()=>f,zM:()=>i});var s=r(95155);r(12115);var a=r(21260),n=r(54416),l=r(53999);function o(e){let{...t}=e;return(0,s.jsx)(a.bL,{"data-slot":"dialog",...t})}function i(e){let{...t}=e;return(0,s.jsx)(a.l9,{"data-slot":"dialog-trigger",...t})}function d(e){let{...t}=e;return(0,s.jsx)(a.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...r}=e;return(0,s.jsx)(a.hJ,{"data-slot":"dialog-overlay",className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function u(e){let{className:t,children:r,...o}=e;return(0,s.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,s.jsx)(c,{}),(0,s.jsxs)(a.UC,{"data-slot":"dialog-content",className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...o,children:[r,(0,s.jsxs)(a.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,s.jsx)(n.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,l.cn)("flex flex-col gap-2 text-center sm:text-left",t),...r})}function x(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"dialog-footer",className:(0,l.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...r})}function h(e){let{className:t,...r}=e;return(0,s.jsx)(a.hE,{"data-slot":"dialog-title",className:(0,l.cn)("text-lg leading-none font-semibold",t),...r})}function f(e){let{className:t,...r}=e;return(0,s.jsx)(a.VY,{"data-slot":"dialog-description",className:(0,l.cn)("text-muted-foreground text-sm",t),...r})}}},e=>{var t=t=>e(e.s=t);e.O(0,[2533,4742,6874,1763,6600,4277,9027,1260,2175,8162,1886,5149,8441,1684,7358],()=>t(51832)),_N_E=e.O()}]);

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.