@mappedin/mappedin-js 6.0.0-alpha.9 → 6.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +104 -0
- package/README.md +137 -157
- package/THIRD_PARTY_LICENSES.txt +14468 -0
- package/lib/esm/GLTFExporter-OD4NIP5J.js +2 -0
- package/lib/esm/GLTFExporter-OD4NIP5J.js.map +7 -0
- package/lib/esm/GLTFLoader-2KHURE2O.js +2 -0
- package/lib/esm/GLTFLoader-2KHURE2O.js.map +7 -0
- package/lib/esm/browser-MJVP6R3A.js +2 -0
- package/lib/esm/browser-MJVP6R3A.js.map +7 -0
- package/lib/esm/chunk-2RJ5UTHX.js +3 -0
- package/lib/esm/chunk-2RJ5UTHX.js.map +7 -0
- package/lib/esm/chunk-J66EV4D7.js +2 -0
- package/lib/esm/chunk-J66EV4D7.js.map +7 -0
- package/lib/esm/chunk-LLHXGTB2.js +2 -0
- package/lib/esm/chunk-LLHXGTB2.js.map +7 -0
- package/lib/esm/chunk-R6ACEBVD.js +747 -0
- package/lib/esm/chunk-R6ACEBVD.js.map +7 -0
- package/lib/esm/chunk-ROCNZJLL.js +2 -0
- package/lib/esm/chunk-ROCNZJLL.js.map +7 -0
- package/lib/esm/chunk-SWYBY4H7.js +2269 -0
- package/lib/esm/chunk-SWYBY4H7.js.map +7 -0
- package/lib/esm/chunk-TJG5BXTK.js +3820 -0
- package/lib/esm/chunk-TJG5BXTK.js.map +7 -0
- package/lib/esm/fonts/roboto-regular.ttf +0 -0
- package/lib/esm/index.css +2 -0
- package/lib/esm/index.css.map +7 -0
- package/lib/esm/index.d.ts +38908 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +7 -0
- package/lib/esm/inspector-KMBZXTF5.js +483 -0
- package/lib/esm/inspector-KMBZXTF5.js.map +7 -0
- package/lib/esm/inspector-T3HA7VGW.css +2 -0
- package/lib/esm/inspector-T3HA7VGW.css.map +7 -0
- package/lib/esm/internal-LZTQU5W2.js +2 -0
- package/lib/esm/internal-LZTQU5W2.js.map +7 -0
- package/lib/esm/internal-VKD5KMH3.css +2 -0
- package/lib/esm/internal-VKD5KMH3.css.map +7 -0
- package/lib/esm/outdoor-context-v5-DPTEYL6O.js +2 -0
- package/lib/esm/outdoor-context-v5-DPTEYL6O.js.map +7 -0
- package/lib/esm/roboto-regular-R5KXKW73.js +2 -0
- package/lib/esm/roboto-regular-R5KXKW73.js.map +7 -0
- package/lib/esm/text3d-AEQ2USTW.js +253 -0
- package/lib/esm/text3d-AEQ2USTW.js.map +7 -0
- package/lib/esm/workers/collision-worker.csp.js +1 -0
- package/lib/esm/workers/maplibre-worker.csp.js +2 -0
- package/lib/index-rn.js +4288 -0
- package/lib/index.css +2 -0
- package/package.json +34 -64
- package/lib/esm/get-venue/index.d.ts +0 -2466
- package/lib/esm/get-venue/index.js +0 -1
- package/lib/esm/navigator/index.d.ts +0 -243
- package/lib/esm/navigator/index.js +0 -1
- package/lib/esm/renderer/Arrival-JVXBAUFE.js +0 -1
- package/lib/esm/renderer/Chalet-7VKCGC5R.js +0 -1
- package/lib/esm/renderer/HelveticaNeue-M6HRIIGZ.js +0 -1
- package/lib/esm/renderer/Helvetiker-K2MS62IA.js +0 -1
- package/lib/esm/renderer/Lato-PKBWMAQE.js +0 -1
- package/lib/esm/renderer/MyriadPro-MKDHQECZ.js +0 -1
- package/lib/esm/renderer/ProximaNova-U6AQPIB5.js +0 -1
- package/lib/esm/renderer/SimonCircular-LDXYDCAN.js +0 -1
- package/lib/esm/renderer/browser-BW4IT6LG.js +0 -1
- package/lib/esm/renderer/chunk-GPLIHQI3.js +0 -1
- package/lib/esm/renderer/chunk-MWXS32IR.js +0 -1
- package/lib/esm/renderer/index.css +0 -1
- package/lib/esm/renderer/index.d.ts +0 -5261
- package/lib/esm/renderer/index.js +0 -1
- package/lib/mappedin.css +0 -1
- package/lib/mappedin.js +0 -1
- package/lib/node/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var Qe=Object.defineProperty;var c=(r,e)=>Qe(r,"name",{value:e,configurable:!0});var _t=(r,e)=>{for(var t in e)Qe(r,t,{get:e[t],enumerable:!0})};function Ke(r,e){return e.x+e.w<r.x+r.w&&e.x>r.x&&e.y>r.y&&e.y+e.h<r.y+r.h}c(Ke,"contains");function Ge(r,e){let[t,s]=e;return t>=r.x&&t<=r.x+r.w&&s>=r.y&&s<=r.y+r.h}c(Ge,"intersectPoint");function He(r,e){let t=e.x,s=e.y,n=e.x+e.w,a=e.y+e.h,o=r.x,i=r.y,l=r.x+r.w,f=r.y+r.h;return t<l&&o<n&&s<f&&i<a}c(He,"intersects");function L(r,e){for(let t=0;t<e.length;t++)r.push(e[t])}c(L,"appendItems");var w=class{static{c(this,"Rectangle")}x;y;w;h;userData;constructor(e,t,s,n,a){this.userData=typeof a>"u"?null:a,this.x=e,this.y=t,this.w=s,this.h=n}contains(e){return e===this?!1:Ke(this,e)}intersects(e){return He(this,e)}intersectsPoint(e){return Ge(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.8)",e.fillRect(this.x,this.y,this.w,this.h)}};var Ce=class r{static{c(this,"QuadTree")}topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,t){this.parent=t,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:t,w:s,h:n}=this.boundary;this.topLeft=new r(new w(e,t,s/2,n/2),this),this.topRight=new r(new w(e+s/2,t,s/2,n/2),this),this.bottomLeft=new r(new w(e,t+n/2,s/2,n/2),this),this.bottomRight=new r(new w(e+s/2,t+n/2,s/2,n/2),this),this.divided=!0}queryRect(e){let t=[];if(this.boundary.intersects(e))t.push(...this.objects);else return[];return this.divided&&(L(t,this.topLeft.queryRect(e)),L(t,this.topRight.queryRect(e)),L(t,this.bottomLeft.queryRect(e)),L(t,this.bottomRight.queryRect(e))),t}queryPoint(e){let t=[];if(this.boundary.intersectsPoint(e))t.push(...this.objects);else return[];return this.divided&&(L(t,this.topLeft.queryPoint(e)),L(t,this.topRight.queryPoint(e)),L(t,this.bottomLeft.queryPoint(e)),L(t,this.bottomRight.queryPoint(e))),t}insert(e){return(this.parent?!this.boundary.contains(e):!this.boundary.intersects(e))?!1:this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0)}drawObjects(e){this.objects.forEach(t=>t.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};var be={};_t(be,{BRAND:()=>Ut,DIRTY:()=>Q,EMPTY_PATH:()=>kt,INVALID:()=>m,NEVER:()=>Ar,OK:()=>R,ParseStatus:()=>T,Schema:()=>v,ZodAny:()=>W,ZodArray:()=>B,ZodBigInt:()=>G,ZodBoolean:()=>H,ZodBranded:()=>Ae,ZodCatch:()=>ue,ZodDate:()=>ee,ZodDefault:()=>de,ZodDiscriminatedUnion:()=>Me,ZodEffects:()=>E,ZodEnum:()=>oe,ZodError:()=>S,ZodFirstPartyTypeKind:()=>y,ZodFunction:()=>Ze,ZodIntersection:()=>ne,ZodIssueCode:()=>d,ZodLazy:()=>ae,ZodLiteral:()=>ie,ZodMap:()=>_e,ZodNaN:()=>xe,ZodNativeEnum:()=>ce,ZodNever:()=>M,ZodNull:()=>re,ZodNullable:()=>$,ZodNumber:()=>K,ZodObject:()=>A,ZodOptional:()=>N,ZodParsedType:()=>h,ZodPipeline:()=>Oe,ZodPromise:()=>q,ZodReadonly:()=>le,ZodRecord:()=>Pe,ZodSchema:()=>v,ZodSet:()=>ve,ZodString:()=>U,ZodSymbol:()=>ye,ZodTransformer:()=>E,ZodTuple:()=>Z,ZodType:()=>v,ZodUndefined:()=>te,ZodUnion:()=>se,ZodUnknown:()=>z,ZodVoid:()=>ge,addIssueToContext:()=>u,any:()=>Ht,array:()=>sr,bigint:()=>Xt,boolean:()=>ut,coerce:()=>Sr,custom:()=>ot,date:()=>Jt,datetimeRegex:()=>at,defaultErrorMap:()=>V,discriminatedUnion:()=>or,effect:()=>vr,enum:()=>yr,function:()=>hr,getErrorMap:()=>he,getParsedType:()=>P,instanceof:()=>qt,intersection:()=>cr,isAborted:()=>je,isAsync:()=>pe,isDirty:()=>Ee,isValid:()=>F,late:()=>Wt,lazy:()=>pr,literal:()=>mr,makeIssue:()=>Se,map:()=>lr,nan:()=>Yt,nativeEnum:()=>gr,never:()=>tr,null:()=>Gt,nullable:()=>br,number:()=>dt,object:()=>nr,objectUtil:()=>Be,oboolean:()=>Cr,onumber:()=>Rr,optional:()=>xr,ostring:()=>Tr,pipeline:()=>wr,preprocess:()=>kr,promise:()=>_r,quotelessJson:()=>vt,record:()=>ur,set:()=>fr,setErrorMap:()=>bt,strictObject:()=>ar,string:()=>ct,symbol:()=>Qt,transformer:()=>vr,tuple:()=>dr,undefined:()=>Kt,union:()=>ir,unknown:()=>er,util:()=>x,void:()=>rr});var x;(function(r){r.assertEqual=n=>{};function e(n){}c(e,"assertIs"),r.assertIs=e;function t(n){throw new Error}c(t,"assertNever"),r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let o of n)a[o]=o;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),o={};for(let i of a)o[i]=n[i];return r.objectValues(o)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&a.push(o);return a},r.find=(n,a)=>{for(let o of n)if(a(o))return o},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}c(s,"joinValues"),r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Be;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Be||(Be={}));var h=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=c(r=>{switch(typeof r){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(r)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(r)?h.array:r===null?h.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?h.promise:typeof Map<"u"&&r instanceof Map?h.map:typeof Set<"u"&&r instanceof Set?h.set:typeof Date<"u"&&r instanceof Date?h.date:h.object;default:return h.unknown}},"getParsedType");var d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vt=c(r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),S=class r extends Error{static{c(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=c(a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)s._errors.push(t(o));else{let i=s,l=0;for(;l<o.path.length;){let f=o.path[l];l===o.path.length-1?(i[f]=i[f]||{_errors:[]},i[f]._errors.push(t(o))):i[f]=i[f]||{_errors:[]},i=i[f],l++}}},"processError");return n(this),s}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},s=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};S.create=r=>new S(r);var xt=c((r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===h.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}},"errorMap"),V=xt;var et=V;function bt(r){et=r}c(bt,"setErrorMap");function he(){return et}c(he,"getErrorMap");var Se=c(r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],o={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let i="",l=s.filter(f=>!!f).slice().reverse();for(let f of l)i=f(o,{data:e,defaultError:i}).message;return{...n,path:a,message:i}},"makeIssue"),kt=[];function u(r,e){let t=he(),s=Se({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===V?void 0:V].filter(n=>!!n)});r.common.issues.push(s)}c(u,"addIssueToContext");var T=class r{static{c(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t){let a=await n.key,o=await n.value;s.push({key:a,value:o})}return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:o}=n;if(a.status==="aborted"||o.status==="aborted")return m;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||n.alwaysSet)&&(s[a.value]=o.value)}return{status:e.value,value:s}}},m=Object.freeze({status:"aborted"}),Q=c(r=>({status:"dirty",value:r}),"DIRTY"),R=c(r=>({status:"valid",value:r}),"OK"),je=c(r=>r.status==="aborted","isAborted"),Ee=c(r=>r.status==="dirty","isDirty"),F=c(r=>r.status==="valid","isValid"),pe=c(r=>typeof Promise<"u"&&r instanceof Promise,"isAsync");var p;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(p||(p={}));var j=class{static{c(this,"ParseInputLazyPath")}constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},tt=c((r,e)=>{if(F(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new S(r.common.issues);return this._error=t,this._error}}},"handleResult");function g(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:c((o,i)=>{let{message:l}=r;return o.code==="invalid_enum_value"?{message:l??i.defaultError}:typeof i.data>"u"?{message:l??s??i.defaultError}:o.code!=="invalid_type"?{message:i.defaultError}:{message:l??t??i.defaultError}},"customMap"),description:n}}c(g,"processCreateParams");var v=class{static{c(this,"ZodType")}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(pe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){let s={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parseSync({data:e,path:s.path,parent:s});return tt(s,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return F(s)?{value:s.value}:{issues:t.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>F(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(pe(n)?n:Promise.resolve(n));return tt(s,a)}refine(e,t){let s=c(n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t,"getIssueProperties");return this._refinement((n,a)=>{let o=e(n),i=c(()=>a.addIssue({code:d.custom,...s(n)}),"setError");return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(i(),!1)):o?!0:(i(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new E({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:c(t=>this["~validate"](t),"validate")}}optional(){return N.create(this,this._def)}nullable(){return $.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return B.create(this)}promise(){return q.create(this,this._def)}or(e){return se.create([this,e],this._def)}and(e){return ne.create(this,e,this._def)}transform(e){return new E({...g(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new de({...g(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new Ae({typeName:y.ZodBranded,type:this,...g(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new ue({...g(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Oe.create(this,e)}readonly(){return le.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},wt=/^c[^\s-]{8,}$/i,Tt=/^[0-9a-z]+$/,Rt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ct=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,St=/^[a-z0-9_-]{21}$/i,At=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ot=/^[-+]?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)?)??$/,It=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Nt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Fe,jt=/^(?:(?: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])$/,Et=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Mt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Pt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Zt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,st="((\\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])))",Lt=new RegExp(`^${st}$`);function nt(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}c(nt,"timeRegexSource");function Vt(r){return new RegExp(`^${nt(r)}$`)}c(Vt,"timeRegex");function at(r){let e=`${st}T${nt(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}c(at,"datetimeRegex");function Dt(r,e){return!!((e==="v4"||!e)&&jt.test(r)||(e==="v6"||!e)&&Mt.test(r))}c(Dt,"isValidIP");function zt(r,e){if(!At.test(r))return!1;try{let[t]=r.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}c(zt,"isValidJWT");function Bt(r,e){return!!((e==="v4"||!e)&&Et.test(r)||(e==="v6"||!e)&&Pt.test(r))}c(Bt,"isValidCidr");var U=class r extends v{static{c(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){let a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.string,received:a.parsedType}),m}let s=new T,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let o=e.data.length>a.value,i=e.data.length<a.value;(o||i)&&(n=this._getOrReturnCtx(e,n),o?u(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):i&&u(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")It.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Fe||(Fe=new RegExp(Nt,"u")),Fe.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ct.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")St.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")wt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Tt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Rt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),u(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?at(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Lt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Vt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Ot.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Dt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?zt(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?Bt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?Zt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?$t.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...p.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};U.create=r=>new U({checks:[],typeName:y.ZodString,coerce:r?.coerce??!1,...g(r)});function Ft(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=Number.parseInt(r.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return a%o/10**n}c(Ft,"floatSafeRemainder");var K=class r extends v{static{c(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){let a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.number,received:a.parsedType}),m}let s,n=new T;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Ft(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};K.create=r=>new K({checks:[],typeName:y.ZodNumber,coerce:r?.coerce||!1,...g(r)});var G=class r extends v{static{c(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let s,n=new T;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:h.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};G.create=r=>new G({checks:[],typeName:y.ZodBigInt,coerce:r?.coerce??!1,...g(r)});var H=class extends v{static{c(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.boolean,received:s.parsedType}),m}return R(e.data)}};H.create=r=>new H({typeName:y.ZodBoolean,coerce:r?.coerce||!1,...g(r)});var ee=class r extends v{static{c(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){let a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_date}),m}let s=new T,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};ee.create=r=>new ee({checks:[],coerce:r?.coerce||!1,typeName:y.ZodDate,...g(r)});var ye=class extends v{static{c(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==h.symbol){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.symbol,received:s.parsedType}),m}return R(e.data)}};ye.create=r=>new ye({typeName:y.ZodSymbol,...g(r)});var te=class extends v{static{c(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==h.undefined){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.undefined,received:s.parsedType}),m}return R(e.data)}};te.create=r=>new te({typeName:y.ZodUndefined,...g(r)});var re=class extends v{static{c(this,"ZodNull")}_parse(e){if(this._getType(e)!==h.null){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.null,received:s.parsedType}),m}return R(e.data)}};re.create=r=>new re({typeName:y.ZodNull,...g(r)});var W=class extends v{static{c(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}};W.create=r=>new W({typeName:y.ZodAny,...g(r)});var z=class extends v{static{c(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}};z.create=r=>new z({typeName:y.ZodUnknown,...g(r)});var M=class extends v{static{c(this,"ZodNever")}_parse(e){let t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:h.never,received:t.parsedType}),m}};M.create=r=>new M({typeName:y.ZodNever,...g(r)});var ge=class extends v{static{c(this,"ZodVoid")}_parse(e){if(this._getType(e)!==h.undefined){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.void,received:s.parsedType}),m}return R(e.data)}};ge.create=r=>new ge({typeName:y.ZodVoid,...g(r)});var B=class r extends v{static{c(this,"ZodArray")}_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==h.array)return u(t,{code:d.invalid_type,expected:h.array,received:t.parsedType}),m;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(o||i)&&(u(t,{code:o?d.too_big:d.too_small,minimum:i?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(u(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(u(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((o,i)=>n.type._parseAsync(new j(t,o,t.path,i)))).then(o=>T.mergeArray(s,o));let a=[...t.data].map((o,i)=>n.type._parseSync(new j(t,o,t.path,i)));return T.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}};B.create=(r,e)=>new B({type:r,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...g(e)});function me(r){if(r instanceof A){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=N.create(me(s))}return new A({...r._def,shape:c(()=>e,"shape")})}else return r instanceof B?new B({...r._def,type:me(r.element)}):r instanceof N?N.create(me(r.unwrap())):r instanceof $?$.create(me(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>me(e))):r}c(me,"deepPartialify");var A=class r extends v{static{c(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==h.object){let f=this._getOrReturnCtx(e);return u(f,{code:d.invalid_type,expected:h.object,received:f.parsedType}),m}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof M&&this._def.unknownKeys==="strip"))for(let f in n.data)o.includes(f)||i.push(f);let l=[];for(let f of o){let _=a[f],C=n.data[f];l.push({key:{status:"valid",value:f},value:_._parse(new j(n,C,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof M){let f=this._def.unknownKeys;if(f==="passthrough")for(let _ of i)l.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(f==="strict")i.length>0&&(u(n,{code:d.unrecognized_keys,keys:i}),s.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let _ of i){let C=n.data[_];l.push({key:{status:"valid",value:_},value:f._parse(new j(n,C,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let f=[];for(let _ of l){let C=await _.key,Ie=await _.value;f.push({key:C,value:Ie,alwaysSet:_.alwaysSet})}return f}).then(f=>T.mergeObjectSync(s,f)):T.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:c((t,s)=>{let n=this._def.errorMap?.(t,s).message??s.defaultError;return t.code==="unrecognized_keys"?{message:p.errToObj(e).message??n}:{message:n}},"errorMap")}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:c(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:c(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let s of x.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new r({...this._def,shape:c(()=>t,"shape")})}omit(e){let t={};for(let s of x.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new r({...this._def,shape:c(()=>t,"shape")})}deepPartial(){return me(this)}partial(e){let t={};for(let s of x.objectKeys(this.shape)){let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}return new r({...this._def,shape:c(()=>t,"shape")})}required(e){let t={};for(let s of x.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof N;)a=a._def.innerType;t[s]=a}return new r({...this._def,shape:c(()=>t,"shape")})}keyof(){return it(x.objectKeys(this.shape))}};A.create=(r,e)=>new A({shape:c(()=>r,"shape"),unknownKeys:"strip",catchall:M.create(),typeName:y.ZodObject,...g(e)});A.strictCreate=(r,e)=>new A({shape:c(()=>r,"shape"),unknownKeys:"strict",catchall:M.create(),typeName:y.ZodObject,...g(e)});A.lazycreate=(r,e)=>new A({shape:r,unknownKeys:"strip",catchall:M.create(),typeName:y.ZodObject,...g(e)});var se=class extends v{static{c(this,"ZodUnion")}_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let i of a)if(i.result.status==="valid")return i.result;for(let i of a)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;let o=a.map(i=>new S(i.ctx.common.issues));return u(t,{code:d.invalid_union,unionErrors:o}),m}if(c(n,"handleResults"),t.common.async)return Promise.all(s.map(async a=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let a,o=[];for(let l of s){let f={...t,common:{...t.common,issues:[]},parent:null},_=l._parseSync({data:t.data,path:t.path,parent:f});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(l=>new S(l));return u(t,{code:d.invalid_union,unionErrors:i}),m}}get options(){return this._def.options}};se.create=(r,e)=>new se({options:r,typeName:y.ZodUnion,...g(e)});var D=c(r=>r instanceof ae?D(r.schema):r instanceof E?D(r.innerType()):r instanceof ie?[r.value]:r instanceof oe?r.options:r instanceof ce?x.objectValues(r.enum):r instanceof de?D(r._def.innerType):r instanceof te?[void 0]:r instanceof re?[null]:r instanceof N?[void 0,...D(r.unwrap())]:r instanceof $?[null,...D(r.unwrap())]:r instanceof Ae||r instanceof le?D(r.unwrap()):r instanceof ue?D(r._def.innerType):[],"getDiscriminator"),Me=class r extends v{static{c(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return u(t,{code:d.invalid_type,expected:h.object,received:t.parsedType}),m;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(u(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let o=D(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of o){if(n.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,a)}}return new r({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...g(s)})}};function Ue(r,e){let t=P(r),s=P(e);if(r===e)return{valid:!0,data:r};if(t===h.object&&s===h.object){let n=x.objectKeys(e),a=x.objectKeys(r).filter(i=>n.indexOf(i)!==-1),o={...r,...e};for(let i of a){let l=Ue(r[i],e[i]);if(!l.valid)return{valid:!1};o[i]=l.data}return{valid:!0,data:o}}else if(t===h.array&&s===h.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let o=r[a],i=e[a],l=Ue(o,i);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===h.date&&s===h.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}c(Ue,"mergeValues");var ne=class extends v{static{c(this,"ZodIntersection")}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=c((a,o)=>{if(je(a)||je(o))return m;let i=Ue(a.value,o.value);return i.valid?((Ee(a)||Ee(o))&&t.dirty(),{status:t.value,value:i.data}):(u(s,{code:d.invalid_intersection_types}),m)},"handleParsed");return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,o])=>n(a,o)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};ne.create=(r,e,t)=>new ne({left:r,right:e,typeName:y.ZodIntersection,...g(t)});var Z=class r extends v{static{c(this,"ZodTuple")}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return u(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return u(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(u(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((o,i)=>{let l=this._def.items[i]||this._def.rest;return l?l._parse(new j(s,o,s.path,i)):null}).filter(o=>!!o);return s.common.async?Promise.all(a).then(o=>T.mergeArray(t,o)):T.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};Z.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:r,typeName:y.ZodTuple,rest:null,...g(e)})};var Pe=class r extends v{static{c(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return u(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),m;let n=[],a=this._def.keyType,o=this._def.valueType;for(let i in s.data)n.push({key:a._parse(new j(s,i,s.path,i)),value:o._parse(new j(s,s.data[i],s.path,i)),alwaysSet:i in s.data});return s.common.async?T.mergeObjectAsync(t,n):T.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof v?new r({keyType:e,valueType:t,typeName:y.ZodRecord,...g(s)}):new r({keyType:U.create(),valueType:e,typeName:y.ZodRecord,...g(t)})}},_e=class extends v{static{c(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return u(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),m;let n=this._def.keyType,a=this._def.valueType,o=[...s.data.entries()].map(([i,l],f)=>({key:n._parse(new j(s,i,s.path,[f,"key"])),value:a._parse(new j(s,l,s.path,[f,"value"]))}));if(s.common.async){let i=new Map;return Promise.resolve().then(async()=>{for(let l of o){let f=await l.key,_=await l.value;if(f.status==="aborted"||_.status==="aborted")return m;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(f.value,_.value)}return{status:t.value,value:i}})}else{let i=new Map;for(let l of o){let f=l.key,_=l.value;if(f.status==="aborted"||_.status==="aborted")return m;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(f.value,_.value)}return{status:t.value,value:i}}}};_e.create=(r,e,t)=>new _e({valueType:e,keyType:r,typeName:y.ZodMap,...g(t)});var ve=class r extends v{static{c(this,"ZodSet")}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return u(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),m;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(u(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(u(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function o(l){let f=new Set;for(let _ of l){if(_.status==="aborted")return m;_.status==="dirty"&&t.dirty(),f.add(_.value)}return{status:t.value,value:f}}c(o,"finalizeSet");let i=[...s.data.values()].map((l,f)=>a._parse(new j(s,l,s.path,f)));return s.common.async?Promise.all(i).then(l=>o(l)):o(i)}min(e,t){return new r({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};ve.create=(r,e)=>new ve({valueType:r,minSize:null,maxSize:null,typeName:y.ZodSet,...g(e)});var Ze=class r extends v{static{c(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return u(t,{code:d.invalid_type,expected:h.function,received:t.parsedType}),m;function s(i,l){return Se({data:i,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,he(),V].filter(f=>!!f),issueData:{code:d.invalid_arguments,argumentsError:l}})}c(s,"makeArgsIssue");function n(i,l){return Se({data:i,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,he(),V].filter(f=>!!f),issueData:{code:d.invalid_return_type,returnTypeError:l}})}c(n,"makeReturnsIssue");let a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof q){let i=this;return R(async function(...l){let f=new S([]),_=await i._def.args.parseAsync(l,a).catch(ke=>{throw f.addIssue(s(l,ke)),f}),C=await Reflect.apply(o,this,_);return await i._def.returns._def.type.parseAsync(C,a).catch(ke=>{throw f.addIssue(n(C,ke)),f})})}else{let i=this;return R(function(...l){let f=i._def.args.safeParse(l,a);if(!f.success)throw new S([s(l,f.error)]);let _=Reflect.apply(o,this,f.data),C=i._def.returns.safeParse(_,a);if(!C.success)throw new S([n(_,C.error)]);return C.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:Z.create(e).rest(z.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||Z.create([]).rest(z.create()),returns:t||z.create(),typeName:y.ZodFunction,...g(s)})}},ae=class extends v{static{c(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ae.create=(r,e)=>new ae({getter:r,typeName:y.ZodLazy,...g(e)});var ie=class extends v{static{c(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};ie.create=(r,e)=>new ie({value:r,typeName:y.ZodLiteral,...g(e)});function it(r,e){return new oe({values:r,typeName:y.ZodEnum,...g(e)})}c(it,"createZodEnum");var oe=class r extends v{static{c(this,"ZodEnum")}_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{expected:x.joinValues(s),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{received:t.data,code:d.invalid_enum_value,options:s}),m}return R(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};oe.create=it;var ce=class extends v{static{c(this,"ZodNativeEnum")}_parse(e){let t=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){let n=x.objectValues(t);return u(s,{expected:x.joinValues(n),received:s.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.objectValues(t);return u(s,{received:s.data,code:d.invalid_enum_value,options:n}),m}return R(e.data)}get enum(){return this._def.values}};ce.create=(r,e)=>new ce({values:r,typeName:y.ZodNativeEnum,...g(e)});var q=class extends v{static{c(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.promise&&t.common.async===!1)return u(t,{code:d.invalid_type,expected:h.promise,received:t.parsedType}),m;let s=t.parsedType===h.promise?t.data:Promise.resolve(t.data);return R(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};q.create=(r,e)=>new q({type:r,typeName:y.ZodPromise,...g(e)});var E=class extends v{static{c(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:c(o=>{u(s,o),o.fatal?t.abort():t.dirty()},"addIssue"),get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let o=n.transform(s.data,a);if(s.common.async)return Promise.resolve(o).then(async i=>{if(t.value==="aborted")return m;let l=await this._def.schema._parseAsync({data:i,path:s.path,parent:s});return l.status==="aborted"?m:l.status==="dirty"?Q(l.value):t.value==="dirty"?Q(l.value):l});{if(t.value==="aborted")return m;let i=this._def.schema._parseSync({data:o,path:s.path,parent:s});return i.status==="aborted"?m:i.status==="dirty"?Q(i.value):t.value==="dirty"?Q(i.value):i}}if(n.type==="refinement"){let o=c(i=>{let l=n.refinement(i,a);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i},"executeRefinement");if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?m:(i.status==="dirty"&&t.dirty(),o(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>i.status==="aborted"?m:(i.status==="dirty"&&t.dirty(),o(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!F(o))return m;let i=n.transform(o.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>F(o)?Promise.resolve(n.transform(o.value,a)).then(i=>({status:t.value,value:i})):m);x.assertNever(n)}};E.create=(r,e,t)=>new E({schema:r,typeName:y.ZodEffects,effect:e,...g(t)});E.createWithPreprocess=(r,e,t)=>new E({schema:e,effect:{type:"preprocess",transform:r},typeName:y.ZodEffects,...g(t)});var N=class extends v{static{c(this,"ZodOptional")}_parse(e){return this._getType(e)===h.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};N.create=(r,e)=>new N({innerType:r,typeName:y.ZodOptional,...g(e)});var $=class extends v{static{c(this,"ZodNullable")}_parse(e){return this._getType(e)===h.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$.create=(r,e)=>new $({innerType:r,typeName:y.ZodNullable,...g(e)});var de=class extends v{static{c(this,"ZodDefault")}_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};de.create=(r,e)=>new de({innerType:r,typeName:y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});var ue=class extends v{static{c(this,"ZodCatch")}_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return pe(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};ue.create=(r,e)=>new ue({innerType:r,typeName:y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});var xe=class extends v{static{c(this,"ZodNaN")}_parse(e){if(this._getType(e)!==h.nan){let s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}};xe.create=r=>new xe({typeName:y.ZodNaN,...g(r)});var Ut=Symbol("zod_brand"),Ae=class extends v{static{c(this,"ZodBranded")}_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},Oe=class r extends v{static{c(this,"ZodPipeline")}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return c(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),Q(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})},"handleAsync")();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:y.ZodPipeline})}},le=class extends v{static{c(this,"ZodReadonly")}_parse(e){let t=this._def.innerType._parse(e),s=c(n=>(F(n)&&(n.value=Object.freeze(n.value)),n),"freeze");return pe(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}};le.create=(r,e)=>new le({innerType:r,typeName:y.ZodReadonly,...g(e)});function rt(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}c(rt,"cleanParams");function ot(r,e={},t){return r?W.create().superRefine((s,n)=>{let a=r(s);if(a instanceof Promise)return a.then(o=>{if(!o){let i=rt(e,s),l=i.fatal??t??!0;n.addIssue({code:"custom",...i,fatal:l})}});if(!a){let o=rt(e,s),i=o.fatal??t??!0;n.addIssue({code:"custom",...o,fatal:i})}}):W.create()}c(ot,"custom");var Wt={object:A.lazycreate},y;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(y||(y={}));var qt=c((r,e={message:`Input not instance of ${r.name}`})=>ot(t=>t instanceof r,e),"instanceOfType"),ct=U.create,dt=K.create,Yt=xe.create,Xt=G.create,ut=H.create,Jt=ee.create,Qt=ye.create,Kt=te.create,Gt=re.create,Ht=W.create,er=z.create,tr=M.create,rr=ge.create,sr=B.create,nr=A.create,ar=A.strictCreate,ir=se.create,or=Me.create,cr=ne.create,dr=Z.create,ur=Pe.create,lr=_e.create,fr=ve.create,hr=Ze.create,pr=ae.create,mr=ie.create,yr=oe.create,gr=ce.create,_r=q.create,vr=E.create,xr=N.create,br=$.create,kr=E.createWithPreprocess,wr=Oe.create,Tr=c(()=>ct().optional(),"ostring"),Rr=c(()=>dt().optional(),"onumber"),Cr=c(()=>ut().optional(),"oboolean"),Sr={string:c(r=>U.create({...r,coerce:!0}),"string"),number:c(r=>K.create({...r,coerce:!0}),"number"),boolean:c(r=>H.create({...r,coerce:!0}),"boolean"),bigint:c(r=>G.create({...r,coerce:!0}),"bigint"),date:c(r=>ee.create({...r,coerce:!0}),"date")};var Ar=m;var an=be.union([be.enum(["low","medium","high","always-visible"]),be.number()]);var $e=5;var Y=200,Le=10;function lt(r,e,t,s,n,a,o="-1"){let i=1/0,l=1/0,f=-1/0,_=-1/0,C=new w(-Le,0,5,t),Ie=new w(-Le,0,e,5),ke=new w(e-5,0,e+Le,t),ht=new w(0,t-5,e,t+Le),pt=Or(e,t,s,n,a),mt=[C,Ie,ke,ht],We=new w(-Y,-Y,e+Y*2,t+Y*2);for(let k of r){let Te,Re;for(let O=0;O<k.bboxes.length;O++){if(k.bboxes[O]==null||(Te=k.bboxes[O].boundingBox,Re=k.bboxes[O].index,k.lockedToStrategyIndex!==-1&&Re!==k.lockedToStrategyIndex))continue;let[Ne,I,X,qe]=Te,[J,yt,Ye,gt]=[k.y-Ne,k.y+I,k.x-X,k.x+qe],De=Ye,ze=J,Xe=gt-Ye,Je=yt-J;i=Math.min(i,De)-Y,l=Math.min(l,ze)-Y,f=Math.max(f,De+Xe)+Y,_=Math.max(_,ze+Je)+Y,k.bboxes[O].boundingRect=new w(De,ze,Xe,Je)}}let fe={msgId:o,colliders:new Array(r.length),debug:[]},Ve=new Ce(new w(i,l,f-i,_-l)),we;for(let k=0;k<r.length;k++)if(we=r[k],fe.colliders[k]=[-1,0],we.enabledAndVisible){let[Te,Re,O]=[1/0,-1,void 0];for(let{index:Ne,boundingRect:I}of we.bboxes){if(I==null)continue;let X=[];if(X=Ve.queryRect(I).filter(J=>I.intersects(J)),we.shouldCollideWithScreenEdges&&mt.forEach(J=>{I.intersects(J)&&X.push(J)}),I.intersects(pt)){fe.colliders[k]=[-1,0,I];break}if(X.length<=Te&&(O=I,Re=Ne,Te=X.length),X.length===0){Ve.insert(I),fe.colliders[k]=[Ne,We.contains(I)?0:1,I];break}}we.rank===$e&&O!=null&&(Ve.insert(O),fe.colliders[k]=[Re,We.contains(O)?0:1,O])}else fe.colliders[k]=[-1,0];return fe}c(lt,"processColliders");function Or(r,e,t,s,n){switch(n){case"top-right":return new w(r-t,0,t,s);case"bottom-left":return new w(0,e-s,t,s);case"bottom-right":return new w(r-t,e-s,t,s);case"top-left":return new w(0,0,t,s)}}c(Or,"getWatermarkBoundary");function ft(r){let e=r[0].map(t=>{let s=t[0].map(n=>({index:n[4],boundingBox:[n[0],n[1],n[2],n[3]]}));return{enabledAndVisible:t[1]===1,rank:t[2]===1?$e:0,x:t[3],y:t[4],shouldCollideWithScreenEdges:t[5]===1,bboxes:s,lockedToStrategyIndex:t[6]}});return{msgId:"-1",totalWidth:r[3],totalHeight:r[2],watermarkWidth:r[4],watermarkHeight:r[5],watermarkPosition:r[6],colliders:e,devicePixelRatio:r[1]}}c(ft,"unpackMessage");self.onmessage=r=>{let e=ft(r.data);self.postMessage(lt(e.colliders,e.totalWidth,e.totalHeight,e.watermarkWidth,e.watermarkHeight,e.watermarkPosition,e.msgId))};})();
|