@mappedin/mappedin-js 6.0.0-alpha.8 → 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.
Files changed (69) hide show
  1. package/LICENSE.txt +104 -0
  2. package/README.md +137 -157
  3. package/THIRD_PARTY_LICENSES.txt +14468 -0
  4. package/lib/esm/GLTFExporter-OD4NIP5J.js +2 -0
  5. package/lib/esm/GLTFExporter-OD4NIP5J.js.map +7 -0
  6. package/lib/esm/GLTFLoader-2KHURE2O.js +2 -0
  7. package/lib/esm/GLTFLoader-2KHURE2O.js.map +7 -0
  8. package/lib/esm/browser-MJVP6R3A.js +2 -0
  9. package/lib/esm/browser-MJVP6R3A.js.map +7 -0
  10. package/lib/esm/chunk-2RJ5UTHX.js +3 -0
  11. package/lib/esm/chunk-2RJ5UTHX.js.map +7 -0
  12. package/lib/esm/chunk-J66EV4D7.js +2 -0
  13. package/lib/esm/chunk-J66EV4D7.js.map +7 -0
  14. package/lib/esm/chunk-LLHXGTB2.js +2 -0
  15. package/lib/esm/chunk-LLHXGTB2.js.map +7 -0
  16. package/lib/esm/chunk-R6ACEBVD.js +747 -0
  17. package/lib/esm/chunk-R6ACEBVD.js.map +7 -0
  18. package/lib/esm/chunk-ROCNZJLL.js +2 -0
  19. package/lib/esm/chunk-ROCNZJLL.js.map +7 -0
  20. package/lib/esm/chunk-SWYBY4H7.js +2269 -0
  21. package/lib/esm/chunk-SWYBY4H7.js.map +7 -0
  22. package/lib/esm/chunk-TJG5BXTK.js +3820 -0
  23. package/lib/esm/chunk-TJG5BXTK.js.map +7 -0
  24. package/lib/esm/fonts/roboto-regular.ttf +0 -0
  25. package/lib/esm/index.css +2 -0
  26. package/lib/esm/index.css.map +7 -0
  27. package/lib/esm/index.d.ts +38908 -0
  28. package/lib/esm/index.js +2 -0
  29. package/lib/esm/index.js.map +7 -0
  30. package/lib/esm/inspector-KMBZXTF5.js +483 -0
  31. package/lib/esm/inspector-KMBZXTF5.js.map +7 -0
  32. package/lib/esm/inspector-T3HA7VGW.css +2 -0
  33. package/lib/esm/inspector-T3HA7VGW.css.map +7 -0
  34. package/lib/esm/internal-LZTQU5W2.js +2 -0
  35. package/lib/esm/internal-LZTQU5W2.js.map +7 -0
  36. package/lib/esm/internal-VKD5KMH3.css +2 -0
  37. package/lib/esm/internal-VKD5KMH3.css.map +7 -0
  38. package/lib/esm/outdoor-context-v5-DPTEYL6O.js +2 -0
  39. package/lib/esm/outdoor-context-v5-DPTEYL6O.js.map +7 -0
  40. package/lib/esm/roboto-regular-R5KXKW73.js +2 -0
  41. package/lib/esm/roboto-regular-R5KXKW73.js.map +7 -0
  42. package/lib/esm/text3d-AEQ2USTW.js +253 -0
  43. package/lib/esm/text3d-AEQ2USTW.js.map +7 -0
  44. package/lib/esm/workers/collision-worker.csp.js +1 -0
  45. package/lib/esm/workers/maplibre-worker.csp.js +2 -0
  46. package/lib/index-rn.js +4288 -0
  47. package/lib/index.css +2 -0
  48. package/package.json +34 -64
  49. package/lib/esm/get-venue/index.d.ts +0 -2466
  50. package/lib/esm/get-venue/index.js +0 -1
  51. package/lib/esm/navigator/index.d.ts +0 -243
  52. package/lib/esm/navigator/index.js +0 -1
  53. package/lib/esm/renderer/Arrival-HFFQMV6K.js +0 -1
  54. package/lib/esm/renderer/Chalet-4T7G2EOB.js +0 -1
  55. package/lib/esm/renderer/HelveticaNeue-SYBCLCMV.js +0 -1
  56. package/lib/esm/renderer/Helvetiker-YQQ7YLDG.js +0 -1
  57. package/lib/esm/renderer/Lato-VOB7DTFK.js +0 -1
  58. package/lib/esm/renderer/MyriadPro-3UT6I6O6.js +0 -1
  59. package/lib/esm/renderer/ProximaNova-JID4Q6QR.js +0 -1
  60. package/lib/esm/renderer/SimonCircular-EOKJ3PHU.js +0 -1
  61. package/lib/esm/renderer/browser-IFEP2NKH.js +0 -1
  62. package/lib/esm/renderer/chunk-6MFNIXKK.js +0 -1
  63. package/lib/esm/renderer/chunk-K7MHFVG3.js +0 -1
  64. package/lib/esm/renderer/index.css +0 -1
  65. package/lib/esm/renderer/index.d.ts +0 -5261
  66. package/lib/esm/renderer/index.js +0 -1
  67. package/lib/mappedin.css +0 -1
  68. package/lib/mappedin.js +0 -1
  69. package/lib/node/index.js +0 -1
