(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68604,e=>{"use strict";var t,r,i=e.i(50266);let n=Object.freeze({status:"aborted"});function a(e,t,r){function i(r,i){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:i,constr:s,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,i);let n=s.prototype,a=Object.keys(n);for(let e=0;e<a.length;e++){let t=a[e];t in r||(r[t]=n[t].bind(r))}}let n=r?.Parent??Object;class a extends n{}function s(e){var t;let n=r?.Parent?new a:this;for(let r of(i(n,e),(t=n._zod).deferred??(t.deferred=[]),n._zod.deferred))r();return n}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}let s=Symbol("zod_brand");class o extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class l extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let u={};function d(e){return e&&Object.assign(u,e),u}function c(e){return e}function m(e){return e}function h(e){}function p(e){throw Error("Unexpected value in exhaustive check")}function f(e){}function g(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function x(e,t="|"){return e.map(e=>G(e)).join(t)}function v(e,t){return"bigint"==typeof t?t.toString():t}function y(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function b(e){return null==e}function w(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function k(e,t){let r=(e.toString().split(".")[1]||"").length,i=t.toString(),n=(i.split(".")[1]||"").length;if(0===n&&/\d?e-\d?/.test(i)){let e=i.match(/\d?e-(\d?)/);e?.[1]&&(n=Number.parseInt(e[1]))}let a=r>n?r:n;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}e.s(["$ZodAsyncError",()=>o,"$ZodEncodeError",()=>l,"$brand",0,s,"$constructor",()=>a,"NEVER",0,n,"config",()=>d,"globalConfig",0,u],22372);let $=Symbol("evaluating");function j(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==$)return void 0===i&&(i=$,i=r()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function _(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function S(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function N(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function I(e){return N(e._zod.def)}function P(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function C(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=e[i];return r})}function T(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function z(e){return JSON.stringify(e)}function O(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}let E="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function U(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let D=y(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function A(e){if(!1===U(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==U(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function Z(e){return A(e)?{...e}:Array.isArray(e)?[...e]:e}function R(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}let M=new Set(["string","number","symbol"]),L=new Set(["string","number","bigint","boolean","symbol","undefined"]);function F(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function B(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function W(e){let t;return new Proxy({},{get:(r,i,n)=>(t??(t=e()),Reflect.get(t,i,n)),set:(r,i,n,a)=>(t??(t=e()),Reflect.set(t,i,n,a)),has:(r,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(r,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:r=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(r,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(r,i,n)=>(t??(t=e()),Reflect.defineProperty(t,i,n))})}function G(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function J(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}let X={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},H={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function K(e,t){let r=e._zod.def,i=N(e._zod.def,{get shape(){let e={};for(let i in t){if(!(i in r.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=r.shape[i])}return S(this,"shape",e),e},checks:[]});return V(e,i)}function Y(e,t){let r=e._zod.def,i=N(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return S(this,"shape",i),i},checks:[]});return V(e,i)}function q(e,t){if(!A(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let i=N(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return S(this,"shape",r),r},checks:[]});return V(e,i)}function Q(e,t){if(!A(t))throw Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let r={...e._zod.def.shape,...t};return S(this,"shape",r),r},checks:e._zod.def.checks};return V(e,r)}function ee(e,t){let r=N(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return S(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return V(e,r)}function et(e,t,r){let i=N(t._zod.def,{get shape(){let i=t._zod.def.shape,n={...i};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(let t in i)n[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return S(this,"shape",n),n},checks:[]});return V(t,i)}function er(e,t,r){let i=N(t._zod.def,{get shape(){let i=t._zod.def.shape,n={...i};if(r)for(let t in r){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(let t in i)n[t]=new e({type:"nonoptional",innerType:i[t]});return S(this,"shape",n),n},checks:[]});return V(t,i)}function ei(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function en(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function ea(e){return"string"==typeof e?e:e?.message}function es(e,t,r){let i={...e,path:e.path??[]};return e.message||(i.message=ea(e.inst?._zod.def?.error?.(e))??ea(t?.error?.(e))??ea(r.customError?.(e))??ea(r.localeError?.(e))??"Invalid input"),delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function eo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function el(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eu(...e){let[t,r,i]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:i}:{...t}}function ed(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function ec(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function em(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function eh(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return ec(t+r)}function ep(e){return em(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ef(e){let t=e.replace(/^0x/,"");if(t.length%2!=0)throw Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)r[e/2]=Number.parseInt(t.slice(e,e+2),16);return r}function eg(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")}class ex{constructor(...e){}}e.s(["BIGINT_FORMAT_RANGES",0,H,"Class",()=>ex,"NUMBER_FORMAT_RANGES",0,X,"aborted",()=>ei,"allowsEval",0,D,"assert",()=>f,"assertEqual",()=>c,"assertIs",()=>h,"assertNever",()=>p,"assertNotEqual",()=>m,"assignProp",()=>S,"base64ToUint8Array",()=>ec,"base64urlToUint8Array",()=>eh,"cached",()=>y,"captureStackTrace",0,E,"cleanEnum",()=>ed,"cleanRegex",()=>w,"clone",()=>V,"cloneDef",()=>I,"createTransparentProxy",()=>W,"defineLazy",()=>j,"esc",()=>z,"escapeRegex",()=>F,"extend",()=>q,"finalizeIssue",()=>es,"floatSafeRemainder",()=>k,"getElementAtPath",()=>P,"getEnumValues",()=>g,"getLengthableOrigin",()=>el,"getParsedType",0,e=>{let t=typeof e;switch(t){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":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},"getSizableOrigin",()=>eo,"hexToUint8Array",()=>ef,"isObject",()=>U,"isPlainObject",()=>A,"issue",()=>eu,"joinValues",()=>x,"jsonStringifyReplacer",()=>v,"merge",()=>ee,"mergeDefs",()=>N,"normalizeParams",()=>B,"nullish",()=>b,"numKeys",()=>R,"objectClone",()=>_,"omit",()=>Y,"optionalKeys",()=>J,"partial",()=>et,"pick",()=>K,"prefixIssues",()=>en,"primitiveTypes",0,L,"promiseAllObject",()=>C,"propertyKeyTypes",0,M,"randomString",()=>T,"required",()=>er,"safeExtend",()=>Q,"shallowClone",()=>Z,"slugify",()=>O,"stringifyPrimitive",()=>G,"uint8ArrayToBase64",()=>em,"uint8ArrayToBase64url",()=>ep,"uint8ArrayToHex",()=>eg,"unwrapMessage",()=>ea],99507);let ev=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,v,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ey=a("$ZodError",ev),eb=a("$ZodError",ev,{Parent:Error});function ew(e,t=e=>e.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function ek(e,t=e=>e.message){let r={_errors:[]},i=e=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e}));else if("invalid_key"===n.code)i({issues:n.issues});else if("invalid_element"===n.code)i({issues:n.issues});else if(0===n.path.length)r._errors.push(t(n));else{let e=r,i=0;for(;i<n.path.length;){let r=n.path[i];i===n.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(n))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}function e$(e,t=e=>e.message){let r={errors:[]},i=(e,n=[])=>{var a,s;for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>i({issues:e},o.path));else if("invalid_key"===o.code)i({issues:o.issues},o.path);else if("invalid_element"===o.code)i({issues:o.issues},o.path);else{let e=[...n,...o.path];if(0===e.length){r.errors.push(t(o));continue}let i=r,l=0;for(;l<e.length;){let r=e[l],n=l===e.length-1;"string"==typeof r?(i.properties??(i.properties={}),(a=i.properties)[r]??(a[r]={errors:[]}),i=i.properties[r]):(i.items??(i.items=[]),(s=i.items)[r]??(s[r]={errors:[]}),i=i.items[r]),n&&i.errors.push(t(o)),l++}}};return i(e),r}function ej(e){let t=[];for(let r of e.map(e=>"object"==typeof e?e.key:e))"number"==typeof r?t.push(`[${r}]`):"symbol"==typeof r?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function e_(e){let t=[];for(let r of[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length))t.push(`✖ ${r.message}`),r.path?.length&&t.push(`  → at ${ej(r.path)}`);return t.join("\n")}e.s(["$ZodError",0,ey,"$ZodRealError",0,eb,"flattenError",()=>ew,"formatError",()=>ek,"prettifyError",()=>e_,"toDotPath",()=>ej,"treeifyError",()=>e$],64136);let eS=e=>(t,r,i,n)=>{let a=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new o;if(s.issues.length){let t=new(n?.Err??e)(s.issues.map(e=>es(e,a,d())));throw E(t,n?.callee),t}return s.value},eN=eS(eb),eI=e=>async(t,r,i,n)=>{let a=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new(n?.Err??e)(s.issues.map(e=>es(e,a,d())));throw E(t,n?.callee),t}return s.value},eP=eI(eb),eC=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new o;return a.issues.length?{success:!1,error:new(e??ey)(a.issues.map(e=>es(e,n,d())))}:{success:!0,data:a.value}},eT=eC(eb),ez=e=>async(t,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>es(e,n,d())))}:{success:!0,data:a.value}},eO=ez(eb),eE=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return eS(e)(t,r,n)},eU=eE(eb),eD=e=>(t,r,i)=>eS(e)(t,r,i),eA=eD(eb),eZ=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return eI(e)(t,r,n)},eR=eZ(eb),eM=e=>async(t,r,i)=>eI(e)(t,r,i),eL=eM(eb),eF=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return eC(e)(t,r,n)},eV=eF(eb),eB=e=>(t,r,i)=>eC(e)(t,r,i),eW=eB(eb),eG=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ez(e)(t,r,n)},eJ=eG(eb),eX=e=>async(t,r,i)=>ez(e)(t,r,i),eH=eX(eb);e.s(["_decode",0,eD,"_decodeAsync",0,eM,"_encode",0,eE,"_encodeAsync",0,eZ,"_parse",0,eS,"_parseAsync",0,eI,"_safeDecode",0,eB,"_safeDecodeAsync",0,eX,"_safeEncode",0,eF,"_safeEncodeAsync",0,eG,"_safeParse",0,eC,"_safeParseAsync",0,ez,"decode",0,eA,"decodeAsync",0,eL,"encode",0,eU,"encodeAsync",0,eR,"parse",0,eN,"parseAsync",0,eP,"safeDecode",0,eW,"safeDecodeAsync",0,eH,"safeEncode",0,eV,"safeEncodeAsync",0,eJ,"safeParse",0,eT,"safeParseAsync",0,eO],13475);let eK=/^[cC][^\s-]{8,}$/,eY=/^[0-9a-z]+$/,eq=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eQ=/^[0-9a-vA-V]{20}$/,e0=/^[A-Za-z0-9]{27}$/,e1=/^[a-zA-Z0-9_-]{21}$/,e2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e4=/^([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})$/,e5=e=>e?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)$/,e6=e5(4),e3=e5(6),e9=e5(7),e8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,e7=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;function te(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}let tt=/^(?:(?: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])$/,tr=/^(([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}|:))$/,ti=e=>{let t=F(e??":");return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},tn=/^((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])$/,ta=/^(([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])$/,ts=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,to=/^[A-Za-z0-9_-]*$/,tl=/^\+(?:[0-9]){6,14}[0-9]$/,tu="(?:(?:\\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])))",td=RegExp(`^${tu}$`);function tc(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tm(e){return RegExp(`^${tc(e)}$`)}function th(e){let t=tc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return RegExp(`^${tu}T(?:${i})$`)}let tp=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},tf=/^-?\d+n?$/,tg=/^-?\d+$/,tx=/^-?\d+(?:\.\d+)?/,tv=/^(?:true|false)$/i,ty=/^null$/i,tb=/^undefined$/i,tw=/^[^A-Z]*$/,tk=/^[^a-z]*$/;function t$(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function tj(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}let t_=t$(22,"=="),tS=tj(22),tN=t$(27,"="),tI=tj(27),tP=t$(43,"="),tC=tj(43),tT=t$(64,""),tz=tj(64),tO=t$(86,"=="),tE=tj(86);e.s(["base64",0,ts,"base64url",0,to,"bigint",0,tf,"boolean",0,tv,"browserEmail",0,/^[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])?)*$/,"cidrv4",0,tn,"cidrv6",0,ta,"cuid",0,eK,"cuid2",0,eY,"date",0,td,"datetime",()=>th,"domain",0,/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,"duration",0,e2,"e164",0,tl,"email",0,e8,"emoji",()=>te,"extendedDuration",0,/^[-+]?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)?)??$/,"guid",0,e4,"hex",0,/^[0-9a-fA-F]*$/,"hostname",0,/^(?=.{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])?)*\.?$/,"html5Email",0,/^[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])?)*$/,"idnEmail",0,e7,"integer",0,tg,"ipv4",0,tt,"ipv6",0,tr,"ksuid",0,e0,"lowercase",0,tw,"mac",0,ti,"md5_base64",0,t_,"md5_base64url",0,tS,"md5_hex",0,/^[0-9a-fA-F]{32}$/,"nanoid",0,e1,"null",()=>ty,"number",0,tx,"rfc5322Email",0,/^(([^<>()\[\]\\.,;:\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,}))$/,"sha1_base64",0,tN,"sha1_base64url",0,tI,"sha1_hex",0,/^[0-9a-fA-F]{40}$/,"sha256_base64",0,tP,"sha256_base64url",0,tC,"sha256_hex",0,/^[0-9a-fA-F]{64}$/,"sha384_base64",0,tT,"sha384_base64url",0,tz,"sha384_hex",0,/^[0-9a-fA-F]{96}$/,"sha512_base64",0,tO,"sha512_base64url",0,tE,"sha512_hex",0,/^[0-9a-fA-F]{128}$/,"string",0,tp,"time",()=>tm,"ulid",0,eq,"undefined",()=>tb,"unicodeEmail",0,e7,"uppercase",0,tk,"uuid",0,e5,"uuid4",0,e6,"uuid6",0,e3,"uuid7",0,e9,"xid",0,eQ],71426);let tU=a("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tD={number:"number",bigint:"bigint",object:"date"},tA=a("$ZodCheckLessThan",(e,t)=>{tU.init(e,t);let r=tD[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tZ=a("$ZodCheckGreaterThan",(e,t)=>{tU.init(e,t);let r=tD[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tR=a("$ZodCheckMultipleOf",(e,t)=>{tU.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0===k(r.value,t.value))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),tM=a("$ZodCheckNumberFormat",(e,t)=>{tU.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,a]=X[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=a,r&&(i.pattern=tg)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}))}o<n&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),tL=a("$ZodCheckBigIntFormat",(e,t)=>{tU.init(e,t);let[r,i]=H[t.format];e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=n=>{let a=n.value;a<r&&n.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&n.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inst:e})}}),tF=a("$ZodCheckMaxSize",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let i=r.value;i.size<=t.maximum||r.issues.push({origin:eo(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tV=a("$ZodCheckMinSize",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;i.size>=t.minimum||r.issues.push({origin:eo(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tB=a("$ZodCheckSizeEquals",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=r=>{let i=r.value,n=i.size;if(n===t.size)return;let a=n>t.size;r.issues.push({origin:eo(i),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),tW=a("$ZodCheckMaxLength",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let i=r.value;if(i.length<=t.maximum)return;let n=el(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tG=a("$ZodCheckMinLength",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let n=el(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tJ=a("$ZodCheckLengthEquals",(e,t)=>{var r;tU.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return!b(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let i=r.value,n=i.length;if(n===t.length)return;let a=el(i),s=n>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),tX=a("$ZodCheckStringFormat",(e,t)=>{var r,i;tU.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),tH=a("$ZodCheckRegex",(e,t)=>{tX.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),tK=a("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tw),tX.init(e,t)}),tY=a("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tk),tX.init(e,t)}),tq=a("$ZodCheckIncludes",(e,t)=>{tU.init(e,t);let r=F(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),tQ=a("$ZodCheckStartsWith",(e,t)=>{tU.init(e,t);let r=RegExp(`^${F(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),t0=a("$ZodCheckEndsWith",(e,t)=>{tU.init(e,t);let r=RegExp(`.*${F(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function t1(e,t,r){e.issues.length&&t.issues.push(...en(r,e.issues))}let t2=a("$ZodCheckProperty",(e,t)=>{tU.init(e,t),e._zod.check=e=>{let r=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(r=>t1(r,e,t.property));t1(r,e,t.property)}}),t4=a("$ZodCheckMimeType",(e,t)=>{tU.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),t5=a("$ZodCheckOverwrite",(e,t)=>{tU.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});e.s(["$ZodCheck",0,tU,"$ZodCheckBigIntFormat",0,tL,"$ZodCheckEndsWith",0,t0,"$ZodCheckGreaterThan",0,tZ,"$ZodCheckIncludes",0,tq,"$ZodCheckLengthEquals",0,tJ,"$ZodCheckLessThan",0,tA,"$ZodCheckLowerCase",0,tK,"$ZodCheckMaxLength",0,tW,"$ZodCheckMaxSize",0,tF,"$ZodCheckMimeType",0,t4,"$ZodCheckMinLength",0,tG,"$ZodCheckMinSize",0,tV,"$ZodCheckMultipleOf",0,tR,"$ZodCheckNumberFormat",0,tM,"$ZodCheckOverwrite",0,t5,"$ZodCheckProperty",0,t2,"$ZodCheckRegex",0,tH,"$ZodCheckSizeEquals",0,tB,"$ZodCheckStartsWith",0,tQ,"$ZodCheckStringFormat",0,tX,"$ZodCheckUpperCase",0,tY],83624);class t6{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>`  ${e}`)].join("\n"))}}e.s(["Doc",()=>t6],40221);let t3={major:4,minor:2,patch:1};e.s(["version",0,t3],3761);let t9=a("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=t3;let i=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&i.unshift(e),i))for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i,n=ei(e);for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(n)continue;let t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&r?.async===!1)throw new o;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(n||(n=ei(e,t)))});else{if(e.issues.length===t)continue;n||(n=ei(e,t))}}return i?i.then(()=>e):e},r=(r,n,a)=>{if(ei(r))return r.aborted=!0,r;let s=t(n,i,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(n,a)=>{if(a.skipChecks)return e._zod.parse(n,a);if("backward"===a.direction){let t=e._zod.parse({value:n.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,n,a)):r(t,n,a)}let s=e._zod.parse(n,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(e=>t(e,i,a))}return t(s,i,a)}}e["~standard"]={validate:t=>{try{let r=eT(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return eO(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),t8=a("$ZodString",(e,t)=>{t9.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??tp(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),t7=a("$ZodStringFormat",(e,t)=>{tX.init(e,t),t8.init(e,t)}),re=a("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=e4),t7.init(e,t)}),rt=a("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=e5(e))}else t.pattern??(t.pattern=e5());t7.init(e,t)}),rr=a("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e8),t7.init(e,t)}),ri=a("$ZodURL",(e,t)=>{t7.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rn=a("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=te()),t7.init(e,t)}),ra=a("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=e1),t7.init(e,t)}),rs=a("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=eK),t7.init(e,t)}),ro=a("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eY),t7.init(e,t)}),rl=a("$ZodULID",(e,t)=>{t.pattern??(t.pattern=eq),t7.init(e,t)}),ru=a("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eQ),t7.init(e,t)}),rd=a("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=e0),t7.init(e,t)}),rc=a("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=th(t)),t7.init(e,t)}),rm=a("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=td),t7.init(e,t)}),rh=a("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tm(t)),t7.init(e,t)}),rp=a("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=e2),t7.init(e,t)}),rf=a("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tt),t7.init(e,t),e._zod.bag.format="ipv4"}),rg=a("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tr),t7.init(e,t),e._zod.bag.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:!t.abort})}}}),rx=a("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ti(t.delimiter)),t7.init(e,t),e._zod.bag.format="mac"}),rv=a("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tn),t7.init(e,t)}),ry=a("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ta),t7.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(2!==i.length)throw Error();let[e,t]=i;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rb(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rw=a("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ts),t7.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rb(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function rk(e){if(!to.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rb(t.padEnd(4*Math.ceil(t.length/4),"="))}let r$=a("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=to),t7.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{rk(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rj=a("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tl),t7.init(e,t)});function r_(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));if("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))return!1;return!0}catch{return!1}}let rS=a("$ZodJWT",(e,t)=>{t7.init(e,t),e._zod.check=r=>{r_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rN=a("$ZodCustomStringFormat",(e,t)=>{t7.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),rI=a("$ZodNumber",(e,t)=>{t9.init(e,t),e._zod.pattern=e._zod.bag.pattern??tx,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let n=r.value;if("number"==typeof n&&!Number.isNaN(n)&&Number.isFinite(n))return r;let a="number"==typeof n?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...a?{received:a}:{}}),r}}),rP=a("$ZodNumberFormat",(e,t)=>{tM.init(e,t),rI.init(e,t)}),rC=a("$ZodBoolean",(e,t)=>{t9.init(e,t),e._zod.pattern=tv,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let n=r.value;return"boolean"==typeof n||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),rT=a("$ZodBigInt",(e,t)=>{t9.init(e,t),e._zod.pattern=tf,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(e){}return"bigint"==typeof r.value||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),rz=a("$ZodBigIntFormat",(e,t)=>{tL.init(e,t),rT.init(e,t)}),rO=a("$ZodSymbol",(e,t)=>{t9.init(e,t),e._zod.parse=(t,r)=>{let i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),rE=a("$ZodUndefined",(e,t)=>{t9.init(e,t),e._zod.pattern=tb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,r)=>{let i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),rU=a("$ZodNull",(e,t)=>{t9.init(e,t),e._zod.pattern=ty,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rD=a("$ZodAny",(e,t)=>{t9.init(e,t),e._zod.parse=e=>e}),rA=a("$ZodUnknown",(e,t)=>{t9.init(e,t),e._zod.parse=e=>e}),rZ=a("$ZodNever",(e,t)=>{t9.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rR=a("$ZodVoid",(e,t)=>{t9.init(e,t),e._zod.parse=(t,r)=>{let i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),rM=a("$ZodDate",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(e){}let n=r.value,a=n instanceof Date;return a&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...a?{received:"Invalid Date"}:{},inst:e}),r}});function rL(e,t,r){e.issues.length&&t.issues.push(...en(r,e.issues)),t.value[r]=e.value}let rF=a("$ZodArray",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let a=[];for(let e=0;e<n.length;e++){let s=n[e],o=t.element._zod.run({value:s,issues:[]},i);o instanceof Promise?a.push(o.then(t=>rL(t,r,e))):rL(o,r,e)}return a.length?Promise.all(a).then(()=>r):r}});function rV(e,t,r,i){e.issues.length&&t.issues.push(...en(r,e.issues)),void 0===e.value?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function rB(e){let t=Object.keys(e.shape);for(let r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${r}": expected a Zod schema`);let r=J(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function rW(e,t,r,i,n,a){let s=[],o=n.keySet,l=n.catchall._zod,u=l.def.type;for(let n in t){if(o.has(n))continue;if("never"===u){s.push(n);continue}let a=l.run({value:t[n],issues:[]},i);a instanceof Promise?e.push(a.then(e=>rV(e,r,n,t))):rV(a,r,n,t)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length)?Promise.all(e).then(()=>r):r}let rG=a("$ZodObject",(e,t)=>{let r;t9.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape");if(!i?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let n=y(()=>rB(t));j(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let i=e[t]._zod;if(i.values)for(let e of(r[t]??(r[t]=new Set),i.values))r[t].add(e)}return r});let a=t.catchall;e._zod.parse=(t,i)=>{r??(r=n.value);let s=t.value;if(!U(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};let o=[],l=r.shape;for(let e of r.keys){let r=l[e]._zod.run({value:s[e],issues:[]},i);r instanceof Promise?o.push(r.then(r=>rV(r,t,e,s))):rV(r,t,e,s)}return a?rW(o,s,t,i,n.value,e):o.length?Promise.all(o).then(()=>t):t}}),rJ=a("$ZodObjectJIT",(e,t)=>{let r,i;rG.init(e,t);let n=e._zod.parse,a=y(()=>rB(t)),s=!u.jitless,o=s&&D.value,l=t.catchall;e._zod.parse=(u,d)=>{i??(i=a.value);let c=u.value;return U(c)?s&&o&&d?.async===!1&&!0!==d.jitless?(r||(r=(e=>{let t=new t6(["shape","payload","ctx"]),r=a.value,i=e=>{let t=z(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let n=Object.create(null),s=0;for(let e of r.keys)n[e]=`key_${s++}`;for(let e of(t.write("const newResult = {};"),r.keys)){let r=n[e],a=z(e);t.write(`const ${r} = ${i(e)};`),t.write(`
        if (${r}.issues.length) {
          payload.issues = payload.issues.concat(${r}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${a}, ...iss.path] : [${a}]
          })));
        }
        
        
        if (${r}.value === undefined) {
          if (${a} in input) {
            newResult[${a}] = undefined;
          }
        } else {
          newResult[${a}] = ${r}.value;
        }
        
      `)}t.write("payload.value = newResult;"),t.write("return payload;");let o=t.compile();return(t,r)=>o(e,t,r)})(t.shape)),u=r(u,d),l)?rW([],c,u,d,i,e):u:n(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u)}});function rX(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let n=e.filter(e=>!ei(e));return 1===n.length?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>es(e,i,d())))}),t)}let rH=a("$ZodUnion",(e,t)=>{t9.init(e,t),j(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),j(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),j(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),j(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>w(e.source)).join("|")})$`)}});let r=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(n,a)=>{if(r)return i(n,a);let s=!1,o=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},a);if(t instanceof Promise)o.push(t),s=!0;else{if(0===t.issues.length)return t;o.push(t)}}return s?Promise.all(o).then(t=>rX(t,n,e,a)):rX(o,n,e,a)}});function rK(e,t,r,i){let n=e.filter(e=>0===e.issues.length);return 1===n.length?t.value=n[0].value:0===n.length?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>es(e,i,d())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t}let rY=a("$ZodXor",(e,t)=>{rH.init(e,t),t.inclusive=!1;let r=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(n,a)=>{if(r)return i(n,a);let s=!1,o=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},a);t instanceof Promise?(o.push(t),s=!0):o.push(t)}return s?Promise.all(o).then(t=>rK(t,n,e,a)):rK(o,n,e,a)}}),rq=a("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,rH.init(e,t);let r=e._zod.parse;j(e._zod,"propValues",()=>{let e={};for(let r of t.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(i))for(let i of(e[t]||(e[t]=new Set),r))e[t].add(i)}return e});let i=y(()=>{let e=t.options,r=new Map;for(let i of e){let e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,i)}}return r});e._zod.parse=(n,a)=>{let s=n.value;if(!U(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let o=i.value.get(s?.[t.discriminator]);return o?o._zod.run(n,a):t.unionFallback?r(n,a):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),rQ=a("$ZodIntersection",(e,t)=>{t9.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,n=t.left._zod.run({value:i,issues:[]},r),a=t.right._zod.run({value:i,issues:[]},r);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([t,r])=>r0(e,t,r)):r0(e,n,a)}});function r0(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),ei(e))return e;let i=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(A(t)&&A(r)){let i=Object.keys(r),n=Object.keys(t).filter(e=>-1!==i.indexOf(e)),a={...t,...r};for(let i of n){let n=e(t[i],r[i]);if(!n.valid)return{valid:!1,mergeErrorPath:[i,...n.mergeErrorPath]};a[i]=n.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let n=0;n<t.length;n++){let a=e(t[n],r[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};i.push(a.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}let r1=a("$ZodTuple",(e,t)=>{t9.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],o=[...r].reverse().findIndex(e=>"optional"!==e._zod.optin),l=-1===o?0:r.length-o;if(!t.rest){let t=a.length>r.length,n=a.length<l-1;if(t||n)return i.issues.push({...t?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:a,inst:e,origin:"array"}),i}let u=-1;for(let e of r){if(++u>=a.length&&u>=l)continue;let t=e._zod.run({value:a[u],issues:[]},n);t instanceof Promise?s.push(t.then(e=>r2(e,i,u))):r2(t,i,u)}if(t.rest)for(let e of a.slice(r.length)){u++;let r=t.rest._zod.run({value:e,issues:[]},n);r instanceof Promise?s.push(r.then(e=>r2(e,i,u))):r2(r,i,u)}return s.length?Promise.all(s).then(()=>i):i}});function r2(e,t,r){e.issues.length&&t.issues.push(...en(r,e.issues)),t.value[r]=e.value}let r4=a("$ZodRecord",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!A(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s){let o;r.value={};let l=new Set;for(let e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){l.add("number"==typeof e?e.toString():e);let s=t.valueType._zod.run({value:n[e],issues:[]},i);s instanceof Promise?a.push(s.then(t=>{t.issues.length&&r.issues.push(...en(e,t.issues)),r.value[e]=t.value})):(s.issues.length&&r.issues.push(...en(e,s.issues)),r.value[e]=s.value)}for(let e in n)l.has(e)||(o=o??[]).push(e);o&&o.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:o})}else for(let s of(r.value={},Reflect.ownKeys(n))){if("__proto__"===s)continue;let o=t.keyType._zod.run({value:s,issues:[]},i);if(o instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(o.issues.length){"loose"===t.mode?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:o.issues.map(e=>es(e,i,d())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:n[s],issues:[]},i);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&r.issues.push(...en(s,e.issues)),r.value[o.value]=e.value})):(l.issues.length&&r.issues.push(...en(s,l.issues)),r.value[o.value]=l.value)}return a.length?Promise.all(a).then(()=>r):r}}),r5=a("$ZodMap",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let a=[];for(let[s,o]of(r.value=new Map,n)){let l=t.keyType._zod.run({value:s,issues:[]},i),u=t.valueType._zod.run({value:o,issues:[]},i);l instanceof Promise||u instanceof Promise?a.push(Promise.all([l,u]).then(([t,a])=>{r6(t,a,r,s,n,e,i)})):r6(l,u,r,s,n,e,i)}return a.length?Promise.all(a).then(()=>r):r}});function r6(e,t,r,i,n,a,s){e.issues.length&&(M.has(typeof i)?r.issues.push(...en(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:a,issues:e.issues.map(e=>es(e,s,d()))})),t.issues.length&&(M.has(typeof i)?r.issues.push(...en(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:a,key:i,issues:t.issues.map(e=>es(e,s,d()))})),r.value.set(e.value,t.value)}let r3=a("$ZodSet",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];for(let e of(r.value=new Set,n)){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?a.push(n.then(e=>r9(e,r))):r9(n,r)}return a.length?Promise.all(a).then(()=>r):r}});function r9(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}let r8=a("$ZodEnum",(e,t)=>{t9.init(e,t);let r=g(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=RegExp(`^(${r.filter(e=>M.has(typeof e)).map(e=>"string"==typeof e?F(e):e.toString()).join("|")})$`),e._zod.parse=(t,n)=>{let a=t.value;return i.has(a)||t.issues.push({code:"invalid_value",values:r,input:a,inst:e}),t}}),r7=a("$ZodLiteral",(e,t)=>{if(t9.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?F(e):e?F(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,n)=>{let a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),i}}),ie=a("$ZodFile",(e,t)=>{t9.init(e,t),e._zod.parse=(t,r)=>{let i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),it=a("$ZodTransform",(e,t)=>{t9.init(e,t),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new l(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(e=>(r.value=e,r));if(n instanceof Promise)throw new o;return r.value=n,r}});function ir(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let ii=a("$ZodOptional",(e,t)=>{t9.init(e,t),e._zod.optin="optional",e._zod.optout="optional",j(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),j(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${w(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(t=>ir(t,e.value)):ir(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),ia=a("$ZodNullable",(e,t)=>{t9.init(e,t),j(e._zod,"optin",()=>t.innerType._zod.optin),j(e._zod,"optout",()=>t.innerType._zod.optout),j(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${w(e.source)}|null)$`):void 0}),j(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),is=a("$ZodDefault",(e,t)=>{t9.init(e,t),e._zod.optin="optional",j(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>io(e,t)):io(i,t)}});function io(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let il=a("$ZodPrefault",(e,t)=>{t9.init(e,t),e._zod.optin="optional",j(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),iu=a("$ZodNonOptional",(e,t)=>{t9.init(e,t),j(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(t=>id(t,e)):id(n,e)}});function id(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let ic=a("$ZodSuccess",(e,t)=>{t9.init(e,t),e._zod.parse=(e,r)=>{if("backward"===r.direction)throw new l("ZodSuccess");let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),im=a("$ZodCatch",(e,t)=>{t9.init(e,t),j(e._zod,"optin",()=>t.innerType._zod.optin),j(e._zod,"optout",()=>t.innerType._zod.optout),j(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>es(e,r,d()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>es(e,r,d()))},input:e.value}),e.issues=[]),e)}}),ih=a("$ZodNaN",(e,t)=>{t9.init(e,t),e._zod.parse=(t,r)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),ip=a("$ZodPipe",(e,t)=>{t9.init(e,t),j(e._zod,"values",()=>t.in._zod.values),j(e._zod,"optin",()=>t.in._zod.optin),j(e._zod,"optout",()=>t.out._zod.optout),j(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>ig(e,t.in,r)):ig(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>ig(e,t.out,r)):ig(i,t.out,r)}});function ig(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let ix=a("$ZodCodec",(e,t)=>{t9.init(e,t),j(e._zod,"values",()=>t.in._zod.values),j(e._zod,"optin",()=>t.in._zod.optin),j(e._zod,"optout",()=>t.out._zod.optout),j(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("forward"===(r.direction||"forward")){let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>iv(e,t,r)):iv(i,t,r)}{let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>iv(e,t,r)):iv(i,t,r)}}});function iv(e,t,r){if(e.issues.length)return e.aborted=!0,e;if("forward"===(r.direction||"forward")){let i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>iy(e,i,t.out,r)):iy(e,i,t.out,r)}{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>iy(e,i,t.in,r)):iy(e,i,t.in,r)}}function iy(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}let ib=a("$ZodReadonly",(e,t)=>{t9.init(e,t),j(e._zod,"propValues",()=>t.innerType._zod.propValues),j(e._zod,"values",()=>t.innerType._zod.values),j(e._zod,"optin",()=>t.innerType?._zod?.optin),j(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(iw):iw(i)}});function iw(e){return e.value=Object.freeze(e.value),e}let ik=a("$ZodTemplateLiteral",(e,t)=>{t9.init(e,t);let r=[];for(let e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let i=+!!t.startsWith("^"),n=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(i,n))}else if(null===e||L.has(typeof e))r.push(F(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${r.join("")}$`),e._zod.parse=(r,i)=>("string"!=typeof r.value?r.issues.push({input:r.value,inst:e,expected:"template_literal",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),r)}),i$=a("$ZodFunction",(e,t)=>(t9.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw Error("implement() must be called with a function");return function(...r){let i=Reflect.apply(t,this,e._def.input?eN(e._def.input,r):r);return e._def.output?eN(e._def.output,i):i}},e.implementAsync=t=>{if("function"!=typeof t)throw Error("implementAsync() must be called with a function");return async function(...r){let i=e._def.input?await eP(e._def.input,r):r,n=await Reflect.apply(t,this,i);return e._def.output?await eP(e._def.output,n):n}},e._zod.parse=(t,r)=>("function"!=typeof t.value?t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}):e._def.output&&"promise"===e._def.output._zod.def.type?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t),e.input=(...t)=>{let r=e.constructor;return new r(Array.isArray(t[0])?{type:"function",input:new r1({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}:{type:"function",input:t[0],output:e._def.output})},e.output=t=>new e.constructor({type:"function",input:e._def.input,output:t}),e)),ij=a("$ZodPromise",(e,t)=>{t9.init(e,t),e._zod.parse=(e,r)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},r))}),i_=a("$ZodLazy",(e,t)=>{t9.init(e,t),j(e._zod,"innerType",()=>t.getter()),j(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),j(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),j(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),j(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),iS=a("$ZodCustom",(e,t)=>{tU.init(e,t),t9.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(t=>iN(t,r,i,e));iN(n,r,i,e)}});function iN(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(eu(e))}}function iI(e,t,r,i){let n=Math.abs(e),a=n%10,s=n%100;return s>=11&&s<=19?i:1===a?t:a>=2&&a<=4?r:i}function iP(){let e,t;return{localeError:(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"}},t={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",mac:"MAC 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"},r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${G(r.values[0])}`;return`Invalid option: expected one of ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${i.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`}})}}function iC(){let e,t;return{localeError:(e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}},t={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:"ទិន្នន័យបញ្ចូល"},r=>{switch(r.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r.expected} ប៉ុន្តែទទួលបាន ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":if(Array.isArray(e))return"អារេ (Array)";if(null===e)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${G(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()} ${i.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()} ${i.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`;if("ends_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`;if("includes"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`;if("regex"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`;return`មិនត្រឹមត្រូវ៖ ${t[r.format]??r.format}`;case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${x(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":default:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`}})}}e.s(["$ZodAny",0,rD,"$ZodArray",0,rF,"$ZodBase64",0,rw,"$ZodBase64URL",0,r$,"$ZodBigInt",0,rT,"$ZodBigIntFormat",0,rz,"$ZodBoolean",0,rC,"$ZodCIDRv4",0,rv,"$ZodCIDRv6",0,ry,"$ZodCUID",0,rs,"$ZodCUID2",0,ro,"$ZodCatch",0,im,"$ZodCodec",0,ix,"$ZodCustom",0,iS,"$ZodCustomStringFormat",0,rN,"$ZodDate",0,rM,"$ZodDefault",0,is,"$ZodDiscriminatedUnion",0,rq,"$ZodE164",0,rj,"$ZodEmail",0,rr,"$ZodEmoji",0,rn,"$ZodEnum",0,r8,"$ZodFile",0,ie,"$ZodFunction",0,i$,"$ZodGUID",0,re,"$ZodIPv4",0,rf,"$ZodIPv6",0,rg,"$ZodISODate",0,rm,"$ZodISODateTime",0,rc,"$ZodISODuration",0,rp,"$ZodISOTime",0,rh,"$ZodIntersection",0,rQ,"$ZodJWT",0,rS,"$ZodKSUID",0,rd,"$ZodLazy",0,i_,"$ZodLiteral",0,r7,"$ZodMAC",0,rx,"$ZodMap",0,r5,"$ZodNaN",0,ih,"$ZodNanoID",0,ra,"$ZodNever",0,rZ,"$ZodNonOptional",0,iu,"$ZodNull",0,rU,"$ZodNullable",0,ia,"$ZodNumber",0,rI,"$ZodNumberFormat",0,rP,"$ZodObject",0,rG,"$ZodObjectJIT",0,rJ,"$ZodOptional",0,ii,"$ZodPipe",0,ip,"$ZodPrefault",0,il,"$ZodPromise",0,ij,"$ZodReadonly",0,ib,"$ZodRecord",0,r4,"$ZodSet",0,r3,"$ZodString",0,t8,"$ZodStringFormat",0,t7,"$ZodSuccess",0,ic,"$ZodSymbol",0,rO,"$ZodTemplateLiteral",0,ik,"$ZodTransform",0,it,"$ZodTuple",0,r1,"$ZodType",0,t9,"$ZodULID",0,rl,"$ZodURL",0,ri,"$ZodUUID",0,rt,"$ZodUndefined",0,rE,"$ZodUnion",0,rH,"$ZodUnknown",0,rA,"$ZodVoid",0,rR,"$ZodXID",0,ru,"$ZodXor",0,rY,"isValidBase64",()=>rb,"isValidBase64URL",()=>rk,"isValidJWT",()=>r_],53842);let iT=(e,t)=>{switch(e){case"number":return Number.isNaN(t)?"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":if(void 0===t)return"nežinomas objektas";if(null===t)return"nulinė reikšmė";if(Array.isArray(t))return"masyvas";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name;return"objektas";case"null":return"nulinė reikšmė"}return e},iz=e=>e.charAt(0).toUpperCase()+e.slice(1);function iO(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||0===r?"many":1===r?"one":"few"}function iE(e,t,r,i){let n=Math.abs(e),a=n%10,s=n%100;return s>=11&&s<=19?i:1===a?t:a>=2&&a<=4?r:i}function iU(){let e,t;return{localeError:(e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}},t={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:"вхідні дані"},r=>{switch(r.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${r.expected}, отримано ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неправильні вхідні дані: очікується ${G(r.values[0])}`;return`Неправильна опція: очікується одне з ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Занадто велике: очікується, що ${r.origin??"значення"} ${i.verb} ${t}${r.maximum.toString()} ${i.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Занадто мале: очікується, що ${r.origin} ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неправильний рядок: повинен починатися з "${r.prefix}"`;if("ends_with"===r.format)return`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`;if("includes"===r.format)return`Неправильний рядок: повинен містити "${r.includes}"`;if("regex"===r.format)return`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`;return`Неправильний ${t[r.format]??r.format}`;case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`;default:return`Неправильні вхідні дані`}})}}e.s([],62986);let iD=Symbol("ZodOutput"),iA=Symbol("ZodInput");class iZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&"object"==typeof r&&"id"in r){if(this._idmap.has(r.id))throw Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function iR(){return new iZ}(t=globalThis).__zod_globalRegistry??(t.__zod_globalRegistry=iR());let iM=globalThis.__zod_globalRegistry;function iL(e,t){return new e({type:"string",...B(t)})}function iF(e,t){return new e({type:"string",coerce:!0,...B(t)})}function iV(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...B(t)})}function iB(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...B(t)})}function iW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...B(t)})}function iG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...B(t)})}function iJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...B(t)})}function iX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...B(t)})}function iH(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...B(t)})}function iK(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...B(t)})}function iY(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...B(t)})}function iq(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...B(t)})}function iQ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...B(t)})}function i0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...B(t)})}function i1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...B(t)})}function i2(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...B(t)})}function i4(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...B(t)})}function i5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...B(t)})}function i6(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...B(t)})}function i3(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...B(t)})}function i9(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...B(t)})}function i8(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...B(t)})}function i7(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...B(t)})}function ne(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...B(t)})}function nt(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...B(t)})}e.s(["$ZodRegistry",()=>iZ,"$input",0,iA,"$output",0,iD,"globalRegistry",0,iM,"registry",()=>iR],23661);let nr={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ni(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...B(t)})}function nn(e,t){return new e({type:"string",format:"date",check:"string_format",...B(t)})}function na(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...B(t)})}function ns(e,t){return new e({type:"string",format:"duration",check:"string_format",...B(t)})}function no(e,t){return new e({type:"number",checks:[],...B(t)})}function nl(e,t){return new e({type:"number",coerce:!0,checks:[],...B(t)})}function nu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...B(t)})}function nd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...B(t)})}function nc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...B(t)})}function nm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...B(t)})}function nh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...B(t)})}function np(e,t){return new e({type:"boolean",...B(t)})}function nf(e,t){return new e({type:"boolean",coerce:!0,...B(t)})}function ng(e,t){return new e({type:"bigint",...B(t)})}function nx(e,t){return new e({type:"bigint",coerce:!0,...B(t)})}function nv(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...B(t)})}function ny(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...B(t)})}function nb(e,t){return new e({type:"symbol",...B(t)})}function nw(e,t){return new e({type:"undefined",...B(t)})}function nk(e,t){return new e({type:"null",...B(t)})}function n$(e){return new e({type:"any"})}function nj(e){return new e({type:"unknown"})}function n_(e,t){return new e({type:"never",...B(t)})}function nS(e,t){return new e({type:"void",...B(t)})}function nN(e,t){return new e({type:"date",...B(t)})}function nI(e,t){return new e({type:"date",coerce:!0,...B(t)})}function nP(e,t){return new e({type:"nan",...B(t)})}function nC(e,t){return new tA({check:"less_than",...B(t),value:e,inclusive:!1})}function nT(e,t){return new tA({check:"less_than",...B(t),value:e,inclusive:!0})}function nz(e,t){return new tZ({check:"greater_than",...B(t),value:e,inclusive:!1})}function nO(e,t){return new tZ({check:"greater_than",...B(t),value:e,inclusive:!0})}function nE(e){return nz(0,e)}function nU(e){return nC(0,e)}function nD(e){return nT(0,e)}function nA(e){return nO(0,e)}function nZ(e,t){return new tR({check:"multiple_of",...B(t),value:e})}function nR(e,t){return new tF({check:"max_size",...B(t),maximum:e})}function nM(e,t){return new tV({check:"min_size",...B(t),minimum:e})}function nL(e,t){return new tB({check:"size_equals",...B(t),size:e})}function nF(e,t){return new tW({check:"max_length",...B(t),maximum:e})}function nV(e,t){return new tG({check:"min_length",...B(t),minimum:e})}function nB(e,t){return new tJ({check:"length_equals",...B(t),length:e})}function nW(e,t){return new tH({check:"string_format",format:"regex",...B(t),pattern:e})}function nG(e){return new tK({check:"string_format",format:"lowercase",...B(e)})}function nJ(e){return new tY({check:"string_format",format:"uppercase",...B(e)})}function nX(e,t){return new tq({check:"string_format",format:"includes",...B(t),includes:e})}function nH(e,t){return new tQ({check:"string_format",format:"starts_with",...B(t),prefix:e})}function nK(e,t){return new t0({check:"string_format",format:"ends_with",...B(t),suffix:e})}function nY(e,t,r){return new t2({check:"property",property:e,schema:t,...B(r)})}function nq(e,t){return new t4({check:"mime_type",mime:e,...B(t)})}function nQ(e){return new t5({check:"overwrite",tx:e})}function n0(e){return nQ(t=>t.normalize(e))}function n1(){return nQ(e=>e.trim())}function n2(){return nQ(e=>e.toLowerCase())}function n4(){return nQ(e=>e.toUpperCase())}function n5(){return nQ(e=>O(e))}function n6(e,t,r){return new e({type:"array",element:t,...B(r)})}function n3(e,t,r){return new e({type:"union",options:t,...B(r)})}function n9(e,t,r){return new e({type:"union",options:t,inclusive:!1,...B(r)})}function n8(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...B(i)})}function n7(e,t,r){return new e({type:"intersection",left:t,right:r})}function ae(e,t,r,i){let n=r instanceof t9,a=n?i:r;return new e({type:"tuple",items:t,rest:n?r:null,...B(a)})}function at(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...B(i)})}function ar(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...B(i)})}function ai(e,t,r){return new e({type:"set",valueType:t,...B(r)})}function an(e,t,r){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...B(r)})}function aa(e,t,r){return new e({type:"enum",entries:t,...B(r)})}function as(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...B(r)})}function ao(e,t){return new e({type:"file",...B(t)})}function al(e,t){return new e({type:"transform",transform:t})}function au(e,t){return new e({type:"optional",innerType:t})}function ad(e,t){return new e({type:"nullable",innerType:t})}function ac(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():Z(r)}})}function am(e,t,r){return new e({type:"nonoptional",innerType:t,...B(r)})}function ah(e,t){return new e({type:"success",innerType:t})}function ap(e,t,r){return new e({type:"catch",innerType:t,catchValue:"function"==typeof r?r:()=>r})}function af(e,t,r){return new e({type:"pipe",in:t,out:r})}function ag(e,t){return new e({type:"readonly",innerType:t})}function ax(e,t,r){return new e({type:"template_literal",parts:t,...B(r)})}function av(e,t){return new e({type:"lazy",getter:t})}function ay(e,t){return new e({type:"promise",innerType:t})}function ab(e,t,r){let i=B(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function aw(e,t,r){return new e({type:"custom",check:"custom",fn:t,...B(r)})}function ak(e){let t=a$(r=>(r.addIssue=e=>{"string"==typeof e?r.issues.push(eu(e,r.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=r.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),r.issues.push(eu(e)))},e(r.value,r)));return t}function a$(e,t){let r=new tU({check:"custom",...B(t)});return r._zod.check=e,r}function aj(e){let t=new tU({check:"describe"});return t._zod.onattach=[t=>{let r=iM.get(t)??{};iM.add(t,{...r,description:e})}],t._zod.check=()=>{},t}function a_(e){let t=new tU({check:"meta"});return t._zod.onattach=[t=>{let r=iM.get(t)??{};iM.add(t,{...r,...e})}],t._zod.check=()=>{},t}function aS(e,t){let r=B(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];"sensitive"!==r.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),n=n.map(e=>"string"==typeof e?e.toLowerCase():e));let a=new Set(i),s=new Set(n),o=e.Codec??ix,l=e.Boolean??rC,u=new o({type:"pipe",in:new(e.String??t8)({type:"string",error:r.error}),out:new l({type:"boolean",error:r.error}),transform:(e,t)=>{let i=e;return"sensitive"!==r.case&&(i=i.toLowerCase()),!!a.has(i)||!s.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:t.value,inst:u,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":n[0]||"false",error:r.error});return u}function aN(e,t,r,i={}){let n=B(i),a={...B(i),check:"string_format",type:"string",format:t,fn:"function"==typeof r?r:e=>r.test(e),...n};return r instanceof RegExp&&(a.pattern=r),new e(a)}function aI(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??iM,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function aP(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let o=e._zod.toJSONSchema?.();if(o)s.schema=o;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path},a=e._zod.parent;if(a)s.ref=a,aP(a,t,i),t.seen.get(a).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,i);else{let r=s.schema,a=t.processors[n.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);a(e,t,r,i)}}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let n=t._zod.def;if("transform"===n.type)return!0;if("array"===n.type)return e(n.element,i);if("set"===n.type)return e(n.valueType,i);if("lazy"===n.type)return e(n.getter(),i);if("promise"===n.type||"optional"===n.type||"nonoptional"===n.type||"nullable"===n.type||"readonly"===n.type||"default"===n.type||"prefault"===n.type)return e(n.innerType,i);if("intersection"===n.type)return e(n.left,i)||e(n.right,i);if("record"===n.type||"map"===n.type)return e(n.keyType,i)||e(n.valueType,i);if("pipe"===n.type)return e(n.in,i)||e(n.out,i);if("object"===n.type){for(let t in n.shape)if(e(n.shape[t],i))return!0;return!1}if("union"===n.type){for(let t of n.options)if(e(t,i))return!0;return!1}if("tuple"===n.type){for(let t of n.items)if(e(t,i))return!0;if(n.rest&&e(n.rest,i))return!0}return!1}(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function aC(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:n,defId:a}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,n=e.external.uri??(e=>e);if(r)return{ref:n(r)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${n("__shared")}#/${i}/${a}`}}if(t[1]===r)return{ref:"#"};let n=`#/${i}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:n+a}})(t);i.def={...i.schema},a&&(i.defId=a);let s=i.schema;for(let e in s)delete s[e];s.$ref=n};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle||n.count>1&&"ref"===e.reused){i(r);continue}}}function aT(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t),n=r.def??r.schema,a={...n};if(null===r.ref)return;let s=r.ref;if(r.ref=null,s){i(s);let t=e.seen.get(s).schema;t.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(n.allOf=n.allOf??[],n.allOf.push(t)):(Object.assign(n,t),Object.assign(n,a))}r.isParent||e.override({zodSchema:t,jsonSchema:n,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())i(t[0]);let n={};if("draft-2020-12"===e.target?n.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?n.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");n.$id=e.external.uri(r)}Object.assign(n,r.def??r.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?n.$defs=a:n.definitions=a);try{let e=JSON.parse(JSON.stringify(n));return Object.defineProperty(e,"~standard",{value:{...t["~standard"],jsonSchema:{input:aO(t,"input"),output:aO(t,"output")}},enumerable:!1,writable:!1}),e}catch(e){throw Error("Error converting schema to JSON.")}}e.s(["TimePrecision",0,nr,"_any",()=>n$,"_array",()=>n6,"_base64",()=>i8,"_base64url",()=>i7,"_bigint",()=>ng,"_boolean",()=>np,"_catch",()=>ap,"_check",()=>a$,"_cidrv4",()=>i3,"_cidrv6",()=>i9,"_coercedBigint",()=>nx,"_coercedBoolean",()=>nf,"_coercedDate",()=>nI,"_coercedNumber",()=>nl,"_coercedString",()=>iF,"_cuid",()=>iq,"_cuid2",()=>iQ,"_custom",()=>ab,"_date",()=>nN,"_default",()=>ac,"_discriminatedUnion",()=>n8,"_e164",()=>ne,"_email",()=>iV,"_emoji",()=>iK,"_endsWith",()=>nK,"_enum",()=>an,"_file",()=>ao,"_float32",()=>nd,"_float64",()=>nc,"_gt",()=>nz,"_gte",()=>nO,"_guid",()=>iB,"_includes",()=>nX,"_int",()=>nu,"_int32",()=>nm,"_int64",()=>nv,"_intersection",()=>n7,"_ipv4",()=>i4,"_ipv6",()=>i5,"_isoDate",()=>nn,"_isoDateTime",()=>ni,"_isoDuration",()=>ns,"_isoTime",()=>na,"_jwt",()=>nt,"_ksuid",()=>i2,"_lazy",()=>av,"_length",()=>nB,"_literal",()=>as,"_lowercase",()=>nG,"_lt",()=>nC,"_lte",()=>nT,"_mac",()=>i6,"_map",()=>ar,"_max",()=>nT,"_maxLength",()=>nF,"_maxSize",()=>nR,"_mime",()=>nq,"_min",()=>nO,"_minLength",()=>nV,"_minSize",()=>nM,"_multipleOf",()=>nZ,"_nan",()=>nP,"_nanoid",()=>iY,"_nativeEnum",()=>aa,"_negative",()=>nU,"_never",()=>n_,"_nonnegative",()=>nA,"_nonoptional",()=>am,"_nonpositive",()=>nD,"_normalize",()=>n0,"_null",()=>nk,"_nullable",()=>ad,"_number",()=>no,"_optional",()=>au,"_overwrite",()=>nQ,"_pipe",()=>af,"_positive",()=>nE,"_promise",()=>ay,"_property",()=>nY,"_readonly",()=>ag,"_record",()=>at,"_refine",()=>aw,"_regex",()=>nW,"_set",()=>ai,"_size",()=>nL,"_slugify",()=>n5,"_startsWith",()=>nH,"_string",()=>iL,"_stringFormat",()=>aN,"_stringbool",()=>aS,"_success",()=>ah,"_superRefine",()=>ak,"_symbol",()=>nb,"_templateLiteral",()=>ax,"_toLowerCase",()=>n2,"_toUpperCase",()=>n4,"_transform",()=>al,"_trim",()=>n1,"_tuple",()=>ae,"_uint32",()=>nh,"_uint64",()=>ny,"_ulid",()=>i0,"_undefined",()=>nw,"_union",()=>n3,"_unknown",()=>nj,"_uppercase",()=>nJ,"_url",()=>iH,"_uuid",()=>iW,"_uuidv4",()=>iG,"_uuidv6",()=>iJ,"_uuidv7",()=>iX,"_void",()=>nS,"_xid",()=>i1,"_xor",()=>n9,"describe",()=>aj,"meta",()=>a_],71430);let az=(e,t={})=>r=>{let i=aI({...r,processors:t});return aP(e,i),aC(i,e),aT(i,e)},aO=(e,t)=>r=>{let{libraryOptions:i,target:n}=r??{},a=aI({...i??{},target:n,io:t,processors:{}});return aP(e,a),aC(a,e),aT(a,e)};e.s(["createStandardJSONSchemaMethod",0,aO,"createToJSONSchemaMethod",0,az,"extractDefs",()=>aC,"finalize",()=>aT,"initializeContext",()=>aI,"process",()=>aP],63834);let aE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},aU=(e,t,r,i)=>{r.type="string";let{minimum:n,maximum:a,format:s,patterns:o,contentEncoding:l}=e._zod.bag;if("number"==typeof n&&(r.minLength=n),"number"==typeof a&&(r.maxLength=a),s&&(r.format=aE[s]??s,""===r.format&&delete r.format),l&&(r.contentEncoding=l),o&&o.size>0){let e=[...o];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},aD=(e,t,r,i)=>{let{minimum:n,maximum:a,format:s,multipleOf:o,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof n&&(r.minimum=n,"number"==typeof u&&"draft-04"!==t.target&&(u>=n?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof o&&(r.multipleOf=o)},aA=(e,t,r,i)=>{r.type="boolean"},aZ=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},aR=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},aM=(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},aL=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},aF=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},aV=(e,t,r,i)=>{r.not={}},aB=(e,t,r,i)=>{},aW=(e,t,r,i)=>{},aG=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},aJ=(e,t,r,i)=>{let n=g(e._zod.def.entries);n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=n},aX=(e,t,r,i)=>{let n=e._zod.def,a=[];for(let e of n.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else a.push(Number(e));else a.push(e);if(0===a.length);else if(1===a.length){let e=a[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else a.every(e=>"number"==typeof e)&&(r.type="number"),a.every(e=>"string"==typeof e)&&(r.type="string"),a.every(e=>"boolean"==typeof e)&&(r.type="boolean"),a.every(e=>null===e)&&(r.type="null"),r.enum=a},aH=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},aK=(e,t,r,i)=>{let n=e._zod.pattern;if(!n)throw Error("Pattern not found in template literal");r.type="string",r.pattern=n.source},aY=(e,t,r,i)=>{let n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:o}=e._zod.bag;void 0!==a&&(n.minLength=a),void 0!==s&&(n.maxLength=s),o?1===o.length?(n.contentMediaType=o[0],Object.assign(r,n)):r.anyOf=o.map(e=>({...n,contentMediaType:e})):Object.assign(r,n)},aq=(e,t,r,i)=>{r.type="boolean"},aQ=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},a0=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},a1=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},a2=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},a4=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},a5=(e,t,r,i)=>{let n=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=aP(n.element,t,{...i,path:[...i.path,"items"]})},a6=(e,t,r,i)=>{let n=e._zod.def;r.type="object",r.properties={};let a=n.shape;for(let e in a)r.properties[e]=aP(a[e],t,{...i,path:[...i.path,"properties",e]});let s=new Set([...new Set(Object.keys(a))].filter(e=>{let r=n.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));s.size>0&&(r.required=Array.from(s)),n.catchall?._zod.def.type==="never"?r.additionalProperties=!1:n.catchall?n.catchall&&(r.additionalProperties=aP(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},a3=(e,t,r,i)=>{let n=e._zod.def,a=!1===n.inclusive,s=n.options.map((e,r)=>aP(e,t,{...i,path:[...i.path,a?"oneOf":"anyOf",r]}));a?r.oneOf=s:r.anyOf=s},a9=(e,t,r,i)=>{let n=e._zod.def,a=aP(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=aP(n.right,t,{...i,path:[...i.path,"allOf",1]}),o=e=>"allOf"in e&&1===Object.keys(e).length;r.allOf=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]]},a8=(e,t,r,i)=>{let n=e._zod.def;r.type="array";let a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",o=n.items.map((e,r)=>aP(e,t,{...i,path:[...i.path,a,r]})),l=n.rest?aP(n.rest,t,{...i,path:[...i.path,s,..."openapi-3.0"===t.target?[n.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=o,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:o},l&&r.items.anyOf.push(l),r.minItems=o.length,l||(r.maxItems=o.length)):(r.items=o,l&&(r.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},a7=(e,t,r,i)=>{let n=e._zod.def;r.type="object",("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=aP(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=aP(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]})},se=(e,t,r,i)=>{let n=e._zod.def,a=aP(n.innerType,t,i),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},st=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType},sr=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},si=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},sn=(e,t,r,i)=>{let n,a=e._zod.def;aP(a.innerType,t,i),t.seen.get(e).ref=a.innerType;try{n=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=n},sa=(e,t,r,i)=>{let n=e._zod.def,a="input"===t.io?"transform"===n.in._zod.def.type?n.out:n.in:n.out;aP(a,t,i),t.seen.get(e).ref=a},ss=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType,r.readOnly=!0},so=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType},sl=(e,t,r,i)=>{let n=e._zod.def;aP(n.innerType,t,i),t.seen.get(e).ref=n.innerType},su=(e,t,r,i)=>{let n=e._zod.innerType;aP(n,t,i),t.seen.get(e).ref=n},sd={string:aU,number:aD,boolean:aA,bigint:aZ,symbol:aR,null:aM,undefined:aL,void:aF,never:aV,any:aB,unknown:aW,date:aG,enum:aJ,literal:aX,nan:aH,template_literal:aK,file:aY,success:aq,custom:aQ,function:a0,transform:a1,map:a2,set:a4,array:a5,object:a6,union:a3,intersection:a9,tuple:a8,record:a7,nullable:se,nonoptional:st,default:sr,prefault:si,catch:sn,pipe:sa,readonly:ss,promise:so,optional:sl,lazy:su};function sc(e,t){if("_idmap"in e){let r=aI({...t,processors:sd}),i={};for(let t of e._idmap.entries()){let[e,i]=t;aP(i,r)}let n={};for(let a of(r.external={registry:e,uri:t?.uri,defs:i},e._idmap.entries())){let[e,t]=a;aC(r,t),n[e]=aT(r,t)}return Object.keys(i).length>0&&(n.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:i}),{schemas:n}}let r=aI({...t,processors:sd});return aP(e,r),aC(r,e),aT(r,e)}class sm{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=aI({processors:sd,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return aP(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),aC(this.ctx,e);let{"~standard":r,...i}=aT(this.ctx,e);return i}}e.s([],62031),e.s([],41777),e.s(["ZodAny",()=>oH,"ZodArray",()=>o6,"ZodBase64",()=>of,"ZodBase64URL",()=>ox,"ZodBigInt",()=>oZ,"ZodBigIntFormat",()=>oM,"ZodBoolean",()=>oD,"ZodCIDRv4",()=>oc,"ZodCIDRv6",()=>oh,"ZodCUID",()=>s6,"ZodCUID2",()=>s9,"ZodCatch",()=>lF,"ZodCodec",()=>lX,"ZodCustom",()=>l3,"ZodCustomStringFormat",()=>o$,"ZodDate",()=>o4,"ZodDefault",()=>lE,"ZodDiscriminatedUnion",()=>ls,"ZodE164",()=>oy,"ZodEmail",()=>sV,"ZodEmoji",()=>s1,"ZodEnum",()=>lb,"ZodFile",()=>l_,"ZodFunction",()=>l5,"ZodGUID",()=>sW,"ZodIPv4",()=>oa,"ZodIPv6",()=>ou,"ZodIntersection",()=>ll,"ZodJWT",()=>ow,"ZodKSUID",()=>oi,"ZodLazy",()=>l0,"ZodLiteral",()=>l$,"ZodMAC",()=>oo,"ZodMap",()=>lg,"ZodNaN",()=>lB,"ZodNanoID",()=>s4,"ZodNever",()=>oQ,"ZodNonOptional",()=>lZ,"ZodNull",()=>oJ,"ZodNullable",()=>lT,"ZodNumber",()=>oI,"ZodNumberFormat",()=>oC,"ZodObject",()=>o8,"ZodOptional",()=>lP,"ZodPipe",()=>lG,"ZodPrefault",()=>lD,"ZodPromise",()=>l2,"ZodReadonly",()=>lK,"ZodRecord",()=>lm,"ZodSet",()=>lv,"ZodString",()=>sM,"ZodStringFormat",()=>sF,"ZodSuccess",()=>lM,"ZodSymbol",()=>oV,"ZodTemplateLiteral",()=>lq,"ZodTransform",()=>lN,"ZodTuple",()=>ld,"ZodType",()=>sZ,"ZodULID",()=>s7,"ZodURL",()=>sq,"ZodUUID",()=>sJ,"ZodUndefined",()=>oW,"ZodUnion",()=>lr,"ZodUnknown",()=>oY,"ZodVoid",()=>o1,"ZodXID",()=>ot,"ZodXor",()=>ln,"_ZodString",()=>sR,"_default",()=>lU,"_function",()=>l6,"any",()=>oK,"array",()=>o3,"base64",()=>og,"base64url",()=>ov,"bigint",()=>oR,"boolean",()=>oA,"catch",()=>lV,"check",()=>l9,"cidrv4",()=>om,"cidrv6",()=>op,"codec",()=>lH,"cuid",()=>s3,"cuid2",()=>s8,"custom",()=>l8,"date",()=>o5,"describe",()=>ut,"discriminatedUnion",()=>lo,"e164",()=>ob,"email",()=>sB,"emoji",()=>s2,"enum",()=>lw,"file",()=>lS,"float32",()=>oz,"float64",()=>oO,"function",()=>l6,"guid",()=>sG,"hash",()=>oN,"hex",()=>oS,"hostname",()=>o_,"httpUrl",()=>s0,"instanceof",()=>ui,"int",()=>oT,"int32",()=>oE,"int64",()=>oL,"intersection",()=>lu,"ipv4",()=>os,"ipv6",()=>od,"json",()=>ua,"jwt",()=>ok,"keyof",()=>o9,"ksuid",()=>on,"lazy",()=>l1,"literal",()=>lj,"looseObject",()=>lt,"looseRecord",()=>lf,"mac",()=>ol,"map",()=>lx,"meta",()=>ur,"nan",()=>lW,"nanoid",()=>s5,"nativeEnum",()=>lk,"never",()=>o0,"nonoptional",()=>lR,"null",()=>oX,"nullable",()=>lz,"nullish",()=>lO,"number",()=>oP,"object",()=>o7,"optional",()=>lC,"partialRecord",()=>lp,"pipe",()=>lJ,"prefault",()=>lA,"preprocess",()=>us,"promise",()=>l4,"readonly",()=>lY,"record",()=>lh,"refine",()=>l7,"set",()=>ly,"strictObject",()=>le,"string",()=>sL,"stringFormat",()=>oj,"stringbool",()=>un,"success",()=>lL,"superRefine",()=>ue,"symbol",()=>oB,"templateLiteral",()=>lQ,"transform",()=>lI,"tuple",()=>lc,"uint32",()=>oU,"uint64",()=>oF,"ulid",()=>oe,"undefined",()=>oG,"union",()=>li,"unknown",()=>oq,"url",()=>sQ,"uuid",()=>sX,"uuidv4",()=>sH,"uuidv6",()=>sK,"uuidv7",()=>sY,"void",()=>o2,"xid",()=>or,"xor",()=>la],9782),e.i(53842),e.s(["$ZodAny",0,rD,"$ZodArray",0,rF,"$ZodBase64",0,rw,"$ZodBase64URL",0,r$,"$ZodBigInt",0,rT,"$ZodBigIntFormat",0,rz,"$ZodBoolean",0,rC,"$ZodCIDRv4",0,rv,"$ZodCIDRv6",0,ry,"$ZodCUID",0,rs,"$ZodCUID2",0,ro,"$ZodCatch",0,im,"$ZodCodec",0,ix,"$ZodCustom",0,iS,"$ZodCustomStringFormat",0,rN,"$ZodDate",0,rM,"$ZodDefault",0,is,"$ZodDiscriminatedUnion",0,rq,"$ZodE164",0,rj,"$ZodEmail",0,rr,"$ZodEmoji",0,rn,"$ZodEnum",0,r8,"$ZodFile",0,ie,"$ZodFunction",0,i$,"$ZodGUID",0,re,"$ZodIPv4",0,rf,"$ZodIPv6",0,rg,"$ZodISODate",0,rm,"$ZodISODateTime",0,rc,"$ZodISODuration",0,rp,"$ZodISOTime",0,rh,"$ZodIntersection",0,rQ,"$ZodJWT",0,rS,"$ZodKSUID",0,rd,"$ZodLazy",0,i_,"$ZodLiteral",0,r7,"$ZodMAC",0,rx,"$ZodMap",0,r5,"$ZodNaN",0,ih,"$ZodNanoID",0,ra,"$ZodNever",0,rZ,"$ZodNonOptional",0,iu,"$ZodNull",0,rU,"$ZodNullable",0,ia,"$ZodNumber",0,rI,"$ZodNumberFormat",0,rP,"$ZodObject",0,rG,"$ZodObjectJIT",0,rJ,"$ZodOptional",0,ii,"$ZodPipe",0,ip,"$ZodPrefault",0,il,"$ZodPromise",0,ij,"$ZodReadonly",0,ib,"$ZodRecord",0,r4,"$ZodSet",0,r3,"$ZodString",0,t8,"$ZodStringFormat",0,t7,"$ZodSuccess",0,ic,"$ZodSymbol",0,rO,"$ZodTemplateLiteral",0,ik,"$ZodTransform",0,it,"$ZodTuple",0,r1,"$ZodType",0,t9,"$ZodULID",0,rl,"$ZodURL",0,ri,"$ZodUUID",0,rt,"$ZodUndefined",0,rE,"$ZodUnion",0,rH,"$ZodUnknown",0,rA,"$ZodVoid",0,rR,"$ZodXID",0,ru,"$ZodXor",0,rY,"clone",()=>V,"isValidBase64",()=>rb,"isValidBase64URL",()=>rk,"isValidJWT",()=>r_],29747);var sh=e.i(71426),sh=sh,sp=e.i(99507),sp=sp;e.s([],98168),e.s(["ZodISODate",()=>sx,"ZodISODateTime",()=>sf,"ZodISODuration",()=>sw,"ZodISOTime",()=>sy,"date",()=>sv,"datetime",()=>sg,"duration",()=>sk,"time",()=>sb],95525);let sf=a("ZodISODateTime",(e,t)=>{rc.init(e,t),sF.init(e,t)});function sg(e){return ni(sf,e)}let sx=a("ZodISODate",(e,t)=>{rm.init(e,t),sF.init(e,t)});function sv(e){return nn(sx,e)}let sy=a("ZodISOTime",(e,t)=>{rh.init(e,t),sF.init(e,t)});function sb(e){return na(sy,e)}let sw=a("ZodISODuration",(e,t)=>{rp.init(e,t),sF.init(e,t)});function sk(e){return ns(sw,e)}let s$=(e,t)=>{ey.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ek(e,t)},flatten:{value:t=>ew(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,v,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,v,2)}},isEmpty:{get:()=>0===e.issues.length}})},sj=a("ZodError",s$),s_=a("ZodError",s$,{Parent:Error});e.s(["ZodError",0,sj,"ZodRealError",0,s_],1548);let sS=eS(s_),sN=eI(s_),sI=eC(s_),sP=ez(s_),sC=eE(s_),sT=eD(s_),sz=eZ(s_),sO=eM(s_),sE=eF(s_),sU=eB(s_),sD=eG(s_),sA=eX(s_);e.s(["decode",0,sT,"decodeAsync",0,sO,"encode",0,sC,"encodeAsync",0,sz,"parse",0,sS,"parseAsync",0,sN,"safeDecode",0,sU,"safeDecodeAsync",0,sA,"safeEncode",0,sE,"safeEncodeAsync",0,sD,"safeParse",0,sI,"safeParseAsync",0,sP],5583);let sZ=a("ZodType",(e,t)=>(t9.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:aO(e,"input"),output:aO(e,"output")}}),e.toJSONSchema=az(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(sp.mergeDefs(t,{checks:[...t.checks??[],...r.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,r)=>V(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>sS(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>sI(e,t,r),e.parseAsync=async(t,r)=>sN(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>sP(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>sC(e,t,r),e.decode=(t,r)=>sT(e,t,r),e.encodeAsync=async(t,r)=>sz(e,t,r),e.decodeAsync=async(t,r)=>sO(e,t,r),e.safeEncode=(t,r)=>sE(e,t,r),e.safeDecode=(t,r)=>sU(e,t,r),e.safeEncodeAsync=async(t,r)=>sD(e,t,r),e.safeDecodeAsync=async(t,r)=>sA(e,t,r),e.refine=(t,r)=>e.check(l7(t,r)),e.superRefine=t=>e.check(ak(t)),e.overwrite=t=>e.check(nQ(t)),e.optional=()=>lC(e),e.nullable=()=>lz(e),e.nullish=()=>lC(lz(e)),e.nonoptional=t=>lR(e,t),e.array=()=>o3(e),e.or=t=>li([e,t]),e.and=t=>lu(e,t),e.transform=t=>lJ(e,lI(t)),e.default=t=>lU(e,t),e.prefault=t=>lA(e,t),e.catch=t=>lV(e,t),e.pipe=t=>lJ(e,t),e.readonly=()=>lY(e),e.describe=t=>{let r=e.clone();return iM.add(r,{description:t}),r},Object.defineProperty(e,"description",{get:()=>iM.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return iM.get(e);let r=e.clone();return iM.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),sR=a("_ZodString",(e,t)=>{t8.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aU(e,t,r,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...t)=>e.check(nW(...t)),e.includes=(...t)=>e.check(nX(...t)),e.startsWith=(...t)=>e.check(nH(...t)),e.endsWith=(...t)=>e.check(nK(...t)),e.min=(...t)=>e.check(nV(...t)),e.max=(...t)=>e.check(nF(...t)),e.length=(...t)=>e.check(nB(...t)),e.nonempty=(...t)=>e.check(nV(1,...t)),e.lowercase=t=>e.check(nG(t)),e.uppercase=t=>e.check(nJ(t)),e.trim=()=>e.check(n1()),e.normalize=(...t)=>e.check(n0(...t)),e.toLowerCase=()=>e.check(n2()),e.toUpperCase=()=>e.check(n4()),e.slugify=()=>e.check(n5())}),sM=a("ZodString",(e,t)=>{t8.init(e,t),sR.init(e,t),e.email=t=>e.check(iV(sV,t)),e.url=t=>e.check(iH(sq,t)),e.jwt=t=>e.check(nt(ow,t)),e.emoji=t=>e.check(iK(s1,t)),e.guid=t=>e.check(iB(sW,t)),e.uuid=t=>e.check(iW(sJ,t)),e.uuidv4=t=>e.check(iG(sJ,t)),e.uuidv6=t=>e.check(iJ(sJ,t)),e.uuidv7=t=>e.check(iX(sJ,t)),e.nanoid=t=>e.check(iY(s4,t)),e.guid=t=>e.check(iB(sW,t)),e.cuid=t=>e.check(iq(s6,t)),e.cuid2=t=>e.check(iQ(s9,t)),e.ulid=t=>e.check(i0(s7,t)),e.base64=t=>e.check(i8(of,t)),e.base64url=t=>e.check(i7(ox,t)),e.xid=t=>e.check(i1(ot,t)),e.ksuid=t=>e.check(i2(oi,t)),e.ipv4=t=>e.check(i4(oa,t)),e.ipv6=t=>e.check(i5(ou,t)),e.cidrv4=t=>e.check(i3(oc,t)),e.cidrv6=t=>e.check(i9(oh,t)),e.e164=t=>e.check(ne(oy,t)),e.datetime=t=>e.check(sg(t)),e.date=t=>e.check(sv(t)),e.time=t=>e.check(sb(t)),e.duration=t=>e.check(sk(t))});function sL(e){return iL(sM,e)}let sF=a("ZodStringFormat",(e,t)=>{t7.init(e,t),sR.init(e,t)}),sV=a("ZodEmail",(e,t)=>{rr.init(e,t),sF.init(e,t)});function sB(e){return iV(sV,e)}let sW=a("ZodGUID",(e,t)=>{re.init(e,t),sF.init(e,t)});function sG(e){return iB(sW,e)}let sJ=a("ZodUUID",(e,t)=>{rt.init(e,t),sF.init(e,t)});function sX(e){return iW(sJ,e)}function sH(e){return iG(sJ,e)}function sK(e){return iJ(sJ,e)}function sY(e){return iX(sJ,e)}let sq=a("ZodURL",(e,t)=>{ri.init(e,t),sF.init(e,t)});function sQ(e){return iH(sq,e)}function s0(e){return iH(sq,{protocol:/^https?$/,hostname:sh.domain,...sp.normalizeParams(e)})}let s1=a("ZodEmoji",(e,t)=>{rn.init(e,t),sF.init(e,t)});function s2(e){return iK(s1,e)}let s4=a("ZodNanoID",(e,t)=>{ra.init(e,t),sF.init(e,t)});function s5(e){return iY(s4,e)}let s6=a("ZodCUID",(e,t)=>{rs.init(e,t),sF.init(e,t)});function s3(e){return iq(s6,e)}let s9=a("ZodCUID2",(e,t)=>{ro.init(e,t),sF.init(e,t)});function s8(e){return iQ(s9,e)}let s7=a("ZodULID",(e,t)=>{rl.init(e,t),sF.init(e,t)});function oe(e){return i0(s7,e)}let ot=a("ZodXID",(e,t)=>{ru.init(e,t),sF.init(e,t)});function or(e){return i1(ot,e)}let oi=a("ZodKSUID",(e,t)=>{rd.init(e,t),sF.init(e,t)});function on(e){return i2(oi,e)}let oa=a("ZodIPv4",(e,t)=>{rf.init(e,t),sF.init(e,t)});function os(e){return i4(oa,e)}let oo=a("ZodMAC",(e,t)=>{rx.init(e,t),sF.init(e,t)});function ol(e){return i6(oo,e)}let ou=a("ZodIPv6",(e,t)=>{rg.init(e,t),sF.init(e,t)});function od(e){return i5(ou,e)}let oc=a("ZodCIDRv4",(e,t)=>{rv.init(e,t),sF.init(e,t)});function om(e){return i3(oc,e)}let oh=a("ZodCIDRv6",(e,t)=>{ry.init(e,t),sF.init(e,t)});function op(e){return i9(oh,e)}let of=a("ZodBase64",(e,t)=>{rw.init(e,t),sF.init(e,t)});function og(e){return i8(of,e)}let ox=a("ZodBase64URL",(e,t)=>{r$.init(e,t),sF.init(e,t)});function ov(e){return i7(ox,e)}let oy=a("ZodE164",(e,t)=>{rj.init(e,t),sF.init(e,t)});function ob(e){return ne(oy,e)}let ow=a("ZodJWT",(e,t)=>{rS.init(e,t),sF.init(e,t)});function ok(e){return nt(ow,e)}let o$=a("ZodCustomStringFormat",(e,t)=>{rN.init(e,t),sF.init(e,t)});function oj(e,t,r={}){return aN(o$,e,t,r)}function o_(e){return aN(o$,"hostname",sh.hostname,e)}function oS(e){return aN(o$,"hex",sh.hex,e)}function oN(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=sh[i];if(!n)throw Error(`Unrecognized hash format: ${i}`);return aN(o$,i,n,t)}let oI=a("ZodNumber",(e,t)=>{rI.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aD(e,t,r,i),e.gt=(t,r)=>e.check(nz(t,r)),e.gte=(t,r)=>e.check(nO(t,r)),e.min=(t,r)=>e.check(nO(t,r)),e.lt=(t,r)=>e.check(nC(t,r)),e.lte=(t,r)=>e.check(nT(t,r)),e.max=(t,r)=>e.check(nT(t,r)),e.int=t=>e.check(oT(t)),e.safe=t=>e.check(oT(t)),e.positive=t=>e.check(nz(0,t)),e.nonnegative=t=>e.check(nO(0,t)),e.negative=t=>e.check(nC(0,t)),e.nonpositive=t=>e.check(nT(0,t)),e.multipleOf=(t,r)=>e.check(nZ(t,r)),e.step=(t,r)=>e.check(nZ(t,r)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function oP(e){return no(oI,e)}let oC=a("ZodNumberFormat",(e,t)=>{rP.init(e,t),oI.init(e,t)});function oT(e){return nu(oC,e)}function oz(e){return nd(oC,e)}function oO(e){return nc(oC,e)}function oE(e){return nm(oC,e)}function oU(e){return nh(oC,e)}let oD=a("ZodBoolean",(e,t)=>{rC.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aA(e,t,r,i)});function oA(e){return np(oD,e)}let oZ=a("ZodBigInt",(e,t)=>{rT.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aZ(e,t,r,i),e.gte=(t,r)=>e.check(nO(t,r)),e.min=(t,r)=>e.check(nO(t,r)),e.gt=(t,r)=>e.check(nz(t,r)),e.gte=(t,r)=>e.check(nO(t,r)),e.min=(t,r)=>e.check(nO(t,r)),e.lt=(t,r)=>e.check(nC(t,r)),e.lte=(t,r)=>e.check(nT(t,r)),e.max=(t,r)=>e.check(nT(t,r)),e.positive=t=>e.check(nz(BigInt(0),t)),e.negative=t=>e.check(nC(BigInt(0),t)),e.nonpositive=t=>e.check(nT(BigInt(0),t)),e.nonnegative=t=>e.check(nO(BigInt(0),t)),e.multipleOf=(t,r)=>e.check(nZ(t,r));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function oR(e){return ng(oZ,e)}let oM=a("ZodBigIntFormat",(e,t)=>{rz.init(e,t),oZ.init(e,t)});function oL(e){return nv(oM,e)}function oF(e){return ny(oM,e)}let oV=a("ZodSymbol",(e,t)=>{rO.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aR(e,t,r,i)});function oB(e){return nb(oV,e)}let oW=a("ZodUndefined",(e,t)=>{rE.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aL(e,t,r,i)});function oG(e){return nw(oW,e)}let oJ=a("ZodNull",(e,t)=>{rU.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aM(e,t,r,i)});function oX(e){return nk(oJ,e)}let oH=a("ZodAny",(e,t)=>{rD.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aB(e,t,r,i)});function oK(){return n$(oH)}let oY=a("ZodUnknown",(e,t)=>{rA.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aW(e,t,r,i)});function oq(){return nj(oY)}let oQ=a("ZodNever",(e,t)=>{rZ.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aV(e,t,r,i)});function o0(e){return n_(oQ,e)}let o1=a("ZodVoid",(e,t)=>{rR.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aF(e,t,r,i)});function o2(e){return nS(o1,e)}let o4=a("ZodDate",(e,t)=>{rM.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aG(e,t,r,i),e.min=(t,r)=>e.check(nO(t,r)),e.max=(t,r)=>e.check(nT(t,r));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function o5(e){return nN(o4,e)}let o6=a("ZodArray",(e,t)=>{rF.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a5(e,t,r,i),e.element=t.element,e.min=(t,r)=>e.check(nV(t,r)),e.nonempty=t=>e.check(nV(1,t)),e.max=(t,r)=>e.check(nF(t,r)),e.length=(t,r)=>e.check(nB(t,r)),e.unwrap=()=>e.element});function o3(e,t){return n6(o6,e,t)}function o9(e){return lw(Object.keys(e._zod.def.shape))}let o8=a("ZodObject",(e,t)=>{rJ.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a6(e,t,r,i),sp.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>lw(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:oq()}),e.loose=()=>e.clone({...e._zod.def,catchall:oq()}),e.strict=()=>e.clone({...e._zod.def,catchall:o0()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>sp.extend(e,t),e.safeExtend=t=>sp.safeExtend(e,t),e.merge=t=>sp.merge(e,t),e.pick=t=>sp.pick(e,t),e.omit=t=>sp.omit(e,t),e.partial=(...t)=>sp.partial(lP,e,t[0]),e.required=(...t)=>sp.required(lZ,e,t[0])});function o7(e,t){return new o8({type:"object",shape:e??{},...sp.normalizeParams(t)})}function le(e,t){return new o8({type:"object",shape:e,catchall:o0(),...sp.normalizeParams(t)})}function lt(e,t){return new o8({type:"object",shape:e,catchall:oq(),...sp.normalizeParams(t)})}let lr=a("ZodUnion",(e,t)=>{rH.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a3(e,t,r,i),e.options=t.options});function li(e,t){return new lr({type:"union",options:e,...sp.normalizeParams(t)})}let ln=a("ZodXor",(e,t)=>{lr.init(e,t),rY.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a3(e,t,r,i),e.options=t.options});function la(e,t){return new ln({type:"union",options:e,inclusive:!1,...sp.normalizeParams(t)})}let ls=a("ZodDiscriminatedUnion",(e,t)=>{lr.init(e,t),rq.init(e,t)});function lo(e,t,r){return new ls({type:"union",options:t,discriminator:e,...sp.normalizeParams(r)})}let ll=a("ZodIntersection",(e,t)=>{rQ.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a9(e,t,r,i)});function lu(e,t){return new ll({type:"intersection",left:e,right:t})}let ld=a("ZodTuple",(e,t)=>{r1.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a8(e,t,r,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function lc(e,t,r){let i=t instanceof t9,n=i?r:t;return new ld({type:"tuple",items:e,rest:i?t:null,...sp.normalizeParams(n)})}let lm=a("ZodRecord",(e,t)=>{r4.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a7(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function lh(e,t,r){return new lm({type:"record",keyType:e,valueType:t,...sp.normalizeParams(r)})}function lp(e,t,r){let i=V(e);return i._zod.values=void 0,new lm({type:"record",keyType:i,valueType:t,...sp.normalizeParams(r)})}function lf(e,t,r){return new lm({type:"record",keyType:e,valueType:t,mode:"loose",...sp.normalizeParams(r)})}let lg=a("ZodMap",(e,t)=>{r5.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a2(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function lx(e,t,r){return new lg({type:"map",keyType:e,valueType:t,...sp.normalizeParams(r)})}let lv=a("ZodSet",(e,t)=>{r3.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a4(e,t,r,i),e.min=(...t)=>e.check(nM(...t)),e.nonempty=t=>e.check(nM(1,t)),e.max=(...t)=>e.check(nR(...t)),e.size=(...t)=>e.check(nL(...t))});function ly(e,t){return new lv({type:"set",valueType:e,...sp.normalizeParams(t)})}let lb=a("ZodEnum",(e,t)=>{r8.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aJ(e,t,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let n={};for(let i of e)if(r.has(i))n[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new lb({...t,checks:[],...sp.normalizeParams(i),entries:n})},e.exclude=(e,i)=>{let n={...t.entries};for(let t of e)if(r.has(t))delete n[t];else throw Error(`Key ${t} not found in enum`);return new lb({...t,checks:[],...sp.normalizeParams(i),entries:n})}});function lw(e,t){return new lb({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...sp.normalizeParams(t)})}function lk(e,t){return new lb({type:"enum",entries:e,...sp.normalizeParams(t)})}let l$=a("ZodLiteral",(e,t)=>{r7.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aX(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function lj(e,t){return new l$({type:"literal",values:Array.isArray(e)?e:[e],...sp.normalizeParams(t)})}let l_=a("ZodFile",(e,t)=>{ie.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aY(e,t,r,i),e.min=(t,r)=>e.check(nM(t,r)),e.max=(t,r)=>e.check(nR(t,r)),e.mime=(t,r)=>e.check(nq(Array.isArray(t)?t:[t],r))});function lS(e){return ao(l_,e)}let lN=a("ZodTransform",(e,t)=>{it.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a1(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new l(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(sp.issue(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(sp.issue(i)))};let n=t.transform(r.value,r);return n instanceof Promise?n.then(e=>(r.value=e,r)):(r.value=n,r)}});function lI(e){return new lN({type:"transform",transform:e})}let lP=a("ZodOptional",(e,t)=>{ii.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>sl(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lC(e){return new lP({type:"optional",innerType:e})}let lT=a("ZodNullable",(e,t)=>{ia.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>se(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lz(e){return new lT({type:"nullable",innerType:e})}function lO(e){return lC(lz(e))}let lE=a("ZodDefault",(e,t)=>{is.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>sr(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lU(e,t){return new lE({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():sp.shallowClone(t)}})}let lD=a("ZodPrefault",(e,t)=>{il.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>si(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lA(e,t){return new lD({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():sp.shallowClone(t)}})}let lZ=a("ZodNonOptional",(e,t)=>{iu.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>st(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lR(e,t){return new lZ({type:"nonoptional",innerType:e,...sp.normalizeParams(t)})}let lM=a("ZodSuccess",(e,t)=>{ic.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aq(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lL(e){return new lM({type:"success",innerType:e})}let lF=a("ZodCatch",(e,t)=>{im.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>sn(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function lV(e,t){return new lF({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}let lB=a("ZodNaN",(e,t)=>{ih.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aH(e,t,r,i)});function lW(e){return nP(lB,e)}let lG=a("ZodPipe",(e,t)=>{ip.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>sa(e,t,r,i),e.in=t.in,e.out=t.out});function lJ(e,t){return new lG({type:"pipe",in:e,out:t})}let lX=a("ZodCodec",(e,t)=>{lG.init(e,t),ix.init(e,t)});function lH(e,t,r){return new lX({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}let lK=a("ZodReadonly",(e,t)=>{ib.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ss(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function lY(e){return new lK({type:"readonly",innerType:e})}let lq=a("ZodTemplateLiteral",(e,t)=>{ik.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aK(e,t,r,i)});function lQ(e,t){return new lq({type:"template_literal",parts:e,...sp.normalizeParams(t)})}let l0=a("ZodLazy",(e,t)=>{i_.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>su(e,t,r,i),e.unwrap=()=>e._zod.def.getter()});function l1(e){return new l0({type:"lazy",getter:e})}let l2=a("ZodPromise",(e,t)=>{ij.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>so(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function l4(e){return new l2({type:"promise",innerType:e})}let l5=a("ZodFunction",(e,t)=>{i$.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>a0(e,t,r,i)});function l6(e){return new l5({type:"function",input:Array.isArray(e?.input)?lc(e?.input):e?.input??o3(oq()),output:e?.output??oq()})}let l3=a("ZodCustom",(e,t)=>{iS.init(e,t),sZ.init(e,t),e._zod.processJSONSchema=(t,r,i)=>aQ(e,t,r,i)});function l9(e){let t=new tU({check:"custom"});return t._zod.check=e,t}function l8(e,t){return ab(l3,e??(()=>!0),t)}function l7(e,t={}){return aw(l3,e,t)}function ue(e){return ak(e)}let ut=aj,ur=a_;function ui(e,t={error:`Input not instance of ${e.name}`}){let r=new l3({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...sp.normalizeParams(t)});return r._zod.bag.Class=e,r}let un=(...e)=>aS({Codec:lX,Boolean:oD,String:sM},...e);function ua(e){let t=l1(()=>li([sL(e),oP(),oA(),oX(),o3(t),lh(sL(),t)]));return t}function us(e,t){return lJ(lI(e),t)}let uo={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",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ul(e){d({customError:e})}function uu(){return d().customError}r||(r={}),e.s(["ZodFirstPartyTypeKind",()=>r,"ZodIssueCode",0,uo,"getErrorMap",()=>uu,"setErrorMap",()=>ul],87190),e.i(98168),e.s(["endsWith",()=>nK,"gt",()=>nz,"gte",()=>nO,"includes",()=>nX,"length",()=>nB,"lowercase",()=>nG,"lt",()=>nC,"lte",()=>nT,"maxLength",()=>nF,"maxSize",()=>nR,"mime",()=>nq,"minLength",()=>nV,"minSize",()=>nM,"multipleOf",()=>nZ,"negative",()=>nU,"nonnegative",()=>nA,"nonpositive",()=>nD,"normalize",()=>n0,"overwrite",()=>nQ,"positive",()=>nE,"property",()=>nY,"regex",()=>nW,"size",()=>nL,"slugify",()=>n5,"startsWith",()=>nH,"toLowerCase",()=>n2,"toUpperCase",()=>n4,"trim",()=>n1,"uppercase",()=>nJ],13774);var ud=e.i(13774),uc=e.i(95525);let um={...e.i(9782),...ud,iso:uc};function uh(e,t){var r;let i;if("boolean"==typeof e)return e?um.any():um.never();let n={version:(r=t?.defaultTarget,"https://json-schema.org/draft/2020-12/schema"===(i=e.$schema)?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===i?"draft-7":"http://json-schema.org/draft-04/schema#"===i?"draft-4":r??"draft-2020-12"),defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e};return function e(t,r){if("boolean"==typeof t)return t?um.any():um.never();let i=function t(r,i){let n;if(void 0!==r.not){if("object"==typeof r.not&&0===Object.keys(r.not).length)return um.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==r.unevaluatedItems)throw Error("unevaluatedItems is not supported");if(void 0!==r.unevaluatedProperties)throw Error("unevaluatedProperties is not supported");if(void 0!==r.if||void 0!==r.then||void 0!==r.else)throw Error("Conditional schemas (if/then/else) are not supported");if(void 0!==r.dependentSchemas||void 0!==r.dependentRequired)throw Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let t=r.$ref;if(i.refs.has(t))return i.refs.get(t);if(i.processing.has(t))return um.lazy(()=>{if(!i.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return i.refs.get(t)});i.processing.add(t);let n=e(function(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(0===r.length)return t.rootSchema;let i="draft-2020-12"===t.version?"$defs":"definitions";if(r[0]===i){let i=r[1];if(!i||!t.defs[i])throw Error(`Reference not found: ${e}`);return t.defs[i]}throw Error(`Reference not found: ${e}`)}(t,i),i);return i.refs.set(t,n),i.processing.delete(t),n}if(void 0!==r.enum){let e=r.enum;if("openapi-3.0"===i.version&&!0===r.nullable&&1===e.length&&null===e[0])return um.null();if(0===e.length)return um.never();if(1===e.length)return um.literal(e[0]);if(e.every(e=>"string"==typeof e))return um.enum(e);let t=e.map(e=>um.literal(e));return t.length<2?t[0]:um.union([t[0],t[1],...t.slice(2)])}if(void 0!==r.const)return um.literal(r.const);let a=r.type;if(Array.isArray(a)){let e=a.map(e=>t({...r,type:e},i));return 0===e.length?um.never():1===e.length?e[0]:um.union(e)}if(!a)return um.any();switch(a){case"string":{let e=um.string();if(r.format){let t=r.format;"email"===t?e=e.check(um.email()):"uri"===t||"uri-reference"===t?e=e.check(um.url()):"uuid"===t||"guid"===t?e=e.check(um.uuid()):"date-time"===t?e=e.check(um.iso.datetime()):"date"===t?e=e.check(um.iso.date()):"time"===t?e=e.check(um.iso.time()):"duration"===t?e=e.check(um.iso.duration()):"ipv4"===t?e=e.check(um.ipv4()):"ipv6"===t?e=e.check(um.ipv6()):"mac"===t?e=e.check(um.mac()):"cidr"===t?e=e.check(um.cidrv4()):"cidr-v6"===t?e=e.check(um.cidrv6()):"base64"===t?e=e.check(um.base64()):"base64url"===t?e=e.check(um.base64url()):"e164"===t?e=e.check(um.e164()):"jwt"===t?e=e.check(um.jwt()):"emoji"===t?e=e.check(um.emoji()):"nanoid"===t?e=e.check(um.nanoid()):"cuid"===t?e=e.check(um.cuid()):"cuid2"===t?e=e.check(um.cuid2()):"ulid"===t?e=e.check(um.ulid()):"xid"===t?e=e.check(um.xid()):"ksuid"===t&&(e=e.check(um.ksuid()))}"number"==typeof r.minLength&&(e=e.min(r.minLength)),"number"==typeof r.maxLength&&(e=e.max(r.maxLength)),r.pattern&&(e=e.regex(new RegExp(r.pattern))),n=e;break}case"number":case"integer":{let e="integer"===a?um.number().int():um.number();"number"==typeof r.minimum&&(e=e.min(r.minimum)),"number"==typeof r.maximum&&(e=e.max(r.maximum)),"number"==typeof r.exclusiveMinimum?e=e.gt(r.exclusiveMinimum):!0===r.exclusiveMinimum&&"number"==typeof r.minimum&&(e=e.gt(r.minimum)),"number"==typeof r.exclusiveMaximum?e=e.lt(r.exclusiveMaximum):!0===r.exclusiveMaximum&&"number"==typeof r.maximum&&(e=e.lt(r.maximum)),"number"==typeof r.multipleOf&&(e=e.multipleOf(r.multipleOf)),n=e;break}case"boolean":n=um.boolean();break;case"null":n=um.null();break;case"object":{let t={},a=r.properties||{},s=new Set(r.required||[]);for(let[r,n]of Object.entries(a)){let a=e(n,i);t[r]=s.has(r)?a:a.optional()}if(r.propertyNames){let a=e(r.propertyNames,i),s=r.additionalProperties&&"object"==typeof r.additionalProperties?e(r.additionalProperties,i):um.any();if(0===Object.keys(t).length){n=um.record(a,s);break}let o=um.object(t).passthrough(),l=um.looseRecord(a,s);n=um.intersection(o,l);break}if(r.patternProperties){let a=r.patternProperties,s=Object.keys(a),o=[];for(let t of s){let r=e(a[t],i),n=um.string().regex(new RegExp(t));o.push(um.looseRecord(n,r))}let l=[];if(Object.keys(t).length>0&&l.push(um.object(t).passthrough()),l.push(...o),0===l.length)n=um.object({}).passthrough();else if(1===l.length)n=l[0];else{let e=um.intersection(l[0],l[1]);for(let t=2;t<l.length;t++)e=um.intersection(e,l[t]);n=e}break}let o=um.object(t);n=!1===r.additionalProperties?o.strict():"object"==typeof r.additionalProperties?o.catchall(e(r.additionalProperties,i)):o.passthrough();break}case"array":{let t=r.prefixItems,a=r.items;if(t&&Array.isArray(t)){let s=t.map(t=>e(t,i)),o=a&&"object"==typeof a&&!Array.isArray(a)?e(a,i):void 0;n=o?um.tuple(s).rest(o):um.tuple(s),"number"==typeof r.minItems&&(n=n.check(um.minLength(r.minItems))),"number"==typeof r.maxItems&&(n=n.check(um.maxLength(r.maxItems)))}else if(Array.isArray(a)){let t=a.map(t=>e(t,i)),s=r.additionalItems&&"object"==typeof r.additionalItems?e(r.additionalItems,i):void 0;n=s?um.tuple(t).rest(s):um.tuple(t),"number"==typeof r.minItems&&(n=n.check(um.minLength(r.minItems))),"number"==typeof r.maxItems&&(n=n.check(um.maxLength(r.maxItems)))}else if(void 0!==a){let t=e(a,i),s=um.array(t);"number"==typeof r.minItems&&(s=s.min(r.minItems)),"number"==typeof r.maxItems&&(s=s.max(r.maxItems)),n=s}else n=um.array(um.any());break}default:throw Error(`Unsupported type: ${a}`)}return r.description&&(n=n.describe(r.description)),void 0!==r.default&&(n=n.default(r.default)),n}(t,r),n=t.type||void 0!==t.enum||void 0!==t.const;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(t=>e(t,r)),s=um.union(a);i=n?um.intersection(i,s):s}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(t=>e(t,r)),s=um.xor(a);i=n?um.intersection(i,s):s}if(t.allOf&&Array.isArray(t.allOf))if(0===t.allOf.length)i=n?i:um.any();else{let a=n?i:e(t.allOf[0],r),s=+!n;for(let i=s;i<t.allOf.length;i++)a=um.intersection(a,e(t.allOf[i],r));i=a}return!0===t.nullable&&"openapi-3.0"===r.version&&(i=um.nullable(i)),!0===t.readOnly&&(i=um.readonly(i)),i}(e,n)}function up(e){return iF(sM,e)}function uf(e){return nl(oI,e)}function ug(e){return nf(oD,e)}function ux(e){return nx(oZ,e)}function uv(e){return nI(o4,e)}e.s(["bigint",()=>ux,"boolean",()=>ug,"date",()=>uv,"number",()=>uf,"string",()=>up],44916),d(iP()),e.s([],98502),e.i(98502),e.i(41777),e.i(22372),e.i(13475),e.i(64136),e.i(29747),e.i(83624),e.i(3761);var uy=sp,ub=sh;e.i(62986),e.s(["ar",0,function(){let e,t;return{localeError:(e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}},t={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:"مدخل"},r=>{switch(r.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${r.expected}، ولكن تم إدخال ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`مدخلات غير مقبولة: يفترض إدخال ${G(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()} ${i.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()} ${i.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if("ends_with"===r.format)return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if("includes"===r.format)return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if("regex"===r.format)return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${t[r.format]??r.format} غير مقبول`;case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${x(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`}})}},"az",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Yanlış dəyər: g\xf6zlənilən ${r.expected}, daxil olan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Yanlış dəyər: g\xf6zlənilən ${G(r.values[0])}`;return`Yanlış se\xe7im: aşağıdakılardan biri olmalıdır: ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()} ${i.unit??"element"}`;return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()} ${i.unit}`;return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if("ends_with"===r.format)return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if("includes"===r.format)return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if("regex"===r.format)return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${t[r.format]??r.format}`;case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə b\xf6l\xfcnə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan a\xe7ar${r.keys.length>1?"lar":""}: ${x(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış a\xe7ar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}})}},"be",0,function(){let e,t;return{localeError:(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:"мець"}},t={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:"увод"},r=>{switch(r.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${r.expected}, атрымана ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":if(Array.isArray(e))return"масіў";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Няправільны ўвод: чакалася ${G(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i){let e=iI(Number(r.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${i.verb} ${t}${r.maximum.toString()} ${e}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i){let e=iI(Number(r.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${i.verb} ${t}${r.minimum.toString()} ${e}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if("ends_with"===r.format)return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if("includes"===r.format)return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if("regex"===r.format)return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${t[r.format]??r.format}`;case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${x(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`;default:return`Няправільны ўвод`}})}},"bg",0,function(){let e,t;return{localeError:(e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}},t={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:"вход"},r=>{switch(r.code){case"invalid_type":return`Невалиден вход: очакван ${r.expected}, получен ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Невалиден вход: очакван ${G(r.values[0])}`;return`Невалидна опция: очаквано едно от ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${t}${r.maximum.toString()} ${i.unit??"елемента"}`;return`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Твърде малко: очаква се ${r.origin} да съдържа ${t}${r.minimum.toString()} ${i.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${t}${r.minimum.toString()}`}case"invalid_format":{if("starts_with"===r.format)return`Невалиден низ: трябва да започва с "${r.prefix}"`;if("ends_with"===r.format)return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if("includes"===r.format)return`Невалиден низ: трябва да включва "${r.includes}"`;if("regex"===r.format)return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let e="Невалиден";return"emoji"===r.format&&(e="Невалидно"),"datetime"===r.format&&(e="Невалидно"),"date"===r.format&&(e="Невалидна"),"time"===r.format&&(e="Невалидно"),"duration"===r.format&&(e="Невалидна"),`${e} ${t[r.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`;default:return`Невалиден вход`}})}},"ca",0,function(){let e,t;return{localeError:(e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Tipus inv\xe0lid: s'esperava ${r.expected}, s'ha rebut ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Valor inv\xe0lid: s'esperava ${G(r.values[0])}`;return`Opci\xf3 inv\xe0lida: s'esperava una de ${x(r.values," o ")}`;case"too_big":{let t=r.inclusive?"com a màxim":"menys de",i=e[r.origin]??null;if(i)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xe9s ${t} ${r.maximum.toString()} ${i.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"com a mínim":"més de",i=e[r.origin]??null;if(i)return`Massa petit: s'esperava que ${r.origin} contingu\xe9s ${t} ${r.minimum.toString()} ${i.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Format inv\xe0lid: ha de comen\xe7ar amb "${r.prefix}"`;if("ends_with"===r.format)return`Format inv\xe0lid: ha d'acabar amb "${r.suffix}"`;if("includes"===r.format)return`Format inv\xe0lid: ha d'incloure "${r.includes}"`;if("regex"===r.format)return`Format inv\xe0lid: ha de coincidir amb el patr\xf3 ${r.pattern}`;return`Format inv\xe0lid per a ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe0lid: ha de ser m\xfaltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Clau inv\xe0lida a ${r.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element inv\xe0lid a ${r.origin}`;default:return`Entrada inv\xe0lida`}})}},"cs",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Neplatn\xfd vstup: oček\xe1v\xe1no ${r.expected}, obdrženo ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"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(e))return"pole";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neplatn\xfd vstup: oček\xe1v\xe1no ${G(r.values[0])}`;return`Neplatn\xe1 možnost: oček\xe1v\xe1na jedna z hodnot ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.maximum.toString()} ${i.unit??"prvků"}`;return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.minimum.toString()} ${i.unit??"prvků"}`;return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neplatn\xfd řetězec: mus\xed zač\xednat na "${r.prefix}"`;if("ends_with"===r.format)return`Neplatn\xfd řetězec: mus\xed končit na "${r.suffix}"`;if("includes"===r.format)return`Neplatn\xfd řetězec: mus\xed obsahovat "${r.includes}"`;if("regex"===r.format)return`Neplatn\xfd řetězec: mus\xed odpov\xeddat vzoru ${r.pattern}`;return`Neplatn\xfd form\xe1t ${t[r.format]??r.format}`;case"not_multiple_of":return`Neplatn\xe9 č\xedslo: mus\xed b\xfdt n\xe1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xe1m\xe9 kl\xedče: ${x(r.keys,", ")}`;case"invalid_key":return`Neplatn\xfd kl\xedč v ${r.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatn\xe1 hodnota v ${r.origin}`;default:return`Neplatn\xfd vstup`}})}},"da",0,function(){let e,t,r;return{localeError:(e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"},r={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"},i=>{var n,a,s,o;switch(i.code){case"invalid_type":return`Ugyldigt input: forventede ${t[n=i.expected]??n}, fik ${t[a=(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tal";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name;return"objekt"}return t})(i.input)]??a}`;case"invalid_value":if(1===i.values.length)return`Ugyldig v\xe6rdi: forventede ${G(i.values[0])}`;return`Ugyldigt valg: forventede en af f\xf8lgende ${x(i.values,"|")}`;case"too_big":{let r=i.inclusive?"<=":"<",n=e[i.origin]??null,a=t[s=i.origin]??s;if(n)return`For stor: forventede ${a??"value"} ${n.verb} ${r} ${i.maximum.toString()} ${n.unit??"elementer"}`;return`For stor: forventede ${a??"value"} havde ${r} ${i.maximum.toString()}`}case"too_small":{let r=i.inclusive?">=":">",n=e[i.origin]??null,a=t[o=i.origin]??o;if(n)return`For lille: forventede ${a} ${n.verb} ${r} ${i.minimum.toString()} ${n.unit}`;return`For lille: forventede ${a} havde ${r} ${i.minimum.toString()}`}case"invalid_format":if("starts_with"===i.format)return`Ugyldig streng: skal starte med "${i.prefix}"`;if("ends_with"===i.format)return`Ugyldig streng: skal ende med "${i.suffix}"`;if("includes"===i.format)return`Ugyldig streng: skal indeholde "${i.includes}"`;if("regex"===i.format)return`Ugyldig streng: skal matche m\xf8nsteret ${i.pattern}`;return`Ugyldig ${r[i.format]??i.format}`;case"not_multiple_of":return`Ugyldigt tal: skal v\xe6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${x(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xe6rdi i ${i.origin}`;default:return"Ugyldigt input"}})}},"de",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Ung\xfcltige Eingabe: erwartet ${r.expected}, erhalten ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":if(Array.isArray(e))return"Array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ung\xfcltige Eingabe: erwartet ${G(r.values[0])}`;return`Ung\xfcltige Option: erwartet eine von ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ${i.unit??"Elemente"} hat`;return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ist`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ${i.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ist`}case"invalid_format":if("starts_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.suffix}" enden`;if("includes"===r.format)return`Ung\xfcltiger String: muss "${r.includes}" enthalten`;if("regex"===r.format)return`Ung\xfcltiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ung\xfcltig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ung\xfcltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${x(r.keys,", ")}`;case"invalid_key":return`Ung\xfcltiger Schl\xfcssel in ${r.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ung\xfcltiger Wert in ${r.origin}`;default:return`Ung\xfcltige Eingabe`}})}},"en",0,iP,"eo",0,function(){let e,t;return{localeError:(e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${r.expected}, riceviĝis ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":if(Array.isArray(e))return"tabelo";if(null===e)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nevalida enigo: atendiĝis ${G(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()} ${i.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${t}${r.minimum.toString()} ${i.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if("ends_with"===r.format)return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if("includes"===r.format)return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if("regex"===r.format)return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${t[r.format]??r.format}`;case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`}})}},"es",0,function(){return{localeError:(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"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(e){return t[e]??e}let 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 t=>{switch(t.code){case"invalid_type":return`Entrada inv\xe1lida: se esperaba ${r(t.expected)}, recibido ${r((e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name;return"object"}return t})(t.input))}`;case"invalid_value":if(1===t.values.length)return`Entrada inv\xe1lida: se esperaba ${G(t.values[0])}`;return`Opci\xf3n inv\xe1lida: se esperaba una de ${x(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",n=e[t.origin]??null,a=r(t.origin);if(n)return`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${t.maximum.toString()} ${n.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",n=e[t.origin]??null,a=r(t.origin);if(n)return`Demasiado peque\xf1o: se esperaba que ${a} tuviera ${i}${t.minimum.toString()} ${n.unit}`;return`Demasiado peque\xf1o: se esperaba que ${a} fuera ${i}${t.minimum.toString()}`}case"invalid_format":if("starts_with"===t.format)return`Cadena inv\xe1lida: debe comenzar con "${t.prefix}"`;if("ends_with"===t.format)return`Cadena inv\xe1lida: debe terminar en "${t.suffix}"`;if("includes"===t.format)return`Cadena inv\xe1lida: debe incluir "${t.includes}"`;if("regex"===t.format)return`Cadena inv\xe1lida: debe coincidir con el patr\xf3n ${t.pattern}`;return`Inv\xe1lido ${i[t.format]??t.format}`;case"not_multiple_of":return`N\xfamero inv\xe1lido: debe ser m\xfaltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${x(t.keys,", ")}`;case"invalid_key":return`Llave inv\xe1lida en ${r(t.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido en ${r(t.origin)}`;default:return`Entrada inv\xe1lida`}}})()}},"fa",0,function(){let e,t;return{localeError:(e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}},t={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:"ورودی"},r=>{switch(r.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${r.expected} می‌بود، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"آرایه";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} دریافت شد`;case"invalid_value":if(1===r.values.length)return`ورودی نامعتبر: می‌بایست ${G(r.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${x(r.values,"|")} می‌بود`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} ${i.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} باشد`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} ${i.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} باشد`}case"invalid_format":if("starts_with"===r.format)return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if("ends_with"===r.format)return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if("includes"===r.format)return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if("regex"===r.format)return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${t[r.format]??r.format} نامعتبر`;case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${x(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":default:return`ورودی نامعتبر`;case"invalid_element":return`مقدار نامعتبر در ${r.origin}`}})}},"fi",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Virheellinen sy\xf6te: t\xe4ytyy olla ${G(r.values[0])}`;return`Virheellinen valinta: t\xe4ytyy olla yksi seuraavista: ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Liian suuri: ${i.subject} t\xe4ytyy olla ${t}${r.maximum.toString()} ${i.unit}`.trim();return`Liian suuri: arvon t\xe4ytyy olla ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Liian pieni: ${i.subject} t\xe4ytyy olla ${t}${r.minimum.toString()} ${i.unit}`.trim();return`Liian pieni: arvon t\xe4ytyy olla ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy alkaa "${r.prefix}"`;if("ends_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy loppua "${r.suffix}"`;if("includes"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy sis\xe4lt\xe4\xe4 "${r.includes}"`;if("regex"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy vastata s\xe4\xe4nn\xf6llist\xe4 lauseketta ${r.pattern}`;return`Virheellinen ${t[r.format]??r.format}`;case"not_multiple_of":return`Virheellinen luku: t\xe4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${x(r.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\xf6te`}})}},"fr",0,function(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : ${r.expected} attendu, ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":if(Array.isArray(e))return"tableau";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} re\xe7u`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : ${G(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${x(r.values,"|")} attendue`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Trop grand : ${r.origin??"valeur"} doit ${i.verb} ${t}${r.maximum.toString()} ${i.unit??"élément(s)"}`;return`Trop grand : ${r.origin??"valeur"} doit \xeatre ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Trop petit : ${r.origin} doit ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`Trop petit : ${r.origin} doit \xeatre ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au mod\xe8le ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${x(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return`Entr\xe9e invalide`}})}},"frCA",0,function(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : attendu ${r.expected}, re\xe7u ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : attendu ${G(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"≤":"<",i=e[r.origin]??null;if(i)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${t}${r.maximum.toString()} ${i.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"≥":">",i=e[r.origin]??null;if(i)return`Trop petit : attendu que ${r.origin} ait ${t}${r.minimum.toString()} ${i.unit}`;return`Trop petit : attendu que ${r.origin} soit ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au motif ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${x(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return`Entr\xe9e invalide`}})}},"he",0,function(){let e,t,r,i,n,a,s,o;return{localeError:(e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=t=>t?e[t]:void 0,i=t=>{let i=r(t);return i?i.label:t??e.unknown.label},n=e=>`ה${i(e)}`,a=e=>{let t=r(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},s=e=>e?t[e]??null:null,o={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},t=>{switch(t.code){case"invalid_type":{let r=i(t.expected),n=(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name;return"object";default:return t}})(t.input),a=e[n]?.label??n;return`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${G(t.values[0])}`;let e=t.values.map(e=>G(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let r=e[e.length-1],i=e.slice(0,-1).join(", ");return`ערך לא תקין: האפשרויות המתאימות הן ${i} או ${r}`}case"too_big":{let e=s(t.origin),r=n(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${r} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){let e=t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`;return`גדול מדי: ${r} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let i="set"===t.origin?"צריכה":"צריך",n=t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`;return`גדול מדי: ${r} ${i} להכיל ${n}`.trim()}let i=t.inclusive?"<=":"<",o=a(t.origin??"value");if(e?.unit)return`${e.longLabel} מדי: ${r} ${o} ${i}${t.maximum.toString()} ${e.unit}`;return`${e?.longLabel??"גדול"} מדי: ${r} ${o} ${i}${t.maximum.toString()}`}case"too_small":{let e=s(t.origin),r=n(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${r} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){let e=t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`;return`קטן מדי: ${r} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let i="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){let e=(t.origin,"לפחות פריט אחד");return`קטן מדי: ${r} ${i} להכיל ${e}`}let n=t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`;return`קטן מדי: ${r} ${i} להכיל ${n}`.trim()}let i=t.inclusive?">=":">",o=a(t.origin??"value");if(e?.unit)return`${e.shortLabel} מדי: ${r} ${o} ${i}${t.minimum.toString()} ${e.unit}`;return`${e?.shortLabel??"קטן"} מדי: ${r} ${o} ${i}${t.minimum.toString()}`}case"invalid_format":{if("starts_with"===t.format)return`המחרוזת חייבת להתחיל ב "${t.prefix}"`;if("ends_with"===t.format)return`המחרוזת חייבת להסתיים ב "${t.suffix}"`;if("includes"===t.format)return`המחרוזת חייבת לכלול "${t.includes}"`;if("regex"===t.format)return`המחרוזת חייבת להתאים לתבנית ${t.pattern}`;let e=o[t.format],r=e?.label??t.format,i=e?.gender??"m";return`${r} לא ${"f"===i?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${x(t.keys,", ")}`;case"invalid_key":return`שדה לא תקין באובייקט`;case"invalid_union":return"קלט לא תקין";case"invalid_element":{let e=n(t.origin??"array");return`ערך לא תקין ב${e}`}default:return`קלט לא תקין`}})}},"hu",0,function(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}},t={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"},r=>{switch(r.code){case"invalid_type":return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${r.expected}, a kapott \xe9rt\xe9k ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":if(Array.isArray(e))return"tömb";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${G(r.values[0])}`;return`\xc9rv\xe9nytelen opci\xf3: valamelyik \xe9rt\xe9k v\xe1rt ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`T\xfal nagy: ${r.origin??"érték"} m\xe9rete t\xfal nagy ${t}${r.maximum.toString()} ${i.unit??"elem"}`;return`T\xfal nagy: a bemeneti \xe9rt\xe9k ${r.origin??"érték"} t\xfal nagy: ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} m\xe9rete t\xfal kicsi ${t}${r.minimum.toString()} ${i.unit}`;return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} t\xfal kicsi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.prefix}" \xe9rt\xe9kkel kell kezdődnie`;if("ends_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.suffix}" \xe9rt\xe9kkel kell v\xe9gződnie`;if("includes"===r.format)return`\xc9rv\xe9nytelen string: "${r.includes}" \xe9rt\xe9ket kell tartalmaznia`;if("regex"===r.format)return`\xc9rv\xe9nytelen string: ${r.pattern} mint\xe1nak kell megfelelnie`;return`\xc9rv\xe9nytelen ${t[r.format]??r.format}`;case"not_multiple_of":return`\xc9rv\xe9nytelen sz\xe1m: ${r.divisor} t\xf6bbsz\xf6r\xf6s\xe9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`\xc9rv\xe9nytelen kulcs ${r.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`\xc9rv\xe9nytelen \xe9rt\xe9k: ${r.origin}`;default:return`\xc9rv\xe9nytelen bemenet`}})}},"id",0,function(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak valid: diharapkan ${G(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${t}${r.maximum.toString()} ${i.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${t}${r.minimum.toString()} ${i.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak valid: harus menyertakan "${r.includes}"`;if("regex"===r.format)return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${t[r.format]??r.format} tidak valid`;case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`}})}},"is",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Rangt gildi: \xde\xfa sl\xf3st inn ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":if(Array.isArray(e))return"fylki";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} \xfear sem \xe1 a\xf0 vera ${r.expected}`;case"invalid_value":if(1===r.values.length)return`Rangt gildi: gert r\xe1\xf0 fyrir ${G(r.values[0])}`;return`\xd3gilt val: m\xe1 vera eitt af eftirfarandi ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} hafi ${t}${r.maximum.toString()} ${i.unit??"hluti"}`;return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} s\xe9 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} hafi ${t}${r.minimum.toString()} ${i.unit}`;return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} s\xe9 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 byrja \xe1 "${r.prefix}"`;if("ends_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 enda \xe1 "${r.suffix}"`;if("includes"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 innihalda "${r.includes}"`;if("regex"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 fylgja mynstri ${r.pattern}`;return`Rangt ${t[r.format]??r.format}`;case"not_multiple_of":return`R\xf6ng tala: ver\xf0ur a\xf0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xd3\xfeekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${x(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xed ${r.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi \xed ${r.origin}`}})}},"it",0,function(){let e,t;return{localeError:(e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":if(Array.isArray(e))return"vettore";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input non valido: atteso ${G(r.values[0])}`;return`Opzione non valida: atteso uno tra ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Troppo grande: ${r.origin??"valore"} deve avere ${t}${r.maximum.toString()} ${i.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Troppo piccolo: ${r.origin} deve avere ${t}${r.minimum.toString()} ${i.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Stringa non valida: deve iniziare con "${r.prefix}"`;if("ends_with"===r.format)return`Stringa non valida: deve terminare con "${r.suffix}"`;if("includes"===r.format)return`Stringa non valida: deve includere "${r.includes}"`;if("regex"===r.format)return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${x(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`}})}},"ja",0,function(){let e,t;return{localeError:(e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}},t={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:"入力値"},r=>{switch(r.code){case"invalid_type":return`無効な入力: ${r.expected}が期待されましたが、${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":if(Array.isArray(e))return"配列";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}が入力されました`;case"invalid_value":if(1===r.values.length)return`無効な入力: ${G(r.values[0])}が期待されました`;return`無効な選択: ${x(r.values,"、")}のいずれかである必要があります`;case"too_big":{let t=r.inclusive?"以下である":"より小さい",i=e[r.origin]??null;if(i)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${i.unit??"要素"}${t}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${t}必要があります`}case"too_small":{let t=r.inclusive?"以上である":"より大きい",i=e[r.origin]??null;if(i)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${i.unit}${t}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${t}必要があります`}case"invalid_format":if("starts_with"===r.format)return`無効な文字列: "${r.prefix}"で始まる必要があります`;if("ends_with"===r.format)return`無効な文字列: "${r.suffix}"で終わる必要があります`;if("includes"===r.format)return`無効な文字列: "${r.includes}"を含む必要があります`;if("regex"===r.format)return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${t[r.format]??r.format}`;case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${x(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`;default:return`無効な入力`}})}},"ka",0,function(){let e,t;return{localeError:(e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}},t={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:"შეყვანა"},r=>{switch(r.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${r.expected}, მიღებული ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":if(Array.isArray(e))return"მასივი";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return({string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"})[t]??t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`არასწორი შეყვანა: მოსალოდნელი ${G(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${x(r.values,"|")}-დან`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${i.verb} ${t}${r.maximum.toString()} ${i.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით`;if("ends_with"===r.format)return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით`;if("includes"===r.format)return`არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს`;if("regex"===r.format)return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`;return`არასწორი ${t[r.format]??r.format}`;case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${x(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return`არასწორი შეყვანა`}})}},"kh",0,function(){return iC()},"km",0,iC,"ko",0,function(){let e,t;return{localeError:(e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}},t={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:"입력"},r=>{switch(r.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${r.expected}, 받은 타입은 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}입니다`;case"invalid_value":if(1===r.values.length)return`잘못된 입력: 값은 ${G(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${x(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let t=r.inclusive?"이하":"미만",i="미만"===t?"이어야 합니다":"여야 합니다",n=e[r.origin]??null,a=n?.unit??"요소";if(n)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${a} ${t}${i}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${t}${i}`}case"too_small":{let t=r.inclusive?"이상":"초과",i="이상"===t?"이어야 합니다":"여야 합니다",n=e[r.origin]??null,a=n?.unit??"요소";if(n)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${a} ${t}${i}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${t}${i}`}case"invalid_format":if("starts_with"===r.format)return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if("ends_with"===r.format)return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if("includes"===r.format)return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if("regex"===r.format)return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${t[r.format]??r.format}`;case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${x(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":default:return`잘못된 입력`;case"invalid_element":return`잘못된 값: ${r.origin}`}})}},"lt",0,function(){return{localeError:(()=>{let 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 t(t,r,i,n){let a=e[t]??null;return null===a?a:{unit:a.unit[r],verb:a.verb[n][i?"inclusive":"notInclusive"]}}let 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 e=>{switch(e.code){case"invalid_type":var i;return`Gautas tipas ${iT(typeof(i=e.input),i)}, o tikėtasi - ${iT(e.expected)}`;case"invalid_value":if(1===e.values.length)return`Privalo būti ${G(e.values[0])}`;return`Privalo būti vienas iš ${x(e.values,"|")} pasirinkimų`;case"too_big":{let r=iT(e.origin),i=t(e.origin,iO(Number(e.maximum)),e.inclusive??!1,"smaller");if(i?.verb)return`${iz(r??e.origin??"reikšmė")} ${i.verb} ${e.maximum.toString()} ${i.unit??"elementų"}`;let n=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${iz(r??e.origin??"reikšmė")} turi būti ${n} ${e.maximum.toString()} ${i?.unit}`}case"too_small":{let r=iT(e.origin),i=t(e.origin,iO(Number(e.minimum)),e.inclusive??!1,"bigger");if(i?.verb)return`${iz(r??e.origin??"reikšmė")} ${i.verb} ${e.minimum.toString()} ${i.unit??"elementų"}`;let n=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${iz(r??e.origin??"reikšmė")} turi būti ${n} ${e.minimum.toString()} ${i?.unit}`}case"invalid_format":if("starts_with"===e.format)return`Eilutė privalo prasidėti "${e.prefix}"`;if("ends_with"===e.format)return`Eilutė privalo pasibaigti "${e.suffix}"`;if("includes"===e.format)return`Eilutė privalo įtraukti "${e.includes}"`;if("regex"===e.format)return`Eilutė privalo atitikti ${e.pattern}`;return`Neteisingas ${r[e.format]??e.format}`;case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${x(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{let t=iT(e.origin);return`${iz(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}})()}},"mk",0,function(){let e,t;return{localeError:(e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}},t={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:"внес"},r=>{switch(r.code){case"invalid_type":return`Грешен внес: се очекува ${r.expected}, примено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":if(Array.isArray(e))return"низа";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${G(r.values[0])}`;return`Грешана опција: се очекува една ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${t}${r.maximum.toString()} ${i.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Премногу мал: се очекува ${r.origin} да има ${t}${r.minimum.toString()} ${i.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неважечка низа: мора да започнува со "${r.prefix}"`;if("ends_with"===r.format)return`Неважечка низа: мора да завршува со "${r.suffix}"`;if("includes"===r.format)return`Неважечка низа: мора да вклучува "${r.includes}"`;if("regex"===r.format)return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${x(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`;default:return`Грешен внес`}})}},"ms",0,function(){let e,t;return{localeError:(e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak sah: dijangka ${G(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${i.verb} ${t}${r.maximum.toString()} ${i.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Terlalu kecil: dijangka ${r.origin} ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak sah: mesti mengandungi "${r.includes}"`;if("regex"===r.format)return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${t[r.format]??r.format} tidak sah`;case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${x(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`}})}},"nl",0,function(){let e,t;return{localeError:(e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ongeldige invoer: verwacht ${G(r.values[0])}`;return`Ongeldige optie: verwacht \xe9\xe9n van ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Te groot: verwacht dat ${r.origin??"waarde"} ${i.verb} ${t}${r.maximum.toString()} ${i.unit??"elementen"}`;return`Te groot: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} is`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Te klein: verwacht dat ${r.origin} ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`Te klein: verwacht dat ${r.origin} ${t}${r.minimum.toString()} is`}case"invalid_format":if("starts_with"===r.format)return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if("includes"===r.format)return`Ongeldige tekst: moet "${r.includes}" bevatten`;if("regex"===r.format)return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`}})}},"no",0,function(){let e,t;return{localeError:(e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ugyldig verdi: forventet ${G(r.values[0])}`;return`Ugyldig valg: forventet en av ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()} ${i.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()} ${i.unit}`;return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: m\xe5 starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: m\xe5 ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: m\xe5 inneholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: m\xe5 matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldig tall: m\xe5 v\xe6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${x(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8kkel i ${r.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`}})}},"ota",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`F\xe2sit giren: umulan ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":if(Array.isArray(e))return"saf";if(null===e)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`F\xe2sit giren: umulan ${G(r.values[0])}`;return`F\xe2sit tercih: m\xfbteberler ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`;return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} olmalıydı.`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} ${i.unit} sahip olmalıydı.`;return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} olmalıydı.`}case"invalid_format":if("starts_with"===r.format)return`F\xe2sit metin: "${r.prefix}" ile başlamalı.`;if("ends_with"===r.format)return`F\xe2sit metin: "${r.suffix}" ile bitmeli.`;if("includes"===r.format)return`F\xe2sit metin: "${r.includes}" ihtiv\xe2 etmeli.`;if("regex"===r.format)return`F\xe2sit metin: ${r.pattern} nakşına uymalı.`;return`F\xe2sit ${t[r.format]??r.format}`;case"not_multiple_of":return`F\xe2sit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7in tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} i\xe7in tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}})}},"pl",0,function(){let e,t;return{localeError:(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ć"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${r.expected}, otrzymano ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":if(Array.isArray(e))return"tablica";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nieprawidłowe dane wejściowe: oczekiwano ${G(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.maximum.toString()} ${i.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.minimum.toString()} ${i.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zaczynać się od "${r.prefix}"`;if("ends_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi kończyć się na "${r.suffix}"`;if("includes"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zawierać "${r.includes}"`;if("regex"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${t[r.format]??r.format}`;case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`;default:return`Nieprawidłowe dane wejściowe`}})}},"ps",0,function(){let e,t;return{localeError:(e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}},t={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:"ورودي"},r=>{switch(r.code){case"invalid_type":return`ناسم ورودي: باید ${r.expected} وای, مګر ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"ارې";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} ترلاسه شو`;case"invalid_value":if(1===r.values.length)return`ناسم ورودي: باید ${G(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${x(r.values,"|")} څخه وای`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} ${i.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} وي`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} ${i.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} وي`}case"invalid_format":if("starts_with"===r.format)return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if("ends_with"===r.format)return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if("includes"===r.format)return`ناسم متن: باید "${r.includes}" ولري`;if("regex"===r.format)return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${t[r.format]??r.format} ناسم دی`;case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${x(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":default:return`ناسمه ورودي`;case"invalid_element":return`ناسم عنصر په ${r.origin} کې`}})}},"pt",0,function(){let e,t;return{localeError:(e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Tipo inv\xe1lido: esperado ${r.expected}, recebido ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"array";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: esperado ${G(r.values[0])}`;return`Op\xe7\xe3o inv\xe1lida: esperada uma das ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${t}${r.maximum.toString()} ${i.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Muito pequeno: esperado que ${r.origin} tivesse ${t}${r.minimum.toString()} ${i.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Texto inv\xe1lido: deve come\xe7ar com "${r.prefix}"`;if("ends_with"===r.format)return`Texto inv\xe1lido: deve terminar com "${r.suffix}"`;if("includes"===r.format)return`Texto inv\xe1lido: deve incluir "${r.includes}"`;if("regex"===r.format)return`Texto inv\xe1lido: deve corresponder ao padr\xe3o ${r.pattern}`;return`${t[r.format]??r.format} inv\xe1lido`;case"not_multiple_of":return`N\xfamero inv\xe1lido: deve ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Chave inv\xe1lida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido em ${r.origin}`;default:return`Campo inv\xe1lido`}})}},"ru",0,function(){let e,t;return{localeError:(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:"иметь"}},t={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:"ввод"},r=>{switch(r.code){case"invalid_type":return`Неверный ввод: ожидалось ${r.expected}, получено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"массив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неверный ввод: ожидалось ${G(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i){let e=iE(Number(r.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${t}${r.maximum.toString()} ${e}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i){let e=iE(Number(r.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${t}${r.minimum.toString()} ${e}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неверная строка: должна начинаться с "${r.prefix}"`;if("ends_with"===r.format)return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if("includes"===r.format)return`Неверная строка: должна содержать "${r.includes}"`;if("regex"===r.format)return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${t[r.format]??r.format}`;case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${x(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`;default:return`Неверные входные данные`}})}},"sl",0,function(){let e,t;return{localeError:(e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${r.expected}, prejeto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":if(Array.isArray(e))return"tabela";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neveljaven vnos: pričakovano ${G(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${t}${r.maximum.toString()} ${i.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${t}${r.minimum.toString()} ${i.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if("ends_with"===r.format)return`Neveljaven niz: mora se končati z "${r.suffix}"`;if("includes"===r.format)return`Neveljaven niz: mora vsebovati "${r.includes}"`;if("regex"===r.format)return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${t[r.format]??r.format}`;case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${x(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`}})}},"sv",0,function(){let e,t;return{localeError:(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"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: f\xf6rv\xe4ntat ${r.expected}, fick ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":if(Array.isArray(e))return"lista";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ogiltig inmatning: f\xf6rv\xe4ntat ${G(r.values[0])}`;return`Ogiltigt val: f\xf6rv\xe4ntade en av ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`F\xf6r stor(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()} ${i.unit??"element"}`;return`F\xf6r stor(t): f\xf6rv\xe4ntat ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()} ${i.unit}`;return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste b\xf6rja med "${r.prefix}"`;if("ends_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste sluta med "${r.suffix}"`;if("includes"===r.format)return`Ogiltig str\xe4ng: m\xe5ste inneh\xe5lla "${r.includes}"`;if("regex"===r.format)return`Ogiltig str\xe4ng: m\xe5ste matcha m\xf6nstret "${r.pattern}"`;return`Ogiltig(t) ${t[r.format]??r.format}`;case"not_multiple_of":return`Ogiltigt tal: m\xe5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${x(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xe4rde i ${r.origin??"värdet"}`}})}},"ta",0,function(){let e,t;return{localeError:(e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}},t={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"},r=>{switch(r.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r.expected}, பெறப்பட்டது ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":if(Array.isArray(e))return"அணி";if(null===e)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${G(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${x(r.values,"|")} இல் ஒன்று`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":if("starts_with"===r.format)return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if("ends_with"===r.format)return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if("includes"===r.format)return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if("regex"===r.format)return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${t[r.format]??r.format}`;case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${x(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}})}},"th",0,function(){let e,t;return{localeError:(e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}},t={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:"ข้อมูลที่ป้อน"},r=>{switch(r.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r.expected} แต่ได้รับ ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":if(Array.isArray(e))return"อาร์เรย์ (Array)";if(null===e)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ค่าไม่ถูกต้อง: ควรเป็น ${G(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"ไม่เกิน":"น้อยกว่า",i=e[r.origin]??null;if(i)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()} ${i.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"อย่างน้อย":"มากกว่า",i=e[r.origin]??null;if(i)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()} ${i.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if("ends_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if("includes"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if("regex"===r.format)return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${t[r.format]??r.format}`;case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${x(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}})}},"tr",0,function(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Ge\xe7ersiz değer: beklenen ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ge\xe7ersiz değer: beklenen ${G(r.values[0])}`;return`Ge\xe7ersiz se\xe7enek: aşağıdakilerden biri olmalı: ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()} ${i.unit??"öğe"}`;return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()} ${i.unit}`;return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ge\xe7ersiz metin: "${r.prefix}" ile başlamalı`;if("ends_with"===r.format)return`Ge\xe7ersiz metin: "${r.suffix}" ile bitmeli`;if("includes"===r.format)return`Ge\xe7ersiz metin: "${r.includes}" i\xe7ermeli`;if("regex"===r.format)return`Ge\xe7ersiz metin: ${r.pattern} desenine uymalı`;return`Ge\xe7ersiz ${t[r.format]??r.format}`;case"not_multiple_of":return`Ge\xe7ersiz sayı: ${r.divisor} ile tam b\xf6l\xfcnebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${x(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7inde ge\xe7ersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${r.origin} i\xe7inde ge\xe7ersiz değer`;default:return`Ge\xe7ersiz değer`}})}},"ua",0,function(){return iU()},"uk",0,iU,"ur",0,function(){let e,t;return{localeError:(e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}},t={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:"ان پٹ"},r=>{switch(r.code){case"invalid_type":return`غلط ان پٹ: ${r.expected} متوقع تھا، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":if(Array.isArray(e))return"آرے";if(null===e)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} موصول ہوا`;case"invalid_value":if(1===r.values.length)return`غلط ان پٹ: ${G(r.values[0])} متوقع تھا`;return`غلط آپشن: ${x(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${t}${r.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${t}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`بہت چھوٹا: ${r.origin} کے ${t}${r.minimum.toString()} ${i.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${t}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":if("starts_with"===r.format)return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if("ends_with"===r.format)return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if("includes"===r.format)return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if("regex"===r.format)return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${t[r.format]??r.format}`;case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${x(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}})}},"vi",0,function(){let e,t;return{localeError:(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ó"}},t={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"},r=>{switch(r.code){case"invalid_type":return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${r.expected}, nhận được ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":if(Array.isArray(e))return"mảng";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${G(r.values[0])}`;return`T\xf9y chọn kh\xf4ng hợp lệ: mong đợi một trong c\xe1c gi\xe1 trị ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${i.verb} ${t}${r.maximum.toString()} ${i.unit??"phần tử"}`;return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${i.verb} ${t}${r.minimum.toString()} ${i.unit}`;return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if("ends_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải kết th\xfac bằng "${r.suffix}"`;if("includes"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bao gồm "${r.includes}"`;if("regex"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${t[r.format]??r.format} kh\xf4ng hợp lệ`;case"not_multiple_of":return`Số kh\xf4ng hợp lệ: phải l\xe0 bội số của ${r.divisor}`;case"unrecognized_keys":return`Kh\xf3a kh\xf4ng được nhận dạng: ${x(r.keys,", ")}`;case"invalid_key":return`Kh\xf3a kh\xf4ng hợp lệ trong ${r.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Gi\xe1 trị kh\xf4ng hợp lệ trong ${r.origin}`;default:return`Đầu v\xe0o kh\xf4ng hợp lệ`}})}},"yo",0,function(){let e,t;return{localeError:(e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}},t={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é"},r=>{switch(r.code){case"invalid_type":return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${r.expected}, \xe0mọ̀ a r\xed ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nọ́mbà";case"object":if(Array.isArray(e))return"akopọ";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${G(r.values[0])}`;return`\xc0ṣ\xe0y\xe0n aṣ\xecṣe: yan ọ̀kan l\xe1ra ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin??"iye"} ${i.verb} ${t}${r.maximum} ${i.unit}`;return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ ${t}${r.maximum}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin} ${i.verb} ${t}${r.minimum} ${i.unit}`;return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ ${t}${r.minimum}`}case"invalid_format":if("starts_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀l\xfa "${r.prefix}"`;if("ends_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ par\xed pẹ̀l\xfa "${r.suffix}"`;if("includes"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ n\xed "${r.includes}"`;if("regex"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ b\xe1 \xe0pẹẹrẹ mu ${r.pattern}`;return`Aṣ\xecṣe: ${t[r.format]??r.format}`;case"not_multiple_of":return`Nọ́mb\xe0 aṣ\xecṣe: gbọ́dọ̀ jẹ́ \xe8y\xe0 p\xedp\xedn ti ${r.divisor}`;case"unrecognized_keys":return`Bọt\xecn\xec \xe0\xecmọ̀: ${x(r.keys,", ")}`;case"invalid_key":return`Bọt\xecn\xec aṣ\xecṣe n\xedn\xfa ${r.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣ\xecṣe n\xedn\xfa ${r.origin}`}})}},"zhCN",0,function(){let e,t;return{localeError:(e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}},t={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:"输入"},r=>{switch(r.code){case"invalid_type":return`无效输入：期望 ${r.expected}，实际接收 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":if(Array.isArray(e))return"数组";if(null===e)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`无效输入：期望 ${G(r.values[0])}`;return`无效选项：期望以下之一 ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`数值过大：期望 ${r.origin??"值"} ${t}${r.maximum.toString()} ${i.unit??"个元素"}`;return`数值过大：期望 ${r.origin??"值"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`数值过小：期望 ${r.origin} ${t}${r.minimum.toString()} ${i.unit}`;return`数值过小：期望 ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`无效字符串：必须以 "${r.prefix}" 开头`;if("ends_with"===r.format)return`无效字符串：必须以 "${r.suffix}" 结尾`;if("includes"===r.format)return`无效字符串：必须包含 "${r.includes}"`;if("regex"===r.format)return`无效字符串：必须满足正则表达式 ${r.pattern}`;return`无效${t[r.format]??r.format}`;case"not_multiple_of":return`无效数字：必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${x(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`;default:return`无效输入`}})}},"zhTW",0,function(){let e,t;return{localeError:(e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}},t={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:"輸入"},r=>{switch(r.code){case"invalid_type":return`無效的輸入值：預期為 ${r.expected}，但收到 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`無效的輸入值：預期為 ${G(r.values[0])}`;return`無效的選項：預期為以下其中之一 ${x(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`數值過大：預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()} ${i.unit??"個元素"}`;return`數值過大：預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`數值過小：預期 ${r.origin} 應為 ${t}${r.minimum.toString()} ${i.unit}`;return`數值過小：預期 ${r.origin} 應為 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`無效的字串：必須以 "${r.prefix}" 開頭`;if("ends_with"===r.format)return`無效的字串：必須以 "${r.suffix}" 結尾`;if("includes"===r.format)return`無效的字串：必須包含 "${r.includes}"`;if("regex"===r.format)return`無效的字串：必須符合格式 ${r.pattern}`;return`無效的 ${t[r.format]??r.format}`;case"not_multiple_of":return`無效的數字：必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}：${x(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`;default:return`無效的輸入值`}})}}],82742);var uw=e.i(82742);e.i(23661),e.i(40221),e.i(71430),e.i(63834);var uk=e.i(62031);e.s(["$ZodAny",0,rD,"$ZodArray",0,rF,"$ZodAsyncError",()=>o,"$ZodBase64",0,rw,"$ZodBase64URL",0,r$,"$ZodBigInt",0,rT,"$ZodBigIntFormat",0,rz,"$ZodBoolean",0,rC,"$ZodCIDRv4",0,rv,"$ZodCIDRv6",0,ry,"$ZodCUID",0,rs,"$ZodCUID2",0,ro,"$ZodCatch",0,im,"$ZodCheck",0,tU,"$ZodCheckBigIntFormat",0,tL,"$ZodCheckEndsWith",0,t0,"$ZodCheckGreaterThan",0,tZ,"$ZodCheckIncludes",0,tq,"$ZodCheckLengthEquals",0,tJ,"$ZodCheckLessThan",0,tA,"$ZodCheckLowerCase",0,tK,"$ZodCheckMaxLength",0,tW,"$ZodCheckMaxSize",0,tF,"$ZodCheckMimeType",0,t4,"$ZodCheckMinLength",0,tG,"$ZodCheckMinSize",0,tV,"$ZodCheckMultipleOf",0,tR,"$ZodCheckNumberFormat",0,tM,"$ZodCheckOverwrite",0,t5,"$ZodCheckProperty",0,t2,"$ZodCheckRegex",0,tH,"$ZodCheckSizeEquals",0,tB,"$ZodCheckStartsWith",0,tQ,"$ZodCheckStringFormat",0,tX,"$ZodCheckUpperCase",0,tY,"$ZodCodec",0,ix,"$ZodCustom",0,iS,"$ZodCustomStringFormat",0,rN,"$ZodDate",0,rM,"$ZodDefault",0,is,"$ZodDiscriminatedUnion",0,rq,"$ZodE164",0,rj,"$ZodEmail",0,rr,"$ZodEmoji",0,rn,"$ZodEncodeError",()=>l,"$ZodEnum",0,r8,"$ZodError",0,ey,"$ZodFile",0,ie,"$ZodFunction",0,i$,"$ZodGUID",0,re,"$ZodIPv4",0,rf,"$ZodIPv6",0,rg,"$ZodISODate",0,rm,"$ZodISODateTime",0,rc,"$ZodISODuration",0,rp,"$ZodISOTime",0,rh,"$ZodIntersection",0,rQ,"$ZodJWT",0,rS,"$ZodKSUID",0,rd,"$ZodLazy",0,i_,"$ZodLiteral",0,r7,"$ZodMAC",0,rx,"$ZodMap",0,r5,"$ZodNaN",0,ih,"$ZodNanoID",0,ra,"$ZodNever",0,rZ,"$ZodNonOptional",0,iu,"$ZodNull",0,rU,"$ZodNullable",0,ia,"$ZodNumber",0,rI,"$ZodNumberFormat",0,rP,"$ZodObject",0,rG,"$ZodObjectJIT",0,rJ,"$ZodOptional",0,ii,"$ZodPipe",0,ip,"$ZodPrefault",0,il,"$ZodPromise",0,ij,"$ZodReadonly",0,ib,"$ZodRealError",0,eb,"$ZodRecord",0,r4,"$ZodRegistry",()=>iZ,"$ZodSet",0,r3,"$ZodString",0,t8,"$ZodStringFormat",0,t7,"$ZodSuccess",0,ic,"$ZodSymbol",0,rO,"$ZodTemplateLiteral",0,ik,"$ZodTransform",0,it,"$ZodTuple",0,r1,"$ZodType",0,t9,"$ZodULID",0,rl,"$ZodURL",0,ri,"$ZodUUID",0,rt,"$ZodUndefined",0,rE,"$ZodUnion",0,rH,"$ZodUnknown",0,rA,"$ZodVoid",0,rR,"$ZodXID",0,ru,"$ZodXor",0,rY,"$brand",0,s,"$constructor",()=>a,"$input",0,iA,"$output",0,iD,"Doc",()=>t6,"JSONSchema",0,uk,"JSONSchemaGenerator",()=>sm,"NEVER",0,n,"TimePrecision",0,nr,"_any",()=>n$,"_array",()=>n6,"_base64",()=>i8,"_base64url",()=>i7,"_bigint",()=>ng,"_boolean",()=>np,"_catch",()=>ap,"_check",()=>a$,"_cidrv4",()=>i3,"_cidrv6",()=>i9,"_coercedBigint",()=>nx,"_coercedBoolean",()=>nf,"_coercedDate",()=>nI,"_coercedNumber",()=>nl,"_coercedString",()=>iF,"_cuid",()=>iq,"_cuid2",()=>iQ,"_custom",()=>ab,"_date",()=>nN,"_decode",0,eD,"_decodeAsync",0,eM,"_default",()=>ac,"_discriminatedUnion",()=>n8,"_e164",()=>ne,"_email",()=>iV,"_emoji",()=>iK,"_encode",0,eE,"_encodeAsync",0,eZ,"_endsWith",()=>nK,"_enum",()=>an,"_file",()=>ao,"_float32",()=>nd,"_float64",()=>nc,"_gt",()=>nz,"_gte",()=>nO,"_guid",()=>iB,"_includes",()=>nX,"_int",()=>nu,"_int32",()=>nm,"_int64",()=>nv,"_intersection",()=>n7,"_ipv4",()=>i4,"_ipv6",()=>i5,"_isoDate",()=>nn,"_isoDateTime",()=>ni,"_isoDuration",()=>ns,"_isoTime",()=>na,"_jwt",()=>nt,"_ksuid",()=>i2,"_lazy",()=>av,"_length",()=>nB,"_literal",()=>as,"_lowercase",()=>nG,"_lt",()=>nC,"_lte",()=>nT,"_mac",()=>i6,"_map",()=>ar,"_max",()=>nT,"_maxLength",()=>nF,"_maxSize",()=>nR,"_mime",()=>nq,"_min",()=>nO,"_minLength",()=>nV,"_minSize",()=>nM,"_multipleOf",()=>nZ,"_nan",()=>nP,"_nanoid",()=>iY,"_nativeEnum",()=>aa,"_negative",()=>nU,"_never",()=>n_,"_nonnegative",()=>nA,"_nonoptional",()=>am,"_nonpositive",()=>nD,"_normalize",()=>n0,"_null",()=>nk,"_nullable",()=>ad,"_number",()=>no,"_optional",()=>au,"_overwrite",()=>nQ,"_parse",0,eS,"_parseAsync",0,eI,"_pipe",()=>af,"_positive",()=>nE,"_promise",()=>ay,"_property",()=>nY,"_readonly",()=>ag,"_record",()=>at,"_refine",()=>aw,"_regex",()=>nW,"_safeDecode",0,eB,"_safeDecodeAsync",0,eX,"_safeEncode",0,eF,"_safeEncodeAsync",0,eG,"_safeParse",0,eC,"_safeParseAsync",0,ez,"_set",()=>ai,"_size",()=>nL,"_slugify",()=>n5,"_startsWith",()=>nH,"_string",()=>iL,"_stringFormat",()=>aN,"_stringbool",()=>aS,"_success",()=>ah,"_superRefine",()=>ak,"_symbol",()=>nb,"_templateLiteral",()=>ax,"_toLowerCase",()=>n2,"_toUpperCase",()=>n4,"_transform",()=>al,"_trim",()=>n1,"_tuple",()=>ae,"_uint32",()=>nh,"_uint64",()=>ny,"_ulid",()=>i0,"_undefined",()=>nw,"_union",()=>n3,"_unknown",()=>nj,"_uppercase",()=>nJ,"_url",()=>iH,"_uuid",()=>iW,"_uuidv4",()=>iG,"_uuidv6",()=>iJ,"_uuidv7",()=>iX,"_void",()=>nS,"_xid",()=>i1,"_xor",()=>n9,"clone",()=>V,"config",()=>d,"createStandardJSONSchemaMethod",0,aO,"createToJSONSchemaMethod",0,az,"decode",0,eA,"decodeAsync",0,eL,"describe",()=>aj,"encode",0,eU,"encodeAsync",0,eR,"extractDefs",()=>aC,"finalize",()=>aT,"flattenError",()=>ew,"formatError",()=>ek,"globalConfig",0,u,"globalRegistry",0,iM,"initializeContext",()=>aI,"isValidBase64",()=>rb,"isValidBase64URL",()=>rk,"isValidJWT",()=>r_,"locales",0,uw,"meta",()=>a_,"parse",0,eN,"parseAsync",0,eP,"prettifyError",()=>e_,"process",()=>aP,"regexes",0,ub,"registry",()=>iR,"safeDecode",0,eW,"safeDecodeAsync",0,eH,"safeEncode",0,eV,"safeEncodeAsync",0,eJ,"safeParse",0,eT,"safeParseAsync",0,eO,"toDotPath",()=>ej,"toJSONSchema",()=>sc,"treeifyError",()=>e$,"util",0,uy,"version",0,t3],99298);var u$=e.i(99298);e.i(1548),e.i(5583),e.i(87190),e.s(["$brand",0,s,"ZodFirstPartyTypeKind",()=>r,"ZodIssueCode",0,uo,"config",()=>d,"getErrorMap",()=>uu,"setErrorMap",()=>ul],64657),e.i(64657);var sh=sh,sp=sp,uj=e.i(44916);e.s(["$brand",0,s,"$input",0,iA,"$output",0,iD,"NEVER",0,n,"TimePrecision",0,nr,"ZodAny",0,oH,"ZodArray",0,o6,"ZodBase64",0,of,"ZodBase64URL",0,ox,"ZodBigInt",0,oZ,"ZodBigIntFormat",0,oM,"ZodBoolean",0,oD,"ZodCIDRv4",0,oc,"ZodCIDRv6",0,oh,"ZodCUID",0,s6,"ZodCUID2",0,s9,"ZodCatch",0,lF,"ZodCodec",0,lX,"ZodCustom",0,l3,"ZodCustomStringFormat",0,o$,"ZodDate",0,o4,"ZodDefault",0,lE,"ZodDiscriminatedUnion",0,ls,"ZodE164",0,oy,"ZodEmail",0,sV,"ZodEmoji",0,s1,"ZodEnum",0,lb,"ZodError",0,sj,"ZodFile",0,l_,"ZodFirstPartyTypeKind",()=>r,"ZodFunction",0,l5,"ZodGUID",0,sW,"ZodIPv4",0,oa,"ZodIPv6",0,ou,"ZodISODate",0,sx,"ZodISODateTime",0,sf,"ZodISODuration",0,sw,"ZodISOTime",0,sy,"ZodIntersection",0,ll,"ZodIssueCode",0,uo,"ZodJWT",0,ow,"ZodKSUID",0,oi,"ZodLazy",0,l0,"ZodLiteral",0,l$,"ZodMAC",0,oo,"ZodMap",0,lg,"ZodNaN",0,lB,"ZodNanoID",0,s4,"ZodNever",0,oQ,"ZodNonOptional",0,lZ,"ZodNull",0,oJ,"ZodNullable",0,lT,"ZodNumber",0,oI,"ZodNumberFormat",0,oC,"ZodObject",0,o8,"ZodOptional",0,lP,"ZodPipe",0,lG,"ZodPrefault",0,lD,"ZodPromise",0,l2,"ZodReadonly",0,lK,"ZodRealError",0,s_,"ZodRecord",0,lm,"ZodSet",0,lv,"ZodString",0,sM,"ZodStringFormat",0,sF,"ZodSuccess",0,lM,"ZodSymbol",0,oV,"ZodTemplateLiteral",0,lq,"ZodTransform",0,lN,"ZodTuple",0,ld,"ZodType",0,sZ,"ZodULID",0,s7,"ZodURL",0,sq,"ZodUUID",0,sJ,"ZodUndefined",0,oW,"ZodUnion",0,lr,"ZodUnknown",0,oY,"ZodVoid",0,o1,"ZodXID",0,ot,"ZodXor",0,ln,"_ZodString",0,sR,"_default",()=>lU,"_function",()=>l6,"any",()=>oK,"array",()=>o3,"base64",()=>og,"base64url",()=>ov,"bigint",()=>oR,"boolean",()=>oA,"catch",()=>lV,"check",()=>l9,"cidrv4",()=>om,"cidrv6",()=>op,"clone",()=>V,"codec",()=>lH,"coerce",0,uj,"config",()=>d,"core",0,u$,"cuid",()=>s3,"cuid2",()=>s8,"custom",()=>l8,"date",()=>o5,"decode",0,sT,"decodeAsync",0,sO,"describe",0,ut,"discriminatedUnion",()=>lo,"e164",()=>ob,"email",()=>sB,"emoji",()=>s2,"encode",0,sC,"encodeAsync",0,sz,"endsWith",()=>nK,"enum",()=>lw,"file",()=>lS,"flattenError",()=>ew,"float32",()=>oz,"float64",()=>oO,"formatError",()=>ek,"fromJSONSchema",()=>uh,"function",()=>l6,"getErrorMap",()=>uu,"globalRegistry",0,iM,"gt",()=>nz,"gte",()=>nO,"guid",()=>sG,"hash",()=>oN,"hex",()=>oS,"hostname",()=>o_,"httpUrl",()=>s0,"includes",()=>nX,"instanceof",()=>ui,"int",()=>oT,"int32",()=>oE,"int64",()=>oL,"intersection",()=>lu,"ipv4",()=>os,"ipv6",()=>od,"iso",0,uc,"json",()=>ua,"jwt",()=>ok,"keyof",()=>o9,"ksuid",()=>on,"lazy",()=>l1,"length",()=>nB,"literal",()=>lj,"locales",0,uw,"looseObject",()=>lt,"looseRecord",()=>lf,"lowercase",()=>nG,"lt",()=>nC,"lte",()=>nT,"mac",()=>ol,"map",()=>lx,"maxLength",()=>nF,"maxSize",()=>nR,"meta",0,ur,"mime",()=>nq,"minLength",()=>nV,"minSize",()=>nM,"multipleOf",()=>nZ,"nan",()=>lW,"nanoid",()=>s5,"nativeEnum",()=>lk,"negative",()=>nU,"never",()=>o0,"nonnegative",()=>nA,"nonoptional",()=>lR,"nonpositive",()=>nD,"normalize",()=>n0,"null",()=>oX,"nullable",()=>lz,"nullish",()=>lO,"number",()=>oP,"object",()=>o7,"optional",()=>lC,"overwrite",()=>nQ,"parse",0,sS,"parseAsync",0,sN,"partialRecord",()=>lp,"pipe",()=>lJ,"positive",()=>nE,"prefault",()=>lA,"preprocess",()=>us,"prettifyError",()=>e_,"promise",()=>l4,"property",()=>nY,"readonly",()=>lY,"record",()=>lh,"refine",()=>l7,"regex",()=>nW,"regexes",()=>sh,"registry",()=>iR,"safeDecode",0,sU,"safeDecodeAsync",0,sA,"safeEncode",0,sE,"safeEncodeAsync",0,sD,"safeParse",0,sI,"safeParseAsync",0,sP,"set",()=>ly,"setErrorMap",()=>ul,"size",()=>nL,"slugify",()=>n5,"startsWith",()=>nH,"strictObject",()=>le,"string",()=>sL,"stringFormat",()=>oj,"stringbool",0,un,"success",()=>lL,"superRefine",()=>ue,"symbol",()=>oB,"templateLiteral",()=>lQ,"toJSONSchema",()=>sc,"toLowerCase",()=>n2,"toUpperCase",()=>n4,"transform",()=>lI,"treeifyError",()=>e$,"trim",()=>n1,"tuple",()=>lc,"uint32",()=>oU,"uint64",()=>oF,"ulid",()=>oe,"undefined",()=>oG,"union",()=>li,"unknown",()=>oq,"uppercase",()=>nJ,"url",()=>sQ,"util",()=>sp,"uuid",()=>sX,"uuidv4",()=>sH,"uuidv6",()=>sK,"uuidv7",()=>sY,"void",()=>o2,"xid",()=>or,"xor",()=>la],89970);var u_=e.i(89970),u_=u_,uS=e.i(46146),uN=e.i(66691),uI=e.i(70317),uP=e.i(24911);e.i(37265);var uC=e.i(21820),uT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,uC.createSlot)(`Primitive.${t}`),n=uS.forwardRef((e,n)=>{let{asChild:a,...s}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a?r:t,{...s,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),uz=uS.forwardRef((e,t)=>(0,i.jsx)(uT.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));uz.displayName="Label";var uO=e.i(52236);function uE({className:e,...t}){return(0,i.jsx)(uz,{"data-slot":"label",className:(0,uO.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var uU=e.i(99056),uD=e.i(60049),uA=e.i(68080),uZ=e.i(46430),uR=e.i(45754),uM=e.i(8519),u_=u_;let uL=u_.object({username:u_.string().min(3,"Username must be at least 3 characters").max(20,"Username must be less than 20 characters").regex(/^[a-zA-Z0-9_]+$/,"Username can only contain letters, numbers, and underscores"),email:u_.string().email("Please enter a valid email address").max(100,"Email too long"),password:u_.string().min(6,"Password must be at least 6 characters").max(100,"Password too long")}),uF=u_.object({email:u_.string().email("Please enter a valid email address"),password:u_.string().min(1,"Password is required")});function uV({isOpen:e,onClose:t,onAuthenticated:r}){let[n,a]=(0,uS.useState)("login"),[s,o]=(0,uS.useState)({username:"",email:"",password:""}),[l,u]=(0,uS.useState)(""),[d,c]=(0,uS.useState)(!1),[m,h]=(0,uS.useState)(""),{login:p,signup:f,sendPasswordReset:g,updatePassword:x}=(0,uM.useSupabaseAuthStore)();(0,uS.useEffect)(()=>{let r=e=>{"Escape"===e.key&&t()};if(e)return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]);let v=async e=>{e.preventDefault(),u(""),h("");try{"signup"===n?uL.parse(s):uF.parse(s)}catch(e){if(e instanceof u_.ZodError)return void u(e.issues[0].message)}c(!0);try{let e=!1;"login"===n?(e=await p(s.email,s.password))||u("Invalid email or password. Please check your credentials or use 'Forgot password?' if needed."):(e=await f(s.username,s.email,s.password))?h("Account created and signed in successfully!"):u("Failed to create account. Email might already be in use."),e&&"login"===n?(h("Successfully signed in!"),setTimeout(()=>{r?.(),t(),o({username:"",email:"",password:""}),u(""),h("")},1e3)):e&&"signup"===n&&setTimeout(()=>{r?.(),t(),o({username:"",email:"",password:""}),u(""),h("")},1500)}catch(e){console.error("Auth error:",e),u("Something went wrong. Please try again.")}finally{c(!1)}},y=()=>{"forgot"===n||"reset"===n?a("login"):a("login"===n?"signup":"login"),u(""),o({username:"",email:"",password:""})};return e?(0,i.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:e=>{e.target===e.currentTarget&&t()},children:(0,i.jsx)(uI.Card,{className:"w-full max-w-md bg-white shadow-2xl border-0 relative",children:(0,i.jsxs)("div",{className:"p-6",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[("forgot"===n||"reset"===n)&&(0,i.jsx)(uN.Button,{type:"button",variant:"ghost",size:"sm",className:"p-2 mr-1",onClick:y,children:(0,i.jsx)(uR.ArrowLeft,{className:"w-5 h-5"})}),(0,i.jsxs)("h2",{className:"text-2xl font-bold text-gray-800",children:["login"===n&&"Welcome Back!","signup"===n&&"Join GeoHunter","forgot"===n&&"Reset Password","reset"===n&&"Choose New Password"]})]}),(0,i.jsx)(uN.Button,{variant:"ghost",size:"sm",onClick:t,className:"hover:bg-gray-100 p-2 rounded-full border border-gray-200 hover:border-gray-300",children:(0,i.jsx)(uU.X,{className:"w-5 h-5 text-gray-600"})})]}),"forgot"!==n&&"reset"!==n&&(0,i.jsxs)("form",{onSubmit:v,className:"space-y-5",children:["signup"===n&&(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(uE,{htmlFor:"username",className:"text-sm font-semibold text-gray-700",children:"Username"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(uD.User,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,i.jsx)(uP.Input,{id:"username",type:"text",placeholder:"Choose a username",value:s.username,onChange:e=>o({...s,username:e.target.value}),className:"pl-11 h-12 border-2 border-gray-300 focus:border-purple-500 focus:ring-2 focus:ring-purple-200 text-gray-900 bg-white placeholder-gray-500",required:!0,autoComplete:"username"})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(uE,{htmlFor:"email",className:"text-sm font-semibold text-gray-700",children:"Email"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(uA.Mail,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,i.jsx)(uP.Input,{id:"email",type:"email",placeholder:"Enter your email",value:s.email,onChange:e=>o({...s,email:e.target.value}),className:"pl-11 h-12 border-2 border-gray-300 focus:border-purple-500 focus:ring-2 focus:ring-purple-200 text-gray-900 bg-white placeholder-gray-500",required:!0,autoComplete:"email"})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(uE,{htmlFor:"password",className:"text-sm font-semibold text-gray-700",children:"Password"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(uZ.Lock,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,i.jsx)(uP.Input,{id:"password",type:"password",placeholder:"signup"===n?"Create a password (6+ chars)":"Enter your password",value:s.password,onChange:e=>o({...s,password:e.target.value}),className:"pl-11 h-12 border-2 border-gray-300 focus:border-purple-500 focus:ring-2 focus:ring-purple-200 text-gray-900 bg-white placeholder-gray-500",required:!0,autoComplete:"signup"===n?"new-password":"current-password"})]})]}),l&&(0,i.jsx)("div",{className:"text-red-600 text-sm bg-red-50 p-3 rounded-lg border border-red-200",children:l}),m&&(0,i.jsx)("div",{className:"text-green-600 text-sm bg-green-50 p-3 rounded-lg border border-green-200",children:m}),(0,i.jsx)(uN.Button,{type:"submit",className:"w-full h-12 bg-purple-600 hover:bg-purple-700 text-white font-semibold text-base",disabled:d,children:d?(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Please wait..."]}):"login"===n?"Sign In":"Create Account"})]}),"forgot"===n&&(0,i.jsxs)("div",{className:"space-y-5",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(uE,{htmlFor:"email-reset",className:"text-sm font-semibold text-gray-700",children:"Email"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(uA.Mail,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,i.jsx)(uP.Input,{id:"email-reset",type:"email",placeholder:"Your account email",value:s.email,onChange:e=>o({...s,email:e.target.value}),className:"pl-11 h-12 border-2 border-gray-300 focus:border-purple-500 focus:ring-2 focus:ring-purple-200",autoComplete:"email"})]})]}),l&&(0,i.jsx)("div",{className:"text-red-600 text-sm bg-red-50 p-3 rounded-lg border border-red-200",children:l}),m&&(0,i.jsx)("div",{className:"text-green-600 text-sm bg-green-50 p-3 rounded-lg border border-green-200",children:m}),(0,i.jsx)(uN.Button,{type:"button",className:"w-full h-12 bg-purple-600 hover:bg-purple-700 text-white font-semibold text-base",disabled:d||!s.email,onClick:async()=>{u(""),h(""),c(!0);let{success:e,error:t}=await g(s.email);e?h("Password recovery email sent! Check your inbox."):u(t||"Failed to send email"),c(!1)},children:d?"Sending...":"Send Recovery Email"}),(0,i.jsx)("p",{className:"text-xs text-gray-500 leading-snug",children:"A secure link will be sent. After clicking it, you'll return here to set a new password."})]}),"reset"===n&&(0,i.jsxs)("div",{className:"space-y-5",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(uE,{htmlFor:"new-password",className:"text-sm font-semibold text-gray-700",children:"New Password"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(uZ.Lock,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,i.jsx)(uP.Input,{id:"new-password",type:"password",placeholder:"Enter a new password",value:s.password,onChange:e=>o({...s,password:e.target.value}),className:"pl-11 h-12 border-2 border-gray-300 focus:border-purple-500 focus:ring-2 focus:ring-purple-200",autoComplete:"new-password"})]})]}),l&&(0,i.jsx)("div",{className:"text-red-600 text-sm bg-red-50 p-3 rounded-lg border border-red-200",children:l}),m&&(0,i.jsx)("div",{className:"text-green-600 text-sm bg-green-50 p-3 rounded-lg border border-green-200",children:m}),(0,i.jsx)(uN.Button,{type:"button",className:"w-full h-12 bg-purple-600 hover:bg-purple-700 text-white font-semibold text-base",disabled:d||s.password.length<6,onClick:async()=>{u(""),h(""),c(!0);let{success:e,error:t}=await x(s.password);e?(h("Password updated! You can now sign in."),setTimeout(()=>{a("login"),o({username:"",email:s.email,password:""})},1400)):u(t||"Failed to update password"),c(!1)},children:d?"Updating...":"Update Password"}),(0,i.jsx)("p",{className:"text-xs text-gray-500 leading-snug",children:"After updating, sign in again with your new password."})]}),"forgot"!==n&&"reset"!==n&&(0,i.jsxs)("div",{className:"mt-6 text-center space-y-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-sm text-gray-600",children:"login"===n?"Don't have an account?":"Already have an account?"}),(0,i.jsx)(uN.Button,{variant:"link",onClick:y,className:"mt-1 p-0 h-auto text-purple-600 hover:text-purple-700 font-semibold",children:"login"===n?"Sign up here":"Sign in here"})]}),"login"===n&&(0,i.jsx)("div",{className:"pt-1",children:(0,i.jsx)(uN.Button,{type:"button",variant:"link",className:"p-0 h-auto text-xs text-gray-500 hover:text-purple-600",onClick:()=>{a("forgot"),u(""),h("")},children:"Forgot your password?"})})]}),("forgot"===n||"reset"===n)&&(0,i.jsx)("div",{className:"mt-6 text-center",children:(0,i.jsx)(uN.Button,{variant:"link",className:"p-0 h-auto text-purple-600 hover:text-purple-700 font-semibold",onClick:y,children:"Back to sign in"})}),"signup"===n&&(0,i.jsx)("div",{className:"mt-4 p-4 bg-gradient-to-r from-blue-50 to-purple-50 rounded-lg border border-blue-200",children:(0,i.jsx)("p",{className:"text-sm text-blue-800",children:"🎮 Create an account to save your scores, track your progress, and compete on the global leaderboard!"})}),"forgot"===n&&(0,i.jsx)("div",{className:"mt-4 p-4 bg-gradient-to-r from-amber-50 to-orange-50 rounded-lg border border-amber-200",children:(0,i.jsx)("p",{className:"text-xs text-amber-800",children:"If no email arrives after a minute, check spam or confirm you signed up with that address."})}),"reset"===n&&(0,i.jsx)("div",{className:"mt-4 p-4 bg-gradient-to-r from-emerald-50 to-green-50 rounded-lg border border-emerald-200",children:(0,i.jsx)("p",{className:"text-xs text-emerald-800",children:"Use at least 6 characters. Stronger passwords keep your progress safer."})})]})})}):null}e.s(["AuthModal",()=>uV],68604)},70606,e=>{"use strict";var t,r,i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,n=(t=function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)},r=Object.create(null),function(e){return void 0===r[e]&&(r[e]=t(e)),r[e]});e.s(["default",()=>n],70606)},2008,91699,29978,e=>{"use strict";let t,r,i;var n,a=e.i(50266),s=e.i(46146),o=e.i(24779),l=e.i(99056);let u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d=new Set(u),c=e=>180*e/Math.PI,m=e=>p(c(Math.atan2(e[1],e[0]))),h={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:m,rotateZ:m,skewX:e=>c(Math.atan(e[1])),skewY:e=>c(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},p=e=>((e%=360)<0&&(e+=360),e),f=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),g=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),x={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:f,scaleY:g,scale:e=>(f(e)+g(e))/2,rotateX:e=>p(c(Math.atan2(e[6],e[5]))),rotateY:e=>p(c(Math.atan2(-e[2],e[0]))),rotateZ:m,rotate:m,skewX:e=>c(Math.atan(e[4])),skewY:e=>c(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function v(e){return+!!e.includes("scale")}function y(e,t){let r,i;if(!e||"none"===e)return v(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(n)r=x,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=h,i=t}if(!i)return v(t);let a=r[t],s=i[1].split(",").map(b);return"function"==typeof a?a(s):s[a]}function b(e){return parseFloat(e.trim())}let w=e=>t=>"string"==typeof t&&t.startsWith(e),k=w("--"),$=w("var(--"),j=e=>!!$(e)&&_.test(e.split("/*")[0].trim()),_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function S({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}let N=(e,t,r)=>e+(t-e)*r;function I(e){return void 0===e||1===e}function P({scale:e,scaleX:t,scaleY:r}){return!I(e)||!I(t)||!I(r)}function C(e){return P(e)||T(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function z(e,t,r,i,n){return void 0!==n&&(e=i+n*(e-i)),i+r*(e-i)+t}function O(e,t=0,r=1,i,n){e.min=z(e.min,t,r,i,n),e.max=z(e.max,t,r,i,n)}function E(e,{x:t,y:r}){O(e.x,t.translate,t.scale,t.originPoint),O(e.y,r.translate,r.scale,r.originPoint)}function U(e,t){e.min=e.min+t,e.max=e.max+t}function D(e,t,r,i,n=.5){let a=N(e.min,e.max,n);O(e,t,r,a,i)}function A(e,t){D(e.x,t.x,t.scaleX,t.scale,t.originX),D(e.y,t.y,t.scaleY,t.scale,t.originY)}function Z(e,t){return S(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}let R=new Set(["width","height","top","left","right","bottom",...u]),M=(e,t,r)=>r>t?t:r<e?e:r,L={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},F={...L,transform:e=>M(0,1,e)},V={...L,default:1},B=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),W=B("deg"),G=B("%"),J=B("px"),X=B("vh"),H=B("vw"),K={...G,parse:e=>G.parse(e)/100,transform:e=>G.transform(100*e)},Y=e=>t=>t.test(e),q=[L,J,G,W,H,X,{test:e=>"auto"===e,parse:e=>e}],Q=e=>q.find(Y(e));e.i(45168);let ee=()=>{},et=()=>{},er=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ei=e=>e===L||e===J,en=new Set(["x","y","z"]),ea=u.filter(e=>!en.has(e)),es={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>y(t,"x"),y:(e,{transform:t})=>y(t,"y")};es.translateX=es.x,es.translateY=es.y;let eo=e=>e,el={},eu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ed(e,t){let r=!1,i=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,s=eu.reduce((e,r)=>(e[r]=function(e,t){let r=new Set,i=new Set,n=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(d.schedule(t),e()),l++,t(o)}let d={schedule:(e,t=!1,a=!1)=>{let o=a&&n?r:i;return t&&s.add(e),o.has(e)||o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,n){a=!0;return}n=!0,[r,i]=[i,r],r.forEach(u),t,l=0,r.clear(),n=!1,a&&(a=!1,d.process(e))}};return d}(a,t?r:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:d,update:c,preRender:m,render:h,postRender:p}=s,f=()=>{let a=el.useManualTiming?n.timestamp:performance.now();r=!1,el.useManualTiming||(n.delta=i?1e3/60:Math.max(Math.min(a-n.timestamp,40),1)),n.timestamp=a,n.isProcessing=!0,o.process(n),l.process(n),u.process(n),d.process(n),c.process(n),m.process(n),h.process(n),p.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(f))};return{schedule:eu.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(!r&&(r=!0,i=!0,n.isProcessing||e(f)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<eu.length;t++)s[eu[t]].cancel(e)},state:n,steps:s}}let{schedule:ec,cancel:em,state:eh,steps:ep}=ed("u">typeof requestAnimationFrame?requestAnimationFrame:eo,!0),ef=new Set,eg=!1,ex=!1,ev=!1;function ey(){if(ex){let e=Array.from(ef).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t,i=(t=[],ea.forEach(r=>{let i=e.getValue(r);void 0!==i&&(t.push([r,i.get()]),i.set(+!!r.startsWith("scale")))}),t);i.length&&(r.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ex=!1,eg=!1,ef.forEach(e=>e.complete(ev)),ef.clear()}function eb(){ef.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ex=!0)})}class ew{constructor(e,t,r,i,n,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=i,this.element=n,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ef.add(this),eg||(eg=!0,ec.read(eb),ec.resolveKeyframes(ey))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:i}=this;if(null===e[0]){let n=i?.get(),a=e[e.length-1];if(void 0!==n)e[0]=n;else if(r&&t){let i=r.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===n&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ef.delete(this)}cancel(){"scheduled"===this.state&&(ef.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let ek=e=>Math.round(1e5*e)/1e5,e$=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ej=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,e_=(e,t)=>r=>!!("string"==typeof r&&ej.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),eS=(e,t,r)=>i=>{if("string"!=typeof i)return i;let[n,a,s,o]=i.match(e$);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},eN={...L,transform:e=>Math.round(M(0,255,e))},eI={test:e_("rgb","red"),parse:eS("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+eN.transform(e)+", "+eN.transform(t)+", "+eN.transform(r)+", "+ek(F.transform(i))+")"},eP={test:e_("#"),parse:function(e){let t="",r="",i="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,i+=i,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}},transform:eI.transform},eC={test:e_("hsl","hue"),parse:eS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+G.transform(ek(t))+", "+G.transform(ek(r))+", "+ek(F.transform(i))+")"},eT={test:e=>eI.test(e)||eP.test(e)||eC.test(e),parse:e=>eI.test(e)?eI.parse(e):eC.test(e)?eC.parse(e):eP.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eI.transform(e):eC.transform(e),getAnimatableNone:e=>{let t=eT.parse(e);return t.alpha=0,eT.transform(t)}},ez=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eO="number",eE="color",eU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eD(e){let t=e.toString(),r=[],i={color:[],number:[],var:[]},n=[],a=0,s=t.replace(eU,e=>(eT.test(e)?(i.color.push(a),n.push(eE),r.push(eT.parse(e))):e.startsWith("var(")?(i.var.push(a),n.push("var"),r.push(e)):(i.number.push(a),n.push(eO),r.push(parseFloat(e))),++a,"${}")).split("${}");return{values:r,split:s,indexes:i,types:n}}function eA(e){return eD(e).values}function eZ(e){let{split:t,types:r}=eD(e),i=t.length;return e=>{let n="";for(let a=0;a<i;a++)if(n+=t[a],void 0!==e[a]){let t=r[a];t===eO?n+=ek(e[a]):t===eE?n+=eT.transform(e[a]):n+=e[a]}return n}}let eR=e=>"number"==typeof e?0:eT.test(e)?eT.getAnimatableNone(e):e,eM={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(e$)?.length||0)+(e.match(ez)?.length||0)>0},parse:eA,createTransformer:eZ,getAnimatableNone:function(e){let t=eA(e);return eZ(e)(t.map(eR))}},eL=new Set(["brightness","contrast","saturate","opacity"]);function eF(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=r.match(e$)||[];if(!i)return e;let n=r.replace(i,""),a=+!!eL.has(t);return i!==r&&(a*=100),t+"("+a+n+")"}let eV=/\b([a-z-]*)\(.*?\)/gu,eB={...eM,getAnimatableNone:e=>{let t=e.match(eV);return t?t.map(eF).join(" "):e}},eW={...L,transform:Math.round},eG={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,backgroundPositionX:J,backgroundPositionY:J,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:V,scaleX:V,scaleY:V,scaleZ:V,skew:W,skewX:W,skewY:W,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:F,originX:K,originY:K,originZ:J,zIndex:eW,fillOpacity:F,strokeOpacity:F,numOctaves:eW},eJ={...eG,color:eT,backgroundColor:eT,outlineColor:eT,fill:eT,stroke:eT,borderColor:eT,borderTopColor:eT,borderRightColor:eT,borderBottomColor:eT,borderLeftColor:eT,filter:eB,WebkitFilter:eB},eX=e=>eJ[e];function eH(e,t){let r=eX(e);return r!==eB&&(r=eM),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let eK=new Set(["auto","none","0"]);class eY extends ew{constructor(e,t,r,i,n){super(e,t,r,i,n,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let i=e[r];if("string"==typeof i&&j(i=i.trim())){let n=function e(t,r,i=1){et(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,a]=function(e){let t=er.exec(e);if(!t)return[,];let[,r,i,n]=t;return[`--${r??i}`,n]}(t);if(!n)return;let s=window.getComputedStyle(r).getPropertyValue(n);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return j(a)?e(a,r,i+1):a}(i,t.current);void 0!==n&&(e[r]=n),r===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!R.has(r)||2!==e.length)return;let[i,n]=e,a=Q(i),s=Q(n);if(a!==s)if(ei(a)&&ei(s))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else es[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&r.push(t);r.length&&function(e,t,r){let i,n=0;for(;n<e.length&&!i;){let t=e[n];"string"==typeof t&&!eK.has(t)&&eD(t).values.length&&(i=e[n]),n++}if(i&&r)for(let n of t)e[n]=eH(r,i)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=es[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(r,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let n=r.length-1,a=r[n];r[n]=es[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}let eq=e=>!!(e&&e.getVelocity);function eQ(){t=void 0}let e0={now:()=>(void 0===t&&e0.set(eh.isProcessing||el.useManualTiming?eh.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(eQ)}};function e1(e,t){-1===e.indexOf(t)&&e.push(t)}function e2(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class e4{constructor(){this.subscriptions=[]}add(e){return e1(this.subscriptions,e),()=>e2(this.subscriptions,e)}notify(e,t,r){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,r);else for(let n=0;n<i;n++){let i=this.subscriptions[n];i&&i(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class e5{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=e0.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e0.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new e4);let r=this.events[e].add(t);return"change"===e?()=>{r(),ec.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return i&&i.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e0.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function e6(e,t){return new e5(e,t)}let e3=[...q,eT,eM],{schedule:e9}=ed(queueMicrotask,!1),e8={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},e7={};for(let e in e8)e7[e]={isEnabled:t=>e8[e].some(e=>!!t[e])};let te=()=>({translate:0,scale:1,origin:0,originPoint:0}),tt=()=>({x:te(),y:te()}),tr=()=>({min:0,max:0}),ti=()=>({x:tr(),y:tr()}),tn="u">typeof window,ta={current:null},ts={current:!1},to=new WeakMap;function tl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}let td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tc=["initial",...td];function tm(e){return tl(e.animate)||tc.some(t=>tu(e[t]))}function th(e){return!!(tm(e)||e.variants)}function tp(e){let t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function tf(e,t,r,i){if("function"==typeof t){let[n,a]=tp(i);t=t(void 0!==r?r:e.custom,n,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[n,a]=tp(i);t=t(void 0!==r?r:e.custom,n,a)}return t}let tg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tx{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:n,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ew,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e0.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ec.render(this.render,!1,!0))};const{latestValues:o,renderState:l}=a;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!n,this.isControllingVariants=tm(t),this.isVariantNode=th(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==o[e]&&eq(t)&&t.set(o[e])}}mount(e){this.current=e,to.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),ts.current||function(){if(ts.current=!0,tn)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ta.current=e.matches;e.addEventListener("change",t),t()}else ta.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ta.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),em(this.notifyUpdate),em(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let r;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let i=d.has(e);i&&this.onBindTransform&&this.onBindTransform();let n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ec.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in e7){let t=e7[e];if(!t)continue;let{isEnabled:r,Feature:i}=t;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ti()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tg.length;t++){let r=tg[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let i=e["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=function(e,t,r){for(let i in t){let n=t[i],a=r[i];if(eq(n))e.addValue(i,n);else if(eq(a))e.addValue(i,e6(n,{owner:e}));else if(a!==n)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(n):t.hasAnimated||t.set(n)}else{let t=e.getStaticValue(i);e.addValue(i,e6(void 0!==t?t:n,{owner:e}))}}for(let i in r)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=e6(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=r){let i,n;if("string"==typeof r&&(i=r,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i)||(n=r,/^0[^.\s]+$/u.test(n))))r=parseFloat(r);else{let i;i=r,!e3.find(Y(i))&&eM.test(t)&&(r=eH(e,t))}this.setBaseTarget(e,eq(r)?r.get():r)}return eq(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let i=tf(this.props,r,this.presenceContext?.custom);i&&(t=i[e])}if(r&&void 0!==t)return t;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||eq(i)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new e4),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){e9.render(this.render)}}class tv extends tx{constructor(){super(...arguments),this.KeyframeResolver=eY}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;eq(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}let ty=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tw=u.length;function tk(e,t,r){let{style:i,vars:n,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let r=t[e];if(d.has(e)){s=!0;continue}if(k(e)){n[e]=r;continue}{let t=ty(r,eG[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(!t.transform&&(s||r?i.transform=function(e,t,r){let i="",n=!0;for(let a=0;a<tw;a++){let s=u[a],o=e[s];if(void 0===o)continue;let l=!0;if(!(l="number"==typeof o?o===+!!s.startsWith("scale"):0===parseFloat(o))||r){let e=ty(o,eG[s]);if(!l){n=!1;let t=tb[s]||s;i+=`${t}(${e}) `}r&&(t[s]=e)}}return i=i.trim(),r?i=r(t,n?"":i):n&&(i="none"),i}(t,e.transform,r):i.transform&&(i.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:r=0}=a;i.transformOrigin=`${e} ${t} ${r}`}}function t$(e,{style:t,vars:r},i,n){let a,s=e.style;for(a in t)s[a]=t[a];for(a in n?.applyProjectionStyles(s,i),r)s.setProperty(a,r[a])}function tj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let t_={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!J.test(e))return e;else e=parseFloat(e);let r=tj(e,t.target.x),i=tj(e,t.target.y);return`${r}% ${i}%`}},tS={borderRadius:{...t_,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:t_,borderTopRightRadius:t_,borderBottomLeftRadius:t_,borderBottomRightRadius:t_,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let i=eM.parse(e);if(i.length>5)return e;let n=eM.createTransformer(e),a=+("number"!=typeof i[0]),s=r.x.scale*t.x,o=r.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=N(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),n(i)}}};function tN(e,{layout:t,layoutId:r}){return d.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!tS[e]||"opacity"===e)}function tI(e,t,r){let{style:i}=e,n={};for(let a in i)(eq(i[a])||t.style&&eq(t.style[a])||tN(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=i[a]);return n}class tP extends tv{constructor(){super(...arguments),this.type="html",this.renderInstance=t$}readValueFromInstance(e,t){if(d.has(t))return this.projection?.isProjecting?v(t):((e,t)=>{let{transform:r="none"}=getComputedStyle(e);return y(r,t)})(e,t);{let r=window.getComputedStyle(e),i=(k(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Z(e,t)}build(e,t,r){tk(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return tI(e,t,r)}}let tC=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tT={offset:"stroke-dashoffset",array:"stroke-dasharray"},tz={offset:"strokeDashoffset",array:"strokeDasharray"};function tO(e,{attrX:t,attrY:r,attrScale:i,pathLength:n,pathSpacing:a=1,pathOffset:s=0,...o},l,u,d){if(tk(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:c,style:m}=e;c.transform&&(m.transform=c.transform,delete c.transform),(m.transform||c.transformOrigin)&&(m.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete c.transformBox),void 0!==t&&(c.x=t),void 0!==r&&(c.y=r),void 0!==i&&(c.scale=i),void 0!==n&&function(e,t,r=1,i=0,n=!0){e.pathLength=1;let a=n?tT:tz;e[a.offset]=J.transform(-i);let s=J.transform(t),o=J.transform(r);e[a.array]=`${s} ${o}`}(c,n,a,s,!1)}let tE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tU=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tD(e,t,r){let i=tI(e,t,r);for(let r in e)(eq(e[r])||eq(t[r]))&&(i[-1!==u.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return i}class tA extends tv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ti}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(d.has(t)){let e=eX(t);return e&&e.default||0}return t=tE.has(t)?t:tC(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return tD(e,t,r)}build(e,t,r){tO(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,i){for(let r in t$(e,t,void 0,i),t.attrs)e.setAttribute(tE.has(r)?r:tC(r),t.attrs[r])}mount(e){this.isSVGTag=tU(e.tagName),super.mount(e)}}let tZ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function tR(e){if("string"!=typeof e||e.includes("-"));else if(tZ.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let tM=(0,s.createContext)({}),tL=(0,s.createContext)({strict:!1}),tF=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),tV=(0,s.createContext)({});function tB(e){return Array.isArray(e)?e.join(" "):e}let tW=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tG(e,t,r){for(let i in t)eq(t[i])||tN(i,r)||(e[i]=t[i])}let tJ=()=>({...tW(),attrs:{}}),tX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tH(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tX.has(e)}let tK=e=>!tH(e);try{n=e.r(70606).default,"function"==typeof n&&(tK=e=>e.startsWith("on")?!tH(e):n(e))}catch{}let tY=(0,s.createContext)(null);function tq(e){let t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}function tQ(e){return eq(e)?e.get():e}let t0=e=>(t,r)=>{let i=(0,s.useContext)(tV),n=(0,s.useContext)(tY),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,n){return{latestValues:function(e,t,r,i){let n={},a=i(e,{});for(let e in a)n[e]=tQ(a[e]);let{initial:s,animate:o}=e,l=tm(e),u=th(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===o&&(o=t.animate));let d=!!r&&!1===r.initial,c=(d=d||!1===s)?o:s;if(c&&"boolean"!=typeof c&&!tl(c)){let t=Array.isArray(c)?c:[c];for(let r=0;r<t.length;r++){let i=tf(e,t[r]);if(i){let{transitionEnd:e,transition:t,...r}=i;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(n[e]=t)}for(let t in e)n[t]=e[t]}}}return n}(r,i,n,e),renderState:t()}})(e,t,i,n);return r?a():tq(a)},t1=t0({scrapeMotionValuesFromProps:tI,createRenderState:tW}),t2=t0({scrapeMotionValuesFromProps:tD,createRenderState:tJ}),t4=Symbol.for("motionComponentSymbol");function t5(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let t6="data-"+tC("framerAppearId"),t3=(0,s.createContext)({}),t9=tn?s.useLayoutEffect:s.useEffect;function t8(e,{forwardMotionProps:t=!1}={},r,i){r&&function(e){for(let t in e)e7[t]={...e7[t],...e[t]}}(r);let n=tR(e)?t2:t1;function o(r,o){var l;let u,d={...(0,s.useContext)(tF),...r,layoutId:function({layoutId:e}){let t=(0,s.useContext)(tM).id;return t&&void 0!==e?t+"-"+e:e}(r)},{isStatic:c}=d,m=function(e){let{initial:t,animate:r}=function(e,t){if(tm(e)){let{initial:t,animate:r}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(tV));return(0,s.useMemo)(()=>({initial:t,animate:r}),[tB(t),tB(r)])}(r),h=n(r,c);if(!c&&tn){(0,s.useContext)(tL).strict;let t=function(e){let{drag:t,layout:r}=e7;if(!t&&!r)return{};let i={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(d);u=t.MeasureLayout,m.visualElement=function(e,t,r,i,n){let{visualElement:a}=(0,s.useContext)(tV),o=(0,s.useContext)(tL),l=(0,s.useContext)(tY),u=(0,s.useContext)(tF).reducedMotion,d=(0,s.useRef)(null);i=i||o.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));let c=d.current,m=(0,s.useContext)(t3);c&&!c.projection&&n&&("html"===c.type||"svg"===c.type)&&function(e,t,r,i){let{layoutId:n,layout:a,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!s||o&&t5(o),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:u})}(d.current,r,n,m);let h=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{c&&h.current&&c.update(r,l)});let p=r[t6],f=(0,s.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return t9(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),f.current&&c.animationState&&c.animationState.animateChanges())}),(0,s.useEffect)(()=>{c&&(!f.current&&c.animationState&&c.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),f.current=!1),c.enteringChildren=void 0)}),c}(e,h,d,i,t.ProjectionNode)}return(0,a.jsxs)(tV.Provider,{value:m,children:[u&&m.visualElement?(0,a.jsx)(u,{visualElement:m.visualElement,...d}):null,function(e,t,r,{latestValues:i},n,a=!1){let o=(tR(e)?function(e,t,r,i){let n=(0,s.useMemo)(()=>{let r=tJ();return tO(r,t,tU(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};tG(t,e.style,e),n.style={...t,...n.style}}return n}:function(e,t){let r,i,n={},a=(r=e.style||{},tG(i={},r,e),Object.assign(i,function({transformTemplate:e},t){return(0,s.useMemo)(()=>{let r=tW();return tk(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),i);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=a,n})(t,i,n,e),l=function(e,t,r){let i={};for(let n in e)("values"!==n||"object"!=typeof e.values)&&(tK(n)||!0===r&&tH(n)||!t&&!tH(n)||e.draggable&&n.startsWith("onDrag"))&&(i[n]=e[n]);return i}(t,"string"==typeof e,a),u=e!==s.Fragment?{...l,...o,ref:r}:{},{children:d}=t,c=(0,s.useMemo)(()=>eq(d)?d.get():d,[d]);return(0,s.createElement)(e,{...u,children:c})}(e,r,(l=m.visualElement,(0,s.useCallback)(e=>{e&&h.onMount&&h.onMount(e),l&&(e?l.mount(e):l.unmount()),o&&("function"==typeof o?o(e):t5(o)&&(o.current=e))},[l])),h,c,t)]})}o.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,s.forwardRef)(o);return l[t4]=e,l}function t7(e,t,r){let i=e.getProps();return tf(i,t,void 0!==r?r:i.custom,e)}function re(e,t){return e?.[t]??e?.default??e}let rt=e=>Array.isArray(e);function rr(e,t){let r=e.getValue("willChange");if(eq(r)&&r.add)return r.add(t);if(!r&&el.WillChange){let r=new el.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ri(e){e.duration=0,e.type="keyframes"}let rn=(e,t)=>r=>t(e(r)),ra=(...e)=>e.reduce(rn),rs=e=>1e3*e,ro={layout:0,mainThread:0,waapi:0};function rl(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ru(e,t){return r=>r>0?t:e}let rd=(e,t,r)=>{let i=e*e,n=r*(t*t-i)+i;return n<0?0:Math.sqrt(n)},rc=[eP,eI,eC];function rm(e){let t=rc.find(t=>t.test(e));if(ee(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===eC&&(r=function({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,r/=100;let n=0,a=0,s=0;if(t/=100){let i=r<.5?r*(1+t):r+t-r*t,o=2*r-i;n=rl(o,i,e+1/3),a=rl(o,i,e),s=rl(o,i,e-1/3)}else n=a=s=r;return{red:Math.round(255*n),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(r)),r}let rh=(e,t)=>{let r=rm(e),i=rm(t);if(!r||!i)return ru(e,t);let n={...r};return e=>(n.red=rd(r.red,i.red,e),n.green=rd(r.green,i.green,e),n.blue=rd(r.blue,i.blue,e),n.alpha=N(r.alpha,i.alpha,e),eI.transform(n))},rp=new Set(["none","hidden"]);function rf(e,t){return r=>N(e,t,r)}function rg(e){return"number"==typeof e?rf:"string"==typeof e?j(e)?ru:eT.test(e)?rh:ry:Array.isArray(e)?rx:"object"==typeof e?eT.test(e)?rh:rv:ru}function rx(e,t){let r=[...e],i=r.length,n=e.map((e,r)=>rg(e)(e,t[r]));return e=>{for(let t=0;t<i;t++)r[t]=n[t](e);return r}}function rv(e,t){let r={...e,...t},i={};for(let n in r)void 0!==e[n]&&void 0!==t[n]&&(i[n]=rg(e[n])(e[n],t[n]));return e=>{for(let t in i)r[t]=i[t](e);return r}}let ry=(e,t)=>{let r=eM.createTransformer(t),i=eD(e),n=eD(t);if(!(i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length))return ee(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ru(e,t);if(rp.has(e)&&!n.values.length||rp.has(t)&&!i.values.length)return rp.has(e)?r=>r<=0?e:t:r=>r>=1?t:e;return ra(rx(function(e,t){let r=[],i={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],s=e.indexes[a][i[a]],o=e.values[s]??0;r[n]=o,i[a]++}return r}(i,n),n.values),r)};function rb(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?N(e,t,r):rg(e)(e,t)}let rw=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ec.update(t,e),stop:()=>em(t),now:()=>eh.isProcessing?eh.timestamp:e0.now()}},rk=(e,t,r=10)=>{let i="",n=Math.max(Math.round(t/r),2);for(let t=0;t<n;t++)i+=Math.round(1e4*e(t/(n-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function r$(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}function rj(e,t,r){var i,n;let a=Math.max(t-5,0);return i=r-e(a),(n=t-a)?1e3/n*i:0}let r_=.01,rS=2,rN=.005,rI=.5;function rP(e,t){return e*Math.sqrt(1-t*t)}let rC=["duration","bounce"],rT=["stiffness","damping","mass"];function rz(e,t){return t.some(t=>void 0!==e[t])}function rO(e=.3,t=.3){let r,i="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:a}=i,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:d,mass:c,duration:m,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!rz(e,rT)&&rz(e,rC))if(e.visualDuration){let r=2*Math.PI/(1.2*e.visualDuration),i=r*r,n=2*M(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:n}}else{let r=function({duration:e=800,bounce:t=.3,velocity:r=0,mass:i=1}){let n,a;ee(e<=rs(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=M(.05,1,s),e=M(.01,10,e/1e3),s<1?(n=t=>{let i=t*s,n=i*e;return .001-(i-r)/rP(t,s)*Math.exp(-n)},a=t=>{let i=t*s*e,a=Math.pow(s,2)*Math.pow(t,2)*e,o=Math.exp(-i),l=rP(Math.pow(t,2),s);return(i*r+r-a)*o*(-n(t)+.001>0?-1:1)/l}):(n=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),a=t=>e*e*(r-t)*Math.exp(-t*e));let o=function(e,t,r){let i=r;for(let r=1;r<12;r++)i-=e(i)/t(i);return i}(n,a,5/e);if(e=rs(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...i,velocity:-((i.velocity||0)/1e3)}),f=h||0,g=d/(2*Math.sqrt(u*c)),x=o-s,v=Math.sqrt(u/c)/1e3,y=5>Math.abs(x);if(n||(n=y?r_:rS),a||(a=y?rN:rI),g<1){let e=rP(v,g);r=t=>o-Math.exp(-g*v*t)*((f+g*v*x)/e*Math.sin(e*t)+x*Math.cos(e*t))}else if(1===g)r=e=>o-Math.exp(-v*e)*(x+(f+v*x)*e);else{let e=v*Math.sqrt(g*g-1);r=t=>{let r=Math.exp(-g*v*t),i=Math.min(e*t,300);return o-r*((f+g*v*x)*Math.sinh(i)+e*x*Math.cosh(i))/e}}let b={calculatedDuration:p&&m||null,next:e=>{let t=r(e);if(p)l.done=e>=m;else{let i=0===e?f:0;g<1&&(i=0===e?rs(f):rj(r,e,t));let s=Math.abs(o-t)<=a;l.done=Math.abs(i)<=n&&s}return l.value=l.done?o:t,l},toString:()=>{let e=Math.min(r$(b),2e4),t=rk(t=>b.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return b}function rE({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:d}){let c,m,h=e[0],p={done:!1,value:h},f=r*t,g=h+f,x=void 0===s?g:s(g);x!==g&&(f=x-h);let v=e=>-f*Math.exp(-e/i),y=e=>x+v(e),b=e=>{let t=v(e),r=y(e);p.done=Math.abs(t)<=u,p.value=p.done?x:r},w=e=>{let t;if(t=p.value,void 0!==o&&t<o||void 0!==l&&t>l){var r;c=e,m=rO({keyframes:[p.value,(r=p.value,void 0===o?l:void 0===l||Math.abs(o-r)<Math.abs(l-r)?o:l)],velocity:rj(y,e,p.value),damping:n,stiffness:a,restDelta:u,restSpeed:d})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(m||void 0!==c||(t=!0,b(e),w(e)),void 0!==c&&e>=c)?m.next(e-c):(t||b(e),p)}}}rO.applyToOptions=e=>{let t=function(e,t=100,r){let i=r({...e,keyframes:[0,t]}),n=Math.min(r$(i),2e4);return{type:"keyframes",ease:e=>i.next(n*e).value/t,duration:n/1e3}}(e,100,rO);return e.ease=t.ease,e.duration=rs(t.duration),e.type="keyframes",e};let rU=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function rD(e,t,r,i){return e===t&&r===i?eo:n=>0===n||1===n?n:rU(function(e,t,r,i,n){let a,s,o=0;do(a=rU(s=t+(r-t)/2,i,n)-e)>0?r=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(n,0,1,e,r),t,i)}let rA=rD(.42,0,1,1),rZ=rD(0,0,.58,1),rR=rD(.42,0,.58,1),rM=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rL=e=>t=>1-e(1-t),rF=rD(.33,1.53,.69,.99),rV=rL(rF),rB=rM(rV),rW=e=>(e*=2)<1?.5*rV(e):.5*(2-Math.pow(2,-10*(e-1))),rG=e=>1-Math.sin(Math.acos(e)),rJ=rL(rG),rX=rM(rG),rH=e=>Array.isArray(e)&&"number"==typeof e[0],rK={linear:eo,easeIn:rA,easeInOut:rR,easeOut:rZ,circIn:rG,circInOut:rX,circOut:rJ,backIn:rV,backInOut:rB,backOut:rF,anticipate:rW},rY=e=>{if(rH(e)){et(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,i,n]=e;return rD(t,r,i,n)}return"string"==typeof e?(et(void 0!==rK[e],`Invalid easing type '${e}'`,"invalid-easing-type"),rK[e]):e},rq=(e,t,r)=>{let i=t-e;return 0===i?1:(r-e)/i};function rQ({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){var n;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(rY):rY(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:r=!0,ease:i,mixer:n}={}){let a=e.length;if(et(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,r){let i=[],n=r||el.mix||rb,a=e.length-1;for(let r=0;r<a;r++){let a=n(e[r],e[r+1]);t&&(a=ra(Array.isArray(t)?t[r]||eo:t,a)),i.push(a)}return i}(t,i,n),l=o.length,u=r=>{if(s&&r<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(r<e[i+1]);i++);let n=rq(e[i],e[i+1],r);return o[i](n)};return r?t=>u(M(e[0],e[a-1],t)):u}((n=r&&r.length===t.length?r:(!function(e,t){let r=e[e.length-1];for(let i=1;i<=t;i++){let n=rq(0,t,i);e.push(N(r,1,n))}}(a=[0],t.length-1),a),n.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||rR).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}let r0=e=>null!==e;function r1(e,{repeat:t,repeatType:r="loop"},i,n=1){let a=e.filter(r0),s=n<0||t&&"loop"!==r&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}let r2={decay:rE,inertia:rE,tween:rQ,keyframes:rQ,spring:rO};function r4(e){"string"==typeof e.type&&(e.type=r2[e.type])}class r5{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let r6=e=>e/100;class r3 extends r5{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==e0.now()&&this.tick(e0.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ro.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;r4(e);let{type:t=rQ,repeat:r=0,repeatDelay:i=0,repeatType:n,velocity:a=0}=e,{keyframes:s}=e,o=t||rQ;o!==rQ&&"number"!=typeof s[0]&&(this.mixKeyframes=ra(r6,rb(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s});"mirror"===n&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=r$(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:r,totalDuration:i,mixKeyframes:n,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:o}=this;if(null===this.startTime)return r.next(0);let{delay:l=0,keyframes:u,repeat:d,repeatType:c,repeatDelay:m,type:h,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,y=r;if(d){let e=Math.min(this.currentTime,i)/s,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,d+1))%2&&("reverse"===c?(r=1-r,m&&(r-=m/s)):"mirror"===c&&(y=a)),v=M(0,1,r)*s}let b=x?{done:!1,value:u[0]}:y.next(v);n&&(b.value=n(b.value));let{done:w}=b;x||null===o||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&h!==rE&&(b.value=r1(u,this.options,f,this.speed)),p&&p(b.value),k&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=rs(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(e0.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=rw,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(e0.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ro.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function r9(e){let t;return()=>(void 0===t&&(t=e()),t)}let r8=r9(()=>void 0!==window.ScrollTimeline),r7={},ie=(r=r9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),()=>r7.linearEasing??r()),it=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,ir={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:it([0,.65,.55,1]),circOut:it([.55,0,1,.45]),backIn:it([.31,.01,.66,-.59]),backOut:it([.33,1.53,.69,.99])};function ii(e){return"function"==typeof e&&"applyToOptions"in e}class ia extends r5{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:i,pseudoElement:n,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!n,this.allowFlatten=a,this.options=e,et("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return ii(e)&&ie()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,r,{delay:i=0,duration:n=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let d={[t]:r};l&&(d.offset=l);let c=function e(t,r){if(t)return"function"==typeof t?ie()?rk(t,r):"ease-out":rH(t)?it(t):Array.isArray(t)?t.map(t=>e(t,r)||ir.easeOut):ir[t]}(o,n);Array.isArray(c)&&(d.easing=c);let m={delay:i,duration:n,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(m.pseudoElement=u);let h=e.animate(d,m);return h}(t,r,i,l,n),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let e=r1(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):r.startsWith("--")?t.style.setProperty(r,e):t.style[r]=e,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){this.finishedTime=null,this.animation.currentTime=rs(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&r8())?(this.animation.timeline=e,eo):t(this)}}let is={anticipate:rW,backInOut:rB,circInOut:rX};class io extends ia{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in is&&(e.ease=is[e.ease])}(e),r4(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:r,onComplete:i,element:n,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new r3({...a,autoplay:!1}),o=rs(this.finishedTime??this.time);t.setWithVelocity(s.sample(o-10).value,s.sample(o).value,10),s.stop()}}let il=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eM.test(e)||"0"===e)&&!e.startsWith("url(")),iu=new Set(["opacity","clipPath","filter","transform"]),id=r9(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ic extends r5{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:i=0,repeatDelay:n=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=e0.now();const c={autoplay:e,delay:t,type:r,repeat:i,repeatDelay:n,repeatType:a,name:o,motionValue:l,element:u,...d},m=u?.KeyframeResolver||ew;this.keyframeResolver=new m(s,(e,t,r)=>this.onKeyframesResolved(e,t,c,!r),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,i){this.keyframeResolver=void 0;let{name:n,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=r;this.resolvedAt=e0.now(),!function(e,t,r,i){let n=e[0];if(null===n)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=il(n,t),o=il(a,t);return ee(s===o,`You are trying to animate ${t} from "${n}" to "${a}". "${s?a:n}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||ii(r))&&i)}(e,n,a,s)&&((el.instantAnimations||!o)&&u?.(r1(e,r,t)),e[0]=e[e.length-1],ri(r),r.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},c=!l&&function(e){let{motionValue:t,name:r,repeatDelay:i,repeatType:n,damping:a,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:o,transformTemplate:l}=t.owner.getProps();return id()&&r&&iu.has(r)&&("transform"!==r||!l)&&!o&&!i&&"mirror"!==n&&0!==a&&"inertia"!==s}(d)?new io({...d,element:d.motionValue.owner.current}):new r3(d);c.finished.then(()=>this.notifyFinished()).catch(eo),this.pendingTimeline&&(this.stopTimeline=c.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=c}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ev=!0,eb(),ey(),ev=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let im=e=>null!==e,ih={type:"spring",stiffness:500,damping:25,restSpeed:10},ip={type:"keyframes",duration:.8},ig={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ix=(e,t,r,i={},n,a)=>s=>{let o=re(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=rs(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:n};!function({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:n,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:u,...d}){return!!Object.keys(d).length}(o)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?ip:d.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ih:ig)(e,c)),c.duration&&(c.duration=rs(c.duration)),c.repeatDelay&&(c.repeatDelay=rs(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let m=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(ri(c),0===c.delay&&(m=!0)),(el.instantAnimations||el.skipAnimations)&&(m=!0,ri(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,m&&!a&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:r="loop"},i){let n=e.filter(im),a=t&&"loop"!==r&&t%2==1?0:n.length-1;return n[a]}(c.keyframes,o);if(void 0!==e)return void ec.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new r3(c):new ic(c)};function iv(e,t,{delay:r=0,transitionOverride:i,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=t;i&&(a=i);let l=[],u=n&&e.animationState&&e.animationState.getState()[n];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),n=o[t];if(void 0===n||u&&function({protectedKeys:e,needsAnimating:t},r){let i=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,i}(u,t))continue;let s={delay:r,...re(a||{},t)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(n)&&n===d&&!s.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){let r=e.props[t6];if(r){let e=window.MotionHandoffAnimation(r,t,ec);null!==e&&(s.startTime=e,c=!0)}}rr(e,t),i.start(ix(t,i,n,e.shouldReduceMotion&&R.has(t)?{type:!1}:s,e,c));let m=i.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{ec.update(()=>{s&&function(e,t){let{transitionEnd:r={},transition:i={},...n}=t7(e,t)||{};for(let t in n={...n,...r}){var a;let r=rt(a=n[t])?a[a.length-1]||0:a;e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,e6(r))}}(e,s)})}),l}function iy(e,t,r,i=0,n=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof r?r(a,s):1===n?a*i:o-a*i}function ib(e,t,r={}){let i=t7(e,t,"exit"===r.type?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(n=r.transitionOverride);let a=i?()=>Promise.all(iv(e,i,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=n;return function(e,t,r=0,i=0,n=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(ib(l,t,{...s,delay:r+("function"==typeof i?0:i)+iy(e.variantChildren,l,i,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,r)}:()=>Promise.resolve(),{when:o}=n;if(!o)return Promise.all([a(),s(r.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}function iw(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}let ik=tc.length,i$=[...td].reverse(),ij=td.length;function i_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iS(){return{animate:i_(!0),whileInView:i_(),whileHover:i_(),whileTap:i_(),whileDrag:i_(),whileFocus:i_(),exit:i_()}}class iN{constructor(e){this.isMounted=!1,this.node=e}update(){}}let iI=0,iP={x:!1,y:!1};function iC(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}let iT=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function iz(e){return{point:{x:e.pageX,y:e.pageY}}}function iO(e,t,r,i){return iC(e,t,e=>iT(e)&&r(e,iz(e)),i)}function iE(e){return e.max-e.min}function iU(e,t,r,i=.5){e.origin=i,e.originPoint=N(t.min,t.max,e.origin),e.scale=iE(r)/iE(t),e.translate=N(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function iD(e,t,r,i){iU(e.x,t.x,r.x,i?i.originX:void 0),iU(e.y,t.y,r.y,i?i.originY:void 0)}function iA(e,t,r){e.min=r.min+t.min,e.max=e.min+iE(t)}function iZ(e,t,r){e.min=t.min-r.min,e.max=e.min+iE(t)}function iR(e,t,r){iZ(e.x,t.x,r.x),iZ(e.y,t.y,r.y)}function iM(e){return[e("x"),e("y")]}let iL=({current:e})=>e?e.ownerDocument.defaultView:null,iF=(e,t)=>Math.abs(e-t);class iV{constructor(e,t,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:n=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=iG(this.lastMoveEventInfo,this.history),i=null!==this.startEvent,n=(e=r.offset,t={x:0,y:0},Math.sqrt(iF(e.x,t.x)**2+iF(e.y,t.y)**2)>=this.distanceThreshold);if(!i&&!n)return;let{point:a}=r,{timestamp:s}=eh;this.history.push({...a,timestamp:s});let{onStart:o,onMove:l}=this.handlers;i||(o&&o(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=iB(t,this.transformPagePoint),ec.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:i,resumeAnimation:n}=this.handlers;if(this.dragSnapToOrigin&&n&&n(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=iG("pointercancel"===e.type?this.lastMoveEventInfo:iB(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,a),i&&i(e,a)},!iT(e))return;this.dragSnapToOrigin=n,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=iB(iz(e),this.transformPagePoint),{point:o}=s,{timestamp:l}=eh;this.history=[{...o,timestamp:l}];const{onSessionStart:u}=t;u&&u(e,iG(s,this.history)),this.removeListeners=ra(iO(this.contextWindow,"pointermove",this.handlePointerMove),iO(this.contextWindow,"pointerup",this.handlePointerUp),iO(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),em(this.updatePoint)}}function iB(e,t){return t?{point:t(e.point)}:e}function iW(e,t){return{x:e.x-t.x,y:e.y-t.y}}function iG({point:e},t){return{point:e,delta:iW(e,iJ(t)),offset:iW(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null,n=iJ(e);for(;r>=0&&(i=e[r],!(n.timestamp-i.timestamp>rs(.1)));)r--;if(!i)return{x:0,y:0};let a=(n.timestamp-i.timestamp)/1e3;if(0===a)return{x:0,y:0};let s={x:(n.x-i.x)/a,y:(n.y-i.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,.1)}}function iJ(e){return e[e.length-1]}function iX(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function iH(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function iK(e,t,r){return{min:iY(e,t),max:iY(e,r)}}function iY(e,t){return"number"==typeof e?e:e[t]||0}let iq=new WeakMap;class iQ{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ti(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let n=e=>{let{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(iz(e).point)},a=(e,t)=>{let{drag:r,dragPropagation:i,onDragStart:n}=this.getProps();if(r&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(iP[e])return null;else return iP[e]=!0,()=>{iP[e]=!1};return iP.x||iP.y?null:(iP.x=iP.y=!0,()=>{iP.x=iP.y=!1})}(r),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),iM(e=>{let t=this.getAxisMotionValue(e).get()||0;if(G.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let i=r.layout.layoutBox[e];i&&(t=iE(i)*(parseFloat(t)/100))}}this.originPoint[e]=t}),n&&ec.postRender(()=>n(e,t)),rr(this.visualElement,"transform");let{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:r,dragDirectionLock:i,onDirectionLock:n,onDrag:a}=this.getProps();if(!r&&!this.openDragLock)return;let{offset:s}=t;if(i&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(s),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>iM(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new iV(e,{onSessionStart:n,onStart:a,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:iL(this.visualElement)})}stop(e,t){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!i||!r)return;let{velocity:a}=i;this.startAnimation(a);let{onDragEnd:s}=this.getProps();s&&ec.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){let{drag:i}=this.getProps();if(!r||!i0(e,i,this.currentDirection))return;let n=this.getAxisMotionValue(e),a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:r},i){return void 0!==t&&e<t?e=i?N(t,e,i.min):Math.max(e,t):void 0!==r&&e>r&&(e=i?N(r,e,i.max):Math.min(e,r)),e}(a,this.constraints[e],this.elastic[e])),n.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&t5(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=function(e,{top:t,left:r,bottom:i,right:n}){return{x:iX(e.x,r,n),y:iX(e.y,t,i)}}(r.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:iK(e,"left","right"),y:iK(e,"top","bottom")}}(t),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&iM(e=>{var t,i;let n;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=r.layoutBox[e],i=this.constraints[e],n={},void 0!==i.min&&(n.min=i.min-t.min),void 0!==i.max&&(n.max=i.max-t.min),n))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!t5(t))return!1;let i=t.current;et(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=function(e,t,r){let i=Z(e,r),{scroll:n}=t;return n&&(U(i.x,n.offset.x),U(i.y,n.offset.y)),i}(i,n.root,this.visualElement.getTransformPagePoint()),s=(e=n.layout.layoutBox,{x:iH(e.x,a.x),y:iH(e.y,a.y)});if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=S(e))}return s}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:i,dragTransition:n,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{};return Promise.all(iM(s=>{if(!i0(s,t,this.currentDirection))return;let l=o&&o[s]||{};a&&(l={min:0,max:0});let u={type:"inertia",velocity:r?e[s]:0,bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return rr(this.visualElement,e),r.start(ix(e,r,0,t,this.visualElement,!1))}stopAnimation(){iM(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){iM(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){iM(t=>{let{drag:r}=this.getProps();if(!i0(t,r,this.currentDirection))return;let{projection:i}=this.visualElement,n=this.getAxisMotionValue(t);if(i&&i.layout){let{min:r,max:a}=i.layout.layoutBox[t];n.set(e[t]-N(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!t5(t)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};iM(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var r,n;let a,s,o,l=t.get();i[e]=(r={min:l,max:l},n=this.constraints[e],a=.5,s=iE(r),(o=iE(n))>s?a=rq(n.min,n.max-s,r.min):s>o&&(a=rq(r.min,r.max-o,n.min)),M(0,1,a))}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),iM(t=>{if(!i0(t,e,null))return;let r=this.getAxisMotionValue(t),{min:n,max:a}=this.constraints[t];r.set(N(n,a,i[t]))})}addListeners(){if(!this.visualElement.current)return;iq.set(this.visualElement,this);let e=iO(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();t5(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ec.read(t);let n=iC(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(iM(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{n(),e(),i(),a&&a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:n=!1,dragElastic:a=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:i,dragConstraints:n,dragElastic:a,dragMomentum:s}}}function i0(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let i1=e=>(t,r)=>{e&&ec.postRender(()=>e(t,r))};var i2=s;function i4(e=!0){let t=(0,s.useContext)(tY);if(null===t)return[!0,null];let{isPresent:r,onExitComplete:i,register:n}=t,a=(0,s.useId)();(0,s.useEffect)(()=>{if(e)return n(a)},[e]);let o=(0,s.useCallback)(()=>e&&i&&i(a),[a,i,e]);return!r&&i?[!1,o]:[!0]}let i5={hasAnimatedSinceResize:!0,hasEverUpdated:!1},i6=!1;class i3 extends i2.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:i}=this.props,{projection:n}=e;n&&(t.group&&t.group.add(n),r&&r.register&&i&&r.register(n),i6&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),i5.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:i,isPresent:n}=this.props,{projection:a}=r;return a&&(a.isPresent=n,i6=!0,i||e.layoutDependency!==t||void 0===t||e.isPresent!==n?a.willUpdate():this.safeToRemove(),e.isPresent!==n&&(n?a.promote():a.relegate()||ec.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),e9.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:i}=e;i6=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function i9(e){let[t,r]=i4(),i=(0,i2.useContext)(tM);return(0,a.jsx)(i3,{...e,layoutGroup:i,switchLayoutGroup:(0,i2.useContext)(t3),isPresent:t,safeToRemove:r})}function i8(e){return"object"==typeof e&&null!==e}function i7(e){return i8(e)&&"ownerSVGElement"in e}let ne=(e,t)=>e.depth-t.depth;class nt{constructor(){this.children=[],this.isDirty=!1}add(e){e1(this.children,e),this.isDirty=!0}remove(e){e2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ne),this.isDirty=!1,this.children.forEach(e)}}let nr=["TopLeft","TopRight","BottomLeft","BottomRight"],ni=nr.length,nn=e=>"string"==typeof e?parseFloat(e):e,na=e=>"number"==typeof e||J.test(e);function ns(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let no=nu(0,.5,rJ),nl=nu(.5,.95,eo);function nu(e,t,r){return i=>i<e?0:i>t?1:r(rq(e,t,i))}function nd(e,t){e.min=t.min,e.max=t.max}function nc(e,t){nd(e.x,t.x),nd(e.y,t.y)}function nm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nh(e,t,r,i,n){return e-=t,e=i+1/r*(e-i),void 0!==n&&(e=i+1/n*(e-i)),e}function np(e,t,[r,i,n],a,s){!function(e,t=0,r=1,i=.5,n,a=e,s=e){if(G.test(t)&&(t=parseFloat(t),t=N(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let o=N(a.min,a.max,i);e===a&&(o-=t),e.min=nh(e.min,t,r,o,n),e.max=nh(e.max,t,r,o,n)}(e,t[r],t[i],t[n],t.scale,a,s)}let nf=["x","scaleX","originX"],ng=["y","scaleY","originY"];function nx(e,t,r,i){np(e.x,t,nf,r?r.x:void 0,i?i.x:void 0),np(e.y,t,ng,r?r.y:void 0,i?i.y:void 0)}function nv(e){return 0===e.translate&&1===e.scale}function ny(e){return nv(e.x)&&nv(e.y)}function nb(e,t){return e.min===t.min&&e.max===t.max}function nw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nk(e,t){return nw(e.x,t.x)&&nw(e.y,t.y)}function n$(e){return iE(e.x)/iE(e.y)}function nj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class n_{constructor(){this.members=[]}add(e){e1(this.members,e),e.scheduleRender()}remove(e){if(e2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:i}=e.options;!1===i&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let nS=["","X","Y","Z"],nN=0;function nI(e,t,r,i){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),i&&(i[e]=0))}function nP({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:n}){return class{constructor(e={},r=t?.()){this.id=nN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(nz),this.nodes.forEach(nR),this.nodes.forEach(nM),this.nodes.forEach(nO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nt)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new e4),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=i7(t)&&!(i7(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:r,layout:i,visualElement:n}=this.options;if(n&&!n.current&&n.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let r,i=0,n=()=>this.root.updateBlockedByResize=!1;ec.read(()=>{i=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==i){let t,a;i=e,this.root.updateBlockedByResize=!0,r&&r(),t=e0.now(),a=({timestamp:e})=>{let r=e-t;r>=250&&(em(a),n(r-250))},ec.setup(a,!0),r=()=>em(a),i5.hasAnimatedSinceResize&&(i5.hasAnimatedSinceResize=!1,this.nodes.forEach(nZ))}})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&n&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||nG,{onLayoutAnimationStart:s,onLayoutAnimationComplete:o}=n.getProps(),l=!this.targetLayout||!nk(this.targetLayout,i),u=!t&&r;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...re(a,"layout"),onPlay:s,onComplete:o};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||nZ(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),em(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(nL),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let i=r.props[t6];if(window.MotionHasOptimisedAnimation(i,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",ec,!(e||r))}let{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&e(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nU);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(nD);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nA),this.nodes.forEach(nC),this.nodes.forEach(nT)):this.nodes.forEach(nD),this.clearAllSnapshots();let e=e0.now();eh.delta=M(0,1e3/60,e-eh.timestamp),eh.timestamp=e,eh.isProcessing=!0,ep.update.process(eh),ep.preRender.process(eh),ep.render.process(eh),eh.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e9.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nE),this.sharedNodes.forEach(nF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ec.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ec.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||iE(this.snapshot.measuredBox.x)||iE(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ti(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!n)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ny(this.projectionDelta),r=this.getTransformTemplate(),i=r?r(this.latestValues,""):void 0,a=i!==this.prevTransformTemplateValue;e&&this.instance&&(t||C(this.latestValues)||a)&&(n(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),i=this.removeElementScroll(r);return e&&(i=this.removeTransform(i)),nH((t=i).x),nH(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ti();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nY))){let{scroll:e}=this.root;e&&(U(t.x,e.offset.x),U(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ti();if(nc(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){let i=this.path[r],{scroll:n,options:a}=i;i!==this.root&&n&&a.layoutScroll&&(n.wasRoot&&nc(t,e),U(t.x,n.offset.x),U(t.y,n.offset.y))}return t}applyTransform(e,t=!1){let r=ti();nc(r,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&A(r,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),C(i.latestValues)&&A(r,i.latestValues)}return C(this.latestValues)&&A(r,this.latestValues),r}removeTransform(e){let t=ti();nc(t,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];if(!r.instance||!C(r.latestValues))continue;P(r.latestValues)&&r.updateSnapshot();let i=ti();nc(i,r.measurePageBox()),nx(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,i)}return C(this.latestValues)&&nx(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eh.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let r=!!this.resumingFrom||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:i,layoutId:n}=this.options;if(!this.layout||!(i||n))return;this.resolvedRelativeTargetAt=eh.timestamp;let a=this.getClosestProjectingParent();if(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=ti(),this.targetWithTransforms=ti()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,o,l;this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,l=this.relativeParent.target,iA(s.x,o.x,l.x),iA(s.y,o.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nc(this.target,this.layout.layoutBox),E(this.target,this.targetDelta)):nc(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||P(this.parent.latestValues)||T(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,r){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ti(),this.relativeTargetOrigin=ti(),iR(this.relativeTargetOrigin,t,r),nc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===eh.timestamp&&(r=!1),r)return;let{layout:i,layoutId:n}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||n))return;nc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,s=this.treeScale.y;!function(e,t,r,i=!1){let n,a,s=r.length;if(s){t.x=t.y=1;for(let o=0;o<s;o++){a=(n=r[o]).projectionDelta;let{visualElement:s}=n.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(i&&n.options.layoutScroll&&n.scroll&&n!==n.root&&A(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,E(e,a)),i&&C(n.latestValues)&&A(e,n.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=ti());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nm(this.prevProjectionDelta.x,this.projectionDelta.x),nm(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),iD(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&nj(this.projectionDelta.x,this.prevProjectionDelta.x)&&nj(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=tt(),this.projectionDelta=tt(),this.projectionDeltaWithTransform=tt()}setAnimationOrigin(e,t=!1){let r,i=this.snapshot,n=i?i.latestValues:{},a={...this.latestValues},s=tt();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=ti(),l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),d=!u||u.members.length<=1,c=!!(l&&!d&&!0===this.options.crossfade&&!this.path.some(nW));this.animationProgress=0,this.mixTargetDelta=t=>{let i=t/1e3;if(nV(s.x,e.x,i),nV(s.y,e.y,i),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,m,h,p,f,g;iR(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=i,nB(h.x,p.x,f.x,g),nB(h.y,p.y,f.y,g),r&&(u=this.relativeTarget,m=r,nb(u.x,m.x)&&nb(u.y,m.y))&&(this.isProjectionDirty=!1),r||(r=ti()),nc(r,this.relativeTarget)}l&&(this.animationValues=a,function(e,t,r,i,n,a){n?(e.opacity=N(0,r.opacity??1,no(i)),e.opacityExit=N(t.opacity??1,0,nl(i))):a&&(e.opacity=N(t.opacity??1,r.opacity??1,i));for(let n=0;n<ni;n++){let a=`border${nr[n]}Radius`,s=ns(t,a),o=ns(r,a);(void 0!==s||void 0!==o)&&(s||(s=0),o||(o=0),0===s||0===o||na(s)===na(o)?(e[a]=Math.max(N(nn(s),nn(o),i),0),(G.test(o)||G.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||r.rotate)&&(e.rotate=N(t.rotate||0,r.rotate||0,i))}(a,n,this.latestValues,i,c,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(em(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ec.update(()=>{var t,r,i;let n;i5.hasAnimatedSinceResize=!0,ro.layout++,this.motionValue||(this.motionValue=e6(0)),this.currentAnimation=(t=this.motionValue,r=[0,1e3],i={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{ro.layout--},onComplete:()=>{ro.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(n=eq(t)?t:e6(t)).start(ix("",n,r,i)),n.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:i,latestValues:n}=e;if(t&&r&&i){if(this!==e&&this.layout&&i&&nK(this.options.animationType,this.layout.layoutBox,i.layoutBox)){r=this.target||ti();let t=iE(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let i=iE(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+i}nc(t,r),A(t,n),iD(this.projectionDeltaWithTransform,this.layoutCorrected,t,n)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new n_),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let i=this.getStack();i&&i.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let i={};r.z&&nI("z",e,i,this.animationValues);for(let t=0;t<nS.length;t++)nI(`rotate${nS[t]}`,e,i,this.animationValues),nI(`skew${nS[t]}`,e,i,this.animationValues);for(let t in e.render(),i)e.setStaticValue(t,i[t]),this.animationValues&&(this.animationValues[t]=i[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=tQ(t?.pointerEvents)||"",e.transform=r?r(this.latestValues,""):"none";return}let i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=tQ(t?.pointerEvents)||""),this.hasProjected&&!C(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1);return}e.visibility="";let n=i.animationValues||i.latestValues;this.applyTransformsToTarget();let a=function(e,t,r){let i="",n=e.x.translate/t.x,a=e.y.translate/t.y,s=r?.z||0;if((n||a||s)&&(i=`translate3d(${n}px, ${a}px, ${s}px) `),(1!==t.x||1!==t.y)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:n,rotateY:a,skewX:s,skewY:o}=r;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),n&&(i+=`rotateX(${n}deg) `),a&&(i+=`rotateY(${a}deg) `),s&&(i+=`skewX(${s}deg) `),o&&(i+=`skewY(${o}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(i+=`scale(${o}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,n);r&&(a=r(n,a)),e.transform=a;let{x:s,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*o.origin}% 0`,i.animationValues?e.opacity=i===this?n.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:n.opacityExit:e.opacity=i===this?void 0!==n.opacity?n.opacity:"":void 0!==n.opacityExit?n.opacityExit:0,tS){if(void 0===n[t])continue;let{correct:r,applyTo:s,isCSSVariable:o}=tS[t],l="none"===a?n[t]:r(n[t],i);if(s){let t=s.length;for(let r=0;r<t;r++)e[s[r]]=l}else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=i===this?tQ(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(nU),this.root.sharedNodes.clear()}}}function nC(e){e.updateLayout()}function nT(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:i}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;"size"===n?iM(e=>{let i=a?t.measuredBox[e]:t.layoutBox[e],n=iE(i);i.min=r[e].min,i.max=i.min+n}):nK(n,t.layoutBox,r)&&iM(i=>{let n=a?t.measuredBox[i]:t.layoutBox[i],s=iE(r[i]);n.max=n.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)});let s=tt();iD(s,r,t.layoutBox);let o=tt();a?iD(o,e.applyTransform(i,!0),t.measuredBox):iD(o,r,t.layoutBox);let l=!ny(s),u=!1;if(!e.resumeFrom){let i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){let{snapshot:n,layout:a}=i;if(n&&a){let s=ti();iR(s,t.layoutBox,n.layoutBox);let o=ti();iR(o,r,a.layoutBox),nk(s,o)||(u=!0),i.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nz(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nE(e){e.clearSnapshot()}function nU(e){e.clearMeasurements()}function nD(e){e.isLayoutDirty=!1}function nA(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nZ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nR(e){e.resolveTargetDelta()}function nM(e){e.calcProjection()}function nL(e){e.resetSkewAndRotation()}function nF(e){e.removeLeadSnapshot()}function nV(e,t,r){e.translate=N(t.translate,0,r),e.scale=N(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function nB(e,t,r,i){e.min=N(t.min,r.min,i),e.max=N(t.max,r.max,i)}function nW(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nG={duration:.45,ease:[.4,0,.1,1]},nJ=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nX=nJ("applewebkit/")&&!nJ("chrome/")?Math.round:eo;function nH(e){e.min=nX(e.min),e.max=nX(e.max)}function nK(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(n$(t)-n$(r)))}function nY(e){return e!==e.root&&e.scroll?.wasRoot}let nq=nP({attachResizeListener:(e,t)=>iC(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nQ={current:void 0},n0=nP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nQ.current){let e=new nq({});e.mount(window),e.setOptions({layoutScroll:!0}),nQ.current=e}return nQ.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function n1(e,t){let r=function(e,t,r){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,r=(void 0)??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}(e),i=new AbortController;return[r,{passive:!0,...t,signal:i.signal},()=>i.abort()]}function n2(e){return!("touch"===e.pointerType||iP.x||iP.y)}function n4(e,t,r){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===r);let n=i["onHover"+r];n&&ec.postRender(()=>n(t,iz(t)))}function n5(e){return i8(e)&&"offsetHeight"in e}let n6=(e,t)=>!!t&&(e===t||n6(e,t.parentElement)),n3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),n9=new WeakSet;function n8(e){return t=>{"Enter"===t.key&&e(t)}}function n7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ae(e){return iT(e)&&!(iP.x||iP.y)}function at(e,t,r){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===r);let n=i["onTap"+("End"===r?"":r)];n&&ec.postRender(()=>n(t,iz(t)))}let ar=new WeakMap,ai=new WeakMap,an=e=>{let t=ar.get(e.target);t&&t(e)},aa=e=>{e.forEach(an)},as={some:0,all:1},ao=function(e,t){if("u"<typeof Proxy)return t8;let r=new Map,i=(r,i)=>t8(r,i,e,t);return new Proxy((e,t)=>i(e,t),{get:(n,a)=>"create"===a?i:(r.has(a)||r.set(a,t8(a,void 0,e,t)),r.get(a))})}({animation:{Feature:class extends iN{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>ib(e,t,r)));else if("string"==typeof t)i=ib(e,t,r);else{let n="function"==typeof t?t7(e,t,r.custom):t;i=Promise.all(iv(e,n,r))}return i.then(()=>{e.notify("AnimationComplete",t)})})(e,t,r))),r=iS(),i=!0,n=t=>(r,i)=>{let n=t7(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(n){let{transition:e,transitionEnd:t,...i}=n;r={...r,...i,...t}}return r};function a(a){let{props:s}=e,o=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<ik;e++){let i=tc[e],n=t.props[i];(tu(n)||!1===n)&&(r[i]=n)}return r}(e.parent)||{},l=[],u=new Set,d={},c=1/0;for(let t=0;t<ij;t++){var m,h;let p=i$[t],f=r[p],g=void 0!==s[p]?s[p]:o[p],x=tu(g),v=p===a?f.isActive:null;!1===v&&(c=t);let y=g===o[p]&&g!==s[p]&&x;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...d},!f.isActive&&null===v||!g&&!f.prevProp||tl(g)||"boolean"==typeof g)continue;let b=(m=f.prevProp,"string"==typeof(h=g)?h!==m:!!Array.isArray(h)&&!iw(h,m)),w=b||p===a&&f.isActive&&!y&&x||t>c&&x,k=!1,$=Array.isArray(g)?g:[g],j=$.reduce(n(p),{});!1===v&&(j={});let{prevResolvedValues:_={}}=f,S={..._,...j},N=t=>{w=!0,u.has(t)&&(k=!0,u.delete(t)),f.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in S){let t=j[e],r=_[e];if(!d.hasOwnProperty(e))(rt(t)&&rt(r)?iw(t,r):t===r)?void 0!==t&&u.has(e)?N(e):f.protectedKeys[e]=!0:null!=t?N(e):u.add(e)}f.prevProp=g,f.prevResolvedValues=j,f.isActive&&(d={...d,...j}),i&&e.blockInitialAnimation&&(w=!1);let I=y&&b,P=!I||k;w&&P&&l.push(...$.map(t=>{let r={type:p};if("string"==typeof t&&i&&!I&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,n=t7(i,t);if(i.enteringChildren&&n){let{delayChildren:t}=n.transition||{};r.delay=iy(i.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(u.size){let t={};if("boolean"!=typeof s.initial){let r=t7(e,Array.isArray(s.initial)?s.initial[0]:s.initial);r&&r.transition&&(t.transition=r.transition)}u.forEach(r=>{let i=e.getBaseTarget(r),n=e.getValue(r);n&&(n.liveStyle=!0),t[r]=i??null}),l.push({animation:t})}let p=!!l.length;return i&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),i=!1,p?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,i){if(r[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),r[t].isActive=i;let n=a(t);for(let e in r)r[e].protectedKeys={};return n},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=iS()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iN{constructor(){super(...arguments),this.id=iI++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends iN{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:r={}}=this.node.getProps(),{root:i,margin:n,amount:a="some",once:s}=r,o={root:i?i.current:void 0,rootMargin:n,threshold:"number"==typeof a?a:as[a]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,s&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:i}=this.node.getProps(),n=t?r:i;n&&n(e)};return e=this.node.current,t=function({root:e,...t}){let r=e||document;ai.has(r)||ai.set(r,{});let i=ai.get(r),n=JSON.stringify(t);return i[n]||(i[n]=new IntersectionObserver(aa,{root:e,...t})),i[n]}(o),ar.set(e,l),t.observe(e),()=>{ar.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends iN{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[i,n,a]=n1(e,r),s=e=>{let i=e.currentTarget;if(!ae(e))return;n9.add(i);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),n9.has(i)&&n9.delete(i),ae(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||r.useGlobalTarget||n6(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,n),window.addEventListener("pointercancel",l,n)};return i.forEach(e=>{((r.useGlobalTarget?window:e).addEventListener("pointerdown",s,n),n5(e))&&(e.addEventListener("focus",e=>((e,t)=>{let r=e.currentTarget;if(!r)return;let i=n8(()=>{if(n9.has(r))return;n7(r,"down");let e=n8(()=>{n7(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>n7(r,"cancel"),t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)})(e,n)),n3.has(e.tagName)||-1!==e.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(at(this.node,t,"Start"),(e,{success:t})=>at(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends iN{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ra(iC(this.node.current,"focus",()=>this.onFocus()),iC(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iN{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[i,n,a]=n1(e,r),s=e=>{if(!n2(e))return;let{target:r}=e,i=t(r,e);if("function"!=typeof i||!r)return;let a=e=>{n2(e)&&(i(e),r.removeEventListener("pointerleave",a))};r.addEventListener("pointerleave",a,n)};return i.forEach(e=>{e.addEventListener("pointerenter",s,n)}),a}(e,(e,t)=>(n4(this.node,t,"Start"),e=>n4(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends iN{constructor(){super(...arguments),this.removePointerDownListener=eo}onPointerDown(e){this.session=new iV(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iL(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:i1(e),onStart:i1(t),onMove:r,onEnd:(e,t)=>{delete this.session,i&&ec.postRender(()=>i(e,t))}}}mount(){this.removePointerDownListener=iO(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends iN{constructor(e){super(e),this.removeGroupControls=eo,this.removeListeners=eo,this.controls=new iQ(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eo}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:n0,MeasureLayout:i9},layout:{ProjectionNode:n0,MeasureLayout:i9}},(e,t)=>tR(e)?new tA(t):new tP(t,{allowProjection:e!==s.Fragment}));e.s(["motion",()=>ao],91699);var al=s;function au(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class ad extends al.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,r=n5(e)&&e.offsetWidth||0,i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function ac({children:e,isPresent:t,anchorX:r,root:i}){let n=(0,al.useId)(),o=(0,al.useRef)(null),l=(0,al.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=(0,al.useContext)(tF),d=function(...e){return s.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=au(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():au(e[t],null)}}}}(...e),e)}(o,e?.ref);return(0,al.useInsertionEffect)(()=>{let{width:e,height:a,top:s,left:d,right:c}=l.current;if(t||!o.current||!e||!a)return;let m="left"===r?`left: ${d}`:`right: ${c}`;o.current.dataset.motionPopId=n;let h=document.createElement("style");u&&(h.nonce=u);let p=i??document.head;return p.appendChild(h),h.sheet&&h.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${a}px !important;
            ${m}px !important;
            top: ${s}px !important;
          }
        `),()=>{p.contains(h)&&p.removeChild(h)}},[t]),(0,a.jsx)(ad,{isPresent:t,childRef:o,sizeRef:l,children:al.cloneElement(e,{ref:d})})}let am=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:n,presenceAffectsLayout:o,mode:l,anchorX:u,root:d})=>{let c=tq(ah),m=(0,s.useId)(),h=!0,p=(0,s.useMemo)(()=>(h=!1,{id:m,initial:t,isPresent:r,custom:n,onExitComplete:e=>{for(let t of(c.set(e,!0),c.values()))if(!t)return;i&&i()},register:e=>(c.set(e,!1),()=>c.delete(e))}),[r,c,i]);return o&&h&&(p={...p}),(0,s.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[r]),s.useEffect(()=>{r||c.size||!i||i()},[r]),"popLayout"===l&&(e=(0,a.jsx)(ac,{isPresent:r,anchorX:u,root:d,children:e})),(0,a.jsx)(tY.Provider,{value:p,children:e})};function ah(){return new Map}let ap=e=>e.key||"";function af(e){let t=[];return s.Children.forEach(e,e=>{(0,s.isValidElement)(e)&&t.push(e)}),t}let ag=({children:e,custom:t,initial:r=!0,onExitComplete:i,presenceAffectsLayout:n=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",root:d})=>{let[c,m]=i4(l),h=(0,s.useMemo)(()=>af(e),[e]),p=l&&!c?[]:h.map(ap),f=(0,s.useRef)(!0),g=(0,s.useRef)(h),x=tq(()=>new Map),[v,y]=(0,s.useState)(h),[b,w]=(0,s.useState)(h);t9(()=>{f.current=!1,g.current=h;for(let e=0;e<b.length;e++){let t=ap(b[e]);p.includes(t)?x.delete(t):!0!==x.get(t)&&x.set(t,!1)}},[b,p.length,p.join("-")]);let k=[];if(h!==v){let e=[...h];for(let t=0;t<b.length;t++){let r=b[t],i=ap(r);p.includes(i)||(e.splice(t,0,r),k.push(r))}return"wait"===o&&k.length&&(e=k),w(af(e)),y(h),null}let{forceRender:$}=(0,s.useContext)(tM);return(0,a.jsx)(a.Fragment,{children:b.map(e=>{let s=ap(e),v=(!l||!!c)&&(h===b||p.includes(s));return(0,a.jsx)(am,{isPresent:v,initial:(!f.current||!!r)&&void 0,custom:t,presenceAffectsLayout:n,mode:o,root:d,onExitComplete:v?void 0:()=>{if(!x.has(s))return;x.set(s,!0);let e=!0;x.forEach(t=>{t||(e=!1)}),e&&($?.(),w(g.current),l&&m?.(),i&&i())},anchorX:u,children:e},s)})})};e.s(["AnimatePresence",()=>ag],29978);var ax=e.i(26500);e.i(24856);var av=e.i(41),ay=e.i(86922);let ab=[{flag:"🇧🇷",country:"Brazil",cats:[{id:"pop",icon:"👥",label:"Population",rank:7},{id:"coffee",icon:"☕",label:"Coffee",rank:1},{id:"gdp",icon:"💰",label:"GDP",rank:10}],bestId:"coffee",hint:"Brazil is the world's #1 coffee producer."},{flag:"🇺🇸",country:"USA",cats:[{id:"pop",icon:"👥",label:"Population",rank:3},{id:"coffee",icon:"☕",label:"Coffee",rank:50},{id:"gdp",icon:"💰",label:"GDP",rank:1}],bestId:"gdp",hint:"The USA has the world's largest economy."},{flag:"🇮🇳",country:"India",cats:[{id:"pop",icon:"👥",label:"Population",rank:1},{id:"coffee",icon:"☕",label:"Coffee",rank:8},{id:"gdp",icon:"💰",label:"GDP",rank:4}],bestId:"pop",hint:"India has the world's largest population."}];function aw({onClose:e,onPlayEasyMode:t,onPlayedBefore:r,mode:i="onboarding"}){let{language:n,setLanguage:u}=(0,ax.useLanguage)(),d="refresh"===i?["welcome","demo","teaser"]:["lang","welcome","demo","teaser","ready"],[c,m]=(0,s.useState)(0),h=d[c],p=c===d.length-1,[f,g]=(0,s.useState)(0),[x,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{if("refresh"===i||"u"<typeof navigator)return;let e=navigator.language?.toLowerCase()??"en";e.startsWith("es")?u("es"):e.startsWith("fr")&&u("fr")},[]);let y=ab[f],b=null!==x,w=b&&x===y.bestId,k=()=>{p?e():m(e=>e+1)},$=()=>{c>0&&m(e=>e-1)};return(0,a.jsx)("div",{className:"fixed inset-0 bg-black/70 z-50 flex items-center justify-center p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-2xl max-w-md w-full shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-300",children:[(0,a.jsxs)("div",{className:"bg-gradient-to-r from-purple-600 via-indigo-600 to-purple-700 p-5 text-white relative",children:[(0,a.jsx)("button",{onClick:e,className:"absolute top-3 right-3 p-1 hover:bg-white/20 rounded-full transition-all",children:(0,a.jsx)(l.X,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{className:"text-center",children:["lang"!==h&&(0,a.jsx)("div",{className:"text-4xl mb-2",children:"🌍"}),(0,a.jsx)("h2",{className:"text-xl font-black tracking-tight",children:"lang"===h?"🌍 Choose Your Language":"welcome"===h?"Welcome to GeoHunter!":"demo"===h?"How It Works":"teaser"===h?"Level Up as You Play":"Ready to Play?"})]}),(0,a.jsx)("div",{className:"flex justify-center gap-2 mt-3",children:d.map((e,t)=>(0,a.jsx)("div",{className:`h-2 rounded-full transition-all ${t===c?"bg-white w-6":"bg-white/40 w-2"}`},t))})]}),(0,a.jsx)("div",{className:"p-5 min-h-[300px]",children:(0,a.jsxs)(ag,{mode:"wait",children:["lang"===h&&(0,a.jsxs)(ao.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-16},transition:{duration:.18},className:"space-y-3",children:[(0,a.jsx)("p",{className:"text-center text-gray-500 text-sm mb-2",children:"Select your preferred language"}),[{code:"en",flag:"🇬🇧",label:"English"},{code:"es",flag:"🇪🇸",label:"Español"},{code:"fr",flag:"🇫🇷",label:"Français"}].map(({code:e,flag:t,label:r})=>(0,a.jsxs)("button",{onClick:()=>u(e),className:`flex items-center gap-4 w-full p-4 rounded-xl border-2 transition-all ${n===e?"border-purple-500 bg-purple-50":"border-gray-200 bg-white hover:border-purple-300"}`,children:[(0,a.jsx)("span",{className:"text-3xl",children:t}),(0,a.jsx)("span",{className:`text-base font-bold flex-1 text-left ${n===e?"text-purple-700":"text-gray-800"}`,children:r}),n===e&&(0,a.jsx)("span",{className:"text-purple-500 font-bold text-lg",children:"✓"})]},e))]},"lang"),"welcome"===h&&(0,a.jsxs)(ao.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-16},transition:{duration:.18},className:"space-y-4",children:[(0,a.jsx)("div",{className:"bg-gradient-to-br from-purple-50 to-indigo-50 p-4 rounded-xl border border-purple-200 space-y-3",children:[{icon:"📍",title:"Match countries to categories",desc:"Pair 8 countries with the category each ranks best in."},{icon:"🎯",title:"Lower score wins",desc:"A country's world rank = points. #1 = 1 point. Aim low."},{icon:"🔁",title:"Use each category once",desc:"No data for a country? It counts as 100 — skip it wisely."}].map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"text-lg mt-0.5",children:e.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-bold text-gray-900",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:e.desc})]})]},e.title))}),"onboarding"===i&&r&&(0,a.jsx)("button",{onClick:r,className:"w-full text-center text-sm font-semibold text-gray-500 underline hover:text-gray-700 transition-colors py-1",children:"I've played before"})]},"welcome"),"demo"===h&&(0,a.jsxs)(ao.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-16},transition:{duration:.18},className:"space-y-3",children:[(0,a.jsxs)("p",{className:"text-center text-sm font-semibold text-gray-700",children:["Which category would this country rank best in? ",(0,a.jsx)("span",{className:"text-gray-500",children:"(Lowest score)"})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("span",{className:"text-4xl",children:y.flag}),(0,a.jsx)("p",{className:"text-sm font-bold text-gray-800 mt-1",children:y.country})]}),(0,a.jsx)("div",{className:"space-y-2",children:y.cats.map(e=>{let t=e.id===y.bestId,r=x===e.id,i="border-gray-200 bg-white";return b&&(i=t?"border-green-400 bg-green-500 text-white":r?"border-orange-400 bg-orange-50":"border-gray-200 bg-white opacity-70"),(0,a.jsxs)("button",{disabled:b,onClick:()=>v(e.id),className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl border-2 transition-all ${i} ${!b?"hover:border-purple-300":""}`,children:[(0,a.jsx)("span",{className:"text-lg",children:e.icon}),(0,a.jsx)("span",{className:`flex-1 text-left text-sm font-bold uppercase tracking-wide ${b&&t?"text-white":"text-gray-800"}`,children:e.label}),b?(0,a.jsxs)(ao.span,{initial:{opacity:0},animate:{opacity:1},className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:`text-xs font-extrabold px-2 py-1 rounded-md ${t?"bg-white/20 text-white":"bg-gray-100 text-gray-500"}`,children:["#",e.rank]}),t?(0,a.jsx)("span",{className:"text-xs font-black px-2 py-1 rounded-md bg-white/25 text-white",children:"+1 pt ✓"}):(0,a.jsxs)("span",{className:"text-xs font-extrabold px-2 py-1 rounded-md bg-orange-100 text-orange-600",children:["+",e.rank," pts"]})]}):(0,a.jsx)(o.ChevronRight,{className:"w-4 h-4 text-gray-300"})]},e.id)})}),b&&(0,a.jsx)(ao.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"bg-green-50 p-3 rounded-lg border border-green-200",children:(0,a.jsxs)("p",{className:"text-green-800 text-center text-sm",children:[w?(0,a.jsx)("span",{className:"font-bold",children:"Nice! "}):null,y.hint," ",(0,a.jsx)("span",{className:"font-semibold",children:"Lower rank = fewer points = better."})]})}),(0,a.jsx)("button",{onClick:()=>{f<ab.length-1?(g(e=>e+1),v(null)):k()},disabled:!b,className:`w-full py-3 rounded-xl font-extrabold transition-colors ${b?"bg-purple-600 hover:bg-purple-700 text-white":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:f<ab.length-1?"Next country":"See how you level up"})]},"demo"),"teaser"===h&&(0,a.jsxs)(ao.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-16},transition:{duration:.18},className:"space-y-4",children:[(0,a.jsxs)("div",{className:"bg-slate-900 rounded-2xl p-5 flex flex-col items-center gap-4",children:[(0,a.jsx)(ay.LevelBadge,{level:1,fraction:.08,size:84}),(0,a.jsx)("p",{className:"text-white font-black text-center",children:"Every good score earns XP"}),(0,a.jsx)("div",{className:"flex justify-center gap-5",children:av.TIER_ORDER.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,a.jsx)("span",{className:"w-5 h-5 rounded-full",style:{background:av.TIER_COLORS[e]}}),(0,a.jsx)("span",{className:"text-[10px] font-bold text-white/70 capitalize",children:e})]},e))})]}),(0,a.jsx)("p",{className:"text-center text-sm text-gray-600 px-2",children:"Beat each mode's best score to climb Bronze → Diamond and raise your level. Track it all on your profile."})]},"teaser"),"ready"===h&&(0,a.jsxs)(ao.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-16},transition:{duration:.18},className:"space-y-4 text-center",children:[(0,a.jsxs)("div",{className:"py-3",children:[(0,a.jsx)("div",{className:"text-6xl mb-4",children:"🎮"}),(0,a.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Start with Easy Mode"}),(0,a.jsx)("p",{className:"text-gray-600 text-sm",children:"Easy Mode shows all 80 country flags so you can learn the patterns. Your best score is saved so you can watch yourself improve."})]}),(0,a.jsx)("button",{onClick:t??e,className:"w-full bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white font-black py-4 px-4 rounded-xl transition-all shadow-lg text-lg",children:"🎮 Play Easy Mode"}),(0,a.jsx)("button",{onClick:e,className:"text-sm text-gray-500 hover:text-gray-700 transition-colors",children:"Skip to menu →"})]},"ready")]})}),("lang"===h||"welcome"===h||"teaser"===h)&&(0,a.jsxs)("div",{className:"px-5 pb-4 flex items-center justify-between",children:[(0,a.jsx)("button",{onClick:e,className:"text-sm text-gray-600 hover:text-gray-800 transition-colors",children:"refresh"===i?"Close":"Skip"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[c>0&&(0,a.jsx)("button",{onClick:$,className:"px-4 py-2 text-sm text-gray-600 hover:text-gray-800 transition-colors",children:"Back"}),(0,a.jsxs)("button",{onClick:k,className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white text-sm font-bold rounded-lg transition-colors flex items-center gap-1",children:[p?"Got it":"Next",!p&&(0,a.jsx)(o.ChevronRight,{className:"w-4 h-4"})]})]})]}),"demo"===h&&(0,a.jsxs)("div",{className:"px-5 pb-4 flex items-center justify-between",children:[c>0?(0,a.jsx)("button",{onClick:$,className:"text-sm text-gray-600 hover:text-gray-800 transition-colors",children:"Back"}):(0,a.jsx)("span",{}),(0,a.jsx)("button",{onClick:e,className:"text-sm text-gray-600 hover:text-gray-800 transition-colors",children:"Skip"})]})]})})}e.s(["OnboardingModal",()=>aw],2008)},84945,e=>{"use strict";var t=e.i(50266),r=e.i(7340);function i({className:e="",compact:i=!1,hideTagline:n=!1}){return(0,t.jsxs)("div",{className:`w-full ${e}`,children:[(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-2 mb-2 max-w-sm mx-auto",children:[{name:"X",href:"https://x.com/hunter_himself",img:"/social/x.png",label:"X",emphasize:!0},{name:"Instagram",href:"https://www.instagram.com/hunter_himself_/",img:"/social/instagram.png",emphasize:!0},{name:"TikTok",href:"https://www.tiktok.com/@hunter_himself",img:"/social/tiktok.png",emphasize:!0},{name:"YouTube",href:"https://www.youtube.com/@hunter_himself",img:"/social/youtube.png",emphasize:!0}].map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":e.name,className:`inline-flex items-center gap-1.5 text-white/85 hover:text-white hover:bg-white/15 text-[11px] h-8 px-2 rounded-full font-medium transition ${e.emphasize?"bg-white/15 border border-white/20":"border border-transparent"}`,children:[(0,t.jsx)(r.default,{src:e.img,alt:e.name,width:20,height:20,className:"object-contain"}),!i&&(0,t.jsx)("span",{children:e.label||e.name})]},e.name))}),!n&&(0,t.jsx)("p",{className:"text-center text-white/70 text-[10px] mb-2 max-w-sm mx-auto",children:"Follow for updates, tips & more geography games!"})]})}e.s(["SocialLinks",()=>i])},69923,e=>{"use strict";var t=e.i(50266),r=e.i(46146),i=e.i(99056),n=e.i(8519),a=e.i(61584),s=e.i(89132),o=e.i(18738);let l={usa:{emoji:"🇺🇸",name:"USA States",subtitle:"50 states to conquer",product:s.STRIPE_PRODUCTS.USA_STATES,accentFrom:"from-blue-600",accentTo:"to-blue-700",bgFrom:"from-blue-900",bgTo:"to-blue-950",borderColor:"border-blue-500/20",subColor:"text-blue-200",faint:"text-blue-400/60",features:["🗺️ 50 US States to master","📊 8 unique ranking categories","🏆 Exclusive USA leaderboard","♾️ One-time purchase, forever access","🔄 Syncs between web & mobile"],categories:[{emoji:"👥",name:"Population"},{emoji:"🔥",name:"Hot Temp"},{emoji:"🥶",name:"Cold Temp"},{emoji:"🚨",name:"Crime"},{emoji:"🚜",name:"Farming"},{emoji:"🎓",name:"Schools"},{emoji:"⛰️",name:"Elevation"},{emoji:"🏆",name:"Sports"}]},canada:{emoji:"🍁",name:"Canada Mode",subtitle:"13 provinces & territories",product:s.STRIPE_PRODUCTS.CANADA_MODE,accentFrom:"from-red-700",accentTo:"to-red-800",bgFrom:"from-red-900",bgTo:"to-red-950",borderColor:"border-red-500/20",subColor:"text-red-200",faint:"text-red-400/60",features:["🍁 13 provinces & territories","📊 8 categories (NHL, Moose, Snowfall…)","🏆 Canadian leaderboard","♾️ One-time purchase, forever access","🔄 Syncs between web & mobile"],categories:[{emoji:"🏒",name:"NHL Players"},{emoji:"🧑‍🤝‍🧑",name:"Low Pop"},{emoji:"❄️",name:"Snowfall"},{emoji:"🏔️",name:"Elevation"},{emoji:"🫎",name:"Moose"},{emoji:"🌾",name:"Farmland"},{emoji:"🌲",name:"Forest"},{emoji:"🛢️",name:"Oil Prod."}]},europe:{emoji:"🇪🇺",name:"Europe Mode",subtitle:"50 European countries",product:s.STRIPE_PRODUCTS.EUROPE_MODE,accentFrom:"from-blue-700",accentTo:"to-indigo-800",bgFrom:"from-blue-950",bgTo:"to-indigo-950",borderColor:"border-blue-400/20",subColor:"text-blue-200",faint:"text-blue-400/60",features:["🌍 50 European countries","📊 8 categories (UCL, UNESCO…)","🏆 European leaderboard","♾️ One-time purchase, forever access","🔄 Syncs between web & mobile"],categories:[{emoji:"👥",name:"Population"},{emoji:"❄️",name:"Cold Temp"},{emoji:"🏝️",name:"Small Size"},{emoji:"🏛️",name:"UNESCO"},{emoji:"📏",name:"Avg Height"},{emoji:"💰",name:"GDP/Cap"},{emoji:"🧭",name:"S. Capital"},{emoji:"🏆",name:"UCL Wins"}]},empires:{emoji:"⚔️",name:"Ancient Empires",subtitle:"40 historical empires",product:null,accentFrom:"from-amber-700",accentTo:"to-amber-800",bgFrom:"from-amber-950",bgTo:"to-stone-950",borderColor:"border-amber-500/20",subColor:"text-amber-200",faint:"text-amber-400/60",features:["⚔️ 40 historical empires to rank","📊 8 categories (Area, Population, Lifespan…)","🏆 Empires leaderboard","🔄 Syncs between web & mobile"],categories:[{emoji:"⏳",name:"Years"},{emoji:"🌍",name:"Peak Area"},{emoji:"👥",name:"Population"},{emoji:"🏔️",name:"Elevation"},{emoji:"🧭",name:"To Rome"},{emoji:"⚡",name:"Lifespan"},{emoji:"🗺️",name:"Countries"},{emoji:"📜",name:"Founded"}]},"footy-clubs":{emoji:"⚽",name:"Footy Clubs",subtitle:"100 legendary football clubs",product:null,accentFrom:"from-yellow-600",accentTo:"to-yellow-700",bgFrom:"from-[#0d1b3e]",bgTo:"to-stone-950",borderColor:"border-yellow-500/20",subColor:"text-yellow-200",faint:"text-yellow-400/60",features:["⚽ 100 legendary football clubs to rank","📊 8 categories (Trophies, Market Value, Stadiums…)","🏆 Footy Clubs leaderboard","🔄 Syncs between web & mobile"],categories:[{emoji:"🏔️",name:"Elevation"},{emoji:"🏆",name:"Trophies"},{emoji:"🧭",name:"Southernmost"},{emoji:"📈",name:"Market Value"},{emoji:"🌡️",name:"City Temp"},{emoji:"⌛",name:"Oldest"},{emoji:"📅",name:"Newest"},{emoji:"🏟️",name:"Capacity"}]}},u=[{emoji:"🗺️",text:"Expansions: USA, Canada, Europe included"},{emoji:"⚔️",text:"Ancient Empires: 40 historical empires"},{emoji:"🔄",text:"Reverse+: Ultimate HunterGeo (unlimited daily categories)"},{emoji:"🎨",text:"Custom: Mix any 8 categories"},{emoji:"🏆",text:"Weekly Pro Challenge (resets every week)"},{emoji:"🚫",text:"No ads, ever"},{emoji:"✨",text:"Perfect Solutions included"}];function d({isOpen:e,onClose:d,onPurchaseSuccess:c,mode:m,defaultTab:h="once",source:p}){let[f,g]=(0,r.useState)(h),[x,v]=(0,r.useState)(!1),[y,b]=(0,r.useState)(null),{user:w,isAuthenticated:k,hasUSAAccess:$,hasCanadaAccess:j,hasEuropeAccess:_,hasEmpiresAccess:S,refreshPremiumStatus:N}=(0,n.useSupabaseAuthStore)(),I=l[m],P="empires"===m||"footy-clubs"===m,C=P?"pro":f;if((0,r.useEffect)(()=>{e&&(g(P?"pro":h),b(null),k&&N(),p&&(0,o.trackPaywall)(p,{mode:m}))},[e,k]),!e)return null;if("usa"===m&&$()||"canada"===m&&j()||"europe"===m&&_()||("empires"===m||"footy-clubs"===m)&&S())return c?.(),d(),null;let T=async e=>{if(p&&(0,o.trackPaywallCta)(p,{product:e}),!k||!w)return void b("Please log in to purchase.");v(!0),b(null);try{let t={"Content-Type":"application/json"};try{if(a.supabase){let{data:{session:e}}=await a.supabase.auth.getSession();e?.access_token&&(t.Authorization=`Bearer ${e.access_token}`)}}catch{}let r=await fetch("/api/stripe/create-checkout",{method:"POST",headers:t,body:JSON.stringify({userId:w.id,userEmail:w.email,productId:e})}),i=await r.json();if(!r.ok)throw Error(i.error||"Failed to create checkout session");if(i.url)window.location.href=i.url;else throw Error("No checkout URL received")}catch(e){b(e instanceof Error?e.message:"Purchase failed")}finally{v(!1)}};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:`bg-gradient-to-b ${I.bgFrom} ${I.bgTo} rounded-2xl max-w-md w-full shadow-2xl ${I.borderColor} border overflow-hidden max-h-[90vh] flex flex-col`,children:[(0,t.jsxs)("div",{className:`relative bg-gradient-to-r ${I.accentFrom} ${I.accentTo} p-5 flex-shrink-0`,children:[(0,t.jsx)("button",{onClick:d,className:"absolute top-4 right-4 text-white/70 hover:text-white",children:(0,t.jsx)(i.X,{className:"w-5 h-5"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-5xl mb-2",children:I.emoji}),(0,t.jsx)("h2",{className:"text-xl font-black text-white",children:I.name}),(0,t.jsx)("p",{className:`${I.subColor} text-sm mt-0.5`,children:I.subtitle})]})]}),P?(0,t.jsxs)("div",{className:"p-3 bg-black/20 flex-shrink-0 text-center",children:[(0,t.jsx)("span",{className:"text-amber-400 text-sm font-bold",children:"Subscribe to GeoHunter+ to unlock"}),(0,t.jsx)("span",{className:"block text-white/40 text-xs mt-0.5",children:"Standalone purchase coming soon"})]}):(0,t.jsxs)("div",{className:"flex gap-1 p-3 bg-black/20 flex-shrink-0",children:[(0,t.jsxs)("button",{className:`flex-1 py-2.5 rounded-xl text-sm font-bold transition-all relative ${"once"===f?"bg-white text-gray-900 shadow":"text-white/60 hover:text-white/80"}`,onClick:()=>g("once"),children:["Buy Now","once"===f&&(0,t.jsx)("span",{className:"absolute -top-2 left-1/2 -translate-x-1/2 bg-green-500 text-white text-[9px] font-black px-2 py-0.5 rounded-full leading-tight",children:"PERMANENT"}),(0,t.jsxs)("span",{className:"block text-xs font-normal opacity-70",children:[I.product?.price," · one-time"]})]}),(0,t.jsxs)("button",{className:`flex-1 py-2.5 rounded-xl text-sm font-bold transition-all relative ${"pro"===f?"bg-white text-gray-900 shadow":"text-white/60 hover:text-white/80"}`,onClick:()=>g("pro"),children:["GeoHunter+","pro"===f&&(0,t.jsx)("span",{className:"absolute -top-2 left-1/2 -translate-x-1/2 bg-amber-500 text-white text-[9px] font-black px-2 py-0.5 rounded-full leading-tight",children:"BEST VALUE"}),(0,t.jsxs)("span",{className:"block text-xs font-normal opacity-70",children:[s.STRIPE_PRODUCTS.PRO_MONTHLY.price,"/mo · all modes"]})]})]}),(0,t.jsxs)("div",{className:"overflow-y-auto flex-1 p-5",children:["once"===C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-2 mb-4",children:I.categories.map((e,r)=>(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-2xl mb-0.5",children:e.emoji}),(0,t.jsx)("div",{className:"text-xs text-white/60",children:e.name})]},r))}),(0,t.jsxs)("div",{className:"bg-white/5 rounded-xl p-4 mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("span",{className:"text-xs font-black text-white/50 uppercase tracking-wider",children:"Permanent Access"}),(0,t.jsx)("span",{className:"bg-green-500 text-white text-[9px] font-black px-2 py-0.5 rounded-full",children:"BEST PRICE"})]}),(0,t.jsx)("ul",{className:"space-y-2",children:I.features.map((e,r)=>(0,t.jsx)("li",{className:"flex items-center gap-2 text-sm text-white/90",children:e},r))})]}),(0,t.jsx)("p",{className:`text-xs text-center mb-3 ${I.faint}`,children:"Or get all 3 modes + more — switch to GeoHunter+ above."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-lg font-black text-white",children:"⭐ GeoHunter+"}),(0,t.jsx)("div",{className:"bg-amber-500 text-white text-[9px] font-black px-2 py-1 rounded-full",children:"BEST VALUE"})]}),(0,t.jsxs)("div",{className:"bg-amber-900/20 border border-amber-500/30 rounded-xl p-4 mb-4",children:[(0,t.jsxs)("div",{className:"text-3xl font-black text-amber-400 mb-0.5",children:[s.STRIPE_PRODUCTS.PRO_MONTHLY.price,(0,t.jsx)("span",{className:"text-lg text-amber-600",children:"/mo"})]}),(0,t.jsx)("div",{className:"text-sm text-white/50 mb-4",children:"Everything in one plan"}),(0,t.jsx)("ul",{className:"space-y-2",children:u.map((e,r)=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-sm text-white/90",children:[(0,t.jsx)("span",{children:e.emoji})," ",e.text]},r))})]}),(0,t.jsx)("p",{className:"text-xs text-center text-white/30 italic mb-3",children:"Join thousands of GeoHunter players"})]}),!k&&(0,t.jsx)("div",{className:"bg-yellow-500/20 border border-yellow-500/30 rounded-lg p-3 mb-3",children:(0,t.jsx)("p",{className:"text-yellow-300 text-sm text-center",children:"Please log in to purchase."})}),y&&(0,t.jsx)("div",{className:"bg-red-500/20 border border-red-500/30 rounded-lg p-3 mb-3",children:(0,t.jsx)("p",{className:"text-red-300 text-sm text-center",children:y})}),(0,t.jsx)("button",{onClick:()=>T("once"===C?I.product.productId:"pro_monthly"),disabled:x||!k,className:"w-full bg-gradient-to-r from-yellow-500 to-yellow-600 hover:from-yellow-400 hover:to-yellow-500 disabled:opacity-50 disabled:cursor-not-allowed text-gray-900 font-black py-4 rounded-xl transition-all flex items-center justify-center gap-2 text-base shadow-lg mb-2",children:x?(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):"once"===C?`🔓 Buy Now \xb7 ${I.product.price}`:`⭐ Subscribe \xb7 ${s.STRIPE_PRODUCTS.PRO_MONTHLY.price}/mo`}),(0,t.jsx)("p",{className:`text-xs text-center ${I.faint}`,children:"once"===C?"One-time purchase · instant access · no subscription":"Cancel anytime · auto-renews unless cancelled 24h before renewal"})]})]})})}e.s(["PremiumModePaywall",()=>d])},73019,e=>{"use strict";var t=e.i(50266),r=e.i(46146),i=e.i(99056),n=e.i(6159),a=e.i(8519),s=e.i(15149),o=e.i(9781),l=e.i(3331),u=e.i(37684),d=e.i(69923),c=e.i(5208);e.i(24856);var m=e.i(65299);let h={daily:{name:"Daily",emoji:"📅",hex:"#1e40af"},original:{name:"Classic",emoji:"🎯",hex:"#9333ea"},world:{name:"World",emoji:"🌍",hex:"#10b981"},special:{name:"Special",emoji:"⚡",hex:"#f97316"},voyage:{name:"Voyage",emoji:"🗺️",hex:"#06b6d4"},atlas:{name:"Atlas",emoji:"📍",hex:"#dc2626"},usa:{name:"USA",emoji:"🇺🇸",hex:"#1d4ed8"},canada:{name:"Canada",emoji:"🍁",hex:"#b91c1c"},europe:{name:"Europe",emoji:"🇪🇺",hex:"#2563eb"},sports:{name:"Sports",emoji:"🏆",hex:"#166534"},"weekly-pro":{name:"Weekly Pro",emoji:"⭐",hex:"#ca8a04"},"all-time":{name:"All-Time",emoji:"📅",hex:"#dc2626"},empires:{name:"Empires",emoji:"⚔️",hex:"#92400e"},"world-cup":{name:"Nations Cup",emoji:"⚽",hex:"#166534"},"footy-clubs":{name:"Footy Clubs",emoji:"⚽",hex:"#d4a017"}},p=["daily","weekly-pro","all-time","original","world","special","voyage","atlas","usa","canada","europe","sports","empires","world-cup","footy-clubs"];function f({isOpen:f,onClose:g,initialTab:x="daily"}){let{user:v,isAuthenticated:y,getDailyLeaderboard:b,getModeLeaderboardScores:w,activeBadge:k,hasProAccess:$}=(0,a.useSupabaseAuthStore)(),{startGame:j}=(0,s.useGameStore)(),[_,S]=(0,r.useState)(x),[N,I]=(0,r.useState)([]),[P,C]=(0,r.useState)(!1),[T,z]=(0,r.useState)(null),[O,E]=(0,r.useState)(null),[U,D]=(0,r.useState)(null),[A,Z]=(0,r.useState)(0),[R,M]=(0,r.useState)(null),[L,F]=(0,r.useState)(0),[V,B]=(0,r.useState)(null),[W,G]=(0,r.useState)(!1),[J,X]=(0,r.useState)(!1),H=Array.from({length:Math.max(1,(0,m.getISOWeekNumber)(new Date)-13+1)},(e,t)=>({label:`Week ${t+1}`,weekId:`2026-W${String(13+t).padStart(2,"0")}`})),[K,Y]=(0,r.useState)(H.length-1),q=(0,r.useCallback)(async()=>{C(!0);try{let t=[];if("daily"===_){let e=await b();z(e),E(null),D(null),t=[]}else if("weekly-pro"===_){let{supabase:r}=await e.A(5800);if(!r)throw Error("Supabase not configured");let i=H[K]?.weekId||(0,m.getCurrentWeekIdentifier)(),{data:n,error:a}=await r.rpc("get_weekly_leaderboard",{p_week:i,p_limit:1e3});if(a)throw a;t=(n||[]).map(e=>({username:e.username||"Anonymous",score:e.score,rank:e.rank,home_country:e.home_country,badges:e.active_badge?[e.active_badge]:[],topPercent:e.top_percent,subscriptionTier:e.subscription_tier||"pro"})),z(null);let s=t.find(e=>e.username===v?.username);E(s?s.rank:null),D(s?.topPercent??null),Z(n?.[0]?.total_players||t.length)}else if("all-time"===_){let{supabase:r}=await e.A(5800);if(!r)throw Error("Supabase not configured");let{data:i,error:n}=await r.rpc("get_all_time_daily_leaderboard",{p_limit:1e3});if(n)throw n;t=(i||[]).map(e=>({username:e.username||"Anonymous",score:e.wins,rank:Number(e.rank),home_country:e.home_country,badges:e.active_badge?[e.active_badge]:[],wins:e.wins,currentStreak:e.current_streak??0,longestStreak:e.longest_streak??0})),z(null),D(null);let a=Number(i?.[0]?.total_players)||t.length;F(a);let s=t.find(e=>e.username===v?.username);if(s)E(s.rank),M(s.wins??null);else if(v?.id){let{data:e}=await r.rpc("get_user_all_time_daily_stats",{p_user_id:v.id});e&&e.length>0?(E(Number(e[0].rank)),M(Number(e[0].wins))):(E(null),M(null))}else E(null),M(null)}else{let{supabase:r}=await e.A(5800);if(!r)throw Error("Supabase not configured");let[i,n]=await Promise.all([r.rpc("get_mode_leaderboard_top",{p_mode:_,p_limit:100}),v?.id?r.rpc("get_user_mode_rank",{p_user_id:v.id,p_mode:_}):Promise.resolve({data:null,error:null})]);if(i.error)throw i.error;t=(i.data||[]).map((e,t)=>({username:e.username||"Anonymous",score:e.score,rank:t+1,home_country:e.home_country??null,badges:e.badges??[]})),z(null),D(null);let a=n?.data?.[0];a?(E(Number(a.rank)),B(Number(a.score)),Z(Number(a.total_players))):(E(null),B(null),Z(i.data?.length??0))}I(t)}catch(e){console.error("Failed to load leaderboard:",e instanceof Error?e.message:e?.message??e?.code??JSON.stringify(e),e)}finally{C(!1)}},[_,K,b,y,v]);(0,r.useEffect)(()=>{f&&q()},[f,_,K,q]);let Q=async()=>{if($()){g();try{await j("footy-clubs")}catch{}return}"true"===localStorage.getItem("geohunter:footy_clubs_trial_used")?X(!0):G(!0)},ee=async()=>{G(!1),localStorage.setItem("geohunter:footy_clubs_trial_used","true"),g();try{await j("footy-clubs")}catch{}},et=y&&v?.username?v.username:null;if(!f)return null;let er="daily"===_,ei=h[_],en=(T?.winners??[]).slice().sort((e,t)=>{let r=e.completed_at||"",i=t.completed_at||"";return r.localeCompare(i)}).map((e,t)=>({...e,rank:t+1})),ea=T?.targetScore??null,es=e=>1===e?(0,t.jsx)("span",{className:"text-lg",children:"🥇"}):2===e?(0,t.jsx)("span",{className:"text-lg",children:"🥈"}):3===e?(0,t.jsx)("span",{className:"text-lg",children:"🥉"}):(0,t.jsxs)("span",{className:"text-sm font-bold",style:{color:"rgba(255,255,255,0.5)"},children:["#",e]}),eo=(e,r,i)=>{let n,a=e.username===et,s="weekly-pro"===_&&"Hunter"===e.username,u="weekly-pro"===_&&"pro"===e.subscriptionTier?"rgba(255,215,0,0.12)":"weekly-pro"===_&&"premium"===e.subscriptionTier?"rgba(80,200,120,0.12)":void 0;return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5 md:px-6 md:py-3 transition-all hover:bg-white/5",style:a?{backgroundColor:"rgba(147,51,234,0.15)"}:s?{backgroundColor:"rgba(234,179,8,0.18)"}:u?{backgroundColor:u}:{},children:[(0,t.jsx)("div",{className:"w-8 md:w-9 flex-shrink-0 flex items-center justify-center",children:es(e.rank)}),(0,t.jsx)("div",{className:"w-7 h-7 md:w-8 md:h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"rgba(255,255,255,0.15)"},children:e.home_country?(0,t.jsx)("span",{className:"text-base",children:(0,c.countryCodeToEmoji)(e.home_country)}):(0,t.jsx)("span",{className:"text-xs text-white/40",children:"?"})}),(0,t.jsxs)("span",{className:`flex-1 font-semibold truncate text-sm ${a?"text-white":s?"text-yellow-400 font-bold":"text-white/80"}`,children:[e.username,(n=a?k:e.badges?.[0])&&l.BADGE_VARIANTS.has(n)?(0,t.jsx)("span",{className:"ml-1 inline-flex",children:(0,t.jsx)(o.PixelBadgeSVG,{variant:n,size:16,naked:!0})}):null]}),(0,t.jsx)("span",{className:`font-black text-lg flex-shrink-0 ${a?"text-white":s?"text-yellow-400":""}`,style:a||s?{}:{color:i},children:e.score})]},`${e.username}-${e.score}-${r}`)};return(0,t.jsxs)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",onClick:e=>{e.target===e.currentTarget&&g()},children:[(0,t.jsxs)("div",{className:"w-full max-w-md md:max-w-xl rounded-2xl shadow-2xl max-h-[90vh] sm:max-h-[80vh] flex flex-col relative overflow-hidden",style:{backgroundColor:"#0f0d23"},onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b flex-shrink-0",style:{borderColor:"rgba(255,255,255,0.1)"},children:[(0,t.jsx)("span",{className:"text-xl font-bold text-white",children:"🏆 Leaderboard"}),(0,t.jsx)("button",{onClick:g,className:"w-8 h-8 rounded-full flex items-center justify-center",style:{backgroundColor:"rgba(255,255,255,0.1)"},children:(0,t.jsx)(i.X,{className:"w-4 h-4",style:{color:"rgba(255,255,255,0.6)"}})})]}),(0,t.jsx)("div",{className:"flex-shrink-0 border-b px-4 py-3",style:{borderColor:"rgba(255,255,255,0.1)",backgroundColor:"#0f0d23"},children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("select",{value:_,onChange:e=>S(e.target.value),className:"w-full appearance-none rounded-xl px-4 py-2.5 pr-10 text-sm font-semibold text-white cursor-pointer focus:outline-none focus:ring-2 focus:ring-white/30 transition-all",style:{backgroundColor:ei.hex,border:`1px solid ${ei.hex}`},children:p.map(e=>{let r=h[e];return(0,t.jsxs)("option",{value:e,style:{backgroundColor:"#0f0d23",color:"#fff"},children:[r.emoji,"  ",r.name]},e)})}),(0,t.jsx)("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white/80",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]})}),"weekly-pro"===_&&(0,t.jsxs)("div",{className:"border-b px-4 py-2",style:{borderColor:"rgba(255,255,255,0.08)",backgroundColor:"rgba(202,138,4,0.08)"},children:[(0,t.jsx)("div",{className:"flex gap-1.5 overflow-x-auto pb-1",style:{scrollbarWidth:"none"},children:H.map((e,r)=>(0,t.jsxs)("button",{onClick:()=>Y(r),className:"shrink-0 rounded-lg px-3 py-1.5 text-xs font-bold transition-all",style:{backgroundColor:r===K?"#b45309":"rgba(255,255,255,0.06)",color:r===K?"#fff":"rgba(255,255,255,0.4)"},children:[e.label,r===H.length-1&&(0,t.jsx)("span",{className:"ml-1 inline-block h-1.5 w-1.5 rounded-full",style:{backgroundColor:"#FFD700"}})]},e.weekId))}),(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-4 text-xs",children:[null!=U&&(0,t.jsxs)("span",{className:"font-bold",style:{color:"#FFD700"},children:["Top ",U,"%"]}),null!=O&&(0,t.jsxs)("span",{style:{color:"rgba(255,255,255,0.5)"},children:["Rank #",O]}),A>0&&(0,t.jsxs)("span",{style:{color:"rgba(255,255,255,0.4)"},children:[A," players"]})]})]}),"world-cup"===_&&(0,t.jsx)("div",{className:"flex-shrink-0 px-4 pt-3",children:(0,t.jsxs)("button",{onClick:Q,className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl text-left transition-opacity hover:opacity-90 active:opacity-80",style:{background:"linear-gradient(135deg, #0d1b3e 0%, #1a2f5e 100%)",border:"1px solid #d4a017"},children:[(0,t.jsx)("span",{className:"text-3xl flex-shrink-0",children:"⚽"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-black",style:{color:"#d4a017"},children:"Try Footy Clubs ⚽"}),(0,t.jsx)("p",{className:"text-xs text-white/70 mt-0.5",children:"Rank 100 legendary clubs — your first game is free"})]}),(0,t.jsx)("span",{className:"text-[10px] font-black px-2 py-1 rounded-full flex-shrink-0",style:{backgroundColor:"#d4a017",color:"#0d1b3e"},children:"PLAY"})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:P?(0,t.jsx)("div",{className:"flex h-32 items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"mx-auto mb-2 h-8 w-8 animate-spin rounded-full border-2 border-t-purple-400",style:{borderColor:"rgba(255,255,255,0.2)",borderTopColor:"#a855f7"}}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.5)"},children:"Loading..."})]})}):er?(()=>{let[e,r,i]=new Date().toLocaleDateString("en-US",{timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit"}).split("/"),a=function(e){let[t,r,i]=e.split("-").map(Number),n=new Date(t,r-1,i),a=n.toLocaleDateString("en-US",{weekday:"long"}),s=n.toLocaleDateString("en-US",{month:"short"});return`${a} ${i} ${s}`}(`${i}-${e}-${r}`);return(0,t.jsxs)("div",{className:"pb-4",children:[(0,t.jsxs)("div",{className:"text-center mb-4 py-3 px-4",children:[(0,t.jsx)("div",{className:"text-sm font-extrabold text-white tracking-wider uppercase",children:"Daily Leaderboard"}),(0,t.jsxs)("div",{className:"text-xs mt-1",style:{color:"rgba(255,255,255,0.5)"},children:[a," Results"]}),(0,t.jsx)("div",{className:"text-[10px] mt-0.5",style:{color:"rgba(255,255,255,0.4)"},children:"Refreshes at 12:00 AM ET"}),null!==ea?(0,t.jsxs)("div",{className:"text-base font-bold mt-2",style:{color:"#60a5fa"},children:["Target Score: ",ea]}):(0,t.jsx)("div",{className:"text-sm mt-2",style:{color:"rgba(255,255,255,0.4)"},children:"Today's challenge hasn't started yet"})]}),0===en.length?(0,t.jsxs)("div",{className:"flex h-32 flex-col items-center justify-center text-center",children:[(0,t.jsx)(n.Trophy,{className:"mb-2 h-8 w-8",style:{color:"rgba(255,255,255,0.2)"}}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.5)"},children:"No winners yet today."}),(0,t.jsx)("p",{className:"text-xs mt-1",style:{color:"rgba(255,255,255,0.4)"},children:"Be the first to hit the target!"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-xs font-bold mb-2 px-4",style:{color:"rgba(255,255,255,0.5)"},children:"Winners"}),(0,t.jsx)("div",{className:"space-y-0",children:en.map((e,t)=>eo(e,t,h.daily.hex))}),T?.nearMisses&&T.nearMisses.length>0&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2",children:[(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.1)"}}),(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",style:{color:"rgba(255,255,255,0.4)"},children:"Near Misses"}),(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.1)"}})]}),T.nearMisses.map((e,t)=>eo({...e,rank:en.length+t+1},t,h.daily.hex))]})]})]})})():"all-time"===_?(0,t.jsxs)("div",{className:"pb-4",children:[(0,t.jsxs)("div",{className:"px-4 pt-4 pb-3 border-b",style:{borderColor:"rgba(255,255,255,0.06)",backgroundColor:"rgba(220,38,38,0.08)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Trophy,{className:"w-4 h-4",style:{color:"#facc15"}}),(0,t.jsx)("span",{className:"text-base font-extrabold tracking-wide",style:{color:"#facc15"},children:"Daily Winners"})]}),(0,t.jsx)("div",{className:"text-xs mt-0.5",style:{color:"rgba(255,255,255,0.5)"},children:"All-time daily challenge wins"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center justify-around gap-2",children:[null!=O&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-base font-extrabold text-white",children:O<=3?["🥇","🥈","🥉"][O-1]:`#${O}`}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Your rank"})]}),null!=R&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-base font-extrabold",style:{color:"#dc2626"},children:R}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Your wins"})]}),L>0&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-base font-extrabold text-white",children:L.toLocaleString()}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Winners"})]})]})]}),0===N.length?(0,t.jsxs)("div",{className:"flex h-32 flex-col items-center justify-center text-center",children:[(0,t.jsx)(n.Trophy,{className:"mb-2 h-8 w-8",style:{color:"rgba(255,255,255,0.2)"}}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.5)"},children:"No winners yet."})]}):(0,t.jsxs)("div",{className:"space-y-0",children:[N.map((e,r)=>{let i,n=e.username===et;return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5 transition-all hover:bg-white/5",style:n?{backgroundColor:"rgba(147,51,234,0.15)"}:{},children:[(0,t.jsx)("div",{className:"w-8 flex-shrink-0 flex items-center justify-center",children:es(e.rank)}),(0,t.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"rgba(255,255,255,0.15)"},children:e.home_country?(0,t.jsx)("span",{className:"text-base",children:(0,c.countryCodeToEmoji)(e.home_country)}):(0,t.jsx)("span",{className:"text-xs text-white/40",children:"?"})}),(0,t.jsxs)("span",{className:`flex-1 font-semibold truncate text-sm ${n?"text-white":"text-white/80"}`,children:[e.username,(i=n?k:e.badges?.[0])&&l.BADGE_VARIANTS.has(i)?(0,t.jsx)("span",{className:"ml-1 inline-flex",children:(0,t.jsx)(o.PixelBadgeSVG,{variant:i,size:16,naked:!0})}):null]}),(0,t.jsxs)("div",{className:"flex flex-col items-end flex-shrink-0",children:[(0,t.jsx)("span",{className:"font-black text-lg leading-tight",style:{color:"#dc2626"},children:e.wins??e.score}),(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"wins"}),(e.currentStreak??0)>=3&&(0,t.jsxs)("span",{className:"mt-0.5 inline-flex items-center rounded-md px-1.5 py-0.5 text-[10px] font-bold",style:{backgroundColor:"rgba(249,115,22,0.18)",color:"#fb923c"},children:["🔥 ",e.currentStreak]})]})]},`alltime-${e.username}-${r}`)}),et&&null!=O&&null!=R&&!N.some(e=>e.username===et)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5",style:{backgroundColor:"rgba(255,255,255,0.03)"},children:[(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.08)"}}),(0,t.jsx)("span",{className:"text-[10px] font-bold",style:{color:"rgba(255,255,255,0.3)"},children:"···"}),(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.08)"}})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",style:{backgroundColor:"rgba(147,51,234,0.15)"},children:[(0,t.jsx)("div",{className:"w-8 flex-shrink-0 flex items-center justify-center",children:(0,t.jsxs)("span",{className:"text-sm font-bold",style:{color:"#c084fc"},children:["#",O]})}),(0,t.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"rgba(255,255,255,0.15)"},children:v?.homeCountry?(0,t.jsx)("span",{className:"text-base",children:(0,c.countryCodeToEmoji)(v.homeCountry)}):(0,t.jsx)("span",{className:"text-xs text-white/40",children:"?"})}),(0,t.jsxs)("span",{className:"flex-1 font-semibold truncate text-sm text-white",children:[et,k&&l.BADGE_VARIANTS.has(k)?(0,t.jsx)("span",{className:"ml-1 inline-flex",children:(0,t.jsx)(o.PixelBadgeSVG,{variant:k,size:16,naked:!0})}):null]}),(0,t.jsxs)("div",{className:"flex flex-col items-end flex-shrink-0",children:[(0,t.jsx)("span",{className:"font-black text-lg leading-tight text-white",children:R}),(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"wins"})]})]})]})]})]}):0===N.length?(0,t.jsxs)("div",{className:"flex h-32 flex-col items-center justify-center text-center",children:[(0,t.jsx)(n.Trophy,{className:"mb-2 h-8 w-8",style:{color:"rgba(255,255,255,0.2)"}}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.5)"},children:"No scores yet."})]}):(0,t.jsxs)("div",{className:"pb-2",children:["weekly-pro"!==_&&(null!=O||A>0)&&(0,t.jsxs)("div",{className:"px-4 py-2.5 flex items-center justify-around border-b",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"rgba(255,255,255,0.06)"},children:[null!=O&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-lg font-extrabold text-white",children:O<=3?["🥇","🥈","🥉"][O-1]:`#${O}`}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Your Rank"})]}),null!=V&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-lg font-extrabold",style:{color:ei.hex},children:V}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Your Best"})]}),A>0&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-lg font-extrabold text-white",children:A.toLocaleString()}),(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider",style:{color:"rgba(255,255,255,0.5)"},children:"Players"})]})]}),(0,t.jsxs)("div",{className:"space-y-0",children:[N.map((e,t)=>eo(e,t,ei.hex)),"weekly-pro"!==_&&N.length>0&&(0,t.jsx)("div",{className:"py-2.5 flex items-center justify-center border-t",style:{borderColor:"rgba(255,255,255,0.06)"},children:(0,t.jsxs)("span",{className:"text-[11px]",style:{color:"rgba(255,255,255,0.35)"},children:["Showing top ",N.length,A>N.length?` of ${A.toLocaleString()} players`:" players"]})}),et&&null!=O&&null!=V&&!N.some(e=>e.username===et)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5",style:{backgroundColor:"rgba(255,255,255,0.03)"},children:[(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.08)"}}),(0,t.jsx)("span",{className:"text-[10px] font-bold",style:{color:"rgba(255,255,255,0.3)"},children:"···"}),(0,t.jsx)("div",{className:"flex-1 h-px",style:{backgroundColor:"rgba(255,255,255,0.08)"}})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",style:{backgroundColor:"rgba(147,51,234,0.15)"},children:[(0,t.jsx)("div",{className:"w-8 flex-shrink-0 flex items-center justify-center",children:(0,t.jsxs)("span",{className:"text-sm font-bold",style:{color:"#c084fc"},children:["#",O]})}),(0,t.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"rgba(255,255,255,0.15)"},children:v?.homeCountry?(0,t.jsx)("span",{className:"text-base",children:(0,c.countryCodeToEmoji)(v.homeCountry)}):(0,t.jsx)("span",{className:"text-xs text-white/40",children:"?"})}),(0,t.jsxs)("span",{className:"flex-1 font-semibold truncate text-sm text-white",children:[et,k&&l.BADGE_VARIANTS.has(k)?(0,t.jsx)("span",{className:"ml-1 inline-flex",children:(0,t.jsx)(o.PixelBadgeSVG,{variant:k,size:16,naked:!0})}):null]}),(0,t.jsx)("span",{className:"font-black text-lg flex-shrink-0 text-white",style:{color:ei.hex},children:V})]})]})]})]})}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"rgba(255,255,255,0.1)"},children:(0,t.jsx)("div",{className:"flex justify-center py-3",children:(0,t.jsx)(u.MiddleAd,{})})})]}),J&&(0,t.jsx)(d.PremiumModePaywall,{isOpen:J,onClose:()=>X(!1),mode:"footy-clubs",defaultTab:"pro",onPurchaseSuccess:()=>{X(!1),g(),j("footy-clubs")}}),W&&(0,t.jsx)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"bg-[#0d1b3e] border border-yellow-500/30 rounded-2xl p-6 max-w-sm w-full shadow-2xl",children:[(0,t.jsxs)("div",{className:"text-center mb-4",children:[(0,t.jsx)("div",{className:"text-6xl mb-3",children:"⚽"}),(0,t.jsx)("h2",{className:"text-xl font-black text-white mb-2",children:"Try Footy Clubs free — one game on us!"}),(0,t.jsx)("p",{className:"text-sm text-white/70",children:"Rank 100 legendary football clubs across 8 categories. Subscribe to GeoHunter+ for unlimited games."})]}),(0,t.jsxs)("div",{className:"space-y-2 mt-5",children:[(0,t.jsx)("button",{onClick:ee,className:"w-full py-3 rounded-xl bg-gradient-to-r from-yellow-500 to-yellow-700 text-[#0d1b3e] font-black text-sm hover:from-yellow-400 hover:to-yellow-600 transition-all",children:"⚽ Try Now — Free"}),(0,t.jsx)("button",{onClick:()=>{G(!1),X(!0)},className:"w-full py-3 rounded-xl bg-white/10 text-white/80 font-bold text-sm hover:bg-white/20 transition-all",children:"Buy GeoHunter+"}),(0,t.jsx)("button",{onClick:()=>G(!1),className:"w-full py-2 text-white/40 text-xs hover:text-white/60 transition-all",children:"Maybe later"})]})]})})]})}e.s(["SimpleLeaderboard",()=>f])},81323,e=>{"use strict";let t=(0,e.i(59490).default)("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["Target",()=>t],81323)},98160,84213,e=>{"use strict";var t=e.i(50266),r=e.i(15149),i=e.i(99056),n=e.i(46146),a=e.i(37684),s=e.i(26500);function o(e){if("u"<typeof document)return;document.documentElement.classList.toggle("dark","dark"===e);let t=document.querySelector('meta[name="theme-color"]');t&&t.setAttribute("content","dark"===e?"#0a1430":"#6d28d9");try{localStorage.setItem("geohunter:web-theme",e)}catch{}}let l=(0,e.i(99901).create)((e,t)=>({theme:"u">typeof document?document.documentElement.classList.contains("dark")?"dark":"light":"dark",setTheme:t=>{o(t),e({theme:t})},toggleTheme:()=>{let r="dark"===t().theme?"light":"dark";o(r),e({theme:r})}})),u=[{code:"en",flag:"🇬🇧",label:"English"},{code:"es",flag:"🇪🇸",label:"Español"},{code:"fr",flag:"🇫🇷",label:"Français"},{code:"pt",flag:"🇧🇷",label:"Português"},{code:"de",flag:"🇩🇪",label:"Deutsch"}];function d({emoji:e,label:r,active:i,disabled:n,disabledNote:a,onToggle:s}){return(0,t.jsxs)("button",{type:"button","aria-pressed":i,disabled:n,onClick:s,className:`flex w-full items-center gap-2.5 rounded-xl border px-3 py-2 transition-all duration-150
        ${i?"border-purple-500/70 bg-purple-500/15":"border-white/10 bg-white/5 hover:border-white/25"}
        ${n?"cursor-not-allowed opacity-40":"active:scale-[0.98]"}`,children:[(0,t.jsx)("span",{className:`text-base leading-none ${i?"":"opacity-50"}`,children:e}),(0,t.jsxs)("span",{className:`flex-1 truncate text-left text-sm font-semibold ${i?"text-white":"text-slate-400"}`,children:[r,n&&a&&(0,t.jsx)("span",{className:"ml-2 text-[9px] font-semibold uppercase tracking-wide text-red-400",children:a})]}),(0,t.jsx)("span",{className:`relative h-5 w-9 shrink-0 rounded-full transition-colors ${i?"bg-purple-500":"bg-white/15"}`,children:(0,t.jsx)("span",{className:`absolute top-0.5 h-4 w-4 rounded-full transition-all ${i?"left-[18px] bg-white":"left-0.5 bg-slate-400"}`})})]})}function c({isOpen:e,onClose:o}){let{settings:c,updateSettings:m,isDailyMode:h}=(0,r.useGameStore)(),p=(0,s.useTranslation)(),{language:f,setLanguage:g}=(0,s.useLanguage)(),x=l(e=>e.theme),v=l(e=>e.setTheme);return((0,n.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&o()};if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,o]),e)?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onClick:e=>{e.target===e.currentTarget&&o()},children:(0,t.jsxs)("div",{className:"relative w-full max-w-md overflow-hidden rounded-3xl border border-white/15 bg-gradient-to-b from-[#1a2f5c] via-[#13234a] to-[#0a1430] shadow-2xl",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-16 -top-16 h-52 w-52 rounded-full bg-purple-500/20 blur-3xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -left-20 bottom-10 h-44 w-44 rounded-full bg-amber-400/10 blur-3xl"}),(0,t.jsxs)("div",{className:"relative max-h-[90vh] overflow-y-auto p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h2",{className:"text-lg font-black tracking-wide text-white",children:["🌍 ",p.settings.title]}),(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":"Close settings",className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/15 bg-white/10 text-slate-300 transition-colors hover:bg-white/20",children:(0,t.jsx)(i.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"mt-3 text-[11px] font-black uppercase tracking-[1.5px] text-amber-400",children:p.settings.language}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:u.map(e=>{let r=f===e.code;return(0,t.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>g(e.code),className:`flex min-w-0 flex-1 flex-col items-center gap-1 rounded-2xl border-2 px-1 py-2 transition-all duration-150
                    ${r?"border-purple-500 bg-purple-500/25":"border-white/10 bg-white/5 hover:border-white/25"}
                    active:scale-95`,children:[(0,t.jsx)("span",{className:"text-lg leading-none",children:e.flag}),(0,t.jsx)("span",{className:`w-full truncate text-center text-[11px] font-bold ${r?"text-white":"text-slate-400"}`,children:e.label})]},e.code)})}),(0,t.jsx)("div",{className:"mt-3 text-[11px] font-black uppercase tracking-[1.5px] text-amber-400",children:p.settings.game}),(0,t.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,t.jsx)(d,{emoji:"🌙",label:p.settings.darkMode,active:"dark"===x,onToggle:()=>v("dark"===x?"light":"dark")}),(0,t.jsx)(d,{emoji:"💡",label:p.settings.hints,active:c.showHints,disabled:h,disabledNote:p.settings.hintsDisabled,onToggle:()=>m({showHints:!c.showHints})}),(0,t.jsx)(d,{emoji:"🔊",label:p.settings.sound,active:c.soundEnabled,onToggle:()=>m({soundEnabled:!c.soundEnabled})}),(0,t.jsx)(d,{emoji:"🏷️",label:p.settings.countryNames,active:c.showCountryNames,onToggle:()=>m({showCountryNames:!c.showCountryNames})}),(0,t.jsx)(d,{emoji:"🎯",label:p.settings.targetBar,active:c.showTargetBar??!0,onToggle:()=>m({showTargetBar:!(c.showTargetBar??!0)})})]}),(0,t.jsx)("div",{className:"mt-4 border-t border-white/10 pt-3",children:(0,t.jsx)(a.BottomAd,{})}),(0,t.jsx)("button",{type:"button",onClick:o,className:"mt-4 w-full rounded-2xl bg-gradient-to-r from-purple-500 to-indigo-500 py-3 text-sm font-extrabold text-white shadow-lg shadow-purple-500/30 transition-transform active:scale-[0.98] hover:brightness-110",children:p.settings.done})]})]})}):null}e.s(["SettingsOverlay",()=>c],98160);var m=e.i(66691),h=e.i(95849),p=e.i(85929);let f={original:"Classic — 8 traditional categories like Population, Football, and Coffee.",world:"World — global categories including Forest Cover, Basketball, and Pollution.",special:"Special — unique categories like Military, Immigration, and Rugby.",voyage:"Voyage — explore Hot Temperature, Seafood, Cycling, and more.",atlas:"Atlas — discover City Population, Olympics, Rainfall, and more.",daily:"Daily Challenge — everyone plays the same curated mix. Scores go to the leaderboard.",usa:"USA — rank the 50 states by Population, Crime, Farming, and more.",sports:"Sports — categories focused on sporting achievements."};function g({isOpen:e,onClose:r,gameMode:a,categories:o,isDailyMode:l}){let u=(0,s.useTranslation)(),d=o||(0,h.getCategoriesForGameMode)(a),c=l?f.daily:f[a]||f.original;return((0,n.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&r()};if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,r]),e)?(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:e=>{e.target===e.currentTarget&&r()},children:(0,t.jsx)("div",{className:"w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-2xl bg-[#1a1f2e] border border-white/10 shadow-2xl",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-white",children:"Category Info"}),(0,t.jsx)(m.Button,{variant:"ghost",size:"sm",onClick:r,className:"hover:bg-white/10 p-2 rounded-full border border-white/20 hover:border-white/30 text-white/80 hover:text-white",children:(0,t.jsx)(i.X,{className:"w-5 h-5"})})]}),(0,t.jsx)("div",{className:"mb-5 rounded-xl bg-purple-500/15 border border-purple-500/30 px-4 py-3",children:(0,t.jsx)("p",{className:"text-sm text-purple-300 leading-relaxed",children:c})}),(0,t.jsx)("div",{className:"space-y-3",children:d.map(e=>{let r=(0,p.getCategoryMetadata)(e.id,{isWild:!1,nameOverride:e.name,iconOverride:e.icon,descriptionOverride:e.description}),i=e.description?e.description:r.goal||r.description||"Category information";return(0,t.jsxs)("div",{className:"rounded-xl bg-white/[0.06] p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,t.jsx)("span",{className:"text-2xl",children:r.icon}),(0,t.jsx)("h3",{className:"font-bold text-white text-base uppercase tracking-wide",children:r.name})]}),(0,t.jsx)("p",{className:"text-sm text-white/60 leading-relaxed ml-10",children:i})]},e.id)})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(m.Button,{onClick:r,className:"w-full bg-purple-600 hover:bg-purple-700 text-white",children:u.categoryInfo.gotIt})})]})})}):null}e.s(["CategoryInfoOverlay",()=>g],84213)},96552,e=>{"use strict";let t=(0,e.i(59490).default)("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);e.s(["SkipForward",()=>t],96552)},92753,e=>{"use strict";var t=e.i(50266),r=e.i(46146),i=e.i(99056),n=e.i(49785),a=e.i(8519),s=e.i(61584),o=e.i(89132),l=e.i(18738),u=e.i(68604);let d={explorer:{icon:"🚫",name:"Explorer",subtitle:"No Ads",headline:"Remove Ads Forever",monthly:o.STRIPE_PRODUCTS.EXPLORER_MONTHLY,yearly:o.STRIPE_PRODUCTS.EXPLORER_YEARLY,features:["Completely ad-free experience","Perfect Solutions, no ad required","Cancel anytime"]},pro:{icon:"👑",name:"GeoHunter+",subtitle:"All Access",headline:"Unlock Everything",badge:"BEST VALUE",monthly:o.STRIPE_PRODUCTS.PRO_MONTHLY,yearly:o.STRIPE_PRODUCTS.PRO_YEARLY,features:["No ads, ever","Perfect Solutions included","USA, Canada & Europe modes included","Weekly Pro Challenge","All future modes free"]}};function c({isOpen:e,onClose:o,onPurchaseSuccess:c,source:m,highlightPro:h=!1}){let p,{user:f,isAuthenticated:g,hasProAccess:x,hasExplorerAccess:v,refreshPremiumStatus:y}=(0,a.useSupabaseAuthStore)(),[b,w]=(0,r.useState)(h?"pro":"explorer"),[k,$]=(0,r.useState)("monthly"),[j,_]=(0,r.useState)(!1),[S,N]=(0,r.useState)(null),[I,P]=(0,r.useState)(!1),[C,T]=(0,r.useState)(null);if((0,r.useEffect)(()=>{e&&(w(h?"pro":"explorer"),$("monthly"),N(null),(0,l.trackPaywall)(m,{highlightPro:h}),g&&y())},[e]),!e)return null;if(x()||v())return c?.(),o(),null;let z=async e=>{if((0,l.trackPaywallCta)(m,{product:e}),!g||!f){T(e),P(!0);return}_(!0),N(null);try{let t={"Content-Type":"application/json"};try{if(s.supabase){let{data:{session:e}}=await s.supabase.auth.getSession();e?.access_token&&(t.Authorization=`Bearer ${e.access_token}`)}}catch{}let r=await fetch("/api/stripe/create-checkout",{method:"POST",headers:t,body:JSON.stringify({userId:f.id,userEmail:f.email,productId:e})}),i=await r.json();if(!r.ok)throw Error(i.error||"Failed to create checkout session");if(i.url)window.location.href=i.url;else throw Error("No checkout URL received")}catch(e){N(e instanceof Error?e.message:"Purchase failed")}finally{_(!1)}},O=d[b][k];return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-b from-slate-900 to-slate-950 rounded-2xl max-w-md w-full shadow-2xl border border-amber-500/20 overflow-hidden max-h-[90vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"relative bg-gradient-to-r from-amber-600 to-amber-700 p-5 flex-shrink-0",children:[(0,t.jsx)("button",{onClick:o,className:"absolute top-4 right-4 text-white/70 hover:text-white",children:(0,t.jsx)(i.X,{className:"w-5 h-5"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-5xl mb-2",children:"⭐"}),(0,t.jsx)("h2",{className:"text-xl font-black text-white",children:d[b].headline}),(0,t.jsx)("p",{className:"text-amber-100 text-sm mt-0.5",children:"Join thousands of GeoHunter players"})]})]}),(0,t.jsxs)("div",{className:"overflow-y-auto flex-1 p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 p-1 rounded-xl mb-4 mx-auto bg-white/5",style:{maxWidth:260},children:[(0,t.jsx)("button",{onClick:()=>$("monthly"),className:`flex-1 py-2 rounded-lg text-sm font-bold transition-all ${"monthly"===k?"bg-white/15 text-white":"text-white/50"}`,children:"Monthly"}),(0,t.jsxs)("button",{onClick:()=>$("yearly"),className:`flex-1 py-2 rounded-lg text-sm font-bold transition-all flex items-center justify-center gap-1.5 ${"yearly"===k?"bg-white/15 text-white":"text-white/50"}`,children:["Yearly",(0,t.jsxs)("span",{className:"text-[9px] font-black px-1.5 py-0.5 rounded-full bg-green-500 text-white",children:["Save ",Math.round(((p=12*d[b].monthly.priceAmount)-d[b].yearly.priceAmount)/p*100),"%"]})]})]}),(0,t.jsx)("div",{className:"space-y-2.5 mb-4",children:["explorer","pro"].map(e=>{let r=d[e],i=r[k],a=b===e;return(0,t.jsxs)("button",{onClick:()=>w(e),className:`w-full text-left rounded-2xl p-4 transition-all relative overflow-hidden border-2 ${a?"border-amber-400 bg-white/[0.06]":"border-transparent bg-white/[0.03]"}`,children:["pro"===e&&(0,t.jsx)("div",{className:"absolute top-3 right-3 text-[9px] font-black px-2.5 py-1 rounded-full bg-amber-500 text-slate-900",children:"BEST VALUE"}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"text-3xl",children:r.icon}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,t.jsx)("span",{className:"text-base font-black text-white",children:r.name}),(0,t.jsx)("span",{className:"text-xs text-white/50",children:r.subtitle})]}),(0,t.jsxs)("div",{className:"flex items-baseline gap-1 mb-2",children:[(0,t.jsx)("span",{className:"text-2xl font-black text-amber-400",children:i.price}),(0,t.jsxs)("span",{className:"text-xs text-white/40",children:["/","monthly"===k?"mo":"yr"]})]}),(0,t.jsx)("div",{className:"space-y-1",children:r.features.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-white/70",children:[(0,t.jsx)(n.Check,{className:"w-3 h-3 flex-shrink-0 text-green-500"}),e]},r))})]})]})]},e)})}),S&&(0,t.jsx)("div",{className:"bg-red-500/20 border border-red-500/30 rounded-lg p-3 mb-3",children:(0,t.jsx)("p",{className:"text-red-300 text-sm text-center",children:S})}),(0,t.jsx)("button",{onClick:()=>z(O.productId),disabled:j,className:"w-full bg-gradient-to-r from-amber-500 to-amber-600 hover:from-amber-400 hover:to-amber-500 disabled:opacity-50 text-slate-900 font-black py-4 rounded-xl transition-all flex items-center justify-center gap-2 text-base shadow-lg mb-2",children:j?(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):g?`⭐ Subscribe \xb7 ${O.price}/${"monthly"===k?"mo":"yr"}`:`Sign in & Subscribe \xb7 ${O.price}/${"monthly"===k?"mo":"yr"}`}),(0,t.jsx)("p",{className:"text-xs text-center text-white/30",children:"Cancel anytime · auto-renews unless cancelled 24h before renewal"})]})]}),(0,t.jsx)(u.AuthModal,{isOpen:I,onClose:()=>P(!1),onAuthenticated:()=>{P(!1),C&&(T(null),z(C))}})]})}e.s(["GeoHunterPlusModal",()=>c])},38643,23621,3549,31507,56042,20893,45256,62508,e=>{"use strict";var t=e.i(50266),r=e.i(46146),i=e.i(15149),n=e.i(95849);e.i(20125);var a=e.i(38599),s=e.i(43360);e.i(24856);var o=e.i(13335),l=e.i(5208),u=e.i(98160),d=e.i(84213),c=e.i(66985),m=e.i(15629),h=e.i(7340),p=e.i(84945),f=e.i(96552),g=e.i(26500),x=e.i(37684),v=e.i(69923),y=e.i(92753);let b=["original","world","special","voyage","atlas"];function w({onConfirm:e,onCancel:i}){let[a,s]=(0,r.useState)(new Set),o=(0,r.useMemo)(()=>{let e=new Set,t=[];for(let r of b)for(let i of(0,n.getCategoriesForGameMode)(r))e.has(i.id)||(e.add(i.id),t.push(i));return t},[]);return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",children:(0,t.jsxs)("div",{className:"bg-[#1e1b4b] rounded-2xl p-5 w-full max-w-sm flex flex-col gap-4",style:{maxHeight:"85vh"},children:[(0,t.jsxs)("div",{className:"flex justify-between items-center flex-shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-white font-black text-lg leading-none",children:"🎨 Custom Mode"}),(0,t.jsx)("p",{className:"text-white/50 text-xs mt-1",children:"Pick exactly 8 categories"})]}),(0,t.jsx)("button",{onClick:i,className:"text-white/50 hover:text-white/80 text-xl leading-none transition-colors",children:"✕"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsx)("div",{className:"flex-1 h-1.5 bg-white/10 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-purple-400 rounded-full transition-all",style:{width:`${a.size/8*100}%`}})}),(0,t.jsxs)("span",{className:`text-sm font-bold flex-shrink-0 ${8===a.size?"text-green-400":"text-white/60"}`,children:[a.size,"/",8]})]}),(0,t.jsx)("div",{className:"overflow-y-auto flex-1 min-h-0",children:(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:o.map(e=>{let r=a.has(e.id),i=!r&&a.size>=8;return(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.id,void s(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.size<8&&r.add(t),r})},disabled:i,className:`flex flex-col items-center gap-1.5 p-2.5 rounded-xl border-2 transition-all ${r?"border-purple-400 bg-purple-500/25 scale-[1.02]":i?"border-white/5 bg-white/3 opacity-40 cursor-not-allowed":"border-white/10 bg-white/5 hover:border-white/20 active:scale-[0.97]"}`,children:[(0,t.jsx)("span",{className:"text-2xl leading-none",children:e.icon}),(0,t.jsx)("span",{className:"text-[10px] text-white/80 text-center leading-tight font-medium",children:e.name})]},e.id)})})}),(0,t.jsx)("button",{disabled:8!==a.size,onClick:()=>e([...a]),className:"flex-shrink-0 bg-green-500 disabled:bg-white/15 disabled:text-white/30 text-white font-black py-3 rounded-xl transition-colors text-sm",children:8===a.size?"Play →":`Select ${8-a.size} more`})]})})}var k=e.i(8519);let $={original:{label:"Classic",color:"#9333ea"},world:{label:"World",color:"#10b981"},special:{label:"Special",color:"#f97316"},voyage:{label:"Voyage",color:"#06b6d4"},atlas:{label:"Atlas",color:"#dc2626"},usa:{label:"USA",color:"#1e40af"},canada:{label:"Canada",color:"#b91c1c"},europe:{label:"Europe",color:"#1d4ed8"},sports:{label:"Sports",color:"#15803d"},"weekly-pro":{label:"Weekly Pro",color:"#ca8a04"},"world-cup":{label:"Nations Cup",color:"#166534"},"world-cup-ko":{label:"Nations Cup",color:"#166534"},"footy-clubs":{label:"Footy Clubs",color:"#d4a017"}};function j(){let e,b,j,S,N,I=(0,g.useTranslation)(),{countries:P,currentCountryIndex:C,settings:T,usedCategories:z,selectCategory:O,skipCountry:E,goToMenu:U,selectedGameMode:D,selections:A,isDailyMode:Z,dailyChallenge:R,modeRankCaps:M,hasUsedSkip:L,startGame:F,startWeeklyGame:V,startMiniHunter:B,startMiniHunter2:W,startReverseGame:G,startCustomGame:J,confirmCustomCategories:X,isTutorialMode:H,isPracticeMode:K,isMiniHunterMode:Y,isMiniHunter2Mode:q,isReverseMode:Q,isCustomMode:ee,customCategories:et,isChallengeMode:er,challengeCategories:ei,challengeDifficulty:en,challengePar:ea,weeklyUserTier:es,bestScoresByMode:eo}=(0,i.useGameStore)(),el="weekly-pro"===D&&"free"===es,[eu,ed]=(0,r.useState)(!1),{hasProAccess:ec}=(0,k.useSupabaseAuthStore)(),em="footy-clubs"===D&&!ec(),[eh,ep]=(0,r.useState)(!1),[ef,eg]=(0,r.useState)(!1),[ex,ev]=(0,r.useState)(!1),[ey,eb]=(0,r.useState)(null),[ew,ek]=(0,r.useState)(!1),[e$,ej]=(0,r.useState)(!1),[e_,eS]=(0,r.useState)(!1),[eN,eI]=(0,r.useState)(null),[eP,eC]=(0,r.useState)(null),[eT,ez]=(0,r.useState)(!1),[eO,eE]=(0,r.useState)(!1),[eU,eD]=(0,r.useState)(0),[eA,eZ]=(0,r.useState)(0),[eR,eM]=(0,r.useState)(!1),[eL,eF]=(0,r.useState)(!1),[eV,eB]=(0,r.useState)([]),[eW,eG]=(0,r.useState)(null),eJ=(0,r.useRef)(null),eX=(0,r.useRef)(null),eH=(0,r.useRef)(0),eK=(0,r.useRef)(0),eY=P[C],eq=Z&&R?R.categories:er&&ei?ei:(0,n.getCategoriesForGameMode)(D),eQ=A.reduce((e,t)=>e+t.rank,0)||0,e0=(0,r.useMemo)(()=>{if(Z||!eY||!eq.length||!ex)return null;let e=eq.filter(e=>!z.has(e.id)).map(e=>{let t=eY.rankings?.[e.id];return{id:e.id,name:e.name,rank:"number"==typeof t&&t>0?t:999}}).sort((e,t)=>e.rank-t.rank);if(!e.length)return null;let t=e[0].rank,r=e.length,i=I.countries[eY.name]||eY.name;if(t<=10)return{body:`Which category would ${i} comfortably sit in the top 10 for?`};if(t<=35)return{body:`What in this list most captures ${i}'s reputation?`};if(t<=70)return{body:`${i} might rank in the middle of some of these categories, because it has a mix of strengths and weaknesses. Choose the category that feels safest.`};let n=r>1?`${r} categories`:"last category";return{body:`Which of the remaining ${n} is ${i} most likely to fit into?`}},[eq,eY,ex,z,Z,I.countries]),e1=!e0||!ex||ef||!!ey,e2={original:"original",world:"world",special:"special",voyage:"voyage",atlas:"atlas",usa:"usa"}[D],e4=Z||K||Y||er||!e2?null:eo?.[e2]??null,e5=Z?R?.targetScore??null:null;(0,r.useEffect)(()=>{c.soundEffects.setEnabled(T.soundEnabled)},[T.soundEnabled]),(0,r.useEffect)(()=>()=>{c.soundEffects.stopSpinSound()},[]),(0,r.useEffect)(()=>{eF(!1)},[C]),(0,r.useEffect)(()=>{ey&&eF(!1)},[ey]),(0,r.useEffect)(()=>{(!ex||ef)&&eF(!1)},[ex,ef]),(0,r.useEffect)(()=>{if(!eL){eX.current&&(clearTimeout(eX.current),eX.current=null);return}return eX.current=setTimeout(()=>{eF(!1)},7e3),()=>{eX.current&&(clearTimeout(eX.current),eX.current=null)}},[eL]);let e6=(0,r.useCallback)(()=>{ey||L||(eb("skip"),eI({category:"Skip",rank:0}),eS(!0),T.soundEnabled&&c.soundEffects.playSoundEffect("ready"),setTimeout(()=>{eS(!1),eb(null),E()},1500))},[ey,L,T.soundEnabled,E]);(0,r.useEffect)(()=>{eY&&(eg(!0),ev(!1),eb(null),eS(!1),T.soundEnabled&&c.soundEffects.playSpinSound())},[C,eY,T.soundEnabled]);let e3=(0,r.useCallback)(()=>{eg(!1),ev(!0),c.soundEffects.stopSpinSound(),T.soundEnabled&&c.soundEffects.playCountryRevealSound()},[T.soundEnabled]),e9=(0,r.useCallback)((e,t,r,i)=>{let n=performance.now(),a={title:e,description:t,icon:r};n-eH.current<700&&eV.length&&eV[eV.length-1].title===e||(eH.current=n,eB(e=>[...e,a]))},[eV]);(0,r.useEffect)(()=>{if(eW||0===eV.length)return;let e=eV[0];eG(e),T.soundEnabled&&!(e.title.includes("Perfect")||e.title.includes("Top 5"))&&c.soundEffects.playSoundEffect("achievement"),eJ.current&&clearTimeout(eJ.current),eJ.current=setTimeout(()=>{eG(null),eB(e=>e.slice(1))},2600)},[eW,eV,T.soundEnabled]),(0,r.useEffect)(()=>()=>{eJ.current&&clearTimeout(eJ.current)},[]);let e8=(0,r.useCallback)(e=>{if(z.has(e)||ey)return;if("skip"===e)return void e6();let t=eq.filter(e=>!z.has(e.id)).map(e=>({id:e.id,name:e.name,rank:eY.rankings[e.id]||999}));eb(e);let r=eY.rankings[e],i=M?.[e]??("coffee"===e?73:"pro_sports_championships"===e?24:100),n=null==r||r>i?i:r;if(eI({category:eq.find(t=>t.id===e)?.name||e,rank:n}),eS(!0),n>=1&&n<=5){let e=eU+1;if(eD(e),1===n){let e=eA+1;eZ(e),e9(1===e?"Perfect!":`${e}x Perfect!`,"You found rank 1 in this category!","👑",!0)}else e9("Top 5!",`Excellent choice! This country ranks ${n} in this category.`,"🏆",!0);e>=5&&setTimeout(()=>{e9("Hot Streak! 🔥",`${e} excellent choices in a row!`,"🔥",!0)},1500)}else n>50&&(eD(0),eZ(0));eM(!0),setTimeout(()=>eM(!1),1e3),T.soundEnabled&&c.soundEffects.playCategorySelectSound(n);let a=A.reduce((e,t)=>e+t.rank,0);if(T.showHints&&a+n>5){let r=t.reduce((e,t)=>t.rank<e.rank?t:e,t[0]);r&&r.id!==e&&n-r.rank>=2&&(eC({category:Z&&R&&R.optimalRanks&&R.optimalRanks[r.id]===r.rank?`★${r.name}`:r.name,rank:r.rank,country:eY.name}),ez(!0),setTimeout(()=>ez(!1),3e3))}setTimeout(()=>{ev(!1),O(e)},200)},[z,ey,e6,eq,eY,T.soundEnabled,A,Z,R,T.showHints,O,eA,eU,e9]),e7=(e,t)=>{let r=parseInt(e.replace("#",""),16),i=Math.round(2.55*t*100),n=(r>>16)+i,a=(r>>8&255)+i,s=(255&r)+i;return"#"+(0x1000000+(n<255?n<1?0:n:255)*65536+(a<255?a<1?0:a:255)*256+(s<255?s<1?0:s:255)).toString(16).slice(1)},te=(e,t)=>{let r=parseInt(e.replace("#",""),16),i=Math.round(2.55*t*100),n=(r>>16)-i,a=(r>>8&255)-i,s=(255&r)-i;return"#"+(0x1000000+(n>255?255:n<0?0:n)*65536+(a>255?255:a<0?0:a)*256+(s>255?255:s<0?0:s)).toString(16).slice(1)};return ee&&!et?(0,t.jsx)("div",{className:"min-h-screen classic-bg nostalgic-background",children:(0,t.jsx)(w,{onConfirm:e=>X(e),onCancel:()=>U()})}):eY?(0,t.jsxs)("div",{className:`${Y?"min-h-screen text-white flex flex-col":Z?"min-h-screen text-white flex flex-col daily-bg":"world"===D?"min-h-screen text-white flex flex-col world-bg":"special"===D?"min-h-screen text-white flex flex-col special-bg":"voyage"===D?"min-h-screen text-white flex flex-col voyage-bg":"atlas"===D?"min-h-screen text-white flex flex-col atlas-bg":"usa"===D?"min-h-screen text-white flex flex-col usa-bg":"canada"===D?"min-h-screen text-white flex flex-col canada-bg":"europe"===D?"min-h-screen text-white flex flex-col europe-bg":"sports"===D?"min-h-screen text-white flex flex-col sports-bg":"weekly-pro"===D||"empires"===D||"world-cup"===D||"world-cup-ko"===D||"footy-clubs"===D?"min-h-screen text-white flex flex-col":"min-h-screen text-white flex flex-col classic-bg"} nostalgic-background`,style:Y?{background:`linear-gradient(135deg,
          ${e7("#d97706",.15)} 0%,
          #d97706 35%,
          ${te("#d97706",.2)} 100%)`}:Z?{background:`linear-gradient(135deg,
          ${e7("#2670c9",.15)} 0%,
          #2670c9 35%,
          ${te("#2670c9",.2)} 100%)`}:"world"===D?{background:`linear-gradient(135deg, 
          ${e7("#4ca84c",.2)} 0%, 
          #4ca84c  35%, 
          ${te("#4ca84c",.15)} 100%)`}:"special"===D?{background:`linear-gradient(135deg, 
          ${e7("#eb8e2a",.2)} 0%, 
          #eb8e2a 35%, 
          ${te("#eb8e2a",.15)} 100%)`}:"voyage"===D?{background:`linear-gradient(135deg, 
          ${e7("#0891b2",.15)} 0%, 
          #0891b2 35%, 
          ${te("#0891b2",.2)} 100%)`}:"atlas"===D?{background:`linear-gradient(135deg, 
          ${e7("#dc2626",.15)} 0%, 
          #dc2626 35%, 
          ${te("#dc2626",.2)} 100%)`}:"usa"===D?{background:`linear-gradient(135deg,
          ${e7("#1e3a8a",.15)} 0%,
          #1e3a8a 35%,
          ${te("#1e3a8a",.2)} 100%)`}:"canada"===D?{background:`linear-gradient(135deg,
          ${e7("#b91c1c",.15)} 0%,
          #b91c1c 35%,
          ${te("#b91c1c",.2)} 100%)`}:"europe"===D?{background:`linear-gradient(135deg,
          ${e7("#1d4ed8",.15)} 0%,
          #1d4ed8 35%,
          ${te("#1d4ed8",.2)} 100%)`}:"sports"===D?{background:`linear-gradient(135deg,
          ${e7("#15803d",.15)} 0%,
          #15803d 35%,
          ${te("#15803d",.2)} 100%)`}:"weekly-pro"===D?{background:`linear-gradient(135deg,
          ${e7("#ca8a04",.15)} 0%,
          #ca8a04 35%,
          ${te("#ca8a04",.2)} 100%)`}:"empires"===D?{background:`linear-gradient(135deg,
          ${e7("#92400e",.15)} 0%,
          #92400e 35%,
          ${te("#92400e",.2)} 100%)`}:"world-cup"===D||"world-cup-ko"===D?{background:`linear-gradient(135deg,
          #1a4d2e 0%,
          #0e3019 35%,
          #052e16 100%)`}:"footy-clubs"===D?{backgroundColor:"#0d1b3e",backgroundImage:"linear-gradient(135deg, rgba(22,36,74,0.85) 0%, rgba(13,27,62,0.92) 35%, rgba(6,13,34,0.95) 100%), url('/footy-clubs/stadium-bg.png')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{background:`linear-gradient(135deg,
        ${e7("#9c62b3",.2)} 0%,
        #9c62b3 35%,
        ${te("#9c62b3",.15)} 100%)`},children:[(0,t.jsxs)("div",{className:"flex-1 flex items-start justify-center gap-4 px-4 pb-4 w-full",children:[(0,t.jsx)("div",{className:"hidden xl:block sticky top-20 flex-shrink-0 z-20",children:(0,t.jsx)(x.LeftSkyscraperAd,{})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center w-full max-w-3xl",children:[(0,t.jsx)("div",{className:"flex justify-center mb-3",children:(0,t.jsx)(x.MiddleAd,{},"game-top-banner")}),(e=(0,a.computeTargetBar)({currentScore:eQ,usedCount:z.size,totalCountries:eq.length,gameMode:Z?"daily":D,personalBest:e4,dailyOptimal:e5}),b=T.showTargetBar??!0,j=e.colorHex,(0,t.jsxs)("div",{className:"w-full max-w-3xl flex items-stretch gap-2.5 mt-1 mb-1.5 px-2",children:[(0,t.jsxs)("button",{onClick:()=>{(!Z||Y||q||Q||ee||!(P.length-C<=3)&&window.confirm("Are you sure you want to quit the Daily Challenge?\n\nIf you quit now, you won't be able to play again today."))&&(T.soundEnabled&&c.soundEffects.playMenuSound(),U())},disabled:Z&&!Y&&!q&&!Q&&!ee&&P.length-C<=3,className:`relative group flex items-center justify-center bg-white/10 backdrop-blur-sm border border-white/15 rounded-2xl w-24 sm:w-28 aspect-square overflow-hidden p-1 transition nostalgic-button ${Z&&!Y&&!q&&!Q&&!ee&&P.length-C<=3?"opacity-50 cursor-not-allowed":"hover:bg-white/15 active:scale-[0.97]"}`,"aria-label":I.game.backToMainMenu,title:"Back to Menu",children:[(0,t.jsx)(h.default,{src:"/geohunter-logo.png",alt:"GeoHunter",width:160,height:160,className:"object-contain drop-shadow-xl",priority:!0}),Y&&(0,t.jsx)("span",{className:"absolute top-2 left-2 bg-amber-400 text-amber-900 text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:"MINI"}),q&&(0,t.jsx)("span",{className:"absolute top-2 left-2 bg-teal-400 text-teal-900 text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:"MINI 2"}),Q&&(0,t.jsx)("span",{className:"absolute top-2 left-2 bg-indigo-400 text-indigo-900 text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:"REVERSE"}),ee&&(0,t.jsx)("span",{className:"absolute top-2 left-2 bg-pink-400 text-pink-900 text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:"CUSTOM"}),Z&&!Y&&!q&&!Q&&!ee&&(0,t.jsx)("span",{className:"absolute top-2 left-2 bg-cyan-400 text-cyan-900 text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:"DAILY"}),er&&(S=en?(0,o.getDuelDifficulty)(en):null,N=S?.color||"#e11d48",(0,t.jsxs)("span",{className:"absolute top-2 left-2 text-white text-[10px] font-bold px-2 py-0.5 rounded-full shadow",style:{backgroundColor:N},children:["⚔️ ",S?S.name.toUpperCase():"DUEL",null!=ea?` \xb7 PAR ${ea}`:""]})),!Z&&!Y&&$[D]&&(0,t.jsx)("span",{className:"absolute bottom-1.5 left-1/2 -translate-x-1/2 text-white text-[8px] font-black uppercase px-2 py-0.5 rounded-full shadow tracking-wider",style:{backgroundColor:$[D].color},children:$[D].label})]}),(0,t.jsxs)("div",{className:"flex-1 bg-white/10 backdrop-blur-sm border border-white/15 rounded-2xl px-3.5 py-2.5 flex flex-col justify-center",children:[(0,t.jsxs)("div",{className:"text-center mb-2 relative",children:[(0,t.jsx)("div",{className:`text-[9px] tracking-wide font-bold uppercase ${K?"text-yellow-300":"text-white/70"}`,style:{letterSpacing:"1.5px"},children:K?"EASY MODE":I.game.totalRank}),(0,t.jsxs)("div",{className:"text-4xl font-black text-yellow-300 drop-shadow-sm leading-none relative",style:{textShadow:"0 2px 8px rgba(0,0,0,0.3)"},children:[eQ,eR&&(0,t.jsxs)("div",{className:"absolute -top-6 left-1/2 -translate-x-1/2 text-green-400 text-sm font-bold pointer-events-none",style:{animation:"fadeUp 0.8s ease-out forwards"},children:["+",Math.abs(eN?.rank||0)]})]}),eU>2&&(0,t.jsxs)("div",{className:"absolute -top-2 -right-2 bg-gradient-to-r from-orange-400 to-red-400 text-white text-[8px] font-bold px-1.5 py-0.5 rounded-full shadow-lg",children:["🔥 ",eU]}),eA>0&&(0,t.jsxs)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 bg-gradient-to-r from-purple-400 to-pink-400 text-white text-[7px] font-bold px-1 py-0.5 rounded-full",children:["⭐ ",eA]})]}),b&&(0,t.jsxs)("div",{className:"flex items-center justify-center w-full",children:[(0,t.jsx)("div",{className:"w-3 h-3"}),(0,t.jsx)("div",{className:"flex-1 flex justify-center",children:(0,t.jsxs)("div",{className:"w-[70%] min-w-[120px] max-w-[220px] h-[18px] bg-white/20 rounded-full overflow-hidden relative border border-white/15",title:`Target: ${e.target}`,children:[(0,t.jsx)("div",{className:"h-full transition-all duration-500",style:{width:`${e.fillPercent}%`,backgroundColor:j,opacity:"neutral"===e.color?.4:1}}),(0,t.jsxs)("div",{className:"absolute right-2 top-0 bottom-0 flex items-center gap-1 pointer-events-none",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"w-2.5 h-2.5",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"6"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"2"})]}),(0,t.jsx)("span",{className:"text-[10px] font-extrabold text-white leading-none",style:{textShadow:"0 1px 3px rgba(0,0,0,0.65)"},children:e.target})]})]})}),(0,t.jsx)("div",{className:"w-3 h-3"})]}),(0,t.jsx)("div",{className:"flex items-center justify-center gap-1 mt-1.5",children:Array.from({length:eq.length},(e,r)=>{let i="bg-white/20 border-white/20";if(r<z.size){let e=A[r],t=e?e.rank:999;i=t<=5?"bg-green-400 border-green-300/60":t<=15?"bg-emerald-400 border-emerald-300/60":t<=30?"bg-blue-400 border-blue-300/60":t<=50?"bg-amber-400 border-amber-300/60":t<=65?"bg-orange-400 border-orange-300/60":"bg-red-400 border-red-300/60"}else r===z.size&&(i="bg-white/30 border-white/40 animate-pulse");return(0,t.jsx)("div",{className:`w-2.5 h-2.5 rounded-full border ${i}`,title:r<z.size&&A[r]?`Rank ${A[r].rank}`:""},r)})})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center bg-white/10 backdrop-blur-sm border border-white/15 rounded-2xl p-2 w-12 gap-2",children:[(0,t.jsx)("button",{onClick:()=>{T.soundEnabled&&c.soundEffects.playClickSound(),ej(!0)},className:"w-8 h-8 rounded-lg bg-white/10 hover:bg-white/20 flex items-center justify-center text-white/80 hover:text-white transition-all hover:scale-105 active:scale-95","aria-label":I.game.categoryInfo,children:(0,t.jsx)("svg",{className:"w-4.5 h-4.5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),(0,t.jsx)("button",{onClick:()=>{el?ed(!0):em?ep(!0):(T.soundEnabled&&c.soundEffects.playSoundEffect("reset"),eE(!0),setTimeout(()=>{Y?B().finally(()=>eE(!1)):q?W().finally(()=>eE(!1)):Q?G().finally(()=>eE(!1)):"weekly-pro"===D?V().finally(()=>eE(!1)):(F(D),eE(!1))},600))},className:"w-8 h-8 rounded-lg bg-white/10 hover:bg-white/20 flex items-center justify-center text-white/80 hover:text-white transition-all hover:scale-110 active:scale-95 disabled:opacity-40",disabled:Z&&!Y&&!q&&!Q&&!ee||eO,"aria-label":I.game.restartGame,children:(0,t.jsx)("svg",{className:`w-4.5 h-4.5 ${eO?"animate-spin":"group-hover:rotate-45 transition-transform duration-500"}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})})}),(0,t.jsx)("button",{onClick:()=>{T.soundEnabled&&c.soundEffects.playClickSound(),ek(!0)},className:"group w-8 h-8 rounded-lg bg-white/10 hover:bg-white/20 flex items-center justify-center text-white/80 hover:text-white transition-all hover:scale-105 active:scale-95","aria-label":I.game.settings,children:(0,t.jsx)("svg",{className:"w-4.5 h-4.5 settings-spin group-hover:animate-spin",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})})})]})]})),(0,t.jsxs)("div",{className:`w-full max-w-md mx-auto ${"world-cup"===D||"world-cup-ko"===D?"bg-[#0a1e0d] border border-[rgba(251,191,36,0.2)]":"footy-clubs"===D?"bg-[#0d1b3e] border border-[rgba(212,160,23,0.25)]":"bg-white"} rounded-3xl shadow-xl px-5 pt-4 pb-5 flex flex-col items-center relative font-inter`,children:[(0,t.jsxs)("div",{className:"mb-4 relative w-full flex flex-col items-center",children:[Z&&!ee&&ex&&!ef&&!ey&&!L&&(0,t.jsx)("div",{className:"absolute bottom-0 right-0 z-30 mb-2 mr-2",style:{animation:"skipPulse 1.1s ease-in-out infinite"},children:(0,t.jsxs)("button",{onClick:()=>e8("skip"),"aria-label":I.game.skipThisCountry,className:"relative w-14 h-14 rounded-xl bg-white flex flex-col items-center justify-center shadow-xl border-2 border-gray-300 hover:scale-105 active:scale-95 transition-all duration-200 hover:shadow-2xl hover:border-gray-400",children:[(0,t.jsx)(f.SkipForward,{className:"text-black w-5 h-5 mb-0.5 stroke-[2.5]"}),(0,t.jsx)("div",{className:"text-[9px] font-extrabold text-black uppercase tracking-wide",children:"Skip"}),(0,t.jsx)("div",{className:"absolute -top-1.5 -right-1.5 w-6 h-6 bg-yellow-400 rounded-full flex items-center justify-center text-[13px] font-black text-black border-[3px] border-yellow-500 shadow-lg",children:"1"})]})}),!Z&&(0,t.jsxs)("button",{type:"button","aria-pressed":eL,"aria-label":eL?I.game.hideHint:I.game.showHint,disabled:e1,onClick:()=>{e1||(T.soundEnabled&&c.soundEffects.playClickSound(),eF(e=>!e))},className:`group absolute top-3 right-3 flex items-center gap-1 rounded-full border px-2.5 py-1 text-[13px] font-semibold tracking-[0.02em] transition-all duration-200 backdrop-blur ${e1?"cursor-not-allowed border-white/60 bg-white/35 text-white/70":eL?"border-purple-300 bg-white text-purple-700 shadow-[0_20px_40px_-18px_rgba(79,70,229,0.85)]":"border-purple-200 bg-white/90 text-purple-700 hover:bg-white hover:shadow-[0_22px_46px_-20px_rgba(79,70,229,0.75)]"}`,children:[(0,t.jsx)("span",{className:"text-base leading-none",children:"💡"}),(0,t.jsx)("span",{className:e1?"text-white/80":"",children:"?"})]}),eL&&e0&&(0,t.jsx)("div",{className:"absolute top-14 right-3 z-30 max-w-[70vw] sm:max-w-[240px] animate-fade-in",children:(0,t.jsxs)("div",{className:"relative rounded-2xl border border-white/50 bg-white/95 px-3 py-2 shadow-[0_14px_30px_-18px_rgba(79,70,229,0.8)]",children:[(0,t.jsx)("div",{className:"absolute -top-2 right-6 h-3 w-3 rotate-45 border-l border-t border-white/40 bg-white"}),(0,t.jsx)("p",{className:"text-sm font-semibold text-gray-900 leading-snug",children:e0.body})]})}),(0,t.jsxs)("div",{className:"relative flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("div",{className:"mb-2 flex items-center justify-center",children:(0,t.jsx)(m.LegacyFlagDisplay,{countries:P,targetCountry:eY,onReveal:e3,isActive:ef||ex,showCountryName:Q?ex:ex&&T.showCountryNames,gameMode:D,useImageFlag:!Q&&("usa"===D||"canada"===D||"empires"===D||"footy-clubs"===D),decoyEmojis:Q?Object.values(l.CATEGORY_ICONS):void 0,accentColor:Q?"#6366f1":"usa"===D?"#3b82f6":"special"===D?"#f59e0b":"world"===D?"#10b981":"voyage"===D?"#06b6d4":"atlas"===D||"canada"===D?"#ef4444":"europe"===D?"#3b82f6":"sports"===D?"#22c55e":"weekly-pro"===D?"#f59e0b":"empires"===D?"#92400e":"world-cup"===D||"world-cup-ko"===D?"#fbbf24":"footy-clubs"===D?"#d4a017":"#19944f"})}),e_&&eN&&(eN.rank<=5||"Skip"===eN.category)&&(0,t.jsx)("div",{className:"absolute top-2 left-2 z-20 pointer-events-none animate-fade-in",children:(0,t.jsxs)("div",{className:`flex items-center gap-1.5 rounded-full px-2.5 py-1 shadow-md ${"Skip"===eN.category?"bg-orange-500/30 backdrop-blur-md border border-orange-400/50":"bg-blue-500/20 backdrop-blur-md border border-blue-300/40"}`,children:[(0,t.jsx)("span",{className:"text-base leading-none",children:"Skip"===eN.category?"⏭️":"💡"}),"Skip"===eN.category?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("span",{className:"text-[11px] font-bold text-white drop-shadow-sm",children:"Country skipped"})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[11px] font-bold text-blue-100",children:eN.rank}),(0,t.jsx)("span",{className:"text-[10px] font-medium text-blue-50/90 truncate max-w-[70px]",children:eN.category}),(0,t.jsx)("span",{className:"text-[10px] font-semibold text-blue-200 ml-1",children:"Great pick!"})]})]})})]})]}),(0,t.jsx)("div",{className:"w-full space-y-1.5 font-inter",children:eq.map(e=>{var r;let i,n,a=z.has(e.id),o=ey===e.id,l=a||ef||!ex||null!==ey,u=A.find(t=>t.category===e.id);return(0,t.jsx)("button",{style:((e,t)=>{if("world-cup"===D||"world-cup-ko"===D)return e?{backgroundColor:"#f3c44b",borderColor:"#e0a93b",color:"#0a130b"}:t?{backgroundColor:"#c79a3c",borderColor:"rgba(224,169,59,0.55)",color:"#0a130b"}:{backgroundColor:"#0e3019",borderColor:"rgba(251,191,36,0.22)",color:"#f3ede0"};if("footy-clubs"===D)return e?{backgroundColor:"#d4a017",borderColor:"#b8860b",color:"#0d1b3e"}:t?{backgroundColor:"#a87f12",borderColor:"rgba(212,160,23,0.55)",color:"#0d1b3e"}:{backgroundColor:"#16244a",borderColor:"rgba(212,160,23,0.25)",color:"#f3ede0"};let r=Y?"#d97706":Z?"#2670c9":"world"===D?"#4ca84c":"special"===D?"#eb8e2a":"voyage"===D?"#0891b2":"atlas"===D?"#dc2626":"usa"===D?"#1e3a8a":"canada"===D?"#b91c1c":"europe"===D?"#1d4ed8":"sports"===D?"#15803d":"weekly-pro"===D?"#ca8a04":"empires"===D?"#92400e":"#9c62b3";return e?{backgroundColor:r,borderColor:te(r,.1),color:"#fff"}:t?{backgroundColor:e7(r,.15),borderColor:r,color:"#fff"}:{}})(o,a),className:`w-full min-h-[2.25rem] px-3 justify-start text-left transition-all duration-200 font-semibold group rounded-xl relative overflow-hidden text-[14px] ${o?"text-white shadow-md scale-[1.02] -translate-y-0.5 border-2":a&&u?"text-white shadow-inner border-2":l?"bg-gray-50 text-gray-400 cursor-not-allowed":"bg-gray-50 text-gray-800 hover:-translate-y-0.5 hover:shadow-md active:scale-[0.985] font-semibold"} ${o||a?"focus-visible:outline-none cursor-default":"cursor-pointer"} ${o?"after:absolute after:inset-y-1 after:left-0 after:w-1.5 after:bg-white/50 after:rounded-r-sm":""}`,onClick:()=>e8(e.id),disabled:l&&!o&&!a,children:(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-1 relative",children:[(0,t.jsx)("span",{className:`text-lg opacity-100 transition-all duration-200 ${o?"text-white drop-shadow-sm scale-110":"world-cup"===D||"world-cup-ko"===D||"footy-clubs"===D?"group-hover:scale-110":"text-gray-700 group-hover:scale-110"}`,children:e.icon}),(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)("div",{className:`font-semibold uppercase ${o?"text-[15px]":"text-[14px]"} ${o||a&&u&&!o?"text-white":"world-cup"===D||"world-cup-ko"===D||"footy-clubs"===D?"":"text-gray-800"}`,style:{letterSpacing:"0.3px"},children:I.categories[({Population:"population",Football:"football","Small Size":"smallSize",Crime:"crime",Tourism:"tourism",GDP:"gdp","Natural Gas":"gas",Coffee:"coffee",Coastline:"coastline","Land Size":"landSize",Oil:"oil","Forest Cover":"forestCover",Basketball:"basketball",Pollution:"pollution",Cuisine:"cuisine",Agriculture:"agriculture",Energy:"energy",Military:"military",HDI:"hdi","Worst Passport":"worstPassport",Biodiversity:"biodiversity",Education:"education"})[r=e.name]||r.toLowerCase().replace(/\s+/g,"")]||e.name})}),a&&u&&(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[("usa"===D||"canada"===D||"empires"===D||"footy-clubs"===D)&&u.country.flag?(0,t.jsx)("img",{src:u.country.flag,alt:u.country.name,className:"w-8 h-6 object-contain drop-shadow-sm rounded-sm"}):(0,t.jsx)("span",{className:"text-lg","aria-label":I.game.chosenFlag,children:u.countryEmoji}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("span",{className:"text-[12px] leading-none px-1.5 py-1 rounded-md flex items-center gap-1 font-bold bg-white/20 border border-white/30 text-white shadow-sm transition-all duration-200",children:u.wasUnranked?Z?(i=R?.categories?.find(e=>e.id===u.category),(n=i?.maxRank??0)<50?"N/A":`${n}+`):"usa"===D?"50+":u.categoryMaxRank?`${u.categoryMaxRank}+`:"coffee"===u.category?"73+":"pro_sports_championships"===u.category?"24+":"100+":H?`#${u.rank}`:u.rank>=100?"100+":u.rank>73&&"coffee"===u.category?"73+":u.rank>24&&"pro_sports_championships"===u.category?"24+":"usa"===D&&u.rank>=50?"50+":`${u.rank}`}),(0,t.jsx)("div",{className:"absolute right-0 top-0 bottom-0 w-1 rounded-r-md",style:{backgroundColor:(0,s.getRankColor)(u.rank,u.categoryMaxRank??(0,s.getMaxRankForMode)(D||"original"))}})]})]})]})},e.id)})}),"weekly-pro"===D&&!er&&ex&&!ef&&!ey&&!L&&(0,t.jsxs)("button",{onClick:()=>e8("skip"),"aria-label":I.game.skipThisCountry,className:"w-full mt-3 flex items-center justify-center gap-2.5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 active:scale-[0.98] transition-all duration-200 shadow-md hover:shadow-lg",children:[(0,t.jsx)(f.SkipForward,{className:"text-white w-4.5 h-4.5 stroke-[2.5]"}),(0,t.jsx)("span",{className:"text-[13px] font-bold text-white uppercase tracking-wide",children:"Skip this country"}),(0,t.jsx)("span",{className:"ml-1 w-5 h-5 bg-yellow-400 rounded-full flex items-center justify-center text-[11px] font-black text-black",children:"1"})]})]}),T.showHints&&eT&&eP&&(0,t.jsx)("div",{className:"pointer-events-none fixed top-20 right-4 z-50 animate-fade-in",children:(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl px-4 py-3 shadow-xl w-64 relative overflow-hidden font-inter",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50/80 via-white to-purple-50/80"}),(0,t.jsxs)("div",{className:"relative flex items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xl",children:"💡"}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)("div",{className:"text-sm font-bold text-gray-900",children:["Best Pick: ",eP.category," ",eP.rank]})})]})]})}),(0,t.jsxs)("div",{className:"w-full max-w-md mt-4 space-y-3",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(x.LargeBannerAd,{},"game-premium-banner")}),(0,t.jsx)("div",{className:"pt-1",children:(0,t.jsx)(p.SocialLinks,{hideTagline:!0,compact:!0,className:"mx-auto"})})]}),(0,t.jsx)("div",{className:"flex justify-center py-4 mt-6 w-full",children:(0,t.jsx)(x.BottomAd,{},"game-bottom-rectangle")})]}),(0,t.jsx)("div",{className:"hidden xl:block sticky top-20 flex-shrink-0 z-20",children:(0,t.jsx)(x.WideSkyscraperAd,{})})]}),(0,t.jsx)(u.SettingsOverlay,{isOpen:ew,onClose:()=>ek(!1)}),(0,t.jsx)(d.CategoryInfoOverlay,{isOpen:e$,onClose:()=>ej(!1),gameMode:D,categories:eq,isDailyMode:Z}),(0,t.jsx)("div",{"aria-live":"polite",className:"pointer-events-none fixed top-4 right-4 z-[60] flex flex-col gap-2 w-72 max-w-[85vw]",children:eW&&(0,t.jsxs)("div",{className:"relative group overflow-hidden rounded-xl border border-purple-200/50 bg-white/90 backdrop-blur shadow-lg animate-slide-in-right will-change-transform",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 h-full w-1 bg-gradient-to-b from-fuchsia-500 via-purple-500 to-amber-400"}),eW.showConfetti&&(0,t.jsx)(_,{},eK.current),(0,t.jsxs)("div",{className:"relative p-4 pr-3 flex gap-3 items-start",children:[(0,t.jsx)("div",{className:"text-3xl shrink-0 drop-shadow-sm animate-pop-in",children:eW.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900 tracking-tight",children:eW.title}),(0,t.jsx)("div",{className:"text-xs mt-0.5 text-gray-600 leading-snug line-clamp-3",children:eW.description}),eA>1&&eW.title.includes("Perfect")&&(0,t.jsx)("div",{className:"mt-2 h-1.5 w-full rounded-full bg-purple-100 overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-gradient-to-r from-purple-500 via-fuchsia-500 to-amber-400 animate-grow-bar",style:{width:Math.min(100,20*eA)+"%"}})})]}),(0,t.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 text-xs font-medium select-none",children:"✕"})]}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 h-0.5 w-full bg-gradient-to-r from-fuchsia-400 via-purple-500 to-amber-400 animate-time-bar"})]},eW.title+String(eK.current))}),eu&&(0,t.jsx)(y.GeoHunterPlusModal,{isOpen:eu,onClose:()=>ed(!1),source:"game_restart_weekly",highlightPro:!0,onPurchaseSuccess:()=>ed(!1)}),eh&&(0,t.jsx)(v.PremiumModePaywall,{isOpen:eh,onClose:()=>ep(!1),mode:"footy-clubs",defaultTab:"pro",source:"game_restart_mode",onPurchaseSuccess:()=>ep(!1)})]}):(0,t.jsx)("div",{children:"Loading..."})}function _(){let e=Array.from({length:18});return(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none select-none",children:e.map((r,i)=>{let n=i/e.length*Math.PI*2,a=30+i%5*6,s=Math.cos(n)*a,o=Math.sin(n)*a,l=37*i%360,u=i%6*35;return(0,t.jsx)("span",{className:"absolute inline-block w-2 h-2 rounded-sm animate-confetti-piece",style:{transform:`translate(${s}px, ${o}px) rotate(${n}rad)`,background:`hsl(${l} 85% 55%)`,animationDelay:`${u}ms`}},i)})})}e.s(["GameScreen",()=>j],38643);var S=e.i(21820),N=e.i(94237),I=e.i(52236);let P=(0,N.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function C({className:e,variant:r,asChild:i=!1,...n}){let a=i?S.Slot:"span";return(0,t.jsx)(a,{"data-slot":"badge",className:(0,I.cn)(P({variant:r}),e),...n})}e.s(["Badge",()=>C],23621);var T=e.i(59490);let z=(0,T.default)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);e.s(["TrendingUp",()=>z],3549);let O=(0,T.default)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);e.s(["MessageSquare",()=>O],31507);let E=(0,T.default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",()=>E],56042);let U=(0,T.default)("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);e.s(["Calendar",()=>U],20893);let D=(0,T.default)("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]);e.s(["Crown",()=>D],45256);let A=(0,T.default)("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]);e.s(["Medal",()=>A],62508)},79204,42606,e=>{"use strict";var t=e.i(50266),r=e.i(46146),i=e.i(66691),n=e.i(23621),a=e.i(99056),s=e.i(6159),o=e.i(53596),l=e.i(52979),u=e.i(20893),d=e.i(45256),c=e.i(62508),m=e.i(89750),h=e.i(81323),p=e.i(24550),f=e.i(98355),g=e.i(8519),x=e.i(15149);let v=(0,e.i(59490).default)("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);var y=e.i(3549);function b({score:e,targetScore:r,roundSummary:i,className:n="",compact:a=!1}){if(!i)return null;let s=null!==r&&e<=r,o=null!==r?e-r:null;return a?(0,t.jsx)("div",{className:`text-center ${n}`,children:(0,t.jsx)("div",{className:"text-lg font-mono tracking-wider leading-relaxed",children:i.iconString})}):(0,t.jsxs)("div",{className:`space-y-3 ${n}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-1",children:"Your Score"}),(0,t.jsx)("div",{className:"text-3xl font-bold text-gray-900",children:e})]}),null!==r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:s?(0,t.jsx)(v,{className:"w-6 h-6 text-green-600"}):(0,t.jsx)(y.TrendingUp,{className:"w-6 h-6 text-orange-600"})}),(0,t.jsxs)("div",{className:"flex-1 text-right",children:[(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 text-sm text-gray-600 mb-1",children:[(0,t.jsx)(h.Target,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Target Score"})]}),(0,t.jsx)("div",{className:`text-3xl font-bold ${s?"text-green-600":"text-gray-700"}`,children:r})]})]})]}),null!==o&&(0,t.jsxs)("div",{className:`text-center text-sm font-medium px-3 py-1.5 rounded-lg ${s?"bg-green-50 text-green-700":"bg-orange-50 text-orange-700"}`,children:[s?"🎯 ":"📊 ",o>0?`+${o}`:o," from target"]}),(0,t.jsxs)("div",{className:"bg-gradient-to-r from-gray-50 to-gray-100 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2 uppercase tracking-wide font-semibold",children:"Round Performance"}),(0,t.jsx)("div",{className:"text-2xl font-mono tracking-wider leading-relaxed",children:i.iconString})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-300 grid grid-cols-3 gap-2 text-xs",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("span",{className:"block text-lg",children:"🟢"}),(0,t.jsx)("span",{className:"text-gray-600",children:"Optimal"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("span",{className:"block text-lg",children:"🟡"}),(0,t.jsx)("span",{className:"text-gray-600",children:"Salvaged"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("span",{className:"block text-lg",children:"🟠"}),(0,t.jsx)("span",{className:"text-gray-600",children:"Mistake"})]})]}),i.skipUsed&&(0,t.jsxs)("div",{className:"mt-2 text-center text-xs text-gray-600",children:[(0,t.jsx)("span",{className:"text-lg",children:"🟩"})," = Skip used correctly"]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-4 text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"text-green-600 font-bold",children:i.optimalCount}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/ ",i.totalRounds]}),(0,t.jsx)("span",{className:"text-gray-500",children:"optimal"})]}),i.optimalCount===i.totalRounds&&(0,t.jsx)("span",{className:"text-green-600 font-semibold animate-pulse",children:"Perfect! 🏆"})]})]})}function w(e,t,r,i){if(!r)return`GeoHunter Daily Challenge
Score: ${e}`;let n=[];if(n.push("🌍 GeoHunter Daily Challenge"),i&&n.push(i),n.push(""),null!==t){let r=e-t;n.push(`Score: ${e} | Target: ${t} (${r>0?"+":""}${r})`),e<=t&&n.push("🎯 Hit target!")}else n.push(`Score: ${e}`);return n.push(""),n.push(r.iconString),r.optimalCount===r.totalRounds?n.push("Perfect round! 🏆"):n.push(`${r.optimalCount}/${r.totalRounds}`),n.push(""),n.push("geohuntergame.com"),n.join("\n")}e.s(["DailyPerformanceIndicator",()=>b,"generateDailyShareText",()=>w],42606);let k=(e,t=[])=>{if(!e)return null;let r="number"==typeof e.targetScore?e.targetScore:null,i=[],n=e=>{e&&i.push({...e})};e.winners?.forEach(n),e.nearMisses?.forEach(n),e.others?.forEach(n),t.forEach(n);let a=i.map(e=>{let t="number"==typeof e.difference?e.difference:null!==r?e.score-r:null,i=null!==t&&t<=0;return{...e,difference:t,hitTarget:i,scoreDelta:t,band:i?"winner":1===t?"near":"other"}});a.sort((e,t)=>{if(e.hitTarget!==t.hitTarget)return e.hitTarget?-1:1;let r=e.difference??1/0,i=t.difference??1/0;if(r!==i)return r-i;if(e.score!==t.score)return e.score-t.score;let n=e.completed_at?new Date(e.completed_at).getTime():1/0,a=t.completed_at?new Date(t.completed_at).getTime():1/0;return n!==a?n-a:e.rank-t.rank});let s=new Set;return a.forEach((e,t)=>{if(e.rank=t+1,null!==r&&(e.scoreDelta=e.score-r,e.difference=e.scoreDelta,e.hitTarget=e.scoreDelta<=0,e.band=e.hitTarget?"winner":1===e.scoreDelta?"near":"other"),e.username){let r=e.username.toLowerCase();s.has(r)?e.username=`${e.username} (${t+1})`:s.add(r)}}),{targetScore:r,entries:a}};function $({isOpen:e,onClose:v}){let[y,$]=(0,r.useState)(null),[j,_]=(0,r.useState)(null),[S,N]=(0,r.useState)(null),[I,P]=(0,r.useState)(null),[C,T]=(0,r.useState)(!1),[z,O]=(0,r.useState)(!1),{user:E,isAuthenticated:U,getDailyLeaderboard:D,getTodaysDailyScore:A}=(0,g.useSupabaseAuthStore)(),Z=(0,x.useGameStore)(e=>e.dailyChallenge);if((0,r.useEffect)(()=>{O(!0)},[]),(0,r.useEffect)(()=>{e&&z&&(async()=>{let e=p.DailyGameManager.getTodaysAttempt(),t=null,r=null,i=Z;if(U){let r=await A();null!==r&&(e=e?{...e,score:r,completed:!0}:{date:(0,f.getEasternDateString)(),gameMode:"daily",score:r,selections:[],completed:!0}),t=await D()}else if(t=p.DailyGameManager.getDailyLeaderboard(),e&&t){let i=[{username:"You",score:e.score,rank:0,completed_at:void 0,difference:null!==t.targetScore?e.score-t.targetScore:null}];r=k(t,i)}if(!r&&t&&(r=k(t)),_(e),$(r),!i)try{i=await p.DailyGameManager.generateDailyChallenge()}catch(e){console.error("❌ Failed to load challenge for summary:",e)}if(i&&e?N(p.DailyGameManager.evaluateDailyRun(i,e)):N(null),e&&r){let e=r.entries.find(e=>U?e.username===E?.username:"You"===e.username);P(e?.rank??null),T(!!e?.hitTarget)}})()},[e,U,E,D,A,z,Z]),(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&v()};if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,v]),!e)return null;let R=y?.targetScore??S?.targetScore??Z?.targetScore??null,M=y?y.entries.filter(e=>"winner"===e.band):[],L=y?y.entries.filter(e=>"near"===e.band):[],F=y?y.entries.filter(e=>"other"===e.band):[],V=y?.entries.length??0,B=z?(()=>{let[e,t,r]=(0,f.getEasternDateString)().split("-").map(Number),i=new Date(e,t-1,r);return`${i.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})} (ET)`})():"Loading...";return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:e=>{e.target===e.currentTarget&&v()},children:(0,t.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-hidden",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-yellow-400 to-orange-500 p-4 text-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Calendar,{className:"w-5 h-5"}),(0,t.jsx)("h2",{className:"text-lg font-bold",children:"Daily Challenge Results"})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"sm",onClick:v,className:"text-white hover:bg-white/20 h-10 w-10 p-0 rounded-full border border-white/30 hover:border-white/50",children:(0,t.jsx)(a.X,{className:"w-5 h-5"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-white/90 text-sm mt-3",children:[(0,t.jsx)(u.Calendar,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:B})]})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[j&&S&&(0,t.jsx)(b,{score:j.score,targetScore:R,roundSummary:S,className:"bg-gradient-to-br from-blue-50 via-purple-50 to-pink-50 rounded-xl p-4 border border-blue-200"}),j&&I&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 p-3 bg-white rounded-xl border border-gray-200",children:[1===I?(0,t.jsx)(d.Crown,{className:"w-4 h-4 text-yellow-500"}):2===I?(0,t.jsx)(c.Medal,{className:"w-4 h-4 text-gray-400"}):3===I?(0,t.jsx)(m.Award,{className:"w-4 h-4 text-orange-600"}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Trophy,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-gray-700 font-semibold",children:"Daily Rank:"}),(0,t.jsx)("span",{className:"text-2xl font-bold text-gray-900",children:I})]}),C?(0,t.jsx)(n.Badge,{className:"bg-green-500 hover:bg-green-600 text-white text-xs",children:"🎯 PERFECT"}):1===I?(0,t.jsx)(n.Badge,{className:"bg-yellow-500 hover:bg-yellow-600 text-white text-xs",children:"CHAMPION"}):I<=3?(0,t.jsx)(n.Badge,{className:"bg-orange-500 hover:bg-orange-600 text-white text-xs",children:"TOP 3"}):I<=10?(0,t.jsx)(n.Badge,{className:"bg-blue-500 hover:bg-blue-600 text-white text-xs",children:"TOP 10"}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)(o.Users,{className:"w-4 h-4 text-gray-600"}),(0,t.jsx)("h3",{className:"font-semibold text-gray-800",children:"Today's Leaderboard"}),(0,t.jsxs)(n.Badge,{className:"bg-gray-100 text-gray-600 text-xs",children:[V," players"]})]}),(0,t.jsxs)("div",{className:"space-y-4 max-h-64 overflow-y-auto",children:[M.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Badge,{className:"bg-green-500/10 text-green-700 text-xs",children:"🎯 On Target"}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Perfect runs"})]}),(0,t.jsx)("div",{className:"space-y-2",children:M.map(e=>{let r=U?e.username===E?.username:"You"===e.username;return(0,t.jsx)("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-green-50 border-green-300 shadow-sm":"bg-white border-green-200"}`,children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-green-100 text-green-700 flex items-center justify-center font-bold",children:e.rank}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-800",children:e.username}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 flex items-center gap-2",children:[(0,t.jsxs)("span",{children:["Score ",e.score]}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-green-600 font-medium",children:[(0,t.jsx)(h.Target,{className:"w-3 h-3"})," Perfect"]})]})]})]})},`target-${e.username}-${e.rank}`)})})]}),L.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Badge,{className:"bg-blue-500/10 text-blue-700 text-xs",children:"🔥 Near Miss"}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Closest scores to the target"})]}),(0,t.jsx)("div",{className:"space-y-2",children:L.map(e=>{let r=U?e.username===E?.username:"You"===e.username;return(0,t.jsxs)("div",{className:`flex items-center justify-between p-3 rounded-lg transition-all ${r?"bg-gradient-to-r from-blue-100 to-purple-100 border-2 border-blue-300 shadow-md":e.rank<=3&&0===M.length?"bg-gradient-to-r from-yellow-50 to-orange-50 border border-yellow-200":"bg-gray-50 hover:bg-gray-100"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold ${e.rank<=3&&0===M.length?"bg-yellow-400 text-white":"bg-gray-200 text-gray-700"}`,children:e.rank}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-800",children:e.username}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 flex items-center gap-2",children:[(0,t.jsxs)("span",{children:["Score ",e.score]}),null!==R&&null!==e.scoreDelta&&(0,t.jsxs)("span",{className:"text-gray-400",children:["Δ ",e.scoreDelta>0?"+":"",e.scoreDelta]})]})]})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("div",{className:"text-lg font-semibold text-gray-800",children:e.score}),(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:["Rank #",e.rank]})]})]},`near-${e.username}-${e.rank}`)})})]}),F.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Badge,{className:"bg-gray-500/10 text-gray-700 text-xs",children:"🌍 Explorers"}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Still chasing perfection"})]}),(0,t.jsx)("div",{className:"space-y-2",children:F.map(e=>{let r=U?e.username===E?.username:"You"===e.username;return(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2 transition-colors ${r?"border-purple-300 bg-purple-50 shadow-sm":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-200 text-gray-700 flex items-center justify-center text-xs font-semibold",children:e.rank}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-800",children:e.username}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 flex items-center gap-2",children:[(0,t.jsxs)("span",{children:["Score ",e.score]}),null!==R&&null!==e.scoreDelta&&(0,t.jsxs)("span",{className:"text-gray-400",children:["Δ ",e.scoreDelta>0?"+":"",e.scoreDelta]})]})]})]}),(0,t.jsx)("div",{className:"text-right text-xs text-gray-500",children:e.completed_at?new Date(e.completed_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"—"})]},`explorer-${e.username}-${e.rank}`)})})]}),0===M.length&&0===L.length&&0===F.length&&(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-gray-500",children:"No completions yet. Be the first!"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)(i.Button,{onClick:()=>{if(!j||!z)return;let e=y?.targetScore??S?.targetScore??Z?.targetScore??null,t=new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),r=w(j.score,e,S,t);navigator.share?navigator.share({title:"GeoHunter Daily Challenge",text:r}).catch(()=>{navigator.clipboard.writeText(r)}):navigator.clipboard.writeText(r)},className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white",children:[(0,t.jsx)(l.Share2,{className:"w-4 h-4 mr-2"}),"Share My Score"]}),(0,t.jsx)(i.Button,{variant:"outline",onClick:v,className:"flex-1",children:"Close"})]})]})]})})}e.s(["DailyResultsModal",()=>$],79204)},95500,38970,72438,72750,36244,55016,e=>{"use strict";var t=e.i(50266),r=e.i(46146);e.i(24856);var i=e.i(41);function n({progress:e,current:n,prevBest:a,isNewBest:s,delay:o=500,onClick:l}){let{track:u,value:d,earnedTier:c,nextTier:m}=e,h=u.thresholds,p=c?i.TIER_ORDER.indexOf(c):-1,f=!m,g=d??n,x=null!=a&&a<999,v=p+1,y=f?[3]:[v,v+1].filter(e=>e>=0&&e<4),b=h[y[0]],w=h[y[y.length-1]],k=Math.max(1,Math.max(n,x?a:n,b)-w),$=e=>6+82*(1-Math.pow(Math.max(0,Math.min(1,(e-w)/k)),.6)),j=$(g),_=$(n),S=x?$(a):0,N=f?92:j,I=c?i.TIER_COLORS[c]:"rgba(255,255,255,0.22)",P=x&&Math.abs(a-n)>.5,[C,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=setTimeout(()=>T(!0),o);return()=>clearTimeout(e)},[o]);let z="900ms cubic-bezier(0.22, 1, 0.36, 1)";return(0,t.jsxs)("div",{className:"flex items-center gap-3 select-none cursor-pointer",onClick:l,children:[(0,t.jsx)("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl flex-shrink-0",style:{border:`2.5px solid ${I}`,opacity:c?1:.5,background:"rgba(255,255,255,0.07)"},children:u.emoji}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"flex justify-end min-h-[4px] mb-0.5",children:s&&(0,t.jsx)("span",{className:"text-[10px] font-black tracking-wide px-2 py-0.5 rounded-full",style:{color:"#fde68a",background:"rgba(250,204,21,0.28)",border:"1.5px solid rgba(250,204,21,0.7)"},children:"NEW BEST"})}),(0,t.jsxs)("div",{className:"relative h-4 mb-px",children:[P&&(0,t.jsx)("span",{className:"absolute text-[10px] font-extrabold text-white/50",style:{left:`${S}%`,transform:"translateX(-50%)",transition:C?`left ${z}`:void 0,...C?{}:{left:"0%"}},children:a}),(0,t.jsx)("span",{className:"absolute text-[10px] font-black text-white",style:{left:C?`${_}%`:"0%",transform:"translateX(-50%)",transition:`left ${z}`},children:n})]}),(0,t.jsxs)("div",{className:"relative h-[9px] rounded-full",style:{background:"rgba(0,0,0,0.35)"},children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 rounded-full",style:{width:C?`${N}%`:"0%",background:I,transition:`width ${z}`}}),y.map((e,r)=>{let n=!f&&0===r;return(0,t.jsx)("div",{className:"absolute rounded-sm",style:{left:`${$(h[e])}%`,width:2,marginLeft:-1,height:n?15:11,top:n?-3:-1,background:n?i.TIER_COLORS[i.TIER_ORDER[e]]:"rgba(255,255,255,0.35)"}},e)}),P&&(0,t.jsx)("div",{className:"absolute rounded-sm",style:{left:C?`${S}%`:"0%",width:2.5,height:13,top:-2,marginLeft:-1.25,background:"rgba(255,255,255,0.45)",transition:`left ${z}`}}),(0,t.jsx)("div",{className:"absolute rounded",style:{left:C?`${_}%`:"0%",width:3,height:17,top:-4,marginLeft:-1.5,background:"#fff",transition:`left ${z}`}}),f&&(0,t.jsx)("span",{className:"absolute text-base",style:{right:-4,top:-8},children:"🏆"})]}),(0,t.jsx)("div",{className:"relative h-[22px] mt-1.5",children:y.map((e,r)=>{var n,a;let s,o=i.TIER_ORDER[e],l=!f&&0===r;return(0,t.jsxs)("div",{className:"absolute flex flex-col items-center",style:{left:`${$(h[e])}%`,width:40,transform:"translateX(-50%)"},children:[(0,t.jsx)("span",{className:"rounded-full",style:{width:l?7:6,height:l?7:6,marginBottom:l?2.5:3,background:(n=i.TIER_COLORS[o],a=l?.85:.4,s=n.replace("#",""),`rgba(${parseInt(s.slice(0,2),16)}, ${parseInt(s.slice(2,4),16)}, ${parseInt(s.slice(4,6),16)}, ${a})`)}}),(0,t.jsxs)("span",{className:"text-[9px]",style:{color:l?i.TIER_COLORS[o]:"rgba(255,255,255,0.65)",fontWeight:l?800:600},children:[h[e],u.unit??""]})]},e)})})]})]})}e.s(["MilestoneBar",()=>n],95500);let a={original:"bestOriginal",world:"bestWorld",special:"bestSpecial",voyage:"bestVoyage",atlas:"bestAtlas",usa:"bestUSA",canada:"bestCanada",europe:"bestEurope",sports:"bestSports",empires:"bestEmpires"};function s(e){let t=a[e];return t?i.TRACKS.find(e=>e.statKey===t):void 0}function o({value:e,duration:i=750,className:n}){let[a,s]=(0,r.useState)(0),o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t=performance.now(),r=n=>{let a=Math.min(1,(n-t)/i);s(Math.round(0+(e-0)*(1-Math.pow(1-a,3)))),a<1&&(o.current=requestAnimationFrame(r))};return o.current=requestAnimationFrame(r),()=>{null!=o.current&&cancelAnimationFrame(o.current)}},[e,i]),(0,t.jsx)("span",{className:n,children:a})}e.s(["getTrackForMode",()=>s],38970),e.s(["ScoreCountUp",()=>o],72438);var l=e.i(86922);function u({level:e,fraction:r,xpEarned:i,isGuest:n=!1,hideXp:a=!1,onClick:s,onPressGuest:o}){return n?(0,t.jsxs)("button",{type:"button",onClick:o,className:"flex items-center gap-1.5 rounded-full px-3 py-1.5 transition-transform hover:scale-105 active:scale-95",style:{background:"rgba(0,0,0,0.22)"},children:[(0,t.jsx)("span",{className:"text-base",children:"👤"}),(0,t.jsx)("span",{className:"text-xs font-bold text-white",children:"Sign in"})]}):(0,t.jsxs)("button",{type:"button",onClick:s,title:"View your progress",className:"flex items-center gap-2 rounded-full pl-1 pr-3 py-1 transition-transform hover:scale-105 active:scale-95",style:{background:"rgba(0,0,0,0.22)"},children:[(0,t.jsx)(l.LevelBadge,{level:e,fraction:r,size:38,hideLabel:!0,color:"#ffffff"}),(0,t.jsx)("div",{className:"flex flex-col items-start leading-none",children:a?(0,t.jsxs)("span",{className:"text-[10px] font-bold text-white/70",children:["Lvl ",e+1," next"]}):i>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-xs font-black",style:{color:"#fde68a"},children:["+",i," XP"]}),(0,t.jsxs)("span",{className:"text-[10px] font-bold text-white/60 mt-0.5",children:["Lvl ",e+1," next"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-xs font-black text-white",children:["Lvl ",e]}),(0,t.jsxs)("span",{className:"text-[10px] font-bold text-white/60 mt-0.5",children:["Lvl ",e+1," next"]})]})})]})}function d({rows:e,optimalScore:i,userScore:n,correctCount:a,totalRounds:s,accent:o="#10b981",onHide:l}){let[u,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=setTimeout(()=>d(!0),30);return()=>clearTimeout(e)},[]);let c=n-i;return(0,t.jsxs)("div",{className:"rounded-2xl overflow-hidden border border-white/10 bg-white/[0.06] p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("div",{className:"text-sm font-black text-white",children:["✨ ",a," of ",s," correct"]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-[11px] font-bold text-white/60 hover:text-white px-2.5 py-1 rounded-full bg-white/10 hover:bg-white/15 transition-colors",children:"Hide"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-4 text-center",children:[(0,t.jsxs)("div",{className:"rounded-xl bg-black/30 py-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-bold text-white/50 uppercase tracking-wide",children:"Perfect"}),(0,t.jsx)("div",{className:"text-lg font-black",style:{color:o},children:i})]}),(0,t.jsxs)("div",{className:"rounded-xl bg-black/30 py-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-bold text-white/50 uppercase tracking-wide",children:"Diff"}),(0,t.jsx)("div",{className:"text-lg font-black text-orange-300",children:c>0?`+${c}`:c})]}),(0,t.jsxs)("div",{className:"rounded-xl bg-black/30 py-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-bold text-white/50 uppercase tracking-wide",children:"You"}),(0,t.jsx)("div",{className:"text-lg font-black text-white",children:n})]})]}),(0,t.jsx)("div",{className:"space-y-1.5",children:e.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2.5 py-2 rounded-lg bg-black/25",style:{opacity:+!!u,transform:u?"translateY(0)":"translateY(4px)",transition:`opacity 280ms ease ${60*r}ms, transform 280ms ease ${60*r}ms`},children:[(0,t.jsx)("span",{className:"text-lg shrink-0",children:"skip"===e.type?"🟩":e.countryEmoji}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("div",{className:"text-xs font-bold text-white truncate",children:"skip"===e.type?"Skip":e.countryName})}),(0,t.jsxs)("div",{className:"text-[11px] text-white/60 truncate max-w-[30%] text-right shrink-0",children:[e.categoryEmoji?`${e.categoryEmoji} `:"",e.categoryLabel]}),(0,t.jsx)("div",{className:"text-[11px] font-mono font-black text-white/80 px-1.5 py-0.5 rounded bg-black/40 shrink-0",children:e.rankDisplay}),(0,t.jsx)("span",{className:"w-5 text-center shrink-0 text-xs font-black",children:"skip"===e.type||e.matched?(0,t.jsx)("span",{className:"text-emerald-400",children:"✓"}):null!=e.diff?(0,t.jsxs)("span",{className:"text-orange-300",children:["+",e.diff]}):null})]},r))})]})}e.s(["LevelXpChip",()=>u],72750),e.s(["InlinePerfectSolution",()=>d],36244);var c=e.i(45754);let m=(0,e.i(59490).default)("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);function h({rankNumber:e,onBack:r,onShare:i,onRanks:n,primaryAction:a}){return(0,t.jsx)("div",{className:"fixed bottom-0 inset-x-0 z-40 pointer-events-none",children:(0,t.jsx)("div",{className:"max-w-md lg:max-w-xl 2xl:max-w-2xl mx-auto px-3 pb-3 pt-2 pointer-events-auto",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-2xl px-2.5 py-2 shadow-2xl border border-white/15",style:{background:"rgba(15,15,25,0.92)",backdropFilter:"blur(10px)"},children:[(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":"Back to menu",className:"shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 transition-colors",children:(0,t.jsx)(c.ArrowLeft,{className:"w-5 h-5"})}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":"Share",className:"shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 transition-colors",children:(0,t.jsx)(m,{className:"w-5 h-5"})}),(0,t.jsxs)("button",{type:"button",onClick:n,"aria-label":"Leaderboard",className:"shrink-0 px-3 h-10 rounded-xl flex items-center gap-1 text-white/80 hover:text-white hover:bg-white/10 transition-colors",children:[(0,t.jsx)("span",{className:"text-base",children:"🏆"}),(0,t.jsx)("span",{className:"text-xs font-bold",children:e?`#${e}`:"Ranks"})]}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:a})]})})})}e.s(["FinalScoreFooter",()=>h],55016)},70977,e=>{"use strict";var t=e.i(50266),r=e.i(66691),i=e.i(23621),n=e.i(15149),a=e.i(8519),s=e.i(95849),o=e.i(85929),l=e.i(73261),u=e.i(24550),d=e.i(26500),c=e.i(3549),m=e.i(31507),h=e.i(56042),p=e.i(46146),f=e.i(79204),g=e.i(2008),x=e.i(68604),v=e.i(95500);e.i(24856);var y=e.i(41),b=e.i(38970),w=e.i(37684),k=e.i(72438),$=e.i(72750),j=e.i(36244),_=e.i(55016),S=e.i(42606),N=e.i(73019),I=e.i(99056);function P({isOpen:e,onClose:i,optimalAssignments:n,optimalScore:a,userScore:s,userSelections:o}){let[l,u]=(0,p.useState)(-1);(0,p.useEffect)(()=>{if(e){u(-1);let e=0,t=setInterval(()=>{e<n.length?(u(e),e++):clearInterval(t)},600);return()=>clearInterval(t)}u(-1)},[e,n.length]);let d=()=>{u(-1),i()};if(!e)return null;let c=s-a;return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:(0,t.jsxs)("div",{className:"relative w-full max-w-md max-h-[90vh] overflow-y-auto bg-gradient-to-br from-indigo-900 via-purple-900 to-pink-900 rounded-2xl shadow-2xl border-2 border-white/20",children:[(0,t.jsx)("button",{onClick:d,className:"absolute top-4 right-4 z-10 p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors","aria-label":"Close",children:(0,t.jsx)(I.X,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("div",{className:"p-6 pb-4 border-b border-white/20",children:(0,t.jsx)("h2",{className:"text-2xl font-black text-white mb-2",children:"Perfect Solution"})}),(0,t.jsxs)("div",{className:"p-6 pt-4 pb-4 bg-black/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-xs text-emerald-200/80 font-bold uppercase tracking-wide mb-1",children:"Perfect Score"}),(0,t.jsx)("div",{className:"text-3xl font-black text-emerald-300",children:a})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-xs text-white/60 font-bold uppercase tracking-wide mb-1",children:"Your Score"}),(0,t.jsx)("div",{className:"text-3xl font-black text-white",children:s})]})]}),c>0&&(0,t.jsx)("div",{className:"mt-3 text-center",children:(0,t.jsxs)("div",{className:"text-sm text-orange-300 font-semibold",children:["+",c," points from optimal"]})}),0===c&&(0,t.jsx)("div",{className:"mt-3 text-center",children:(0,t.jsx)("div",{className:"text-sm text-emerald-300 font-bold",children:"🎉 You found the perfect solution!"})})]}),(0,t.jsxs)("div",{className:"p-6 pt-4 space-y-3",children:[(0,t.jsx)("div",{className:"text-xs text-white/60 font-bold uppercase tracking-wide mb-3",children:"Optimal Matches"}),n.map((e,r)=>{let i=l>=r,n=e.category.replace(/_/g," ").replace(/([A-Z])/g," $1").trim(),a=e.rank>=100?"100+":e.rank>73&&"coffee"===e.category?"73+":e.rank>24&&"pro_sports_championships"===e.category?"24+":e.rank,s=o?.find(t=>t.countryName===e.country.name),u=s?.category===e.category,d=s?.category.replace(/_/g," ").replace(/([A-Z])/g," $1").trim(),c=s?s.rank>=100?"100+":s.rank>73&&"coffee"===s.category?"73+":s.rank>24&&"pro_sports_championships"===s.category?"24+":s.rank:null;return(0,t.jsxs)("div",{className:`
                  rounded-xl border-2 border-emerald-400/60
                  bg-emerald-500/20 backdrop-blur-sm shadow-lg
                  transition-all duration-500 transform
                  ${i?"opacity-100 translate-y-0 scale-100":"opacity-0 translate-y-4 scale-95"}
                `,style:{transitionDelay:`${100*r}ms`},children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3",children:[(0,t.jsx)("span",{className:"text-2xl flex-shrink-0",children:e.countryEmoji||"🌍"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-bold text-white truncate",children:e.country.name}),(0,t.jsx)("div",{className:"text-xs text-emerald-200/80 capitalize",children:n})]}),(0,t.jsx)("div",{className:"flex-shrink-0 bg-emerald-500/40 px-3 py-1 rounded-lg border border-emerald-300/50",children:(0,t.jsxs)("div",{className:"text-lg font-black text-emerald-100",children:["#",a]})})]}),s&&!u&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pb-2 pl-12",children:[(0,t.jsx)("span",{className:"text-xs text-orange-300/80",children:"You picked:"}),(0,t.jsx)("span",{className:"text-xs text-orange-300 capitalize font-semibold",children:d}),(0,t.jsxs)("span",{className:"text-xs text-orange-400 font-bold",children:["#",c]})]})]},r)})]}),(0,t.jsx)("div",{className:"p-6 pt-4 border-t border-white/20",children:(0,t.jsx)(r.Button,{onClick:d,className:"w-full bg-white/20 hover:bg-white/30 text-white font-bold py-3 rounded-xl border-2 border-white/40",children:"Got it!"})})]})})}var C=e.i(52321),T=e.i(52335);e.i(20125);var z=e.i(43360),O=e.i(75262),E=e.i(69923),U=e.i(18738);function D({isOpen:e,onClose:r,onReveal:i,onOpenPaywall:n,source:a}){let[s,o]=(0,p.useState)(10),l=(0,p.useRef)(!1);if((0,p.useEffect)(()=>{if(!e)return;o(10),l.current=!1,(0,U.trackEvent)("support_gate_shown",{source:a});let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),l.current||(l.current=!0,(0,U.trackEvent)("support_gate_completed",{source:a})),0):e-1)},1e3);return()=>clearInterval(t)},[e,a]),!e)return null;let u=0===s;return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"bg-gradient-to-b from-slate-900 to-slate-950 rounded-2xl max-w-md w-full shadow-2xl border border-white/10 overflow-hidden max-h-[90vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"relative p-5 flex-shrink-0 text-center",children:[(0,t.jsx)("button",{onClick:r,className:"absolute top-4 right-4 text-white/50 hover:text-white",children:(0,t.jsx)(I.X,{className:"w-5 h-5"})}),(0,t.jsx)("div",{className:"text-4xl mb-2",children:"❤️"}),(0,t.jsx)("h2",{className:"text-lg font-black text-white",children:"Support GeoHunter"})]}),(0,t.jsxs)("div",{className:"overflow-y-auto flex-1 px-5 pb-5",children:[(0,t.jsx)("div",{className:"flex justify-center mb-4 min-h-[250px] items-center",children:(0,t.jsx)(w.SupportGateAd,{})}),(0,t.jsx)("div",{className:"w-full h-2 rounded-full bg-white/10 overflow-hidden mb-2",children:(0,t.jsx)("div",{className:"h-full bg-gradient-to-r from-emerald-500 to-emerald-400 transition-all duration-1000 ease-linear",style:{width:`${(10-s)/10*100}%`}})}),(0,t.jsx)("p",{className:"text-center text-white/40 text-xs mb-4",children:u?"Ready!":`Unlocking in ${s}s...`}),(0,t.jsx)("button",{onClick:i,disabled:!u,className:"w-full bg-gradient-to-r from-emerald-500 to-emerald-600 disabled:from-white/10 disabled:to-white/10 disabled:text-white/30 hover:from-emerald-400 hover:to-emerald-500 text-white font-black py-3.5 rounded-xl transition-all text-base shadow-lg mb-3",children:u?"Reveal Perfect Solution 🎉":`Reveal Perfect Solution (${s}s)`}),(0,t.jsx)("button",{onClick:()=>{(0,U.trackPaywallCta)(a,{action:"skip_to_paywall"}),n()},className:"w-full border border-amber-400/40 bg-amber-400/10 hover:bg-amber-400/20 text-amber-300 font-bold py-3 rounded-xl transition-all text-sm",children:"⚡ Skip the wait, remove ads now!"})]})]})})}var A=e.i(92753);e.i(5208);var Z=e.i(82811);function R(){let I,U,R,M,L,F,V=(0,d.useTranslation)(),B=(0,p.useCallback)(e=>V.countries[e]||e,[V.countries]),{selections:W,countries:G,bestScore:J,bestScoresByMode:X,bestEasyScoresByMode:H,gamesPlayed:K,averageScore:Y,startGame:q,startWeeklyGame:Q,startMiniHunter:ee,startMiniHunter2:et,startReverseGame:er,startCustomGame:ei,goToMenu:en,selectedGameMode:ea,isDailyMode:es,isPracticeMode:eo,isChallengeMode:el,challengeCode:eu,dailyChallenge:ed,dailyAttempt:ec,weeklyUserTier:em}=(0,n.useGameStore)(),{user:eh,isAuthenticated:ep,getLeaderboard:ef,getDailyLeaderboard:eg,bestScores:ex,statsSyncError:ev,refreshBestScores:ey,hasProAccess:eb,hasExplorerAccess:ew}=(0,a.useSupabaseAuthStore)(),ek=(0,p.useMemo)(()=>{let e={};try{for(let t of(0,s.getCategoriesForGameMode)(ea))t?.id&&(e[t.id]={name:t.name,icon:t.icon||""})}catch{}let t=ed?.categories;if(t)for(let r of t)r?.id&&!e[r.id]&&(e[r.id]={name:r.name||"",icon:r.icon||""});return e},[ea,ed]),e$=(0,p.useCallback)(e=>{let t=ek[e];if(t?.name)return t;let r=(0,o.getCategoryMetadata)(e);return{name:r.name,icon:t?.icon||r.icon||""}},[ek]),[ej,e_]=(0,p.useState)(!1),[eS,eN]=(0,p.useState)(!1),[eI,eP]=(0,p.useState)(!1),[eC,eT]=(0,p.useState)(!1),[ez,eO]=(0,p.useState)(null),[eE,eU]=(0,p.useState)(null),[eD,eA]=(0,p.useState)(!1),[eZ,eR]=(0,p.useState)(u.DailyGameManager.getTimeUntilNext()),[eM,eL]=(0,p.useState)(!1),[eF,eV]=(0,p.useState)(null),[eB,eW]=(0,p.useState)("idle"),[eG,eJ]=(0,p.useState)(!1),[eX,eH]=(0,p.useState)(!1),[eK,eY]=(0,p.useState)(!1),[eq,eQ]=(0,p.useState)(!1),[e0,e1]=(0,p.useState)("final_score_perfect"),[e2,e4]=(0,p.useState)(!1),[e5,e6]=(0,p.useState)(!1),[e3,e9]=(0,p.useState)(!1),e8="empires"===ea&&!eb(),e7=async()=>{if(eb()){try{await q("footy-clubs")}catch{}return}"true"===localStorage.getItem("geohunter:footy_clubs_trial_used")?e9(!0):e6(!0)},te=async()=>{e6(!1),localStorage.setItem("geohunter:footy_clubs_trial_used","true");try{await q("footy-clubs")}catch{}},tt="weekly-pro"===ea,tr=(0,p.useRef)(null),ti=(0,p.useRef)(null),{isAdReady:tn,showAd:ta}=(0,C.useRewardedAd)(),ts=(0,T.useAdsAllowed)(),to=()=>{eb()||ew()||tt&&("pro"===em||"explorer"===em)||!ts?eT(!0):tn?(eJ(!0),ta({onReward:()=>{eT(!0),eJ(!1)},onClosed:e=>{eJ(!1),e||console.log("[FinalScore] Normal mode: user closed ad early, not granting access")},onError:()=>{eJ(!1),eT(!0)}})||(eJ(!1),eY(!0))):eY(!0)},tl=(0,s.calculateScore)(W),tu=es?ex.daily:({original:ex.original,world:ex.world,special:ex.special,voyage:ex.voyage,atlas:ex.atlas,usa:ex.usa,sports:ex.sports,canada:ex.canada,europe:ex.europe,"weekly-pro":ex.weeklyPro,"world-cup":ex.worldCup,"world-cup-ko":ex.worldCup,"footy-clubs":ex.footyClubs,empires:ex.empires})[ea]??ex.original,td=es?999:X?.[ea]??999,tc=ep&&!ev&&tu<999,tm=tc?tu:ep?999:Math.min(td,tu??999),th=tc?tu:ep?tu??999:Math.min(td,tu??999),tp=tl<th,tf=(0,b.getTrackForMode)(ea),[tg,tx]=(0,p.useState)(!1),tv=(()=>{if(!ep||!eh||eo||!tf)return null;let e=eh.stats,t=Math.min(tl,th),r={...e,[tf.statKey]:th},i={...e,[tf.statKey]:t},n=(0,y.computeXp)(i);return{xpEarned:Math.max(0,n-(0,y.computeXp)(r)),level:(0,y.levelForXp)(n),fraction:(0,y.levelProgress)(n).fraction,trackProgress:(0,y.evaluateTrack)(tf,i),prevBest:th}})(),ty=(()=>{let e,t;if(es||0===W.length)return null;let r=new Set(W.map(e=>e.country.name)),i=tt?G.find(e=>!r.has(e.name))??null:null,n=tt&&i?(0,z.computeOptimalAssignmentWithSkip)(W,{country:i,countryEmoji:i.emoji},ea):(e=(0,z.computeSequentialOptimal)(W,ea),t=(0,z.computeOptimalAssignment)(W,ea),tl<e.optimalScore?t:e),a=new Map,s=n.assignments.map(e=>{let t=W.find(t=>t.country.name===e.country.name),r=t?.category===e.category;a.set(e.country.name,r);let i=e$(e.category),n=e.rank>=100?"100+":e.rank>73&&"coffee"===e.category?"73+":e.rank>24&&"pro_sports_championships"===e.category?"24+":e.rank,s=r||!t?null:Math.max(0,t.rank-e.rank);return{type:"play",countryName:B(e.country.name),countryEmoji:e.countryEmoji,categoryEmoji:i.icon,categoryLabel:i.name,rankDisplay:n,diff:s,matched:r}}),o=s.filter(e=>e.matched).length;return{rows:s,matchByCountry:a,optimalScore:n.optimalScore,correctCount:o,totalRounds:s.length}})(),tb=(()=>{if(eo)return null;if(!ep||!eh)return{level:1,fraction:0,xpEarned:0,hideXp:!0,isGuest:!0};if(tv&&!es)return{level:tv.level,fraction:tv.fraction,xpEarned:tv.xpEarned,hideXp:!1,isGuest:!1};let e=(0,y.computeXp)(eh.stats);return{level:(0,y.levelForXp)(e),fraction:(0,y.levelProgress)(e).fraction,xpEarned:0,hideXp:!0,isGuest:!1}})(),tw=H?.[ea]??999,tk=eo&&tl===tw&&tw<999,t$=es?ed&&20>=Math.abs(tl-ed.targetScore):tl<200;W.some(e=>e.rank<=5);let tj=ed?.hash?.startsWith("mini-")??!1,t_=ed?.hash?.startsWith("mini2-")??!1,tS=ed?.hash?.startsWith("reverse-")??!1,tN=ed?.hash?.startsWith("custom-")??!1,tI=tj||t_||tS||tN,tP=(0,p.useCallback)(()=>!ep||!ev||window.confirm("We're still updating your score. Hit the refresh button to make sure it saves.\n\nLeave anyway?"),[ep,ev]);(0,p.useEffect)(()=>()=>{ti.current&&(clearTimeout(ti.current),ti.current=null)},[]),(0,p.useEffect)(()=>{eW("idle")},[tl,es,tj]),(0,p.useEffect)(()=>{ep||eo||tI||(es?(l.CookieStorage.saveDailyScore(tl),l.CookieStorage.saveDailyBestScore(tl)):l.CookieStorage.saveHighScore(tl,ea))},[tl,ea,ep,es,eo,tI]),(0,p.useEffect)(()=>{(async()=>{if(ep&&eh){try{let e=(await ef()).findIndex(e=>e.id===eh.id)+1;eO(e>0?e:null),console.log("🏆 [Final Score] Leaderboard rank calculated:",{rank:e>0?e:"not found"})}catch(e){console.error("❌ [Final Score] Leaderboard fetch failed:",e)}if(es)try{let e=await eg();console.log("📊 [Final Score] Daily leaderboard fetched:",{winners:e.winners?.length??0,nearMisses:e.nearMisses?.length??0,others:e.others?.length??0,targetScore:e.targetScore});let t=[...e.winners??[],...e.nearMisses??[],...e.others??[]],r=t.find(e=>e.username===eh.username);if(!r&&tl){console.log("⚠️ [Final Score] User not in leaderboard yet (replication lag?), synthesizing entry:",{username:eh.username,score:tl,targetScore:e.targetScore});let i=e.targetScore,n=null!==i&&Number.isFinite(i)?tl-i:null,a=t.filter(e=>e.score<tl).length;r={username:eh.username,score:tl,rank:a+1,completed_at:new Date().toISOString(),difference:n},console.log("✅ [Final Score] Synthesized user entry:",r)}console.log("👤 [Final Score] User daily rank:",{userEntry:r,foundRank:r?.rank??null}),eU(r?r.rank:null)}catch(e){console.error("❌ [Final Score] Daily leaderboard fetch failed:",e)}}})()},[ep,eh,ef,eg,es,tl]),(0,p.useEffect)(()=>{if(es){let e=setInterval(()=>{eR(u.DailyGameManager.getTimeUntilNext())},1e3);return()=>clearInterval(e)}},[es]),(0,p.useEffect)(()=>{if(es&&ed&&W.length>0){let e=ec||{date:ed.date,gameMode:ed.gameMode,score:tl,selections:W,completed:!0,hash:ed.hash||null};{let t=u.DailyGameManager.evaluateDailyRun(ed,e);console.log("🎯 [Final Score] Daily round summary calculated:",{summary:t,selectionsCount:W.length,statusesCount:t?.statuses?.length??0,optimalCount:t?.optimalCount??0,skipUsed:t?.skipUsed??!1,iconString:t?.iconString??"none"}),eV(t)}}},[es,ed,W,ec,tl]);let tC=(0,p.useCallback)(()=>{if(!es)return null;if(eF)return eF;if(ed&&W.length>0){let e=ec||{date:ed.date,gameMode:ed.gameMode,score:tl,selections:W,completed:!0,hash:ed.hash||null};return u.DailyGameManager.evaluateDailyRun(ed,e)}return null},[es,eF,ed,ec,W,tl]),tT=(0,p.useCallback)(()=>{if(!es)return"";let e=new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),t=tC();return(0,S.generateDailyShareText)(tl,t?.targetScore??null,t,e)},[es,tC,tl]),tz=(0,p.useCallback)(()=>{let e=document.createElement("canvas");e.width=1080,e.height=1350;let t=e.getContext("2d");if(!t)return e;let r=t.createLinearGradient(0,0,1080,1350);tj?(r.addColorStop(0,"#ec4899"),r.addColorStop(1,"#831843")):es?(r.addColorStop(0,"#0369a1"),r.addColorStop(1,"#0f172a")):"world"===ea?(r.addColorStop(0,"#047857"),r.addColorStop(1,"#022c22")):"special"===ea?(r.addColorStop(0,"#f97316"),r.addColorStop(1,"#7c2d12")):"voyage"===ea?(r.addColorStop(0,"#0ea5e9"),r.addColorStop(1,"#1d4ed8")):"atlas"===ea?(r.addColorStop(0,"#8b5cf6"),r.addColorStop(1,"#4c1d95")):"usa"===ea?(r.addColorStop(0,"#dc2626"),r.addColorStop(1,"#991b1b")):"canada"===ea?(r.addColorStop(0,"#b91c1c"),r.addColorStop(1,"#7f1d1d")):"europe"===ea?(r.addColorStop(0,"#1d4ed8"),r.addColorStop(1,"#1e3a8a")):"sports"===ea?(r.addColorStop(0,"#15803d"),r.addColorStop(1,"#14532d")):"weekly-pro"===ea?(r.addColorStop(0,"#ca8a04"),r.addColorStop(1,"#78350f")):(r.addColorStop(0,"#7c3aed"),r.addColorStop(1,"#312e81")),t.fillStyle=r,t.fillRect(0,0,1080,1350);let i=tj?"#f472b6":es?"#38bdf8":"world"===ea?"#34d399":"special"===ea?"#fb923c":"voyage"===ea?"#38bdf8":"atlas"===ea?"#a78bfa":"usa"===ea?"#ef4444":"canada"===ea?"#f87171":"europe"===ea?"#60a5fa":"sports"===ea?"#4ade80":"weekly-pro"===ea?"#fbbf24":"#c084fc",n=tj?"#ec4899":es?"#0ea5e9":"world"===ea?"#2dd4bf":"special"===ea?"#f97316":"voyage"===ea?"#22d3ee":"atlas"===ea?"#8b5cf6":"usa"===ea||"canada"===ea?"#dc2626":"europe"===ea?"#1d4ed8":"sports"===ea?"#16a34a":"weekly-pro"===ea?"#d97706":"#6366f1";t.save(),t.globalAlpha=.18,t.fillStyle=i,t.beginPath(),t.arc(885.5999999999999,270,240,0,2*Math.PI),t.fill(),t.fillStyle=n,t.beginPath(),t.arc(194.4,1107,300,0,2*Math.PI),t.fill(),t.restore();t.save(),t.shadowColor="rgba(15,23,42,0.28)",t.shadowBlur=40,t.shadowOffsetY=28,t.beginPath(),t.moveTo(144,128),t.lineTo(936,128),t.quadraticCurveTo(984,128,984,176),t.lineTo(984,1174),t.quadraticCurveTo(984,1222,936,1222),t.lineTo(144,1222),t.quadraticCurveTo(96,1222,96,1174),t.lineTo(96,176),t.quadraticCurveTo(96,128,144,128),t.closePath();let a=t.createLinearGradient(96,128,96,1222);a.addColorStop(0,"#f8fafc"),a.addColorStop(1,"#e2e8f0"),t.fillStyle=a,t.fill(),t.restore();let s=720,o=212;t.textBaseline="top";let l=t.createLinearGradient(180,o,600,o+80);l.addColorStop(0,i),l.addColorStop(1,n),t.save(),t.font="900 62px 'Inter', sans-serif",t.fillStyle=l,t.shadowColor="rgba(15,23,42,0.2)",t.shadowBlur=26,t.shadowOffsetY=6,t.fillText("GEOHUNTER",180,o),t.restore(),o+=74;let u=tj?"MINI HUNTER":es?"DAILY CHALLENGE":"world"===ea?"WORLD MODE":"special"===ea?"SPECIAL MODE":"voyage"===ea?"VOYAGE MODE":"atlas"===ea?"ATLAS MODE":"usa"===ea?"USA STATES MODE":"CLASSIC MODE";t.font="600 30px 'Inter', sans-serif",t.fillStyle="#1f2937",t.fillText(u,180,o),o+=58,t.font="700 34px 'Inter', sans-serif",t.fillStyle="#1f2937",t.fillText("SCORE",180,o),o+=12;let d=t.createLinearGradient(180,o+150,540,o);d.addColorStop(0,n),d.addColorStop(1,i),t.save(),t.font="900 152px 'Inter', sans-serif",t.fillStyle=d,t.shadowColor="rgba(15,23,42,0.22)",t.shadowBlur=30,t.shadowOffsetY=10,t.fillText(`${tl}`,180,o+68),t.restore(),o+=178,t.font="500 24px 'Inter', sans-serif",t.fillStyle="#475569",t.fillText("LOWER SCORE IS BETTER",180,o),o+=70;let c=es?"ROUND SUMMARY":eh?.username?eh.username.toUpperCase():"HIGHLIGHTS";if(t.font="700 40px 'Inter', sans-serif",t.fillStyle="#0f172a",t.fillText(c,180,o),o+=64,es){let e=tC(),r=e?.targetScore??ed?.targetScore??null;if(e?.iconString&&(t.font="60px 'Inter', sans-serif",t.fillStyle="#0f172a",t.fillText(e.iconString,180,o,s),o+=90),null!==r){t.font="700 36px 'Inter', sans-serif",t.fillStyle="#1e293b";let e=tl-r,i=e>0?`+${e}`:e.toString();t.fillText(`TARGET ${r} (${i})`,180,o,s),o+=52}e&&(t.font="600 34px 'Inter', sans-serif",t.fillStyle="#0f172a",t.fillText(`${e.optimalCount}/${e.totalRounds} OPTIMAL PICKS`,180,o,s),o+=56,t.font="500 26px 'Inter', sans-serif",t.fillStyle="#475569",t.fillText(e.skipUsed?"SKIP USED STRATEGICALLY":"SKIP SAVED FOR TOMORROW",180,o,s),o+=50)}else{let e=W.slice(0,8),r=Math.floor(.46*s),i=180+r+20,n=180+s-10,a=e=>e<=5?"#22c55e":e<=15?"#4ade80":e<=35?"#fb923c":"#ef4444";if(e.length)for(let s of e){let e=o,l=s.wasUnranked&&s.categoryMaxRank?`${s.categoryMaxRank}+`:s.rank>=100?"100+":s.rank>73&&"coffee"===s.category?"73+":s.rank>24&&"pro_sports_championships"===s.category?"24+":`${s.rank}`,u=`${s.countryEmoji||""} ${B(s.country.name)}`,d=e$(s.category).name;if(t.textAlign="left",t.fillStyle="#0f172a",t.font="700 34px 'Inter', sans-serif",t.measureText(u).width>r){let i=u;for(;i.length>4&&t.measureText(`${i}…`).width>r;)i=i.slice(0,-1);i=`${i.trim()}…`,t.fillText(i,180,e)}else t.fillText(u,180,e);t.fillStyle="#475569",t.font="600 26px 'Inter', sans-serif";let c=Math.max(100,n-i-60),m=d;if(t.measureText(m).width>c){for(;m.length>3&&t.measureText(`${m}…`).width>c;)m=m.slice(0,-1);m=`${m.trim()}…`}t.fillText(m,i,e),t.textAlign="right",t.fillStyle=a(s.rank),t.font="800 34px 'Inter', sans-serif",t.fillText(l,n,e),t.textAlign="left",o+=80}else t.font="600 32px 'Inter', sans-serif",t.fillStyle="#475569",t.fillText("No selections recorded.",180,o,s),o+=48}let m=1138,h=Math.min(1074,Math.max(o+60,332)),p=Math.min(1114,h+44);return t.fillStyle=n,t.font="700 30px 'Inter', sans-serif",t.fillText("#GEOHUNTER",180,h),t.fillStyle="#475569",t.font="600 32px 'Inter', sans-serif",t.fillText("Play at GeoHunterGame.com",180,p),e},[tl,es,tC,ea,W,B,eh?.username,ed?.targetScore]);(0,p.useCallback)(async()=>{try{let e=tz(),t=await new Promise(t=>e.toBlob(e=>t(e),"image/png",.95));if(!t)return;let r=new File([t],"geohunter-score.png",{type:"image/png"}),i=es?tT():`I scored ${tl} in GeoHunter! Can you beat it?`,n=`My ${es?"Daily Challenge":"GeoHunter"} Score`;if("u">typeof navigator&&navigator.share){let e={title:n,text:i,url:"https://geohuntergame.com"};if("function"==typeof navigator.canShare)try{navigator.canShare({files:[r]})&&(e.files=[r])}catch(e){console.warn("navigator.canShare check failed:",e)}try{await navigator.share(e);return}catch(e){console.warn("Native share failed, falling back to download:",e)}}let a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=`geohunter-${es?"daily-":""}score.png`,s.click(),URL.revokeObjectURL(a)}catch(e){console.error("Failed to capture screenshot:",e)}},[tz,es,tT,tl]);let tO=(0,p.useCallback)(async e=>{if("u">typeof navigator&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn("navigator.clipboard.writeText failed, falling back:",e)}if("u"<typeof document)return!1;try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="absolute",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let r=document.getSelection(),i=r&&r.rangeCount>0?r.getRangeAt(0):null;t.select();let n=document.execCommand("copy");if(t.blur(),document.body.removeChild(t),i&&(r?.removeAllRanges(),r?.addRange(i)),n)return!0;throw Error('document.execCommand("copy") returned false')}catch(e){return console.error("Fallback copy failed:",e),!1}},[]),tE=(0,p.useCallback)(async()=>{let e,t=tj?"⚡ MiniHunter":es?`Daily Challenge - ${new Date().toLocaleDateString()}`:"world"===ea?"World":"special"===ea?"Special":"voyage"===ea?"Voyage":"atlas"===ea?"Atlas":"usa"===ea?"USA States":"canada"===ea?"Canada":"europe"===ea?"Europe":"sports"===ea?"Sports":"weekly-pro"===ea?"Weekly Pro":"Classic",r=`🌍 GeoHunter ${t} - Score: ${tl}`,i=W.map(e=>{let t=e.rank,r=e.wasUnranked&&e.categoryMaxRank?`${e.categoryMaxRank}+`:t>=100?"100+":t>73&&"coffee"===e.category?"73+":t>24&&"pro_sports_championships"===e.category?"24+":`${(e=>{if(e<=0)return`${e}`;let t=["th","st","nd","rd"],r=e%100;return e+(t[(r-20)%10]||t[r]||t[0])})(t)}`,i=t>0&&t<=5?" ⭐️":"";if(tj)return`${e.countryEmoji} ${B(e.country.name)} (${r}${i})`;let n=e$(e.category),a=`${n.icon?`${n.icon} `:""}${n.name}`.trim();return`${e.countryEmoji} ${B(e.country.name)} → ${a} (${r}${i})`});if(e=tj?[r,"⚡ 4 Countries. No Skip. Pure Speed.","","Results:",...i,"","Can you beat my score? Play MiniHunter at geohuntergame.com"].join("\n"):es?tT()||`${r}
Play at geohuntergame.com`:[r,"","My Results:",...i,"","Play at: geohuntergame.com"].join("\n"),"u">typeof navigator&&"function"==typeof navigator.share)try{return await navigator.share({text:e}),!0}catch(e){if(e?.name==="AbortError")return!1;console.warn("Native text share failed, falling back to clipboard:",e)}return tO(e)},[tj,es,ea,tl,W,B,tT,tO]),tU=e=>({color:(0,z.getRankColor)(e,(0,z.getMaxRankForMode)(ea||"original"))}),tD=tj?"bg-gradient-to-br from-cyan-600 via-blue-700 to-indigo-800":es?"bg-gradient-to-br from-[#4a9fd8] via-[#2670c9] to-[#1a4a8f]":"world"===ea?"bg-gradient-to-br from-green-600 via-green-700 to-emerald-800":"special"===ea?"bg-gradient-to-br from-[#f06e29] via-[#e56525] to-[#d85d22]":"voyage"===ea?"bg-gradient-to-br from-cyan-700 via-cyan-800 to-teal-900":"atlas"===ea?"bg-gradient-to-br from-red-600 via-rose-700 to-red-800":"weekly-pro"===ea?"bg-gradient-to-br from-amber-600 via-amber-700 to-yellow-900":"world-cup"===ea||"world-cup-ko"===ea?"bg-gradient-to-br from-[#14532d] via-[#166534] to-[#052e16]":"bg-gradient-to-br from-purple-600 via-purple-700 to-indigo-800";return el&&eu?(0,t.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-rose-900 via-slate-900 to-slate-800 text-white relative overflow-hidden",children:(0,t.jsx)("div",{className:"px-3 py-4 max-w-lg mx-auto",children:(0,t.jsx)(O.default,{challengeCode:eu})})}):(0,t.jsxs)("div",{className:`min-h-screen ${tD} text-white relative overflow-hidden`,children:[(0,t.jsx)("div",{className:"hidden xl:block fixed left-4 top-1/2 -translate-y-1/2 z-20",children:(0,t.jsx)(w.LeftSkyscraperAd,{})}),(0,t.jsx)("div",{className:"hidden xl:block fixed right-4 top-1/2 -translate-y-1/2 z-20",children:(0,t.jsx)(w.WideSkyscraperAd,{})}),(0,t.jsxs)("div",{className:"px-3 py-4 pb-24 max-w-md mx-auto space-y-3",children:[ep&&eh&&(0,t.jsx)("div",{className:"rounded-xl p-3 bg-white/15 backdrop-blur-sm border border-white/20",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-xs text-white/60 uppercase tracking-wide mb-1",children:"Logged in as"}),(0,t.jsx)("div",{className:"text-sm font-bold text-white truncate",children:eh.username})]}),!eo&&tm<999&&(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("div",{className:"text-xs text-white/60 uppercase tracking-wide mb-1",children:"Best Score"}),(0,t.jsx)("div",{className:"text-lg font-black text-white",children:tm})]})]})}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(w.LargeBannerAd,{})}),es&&!tI?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:tr,className:"rounded-xl p-4 bg-gradient-to-br from-cyan-400/25 to-blue-500/25 backdrop-blur-md border border-cyan-400/50 shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"text-2xl shrink-0",children:"📅"}),(0,t.jsx)("h1",{className:"text-base font-black uppercase tracking-wide text-white truncate",children:"Daily Challenge"})]}),tb&&(0,t.jsx)($.LevelXpChip,{level:tb.level,fraction:tb.fraction,xpEarned:tb.xpEarned,hideXp:tb.hideXp,isGuest:tb.isGuest,onClick:()=>{window.location.href="/account"},onPressGuest:()=>tx(!0)})]}),(0,t.jsxs)("div",{className:"text-center mb-3",children:[(0,t.jsx)(k.ScoreCountUp,{value:tl,className:"text-6xl font-black font-mono text-white drop-shadow-lg"}),(()=>{let e=eF;if(!e&&es&&ed&&W.length>0){let t=ec||{date:ed.date,gameMode:ed.gameMode,score:tl,selections:W,completed:!0,hash:ed.hash||null};e=u.DailyGameManager.evaluateDailyRun(ed,t)}let r=e?.targetScore??ed?.targetScore??null,i=r?tl-r:0,n=!!r&&tl<=r;return r?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-4 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"text-xs text-amber-200/80 font-bold",children:"TARGET"}),(0,t.jsx)("div",{className:"text-2xl font-black text-amber-300",children:r})]}),(0,t.jsxs)("div",{className:`text-3xl font-black px-4 py-2 ${n?"text-green-300":"text-orange-300"}`,children:[n?"✓":"+",Math.abs(i)]})]}),(0,t.jsx)("div",{className:"w-full max-w-xs mx-auto h-2 bg-white/10 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full transition-all ${n?"bg-green-400":"bg-orange-400"}`,style:{width:`${Math.min(100,r/tl*100)}%`}})})]}):null})()]}),(()=>{if(es){let e=eF;if(!e&&ed&&W.length>0){let t=ec||{date:ed.date,gameMode:ed.gameMode,score:tl,selections:W,completed:!0,hash:ed.hash||null};e=u.DailyGameManager.evaluateDailyRun(ed,t)}if(!e)return console.log("❌ [Final Score] Daily summary null - no dots to show"),null;let r=e.statuses||[],i=e.optimalCount===e.totalRounds;return(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[W.map((e,i)=>{let n=r[i],a=e$(e.category).name,s=e.wasUnranked?(()=>{if(e.categoryMaxRank)return`${e.categoryMaxRank}+`;let t=ed?.categories?.find(t=>t.id===e.category),r=t?.maxRank??0;return r<50?"N/A":`${r}+`})():e.rank>=100?"100+":e.rank>73&&"coffee"===e.category?"73+":e.rank>24&&"pro_sports_championships"===e.category?"24+":e.rank;return(0,t.jsxs)("div",{className:`${"optimal"===n?"border-green-400/80":"salvaged"===n?"border-yellow-400/80":"mistake"===n?"border-orange-400/80":"border-gray-500/40"} ${"optimal"===n?"bg-green-500/10":"salvaged"===n?"bg-yellow-500/10":"mistake"===n?"bg-orange-500/10":"bg-white/5"} border-l-4 backdrop-blur-sm rounded-lg px-2.5 py-1.5 flex items-center gap-2 min-h-[32px] transition-all`,children:[(0,t.jsx)("span",{className:"text-lg mr-1",children:e.countryEmoji}),(0,t.jsx)("span",{className:"text-xs font-bold text-white truncate",children:B(e.country.name)}),(0,t.jsx)("span",{className:"text-xs text-white/70 font-medium",children:a}),(0,t.jsx)("span",{className:"text-xs font-mono font-black text-white/90 px-2 py-0.5 rounded bg-black/40 ml-auto",children:s})]},i)}),e?.skipUsed&&(0,t.jsxs)("div",{className:"border-l-4 border-green-400/80 bg-green-500/10 backdrop-blur-sm rounded-lg px-2.5 py-1.5 flex items-center gap-2 min-h-[32px]",children:[(0,t.jsx)("span",{className:"text-lg mr-1",children:"🟩"}),(0,t.jsx)("span",{className:"text-xs font-bold text-white",children:"Skip"}),(0,t.jsx)("span",{className:"text-xs text-white/70 font-medium",children:"—"}),(0,t.jsx)("span",{className:"text-xs font-mono font-black text-white/90 px-2 py-0.5 rounded bg-black/40 ml-auto",children:"—"})]})]}),(0,t.jsx)("div",{className:`mt-3 p-3 rounded-lg border text-center ${i?"bg-green-500/20 border-green-400/40":"bg-black/20 border-white/10"}`,children:(0,t.jsx)("div",{className:`text-sm font-bold ${i?"text-green-200":"text-white/80"}`,children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-green-300 animate-pulse",children:"Perfect round! 🏆✨"}),(0,t.jsx)("div",{className:"text-xs text-green-200/80 mt-1",children:"All optimal choices!"})]}):(0,t.jsxs)("span",{className:"text-amber-200",children:[Math.round(e.optimalCount/e.totalRounds*100),"% accuracy"]})})})]})}if(0===W.length)return null;let e=(0,z.computeNormalModeOptimalPicks)(W,ea),r=e.optimalCount===e.totalRounds;return(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("div",{className:"space-y-1.5",children:W.map((r,i)=>{let n="optimal"===e.statuses[i],a=r.category.replace(/_/g," ").replace(/([A-Z])/g,e=>" "+e).trim(),s=r.wasUnranked?r.categoryMaxRank?`${r.categoryMaxRank}+`:"coffee"===r.category?"73+":"pro_sports_championships"===r.category?"24+":"usa"===ea?"50+":"100+":r.rank>=100?"100+":r.rank>73&&"coffee"===r.category?"73+":r.rank>24&&"pro_sports_championships"===r.category?"24+":"usa"===ea&&r.rank>=50?"50+":r.rank;return(0,t.jsxs)("div",{className:`${n?"border-green-400/80":"border-gray-500/40"} ${n?"bg-green-500/10":"bg-white/5"} border-l-4 backdrop-blur-sm rounded-lg px-2.5 py-1.5 flex items-center gap-2 min-h-[32px] transition-all`,children:[(0,t.jsx)("span",{className:"text-lg mr-1",children:r.countryEmoji}),(0,t.jsx)("span",{className:"text-xs font-bold text-white truncate",children:B(r.country.name)}),(0,t.jsx)("span",{className:"text-xs text-white/70 font-medium",children:a}),(0,t.jsx)("span",{className:"text-xs font-mono font-black text-white/90 px-2 py-0.5 rounded bg-black/40 ml-auto",children:s})]},i)})}),(0,t.jsxs)("div",{className:`mt-3 px-2.5 py-2 rounded-lg border flex items-center gap-2 ${r?"bg-green-500/20 border-green-400/40":"bg-black/20 border-white/10"}`,children:[(0,t.jsx)("div",{className:`text-sm font-bold flex-1 ${r?"text-green-200":"text-white/80"}`,children:r?(0,t.jsx)("span",{className:"text-green-300 animate-pulse",children:"Perfect! 🏆✨"}):(0,t.jsxs)("span",{className:"text-amber-200",children:[Math.round(e.optimalCount/e.totalRounds*100),"% optimal (",e.optimalCount,"/",e.totalRounds,")"]})}),(0,t.jsx)("button",{onClick:to,disabled:eG,className:"text-xs font-bold px-2.5 py-1.5 rounded-full bg-emerald-500/30 hover:bg-emerald-500/50 border border-emerald-400/50 text-emerald-200 hover:text-white transition-all disabled:opacity-50 whitespace-nowrap flex-shrink-0",children:eG?"⏳":"✨ Perfect Solution"})]})]})})(),eE&&(0,t.jsxs)("div",{className:"text-center p-4 rounded-xl bg-white/10 border border-white/20 mb-4",children:[(0,t.jsx)("div",{className:"text-xs text-white/80 uppercase tracking-wide font-bold mb-1",children:"🏅 Your Daily Rank"}),(0,t.jsxs)("div",{className:"text-4xl font-black text-white",children:["#",eE]})]}),ed?.optimalAssignment&&(tl<=(ed.targetScore??1/0)?(0,t.jsxs)("div",{className:"w-full bg-emerald-500/20 border-2 border-emerald-400/60 rounded-xl p-4 text-center",children:[(0,t.jsx)("div",{className:"text-2xl mb-1",children:"🏆"}),(0,t.jsx)("div",{className:"text-emerald-200 font-black text-base",children:"Congratulations!"}),(0,t.jsx)("div",{className:"text-emerald-300/80 text-sm mt-1",children:"You solved today's challenge!"})]}):(0,t.jsx)(r.Button,{onClick:()=>{if(console.log("[FinalScore] Show optimal solution pressed"),eX)return void eP(!0);if(!ed?.optimalAssignment)return void alert("Optimal solution not available for this challenge.");let e=eb()||ew();if(console.log("[FinalScore] Has Pro/Explorer access:",e,"adsAllowed:",ts),e||!ts){console.log("[FinalScore] Pro/unconfirmed user, showing optimal solution immediately"),eP(!0),eH(!0);return}console.log("[FinalScore] Free user, attempting rewarded ad. Ad ready:",tn),tn?(eJ(!0),ta({onReward:e=>{console.log("[FinalScore] 🎉 Reward granted:",e),eP(!0),eH(!0),eJ(!1)},onClosed:e=>{console.log("[FinalScore] Rewarded ad closed. Was rewarded:",e),eJ(!1),e||console.log("[FinalScore] User closed ad early, not granting access")},onError:e=>{console.error("[FinalScore] Rewarded ad error:",e),eJ(!1),eP(!0),eH(!0)}})||(eJ(!1),eY(!0))):(console.log("[FinalScore] No rewarded ad available, showing Support-Us Gate"),eY(!0))},variant:"outline",disabled:eG,className:"w-full bg-emerald-500/20 hover:bg-emerald-500/30 border-2 border-emerald-400/50 text-emerald-100 hover:text-white font-bold text-sm py-3 rounded-xl backdrop-blur-sm transition-all disabled:opacity-50",children:eG?"⏳ Loading ad...":"✨ Show Perfect Solution"}))]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"bg-white/10 border border-white/20 rounded-xl p-3 text-center",children:[(0,t.jsxs)(r.Button,{type:"button",onClick:async e=>{e.preventDefault(),e.stopPropagation(),eW(await tE()?"success":"error"),ti.current&&clearTimeout(ti.current),ti.current=setTimeout(()=>{eW("idle"),ti.current=null},2200)},className:"w-full bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-white font-black text-base py-4 rounded-xl shadow-lg transition-all",children:[(0,t.jsx)(m.MessageSquare,{className:"w-5 h-5 mr-2"}),"success"===eB?"✓ Copied to Clipboard!":"error"===eB?"Copy Failed":"Share Your Score"]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-3 mt-2",children:[(0,t.jsx)("button",{className:"flex items-center justify-center p-2 rounded-lg bg-[#1da1f2]/90 hover:bg-[#1a8cd8] text-white shadow transition-all",onClick:()=>{let e=encodeURIComponent(tT()||`GeoHunter Daily Challenge
Score: ${tl}
Play at geohuntergame.com`);window.open(`https://twitter.com/intent/tweet?text=${e}`,"_blank")},"aria-label":"Share on Twitter",children:(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M22.46 5.924c-.793.352-1.645.59-2.54.698a4.48 4.48 0 0 0 1.965-2.475 8.94 8.94 0 0 1-2.828 1.082A4.48 4.48 0 0 0 16.11 4c-2.48 0-4.49 2.01-4.49 4.49 0 .352.04.695.116 1.022C7.728 9.36 4.1 7.6 1.67 4.98c-.386.664-.608 1.437-.608 2.26 0 1.56.795 2.936 2.005 3.744-.738-.023-1.432-.226-2.04-.563v.057c0 2.18 1.55 4.002 3.604 4.418-.377.103-.775.158-1.186.158-.29 0-.57-.028-.844-.08.57 1.78 2.23 3.08 4.2 3.12A8.98 8.98 0 0 1 2 19.54a12.7 12.7 0 0 0 6.88 2.02c8.26 0 12.78-6.84 12.78-12.78 0-.195-.004-.39-.013-.583A9.1 9.1 0 0 0 24 4.59a8.98 8.98 0 0 1-2.54.698z",fill:"currentColor"})})}),(0,t.jsx)("button",{className:"flex items-center justify-center p-2 rounded-lg bg-[#25d366]/90 hover:bg-[#1ebe57] text-white shadow transition-all",onClick:()=>{let e=encodeURIComponent(tT()||`GeoHunter Daily Challenge
Score: ${tl}
Play at geohuntergame.com`);window.open(`https://wa.me/?text=${e}`,"_blank")},"aria-label":"Share on WhatsApp",children:(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M20.52 3.48A12.07 12.07 0 0 0 12 0C5.37 0 0 5.37 0 12c0 2.12.56 4.18 1.62 6.01L0 24l6.18-1.62A12.02 12.02 0 0 0 12 24c6.63 0 12-5.37 12-12 0-3.21-1.25-6.23-3.48-8.52zM12 22c-1.85 0-3.66-.5-5.23-1.44l-.37-.22-3.67.97.98-3.58-.24-.37A9.98 9.98 0 1 1 12 22zm5.2-7.6c-.28-.14-1.65-.81-1.9-.9-.25-.09-.43-.14-.61.14-.18.28-.7.9-.86 1.08-.16.18-.32.2-.6.07-.28-.14-1.18-.44-2.25-1.4-.83-.74-1.39-1.65-1.55-1.93-.16-.28-.02-.43.12-.57.13-.13.28-.34.42-.51.14-.17.18-.29.28-.48.09-.19.05-.36-.02-.5-.07-.14-.61-1.47-.84-2.01-.22-.54-.45-.47-.62-.48-.16-.01-.36-.01-.56-.01-.19 0-.5.07-.76.34-.26.27-1 1-1 2.43 0 1.43 1.03 2.81 1.18 3 .15.19 2.03 3.1 4.93 4.23.69.3 1.23.48 1.65.62.69.22 1.32.19 1.81.12.55-.08 1.65-.67 1.89-1.32.23-.65.23-1.2.16-1.32-.07-.12-.25-.19-.53-.33z",fill:"currentColor"})})}),"u">typeof navigator&&navigator.share&&(0,t.jsx)("button",{className:"flex items-center justify-center p-2 rounded-lg bg-gradient-to-r from-emerald-500 to-cyan-500 hover:from-emerald-600 hover:to-cyan-600 text-white shadow transition-all",onClick:async()=>{let e=tT()||`GeoHunter Daily Challenge
Score: ${tl}
Play at geohuntergame.com`;navigator.share({title:"GeoHunter Daily Challenge",text:e,url:"https://geohuntergame.com"})},"aria-label":"Share via...",children:(0,t.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("circle",{cx:"5",cy:"12",r:"2",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"19",cy:"12",r:"2",fill:"currentColor"})]})})]})]}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(w.MiddleAd,{})})]}),(0,t.jsx)("div",{className:"flex justify-center mt-3",children:(0,t.jsx)(w.LargeBannerAd,{})})]}):tI?(0,t.jsxs)(t.Fragment,{children:[(I=t_?"#14b8a6":tS?"#6366f1":tN?"#db2777":"#f59e0b",U=t_?"#0d9488":tS?"#4338ca":tN?"#be185d":"#b45309",R=t_?"🌊":tS?"🔄":tN?"🎨":"⚡",M=t_?"MiniHunter 2":tS?"Reverse":tN?"Custom":"MiniHunter",(0,t.jsxs)("div",{ref:tr,className:"rounded-2xl p-6 text-center shadow-xl",style:{background:`linear-gradient(135deg, ${I}, ${U})`},children:[tb&&(0,t.jsx)("div",{className:"flex justify-end mb-2",children:(0,t.jsx)($.LevelXpChip,{level:tb.level,fraction:tb.fraction,xpEarned:tb.xpEarned,hideXp:tb.hideXp,isGuest:tb.isGuest,onClick:()=>{window.location.href="/account"},onPressGuest:()=>tx(!0)})}),(0,t.jsx)("div",{className:"text-5xl mb-3",children:R}),(0,t.jsx)("div",{className:"text-[11px] font-extrabold text-white/70 uppercase tracking-[0.2em] mb-4",children:M}),(0,t.jsx)("div",{className:"text-8xl font-black text-white font-mono leading-none mb-2 drop-shadow-lg",children:tl}),(0,t.jsx)("div",{className:"text-[11px] text-white/50 font-semibold uppercase tracking-widest",children:"lower is better"})]})),(0,t.jsxs)("div",{className:"rounded-2xl overflow-hidden border border-white/10 bg-white/[0.06]",children:[(0,t.jsx)("div",{className:"px-4 py-2.5 text-[10px] font-bold text-white/40 uppercase tracking-[0.15em]",children:"Your Results"}),(L=tS?"#6366f1":tN?"#db2777":t_?"#14b8a6":"#f59e0b",W.map((e,r)=>{let i=e.wasUnranked&&e.categoryMaxRank?`${e.categoryMaxRank}+`:e.rank>=100?"100+":e.rank>73&&"coffee"===e.category?"73+":e.rank>24&&"pro_sports_championships"===e.category?"24+":String(e.rank),n=e$(e.category);return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-t border-white/5 border-l-4",style:{borderLeftColor:L},children:[(0,t.jsx)("span",{className:"text-xl w-7 text-center shrink-0",children:e.countryEmoji}),(0,t.jsx)("div",{className:"flex-1 min-w-0 text-sm font-bold text-white truncate",children:B(e.country.name)}),(0,t.jsxs)("span",{className:"text-[11px] text-white/50 truncate max-w-[30%] text-right shrink-0",children:[n.icon?`${n.icon} `:"",n.name]}),(0,t.jsxs)("span",{className:"text-sm font-black shrink-0",style:tU(e.rank),children:["#",i]})]},r)}))]}),(0,t.jsx)("div",{className:"flex justify-center py-1",children:(0,t.jsx)(w.MiddleAd,{})}),(0,t.jsx)("div",{className:"space-y-2.5 pb-2"})]}):(0,t.jsxs)(t.Fragment,{children:[eo&&(0,t.jsxs)("div",{className:"bg-yellow-500/20 border-2 border-yellow-400/60 rounded-xl px-4 py-3 text-center mb-3",children:[(0,t.jsx)("div",{className:"text-2xl mb-1",children:"🏋️"}),(0,t.jsx)("div",{className:"text-yellow-300 text-lg font-black tracking-[3px] uppercase",children:"EASY MODE"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-1.5",children:[(0,t.jsx)("span",{className:"text-yellow-300/70 text-xs font-bold tracking-wide",children:"🏋️ Easy PB:"}),(0,t.jsx)("span",{className:"text-yellow-200 text-sm font-black",children:tw<999?tw:"—"}),tk&&(0,t.jsx)("span",{className:"bg-yellow-400/30 border border-yellow-400/60 text-yellow-200 text-[10px] font-black px-1.5 py-0.5 rounded-full",children:"NEW!"})]}),(0,t.jsx)("div",{className:"text-yellow-300/50 text-[10px] font-bold tracking-wide mt-1",children:"Saved locally · No leaderboard"})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{ref:tr,className:`rounded-2xl overflow-hidden shadow-lg ${e8?"blur-md pointer-events-none select-none":""}`,children:[(0,t.jsxs)("div",{className:`bg-gradient-to-r ${eo?"from-amber-500 to-yellow-600":"world"===ea?"from-emerald-500 to-teal-600":"special"===ea?"from-orange-500 to-red-600":"voyage"===ea?"from-cyan-500 to-indigo-600":"atlas"===ea?"from-red-500 to-rose-700":"usa"===ea?"from-blue-700 to-blue-900":"canada"===ea?"from-red-600 to-red-800":"europe"===ea?"from-blue-600 to-indigo-800":"sports"===ea?"from-green-600 to-green-800":"empires"===ea?"from-amber-700 to-amber-900":"world-cup"===ea||"world-cup-ko"===ea?"from-green-600 to-emerald-800":"footy-clubs"===ea?"from-[#d4a017] to-[#0d1b3e]":"weekly-pro"===ea?"from-amber-600 to-yellow-700":"from-purple-500 to-indigo-600"} p-5 text-white relative`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"text-3xl shrink-0",children:eo?"🏋️":"world"===ea?"🌍":"special"===ea?"⚡":"voyage"===ea?"🗺️":"atlas"===ea?"📍":"usa"===ea?"🇺🇸":"canada"===ea?"🍁":"europe"===ea?"🇪🇺":"sports"===ea?"⚽":"empires"===ea?"⚔️":"world-cup"===ea||"world-cup-ko"===ea||"footy-clubs"===ea?"⚽":"weekly-pro"===ea?"⭐":"🎯"}),(0,t.jsx)("h1",{className:"text-xl font-black uppercase tracking-wide truncate",children:eo?"Easy":"world"===ea?"World":"special"===ea?"Special":"voyage"===ea?"Voyage":"atlas"===ea?"Atlas":"usa"===ea?"USA States":"canada"===ea?"Canada":"europe"===ea?"Europe":"sports"===ea?"Sports":"empires"===ea?"Ancient Empires":"world-cup"===ea||"world-cup-ko"===ea?"Nations Cup":"footy-clubs"===ea?"Footy Clubs":"weekly-pro"===ea?"Weekly Pro":"Classic"})]}),tb&&(0,t.jsx)($.LevelXpChip,{level:tb.level,fraction:tb.fraction,xpEarned:tb.xpEarned,hideXp:tb.hideXp,isGuest:tb.isGuest,onClick:()=>{window.location.href="/account"},onPressGuest:()=>tx(!0)})]}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(k.ScoreCountUp,{value:tl,className:"text-6xl font-black font-mono drop-shadow-lg"})}),tv&&(0,t.jsx)("div",{className:"mt-4 text-left",children:(0,t.jsx)(v.MilestoneBar,{progress:tv.trackProgress,current:tl,prevBest:tv.prevBest<999?tv.prevBest:null,isNewBest:tp,onClick:()=>{window.location.href="/account"}})})]}),(0,t.jsxs)("div",{className:"bg-white/10 backdrop-blur-md p-4 space-y-3",children:[("world-cup"===ea||"world-cup-ko"===ea)&&(0,t.jsxs)("button",{onClick:e7,className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl text-left transition-opacity hover:opacity-90 active:opacity-80",style:{background:"linear-gradient(135deg, #0d1b3e 0%, #1a2f5e 100%)",border:"1px solid #d4a017"},children:[(0,t.jsx)("span",{className:"text-3xl flex-shrink-0",children:"⚽"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-black",style:{color:"#d4a017"},children:"Try Footy Clubs ⚽"}),(0,t.jsx)("p",{className:"text-xs text-white/70 mt-0.5",children:"Rank 100 legendary clubs — your first game is free"})]}),(0,t.jsx)("span",{className:"text-[10px] font-black px-2 py-1 rounded-full flex-shrink-0",style:{backgroundColor:"#d4a017",color:"#0d1b3e"},children:"PLAY"})]}),!e8&&ty&&!eC&&(ty.correctCount===ty.totalRounds?(0,t.jsx)("div",{className:"w-full bg-emerald-500/20 border-2 border-emerald-400/60 rounded-xl p-3 text-center",children:(0,t.jsx)("span",{className:"text-emerald-200 font-black text-sm",children:"Perfect round! 🏆✨"})}):(0,t.jsx)(r.Button,{onClick:to,variant:"outline",disabled:eG,className:"w-full bg-emerald-500/20 hover:bg-emerald-500/30 border-2 border-emerald-400/50 text-emerald-100 hover:text-white font-bold text-sm py-3 rounded-xl backdrop-blur-sm transition-all disabled:opacity-50",children:eG?"⏳ Loading ad...":"✨ Show Perfect Solution"})),(0,t.jsx)("div",{className:"space-y-2",children:W.map((e,r)=>{let i=e.wasUnranked&&e.categoryMaxRank?`${e.categoryMaxRank}+`:e.rank>=100?"100+":e.rank>73&&"coffee"===e.category?"73+":e.rank>24&&"pro_sports_championships"===e.category?"24+":e.rank,n=e$(e.category),a=(0,Z.getRankPopup)(e.category,"number"==typeof e.rank?e.rank:parseInt(String(e.rank))),s="world"===ea?"#34d399":"special"===ea?"#fb923c":"voyage"===ea?"#22d3ee":"atlas"===ea?"#f87171":"usa"===ea?"#60a5fa":"canada"===ea?"#f87171":"europe"===ea?"#60a5fa":"sports"===ea?"#4ade80":"empires"===ea?"#fbbf24":"world-cup"===ea||"world-cup-ko"===ea?"#34d399":"footy-clubs"===ea?"#d4a017":"weekly-pro"===ea?"#fbbf24":"#c084fc",o=ty?.matchByCountry.get(e.country.name),l=eC&&void 0!==o?o?"#10b981":"#fb923c":s;return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-black/30 hover:bg-black/40 transition-colors",style:{borderLeft:`4px solid ${l}`},children:[(0,t.jsx)("span",{className:"text-xl",children:e.countryEmoji}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-bold text-white",children:B(e.country.name)}),a&&(0,t.jsx)("div",{className:"text-xs text-white/60 truncate",children:a})]}),(0,t.jsxs)("div",{className:"text-xs text-white/70 truncate max-w-[42%] text-right",children:[n.icon?`${n.icon} `:"",n.name]}),(0,t.jsx)("div",{className:"text-xs font-black px-2 py-1 rounded bg-black/50 whitespace-nowrap",style:tU(e.rank),children:i})]},r)})}),!eo&&(tp||t$||ez)&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[tp&&(0,t.jsx)(i.Badge,{className:"bg-yellow-500/30 text-yellow-200 border-yellow-400/50 text-xs font-bold",children:"🏆 NEW BEST!"}),t$&&(0,t.jsx)(i.Badge,{className:"bg-green-500/30 text-green-200 border-green-400/50 text-xs font-bold",children:"⭐ EXCELLENT!"}),ez&&ez<=100&&(0,t.jsxs)(i.Badge,{className:"bg-purple-500/30 text-purple-200 border-purple-400/50 text-xs font-bold",children:["🏅 Top ",ez]})]}),(0,t.jsx)("div",{className:"text-center pt-2 border-t border-white/20",children:(0,t.jsx)("a",{href:"https://geohuntergame.com",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-semibold text-white/80 hover:text-white transition-colors",children:"geohuntergame.com"})})]})]}),e8&&(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-10 bg-black/40 rounded-2xl p-6",children:[(0,t.jsx)("div",{className:"text-5xl mb-3",children:"⚔️"}),(0,t.jsx)("h3",{className:"text-xl font-black text-white mb-2 text-center",children:"Unlock Ancient Empires"}),(0,t.jsx)("p",{className:"text-sm text-white/70 mb-4 text-center",children:"Subscribe to GeoHunter+ to see your full score and play unlimited games"}),(0,t.jsx)("button",{onClick:()=>e4(!0),className:"px-6 py-3 bg-gradient-to-r from-amber-500 to-amber-700 text-white font-black rounded-xl shadow-lg hover:from-amber-600 hover:to-amber-800 transition-all",children:"Get GeoHunter+"})]})]}),!e8&&eC&&ty&&(0,t.jsx)(j.InlinePerfectSolution,{rows:ty.rows,optimalScore:ty.optimalScore,userScore:tl,correctCount:ty.correctCount,totalRounds:ty.totalRounds,onHide:()=>eT(!1)}),ep&&ev&&(0,t.jsxs)("div",{className:"rounded-xl border border-yellow-300/40 bg-yellow-500/10 text-yellow-100 px-3 py-2 mb-3 flex items-center gap-3",children:[(0,t.jsx)("span",{className:"text-xs font-medium flex-1",children:"We're updating your score. Hit refresh to try again."}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:async()=>{eL(!0);try{await ey()}finally{eL(!1)}},className:"bg-white/20 hover:bg-white/30 border-yellow-300/40 text-yellow-100",disabled:eM,children:eM?"Updating...":"Refresh"})]}),(0,t.jsx)("div",{className:"flex justify-center py-2",children:(0,t.jsx)(w.MiddleAd,{})}),(0,t.jsx)("div",{className:"flex justify-center py-3",children:(0,t.jsx)(w.BottomAd,{})})]})]}),es&&!tI&&!el&&(0,t.jsx)(_.FinalScoreFooter,{rankNumber:eE,onBack:()=>{tP()&&en()},onShare:async()=>{eW(await tE()?"success":"error"),ti.current&&clearTimeout(ti.current),ti.current=setTimeout(()=>{eW("idle"),ti.current=null},2200)},onRanks:()=>e_(!0),primaryAction:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1.5 text-white/80 text-xs font-bold py-2.5",children:[(0,t.jsx)(h.Clock,{className:"w-4 h-4 shrink-0"}),(0,t.jsxs)("span",{children:["Next: ",String(eZ.hours).padStart(2,"0"),":",String(eZ.minutes).padStart(2,"0"),":",String(eZ.seconds).padStart(2,"0")]})]})}),(!es||tI)&&!el&&(0,t.jsx)(_.FinalScoreFooter,{rankNumber:ez,onBack:()=>{tP()&&en()},onShare:()=>{tE()},onRanks:()=>e_(!0),primaryAction:tI?(0,t.jsx)("button",{type:"button",onClick:()=>{tj?ee():t_?et():tS?er():tN&&ei()},className:"w-full bg-gradient-to-r from-amber-500 to-amber-700 hover:from-amber-600 hover:to-amber-800 text-white font-black text-sm py-2.5 rounded-xl shadow-lg",children:"Play Again"}):tt&&!(!tt||"pro"===em)?(0,t.jsx)("button",{type:"button",onClick:()=>{e1("final_score_weekly"),eQ(!0)},className:"w-full bg-gradient-to-r from-amber-500 to-yellow-600 hover:from-amber-600 hover:to-yellow-700 text-white font-black text-sm py-2.5 rounded-xl shadow-lg flex items-center justify-center gap-1.5",children:(0,t.jsx)("span",{children:"⭐ Upgrade to GeoHunter+"})}):(0,t.jsxs)("button",{type:"button",onClick:t=>{if(t.preventDefault(),t.stopPropagation(),tP())if(eo){let{useGameStore:t}=e.r(15149);t.getState().startPracticeGame(ea)}else"weekly-pro"===ea?Q():"footy-clubs"!==ea||eb()?q(ea):e9(!0)},className:"w-full bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white font-black text-sm py-2.5 rounded-xl shadow-lg flex items-center justify-center gap-1.5",children:[(0,t.jsx)(c.TrendingUp,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:eo?tw<999?`Beat 🏋️${tw}!`:"Play Easy Again":`Play Again & Beat ${tm<999?tm:"Your Score"}!`})]})}),(0,t.jsx)(N.SimpleLeaderboard,{isOpen:ej,onClose:()=>e_(!1),initialTab:es?"daily":"world-cup-ko"===ea?"world-cup":ea}),(0,t.jsx)(f.DailyResultsModal,{isOpen:eS,onClose:()=>eN(!1)}),es&&ed?.optimalAssignment&&(0,t.jsx)(P,{isOpen:eI,onClose:()=>eP(!1),optimalAssignments:(F=ed.skipCountry?.name,ed.countries.filter(e=>e.name!==F).map(e=>{let t=ed.optimalAssignment?.find(t=>t.countryName===e.name);return t?{country:e,category:t.categoryId,rank:t.rank,countryEmoji:e.emoji||"🌍"}:null}).filter(e=>null!==e)),optimalScore:ed.targetScore,userScore:tl,userSelections:W.map(e=>({countryName:e.country.name,category:e.category,rank:e.rank}))}),eD&&(0,t.jsx)(g.OnboardingModal,{mode:"refresh",onClose:()=>eA(!1)}),(0,t.jsx)(x.AuthModal,{isOpen:tg,onClose:()=>tx(!1)}),(0,t.jsx)(D,{isOpen:eK,onClose:()=>eY(!1),onReveal:()=>{eY(!1),eH(!0),es?eP(!0):eT(!0)},onOpenPaywall:()=>{eY(!1),e1("final_score_perfect"),eQ(!0)},source:"final_score_perfect"}),eq&&(0,t.jsx)(A.GeoHunterPlusModal,{isOpen:eq,onClose:()=>eQ(!1),source:e0,highlightPro:"final_score_weekly"===e0,onPurchaseSuccess:()=>{eQ(!1),"final_score_perfect"===e0&&(eH(!0),es?eP(!0):eT(!0))}}),e2&&(0,t.jsx)(E.PremiumModePaywall,{isOpen:e2,onClose:()=>e4(!1),mode:"empires",defaultTab:"pro",source:"final_score_mode",onPurchaseSuccess:()=>e4(!1)}),e3&&(0,t.jsx)(E.PremiumModePaywall,{isOpen:e3,onClose:()=>e9(!1),mode:"footy-clubs",defaultTab:"pro",source:"final_score_mode",onPurchaseSuccess:()=>{e9(!1),q("footy-clubs")}}),e5&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"bg-[#0d1b3e] border border-yellow-500/30 rounded-2xl p-6 max-w-sm w-full shadow-2xl",children:[(0,t.jsxs)("div",{className:"text-center mb-4",children:[(0,t.jsx)("div",{className:"text-6xl mb-3",children:"⚽"}),(0,t.jsx)("h2",{className:"text-xl font-black text-white mb-2",children:"Try Footy Clubs free — one game on us!"}),(0,t.jsx)("p",{className:"text-sm text-white/70",children:"Rank 100 legendary football clubs across 8 categories. Subscribe to GeoHunter+ for unlimited games."})]}),(0,t.jsxs)("div",{className:"space-y-2 mt-5",children:[(0,t.jsx)("button",{onClick:te,className:"w-full py-3 rounded-xl bg-gradient-to-r from-yellow-500 to-yellow-700 text-[#0d1b3e] font-black text-sm hover:from-yellow-400 hover:to-yellow-600 transition-all",children:"⚽ Try Now — Free"}),(0,t.jsx)("button",{onClick:()=>{e6(!1),e9(!0)},className:"w-full py-3 rounded-xl bg-white/10 text-white/80 font-bold text-sm hover:bg-white/20 transition-all",children:"Buy GeoHunter+"}),(0,t.jsx)("button",{onClick:()=>e6(!1),className:"w-full py-2 text-white/40 text-xs hover:text-white/60 transition-all",children:"Maybe later"})]})]})})]})}e.s(["FinalScore",()=>R],70977)}]);