1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3425],{10665:(e,t,a)=>{"use strict";function s(){return new Date().toISOString()}a.d(t,{MI:()=>n,iq:()=>s,lg:()=>r});let r=()=>Date.parse(new Date().toUTCString())/1e3,n=()=>{let e=new Date,t=new Date(e);return t.setFullYear(e.getFullYear()+1),t.toISOString()}},13910:(e,t,a)=>{"use strict";a.d(t,{$:()=>d,r:()=>i});var s=a(68812),r=a(51456),n=a(47469),l=a(43798),o=a(58981);let i=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,t)=>{let{className:a,variant:r,size:l,asChild:d=!1,...c}=e,m=d?n.DX:"button";return(0,s.jsx)(m,{className:(0,o.cn)(i({variant:r,size:l,className:a})),ref:t,...c})});d.displayName="Button"},22335:(e,t,a)=>{"use strict";a.d(t,{default:()=>d});var s=a(68812),r=a(51456),n=a(43426),l=a(91987),o=a(33493);let i="topbanner_dismissed";function d(e){let{name:t,url:a}=e,[d,c]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{try{sessionStorage.getItem(i)&&c(!0)}catch(e){}},[]),d)?null:(0,s.jsxs)("div",{className:"relative flex h-10 items-center bg-[#FF2D87] px-4 text-white",children:[(0,s.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"mx-auto flex min-w-0 max-w-full items-center gap-2 text-sm transition-opacity hover:opacity-90",children:[(0,s.jsx)(n.A,{className:"size-4 shrink-0","aria-hidden":"true"}),(0,s.jsx)("span",{className:"truncate",children:t}),(0,s.jsx)(l.A,{className:"size-4 shrink-0 motion-safe:animate-arrow-nudge","aria-hidden":"true"})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{try{sessionStorage.setItem(i,"1")}catch(e){}c(!0)},"aria-label":"å
³é",className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1.5 text-white/70 transition-colors hover:bg-white/20 hover:text-white",children:(0,s.jsx)(o.A,{className:"size-4"})})]})}},22705:(e,t,a)=>{"use strict";a.d(t,{h:()=>r});var s=a(92766);function r(e){let t=(0,s.useParams)(),a=null==t?void 0:t.locale;return a&&"en"!==a?(console.log("/".concat(a).concat(e)),"/".concat(a).concat(e)):(console.log(e),e||"")}},22776:(e,t,a)=>{"use strict";a.d(t,{AppContextProvider:()=>h,U:()=>f});var s=a(68812),r=a(51456),n=a(55138),l=a(37013),o=a(32674),i=a.n(o),d=a(53043),c=a.n(d),m=a(93546);let u=(0,r.createContext)({}),f=()=>(0,r.useContext)(u),h=e=>{let{children:t}=e;!function(){let{data:e,status:t}=(0,m.wV)(),a=async function(){c()({client_id:"704890295058-mbnho1nnck3asg5j7mbnbppdkptf2cjq.apps.googleusercontent.com",auto_select:!1,cancel_on_tap_outside:!1,context:"signin"},e=>{console.log("onetap login ok",e),n(e.credential)})},n=async function(e){console.log("signIn ok",await (0,m.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,r.useEffect)(()=>{if("unauthenticated"===t){a();let e=setInterval(()=>{a()},3e3);return()=>{clearInterval(e)}}},[t]),s.Fragment}();let{data:a}=(0,m.wV)(),[o,d]=(0,r.useState)(()=>"dark"),[f,h]=(0,r.useState)(!1),[x,p]=(0,r.useState)(null),[g,v]=(0,r.useState)(!1),j=async function(){try{let e=await fetch("/api/get-user-info",{method:"POST"});if(!e.ok)throw Error("fetch user info failed with status: "+e.status);let{code:t,message:a,data:s}=await e.json();if(0!==t)throw Error(a);p(s),b(s)}catch(e){console.log("fetch user info failed")}},b=async e=>{try{if(e.invited_by){console.log("user already been invited",e.invited_by);return}let t=(0,n.pr)(l.wD.InviteCode);
1if(!t)return;let a=i()(e.created_at).unix(),s=i()().unix(),r=Number(s-a);if(r<=0||r>7200){console.log("user created more than 2 hours");return}console.log("update invite",t,e.uuid);let o={invite_code:t,user_uuid:e.uuid},d=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!d.ok)throw Error("update invite failed with status: "+d.status);let{code:c,message:m,data:u}=await d.json();if(0!==c)throw Error(m);p(u),(0,n.np)(l.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}};return(0,r.useEffect)(()=>{a&&a.user&&j()},[a]),(0,s.jsx)(u.Provider,{value:{theme:o,setTheme:d,showSignModal:f,setShowSignModal:h,user:x,setUser:p,showFeedback:g,setShowFeedback:v},children:t})}},25594:(e,t,a)=>{"use strict";a.d(t,{bq:()=>u,eb:()=>p,gC:()=>x,l6:()=>c,yv:()=>m});var s=a(68812),r=a(51456),n=a(49343),l=a(66281),o=a(67188),i=a(37685),d=a(58981);let c=n.bL;n.YJ;let m=n.WT,u=r.forwardRef((e,t)=>{let{className:a,children:r,...o}=e;return(0,s.jsxs)(n.l9,{ref:t,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...o,children:[r,(0,s.jsx)(n.In,{asChild:!0,children:(0,s.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=n.l9.displayName;let f=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.PP,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})});f.displayName=n.PP.displayName;let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.wn,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(l.A,{className:"h-4 w-4"})})});h.displayName=n.wn.displayName;let x=r.forwardRef((e,t)=>{let{className:a,children:r,position:l="popper",...o}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsxs)(n.UC,{ref:t,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:l,...o,children:[(0,s.jsx)(f,{}),(0,s.jsx)(n.LM,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,s.jsx)(h,{})]})})});x.displayName=n.UC.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.JU,{ref:t,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...r})}).displayName=n.JU.displayName;let p=r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsxs)(n.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(i.A,{className:"h-4 w-4"})})}),(0,s.jsx)(n.p4,{children:r})]})});p.displayName=n.q7.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=n.wv.displayName},25721:(e,t,a)=>{"use strict";a.d(t,{a:()=>r});var s=a(51456);function r(){let[e,t]=s.useState(void 0);return s.useEffect(()=>{let e=window.matchMedia("(max-width: ".concat(767,"px)")),a=()=>{t(window.innerWidth<768)};return e.addEventListener("change",a),t(window.innerWidth<768),()=>e.removeEventListener("change",a)},[]),!!e}},32069:(e,t,a)=>{"use strict";a.d(t,{default:()=>q});var s=a(68812),r=a(54432),n=a(13910),l=a(51456),o=a(29196),i=a(43798),d=a(66281),c=a(58981);l.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;return(0,s.jsxs)(o.bL,{ref:t,className:(0,c.cn)("relative z-10 flex max-w-max flex-1 items-center justify-center",a),...n,children:[r,(0,s.jsx)(f,{})]})}).displayName=o.bL.displayName,l.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(o.B8,{ref:t,className:(0,c.cn)("group flex flex-1 list-none items-center justify-center space-x-1",a),...r})}).displayName=o.B8.displayName,o.q7;let m=(0,i.F)("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50");l.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;
1return(0,s.jsxs)(o.l9,{ref:t,className:(0,c.cn)(m(),"group",a),...n,children:[r," ",(0,s.jsx)(d.A,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}).displayName=o.l9.displayName,l.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(o.UC,{ref:t,className:(0,c.cn)("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",a),...r})}).displayName=o.UC.displayName;let u=o.N_,f=l.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{className:(0,c.cn)("absolute left-0 top-full w-full flex justify-center"),children:(0,s.jsx)(o.LM,{className:(0,c.cn)("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",a),ref:t,...r})})});f.displayName=o.LM.displayName,l.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(o.C1,{ref:t,className:(0,c.cn)("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",a),...r,children:(0,s.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})}).displayName=o.C1.displayName;var h=a(54415),x=a(95147),p=a(80893),g=a.n(p),v=a(25594),j=a(92766),b=a(33142),N=a(90627);function y(e){let{isIcon:t=!1}=e,a=(0,j.useParams)().locale,r=(0,j.useRouter)(),n=(0,j.usePathname)(),l=(0,j.useSearchParams)();return(0,s.jsxs)(v.l6,{value:a,onValueChange:e=>{if(e!==a){let t=n.replace("/".concat(a),"/".concat(e));t.startsWith("/".concat(e))||(t="/".concat(e).concat(t));let s=l.toString(),o=s?"".concat(t,"?").concat(s):t;r.push(o)}},children:[(0,s.jsxs)(v.bq,{className:"flex items-center gap-x-2 border-none text-muted-foreground outline-none hover:bg-transparent focus:ring-0 focus:ring-offset-0",children:[(0,s.jsx)(b.aVW,{className:"text-xl"}),!t&&(0,s.jsx)("span",{className:"hidden md:block",children:N.L$[a]})]}),(0,s.jsx)(v.gC,{className:"z-50",children:Object.keys(N.L$).map(e=>{let t=N.L$[e];return(0,s.jsx)(v.eb,{className:"cursor-pointer",value:e,children:t},e)})})]})}var w=a(50796),k=a(22776),_=a(53837);function C(){let e=(0,_.c3)(),{setShowSignModal:t}=(0,k.U)();return(0,s.jsx)(n.$,{variant:"default",onClick:()=>t(!0),children:e("user.sign_in")})}var z=a(50529),R=a(37243),P=a(93546),A=a(22705);function E(e){let{user:t}=e,a=(0,_.c3)();return(0,s.jsxs)(R.rI,{children:[(0,s.jsx)(R.ty,{asChild:!0,children:(0,s.jsxs)(z.Avatar,{className:"cursor-pointer",children:[(0,s.jsx)(z.AvatarImage,{src:t.avatar_url,alt:t.nickname}),(0,s.jsx)(z.q,{children:t.nickname})]})}),(0,s.jsxs)(R.SQ,{className:"mx-4",children:[(0,s.jsx)(R.lp,{className:"text-center truncate",children:t.nickname}),(0,s.jsx)(R.mB,{}),(0,s.jsx)(R._2,{className:"flex justify-center cursor-pointer",children:(0,s.jsx)(g(),{href:(0,A.h)("/myallcreations"),children:a("user.my_creation")})}),(0,s.jsx)(R.mB,{}),(0,s.jsx)(R._2,{className:"flex justify-center cursor-pointer",children:(0,s.jsx)(g(),{href:(0,A.h)("/my-credits"),children:a("user.my_credits")})}),(0,s.jsx)(R.mB,{}),(0,s.jsx)(R._2,{className:"flex justify-center cursor-pointer",children:(0,s.jsx)(g(),{href:(0,A.h)("/my-orders"),children:a("user.user_center")})}),(0,s.jsx)(R.mB,{}),(0,s.jsx)(R.mB,{}),(0,s.jsx)(R._2,{className:"flex justify-center cursor-pointer",onClick:()=>(0,P.CI)(),children:a("user.sign_out")})]})]})}function S(){(0,_.c3)();let{user:e}=(0,k.U)();return(0,s.jsx)("div",{className:"flex items-center gap-x-2 px-2",children:e?(0,s.jsx)(E,{user:e}):(0,s.jsx)(C,{})})}var I=a(31324),L=a(37013),U=a(55138);function T(){let{theme:e,setTheme:t}=(0,k.U)(),a=function(a){a!==e&&(console.log("handleThemeChange",a),(0,U.PW)(L.wD.Theme,a,-1),t(a))};return(0,s.jsx)("div",{className:"flex items-center gap-x-2 px-2",children:"dark"===e?(0,s.jsx)(I.uSI,{className:"cursor-pointer text-lg text-muted-foreground",onClick:()=>a("light"),width:80,height:20}):(0,s.jsx)(I.KsI,{className:"cursor-pointer text-lg text-muted-foreground",onClick:()=>a("dark"),width:80,height:20})})}function q(e){var t,a,l,i,f,p,v,j,b,N,k,_,C,z,R,P,E,I,L,U;let{header:q}=e;return q.disabled?null:(0,s.jsx)("section",{className:"bg-background shadow-md py-3",children:(0,s.jsxs)("div",{className:"md:max-w-7xl mx-auto px-4",children:[(0,s.jsxs)("nav",{className:"hidden justify-between lg:flex",children:[(0,s.jsxs)("div",{className:"flex items-center gap-6",children:[(0,s.jsxs)("a",{href:(0,A.h)((null===(t=q.brand)||void 0===t?void 0:t.url)||""),className:"flex items-center gap-2",children:[(null===(l=q.brand)||void 0===l?void 0:null===(a=l.logo)||void 0===a?void 0:a.src)&&(0,s.jsx)("img",{src:q.brand.logo.src,alt:q.brand.logo.alt||q.brand.title,className:"w-8"}),(null===(i=q.brand)||void 0===i?void 0:i.title)&&(0,s.jsx)("span",{className:"text-xl text-primary font-bold",children:(null===(f=q.brand)||void 0===f?void 0:f.title)||""})]}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsxs)(o.bL,{
1className:"relative z-10 flex max-w-max flex-1 items-center justify-center","data-navigation-root":!0,children:[(0,s.jsx)(o.B8,{className:"group flex flex-1 list-none items-center justify-center space-x-1",children:null===(v=q.nav)||void 0===v?void 0:null===(p=v.items)||void 0===p?void 0:p.map((e,t)=>e.children&&e.children.length>0?(0,s.jsxs)(o.q7,{className:"text-muted-foreground",children:[(0,s.jsxs)(o.l9,{className:(0,c.cn)(m(),"group"),onPointerEnter:e=>{let t=e.currentTarget,a=t.getBoundingClientRect(),s=t.closest("[data-navigation-root]");if(s){let e=s.getBoundingClientRect(),t=a.left+a.width/2,r=e.left+e.width/2;s.style.setProperty("--trigger-offset","".concat(t-r,"px")),s.style.setProperty("--trigger-left","".concat(a.left,"px")),s.style.setProperty("--trigger-width","".concat(a.width,"px")),s.style.setProperty("--viewport-width","".concat(window.innerWidth,"px"))}},children:[e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0 mr-2"}),(0,s.jsx)("span",{children:e.title}),(0,s.jsx)(d.A,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}),(0,s.jsx)(o.UC,{className:"left-0 top-0 data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute",style:{width:"max-content"},children:(()=>{let t={};e.children.forEach(e=>{let a=e.group||"default-other-tools";t[a]||(t[a]=[]),t[a].push(e)});let a=Object.entries(t),r=a.length;return(0,s.jsx)("div",{className:"gap-6 p-6",style:{display:"grid",width:"fit-content",minWidth:"max-content",gridTemplateColumns:"repeat(".concat(r,", minmax(250px, max-content))")},children:a.map(e=>{let[t,a]=e;return(0,s.jsxs)("div",{className:"flex flex-col space-y-3",children:["default"!==t&&(0,s.jsx)("h4",{className:"text-sm font-semibold text-muted-foreground border-b pb-2 whitespace-nowrap",children:"video-tools"===t?"Video Tools":"image-tools"===t?"Image Tools":"special-tools"===t?"Special Tools":"default-other-tools"===t?"":t}),(0,s.jsx)(u,{children:(0,s.jsx)("ul",{className:"space-y-1",children:a.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsxs)("a",{className:(0,c.cn)("flex select-none gap-3 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground whitespace-nowrap",e.className),href:(0,A.h)(e.url),target:e.target,children:[e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0 mt-0.5"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:(0,c.cn)("text-sm font-medium",e.isHighLight&&"text-primary font-bold"),children:e.title}),e.description&&(0,s.jsx)("p",{className:"text-xs leading-snug text-muted-foreground",children:e.description})]})]})},t))})})]},t)})})})()})]},t):(0,s.jsx)(o.q7,{children:(0,s.jsxs)("a",{className:(0,c.cn)("text-muted-foreground",m(),(0,n.r)({variant:"ghost"})),href:(0,A.h)(e.url),target:e.target,children:[e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0 mr-0"}),e.title]})},t))}),(0,s.jsx)("div",{className:"absolute left-1/2 top-full transform -translate-x-1/2 px-8",style:{transform:"translateX(calc(-50% + var(--trigger-offset, 0px)))",left:"max(2rem, min(50%, calc(100vw - var(--radix-navigation-menu-viewport-width, 800px) - 2rem)))"},children:(0,s.jsx)(o.LM,{className:"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 scrollbar-thin scrollbar-thumb-gray-400 scrollbar-track-gray-100 dark:scrollbar-thumb-gray-600 dark:scrollbar-track-gray-800",style:{width:"var(--radix-navigation-menu-viewport-width)",maxWidth:"calc(100vw - 4rem)",maxHeight:"calc(100vh - 8rem)"},ref:e=>{e&&"open"===e.dataset.state&&requestAnimationFrame(()=>{let t=e.closest("[data-navigation-root]");if(!t)return;let a=e.getBoundingClientRect();t.getBoundingClientRect();let s=parseFloat(t.style.getPropertyValue("--trigger-left")||"0"),r=parseFloat(t.style.getPropertyValue("--trigger-width")||"0"),n=a.width,l=s+r/2-n/2,o=window.innerWidth-n-32,i=l,d=!0;l>o?(i=o,d=!1):l<32&&(i=32,d=!1);let c=e.parentElement;c&&(d?(c.style.left="50%",c.style.transform="translateX(calc(-50% + var(--trigger-offset, 0px)))"):(c.style.left="".concat(i,"px"),c.style.transform="none"))})}})})]})})]}),(0,s.jsxs)("div",{className:"shrink-0 flex gap-2 items-center",children:[q.show_locale&&(0,s.jsx)(y,{}),q.show_theme&&(0,s.jsx)(T,{}),null===(j=q.buttons)||void 0===j?void 0:j.map((e,t)=>(0,s.jsx)(n.$,{variant:e.variant,children:(0,s.jsxs)(g(),{href:(0,A.h)(e.url||""),target:e.target||"",className:"flex items-center gap-1",children:[e.title,e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0"})]})},t)),q.show_sign&&(0,s.jsx)(S,{})]})]}),(0,s.jsx)("div",{className:"block lg:hidden",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("a",{href:(0,A.h)((null===(b=q.brand)||void 0===b?void 0:b.url)||""),className:"flex items-center gap-2",children:[(null===(k=q.brand)||void 0===k?void 0:null===(N=k.logo)||void 0===N?void 0:N.src
1)&&(0,s.jsx)("img",{src:q.brand.logo.src,alt:q.brand.logo.alt||q.brand.title,className:"w-8"}),(null===(_=q.brand)||void 0===_?void 0:_.title)&&(0,s.jsx)("span",{className:"text-xl font-bold",children:(null===(C=q.brand)||void 0===C?void 0:C.title)||""})]}),(0,s.jsxs)(h.cj,{children:[(0,s.jsx)(h.CG,{asChild:!0,children:(0,s.jsx)(n.$,{variant:"default",size:"icon",children:(0,s.jsx)(w.A,{className:"size-2"})})}),(0,s.jsxs)(h.h,{className:"overflow-y-auto",children:[(0,s.jsx)(h.Fm,{children:(0,s.jsx)(h.qp,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(null===(R=q.brand)||void 0===R?void 0:null===(z=R.logo)||void 0===z?void 0:z.src)&&(0,s.jsx)("img",{src:q.brand.logo.src,alt:q.brand.logo.alt||q.brand.title,className:"w-8"}),(null===(P=q.brand)||void 0===P?void 0:P.title)&&(0,s.jsx)("span",{className:"text-xl font-bold",children:(null===(E=q.brand)||void 0===E?void 0:E.title)||""})]})})}),(0,s.jsx)("div",{className:"mb-8 mt-8 flex flex-col gap-4",children:(0,s.jsx)(r.nD,{type:"single",collapsible:!0,className:"w-full",children:null===(L=q.nav)||void 0===L?void 0:null===(I=L.items)||void 0===I?void 0:I.map((e,t)=>e.children&&e.children.length>0?(0,s.jsxs)(r.As,{value:e.title||"",className:"border-b-0",children:[(0,s.jsx)(r.$m,{className:"mb-4 py-0 font-semibold hover:no-underline text-left",children:e.title}),(0,s.jsx)(r.ub,{className:"mt-2",children:(()=>{let t={};return e.children.forEach(e=>{let a=e.group||"default";t[a]||(t[a]=[]),t[a].push(e)}),Object.entries(t).map(e=>{let[t,a]=e;return(0,s.jsxs)("div",{className:"mb-4",children:["default"!==t&&(0,s.jsx)("h5",{className:"text-xs font-semibold text-muted-foreground mb-2 px-3 border-b pb-1",children:"video-tools"===t?"Video Tools":"image-tools"===t?"Image Tools":"special-tools"===t?"Special Tools":t}),a.map((e,t)=>(0,s.jsxs)("a",{className:(0,c.cn)("flex select-none gap-3 rounded-md p-3 leading-none outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",e.className),href:(0,A.h)(e.url),target:e.target,children:[e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:(0,c.cn)("text-sm font-semibold",e.isHighLight&&"text-primary font-bold"),children:e.title}),e.description&&(0,s.jsx)("p",{className:"text-sm leading-snug text-muted-foreground",children:e.description})]})]},t))]},t)})})()})]},t):(0,s.jsxs)("a",{href:(0,A.h)(e.url),target:e.target,className:"font-semibold my-4 flex items-center gap-2",children:[e.title,e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0"})]},t))})}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsxs)("div",{className:"border-t pt-4",children:[(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-3",children:[null===(U=q.buttons)||void 0===U?void 0:U.map((e,t)=>(0,s.jsx)(n.$,{variant:e.variant,children:(0,s.jsxs)(g(),{href:(0,A.h)(e.url||""),target:e.target||"",className:"flex items-center gap-1",children:[e.title,e.icon&&(0,s.jsx)(x.default,{name:e.icon,className:"size-4 shrink-0"})]})},t)),q.show_sign&&(0,s.jsx)(S,{})]}),(0,s.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[q.show_locale&&(0,s.jsx)(y,{}),(0,s.jsx)("div",{className:"flex-1"}),q.show_theme&&(0,s.jsx)(T,{})]})]})]})]})]})})]})})}},37013:(e,t,a)=>{"use strict";a.d(t,{wD:()=>s});let s={Theme:"THEME",InviteCode:"INVITE_CODE"}},37243:(e,t,a)=>{"use strict";a.d(t,{SQ:()=>u,_2:()=>f,lp:()=>h,mB:()=>x,rI:()=>c,ty:()=>m});var s=a(68812),r=a(51456),n=a(84371),l=a(48089),o=a(37685),i=a(11059),d=a(58981);let c=n.bL,m=n.l9;n.YJ,n.ZL,n.Pb,n.z6,r.forwardRef((e,t)=>{let{className:a,inset:r,children:o,...i}=e;return(0,s.jsxs)(n.ZP,{ref:t,className:(0,d.cn)("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",a),...i,children:[o,(0,s.jsx)(l.A,{className:"ml-auto"})]})}).displayName=n.ZP.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.G5,{ref:t,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})}).displayName=n.G5.displayName;let u=r.forwardRef((e,t)=>{let{className:a,sideOffset:r=4,...l}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsx)(n.UC,{ref:t,sideOffset:r,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...l})})});u.displayName=n.UC.displayName;let f=r.forwardRef((e,t)=>{let{className:a,inset:r,...l}=e;return(0,s.jsx)(n.q7,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",a),...l})});f.displayName=n.q7.displayName,r.forwardRef((e,t)=>{let{className:a,children:r,checked:l,...i}=e;return(0,s.jsxs)(n.H_,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:l,...i,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})}),r]})}).displayName=n.H_.displayName,r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsxs)(n.hN,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(i.A,{className:"h-2 w-2 fill-current"})})}),r]})}).displayName=n.hN.displayName;let h=r.forwardRef((e,t)=>{let{className:a,inset:r,...l}=e;return(0,s.jsx)(n.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",a),...l})});h.displayName=n.JU.displayName;let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...r})});x.displayName=n.wv.displayName},50529:(e,t,a)=>{"use strict";a.d(t,{Avatar:()=>o,AvatarImage:()=>i,q:()=>d});var s=a(68812),r=a(51456),n=a(87027),l=a(58981);let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.bL,{ref:t,className:(0,l.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...r})});o.displayName=n.bL.displayName;let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n._V,{ref:t,className:(0,l.cn)("aspect-square h-full w-full",a),...r})});i.displayName=n._V.displayName;let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.H4,{ref:t,className:(0,l.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...r})});d.displayName=n.H4.displayName},54415:(e,t,a)=>{"use strict";a.d(t,{CG:()=>c,Fm:()=>x,cj:()=>d,h:()=>h,qp:()=>p});var s=a(68812),r=a(51456),n=a(98091),l=a(43798),o=a(33493),i=a(58981);let d=n.bL,c=n.l9;n.bm;let m=n.ZL,u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.hJ,{className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r,ref:t})});u.displayName=n.hJ.displayName;let f=(0,l.F)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),h=r.forwardRef((e,t)=>
1{let{side:a="right",className:r,children:l,...d}=e;return(0,s.jsxs)(m,{children:[(0,s.jsx)(u,{}),(0,s.jsxs)(n.UC,{ref:t,className:(0,i.cn)(f({side:a}),r),...d,children:[l,(0,s.jsxs)(n.bm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(o.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});h.displayName=n.UC.displayName;let x=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};x.displayName="SheetHeader";let p=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.hE,{ref:t,className:(0,i.cn)("text-lg font-semibold text-foreground",a),...r})});p.displayName=n.hE.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.VY,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",a),...r})}).displayName=n.VY.displayName},54432:(e,t,a)=>{"use strict";a.d(t,{$m:()=>c,As:()=>d,nD:()=>i,ub:()=>m});var s=a(68812),r=a(51456),n=a(50274),l=a(66281),o=a(58981);let i=n.bL,d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.q7,{ref:t,className:(0,o.cn)("border-b",a),...r})});d.displayName="AccordionItem";let c=r.forwardRef((e,t)=>{let{className:a,children:r,...i}=e;return(0,s.jsx)(n.Y9,{className:"flex",children:(0,s.jsxs)(n.l9,{ref:t,className:(0,o.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...i,children:[r,(0,s.jsx)(l.A,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});c.displayName=n.l9.displayName;let m=r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsx)(n.UC,{ref:t,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...l,children:(0,s.jsx)("div",{className:(0,o.cn)("pb-4 pt-0",a),children:r})})});m.displayName=n.UC.displayName},55138:(e,t,a)=>{"use strict";a.d(t,{PW:()=>n,np:()=>l,pr:()=>r});var s=a(10665);let r=e=>{let t=localStorage.getItem(e);if(!t)return null;let a=t.split(":");if(!a||a.length<2)return null;let r=Number(a[0]),n=(0,s.lg)();if(-1!==r&&r<n)return l(e),null;let o=a[0]+":";return t.replace(o,"")},n=(e,t,a)=>{localStorage.setItem(e,a+":"+t)},l=e=>{localStorage.removeItem(e)}},58288:(e,t,a)=>{Promise.resolve().then(a.bind(a,32069)),Promise.resolve().then(a.bind(a,76613)),Promise.resolve().then(a.bind(a,89603)),Promise.resolve().then(a.bind(a,22335)),Promise.resolve().then(a.bind(a,95147))},58981:(e,t,a)=>{"use strict";a.d(t,{cn:()=>n});var s=a(97780),r=a(22849);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},76613:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(68812),r=a(51456),n=a(80893),l=a.n(n),o=a(92766),i=a(95147),d=a(25721);let c=e=>{let{mobileNav:t}=e,a=(0,d.a)(),n=(0,o.usePathname)(),[c,m]=(0,r.useState)(""),[u,f]=(0,r.useState)(null);if((0,r.useEffect)(()=>{m(window.location.hash);let e=()=>{m(window.location.hash)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),(0,r.useEffect)(()=>{u||f(n+window.location.hash)},[n,c]),!a||!t.items||0===t.items.length)return null;let h=e=>{if(!e)return!1;if(u)return u===e;let t=n+c;return e.includes("#")?t===e:n===e&&!c},x=e=>{e&&f(e)};return(0,s.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-t border-border",children:(0,s.jsx)("div",{className:"flex justify-around items-center h-16 max-w-screen-xl mx-auto px-2",children:t.items.map((e,t)=>{let a=h(e.url),r=e.isMobileShowAsBigIcon;return(0,s.jsx)(l(),{href:e.url||"#",target:e.target||"_self",onClick:()=>x(e.url),className:"\n flex flex-col items-center justify-center flex-1 \n transition-all duration-200 relative\n ".concat(r?"transform -translate-y-3":"","\n "),children:r?(0,s.jsx)("div",{className:"flex flex-col items-center",children:(0,s.jsx)("div",{className:"w-14 h-14 roun
1ded-full bg-primary flex items-center justify-center shadow-lg",children:e.icon&&(0,s.jsx)(i.default,{name:e.icon,className:"w-7 h-7 text-primary-foreground"})})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"\n transition-colors duration-200\n ".concat(a?"text-primary":"text-muted-foreground","\n "),children:e.icon&&(0,s.jsx)(i.default,{name:e.icon,className:"w-6 h-6"})}),e.title&&(0,s.jsx)("span",{className:"\n text-xs mt-1 font-medium transition-colors duration-200\n ".concat(a?"text-primary":"text-muted-foreground","\n "),children:e.title})]})},t)})})})}},89603:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(68812),r=a(48089),n=a(80893),l=a.n(n),o=a(92766);let i=new Set(["home","price","feedback","posts","pay-success","mycreation","myallcreations","auth","i","admin","console"]),d=new Set(["img-effects","app","audio-tools","video-tools","video-effects","ai-ads-video","ai-short-video","ai-headshot-generator","nano-banana-img-gen","veo3-generator","asmr-video-generator","earth-zoom-in","effectsapp","gen-brainrot","genimg","image-to-video","ai-trade","all-tools-more","all-tools"]);function c(){let e=(0,o.usePathname)();if(!e)return null;let t=e.replace(/^\/|\/$/g,"").split("/"),a=0;t.length>0&&/^[a-z]{2}(-[A-Z]{2})?$/.test(t[0])&&(a=1);let n=t.slice(a);if(n.length<1||i.has(n[0])||!d.has(n[0])||1===n.length&&""===n[0])return null;let c=a>0?"/".concat(t[0]):"",m=[];if(m.push({label:"Home",href:"".concat(c,"/")}),m.push({label:"All-AI-Tools",href:"".concat(c,"/all-tools-more")}),(1!==n.length||"all-tools-more"!==n[0])&&n.length>=1){let e=n[n.length-1],t="/".concat(n.join("/"));m.push({label:e,href:"".concat(c).concat(t)})}let u=m.length-1;return(0,s.jsx)("div",{className:"sticky top-14 z-40 bg-background border-b",children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-4 py-3",children:(0,s.jsx)("nav",{className:"flex items-center text-sm text-muted-foreground",children:m.map((e,t)=>{let a=t===u;return(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)(l(),{href:e.href,className:"transition-colors ".concat(a?"text-muted-foreground":"text-muted-foreground hover:text-foreground"),children:e.label}),!a&&(0,s.jsx)(r.A,{className:"h-3 w-3 mx-1.5 text-muted-foreground/40"})]},e.href)})})})})}},90627:(e,t,a)=>{"use strict";a.d(t,{IB:()=>r,L$:()=>n});var s=a(55036);let r=["en","zh","es","de","fr","it","ja","ko","ru","pt"],n={en:"English",es:"Espa\xf1ol",de:"Deutsch",ja:"æ¥æ¬èª",zh:"䏿"};s.env.NEXT_PUBLIC_DEFAULT_LOCALE},95147:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});var s=a(68812);let r={Ri:a(49270)};function n(e){let{name:t,className:a,onClick:n}=e,l=function(e){let t=r[e.slice(0,2)];return t&&t[e]||null}(t);return l?(0,s.jsx)(l,{className:a,onClick:n,style:{cursor:n?"pointer":"default"}}):null}}},e=>{var t=t=>e(e.s=t);e.O(0,[5719,8548,6452,6261,6420,2798,4169,893,7463,7030,1975,3546,7603,2246,4608,3192,9017,6957,5783,7775,7358],()=>t(58288)),_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.