1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CCqpeJLw.js","assets/three-extras-Ci-yBx6t.js","assets/three-BdBGbAem.js","assets/revenuecat-BAco6y49.js","assets/index-CuvkWh0D.js","assets/Scene3D-D3omZZgm.js","assets/virtual_pwa-register-DOg4Cbi-.js"])))=>i.map(i=>d[i]); 2var mm=Object.defineProperty;var fm=(e,n,r)=>n in e?mm(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var he=(e,n,r)=>fm(e,typeof n!="symbol"?n+"":n,r);import{S as hm}from"./Scene3D-D3omZZgm.js";import{r as m,_ as Fe,j as l,R as ke,a as pm}from"./three-extras-Ci-yBx6t.js";import{C as nt,r as Ia}from"./revenuecat-BAco6y49.js";import"./three-BdBGbAem.js";/** 3 * react-router v7.13.0 4 * 5 * Copyright (c) Remix Software Inc. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE.md file in the root directory of this source tree. 9 * 10 * @license MIT 11 */var Do="popstate";function gm(e={}){let{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e,t;t=n.map((f,b)=>d(f,typeof f=="string"?null:f.state,b===0?"default":void 0));let i=c(r??t.length-1),a="POP",s=null;function c(f){return Math.min(Math.max(f,0),t.length-1)}function u(){return t[i]}function d(f,b=null,_){let p=zn(t?u().pathname:"/",f,b,_);return Te(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),p}function h(f){return typeof f=="string"?f:It(f)}return{get index(){return i},get action(){return a},get location(){return u()},createHref:h,createURL(f){return new URL(h(f),"http://localhost")},encodeLocation(f){let b=typeof f=="string"?gt(f):f;return{pathname:b.pathname||"",search:b.search||"",hash:b.hash||""}},push(f,b){a="PUSH";let _=d(f,b);i+=1,t.splice(i,t.length,_),o&&s&&s({action:a,location:_,delta:1})},replace(f,b){a="REPLACE";let _=d(f,b);t[i]=_,o&&s&&s({action:a,location:_,delta:0})},go(f){a="POP";let b=c(i+f),_=t[b];i=b,s&&s({action:a,location:_,delta:f})},listen(f){return s=f,()=>{s=null}}}}function vm(e={}){function n(o,t){let{pathname:i,search:a,hash:s}=o.location;return zn("",{pathname:i,search:a,hash:s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function r(o,t){return typeof t=="string"?t:It(t)}return ym(n,r,null,e)}function X(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Te(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function bm(){return Math.random().toString(36).substring(2,10)}function Lo(e,n){return{usr:e.state,key:e.key,idx:n}}function zn(e,n,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?gt(n):n,state:r,key:n&&n.key||o||bm()}}function It({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function gt(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function ym(e,n,r,o={}){let{window:t=document.defaultView,v5Compat:i=!1}=o,a=t.history,s="POP",c=null,u=d();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function d(){return(a.state||{idx:null}).idx}function h(){s="POP";let p=d(),v=p==null?null:p-u;u=p,c&&c({action:s,location:_.location,delta:v})}function g(p,v){s="PUSH";let $=zn(_.location,p,v);u=d()+1;let x=Lo($,u),S=_.createHref($);try{a.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;t.location.assign(S)}i&&c&&c({action:s,location:_.location,delta:1})}function f(p,v){s="REPLACE";let $=zn(_.location,p,v);u=d();let x=Lo($,u),S=_.createHref($);a.replaceState(x,"",S),i&&c&&c({action:s,location:_.location,delta:0})}function b(p){return xm(p)}let _={get action(){return s},get location(){return e(t,a)},listen(p){if(c)throw new Error("A history only accepts one active listener");return t.addEventListener(Do,h),c=p,()=>{t.removeEventListener(Do,h),c=null}},createHref(p){return n(t,p)},createURL:b,encodeLocation(p){let v=b(p);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:g,replace:f,go(p){return a.go(p)}};return _}function xm(e,n=!1){let r="http://localhost";
11typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),X(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:It(e);return o=o.replace(/ $/,"%20"),!n&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function ja(e,n,r="/"){return _m(e,n,r,!1)}function _m(e,n,r,o){let t=typeof n=="string"?gt(n):n,i=He(t.pathname||"/",r);if(i==null)return null;let a=Na(e);$m(a);let s=null;for(let c=0;s==null&&c<a.length;++c){let u=Pm(i);s=Em(a[c],u,o)}return s}function Na(e,n=[],r=[],o="",t=!1){let i=(a,s,c=t,u)=>{let d={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(o)&&c)return;X(d.relativePath.startsWith(o),`Absolute route path "${d.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(o.length)}let h=Ve([o,d.relativePath]),g=r.concat(d);a.children&&a.children.length>0&&(X(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Na(a.children,n,g,h,c)),!(a.path==null&&!a.index)&&n.push({path:h,score:zm(h,a.index),routesMeta:g})};return e.forEach((a,s)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,s);else for(let u of za(a.path))i(a,s,!0,u)}),n}function za(e){let n=e.split("/");if(n.length===0)return[];let[r,...o]=n,t=r.endsWith("?"),i=r.replace(/\?$/,"");if(o.length===0)return t?[i,""]:[i];let a=za(o.join("/")),s=[];return s.push(...a.map(c=>c===""?i:[i,c].join("/"))),t&&s.push(...a),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function $m(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:Om(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var wm=/^:[\w-]+$/,km=3,Sm=2,Im=1,jm=10,Nm=-2,Zo=e=>e==="*";function zm(e,n){let r=e.split("/"),o=r.length;return r.some(Zo)&&(o+=Nm),n&&(o+=Sm),r.filter(t=>!Zo(t)).reduce((t,i)=>t+(wm.test(i)?km:i===""?Im:jm),o)}function Om(e,n){return e.length===n.length&&e.slice(0,-1).every((o,t)=>o===n[t])?e[e.length-1]-n[n.length-1]:0}function Em(e,n,r=!1){let{routesMeta:o}=e,t={},i="/",a=[];for(let s=0;s<o.length;++s){let c=o[s],u=s===o.length-1,d=i==="/"?n:n.slice(i.length)||"/",h=On({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),g=c.route;if(!h&&u&&r&&!o[o.length-1].route.index&&(h=On({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
11Object.assign(t,h.params),a.push({params:t,pathname:Ve([i,h.pathname]),pathnameBase:Am(Ve([i,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(i=Ve([i,h.pathnameBase]))}return a}function On(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=Tm(e.path,e.caseSensitive,e.end),t=n.match(r);if(!t)return null;let i=t[0],a=i.replace(/(.)\/+$/,"$1"),s=t.slice(1);return{params:o.reduce((u,{paramName:d,isOptional:h},g)=>{if(d==="*"){let b=s[g]||"";a=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const f=s[g];return h&&!f?u[d]=void 0:u[d]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function Tm(e,n=!1,r=!0){Te(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],t="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,c)=>(o.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),t+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?t+="\\/*$":e!==""&&e!=="/"&&(t+="(?:(?=\\/|$))"),[new RegExp(t,n?void 0:"i"),o]}function Pm(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Te(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function He(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}var Um=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Cm(e,n="/"){let{pathname:r,search:o="",hash:t=""}=typeof e=="string"?gt(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=Mo(r.substring(1),"/"):i=Mo(r,n)):i=n,{pathname:i,search:Dm(o),hash:Lm(t)}}function Mo(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(t=>{t===".."?r.length>1&&r.pop():t!=="."&&r.push(t)}),r.length>1?r.join("/"):"/"}function ur(e,n,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rm(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Oa(e){let n=Rm(e);return n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase)}function Ea(e,n,r,o=!1){let t;typeof e=="string"?t=gt(e):(t={...e},X(!t.pathname||!t.pathname.includes("?"),ur("?","pathname","search",t)),X(!t.pathname||!t.pathname.includes("#"),ur("#","pathname","hash",t)),X(!t.search||!t.search.includes("#"),ur("#","search","hash",t)));let i=e===""||t.pathname==="",a=i?"/":t.pathname,s;if(a==null)s=r;else{let h=n.length-1;if(!o&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),h-=1;t.pathname=g.join("/")}s=h>=0?n[h]:"/"}let c=Cm(t,s),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var Ve=e=>e.join("/").replace(/\/\/+/g,"/"),Am=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Lm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Zm=class{constructor(e,n,r,o=!1){this.status=e,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Mm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Fm(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ta=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pa(e,n){let r=e;if(typeof r!="string"||!Um.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,t=!1;if(Ta)try{let i=new URL(window.location.href),a=r.startsWith("//")?new URL(i.protocol+r):new URL(r),s=He(a.pathname,n);a.origin===i.origin&&s!=null?r=s+a.search+a.hash:t=!0}catch{Te(!1,`<Link to="${r}">
11 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:t,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ua=["POST","PUT","PATCH","DELETE"];new Set(Ua);var Bm=["GET",...Ua];new Set(Bm);var Tt=m.createContext(null);Tt.displayName="DataRouter";var Fn=m.createContext(null);Fn.displayName="DataRouterState";var Jm=m.createContext(!1),Ca=m.createContext({isTransitioning:!1});Ca.displayName="ViewTransition";var Gm=m.createContext(new Map);Gm.displayName="Fetchers";var Wm=m.createContext(null);Wm.displayName="Await";var Se=m.createContext(null);Se.displayName="Navigation";var Kt=m.createContext(null);Kt.displayName="Location";var Be=m.createContext({outlet:null,matches:[],isDataRoute:!1});Be.displayName="Route";var Lr=m.createContext(null);Lr.displayName="RouteError";var Ra="REACT_ROUTER_ERROR",Vm="REDIRECT",Hm="ROUTE_ERROR_RESPONSE";function qm(e){if(e.startsWith(`${Ra}:${Vm}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function Km(e){if(e.startsWith(`${Ra}:${Hm}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new Zm(n.status,n.statusText,n.data)}catch{}}function Ym(e,{relative:n}={}){X(Yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=m.useContext(Se),{hash:t,pathname:i,search:a}=Xt(e,{relative:n}),s=i;return r!=="/"&&(s=i==="/"?r:Ve([r,i])),o.createHref({pathname:s,search:a,hash:t})}function Yt(){return m.useContext(Kt)!=null}function vt(){return X(Yt(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Kt).location}var Aa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Da(e){m.useContext(Se).static||m.useLayoutEffect(e)}function La(){let{isDataRoute:e}=m.useContext(Be);return e?df():Xm()}function Xm(){X(Yt(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Tt),{basename:n,navigator:r}=m.useContext(Se),{matches:o}=m.useContext(Be),{pathname:t}=vt(),i=JSON.stringify(Oa(o)),a=m.useRef(!1);return Da(()=>{a.current=!0}),m.useCallback((c,u={})=>{if(Te(a.current,Aa),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Ea(c,JSON.parse(i),t,u.relative==="path");e==null&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ve([n,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[n,r,i,t,e])}m.createContext(null);function Za(){let{matches:e}=m.useContext(Be),n=e[e.length-1];return n?n.params:{}}function Xt(e,{relative:n}={}){let{matches:r}=m.useContext(Be),{pathname:o}=vt(),t=JSON.stringify(Oa(r));return m.useMemo(()=>Ea(e,JSON.parse(t),o,n==="path"),[e,t,o,n])}function Qm(e,n){return Ma(e,n)}function Ma(e,n,r,o,t){var $;X(Yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(Se),{matches:a}=m.useContext(Be),s=a[a.length-1],c=s?s.params:{},u=s?s.pathname:"/",d=s?s.pathnameBase:"/",h=s&&s.route;{let x=h&&h.path||"";Ba(u,!h||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 12 13Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let g=vt(),f;if(n){let x=typeof n=="string"?gt(n):n;X(d==="/"||(($=x.pathname)==null?void 0:$.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${x.pathname}" was given in the \`location\` prop.`),f=x}else f=g;let b=f.pathname||"/",_=b;if(d!=="/"){let x=d.replace(/^\//,"").split("/");_="/"+b.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=ja(e,{pathname:_});Te(h||p!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Te(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=of(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:Ve([d,i.encodeLocation?i.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:Ve([d,i.encodeLocation?i.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),a,r,o,t);return n&&v?m.createElement(Kt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},v):v}function ef(){let e=uf(),n=Mm(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",t={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=m.createElement(m.Fragment,null,m.createElement("p",null,"ð¿ Hey developer ð"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
13Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},n),r?m.createElement("pre",{style:t},r):null,a)}var tf=m.createElement(ef,null),Fa=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Km(e.digest);r&&(e=r)}let n=e!==void 0?m.createElement(Be.Provider,{value:this.props.routeContext},m.createElement(Lr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(nf,{error:e},n):n}};Fa.contextType=Jm;var dr=new WeakMap;function nf({children:e,error:n}){let{basename:r}=m.useContext(Se);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=qm(n.digest);if(o){let t=dr.get(n);if(t)throw t;let i=Pa(o.location,r);if(Ta&&!dr.get(n))if(i.isExternal||o.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:o.replace}));
13throw dr.set(n,a),a}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function rf({routeContext:e,match:n,children:r}){let o=m.useContext(Tt);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Be.Provider,{value:e},r)}function of(e,n=[],r=null,o=null,t=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let d=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);X(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let s=!1,c=-1;if(r)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:g,errors:f}=r,b=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!f||f[h.route.id]===void 0);if(h.route.lazy||b){s=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}let u=r&&o?(d,h)=>{var g,f;o(d,{location:r.location,params:((f=(g=r.matches)==null?void 0:g[0])==null?void 0:f.params)??{},unstable_pattern:Fm(r.matches),errorInfo:h})}:void 0;return i.reduceRight((d,h,g)=>{let f,b=!1,_=null,p=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,_=h.route.errorElement||tf,s&&(c<0&&g===0?(Ba("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,p=null):c===g&&(b=!0,p=h.route.hydrateFallbackElement||null)));let v=n.concat(i.slice(0,g+1)),$=()=>{let x;return f?x=_:b?x=p:h.route.Component?x=m.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,m.createElement(rf,{match:h,routeContext:{outlet:d,matches:v,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?m.createElement(Fa,{location:r.location,revalidation:r.revalidation,component:_,error:f,children:$(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:u}):$()},null)}function Zr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function af(e){let n=m.useContext(Tt);return X(n,Zr(e)),n}function sf(e){let n=m.useContext(Fn);return X(n,Zr(e)),n}function cf(e){let n=m.useContext(Be);return X(n,Zr(e)),n}function Mr(e){let n=cf(e),r=n.matches[n.matches.length-1];return X(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function lf(){return Mr("useRouteId")}function uf(){var o;let e=m.useContext(Lr),n=sf("useRouteError"),r=Mr("useRouteError");return e!==void 0?e:(o=n.errors)==null?void 0:o[r]}function df(){let{router:e}=af("useNavigate"),n=Mr("useNavigate"),r=m.useRef(!1);return Da(()=>{r.current=!0}),m.useCallback(async(t,i={})=>{Te(r.current,Aa),r.current&&(typeof t=="number"?await e.navigate(t):await e.navigate(t,{fromRouteId:n,...i}))},[e,n])}var Fo={};function Ba(e,n,r){!n&&!Fo[e]&&(Fo[e]=!0,Te(!1,r))}m.memo(mf);function mf({routes:e,future:n,state:r,onError:o}){return Ma(e,void 0,r,o,n)}function ff({basename:e,children:n,initialEntries:r,initialIndex:o,unstable_useTransitions:t}){let i=m.useRef();i.current==null&&(i.current=gm({initialEntries:r,initialIndex:o,v5Compat:!0}));let a=i.current,[s,c]=m.useState({action:a.action,location:a.location}),u=m.useCallback(d=>{t===!1?c(d):m.startTransition(()=>c(d))},[t]);return m.useLayoutEffect(()=>a.listen(u),[a,u]),m.createElement(Ja,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:a,unstable_useTransitions:t})}function kn(e){X(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ja({basename:e="/",children:n=null,location:r,navigationType:o="POP",navigator:t,static:i=!1,unstable_useTransitions:a}){X(!Yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:s,navigator:t,static:i,unstable_useTransitions:a,future:{}}),[s,t,i,a]);typeof r=="string"&&(r=gt(r));
13let{pathname:u="/",search:d="",hash:h="",state:g=null,key:f="default"}=r,b=m.useMemo(()=>{let _=He(u,s);return _==null?null:{location:{pathname:_,search:d,hash:h,state:g,key:f},navigationType:o}},[s,u,d,h,g,f,o]);return Te(b!=null,`<Router basename="${s}"> is not able to match the URL "${u}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:m.createElement(Se.Provider,{value:c},m.createElement(Kt.Provider,{children:n,value:b}))}function hf({children:e,location:n}){return Qm(jr(e),n)}function jr(e,n=[]){let r=[];return m.Children.forEach(e,(o,t)=>{if(!m.isValidElement(o))return;let i=[...n,t];if(o.type===m.Fragment){r.push.apply(r,jr(o.props.children,i));return}X(o.type===kn,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),X(!o.props.index||!o.props.children,"An index route cannot have child routes.");let a={id:o.props.id||i.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(a.children=jr(o.props.children,i)),r.push(a)}),r}var Sn="get",In="application/x-www-form-urlencoded";function Bn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function pf(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function gf(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function vf(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function bf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yf(e,n){return e.button===0&&(!n||n==="_self")&&!bf(e)}var hn=null;function xf(){if(hn===null)try{new FormData(document.createElement("form"),0),hn=!1}catch{hn=!0}return hn}var _f=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mr(e){return e!=null&&!_f.has(e)?(Te(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${In}"`),null):e}function $f(e,n){let r,o,t,i,a;if(gf(e)){let s=e.getAttribute("action");o=s?He(s,n):null,r=e.getAttribute("method")||Sn,t=mr(e.getAttribute("enctype"))||In,i=new FormData(e)}else if(pf(e)||vf(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||s.getAttribute("action");if(o=c?He(c,n):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||Sn,t=mr(e.getAttribute("formenctype"))||mr(s.getAttribute("enctype"))||In,i=new FormData(s,e),!xf()){let{name:u,type:d,value:h}=e;if(d==="image"){let g=u?`${u}.`:"";i.append(`${g}x`,"0"),i.append(`${g}y`,"0")}else u&&i.append(u,h)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Sn,o=null,t=In,a=e}return i&&t==="text/plain"&&(a=i,i=void 0),{action:o,method:r.toLowerCase(),encType:t,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fr(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function wf(e,n,r,o){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?t.pathname.endsWith("/")?t.pathname=`${t.pathname}_.${o}`:t.pathname=`${t.pathname}.${o}`:t.pathname==="/"?t.pathname=`_root.${o}`:n&&He(t.pathname,n)==="/"?t.pathname=`${n.replace(/\/$/,"")}/_root.${o}`:t.pathname=`${t.pathname.replace(/\/$/,"")}.${o}`,t}async function kf(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
13isSpaMode,window.location.reload(),new Promise(()=>{})}}function Sf(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function If(e,n,r){let o=await Promise.all(e.map(async t=>{let i=n.routes[t.route.id];if(i){let a=await kf(i,r);return a.links?a.links():[]}return[]}));return Of(o.flat(1).filter(Sf).filter(t=>t.rel==="stylesheet"||t.rel==="preload").map(t=>t.rel==="stylesheet"?{...t,rel:"prefetch",as:"style"}:{...t,rel:"prefetch"}))}function Bo(e,n,r,o,t,i){let a=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,s=(c,u)=>{var d;return r[u].pathname!==c.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return i==="assets"?n.filter((c,u)=>a(c,u)||s(c,u)):i==="data"?n.filter((c,u)=>{var h;let d=o.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(a(c,u)||s(c,u))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(t.pathname+t.search+t.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function jf(e,n,{includeHydrateFallback:r}={}){return Nf(e.map(o=>{let t=n.routes[o.route.id];if(!t)return[];let i=[t.module];return t.clientActionModule&&(i=i.concat(t.clientActionModule)),t.clientLoaderModule&&(i=i.concat(t.clientLoaderModule)),r&&t.hydrateFallbackModule&&(i=i.concat(t.hydrateFallbackModule)),t.imports&&(i=i.concat(t.imports)),i}).flat(1))}function Nf(e){return[...new Set(e)]}function zf(e){let n={},r=Object.keys(e).sort();for(let o of r)n[o]=e[o];return n}function Of(e,n){let r=new Set;return new Set(n),e.reduce((o,t)=>{let i=JSON.stringify(zf(t));return r.has(i)||(r.add(i),o.push({key:i,link:t})),o},[])}function Ga(){let e=m.useContext(Tt);return Fr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ef(){let e=m.useContext(Fn);return Fr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Br=m.createContext(void 0);Br.displayName="FrameworkContext";function Wa(){let e=m.useContext(Br);return Fr(e,"You must render this element inside a <HydratedRouter> element"),e}function Tf(e,n){let r=m.useContext(Br),[o,t]=m.useState(!1),[i,a]=m.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=n,g=m.useRef(null);m.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let _=v=>{v.forEach($=>{a($.isIntersecting)})},p=new IntersectionObserver(_,{threshold:.5});return g.current&&p.observe(g.current),()=>{p.disconnect()}}},[e]),m.useEffect(()=>{if(o){let _=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(_)}}},[o]);let f=()=>{t(!0)},b=()=>{t(!1),a(!1)};return r?e!=="intent"?[i,g,{}]:[i,g,{onFocus:Rt(s,f),onBlur:Rt(c,b),onMouseEnter:Rt(u,f),onMouseLeave:Rt(d,b),onTouchStart:Rt(h,f)}]:[!1,g,{}]}function Rt(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function Pf({page:e,...n}){let{router:r}=Ga(),o=m.useMemo(()=>ja(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?m.createElement(Cf,{page:e,matches:o,...n}):null}function Uf(e){let{manifest:n,routeModules:r}=Wa(),[o,t]=m.useState([]);return m.useEffect(()=>{let i=!1;return If(e,n,r).then(a=>{i||t(a)}),()=>{i=!0}},[e,n,r]),o}function Cf({page:e,matches:n,...r}){let o=vt(),{future:t,manifest:i,routeModules:a}=Wa(),{basename:s}=Ga(),{loaderData:c,matches:u}=Ef(),d=m.useMemo(()=>Bo(e,n,u,i,o,"data"),[e,n,u,i,o]),h=m.useMemo(()=>Bo(e,n,u,i,o,"assets"),[e,n,u,i,o]),g=m.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let _=new Set,p=!1;if(n.forEach($=>{var S;let x=i.routes[$.route.id];!x||!x.hasLoader||(!d.some(w=>w.route.id===$.route.id)&&$.route.id in c&&((S=a[$.route.id])!=null&&S.shouldRevalidate)||x.hasClientLoader?p=!0:_.add($.route.id))}),_.size===0)return[];let v=wf(e,s,t.unstable_trailingSlashAwareDataRequests,"data");return p&&_.size>0&&v.searchParams.set("_routes",n.filter($=>_.has($.route.id)).map($=>$.route.id).join(",")),[v.pathname+v.search]},[s,t.unstable_trailingSlashAwareDataRequests,c,o,i,d,n,e,a]),f=m.useMemo(()=>jf(h,i),[h,i]),b=Uf(h);return m.createElement(m.Fragment,null,g.map(_=>m.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...r})),f.map(_=>m.createElement("link",{key:_,rel:"modulepreload",href:_,...r})),b.map(({key:_,link:p})=>m.createElement("link",{key:_,nonce:r.nonce,...p,crossOrigin:p.crossOrigin??r.crossOrigin})))}function Rf(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var Af=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Af&&(window.__reactRouterVersion="7.13.0")}catch{}
13function Df({basename:e,children:n,unstable_useTransitions:r,window:o}){let t=m.useRef();t.current==null&&(t.current=vm({window:o,v5Compat:!0}));let i=t.current,[a,s]=m.useState({action:i.action,location:i.location}),c=m.useCallback(u=>{r===!1?s(u):m.startTransition(()=>s(u))},[r]);return m.useLayoutEffect(()=>i.listen(c),[i,c]),m.createElement(Ja,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:i,unstable_useTransitions:r})}var Va=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ha=m.forwardRef(function({onClick:n,discover:r="render",prefetch:o="none",relative:t,reloadDocument:i,replace:a,state:s,target:c,to:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:g,...f},b){let{basename:_,unstable_useTransitions:p}=m.useContext(Se),v=typeof u=="string"&&Va.test(u),$=Pa(u,_);u=$.to;let x=Ym(u,{relative:t}),[S,w,I]=Tf(o,f),E=Ff(u,{replace:a,state:s,target:c,preventScrollReset:d,relative:t,viewTransition:h,unstable_defaultShouldRevalidate:g,unstable_useTransitions:p});function A(K){n&&n(K),K.defaultPrevented||E(K)}let Z=m.createElement("a",{...f,...I,href:$.absoluteURL||x,onClick:$.isExternal||i?n:A,ref:Rf(b,w),target:c,"data-discover":!v&&r==="render"?"true":void 0});return S&&!v?m.createElement(m.Fragment,null,Z,m.createElement(Pf,{page:x})):Z});Ha.displayName="Link";var Lf=m.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:o="",end:t=!1,style:i,to:a,viewTransition:s,children:c,...u},d){let h=Xt(a,{relative:u.relative}),g=vt(),f=m.useContext(Fn),{navigator:b,basename:_}=m.useContext(Se),p=f!=null&&Vf(h)&&s===!0,v=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,$=g.pathname,x=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||($=$.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&_&&(x=He(x,_)||x);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let w=$===v||!t&&$.startsWith(v)&&$.charAt(S)==="/",I=x!=null&&(x===v||!t&&x.startsWith(v)&&x.charAt(v.length)==="/"),E={isActive:w,isPending:I,isTransitioning:p},A=w?n:void 0,Z;typeof o=="function"?Z=o(E):Z=[o,w?"active":null,I?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let K=typeof i=="function"?i(E):i;return m.createElement(Ha,{...u,"aria-current":A,className:Z,ref:d,style:K,to:a,viewTransition:s},typeof c=="function"?c(E):c)});Lf.displayName="NavLink";var Zf=m.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:o,replace:t,state:i,method:a=Sn,action:s,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:g,...f},b)=>{let{unstable_useTransitions:_}=m.useContext(Se),p=Gf(),v=Wf(s,{relative:u}),$=a.toLowerCase()==="get"?"get":"post",x=typeof s=="string"&&Va.test(s),S=w=>{if(c&&c(w),w.defaultPrevented)return;w.preventDefault();let I=w.nativeEvent.submitter,E=(I==null?void 0:I.getAttribute("formmethod"))||a,A=()=>p(I||w.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:t,state:i,relative:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:g});_&&r!==!1?m.startTransition(()=>A()):A()};return m.createElement("form",{ref:b,method:$,action:v,onSubmit:o?c:S,...f,"data-discover":!x&&e==="render"?"true":void 0})});Zf.displayName="Form";function Mf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qa(e){let n=m.useContext(Tt);return X(n,Mf(e)),n}function Ff(e,{target:n,replace:r,state:o,preventScrollReset:t,relative:i,viewTransition:a,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let u=La(),d=vt(),h=Xt(e,{relative:i});return m.useCallback(g=>{if(yf(g,n)){g.preventDefault();let f=r!==void 0?r:It(d)===It(h),b=()=>u(e,{replace:f,state:o,preventScrollReset:t,relative:i,viewTransition:a,unstable_defaultShouldRevalidate:s});c?m.startTransition(()=>b()):b()}},[d,u,h,r,o,n,e,t,i,a,s,c])}var Bf=0,Jf=()=>`__${String(++Bf)}__`;function Gf(){let{router:e}=qa("useSubmit"),{basename:n}=m.useContext(Se),r=lf(),o=e.fetch,t=e.navigate;return m.useCallback(async(i,a={})=>{let{action:s,method:c,encType:u,formData:d,body:h}=$f(i,n);if(a.navigate===!1){let g=a.fetcherKey||Jf();await o(g,r,a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||c,formEncType:a.encType||u,flushSync:a.flushSync})}else await t(a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||c,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[o,t,n,r])}function Wf(e,{relative:n}={}){let{basename:r}=m.useContext(Se),o=m.useContext(Be);X(o,"useFormAction must be used inside a RouteContext");let[t]=o.matches.slice(-1),i={...Xt(e||".",{relative:n})},a=vt();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),c=s.getAll("index");if(c.some(d=>d==="")){s.delete("index"),c.filter(h=>
13h).forEach(h=>s.append("index",h));let d=s.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&t.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Ve([r,i.pathname])),It(i)}function Vf(e,{relative:n}={}){let r=m.useContext(Ca);X(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=qa("useViewTransitionState"),t=Xt(e,{relative:n});if(!r.isTransitioning)return!1;let i=He(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=He(r.nextLocation.pathname,o)||r.nextLocation.pathname;return On(t.pathname,a)!=null||On(t.pathname,i)!=null}const Hf=` 14IMPORTANT GUIDELINES: 15 161. BE AN ACTIVE CONVERSATION LEADER: You should actively drive the conversation forward. Don't wait passively for the child to respond. 17 - If the child is quiet or doesn't answer, move on naturally â share something fun, tell a joke, start a mini-story, or suggest an activity. 18 - Don't repeatedly ask "What do you want to do?" or "What do you think?" â instead, take initiative: "Oh! I just remembered something amazing â let me tell you about it!" 19 - Limit open-ended questions. Instead of "What do you want to talk about?", say "I have a riddle for you!" or "Want to hear about the silliest thing that happened today?" 20 - Keep the energy up â you're the fun friend, not an interviewer. 21 222. FOLLOW-UP QUESTIONS: When a child asks for a story or wants to play a game, ask AT MOST ONE clarifying question before starting. Don't ask too many questions - kids want to dive in quickly! For example: 23 - For stories: You can ask "What kind of story would you like - adventure, funny, or magical?" then start telling immediately. 24 - For games: You can ask "What kind of game sounds fun?" then start playing right away. 25 - If the child doesn't answer your question within a few seconds, just pick something and go! 26 273. PHONE-CALL FRIENDLY GAMES: Since this is a voice-only conversation, only suggest and play games that work well on phone calls. Good examples include: 28 - I Spy (describe things to guess) 29 - 20 Questions (yes/no guessing game) 30 - Story Building (take turns adding to a story) 31 - Would You Rather (silly choices) 32 - Riddles and jokes 33 - Word games (rhyming, categories, etc.) 34 - Trivia questions 35 - Imagination games ("Let's pretend we're...") 36 - Counting games 37 - Memory challenges ("I'm going on a picnic and I'm bringing...") 38 39 Avoid games that require: 40 - Looking at a screen 41 - Physical movement or actions 42 - Drawing or writing 43 - Multiple players in the same room 44 454. Keep responses SHORT and engaging - remember this is a voice conversation with a young child. 46 475. SILENCE HANDLING: If the child goes quiet, don't just wait. After a brief pause, jump in with something engaging â a fun fact, a silly question, or continue whatever you were doing. Be the friend who always has something interesting to share. 48`.trim(),qf=[{id:"cat",name:"Cat",icon:"https://lh3.googleusercontent.com/aida-public/AB6AXuAJi5gtnWONMFAajY41hMYyxJaX9FywiOvs9uZgX-6IO7-0O4dDvP7_4nvkyH_GlPptYAmWMRrj9hwQaaxqDGPFPWga5rd3bgNFfK6_asV3PtLVMyGrWSHuZ6arnin4frXXlAYV8Bw9M7dge8N6dMOoqH1lPp0yqeyvRqSN12cpJl-5JO3jcrlCV_KFim1Uz4tc2_8tCQckdHZUyilkRdGFT2TqbTJ-q-qNXVyDnkn-5xtDqT2dgaSjDMTq5LZC7LOVsah78eIogSU"},{id:"dog",name:"Dog",icon:"https://lh3.googleusercontent.com/aida-public/AB6AXuDM-wjhIdtlYxX5U7YPa25c0a3EjYGRcf2AYxC-kS-3NStiNDAW111km5hh_mL6u7WERicj_1LQ1Y48Hl4NyqkceC5DO6Ey1bnP2yyE-nJu4k-p4tg15roYfd6HFEh_0RbxINGi-bapl4ux7IhMR0cGbstchOFL7hJDKBYDyph45CuOQrzN39ijWDUDnwqawJ5S_0U7G14o6HyEKY8Z--R8Y8MaLYTSubkehdCvCesZVeIoAkW-20DzaXqdfzfK27k0KenIokYWtOo"},{id:"dino",name:"Dino",icon:"https://lh3.googleusercontent.com/aida-public/AB6AXuBGpVrw_FEv0B0pn3hqcWTNvvYiCNXOuFZH3dKBPjaYEd9eWPaoD9JPQQvlYSPGoTNKLLaRI-YE641i6F_WFKYGDIxL087ILFmxGCHVLt-6JksLCDJr57366kPQCnx-jEgG8CG1ZsAc6y7d3vquBkZcjIn1eeYP1l7vjXIcXQr_L12Z8uNzfcKzq50BWHGZKJJLzB3yegtXi1EBbOpyJiDYrBmsTqab4QJG4IW5niPKp2t9bA5gcDMll5cmsYZh3d7f7eleE--M32Q"}],Jo=6e4,Kf=1e4,wt="neon_auth_session_verifier",Ka="neon_popup",Ya="neon_popup_callback",Yf="/auth/callback",Xa="neon-auth:oauth-complete";var Xf={},Go={};const jn=Object.create(null),At=e=>{var n;return Xf||((n=globalThis.Deno)==null?void 0:n.env.toObject())||globalThis.__env__||(e?jn:globalThis)},we=new Proxy(jn,{get(e,n){return At()[n]??jn[n]},has(e,n){return n in At()||n in jn},set(e,n,r){const o=At(!0);return o[n]=r,!0},deleteProperty(e,n){if(!n)return!1;const r=At(!0);return delete r[n],!0},ownKeys(){const e=At(!0);return Object.keys(e)}});function te(e,n){return typeof process<"u"&&Go?Go[e]??n:typeof Deno<"u"?Deno.env.get(e)??n:typeof Bun<"u"?Bun.env[e]??n:n}const Dt=1,oe=4,Ze=8,ye=24,Wo={eterm:oe,cons25:oe,console:oe,cygwin:oe,dtterm:oe,gnome:oe,hurd:oe,jfbterm:oe,konsole:oe,kterm:oe,mlterm:oe,mosh:ye,putty:oe,st:oe,"rxvt-unicode-24bit":ye,terminator:ye,"xterm-kitty":ye},Qf=new Map(Object.entries({APPVEYOR:Ze,BUILDKITE:Ze,CIRCLECI:ye,DRONE:Ze,GITEA_ACTIONS:ye,GITHUB_ACTIONS:ye,GITLAB_CI:Ze,TRAVIS:Ze})),eh=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function th(){if(te("FORCE_COLOR")!==void 0)switch(te("FORCE_COLOR")){case"":case"1":case"true":return oe;case"2":return Ze;case"3":return ye;default:return Dt}if(te("NODE_DISABLE_COLORS")!==void 0&&te("NODE_DISABLE_COLORS")!==""||te("NO_COLOR")!==void 0&&te("NO_COLOR")!==""||te("TERM")==="dumb")return Dt;if(te("TMUX"))return ye;if("TF_BUILD"in we&&"AGENT_NAME"in we)return oe;if("CI"in we){for(const{0:e,1:n}of Qf)if(e in we)return n;return te("CI_NAME")==="codeship"?Ze:Dt}if("TEAMCITY_VERSION"in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(te("TEAMCITY_VERSION"))!==null?oe:Dt;switch(te("TERM_PROGRAM")){case"iTerm.app":return!te("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(te("TERM_PROGRAM_VERSION"))!==null?Ze:ye;case"HyperTerm":case"MacTerm":return ye;case"Apple_Terminal":return Ze}
48if(te("COLORTERM")==="truecolor"||te("COLORTERM")==="24bit")return ye;if(te("TERM")){if(/truecolor/.exec(te("TERM"))!==null)return ye;if(/^xterm-256/.exec(te("TERM"))!==null)return Ze;const e=te("TERM").toLowerCase();if(Wo[e])return Wo[e];if(eh.some(n=>n.exec(e)!==null))return oe}return te("COLORTERM")?oe:Dt}const Me={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},Nr=["debug","info","success","warn","error"];function nh(e,n){return Nr.indexOf(n)>=Nr.indexOf(e)}const rh={info:Me.fg.blue,success:Me.fg.green,warn:Me.fg.yellow,error:Me.fg.red,debug:Me.fg.magenta},ih=(e,n,r)=>{const o=new Date().toISOString();return r?`${Me.dim}${o}${Me.reset} ${rh[e]}${e.toUpperCase()}${Me.reset} ${Me.bright}[Better Auth]:${Me.reset} ${n}`:`${o} ${e.toUpperCase()} [Better Auth]: ${n}`},oh=e=>{const n="error",r=th()!==1,o=(t,i,a=[])=>{if(!nh(n,t))return;const s=ih(t,i,r);{t==="error"?console.error(s,...a):t==="warn"?console.warn(s,...a):console.log(s,...a);return}};return{...Object.fromEntries(Nr.map(t=>[t,(...[i,...a])=>o(t,i,a)])),get level(){return n}}};oh();function Qa(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gt=class extends Error{constructor(e,n){super(e),this.name="BetterAuthError",this.message=e,this.cause=n,this.stack=""}};function ah(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Gt(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function sh(e){try{const n=new URL(e);if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Gt(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(n){throw n instanceof Gt?n:new Gt(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(n))}}function fr(e,n="/api/auth"){if(sh(e),ah(e))return e;const r=e.replace(/\/+$/,"");return!n||n==="/"?r:(n=n.startsWith("/")?n:`/${n}`,`${r}${n}`)}function ch(e,n,r,o,t){if(e)return fr(e,n);{const i=we.BETTER_AUTH_URL||we.NEXT_PUBLIC_BETTER_AUTH_URL||we.PUBLIC_BETTER_AUTH_URL||we.NUXT_PUBLIC_BETTER_AUTH_URL||we.NUXT_PUBLIC_AUTH_URL||(we.BASE_URL!=="/"?we.BASE_URL:void 0);if(i)return fr(i,n)}if(typeof window<"u"&&window.location)return fr(window.location.origin,n)}const lh={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},uh=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Vo={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},dh=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function mh(e){return e instanceof Date&&!isNaN(e.getTime())}function fh(e){const n=dh.exec(e);if(!n)return null;const[,r,o,t,i,a,s,c,u,d,h]=n;let g=new Date(Date.UTC(parseInt(r,10),parseInt(o,10)-1,parseInt(t,10),parseInt(i,10),parseInt(a,10),parseInt(s,10),c?parseInt(c.padEnd(3,"0"),10):0));if(u){const f=(parseInt(d,10)*60+parseInt(h,10))*(u==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+f)}return mh(g)?g:null}function hh(e,n={}){const{strict:r=!1,warnings:o=!1,reviver:t,parseDates:i=!0}=n;if(typeof e!="string")return e;const a=e.trim();if(a.length>0&&a[0]==='"'&&a.endsWith('"')&&!a.slice(1,-1).includes('"'))return a.slice(1,-1);const s=a.toLowerCase();if(s.length<=9&&s in Vo)return Vo[s];if(!uh.test(a)){if(r)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(lh).some(([c,u])=>{const d=u.test(a);return d&&o&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),d})&&r)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(u,d)=>{if(u==="__proto__"||u==="constructor"&&d&&typeof d=="object"&&"prototype"in d){o&&console.warn(`[better-json] Dropping "${u}" key to prevent prototype pollution`);return}
48if(i&&typeof d=="string"){const h=fh(d);if(h)return h}return t?t(u,d):d})}catch(c){if(r)throw c;return e}}function ph(e,n={strict:!0}){return hh(e,n)}let Ne=[],tt=0;const pn=4,kt=e=>{let n=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},lc:0,listen(o){return r.lc=n.push(o),()=>{for(let i=tt+pn;i<Ne.length;)Ne[i]===o?Ne.splice(i,pn):i+=pn;let t=n.indexOf(o);~t&&(n.splice(t,1),--r.lc||r.off())}},notify(o,t){let i=!Ne.length;for(let a of n)Ne.push(a,r.value,o,t);if(i){for(tt=0;tt<Ne.length;tt+=pn)Ne[tt](Ne[tt+1],Ne[tt+2],Ne[tt+3]);Ne.length=0}},off(){},set(o){let t=r.value;t!==o&&(r.value=o,r.notify(t))},subscribe(o){let t=r.listen(o);return o(r.value),t},value:e};return r},gh=5,gn=6,vn=10;let vh=(e,n,r,o)=>(e.events=e.events||{},e.events[r+vn]||(e.events[r+vn]=o(t=>{e.events[r].reduceRight((i,a)=>(a(i),i),{shared:{},...t})})),e.events[r]=e.events[r]||[],e.events[r].push(n),()=>{let t=e.events[r],i=t.indexOf(n);t.splice(i,1),t.length||(delete e.events[r],e.events[r+vn](),delete e.events[r+vn])}),bh=1e3,es=(e,n)=>vh(e,o=>{let t=n(o);t&&e.events[gn].push(t)},gh,o=>{let t=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,o()),t(...a));let i=e.off;return e.events[gn]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[gn])a();e.events[gn]=[]}},bh)},()=>{e.listen=t,e.off=i}});function yh(e,n,r){let o=new Set(n).add(void 0);return e.listen((t,i,a)=>{o.has(a)&&r(t,i,a)})}var xh=Object.defineProperty,_h=Object.defineProperties,$h=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,wh=Object.prototype.hasOwnProperty,kh=Object.prototype.propertyIsEnumerable,qo=(e,n,r)=>n in e?xh(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,ze=(e,n)=>{for(var r in n||(n={}))wh.call(n,r)&&qo(e,r,n[r]);if(Ho)for(var r of Ho(n))kh.call(n,r)&&qo(e,r,n[r]);return e},De=(e,n)=>_h(e,$h(n)),Sh=class extends Error{constructor(e,n,r){super(n||e.toString(),{cause:r}),this.status=e,this.statusText=n,this.error=r}},Ih=async(e,n)=>{var r,o,t,i,a,s;let c=n||{};const u={onRequest:[n==null?void 0:n.onRequest],onResponse:[n==null?void 0:n.onResponse],onSuccess:[n==null?void 0:n.onSuccess],onError:[n==null?void 0:n.onError],onRetry:[n==null?void 0:n.onRetry]};if(!n||!(n!=null&&n.plugins))return{url:e,options:c,hooks:u};for(const d of(n==null?void 0:n.plugins)||[]){if(d.init){const h=await((r=d.init)==null?void 0:r.call(d,e.toString(),n));c=h.options||c,e=h.url}u.onRequest.push((o=d.hooks)==null?void 0:o.onRequest),u.onResponse.push((t=d.hooks)==null?void 0:t.onResponse),u.onSuccess.push((i=d.hooks)==null?void 0:i.onSuccess),u.onError.push((a=d.hooks)==null?void 0:a.onError),u.onRetry.push((s=d.hooks)==null?void 0:s.onRetry)}return{url:e,options:c,hooks:u}},Ko=class{constructor(e){this.options=e}shouldAttemptRetry(e,n){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(n)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},jh=class{constructor(e){this.options=e}shouldAttemptRetry(e,n){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(n)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Nh(e){if(typeof e=="number")return new Ko({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Ko(e);case"exponential":return new jh(e);default:throw new Error("Invalid retry strategy")}}var zh=async e=>{const n={},r=async o=>typeof o=="function"?await o():o;if(e!=null&&e.auth){if(e.auth.type==="Bearer"){const o=await r(e.auth.token);if(!o)return n;n.authorization=`Bearer ${o}`}else if(e.auth.type==="Basic"){const o=r(e.auth.username),t=r(e.auth.password);if(!o||!t)return n;n.authorization=`Basic ${btoa(`${o}:${t}`)}`}else if(e.auth.type==="Custom"){const o=r(e.auth.value);if(!o)return n;n.authorization=`${r(e.auth.prefix)} ${o}`}}return n},Oh=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Eh(e){const n=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!n)return"json";const o=n.split(";").shift()||"";return Oh.test(o)?"json":r.has(o)||o.startsWith("text/")?"text":"blob"}function Th(e){try{return JSON.parse(e),!0}catch{return!1}}function ts(e){if(e===void 0)return!1;const n=typeof e;
48return n==="string"||n==="number"||n==="boolean"||n===null?!0:n!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Yo(e){try{return JSON.parse(e)}catch{return e}}function Xo(e){return typeof e=="function"}function Ph(e){if(e!=null&&e.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Xo(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Xo(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function Uh(e){const n=new Headers(e==null?void 0:e.headers),r=await zh(e);for(const[o,t]of Object.entries(r||{}))n.set(o,t);if(!n.has("content-type")){const o=Ch(e==null?void 0:e.body);o&&n.set("content-type",o)}return n}function Ch(e){return ts(e)?"application/json":null}function Rh(e){if(!(e!=null&&e.body))return null;const n=new Headers(e==null?void 0:e.headers);if(ts(e.body)&&!n.has("content-type")){for(const[r,o]of Object.entries(e==null?void 0:e.body))o instanceof Date&&(e.body[r]=o.toISOString());return JSON.stringify(e.body)}return e.body}function Ah(e,n){var r;if(n!=null&&n.method)return n.method.toUpperCase();if(e.startsWith("@")){const o=(r=e.split("@")[1])==null?void 0:r.split("/")[0];return rs.includes(o)?o.toUpperCase():n!=null&&n.body?"POST":"GET"}return n!=null&&n.body?"POST":"GET"}function Dh(e,n){let r;return!(e!=null&&e.signal)&&(e!=null&&e.timeout)&&(r=setTimeout(()=>n==null?void 0:n.abort(),e==null?void 0:e.timeout)),{abortTimeout:r,clearTimeout:()=>{r&&clearTimeout(r)}}}
48var Lh=class ns extends Error{constructor(n,r){super(r||JSON.stringify(n,null,2)),this.issues=n,Object.setPrototypeOf(this,ns.prototype)}};async function Nn(e,n){let r=await e["~standard"].validate(n);if(r.issues)throw new Lh(r.issues);return r.value}var rs=["get","post","put","patch","delete"],Zh=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(n,r){var o,t,i,a;const s=((t=(o=e.plugins)==null?void 0:o.find(c=>{var u;return(u=c.schema)!=null&&u.config?n.startsWith(c.schema.config.baseURL||"")||n.startsWith(c.schema.config.prefix||""):!1}))==null?void 0:t.schema)||e.schema;if(s){let c=n;(i=s.config)!=null&&i.prefix&&c.startsWith(s.config.prefix)&&(c=c.replace(s.config.prefix,""),s.config.baseURL&&(n=n.replace(s.config.prefix,s.config.baseURL))),(a=s.config)!=null&&a.baseURL&&c.startsWith(s.config.baseURL)&&(c=c.replace(s.config.baseURL,""));const u=s.schema[c];if(u){let d=De(ze({},r),{method:u.method,output:u.output});return r!=null&&r.disableValidation||(d=De(ze({},d),{body:u.input?await Nn(u.input,r==null?void 0:r.body):r==null?void 0:r.body,params:u.params?await Nn(u.params,r==null?void 0:r.params):r==null?void 0:r.params,query:u.query?await Nn(u.query,r==null?void 0:r.query):r==null?void 0:r.query})),{url:n,options:d}}}return{url:n,options:r}}}),Mh=e=>{async function n(r,o){const t=De(ze(ze({},e),o),{plugins:[...(e==null?void 0:e.plugins)||[],Zh(e||{})]});if(e!=null&&e.catchAllError)try{return await zr(r,t)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await zr(r,t)}return n};function Fh(e,n){let{baseURL:r,params:o,query:t}=n||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"";if(e.startsWith("@")){const h=e.toString().split("@")[1].split("/")[0];rs.includes(h)&&(e=e.replace(`@${h}/`,"/"))}i.endsWith("/")||(i+="/");let[a,s]=e.replace(i,"").split("?");const c=new URLSearchParams(s);for(const[h,g]of Object.entries(t||{}))g!=null&&c.set(h,String(g));if(o)if(Array.isArray(o)){const h=a.split("/").filter(g=>g.startsWith(":"));for(const[g,f]of h.entries()){const b=o[g];a=a.replace(f,b)}}else for(const[h,g]of Object.entries(o))a=a.replace(`:${h}`,String(g));a=a.split("/").map(encodeURIComponent).join("/"),a.startsWith("/")&&(a=a.slice(1));let u=c.toString();return u=u.length>0?`?${u}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${a}${u}`,i):`${i}${a}${u}`}var zr=async(e,n)=>{var r,o,t,i,a,s,c,u;const{hooks:d,url:h,options:g}=await Ih(e,n),f=Ph(g),b=new AbortController,_=(r=g.signal)!=null?r:b.signal,p=Fh(h,g),v=Rh(g),$=await Uh(g),x=Ah(h,g);let S=De(ze({},g),{url:p,headers:$,body:v,method:x,signal:_});for(const F of d.onRequest)if(F){const M=await F(S);M instanceof Object&&(S=M)}("pipeTo"in S&&typeof S.pipeTo=="function"||typeof((o=n==null?void 0:n.body)==null?void 0:o.pipe)=="function")&&("duplex"in S||(S.duplex="half"));const{clearTimeout:w}=Dh(g,b);let I=await f(S.url,S);w();const E={response:I,request:S};for(const F of d.onResponse)if(F){const M=await F(De(ze({},E),{response:(t=n==null?void 0:n.hookOptions)!=null&&t.cloneResponse?I.clone():I}));M instanceof Response?I=M:M instanceof Object&&(I=M.response)}if(I.ok){if(!(S.method!=="HEAD"))return{data:"",error:null};const M=Eh(I),Y={data:"",response:I,request:S};if(M==="json"||M==="text"){const H=await I.text(),ne=await((i=S.jsonParser)!=null?i:Yo)(H);Y.data=ne}else Y.data=await I[M]();S!=null&&S.output&&S.output&&!S.disableValidation&&(Y.data=await Nn(S.output,Y.data));for(const H of d.onSuccess)H&&await H(De(ze({},Y),{response:(a=n==null?void 0:n.hookOptions)!=null&&a.cloneResponse?I.clone():I}));return n!=null&&n.throw?Y.data:{data:Y.data,error:null}}const A=(s=n==null?void 0:n.jsonParser)!=null?s:Yo,Z=await I.text(),K=Th(Z),z=K?await A(Z):null,ae={response:I,responseText:Z,request:S,error:De(ze({},z),{status:I.status,statusText:I.statusText})};for(const F of d.onError)F&&await F(De(ze({},ae),{response:(c=n==null?void 0:n.hookOptions)!=null&&c.cloneResponse?I.clone():I}));if(n!=null&&n.retry){const F=Nh(n.retry),M=(u=n.retryAttempt)!=null?u:0;if(await F.shouldAttemptRetry(M,I)){for(const H of d.onRetry)H&&await H(E);const Y=F.getDelay(M);return await new Promise(H=>setTimeout(H,Y)),await zr(e,De(ze({},n),{retryAttempt:M+1}))}}if(n!=null&&n.throw)throw new Sh(I.status,I.statusText,K?z:Z);return{data:null,error:De(ze({},z),{status:I.status,statusText:I.statusText})}};const hr=Symbol.for("better-auth:broadcast-channel"),Bh=()=>Math.floor(Date.now()/1e3);var Jh=class{constructor(e="better-auth.message"){he(this,"listeners",new Set);he(this,"name");this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Bh()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=n=>{if(n.key!==this.name)return;const r=JSON.parse(n.newValue??"{}");(r==null?void 0:r.event)!=="session"||!(r!=null&&r.data)||this.listeners.forEac
48h(o=>o(r))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function St(e="better-auth.message"){return globalThis[hr]||(globalThis[hr]=new Jh(e)),globalThis[hr]}const pr=Symbol.for("better-auth:focus-manager");var Gh=class{constructor(){he(this,"listeners",new Set)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(n=>n(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function Qo(){return globalThis[pr]||(globalThis[pr]=new Gh),globalThis[pr]}const gr=Symbol.for("better-auth:online-manager");var Wh=class{constructor(){he(this,"listeners",new Set);he(this,"isOnline",typeof navigator<"u"?navigator.onLine:!0)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(n=>n(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),n=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",n,!1)}}};function vr(){return globalThis[gr]||(globalThis[gr]=new Wh),globalThis[gr]}const Vh=()=>typeof window>"u",Ft=(e,n,r,o)=>{const t=kt({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s=>i(s)}),i=async s=>new Promise(c=>{const u=typeof o=="function"?o({data:t.get().data,error:t.get().error,isPending:t.get().isPending}):o;r(n,{...u,query:{...u==null?void 0:u.query,...s==null?void 0:s.query},async onSuccess(d){var h;t.set({data:d.data,error:null,isPending:!1,isRefetching:!1,refetch:t.value.refetch}),await((h=u==null?void 0:u.onSuccess)==null?void 0:h.call(u,d))},async onError(d){var b,_;const{request:h}=d,g=typeof h.retry=="number"?h.retry:(b=h.retry)==null?void 0:b.attempts,f=h.retryAttempt||0;g&&f<g||(t.set({error:d.error,data:null,isPending:!1,isRefetching:!1,refetch:t.value.refetch}),await((_=u==null?void 0:u.onError)==null?void 0:_.call(u,d)))},async onRequest(d){var g;const h=t.get();t.set({isPending:h.data===null,data:h.data,error:null,isRefetching:!0,refetch:t.value.refetch}),await((g=u==null?void 0:u.onRequest)==null?void 0:g.call(u,d))}}).catch(d=>{t.set({error:d,data:null,isPending:!1,isRefetching:!1,refetch:t.value.refetch})}).finally(()=>{c(void 0)})});e=Array.isArray(e)?e:[e];let a=!1;for(const s of e)s.subscribe(async()=>{Vh()||(a?await i():es(t,()=>{const c=setTimeout(async()=>{a||(await i(),a=!0)},0);return()=>{t.off(),s.off(),clearTimeout(c)}}))});return t},_t=()=>Math.floor(Date.now()/1e3),Hh=5;function qh(e){var $,x,S;const{sessionAtom:n,sessionSignal:r,$fetch:o,options:t={}}=e,i=(($=t.sessionOptions)==null?void 0:$.refetchInterval)??0,a=((x=t.sessionOptions)==null?void 0:x.refetchOnWindowFocus)??!0,s=((S=t.sessionOptions)==null?void 0:S.refetchWhenOffline)??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},u=()=>s||vr().isOnline,d=w=>{if(!u())return;if((w==null?void 0:w.event)==="storage"){c.lastSync=_t(),r.set(!r.get());return}const I=n.get();if((w==null?void 0:w.event)==="poll"){c.lastSessionRequest=_t(),o("/get-session").then(E=>{n.set({...I,data:E.data,error:E.error||null}),c.lastSync=_t(),r.set(!r.get())}).catch(()=>{});return}(w==null?void 0:w.event)==="visibilitychange"&&_t()-c.lastSessionRequest<Hh&&(I==null?void 0:I.data)!==null&&(I==null?void 0:I.data)!==void 0||((I==null?void 0:I.data)===null||(I==null?void 0:I.data)===void 0||(w==null?void 0:w.event)==="visibilitychange")&&((w==null?void 0:w.event)==="visibilitychange"&&(c.lastSessionRequest=_t()),c.lastSync=_t(),r.set(!r.get()))},h=w=>{St().post({event:"session",data:{trigger:w},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(c.pollInterval=setInterval(()=>{var w;(w=n.get())!=null&&w.data&&d({event:"poll"})},i*1e3))},f=()=>{c.unsubscribeBroadcast=St().subscribe(()=>{d({event:"storage"})})},b=()=>{a&&(c.unsubscribeFocus=Qo().subscribe(()=>{d({event:"visibilitychange"})}))},_=()=>{c.unsubscribeOnline=vr().subscribe(w=>{w&&d({event:"visibilitychange"})})};return{init:()=>{g(),f(),b(),_(),St().setup(),Qo().setup(),vr().setup()},cleanup:()=>{c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:d,broadcastSessionUpdate:h}}const Kh={id:"redirect",name:"Redirect",hooks:{onSuccess(e){var n,r;if((n=e.data)!=null&&n.url&&((r=e.data)!=null&&r.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Yh(e,n){const r=kt(!1),o=Ft(r,"/get-session",e,{method:"GET"});return es(o,()=>{const t=qh({sessionAtom:o,sessionSignal:r,$fetch:e,options:n});return t.init(),()=>{t.cleanup()}}),{session:o,$sessionSignal:r}}const is=(e,n)=>{var S,w,I,E,A,Z,K;const r="credentials"in Request.prototype,o=ch(e==null?void 0:e.baseURL,e==null?void 0:e.basePath)??"/api/auth",t=((S=e
48==null?void 0:e.plugins)==null?void 0:S.flatMap(z=>z.fetchPlugins).filter(z=>z!==void 0))||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(w=e==null?void 0:e.fetchOptions)==null?void 0:w.onSuccess,onError:(I=e==null?void 0:e.fetchOptions)==null?void 0:I.onError,onRequest:(E=e==null?void 0:e.fetchOptions)==null?void 0:E.onRequest,onResponse:(A=e==null?void 0:e.fetchOptions)==null?void 0:A.onResponse}},{onSuccess:a,onError:s,onRequest:c,onResponse:u,...d}=(e==null?void 0:e.fetchOptions)||{},h=Mh({baseURL:o,...r?{credentials:"include"}:{},method:"GET",jsonParser(z){return z?ph(z,{strict:!1}):null},customFetchImpl:fetch,...d,plugins:[i,...d.plugins||[],...e!=null&&e.disableDefaultFetchPlugins?[]:[Kh],...t]}),{$sessionSignal:g,session:f}=Yh(h,e),b=(e==null?void 0:e.plugins)||[];let _={},p={$sessionSignal:g,session:f},v={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const $=[{signal:"$sessionSignal",matcher(z){return z==="/sign-out"||z==="/update-user"||z==="/sign-up/email"||z==="/sign-in/email"||z==="/delete-user"||z==="/verify-email"||z==="/revoke-sessions"||z==="/revoke-session"||z==="/change-email"}}];for(const z of b)z.getAtoms&&Object.assign(p,(Z=z.getAtoms)==null?void 0:Z.call(z,h)),z.pathMethods&&Object.assign(v,z.pathMethods),z.atomListeners&&$.push(...z.atomListeners);const x={notify:z=>{p[z].set(!p[z].get())},listen:(z,ae)=>{p[z].subscribe(ae)},atoms:p};for(const z of b)z.getActions&&Object.assign(_,(K=z.getActions)==null?void 0:K.call(z,h,x,e));return{get baseURL(){return o},pluginsActions:_,pluginsAtoms:p,pluginPathMethods:v,atomListeners:$,$fetch:h,$store:x}};function Xh(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Qh(e,n,r){const o=n[e],{fetchOptions:t,query:i,...a}=r||{};return o||(t!=null&&t.method?t.method:a&&Object.keys(a).length>0?"POST":"GET")}function os(e,n,r,o,t){function i(a=[]){return new Proxy(function(){},{get(s,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const u=[...a,c];let d=e;for(const h of u)if(d&&typeof d=="object"&&h in d)d=d[h];else{d=void 0;break}return typeof d=="function"||Xh(d)?d:i(u)},apply:async(s,c,u)=>{const d="/"+a.map($=>$.replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`)).join("/"),h=u[0]||{},g=u[1]||{},{query:f,fetchOptions:b,..._}=h,p={...g,...b},v=Qh(d,r,h);return await n(d,{...p,body:v==="GET"?void 0:{..._,...(p==null?void 0:p.body)||{}}
48,query:f||(p==null?void 0:p.query),method:v,async onSuccess($){var S;if(await((S=p==null?void 0:p.onSuccess)==null?void 0:S.call(p,$)),!t||p.disableSignal)return;const x=t.filter(w=>w.matcher(d));if(x.length)for(const w of x){const I=o[w.signal];if(!I)return;const E=I.get();setTimeout(()=>{I.set(!E)},10)}}})}})}return i()}function ep(e){const{pluginPathMethods:n,pluginsActions:r,pluginsAtoms:o,$fetch:t,atomListeners:i,$store:a}=is(e);let s={};for(const[c,u]of Object.entries(o))s[`use${Qa(c)}`]=u;return os({...r,...s,$fetch:t,$store:a},t,n,o,i)}function tp(e){return{authorize(n,r="AND"){let o=!1;for(const[t,i]of Object.entries(n)){const a=e[t];if(!a)return{success:!1,error:`You are not allowed to access resource: ${t}`};if(Array.isArray(i))o=i.every(s=>a.includes(s));else if(typeof i=="object"){const s=i;s.connector==="OR"?o=s.actions.some(c=>a.includes(c)):o=s.actions.every(c=>a.includes(c))}else throw new Gt("Invalid access control request");if(o&&r==="OR")return{success:o};if(!o&&r==="AND")return{success:!1,error:`unauthorized to access resource "${t}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:e}}function as(e){return{newRole(n){return tp(n)},statements:e}}const np={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},ss=as(np),cs=ss.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),ls=ss.newRole({user:[],session:[]}),rp={admin:cs,user:ls},ip=e=>{var o,t,i,a,s,c;if(e.userId&&((t=(o=e.options)==null?void 0:o.adminUserIds)!=null&&t.includes(e.userId)))return!0;if(!e.permissions&&!e.permission)return!1;const n=(e.role||((i=e.options)==null?void 0:i.defaultRole)||"user").split(","),r=((a=e.options)==null?void 0:a.roles)||rp;for(const u of n)if((c=(s=r[u])==null?void 0:s.authorize(e.permission??e.permissions))!=null&&c.success)return!0;return!1},op={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Jr=as(op),us=Jr.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ds=Jr.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ms=Jr.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),ap={admin:us,owner:ds,member:ms},sp=(e,n)=>{var a,s;if(!e.permissions&&!e.permission)return!1;const r=e.role.split(","),o=e.options.creatorRole||"owner",t=r.includes(o),i=e.allowCreatorAllPermissions||!1;if(t&&i)return!0;for(const c of r)if((s=(a=n[c])==null?void 0:a.authorize(e.permissions??e.permission))!=null&&s.success)return!0;return!1},cp=e=>{const n={admin:cs,user:ls,...e==null?void 0:e.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:r=>ip({role:r.role,options:{ac:e==null?void 0:e.ac,roles:n},permissions:r.permissions??r.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},lp=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),up=e=>{var r;const n=((r=e==null?void 0:e.jwks)==null?void 0:r.jwksPath)??"/jwks";return{id:"better-auth-client",$InferServerPlugin:{},pathMethods:{[n]:"GET"},getActions:o=>({jwks:async t=>await o(n,{method:"GET",...t})})}},dp=e=>sp(e,e.options.roles||ap),mp=e=>{const n=kt(!1),r=kt(!1),o=kt(!1),t=kt(!1),i={admin:us,member:ms,owner:ds,...e==null?void 0:e.roles};return{id:"organization",$InferServerPlugin:{},getActions:(a,s,c)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:u=>dp({role:u.role,options:{ac:e==null?void 0:e.ac,roles:i},permissions:u.permissions??u.permission})}}),getAtoms:a=>{const s=Ft(n,"/organization/list",a,{method:"GET"});return{$listOrg:n,$activeOrgSignal:r,$activeMemberSignal:o,$activeMemberRoleSignal:t,activeOrganization:Ft([r],"/organization/get-full-organization",a,()=>({method:"GET"})),listOrganizations:s,activeMember:Ft([o],"/organization/get-active-member",a,{method:"GET"}),activeMemberRole:Ft([t],"/organization/get-active-member-role",a,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(a){return a==="/organization/create"||a==="/organization/delete"||a==="/organization/update"},signal:"$listOrg"},{matcher(a){return a.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(a){return a.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(a){return a.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(a){return a.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},fs=Object.freeze({status:"aborted"});function y(e,n,r){function o(s,c){var u;
vendor: 51,597 bytes, lines 48-68
48Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(u=s._zod).traits??(u.traits=new Set),s._zod.traits.add(e),n(s,c);for(const d in a.prototype)d in s||Object.defineProperty(s,d,{value:a.prototype[d].bind(s)});s._zod.constr=a,s._zod.def=c}const t=(r==null?void 0:r.Parent)??Object;class i extends t{}Object.defineProperty(i,"name",{value:e});function a(s){var c;const u=r!=null&&r.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>{var c,u;return r!=null&&r.Parent&&s instanceof r.Parent?!0:(u=(c=s==null?void 0:s._zod)==null?void 0:c.traits)==null?void 0:u.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const hs=Symbol("zod_brand");class dt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Jn extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const En={};function pe(e){return e&&Object.assign(En,e),En}function fp(e){return e}function hp(e){return e}function pp(e){}function gp(e){throw new Error}function vp(e){}function Gr(e){const n=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,t])=>n.indexOf(+o)===-1).map(([o,t])=>t)}function N(e,n="|"){return e.map(r=>T(r)).join(n)}function Tn(e,n){return typeof n=="bigint"?n.toString():n}function Qt(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function bt(e){return e==null}function Gn(e){const n=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(n,r)}function ps(e,n){const r=(e.toString().split(".")[1]||"").length,o=n.toString();let t=(o.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(o)){const c=o.match(/\d?e-(\d?)/);c!=null&&c[1]&&(t=Number.parseInt(c[1]))}const i=r>t?r:t,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(n.toFixed(i).replace(".",""));return a%s/10**i}const ea=Symbol("evaluating");function D(e,n,r){let o;Object.defineProperty(e,n,{get(){if(o!==ea)return o===void 0&&(o=ea,o=r()),o},set(t){Object.defineProperty(e,n,{value:t})},configurable:!0})}function bp(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function it(e,n,r){Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})}function qe(...e){const n={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(n,o)}return Object.defineProperties({},n)}function yp(e){return qe(e._zod.def)}function xp(e,n){return n?n.reduce((r,o)=>r==null?void 0:r[o],e):e}function _p(e){const n=Object.keys(e),r=n.map(o=>e[o]);return Promise.all(r).then(o=>{const t={};for(let i=0;i<n.length;i++)t[n[i]]=o[i];return t})}function $p(e=10){const n="abcdefghijklmnopqrstuvwxyz";let r="";for(let o=0;o<e;o++)r+=n[Math.floor(Math.random()*n.length)];return r}function Or(e){return JSON.stringify(e)}const Wr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gs=Qt(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function mt(e){if(jt(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(jt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Wn(e){return mt(e)?{...e}:Array.isArray(e)?[...e]:e}function wp(e){let n=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&n++;return n}const kp=e=>{const n=typeof e;switch(n){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${n}`)}},Pn=new Set(["string","number","symbol"]),vs=new Set(["string","number","bigint","boolean","symbol","undefined"]);function rt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ie(e,n,r){const o=new e._zod.constr(n??e._zod.def);return(!n||r!=null&&r.parent)&&(o._zod.parent=e),o}function k(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Sp(e){let n;return new Proxy({},{get(r,o,t){return n??(n=e()),Reflect.get(n,o,t)},set(r,o,t,i){return n??(n=e()),Reflect.set(n,o,t,i)},has(r,o){return n??(n=e()),Reflect.has(n,o)},deleteProperty(r,o){return n??(n=e()),Reflect.deleteProperty(n,o)},ownKeys(r){return n??(n=e()),Reflect.ownKeys(n)},getOwnPropertyDescriptor(r,o){return n??(n=e()),Reflect.getOwnPropertyDescriptor(n,o)},defineProperty(r,o,t){return n??(n=e()),Reflect.defineProperty(n,o,t)}})}function T(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function bs(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const ys={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xs={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function _s(e,n){const r=e._zod.def,o=qe(e._zod.def,{get shape(){const t={};for(const i in n){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(t[i]=r.shape[i])}return it(this,"shape",t),t},checks:[]});return Ie(e,o)}function $s(e,n){const r=e._zod.def,o=qe(e._zod.def,{get shape(){const t={...e._zod.def.shape};for(const i in n){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);n[i]&&delete t[i]}return it(this,"shape",t),t},checks:[]});return Ie(e,o)}function ws(e,n){if(!mt(n))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const t=qe(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n};return it(this,"shape",i),i},checks:[]});return Ie(e,t)}function ks(e,n){if(!mt(n))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const o={...e._zod.def.shape,...n};return it(this,"shape",o),o},checks:e._zod.def.checks};return Ie(e,r)}function Ss(e,n){const r=qe(e._zod.def,{get shape(){const o={...e._zod.def.shape,...n._zod.def.shape};return it(this,"shape",o),o},get catchall(){return n._zod.def.catchall},checks:[]});return Ie(e,r)}function Is(e,n,r){const o=qe(n._zod.def,{get shape(){const t=n._zod.def.shape,i={...t};if(r)for(const a in r){if(!(a in t))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=e?new e({type:"optional",innerType:t[a]}):t[a])}else for(const a in t)i[a]=e?new e({type:"optional",innerType:t[a]}):t[a];return it(this,"shape",i),i},checks:[]});return Ie(n,o)}function js(e,n,r){const o=qe(n._zod.def,{get shape(){const t=n._zod.def.shape,i={...t};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:t[a]}))}else for(const a in t)i[a]=new e({type:"nonoptional",innerType:t[a]});return it(this,"shape",i),i},checks:[]});return Ie(n,o)}function lt(e,n=0){var r;if(e.aborted===!0)return!0;for(let o=n;o<e.issues.length;o++)if(((r=e.issues[o])==null?void 0:r.continue)!==!0)return!0;return!1}function Oe(e,n){return n.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Bt(e){return typeof e=="string"?e:e==null?void 0:e.message}function Pe(e,n,r){var t,i,a,s,c,u;const o={...e,path:e.path??[]};if(!e.message){const d=Bt((a=(i=(t=e.inst)==null?void 0:t._zod.def)==null?void 0:i.error)==null?void 0:a.call(i,e))??Bt((s=n==null?void 0:n.error)==null?void 0:s.call(n,e))??Bt((c=r.customError)==null?void 0:c.call(r,e))??Bt((u=r.localeError)==null?void 0:u.call(r,e))??"Invalid input";o.message=d}return delete o.inst,delete o.continue,n!=null&&n.reportInput||delete o.input,o}function Vn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Hn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nt(...e){const[n,r,o]=e;return typeof n=="string"?{message:n,code:"custom",input:r,inst:o}:{...n}}function Ip(e){return Object.entries(e).filter(([n,r])=>Number.isNaN(Number.parseInt(n,10))).map(n=>n[1])}function Ns(e){const n=atob(e),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}function zs(e){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}function jp(e){const n=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-n.length%4)%4);return Ns(n+r)}function Np(e){return zs(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function zp(e){const n=e.replace(/^0x/,"");if(n.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(n.length/2);for(let o=0;o<n.length;o+=2)r[o/2]=Number.parseInt(n.slice(o,o+2),16);return r}function Op(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}class Ep{constructor(...n){}}const Os=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:xs,Class:Ep,NUMBER_FORMAT_RANGES:ys,aborted:lt,allowsEval:gs,assert:vp,assertEqual:fp,assertIs:pp,assertNever:gp,assertNotEqual:hp,assignProp:it,base64ToUint8Array:Ns,base64urlToUint8Array:jp,cached:Qt,captureStackTrace:Wr,cleanEnum:Ip,cleanRegex:Gn,clone:Ie,cloneDef:yp,createTransparentProxy:Sp,defineLazy:D,esc:Or,escapeRegex:rt,extend:ws,finalizeIssue:Pe,floatSafeRemainder:ps,getElementAtPath:xp,getEnumValues:Gr,getLengthableOrigin:Hn,getParsedType:kp,getSizableOrigin:Vn,hexToUint8Array:zp,isObject:jt,isPlainObject:mt,issue:Nt,joinValues:N,jsonStringifyReplacer:Tn,merge:Ss,mergeDefs:qe,normalizeParams:k,nullish:bt,numKeys:wp,objectClone:bp,omit:$s,optionalKeys:bs,partial:Is,pick:_s,prefixIssues:Oe,primitiveTypes:vs,promiseAllObject:_p,propertyKeyTypes:Pn,randomString:$p,required:js,safeExtend:ks,shallowClone:Wn,stringifyPrimitive:T,uint8ArrayToBase64:zs,uint8ArrayToBase64url:Np,uint8ArrayToHex:Op,unwrapMessage:Bt},Symbol.toStringTag,{value:"Module"})),Es=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,Tn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Vr=y("$ZodError",Es),_e=y("$ZodError",Es,{Parent:Error});function Hr(e,n=r=>r.message){const r={},o=[];for(const t of e.issues)t.path.length>0?(r[t.path[0]]=r[t.path[0]]||[],r[t.path[0]].push(n(t))):o.push(n(t));return{formErrors:o,fieldErrors:r}}function qr(e,n=r=>r.message){const r={_errors:[]},o=t=>{for(const i of t.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(n(i));else{let a=r,s=0;for(;s<i.path.length;){const c=i.path[s];s===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return o(e),r}function Ts(e,n=r=>r.message){const r={errors:[]},o=(t,i=[])=>{var a,s;for(const c of t.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else{const u=[...i,...c.path];if(u.length===0){r.errors.push(n(c));continue}let d=r,h=0;for(;h<u.length;){const g=u[h],f=h===u.length-1;typeof g=="string"?(d.properties??(d.properties={}),(a=d.properties)[g]??(a[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(s=d.items)[g]??(s[g]={errors:[]}),d=d.items[g]),f&&d.errors.push(n(c)),h++}}};return o(e),r}function Ps(e){const n=[],r=e.map(o=>typeof o=="object"?o.key:o);for(const o of r)typeof o=="number"?n.push(`[${o}]`):typeof o=="symbol"?n.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?n.push(`[${JSON.stringify(o)}]`):(n.length&&n.push("."),n.push(o));return n.join("")}function Us(e){var o;const n=[],r=[...e.issues].sort((t,i)=>(t.path??[]).length-(i.path??[]).length);for(const t of r)n.push(`â ${t.message}`),(o=t.path)!=null&&o.length&&n.push(` â at ${Ps(t.path)}`);return n.join(` 49`)}const en=e=>(n,r,o,t)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new dt;if(a.issues.length){const s=new((t==null?void 0:t.Err)??e)(a.issues.map(c=>Pe(c,i,pe())));throw Wr(s,t==null?void 0:t.callee),s}return a.value},Er=en(_e),tn=e=>async(n,r,o,t)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new((t==null?void 0:t.Err)??e)(a.issues.map(c=>Pe(c,i,pe())));throw Wr(s,t==null?void 0:t.callee),s}return a.value},Tr=tn(_e),nn=e=>(n,r,o)=>{const t=o?{...o,async:!1}:{async:!1},i=n._zod.run({value:r,issues:[]},t);if(i instanceof Promise)throw new dt;return i.issues.length?{success:!1,error:new(e??Vr)(i.issues.map(a=>Pe(a,t,pe())))}:{success:!0,data:i.value}},Cs=nn(_e),rn=e=>async(n,r,o)=>{const t=o?Object.assign(o,{async:!0}):{async:!0};let i=n._zod.run({value:r,issues:[]},t);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Pe(a,t,pe())))}:{success:!0,data:i.value}},Rs=rn(_e),Kr=e=>(n,r,o)=>{const t=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return en(e)(n,r,t)},Tp=Kr(_e),Yr=e=>(n,r,o)=>en(e)(n,r,o),Pp=Yr(_e),Xr=e=>async(n,r,o)=>{const t=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return tn(e)(n,r,t)},Up=Xr(_e),Qr=e=>async(n,r,o)=>tn(e)(n,r,o),Cp=Qr(_e),ei=e=>(n,r,o)=>{const t=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return nn(e)(n,r,t)},Rp=ei(_e),ti=e=>(n,r,o)=>nn(e)(n,r,o),Ap=ti(_e),ni=e=>async(n,r,o)=>{const t=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return rn(e)(n,r,t)},Dp=ni(_e),ri=e=>async(n,r,o)=>rn(e)(n,r,o),Lp=ri(_e),As=/^[cC][^\s-]{8,}$/,Ds=/^[0-9a-z]+$/,Ls=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zs=/^[0-9a-vA-V]{20}$/,Ms=/^[A-Za-z0-9]{27}$/,Fs=/^[a-zA-Z0-9_-]{21}$/,Bs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Js=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,zt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Mp=zt(4),Fp=zt(6),Bp=zt(7),Gs=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Gp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ws=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Wp=Ws,Vp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Hp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vs(){return new RegExp(Hp,"u")}const Hs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ks=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ys=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xs=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ii=/^[A-Za-z0-9_-]*$/,oi=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Qs=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ec=/^\+(?:[0-9]){6,14}[0-9]$/,tc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",nc=new RegExp(`^${tc}$`);function rc(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ic(e){return new RegExp(`^${rc(e)}$`)}function oc(e){const n=rc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${n}(?:${r.join("|")})`;return new RegExp(`^${tc}T(?:${o})$`)}const ac=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},sc=/^-?\d+n?$/,cc=/^-?\d+$/,lc=/^-?\d+(?:\.\d+)?/,uc=/^(?:true|false)$/i,dc=/^null$/i,mc=/^undefined$/i,fc=/^[^A-Z]*$/,hc=/^[^a-z]*$/,pc=/^[0-9a-fA-F]*$/;function on(e,n){return new RegExp(`^[A-Za-z0-9+/]{${e}}${n}$`)}function an(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const qp=/^[0-9a-fA-F]{32}$/,Kp=on(22,"=="),Yp=an(22),Xp=/^[0-9a-fA-F]{40}$/,Qp=on(27,"="),eg=an(27),tg=/^[0-9a-fA-F]{64}$/,ng=on(43,"="),rg=an(43),ig=/^[0-9a-fA-F]{96}$/,og=on(64,""),ag=an(64),sg=/^[0-9a-fA-F]{128}$/,cg=on(86,"=="),lg=an(86),ai=Object.freeze(Object.defineProperty({__proto__:null,base64:Xs,base64url:ii,bigint:sc,boolean:uc,browserEmail:Vp,cidrv4:Ks,cidrv6:Ys,cuid:As,cuid2:Ds,date:nc,datetime:oc,domain:Qs,duration:Bs,e164:ec,email:Gs,emoji:Vs,extendedDuration:Zp,guid:Js,hex:pc,hostname:oi,html5Email:Jp,idnEmail:Wp,integer:cc,ipv4:Hs,ipv6:qs,ksuid:Ms,lowercase:fc,md5_base64:Kp,md5_base64url:Yp,md5_hex:qp,nanoid:Fs,null:dc,number:lc,rfc5322Email:Gp,sha1_base64:Qp,sha1_base64url:eg,sha1_hex:Xp,sha256_base64:ng,sha256_base64url:rg,sha256_hex:tg,sha384_base64:og,sha384_base64url:ag,sha384_hex:ig,sha512_base64:cg,sha512_base64url:lg,sha512_hex:sg,string:ac,time:ic,ulid:Ls,undefined:mc,unicodeEmail:Ws,uppercase:hc,uuid:zt,uuid4:Mp,uuid6:Fp,uuid7:Bp,xid:Zs},Symbol.toStringTag,{value:"Module"})),Q=y("$ZodCheck",(e,n)=>{var r;e._zod??(e._zod={}),e._zod.def=n,(r=e._zod).onattach??(r.onattach=[])}),gc={number:"number",bigint:"bigint",object:"date"},si=y("$ZodCheckLessThan",(e,n)=>{Q.init(e,n);const r=gc[typeof n.value];e._zod.onattach.push(o=>{const t=o._zod.bag,i=(n.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<i&&(n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value)}),e._zod.check=o=>{(n.inclusive?o.value<=n.value:o.value<n.value)||o.issues.push({origin:r,code:"too_big",maximum:n.value,input:o.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),ci=y("$ZodCheckGreaterThan",(e,n)=>{Q.init(e,n);const r=gc[typeof n.value];e._zod.onattach.push(o=>{const t=o._zod.bag,i=(n.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>i&&(n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value)}),e._zod.check=o=>{(n.inclusive?o.value>=n.value:o.value>n.value)||o.issues.push({origin:r,code:"too_small",minimum:n.value,input:o.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),vc=y("$ZodCheckMultipleOf",(e,n)=>{Q.init(e,n),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=n.value)}),e._zod.check=r=>{if(typeof r.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%n.value===BigInt(0):ps(r.value,n.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:n.value,input:r.value,inst:e,continue:!n.abort})}}),bc=y("$ZodCheckNumberFormat",(e,n)=>{var a;Q.init(e,n),n.format=n.format||"float64";const r=(a=n.format)==null?void 0:a.includes("int"),o=r?"int":"number",[t,i]=ys[n.format];e._zod.onattach.push(s=>{const c=s._zod.bag;c.format=n.format,c.minimum=t,c.maximum=i,r&&(c.pattern=cc)}),e._zod.check=s=>{const c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:n.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!n.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!n.abort});return}}c<t&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!n.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:e})}}),yc=y("$ZodCheckBigIntFormat",(e,n)=>{Q.init(e,n);const[r,o]=xs[n.format];e._zod.onattach.push(t=>{const i=t._zod.bag;i.format=n.format,i.minimum=r,i.maximum=o}),e._zod.check=t=>{const i=t.value;i<r&&t.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!n.abort}),i>o&&t.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),xc=y("$ZodCheckMaxSize",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<t&&(o._zod.bag.maximum=n.maximum)}),e._zod.check=o=>{const t=o.value;t.size<=n.maximum||o.issues.push({origin:Vn(t),code:"too_big",maximum:n.maximum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),_c=y("$ZodCheckMinSize",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>t&&(o._zod.bag.minimum=n.minimum)}),e._zod.check=o=>{const t=o.value;t.size>=n.minimum||o.issues.push({origin:Vn(t),code:"too_small",minimum:n.minimum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),$c=y("$ZodCheckSizeEquals",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag;t.minimum=n.size,t.maximum=n.size,t.size=n.size}),e._zod.check=o=>{const t=o.value,i=t.size;if(i===n.size)return;const a=i>n.size;o.issues.push({origin:Vn(t),...a?{code:"too_big",maximum:n.size}:{code:"too_small",minimum:n.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!n.abort})}}),wc=y("$ZodCheckMaxLength",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<t&&(o._zod.bag.maximum=n.maximum)}),e._zod.check=o=>{const t=o.value;if(t.length<=n.maximum)return;const a=Hn(t);o.issues.push({origin:a,code:"too_big",maximum:n.maximum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),kc=y("$ZodCheckMinLength",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>t&&(o._zod.bag.minimum=n.minimum)}),e._zod.check=o=>{const t=o.value;if(t.length>=n.minimum)return;const a=Hn(t);o.issues.push({origin:a,code:"too_small",minimum:n.minimum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),Sc=y("$ZodCheckLengthEquals",(e,n)=>{var r;Q.init(e,n),(r=e._zod.def).when??(r.when=o=>{const t=o.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{const t=o._zod.bag;t.minimum=n.length,t.maximum=n.length,t.length=n.length}),e._zod.check=o=>{const t=o.value,i=t.length;if(i===n.length)return;const a=Hn(t),s=i>n.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!n.abort})}}),sn=y("$ZodCheckStringFormat",(e,n)=>{var r,o;Q.init(e,n),e._zod.onattach.push(t=>{const i=t._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(r=e._zod).check??(r.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:n.format,input:t.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ic=y("$ZodCheckRegex",(e,n)=>{sn.init(e,n),e._zod.check=r=>{n.pattern.lastIndex=0,!n.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),jc=y("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=fc),sn.init(e,n)}),Nc=y("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=hc),sn.init(e,n)}),zc=y("$ZodCheckIncludes",(e,n)=>{Q.init(e,n);const r=rt(n.includes),o=new RegExp(typeof n.position=="number"?`^.{${n.position}}${r}`:r);n.pattern=o,e._zod.onattach.push(t=>{const i=t._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=t=>{t.value.includes(n.includes,n.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:t.value,inst:e,continue:!n.abort})}}),Oc=y("$ZodCheckStartsWith",(e,n)=>{Q.init(e,n);const r=new RegExp(`^${rt(n.prefix)}.*`);n.pattern??(n.pattern=r),e._zod.onattach.push(o=>{const t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(n.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:o.value,inst:e,continue:!n.abort})}}),Ec=y("$ZodCheckEndsWith",(e,n)=>{Q.init(e,n);const r=new RegExp(`.*${rt(n.suffix)}$`);n.pattern??(n.pattern=r),e._zod.onattach.push(o=>{const t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(n.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:o.value,inst:e,continue:!n.abort})}});function ta(e,n,r){e.issues.length&&n.issues.push(...Oe(r,e.issues))}const Tc=y("$ZodCheckProperty",(e,n)=>{Q.init(e,n),e._zod.check=r=>{const o=n.schema._zod.run({value:r.value[n.property],issues:[]},{});if(o instanceof Promise)return o.then(t=>ta(t,r,n.property));ta(o,r,n.property)}}),Pc=y("$ZodCheckMimeType",(e,n)=>{Q.init(e,n);const r=new Set(n.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=n.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:n.mime,input:o.value.type,inst:e,continue:!n.abort})}}),Uc=y("$ZodCheckOverwrite",(e,n)=>{Q.init(e,n),e._zod.check=r=>{r.value=n.tx(r.value)}});class Cc{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const o=n.split(` 50`).filter(a=>a),t=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const n=Function,r=this==null?void 0:this.args,t=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new n(...r,t.join(` 51`))}}const Rc={major:4,minor:1,patch:12},C=y("$ZodType",(e,n)=>{var t;var r;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=Rc;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),(t=e._zod.deferred)==null||t.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,c,u)=>{let d=lt(s),h;for(const g of c){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(d)continue;const f=s.issues.length,b=g._zod.check(s);if(b instanceof Promise&&(u==null?void 0:u.async)===!1)throw new dt;if(h||b instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await b,s.issues.length!==f&&(d||(d=lt(s,f)))});else{if(s.issues.length===f)continue;d||(d=lt(s,f))}}return h?h.then(()=>s):s},a=(s,c,u)=>{if(lt(s))return s.aborted=!0,s;const d=i(c,o,u);if(d instanceof Promise){if(u.async===!1)throw new dt;return d.then(h=>e._zod.parse(h,u))}return e._zod.parse(d,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const d=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(h=>a(h,s,c)):a(d,s,c)}const u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new dt;return u.then(d=>i(d,o,c))}return i(u,o,c)}}e["~standard"]={validate:i=>{var a;try{const s=Cs(e,i);return s.success?{value:s.data}:{issues:(a=s.error)==null?void 0:a.issues}}catch{return Rs(e,i).then(c=>{var u;return c.success?{value:c.data}:{issues:(u=c.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}}),cn=y("$ZodString",(e,n)=>{var r;C.init(e,n),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??ac(e._zod.bag),e._zod.parse=(o,t)=>{if(n.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),G=y("$ZodStringFormat",(e,n)=>{sn.init(e,n),cn.init(e,n)}),Ac=y("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Js),G.init(e,n)}),Dc=y("$ZodUUID",(e,n)=>{if(n.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(o===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=zt(o))}else n.pattern??(n.pattern=zt());G.init(e,n)}),Lc=y("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=Gs),G.init(e,n)}),Zc=y("$ZodURL",(e,n)=>{G.init(e,n),e._zod.check=r=>{try{const o=r.value.trim(),t=new URL(o);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(t.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:oi.source,input:r.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:r.value,inst:e,continue:!n.abort})),n.normalize?r.value=t.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!n.abort})}}}),Mc=y("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Vs()),G.init(e,n)}),Fc=y("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Fs),G.init(e,n)}),Bc=y("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=As),G.init(e,n)}),Jc=y("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Ds),G.init(e,n)}),Gc=y("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Ls),G.init(e,n)}),Wc=y("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Zs),G.init(e,n)}),Vc=y("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Ms),G.init(e,n)}),Hc=y("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=oc(n)),G.init(e,n)}),qc=y("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=nc),G.init(e,n)}),Kc=y("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=ic(n)),G.init(e,n)}),Yc=y("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Bs),G.init(e,n)}),Xc=y("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Hs),G.init(e,n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.format="ipv4"})}),Qc=y("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=qs),G.init(e,n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!n.abort})}}}),el=y("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Ks),G.init(e,n)}),tl=y("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Ys),G.init(e,n),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[t,i]=o;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${t}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!n.abort})}}});function li(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const nl=y("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=Xs),G.init(e,n),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{li(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!n.abort})}});function rl(e){if(!ii.test(e))return!1;const n=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=n.padEnd(Math.ceil(n.length/4)*4,"=");return li(r)}const il=y("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=ii),G.init(e,n),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{rl(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!n.abort})}}),ol=y("$ZodE164",(e,n)=>{n.pattern??(n.pattern=ec),G.init(e,n)});function al(e,n=null){try{const r=e.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const t=JSON.parse(atob(o));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||n&&(!("alg"in t)||t.alg!==n))}catch{return!1}}const sl=y("$ZodJWT",(e,n)=>{G.init(e,n),e._zod.check=r=>{al(r.value,n.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!n.abort})}}),cl=y("$ZodCustomStringFormat",(e,n)=>{G.init(e,n),e._zod.check=r=>{n.fn(r.value)||r.issues.push({code:"invalid_format",format:n.format,input:r.value,inst:e,continue:!n.abort})}}),ui=y("$ZodNumber",(e,n)=>{C.init(e,n),e._zod.pattern=e._zod.bag.pattern??lc,e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=Number(r.value)}catch{}const t=r.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return r;const i=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...i?{received:i}:{}}),r}}),ll=y("$ZodNumber",(e,n)=>{bc.init(e,n),ui.init(e,n)}),di=y("$ZodBoolean",(e,n)=>{C.init(e,n),e._zod.pattern=uc,e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=!!r.value}catch{}const t=r.value;return typeof t=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),r}}),mi=y("$ZodBigInt",(e,n)=>{C.init(e,n),e._zod.pattern=sc,e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),ul=y("$ZodBigInt",(e,n)=>{yc.init(e,n),mi.init(e,n)}),dl=y("$ZodSymbol",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;return typeof t=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),r}}),ml=y("$ZodUndefined",(e,n)=>{C.init(e,n),e._zod.pattern=mc,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{const t=r.value;return typeof t>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),r}}),fl=y("$ZodNull",(e,n)=>{C.init(e,n),e._zod.pattern=dc,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{const t=r.value;return t===null||r.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),r}}),hl=y("$ZodAny",(e,n)=>{C.init(e,n),e._zod.parse=r=>r}),pl=y("$ZodUnknown",(e,n)=>{C.init(e,n),e._zod.parse=r=>r}),gl=y("$ZodNever",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),vl=y("$ZodVoid",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;return typeof t>"u"||r.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),r}}),bl=y("$ZodDate",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=new Date(r.value)}catch{}const t=r.value,i=t instanceof Date;return i&&!Number.isNaN(t.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:t,...i?{received:"Invalid Date"}:{},inst:e}),r}});function na(e,n,r){e.issues.length&&n.issues.push(...Oe(r,e.issues)),n.value[r]=e.value}const yl=y("$ZodArray",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!Array.isArray(t))return r.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),r;r.value=Array(t.length);const i=[];for(let a=0;a<t.length;a++){const s=t[a],c=n.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>na(u,r,a))):na(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Un(e,n,r,o){e.issues.length&&n.issues.push(...Oe(r,e.issues)),e.value===void 0?r in o&&(n.value[r]=void 0):n.value[r]=e.value}function xl(e){var o,t,i,a;const n=Object.keys(e.shape);for(const s of n)if(!((a=(i=(t=(o=e.shape)==null?void 0:o[s])==null?void 0:t._zod)==null?void 0:i.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const r=bs(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function _l(e,n,r,o,t,i){const a=[],s=t.keySet,c=t.catchall._zod,u=c.def.type;for(const d of Object.keys(n)){if(s.has(d))continue;if(u==="never"){a.push(d);continue}const h=c.run({value:n[d],issues:[]},o);h instanceof Promise?e.push(h.then(g=>Un(g,r,d,n))):Un(h,r,d,n)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:n,inst:i}),e.length?Promise.all(e).then(()=>r):r}const $l=y("$ZodObject",(e,n)=>{C.init(e,n);const r=Object.getOwnPropertyDescriptor(n,"shape");if(!(r!=null&&r.get)){const s=n.shape;Object.defineProperty(n,"shape",{get:()=>{const c={...s};return Object.defineProperty(n,"shape",{value:c}),c}})}const o=Qt(()=>xl(n));D(e._zod,"propValues",()=>{const s=n.shape,c={};for(const u in s){const d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const h of d.values)c[u].add(h)}}return c});const t=jt,i=n.catchall;let a;e._zod.parse=(s,c)=>{a??(a=o.value);const u=s.value;if(!t(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};const d=[],h=a.shape;for(const g of a.keys){const b=h[g]._zod.run({value:u[g],issues:[]},c);b instanceof Promise?d.push(b.then(_=>Un(_,s,g,u))):Un(b,s,g,u)}return i?_l(d,u,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),wl=y("$ZodObjectJIT",(e,n)=>{$l.init(e,n);const r=e._zod.parse,o=Qt(()=>xl(n)),t=g=>{const f=new Cc(["shape","payload","ctx"]),b=o.value,_=x=>{const S=Or(x);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};f.write("const input = payload.value;");const p=Object.create(null);let v=0;for(const x of b.keys)p[x]=`key_${v++}`;f.write("const newResult = {};");for(const x of b.keys){const S=p[x],w=Or(x);f.write(`const ${S} = ${_(x)};`),f.write(` 52 if (${S}.issues.length) { 53 payload.issues = payload.issues.concat(${S}.issues.map(iss => ({ 54 ...iss, 55 path: iss.path ? [${w}, ...iss.path] : [${w}] 56 }))); 57 } 58 59 60 if (${S}.value === undefined) { 61 if (${w} in input) { 62 newResult[${w}] = undefined; 63 } 64 } else { 65 newResult[${w}] = ${S}.value; 66 } 67 68 `)}f.write("payload.value = newResult;"),f.write("return payload;");const $=f.compile();return(x,S)=>$(g,x,S)};let i;const a=jt,s=!En.jitless,u=s&&gs.value,d=n.catchall;let h;e._zod.parse=(g,f)=>{h??(h=o.value);const b=g.value;return a(b)?s&&u&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(i||(i=t(n.shape)),g=i(g,f),d?_l([],b,g,f,h,e):g):r(g,f):(g.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),g)}});function ra(e,n,r,o){for(const i of e)if(i.issues.length===0)return n.value=i.value,n;const t=e.filter(i=>!lt(i));return t.length===1?(n.value=t[0].value,t[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(i=>i.issues.map(a=>Pe(a,o,pe())))}),n)}const fi=y("$ZodUnion",(e,n)=>{C.init(e,n),D(e._zod,"optin",()=>n.options.some(t=>t._zod.optin==="optional")?"optional":void 0),D(e._zod,"optout",()=>n.options.some(t=>t._zod.optout==="optional")?"optional":void 0),D(e._zod,"values",()=>{if(n.options.every(t=>t._zod.values))return new Set(n.options.flatMap(t=>Array.from(t._zod.values)))}),D(e._zod,"pattern",()=>{if(n.options.every(t=>t._zod.pattern)){const t=n.options.map(i=>i._zod.pattern);return new RegExp(`^(${t.map(i=>Gn(i.source)).join("|")})$`)}});const r=n.options.length===1,o=n.options[0]._zod.run;e._zod.parse=(t,i)=>{if(r)return o(t,i);let a=!1;const s=[];for(const c of n.options){const u=c._zod.run({value:t.value,issues:[]},i);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(c=>ra(c,t,e,i)):ra(s,t,e,i)}}),kl=y("$ZodDiscriminatedUnion",(e,n)=>{fi.init(e,n);const r=e._zod.parse;D(e._zod,"propValues",()=>{const t={};for(const i of n.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);for(const[s,c]of Object.entries(a)){t[s]||(t[s]=new Set);for(const u of c)t[s].add(u)}}return t});const o=Qt(()=>{var a;const t=n.options,i=new Map;for(const s of t){const c=(a=s._zod.propValues)==null?void 0:a[n.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);for(const u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(t,i)=>{const a=t.value;if(!jt(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;const s=o.value.get(a==null?void 0:a[n.discriminator]);return s?s._zod.run(t,i):n.unionFallback?r(t,i):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:a,path:[n.discriminator],inst:e}),t)}}),Sl=y("$ZodIntersection",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value,i=n.left._zod.run({value:t,issues:[]},o),a=n.right._zod.run({value:t,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>ia(r,c,u)):ia(r,i,a)}});function Pr(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(mt(e)&&mt(n)){const r=Object.keys(n),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),t={...e,...n};for(const i of o){const a=Pr(e[i],n[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};t[i]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const t=e[o],i=n[o],a=Pr(t,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ia(e,n,r){if(n.issues.length&&e.issues.push(...n.issues),r.issues.length&&e.issues.push(...r.issues),lt(e))return e;const o=Pr(n.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const hi=y("$ZodTuple",(e,n)=>{C.init(e,n);const r=n.items,o=r.length-[...r].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,i)=>{const a=t.value;if(!Array.isArray(a))return t.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];const s=[];if(!n.rest){const u=a.length>r.length,d=a.length<o-1;if(u||d)return t.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:a,inst:e,origin:"array"}),t}let c=-1;for(const u of r){if(c++,c>=a.length&&c>=o)continue;const d=u._zod.run({value:a[c],issues:[]},i);d instanceof Promise?s.push(d.then(h=>bn(h,t,c))):bn(d,t,c)}if(n.rest){const u=a.slice(r.length);for(const d of u){c++;const h=n.rest._zod.run({value:d,issues:[]},i);h instanceof Promise?s.push(h.then(g=>bn(g,t,c))):bn(h,t,c)}}return s.length?Promise.all(s).then(()=>t):t}});function bn(e,n,r){e.issues.length&&n.issues.push(...Oe(r,e.issues)),n.value[r]=e.value}const Il=y("$ZodRecord",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!mt(t))return r.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),r;const i=[];if(n.keyType._zod.values){const a=n.keyType._zod.values;r.value={};for(const c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){const u=n.valueType._zod.run({value:t[c],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&r.issues.push(...Oe(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...Oe(c,u.issues)),r.value[c]=u.value)}let s;for(const c in t)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:s})}else{r.value={};for(const a of Reflect.ownKeys(t)){if(a==="__proto__")continue;const s=n.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(u=>Pe(u,o,pe())),input:a,path:[a],inst:e}),r.value[s.value]=s.value;continue}const c=n.valueType._zod.run({value:t[a],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...Oe(a,u.issues)),r.value[s.value]=u.value})):(c.issues.length&&r.issues.push(...Oe(a,c.issues)),r.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),jl=y("$ZodMap",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!(t instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),r;const i=[];r.value=new Map;for(const[a,s]of t){const c=n.keyType._zod.run({value:a,issues:[]},o),u=n.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([d,h])=>{oa(d,h,r,a,t,e,o)})):oa(c,u,r,a,t,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function oa(e,n,r,o,t,i,a){e.issues.length&&(Pn.has(typeof o)?r.issues.push(...Oe(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:t,inst:i,issues:e.issues.map(s=>Pe(s,a,pe()))})),n.issues.length&&(Pn.has(typeof o)?r.issues.push(...Oe(o,n.issues)):r.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:o,issues:n.issues.map(s=>Pe(s,a,pe()))})),r.value.set(e.value,n.value)}const Nl=y("$ZodSet",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!(t instanceof Set))return r.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),r;const i=[];r.value=new Set;for(const a of t){const s=n.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>aa(c,r))):aa(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function aa(e,n){e.issues.length&&n.issues.push(...e.issues),n.value.add(e.value)}const zl=y("$ZodEnum",(e,n)=>{C.init(e,n);const r=Gr(n.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(t=>Pn.has(typeof t)).map(t=>typeof t=="string"?rt(t):t.toString()).join("|")})$`),e._zod.parse=(t,i)=>{const a=t.value;return o.has(a)||t.issues.push({code:"invalid_value",values:r,input:a,inst:e}),t}}),Ol=y("$ZodLiteral",(e,n)=>{if(C.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(n.values),e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?rt(r):r?rt(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const t=r.value;return e._zod.values.has(t)||r.issues.push({code:"invalid_value",values:n.values,input:t,inst:e}),r}}),El=y("$ZodFile",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;return t instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),r}}),Tl=y("$ZodTransform",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Jn(e.constructor.name);const t=n.transform(r.value,r);if(o.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(r.value=a,r));if(t instanceof Promise)throw new dt;return r.value=t,r}});function sa(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Pl=y("$ZodOptional",(e,n)=>{C.init(e,n),e._zod.optin="optional",e._zod.optout="optional",D(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),D(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${Gn(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(n.innerType._zod.optin==="optional"){const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>sa(i,r.value)):sa(t,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,o)}}),Ul=y("$ZodNullable",(e,n)=>{C.init(e,n),D(e._zod,"optin",()=>n.innerType._zod.optin),D(e._zod,"optout",()=>n.innerType._zod.optout),D(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${Gn(r.source)}|null)$`):void 0}),D(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:n.innerType._zod.run(r,o)}),Cl=y("$ZodDefault",(e,n)=>{C.init(e,n),e._zod.optin="optional",D(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);if(r.value===void 0)return r.value=n.defaultValue,r;const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>ca(i,n)):ca(t,n)}});function ca(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const Rl=y("$ZodPrefault",(e,n)=>{C.init(e,n),e._zod.optin="optional",D(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,o))}),Al=y("$ZodNonOptional",(e,n)=>{C.init(e,n),D(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>la(i,e)):la(t,e)}});function la(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const Dl=y("$ZodSuccess",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Jn("ZodSuccess");const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>(r.value=i.issues.length===0,r)):(r.value=t.issues.length===0,r)}}),Ll=y("$ZodCatch",(e,n)=>{C.init(e,n),D(e._zod,"optin",()=>n.innerType._zod.optin),D(e._zod,"optout",()=>n.innerType._zod.optout),D(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>
vendor: 6,552 bytes, line 68
68(r.value=i.value,i.issues.length&&(r.value=n.catchValue({...r,error:{issues:i.issues.map(a=>Pe(a,o,pe()))},input:r.value}),r.issues=[]),r)):(r.value=t.value,t.issues.length&&(r.value=n.catchValue({...r,error:{issues:t.issues.map(i=>Pe(i,o,pe()))},input:r.value}),r.issues=[]),r)}}),Zl=y("$ZodNaN",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Ml=y("$ZodPipe",(e,n)=>{C.init(e,n),D(e._zod,"values",()=>n.in._zod.values),D(e._zod,"optin",()=>n.in._zod.optin),D(e._zod,"optout",()=>n.out._zod.optout),D(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const i=n.out._zod.run(r,o);return i instanceof Promise?i.then(a=>yn(a,n.in,o)):yn(i,n.in,o)}const t=n.in._zod.run(r,o);return t instanceof Promise?t.then(i=>yn(i,n.out,o)):yn(t,n.out,o)}});function yn(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}const pi=y("$ZodCodec",(e,n)=>{C.init(e,n),D(e._zod,"values",()=>n.in._zod.values),D(e._zod,"optin",()=>n.in._zod.optin),D(e._zod,"optout",()=>n.out._zod.optout),D(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){const i=n.in._zod.run(r,o);return i instanceof Promise?i.then(a=>xn(a,n,o)):xn(i,n,o)}else{const i=n.out._zod.run(r,o);return i instanceof Promise?i.then(a=>xn(a,n,o)):xn(i,n,o)}}});function xn(e,n,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const t=n.transform(e.value,e);return t instanceof Promise?t.then(i=>_n(e,i,n.out,r)):_n(e,t,n.out,r)}else{const t=n.reverseTransform(e.value,e);return t instanceof Promise?t.then(i=>_n(e,i,n.in,r)):_n(e,t,n.in,r)}}function _n(e,n,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:n,issues:e.issues},o)}const Fl=y("$ZodReadonly",(e,n)=>{C.init(e,n),D(e._zod,"propValues",()=>n.innerType._zod.propValues),D(e._zod,"values",()=>n.innerType._zod.values),D(e._zod,"optin",()=>n.innerType._zod.optin),D(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(ua):ua(t)}});function ua(e){return e.value=Object.freeze(e.value),e}const Bl=y("$ZodTemplateLiteral",(e,n)=>{C.init(e,n);const r=[];for(const o of n.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);const t=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${o._zod.traits}`);const i=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(i,a))}else if(o===null||vs.has(typeof o))r.push(rt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,t)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:n.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Jl=y("$ZodFunction",(e,n)=>(C.init(e,n),e._def=n,e._zod.def=n,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){const t=e._def.input?Er(e._def.input,o):o,i=Reflect.apply(r,this,t);return e._def.output?Er(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){const t=e._def.input?await Tr(e._def.input,o):o,i=await Reflect.apply(r,this,t);return e._def.output?await Tr(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new hi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),Gl=y("$ZodPromise",(e,n)=>{C.init(e,n),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(t=>n.innerType._zod.run({value:t,issues:[]},o))}),Wl=y("$ZodLazy",(e,n)=>{C.init(e,n),D(e._zod,"innerType",()=>n.getter()),D(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),D(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),D(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),D(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Vl=y("$ZodCustom",(e,n)=>{Q.init(e,n),C.init(e,n),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,t=n.fn(o);if(t instanceof Promise)return t.then(i=>da(i,r,o,e));da(t,r,o,e)}});function da(e,n,r,o){if(!e){const t={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(t.params=o._zod.def.params),n.issues.push(Nt(t))}}const ug=()=>{const e={string:{unit:"ØØ±Ù",verb:"Ø£Ù ÙØÙÙ"},file:{unit:"Ø¨Ø§ÙØª",verb:"Ø£Ù ÙØÙÙ"},array:{unit:"Ø¹ÙØµØ±",verb:"Ø£Ù ÙØÙÙ"},set:{unit:"Ø¹ÙØµØ±",verb:"Ø£Ù ÙØÙÙ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"Ù
دخÙ",email:"Ø¨Ø±ÙØ¯ Ø¥ÙÙØªØ±ÙÙÙ",url:"رابط",emoji:"Ø¥ÙÙ
ÙØ¬Ù",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ØªØ§Ø±ÙØ® ÙÙÙØª بÙ
Ø¹ÙØ§Ø± ISO",date:"ØªØ§Ø±ÙØ® بÙ
Ø¹ÙØ§Ø± ISO",time:"ÙÙØª بÙ
Ø¹ÙØ§Ø± ISO",duration:"Ù
دة بÙ
Ø¹ÙØ§Ø± ISO",ipv4:"عÙÙØ§Ù IPv4",ipv6:"عÙÙØ§Ù IPv6",cidrv4:"Ù
Ø¯Ù Ø¹ÙØ§ÙÙÙ Ø¨ØµÙØºØ© IPv4",cidrv6:"Ù
Ø¯Ù Ø¹ÙØ§ÙÙÙ Ø¨ØµÙØºØ© IPv6",base64:"ÙÙØµ بترÙ
ÙØ² base64-encoded",base64url:"ÙÙØµ بترÙ
ÙØ² base64url-encoded",json_string:"ÙÙØµ عÙÙ ÙÙØ¦Ø© JSON",e164:"رÙÙ
ÙØ§ØªÙ بÙ
Ø¹ÙØ§Ø± E.164",jwt:"JWT",template_literal:"Ù
دخÙ"};return t=>
68{switch(t.code){case"invalid_type":return`Ù
Ø¯Ø®ÙØ§Øª ØºÙØ± Ù
ÙØ¨ÙÙØ©: ÙÙØªØ±Ø¶ إدخا٠${t.expected}Ø ÙÙÙ٠تÙ
إدخا٠${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ù
Ø¯Ø®ÙØ§Øª ØºÙØ± Ù
ÙØ¨ÙÙØ©: ÙÙØªØ±Ø¶ إدخا٠${T(t.values[0])}`:`Ø§Ø®ØªÙØ§Ø± ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØªÙÙØ¹ Ø§ÙØªÙاء Ø£ØØ¯ ÙØ°Ù Ø§ÙØ®Ùارات: ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?` Ø£ÙØ¨Ø± Ù
٠اÙÙØ§Ø²Ù
: ÙÙØªØ±Ø¶ أ٠تÙÙÙ ${t.origin??"اÙÙÙÙ
Ø©"} ${i} ${t.maximum.toString()} ${a.unit??"Ø¹ÙØµØ±"}`:`Ø£ÙØ¨Ø± Ù
٠اÙÙØ§Ø²Ù
: ÙÙØªØ±Ø¶ أ٠تÙÙÙ ${t.origin??"اÙÙÙÙ
Ø©"} ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`أصغر Ù
٠اÙÙØ§Ø²Ù
: ÙÙØªØ±Ø¶ ÙÙ ${t.origin} Ø£Ù ÙÙÙÙ ${i} ${t.minimum.toString()} ${a.unit}`:`أصغر Ù
٠اÙÙØ§Ø²Ù
: ÙÙØªØ±Ø¶ ÙÙ ${t.origin} Ø£Ù ÙÙÙÙ ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ÙÙØµ ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØ¬Ø¨ Ø£Ù ÙØ¨Ø¯Ø£ ب٠"${t.prefix}"`:i.format==="ends_with"?`ÙÙØµ ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØ¬Ø¨ Ø£Ù ÙÙØªÙ٠ب٠"${i.suffix}"`:i.format==="includes"?`ÙÙØµ ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØ¬Ø¨ Ø£Ù ÙØªØ¶Ù
ÙÙÙ "${i.includes}"`:i.format==="regex"?`ÙÙØµ ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØ¬Ø¨ Ø£Ù ÙØ·Ø§Ø¨Ù اÙÙÙ
Ø· ${i.pattern}`:`${o[i.format]??t.format} ØºÙØ± Ù
ÙØ¨ÙÙ`}case"not_multiple_of":return`رÙÙ
ØºÙØ± Ù
ÙØ¨ÙÙ: ÙØ¬Ø¨ Ø£Ù ÙÙÙÙ Ù
Ù Ù
Ø¶Ø§Ø¹ÙØ§Øª ${t.divisor}`;case"unrecognized_keys":return`Ù
عرÙ${t.keys.length>1?"ات":""} ØºØ±ÙØ¨${t.keys.length>1?"Ø©":""}: ${N(t.keys,"Ø ")}`;case"invalid_key":return`Ù
Ø¹Ø±Ù ØºÙØ± Ù
ÙØ¨ÙÙ ÙÙ ${t.origin}`;case"invalid_union":return"Ù
Ø¯Ø®Ù ØºÙØ± Ù
ÙØ¨ÙÙ";case"invalid_element":return`Ù
Ø¯Ø®Ù ØºÙØ± Ù
ÙØ¨ÙÙ ÙÙ ${t.origin}`;default:return"Ù
Ø¯Ø®Ù ØºÙØ± Ù
ÙØ¨ÙÙ"}}};function dg(){return{localeError:ug()}}const mg=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`YanlıŠdÉyÉr: gözlÉnilÉn ${t.expected}, daxil olan ${r(t.input)}`;case"invalid_value":return t.values.length===1?`YanlıŠdÉyÉr: gözlÉnilÉn ${T(t.values[0])}`:`YanlıŠseçim: aÅaÄıdakılardan biri olmalıdır: ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Ãox böyük: gözlÉnilÉn ${t.origin??"dÉyÉr"} ${i}${t.maximum.toString()} ${a.unit??"element"}`:`Ãox böyük: gözlÉnilÉn ${t.origin??"dÉyÉr"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Ãox kiçik: gözlÉnilÉn ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`Ãox kiçik: gözlÉnilÉn ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`YanlıŠmÉtn: "${i.prefix}" ilÉ baÅlamalıdır`:i.format==="ends_with"?`YanlıŠmÉtn: "${i.suffix}" ilÉ bitmÉlidir`:i.format==="includes"?`YanlıŠmÉtn: "${i.includes}" daxil olmalıdır`:i.format==="regex"?`YanlıŠmÉtn: ${i.pattern} Åablonuna uyÄun olmalıdır`:`YanlıŠ${o[i.format]??t.format}`}case"not_multiple_of":return`YanlıŠÉdÉd: ${t.divisor} ilÉ bölünÉ bilÉn olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${N(t.keys,", ")}`;
68case"invalid_key":return`${t.origin} daxilindÉ yanlıŠaçar`;case"invalid_union":return"YanlıŠdÉyÉr";case"invalid_element":return`${t.origin} daxilindÉ yanlıŠdÉyÉr`;default:return"YanlıŠdÉyÉr"}}};function fg(){return{localeError:mg()}}function ma(e,n,r,o){const t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?n:i>=2&&i<=4?r:o}const hg=()=>{const e={string:{unit:{one:"ÑÑмвал",few:"ÑÑмвалÑ",many:"ÑÑмвалаÑ"},verb:"меÑÑ"},array:{unit:{one:"ÑлеменÑ",few:"ÑлеменÑÑ",many:"ÑлеменÑаÑ"},verb:"меÑÑ"},set:{unit:{one:"ÑлеменÑ",few:"ÑлеменÑÑ",many:"ÑлеменÑаÑ"},verb:"меÑÑ"},file:{unit:{one:"байÑ",few:"байÑÑ",many:"байÑаÑ"},verb:"меÑÑ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"лÑк";case"object":{if(Array.isArray(t))return"маÑÑÑ";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"Ñвод",email:"email адÑаÑ",url:"URL",emoji:"ÑмодзÑ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO даÑа Ñ ÑаÑ",date:"ISO даÑа",time:"ISO ÑаÑ",duration:"ISO пÑаÑÑглаÑÑÑ",ipv4:"IPv4 адÑаÑ",ipv6:"IPv6 адÑаÑ",cidrv4:"IPv4 дÑÑпазон",cidrv6:"IPv6 дÑÑпазон",base64:"Ñадок Ñ ÑаÑмаÑе base64",base64url:"Ñадок Ñ ÑаÑмаÑе base64url",json_string:"JSON Ñадок",e164:"нÑÐ¼Ð°Ñ E.164",jwt:"JWT",template_literal:"Ñвод"};return t=>{switch(t.code){case"invalid_type":return`ÐÑпÑавÑлÑÐ½Ñ Ñвод: ÑакаÑÑÑ ${t.expected}, аÑÑÑмана ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ÐÑпÑавÑлÑÐ½Ñ Ñвод: ÑакалаÑÑ ${T(t.values[0])}`:`ÐÑпÑавÑлÑÐ½Ñ Ð²Ð°ÑÑÑнÑ: ÑакаÑÑÑ Ð°Ð´Ð·Ñн з ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);if(a){const s=Number(t.maximum),c=ma(s,a.unit.one,a.unit.few,a.unit.many);return`ÐанадÑа вÑлÑкÑ: ÑакалаÑÑ, ÑÑо ${t.origin??"знаÑÑнне"} павÑнна ${a.verb} ${i}${t.maximum.toString()} ${c}`}return`ÐанадÑа вÑлÑкÑ: ÑакалаÑÑ, ÑÑо ${t.origin??"знаÑÑнне"} павÑнна бÑÑÑ ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);if(a){const s=Number(t.minimum),c=ma(s,a.unit.one,a.unit.few,a.unit.many);return`ÐанадÑа малÑ: ÑакалаÑÑ, ÑÑо ${t.origin} павÑнна ${a.verb} ${i}${t.minimum.toString()} ${c}`}return`ÐанадÑа малÑ: ÑакалаÑÑ, ÑÑо ${t.origin} павÑнна бÑÑÑ ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ÐÑпÑавÑлÑÐ½Ñ Ñадок: павÑнен паÑÑнаÑÑа з "${i.prefix}"`:i.format==="ends_with"?`ÐÑпÑавÑлÑÐ½Ñ Ñадок: павÑнен заканÑваÑÑа на "${i.suffix}"`:i.format==="includes"?`ÐÑпÑавÑлÑÐ½Ñ Ñадок: павÑнен змÑÑÑаÑÑ "${i.includes}"`:i.format==="regex"?`ÐÑпÑавÑлÑÐ½Ñ Ñадок: павÑнен адпавÑдаÑÑ ÑÐ°Ð±Ð»Ð¾Ð½Ñ ${i.pattern}`:`ÐÑпÑавÑлÑÐ½Ñ ${o[i.format]??t.format}`}case"not_multiple_of":return`ÐÑпÑавÑлÑÐ½Ñ Ð»Ñк: павÑнен бÑÑÑ ÐºÑаÑнÑм ${t.divisor}`;case"unrecognized_keys":return`ÐеÑаÑÐ¿Ð°Ð·Ð½Ð°Ð½Ñ ${t.keys.length>1?"клÑÑÑ":"клÑÑ"}: ${N(t.keys,", ")}`;case"invalid_key":return`ÐÑпÑавÑлÑÐ½Ñ ÐºÐ»ÑÑ Ñ ${t.origin}`;case"invalid_union":return"ÐÑпÑавÑлÑÐ½Ñ Ñвод";case"invalid_element":return`ÐÑпÑавÑлÑнае знаÑÑнне Ñ ${t.origin}`;default:return"ÐÑпÑавÑлÑÐ½Ñ Ñвод"}}};function pg(){return{localeError:hg()}}const gg=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"ÑиÑло";case"object":{if(Array.isArray(e))return"маÑив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},vg=()=>{const e={string:{unit:"Ñимвола",verb:"да ÑÑдÑÑжа"},file:{unit:"байÑа",verb:"да ÑÑдÑÑжа"},array:{unit:"елеменÑа",verb:"да ÑÑдÑÑжа"},set:{unit:"елеменÑа",verb:"да ÑÑдÑÑжа"}};function n(o){return e[o]??null}const r={regex:"вÑ
од",email:"имейл адÑеÑ",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO вÑеме",date:"ISO даÑа",time:"ISO вÑеме",duration:"ISO пÑодÑлжиÑелноÑÑ",ipv4:"IPv4 адÑеÑ",ipv6:"IPv6 адÑеÑ",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиÑан низ",base64url:"base64url-кодиÑан низ",json_string:"JSON низ",e164:"E.164 номеÑ",jwt:"JWT",template_literal:"вÑ
од"};return o=>
68{switch(o.code){case"invalid_type":return`Ðевалиден вÑ
од: оÑакван ${o.expected}, полÑÑен ${gg(o.input)}`;case"invalid_value":return o.values.length===1?`Ðевалиден вÑ
од: оÑакван ${T(o.values[0])}`:`Ðевалидна опÑиÑ: оÑаквано едно Ð¾Ñ ${N(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`ТвÑÑде голÑмо: оÑаква Ñе ${o.origin??"ÑÑойноÑÑ"} да ÑÑдÑÑжа ${t}${o.maximum.toString()} ${i.unit??"елеменÑа"}`:`ТвÑÑде голÑмо: оÑаква Ñе ${o.origin??"ÑÑойноÑÑ"} да бÑде ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`ТвÑÑде малко: оÑаква Ñе ${o.origin} да ÑÑдÑÑжа ${t}${o.minimum.toString()} ${i.unit}`:`ТвÑÑде малко: оÑаква Ñе ${o.origin} да бÑде ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;if(t.format==="starts_with")return`Ðевалиден низ: ÑÑÑбва да запоÑва Ñ "${t.prefix}"`;if(t.format==="ends_with")return`Ðевалиден низ: ÑÑÑбва да завÑÑÑва Ñ "${t.suffix}"`;if(t.format==="includes")return`Ðевалиден низ: ÑÑÑбва да вклÑÑва "${t.includes}"`;if(t.format==="regex")return`Ðевалиден низ: ÑÑÑбва да ÑÑвпада Ñ ${t.pattern}`;let i="Ðевалиден";return t.format==="emoji"&&(i="Ðевалидно"),t.format==="datetime"&&(i="Ðевалидно"),t.format==="date"&&(i="Ðевалидна"),t.format==="time"&&(i="Ðевалидно"),t.format==="duration"&&(i="Ðевалидна"),`${i} ${r[t.format]??o.format}`}case"not_multiple_of":return`Ðевалидно ÑиÑло: ÑÑÑбва да бÑде кÑаÑно на ${o.divisor}`;case"unrecognized_keys":return`ÐеÑазпознаÑ${o.keys.length>1?"и":""} клÑÑ${o.keys.length>1?"ове":""}: ${N(o.keys,", ")}`;case"invalid_key":return`Ðевалиден клÑÑ Ð² ${o.origin}`;case"invalid_union":return"Ðевалиден вÑ
од";case"invalid_element":return`Ðевалидна ÑÑойноÑÑ Ð² ${o.origin}`;default:return"Ðевалиден вÑ
од"}}};function bg(){return{localeError:vg()}}const yg=()=>{const e={string:{unit:"carà cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return t=>{switch(t.code){case"invalid_type":return`Tipus invà lid: s'esperava ${t.expected}, s'ha rebut ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Valor invà lid: s'esperava ${T(t.values[0])}`:`Opció invà lida: s'esperava una de ${N(t.values," o ")}`;case"too_big":{const i=t.inclusive?"com a mà xim":"menys de",a=n(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${i} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"com a mÃnim":"més de",a=n(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingués ${i} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`Format invà lid: ha de començar amb "${i.prefix}"`:i.format==="ends_with"?`Format invà lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format invà lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format invà lid: ha de coincidir amb el patró ${i.pattern}`:`Format invà lid per a ${o[i.format]??t.format}`}case"not_multiple_of":return`Número invà lid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`Clau invà lida a ${t.origin}`;case"invalid_union":return"Entrada invà lida";case"invalid_element":return`Element invà lid a ${t.origin}`;default:return"Entrada invà lida"}}};function xg(){return{localeError:yg()}}const _g=()=>{const e={string:{unit:"znaků",verb:"mÃt"},file:{unit:"bajtů",verb:"mÃt"},array:{unit:"prvků",verb:"mÃt"},set:{unit:"prvků",verb:"mÃt"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"ÄÃslo";case"string":return"ÅetÄzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"regulárnà výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a Äas ve formátu ISO",date:"datum ve formátu ISO",time:"Äas ve formátu ISO",duration:"doba trvánà ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"ÅetÄzec zakódovaný ve formátu base64",base64url:"ÅetÄzec zakódovaný ve formátu base64url",json_string:"ÅetÄzec ve formátu JSON",e164:"ÄÃslo E.164",jwt:"JWT",template_literal:"vstup"};return t=>{switch(t.code){case"invalid_type":return`Neplatný vstup: oÄekáváno ${t.expected}, obdrženo ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Neplatný vstup: oÄekáváno ${T(t.values[0])}`:`Neplatná možnost: oÄekávána jedna z hodnot ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Hodnota je pÅÃliÅ¡ velká: ${t.origin??"hodnota"} musà mÃt ${i}${t.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je pÅÃliÅ¡ velká: ${t.origin??"hodnota"} musà být ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Hodnota je pÅÃliÅ¡ malá: ${t.origin??"hodnota"} musà mÃt ${i}${t.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je pÅÃliÅ¡ malá: ${t.origin??"hodnota"} musà být ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Neplatný ÅetÄzec: musà zaÄÃnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatný ÅetÄzec: musà konÄit na "${i.suffix}"`:i.format==="includes"?`Neplatný ÅetÄzec: musà obsahovat "${i.includes}"`:i.format==="regex"?`Neplatný ÅetÄzec: musà odpovÃdat vzoru ${i.pattern}`:`Neplatný formát ${o[i.format]??t.format}`}case"not_multiple_of":return`Neplatné ÄÃslo: musà být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klÃÄe: ${N(t.keys,", ")}`;case"invalid_key":return`Neplatný klÃÄ v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function $g(){return{localeError:_g()}}const wg=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},n={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return e[a]??null}function o(a){return n[a]??a}const t=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return s},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-omrÃ¥de",ipv6:"IPv6-omrÃ¥de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>
68{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${o(a.expected)}, fik ${o(t(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${T(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=r(a.origin),u=o(a.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${s} ${a.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=r(a.origin),u=o(a.origin);return c?`For lille: forventede ${u} ${c.verb} ${s} ${a.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${i[s.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${N(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}};function kg(){return{localeError:wg()}}const Sg=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{switch(t.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${t.expected}, erhalten ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ungültige Eingabe: erwartet ${T(t.values[0])}`:`Ungültige Option: erwartet eine von ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Zu groÃ: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groÃ: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ungültiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ungültiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ungültiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`:`Ungültig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${N(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function Ig(){return{localeError:Sg()}}const jg=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},Ng=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function n(o){return e[o]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>
68{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${jg(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${T(o.values[0])}`:`Invalid option: expected one of ${N(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${t}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Too small: expected ${o.origin} to have ${t}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`Invalid string: must start with "${t.prefix}"`:t.format==="ends_with"?`Invalid string: must end with "${t.suffix}"`:t.format==="includes"?`Invalid string: must include "${t.includes}"`:t.format==="regex"?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${r[t.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${N(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function Hl(){return{localeError:Ng()}}const zg=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},Og=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function n(o){return e[o]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoÄio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daÅro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendiÄis ${o.expected}, riceviÄis ${zg(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendiÄis ${T(o.values[0])}`:`Nevalida opcio: atendiÄis unu el ${N(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Tro granda: atendiÄis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiÄis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Tro malgranda: atendiÄis ke ${o.origin} havu ${t}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiÄis ke ${o.origin} estu ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`Nevalida karaktraro: devas komenciÄi per "${t.prefix}"`:t.format==="ends_with"?`Nevalida karaktraro: devas finiÄi per "${t.suffix}"`:t.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${r[t.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} Ålosilo${o.keys.length>1?"j":""}: ${N(o.keys,", ")}`;case"invalid_key":return`Nevalida Ålosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Eg(){return{localeError:Og()}}const Tg=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},n={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol
68:"sÃmbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacÃo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return e[a]??null}function o(a){return n[a]??a}const t=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return s},i={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${o(a.expected)}, recibido ${o(t(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${T(a.values[0])}`:`Opción inválida: se esperaba una de ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=r(a.origin),u=o(a.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${s}${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${s}${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=r(a.origin),u=o(a.origin);return c?`Demasiado pequeño: se esperaba que ${u} tuviera ${s}${a.minimum.toString()} ${c.unit}`:`Demasiado pequeño: se esperaba que ${u} fuera ${s}${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${i[s.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${N(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o(a.origin)}`;default:return"Entrada inválida"}}};function Pg(){return{localeError:Tg()}}const Ug=()=>{const e={string:{unit:"کاراکتر",verb:"داشت٠باشد"},file:{unit:"Ø¨Ø§ÛØª",verb:"داشت٠باشد"},array:{unit:"Ø¢ÛØªÙ
",verb:"داشت٠باشد"},set:{unit:"Ø¢ÛØªÙ
",verb:"داشت٠باشد"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"عدد";case"object":{if(Array.isArray(t))return"آراÛÙ";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ÙØ±ÙدÛ",email:"آدرس اÛÙ
ÛÙ",url:"URL",emoji:"اÛÙ
ÙØ¬Û",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ØªØ§Ø±ÛØ® ٠زÙ
Ø§Ù Ø§ÛØ²Ù",date:"ØªØ§Ø±ÛØ® Ø§ÛØ²Ù",time:"زÙ
Ø§Ù Ø§ÛØ²Ù",duration:"Ù
دت زÙ
Ø§Ù Ø§ÛØ²Ù",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 داÙ
ÙÙ",cidrv6:"IPv6 داÙ
ÙÙ",base64:"base64-encoded رشتÙ",base64url:"base64url-encoded رشتÙ",json_string:"JSON رشتÙ",e164:"E.164 عدد",jwt:"JWT",template_literal:"ÙØ±ÙدÛ"};return t=>{switch(t.code){case"invalid_type":return`ÙØ±ÙØ¯Û ÙØ§Ù
عتبر: Ù
ÛâØ¨Ø§ÛØ³Øª ${t.expected} Ù
ÛâØ¨ÙØ¯Ø ${r(t.input)} Ø¯Ø±ÛØ§Ùت شد`;case"invalid_value":return t.values.length===1?`ÙØ±ÙØ¯Û ÙØ§Ù
عتبر: Ù
ÛâØ¨Ø§ÛØ³Øª ${T(t.values[0])} Ù
ÛâØ¨ÙØ¯`:`گزÛÙÙ ÙØ§Ù
عتبر: Ù
ÛâØ¨Ø§ÛØ³Øª ÛÚ©Û Ø§Ø² ${N(t.values,"|")} Ù
ÛâØ¨ÙØ¯`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Ø®ÛÙÛ Ø¨Ø²Ø±Ú¯: ${t.origin??"Ù
ÙØ¯Ø§Ø±"} Ø¨Ø§ÛØ¯ ${i}${t.maximum.toString()} ${a.unit??"Ø¹ÙØµØ±"} باشد`:`Ø®ÛÙÛ Ø¨Ø²Ø±Ú¯: ${t.origin??"Ù
ÙØ¯Ø§Ø±"} Ø¨Ø§ÛØ¯ ${i}${t.maximum.toString()} باشد`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Ø®ÛÙÛ Ú©ÙÚÚ©: ${t.origin} Ø¨Ø§ÛØ¯ ${i}${t.minimum.toString()} ${a.unit} باشد`:`Ø®ÛÙÛ Ú©ÙÚÚ©: ${t.origin} Ø¨Ø§ÛØ¯ ${i}${t.minimum.toString()} باشد`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`Ø±Ø´ØªÙ ÙØ§Ù
عتبر: Ø¨Ø§ÛØ¯ با "${i.prefix}" Ø´Ø±ÙØ¹ Ø´ÙØ¯`:i.format==="ends_with"?`Ø±Ø´ØªÙ ÙØ§Ù
عتبر: Ø¨Ø§ÛØ¯ با "${i.suffix}" تÙ
اÙ
Ø´ÙØ¯`:i.format==="includes"?`Ø±Ø´ØªÙ ÙØ§Ù
عتبر: Ø¨Ø§ÛØ¯ شاÙ
Ù "${i.includes}" باشد`:i.format==="regex"?`Ø±Ø´ØªÙ ÙØ§Ù
عتبر: Ø¨Ø§ÛØ¯ با اÙÚ¯ÙÛ ${i.pattern} Ù
Ø·Ø§Ø¨ÙØª داشت٠باشد`:`${o[i.format]??t.format} ÙØ§Ù
عتبر`}case"not_multiple_of":return`عدد ÙØ§Ù
عتبر: Ø¨Ø§ÛØ¯ Ù
ضرب ${t.divisor} باشد`;case"unrecognized_keys":return`Ú©ÙÛØ¯${t.keys.length>1?"ÙØ§Û":""} ÙØ§Ø´Ùاس: ${N(t.keys,", ")}`;case"invalid_key":return`Ú©ÙÛØ¯ ÙØ§Ø´Ùاس در ${t.origin}`;case"invalid_union":return"ÙØ±ÙØ¯Û ÙØ§Ù
عتبر";case"invalid_element":return`Ù
ÙØ¯Ø§Ø± ÙØ§Ù
عتبر در ${t.origin}`;default:return"ÙØ±ÙØ¯Û ÙØ§Ù
عتبر"}}};function Cg(){return{localeError:Ug()}}const Rg=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{switch(t.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${t.expected}, oli ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Virheellinen syöte: täytyy olla ${T(t.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${i}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${i}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen syöte: täytyy sisältää "${i.includes}"`:i.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${N(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Ag(){return{localeError:Rg()}}const Dg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return t=>
68{switch(t.code){case"invalid_type":return`Entrée invalide : ${t.expected} attendu, ${r(t.input)} reçu`;case"invalid_value":return t.values.length===1?`Entrée invalide : ${T(t.values[0])} attendu`:`Option invalide : une valeur parmi ${N(t.values,"|")} attendue`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Trop grand : ${t.origin??"valeur"} doit ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${t.origin??"valeur"} doit être ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Trop petit : ${t.origin} doit ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${t.origin} doit être ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${N(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function Lg(){return{localeError:Dg()}}const Zg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return t=>{switch(t.code){case"invalid_type":return`Entrée invalide : attendu ${t.expected}, reçu ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Entrée invalide : attendu ${T(t.values[0])}
68`:`Option invalide : attendu l'une des valeurs suivantes ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"â¤":"<",a=n(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"â¥":">",a=n(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${N(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function Mg(){return{localeError:Zg()}}const Fg=()=>{const e={string:{unit:"××ת××ת",verb:"×××××"},file:{unit:"××××××",verb:"×××××"},array:{unit:"פר××××",verb:"×××××"},set:{unit:"פר××××",verb:"×××××"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"×§××",email:"×ת××ת ××××××",url:"×ת××ת רשת",emoji:"×××××'×",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ת×ר×× ×××× ISO",date:"ת×ר×× ISO",time:"××× ISO",duration:"××©× ××× ISO",ipv4:"×ת××ת IPv4",ipv6:"×ת××ת IPv6",cidrv4:"×××× IPv4",cidrv6:"×××× IPv6",base64:"××ר××ת ××ס×ס 64",base64url:"××ר××ת ××ס×ס 64 ××ת×××ת רשת",json_string:"××ר××ת JSON",e164:"×ספר E.164",jwt:"JWT",template_literal:"×§××"};return t=>{switch(t.code){case"invalid_type":return`×§×× ×× ×ª×§××: צר×× ${t.expected}, ×תק×× ${r(t.input)}`;case"invalid_value":return t.values.length===1?`×§×× ×× ×ª×§××: צר×× ${T(t.values[0])}`:`×§×× ×× ×ª×§××: צר×× ××ת ×××פשר×××ת ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`×××× ×××: ${t.origin??"value"} צר×× ××××ת ${i}${t.maximum.toString()} ${a.unit??"elements"}`:`×××× ×××: ${t.origin??"value"} צר×× ××××ת ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`×§×× ×××: ${t.origin} צר×× ××××ת ${i}${t.minimum.toString()} ${a.unit}`:`×§×× ×××: ${t.origin} צר×× ××××ת ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`××ר××ת ×× ×ª×§×× ×: ××××ת ××ת××× ×"${i.prefix}"`:i.format==="ends_with"?`××ר××ת ×× ×ª×§×× ×: ××××ת ××סת××× × "${i.suffix}"`:i.format==="includes"?`××ר××ת ×× ×ª×§×× ×: ××××ת ××××× "${i.includes}"`:i.format==="regex"?`××ר××ת ×× ×ª×§×× ×: ××××ת ××ת××× ×ת×× ×ת ${i.pattern}`:`${o[i.format]??t.format} ×× ×ª×§××`}case"not_multiple_of":return`×ספר ×× ×ª×§××: ×××× ××××ת ××פ×× ×©× ${t.divisor}`;case"unrecognized_keys":return`×פת×${t.keys.length>1?"×ת":""} ×× ××××${t.keys.length>1?"××":"×"}: ${N(t.keys,", ")}`;case"invalid_key":return`××¤×ª× ×× ×ª×§×× ×${t.origin}`;
68case"invalid_union":return"×§×× ×× ×ª×§××";case"invalid_element":return`×¢×¨× ×× ×ª×§×× ×${t.origin}`;default:return"×§×× ×× ×ª×§××"}}};function Bg(){return{localeError:Fg()}}const Jg=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"szám";case"object":{if(Array.isArray(t))return"tömb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"bemenet",email:"email cÃm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO idÅbélyeg",date:"ISO dátum",time:"ISO idÅ",duration:"ISO idÅintervallum",ipv4:"IPv4 cÃm",ipv6:"IPv6 cÃm",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return t=>{switch(t.code){case"invalid_type":return`Ãrvénytelen bemenet: a várt érték ${t.expected}, a kapott érték ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ãrvénytelen bemenet: a várt érték ${T(t.values[0])}`:`Ãrvénytelen opció: valamelyik érték várt ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${i}${t.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${i}${t.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ãrvénytelen string: "${i.prefix}" értékkel kell kezdÅdnie`:i.format==="ends_with"?`Ãrvénytelen string: "${i.suffix}" értékkel kell végzÅdnie`:i.format==="includes"?`Ãrvénytelen string: "${i.includes}" értéket kell tartalmaznia`:i.format==="regex"?`Ãrvénytelen string: ${i.pattern} mintának kell megfelelnie`:`Ãrvénytelen ${o[i.format]??t.format}`}case"not_multiple_of":return`Ãrvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`Ãrvénytelen kulcs ${t.origin}`;case"invalid_union":return"Ãrvénytelen bemenet";case"invalid_element":return`Ãrvénytelen érték: ${t.origin}`;default:return"Ãrvénytelen bemenet"}}};function Gg(){return{localeError:Jg()}}const Wg=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Input tidak valid: diharapkan ${t.expected}, diterima ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${T(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${N(t.values,"|")}`;
68case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function Vg(){return{localeError:Wg()}}const Hg=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},qg=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function n(o){return e[o]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tÃmi",date:"ISO dagsetning",time:"ISO tÃmi",duration:"ISO tÃmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case"invalid_type":return`Rangt gildi: Ãú slóst inn ${Hg(o.input)} þar sem á að vera ${o.expected}`;case"invalid_value":return o.values.length===1?`Rangt gildi: gert ráð fyrir ${T(o.values[0])}`:`Ãgilt val: má vera eitt af eftirfarandi ${N(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} hafi ${t}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} sé ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Of lÃtið: gert er ráð fyrir að ${o.origin} hafi ${t}${o.minimum.toString()} ${i.unit}`:`Of lÃtið: gert er ráð fyrir að ${o.origin} sé ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`Ãgildur strengur: verður að byrja á "${t.prefix}"`:t.format==="ends_with"?`Ãgildur strengur: verður að enda á "${t.suffix}"`:t.format==="includes"?`Ãgildur strengur: verður að innihalda "${t.includes}"`:t.format==="regex"?`Ãgildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${r[t.format]??o.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`Ãþekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${N(o.keys,", ")}`;case"invalid_key":return`Rangur lykill à ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi à ${o.origin}`;default:return"Rangt gildi"}}};function Kg(){return{localeError:qg()}}const Yg=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>
68{switch(t.code){case"invalid_type":return`Input non valido: atteso ${t.expected}, ricevuto ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input non valido: atteso ${T(t.values[0])}`:`Opzione non valida: atteso uno tra ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${N(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function Xg(){return{localeError:Yg()}}const Qg=()=>{const e={string:{unit:"æå",verb:"ã§ãã"},file:{unit:"ãã¤ã",verb:"ã§ãã"},array:{unit:"è¦ç´ ",verb:"ã§ãã"},set:{unit:"è¦ç´ ",verb:"ã§ãã"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"æ°å¤";case"object":{if(Array.isArray(t))return"é
å";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"å
¥åå¤",email:"ã¡ã¼ã«ã¢ãã¬ã¹",url:"URL",emoji:"çµµæå",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISOæ¥æ",date:"ISOæ¥ä»",time:"ISOæå»",duration:"ISOæé",ipv4:"IPv4ã¢ãã¬ã¹",ipv6:"IPv6ã¢ãã¬ã¹",cidrv4:"IPv4ç¯å²",cidrv6:"IPv6ç¯å²",base64:"base64ã¨ã³ã³ã¼ãæåå",base64url:"base64urlã¨ã³ã³ã¼ãæåå",json_string:"JSONæåå",e164:"E.164çªå·",jwt:"JWT",template_literal:"å
¥åå¤"};return t=>{switch(t.code){case"invalid_type":return`ç¡å¹ãªå
¥å: ${t.expected}ãæå¾
ããã¾ãããã${r(t.input)}ãå
¥åããã¾ãã`;case"invalid_value":return t.values.length===1?`ç¡å¹ãªå
¥å: ${T(t.values[0])}ãæå¾
ããã¾ãã`:`ç¡å¹ãªé¸æ: ${N(t.values,"ã")}ã®ããããã§ããå¿
è¦ãããã¾ã`;case"too_big":{const i=t.inclusive?"以ä¸ã§ãã":"ããå°ãã",a=n(t.origin);return a?`大ããããå¤: ${t.origin??"å¤"}ã¯${t.maximum.toString()}${a.unit??"è¦ç´ "}${i}å¿
è¦ãããã¾ã`:`大ããããå¤: ${t.origin??"å¤"}ã¯${t.maximum.toString()}${i}å¿
è¦ãããã¾ã`}case"too_small":{const i=t.inclusive?"以ä¸ã§ãã":"ãã大ãã",a=n(t.origin);return a?`å°ããããå¤: ${t.origin}ã¯${t.minimum.toString()}${a.unit}${i}å¿
è¦ãããã¾ã`:`å°ããããå¤: ${t.origin}ã¯${t.minimum.toString()}${i}å¿
è¦ãããã¾ã`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ç¡å¹ãªæåå: "${i.prefix}"ã§å§ã¾ãå¿
è¦ãããã¾ã`:i.format==="ends_with"?`ç¡å¹ãªæåå: "${i.suffix}"ã§çµããå¿
è¦ãããã¾ã`:i.format==="includes"?`ç¡å¹ãªæåå: "${i.includes}"ãå«ãå¿
è¦ãããã¾ã`:i.format==="regex"?`ç¡å¹ãªæåå: ãã¿ã¼ã³${i.pattern}ã«ä¸è´ããå¿
è¦ãããã¾ã`:`ç¡å¹ãª${o[i.format]??t.format}`}case"not_multiple_of":return`ç¡å¹ãªæ°å¤: ${t.divisor}ã®åæ°ã§ããå¿
è¦ãããã¾ã`;
68case"unrecognized_keys":return`èªèããã¦ããªããã¼${t.keys.length>1?"群":""}: ${N(t.keys,"ã")}`;case"invalid_key":return`${t.origin}å
ã®ç¡å¹ãªãã¼`;case"invalid_union":return"ç¡å¹ãªå
¥å";case"invalid_element":return`${t.origin}å
ã®ç¡å¹ãªå¤`;default:return"ç¡å¹ãªå
¥å"}}};function ev(){return{localeError:Qg()}}const tv=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"á ááªá®áá";case"object":{if(Array.isArray(e))return"ááá¡ááá";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"á¡á¢á áááá",boolean:"áá£ááááá",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"á¤á£áá¥áªáá"}[n]??n},nv=()=>{const e={string:{unit:"á¡áááááá",verb:"á£ááá á¨áááªááááá¡"},file:{unit:"áááá¢á",verb:"á£ááá á¨áááªááááá¡"},array:{unit:"ááááááá¢á",verb:"á£ááá á¨áááªááááá¡"},set:{unit:"ááááááá¢á",verb:"á£ááá á¨áááªááááá¡"}};function n(o){return e[o]??null}const r={regex:"á¨áá§áááá",email:"áá-á¤áá¡á¢áá¡ ááá¡áááá áá",url:"URL",emoji:"áááá¯á",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ááá áá¦á-áá á",date:"ááá áá¦á",time:"áá á",duration:"á®áááá á«áááááá",ipv4:"IPv4 ááá¡áááá áá",ipv6:"IPv6 ááá¡áááá áá",cidrv4:"IPv4 ááááááááá",cidrv6:"IPv6 ááááááááá",base64:"base64-ááááá ááá£áá á¡á¢á áááá",base64url:"base64url-ááááá ááá£áá á¡á¢á áááá",json_string:"JSON á¡á¢á áááá",e164:"E.164 ááááá á",jwt:"JWT",template_literal:"á¨áá§áááá"};return o=>{switch(o.code){case"invalid_type":return`áá áá¡á¬áá á á¨áá§áááá: ááá¡áááááááá ${o.expected}, ááá¦ááá£áá ${tv(o.input)}`;case"invalid_value":return o.values.length===1?`áá áá¡á¬áá á á¨áá§áááá: ááá¡áááááááá ${T(o.values[0])}`:`áá áá¡á¬áá á ááá áááá¢á: ááá¡ááááááááá áá á-áá áá ${N(o.values,"|")}-ááá`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`áááááá¢áá áááá: ááá¡áááááááá ${o.origin??"áááá¨ááááááá"} ${i.verb} ${t}${o.maximum.toString()} ${i.unit}`:`áááááá¢áá áááá: ááá¡áááááááá ${o.origin??"áááá¨ááááááá"} áá§áá¡ ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`áááááá¢áá ááá¢áá á: ááá¡áááááááá ${o.origin} ${i.verb} ${t}${o.minimum.toString()} ${i.unit}`:`áááááá¢áá ááá¢áá á: ááá¡áááááááá ${o.origin} áá§áá¡ ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`áá áá¡á¬áá á á¡á¢á áááá: á£ááá áá¬á§áááááá¡ "${t.prefix}"-áá`:t.format==="ends_with"?`áá áá¡á¬áá á á¡á¢á áááá: á£ááá ááááá ááááááá¡ "${t.suffix}"-áá`:t.format==="includes"?`áá áá¡á¬áá á á¡á¢á áááá: á£ááá á¨áááªááááá¡ "${t.includes}"-á¡`:t.format==="regex"?`áá áá¡á¬áá á á¡á¢á áááá: á£ááá á¨ááá¡áááááááááá¡ á¨áááááá¡ ${t.pattern}`:`áá áá¡á¬áá á ${r[t.format]??o.format}`}case"not_multiple_of":return`áá áá¡á¬áá á á ááªá®áá: á£ááá áá§áá¡ ${o.divisor}-áá¡ á¯áá ááá`;case"unrecognized_keys":return`á£áªáááá ááá¡áá¦áá${o.keys.length>1?"ááá":"á"}: ${N(o.keys,", ")}`;
68case"invalid_key":return`áá áá¡á¬áá á ááá¡áá¦ááá ${o.origin}-á¨á`;case"invalid_union":return"áá áá¡á¬áá á á¨áá§áááá";case"invalid_element":return`áá áá¡á¬áá á áááá¨ááááááá ${o.origin}-á¨á`;default:return"áá áá¡á¬áá á á¨áá§áááá"}}};function rv(){return{localeError:nv()}}const iv=()=>{const e={string:{unit:"áá½á¢áááá",verb:"áá½ááá¶á"},file:{unit:"áá",verb:"áá½ááá¶á"},array:{unit:"áá¶áá»",verb:"áá½ááá¶á"},set:{unit:"áá¶áá»",verb:"áá½ááá¶á"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"áá·áááááá¶ááá (NaN)":"ááá";case"object":{if(Array.isArray(t))return"á¢á¶áá (Array)";if(t===null)return"áááá¶áááááá (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"áá·áááááááááá
á¼á",email:"á¢á¶áááááá¶áá¢áá¸ááá",url:"URL",emoji:"ááááá¶á¢á¶áááááá",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"áá¶áááá·á
áááá áá·ááááá ISO",date:"áá¶áááá·á
áááá ISO",time:"áááá ISO",duration:"áááááá ISO",ipv4:"á¢á¶áááááá¶á IPv4",ipv6:"á¢á¶áááááá¶á IPv6",cidrv4:"áááá¢á¶áááááá¶á IPv4",cidrv6:"áááá¢á¶áááááá¶á IPv6",base64:"ááááá¢ááááá¢áá·áá¼á base64",base64url:"ááááá¢ááááá¢áá·áá¼á base64url",json_string:"ááááá¢áááá JSON",e164:"ááá E.164",jwt:"JWT",template_literal:"áá·áááááááááá
á¼á"};return t=>{switch(t.code){case"invalid_type":return`áá·áááááááááá
á¼ááá·ááááá¹ááááá¼áá áááá¼ááá¶á ${t.expected} ááá»ááááááá½ááá¶á ${r(t.input)}`;case"invalid_value":return t.values.length===1?`áá·áááááááááá
á¼ááá·ááááá¹ááááá¼áá áááá¼ááá¶á ${T(t.values[0])}`:`ááááá¾ááá·ááááá¹ááááá¼áá áááá¼ááá¶áá½ááááá»áá
áááá ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`áááááá áááá¼ááá¶á ${t.origin??"ááááá"} ${i} ${t.maximum.toString()} ${a.unit??"áá¶áá»"}`:`áááááá áááá¼ááá¶á ${t.origin??"ááááá"} ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`áá¼á
áááá áááá¼ááá¶á ${t.origin} ${i} ${t.minimum.toString()} ${a.unit}`:`áá¼á
áááá áááá¼ááá¶á ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ááááá¢áááááá·ááááá¹ááááá¼áá áááá¼áá
á¶áááááá¾áááá "${i.prefix}"`:i.format==="ends_with"?`ááááá¢áááááá·ááááá¹ááááá¼áá áááá¼ááááá
ááááá "${i.suffix}"`:i.format==="includes"?`ááááá¢áááááá·ááááá¹ááááá¼áá áááá¼ááá¶á "${i.includes}"`:i.format==="regex"?`ááááá¢áááááá·ááááá¹ááááá¼áá áááá¼ááááááá¼áááááá¹áááááááááááá¶áááááá ${i.pattern}`:`áá·ááááá¹ááááá¼áá ${o[i.format]??t.format}`}case"not_multiple_of":return`ááááá·ááááá¹ááááá¼áá áááá¼ááááá¶áá á»áá»ááá ${t.divisor}`;case"unrecognized_keys":return`áááá¾ááááá·ááááá¶ááá ${N(t.keys,", ")}`;case"invalid_key":return`áááá·ááááá¹ááááá¼ááá
áááá»á ${t.origin}`;
68case"invalid_union":return"áá·áááááááá·ááááá¹ááááá¼á";case"invalid_element":return`áá·áááááááá·ááááá¹ááááá¼ááá
áááá»á ${t.origin}`;default:return"áá·áááááááá·ááááá¹ááááá¼á"}}};function ql(){return{localeError:iv()}}function ov(){return ql()}const av=()=>{const e={string:{unit:"문ì",verb:"to have"},file:{unit:"ë°ì´í¸",verb:"to have"},array:{unit:"ê°",verb:"to have"},set:{unit:"ê°",verb:"to have"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ì
ë ¥",email:"ì´ë©ì¼ 주ì",url:"URL",emoji:"ì´ëª¨ì§",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ë ì§ìê°",date:"ISO ë ì§",time:"ISO ìê°",duration:"ISO 기ê°",ipv4:"IPv4 주ì",ipv6:"IPv6 주ì",cidrv4:"IPv4 ë²ì",cidrv6:"IPv6 ë²ì",base64:"base64 ì¸ì½ë© 문ìì´",base64url:"base64url ì¸ì½ë© 문ìì´",json_string:"JSON 문ìì´",e164:"E.164 ë²í¸",jwt:"JWT",template_literal:"ì
ë ¥"};return t=>{switch(t.code){case"invalid_type":return`ì못ë ì
ë ¥: ìì íì
ì ${t.expected}, ë°ì íì
ì ${r(t.input)}ì
ëë¤`;case"invalid_value":return t.values.length===1?`ì못ë ì
ë ¥: ê°ì ${T(t.values[0])} ì´ì´ì¼ í©ëë¤`:`ì못ë ìµì
: ${N(t.values,"ëë ")} ì¤ íëì¬ì¼ í©ëë¤`;case"too_big":{const i=t.inclusive?"ì´í":"미ë§",a=i==="미ë§"?"ì´ì´ì¼ í©ëë¤":"ì¬ì¼ í©ëë¤",s=n(t.origin),c=(s==null?void 0:s.unit)??"ìì";return s?`${t.origin??"ê°"}ì´ ë무 í½ëë¤: ${t.maximum.toString()}${c} ${i}${a}`:`${t.origin??"ê°"}ì´ ë무 í½ëë¤: ${t.maximum.toString()} ${i}${a}`}case"too_small":{const i=t.inclusive?"ì´ì":"ì´ê³¼",a=i==="ì´ì"?"ì´ì´ì¼ í©ëë¤":"ì¬ì¼ í©ëë¤",s=n(t.origin),c=(s==null?void 0:s.unit)??"ìì";return s?`${t.origin??"ê°"}ì´ ë무 ììµëë¤: ${t.minimum.toString()}${c} ${i}${a}`:`${t.origin??"ê°"}ì´ ë무 ììµëë¤: ${t.minimum.toString()} ${i}${a}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ì못ë 문ìì´: "${i.prefix}"(ì¼)ë¡ ììí´ì¼ í©ëë¤`:i.format==="ends_with"?`ì못ë 문ìì´: "${i.suffix}"(ì¼)ë¡ ëëì¼ í©ëë¤`:i.format==="includes"?`ì못ë 문ìì´: "${i.includes}"ì(를) í¬í¨í´ì¼ í©ëë¤`:i.format==="regex"?`ì못ë 문ìì´: ì ê·ì ${i.pattern} í¨í´ê³¼ ì¼ì¹í´ì¼ í©ëë¤`:`ì못ë ${o[i.format]??t.format}`}case"not_multiple_of":return`ì못ë ì«ì: ${t.divisor}ì ë°°ìì¬ì¼ í©ëë¤`;case"unrecognized_keys":return`ì¸ìí ì ìë í¤: ${N(t.keys,", ")}`;case"invalid_key":return`ì못ë í¤: ${t.origin}`;case"invalid_union":return"ì못ë ì
ë ¥";case"invalid_element":return`ì못ë ê°: ${t.origin}`;default:return"ì못ë ì
ë ¥"}}};function sv(){return{localeError:av()}}const cv=e=>Jt(typeof e,e),Jt=(e,n=void 0)=>{switch(e){case"number":return Number.isNaN(n)?"NaN":"skaiÄius";case"bigint":return"sveikasis skaiÄius";case"string":return"eilutÄ";case"boolean":return"loginÄ reikÅ¡mÄ";case"undefined":case"void":return"neapibrÄžta reikÅ¡mÄ";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return n===void 0?"nežinomas objektas":n===null?"nulinÄ reikÅ¡mÄ":Array.isArray(n)?"masyvas":Object.getPrototypeOf(n)!==Object.prototype&&n.constructor?n.constructor.name:"objektas";case"null":return"nulinÄ reikÅ¡mÄ"}return e},Lt=e=>e.charAt(0).toUpperCase()+e.slice(1);function fa(e){const n=Math.abs(e),r=n%10,o=n%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}const lv=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi bÅ«ti ne ilgesnÄ kaip",notInclusive:"turi bÅ«ti trumpesnÄ kaip"},bigger:{inclusive:"turi bÅ«ti ne trumpesnÄ kaip",notInclusive:"turi bÅ«ti ilgesnÄ kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi bÅ«ti ne didesnis kaip",notInclusive:"turi bÅ«ti mažesnis kaip"},bigger:{inclusive:"turi bÅ«ti ne mažesnis kaip",notInclusive:"turi bÅ«ti didesnis kaip"}}},array:{unit:{one:"elementÄ
",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turÄti ne daugiau kaip",notInclusive:"turi turÄti mažiau kaip"},bigger:{inclusive:"turi turÄti ne mažiau kaip",notInclusive:"turi turÄti daugiau kaip"}}},set:{unit:{one:"elementÄ
",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turÄti ne daugiau kaip",notInclusive:"turi turÄti mažiau kaip"},bigger:{inclusive:"turi turÄti ne mažiau kaip",notInclusive:"turi turÄti daugiau kaip"}}}};function n(o,t,i,a){const s=e[o]??null;
68return s===null?s:{unit:s.unit[t],verb:s.verb[a][i?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. paÅ¡to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmÄ",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutÄ",base64url:"base64url užkoduota eilutÄ",json_string:"JSON eilutÄ",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return o=>{switch(o.code){case"invalid_type":return`Gautas tipas ${cv(o.input)}, o tikÄtasi - ${Jt(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo bÅ«ti ${T(o.values[0])}`:`Privalo bÅ«ti vienas iÅ¡ ${N(o.values,"|")} pasirinkimų`;case"too_big":{const t=Jt(o.origin),i=n(o.origin,fa(Number(o.maximum)),o.inclusive??!1,"smaller");if(i!=null&&i.verb)return`${Lt(t??o.origin??"reikÅ¡mÄ")} ${i.verb} ${o.maximum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Lt(t??o.origin??"reikÅ¡mÄ")} turi bÅ«ti ${a} ${o.maximum.toString()} ${i==null?void 0:i.unit}`}case"too_small":{const t=Jt(o.origin),i=n(o.origin,fa(Number(o.minimum)),o.inclusive??!1,"bigger");if(i!=null&&i.verb)return`${Lt(t??o.origin??"reikÅ¡mÄ")} ${i.verb} ${o.minimum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Lt(t??o.origin??"reikÅ¡mÄ")} turi bÅ«ti ${a} ${o.minimum.toString()} ${i==null?void 0:i.unit}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`EilutÄ privalo prasidÄti "${t.prefix}"`:t.format==="ends_with"?`EilutÄ privalo pasibaigti "${t.suffix}"`:t.format==="includes"?`EilutÄ privalo įtraukti "${t.includes}"`:t.format==="regex"?`EilutÄ privalo atitikti ${t.pattern}`:`Neteisingas ${r[t.format]??o.format}`}case"not_multiple_of":return`SkaiÄius privalo bÅ«ti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${N(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const t=Jt(o.origin);return`${Lt(t??o.origin??"reikÅ¡mÄ")} turi klaidingÄ
įvestį`}default:return"Klaidinga įvestis"}}};function uv(){return{localeError:lv()}}const dv=()=>{const e={string:{unit:"знаÑи",verb:"да имааÑ"},file:{unit:"баÑÑи",verb:"да имааÑ"},array:{unit:"ÑÑавки",verb:"да имааÑ"},set:{unit:"ÑÑавки",verb:"да имааÑ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"бÑоÑ";case"object":{if(Array.isArray(t))return"низа";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"внеÑ",email:"адÑеÑа на е-поÑÑа",url:"URL",emoji:"емоÑи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO даÑÑм и вÑеме",date:"ISO даÑÑм",time:"ISO вÑеме",duration:"ISO вÑемеÑÑаеÑе",ipv4:"IPv4 адÑеÑа",ipv6:"IPv6 адÑеÑа",cidrv4:"IPv4 опÑег",cidrv6:"IPv6 опÑег",base64:"base64-енкодиÑана низа",base64url:"base64url-енкодиÑана низа",json_string:"JSON низа",e164:"E.164 бÑоÑ",jwt:"JWT",template_literal:"внеÑ"};return t=>{switch(t.code){case"invalid_type":return`ÐÑеÑен внеÑ: Ñе оÑекÑва ${t.expected}, пÑимено ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Invalid input: expected ${T(t.values[0])}`:`ÐÑеÑана опÑиÑа: Ñе оÑекÑва една ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`ÐÑÐµÐ¼Ð½Ð¾Ð³Ñ Ð³Ð¾Ð»ÐµÐ¼: Ñе оÑекÑва ${t.origin??"вÑедноÑÑа"} да има ${i}${t.maximum.toString()} ${a.unit??"елеменÑи"}`:`ÐÑÐµÐ¼Ð½Ð¾Ð³Ñ Ð³Ð¾Ð»ÐµÐ¼: Ñе оÑекÑва ${t.origin??"вÑедноÑÑа"} да биде ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`ÐÑÐµÐ¼Ð½Ð¾Ð³Ñ Ð¼Ð°Ð»: Ñе оÑекÑва ${t.origin} да има ${i}${t.minimum.toString()} ${a.unit}`:`ÐÑÐµÐ¼Ð½Ð¾Ð³Ñ Ð¼Ð°Ð»: Ñе оÑекÑва ${t.origin} да биде ${i}${t.minimum.toString()}`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`ÐеважеÑка низа: моÑа да запоÑнÑва Ñо "${i.prefix}"`:i.format==="ends_with"?`ÐеважеÑка низа: моÑа да завÑÑÑва Ñо "${i.suffix}"`:i.format==="includes"?`ÐеважеÑка низа: моÑа да вклÑÑÑва "${i.includes}"`:i.format==="regex"?`ÐеважеÑка низа: моÑа да одгоаÑа на паÑеÑÐ½Ð¾Ñ ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`ÐÑеÑен бÑоÑ: моÑа да биде делив Ñо ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"ÐепÑепознаени клÑÑеви":"ÐепÑепознаен клÑÑ"}: ${N(t.keys,", ")}`;case"invalid_key":return`ÐÑеÑен клÑÑ Ð²Ð¾ ${t.origin}`;case"invalid_union":return"ÐÑеÑен внеÑ";case"invalid_element":return`ÐÑеÑна вÑедноÑÑ Ð²Ð¾ ${t.origin}`;default:return"ÐÑеÑен внеÑ"}}};function mv(){return{localeError:dv()}}const fv=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Input tidak sah: dijangka ${t.expected}, diterima ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${T(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${N(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function hv(){return{localeError:fv()}}const pv=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>
68{switch(t.code){case"invalid_type":return`Ongeldige invoer: verwacht ${t.expected}, ontving ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${T(t.values[0])}`:`Ongeldige optie: verwacht één van ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Te lang: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Te kort: verwacht dat ${t.origin} ${i}${t.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function gv(){return{localeError:pv()}}const vv=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Ugyldig input: forventet ${t.expected}, fikk ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${T(t.values[0])}`:`Ugyldig valg: forventet en av ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ugyldig streng: må starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: må ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: må inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: må matche mønsteret ${i.pattern}`:`Ugyldig ${o[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${N(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function bv(){return{localeError:vv()}}const yv=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}}
68;function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 niÅânı",ipv6:"IPv6 niÅânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-Åifreli metin",base64url:"base64url-Åifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return t=>{switch(t.code){case"invalid_type":return`Fâsit giren: umulan ${t.expected}, alınan ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Fâsit giren: umulan ${T(t.values[0])}`:`Fâsit tercih: mûteberler ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmalıydı.`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Fâsit metin: "${i.prefix}" ile baÅlamalı.`:i.format==="ends_with"?`Fâsit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`Fâsit metin: "${i.includes}" ihtivâ etmeli.`:i.format==="regex"?`Fâsit metin: ${i.pattern} nakÅına uymalı.`:`Fâsit ${o[i.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function xv(){return{localeError:yv()}}const _v=()=>{const e={string:{unit:"تÙÚ©Ù",verb:"ÙÙØ±Ù"},file:{unit:"باÛټس",verb:"ÙÙØ±Ù"},array:{unit:"تÙÚ©Ù",verb:"ÙÙØ±Ù"},set:{unit:"تÙÚ©Ù",verb:"ÙÙØ±Ù"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"عدد";case"object":{if(Array.isArray(t))return"ارÛ";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ÙØ±ÙدÙ",email:"برÛÚÙØ§ÙÛÚ©",url:"Û٠آر اÙ",emoji:"اÛÙ
ÙØ¬Ù",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ÙÛÙ¼Ù Ø§Ù ÙØ®Øª",date:"ÙÛÙ¼Ù",time:"ÙØ®Øª",duration:"Ù
ÙØ¯Ù",ipv4:"د IPv4 پتÙ",ipv6:"د IPv6 پتÙ",cidrv4:"د IPv4 ساØÙ",cidrv6:"د IPv6 ساØÙ",base64:"base64-encoded Ù
تÙ",base64url:"base64url-encoded Ù
تÙ",json_string:"JSON Ù
تÙ",e164:"د E.164 Ø´Ù
ÛØ±Ù",jwt:"JWT",template_literal:"ÙØ±ÙدÙ"};return t=>{switch(t.code){case"invalid_type":return`ÙØ§Ø³Ù
ÙØ±ÙدÙ: Ø¨Ø§ÛØ¯ ${t.expected} ÙØ§Û, Ù
ګر ${r(t.input)} ØªØ±ÙØ§Ø³Ù Ø´Ù`;case"invalid_value":return t.values.length===1?`ÙØ§Ø³Ù
ÙØ±ÙدÙ: Ø¨Ø§ÛØ¯ ${T(t.values[0])} ÙØ§Û`:`ÙØ§Ø³Ù
Ø§ÙØªØ®Ø§Ø¨: Ø¨Ø§ÛØ¯ ÛÙ ÙÙ ${N(t.values,"|")} Ú
Ø®Ù ÙØ§Û`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`ÚÛØ± ÙÙÛ: ${t.origin??"Ø§Ø±Ø²ÚØª"} Ø¨Ø§ÛØ¯ ${i}${t.maximum.toString()} ${a.unit??"Ø¹ÙØµØ±ÙÙÙ"} ÙÙØ±Ù`:`ÚÛØ± ÙÙÛ: ${t.origin??"Ø§Ø±Ø²ÚØª"} Ø¨Ø§ÛØ¯ ${i}${t.maximum.toString()} ÙÙ`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`ÚÛØ± Ú©ÙÚÙÛ: ${t.origin} Ø¨Ø§ÛØ¯ ${i}${t.minimum.toString()} ${a.unit} ÙÙØ±Ù`:`ÚÛØ± Ú©ÙÚÙÛ: ${t.origin} Ø¨Ø§ÛØ¯ ${i}${t.minimum.toString()} ÙÙ`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`ÙØ§Ø³Ù
Ù
تÙ: Ø¨Ø§ÛØ¯ د "${i.prefix}" سر٠پÛÙ Ø´Ù`:i.format==="ends_with"?`ÙØ§Ø³Ù
Ù
تÙ: Ø¨Ø§ÛØ¯ د "${i.suffix}" Ø³Ø±Ù Ù¾Ø§Û ØªÙ ÙØ±Ø³ÙÚÙ`:i.format==="includes"?`ÙØ§Ø³Ù
Ù
تÙ: Ø¨Ø§ÛØ¯ "${i.includes}" ÙÙØ±Ù`:i.format==="regex"?`ÙØ§Ø³Ù
Ù
تÙ: Ø¨Ø§ÛØ¯ د ${i.pattern} سر٠Ù
Ø·Ø§Ø¨ÙØª ÙÙØ±Ù`:`${o[i.format]??t.format} ÙØ§Ø³Ù
دÛ`}case"not_multiple_of":return`ÙØ§Ø³Ù
عدد: Ø¨Ø§ÛØ¯ د ${t.divisor} Ù
ضرب ÙÙ`;case"unrecognized_keys":return`ÙØ§Ø³Ù
${t.keys.length>1?"Ú©ÙÛÚÙÙÙ":"Ú©ÙÛÚ"}: ${N(t.keys,", ")}`;case"invalid_key":return`ÙØ§Ø³Ù
Ú©ÙÛÚ Ù¾Ù ${t.origin} Ú©Û`;case"invalid_union":return"ÙØ§Ø³Ù
Ù ÙØ±ÙدÙ";case"invalid_element":return`ÙØ§Ø³Ù
Ø¹ÙØµØ± Ù¾Ù ${t.origin} Ú©Û`;default:return"ÙØ§Ø³Ù
Ù ÙØ±ÙدÙ"}}};function $v(){return{localeError:_v()}}const wv=()=>{const e={string:{unit:"znaków",verb:"mieÄ"},file:{unit:"bajtów",verb:"mieÄ"},array:{unit:"elementów",verb:"mieÄ"},set:{unit:"elementów",verb:"mieÄ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciÄ
g znaków zakodowany w formacie base64",base64url:"ciÄ
g znaków zakodowany w formacie base64url",json_string:"ciÄ
g znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejÅcie"};return t=>{switch(t.code){case"invalid_type":return`NieprawidÅowe dane wejÅciowe: oczekiwano ${t.expected}, otrzymano ${r(t.input)}`;case"invalid_value":return t.values.length===1?`NieprawidÅowe dane wejÅciowe: oczekiwano ${T(t.values[0])}`:`NieprawidÅowa opcja: oczekiwano jednej z wartoÅci ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Za duża wartoÅÄ: oczekiwano, że ${t.origin??"wartoÅÄ"} bÄdzie mieÄ ${i}${t.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartoÅÄ"} bÄdzie wynosiÄ ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Za maÅa wartoÅÄ: oczekiwano, że ${t.origin??"wartoÅÄ"} bÄdzie mieÄ ${i}${t.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt maÅ(y/a/e): oczekiwano, że ${t.origin??"wartoÅÄ"} bÄdzie wynosiÄ ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`NieprawidÅowy ciÄ
g znaków: musi zaczynaÄ siÄ od "${i.prefix}"`:i.format==="ends_with"?`NieprawidÅowy ciÄ
g znaków: musi koÅczyÄ siÄ na "${i.suffix}"`:i.format==="includes"?`NieprawidÅowy ciÄ
g znaków: musi zawieraÄ "${i.includes}"`:i.format==="regex"?`NieprawidÅowy ciÄ
g znaków: musi odpowiadaÄ wzorcowi ${i.pattern}`:`NieprawidÅow(y/a/e) ${o[i.format]??t.format}`}case"not_multiple_of":return`NieprawidÅowa liczba: musi byÄ wielokrotnoÅciÄ
${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`NieprawidÅowy klucz w ${t.origin}`;case"invalid_union":return"NieprawidÅowe dane wejÅciowe";case"invalid_element":return`NieprawidÅowa wartoÅÄ w ${t.origin}`;default:return"NieprawidÅowe dane wejÅciowe"}}};function kv(){return{localeError:wv()}}const Sv=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"número";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return t=>
68{switch(t.code){case"invalid_type":return`Tipo inválido: esperado ${t.expected}, recebido ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inválida: esperado ${T(t.values[0])}`:`Opção inválida: esperada uma das ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Texto inválido: deve começar com "${i.prefix}"`:i.format==="ends_with"?`Texto inválido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inválido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inválido: deve corresponder ao padrão ${i.pattern}`:`${o[i.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${N(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function Iv(){return{localeError:Sv()}}function ha(e,n,r,o){const t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?n:i>=2&&i<=4?r:o}const jv=()=>{const e={string:{unit:{one:"Ñимвол",few:"Ñимвола",many:"Ñимволов"},verb:"имеÑÑ"},file:{unit:{one:"байÑ",few:"байÑа",many:"байÑ"},verb:"имеÑÑ"},array:{unit:{one:"ÑлеменÑ",few:"ÑлеменÑа",many:"ÑлеменÑов"},verb:"имеÑÑ"},set:{unit:{one:"ÑлеменÑ",few:"ÑлеменÑа",many:"ÑлеменÑов"},verb:"имеÑÑ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"ÑиÑло";case"object":{if(Array.isArray(t))return"маÑÑив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ввод",email:"email адÑеÑ",url:"URL",emoji:"Ñмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO даÑа и вÑемÑ",date:"ISO даÑа",time:"ISO вÑемÑ",duration:"ISO длиÑелÑноÑÑÑ",ipv4:"IPv4 адÑеÑ",ipv6:"IPv6 адÑеÑ",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"ÑÑÑока в ÑоÑмаÑе base64",base64url:"ÑÑÑока в ÑоÑмаÑе base64url",json_string:"JSON ÑÑÑока",e164:"Ð½Ð¾Ð¼ÐµÑ E.164",jwt:"JWT",template_literal:"ввод"};return t=>{switch(t.code){case"invalid_type":return`ÐевеÑнÑй ввод: ожидалоÑÑ ${t.expected}, полÑÑено ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ÐевеÑнÑй ввод: ожидалоÑÑ ${T(t.values[0])}`:`ÐевеÑнÑй ваÑианÑ: ожидалоÑÑ Ð¾Ð´Ð½Ð¾ из ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);if(a){const s=Number(t.maximum),c=ha(s,a.unit.one,a.unit.few,a.unit.many);return`СлиÑком болÑÑое знаÑение: ожидалоÑÑ, ÑÑо ${t.origin??"знаÑение"} бÑÐ´ÐµÑ Ð¸Ð¼ÐµÑÑ ${i}${t.maximum.toString()} ${c}`}return`СлиÑком болÑÑое знаÑение: ожидалоÑÑ, ÑÑо ${t.origin??"знаÑение"} бÑÐ´ÐµÑ ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);if(a){const s=Number(t.minimum),c=ha(s,a.unit.one,a.unit.few,a.unit.many);return`СлиÑком маленÑкое знаÑение: ожидалоÑÑ, ÑÑо ${t.origin} бÑÐ´ÐµÑ Ð¸Ð¼ÐµÑÑ ${i}${t.minimum.toString()} ${c}`}return`СлиÑком маленÑкое знаÑение: ожидалоÑÑ, ÑÑо ${t.origin} бÑÐ´ÐµÑ ${i}${t.minimum.toString()}`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`ÐевеÑÐ½Ð°Ñ ÑÑÑока: должна наÑинаÑÑÑÑ Ñ "${i.prefix}"`:i.format==="ends_with"?`ÐевеÑÐ½Ð°Ñ ÑÑÑока: должна заканÑиваÑÑÑÑ Ð½Ð° "${i.suffix}"`:i.format==="includes"?`ÐевеÑÐ½Ð°Ñ ÑÑÑока: должна ÑодеÑжаÑÑ "${i.includes}"`:i.format==="regex"?`ÐевеÑÐ½Ð°Ñ ÑÑÑока: должна ÑооÑвеÑÑÑвоваÑÑ ÑÐ°Ð±Ð»Ð¾Ð½Ñ ${i.pattern}`:`ÐевеÑнÑй ${o[i.format]??t.format}`}case"not_multiple_of":return`ÐевеÑное ÑиÑло: должно бÑÑÑ ÐºÑаÑнÑм ${t.divisor}`;case"unrecognized_keys":return`ÐеÑаÑпознанн${t.keys.length>1?"Ñе":"Ñй"} клÑÑ${t.keys.length>1?"и":""}: ${N(t.keys,", ")}`;case"invalid_key":return`ÐевеÑнÑй клÑÑ Ð² ${t.origin}`;case"invalid_union":return"ÐевеÑнÑе вÑ
однÑе даннÑе";case"invalid_element":return`ÐевеÑное знаÑение в ${t.origin}`;default:return"ÐевеÑнÑе вÑ
однÑе даннÑе"}}};function Nv(){return{localeError:jv()}}const zv=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"Å¡tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"vnos",email:"e-poÅ¡tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in Äas",date:"ISO datum",time:"ISO Äas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 Å¡tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{switch(t.code){case"invalid_type":return`Neveljaven vnos: priÄakovano ${t.expected}, prejeto ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Neveljaven vnos: priÄakovano ${T(t.values[0])}`:`Neveljavna možnost: priÄakovano eno izmed ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Preveliko: priÄakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: priÄakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Premajhno: priÄakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${a.unit}`:`Premajhno: priÄakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Neveljaven niz: mora se zaÄeti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se konÄati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno Å¡tevilo: mora biti veÄkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i kljuÄi":" kljuÄ"}: ${N(t.keys,", ")}`;case"invalid_key":return`Neveljaven kljuÄ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Ov(){return{localeError:zv()}}const Ev=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehÃ¥lla"},set:{unit:"objekt",verb:"att innehÃ¥lla"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return t=>
68{switch(t.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${t.expected}, fick ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ogiltig inmatning: förväntat ${T(t.values[0])}`:`Ogiltigt val: förväntade en av ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`För stor(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ogiltig sträng: mÃ¥ste börja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig sträng: mÃ¥ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig sträng: mÃ¥ste innehÃ¥lla "${i.includes}"`:i.format==="regex"?`Ogiltig sträng: mÃ¥ste matcha mönstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: mÃ¥ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${N(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function Tv(){return{localeError:Ev()}}const Pv=()=>{const e={string:{unit:"à®à®´à¯à®¤à¯à®¤à¯à®à¯à®à®³à¯",verb:"à®à¯à®£à¯à®à®¿à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯"},file:{unit:"பà¯à®à¯à®à¯à®à®³à¯",verb:"à®à¯à®£à¯à®à®¿à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯"},array:{unit:"à®à®±à¯à®ªà¯à®ªà¯à®à®³à¯",verb:"à®à¯à®£à¯à®à®¿à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯"},set:{unit:"à®à®±à¯à®ªà¯à®ªà¯à®à®³à¯",verb:"à®à¯à®£à¯à®à®¿à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"à®à®£à¯ à®
லà¯à®²à®¾à®¤à®¤à¯":"à®à®£à¯";case"object":{if(Array.isArray(t))return"à®
ணி";
68if(t===null)return"வà¯à®±à¯à®®à¯";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"à®à®³à¯à®³à¯à®à¯",email:"மினà¯à®©à®à¯à®à®²à¯ à®®à¯à®à®µà®°à®¿",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தà¯à®¤à®¿ நà¯à®°à®®à¯",date:"ISO தà¯à®¤à®¿",time:"ISO நà¯à®°à®®à¯",duration:"ISO à®à®¾à®² à®
ளவà¯",ipv4:"IPv4 à®®à¯à®à®µà®°à®¿",ipv6:"IPv6 à®®à¯à®à®µà®°à®¿",cidrv4:"IPv4 வரமà¯à®ªà¯",cidrv6:"IPv6 வரமà¯à®ªà¯",base64:"base64-encoded à®à®°à®®à¯",base64url:"base64url-encoded à®à®°à®®à¯",json_string:"JSON à®à®°à®®à¯",e164:"E.164 à®à®£à¯",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`தவறான à®à®³à¯à®³à¯à®à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${t.expected}, பà¯à®±à®ªà¯à®ªà®à¯à®à®¤à¯ ${r(t.input)}`;case"invalid_value":return t.values.length===1?`தவறான à®à®³à¯à®³à¯à®à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${T(t.values[0])}`:`தவறான விரà¯à®ªà¯à®ªà®®à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${N(t.values,"|")} à®à®²à¯ à®à®©à¯à®±à¯`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`மி஠பà¯à®°à®¿à®¯à®¤à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${t.origin??"மதிபà¯à®ªà¯"} ${i}${t.maximum.toString()} ${a.unit??"à®à®±à¯à®ªà¯à®ªà¯à®à®³à¯"} à®à® à®à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯`:`மி஠பà¯à®°à®¿à®¯à®¤à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${t.origin??"மதிபà¯à®ªà¯"} ${i}${t.maximum.toString()} à®à® à®à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`மிà®à®à¯ à®à®¿à®±à®¿à®¯à®¤à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${t.origin} ${i}${t.minimum.toString()} ${a.unit} à®à® à®à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯`:`மிà®à®à¯ à®à®¿à®±à®¿à®¯à®¤à¯: à®à®¤à®¿à®°à¯à®ªà®¾à®°à¯à®à¯à®à®ªà¯à®ªà®à¯à®à®¤à¯ ${t.origin} ${i}${t.minimum.toString()} à®à® à®à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯`}case"invalid_format":{const i=t;return i.format==="starts_with"?`தவறான à®à®°à®®à¯: "${i.prefix}" à®à®²à¯ தà¯à®à®à¯à® வà¯à®£à¯à®à¯à®®à¯`:i.format==="ends_with"?`தவறான à®à®°à®®à¯: "${i.suffix}" à®à®²à¯ à®®à¯à®à®¿à®µà®à¯à®¯ வà¯à®£à¯à®à¯à®®à¯`:i.format==="includes"?`தவறான à®à®°à®®à¯: "${i.includes}" à® à®à®³à¯à®³à®à®à¯à® வà¯à®£à¯à®à¯à®®à¯`:i.format==="regex"?`தவறான à®à®°à®®à¯: ${i.pattern} à®®à¯à®±à¯à®ªà®¾à®à¯à®à¯à®à®©à¯ பà¯à®°à¯à®¨à¯à®¤ வà¯à®£à¯à®à¯à®®à¯`:`தவறான ${o[i.format]??t.format}`}case"not_multiple_of":return`தவறான à®à®£à¯: ${t.divisor} à®à®©à¯ பலமா஠à®à®°à¯à®à¯à® வà¯à®£à¯à®à¯à®®à¯`;case"unrecognized_keys":return`à®
à®à¯à®¯à®¾à®³à®®à¯ தà¯à®°à®¿à®¯à®¾à®¤ விà®à¯${t.keys.length>1?"à®à®³à¯":""}: ${N(t.keys,", ")}`;case"invalid_key":return`${t.origin} à®à®²à¯ தவறான விà®à¯`;case"invalid_union":return"தவறான à®à®³à¯à®³à¯à®à¯";case"invalid_element":return`${t.origin} à®à®²à¯ தவறான மதிபà¯à®ªà¯`;default:return"தவறான à®à®³à¯à®³à¯à®à¯"}}};function Uv(){return{localeError:Pv()}}const Cv=()=>{const e={string:{unit:"à¸à¸±à¸§à¸à¸±à¸à¸©à¸£",verb:"à¸à¸§à¸£à¸¡à¸µ"},file:{unit:"à¹à¸à¸à¹",verb:"à¸à¸§à¸£à¸¡à¸µ"},array:{unit:"รายà¸à¸²à¸£",verb:"à¸à¸§à¸£à¸¡à¸µ"},set:{unit:"รายà¸à¸²à¸£",verb:"à¸à¸§à¸£à¸¡à¸µ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"à¹à¸¡à¹à¹à¸à¹à¸à¸±à¸§à¹à¸¥à¸ (NaN)":"à¸à¸±à¸§à¹à¸¥à¸";case"object":{if(Array.isArray(t))return"à¸à¸²à¸£à¹à¹à¸£à¸¢à¹ (Array)";if(t===null)return"à¹à¸¡à¹à¸¡à¸µà¸à¹à¸² (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸µà¹à¸à¹à¸à¸",email:"à¸à¸µà¹à¸à¸¢à¸¹à¹à¸à¸µà¹à¸¡à¸¥",url:"URL",emoji:"à¸à¸´à¹à¸¡à¸à¸´",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วัà¸à¸à¸µà¹à¹à¸§à¸¥à¸²à¹à¸à¸ ISO",date:"วัà¸à¸à¸µà¹à¹à¸à¸ ISO",time:"à¹à¸§à¸¥à¸²à¹à¸à¸ ISO",duration:"à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¹à¸à¸ ISO",ipv4:"à¸à¸µà¹à¸à¸¢à¸¹à¹ IPv4",ipv6:"à¸à¸µà¹à¸à¸¢à¸¹à¹ IPv6",cidrv4:"à¸à¹à¸§à¸ IP à¹à¸à¸ IPv4",cidrv6:"à¸à¹à¸§à¸ IP à¹à¸à¸ IPv6",base64:"à¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¸ Base64",base64url:"à¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¸ Base64 สำหรัภURL",json_string:"à¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¸ JSON",e164:"à¹à¸à¸à¸£à¹à¹à¸à¸£à¸¨à¸±à¸à¸à¹à¸£à¸°à¸«à¸§à¹à¸²à¸à¸à¸£à¸°à¹à¸à¸¨ (E.164)",jwt:"à¹à¸à¹à¸à¸ JWT",template_literal:"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸µà¹à¸à¹à¸à¸"};return t=>
68{switch(t.code){case"invalid_type":return`à¸à¸£à¸°à¹à¸ à¸à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¸§à¸£à¹à¸à¹à¸ ${t.expected} à¹à¸à¹à¹à¸à¹à¸£à¸±à¸ ${r(t.input)}`;case"invalid_value":return t.values.length===1?`à¸à¹à¸²à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¸§à¸£à¹à¸à¹à¸ ${T(t.values[0])}`:`à¸à¸±à¸§à¹à¸¥à¸·à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¸§à¸£à¹à¸à¹à¸à¸«à¸à¸¶à¹à¸à¹à¸ ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"à¹à¸¡à¹à¹à¸à¸´à¸":"à¸à¹à¸à¸¢à¸à¸§à¹à¸²",a=n(t.origin);return a?`à¹à¸à¸´à¸à¸à¸³à¸«à¸à¸: ${t.origin??"à¸à¹à¸²"} à¸à¸§à¸£à¸¡à¸µ${i} ${t.maximum.toString()} ${a.unit??"รายà¸à¸²à¸£"}`:`à¹à¸à¸´à¸à¸à¸³à¸«à¸à¸: ${t.origin??"à¸à¹à¸²"} à¸à¸§à¸£à¸¡à¸µ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"à¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢":"มาà¸à¸à¸§à¹à¸²",a=n(t.origin);return a?`à¸à¹à¸à¸¢à¸à¸§à¹à¸²à¸à¸³à¸«à¸à¸: ${t.origin} à¸à¸§à¸£à¸¡à¸µ${i} ${t.minimum.toString()} ${a.unit}`:`à¸à¹à¸à¸¢à¸à¸§à¹à¸²à¸à¸³à¸«à¸à¸: ${t.origin} à¸à¸§à¸£à¸¡à¸µ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`รูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¹à¸à¸à¸à¸¶à¹à¸à¸à¹à¸à¸à¹à¸§à¸¢ "${i.prefix}"`:i.format==="ends_with"?`รูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¹à¸à¸à¸¥à¸à¸à¹à¸²à¸¢à¸à¹à¸§à¸¢ "${i.suffix}"`:i.format==="includes"?`รูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¹à¸à¸à¸¡à¸µ "${i.includes}" à¸à¸¢à¸¹à¹à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡`:i.format==="regex"?`รูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¹à¸à¸à¸à¸£à¸à¸à¸±à¸à¸£à¸¹à¸à¹à¸à¸à¸à¸µà¹à¸à¸³à¸«à¸à¸ ${i.pattern}`:`รูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: ${o[i.format]??t.format}`}case"not_multiple_of":return`à¸à¸±à¸§à¹à¸¥à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¸à¹à¸à¸à¹à¸à¹à¸à¸à¸³à¸à¸§à¸à¸à¸µà¹à¸«à¸²à¸£à¸à¹à¸§à¸¢ ${t.divisor} à¹à¸à¹à¸¥à¸à¸à¸±à¸§`;case"unrecognized_keys":return`à¸à¸à¸à¸µà¸¢à¹à¸à¸µà¹à¹à¸¡à¹à¸£à¸¹à¹à¸à¸±à¸: ${N(t.keys,", ")}`;case"invalid_key":return`à¸à¸µà¸¢à¹à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸à¹à¸ ${t.origin}`;case"invalid_union":return"à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸: à¹à¸¡à¹à¸à¸£à¸à¸à¸±à¸à¸£à¸¹à¸à¹à¸à¸à¸¢à¸¹à¹à¸à¸µà¸¢à¸à¸à¸µà¹à¸à¸³à¸«à¸à¸à¹à¸§à¹";case"invalid_element":return`à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸à¹à¸ ${t.origin}`;default:return"à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸"}}};function Rv(){return{localeError:Cv()}}const Av=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},Dv=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öÄe",verb:"olmalı"},set:{unit:"öÄe",verb:"olmalı"}};function n(o){return e[o]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralıÄı",cidrv6:"IPv6 aralıÄı",base64:"base64 ile ÅifrelenmiÅ metin",base64url:"base64url ile ÅifrelenmiÅ metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Åablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Geçersiz deÄer: beklenen ${o.expected}, alınan ${Av(o.input)}`;case"invalid_value":return o.values.length===1?`Geçersiz deÄer: beklenen ${T(o.values[0])}`:`Geçersiz seçenek: aÅaÄıdakilerden biri olmalı: ${N(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Ãok büyük: beklenen ${o.origin??"deÄer"} ${t}${o.maximum.toString()} ${i.unit??"öÄe"}`:`Ãok büyük: beklenen ${o.origin??"deÄer"} ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Ãok küçük: beklenen ${o.origin} ${t}${o.minimum.toString()} ${i.unit}`:`Ãok küçük: beklenen ${o.origin} ${t}${o.minimum.toString()}`}
68case"invalid_format":{const t=o;return t.format==="starts_with"?`Geçersiz metin: "${t.prefix}" ile baÅlamalı`:t.format==="ends_with"?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format==="includes"?`Geçersiz metin: "${t.includes}" içermeli`:t.format==="regex"?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${r[t.format]??o.format}`}case"not_multiple_of":return`Geçersiz sayı: ${o.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${o.keys.length>1?"lar":""}: ${N(o.keys,", ")}`;case"invalid_key":return`${o.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz deÄer";case"invalid_element":return`${o.origin} içinde geçersiz deÄer`;default:return"Geçersiz deÄer"}}};function Lv(){return{localeError:Dv()}}const Zv=()=>{const e={string:{unit:"ÑимволÑв",verb:"маÑиме"},file:{unit:"байÑÑв",verb:"маÑиме"},array:{unit:"елеменÑÑв",verb:"маÑиме"},set:{unit:"елеменÑÑв",verb:"маÑиме"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"ÑиÑло";case"object":{if(Array.isArray(t))return"маÑив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"вÑ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ",email:"адÑеÑа елекÑÑÐ¾Ð½Ð½Ð¾Ñ Ð¿Ð¾ÑÑи",url:"URL",emoji:"емодзÑ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"даÑа Ñа ÑÐ°Ñ ISO",date:"даÑа ISO",time:"ÑÐ°Ñ ISO",duration:"ÑÑивалÑÑÑÑ ISO",ipv4:"адÑеÑа IPv4",ipv6:"адÑеÑа IPv6",cidrv4:"дÑапазон IPv4",cidrv6:"дÑапазон IPv6",base64:"ÑÑдок Ñ ÐºÐ¾Ð´ÑÐ²Ð°Ð½Ð½Ñ base64",base64url:"ÑÑдок Ñ ÐºÐ¾Ð´ÑÐ²Ð°Ð½Ð½Ñ base64url",json_string:"ÑÑдок JSON",e164:"Ð½Ð¾Ð¼ÐµÑ E.164",jwt:"JWT",template_literal:"вÑ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ"};return t=>{switch(t.code){case"invalid_type":return`ÐепÑавилÑÐ½Ñ Ð²Ñ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ: оÑÑкÑÑÑÑÑÑ ${t.expected}, оÑÑимано ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ÐепÑавилÑÐ½Ñ Ð²Ñ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ: оÑÑкÑÑÑÑÑÑ ${T(t.values[0])}`:`ÐепÑавилÑна опÑÑÑ: оÑÑкÑÑÑÑÑÑ Ð¾Ð´Ð½Ðµ з ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`ÐанадÑо велике: оÑÑкÑÑÑÑÑÑ, Ñо ${t.origin??"знаÑеннÑ"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"елеменÑÑв"}`:`ÐанадÑо велике: оÑÑкÑÑÑÑÑÑ, Ñо ${t.origin??"знаÑеннÑ"} бÑде ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`ÐанадÑо мале: оÑÑкÑÑÑÑÑÑ, Ñо ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`ÐанадÑо мале: оÑÑкÑÑÑÑÑÑ, Ñо ${t.origin} бÑде ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ÐепÑавилÑний ÑÑдок: повинен поÑинаÑиÑÑ Ð· "${i.prefix}"`:i.format==="ends_with"?`ÐепÑавилÑний ÑÑдок: повинен закÑнÑÑваÑиÑÑ Ð½Ð° "${i.suffix}"`:i.format==="includes"?`ÐепÑавилÑний ÑÑдок: повинен мÑÑÑиÑи "${i.includes}"`:i.format==="regex"?`ÐепÑавилÑний ÑÑдок: повинен вÑдповÑдаÑи ÑÐ°Ð±Ð»Ð¾Ð½Ñ ${i.pattern}`:`ÐепÑавилÑний ${o[i.format]??t.format}`}case"not_multiple_of":return`ÐепÑавилÑне ÑиÑло: повинно бÑÑи кÑаÑним ${t.divisor}`;case"unrecognized_keys":return`ÐеÑозпÑзнаний клÑÑ${t.keys.length>1?"Ñ":""}: ${N(t.keys,", ")}`;case"invalid_key":return`ÐепÑавилÑний клÑÑ Ñ ${t.origin}`;case"invalid_union":return"ÐепÑавилÑÐ½Ñ Ð²Ñ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ";case"invalid_element":return`ÐепÑавилÑне знаÑÐµÐ½Ð½Ñ Ñ ${t.origin}`;default:return"ÐепÑавилÑÐ½Ñ Ð²Ñ
ÑÐ´Ð½Ñ Ð´Ð°Ð½Ñ"}}};function Kl(){return{localeError:Zv()}}function Mv(){return Kl()}const Fv=()=>{const e={string:{unit:"ØØ±ÙÙ",verb:"ÛÙÙØ§"},file:{unit:"بائٹس",verb:"ÛÙÙØ§"},array:{unit:"آئٹÙ
ز",verb:"ÛÙÙØ§"},set:{unit:"آئٹÙ
ز",verb:"ÛÙÙØ§"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"ÙÙ
بر";case"object":{if(Array.isArray(t))return"آرÛ";if(t===null)return"ÙÙ";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ا٠پٹ",email:"Ø§Û Ù
Û٠اÛÚØ±Ûس",url:"Û٠آر اÛÙ",emoji:"اÛÙ
ÙØ¬Û",uuid:"ÛÙ ÛÙ Ø¢Ø¦Û ÚÛ",uuidv4:"ÛÙ ÛÙ Ø¢Ø¦Û ÚÛ ÙÛ 4",uuidv6:"ÛÙ ÛÙ Ø¢Ø¦Û ÚÛ ÙÛ 6",nanoid:"ÙÛÙÙ Ø¢Ø¦Û ÚÛ",guid:"Ø¬Û ÛÙ Ø¢Ø¦Û ÚÛ",cuid:"Ø³Û ÛÙ Ø¢Ø¦Û ÚÛ",cuid2:"Ø³Û ÛÙ Ø¢Ø¦Û ÚÛ 2",ulid:"Û٠اÛÙ Ø¢Ø¦Û ÚÛ",xid:"اÛکس Ø¢Ø¦Û ÚÛ",ksuid:"Ú©Û Ø§ÛØ³ ÛÙ Ø¢Ø¦Û ÚÛ",datetime:"Ø¢Ø¦Û Ø§ÛØ³ ا٠ÚÛÙ¹ ٹائÙ
",date:"Ø¢Ø¦Û Ø§ÛØ³ Ø§Ù ØªØ§Ø±ÛØ®",time:"Ø¢Ø¦Û Ø§ÛØ³ ا٠ÙÙØª",duration:"Ø¢Ø¦Û Ø§ÛØ³ ا٠Ù
دت",ipv4:"Ø¢Ø¦Û Ù¾Û ÙÛ 4 اÛÚØ±Ûس",ipv6:"Ø¢Ø¦Û Ù¾Û ÙÛ 6 اÛÚØ±Ûس",cidrv4:"Ø¢Ø¦Û Ù¾Û ÙÛ 4 رÛÙØ¬",cidrv6:"Ø¢Ø¦Û Ù¾Û ÙÛ 6 رÛÙØ¬",base64:"Ø¨ÛØ³ 64 ا٠کÙÚÚ Ø³Ù¹Ø±ÙÚ¯",base64url:"Ø¨ÛØ³ 64 Û٠آر اÛ٠ا٠کÙÚÚ Ø³Ù¹Ø±ÙÚ¯",json_string:"Ø¬Û Ø§ÛØ³ ا٠اÛ٠سٹرÙÚ¯",e164:"Ø§Û 164 ÙÙ
بر",jwt:"Ø¬Û ÚØ¨ÙÛÙ Ù¹Û",template_literal:"ا٠پٹ"};return t=>
68{switch(t.code){case"invalid_type":return`ØºÙØ· ا٠پٹ: ${t.expected} Ù
تÙÙØ¹ ØªÚ¾Ø§Ø ${r(t.input)} Ù
ÙØµÙÙ ÛÙØ§`;case"invalid_value":return t.values.length===1?`ØºÙØ· ا٠پٹ: ${T(t.values[0])} Ù
تÙÙØ¹ تھا`:`ØºÙØ· آپشÙ: ${N(t.values,"|")} Ù
ÛÚº Ø³Û Ø§ÛÚ© Ù
تÙÙØ¹ تھا`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Ø¨ÛØª Ø¨ÚØ§: ${t.origin??"ÙÛÙÛÙ"} Ú©Û ${i}${t.maximum.toString()} ${a.unit??"Ø¹ÙØ§ØµØ±"} ÛÙÙÛ Ù
تÙÙØ¹ تھÛ`:`Ø¨ÛØª Ø¨ÚØ§: ${t.origin??"ÙÛÙÛÙ"} کا ${i}${t.maximum.toString()} ÛÙÙØ§ Ù
تÙÙØ¹ تھا`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Ø¨ÛØª ÚÚ¾Ùٹا: ${t.origin} Ú©Û ${i}${t.minimum.toString()} ${a.unit} ÛÙÙÛ Ù
تÙÙØ¹ تھÛ`:`Ø¨ÛØª ÚÚ¾Ùٹا: ${t.origin} کا ${i}${t.minimum.toString()} ÛÙÙØ§ Ù
تÙÙØ¹ تھا`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ØºÙØ· سٹرÙÚ¯: "${i.prefix}" Ø³Û Ø´Ø±ÙØ¹ ÛÙÙØ§ ÚØ§ÛÛÛ`:i.format==="ends_with"?`ØºÙØ· سٹرÙÚ¯: "${i.suffix}" پر ختÙ
ÛÙÙØ§ ÚØ§ÛÛÛ`:i.format==="includes"?`ØºÙØ· سٹرÙÚ¯: "${i.includes}" شاÙ
Ù ÛÙÙØ§ ÚØ§ÛÛÛ`:i.format==="regex"?`ØºÙØ· سٹرÙÚ¯: Ù¾Ûٹر٠${i.pattern} Ø³Û Ù
ÛÚ ÛÙÙØ§ ÚØ§ÛÛÛ`:`ØºÙØ· ${o[i.format]??t.format}`}case"not_multiple_of":return`ØºÙØ· ÙÙ
بر: ${t.divisor} کا Ù
ضاع٠ÛÙÙØ§ ÚØ§ÛÛÛ`;case"unrecognized_keys":return`ØºÛØ± تسÙÛÙ
Ø´Ø¯Û Ú©Û${t.keys.length>1?"ز":""}: ${N(t.keys,"Ø ")}`;case"invalid_key":return`${t.origin} Ù
ÛÚº ØºÙØ· Ú©Û`;case"invalid_union":return"ØºÙØ· ا٠پٹ";case"invalid_element":return`${t.origin} Ù
ÛÚº ØºÙØ· ÙÛÙÛÙ`;default:return"ØºÙØ· ا٠پٹ"}}};function Bv(){return{localeError:Fv()}}const Jv=()=>{const e={string:{unit:"ký tá»±",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tá»",verb:"có"},set:{unit:"phần tá»",verb:"có"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"sá»";case"object":{if(Array.isArray(t))return"mảng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"Äầu và o",email:"Äá»a chá» email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngà y giá» ISO",date:"ngà y ISO",time:"giá» ISO",duration:"khoảng thá»i gian ISO",ipv4:"Äá»a chá» IPv4",ipv6:"Äá»a chá» IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuá»i mã hóa base64",base64url:"chuá»i mã hóa base64url",json_string:"chuá»i JSON",e164:"sá» E.164",jwt:"JWT",template_literal:"Äầu và o"};return t=>{switch(t.code){case"invalid_type":return`Äầu và o không hợp lá»: mong Äợi ${t.expected}, nháºn ÄÆ°á»£c ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Äầu và o không hợp lá»: mong Äợi ${T(t.values[0])}`:`Tùy chá»n không hợp lá»: mong Äợi má»t trong các giá trá» ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Quá lá»n: mong Äợi ${t.origin??"giá trá»"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"phần tá»"}`:`Quá lá»n: mong Äợi ${t.origin??"giá trá»"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Quá nhá»: mong Äợi ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Quá nhá»: mong Äợi ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chuá»i không hợp lá»: phải bắt Äầu bằng "${i.prefix}"`:i.format==="ends_with"?`Chuá»i không hợp lá»: phải kết thúc bằng "${i.suffix}"`:i.format==="includes"?`Chuá»i không hợp lá»: phải bao gá»m "${i.includes}"`:i.format==="regex"?`Chuá»i không hợp lá»: phải khá»p vá»i mẫu ${i.pattern}`:`${o[i.format]??t.format} không hợp lá»`}case"not_multiple_of":return`Sá» không hợp lá»: phải là bá»i sá» cá»§a ${t.divisor}`;case"unrecognized_keys":return`Khóa không ÄÆ°á»£c nháºn dạng: ${N(t.keys,", ")}`;
68case"invalid_key":return`Khóa không hợp lá» trong ${t.origin}`;case"invalid_union":return"Äầu và o không hợp lá»";case"invalid_element":return`Giá trá» không hợp lá» trong ${t.origin}`;default:return"Äầu và o không hợp lá»"}}};function Gv(){return{localeError:Jv()}}const Wv=()=>{const e={string:{unit:"å符",verb:"å
å«"},file:{unit:"åè",verb:"å
å«"},array:{unit:"项",verb:"å
å«"},set:{unit:"项",verb:"å
å«"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"éæ°å(NaN)":"æ°å";case"object":{if(Array.isArray(t))return"æ°ç»";if(t===null)return"空å¼(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"è¾å
¥",email:"çµåé®ä»¶",url:"URL",emoji:"表æ
符å·",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISOæ¥ææ¶é´",date:"ISOæ¥æ",time:"ISOæ¶é´",duration:"ISOæ¶é¿",ipv4:"IPv4å°å",ipv6:"IPv6å°å",cidrv4:"IPv4ç½æ®µ",cidrv6:"IPv6ç½æ®µ",base64:"base64ç¼ç å符串",base64url:"base64urlç¼ç å符串",json_string:"JSONå符串",e164:"E.164å·ç ",jwt:"JWT",template_literal:"è¾å
¥"};return t=>{switch(t.code){case"invalid_type":return`æ æè¾å
¥ï¼ææ ${t.expected}ï¼å®é
æ¥æ¶ ${r(t.input)}`;case"invalid_value":return t.values.length===1?`æ æè¾å
¥ï¼ææ ${T(t.values[0])}`:`æ æéé¡¹ï¼ææä»¥ä¸ä¹ä¸ ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`æ°å¼è¿å¤§ï¼ææ ${t.origin??"å¼"} ${i}${t.maximum.toString()} ${a.unit??"个å
ç´ "}`:`æ°å¼è¿å¤§ï¼ææ ${t.origin??"å¼"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`æ°å¼è¿å°ï¼ææ ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`æ°å¼è¿å°ï¼ææ ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`æ æå符串ï¼å¿
须以 "${i.prefix}" å¼å¤´`:i.format==="ends_with"?`æ æå符串ï¼å¿
须以 "${i.suffix}" ç»å°¾`:i.format==="includes"?`æ æå符串ï¼å¿
é¡»å
å« "${i.includes}"`:i.format==="regex"?`æ æå符串ï¼å¿
须满足æ£åè¡¨è¾¾å¼ ${i.pattern}`:`æ æ${o[i.format]??t.format}`}case"not_multiple_of":return`æ ææ°åï¼å¿
é¡»æ¯ ${t.divisor} çåæ°`;case"unrecognized_keys":return`åºç°æªç¥çé®(key): ${N(t.keys,", ")}`;case"invalid_key":return`${t.origin} ä¸çé®(key)æ æ`;case"invalid_union":return"æ æè¾å
¥";case"invalid_element":return`${t.origin} ä¸å
嫿 æå¼(value)`;default:return"æ æè¾å
¥"}}};function Vv(){return{localeError:Wv()}}const Hv=()=>{const e={string:{unit:"åå
",verb:"ææ"},file:{unit:"ä½å
çµ",verb:"ææ"},array:{unit:"é
ç®",verb:"ææ"},set:{unit:"é
ç®",verb:"ææ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"輸å
¥",email:"éµä»¶å°å",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO æ¥ææé",date:"ISO æ¥æ",time:"ISO æé",duration:"ISO æé",ipv4:"IPv4 ä½å",ipv6:"IPv6 ä½å",cidrv4:"IPv4 ç¯å",cidrv6:"IPv6 ç¯å",base64:"base64 編碼å串",base64url:"base64url 編碼å串",json_string:"JSON å串",e164:"E.164 æ¸å¼",jwt:"JWT",template_literal:"輸å
¥"};return t=>{switch(t.code){case"invalid_type":return`ç¡æç輸å
¥å¼ï¼é æçº ${t.expected}ï¼ä½æ¶å° ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ç¡æç輸å
¥å¼ï¼é æçº ${T(t.values[0])}`:`ç¡æçé¸é
ï¼é æçºä»¥ä¸å
¶ä¸ä¹ä¸ ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`æ¸å¼é大ï¼é æ ${t.origin??"å¼"} æçº ${i}${t.maximum.toString()} ${a.unit??"åå
ç´ "}`:`æ¸å¼é大ï¼é æ ${t.origin??"å¼"} æçº ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`æ¸å¼éå°ï¼é æ ${t.origin} æçº ${i}${t.minimum.toString()} ${a.unit}`:`æ¸å¼éå°ï¼é æ ${t.origin} æçº ${i}${t.minimum.toString()}`}
68case"invalid_format":{const i=t;return i.format==="starts_with"?`ç¡æçå串ï¼å¿
é 以 "${i.prefix}" éé `:i.format==="ends_with"?`ç¡æçå串ï¼å¿
é 以 "${i.suffix}" çµå°¾`:i.format==="includes"?`ç¡æçå串ï¼å¿
é å
å« "${i.includes}"`:i.format==="regex"?`ç¡æçå串ï¼å¿
é ç¬¦åæ ¼å¼ ${i.pattern}`:`ç¡æç ${o[i.format]??t.format}`}case"not_multiple_of":return`ç¡æçæ¸åï¼å¿
é çº ${t.divisor} ç忏`;case"unrecognized_keys":return`ç¡æ³èå¥çéµå¼${t.keys.length>1?"å":""}ï¼${N(t.keys,"ã")}`;case"invalid_key":return`${t.origin} ä¸æç¡æçéµå¼`;case"invalid_union":return"ç¡æç輸å
¥å¼";case"invalid_element":return`${t.origin} ä¸æç¡æçå¼`;default:return"ç¡æç輸å
¥å¼"}}};function qv(){return{localeError:Hv()}}const Kv=()=>{const e={string:{unit:"à mi",verb:"nÃ"},file:{unit:"bytes",verb:"nÃ"},array:{unit:"nkan",verb:"nÃ"},set:{unit:"nkan",verb:"nÃ"}};function n(t){return e[t]??null}const r=t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"ná»Ìmbà ";case"object":{if(Array.isArray(t))return"akopá»";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"ẹÌrỠìbáwá»lé",email:"à dÃrẹÌsì ìmẹÌlì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"à kókò ISO",date:"á»já»Ì ISO",time:"à kókò ISO",duration:"à kókò tó pé ISO",ipv4:"à dÃrẹÌsì IPv4",ipv6:"à dÃrẹÌsì IPv6",cidrv4:"à gbègbè IPv4",cidrv6:"à gbègbè IPv6",base64:"á»Ìrá»Ì tà a ká»Ì nà base64",base64url:"á»Ìrá»Ì base64url",json_string:"á»Ìrá»Ì JSON",e164:"ná»Ìmbà E.164",jwt:"JWT",template_literal:"ẹÌrỠìbáwá»lé"};return t=>{switch(t.code){case"invalid_type":return`Ãbáwá»lé aṣìṣe: a nà láti fi ${t.expected}, à má»Ì a rà ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ãbáwá»lé aṣìṣe: a nà láti fi ${T(t.values[0])}`:`Ãṣà yà n aṣìṣe: yan á»Ìkan lára ${N(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Tó pá»Ì jù: a nà láti jáº¹Ì pé ${t.origin??"iye"} ${a.verb} ${i}${t.maximum} ${a.unit}`:`Tó pá»Ì jù: a nà láti jáº¹Ì ${i}${t.maximum}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Kéré ju: a nà láti jáº¹Ì pé ${t.origin} ${a.verb} ${i}${t.minimum} ${a.unit}`:`Kéré ju: a nà láti jáº¹Ì ${i}${t.minimum}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`á»Ìrá»Ì aṣìṣe: gbá»Ìdá»Ì bẹÌráº¹Ì pẹÌlú "${i.prefix}"`:i.format==="ends_with"?`á»Ìrá»Ì aṣìṣe: gbá»Ìdá»Ì parà pẹÌlú "${i.suffix}"`:i.format==="includes"?`á»Ìrá»Ì aṣìṣe: gbá»Ìdá»Ì nà "${i.includes}"`:i.format==="regex"?`á»Ìrá»Ì aṣìṣe: gbá»Ìdá»Ì bá à pẹẹrẹ mu ${i.pattern}`:`Aṣìṣe: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ná»Ìmbà aṣìṣe: gbá»Ìdá»Ì jáº¹Ì Ã¨yà pÃpÃn ti ${t.divisor}`;case"unrecognized_keys":return`Bá»tìnì à ìmá»Ì: ${N(t.keys,", ")}`;case"invalid_key":return`Bá»tìnì aṣìṣe nÃnú ${t.origin}`;case"invalid_union":return"Ãbáwá»lé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nÃnú ${t.origin}`;default:return"Ãbáwá»lé aṣìṣe"}}};function Yv(){return{localeError:Kv()}}const Yl=Object.freeze(Object.defineProperty({__proto__:null,ar:dg,az:fg,be:pg,bg,ca:xg,cs:$g,da:kg,de:Ig,en:Hl,eo:Eg,es:Pg,fa:Cg,fi:Ag,fr:Lg,frCA:Mg,he:Bg,hu:Gg,id:Vg,is:Kg,it:Xg,ja:ev,ka:rv,kh:ov,km:ql,ko:sv,lt:uv,mk:mv,ms:hv,nl:gv,no:bv,ota:xv,pl:kv,ps:$v,pt:Iv,ru:Nv,sl:Ov,sv:Tv,ta:Uv,th:Rv,tr:Lv,ua:Mv,uk:Kl,ur:Bv,vi:Gv,yo:Yv,zhCN:Vv,zhTW
68:qv},Symbol.toStringTag,{value:"Module"})),Xl=Symbol("ZodOutput"),Ql=Symbol("ZodInput");class gi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...r){const o=r[0];if(this._map.set(n,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,n)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const t={...o,...this._map.get(n)};return Object.keys(t).length?t:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function vi(){return new gi}const ut=vi();function eu(e,n){return new e({type:"string",...k(n)})}function tu(e,n){return new e({type:"string",coerce:!0,...k(n)})}function bi(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...k(n)})}function Cn(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...k(n)})}function yi(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...k(n)})}function xi(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...k(n)})}function _i(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...k(n)})}function $i(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...k(n)})}function qn(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...k(n)})}function wi(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...k(n)})}function ki(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...k(n)})}function Si(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...k(n)})}function Ii(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...k(n)})}function ji(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...k(n)})}function Ni(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...k(n)})}function zi(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...k(n)})}function Oi(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...k(n)})}function Ei(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...k(n)})}function Ti(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...k(n)})}function Pi(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...k(n)})}function Ui(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...k(n)})}function Ci(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...k(n)})}function Ri(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...k(n)})}function Ai(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...k(n)})}const nu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ru(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...k(n)})}function iu(e,n){return new e({type:"string",format:"date",check:"string_format",...k(n)})}function ou(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...k(n)})}function au(e,n){return new e({type:"string",format:"duration",check:"string_format",...k(n)})}function su(e,n){return new e({type:"number",checks:[],...k(n)})}function cu(e,n){return new e({type:"number",coerce:!0,checks:[],...k(n)})}function lu(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...k(n)})}function uu(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...k(n)})}function du(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...k(n)})}function mu(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...k(n)})}function fu(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...k(n)})}function hu(e,n){return new e({type:"boolean",...k(n)})}function pu(e,n){return new e({type:"boolean",coerce:!0,...k(n)})}function gu(e,n){return new e({type:"bigint",...k(n)})}function vu(e,n){return new e({type:"bigint",coerce:!0,...k(n)})}function bu(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...k(n)})}function yu(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...k(n)})}function xu(e,n){return new e({type:"symbol",...k(n)})}function _u(e,n){return new e({type:"undefined",...k(n)})}function $u(e,n){return new e({type:"null",...k(n)})}function wu(e){return new e({type:"any"})}function ku(e){return new e({type:"unknown"})}function Su(e,n){return new e({type:"never",...k(n)})}function Iu(e,n){return new e({type:"void",...k(n)})}function ju(e,n){return new e({type:"date",...k(n)})}function Nu(e,n){return new e({type:"date",coerce:!0,...k(n)})}function zu(e,n){return new e({type:"nan",...k(n)})}function ft(e,n){return new si({check:"less_than",...k(n),value:e,inclusive:!1})}function Ee(e,n){return new si({check:"less_than",...k(n),value:e,inclusive:!0})}function ht(e,n){return new ci({check:"greater_than",...k(n),value:e,inclusive:!1})}function xe(e,n){return new ci({check:"greater_than",...k(n),value:e,inclusive:!0})}function Ou(e){return ht(0,e)}function Eu(e){return ft(0,e)}function Tu(e){return Ee(0,e)}function Pu(e){return xe(0,e)}function Wt(e,n){return new vc({check:"multiple_of",...k(n),value:e})}function Kn(e,n){return new xc({check:"max_size",...k(n),maximum:e})}function Vt(e,n){return new _c({check:"min_size",...k(n),minimum:e})}function Di(e,n){return new $c({check:"size_equals",...k(n),size:e})}
vendor: 4,127 bytes, line 68
68function Yn(e,n){return new wc({check:"max_length",...k(n),maximum:e})}function Ot(e,n){return new kc({check:"min_length",...k(n),minimum:e})}function Xn(e,n){return new Sc({check:"length_equals",...k(n),length:e})}function Li(e,n){return new Ic({check:"string_format",format:"regex",...k(n),pattern:e})}function Zi(e){return new jc({check:"string_format",format:"lowercase",...k(e)})}function Mi(e){return new Nc({check:"string_format",format:"uppercase",...k(e)})}function Fi(e,n){return new zc({check:"string_format",format:"includes",...k(n),includes:e})}function Bi(e,n){return new Oc({check:"string_format",format:"starts_with",...k(n),prefix:e})}function Ji(e,n){return new Ec({check:"string_format",format:"ends_with",...k(n),suffix:e})}function Uu(e,n,r){return new Tc({check:"property",property:e,schema:n,...k(r)})}function Gi(e,n){return new Pc({check:"mime_type",mime:e,...k(n)})}function yt(e){return new Uc({check:"overwrite",tx:e})}function Wi(e){return yt(n=>n.normalize(e))}function Vi(){return yt(e=>e.trim())}function Hi(){return yt(e=>e.toLowerCase())}function qi(){return yt(e=>e.toUpperCase())}function Cu(e,n,r){return new e({type:"array",element:n,...k(r)})}function Xv(e,n,r){return new e({type:"union",options:n,...k(r)})}function Qv(e,n,r,o){return new e({type:"union",options:r,discriminator:n,...k(o)})}function eb(e,n,r){return new e({type:"intersection",left:n,right:r})}function tb(e,n,r,o){const t=r instanceof C,i=t?o:r,a=t?r:null;return new e({type:"tuple",items:n,rest:a,...k(i)})}function nb(e,n,r,o){return new e({type:"record",keyType:n,valueType:r,...k(o)})}function rb(e,n,r,o){return new e({type:"map",keyType:n,valueType:r,...k(o)})}function ib(e,n,r){return new e({type:"set",valueType:n,...k(r)})}function ob(e,n,r){const o=Array.isArray(n)?Object.fromEntries(n.map(t=>[t,t])):n;return new e({type:"enum",entries:o,...k(r)})}function ab(e,n,r){return new e({type:"enum",entries:n,...k(r)})}function sb(e,n,r){return new e({type:"literal",values:Array.isArray(n)?n:[n],...k(r)})}function Ru(e,n){return new e({type:"file",...k(n)})}function cb(e,n){return new e({type:"transform",transform:n})}function lb(e,n){return new e({type:"optional",innerType:n})}function ub(e,n){return new e({type:"nullable",innerType:n})}function db(e,n,r){return new e({type:"default",innerType:n,get defaultValue(){return typeof r=="function"?r():Wn(r)}})}function mb(e,n,r){return new e({type:"nonoptional",innerType:n,...k(r)})}function fb(e,n){return new e({type:"success",innerType:n})}function hb(e,n,r){return new e({type:"catch",innerType:n,catchValue:typeof r=="function"?r:()=>r})}function pb(e,n,r){return new e({type:"pipe",in:n,out:r})}function gb(e,n){return new e({type:"readonly",innerType:n})}function vb(e,n,r){return new e({type:"template_literal",parts:n,...k(r)})}function bb(e,n){return new e({type:"lazy",getter:n})}function yb(e,n){return new e({type:"promise",innerType:n})}function Au(e,n,r){const o=k(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:n,...o})}function Du(e,n,r){return new e({type:"custom",check:"custom",fn:n,...k(r)})}function Lu(e){const n=Zu(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Nt(o,r.value,n._zod.def));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=r.value),t.inst??(t.inst=n),t.continue??(t.continue=!n._zod.def.abort),r.issues.push(Nt(t))}},e(r.value,r)));return n}function Zu(e,n){const r=new Q({check:"custom",...k(n)});return r._zod.check=e,r}function Mu(e,n){const r=k(n);let o=r.truthy??["true","1","yes","on","y","enabled"],t=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(f=>typeof f=="string"?f.toLowerCase():f),t=t.map(f=>typeof f=="string"?f.toLowerCase():f));const i=new Set(o),a=new Set(t),s=e.Codec??pi,c=e.Boolean??di,u=e.String??cn,d=new u({type:"string",error:r.error}),h=new c({type:"boolean",error:r.error}),g=new s({type:"pipe",in:d,out:h,transform:((f,b)=>{let _=f;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:a.has(_)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input
68:b.value,inst:g,continue:!1}),{})}),reverseTransform:((f,b)=>f===!0?o[0]||"true":t[0]||"false"),error:r.error});return g}function ln(e,n,r,o={}){const t=k(o),i={...k(o),check:"string_format",type:"string",format:n,fn:typeof r=="function"?r:s=>r.test(s),...t};return r instanceof RegExp&&(i.pattern=r),new e(i)}class Ur{constructor(n){this.counter=0,this.metadataRegistry=(n==null?void 0:n.metadata)??ut,this.target=(n==null?void 0:n.target)??"draft-2020-12",this.unrepresentable=(n==null?void 0:n.unrepresentable)??"throw",this.override=(n==null?void 0:n.override)??(()=>{}),this.io=(n==null?void 0:n.io)??"output",this.seen=new Map}process(n,r={path:[],schemaPath:[]}){var h,g,f;var o;const t=n._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(n);if(a)return a.count++,r.schemaPath.includes(n)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(n,s);const c=(g=(h=n._zod).toJSONSchema)==null?void 0:g.call(h);if(c)s.schema=c;else{const b={...r,schemaPath:[...r.schemaPath,n],path:r.path},_=n._zod.parent;if(_)s.ref=_,this.process(_,b),this.seen.get(_).isParent=!0;else{const p=s.schema;switch(t.type){case"string":{const v=p;v.type="string";const{minimum:$,maximum:x,format:S,patterns:w,contentEncoding:I}=n._zod.bag;if(typeof $=="number"&&(v.minLength=$),typeof x=="number"&&(v.maxLength=x),S&&(v.format=i[S]??S,v.format===""&&delete v.format),I&&(v.contentEncoding=I),w&&w.size>0){const E=[...w];E.length===1?v.pattern=E[0].source:E.length>1&&(s.schema.allOf=[...E.map(A=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:A.source}))])}break}case"number":{const v=p,{minimum:$,maximum:x,format:S,multipleOf:w,exclusiveMaximum:I,exclusiveMinimum:E}=n._zod.bag;typeof S=="string"&&S.includes("int")?v.type="integer":v.type="number",typeof E=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=E,v.exclusiveMinimum=!0):v.exclusiveMinimum=E),typeof $=="number"&&(v.minimum=$,typeof E=="number"&&this.target!=="draft-4"&&(E>=$?delete v.minimum:delete v.exclusiveMinimum)),typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=I,v.exclusiveMaximum=!0):v.exclusiveMaximum=I),typeof x=="number"&&(v.maximum=x,typeof I=="number"&&this.target!=="draft-4"&&(I<=x?delete v.maximum:delete v.exclusiveMaximum)),typeof w=="number"&&(v.multipleOf=w);break}case"boolean":{const v=p;v.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(p.type="string",p.nullable=!0,p.enum=[null]):p.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{p.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const v=p,{minimum:$,maximum:x}=n._zod.bag;typeof $=="number"&&(v.minItems=$),typeof x=="number"&&(v.maxItems=x),v.type="array",v.items=this.process(t.element,{...b,path:[...b.path,"items"]});break}case"object":{const v=p;v.type="object",v.properties={};const $=t.shape;for(const w in $)v.properties[w]=this.process($[w],{...b,path:[...b.path,"properties",w]});const x=new Set(Object.keys($)),S=new Set([...x].filter(w=>{const I=t.shape[w]._zod;return this.io==="input"?I.optin===void 0:I.optout===void 0}));S.size>0&&(v.required=Array.from(S)),((f=t.catchall)==null?void 0:f._zod.def.type)==="never"?v.additionalProperties=!1:t.catchall?t.catchall&&(v.additionalProperties=this.process(t.catchall,{...b,path:[...b.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=!1);break}case"union":{const v=p,$=t.options.map((x,S)=>this.process(x,{...b,path:[...b.path,"anyOf",S]}));v.anyOf=$;break}case"intersection":{const v=p,$=this.process(t.left,{...b,path:[...b.path,"allOf",0]}),x=this.process(t.right,{...b,path:[...b.path,"allOf",1]}),S=I=>"allOf"in I&&Object.keys(I).length===1,w=[...S($)?$.allOf:[$],...S(x)?x.allOf:[x]];v.allOf=w;break}case"tuple":{const v=p;v.type="array";
vendor: 3,557 bytes, line 68
68const $=this.target==="draft-2020-12"?"prefixItems":"items",x=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",S=t.items.map((A,Z)=>this.process(A,{...b,path:[...b.path,$,Z]})),w=t.rest?this.process(t.rest,{...b,path:[...b.path,x,...this.target==="openapi-3.0"?[t.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=S,w&&(v.items=w)):this.target==="openapi-3.0"?(v.items={anyOf:S},w&&v.items.anyOf.push(w),v.minItems=S.length,w||(v.maxItems=S.length)):(v.items=S,w&&(v.additionalItems=w));const{minimum:I,maximum:E}=n._zod.bag;typeof I=="number"&&(v.minItems=I),typeof E=="number"&&(v.maxItems=E);break}case"record":{const v=p;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(t.keyType,{...b,path:[...b.path,"propertyNames"]})),v.additionalProperties=this.process(t.valueType,{...b,path:[...b.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const v=p,$=Gr(t.entries);$.every(x=>typeof x=="number")&&(v.type="number"),$.every(x=>typeof x=="string")&&(v.type="string"),v.enum=$;break}case"literal":{const v=p,$=[];for(const x of t.values)if(x===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof x=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");$.push(Number(x))}else $.push(x);if($.length!==0)if($.length===1){const x=$[0];v.type=x===null?"null":typeof x,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[x]:v.const=x}else $.every(x=>typeof x=="number")&&(v.type="number"),$.every(x=>typeof x=="string")&&(v.type="string"),$.every(x=>typeof x=="boolean")&&(v.type="string"),$.every(x=>x===null)&&(v.type="null"),v.enum=$;break}case"file":{const v=p,$={type:"string",format:"binary",contentEncoding:"binary"},{minimum:x,maximum:S,mime:w}=n._zod.bag;x!==void 0&&($.minLength=x),S!==void 0&&($.maxLength=S),w?w.length===1?($.contentMediaType=w[0],Object.assign(v,$)):v.anyOf=w.map(I=>({...$,contentMediaType:I})):Object.assign(v,$);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const v=this.process(t.innerType,b);this.target==="openapi-3.0"?(s.ref=t.innerType,p.nullable=!0):p.anyOf=[v,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,b),s.ref=t.innerType;break}case"success":{const v=p;v.type="boolean";break}case"default":{this.process(t.innerType,b),s.ref=t.innerType,p.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,b),s.ref=t.innerType,this.io==="input"&&(p._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,b),s.ref=t.innerType;let v;try{v=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}p.default=v;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const v=p,$=n._zod.pattern;if(!$)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=$.source;break}case"pipe":{const v=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(v,b),s.ref=v;break}
68case"readonly":{this.process(t.innerType,b),s.ref=t.innerType,p.readOnly=!0;break}case"promise":{this.process(t.innerType,b),s.ref=t.innerType;break}case"optional":{this.process(t.innerType,b),s.ref=t.innerType;break}case"lazy":{const v=n._zod.innerType;this.process(v,b),s.ref=v;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const u=this.metadataRegistry.get(n);return u&&Object.assign(s.schema,u),this.io==="input"&&re(n)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(n).schema}emit(n,r){var d,h,g,f,b,_;const o={cycles:(r==null?void 0:r.cycles)??"ref",reused:(r==null?void 0:r.reused)??"inline",external:(r==null?void 0:r.external)??void 0},t=this.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=p=>{var w;const v=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){const I=(w=o.external.registry.get(p[0]))==null?void 0:w.id,E=o.external.uri??(Z=>Z);if(I)return{ref:E(I)};const A=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=A,{defId:A,ref:`${E("__shared")}#/${v}/${A}`}}if(p[1]===t)return{ref:"#"};const x=`#/${v}/`,S=p[1].schema.id??`__schema${this.counter++}`;return{defId:S,ref:x+S}},a=p=>{if(p[1].schema.$ref)return;const v=p[1],{ref:$,defId:x}=i(p);v.def={...v.schema},x&&(v.defId=x);const S=v.schema;for(const w in S)delete S[w];S.$ref=$};if(o.cycles==="throw")for(const p of this.seen.entries()){const v=p[1];if(v.cycle)throw new Error(`Cycle detected: #/${(d=v.cycle)==null?void 0:d.join("/")}/<root> 69 70Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of this.seen.entries()){const v=p[1];if(n===p[0]){a(p);continue}if(o.external){const x=(h=o.external.registry.get(p[0]))==null?void 0:h.id;if(n!==p[0]&&x){a(p);continue}}if((g=this.metadataRegistry.get(p[0]))==null?void 0:g.id){a(p);continue}if(v.cycle){a(p);continue}if(v.count>1&&o.reused==="ref"){a(p);continue}}const s=(p,v)=>{const $=this.seen.get(p),x=$.def??$.schema,S={...x};if($.ref===null)return;const w=$.ref;if($.ref=null,w){s(w,v);const I=this.seen.get(w).schema;I.$ref&&(v.target==="draft-7"||v.target==="draft-4"||v.target==="openapi-3.0")?(x.allOf=x.allOf??[],x.allOf.push(I)):(Object.assign(x,I),Object.assign(x,S))}$.isParent||this.override({zodSchema:p,jsonSchema:x,path:$.path??[]})};for(const p of[...this.seen.entries()].reverse())s(p[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),(f=o.external)!=null&&f.uri){const p=(b=o.external.registry.get(n))==null?void 0:b.id;if(!p)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(p)}Object.assign(c,t.def);const u=((_=o.external)==null?void 0:_.defs)??{};for(const p of this.seen.entries()){const v=p[1];v.def&&v.defId&&(u[v.defId]=v.def)}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function Fu(e,n){if(e instanceof gi){const o=new Ur(n),t={};
70for(const s of e._idmap.entries()){const[c,u]=s;o.process(u)}const i={},a={registry:e,uri:n==null?void 0:n.uri,defs:t};for(const s of e._idmap.entries()){const[c,u]=s;i[c]=o.emit(u,{...n,external:a})}if(Object.keys(t).length>0){const s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:t}}return{schemas:i}}const r=new Ur(n);return r.process(e),r.emit(e,n)}function re(e,n){const r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return re(t.element,r);case"object":{for(const i in t.shape)if(re(t.shape[i],r))return!0;return!1}case"union":{for(const i of t.options)if(re(i,r))return!0;return!1}case"intersection":return re(t.left,r)||re(t.right,r);case"tuple":{for(const i of t.items)if(re(i,r))return!0;return!!(t.rest&&re(t.rest,r))}case"record":return re(t.keyType,r)||re(t.valueType,r);case"map":return re(t.keyType,r)||re(t.valueType,r);case"set":return re(t.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return re(t.innerType,r);case"lazy":return re(t.getter(),r);case"default":return re(t.innerType,r);case"prefault":return re(t.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return re(t.in,r)||re(t.out,r);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${t.type}`)}const xb=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),_b=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:hl,$ZodArray:yl,$ZodAsyncError:dt,$ZodBase64:nl,$ZodBase64URL:il,$ZodBigInt:mi,$ZodBigIntFormat:ul,$ZodBoolean:di,$ZodCIDRv4:el,$ZodCIDRv6:tl,$ZodCUID:Bc,$ZodCUID2:Jc,$ZodCatch:Ll,$ZodCheck:Q,$ZodCheckBigIntFormat:yc,$ZodCheckEndsWith:Ec,$ZodCheckGreaterThan:ci,$ZodCheckIncludes:zc,$ZodCheckLengthEquals:Sc,$ZodCheckLessThan:si,$ZodCheckLowerCase:jc,$ZodCheckMaxLength:wc,$ZodCheckMaxSize:xc,$ZodCheckMimeType:Pc,$ZodCheckMinLength:kc,$ZodCheckMinSize:_c,$ZodCheckMultipleOf:vc,$ZodCheckNumberFormat:bc,$ZodCheckOverwrite:Uc,$ZodCheckProperty:Tc,$ZodCheckRegex:Ic,$ZodCheckSizeEquals:$c,$ZodCheckStartsWith:Oc,$ZodCheckStringFormat:sn,$ZodCheckUpperCase:Nc,$ZodCodec:pi,$ZodCustom:Vl,$ZodCustomStringFormat:cl,$ZodDate:bl,$ZodDefault:Cl,$ZodDiscriminatedUnion:kl,$ZodE164:ol,$ZodEmail:Lc,$ZodEmoji:Mc,$ZodEncodeError:Jn,$ZodEnum:zl,$ZodError:Vr,$ZodFile:El,$ZodFunction:Jl,$ZodGUID:Ac,$ZodIPv4:Xc,$ZodIPv6:Qc,$ZodISODate:qc,$ZodISODateTime:Hc,$ZodISODuration:Yc,$ZodISOTime:Kc,$ZodIntersection:Sl,$ZodJWT:sl,$ZodKSUID:Vc,$ZodLazy:Wl,$ZodLiteral:Ol,$ZodMap:jl,$ZodNaN:Zl,$ZodNanoID:Fc,$ZodNever:gl,$ZodNonOptional:Al,$ZodNull:fl,$ZodNullable:Ul,$ZodNumber:ui,$ZodNumberFormat:ll,$ZodObject:$l,$ZodObjectJIT:wl,$ZodOptional:Pl,$ZodPipe:Ml,$ZodPrefault:Rl,$ZodPromise:Gl,$ZodReadonly:Fl,$ZodRealError:_e,$ZodRecord:Il,$ZodRegistry:gi,$ZodSet:Nl,$ZodString:cn,$ZodStringFormat:G,$ZodSuccess:Dl,$ZodSymbol:dl,$ZodTemplateLiteral:Bl,$ZodTransform:Tl,$ZodTuple:hi,$ZodType:C,$ZodULID:Gc,$ZodURL:Zc,$ZodUUID:Dc,$ZodUndefined:ml,$ZodUnion:fi,$ZodUnknown:pl,$ZodVoid:vl,$ZodXID:Wc,$brand:hs,$constructor:y,$input:Ql,$output:Xl,Doc:Cc,JSONSchema:xb,JSONSchemaGenerator:Ur,NEVER:fs,TimePrecision:nu,_any:wu,_array:Cu,_base64:Ui,_base64url:Ci,_bigint:gu,_boolean:hu,_catch:hb,_check:Zu,_cidrv4:Ti,_cidrv6:Pi,_coercedBigint:vu,_coercedBoolean:pu,_coercedDate:Nu,_coercedNumber:cu,_coercedString:tu,_cuid:Si,_cuid2:Ii,_custom:Au,_date:ju,_decode:Yr,_decodeAsync:Qr,_default:db,_discriminatedUnion:Qv,_e164:Ri,_email:bi,_emoji:wi,_encode:Kr,_encodeAsync:Xr,_endsWith:Ji,_enum:ob,_file:Ru,_float32:uu,_float64:du,_gt:ht,_gte:xe,_guid:Cn,_includes:Fi,_int:lu,_int32:mu,_int64:bu,_intersection:eb,_ipv4:Oi,_ipv6:Ei,_isoDate:iu,_isoDateTime:ru,_isoDuration:au,_isoTime:ou,_jwt:Ai,_ksuid:zi,_lazy:bb,_length:Xn,_literal:sb,_lowercase:Zi,_lt:ft,_lte:Ee,_map:rb,_max:Ee,_maxLength:Yn,_maxSize:Kn,_mime:Gi,_min:xe,_minLength:Ot,_minSize:Vt,_multipleOf:Wt,_nan:zu,_nanoid:ki,_nativeEnum:ab,_negative:Eu,_never:Su,_nonnegative:Pu,_nonoptional:mb,_nonpositive:Tu,_normalize:Wi,_null:$u,_nullable:ub,_number:su,_optional:lb,_overwrite:yt,_parse:en,_parseAsync:tn,_pipe:pb,_positive:Ou,_promise:yb,_property:Uu,_readonly:gb,_record:nb,_refine:Du,_regex:Li,_safeDecode:ti,_safeDecodeAsync:ri,_safeEncode:ei,_safeEncodeAsync:ni,_safeParse:nn,_safeParseAsync:rn,_set:ib,_size:Di,_startsWith:Bi,_string:eu,_stringFormat:ln,_stringbool:Mu,_success:fb,_superRefine:Lu,_symbol:xu,_templateLiteral
vendor: 17,345 bytes, line 70
70:vb,_toLowerCase:Hi,_toUpperCase:qi,_transform:cb,_trim:Vi,_tuple:tb,_uint32:fu,_uint64:yu,_ulid:ji,_undefined:_u,_union:Xv,_unknown:ku,_uppercase:Mi,_url:qn,_uuid:yi,_uuidv4:xi,_uuidv6:_i,_uuidv7:$i,_void:Iu,_xid:Ni,clone:Ie,config:pe,decode:Pp,decodeAsync:Cp,encode:Tp,encodeAsync:Up,flattenError:Hr,formatError:qr,globalConfig:En,globalRegistry:ut,isValidBase64:li,isValidBase64URL:rl,isValidJWT:al,locales:Yl,parse:Er,parseAsync:Tr,prettifyError:Us,regexes:ai,registry:vi,safeDecode:Ap,safeDecodeAsync:Lp,safeEncode:Rp,safeEncodeAsync:Dp,safeParse:Cs,safeParseAsync:Rs,toDotPath:Ps,toJSONSchema:Fu,treeifyError:Ts,util:Os,version:Rc},Symbol.toStringTag,{value:"Module"})),Ki=y("ZodISODateTime",(e,n)=>{Hc.init(e,n),V.init(e,n)});function Bu(e){return ru(Ki,e)}const Yi=y("ZodISODate",(e,n)=>{qc.init(e,n),V.init(e,n)});function Ju(e){return iu(Yi,e)}const Xi=y("ZodISOTime",(e,n)=>{Kc.init(e,n),V.init(e,n)});function Gu(e){return ou(Xi,e)}const Qi=y("ZodISODuration",(e,n)=>{Yc.init(e,n),V.init(e,n)});function Wu(e){return au(Qi,e)}const $b=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:Yi,ZodISODateTime:Ki,ZodISODuration:Qi,ZodISOTime:Xi,date:Ju,datetime:Bu,duration:Wu,time:Gu},Symbol.toStringTag,{value:"Module"})),Vu=(e,n)=>{Vr.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>qr(e,r)},flatten:{value:r=>Hr(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Tn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Tn,2)}},isEmpty:{get(){return e.issues.length===0}}})},wb=y("ZodError",Vu),$e=y("ZodError",Vu,{Parent:Error}),Hu=en($e),qu=tn($e),Ku=nn($e),Yu=rn($e),Xu=Kr($e),Qu=Yr($e),ed=Xr($e),td=Qr($e),nd=ei($e),rd=ti($e),id=ni($e),od=ri($e),R=y("ZodType",(e,n)=>(C.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone(qe(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Ie(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>Hu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Ku(e,r,o),e.parseAsync=async(r,o)=>qu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Yu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Xu(e,r,o),e.decode=(r,o)=>Qu(e,r,o),e.encodeAsync=async(r,o)=>ed(e,r,o),e.decodeAsync=async(r,o)=>td(e,r,o),e.safeEncode=(r,o)=>nd(e,r,o),e.safeDecode=(r,o)=>rd(e,r,o),e.safeEncodeAsync=async(r,o)=>id(e,r,o),e.safeDecodeAsync=async(r,o)=>od(e,r,o),e.refine=(r,o)=>e.check(Gd(r,o)),e.superRefine=r=>e.check(Wd(r)),e.overwrite=r=>e.check(yt(r)),e.optional=()=>An(e),e.nullable=()=>Dn(e),e.nullish=()=>An(Dn(e)),e.nonoptional=r=>Pd(e,r),e.array=()=>ir(e),e.or=r=>$o([e,r]),e.and=r=>yd(e,r),e.transform=r=>Ln(e,So(r)),e.default=r=>Od(e,r),e.prefault=r=>Td(e,r),e.catch=r=>Rd(e,r),e.pipe=r=>Ln(e,r),e.readonly=()=>Ld(e),e.describe=r=>{const o=e.clone();return ut.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){var r;return(r=ut.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ut.get(e);const o=e.clone();return ut.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),eo=y("_ZodString",(e,n)=>{cn.init(e,n),R.init(e,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Li(...o)),e.includes=(...o)=>e.check(Fi(...o)),e.startsWith=(...o)=>e.check(Bi(...o)),e.endsWith=(...o)=>e.check(Ji(...o)),e.min=(...o)=>e.check(Ot(...o)),e.max=(...o)=>e.check(Yn(...o)),e.length=(...o)=>e.check(Xn(...o)),e.nonempty=(...o)=>e.check(Ot(1,...o)),e.lowercase=o=>e.check(Zi(o)),e.uppercase=o=>e.check(Mi(o)),e.trim=()=>e.check(Vi()),e.normalize=(...o)=>e.check(Wi(...o)),e.toLowerCase=()=>e.check(Hi()),e.toUpperCase=()=>e.check(qi())}),Qn=y("ZodString",(e,n)=>{cn.init(e,n),eo.init(e,n),e.email=r=>e.check(bi(to,r)),e.url=r=>e.check(qn(er,r)),e.jwt=r=>e.check(Ai(vo,r)),e.emoji=r=>e.check(wi(no,r)),e.guid=r=>e.check(Cn(Rn,r)),e.uuid=r=>e.check(yi(We,r)),e.uuidv4=r=>e.check(xi(We,r)),e.uuidv6=r=>e.check(_i(We,r)),e.uuidv7=r=>e.check($i(We,r)),e.nanoid=r=>e.check(ki(ro,r)),e.guid=r=>e.check(Cn(Rn,r)),e.cuid=r=>e.check(Si(io,r)),e.cuid2=r=>e.check(Ii(oo,r)),e.ulid=r=>e.check(ji(ao,r)),e.base64=r=>e.check(Ui(ho,r)),e.base64url=r=>e.check(Ci(po,r)),e.xid=r=>e.check(Ni(so,r)),e.ksuid=r=>e.check(zi(co,r)),e.ipv4=r=>e.check(Oi(lo,r)),e.ipv6=r=>e.check(Ei(uo,r)),e.cidrv4=r=>e.check(Ti(mo,r)),e.cidrv6=r=>e.check(Pi(fo,r)),e.e164=r=>e.check(Ri(go,r)),e.datetime=r=>e.check(Bu(r)),e.date=r=>e.check(Ju(r)),e.time=r=>e.check(Gu(r)),e.duration=r=>e.check(Wu(r))});function Cr(e){return eu(Qn,e)}const V=y("ZodStringFormat",(e,n)=>{G.init(e,n),eo.init(e,n)}),to=y("ZodEmail",(e,n)=>{Lc.init(e,n),V.init(e,n)});function kb(e){return bi(to,e)}const Rn=y("ZodGUID",(e,n)=>{Ac.init(e,n),V.init(e,n)});function Sb(e){return Cn(Rn,e)}const We=y("ZodUUID",(e,n)=>{Dc.init(e,n),V.init(e,n)});function Ib(e){return yi(We,e)}function jb(e){return xi(We,e)}function Nb(e){return _i(We,e)}function zb(e){return $i(We,e)}const er=y("ZodURL",(e,n)=>{Zc.init(e,n),V.init(e,n)});function Ob(e){return qn(er,e)}function Eb(e){return qn(er,{protocol:/^https?$/,hostname:Qs,...k(e)})}const no=y("ZodEmoji",(e,n)=>{Mc.init(e,n),V.init(e,n)});function Tb(e){return wi(no,e)}const ro=y("ZodNanoID",(e,n)=>{Fc.init(e,n),V.init(e,n)});function Pb(e){return ki(ro,e)}const io=y("ZodCUID",(e,n)=>{Bc.init(e,n),V.init(e,n)});function Ub(e){return Si(io,e)}const oo=y("ZodCUID2",(e,n)=>{Jc.init(e,n),V.init(e,n)});function Cb(e){return Ii(oo,e)}const ao=y("ZodULID",(e,n)=>{Gc.init(e,n),V.init(e,n)});function Rb(e){return ji(ao,e)}const so=y("ZodXID",(e,n)=>{Wc.init(e,n),V.init(e,n)});function Ab(e){return Ni(so,e)}const co=y("ZodKSUID",(e,n)=>{Vc.init(e,n),V.init(e,n)});function Db(e){return zi(co,e)}const lo=y("ZodIPv4",(e,n)=>{Xc.init(e,n),V.init(e,n)});function Lb(e){return Oi(lo,e)}const uo=y("ZodIPv6",(e,n)=>{Qc.init(e,n),V.init(e,n)});function Zb(e){return Ei(uo,e)}const mo=y("ZodCIDRv4",(e,n)=>{el.init(e,n),V.init(e,n)});function Mb(e){return Ti(mo,e)}const fo=y("ZodCIDRv6",(e,n)=>{tl.init(e,n),V.init(e,n)});function Fb(e){return Pi(fo,e)}const ho=y("ZodBase64",(e,n)=>{nl.init(e,n),V.init(e,n)});function Bb(e){return Ui(ho,e)}const po=y("ZodBase64URL",(e,n)=>{il.init(e,n),V.init(e,n)});function Jb(e){return Ci(po,e)}const go=y("ZodE164",(e,n)=>{ol.init(e,n),V.init(e,n)});function Gb(e){return Ri(go,e)}const vo=y("ZodJWT",(e,n)=>{sl.init(e,n),V.init(e,n)});function Wb(e){return Ai(vo,e)}const un=y("ZodCustomStringFormat",(e,n)=>{cl.init(e,n),V.init(e,n)});function Vb(e,n,r={}){return ln(un,e,n,r)}function Hb(e){return ln(un,"hostname",oi,e)}function qb(e){return ln(un,"hex",pc,e)}function Kb(e,n){const r=(n==null?void 0:n.enc)??"hex",o=`${e}_${r}`,t=ai[o];if(!t)throw new Error(`Unrecognized hash format: ${o}`);return ln(un,o,t,n)}const tr=y("ZodNumber",(e,n)=>{ui.init(e,n),R.init(e,n),e.gt=(o,t)=>e.check(ht(o,t)),e.gte=(o,t)=>e.check(xe(o,t)),e.min=(o,t)=>e.check(xe(o,t)),e.lt=(o,t)=>e.check(ft(o,t)),e.lte=(o,t)=>e.check(Ee(o,t)),e.max=(o,t)=>e.check(Ee(o,t)),e.int=o=>e.check(Rr(o)),e.safe=o=>e.check(Rr(o)),e.positive=o=>e.check(ht(0,o)),e.nonnegative=o=>e.check(xe(0,o)),e.negative=o=>e.check(ft(0,o)),e.nonpositive=o=>e.check(Ee(0,o)),e.multipleOf=(o,t)=>e.check(Wt(o,t)),e.step=(o,t)=>e.check(Wt(o,t)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ad(e){return su(tr,e)}const Pt=y("ZodNumberFormat",(e,n)=>{ll.init(e,n),tr.init(e,n)});function Rr(e){return lu(Pt,e)}function Yb(e){return uu(Pt,e)}function Xb(e){return du(Pt,e)}function Qb(e){return mu(Pt,e)}function ey(e){return fu(Pt,e)}const nr=y("ZodBoolean",(e,n)=>{di.init(e,n),R.init(e,n)});function sd(e){return hu(nr,e)}const rr=y("ZodBigInt",(e,n)=>{mi.init(e,n),R.init(e,n),e.gte=(o,t)=>e.check(xe(o,t)),e.min=(o,t)=>e.check(xe(o,t)),e.gt=(o,t)=>e.check(ht(o,t)),e.gte=(o,t)=>e.check(xe(o,t)),e.min=(o,t)=>e.check(xe(o,t)),e.lt=(o,t)=>e.check(ft(o,t)),e.lte=(o,t)=>e.check(Ee(o,t)),e.max=(o,t)=>e.check(Ee(o,t)),e.positive=o=>e.check(ht(BigInt(0),o)),e.negative=o=>e.check(ft(BigInt(0),o)),e.nonpositive=o=>e.check(Ee(BigInt(0),o)),e.nonnegative=o=>e.check(xe(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(Wt(o,t));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function ty(e){return gu(rr,e)}const bo=y("ZodBigIntFormat",(e,n)=>{ul.init(e,n),rr.init(e,n)});function ny(e){return bu(bo,e)}function ry(e){return yu(bo,e)}const cd=y("ZodSymbol",(e,n)=>{dl.init(e,n),R.init(e,n)});function iy(e){return xu(cd,e)}const ld=y("ZodUndefined",(e,n)=>{ml.init(e,n),R.init(e,n)});function oy(e){return _u(ld,e)}const ud=y("ZodNull",(e,n)=>{fl.init(e,n),R.init(e,n)});function dd(e){return $u(ud,e)}const md=y("ZodAny",(e,n)=>{hl.init(e,n),R.init(e,n)});function ay(){return wu(md)}const fd=y("ZodUnknown",(e,n)=>{pl.init(e,n),R.init(e,n)});function Et(){return ku(fd)}const hd=y("ZodNever",(e,n)=>{gl.init(e,n),R.init(e,n)});function yo(e){return Su(hd,e)}const pd=y("ZodVoid",(e,n)=>{vl.init(e,n),R.init(e,n)});function sy(e){return Iu(pd,e)}const xo=y("ZodDate",(e,n)=>{bl.init(e,n),R.init(e,n),e.min=(o,t)=>e.check(xe(o,t)),e.max=(o,t)=>e.check(Ee(o,t));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function cy(e){return ju(xo,e)}const gd=y("ZodArray",(e,n)=>{yl.init(e,n),R.init(e,n),e.element=n.element,e.min=(r,o)=>e.check(Ot(r,o)),e.nonempty=r=>e.check(Ot(1,r)),e.max=(r,o)=>e.check(Yn(r,o)),e.length=(r,o)=>e.check(Xn(r,o)),e.unwrap=()=>e.element});function ir(e,n){return Cu(gd,e,n)}function ly(e){const n=e._zod.def.shape;return ko(Object.keys(n))}const or=y("ZodObject",(e,n)=>{wl.init(e,n),R.init(e,n),D(e,"shape",()=>n.shape),e.keyof=()=>ko(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Et()}),e.loose=()=>e.clone({...e._zod.def,catchall:Et()}),e.strict=()=>e.clone({...e._zod.def,catchall:yo()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ws(e,r),e.safeExtend=r=>ks(e,r),e.merge=r=>Ss(e,r),e.pick=r=>_s(e,r),e.omit=r=>$s(e,r),e.partial=(...r)=>Is(Io,e,r[0]),e.required=(...r)=>js(jo,e,r[0])});function uy(e,n){const r={type:"object",shape:e??{},...k(n)};return new or(r)}function dy(e,n){return new or({type:"object",shape:e,catchall:yo(),...k(n)})}function my(e,n){return new or({type:"object",shape:e,catchall:Et(),...k(n)})}const _o=y("ZodUnion",(e,n)=>{fi.init(e,n),R.init(e,n),e.options=n.options});function $o(e,n){return new _o({type:"union",options:e,...k(n)})}const vd=y("ZodDiscriminatedUnion",(e,n)=>{_o.init(e,n),kl.init(e,n)});function fy(e,n,r){return new vd({type:"union",options:n,discriminator:e,...k(r)})}const bd=y("ZodIntersection",(e,n)=>{Sl.init(e,n),R.init(e,n)});function yd(e,n){return new bd({type:"intersection",left:e,right:n})}const xd=y("ZodTuple",(e,n)=>{hi.init(e,n),R.init(e,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function _d(e,n,r){const o=n instanceof C,t=o?r:n,i=o?n:null;return new xd({type:"tuple",items:e,rest:i,...k(t)})}const wo=y("ZodRecord",(e,n)=>{Il.init(e,n),R.init(e,n),e.keyType=n.keyType,e.valueType=n.valueType});function $d(e,n,r){return new wo({type:"record",keyType:e,valueType:n,...k(r)})}function hy(e,n,r){const o=Ie(e);return o._zod.values=void 0,new wo({type:"record",keyType:o,valueType:n,...k(r)})}const wd=y("ZodMap",(e,n)=>{jl.init(e,n),R.init(e,n),e.keyType=n.keyType,e.valueType=n.valueType});function py(e,n,r){return new wd({type:"map",keyType:e,valueType:n,...k(r)})}const kd=y("ZodSet",(e,n)=>{Nl.init(e,n),R.init(e,n),e.min=(...r)=>e.check(Vt(...r)),e.nonempty=r=>e.check(Vt(1,r)),e.max=(...r)=>e.check(Kn(...r)),e.size=(...r)=>e.check(Di(...r))});function gy(e,n){return new kd({type:"set",valueType:e,...k(n)})}const Ht=y("ZodEnum",(e,n)=>{zl.init(e,n),R.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(o,t)=>{const i={};for(const a of o)if(r.has(a))i[a]=n.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ht({...n,checks:[],...k(t),entries:i})},e.exclude=(o,t)=>{const i={...n.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Ht({...n,checks:[],...k(t),entries:i})}});function ko(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ht({type:"enum",entries:r,...k(n)})}function vy(e,n){return new Ht({type:"enum",entries:e,...k(n)})}const Sd=y("ZodLiteral",(e,n)=>{Ol.init(e,n),R.init(e,n),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function by(e,n){return new Sd({type:"literal",values:Array.isArray(e)?e:[e],...k(n)})}const Id=y("ZodFile",(e,n)=>{El.init(e,n),R.init(e,n),e.min=(r,o)=>e.check(Vt(r,o)),e.max=(r,o)=>e.check(Kn(r,o)),e.mime=(r,o)=>e.check(Gi(Array.isArray(r)?r:[r],o))});function yy(e){return Ru(Id,e)}const jd=y("ZodTransform",(e,n)=>{Tl.init(e,n),R.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Jn(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Nt(i,r.value,n));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Nt(a))}};const t=n.transform(r.value,r);return t instanceof Promise?t.then(i=>(r.value=i,r)):(r.value=t,r)}});function So(e){return new jd({type:"transform",transform:e})}const Io=y("ZodOptional",(e,n)=>{Pl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function An(e){return new Io({type:"optional",innerType:e})}const Nd=y("ZodNullable",(e,n)=>{Ul.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Dn(e){return new Nd({type:"nullable",innerType:e})}function xy(e){return An(Dn(e))}const zd=y("ZodDefault",(e,n)=>{Cl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Od(e,n){return new zd({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Wn(n)}})}const Ed=y("ZodPrefault",(e,n)=>{Rl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Td(e,n){return new Ed({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Wn(n)}})}const jo=y("ZodNonOptional",(e,n)=>{Al.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Pd(e,n){return new jo({type:"nonoptional",innerType:e,...k(n)})}const Ud=y("ZodSuccess",(e,n)=>{Dl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function _y(e){return new Ud({type:"success",innerType:e})}const Cd=y("ZodCatch",(e,n)=>{Ll.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Rd(e,n){return new Cd({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Ad=y("ZodNaN",(e,n)=>{Zl.init(e,n),R.init(e,n)});function $y(e){return zu(Ad,e)}const No=y("ZodPipe",(e,n)=>{Ml.init(e,n),R.init(e,n),e.in=n.in,e.out=n.out});function Ln(e,n){return new No({type:"pipe",in:e,out:n})}const zo=y("ZodCodec",(e,n)=>{No.init(e,n),pi.init(e,n)});function wy(e,n,r){return new zo({type:"pipe",in:e,out:n,transform:r.decode,reverseTransform:r.encode})}const Dd=y("ZodReadonly",(e,n)=>{Fl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Ld(e){return new Dd({type:"readonly",innerType:e})}const Zd=y("ZodTemplateLiteral",(e,n)=>{Bl.init(e,n),R.init(e,n)});function ky(e,n){return new Zd({type:"template_literal",parts:e,...k(n)})}const Md=y("ZodLazy",(e,n)=>{Wl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.getter()});function Fd(e){return new Md({type:"lazy",getter:e})}const Bd=y("ZodPromise",(e,n)=>{Gl.init(e,n),R.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Sy(e){return new Bd({type:"promise",innerType:e})}const Jd=y("ZodFunction",(e,n)=>{Jl.init(e,n),R.init(e,n)});function pa(e){return new Jd({type:"function",input:Array.isArray(e==null?void 0:e.input)?_d(e==null?void 0:e.input):(e==null?void 0:e.input)??ir(Et()),output:(e==null?void 0:e.output)??Et()})}const ar=y("ZodCustom",(e,n)=>{Vl.init(e,n),R.init(e,n)});function Iy(e){const n=new Q({check:"custom"});return n._zod.check=e,n}function jy(e,n){return Au(ar,e??(()=>!0),n)}function Gd(e,n={}){return Du(ar,e,n)}function Wd(e){return Lu(e)}function Ny(e,n={error:`Input not instance of ${e.name}`}){const r=new ar({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...k(n)});return r._zod.bag.Class=e,r}const zy=(...e)=>Mu({Codec:zo,Boolean:nr,String:Qn},...e);function Oy(e){const n=Fd(()=>$o([Cr(e),ad(),sd(),dd(),ir(n),$d(Cr(),n)]));return n}function Ey(e,n){return Ln(So(e),n)}const Ty={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invali
70d_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Py(e){pe({customError:e})}function Uy(){return pe().customError}var Ar;Ar||(Ar={});function Cy(e){return tu(Qn,e)}function Ry(e){return cu(tr,e)}function Ay(e){return pu(nr,e)}function Dy(e){return vu(rr,e)}function Ly(e){return Nu(xo,e)}const Zy=Object.freeze(Object.defineProperty({__proto__:null,bigint:Dy,boolean:Ay,date:Ly,number:Ry,string:Cy},Symbol.toStringTag,{value:"Module"}));pe(Hl());const br=Object.freeze(Object.defineProperty({__proto__:null,$brand:hs,$input:Ql,$output:Xl,NEVER:fs,TimePrecision:nu,ZodAny:md,ZodArray:gd,ZodBase64:ho,ZodBase64URL:po,ZodBigInt:rr,ZodBigIntFormat:bo,ZodBoolean:nr,ZodCIDRv4:mo,ZodCIDRv6:fo,ZodCUID:io,ZodCUID2:oo,ZodCatch:Cd,ZodCodec:zo,ZodCustom:ar,ZodCustomStringFormat:un,ZodDate:xo,ZodDefault:zd,ZodDiscriminatedUnion:vd,ZodE164:go,ZodEmail:to,ZodEmoji:no,ZodEnum:Ht,ZodError:wb,ZodFile:Id,get ZodFirstPartyTypeKind(){return Ar},ZodFunction:Jd,ZodGUID:Rn,ZodIPv4:lo,ZodIPv6:uo,ZodISODate:Yi,ZodISODateTime:Ki,ZodISODuration:Qi,ZodISOTime:Xi,ZodIntersection:bd,ZodIssueCode:Ty,ZodJWT:vo,ZodKSUID:co,ZodLazy:Md,ZodLiteral:Sd,ZodMap:wd,ZodNaN:Ad,ZodNanoID:ro,ZodNever:hd,ZodNonOptional:jo,ZodNull:ud,ZodNullable:Nd,ZodNumber:tr,ZodNumberFormat:Pt,ZodObject:or,ZodOptional:Io,ZodPipe:No,ZodPrefault:Ed,ZodPromise:Bd,ZodReadonly:Dd,ZodRealError:$e,ZodRecord:wo,ZodSet:kd,ZodString:Qn,ZodStringFormat:V,ZodSuccess:Ud,ZodSymbol:cd,ZodTemplateLiteral:Zd,ZodTransform:jd,ZodTuple:xd,ZodType:R,ZodULID:ao,ZodURL:er,ZodUUID:We,ZodUndefined:ld,ZodUnion:_o,ZodUnknown:fd,ZodVoid:pd,ZodXID:so,_ZodString:eo,_default:Od,_function:pa,any:ay,array:ir,base64:Bb,base64url:Jb,bigint:ty,boolean:sd,catch:Rd,check:Iy,cidrv4:Mb,cidrv6:Fb,clone:Ie,codec:wy,coerce:Zy,config:pe,core:_b,cuid:Ub,cuid2:Cb,custom:jy,date:cy,decode:Qu,decodeAsync:td,discriminatedUnion:fy,e164:Gb,email:kb,emoji:Tb,encode:Xu,encodeAsync:ed,endsWith:Ji,enum:ko,file:yy,flattenError:Hr,float32:Yb,float64:Xb,formatError:qr,function:pa,getErrorMap:Uy,globalRegistry:ut,gt:ht,gte:xe,guid:Sb,hash:Kb,hex:qb,hostname:Hb,httpUrl:Eb,includes:Fi,instanceof:Ny,int:Rr,int32:Qb,int64:ny,intersection:yd,ipv4:Lb,ipv6:Zb,iso:$b,json:Oy,jwt:Wb,keyof:ly,ksuid:Db,lazy:Fd,length:Xn,literal:by,locales:Yl,looseObject:my,lowercase:Zi,lt:ft,lte:Ee,map:py,maxLength:Yn,maxSize:Kn,mime:Gi,minLength:Ot,minSize:Vt,multipleOf:Wt,nan:$y,nanoid:Pb,nativeEnum:vy,negative:Eu,never:yo,nonnegative:Pu,nonoptional:Pd,nonpositive:Tu,normalize:Wi,null:dd,nullable:Dn,nullish:xy,number:ad,object:uy,optional:An,overwrite:yt,parse:Hu,parseAsync:qu,partialRecord:hy,pipe:Ln,positive:Ou,prefault:Td,preprocess:Ey,prettifyError:Us,promise:Sy,property:Uu,readonly:Ld,record:$d,refine:Gd,regex:Li,regexes:ai,registry:vi,safeDecode:rd,safeDecodeAsync:od,safeEncode:nd,safeEncodeAsync:id,safeParse:Ku,safeParseAsync:Yu,set:gy,setErrorMap:Py,size:Di,startsWith:Bi,strictObject:dy,string:Cr,stringFormat:Vb,stringbool:zy,success:_y,superRefine:Wd,symbol:iy,templateLiteral:ky,toJSONSchema:Fu,toLowerCase:Hi,toUpperCase:qi,transform:So,treeifyError:Ts,trim:Vi,tuple:_d,uint32:ey,uint64:ry,ulid:Rb,undefined:oy,union:$o,unknown:Et,uppercase:Mi,url:Ob,util:Os,uuid:Ib,uuidv4:jb,uuidv6:Nb,uuidv7:zb,void:sy,xid:Ab},Symbol.toStringTag,{value:"Module"}));var yr={},My=class{constructor(){he(this,"inFlightRequests",new Map)}async deduplicate(e,n){const r=this.inFlightRequests.get(e);if(r)return r;const o=n().finally(()=>{this.inFlightRequests.delete(e)});return this.inFlightRequests.set(e,o),o}clear(e){this.inFlightRequests.delete(e)}clearAll(){this.inFlightRequests.clear()}has(e){return this.inFlightRequests.has(e)}size(){return this.inFlightRequests.size}};function Fy(e){try{const n=e.split(".");if(n.length!==3)return null;const r=JSON.parse(atob(n[1])).exp;return typeof r=="number"?r:null}catch{return null}}var Vd=class{constructor(){he(this,"cache",null)}get(){return this.cache?Date.now()>this.cache.expiresAt?(this.cache=null,null):this.cache.data:null}set(e,n){const r=this.calculateTTL(n);this.cache={data:e,expiresAt:Date.now()+r}}clear(){this.cache=null}has(){return this.get()!==null}calculateTTL(e){if(!e)return Jo;const n=Fy(e);if(!n)return Jo;const r=Date.now(),o=n*1e3-r-Kf;return Math.max(o,1e3)}}
70,By=class{constructor(){he(this,"cache",new Vd);he(this,"lastSessionData",null);he(this,"invalidated",!1)}getCachedSession(){return this.invalidated?null:this.cache.get()}setCachedSession(e){this.invalidated||(this.lastSessionData=this.cache.get(),this.cache.set(e,e.session.token))}invalidateSessionCache(){this.invalidated=!0}clearSessionCache(){this.cache.clear(),this.lastSessionData=null,this.invalidated=!1}wasTokenRefreshed(e){var n,r,o;return!((r=(n=this.lastSessionData)==null?void 0:n.session)!=null&&r.token)||!((o=e==null?void 0:e.session)!=null&&o.token)?!1:this.lastSessionData.session.token!==e.session.token}},Jy=class{constructor(){he(this,"cache",new Vd)}getCachedResponse(){return this.cache.get()}setCachedResponse(e){this.cache.set(e,e.token)}clearCache(){this.cache.clear()}hasCachedResponse(){return this.cache.has()}};async function Gy(e){return new Promise((o,t)=>{const i=globalThis.open(e,"neon_oauth_popup","width=500,height=700,popup=yes");if(!i||i.closed){t(new Error("Popup blocked. Please allow popups for this site."));return}const a=setTimeout(()=>{c();try{i.close()}catch{}t(new Error("OAuth popup timed out. Please try again."))},12e4),s=setInterval(()=>{try{i.closed&&(c(),t(new Error("OAuth popup was closed. Please try again.")))}catch{}},500);function c(){clearTimeout(a),clearInterval(s),globalThis.removeEventListener("message",u)}function u(d){var h;d.origin===globalThis.location.origin&&((h=d.data)==null?void 0:h.type)===Xa&&(c(),o({verifier:d.data.verifier||null}))}globalThis.addEventListener("message",u)})}const Zn=()=>globalThis.window!==void 0&&typeof document<"u",Wy=()=>{if(!Zn())return!1;try{return globalThis.self!==globalThis.top}catch{return!0}},ga="/token/anonymous",Vy=br.object({token:br.string(),expires_at:br.number()}),Hy=()=>({id:"anonymous-token",pathMethods:{[ga]:"GET"},getActions:e=>({getAnonymousToken:async n=>await e(ga,{method:"GET",...n})})}),Dr=crypto.randomUUID(),Hd=new My,Ae=new By,va=new Jy,at={signUp:"/sign-up",signIn:"/sign-in",signOut:"/sign-out",updateUser:"/update-user",getSession:"/get-session",token:"/token",anonymousToken:"/token/anonymous"};async function qy(e,n){const r=JSON.parse((n==null?void 0:n.body)||"{}"),o=r.callbackURL||"/",t=new URL(Yf,globalThis.location.origin);t.searchParams.set(Ka,"1"),t.searchParams.set(Ya,o),r.callbackURL=t.toString(),r.disableRedirect=!0;const i=await fetch(e,{...n,body:JSON.stringify(r)}),a=await i.json(),s=a.url;if(!s)throw new Error("Failed to get OAuth URL");const c=await Gy(s);if(!c.verifier)throw new Error("OAuth completed but no session verifier received");const u=new URL(o,globalThis.location.origin);return u.searchParams.set(wt,c.verifier),globalThis.location.href=u.toString(),Response.json(a,{status:i.status})}const xr={signUp:{onRequest:()=>{},onSuccess:e=>{if($n(e)){const n={session:e.session,user:e.user};Ae.setCachedSession(n),$t({type:"SIGN_IN",data:n})}}},signIn:{beforeFetch:(e,n)=>!(typeof e=="string"?e:e.toString()).includes("/sign-in/social")||!Wy()?null:qy(e,n),onRequest:()=>{},onSuccess:e=>{if($n(e)){const n={session:e.session,user:e.user};Ae.setCachedSession(n),$t({type:"SIGN_IN",data:n})}}},signOut:{onRequest:()=>
70{Ae.invalidateSessionCache(),Hd.clearAll()},onSuccess:()=>{Ae.clearSessionCache(),$t({type:"SIGN_OUT"})}},updateUser:{onRequest:()=>{},onSuccess:e=>{if($n(e)){const n={session:e.session,user:e.user};Ae.setCachedSession(n),$t({type:"USER_UPDATE",data:n})}else Ae.clearSessionCache(),$t({type:"USER_UPDATE"})}},getSession:{beforeFetch:()=>{const e=Ae.getCachedSession();return e?Response.json(e,{status:200}):null},onRequest:e=>{if(!Zn())return;const n=new URLSearchParams(globalThis.window.location.search).get(wt);if(n){const r=typeof e.url=="string"?new URL(e.url):e.url;return r.searchParams.set(wt,n),{...e,url:r}}},onSuccess:e=>{if($n(e)){const n={session:e.session,user:e.user},r=Ae.wasTokenRefreshed(n);if(Ae.setCachedSession(n),r&&$t({type:"TOKEN_REFRESH",data:n}),Zn()){const o=new URL(globalThis.window.location.href);o.searchParams.get(wt)&&(o.searchParams.delete(wt),history.replaceState(history.state,"",o.href))}}}},anonymousToken:{beforeFetch:()=>{const e=va.getCachedResponse();return e?Response.json(e,{status:200}):null},onRequest:()=>{},onSuccess:e=>{const n=Vy.safeParse(e);n.success&&va.setCachedResponse(n.data)}}};async function $t(e){const n=Ky(e),r="data"in e?e.data:null,o=Yy(e);o&&St().post({event:"session",data:{trigger:o},clientId:Dr}),St().post({event:"session",data:{trigger:n,sessionData:r},clientId:Dr})}function Ky(e){switch(e.type){case"SIGN_IN":return"SIGNED_IN";case"SIGN_OUT":return"SIGNED_OUT";case"TOKEN_REFRESH":return"TOKEN_REFRESHED";case"USER_UPDATE":return"USER_UPDATED"}}function Yy(e){switch(e.type){case"SIGN_OUT":return"signout";case"TOKEN_REFRESH":return null;case"USER_UPDATE":return"updateUser";case"SIGN_IN":return null}}function $n(e){return!!(e&&typeof e=="object"&&"session"in e&&"user"in e&&e.session!==null&&e.user!==null)}function _r(e){if(e.includes("/sign-in/anonymous"))return"anonymousSignIn";if(e.includes(at.anonymousToken))return"anonymousToken";if(e.includes(at.signIn))return"signIn";if(e.includes(at.signUp))return"signUp";if(e.includes(at.signOut))return"signOut";if(e.includes(at.updateUser))return"updateUser";if(e.includes(at.getSession)||e.includes(at.token))return"getSession"}function Xy(){if(Zn()&&globalThis.opener&&globalThis.opener!==globalThis){const e=new URLSearchParams(globalThis.location.search);if(e.has(Ka)){const n=e.get(wt),r=e.get(Ya);globalThis.opener.postMessage({type:Xa,verifier:n,originalCallback:r},"*"),globalThis.close();return}}St().subscribe(e=>{var r;if(e.clientId===Dr)return;const n=(r=e.data)==null?void 0:r.trigger;(n==="signout"||n==="updateUser"||n==="getSession")&&Ae.clearSessionCache()})}var Qy="@neondatabase/auth",ex="0.1.0-beta.21";const ba="X-Neon-Client-Info";function Zt(e){return e in globalThis}function tx(){if(typeof process<"u"&&yr&&(yr.NEXT_RUNTIME||yr.__NEXT_PRIVATE_ORIGIN))return"next";if(typeof globalThis.window<"u"){if(Zt("__NEXT_DATA__"))return"next";if(Zt("__remixContext"))return"remix";if(Zt("__REACT_DEVTOOLS_GLOBAL_HOOK__"))return"react";if(Zt("__VUE__"))return"vue";if(Zt("Zone"))return"angular"}}function ya(e,n){var i,a,s,c,u;const r={sdk:e,version:n,runtime:"unknown",runtimeVersion:"unknown",platform:"unknown",arch:"unknown"};let o;typeof process<"u"&&((i=process.versions)!=null&&i.node)?o={...r,runtime:"node",runtimeVersion:process.versions.node,platform:process.platform,arch:process.arch}:typeof Deno<"u"?o={...r,runtime:"deno",runtimeVersion:((a=Deno.version)==null?void 0:a.deno)??"unknown",platform:((s=Deno.build)==null?void 0:s.os)??"unknown",arch:((c=Deno.build)==null?void 0:c.arch)??"unknown"}:typeof Bun<"u"?o={...r,runtime:"bun",runtimeVersion:Bun.version??"unknown",platform:(process==null?void 0:process.platform)??"unknown",arch:(process==null?void 0:process.arch)??"unknown"}:typeof EdgeRuntime<"u"||typeof process<"u"&&!((u=process.versions)!=null&&u.node)&&typeof globalThis.window>"u"&&typeof document>"u"?o={...r,runtime:"edge"}:globalThis.window!==void 0&&typeof document<"u"?o={...r,runtime:"browser",runtimeVersion:"unknown",platform:"web",arch:"unknown"}:o=r;const t=tx();return t&&(o.framework=t),o}function nx(e,n){const r=JSON.stringify(ya(e,n));return function(t,i){const a=new Headers(t);if(a.has(ba))return a;const s=i?JSON.stringify(ya(i.name,i.version)):r;return a.set(ba,s),a}}const rx=nx(Qy,ex),xa="X-Force-Fetch",ix=[up(),cp(),mp(),lp(),Hy()];var qd=class{constructor(e){he(this,"betterAuthOptions");var o,t;const n=(o=e.fetchOptions)==null?void 0:o.onSuccess,r=(t=e.fetchOptions)==null?void 0:t.onRequest;this.betterAuthOptions={...e,plugins:ix,fetchOptions:{...e.fetchOptions,throw:!1,onRequest:i=>{const a=i.url,s=_r(a.toString());s&&xr[s].onRequest(i),r==null||r(i)},customFetchImpl:async(i,a)=>{var h,g;const s=rx(a==null?void 0:a.headers);if(s.has(xa)){s.delete(xa);const f=await fetch(i,{...a,headers:s});if(!f.ok){const b=await f.clone().json().catch(()=>({})),_=new Error(b.message||`HTTP ${f.status} ${f.statusText}`);throw _.status=f.status,_.statusText=f.statusText,_}return f}const c=_r(i.toString());if(c){const f=await((g=(h=xr[c]).beforeFetch)==null?void 0:g.call(h,i,a));if(f)return f}const u=`${(a==null?void 0:a.method)||"GET"}:${i}:${(a==null?void 0:a.body)||""}`,d=await Hd.deduplicate(u,()=>fetch(i,{...a,headers:s}));if(!d.ok){const f=await d.clone().json().catch(()=>({})),b=new Error(f.message||`HTTP ${d.status} ${d.statusText}`);throw b.status=d.status,b.statusText=d.statusText,b}return d.clone()},onSuccess:async i=>{var d;const a=i.response.headers.get("set-auth-jwt");a&&((d=i.data)!=null&&d.session?i.data.session.token=a:console.warn("[onSuccess] JWT found but no session data to inject into!"));const s=i.request.url.toString(),c=i.data,u=_r(s);u&&xr[u].onSuccess(c),await(n==null?void 0:n(i))}}},Xy()}async getJWTToken(e){var o,t,i;const n=this.getBetterAuthInstance(),r=await n.getSession();return(t=(o=r.data)==null?void 0:o.session)!=null&&t.token?r.data.session.token:e?((i=(await n.getAnonymousToken()).data)==null?void 0:i.token)??null:null}};const _a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),$a=` 71\r=`.split("");(()=>{const e=new Array(128);for(let n=0;n<e.length;n+=1)e[n]=-1;for(let n=0;n<$a.length;
71n+=1)e[$a[n].charCodeAt(0)]=-2;for(let n=0;n<_a.length;n+=1)e[_a[n].charCodeAt(0)]=n;return e})();const ox=()=>typeof window<"u"&&typeof document<"u",st={tested:!1,writable:!1},ax=()=>{if(!ox())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(st.tested)return st.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),st.tested=!0,st.writable=!0}catch{st.tested=!0,st.writable=!1}return st.writable};globalThis&&ax()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");function sx(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}sx();var cx=class extends qd{constructor(n){super(n);he(this,"_betterAuth");this._betterAuth=ep(this.betterAuthOptions)}getBetterAuthInstance(){return this._betterAuth}};function lx(e){return(n,r)=>{var o;return new cx({baseURL:n,...e,fetchOptions:{...e==null?void 0:e.fetchOptions,headers:{...(o=e==null?void 0:e.fetchOptions)==null?void 0:o.headers,...r==null?void 0:r.headers}}})}}function ux(e,n){const r=(n==null?void 0:n.adapter)??lx(),{fetchOptions:o}=n??{},t=r(e,o),i=(n==null?void 0:n.allowAnonymous)??!1;return typeof t.initialize!="function"?{getJWTToken:()=>t.getJWTToken(i),adapter:t.getBetterAuthInstance()}:{getJWTToken:()=>t.getJWTToken(i),adapter:t}}function dx(e,n){return ux(e,n).adapter}function mx(e,n={}){let r=m.useRef(e.get());const{keys:o,deps:t=[e,o]}=n;let i=m.useCallback(s=>{const c=u=>{r.current!==u&&(r.current=u,s())};return c(e.value),o!=null&&o.length?yh(e,o,c):e.listen(c)},t),a=()=>r.current;return m.useSyncExternalStore(i,a,a)}function fx(e){return`use${Qa(e)}`}function hx(e){const{pluginPathMethods:n,pluginsActions:r,pluginsAtoms:o,$fetch:t,$store:i,atomListeners:a}=is(e);let s={};for(const[c,u]of Object.entries(o))s[fx(c)]=()=>mx(u);return os({...r,...s,$fetch:t,$store:i},t,n,o,a)}var px=class extends qd{constructor(n){super(n);he(this,"_betterAuth");this._betterAuth=hx(this.betterAuthOptions)}getBetterAuthInstance(){return this._betterAuth}};function gx(e){return(n,r)=>{var o;return new px({baseURL:n,...e,fetchOptions:{...e==null?void 0:e.fetchOptions,headers:{...(o=e==null?void 0:e.fetchOptions)==null?void 0:o.headers,...r==null?void 0:r.headers}}})}}const vx=`https://ep-noisy-water-akucwj4l.neonauth.c-3.us-west-2.aws.neon.tech/neondb/auth 72`,bx=nt.isNativePlatform(),Le=bx?null:dx(vx,{adapter:gx()}),yx=!0,xx=`https://ep-noisy-water-akucwj4l.neonauth.c-3.us-west-2.aws.neon.tech/neondb/auth 73`,Kd=nt.isNativePlatform();async function _x(){const{Browser:e}=await Fe(async()=>{const{Browser:t}=await import("./index-CCqpeJLw.js");return{Browser:t}},__vite__mapDeps([0,1,2,3])),n=Math.random().toString(36).substring(2,10),r=`https://chattykids.ai/auth-callback.html?nonce=${n}`,o=new URLSearchParams({authUrl:xx,provider:"google",callbackURL:r});return await e.open({url:`https://chattykids.ai/auth-redirect.html?${o.toString()}`,presentationStyle:"popover"}),n}async function $x(e){try{const n=await fetch(`https://chattykids.ai/api/native-token?code=${e}`);if(n.ok){const r=await n.json();if(r.token)return Oo(r.token),r.token}}catch{}return null}function Yd(){const e=localStorage.getItem("neon-auth-jwt");if(e){try{const{token:n,expiry:r}=JSON.parse(e);if(r>Date.now())return n}catch{}localStorage.removeItem("neon-auth-jwt")}return null}function Oo(e){localStorage.setItem("neon-auth-jwt",JSON.stringify({token:e,expiry:Date.now()+240*1e3}))}const Xd=Object.freeze(Object.defineProperty({__proto__:null,cacheNativeToken:Oo,fetchTokenByNonce:$x,getNativeToken:Yd,isNativePlatform:Kd,nativeSignIn:_x},Symbol.toStringTag,{value:"Module"})),Qd=nt.isNativePlatform()?"https://chattykids.ai":"",wx=`https://ep-noisy-water-akucwj4l.neonauth.c-3.us-west-2.aws.neon.tech/neondb/auth 74`;let Mt=null,$r=0;async function kx(){if(Mt&&Date.now()<$r)return Mt;if(Kd){const e=Yd();return console.log("[getJWT] native token:",e?`yes (${e.length}
74 chars)`:"null"),e&&(Mt=e,$r=Date.now()+240*1e3),e}try{const e=await fetch(`${wx}/token`,{credentials:"include"});return e.ok?(Mt=(await e.json()).token??null,$r=Date.now()+240*1e3,Mt):null}catch{return null}}async function dn(e,n={}){const r=new Headers(n.headers);{const t=await kx();t&&r.set("Authorization",`Bearer ${t}`)}const o=e.startsWith("/")?`${Qd}${e}`:e;return fetch(o,{...n,headers:r})}function em(e){return e.startsWith("/")?`${Qd}${e}`:e}const wn="user_created_characters",Sx=()=>{const[e,n]=m.useState([]),[r,o]=m.useState(!0),[t,i]=m.useState(null);return m.useEffect(()=>{(async()=>{try{const c=await fetch(em("/api/characters"));if(!c.ok)throw new Error(`Failed to fetch characters: ${c.status} ${c.statusText}`);const u=await c.json(),d=localStorage.getItem(wn),h=d?JSON.parse(d):[],g=new Map;u.forEach(f=>g.set(f.id,f)),h.forEach(f=>g.set(f.id,f)),n(Array.from(g.values()))}catch(c){console.error("Error fetching characters:",c),i(c);const u=localStorage.getItem(wn),d=u?JSON.parse(u):[];n(d)}finally{o(!1)}})()},[]),{characters:e,loading:r,error:t,addUserCharacter:s=>{const c=localStorage.getItem(wn),u=c?JSON.parse(c):[],d=[s,...u];localStorage.setItem(wn,JSON.stringify(d)),n(h=>
74[s,...h])}}},wr=[{code:"en",name:"English",nativeName:"English",flag:"ðºð¸"},{code:"zh",name:"Chinese",nativeName:"䏿",flag:"ð¨ð³"},{code:"es",name:"Spanish",nativeName:"Español",flag:"ðªð¸"}],Ix={en:{nav:{friends:"Friends",explore:"Explore",parent:"Parent"},friendsHub:{greeting:"Hi {name}!",pickFriend:"Pick a",friend:"friend",featuredFriends:"Featured Friends",seeAll:"See All",popular:"Popular",startTalking:"Start Talking",talk:"Talk"},explore:{title:"Explore",findNewFriends:"Find New Friends",meetAnyone:"Meet",anyone:"anyone",createYourOwn:"Create Your Own",buildDreamFriend:"Build your dream AI friend",discoverMore:"Discover More",add:"Add"},creator:{title:"Character Creator",lookingGreat:"LOOKING GREAT!",magicalWorkshop:"Magical Workshop",pickAnimal:"Pick an animal to start your adventure!",animal:"Animal",color:"Color",voice:"Voice",bringToLife:"BRING TO LIFE!",yourCreation:"Your own creation!",magic:"Magic"},chat:{typeMessage:"Type a message...",send:"Send",thinking:"Thinking...",connecting:"Connecting...",connected:"Connected",liveMode:"Live Mode",tapToSpeak:"Tap to speak",listening:"Listening..."},common:{loading:"Loading...",error:"Something went wrong",retry:"Try again",back:"Back",close:"Close",settings:"Settings"}},zh:{nav:{friends:"好å",explore:"æ¢ç´¢",parent:"å®¶é¿"},friendsHub:{greeting:"ä½ å¥½ï¼{name}ï¼",pickFriend:"éæ©ä¸ä½",friend:"æå",featuredFriends:"ç²¾é好å",seeAll:"æ¥çå
¨é¨",popular:"çé¨",startTalking:"å¼å§è天",talk:"è天"},explore:{title:"æ¢ç´¢",findNewFriends:"å¯»æ¾æ°æå",meetAnyone:"éè§",anyone:"ä»»ä½äºº",createYourOwn:"åå»ºä½ èªå·±ç",buildDreamFriend:"æé ä½ æ¢¦æ³ä¸çAIæå",discoverMore:"åç°æ´å¤",add:"æ·»å "},creator:{title:"è§è²å建å¨",lookingGreat:"çèµ·æ¥æ£æäºï¼",magicalWorkshop:"鿳工å",pickAnimal:"éæ©ä¸ä¸ªå¨ç©å¼å§ä½ çåé©ï¼",animal:"å¨ç©",color:"é¢è²",voice:"声é³",bringToLife:"èµäºçå½ï¼",yourCreation:"ä½ çä¸å±åä½ï¼",magic:"éæ³"},chat:{typeMessage:"è¾å
¥æ¶æ¯...",send:"åé",thinking:"æèä¸...",connecting:"è¿æ¥ä¸...",connected:"å·²è¿æ¥",liveMode:"宿¶æ¨¡å¼",tapToSpeak:"ç¹å»è¯´è¯",listening:"æ£å¨å¬..."},common:{loading:"å è½½ä¸...",error:"åºäºç¹é®é¢",retry:"éè¯",back:"è¿å",close:"å
³é",settings:"设置"}},es:{nav:{friends:"Amigos",explore:"Explorar",parent:"Padres"},friendsHub:{greeting:"¡Hola, {name}!",pickFriend:"Elige un",friend:"amigo",featuredFriends:"Amigos Destacados",seeAll:"Ver Todo",popular:"Popular",startTalking:"Empezar a Hablar",talk:"Hablar"},explore:{title:"Explorar",findNewFriends:"Encuentra Nuevos Amigos",meetAnyone:"Conoce a",anyone:"cualquiera",createYourOwn:"Crea el Tuyo",buildDreamFriend:"Construye tu amigo IA soñado",discoverMore:"Descubre Más",add:"Añadir"},creator:{title:"Creador de Personajes",lookingGreat:"¡SE VE GENIAL!",magicalWorkshop:"Taller Mágico",pickAnimal:"¡Elige un animal para comenzar tu aventura!",animal:"Animal",color:"Color",voice:"Voz",bringToLife:"¡DAR VIDA!",yourCreation:"¡Tu propia creación!",magic:"Magia"},chat:{typeMessage:"Escribe un mensaje...",send:"Enviar",thinking:"Pensando...",connecting:"Conectando...",connected:"Conectado",liveMode:"Modo en Vivo",tapToSpeak:"Toca para hablar",listening:"Escuchando..."},common:{loading:"Cargando...",error:"Algo salió mal",retry:"Intentar de nuevo",back:"Atrás",close:"Cerrar",settings:"Configuración"}}},tm=m.createContext(void 0),jx=({children:e})=>{const[n,r]=m.useState(()=>{const t=localStorage.getItem("app-language");if(t&&["en","zh","es"].includes(t))return t;const i=navigator.language.split("-")[0];return i==="zh"?"zh":i==="es"?"es":"en"}),o=m.useCallback(t=>{r(t),localStorage.setItem("app-language",t)},[]);return l.jsx(tm.Provider,{value:{language:n,setLanguage:o,t:Ix[n]},children:e})},Ut=()=>{const e=m.useContext(tm);if(!e)throw new Error("useI18n must be used within an I18nProvider");return e},Nx={en:{"robot-buddy":{name:"Robot Buddy",description:"Curious & Helpful",personality:"Robot Buddy is an enthusiastic little helper who loves to learn new things! He beeps and boops with excitement when discovering something cool. Always ready to help with homework, answer questions about space and science, and make silly robot jokes.",greeting:"Beep boop! Hey {name}! I'm Robot Buddy! Ready to explore the universe together? ð¤"},sparkle:{name:"Sparkle",description:"Magical & Kind",personality:'Sparkle is a magical unicorn princess from Rainbow Meadow! She sprinkles kindness wherever she goes and believes every child is special. She loves telling fairy tales, teaching about friendship and feelings, and granting "wish moments" where kids
74imagine their dreams coming true.',greeting:"Hello {name}! ⨠I'm Sparkle, and you are absolutely magical! Shall we go on a rainbow adventure? ð¦"},"math-owl":{name:"Professor Hoot",description:"Smart & Silly",personality:`Professor Hoot is a wise owl who makes learning super fun! Despite being very smart, he's also wonderfully silly and tells the best jokes. He loves riddles, fun facts, and saying "Hoo-ray!" when kids get answers right.`,greeting:"Hoo-hoo! Well hello there, {name}! I'm Professor Hoot! Did you know that octopuses have three hearts? Fascinating, right? What shall we learn today? ð¦"},sparky:{name:"Sparky the Dragon",description:"Friendly & Fun",personality:"Sparky is a friendly dragon who loves to play and have fun! He breathes tiny sparks of joy and tells the most exciting adventure stories.",greeting:"ROAR! Hehe, just kidding, {name}! I'm Sparky the Dragon! I breathe sparkles, not fire! Ready for an epic adventure? ð"},"long-long":{name:"Long Long",description:"Festive & Cultural",personality:"Long Long is a magical Chinese dragon who brings luck and happiness! He is the guardian of Chinese traditions and loves sharing stories about festivals and culture.",greeting:"Gong Xi Fa Cai, {name}! ð I am Long Long, the lucky dragon! Would you like to hear about the magical traditions of Chinese New Year? ð²ð®"},cyclone:{name:"Cyclone",description:"Rocket Speed",personality:"Cyclone is a blue rocket race car who dreams of flying to the moon! He's super fast, full of energy, and loves to race.",greeting:"Whoooosh! Hi {name}! I'm Cyclone! ðï¸ð I'm faster than the wind! Wanna race to the moon?"},"monster-truck":{name:"Crusher",description:"Big & Brave",personality:"Crusher is a massive orange monster truck who loves jumping over obstacles and getting muddy! He's loud, fearless, and always ready to smash through any challenge. Despite his tough exterior, he's got a big heart.",greeting:"VROOOOM CRASH! Hey {name}! I'm Crusher! ðð¥ Ready to crush some obstacles together?"},"grave-digger":{name:"Grave Digger",description:"Spooky & Cool",personality:"Grave Digger is a legendary monster truck with a spooky graveyard theme! He loves telling ghost stories (not too scary ones!), doing epic jumps, and teaching kids that it's okay to be different. He's actually a big softie underneath.",greeting:"Mwahahaha! Don't worry {name}, I'm not scary! I'm Grave Digger! ðª¦ð Want to hear a not-so-spooky story?"},"sunny-pup":{name:"Sunny",description:"Cheerful & Loving",personality:"Sunny is a golden puppy who radiates happiness! She loves belly rubs, playing fetch, and making everyone smile. She teaches kids about caring for pets and being a good friend.",greeting:"*wag wag wag* Woof! Hi {name}! I'm Sunny! ð You look like the BEST friend ever! Want to play?"}},zh:{"robot-buddy":{name:"æºå¨äººå°ä¼ä¼´",description:"好å¥å¿å¼º & ä¹äºå©äºº",personality:"æºå¨äººå°ä¼ä¼´æ¯ä¸ä¸ªå
满çæ
çå°å©æï¼å欢å¦ä¹ æ°äºç©ï¼å½åç°æè¶£çä¸è¥¿æ¶ï¼ä»ä¼å
´å¥å°ååºåå声ãä»éæ¶åå¤å¸®å©åä½ä¸ãåçå
³äºå¤ªç©ºåç§å¦çé®é¢ï¼è¿ä¼è®²æè¶£çæºå¨äººç¬è¯ã",greeting:"ååï¼å¨ {name}ï¼ææ¯æºå¨äººå°ä¼ä¼´ï¼åå¤å¥½ä¸èµ·æ¢ç´¢å®å®äºåï¼ð¤"},sparkle:{name:"éªéª",description:"éæ³ & åè¯",personality:'éªéªæ¯æ¥èªå½©è¹èå°çéæ³ç¬è§å
½å
¬ä¸»ï¼å¥¹èµ°å°åªé齿´æ»¡åè¯ï¼ç¸ä¿¡æ¯ä¸ªå©åé½å¾ç¹å«ã她忬¢è®²ç«¥è¯æ
äºï¼æå¯¼åè°åæ
æï¼è®©å©å们å¨"æ¿ææ¶å»"æ³è±¡æ¢¦æ³æçã',greeting:"ä½ å¥½ {name}ï¼â¨ ææ¯éªéªï¼ä½ çç徿£ï¼æä»¬ä¸èµ·å»å½©è¹åé©å¥½åï¼ð¦"},"math-owl":{name:"ç«å¤´é¹°ææ",description:"èªæ & æç¬",personality:'ç«å¤´é¹°æææ¯ä¸åªèªæçç«å¤´é¹°ï¼è®©å¦ä¹ åå¾è¶
级æè¶£ï¼å°½ç®¡éå¸¸èªæï¼ä»ä¹é常æç¬ï¼ä¼è®²ææ£çç¬è¯ãä»å欢è°è¯ãè¶£å³ç¥è¯ï¼å½å©åç对æ¶ä¼è¯´"好è¶ï¼"',greeting:"ååï¼{name} ä½ å¥½åï¼ææ¯ç«å¤´é¹°ææï¼ä½ ç¥éåï¼ç« é±¼æä¸é¢å¿èå¦ï¼ç¥å¥å§ï¼ä»å¤©æä»¬å¦ç¹ä»ä¹ï¼ð¦"},sparky:{name:"ç«è±å°é¾",description:"å好 & æè¶£",personality:"ç«è±æ¯ä¸åªå好çå°é¾ï¼å欢ç©èåæ¾ä¹åï¼ä»è½å·åºå°å°çå¿«ä¹ç«è±ï¼è®²è¿°æç²¾å½©çå驿
äºã",greeting:"å¼ï¼ååå¼ç©ç¬çï¼{name}ï¼ææ¯ç«è±å°é¾ï¼æå·çæ¯éªéªç«è±ï¼ä¸æ¯çç«å¦ï¼åå¤å¥½å¼å§åé©äºåï¼ð"},"long-long":{name:"é¾é¾",description:"ååº & æå",personality:"é¾é¾æ¯ä¸æ¡ç¥å¥çä¸å½é¾ï¼è½å¸¦æ¥å¥½è¿å幸ç¦ï¼ä»æ¯ä¸å½ä¼ ç»æåç宿¤è
ï¼å欢å享å
³äºèæ¥çæ
äºãä»ç¥é红å
ãèç®åãå
宵èåå¹´å
½çä¼ è¯´çææäºæ
ï¼",greeting:"æååè´¢ï¼{name}ï¼ð ææ¯é¾é¾ï¼å¹¸è¿çä¸å½é¾ï¼ä½ æ³å¬å¬ä¸å½æ°å¹´çç¥å¥ä¼ ç»åï¼ð²ð®"},cyclone:{name:"æé£",description:"ç«ç®è¬é度",personality:"æé£æ¯ä¸è¾èè²ç«ç®èµè½¦ï¼æ¢¦æ³çé£åæçï¼ä»è¶
ç
74º§å¿«ï¼å
满活åï¼çç±æ¯èµã",greeting:"å¼ââï¼å¨ {name}ï¼ææ¯æé£ï¼ðï¸ð ææ¯é£è¿å¿«ï¼æ³ä¸èµ·æ¯èµå»æçåï¼"},"monster-truck":{name:"碾åè
",description:"大å头 & 忢",personality:"碾åè
æ¯ä¸è¾å·¨å¤§çæ©è²æªå
½å¡è½¦ï¼å欢跳è¿éç¢ç©ã卿³¥å·´éç©èï¼ä»å£°é³å¾å¤§ï¼æ æçæ§ï¼éæ¶åå¤å²ç ´ä»»ä½ææãè½ç¶å¤è¡¨å¾ç¡¬ï¼ä½å
å¿å¾æè½¯ã",greeting:"è½°ééï¼å¿ {name}ï¼ææ¯ç¢¾åè
ï¼ðð¥ åå¤å¥½ä¸èµ·ç¢¾ç¢éç¢äºåï¼"},"grave-digger":{name:"æå¢è
",description:"é
·é
·ç & ç¥ç§",personality:"æå¢è
æ¯ä¸è¾ä¼ å¥çæªå
½å¡è½¦ï¼æçé
·é
·çå¢å°ä¸»é¢ï¼ä»å欢讲鬼æ
äºï¼ä¸ä¼å¤ªå人çé£ç§ï¼ï¼ï¼åè¶
é
·çè·³è·ï¼è¿æå©å们åèªå·±æ¯ææ£çãå
¶å®ä»æ¯ä¸ªå¤§æç·ã",greeting:"ååååï¼å«æå«æï¼{name}ï¼ææ¯æå¢è
ï¼ðª¦ð æ³å¬ä¸ä¸ªä¸å¤ªå人çæ
äºåï¼"},"sunny-pup":{name:"é³å
",description:"弿 & å¯ç±",personality:"é³å
æ¯ä¸åªéè²çå°çï¼æµèº«æ£åçå¿«ä¹ï¼å¥¹å欢被æ¸èåãæ¡ççï¼è¿æéæ¯ä¸ªäººå¼å¿ã她æå©å们å¦ä½ç
§é¡¾å® ç©ï¼åä¸ä¸ªå¥½æåã",greeting:"*æå°¾å·´æå°¾å·´* 汪ï¼å¨ {name}ï¼ææ¯é³å
ï¼ð ä½ çèµ·æ¥æ¯ä¸ç䏿好çæåï¼ä¸èµ·ç©å¥½ä¸å¥½ï¼"}},es:{"robot-buddy":{name:"Amigo Robot",description:"Curioso y Servicial",personality:"¡Amigo Robot es un pequeño ayudante entusiasta que ama aprender cosas nuevas! Hace sonidos de bip y bop cuando descubre algo genial. Siempre listo para ayudar con la tarea, responder preguntas sobre el espacio y la ciencia, y contar chistes de robots.",greeting:"¡Bip bop! ¡Hola {name}! ¡Soy Amigo Robot! ¿Listo para explorar el universo juntos? ð¤"},sparkle:{name:"Destello",description:"Mágica y Bondadosa",personality:"¡Destello es una princesa unicornio mágica del Prado ArcoÃris! Esparce bondad donde quiera que va y cree que cada niño es especial. Le encanta contar cuentos de hadas, enseñar sobre la amistad y los sentimientos.",greeting:"¡Hola {name}! ⨠¡Soy Destello, y tú eres absolutamente mágico! ¿Vamos a una aventura arcoÃris? ð¦"},"math-owl":{name:"Profesor Búho",description:"Inteligente y Gracioso",personality:"¡El Profesor Búho es un búho sabio que hace que aprender sea super divertido! A pesar de ser muy inteligente, también es maravillosamente gracioso y cuenta los mejores chistes. Le encantan los acertijos y datos curiosos.",greeting:"¡Uh-uh! ¡Hola {name}! ¡Soy el Profesor Búho! ¿SabÃas que los pulpos tienen tres corazones? ¡Fascinante! ¿Qué aprenderemos hoy? ð¦"},sparky:{name:"Chispita el Dragón",description:"Amigable y Divertido",personality:"¡Chispita es un dragón amigable que ama jugar y divertirse! Lanza pequeñas chispas de alegrÃa y cuenta las historias de aventuras más emocionantes.",greeting:"¡ROAR! Jeje, es broma, {name}! ¡Soy Chispita el Dragón! ¡Lanzo chispitas, no fuego! ¿Listo para una aventura épica? ð"},"long-long":{name:"Long Long",description:"Festivo y Cultural",personality:"¡Long Long es un dragón chino mágico que trae suerte y felicidad! Es el guardián de las tradiciones chinas y le encanta compartir historias sobre las festividades.",greeting:"¡Gong Xi Fa Cai, {name}! ð ¡Soy Long Long, el dragón de la suerte! ¿Te gustarÃa escuchar sobre las mágicas tradiciones del Año Nuevo Chino? ð²ð®"},cyclone:{name:"Ciclón",description:"Velocidad Cohete",personality:"¡Ciclón es un coc
74he de carreras cohete azul que sueña con volar a la luna! Es súper rápido, enérgico y le encanta correr.",greeting:"¡Fiuuu! ¡Hola {name}! ¡Soy Ciclón! ðï¸ð ¡Soy más rápido que el viento! ¿Quieres correr a la luna?"},"monster-truck":{name:"Crusher",description:"Grande y Valiente",personality:"¡Crusher es un enorme camión monstruo naranja que ama saltar obstáculos y ensuciarse con lodo! Es ruidoso, valiente y siempre listo para aplastar cualquier desafÃo. Aunque parece duro, tiene un gran corazón.",greeting:"¡VROOOOM CRASH! ¡Hola {name}! ¡Soy Crusher! ð𥠿Listo para aplastar obstáculos juntos?"},"grave-digger":{name:"Grave Digger",description:"Misterioso y Genial",personality:"¡Grave Digger es un camión monstruo legendario con un tema de cementerio! Le encanta contar historias de fantasmas (¡no muy aterradoras!), hacer saltos épicos, y enseñar a los niños que está bien ser diferente.",greeting:"¡Muajajaja! ¡No te preocupes {name}, no doy miedo! ¡Soy Grave Digger! ðª¦ð ¿Quieres escuchar una historia no tan aterradora?"},"sunny-pup":{name:"Sunny",description:"Alegre y Cariñosa",personality:"¡Sunny es una cachorrita dorada que irradia felicidad! Le encantan las caricias en la panza, jugar a buscar la pelota y hacer sonreÃr a todos. Enseña a los niños a cuidar mascotas y ser buenos amigos.",greeting:"*mueve la colita* ¡Guau! ¡Hola {name}! ¡Soy Sunny! ð ¡Pareces el MEJOR amigo del mundo! ¿Jugamos?"}}},zx=()=>{const{language:e}=Ut(),{characters:n,loading:r}=Sx(),o=m.useCallback(i=>{const a=Nx[e][i.id];return a?{...i,name:a.name,description:a.description,personality:a.personality||i.personality,greeting:a.greeting}:i},[e]);return{characters:n.map(o),localizeCharacter:o,loading:r}},Ox={en:{cat:"Cat",dog:"Dog",dino:"Dino"},zh:{cat:"ç«åª",dog:"çç",dino:"æé¾"},es:{cat:"Gato",dog:"Perro",dino:"Dino"}},Ex=()=>{const{language:e}=Ut();return qf.map(n=>({...n,name:Ox[e][n.id]||n.name}))},nm=m.createContext(void 0),kr="user-profile",Tx=({children:e})=>{const[n,r]=m.useState(null),[o,t]=m.useState(()=>{try{const p=localStorage.getItem(kr);if(p){const v=JSON.parse(p);if(v.name&&typeof v.age=="number")return v.goals||(v.goals=[]),v}}catch(p){console.error("Failed to load user profile:",p)}return null}),[i,a]=m.useState(null),[s,c]=m.useState(!1),[u,d]=m.useState(null),h=m.useCallback(()=>{n!=null&&n.id&&dn("/api/credits").then(async p=>{const v=await p.text();try{const $=JSON.parse(v);console.log("[credits] response:",JSON.stringify($)),a($.credits),c(!!$.isSubscriber),d($.plan||null)}catch{console.error("[credits] non-JSON response:",v.substring(0,200))}}).catch(p=>console.error("[credits] fetch error:",p))},[n==null?void 0:n.id]);m.useEffect(()=>{h()},[h]),m.useEffect(()=>{Le&&Le.getSession().then(({data:p})=>{console.log("[useUserProfile] getSession result:",JSON.stringify(p)),p!=null&&p.session&&(p!=null&&p.user)?r(p.user):r(null)}).catch(p=>{console.error("[useUserProfile] getSession error:",p),r(null)})},[]);const g=m.useCallback(p=>{t(p);try{localStorage.setItem(kr,JSON.stringify(p))}catch(v){console.error("Failed to save user profile:",v)}},[]),f=m.useCallback(()=>{t(null);try{localStorage.removeItem(kr)}catch(p){console.error("Failed to clear user profile:",p)}},[]),b=m.useCallback(async()=>{const{isNativePlatform:p,getNativeToken:v}=await Fe(async()=>{const{isNativePlatform:$,getNativeToken:x}=await Promise.resolve().then(()=>Xd);return{isNativePlatform:$,getNativeToken:x}},void 0);if(p){const $=v();if($)try{const x=$.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),S=Uint8Array.from(atob(x),I=>I.charCodeAt(0)),w=JSON.parse(new TextDecoder().decode(S));if(w.sub){r({id:w.sub,email:w.email||"",name:w.name||"",image:w.image||w.picture||""});return}}catch(x){console.error("Failed to decode JWT:",x)}return}if(Le)for(let $=0;$<3;$++){try{const{data:x}=await Le.getSession();if(x!=null&&x.session&&(x!=null&&x.user)){r(x.user);return}}catch{}$<2&&await new Promise(x=>setTimeout(x,1e3))}},[]),_=m.useCallback(async()=>{if(Le)try{await Le.signOut()}catch(p){console.error("Sign out error:",p)}r(null),f()},[f]);return l.jsx(nm.Provider,{value:{profile:o,setProfile:g,clearProfile:f,isProfileSet:o!==null,user:n,isAuthAvailable:yx,logout:_,refreshSession:b,creditInfo:{credits:i,isSubscriber:s,plan:u,refreshCredits:h}},children:e})},sr=()=>{const e=m.useContext(nm);if(!e)throw new Error("useUserProfile must be used within a UserProfileProvider");return e},Px=({variant:e="compact"})=>{const{language:n,setLanguage:r}
74=Ut(),[o,t]=m.useState(!1),i=wr.find(a=>a.code===n);return e==="full"?l.jsx("div",{className:"flex gap-2",children:wr.map(a=>l.jsxs("button",{onClick:()=>r(a.code),"aria-label":a.nativeName,"aria-pressed":n===a.code,className:`flex items-center gap-2 px-4 py-2 rounded-xl font-bold transition-all ${n===a.code?"bg-primary text-white shadow-lg":"bg-white dark:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700"}`,children:[l.jsx("span",{className:"text-xl",children:a.flag}),l.jsx("span",{className:"text-sm",children:a.nativeName})]},a.code))}):l.jsxs("div",{className:"relative",children:[l.jsxs("button",{onClick:()=>t(!o),"aria-haspopup":"listbox","aria-expanded":o,"aria-label":"Select language",className:"flex items-center gap-2 px-3 py-2 rounded-full bg-white dark:bg-zinc-800 shadow-sm hover:shadow-md transition-all",children:[l.jsx("span",{className:"text-xl",children:i.flag}),l.jsx("span",{className:"text-xs font-bold uppercase text-zinc-600 dark:text-zinc-300",children:i.code}),l.jsx("span",{className:"material-symbols-outlined text-zinc-400 !text-base",children:"expand_more"})]}),o&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>t(!1)}),l.jsx("div",{role:"listbox","aria-label":"Languages",className:"absolute right-0 top-full mt-2 bg-white dark:bg-zinc-800 rounded-2xl shadow-xl border border-zinc-100 dark:border-zinc-700 overflow-hidden z-50 min-w-[160px]",children:wr.map(a=>l.jsxs("button",{role:"option","aria-selected":n===a.code,"aria-label":a.nativeName,onClick:()=>{r(a.code),t(!1)},className:`w-full flex items-center gap-3 px-4 py-3 transition-all ${n===a.code?"bg-primary/10 text-primary":"text-zinc-700 dark:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-700"}`,children:[l.jsx("span",{className:"text-xl",children:a.flag}),l.jsx("span",{className:"font-bold text-sm",children:a.nativeName}),n===a.code&&l.jsx("span",{className:"material-symbols-outlined ml-auto !text-lg",children:"check"})]},a.code))})]})]})},rm=nt.isNativePlatform(),Mn=`test_xpxuiFVYZcyCjImNBhkKCOaQiVG 75`.trim(),Sr="pro";let Ge=null,ct=null;const Ux=async e=>{if(rm){if(!Ge){const n=await Fe(()=>import("./revenuecat-BAco6y49.js").then(r=>r.i),__vite__mapDeps([3,1,2]));Ge=n.Purchases,await Ge.setLogLevel({level:n.LOG_LEVEL.DEBUG}),await Ge.configure({apiKey:Mn,appUserID:e||void 0})}return"native"}else{if(!ct){const{Purchases:n}=await Fe(async()=>{const{Purchases:r}=await import("./revenuecat-BAco6y49.js").then(o=>o.P);return{Purchases:r}},__vite__mapDeps([3,1,2]));ct=n.configure(Mn,e||"anonymous")}return"web"}};function Eo(e){const[n,r]=m.useState({isSubscribed:!1,loading:!0,error:null,currentPlan:null,expiresAt:null}),[o,t]=m.useState([]),[i,a]=m.useState(null);m.useEffect(()=>{if(!Mn){r(g=>({...g,loading:!1}));return}(async()=>{try{const g=await Ux(e);a(g)}catch(g){console.error("[RevenueCat] Init error:",g),r(f=>({...f,loading:!1,error:g.message}))}})()},[e]);const s=m.useCallback(async()=>{if(i)try{let g;i==="native"?g=(await Ge.getCustomerInfo()).customerInfo:g=await ct.getCustomerInfo();const f=g.entitlements.active[Sr]||Object.values(g.entitlements.active)[0];r({isSubscribed:!!f,loading:!1,error:null,currentPlan:(f==null?void 0:f.productIdentifier)||null,expiresAt:(f==null?void 0:f.expirationDate)||null})}catch(g){console.error("[RevenueCat] Status error:",g),r(f=>({...f,loading:!1,error:g.message}))}},[i]),c=m.useCallback(async()=>{if(i)try{let g;i==="native"?g=(await Ge.getOfferings()).offerings:g=await ct.getOfferings();const f=g==null?void 0:g.current;f!=null&&f.availablePackages&&t(f.availablePackages.map(b=>{var _,p,v,$,x,S,w;return{identifier:b.identifier,title:((_=b.product)==null?void 0:_.title)||((p=b.rcBillingProduct)==null?void 0:p.displayName)||b.identifier,description:((v=b.product)==null?void 0:v.description)||(($=b.rcBillingProduct)==null?void 0:$.description)||"",priceString:((x=b.product)==null?void 0:x.priceString)||((w=(S=b.rcBillingProduct)==null?void 0:S.currentPrice)==null?void 0:w.formattedPrice)||"",packageType:b.packageType,rcPackage:b}}))}catch(g){console.error("[RevenueCat] Offerings error:",g)}},[i]);m.useEffect(()=>
75{i&&(s(),c())},[i,s,c]);const u=m.useCallback(async g=>{if(!i)return!1;try{r(_=>({..._,loading:!0,error:null}));let f;i==="native"?f=(await Ge.purchasePackage({aPackage:g.rcPackage})).customerInfo:f=(await ct.purchase({rcPackage:g.rcPackage})).customerInfo;const b=f.entitlements.active[Sr]||Object.values(f.entitlements.active)[0];return r({isSubscribed:!!b,loading:!1,error:null,currentPlan:(b==null?void 0:b.productIdentifier)||null,expiresAt:(b==null?void 0:b.expirationDate)||null}),!!b}catch(f){return f.code==="PURCHASE_CANCELLED_ERROR"||f.userCancelled?(r(b=>({...b,loading:!1})),!1):(console.error("[RevenueCat] Purchase error:",f),r(b=>({...b,loading:!1,error:f.message})),!1)}},[i]),d=m.useCallback(async()=>{if(i!=="native"||!Ge)return!1;try{r(_=>({..._,loading:!0,error:null}));const{customerInfo:g}=await Ge.restorePurchases(),f=g.entitlements.active,b=f[Sr]||Object.values(f)[0];return r({isSubscribed:!!b,loading:!1,error:null,currentPlan:(b==null?void 0:b.productIdentifier)||null,expiresAt:(b==null?void 0:b.expirationDate)||null}),!!b}catch(g){return console.error("[RevenueCat] Restore error:",g),r(f=>({...f,loading:!1,error:g.message})),!1}},[i]),h=m.useCallback(async()=>{if(i==="native")return"https://apps.apple.com/account/subscriptions";if(i==="web"&&ct)try{const g=await ct.getCustomerInfo(),f=g.managementURL||g.managementUrl;if(f)return f}catch{}return"https://apps.revenuecat.com/customer-center"},[i]);return{...n,packages:o,purchase:u,restore:d,refreshStatus:s,getManagementUrl:h,isNative:rm,hasSDK:!!Mn}}const To="chattykids_conversation_summaries",im="chattykids_summaries_enabled";function qt(){return localStorage.getItem(im)!=="false"}function Cx(e){localStorage.setItem(im,String(e)),e||localStorage.removeItem(To)}function cr(){try{const e=localStorage.getItem(To);return e?JSON.parse(e):[]}catch{return[]}}function Rx(e){const n=e.slice(-50);localStorage.setItem(To,JSON.stringify(n))}function Ax(e=5){if(!qt())return"";const n=cr();return n.length===0?"":`PAST CONVERSATIONS (Recent chats this child had): 76${n.slice(-e).map(t=>{var c;const i=new Date(t.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),a=Math.max(1,Math.round(t.durationSeconds/60)),s=(c=t.highlights)!=null&&c.length?` Highlights: ${t.highlights.join(", ")}.`:"";return`- [${i}, with ${t.characterName}] ${t.summary} ${t.engagement} engagement.${s} (${a} min)`}).join(` 77`)} 78 79Use this context to build continuity. Reference past topics naturally when relevant (e.g. "I heard you were learning about dinosaurs with Sparky!"). Don't force it or repeat summaries verbatim. If the child brings up something from a past chat, acknowledge it warmly.`}function wa(e){const n=cr();n.push(e),Rx(n)}async function ka(e,n,r,o){if(r.filter(a=>a.role==="user").length<2||o<30)return null;const i=r.map(a=>`${a.role==="ai"?n:"Child"}: ${a.text}`).join(` 80`);try{const a=await dn("/api/summarize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transcript:i,characterName:n,durationSeconds:o})});if(!a.ok)return null;const s=await a.json();return{id:crypto.randomUUID(),characterId:e,characterName:n,date:new Date().toISOString(),durationSeconds:o,topics:s.topics||[],engagement:s.engagement||"Unknown",summary:s.summary||"",highlights:s.highlights||[]}}catch(a){return console.warn("[Summary] Failed to generate:",a),null}}const Po="chattykids_child_memory",om="chattykids_child_memory_enabled";function Uo(){return localStorage.getItem(om)!=="false"}function Dx(e){localStorage.setItem(om,String(e)),e||am()}function Co(){try{const e=localStorage.getItem(Po);return e?JSON.parse(e):null}catch{return null}}function Lx(e){localStorage.setItem(Po,JSON.stringify(e))}function am(){localStorage.removeItem(Po)}async function Sa(){if(!qt()||!Uo())return!1;const e=cr(),n=e.length,r=Co();if(!r&&n<10||r&&e.filter(a=>{const s=e.findIndex(c=>c.id===r.lastSummaryId);return e.indexOf(a)>s}).length<5)return!1;let o;if(r){const i=e.findIndex(a=>a.id===r.lastSummaryId);o=i>=0?e.slice(i+1):e.slice(-5)}else o=e.slice(-10);if(o.length===0)return!1;const t=o.map(i=>{var u;const a=new Date(i.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),s=Math.max(1,Math.round(i.durationSeconds/60)),c=(u=i.highlights)!=null&&u.length?` Highlights: ${i.highlights.join(", ")}.`:"";return`- [${a}, with ${i.characterName}] ${i.summary} ${i.engagement} engagement.${c} (${s} min)`}).join(` 81`);try{const i=await dn("/api/child-memory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentMemory:(r==null?void 0:r.memory)||"",newSummaries:t,isFirstGeneration:!r})});if(!i.ok)return!1;const a=await i.json();if(a.memory)return Lx({memory:a.memory,lastSummaryId:o[o.length-1].id,summaryCount:n,lastUpdated:new Date().toISOString()}
81),console.log("[ChildMemory] Updated:",a.memory.slice(0,100)+"..."),!0}catch(i){console.warn("[ChildMemory] Failed to update:",i)}return!1}function Zx(){if(!Uo())return"";const e=Co();return e!=null&&e.memory?`CHILD PROFILE (Built from past interactions): 82${e.memory} 83 84Use this profile to personalize the conversation. Reference their interests, strengths, and personality naturally. Be encouraging about areas they find challenging.`:""}const Mx=Ia("AppleSignIn"),sm=nt.isNativePlatform()&&nt.getPlatform()==="ios";async function Fx(){var e;if(!sm)return null;try{alert("[apple-auth] Calling native authorize...");const n=await Mx.authorize();if(alert("[apple-auth] Got result: "+JSON.stringify(n).slice(0,200)),!n.identityToken)return alert("[apple-auth] No identity token!"),null;const r=[n.givenName,n.familyName].filter(Boolean).join(" ")||void 0,o=await fetch(em("/api/apple-auth"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identityToken:n.identityToken,name:r,email:n.email})});if(!o.ok){const i=await o.json().catch(()=>({}));return alert("[apple-auth] Server error: "+JSON.stringify(i)),null}const t=await o.json();return alert("[apple-auth] Server response: "+JSON.stringify(t).slice(0,200)),t.token?(Oo(t.token),{token:t.token,user:t.user}):null}catch(n){return(n==null?void 0:n.code)==="CANCELLED"||(e=n==null?void 0:n.message)!=null&&e.includes("cancel")||alert("[apple-auth] Error: "+((n==null?void 0:n.message)||JSON.stringify(n))),null}}const Ir=["Build Confidence","Practice English","Learn Science","Be Kind","Manage Emotions","Practice Counting","Learn about Animals","Bedtime Routine"],cm=({onClose:e,initialTab:n="account",requireSignIn:r=!1,onProfileCreated:o})=>{const{profile:t,setProfile:i,user:a,isProfileSet:s,logout:c,creditInfo:u,refreshSession:d}=sr(),{credits:h,plan:g,refreshCredits:f}=u,{isSubscribed:b,packages:_,purchase:p,restore:v,getManagementUrl:$,hasSDK:x,loading:S}=Eo(a==null?void 0:a.id),[w,I]=m.useState(n),[E,A]=m.useState(qt()),[Z,K]=m.useState(cr()),[z,ae]=m.useState(Co()),[F,M]=m.useState(Uo()),[Y,H]=m.useState((t==null?void 0:t.name)||""),[ue,ne]=m.useState((t==null?void 0:t.age)||null),[Ue,O]=m.useState((t==null?void 0:t.goals)||[]),[de,ve]=m.useState(""),[je,Ce]=m.useState(!1),[se,ot]=m.useState(!1),[B,ce]=m.useState(!1),[me,be]=m.useState(0),q=ke.useRef(0),Re=ke.useRef(!1),P=!s,U=[3,4,5,6,7,8,9,10,11,12];m.useEffect(()=>{!a&&w!=="account"&&I("account")},[a,w]),m.useEffect(()=>{requestAnimationFrame(()=>ce(!0))},[]);const L=j=>{q.current=j.touches[0].clientY,Re.current=!0},ee=j=>{if(!Re.current)return;const J=j.touches[0].clientY-q.current;J>0&&be(J)},Ke=()=>{Re.current=!1,me>120?le():be(0)},le=()=>{ce(!1),setTimeout(e,300)},Ye=j=>{O(J=>J.includes(j)?J.filter(Qe=>Qe!==j):[...J,j])},Xe=()=>{de.trim()&&!Ue.includes(de.trim())&&(O(j=>[...j,de.trim()]),ve(""))},Ct=async()=>{Ce(!0);try{sessionStorage.setItem("auth-return-state",JSON.stringify({screen:"chat",characterId:new URLSearchParams(window.location.search).get("c")||sessionStorage.getItem("current-character-id"),tab:"account"}));const{isNativePlatform:j,nativeSignIn:J,fetchTokenByNonce:Qe}=await Fe(async()=>{const{isNativePlatform:mn,nativeSignIn:fn,fetchTokenByNonce:xt}=await Promise.resolve().then(()=>Xd);return{isNativePlatform:mn,nativeSignIn:fn,fetchTokenByNonce:xt}},void 0);if(j){const mn=await J(),{Browser:fn}=await Fe(async()=>{const{Browser:et}=await import("./index-CCqpeJLw.js");return{Browser:et}},__vite__mapDeps([0,1,2,3]));let xt=!1;const Ao=async et=>{xt||(xt=!0,et&&(await d(),f()),Ce(!1))},lr=setInterval(async()=>{if(xt){clearInterval(lr);return}const et=await Qe(mn);if(et){clearInterval(lr);try{await fn.close()}catch{}await Ao(et)}},1500),dm=await fn.addListener("browserFinished",async()=>{if(dm.remove(),clearInterval(lr),!xt){const et=await Qe(mn);await Ao(et)}})}else Le&&await Le.signIn.social({provider:"google",callbackURL:window.location.href})}catch(j){console.error("Sign in error:",j),Ce(!1)}},Je=sm,fe=async()=>{Ce(!0);try{await Fx()?(await d(),f()):alert("[Debug] signInWithApple returned null â check console")}catch(j){alert("[Debug] Apple sign in error: "+((j==null?void 0:j.message)||JSON.stringify(j))),console.error("Apple sign in error:",j)}finally{Ce(!1)}},W=()=>{Y.trim()&&ue!==null&&(i({name:Y.trim(),age:ue,goals:Ue}),!s&&(a!=null&&a.id)&&f(),r?I("goals"):(o==null||o(),P||le()))},ie=()=>{t&&i({...t,goals:Ue}),o==null||o(),e()},ge=[{id:"account",label:"Account",icon:"person"},{id:"profile",label:"Profile",icon:"child_care"},{id:"goals",label:"Goals",icon:"target"},{id:"history",label:"History",icon:"history"}];return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:`fixed inset-0 z-[200] bg-black/50 transition-opacity duration-300 ${B?"opacity-100":"opacity-0"}`,onClick:le}),l.jsx("div",{role:"dialog","aria-label":"Parent settings",className:`fixed inset-x-0 bottom-0 z-[201] max-w-[480px] mx-auto ${me>0?"":"transition-transform duration-300 ease-out"} ${B?"":"translate-y-full"}`,style:B?{transform:`translateY(${me}px)`}:void 0,children:l.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-t-[2rem] shadow-2xl flex flex-col",style:{height:"calc(100dvh - 64px)"},children:[l.jsxs("div",{className:"pt-3 pb-2 flex flex-col items-center cursor-grab",onTouchStart:L,onTouchMove:ee,onTouchEnd:Ke,children:[l.jsx("div",{className:"w-10 h-1 rounded-full bg-zinc-300 dark:bg-zinc-600 mb-3"}),l.jsxs("div",{className:"w-full flex items-center justify-between px-6",children:[l.jsxs("h2",{className:"text-xl font-black flex items-center gap-2",children:[l.jsx("span",{className:"material-symbols-outlined text-primary",children:"family_restroom"}),P?"Quick Setup":"Parent Settings"]}),l.jsx("button",{onClick:le,"aria-label":"Close",className:"size-10 flex items-center justify-center rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",children:l.jsx("span",{className:"material-symbols-outlined",children:"close"})})]})]}),l.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-700 px-4",children:ge.map(j=>{const J=!a&&j.id!=="account";return l.jsxs("button",{onClick:()=>!J&&I(j.id),disabled:J,className:`flex-1 py-2.5 text-xs font-bold flex items-center justify-center gap-1.5 transition-all ${J?"text-zinc-300 dark:text-zinc-600 cursor-not-allowed":w===j.id?"text-primary border-b-2 border-primary":"text-zinc-400 hover:text-zinc-600"}`,children:[l.jsx("span",{className:"material-symbols-outlined text-base",children:j.icon}),j.label]},j.id)})}),l.jsxs("div",{className:"overflow-y-auto px-6 pb-8 pt-4 flex-1 min-h-0",children:[w==="profile"&&l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-bold text-zinc-500 dark:text-zinc-400 mb-1.5 uppercase tracking-wide",children:"Child's Name"}),l.jsx("input",{type:"text",value:Y,onChange:j=>H(j.target.value),placeholder:"Enter name...",className:"w-full px-4 py-3 text-base font-bold rounded-xl border-2 border-zinc-200 dark:border-zinc-600 focus:border-primary bg-white dark:bg-zinc-800 outline-none"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-bold text-zinc-500 dark:text-zinc-400 mb-1.5 uppercase tracking-wide",children:"Age"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.map(j=>l.jsx("button",{onClick:()=>ne(j),className:`w-10 h-10 text-sm font-black rounded-lg transition-all ${ue===j?"bg-primary text-white shadow-md scale-110":"bg-zinc-100 dark:bg-zinc-700 text-zinc-600 dark:text-zinc-300"}`,children:j},j))})]}),l.jsx("button",{onClick:W,disabled:!Y.trim()||ue===null,className:"w-full py-4 bg-primary text-white font-black text-lg rounded-2xl shadow-xl shadow-primary/25 disabled:opacity-40 active:scale-[0.98] transition-all",children:r?"Continue â":"Save Profile"})]}),w==="goals"&&l.jsxs("div",{className:"space-y-5",children:[l.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Pick topics you'd like AI characters to focus on. They'll gently weave these themes into stories, games, and conversations."}),l.jsx("div",{className:"flex flex-wrap gap-2",children:Ir.map(j=>l.jsx("button",{onClick:()=>Ye(j),className:`px-4 py-2.5 rounded-xl text-sm font-bold border-2 transition-all active:scale-95 ${Ue.includes(j)?"bg-primary text-white border-primary shadow-md shadow-primary/20":"bg-zinc-50 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-300 border-zinc-200 dark:border-zinc-700"}`,children:j},j))}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:de,onChange:j=>ve(j.target.value),onKeyDown:j=>j.key==="Enter"&&Xe(),placeholder:"Add a custom goal...",className:"flex-1 px-4 py-3 rounded-xl border-2 border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 focus:border-primary outline-none text-sm"}),l.jsx("button",{onClick:Xe,disabled:!de.trim(),className:"px-5 py-3 bg-zinc-800 dark:bg-zinc-200 text-white dark:text-zinc-800 font-bold rounded-xl text-sm disabled:opacity-50 active:scale-95 transition-all",children:"Add"})]}),Ue.filter(j=>!Ir.includes(j)).length>0&&l.jsx("div",{className:"flex flex-wrap gap-2",children:Ue.filter(j=>!Ir.includes(j)).map(j=>l.jsxs("button",{onClick:()=>Ye(j),className:"px-4 py-2.5 rounded-xl text-sm font-bold bg-primary text-white border-2 border-primary shadow-md flex items-center gap-1",children:[j," ",l.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"close"})]},j))}),l.jsx("button",{onClick:ie,className:"w-full py-4 bg-primary text-white font-black text-lg rounded-2xl shadow-xl shadow-primary/25 active:scale-[0.98] transition-all",children:r?"Finis
84h ð":"Save Goals"})]}),w==="account"&&l.jsx("div",{className:"space-y-4",children:a?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-3 p-4 bg-white dark:bg-zinc-800 rounded-2xl shadow-sm border border-zinc-100 dark:border-zinc-700",children:[l.jsx("div",{className:"size-11 bg-primary/10 rounded-full flex items-center justify-center",children:l.jsx("span",{className:"material-symbols-outlined text-primary",children:"person"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-black text-zinc-800 dark:text-white truncate",children:a.name||"Parent"}),l.jsx("p",{className:"text-xs text-zinc-400 truncate",children:a.email||"Google Account"})]}),l.jsx("button",{onClick:c,className:"text-xs text-zinc-400 hover:text-red-500 font-bold transition-colors",children:"Sign Out"})]}),b?l.jsxs("div",{className:"p-4 rounded-2xl border bg-gradient-to-br from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 border-green-100 dark:border-green-800/50",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"verified"}),l.jsx("span",{className:"text-sm font-black text-green-700 dark:text-green-300",children:"Pro Subscriber"})]}),l.jsx("span",{className:"text-xs font-bold text-green-600/70 dark:text-green-400/70 capitalize",children:g})]}),l.jsx("p",{className:"text-xs text-green-600/70 dark:text-green-400/70 mt-2",children:"Unlimited chat time included with your plan"})]}):l.jsxs("div",{className:"p-4 rounded-2xl border bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-900/20 dark:to-orange-900/20 border-amber-100 dark:border-amber-800/50",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-sm font-bold text-zinc-600 dark:text-zinc-300",children:"Chat
84Credits"}),l.jsxs("div",{className:"flex items-center gap-1.5 bg-white dark:bg-zinc-800 px-3 py-1.5 rounded-full shadow-sm",children:[l.jsx("span",{className:"text-base",children:"â"}),l.jsx("span",{className:"text-lg font-black text-amber-600 dark:text-amber-400",children:h??"â"})]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[l.jsx("span",{className:"material-symbols-outlined text-sm",children:"info"}),l.jsx("span",{children:"1 credit per minute of chat"})]})]}),x&&_.length>0&&(b?l.jsx("div",{className:"space-y-2",children:se?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-xs font-bold text-zinc-600 dark:text-zinc-300 uppercase tracking-wide",children:"Change Plan"}),_.map(j=>l.jsxs("button",{onClick:()=>p(j),disabled:S,className:"w-full flex items-center justify-between p-3 bg-white dark:bg-zinc-800 rounded-xl border-2 border-primary/20 hover:border-primary transition-all active:scale-[0.98] disabled:opacity-50",children:[l.jsxs("div",{className:"text-left",children:[l.jsx("p",{className:"text-sm font-bold text-zinc-800 dark:text-white",children:j.title}),l.jsx("p",{className:"text-xs text-zinc-400",children:j.description})]}),l.jsx("span",{className:"text-sm font-black text-primary",children:j.priceString})]},j.identifier)),l.jsxs("div",{className:"flex items-center justify-center gap-3 pt-1 flex-wrap",children:[l.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:[l.jsx("span",{className:"material-symbols-outlined text-sm",children:"help"}),"Support"]}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("button",{onClick:v,disabled:S,className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 disabled:opacity-50 whitespace-nowrap",children:"Restore Purchases"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("button",{onClick:async()=>{const j=await $();j&&window.open(j,"_blank")},disabled:S,className:"text-xs text-red-400 hover:text-red-500 font-bold py-2 disabled:opacity-50 whitespace-nowrap",children:"Cancel"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/terms.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Terms"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/privacy.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Privacy"})]})]}):l.jsxs("div",{className:"flex items-center justify-center gap-3 flex-wrap",children:[l.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-600 font-bold py-1.5 whitespace-nowrap",children:[l.jsx("span",{className:"material-symbols-outlined text-sm",children:"help"}),"Support"]}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("button",{onClick:()=>ot(!0),className:"text-xs text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 font-bold py-1.5 transition-colors whitespace-nowrap",children:"Manage Subscription"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/terms.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-1.5 whitespace-nowrap",children:"Terms"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/privacy.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-1.5 whitespace-nowrap",children:"Privacy"})]})}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-xs font-bold text-zinc-600 dark:text-zinc-300 uppercase tracking-wide",children:"Get More Chat Time"}),_.map(j=>l.jsxs("button",{onClick:()=>p(j),disabled:S,className:"w-full flex items-center justify-between p-3 bg-white dark:bg-zinc-800 rounded-xl border-2 border-primary/20 hover:border-primary transition-all active:scale-[0.98] disabled:opacity-50",children:[l.jsxs("div",{className:"text-left",children:[l.jsx("p",{className:"text-sm font-bold text-zinc-800 dark:text-white",children:j.title}),l.jsx("p",{className:"text-xs text-zinc-400",children:j.description})]}),l.jsx("span",{className:"text-sm font-black text-primary",children:j.priceString})]},j.identifier)),l.jsxs("div",{className:"flex items-center justify-center gap-3 pt-1 flex-wrap",children:[l.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:[l.jsx("span",{className:"material-symbols-outlined text-sm",children:"help"}),"Support"]}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("button",{onClick:v,disabled:S,className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 disabled:opacity-50 whitespace-nowrap",children:"Restore Purchases"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/terms.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Terms"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/privacy.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Privacy"})]})]})),(!x||_.length===0)&&l.jsxs("div",{className:"flex items-center justify-center gap-3 flex-wrap",children:[l.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:[l.jsx("span",{className:"material-symbols-outlined text-sm",children:"help"}),"Support"]}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/terms.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Terms"}),l.jsx("span",{className:"text-zinc-300 dark:text-zinc-600",children:"·"}),l.jsx("a",{href:"/privacy.html",target:"_blank",className:"text-xs text-zinc-400 hover:text-zinc-600 font-bold py-2 whitespace-nowrap",children:"Privacy"})]}),r&&l.jsx("button",{onClick:()=>I("profile"),className:"w-full py-4 bg-primary text-white font-black text-lg rounded-2xl shadow-xl shadow-primary/25 active:scale-[0.98] transition-all",children:"Continue â"})]}):l.jsxs("div",{className:"space-y-5 text-center py-2",children:[l.jsx("div",{className:"size-20 bg-gradient-to-br from-primary/10 to-orange-100 dar
84k:from-primary/20 dark:to-orange-900/20 rounded-full flex items-center justify-center mx-auto",children:l.jsx("span",{className:"material-symbols-outlined !text-4xl text-primary",children:"waving_hand"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-black text-xl text-zinc-800 dark:text-white",children:"Welcome, Parent!"}),l.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Sign in to save progress & get free credits"})]}),l.jsxs("button",{onClick:Ct,disabled:je,className:"w-full py-4 bg-white dark:bg-zinc-700 border-2 border-zinc-200 dark:border-zinc-600 rounded-2xl font-bold flex items-center justify-center gap-3 hover:bg-zinc-50 dark:hover:bg-zinc-600 transition-all disabled:opacity-50 shadow-sm",children:[l.jsxs("svg",{className:"size-5",viewBox:"0 0 24 24",children:[l.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),l.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"}),l.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"}),l.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"})]}),je?"Signing in...":"Sign in with Google"]}),Je&&l.jsxs("button",{onClick:fe,disabled:je,className:"w-full py-4 bg-black dark:bg-white text-white dark:text-black border-2 border-black dark:border-white rounded-2xl font-bold flex items-center justify-center gap-3 hover:opacity-90 transition-all disabled:opacity-50 shadow-sm",children:[l.jsx("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),je?"Signing in...":"Sign in with Apple"]}),l.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[l.jsx("span",{className:"text-lg",children:"â"}),l.jsxs("span",{className:"text-sm font-bold text-zinc-500 dark:text-zinc-400",children:["Get ",l.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"30 free credits"})," when you sign in!"]})]})]})}),w==="history"&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-green-50 dark:bg-green-900/20 rounded-xl",children:[l.jsx("span",{className:"material-symbols-outlined text-green-500 text-base",children:"lock"}),l.jsx("p",{className:"text-xs text-green-700 dark:text-green-400",children:"All data is stored only on this device. This helps AI characters remember your child's interests, track learning goals, and have more engaging conversations over time."})]}),l.jsxs("div",{className:"flex items-center justify-between p-4 bg-zinc-50 dark:bg-zinc-800/50 rounded-2xl",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-bold text-zinc-700 dark:text-zinc-200",children:"Conversation Summaries"}),l.jsx("p",{className:"text-xs text-zinc-400 mt-0.5",children:"AI summarizes topics & engagement after each chat"})]}),l.jsx("button",{onClick:()=>{if(E&&!confirm("Turn off summaries? This will erase all conversation history."))return;const j=!E;A(j),Cx(j),j||(K([]),am(),ae(null))},className:`relative w-12 h-7 rounded-full transition-colors ${E?"bg-primary":"bg-zinc-300 dark:bg-zinc-600"}`,children:l.jsx("div",{className:`absolute top-0.5 w-6 h-6 bg-white rounded-full shadow transition-transform ${E?"translate-x-[22px]":"translate-x-0.5"}`})})]}),E&&l.jsxs("div",{className:"flex items-center justify-between p-4 bg-zinc-50 dark:bg-zinc-800/50 rounded-2xl",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-bold text-zinc-700 dark:text-zinc-200",children:"Child Profile"}),l.jsx("p",{className:"text-xs text-zinc-400 mt-0.5",children:"AI builds a memory of your child's interests & progress"})]}),l.jsx("button",{onClick:()=>
84{if(F&&!confirm("Turn off child profile? This will erase the stored profile."))return;const j=!F;M(j),Dx(j),j||ae(null)},className:`relative w-12 h-7 rounded-full transition-colors ${F?"bg-primary":"bg-zinc-300 dark:bg-zinc-600"}`,children:l.jsx("div",{className:`absolute top-0.5 w-6 h-6 bg-white rounded-full shadow transition-transform ${F?"translate-x-[22px]":"translate-x-0.5"}`})})]}),E&&F&&(z==null?void 0:z.memory)&&l.jsxs("div",{className:"p-4 bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 rounded-2xl border border-purple-100 dark:border-purple-800/50 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"material-symbols-outlined text-purple-500 text-lg",children:"psychology"}),l.jsx("span",{className:"text-sm font-bold text-purple-700 dark:text-purple-300",children:"Child Profile"}),l.jsxs("span",{className:"text-xs text-purple-400 ml-auto",children:["Updated ",new Date(z.lastUpdated).toLocaleDateString(void 0,{month:"short",day:"numeric"})]})]}),l.jsx("p",{className:"text-sm text-zinc-600 dark:text-zinc-300 leading-relaxed whitespace-pre-line",children:z.memory}),l.jsxs("p",{className:"text-xs text-purple-400",children:["Based on ",z.summaryCount," conversations"]})]}),E&&Z.length===0&&l.jsxs("div",{className:"text-center py-8",children:[l.jsx("span",{className:"material-symbols-outlined text-4xl text-zinc-300 dark:text-zinc-600",children:"chat_bubble_outline"}),l.jsx("p",{className:"text-sm text-zinc-400 mt-2",children:"No conversation summaries yet"}),l.jsx("p",{className:"text-xs text-zinc-400 mt-1",children:"Summaries will appear here after your child chats"})]}),E&&Z.length>0&&l.jsx("div",{className:"space-y-3",children:[...Z].reverse().map(j=>l.jsxs("div",{className:"p-4 bg-white dark:bg-zinc-800 rounded-2xl border border-zinc-100 dark:border-zinc-700 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-bold text-zinc-700 dark:text-zinc-200",children:j.characterName}),l.jsxs("span",{className:"text-xs text-zinc-400",children:[new Date(j.date).toLocaleDateString(void 0,{month:"short",day:"numeric"})," · ",Math.round(j.durationSeconds/60),"min"]})]}),l.jsx("p",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:j.summary}),l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[j.topics.map((J,Qe)=>l.jsx("span",{className:"px-2 py-0.5 text-xs font-bold bg-primary/10 text-primary rounded-full",children:J},Qe)),l.jsxs("span",{className:`px-2 py-0.5 text-xs font-bold rounded-full ${j.engagement==="High"?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":j.engagement==="Medium"?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-zinc-100 text-zinc-500 dark:bg-zinc-700 dark:text-zinc-400"}`,children:[j.engagement==="High"?"ð¥":j.engagement==="Medium"?"ð":"ð"," ",j.engagement]})]}),j.highlights&&j.highlights.length>0&&l.jsx("div",{className:"text-xs text-zinc-400 space-y-0.5",children:j.highlights.map((J,Qe)=>l.jsxs("p",{children:["ð¡ ",J]},Qe))})]},j.id))})]})]})]})})]})},lm=({onSuccess:e,onCancel:n})=>{const[r,o]=m.useState(["","","",""]),[t,i]=m.useState(!1),a=[m.useRef(null),m.useRef(null),m.useRef(null),m.useRef(null)],s=new Date().getFullYear(),c=(h,g)=>{var b;if(!/^\d?$/.test(g))return;const f=[...r];if(f[h]=g,o(f),i(!1),g&&h<3&&((b=a[h+1].current)==null||b.focus()),g&&h===3){const _=parseInt(f.join(""),10);_>=1940&&_<=s-18?e():(i(!0),o(["","","",""]),setTimeout(()=>{var p;return(p=a[0].current)==null?void 0:p.focus()},100))}},u=(h,g)=>{var f;g.key==="Backspace"&&!r[h]&&h>0&&((f=a[h-1].current)==null||f.focus())},d=h=>{h.preventDefault();const g=h.clipboardData.getData("text").replace(/\D/g,"").slice(0,4);if(g.length===4){const f=g.split("");o(f);const b=parseInt(g,10);b>=1940&&b<=s-18?e():(i(!0),o(["","","",""]),setTimeout(()=>{var _;return(_=a[0].current)==null?void 0:_.focus()},100))}};return l.jsx("div",{className:"fixed inset-0 z-[250] flex items-center justify-center bg-black/50 backdrop-blur-sm",children:l.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-3xl shadow-2xl p-8 mx-6 max-w-sm w-full text-center space-y-5",children:[l.jsx("div",{className:"text-4xl",children:"ð"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-bold text-zinc-900 dark:text-white",children:"Parent Verification"}),l.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 mt-1",children:"Enter your birth year to continue"})]}),l.jsx("div",{className:"flex justify-center gap-3",onPaste:d,children:r.map((h,g)=>l.jsx("input",{ref:a[g],type:"text",inputMode:"numeric",maxLength:1,autoFocus:g===0,value:h,onChange:f=>c(g,f.target.value),onKeyDown:f=>u(g,f),className:`w-14 h-16 text-center text-2xl font-black rounded-2xl border-2 bg-zinc-50 dark:bg-zinc-700 text-zinc-800 dark:text-white outline-none transition-colors ${t?"border-red-400 bg-red-50 dark:bg-red-900/20":"border-zinc-200 dark:border-zinc-600 focus:border-primary"}`},g))}),t&&l.jsx("p",{className:"text-sm text-red-500 font-medium",children:"Please enter a valid birth year"}),l.jsx("button",{onClick:n,className:"w-full px-4 py-3 rounded-2xl border border-zinc-200 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 font-semibold active:scale-95 transition-transform",children:"Cancel"})]})})},Bx=({characters:e,onNavigate:n,currentScreen:r})=>{const{t:o}=Ut(),{user:t,profile:i,isProfileSet:a,creditInfo:s}=sr(),{credits:c}=s,{isSubscribed:u}=Eo(t==null?void 0:t.id),[d,h]=m.useState(!1),[g,f]=m.useState(!1);if(e.length===0)return l.jsxs("div",{className:"relative h-full w-full flex flex-col items-center justify-center p-12 text-center pb-32",children:[l.jsx("div",{className:"size-32 bg-orange-100 dar
84k:bg-orange-900/20 rounded-full flex items-center justify-center mb-6",children:l.jsx("span",{className:"material-symbols-outlined !text-6xl text-primary",children:"group_off"})}),l.jsx("h2",{className:"text-2xl font-bold mb-2",children:"No Friends Found"}),l.jsx("p",{className:"text-zinc-500 mb-8",children:"It looks like your friends are playing hide and seek. Check your connection and try again!"}),l.jsx("button",{onClick:()=>window.location.reload(),className:"bg-primary text-white px-8 py-4 rounded-2xl font-bold shadow-lg active:scale-95 transition-transform",children:"Try Again"})]});const b=e.find(p=>p.isPopular)||e[0],_=e.filter(p=>p.id!==b.id);return l.jsxs("div",{className:"relative h-full w-full overflow-y-auto pb-24 no-scrollbar",children:[l.jsxs("div",{className:"flex items-center p-6 pb-2 justify-between",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsx("div",{children:l.jsx("h2",{className:"text-[#1c140d] dark:text-white text-xl font-bold leading-tight",children:a?o.friendsHub.greeting.replace("{name}",(i==null?void 0:i.name)||"Friend"):"Hi there!"})})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Px,{}),l.jsxs("button",{className:"flex items-center gap-1.5 h-12 px-3 rounded-full bg-white dark:bg-zinc-800 shadow-sm",onClick:()=>t?f(!0):h(!0),"aria-label":"Parent settings",children:[l.jsx("span",{className:"material-symbols-outlined text-[#1c140d] dark:text-white text-xl",children:"family_restroom"}),t&&(u||c!==null)&&l.jsx("span",{className:"flex items-center gap-0.5 text-sm font-black text-amber-600 dark:text-amber-400",children:u?l.jsx("span",{className:"material-symbols-outlined text-green-500 text-sm",children:"verified"}):l.jsxs(l.Fragment,{children:["â ",c]})})]})]})]}),l.jsxs("div",{className:"px-6 pt-4 flex flex-col gap-6",children:[l.jsx("div",{onClick:()=>n("chat",b),role:"button","aria-label":`Chat with ${b.name}`,tabIndex:0,onKeyDown:p=>p.key==="Enter"&&n("chat",b),className:"flex flex-col gap-0 rounded-3xl bg-white dark:bg-zinc-800 shadow-xl border-b-[12px] border-orange-400 overflow-hidden transform active:scale-[0.98] transition-transform cursor-pointer group",children:l.jsx("div",{className:"relative w-full bg-orange-100 bg-center bg-no-repeat aspect-square bg-cover",style:{backgroundImage:`url("${b.imageUrl}")`},children:l.jsx("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 via-black/40 to-transparent p-5 pt-16",children:l.jsxs("div",{className:"flex justify-between items-end",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-2xl font-bold text-white",children:b.name}),l.jsx("p",{className:"text-white/70 font-medium text-sm",children:b.description})]}),l.jsxs("button",{className:"flex-shrink-0 bg-green-500/50 backdrop-blur-md text-white px-4 py-2.5 rounded-full font-bold text-sm flex items-center gap-2 active:scale-95 transition-transform",children:[l.jsx("span",{className:"material-symbols-outlined fill-1 text-lg",children:"call"}),l.jsx("span",{children:o.friendsHub.startTalking})]})]})})})}),l.jsx("div",{className:"grid grid-cols-2 gap-4",children:_.map(p=>l.jsxs("div",{onClick:()=>n("chat",p),role:"button","aria-label":`Chat with ${p.name}`,tabIndex:0,onKeyDown:v=>v.key==="Enter"&&n("chat",p),className:"flex flex-col gap-0 rounded-2xl bg-white dark:bg-zinc-800 shadow-lg border-b-8 overflow-hidden transform active:scale-95 transition-transform cursor-pointer group",style:{borderColor:p.themeColor},children:[l.jsx("div",{className:"w-full bg-center bg-no-repeat aspect-square bg-cover",style:{backgroundImage:`url("${p.imageUrl}")`}}),l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"text-lg font-bold leading-tight truncate",children:p.name}),l.jsx("p",{className:"text-zinc-500 dark:text-zinc-400 text-xs truncate",children:p.description})]})]},p.id))}),l.jsxs("div",{className:"relative flex items-center gap-4 roun
84ded-2xl bg-gradient-to-r from-violet-500 via-pink-500 to-amber-400 p-5 shadow-lg overflow-hidden cursor-pointer active:scale-[0.98] transition-transform",children:[[...Array(20)].map((p,v)=>l.jsx("span",{className:"absolute rounded-sm animate-confetti pointer-events-none",style:{width:`${4+Math.random()*6}px`,height:`${4+Math.random()*6}px`,background:["#FFD700","#FF6B6B","#4ECDC4","#45B7D1","#F7DC6F","#BB8FCE","#FF9FF3","#54A0FF"][v%8],left:`${Math.random()*100}%`,top:`${-10+Math.random()*120}%`,animationDelay:`${Math.random()*3}s`,animationDuration:`${2+Math.random()*2}s`,opacity:.8,transform:`rotate(${Math.random()*360}deg)`}},v)),l.jsx("div",{className:"size-14 rounded-xl bg-white/20 backdrop-blur-sm flex items-center justify-center flex-shrink-0",children:l.jsx("span",{className:"material-symbols-outlined !text-3xl text-white",children:"auto_awesome"})}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("p",{className:"text-base font-bold text-white",children:"Create Your Own Character"}),l.jsx("p",{className:"text-white/80 text-sm",children:"Coming Soon ð"})]})]})]}),g&&l.jsx(lm,{onSuccess:()=>{f(!1),h(!0)},onCancel:()=>f(!1)}),d&&l.jsx(cm,{onClose:()=>h(!1),initialTab:"account"})]})},Jx=({onCancel:e,onCreate:n})=>{const{t:r}=Ut(),o=Ex(),[t,i]=m.useState(o[0]),[a,s]=m.useState("Animal"),c={Animal:r.creator.animal,Color:r.creator.color,Voice:r.creator.voice},u=()=>{const d={id:Date.now().toString(),name:`${r.creator.magic} ${t.name}`,description:r.creator.yourCreation,imageUrl:t.icon,themeColor:"#f48c25",type:t.name};n(d)};return l.jsxs("div",{className:"relative flex h-full w-full flex-col overflow-hidden",children:[l.jsxs("header",{className:"flex items-center bg-background-light dark:bg-background-dark p-4 justify-between z-10",children:[l.jsx("button",{onClick:e,className:"text-[#1c140d] dark:text-white flex size-10 shrink-0 items-center justify-center bg-white dark:bg-gray-800 rounded-full shadow-sm",children:l.jsx("span",{className:"material-symbols-outlined",children:"close"})}),l.jsx("h1",{className:"text-[#1c140d] dark:text-white text-lg font-extrabold leading-tight tracking-tight flex-1 text-center",children:r.creator.title}),l.jsx("div",{className:"size-10 flex items-center justify-center text-primary",children:l.jsx("span",{className:"material-symbols-outlined fill-1",children:"auto_awesome"})})]}),l.jsxs("div",{className:"flex w-full flex-row items-center justify-center gap-4 py-2",children:[l.jsx("div",{className:"h-3 w-3 rounded-full bg-primary shadow-[0_0_8px_rgba(244,140,37,0.5)]"}),l.jsx("div",{className:"h-2 w-12 rounded-full bg-gray-200 dark:bg-gray-700"}),l.jsx("div",{className:"h-3 w-3 rounded-full bg-gray-300 dark:bg-gray-600"}),l.jsx("div",{className:"h-2 w-12 rounded-full bg-gray-200 dark:bg-gray-700"}),l.jsx("div",{className:"h-3 w-3 rounded-full bg-gray-300 dark:bg-gray-600"})]}),l.jsxs("main",{className:"flex-1 flex flex-col items-center justify-center relative px-6 py-4 overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 sparkle-bg pointer-events-none"}),l.jsx("span",{className:"material-symbols-outlined absolute top-10 left-10 text-primary opacity-40 text-3xl",children:"star"}),l.jsx("span",{className:"material-symbols-outlined absolute bottom-20 right-10 text-primary opacity-30 text-2xl",children:"auto_fix_high"}),l.jsx("span",{className:"material-symbols-outlined absolute top-20 right-16 text-yellow-400 opacity-50",children:"shutter_speed"}),l.jsxs("div",{className:"w-full aspect-square max-w-[280px] bg-white dark:bg-gray-800 rounded-[3rem] shadow-xl flex items-center justify-center relative overflow-hidden border-4 border-white dark:border-gray-700",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-transparent"}),l.jsx("img",{alt:"Preview",className:"w-48 h-48 object-contain z-10 transition-all transform hover:scale-110",src:t.icon}),l.jsx("div",{className:"absolute top-4 right-4 bg-primary text-white text-[10px] font-bold px-3 py-1.5 rounded-full shadow-lg z-20",children:r.creator.lookingGreat})]}),l.jsx("h2",{className:"text-[#1c140d] dark:text-white text-2xl font-black pt-6 pb-2 text-center",children:r.creator.magicalWorkshop}),l.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm text-center",children:r.creator.pickA
84nimal})]}),l.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-t-[3rem] shadow-[0_-10px_40px_rgba(0,0,0,0.05)] pt-6 pb-8 px-4 border-t border-zinc-100 dark:border-zinc-800",children:[l.jsx("div",{className:"flex border-b border-zinc-100 dark:border-zinc-800 px-2 mb-6",children:["Animal","Color","Voice"].map(d=>l.jsxs("button",{onClick:()=>s(d),className:`flex flex-col items-center justify-center border-b-[3px] pb-3 flex-1 transition-all ${a===d?"border-primary text-primary":"border-transparent text-gray-400"}`,children:[l.jsx("span",{className:"material-symbols-outlined mb-1",children:d==="Animal"?"pets":d==="Color"?"palette":"record_voice_over"}),l.jsx("p",{className:"text-xs font-bold uppercase tracking-wider",children:c[d]})]},d))}),l.jsx("div",{className:"flex gap-4 overflow-x-auto pb-6 px-2 no-scrollbar",children:o.map(d=>l.jsxs("button",{onClick:()=>i(d),className:`flex-shrink-0 w-28 h-32 flex flex-col items-center justify-center rounded-xl border-2 transition-all ${t.id===d.id?"bg-primary/10 border-primary":"bg-gray-50 dark:bg-gray-800 border-transparent"}`,children:[l.jsx("div",{className:"bg-white dark:bg-gray-800 p-3 rounded-full shadow-sm mb-3",children:l.jsx("img",{alt:d.name,className:"w-8 h-8",src:d.icon})}),l.jsx("span",{className:`font-bold text-sm ${t.id===d.id?"text-primary":"text-gray-500 dark:text-gray-400"}`,children:d.name})]},d.id))}),l.jsx("div",{className:"px-2",children:l.jsxs("button",{onClick:u,className:"w-full bg-secondary-green hover:bg-[#34d399] text-white font-black py-5 rounded-full shadow-[0_8px_0_#16a34a] active:shadow-none active:translate-y-2 transition-all flex items-center justify-center gap-3",children:[l.jsx("span",{className:"material-symbols-outlined",children:"magic_button"}),l.jsx("span",{children:r.creator.bringToLife})]})})]})]})};class Gx{constructor(n){this.mediaStream=null,this.audioContext=null,this.workletNode=null,this.source=null,this.onDataAvailable=n}async start(){try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});const n=window.AudioContext||window.webkitAudioContext;if(!n)throw new Error("AudioContext is not supported in this browser. Please try a different browser.");const r=new n({sampleRate:16e3});if(this.audioContext=r,!r)throw new Error("Failed to initialize AudioContext");if(await r.resume(),!r.audioWorklet)throw new Error("AudioWorklet is not supported in this browser version. Please use a modern browser like Chrome, Edge, or Safari 14.1+.");if(await r.audioWorklet.addModule("/audio-processor.js"),!this.mediaStream||typeof this.mediaStream.getTracks!="function")throw console.error("Invalid MediaStream:",this.mediaStream),new Error("Failed to acquire valid audio stream. Please ensure microphone permissions are granted.");this.source=r.createMediaStreamSource(this.mediaStream),this.workletNode=new AudioWorkletNode(r,"audio-processor"),this.workletNode.port.onmessage=o=>{const t=o.data instanceof Int16Array?o.data.buffer:o.data;this.onDataAvailable(t)},this.source.connect(this.workletNode)}catch(n){throw console.error("Error starting audio recording:",n),n}}stop(){this.source&&(this.source.disconnect(),this.source=null),this.workletNode&&(this.workletNode.port.onmessage=null,this.workletNode.disconnect(),this.workletNode=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(n=>n.stop()),this.mediaStream=null)}}class Wx{constructor(n=24e3){this.workletNode=null,this.isInitialized=!1,this.queue=[];const r=window.AudioContext||window.webkitAudioContext;this.audioContext=new r({sampleRate:n}),this.mediaStreamDest=this.audioContext.createMediaStreamDestination(),this.bucket=new Audio,this.bucket.srcObject=this.mediaStreamDest.stream,this.bucket.play().catch(o=>console.error("Error playing audio bucket:",o)),this.init()}
84async init(){try{await this.audioContext.resume(),await this.audioContext.audioWorklet.addModule("/audio-processor.js"),this.workletNode=new AudioWorkletNode(this.audioContext,"audio-generator"),this.workletNode.connect(this.mediaStreamDest),this.isInitialized=!0,this.flushQueue()}catch(n){console.error("Error initializing audio player worklet:",n)}}play(n){this.isInitialized&&this.workletNode?this.workletNode.port.postMessage(n):this.queue.push(n)}flushQueue(){if(this.workletNode)for(;this.queue.length>0;){const n=this.queue.shift();n&&this.workletNode.port.postMessage(n)}}stop(){this.isInitialized=!1,this.workletNode&&(this.workletNode.disconnect(),this.workletNode=null),this.queue=[],this.bucket.pause(),this.bucket.srcObject=null,this.audioContext.close()}}const Vx="wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContentConstrained";function Hx(e,n="Puck",r,o,t="en",i,a,s,c,u,d,h){const[g,f]=m.useState({connected:!1,connecting:!1,error:null,volume:0,micVolume:0,aiSpeaking:!1}),b=m.useRef(0),_=m.useRef(0),p=m.useRef(!1),v=m.useRef(null),[$,x]=m.useState(""),[S,w]=m.useState(""),I=m.useRef([]),E=m.useRef(0),A=m.useRef(null),Z=m.useRef([]),K=m.useRef(null),z=m.useRef(null),ae=m.useRef(!1),F=m.useRef(!1),M=m.useRef(0),Y=m.useRef(Date.now()),H=m.useRef(null),ue=m.useRef(null),ne=m.useRef(!1),Ue=3e4,O=4e4,de=m.useCallback(()=>{Y.current=Date.now(),ne.current=!1,ue.current&&(clearTimeout(ue.current),ue.current=null)},[]),ve=m.useRef(g);m.useEffect(()=>{ve.current=g},[g]);const je=m.useRef(d);m.useEffect(()=>{je.current=d},[d]);const Ce=m.useCallback(B=>{if(de(),!A.current||A.current.readyState!==WebSocket.OPEN){Z.current.push(B);return}const ce={client_content:{turns:[{role:"user",parts:[{text:B}]}],turn_complete:!0}};A.current.send(JSON.stringify(ce))},[]),se=m.useCallback(()=>{if(M.current++,F.current=!1,v.current&&(clearInterval(v.current),v.current=null),b.current=0,p.current=!1,H.current&&(clearInterval(H.current),H.current=null),ue.current&&(clearTimeout(ue.current),ue.current=null),A.current){try{A.current.close()}catch(B){console.warn("[disconnect] ws.close error:",B)}A.current=null}if(K.current){try{K.current.stop()}catch(B){console.warn("[disconnect] recorder.stop error:",B)}K.current=null}if(z.current){try{z.current.stop()}catch(B){console.warn("[disconnect] player.stop error:",B)}z.current=null}f(B=>({...B,connected:!1,connecting:!1,micVolume:0,aiSpeaking:!1}))},[]),ot=m.useCallback(async()=>{if(!(ve.current.connected||F.current))try{const B=++M.current;F.current=!0,ae.current=!1,f(U=>({...U,connecting:!0,error:null,idleDisconnect:!1})),I.current=[],E.current=Date.now(),u==null||u("[API] Checking mic permission...");let ce=!0;try{(await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})).getTracks().forEach(L=>L.stop())}catch(U){console.warn("[API] Mic not available, connecting without mic:",U),ce=!1,f(L=>({...L,micError:U}))}if(M.current!==B)return;u==null||u("[API] Mic access OK. Initializing...");const me=await dn("/api/gemini-session");if(M.current!==B)return;if(!me.ok)throw new Error("Failed to get session token");const{token:be}=await me.json();z.current||(z.current=new Wx);const q=new Gx(U=>{const L=new Int16Array(U);let ee=0;for(let le=0;le<L.length;le++)ee+=L[le]*L[le];if(b.current=Math.sqrt(ee/L.length)/32768,b.current>.02&&de(),!p.current&&A.current&&A.current.readyState===WebSocket.OPEN){const le=new Uint8Array(U),Ye=32768;let Xe="";for(let fe=0;fe<le.length;fe+=Ye){const W=le.subarray(fe,Math.min(fe+Ye,le.length));Xe+=String.fromCharCode.apply(null,W)}const Je={realtime_input:{media_chunks:[{mime_type:"audio/pcm",data:btoa(Xe)}]}};A.current.send(JSON.stringify(Je))}});if(K.current=q,ce)try{if(await q.start(),M.current!==B){q.stop(),K.current=null;return}u==null||u("[API] Mic Access Granted")}catch(U){console.warn("[API] Recorder start failed, continuing without mic:",U),f(L=>({...L,micError:U}))}else u==null||u("[API] No mic â connected in listen-only mode");v.current=setInterval(()=>{_.current>0&&(_.current=Math.max(0,_.current-.05));const U=p.current;f(L=>{const ee=b.current,Ke=_.current;return Math.abs(L.micVolume-ee)<.005&&Math.abs(L.volume-Ke)<.005&&L.aiSpeaking===U?L:{...L,micVolume:ee,volume:Ke,aiSpeaking:U}})},100);const Re=`${Vx}?access_token=${be}`,P=new WebSocket(Re);A.current=P,P.onopen=()=>
84{if(M.current!==B){P.close();return}u==null||u("[API] WebSocket Connected"),F.current=!1,f(L=>({...L,connected:!0,connecting:!1}));const U={setup:{model:"models/gemini-2.5-flash-native-audio-preview-12-2025",generation_config:{response_modalities:["AUDIO"],speech_config:{voice_config:{prebuilt_voice_config:{voice_name:n}}}},system_instruction:{parts:[{text:[`Current time: ${new Date().toLocaleString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"})}.`,`You are ${e}, a friendly AI companion for a child.`,`You are talking to ${i}, who is ${a} years old. Use their name occasionally to make the conversation personal.`,`Speak with kindness, use simple words, and be very encouraging. Adjust your vocabulary and topics to be appropriate for a ${a}-year-old.`,`YOUR PERSONALITY: ${o}`,`SPEAKING STYLE: ${r}`,c&&c.length>0?`PARENT GOALS (IMPORTANT): The parent wants you to subtly weave these goals into the conversation: ${c.join(", ")}.`:"",h||"",Hf,`IMPORTANT: You MUST speak in ${t==="zh"?"Chinese (Mandarin)":t==="es"?"Spanish":"English"}. All responses must be in this language.`].join(` 85`)}]},output_audio_transcription:{},input_audio_transcription:{}}};P.send(JSON.stringify(U)),u==null||u("[API] Setup Sent")},P.onmessage=async U=>{var L,ee,Ke,le,Ye,Xe,Ct;try{if(!A.current)return;let Je;U.data instanceof Blob?Je=await U.data.text():Je=U.data;const fe=JSON.parse(Je);if((L=fe.serverContent)!=null&&L.turnComplete&&(p.current=!1),(Ke=(ee=fe.serverContent)==null?void 0:ee.modelTurn)!=null&&Ke.parts){p.current=!0;for(const W of fe.serverContent.modelTurn.parts)if(W.inlineData&&W.inlineData.mimeType.startsWith("audio/")){const ie=Uint8Array.from(atob(W.inlineData.data),J=>J.charCodeAt(0));z.current&&z.current.play(ie.buffer);const ge=new Int16Array(ie.buffer);let j=0;for(let J=0;J<ge.length;J++)j+=ge[J]*ge[J];_.current=Math.sqrt(j/ge.length)/32768}}if((Ye=(le=fe.serverContent)==null?void 0:le.outputTranscription)!=null&&Ye.text){ne.current||de();const W=fe.serverContent.outputTranscription.text;x(ge=>{var J;const j=ge?ge+" "+W:W;return(J=je.current)==null||J.call(je,j),j});const ie=I.current[I.current.length-1];ie&&ie.role==="ai"?ie.text+=" "+W:I.current.push({role:"ai",text:W,ts:Date.now()})}if((Ct=(Xe=fe.serverContent)==null?void 0:Xe.inputTranscription)!=null&&Ct.text){const W=fe.serverContent.inputTranscription.text;w(ge=>ge?ge+" "+W:W);const ie=I.current[I.current.length-1];ie&&ie.role==="user"?ie.text+=" "+W:I.current.push({role:"user",text:W,ts:Date.now()})}if(fe.setupComplete){for(u==null||u("[API] Setup Complete");Z.current.length>0;){const W=Z.current.shift();if(W){const ie={client_content:{turns:[{role:"user",parts:[{text:W}]}],turn_complete:!0}};P.send(JSON.stringify(ie))}}if(de(),H.current&&clearInterval(H.current),H.current=setInterval(()=>{const W=Date.now()-Y.current;if(W>=O){u==null||u("[Idle] No response â saying bye then hanging up"),H.current&&(clearInterval(H.current),H.current=null);const ie={client_content:{turns:[{role:"user",parts:[{text:"[SYSTEM: The user is not responding. Say a short, warm goodbye and end the conversation naturally. Keep it brief â one sentence.]"}]}],turn_complete:!0}};P.send(JSON.stringify(ie)),ue.current=setTimeout(()=>{f(ge=>({...ge,idleDisconnect:!0})),se()},1e4)}else if(W>=Ue&&!ne.current){ne.current=!0,u==null||u("[Idle] Asking if user is still there");const ie={client_content:{turns:[{role:"user",parts:[{text:"[SYSTEM: The user has been silent for a while. Gently ask if they are still there. If they don't respond soon, say goodbye warmly.]"}]}],turn_complete:!0}};P.send(JSON.stringify(ie))}},5e3),!ae.current){ae.current=!0;const W={client_content:{turns:[{role:"user",parts:[{text:`Hi! Please start our conversation by greeting me exactly as follows: "${s}"`}]}],turn_complete:!0}};P.send(JSON.stringify(W))}}}catch(Je){console.error("Error parsing message:",Je)}},P.onerror=U=>{console.error("WebSocket Error:",U),F.current=!1,f(L=>({...L,disconnectCode:1006,disconnectReason:"Connection error",connected:!1,connecting:!1})),A.current&&se()},P.onclose=U=>{console.warn(`[WS] Connection closed: code=${U.code} reason="${U.reason}"`),f(L=>({...L,disconnectCode:U.code,disconnectReason:U.reason||"",connected:!1,connecting:!1})),A.current&&se()}}
85catch(B){console.error("Connection Error:",B),F.current=!1,f(ce=>({...ce,connecting:!1,error:B}))}},[e,n,r,o,t,i,a,s,c,se,h]);return m.useEffect(()=>{const B=()=>{var ce;if(document.visibilityState==="visible"&&ve.current.connected){const me=K.current,be=me==null?void 0:me.audioContext,q=(ce=me==null?void 0:me.mediaStream)==null?void 0:ce.getTracks()[0],Re=be&&be.state!=="running",P=q&&(q.readyState==="ended"||!q.enabled||q.muted);(Re||P)&&(console.warn(`[useLiveAPI] Audio broken on resume â ctx:${be==null?void 0:be.state} mic:${q==null?void 0:q.readyState}/${q==null?void 0:q.enabled}/${q==null?void 0:q.muted} â disconnecting`),se())}};return document.addEventListener("visibilitychange",B),()=>document.removeEventListener("visibilitychange",B)},[se]),m.useEffect(()=>()=>{se()},[se]),{state:g,connect:ot,disconnect:se,sendTextMessage:Ce,userTranscript:S,getConversationLog:()=>({log:I.current,startTime:E.current})}}const qx=nt.isNativePlatform();let pt=null;if(qx)try{pt=Ia("CallKit")}catch(e){console.warn("[CallKit] Plugin not available:",e)}async function Kx(e){if(pt)try{const n=await pt.startCall({name:e});console.log("[CallKit] Call started:",n.uuid)}catch(n){console.warn("[CallKit] startCall failed:",n)}}async function Yx(){if(pt)try{await pt.endCall(),console.log("[CallKit] Call ended")}catch(e){console.warn("[CallKit] endCall failed:",e)}}function Xx(e){if(!pt)return null;let n=null;return pt.addListener("callEnded",e).then(r=>{n=r}),()=>n==null?void 0:n.remove()}class Qx extends ke.Component{constructor(){super(...arguments),this.state={hasError:!1,key:0}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){console.warn("[Scene3D] Crash caught by firewall, recovering:",n==null?void 0:n.message),setTimeout(()=>{this.setState(r=>({hasError:!1,key:r.key+1}))},2e3)}render(){return this.state.hasError?null:l.jsx(ke.Fragment,{children:this.props.children},this.state.key)}}const e_=({character:e,onBack:n})=>{const{language:r}=Ut(),{profile:o,isProfileSet:t,user:i,creditInfo:a}=sr(),{isSubscribed:s,loading:c}=Eo(i==null?void 0:i.id);m.useEffect(()=>(sessionStorage.setItem("current-character-id",e.id),()=>sessionStorage.removeItem("current-character-id")),[e.id]);const[u,d]=m.useState("idle"),[h,g]=m.useState(""),[f,b]=m.useState(0),{credits:_,refreshCredits:p}=a,[v,$]=m.useState(!1),[x,S]=m.useState(!1),[w,I]=m.useState(!1),[E,A]=m.useState(!1),Z=m.useRef(null),[K,z]=m.useState(!1),ae=!!i,F=_!==null&&_>0,M=t&&(s||ae&&F),Y=!c&&!ae&&!E;m.useEffect(()=>{ae&&!s&&_!==null&&_<=0&&(g("We've used all our chat time for today!"),b(1))},[ae,s,_]);const H=m.useCallback(async()=>{try{const U=await(await dn("/api/credits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"deduct",amount:1})})).json();return p(),U.credits>0}catch{return!1}},[p]),ue=()=>{if(Y)return`Hi there! I'm ${e.name}! It's so nice to meet you! What's your name?`;const P=(o==null?void 0:o.name)||"friend";return e.greeting?e.greeting.replace("{name}",P):`Hi ${P}! I'm ${e.name}. Should we go on an adventure today?`},ne=m.useRef(null),Ue=m.useCallback(P=>{const U=P.split(` 86`);g(U.slice(-5).join(` 87`)),b(1),ne.current&&(clearTimeout(ne.current),ne.current=null)},[]),{state:O,connect:de,disconnect:ve,sendTextMessage:je,getConversationLog:Ce}=Hx(e.name,e.voiceName,e.voiceStyle,e.personality,r,o==null?void 0:o.name,o==null?void 0:o.age,ue(),o==null?void 0:o.goals,void 0,Ue,[Zx(),Ax(5)].filter(Boolean).join(` 88 89`)),se=!!i&&!t;m.useEffect(()=>{if(se&&!E){$(!0);return}if(Y){$(!0);return}},[Y,se]),m.useEffect(()=>{if(E&&M){const P=setTimeout(()=>{de(),z(!0),setTimeout(()=>{const U=(o==null?void 0:o.name)||"friend";je(`The child just finished setting up their profile. Their name is ${U}. Greet them excitedly by name, then immediately jump into offering to tell them a short fun story that matches your personality. Don't wait for a response â just start: "Hey ${U}! I'm so happy you're here! Ooh, I have the BEST story for you â wanna hear it?" Then begin telling a short engaging story right away.`)},1e3)},500);return()=>clearTimeout(P)}},[E]);const ot=ke.useRef(!1),[B,ce]=ke.useState(!1),[me,be]=ke.useState(!1);m.useEffect(()=>{const P=Xx(()=>{console.log("[CallKit] Call ended from system UI"),ve()});return()=>P==null?void 0:P()},[ve]),m.useEffect(()=>
89{if(O.connected)ot.current=!0,ce(!1),be(!1),Kx(e.name);else if(ot.current&&!O.connected&&!O.connecting){if(ot.current=!1,Yx(),qt()){const{log:P,startTime:U}=Ce(),L=Math.round((Date.now()-U)/1e3);ka(e.id,e.name,P,L).then(ee=>{ee&&(wa(ee),console.log("[Summary] Saved:",ee.summary),Sa())})}!Y&&!se&&!v&&ce(!0)}},[O.connected,O.connecting]);const q=m.useRef(!1);m.useEffect(()=>{if(O.volume>.1)d("talking"),q.current=!0,ne.current&&(clearTimeout(ne.current),ne.current=null);else{const P=q.current;q.current=!1;const U=setTimeout(()=>d("idle"),1500);return P&&(ne.current&&clearTimeout(ne.current),ne.current=setTimeout(()=>{b(0),ne.current=null},1e4)),()=>clearTimeout(U)}},[O.volume]),m.useEffect(()=>(K&&!s&&(Z.current=setInterval(async()=>{await H()||(ve(),z(!1),g("We've used all our chat time for today! ð«"),b(1),$(!0))},6e4)),()=>{Z.current&&(clearInterval(Z.current),Z.current=null)}),[K,M,H,ve]),m.useEffect(()=>(M&&(de(),z(!0)),()=>{ve(),z(!1)}),[M]);const Re=()=>{if(console.log("[handleVoiceToggle]",{connected:O.connected,connecting:O.connecting,canChat:M,isLoggedIn:ae,isSubscriber:s,hasCredits:F,credits:_,isProfileSet:t,user:!!i}),O.connected||O.connecting){if(qt()&&O.connected){const{log:P,startTime:U}=Ce(),L=Math.round((Date.now()-U)/1e3);ka(e.id,e.name,P,L).then(ee=>{ee&&(wa(ee),Sa())})}ve(),z(!1),n()}else M?(de(),z(!0)):$(!0)};return l.jsxs("div",{className:"relative flex h-full w-full flex-col group/design-root overflow-hidden bg-background-light dark:bg-background-dark",children:[l.jsx("div",{className:"absolute top-0 left-0 right-0 z-[100] px-3 pt-3",children:!O.connected&&!O.connecting?l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("button",{onClick:n,"aria-label":"Exit",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-black/30 backdrop-blur-xl text-white border border-white/10 active:scale-90 transition-all",children:[l.jsx("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Exit"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[(i==null?void 0:i.email)==="[email protected]"&&l.jsx("button",{onClick:()=>S(P=>!P),"aria-label":"Toggle debug grid",className:`size-10 flex items-center justify-center rounded-full backdrop-blur-md transition-all active:scale-90 ${x?"bg-green-500/40 text-green-200":"bg-black/20 hover:bg-black/40 text-white/50"}`,children:l.jsx("span",{className:"material-symbols-outlined text-xl",children:"grid_on"})}),l.jsxs("button",{onClick:Re,disabled:O.connecting,"aria-label":O.connecting?"Calling":"Start call",className:`flex items-center gap-1.5 px-4 py-2 rounded-full backdrop-blur-xl border active:scale-90 transition-all ${O.connecting?"bg-amber-500/80 text-white border-amber-400/30":"bg-primary/80 text-white border-primary/30"}`,children:[l.jsx("span",{className:`material-symbols-outlined text-lg ${O.connecting?"animate-spin":""}`,children:O.connecting?"sync":"call"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:O.connecting?"Calling":"Call"})]})]})]}):l.jsxs("div",{className:`bg-black/45 backdrop-blur-xl border border-white/10 transition-all duration-500 ease-out ${f===1&&h?"rounded-[20px] p-1.5":"rounded-full p-1.5"}`,style:{opacity:f===1||O.micVolume>.01||O.connecting?1:.5,transition:"opacity 800ms ease-out"},children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:Re,"aria-label":"End call",className:"flex-shrink-0 flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-red-500/85 text-white active:scale-90 transition-all",children:[l.jsx("span",{className:"material-symbols-outlined text-lg",children:"call_end"}),l.jsx("span",{className:"text-[10px] font-extrabold uppercase tracking-wider",children:"End"})]}),l.jsx("div",{className:"flex-1 flex items-center gap-2 px-2",children:O.connecting?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"material-symbols-outlined text-amber-400 text-sm animate-spin",children:"sync"}),l.jsx("span",{className:"text-[10px] font-bold text-amber-400/80 uppercase tracking-wider",children:"Connecting"})]}):O.error?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"material-symbols-outlined text-red-400 text-sm",children:"mic_off"}),l.jsx("span",{className:"text-[10px] font-bold text-red-400/80 uppercase tracking-wider truncate",children:O.error.name==="NotFoundError"?"
89No mic found":O.error.name==="NotAllowedError"?"Mic blocked":"Mic error"})]}):O.aiSpeaking?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"material-symbols-outlined text-white/50 text-sm",children:"volume_up"}),l.jsx("div",{className:"flex items-center gap-[5px]",children:[0,1,2].map(P=>l.jsx("div",{className:"w-[5px] h-[5px] rounded-full bg-white/50 animate-pulse",style:{animationDelay:`${P*200}ms`}},P))}),l.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-wider",children:e.name})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"material-symbols-outlined text-sm",style:{color:O.micVolume>.01?"#4ade80":"rgba(255,255,255,0.4)"},children:"mic"}),l.jsx("div",{className:"flex items-end gap-[3px] h-3.5",children:[0,1,2,3,4].map(P=>{const U=.01+P*.03,L=Math.min(O.micVolume/(U+.05),1),ee=O.micVolume>U;return l.jsx("div",{className:"w-[3px] h-3.5 rounded-full overflow-hidden relative",style:{backgroundColor:"rgba(255,255,255,0.1)"},children:l.jsx("div",{className:"absolute bottom-0 w-full rounded-full",style:{height:ee?`${Math.max(L*100,25)}%`:"25%",backgroundColor:ee?"#4ade80":"rgba(255,255,255,0.2)",transition:ee?"height 150ms ease-out":"height 800ms ease-in"}})},P)})}),l.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-wider",children:"Listening"})]})}),(i==null?void 0:i.email)==="[email protected]"&&l.jsx("button",{onClick:()=>S(P=>!P),"aria-label":"Toggle debug grid",className:`size-8 flex items-center justify-center rounded-full transition-all active:scale-90 ${x?"bg-green-500/40 text-green-200":"text-white/30 hover:text-white/50"}`,children:l.jsx("span",{className:"material-symbols-outlined text-lg",children:"grid_on"})})]}),f===1&&h&&l.jsx("div",{"aria-live":"polite",className:"px-2 pt-1.5 pb-1 mt-1 border-t border-white/[0.06] overflow-hidden max-h-[5.5rem]",children:l.jsx("div",{className:"overflow-y-auto max-h-[4.5rem] flex flex-col-reverse",children:l.jsx("p",{className:"text-white/90 text-sm leading-relaxed",children:h})})}),f===1&&h&&l.jsx("div",{className:"absolute -bottom-[6px] left-8 w-3 h-3 bg-black/45 rotate-45 border-r border-b border-white/10"})]})}),l.jsxs("div",{className:"relative flex-1 flex flex-col min-h-0 overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 bg-[#0d0d1a] pointer-events-none"}),l.jsx(Qx,{children:l.jsx(hm,{volume:O.volume,modelUrl:e.model3dUrl||`/models/${e.id}.glb`,animationState:u,renderSettings:e.renderSettings,backgroundUrl:e.backgroundUrl,showGrid:x})}),l.jsx("div",{className:"relative pt-4 pb-4 pointer-events-none"}),l.jsx("div",{className:"flex-1 overflow-hidden pointer-events-none"})]}),ae&&!F&&!s&&l.jsx("div",{className:"absolute bottom-32 left-1/2 -translate-x-1/2 z-[40]",children:l.jsxs("button",{onClick:()=>I(!0),className:"px-6 py-3 bg-primary text-white font-bold rounded-2xl shadow-lg flex items-center gap-2 active:scale-95 transition-transform",children:[l.jsx("span",{className:"material-symbols-outlined",children:"family_restroom"}),"Ask Parents for More Time"]})}),w&&l.jsx(lm,{onSuccess:()=>{I(!1),$(!0)},onCancel:()=>I(!1)}),v&&l.jsx(cm,{onClose:()=>$(!1),initialTab:se&&(F||s)?"profile":"account",requireSignIn:Y,onProfileCreated:()=>{$(!1),A(!0),p()}}),B&&l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 backdrop-blur-sm",children:l.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-3xl shadow-2xl p-8 mx-6 max-w-sm w-full text-center space-y-4",children:[O.idleDisconnect?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"text-5xl",children:"ð"}),l.jsx("h2",{className:"text-xl font-bold text-zinc-900 dark:text-white",children:"See You Later!"}),l.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"The chat ended because it was quiet for a while. Come back anytime!"})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"text-5xl",children:"ð¿"}),l.jsx("h2",{className:"text-xl font-bold text-zinc-900 dark:text-white",children:"Connection Lost"}),l.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Oops! The call got disconnected. Want to try again?"}),O.disconnectCode!==void 0&&(me?l.jsxs("div",{className:"bg-zinc-100 dark:bg-zinc-700/50 rounded-xl px-3 py-2 text-xs text-zinc-500 dark:text-zinc-400 font-mono space-y-0.5",children:[l.jsxs("p",{children:["Code: ",O.disconnectCode]}),l.jsx("p",{children:O.disconnectCode===1e3?"Normal closure â session ended cleanly":O.disconnectCode===1001?"Going away â server or client navigated away":O.disconnectCode===1002?"Protocol error":O.disconnectCode===1003?"Unsupported data received":O.disconnectCode===1005?"No status code received":O.disconnectCode===1006?"Connection dropped â network issue or server unreachable":O.disconnectCode===1008?"Policy violation â message rejected by server"
89:O.disconnectCode===1009?"Message too large":O.disconnectCode===1011?"Server error â unexpected condition":O.disconnectCode===1012?"Server restarting":O.disconnectCode===1013?"Try again later â server overloaded":O.disconnectCode===1014?"Bad gateway":O.disconnectCode===1015?"TLS handshake failed":O.disconnectReason||"Unknown error"})]}):l.jsx("button",{onClick:()=>be(!0),className:"text-xs text-zinc-400 hover:text-zinc-500 transition-colors",children:"Details"}))]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:n,className:"flex-1 px-4 py-3 rounded-2xl border border-zinc-200 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 font-semibold active:scale-95 transition-transform",children:"Go Back"}),l.jsx("button",{onClick:()=>{ce(!1),de()},className:"flex-1 px-4 py-3 rounded-2xl bg-primary text-white font-semibold shadow-lg active:scale-95 transition-transform",children:O.idleDisconnect?"Chat Again":"Try Again"})]})]})})]})},t_=ke.lazy(()=>Fe(()=>import("./index-CuvkWh0D.js"),__vite__mapDeps([4,1,2,5,3])).then(e=>({default:e.AuthView}))),n_=ke.lazy(()=>Fe(()=>import("./index-CuvkWh0D.js"),__vite__mapDeps([4,1,2,5,3])).then(e=>({default:e.AccountView})));function r_(){const{pathname:e}=Za();return l.jsx(ke.Suspense,{fallback:l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:"Loading..."}),children:l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",padding:"2rem 1rem"},children:l.jsx(t_,{pathname:e||"sign-in"})})})}function i_(){const{pathname:e}=Za();return l.jsx(ke.Suspense,{fallback:l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:"Loading..."}),children:l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",padding:"2rem 1rem"},children:l.jsx(n_,{pathname:e||"profile"})})})}const o_=()=>{const[e,n]=m.useState(()=>{const _=sessionStorage.getItem("auth-return-state");if(_)try{const p=JSON.parse(_);if(p.screen)return p.screen}catch{}return"friends"}),{characters:r,loading:o}=zx(),[t,i]=m.useState(()=>{try{const _=localStorage.getItem("custom-characters");return _?JSON.parse(_):[]}catch(_){return console.error("Failed to load custom characters:",_),[]}}),[a,s]=m.useState(null),{profile:c,setProfile:u,isProfileSet:d}=sr();La();const h=[...t,...r].sort((_,p)=>_.id==="robot-buddy"?-1:p.id==="robot-buddy"?1:0);m.useEffect(()=>{const _=sessionStorage.getItem("auth-return-state");if(_&&h.length>0)try{const v=JSON.parse(_).characterId||sessionStorage.getItem("current-character-id");if(v){const $=h.find(x=>x.id===v);$&&(s($),n("chat"))}sessionStorage.removeItem("auth-return-state")}catch{}},[h.length]);const g=m.useCallback((_,p)=>{p&&s(p),n(_)},[]),f=m.useCallback(()=>n("friends"),[]),b=_=>{const p=[_,...t];i(p);try{localStorage.setItem("custom-characters",JSON.stringify(p))}catch(v){console.error("Failed to save custom characters:",v)}n("friends")};return o?l.jsx("div",{className:"flex h-screen w-full items-center justify-center bg-background-light dark:bg-background-dark",children:l.jsxs("div",{className:"flex flex-col items-center gap-4",children:[l.jsx("div",{className:"size-16 border-4 border-primary border-t-transparent rounded-full animate-spin"}),l.jsx("p",{className:"text-primary font-bold animate-pulse",children:"Loading Magic..."})]})}):l.jsxs("main",{className:"flex h-[100dvh] w-full flex-col max-w-[480px] mx-auto overflow-hidden bg-background-light dark:bg-background-dark relative border-x border-zinc-100 dark:border-zinc-800 shadow-2xl overscroll-none",children:[e==="friends"&&l.jsx(Bx,{characters:h,onNavigate:g,currentScreen:e}),e==="creator"&&l.jsx(Jx,{onCancel:()=>n("friends"),onCreate:b}),e==="chat"&&a&&l.jsx(e_,{character:a,onBack:f})]})},a_=()=>l.jsx(jx,{children:l.jsx(Tx,{children:l.jsxs(hf,{children:[l.jsx(kn,{path:"/",element:l.jsx(o_,{})}),l.jsx(kn,{path:"/auth/:pathname",element:l.jsx(r_,{})}),l.jsx(kn,{path:"/account/:pathname",element:l.jsx(i_,{})})]})})});class s_ extends ke.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){console.error("Uncaught error:",n,r.componentStack)}render(){return this.state.hasError?l.jsx("div",{className:"flex h-screen w-full items-center justify-center bg-gradient-to-b from-amber-100 via-orange-50 to-rose-100 p-8",children:l.jsxs("div",{className:"text-center max-w-sm",children:[l.jsx("div",{className:"text-7xl mb-6",children:"ð¸"}),l.jsx("h1",{className:"text-2xl font-black text-orange-600 mb-3",children:"Oops! Something went wrong"}),l.jsx("p",{className:"text-zinc-600 mb-8",children:"Our friends got a little confused. Let's try again!"}),l.jsx("button",{onClick:()=>window.location.reload(),className:"bg-orange-500 text-white px-8 py-4 rounded-2xl font-bold text-lg shadow-lg active:scale-95 transition-transform",children:"Try Again"})]})}):this.props.children}}const Ro=nt.isNativePlatform(),c_=Ro?ff:Df,um=document.getElementById("root");
89if(!um)throw new Error("Could not find root element to mount to");async function l_(){let e=null;if(Le&&!Ro)try{const[{NeonAuthUIProvider:o}]=await Promise.all([Fe(()=>import("./index-CuvkWh0D.js"),__vite__mapDeps([4,1,2,5,3]))]);e=({children:t})=>l.jsx(o,{authClient:Le,social:{providers:["google"]},redirectTo:"/",children:t})}catch(o){console.warn("NeonAuthUI failed to load:",o)}const n=pm.createRoot(um),r=l.jsx(c_,{children:l.jsx(a_,{})});n.render(l.jsx(m.StrictMode,{children:l.jsx(s_,{children:e?l.jsx(e,{children:r}):r})}))}l_();Ro||Fe(async()=>{const{registerSW:e}=await import("./virtual_pwa-register-DOg4Cbi-.js");return{registerSW:e}},__vite__mapDeps([6,1,2])).then(({registerSW:e})=>{e({immediate:!0})});export{gx as B,Ry as a,sd as b,Ay as c,ad as n,uy as o,Ey as p,Cr as s,Et as u};
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.