@@ -0,0 +1,3 @@
1
+ import{i as _t,j as Vt}from"./chunk-R6ACEBVD.js";import{$ as vt,I as Be,Q as D,R as xt,T as bt,V as ee,W as Oe,Y as Lt,aa as jt,db as nt,qa as Rt}from"./chunk-TJG5BXTK.js";import{a as l,b as x}from"./chunk-LLHXGTB2.js";import{c as _r,e as u,f as k,g as R,h as S}from"./chunk-ROCNZJLL.js";l();var st="[MappedinJS]",Tr=(s=>(s[s.LOG=0]="LOG",s[s.WARN=1]="WARN",s[s.ERROR=2]="ERROR",s[s.SILENT=3]="SILENT",s))(Tr||{});function wr(r="",{prefix:e=st}={}){let t=`${e}${r?`-${r}`:""}`,n=(s,i)=>{if(typeof window<"u"&&window.rnDebug){let a=i.map(o=>o instanceof Error&&o.stack?`${o.message}
2
+ ${o.stack}`:o);window.rnDebug(`${r} ${s}: ${a.join(" ")}`)}};return{logState:x.env.NODE_ENV==="test"?3:0,log(...s){this.logState<=0&&(console.log(t,...s),n("log",s))},warn(...s){this.logState<=1&&(console.warn(t,...s),n("warn",s))},error(...s){this.logState<=2&&(console.error(t,...s),n("error",s))},assert(...s){console.assert(...s)},time(s){console.time(s)},timeEnd(s){console.timeEnd(s)},setLevel(s){0<=s&&s<=3&&(this.logState=s)}}}var Ft=wr();function gs(r){0<=r&&r<=3&&(Ft.logState=r)}var de=Ft;l();l();var fe=class extends Error{};fe.prototype.name="InvalidTokenError";function kr(r){return decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Er(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return kr(e)}catch{return atob(e)}}function Gt(r,e){if(typeof r!="string")throw new fe("Invalid token specified: must be a string");e||(e={});let t=e.header===!0?0:1,n=r.split(".")[t];if(typeof n!="string")throw new fe(`Invalid token specified: missing part #${t+1}`);let s;try{s=Er(n)}catch(i){throw new fe(`Invalid token specified: invalid base64 for part #${t+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new fe(`Invalid token specified: invalid json for part #${t+1} (${i.message})`)}}l();var pe=63710088e-1;function Ds(r){let e=Gt(r);if(e.sub==null)throw new Error("Access token is missing sub claim.");return{sub:e.sub,aud:typeof e.aud=="string"?[e.aud]:e.aud??[],capabilities:e.capabilities??{}}}function te(r){return r*(Math.PI/180)}function Sr(r){return r*(180/Math.PI)}function Cs(r,e){let t=Math.pow(10,e);return Math.sign(r)*Math.round(Math.abs(r)*t)/t}function $t(r,e){return(r%e+e)%e}function Is([r,e],[t,n]){let s=te(n-e),i=te(t-r),a=te(e),o=te(n),c=Math.sin(s/2)*Math.sin(s/2)+Math.sin(i/2)*Math.sin(i/2)*Math.cos(a)*Math.cos(o),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return pe*d}function Ps([r,e],[t,n]){let s=te(e),i=te(r),a=te(n),c=te(t)-i,d=Math.sin(c)*Math.cos(a),y=Math.cos(s)*Math.sin(a)-Math.sin(s)*Math.cos(a)*Math.cos(c);return Sr((Math.atan2(d,y)+Math.PI*2)%(Math.PI*2))}function Os(r,e){let t=$t(r,Math.PI*2),n=$t(e,Math.PI*2),s=n-t,i=n+(s>Math.PI?-Math.PI*2:s<-Math.PI?Math.PI*2:0);return{start:t,end:i}}function Mr(r){return r instanceof nt?Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y):Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y)&&Number.isFinite(r.min.z)&&Number.isFinite(r.max.z)}function As(r,e,t,n){return(r<e||r>t)&&de.warn(n),Math.min(t,Math.max(e,r))}function Ns(r,e){if(r==null||e==null)return r===e;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function Ls(){return typeof window<"u"&&window!==null}l();function Vs(r,e,t=!1){let n=null,s=0;return function(...i){s++,s===1&&t===!0&&r(...i);let a=()=>{(!t||s>1)&&r(...i),n=null,s=0};clearTimeout(n),n=setTimeout(a,e)}}var We={};_r(We,{BRAND:()=>Qr,DIRTY:()=>me,EMPTY_PATH:()=>Pr,INVALID:()=>g,NEVER:()=>Vn,OK:()=>M,ParseStatus:()=>E,Schema:()=>_,ZodAny:()=>se,ZodArray:()=>Y,ZodBigInt:()=>ye,ZodBoolean:()=>ge,ZodBranded:()=>ze,ZodCatch:()=>De,ZodDate:()=>xe,ZodDefault:()=>Me,ZodDiscriminatedUnion:()=>ot,ZodEffects:()=>j,ZodEnum:()=>Ee,ZodError:()=>I,ZodFirstPartyTypeKind:()=>b,ZodFunction:()=>ut,ZodIntersection:()=>Te,ZodIssueCode:()=>f,ZodLazy:()=>we,ZodLiteral:()=>ke,ZodMap:()=>Ve,ZodNaN:()=>Ge,ZodNativeEnum:()=>Se,ZodNever:()=>V,ZodNull:()=>ve,ZodNullable:()=>K,ZodNumber:()=>he,ZodObject:()=>P,ZodOptional:()=>N,ZodParsedType:()=>m,ZodPipeline:()=>Ue,ZodPromise:()=>ie,ZodReadonly:()=>Ce,ZodRecord:()=>ct,ZodSchema:()=>_,ZodSet:()=>Fe,ZodString:()=>ne,ZodSymbol:()=>je,ZodTransformer:()=>j,ZodTuple:()=>W,ZodType:()=>_,ZodUndefined:()=>be,ZodUnion:()=>_e,ZodUnknown:()=>J,ZodVoid:()=>Re,addIssueToContext:()=>p,any:()=>un,array:()=>pn,bigint:()=>nn,boolean:()=>Xt,coerce:()=>Rn,custom:()=>Ht,date:()=>sn,datetimeRegex:()=>Kt,defaultErrorMap:()=>q,discriminatedUnion:()=>gn,effect:()=>Cn,enum:()=>Sn,function:()=>wn,getErrorMap:()=>Ae,getParsedType:()=>U,instanceof:()=>tn,intersection:()=>xn,isAborted:()=>it,isAsync:()=>Ne,isDirty:()=>at,isValid:()=>re,late:()=>en,lazy:()=>kn,literal:()=>En,makeIssue:()=>Ze,map:()=>_n,nan:()=>rn,nativeEnum:()=>Mn,never:()=>dn,null:()=>cn,nullable:()=>Pn,number:()=>Yt,object:()=>mn,objectUtil:()=>Tt,oboolean:()=>jn,onumber:()=>Ln,optional:()=>In,ostring:()=>Nn,pipeline:()=>An,preprocess:()=>On,promise:()=>Dn,quotelessJson:()=>Dr,record:()=>vn,set:()=>Tn,setErrorMap:()=>Ir,strictObject:()=>hn,string:()=>Jt,symbol:()=>an,transformer:()=>Cn,tuple:()=>bn,undefined:()=>on,union:()=>yn,unknown:()=>ln,util:()=>T,void:()=>fn});l();l();l();l();l();var T;(function(r){r.assertEqual=s=>{};function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{let i={};for(let a of s)i[a]=a;return i},r.getValidEnumValues=s=>{let i=r.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),a={};for(let o of i)a[o]=s[o];return r.objectValues(a)},r.objectValues=s=>r.objectKeys(s).map(function(i){return s[i]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},r.find=(s,i)=>{for(let a of s)if(i(a))return a},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}r.joinValues=n,r.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(T||(T={}));var Tt;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Tt||(Tt={}));var m=T.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),U=r=>{switch(typeof r){case"undefined":return m.undefined;case"string":return m.string;case"number":return Number.isNaN(r)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":return Array.isArray(r)?m.array:r===null?m.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?m.promise:typeof Map<"u"&&r instanceof Map?m.map:typeof Set<"u"&&r instanceof Set?m.set:typeof Date<"u"&&r instanceof Date?m.date:m.object;default:return m.unknown}};var f=T.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"]),Dr=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),I=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};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(i){return i.message},n={_errors:[]},s=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let o=n,c=0;for(;c<a.path.length;){let d=a.path[c];c===a.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(a))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return s(this),n}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,T.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},n=[];for(let s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};I.create=r=>new I(r);var Cr=(r,e)=>{let t;switch(r.code){case f.invalid_type:r.received===m.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case f.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,T.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:t=`Unrecognized key(s) in object: ${T.joinValues(r.keys,", ")}`;break;case f.invalid_union:t="Invalid input";break;case f.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${T.joinValues(r.options)}`;break;case f.invalid_enum_value:t=`Invalid enum value. Expected ${T.joinValues(r.options)}, received '${r.received}'`;break;case f.invalid_arguments:t="Invalid function arguments";break;case f.invalid_return_type:t="Invalid function return type";break;case f.invalid_date:t="Invalid date";break;case f.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}"`:T.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case f.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 f.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 f.custom:t="Invalid input";break;case f.invalid_intersection_types:t="Intersection results could not be merged";break;case f.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case f.not_finite:t="Number must be finite";break;default:t=e.defaultError,T.assertNever(r)}return{message:t}},q=Cr;var Bt=q;function Ir(r){Bt=r}function Ae(){return Bt}l();var Ze=r=>{let{data:e,path:t,errorMaps:n,issueData:s}=r,i=[...t,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let o="",c=n.filter(d=>!!d).slice().reverse();for(let d of c)o=d(a,{data:e,defaultError:o}).message;return{...s,path:i,message:o}},Pr=[];function p(r,e){let t=Ae(),n=Ze({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===q?void 0:q].filter(s=>!!s)});r.common.issues.push(n)}var E=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let s of t){if(s.status==="aborted")return g;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let s of t){let i=await s.key,a=await s.value;n.push({key:i,value:a})}return r.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let s of t){let{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return g;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[i.value]=a.value)}return{status:e.value,value:n}}},g=Object.freeze({status:"aborted"}),me=r=>({status:"dirty",value:r}),M=r=>({status:"valid",value:r}),it=r=>r.status==="aborted",at=r=>r.status==="dirty",re=r=>r.status==="valid",Ne=r=>typeof Promise<"u"&&r instanceof Promise;l();l();l();var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var L=class{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}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}},Zt=(r,e)=>{if(re(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 I(r.common.issues);return this._error=t,this._error}}};function v(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,o)=>{let{message:c}=r;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??n??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:c??t??o.defaultError}},description:s}}var _=class{get description(){return this._def.description}_getType(e){return U(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new E,ctx:{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ne(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 n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Zt(n,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:t});return re(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>re(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Ne(s)?s:Promise.resolve(s));return Zt(n,i)}refine(e,t){let n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,i)=>{let a=e(s),o=()=>i.addIssue({code:f.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new j({schema:this,typeName:b.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:t=>this["~validate"](t)}}optional(){return N.create(this,this._def)}nullable(){return K.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Y.create(this)}promise(){return ie.create(this,this._def)}or(e){return _e.create([this,e],this._def)}and(e){return Te.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:b.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Me({...v(this._def),innerType:this,defaultValue:t,typeName:b.ZodDefault})}brand(){return new ze({typeName:b.ZodBranded,type:this,...v(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new De({...v(this._def),innerType:this,catchValue:t,typeName:b.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ue.create(this,e)}readonly(){return Ce.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Or=/^c[^\s-]{8,}$/i,Ar=/^[0-9a-z]+$/,Nr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Lr=/^[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,jr=/^[a-z0-9_-]{21}$/i,Rr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Vr=/^[-+]?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)?)??$/,Fr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wt,$r=/^(?:(?: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])$/,Br=/^(?:(?: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])$/,Zr=/^(([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]))$/,zr=/^(([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])$/,Ur=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ut="((\\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])))",Kr=new RegExp(`^${Ut}$`);function Wt(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}`}function qr(r){return new RegExp(`^${Wt(r)}$`)}function Kt(r){let e=`${Ut}T${Wt(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Hr(r,e){return!!((e==="v4"||!e)&&$r.test(r)||(e==="v6"||!e)&&Zr.test(r))}function Jr(r,e){if(!Rr.test(r))return!1;try{let[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Yr(r,e){return!!((e==="v4"||!e)&&Br.test(r)||(e==="v6"||!e)&&zr.test(r))}var ne=class r extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==m.string){let i=this._getOrReturnCtx(e);return p(i,{code:f.invalid_type,expected:m.string,received:i.parsedType}),g}let n=new E,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:f.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:f.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(s=this._getOrReturnCtx(e,s),a?p(s,{code:f.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&p(s,{code:f.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Fr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")wt||(wt=new RegExp(Gr,"u")),wt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Lr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")jr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"nanoid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Or.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Ar.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Nr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:f.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:f.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Kt(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Kr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?qr(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:f.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Vr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"duration",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Hr(e.data,i.version)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?Jr(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"jwt",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Yr(e.data,i.version)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cidr",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Ur.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"base64",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?Wr.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"base64url",code:f.invalid_string,message:i.message}),n.dirty()):T.assertNever(i);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:f.invalid_string,...h.errToObj(n)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.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,...h.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,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.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}};ne.create=r=>new ne({checks:[],typeName:b.ZodString,coerce:r?.coerce??!1,...v(r)});function Xr(r,e){let t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,i=Number.parseInt(r.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}var he=class r extends _{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)!==m.number){let i=this._getOrReturnCtx(e);return p(i,{code:f.invalid_type,expected:m.number,received:i.parsedType}),g}let n,s=new E;for(let i of this._def.checks)i.kind==="int"?T.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:f.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Xr(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:f.not_finite,message:i.message}),s.dirty()):T.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.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"&&T.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}};he.create=r=>new he({checks:[],typeName:b.ZodNumber,coerce:r?.coerce||!1,...v(r)});var ye=class r extends _{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)!==m.bigint)return this._getInvalidInput(e);let n,s=new E;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),p(n,{code:f.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):T.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return p(t,{code:f.invalid_type,expected:m.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_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:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.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}};ye.create=r=>new ye({checks:[],typeName:b.ZodBigInt,coerce:r?.coerce??!1,...v(r)});var ge=class extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==m.boolean){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.boolean,received:n.parsedType}),g}return M(e.data)}};ge.create=r=>new ge({typeName:b.ZodBoolean,coerce:r?.coerce||!1,...v(r)});var xe=class r extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==m.date){let i=this._getOrReturnCtx(e);return p(i,{code:f.invalid_type,expected:m.date,received:i.parsedType}),g}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return p(i,{code:f.invalid_date}),g}let n=new E,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:f.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:f.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):T.assertNever(i);return{status:n.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:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.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}};xe.create=r=>new xe({checks:[],coerce:r?.coerce||!1,typeName:b.ZodDate,...v(r)});var je=class extends _{_parse(e){if(this._getType(e)!==m.symbol){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.symbol,received:n.parsedType}),g}return M(e.data)}};je.create=r=>new je({typeName:b.ZodSymbol,...v(r)});var be=class extends _{_parse(e){if(this._getType(e)!==m.undefined){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.undefined,received:n.parsedType}),g}return M(e.data)}};be.create=r=>new be({typeName:b.ZodUndefined,...v(r)});var ve=class extends _{_parse(e){if(this._getType(e)!==m.null){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.null,received:n.parsedType}),g}return M(e.data)}};ve.create=r=>new ve({typeName:b.ZodNull,...v(r)});var se=class extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return M(e.data)}};se.create=r=>new se({typeName:b.ZodAny,...v(r)});var J=class extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return M(e.data)}};J.create=r=>new J({typeName:b.ZodUnknown,...v(r)});var V=class extends _{_parse(e){let t=this._getOrReturnCtx(e);return p(t,{code:f.invalid_type,expected:m.never,received:t.parsedType}),g}};V.create=r=>new V({typeName:b.ZodNever,...v(r)});var Re=class extends _{_parse(e){if(this._getType(e)!==m.undefined){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.void,received:n.parsedType}),g}return M(e.data)}};Re.create=r=>new Re({typeName:b.ZodVoid,...v(r)});var Y=class r extends _{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==m.array)return p(t,{code:f.invalid_type,expected:m.array,received:t.parsedType}),g;if(s.exactLength!==null){let a=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(a||o)&&(p(t,{code:a?f.too_big:f.too_small,minimum:o?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(p(t,{code:f.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(p(t,{code:f.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,o)=>s.type._parseAsync(new L(t,a,t.path,o)))).then(a=>E.mergeArray(n,a));let i=[...t.data].map((a,o)=>s.type._parseSync(new L(t,a,t.path,o)));return E.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};Y.create=(r,e)=>new Y({type:r,minLength:null,maxLength:null,exactLength:null,typeName:b.ZodArray,...v(e)});function Le(r){if(r instanceof P){let e={};for(let t in r.shape){let n=r.shape[t];e[t]=N.create(Le(n))}return new P({...r._def,shape:()=>e})}else return r instanceof Y?new Y({...r._def,type:Le(r.element)}):r instanceof N?N.create(Le(r.unwrap())):r instanceof K?K.create(Le(r.unwrap())):r instanceof W?W.create(r.items.map(e=>Le(e))):r}var P=class r extends _{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=T.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==m.object){let d=this._getOrReturnCtx(e);return p(d,{code:f.invalid_type,expected:m.object,received:d.parsedType}),g}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof V&&this._def.unknownKeys==="strip"))for(let d in s.data)a.includes(d)||o.push(d);let c=[];for(let d of a){let y=i[d],w=s.data[d];c.push({key:{status:"valid",value:d},value:y._parse(new L(s,w,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof V){let d=this._def.unknownKeys;if(d==="passthrough")for(let y of o)c.push({key:{status:"valid",value:y},value:{status:"valid",value:s.data[y]}});else if(d==="strict")o.length>0&&(p(s,{code:f.unrecognized_keys,keys:o}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let y of o){let w=s.data[y];c.push({key:{status:"valid",value:y},value:d._parse(new L(s,w,s.path,y)),alwaysSet:y in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let d=[];for(let y of c){let w=await y.key,A=await y.value;d.push({key:w,value:A,alwaysSet:y.alwaysSet})}return d}).then(d=>E.mergeObjectSync(n,d)):E.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{let s=this._def.errorMap?.(t,n).message??n.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:b.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let n of T.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let n of T.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new r({...this._def,shape:()=>t})}deepPartial(){return Le(this)}partial(e){let t={};for(let n of T.objectKeys(this.shape)){let s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let n of T.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof N;)i=i._def.innerType;t[n]=i}return new r({...this._def,shape:()=>t})}keyof(){return qt(T.objectKeys(this.shape))}};P.create=(r,e)=>new P({shape:()=>r,unknownKeys:"strip",catchall:V.create(),typeName:b.ZodObject,...v(e)});P.strictCreate=(r,e)=>new P({shape:()=>r,unknownKeys:"strict",catchall:V.create(),typeName:b.ZodObject,...v(e)});P.lazycreate=(r,e)=>new P({shape:r,unknownKeys:"strip",catchall:V.create(),typeName:b.ZodObject,...v(e)});var _e=class extends _{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function s(i){for(let o of i)if(o.result.status==="valid")return o.result;for(let o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(o=>new I(o.ctx.common.issues));return p(t,{code:f.invalid_union,unionErrors:a}),g}if(t.common.async)return Promise.all(n.map(async i=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(s);{let i,a=[];for(let c of n){let d={...t,common:{...t.common,issues:[]},parent:null},y=c._parseSync({data:t.data,path:t.path,parent:d});if(y.status==="valid")return y;y.status==="dirty"&&!i&&(i={result:y,ctx:d}),d.common.issues.length&&a.push(d.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let o=a.map(c=>new I(c));return p(t,{code:f.invalid_union,unionErrors:o}),g}}get options(){return this._def.options}};_e.create=(r,e)=>new _e({options:r,typeName:b.ZodUnion,...v(e)});var H=r=>r instanceof we?H(r.schema):r instanceof j?H(r.innerType()):r instanceof ke?[r.value]:r instanceof Ee?r.options:r instanceof Se?T.objectValues(r.enum):r instanceof Me?H(r._def.innerType):r instanceof be?[void 0]:r instanceof ve?[null]:r instanceof N?[void 0,...H(r.unwrap())]:r instanceof K?[null,...H(r.unwrap())]:r instanceof ze||r instanceof Ce?H(r.unwrap()):r instanceof De?H(r._def.innerType):[],ot=class r extends _{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.object)return p(t,{code:f.invalid_type,expected:m.object,received:t.parsedType}),g;let n=this.discriminator,s=t.data[n],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let s=new Map;for(let i of t){let a=H(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,i)}}return new r({typeName:b.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...v(n)})}};function kt(r,e){let t=U(r),n=U(e);if(r===e)return{valid:!0,data:r};if(t===m.object&&n===m.object){let s=T.objectKeys(e),i=T.objectKeys(r).filter(o=>s.indexOf(o)!==-1),a={...r,...e};for(let o of i){let c=kt(r[o],e[o]);if(!c.valid)return{valid:!1};a[o]=c.data}return{valid:!0,data:a}}else if(t===m.array&&n===m.array){if(r.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<r.length;i++){let a=r[i],o=e[i],c=kt(a,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return t===m.date&&n===m.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var Te=class extends _{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),s=(i,a)=>{if(it(i)||it(a))return g;let o=kt(i.value,a.value);return o.valid?((at(i)||at(a))&&t.dirty(),{status:t.value,value:o.data}):(p(n,{code:f.invalid_intersection_types}),g)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Te.create=(r,e,t)=>new Te({left:r,right:e,typeName:b.ZodIntersection,...v(t)});var W=class r extends _{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.array)return p(n,{code:f.invalid_type,expected:m.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return p(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&n.data.length>this._def.items.length&&(p(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...n.data].map((a,o)=>{let c=this._def.items[o]||this._def.rest;return c?c._parse(new L(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>E.mergeArray(t,a)):E.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};W.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new W({items:r,typeName:b.ZodTuple,rest:null,...v(e)})};var ct=class r extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.object)return p(n,{code:f.invalid_type,expected:m.object,received:n.parsedType}),g;let s=[],i=this._def.keyType,a=this._def.valueType;for(let o in n.data)s.push({key:i._parse(new L(n,o,n.path,o)),value:a._parse(new L(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?E.mergeObjectAsync(t,s):E.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof _?new r({keyType:e,valueType:t,typeName:b.ZodRecord,...v(n)}):new r({keyType:ne.create(),valueType:e,typeName:b.ZodRecord,...v(t)})}},Ve=class extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.map)return p(n,{code:f.invalid_type,expected:m.map,received:n.parsedType}),g;let s=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([o,c],d)=>({key:s._parse(new L(n,o,n.path,[d,"key"])),value:i._parse(new L(n,c,n.path,[d,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of a){let d=await c.key,y=await c.value;if(d.status==="aborted"||y.status==="aborted")return g;(d.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(d.value,y.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let c of a){let d=c.key,y=c.value;if(d.status==="aborted"||y.status==="aborted")return g;(d.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(d.value,y.value)}return{status:t.value,value:o}}}};Ve.create=(r,e,t)=>new Ve({valueType:e,keyType:r,typeName:b.ZodMap,...v(t)});var Fe=class r extends _{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.set)return p(n,{code:f.invalid_type,expected:m.set,received:n.parsedType}),g;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(p(n,{code:f.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(p(n,{code:f.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function a(c){let d=new Set;for(let y of c){if(y.status==="aborted")return g;y.status==="dirty"&&t.dirty(),d.add(y.value)}return{status:t.value,value:d}}let o=[...n.data.values()].map((c,d)=>i._parse(new L(n,c,n.path,d)));return n.common.async?Promise.all(o).then(c=>a(c)):a(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Fe.create=(r,e)=>new Fe({valueType:r,minSize:null,maxSize:null,typeName:b.ZodSet,...v(e)});var ut=class r extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.function)return p(t,{code:f.invalid_type,expected:m.function,received:t.parsedType}),g;function n(o,c){return Ze({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ae(),q].filter(d=>!!d),issueData:{code:f.invalid_arguments,argumentsError:c}})}function s(o,c){return Ze({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ae(),q].filter(d=>!!d),issueData:{code:f.invalid_return_type,returnTypeError:c}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ie){let o=this;return M(async function(...c){let d=new I([]),y=await o._def.args.parseAsync(c,i).catch(O=>{throw d.addIssue(n(c,O)),d}),w=await Reflect.apply(a,this,y);return await o._def.returns._def.type.parseAsync(w,i).catch(O=>{throw d.addIssue(s(w,O)),d})})}else{let o=this;return M(function(...c){let d=o._def.args.safeParse(c,i);if(!d.success)throw new I([n(c,d.error)]);let y=Reflect.apply(a,this,d.data),w=o._def.returns.safeParse(y,i);if(!w.success)throw new I([s(y,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:W.create(e).rest(J.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,n){return new r({args:e||W.create([]).rest(J.create()),returns:t||J.create(),typeName:b.ZodFunction,...v(n)})}},we=class extends _{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})}};we.create=(r,e)=>new we({getter:r,typeName:b.ZodLazy,...v(e)});var ke=class extends _{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}};ke.create=(r,e)=>new ke({value:r,typeName:b.ZodLiteral,...v(e)});function qt(r,e){return new Ee({values:r,typeName:b.ZodEnum,...v(e)})}var Ee=class r extends _{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{expected:T.joinValues(n),received:t.parsedType,code:f.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{received:t.data,code:f.invalid_enum_value,options:n}),g}return M(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(n=>!e.includes(n)),{...this._def,...t})}};Ee.create=qt;var Se=class extends _{_parse(e){let t=T.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==m.string&&n.parsedType!==m.number){let s=T.objectValues(t);return p(n,{expected:T.joinValues(s),received:n.parsedType,code:f.invalid_type}),g}if(this._cache||(this._cache=new Set(T.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=T.objectValues(t);return p(n,{received:n.data,code:f.invalid_enum_value,options:s}),g}return M(e.data)}get enum(){return this._def.values}};Se.create=(r,e)=>new Se({values:r,typeName:b.ZodNativeEnum,...v(e)});var ie=class extends _{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.promise&&t.common.async===!1)return p(t,{code:f.invalid_type,expected:m.promise,received:t.parsedType}),g;let n=t.parsedType===m.promise?t.data:Promise.resolve(t.data);return M(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ie.create=(r,e)=>new ie({type:r,typeName:b.ZodPromise,...v(e)});var j=class extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===b.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{p(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let a=s.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async o=>{if(t.value==="aborted")return g;let c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?g:c.status==="dirty"?me(c.value):t.value==="dirty"?me(c.value):c});{if(t.value==="aborted")return g;let o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?g:o.status==="dirty"?me(o.value):t.value==="dirty"?me(o.value):o}}if(s.type==="refinement"){let a=o=>{let c=s.refinement(o,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?g:(o.status==="dirty"&&t.dirty(),a(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?g:(o.status==="dirty"&&t.dirty(),a(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!re(a))return g;let o=s.transform(a.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>re(a)?Promise.resolve(s.transform(a.value,i)).then(o=>({status:t.value,value:o})):g);T.assertNever(s)}};j.create=(r,e,t)=>new j({schema:r,typeName:b.ZodEffects,effect:e,...v(t)});j.createWithPreprocess=(r,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:r},typeName:b.ZodEffects,...v(t)});var N=class extends _{_parse(e){return this._getType(e)===m.undefined?M(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};N.create=(r,e)=>new N({innerType:r,typeName:b.ZodOptional,...v(e)});var K=class extends _{_parse(e){return this._getType(e)===m.null?M(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};K.create=(r,e)=>new K({innerType:r,typeName:b.ZodNullable,...v(e)});var Me=class extends _{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===m.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Me.create=(r,e)=>new Me({innerType:r,typeName:b.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});var De=class extends _{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ne(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new I(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new I(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};De.create=(r,e)=>new De({innerType:r,typeName:b.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});var Ge=class extends _{_parse(e){if(this._getType(e)!==m.nan){let n=this._getOrReturnCtx(e);return p(n,{code:f.invalid_type,expected:m.nan,received:n.parsedType}),g}return{status:"valid",value:e.data}}};Ge.create=r=>new Ge({typeName:b.ZodNaN,...v(r)});var Qr=Symbol("zod_brand"),ze=class extends _{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Ue=class r extends _{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?g:i.status==="dirty"?(t.dirty(),me(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?g:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new r({in:e,out:t,typeName:b.ZodPipeline})}},Ce=class extends _{_parse(e){let t=this._def.innerType._parse(e),n=s=>(re(s)&&(s.value=Object.freeze(s.value)),s);return Ne(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}};Ce.create=(r,e)=>new Ce({innerType:r,typeName:b.ZodReadonly,...v(e)});function zt(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function Ht(r,e={},t){return r?se.create().superRefine((n,s)=>{let i=r(n);if(i instanceof Promise)return i.then(a=>{if(!a){let o=zt(e,n),c=o.fatal??t??!0;s.addIssue({code:"custom",...o,fatal:c})}});if(!i){let a=zt(e,n),o=a.fatal??t??!0;s.addIssue({code:"custom",...a,fatal:o})}}):se.create()}var en={object:P.lazycreate},b;(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"})(b||(b={}));var tn=(r,e={message:`Input not instance of ${r.name}`})=>Ht(t=>t instanceof r,e),Jt=ne.create,Yt=he.create,rn=Ge.create,nn=ye.create,Xt=ge.create,sn=xe.create,an=je.create,on=be.create,cn=ve.create,un=se.create,ln=J.create,dn=V.create,fn=Re.create,pn=Y.create,mn=P.create,hn=P.strictCreate,yn=_e.create,gn=ot.create,xn=Te.create,bn=W.create,vn=ct.create,_n=Ve.create,Tn=Fe.create,wn=ut.create,kn=we.create,En=ke.create,Sn=Ee.create,Mn=Se.create,Dn=ie.create,Cn=j.create,In=N.create,Pn=K.create,On=j.createWithPreprocess,An=Ue.create,Nn=()=>Jt().optional(),Ln=()=>Yt().optional(),jn=()=>Xt().optional(),Rn={string:r=>ne.create({...r,coerce:!0}),number:r=>he.create({...r,coerce:!0}),boolean:r=>ge.create({...r,coerce:!0}),bigint:r=>ye.create({...r,coerce:!0}),date:r=>xe.create({...r,coerce:!0})};var Vn=g;l();var Qt=We;l();var ki=Qt;l();l();function Fn(r,e){return`${e} ${r}`}var Ke=class extends Error{constructor(e,t=st){super(Fn(e,t)),this.name="MappedinError"}},er=class extends Ke{constructor(e,t=st){super(e,t),this.name="MappedinRenderError"}};l();var Et=class r extends Error{constructor(t){super(t);u(this,"name","AssertionError");Error.captureStackTrace&&Error.captureStackTrace(this,r)}};function tr(r,e){if(r==null){let t;e?.customMessage?t=e.customMessage:t=`Expected ${e?.valueName?`'${e.valueName}'`:"value"} to be defined, but received ${r}`;let n=e?.errorClass||Et,s=new n(t);throw e?.captureStackTrace!==!1&&Error.captureStackTrace&&Error.captureStackTrace(s,tr),s}}function Pi(r,e,t){if(tr(r),r?.type!==e){let n=`Expected type ${e} but got ${r?.type}`;throw new Error(t??n)}}l();var St=[0,4,6,8,10],F=()=>{let r=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<r.length;n++)n>0&&(n&3)===0&&(e=Math.random()*4294967296),r[n]=e>>>((n&3)<<3)&255;let t=r.map(n=>n.toString(16).padStart(2,"0"));return t[6]="4"+t[6][1],t[8]=["8","9","a","b"].includes(t[7][0])?t[7]:"a"+t[7][1],St.map((n,s)=>t.slice(n,s===St.length-1?void 0:St[s+1]).join("")).join("-")};function Li(r,e=0){let t=3735928559^e,n=1103547991^e;for(let s=0,i;s<r.length;s++)i=r.charCodeAt(s),t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}l();var Mt=class{constructor(){u(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(t)})}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||this._subscribers[e]==null)return;let n=this._subscribers[e].indexOf(t);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};l();var rr="mi-session-data",nr="mi-local-data",qe="id",He="deviceId",Ie,G,$,lt=class lt{constructor(){R(this,G);R(this,$);try{let e=sessionStorage.getItem(rr);e?S(this,G,JSON.parse(e)):S(this,G,{[qe]:F()})}catch{S(this,G,{[qe]:F()})}try{let e=localStorage.getItem(nr);e?S(this,$,JSON.parse(e)):S(this,$,{[He]:F()})}catch{S(this,$,{[He]:F()})}k(this,G)[qe]||(k(this,G)[qe]=F()),k(this,$)[He]||(k(this,$)[He]=F())}static getInstance(){return k(this,Ie)||S(this,Ie,new lt),k(this,Ie)}static ___clearInstance(){S(this,Ie,void 0)}saveSessionData(e,t){k(this,G)[e]=t;try{return sessionStorage.setItem(rr,JSON.stringify(k(this,G))),!0}catch{return!1}}loadSessionData(e){let t=k(this,G)[e];if(t!=null)return t}saveLocalData(e,t){k(this,$)[e]=t;try{return localStorage.setItem(nr,JSON.stringify(k(this,$))),!0}catch{return!1}}loadLocalData(e){let t=k(this,$)[e];if(t!=null)return t}};Ie=new WeakMap,G=new WeakMap,$=new WeakMap,R(lt,Ie);var Dt=lt;l();var Gn=new Set(Object.keys(Oe.NAMES)),Ct;function sr(){return Ct==null&&(Ct=new Oe),Ct}var $n=r=>Gn.has(r.toLowerCase()),Bn=r=>{if(!r.startsWith("#"))return!1;let e=r.slice(1);if(e.length!==3&&e.length!==6)return!1;for(let t=0;t<e.length;t++)if(!(e[t]>="0"&&e[t]<="9"||e[t]>="A"&&e[t]<="F"||e[t]>="a"&&e[t]<="f"))return!1;return!0},Zn=r=>{if(!r.startsWith("rgb(")&&!r.startsWith("rgba("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let s=0;s<n.length;s++){let i=n[s].trim();if(s<3)if(i.endsWith("%")){let a=parseFloat(i.slice(0,-1));if(isNaN(a)||a<0||a>100)return!1}else{let a=parseInt(i,10);if(isNaN(a)||a<0||a>255)return!1}else{let a=parseFloat(i);if(isNaN(a)||a<0||a>1)return!1}}return!0},zn=r=>{if(!r.startsWith("hsl(")&&!r.startsWith("hsla("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let s=0;s<n.length;s++){let i=n[s].trim();if(s===0){let a=parseFloat(i);if(isNaN(a))return!1}else if(s<3){if(!i.endsWith("%"))return!1;let a=parseFloat(i.slice(0,-1));if(isNaN(a)||a<0||a>100)return!1}else{let a=parseFloat(i);if(isNaN(a)||a<0||a>1)return!1}}return!0},dt=r=>r==null||typeof r!="string"?!1:!!(Bn(r)||Zn(r)||zn(r)||$n(r)),Wi=r=>{let e=sr();return e.set(r),[e.r,e.g,e.b]},Ki=r=>{let e=sr();return e.set(r[0],r[1],r[2]),"#"+e.getHexString()};l();var Xi=We.enum(["ease-in","ease-out","ease-in-out","linear"]),ir=r=>r,Un=r=>r*r,Wn=r=>1-Math.cos(r*Math.PI/2),Kn=r=>1-(1-r)*(1-r),ar={linear:ir,"ease-in":Un,"ease-out":Kn,"ease-in-out":Wn};function Qi(r,e,t,n,s,i=ir){if(e===t)return s;r=Math.max(e,Math.min(r,t));let a=(r-Math.min(e,t))/Math.abs(t-e),o=typeof i=="function"?i(a):ar[i](a);return n+o*(s-n)}function qn(r,e){let t=0;if(e.length<2)return t;let s=e[0]<e[1]?(i,a)=>i>a:(i,a)=>i<a;for(;t<e.length-1&&s(r,e[t+1]);)t++;return t>e.length-2?Math.max(0,e.length-2):t}function ea(r,e,t,n="ease-in"){if(e.length!==t.length)throw new Ke("Input and output ranges must have the same number of values.");r=Math.max(e[0],Math.min(r,e[e.length-1]));let s=qn(r,e),i=(r-e[s])/(e[s+1]-e[s]),a=typeof n=="function"?n(i):ar[n](i);return t[s]+a*(t[s+1]-t[s])}l();l();function Hn(r){return(r%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}l();l();l();l();l();l();l();l();var C=63710088e-1,cr={centimeters:C*100,centimetres:C*100,degrees:C/111325,feet:C*3.28084,inches:C*39.37,kilometers:C/1e3,kilometres:C/1e3,meters:C,metres:C,miles:C/1609.344,millimeters:C*1e3,millimetres:C*1e3,nauticalmiles:C/1852,radians:1,yards:C*1.0936},ba={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/C,yards:1.0936133};function X(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}function Jn(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!or(r[0])||!or(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return X(n,e,t)}function va(r,e,t){t===void 0&&(t={});for(var n=0,s=r;n<s.length;n++){var i=s[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:r};return X(o,e,t)}function ur(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return X(n,e,t)}function _a(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Ta(r,e,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:r};return X(n,e,t)}function wa(r,e,t){t===void 0&&(t={});var n={type:"MultiPoint",coordinates:r};return X(n,e,t)}function ka(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return X(n,e,t)}function Ea(r,e){e===void 0&&(e="kilometers");var t=cr[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Sa(r,e){e===void 0&&(e="kilometers");var t=cr[e];if(!t)throw new Error(e+" units is invalid");return r/t}function Ma(r){var e=r%(2*Math.PI);return e*180/Math.PI}function Da(r){var e=r%360;return e*Math.PI/180}function or(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Je(r,e,t){if(r!==null)for(var n,s,i,a,o,c,d,y=0,w=0,A,O=r.type,Z=O==="FeatureCollection",ce=O==="Feature",yt=Z?r.features.length:1,ue=0;ue<yt;ue++){d=Z?r.features[ue].geometry:ce?r.geometry:r,A=d?d.type==="GeometryCollection":!1,o=A?d.geometries.length:1;for(var gt=0;gt<o;gt++){var z=0,le=0;if(a=A?d.geometries[gt]:d,a!==null){c=a.coordinates;var Q=a.type;switch(y=t&&(Q==="Polygon"||Q==="MultiPolygon")?1:0,Q){case null:break;case"Point":if(e(c,w,ue,z,le)===!1)return!1;w++,z++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(e(c[n],w,ue,z,le)===!1)return!1;w++,Q==="MultiPoint"&&z++}Q==="LineString"&&z++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(s=0;s<c[n].length-y;s++){if(e(c[n][s],w,ue,z,le)===!1)return!1;w++}Q==="MultiLineString"&&z++,Q==="Polygon"&&le++}Q==="Polygon"&&z++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(le=0,s=0;s<c[n].length;s++){for(i=0;i<c[n][s].length-y;i++){if(e(c[n][s][i],w,ue,z,le)===!1)return!1;w++}le++}z++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Je(a.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Aa(r,e,t,n){var s=t;return Je(r,function(i,a,o,c,d){a===0&&t===void 0?s=i:s=e(s,i,a,o,c,d)},n),s}function Na(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Yn(r,e){var t,n,s,i,a,o,c,d,y,w,A=0,O=r.type==="FeatureCollection",Z=r.type==="Feature",ce=O?r.features.length:1;for(t=0;t<ce;t++){for(o=O?r.features[t].geometry:Z?r.geometry:r,d=O?r.features[t].properties:Z?r.properties:{},y=O?r.features[t].bbox:Z?r.bbox:void 0,w=O?r.features[t].id:Z?r.id:void 0,c=o?o.type==="GeometryCollection":!1,a=c?o.geometries.length:1,s=0;s<a;s++){if(i=c?o.geometries[s]:o,i===null){if(e(null,A,d,y,w)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(i,A,d,y,w)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(e(i.geometries[n],A,d,y,w)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}A++}}function Xn(r,e){Yn(r,function(t,n,s,i,a){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(X(t,s,{bbox:i,id:a}),n,0)===!1?!1:void 0}var c;switch(o){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var d=0;d<t.coordinates.length;d++){var y=t.coordinates[d],w={type:c,coordinates:y};if(e(X(w,s),n,d)===!1)return!1}})}function Qn(r,e){Xn(r,function(t,n,s){var i=0;if(t.geometry){var a=t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var o,c=0,d=0,y=0;if(Je(t,function(w,A,O,Z,ce){if(o===void 0||n>c||Z>d||ce>y){o=w,c=n,d=Z,y=ce,i=0;return}var yt=ur([o,w],t.properties);if(e(yt,n,s,ce,i)===!1)return!1;i++,o=w})===!1)return!1}}})}function La(r,e,t){var n=t,s=!1;return Qn(r,function(i,a,o,c,d){s===!1&&t===void 0?n=i:n=e(n,i,a,o,c,d),s=!0}),n}function It(r){var e=[1/0,1/0,-1/0,-1/0];return Je(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}It.default=It;var lr=It;function dr(r){return lr(r)}l();var Pt="#ffffff",es=.1,ft=.1,Ye,Xe,Qe,Ot=class{constructor(e={}){u(this,"initialColor",Pt);R(this,Ye,Pt);u(this,"initialTopColor");R(this,Xe);u(this,"topTexture");u(this,"texture");R(this,Qe);u(this,"dirty",!0);u(this,"visible",!0);u(this,"opacity",1);u(this,"width",es);u(this,"height",ft);u(this,"initialHeight",ft);u(this,"altitude",0);u(this,"join","round");u(this,"cap","round");u(this,"showImage",!0);u(this,"flipImageToFaceCamera",!0);u(this,"url");u(this,"side","double");u(this,"renderOrder",0);u(this,"shading");this.color=e?.color!==void 0?e.color:this.color,this.initialColor=this.color,this.width=e?.width!==void 0?e.width:this.width,this.opacity=e?.opacity!==void 0?e.opacity:this.opacity,this.visible=e?.visible!==void 0?e.visible:this.visible,this.height=e?.height!==void 0?e.height:this.height,this.initialHeight=this.height,this.altitude=e?.altitude!==void 0?e.altitude:this.altitude,this.join=e?.join!==void 0?e.join:this.join,this.cap=e?.cap!==void 0?e.cap:this.cap,this.topColor=e?.topColor,this.initialTopColor=this.topColor,this.texture=e?.texture,this.topTexture=e?.topTexture,this.showImage=e?.showImage!==void 0?e.showImage:this.showImage,this.flipImageToFaceCamera=e?.flipImageToFaceCamera!==void 0?e.flipImageToFaceCamera:this.flipImageToFaceCamera,this.url=e?.url,this.side=e?.side!==void 0?e.side:this.side,this.renderOrder=e?.renderOrder!==void 0?e.renderOrder:this.renderOrder,this.shading=e?.shading}set color(e){dt(e)?S(this,Ye,e):de.warn(`Failed to update color. Invalid color "${e}".`)}get color(){return k(this,Ye)}set topColor(e){e===void 0||dt(e)?S(this,Xe,e):de.warn(`Failed to update top color. Invalid color "${e}".`)}get topColor(){return k(this,Xe)}set hoverColor(e){dt(e)?S(this,Qe,e):de.warn(`Failed to update hover color. Invalid color "${e}".`)}get hoverColor(){return k(this,Qe)}};Ye=new WeakMap,Xe=new WeakMap,Qe=new WeakMap;var pt=class extends Rt{constructor(){super(...arguments);u(this,"type","entityBatchedMesh");u(this,"userData",{entities:{}})}},et,Pe,fr=class{constructor(e){u(this,"mesh");u(this,"imageMesh");u(this,"textMesh");u(this,"textEntityId");u(this,"type","geometry");u(this,"dirty",!0);u(this,"detached",!1);u(this,"instanceIndex",-1);u(this,"geometry");u(this,"batchedProps");u(this,"material");u(this,"feature");u(this,"currentHeight",ft);u(this,"color",new Oe);u(this,"topColor",new Oe);u(this,"position",new D);u(this,"altitude",0);R(this,et,1);R(this,Pe);u(this,"texturesVisible",!1);this.feature=e}get visible(){return this.mesh&&this.instanceIndex!==-1?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(e){this.mesh&&this.instanceIndex!==-1&&this.mesh.setVisibleAt(this.instanceIndex,e)}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(e){this.mesh&&(this.mesh.renderOrder=e)}setColor(e,t){this.color.set(e),this.topColor.set(t),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}getColor(){return this.material?.getColor(this.instanceIndex)}get opacity(){return k(this,et)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let t=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of t)n.opacity=e,n.needsUpdate=!0}S(this,et,e)}get texture(){return this.material?.texture?.image.src}set texture(e){this.material&&(this.material.texture=e)}get textureInstance(){return this.material?.texture}set topTexture(e){this.material&&(this.material.topTexture=e)}get topTexture(){return this.material?.topTexture?.image.src}get topTextureInstance(){return this.material?.topTexture}set blendTexture(e){this.material&&(this.material.blendTexture=e)}get featureBbox(){return k(this,Pe)?k(this,Pe):(S(this,Pe,dr(this.feature)),k(this,Pe))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}removeSideTexture(){this.material&&this.material.removeSideTexture(this.instanceIndex)}removeTopTexture(){this.material&&this.material.removeTopTexture(this.instanceIndex)}};et=new WeakMap,Pe=new WeakMap;var B=class extends ee{constructor(t){super();u(this,"visible",!0);u(this,"type","geometry-group");u(this,"components",[]);u(this,"userData",{entityId:"",entities3D:new Set,dirty:!0,shadingDirty:!0});this.userData.entityId=t}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let t;for(let s of this.children)if(!s.userData.detached){t=s;break}return t instanceof pt?Object.values(t.userData.entities)[0]:void 0}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}))}get altitude(){return this.position.z}};l();var ae=class extends ee{},tt=class{constructor(e,t,n=0){u(this,"id");u(this,"verticalOffset");u(this,"occluderId");u(this,"object3d",new ae);u(this,"components");u(this,"disposed",!1);u(this,"worldPosition",new D);this.id=e.id||F(),this.components=[e],this.verticalOffset=n,this.object3d=new ae,this.object3d.position.set(t.x,t.y,t.z+n),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type,this.positionDirty=!0}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get attachedTo(){return this.object3d.userData.attachedEntityId}get position(){return this.positionDirty&&(this.object3d.matrixAutoUpdate=!0,this.object3d.getWorldPosition(this.worldPosition),this.positionDirty=!1,this.object3d.matrixAutoUpdate=!1),this.worldPosition}get positionDirty(){return this.object3d.userData.worldPositionDirty}set positionDirty(e){this.object3d.userData.worldPositionDirty=e}updatePosition(e){this.object3d.position.copy(e),this.positionDirty=!0}setAltitude(e){this.object3d.position.z=e,this.positionDirty=!0}};l();var mt=class extends ee{constructor(){super(...arguments);u(this,"type","geometry");u(this,"userData",{entityId:"",type:"geometry"})}raycast(t,n){this.userData.type==="model"&&this.children[0]&&t.intersectObject(this.children[0],!0).forEach(s=>{n.push(s)})}},rt=class{constructor(e,t){u(this,"id",F());u(this,"components");u(this,"entities2D",new Map);this.components=[e,t]}get object3d(){return this.components[0].mesh}get parentObject3D(){return this.components[0].mesh?.parent}get type(){return this.components[0].type}attach(e){this.parentObject3D instanceof B?e.object3d.userData.attachedEntityId=this.id:this.entities2D.set(e.id,e)}detach(e){this.parentObject3D instanceof B&&(e.object3d.userData.parentEntityId=void 0),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.detach(e)}};var $e=class r extends ee{constructor(t){super();u(this,"childrenIds",new Set);u(this,"children",[]);u(this,"type","group-container");u(this,"userData",{entityId:"",entities2D:new Set,dirty:!0,occluderDirty:!1,opacity:1,computedOpacity:1,preloadGeometry:!1});u(this,"components",[]);this.userData.entityId=t}addOccluderFeature(t,n){this.userData.occluderFeature=t,this.userData.occluderId=n,this.userData.occluderDirty=!0}addEntity(t){t instanceof r?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof tt?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id),t.positionDirty=!0):t instanceof B?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof rt&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof r?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof tt?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof B?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof rt&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}),this.set2DGeometryChildrenPositionDirty())}set2DGeometryChildrenPositionDirty(){this.children.forEach(t=>{t instanceof ae?t.userData.worldPositionDirty=!0:t instanceof r&&t.set2DGeometryChildrenPositionDirty()})}get altitude(){return this.position.z}setOpacity(t){this.userData.opacity=t}get opacity(){return this.userData.opacity}};l();var Eo={top:0,bottom:0,left:0,right:0,type:"pixel"},pr="mappedin";var So={ALWAYS_ON_TOP:10},Mo=250,Do="collision-worker.csp.js",Co="maplibre-worker.csp.js";l();function ts(r){let e=r.min,t=r.max,n=new D(e.x,e.y,e.z),s=new D(t.x,e.y,e.z),i=new D(e.x,t.y,e.z),a=new D(t.x,t.y,e.z);return[n,s,i,a]}l();function mr(r,e){let t;return typeof e=="string"||typeof e=="number"?(t=r.geometry2DMap.get(e),t==null&&(t=r.geometry3DMap.get(e))):typeof e?.id=="string"||typeof e?.id=="number"?(t=r.geometry2DMap.get(e.id),t==null&&(t=r.geometry3DMap.get(e.id))):t=e,t}function jo(r,e,t=[],n=new xt,s){(r.getSystems().renderSystem.threeDdirty||r.getSystems().renderSystem.twoDdirty)&&r.renderSync();let i=mr(r.getInternalState(),e);return hr(i,t,n,s),t}var ht=new D;function hr(r,e=[],t=new xt,n){if(r.visible){if(r.isMesh||r.isLine||r.isPoints){let s=r.geometry;if(s.isBufferGeometry){let i=s.attributes.position;for(let a=0;a<i.count;a++)ht.fromBufferAttribute(i,a),n!==void 0&&(ht.z=n),e.push(ht.clone()),t.expandByPoint(ht)}}for(let s of r.children)hr(s,e,t,n)}}l();function rs(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}l();function ns(r,e,t=!1){let n=null,s=0;return function(...i){s++,s===1&&t===!0&&r(...i);let a=()=>{(!t||s>1)&&r(...i),n=null,s=0};clearTimeout(n),n=setTimeout(a,e)}}l();var ss=(()=>{let r;return{getDeviceType(){if(r)return r;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,s=/(iphone|ipod|ipad)/i.test(e),i=t==="iPad"||t.indexOf("Mac")===0&&n>0&&!window.MSStream,a=/android/i.test(e);return r={isIpad:i,isMobile:a||s||i,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},r},_reset(){r=void 0}}})(),yr=ss.getDeviceType,gr=(()=>{let r,e,t;function n(){if(e!==void 0)return e;r||(r=document.createElement("canvas"));let i=r.getContext("webgl")||r.getContext("experimental-webgl");if(!i)return e;try{let a=yr().isFirefox?null:i.getExtension("WEBGL_debug_renderer_info");return e=a?i.getParameter(a.UNMASKED_RENDERER_WEBGL):i.getParameter(i.RENDERER),e}catch{let o=new Error("Failed getting device info");throw o.name="FailedGettingDeviceInfo",o}}function s(){if(!yr().isWindows)return!1;if(t!==void 0)return t;let i=is()?.toLowerCase()??"";return t=i.includes("intel")&&(i.includes("uhd")||i.includes("iris")),t}return{getInfo:n,shouldDisableOffscreenCanvas:s,_setCanvas(i){r=i,e=void 0,t=void 0}}})(),is=gr.getInfo,as=gr.shouldDisableOffscreenCanvas;l();function os(r,e){let t={};for(let n=0;n<e.length;n++){let s=e[n];s in r&&(t[s]=r[s])}return t}function cs(r){return Object.keys(r).length===0}l();var us=r=>e=>{if(!e.includes("mappedin")){let t={};for(let n in r){let s=r[n];e.includes("mappedin")||(r[n]=s)}return{url:e,headers:t}}return{url:e,headers:r}};function sc(r,e,t,n){let s=r*(Math.PI/180),i=n/pe,a=r+i*180/Math.PI,o=t/pe/Math.cos(s),c=e+o*180/Math.PI;return{lat:a,lon:c}}function ic(r,e,t,n){let s=t*(Math.PI/180),i=n*(Math.PI/180),a=r*(Math.PI/180),o=e*(Math.PI/180),c=s-a,d=i-o,y=pe*d*Math.cos(a),w=pe*c;return{x:y,y:w}}var ls=(r,e,t)=>{if(r.children&&(r.visible||r instanceof $e&&r.userData.preloadGeometry))for(let n of r.children){if(n.visible&&n.type)if("entities3D"in n.userData&&n.userData?.entities3D&&n instanceof B){e.add(n.userData.entityId),n.userData.dirty&&t.add(n.userData.entityId);for(let s of n.userData.entities3D.values())e.add(s)}else(n.type==="group-container"||n.type==="custom-geometry"||n instanceof mt)&&e.add(n.userData.entityId);ls(n,e,t)}return e},ds=(r,e)=>{if(r.children&&r.visible&&!r.userData?.hidden)for(let t of r.children)t.visible&&t instanceof ae&&e.add(t.userData.entityId),ds(t,e);return e};function fs(r,e){for(let t in e){if(e[t]==null){r[t]=void 0;continue}typeof e[t]=="object"?fs(r[t],e[t]):r[t]=e[t]}return r}function ac(r,e,t){let n={translateX:r.x,translateY:r.y,translateZ:r.z,scale:r.meterInMercatorCoordinateUnits()},s=new bt,i=new D(n.scale,-n.scale,n.scale),a=new bt().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(i);return{id:pr,type:"custom",renderingMode:"3d",render:(o,c)=>{s.fromArray(c.defaultProjectionData.mainMatrix),e.projectionMatrix=s.multiply(a),t()}}}function ps(r){return fetch(r,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}async function oc(r){let e=await ps(r),{access_token:t}=await e.json();return{"x-mappedin-tiles-key":t}}function cc(r,e=0){let t=3735928559^e,n=1103547991^e;for(let s=0,i;s<r.length;s++)i=r.charCodeAt(s),t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}function uc(r,e,t){let n=r*(Math.PI/180)/2,s=e/2;return t*Math.tan(n)/s}function lc(r){return new Vt(new _t(r[0][0],r[0][1]),new _t(r[1][0],r[1][1])).getCenter().toArray()}function dc(r,e){return r<e||e<=12}function fc(r){let e=1;return r.type==="geometry-group"&&r.parent!=null&&r.parent instanceof $e?e=r.parent.userData.computedOpacity:(r.type==="geometry"||r.type==="custom-geometry"||r.type==="model")&&r.parentObject3D!=null&&r.parentObject3D instanceof B&&r.parentObject3D.parent!=null&&r.parentObject3D.parent instanceof $e&&(e=r.parentObject3D.parent.userData.computedOpacity),e}function pc(r,e,t=1e-10){if(r.length!==e.length)return!1;let n=Math.abs(r[0]-e[0])<t,s=Math.abs(r[1]-e[1])<t;if(r.length===3&&e.length===3){let i=Math.abs(r[2]-e[2])<t;return n&&s&&i}return n&&s}var ms="maplibre-frustum-culling-hack";function mc(){let r=new jt(.01,.01,.01),e=new Lt({opacity:0,depthWrite:!1,transparent:!0}),t=new vt(r,e);return t.position.copy(new D(0,50,0)),t.frustumCulled=!1,t.name=ms,t}var oe=new D,xr=new Be;function hc(r,e,t=new nt){return r.traverse(n=>{if(n instanceof vt){let i=n.geometry.attributes.position;if(e.position.distanceTo(n.position)<e.near)return;for(let o=0;o<i.count;o++)oe.fromBufferAttribute(i,o),oe.applyMatrix4(n.matrixWorld),oe.applyMatrix4(e.matrixWorldInverse),oe.applyMatrix4(e.projectionMatrix),oe.z<1&&oe.z>0&&(xr.set(oe.x,oe.y),t.expandByPoint(xr))}}),t}function br(r,e){let t=e.clientWidth,n=e.clientHeight;return new Be((r.x+1)*t/2,(1-r.y)*n/2)}function yc(r,e,t){let n=document.createElement("div");n.style.position="absolute",n.style.border=`2px solid ${e}`,n.style.pointerEvents="none";let s=br(new Be(r.min.x,r.min.y),t),i=br(new Be(r.max.x,r.max.y),t);n.style.left=`${s.x}px`,n.style.top=`${i.y}px`;let a=Math.abs(i.x-s.x),o=Math.abs(i.y-s.y);return n.style.width=`${a}px`,n.style.height=`${o}px`,t.appendChild(n),n}l();var At=class{constructor(e){u(this,"visible");u(this,"altitude");u(this,"color");u(this,"dirty",!0);u(this,"maxWidth");u(this,"maxHeight");u(this,"hoverByPolygon");u(this,"flipToFaceCamera",vr.flipToFaceCamera);u(this,"font");u(this,"fillOpacity");u(this,"fontSize");u(this,"margin");u(this,"outlineWidth");u(this,"outlineBlur");u(this,"outlineOffsetX");u(this,"strokeColor");u(this,"strokeOpacity");u(this,"strokeWidth");u(this,"hoverColor");u(this,"outlineOffsetY");u(this,"outlineColor");u(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let t={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(t[n]=this[n]);return t}},vr=Object.freeze({visible:!0,color:"black",flipToFaceCamera:!0,fillOpacity:1,font:void 0,fontSize:2,margin:[.2,1,.2,1.5],outlineColor:"black",outlineOpacity:1,outlineWidth:0,outlineOffsetX:0,outlineOffsetY:0,outlineBlur:0,strokeOpacity:1,strokeWidth:0,maxWidth:void 0,maxHeight:void 0,strokeColor:"black",hoverColor:void 0});l();l();var Nt=class{constructor(e){u(this,"dirty",!0);u(this,"visible",!0);u(this,"opacity",1);u(this,"verticalOffset",0);u(this,"interactive",!1);u(this,"color");u(this,"material");u(this,"rotation");u(this,"scale");e&&Object.assign(this,e)}};l();var hs=[1,1,1],ys=[0,0,0];export{Tr as a,gs as b,de as c,Ke as d,er as e,pe as f,Ds as g,te as h,Cs as i,Is as j,Ps as k,Os as l,Mr as m,As as n,Ns as o,Ls as p,Vs as q,Pi as r,F as s,Li as t,Mt as u,Dt as v,dt as w,Wi as x,Ki as y,We as z,ki as A,Xi as B,ir as C,Wn as D,Qi as E,qn as F,ea as G,X as H,Jn as I,va as J,ur as K,_a as L,Ta as M,wa as N,ka as O,Ea as P,Sa as Q,Ma as R,Da as S,Je as T,Aa as U,Na as V,Xn as W,La as X,lr as Y,Pt as Z,Ot as _,pt as $,fr as aa,B as ba,ae as ca,tt as da,mt as ea,rt as fa,$e as ga,Eo as ha,pr as ia,So as ja,Mo as ka,Do as la,Co as ma,ts as na,mr as oa,jo as pa,rs as qa,ns as ra,as as sa,os as ta,cs as ua,us as va,Hn as wa,sc as xa,ic as ya,ls as za,ds as Aa,fs as Ba,ac as Ca,oc as Da,cc as Ea,uc as Fa,lc as Ga,dc as Ha,fc as Ia,pc as Ja,mc as Ka,hc as La,yc as Ma,At as Na,vr as Oa,Nt as Pa,hs as Qa,ys as Ra};
3
+ //# sourceMappingURL=chunk-2RJ5UTHX.js.map