@mappedin/maplibre-overlay 6.0.1-beta.58 → 6.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{$ as ky,$a as s4,A as wy,Aa as Io,B as Co,Ba as qy,C as Ay,Ca as Lr,D as Fy,Da as Jy,E as ie,Ea as Xy,F as la,Fa as Yy,G as Lu,Ga as ap,H as Oy,Ha as Qy,I as ai,Ia as up,J as By,Ja as sp,K as ui,Ka as $c,L as tp,La as e4,M as zi,Ma as t4,N as et,Na as r4,O as Lc,Oa as n4,P as Ru,Pa as cp,Q as Hr,Qa as i4,R as rp,Ra as $i,S as Py,Sa as Gc,T as ma,Ta as lp,U as My,Ua as o4,V as Nu,Va as a4,W as ju,Wa as ga,X as Ty,Xa as mp,Ya as Zc,Z as Rc,Za as u4,_ as Nc,_a as dp,a as Hd,aa as _y,ab as c4,b as Qg,ba as np,bb as l4,c as Kd,ca as Ly,cb as m4,d as Jd,da as ip,db as d4,e as Xd,ea as Ry,eb as p4,f as Tc,fa as Ny,fb as f4,g as kc,ga as da,gb as Nn,h as Eo,ha as jy,hb as h4,i as by,ia as Uy,ib as Rt,j as vy,ja as jc,jb as g4,k as Yd,ka as op,kb as y4,l as Ui,la as zy,lb as jn,m as xy,ma as Uu,mb as b4,n as De,na as pa,nb as Tt,o as Qd,oa as Uc,ob as bn,p as Rn,pa as fa,pb as Ut,q as Ey,qa as ha,r as Cy,ra as $y,s as sa,sa as Gy,t as Iy,ta as zc,u as _c,ua as Zy,v as ep,va as Vy,w as ca,wa as Wy,x as Te,xa as Hy,y as Dy,ya as Ky,z as Sy,za as zu}from"./chunk-HZWE2CIJ.js";import{a as Kr}from"./chunk-UUZZ5QFY.js";import{$a as Mc,B as vc,D as xc,Da as my,E as Li,Ea as oa,F as Ec,Fa as dy,G as Cc,Ga as aa,H as Ic,Ha as ua,I as Dc,Ia as yn,Ja as Bc,K as ny,Ka as py,L as Fe,La as ku,M as Ie,Na as _u,Q as iy,R as oy,S as ay,T as Sc,U as ue,V as Qt,W as uy,X as _r,Xa as Pc,Y as ia,Z as xo,_ as Mt,a as l,aa as cr,ab as fy,b as y,ba as vr,ca as wc,d as bc,da as Oe,e as vo,ea as Ri,eb as hy,f as Pu,g as oi,ga as Ni,gb as Ln,h as ey,ha as sy,i as Mu,ia as qd,ib as gy,ja as Ac,ka as ji,kb as yy,r as ty,sa as _n,t as ry,ta as cy,ua as Fc,va as Oc,wa as ly,ya as Tu}from"./chunk-4CVJGNXB.js";import{a as R,b as xe,c as o,d as yc,e as yo,g as bo,h as _i,i as Xg,j as f,k as s,l as _,m as W,n as dt,o as Yg,p as K}from"./chunk-LUJQR5EH.js";var uE=bo((lh,mh)=>{l();(function(e,t){typeof lh=="object"&&typeof mh<"u"?mh.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(lh,function(){"use strict";var e=o(function(n,i){if(n===void 0&&(n=[]),i===void 0&&(i=t),this.data=n,this.length=this.data.length,this.compare=i,this.length>0)for(var a=(this.length>>1)-1;a>=0;a--)this._down(a)},"TinyQueue");e.prototype.push=o(function(n){this.data.push(n),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var n=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),n}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(n){for(var i=this,a=i.data,u=i.compare,c=a[n];n>0;){var m=n-1>>1,d=a[m];if(u(c,d)>=0)break;a[n]=d,n=m}a[n]=c},"_up"),e.prototype._down=o(function(n){for(var i=this,a=i.data,u=i.compare,c=this.length>>1,m=a[n];n<c;){var d=(n<<1)+1,h=a[d],g=d+1;if(g<this.length&&u(a[g],h)<0&&(d=g,h=a[g]),u(h,m)>=0)break;a[n]=h,n=d}a[n]=m},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var cE=bo((fce,dh)=>{"use strict";l();var Am=uE();Am.default&&(Am=Am.default);dh.exports=sE;dh.exports.default=sE;function sE(e,t,r){t=t||1;for(var n,i,a,u,c=0;c<e[0].length;c++){var m=e[0][c];(!c||m[0]<n)&&(n=m[0]),(!c||m[1]<i)&&(i=m[1]),(!c||m[0]>a)&&(a=m[0]),(!c||m[1]>u)&&(u=m[1])}var d=a-n,h=u-i,g=Math.min(d,h),v=g/2;if(g===0){var b=[n,i];return b.distance=0,b}for(var S=new Am(void 0,TO),O=n;O<a;O+=g)for(var x=i;x<u;x+=g)S.push(new ro(O+v,x+v,v,e));var E=_O(e),I=new ro(n+d/2,i+h/2,0,e);I.d>E.d&&(E=I);for(var D=S.length;S.length;){var C=S.pop();C.d>E.d&&(E=C,r&&console.log("found best %d after %d probes",Math.round(1e4*C.d)/1e4,D)),!(C.max-E.d<=t)&&(v=C.h/2,S.push(new ro(C.x-v,C.y-v,v,e)),S.push(new ro(C.x+v,C.y-v,v,e)),S.push(new ro(C.x-v,C.y+v,v,e)),S.push(new ro(C.x+v,C.y+v,v,e)),D+=4)}r&&(console.log("num probes: "+D),console.log("best distance: "+E.d));var A=[E.x,E.y];return A.distance=E.d,A}o(sE,"polylabel");function TO(e,t){return t.max-e.max}o(TO,"compareMax");function ro(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=kO(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(ro,"Cell");function kO(e,t,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var u=r[a],c=0,m=u.length,d=m-1;c<m;d=c++){var h=u[c],g=u[d];h[1]>t!=g[1]>t&&e<(g[0]-h[0])*(t-h[1])/(g[1]-h[1])+h[0]&&(n=!n),i=Math.min(i,LO(e,t,h,g))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(kO,"pointToPolygonDist");function _O(e){for(var t=0,r=0,n=0,i=e[0],a=0,u=i.length,c=u-1;a<u;c=a++){var m=i[a],d=i[c],h=m[0]*d[1]-d[0]*m[1];r+=(m[0]+d[0])*h,n+=(m[1]+d[1])*h,t+=h*3}return t===0?new ro(i[0][0],i[0][1],0,e):new ro(r/t,n/t,0,e)}o(_O,"getCentroidCell");function LO(e,t,r,n){var i=r[0],a=r[1],u=n[0]-i,c=n[1]-a;if(u!==0||c!==0){var m=((e-i)*u+(t-a)*c)/(u*u+c*c);m>1?(i=n[0],a=n[1]):m>0&&(i+=u*m,a+=c*m)}return u=e-i,c=t-a,u*u+c*c}o(LO,"getSegDistSq")});var XE=bo((yg,bg)=>{l();(function(e,t){typeof yg=="object"&&typeof bg<"u"?bg.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(yg,function(){"use strict";function e(x,E,I,D,C){o(function A(T,k,j,U,G){for(;U>j;){if(U-j>600){var $=U-j+1,X=k-j+1,V=Math.log($),Y=.5*Math.exp(2*V/3),oe=.5*Math.sqrt(V*Y*($-Y)/$)*(X-$/2<0?-1:1),Z=Math.max(j,Math.floor(k-X*Y/$+oe)),ee=Math.min(U,Math.floor(k+($-X)*Y/$+oe));A(T,k,Z,ee,G)}var te=T[k],Q=j,de=U;for(t(T,j,k),G(T[U],te)>0&&t(T,j,U);Q<de;){for(t(T,Q,de),Q++,de--;G(T[Q],te)<0;)Q++;for(;G(T[de],te)>0;)de--}G(T[j],te)===0?t(T,j,de):t(T,++de,U),de<=k&&(j=de+1),k<=de&&(U=de-1)}},"t")(x,E,I||0,D||x.length-1,C||r)}o(e,"t");function t(x,E,I){var D=x[E];x[E]=x[I],x[I]=D}o(t,"i");function r(x,E){return x<E?-1:x>E?1:0}o(r,"n");var n=o(function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function i(x,E,I){if(!I)return E.indexOf(x);for(var D=0;D<E.length;D++)if(I(x,E[D]))return D;return-1}o(i,"e");function a(x,E){u(x,0,x.children.length,E,x)}o(a,"a");function u(x,E,I,D,C){C||(C=S(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var A=E;A<I;A++){var T=x.children[A];c(C,x.leaf?D(T):T)}return C}o(u,"h");function c(x,E){return x.minX=Math.min(x.minX,E.minX),x.minY=Math.min(x.minY,E.minY),x.maxX=Math.max(x.maxX,E.maxX),x.maxY=Math.max(x.maxY,E.maxY),x}o(c,"o");function m(x,E){return x.minX-E.minX}o(m,"s");function d(x,E){return x.minY-E.minY}o(d,"l");function h(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}o(h,"f");function g(x){return x.maxX-x.minX+(x.maxY-x.minY)}o(g,"u");function v(x,E){return x.minX<=E.minX&&x.minY<=E.minY&&E.maxX<=x.maxX&&E.maxY<=x.maxY}o(v,"m");function b(x,E){return E.minX<=x.maxX&&E.minY<=x.maxY&&E.maxX>=x.minX&&E.maxY>=x.minY}o(b,"c");function S(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}o(S,"p");function O(x,E,I,D,C){for(var A=[E,I];A.length;)if(!((I=A.pop())-(E=A.pop())<=D)){var T=E+Math.ceil((I-E)/D/2)*D;e(x,T,E,I,C),A.push(E,T,T,I)}}return o(O,"d"),n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(x){var E=this.data,I=[];if(!b(x,E))return I;for(var D=this.toBBox,C=[];E;){for(var A=0;A<E.children.length;A++){var T=E.children[A],k=E.leaf?D(T):T;b(x,k)&&(E.leaf?I.push(T):v(x,k)?this._all(T,I):C.push(T))}E=C.pop()}return I},n.prototype.collides=function(x){var E=this.data;if(!b(x,E))return!1;for(var I=[];E;){for(var D=0;D<E.children.length;D++){var C=E.children[D],A=E.leaf?this.toBBox(C):C;if(b(x,A)){if(E.leaf||v(x,A))return!0;I.push(C)}}E=I.pop()}return!1},n.prototype.load=function(x){if(!x||!x.length)return this;if(x.length<this._minEntries){for(var E=0;E<x.length;E++)this.insert(x[E]);return this}var I=this._build(x.slice(),0,x.length-1,0);if(this.data.children.length)if(this.data.height===I.height)this._splitRoot(this.data,I);else{if(this.data.height<I.height){var D=this.data;this.data=I,I=D}this._insert(I,this.data.height-I.height-1,!0)}else this.data=I;return this},n.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},n.prototype.clear=function(){return this.data=S([]),this},n.prototype.remove=function(x,E){if(!x)return this;for(var I,D,C,A=this.data,T=this.toBBox(x),k=[],j=[];A||k.length;){if(A||(A=k.pop(),D=k[k.length-1],I=j.pop(),C=!0),A.leaf){var U=i(x,A.children,E);if(U!==-1)return A.children.splice(U,1),k.push(A),this._condense(k),this}C||A.leaf||!v(A,T)?D?(I++,A=D.children[I],C=!1):A=null:(k.push(A),j.push(I),I=0,D=A,A=A.children[0])}return this},n.prototype.toBBox=function(x){return x},n.prototype.compareMinX=function(x,E){return x.minX-E.minX},n.prototype.compareMinY=function(x,E){return x.minY-E.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(x){return this.data=x,this},n.prototype._all=function(x,E){for(var I=[];x;)x.leaf?E.push.apply(E,x.children):I.push.apply(I,x.children),x=I.pop();return E},n.prototype._build=function(x,E,I,D){var C,A=I-E+1,T=this._maxEntries;if(A<=T)return a(C=S(x.slice(E,I+1)),this.toBBox),C;D||(D=Math.ceil(Math.log(A)/Math.log(T)),T=Math.ceil(A/Math.pow(T,D-1))),(C=S([])).leaf=!1,C.height=D;var k=Math.ceil(A/T),j=k*Math.ceil(Math.sqrt(T));O(x,E,I,j,this.compareMinX);for(var U=E;U<=I;U+=j){var G=Math.min(U+j-1,I);O(x,U,G,k,this.compareMinY);for(var $=U;$<=G;$+=k){var X=Math.min($+k-1,G);C.children.push(this._build(x,$,X,D-1))}}return a(C,this.toBBox),C},n.prototype._chooseSubtree=function(x,E,I,D){for(;D.push(E),!E.leaf&&D.length-1!==I;){for(var C=1/0,A=1/0,T=void 0,k=0;k<E.children.length;k++){var j=E.children[k],U=h(j),G=($=x,X=j,(Math.max(X.maxX,$.maxX)-Math.min(X.minX,$.minX))*(Math.max(X.maxY,$.maxY)-Math.min(X.minY,$.minY))-U);G<A?(A=G,C=U<C?U:C,T=j):G===A&&U<C&&(C=U,T=j)}E=T||E.children[0]}var $,X;return E},n.prototype._insert=function(x,E,I){var D=I?x:this.toBBox(x),C=[],A=this._chooseSubtree(D,this.data,E,C);for(A.children.push(x),c(A,D);E>=0&&C[E].children.length>this._maxEntries;)this._split(C,E),E--;this._adjustParentBBoxes(D,C,E)},n.prototype._split=function(x,E){var I=x[E],D=I.children.length,C=this._minEntries;this._chooseSplitAxis(I,C,D);var A=this._chooseSplitIndex(I,C,D),T=S(I.children.splice(A,I.children.length-A));T.height=I.height,T.leaf=I.leaf,a(I,this.toBBox),a(T,this.toBBox),E?x[E-1].children.push(T):this._splitRoot(I,T)},n.prototype._splitRoot=function(x,E){this.data=S([x,E]),this.data.height=x.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(x,E,I){for(var D,C,A,T,k,j,U,G=1/0,$=1/0,X=E;X<=I-E;X++){var V=u(x,0,X,this.toBBox),Y=u(x,X,I,this.toBBox),oe=(C=V,A=Y,T=void 0,k=void 0,j=void 0,U=void 0,T=Math.max(C.minX,A.minX),k=Math.max(C.minY,A.minY),j=Math.min(C.maxX,A.maxX),U=Math.min(C.maxY,A.maxY),Math.max(0,j-T)*Math.max(0,U-k)),Z=h(V)+h(Y);oe<G?(G=oe,D=X,$=Z<$?Z:$):oe===G&&Z<$&&($=Z,D=X)}return D||I-E},n.prototype._chooseSplitAxis=function(x,E,I){var D=x.leaf?this.compareMinX:m,C=x.leaf?this.compareMinY:d;this._allDistMargin(x,E,I,D)<this._allDistMargin(x,E,I,C)&&x.children.sort(D)},n.prototype._allDistMargin=function(x,E,I,D){x.children.sort(D);for(var C=this.toBBox,A=u(x,0,E,C),T=u(x,I-E,I,C),k=g(A)+g(T),j=E;j<I-E;j++){var U=x.children[j];c(A,x.leaf?C(U):U),k+=g(A)}for(var G=I-E-1;G>=E;G--){var $=x.children[G];c(T,x.leaf?C($):$),k+=g(T)}return k},n.prototype._adjustParentBBoxes=function(x,E,I){for(var D=I;D>=0;D--)c(E[D],x)},n.prototype._condense=function(x){for(var E=x.length-1,I=void 0;E>=0;E--)x[E].children.length===0?E>0?(I=x[E-1].children).splice(I.indexOf(x[E]),1):this.clear():a(x[E],this.toBBox)},n})});var Ig=bo(he=>{"use strict";l();Object.defineProperty(he,"__esModule",{value:!0});he.earthRadius=63710088e-1;he.factors={centimeters:he.earthRadius*100,centimetres:he.earthRadius*100,degrees:he.earthRadius/111325,feet:he.earthRadius*3.28084,inches:he.earthRadius*39.37,kilometers:he.earthRadius/1e3,kilometres:he.earthRadius/1e3,meters:he.earthRadius,metres:he.earthRadius,miles:he.earthRadius/1609.344,millimeters:he.earthRadius*1e3,millimetres:he.earthRadius*1e3,nauticalmiles:he.earthRadius/1852,radians:1,yards:he.earthRadius*1.0936};he.unitsFactors={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/he.earthRadius,yards:1.0936133};he.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function po(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(po,"feature");he.feature=po;function oP(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return vg(t).geometry;case"LineString":return Eg(t).geometry;case"Polygon":return xg(t).geometry;case"MultiPoint":return QE(t).geometry;case"MultiLineString":return YE(t).geometry;case"MultiPolygon":return e6(t).geometry;default:throw new Error(e+" is invalid")}}o(oP,"geometry");he.geometry=oP;function vg(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ed(e[0])||!Ed(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return po(n,t,r)}o(vg,"point");he.point=vg;function aP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return vg(n,t)}),r)}o(aP,"points");he.points=aP;function xg(e,t,r){r===void 0&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var u=0;u<a[a.length-1].length;u++)if(a[a.length-1][u]!==a[0][u])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:e};return po(c,t,r)}o(xg,"polygon");he.polygon=xg;function uP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return xg(n,t)}),r)}o(uP,"polygons");he.polygons=uP;function Eg(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return po(n,t,r)}o(Eg,"lineString");he.lineString=Eg;function sP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return Eg(n,t)}),r)}o(sP,"lineStrings");he.lineStrings=sP;function Cd(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o(Cd,"featureCollection");he.featureCollection=Cd;function YE(e,t,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:e};return po(n,t,r)}o(YE,"multiLineString");he.multiLineString=YE;function QE(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return po(n,t,r)}o(QE,"multiPoint");he.multiPoint=QE;function e6(e,t,r){r===void 0&&(r={});var n={type:"MultiPolygon",coordinates:e};return po(n,t,r)}o(e6,"multiPolygon");he.multiPolygon=e6;function cP(e,t,r){r===void 0&&(r={});var n={type:"GeometryCollection",geometries:e};return po(n,t,r)}o(cP,"geometryCollection");he.geometryCollection=cP;function lP(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}o(lP,"round");he.round=lP;function t6(e,t){t===void 0&&(t="kilometers");var r=he.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(t6,"radiansToLength");he.radiansToLength=t6;function Cg(e,t){t===void 0&&(t="kilometers");var r=he.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(Cg,"lengthToRadians");he.lengthToRadians=Cg;function mP(e,t){return r6(Cg(e,t))}o(mP,"lengthToDegrees");he.lengthToDegrees=mP;function dP(e){var t=e%360;return t<0&&(t+=360),t}o(dP,"bearingToAzimuth");he.bearingToAzimuth=dP;function r6(e){var t=e%(2*Math.PI);return t*180/Math.PI}o(r6,"radiansToDegrees");he.radiansToDegrees=r6;function pP(e){var t=e%360;return t*Math.PI/180}o(pP,"degreesToRadians");he.degreesToRadians=pP;function fP(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return t6(Cg(e,t),r)}o(fP,"convertLength");he.convertLength=fP;function hP(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=he.areaFactors[t];if(!n)throw new Error("invalid original units");var i=he.areaFactors[r];if(!i)throw new Error("invalid final units");return e/n*i}o(hP,"convertArea");he.convertArea=hP;function Ed(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(Ed,"isNumber");he.isNumber=Ed;function gP(e){return!!e&&e.constructor===Object}o(gP,"isObject");he.isObject=gP;function yP(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!Ed(t))throw new Error("bbox must only contain numbers")})}o(yP,"validateBBox");he.validateBBox=yP;function bP(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}o(bP,"validateId");he.validateId=bP});var Sg=bo(Vt=>{"use strict";l();Object.defineProperty(Vt,"__esModule",{value:!0});var br=Ig();function Js(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,h=0,g=0,v,b=e.type,S=b==="FeatureCollection",O=b==="Feature",x=S?e.features.length:1,E=0;E<x;E++){d=S?e.features[E].geometry:O?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var I=0;I<c;I++){var D=0,C=0;if(u=v?d.geometries[I]:d,u!==null){m=u.coordinates;var A=u.type;switch(h=r&&(A==="Polygon"||A==="MultiPolygon")?1:0,A){case null:break;case"Point":if(t(m,g,E,D,C)===!1)return!1;g++,D++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,E,D,C)===!1)return!1;g++,A==="MultiPoint"&&D++}A==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-h;i++){if(t(m[n][i],g,E,D,C)===!1)return!1;g++}A==="MultiLineString"&&D++,A==="Polygon"&&C++}A==="Polygon"&&D++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-h;a++){if(t(m[n][i][a],g,E,D,C)===!1)return!1;g++}C++}D++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(Js(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(Js,"coordEach");function vP(e,t,r,n){var i=r;return Js(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(vP,"coordReduce");function n6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(n6,"propEach");function xP(e,t,r){var n=r;return n6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(xP,"propReduce");function i6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(i6,"featureEach");function EP(e,t,r){var n=r;return i6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(EP,"featureReduce");function CP(e){var t=[];return Js(e,function(r){t.push(r)}),t}o(CP,"coordAll");function Dg(e,t){var r,n,i,a,u,c,m,d,h,g,v=0,b=e.type==="FeatureCollection",S=e.type==="Feature",O=b?e.features.length:1;for(r=0;r<O;r++){for(c=b?e.features[r].geometry:S?e.geometry:e,d=b?e.features[r].properties:S?e.properties:{},h=b?e.features[r].bbox:S?e.bbox:void 0,g=b?e.features[r].id:S?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,h,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,h,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,h,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(Dg,"geomEach");function IP(e,t,r){var n=r;return Dg(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(IP,"geomReduce");function Id(e,t){Dg(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(br.feature(r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var h=r.coordinates[d],g={type:m,coordinates:h};if(t(br.feature(g,i),n,d)===!1)return!1}})}o(Id,"flattenEach");function DP(e,t,r){var n=r;return Id(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(DP,"flattenReduce");function o6(e,t){Id(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,h=0;if(Js(r,function(g,v,b,S,O){if(c===void 0||n>m||S>d||O>h){c=g,m=n,d=S,h=O,a=0;return}var x=br.lineString([c,g],r.properties);if(t(x,n,i,O,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(o6,"segmentEach");function SP(e,t,r){var n=r,i=!1;return o6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(SP,"segmentReduce");function a6(e,t){if(!e)throw new Error("geojson is required");Id(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(br.lineString(u[c],r.properties),n,i,c)===!1)return!1;break}}})}o(a6,"lineEach");function wP(e,t,r){var n=r;return a6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(wP,"lineReduce");function AP(e,t){if(t=t||{},!br.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),br.lineString([m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),br.lineString([m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),br.lineString([m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),br.lineString([m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(AP,"findSegment");function FP(e,t){if(t=t||{},!br.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return br.point(m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),br.point(m[n],u,t);case"LineString":return a<0&&(a=m.length+a),br.point(m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),br.point(m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),br.point(m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),br.point(m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(FP,"findPoint");Vt.coordAll=CP;Vt.coordEach=Js;Vt.coordReduce=vP;Vt.featureEach=i6;Vt.featureReduce=EP;Vt.findPoint=FP;Vt.findSegment=AP;Vt.flattenEach=Id;Vt.flattenReduce=DP;Vt.geomEach=Dg;Vt.geomReduce=IP;Vt.lineEach=a6;Vt.lineReduce=wP;Vt.propEach=n6;Vt.propReduce=xP;Vt.segmentEach=o6;Vt.segmentReduce=SP});var u6=bo(Ag=>{"use strict";l();Object.defineProperty(Ag,"__esModule",{value:!0});var OP=Sg();function wg(e){var t=[1/0,1/0,-1/0,-1/0];return OP.coordEach(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}o(wg,"bbox");wg.default=wg;Ag.default=wg});var d6=bo((_ye,Fg)=>{l();var ni=XE(),c6=Ig(),l6=Sg(),bu=u6().default,BP=l6.featureEach,Tye=l6.coordEach,kye=c6.polygon,s6=c6.featureCollection;function m6(e){var t=new ni(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:bu(r),ni.prototype.insert.call(this,r)},t.load=function(r){var n=[];return Array.isArray(r)?r.forEach(function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:bu(i),n.push(i)}):BP(r,function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:bu(i),n.push(i)}),ni.prototype.load.call(this,n)},t.remove=function(r,n){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:bu(r),ni.prototype.remove.call(this,r,n)},t.clear=function(){return ni.prototype.clear.call(this)},t.search=function(r){var n=ni.prototype.search.call(this,this.toBBox(r));return s6(n)},t.collides=function(r){return ni.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=ni.prototype.all.call(this);return s6(r)},t.toJSON=function(){return ni.prototype.toJSON.call(this)},t.fromJSON=function(r){return ni.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var n;if(r.bbox)n=r.bbox;else if(Array.isArray(r)&&r.length===4)n=r;else if(Array.isArray(r)&&r.length===6)n=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")n=bu(r);else if(r.type==="FeatureCollection")n=bu(r);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}o(m6,"geojsonRbush");Fg.exports=m6;Fg.exports.default=m6});l();import{MapView as rM}from"@mappedin/mappedin-js";l();l();l();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:o(function(){return this},"get"),configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var v4="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkICAgKCgkLDhcPDg0NDhwUFREXIh4jIyEeICAlKjUtJScyKCAgLj8vMjc5PDw8JC1CRkE6RjU7PDn/2wBDAQoKCg4MDhsPDxs5JiAmOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTn/wgARCAIABAADAREAAhEBAxEB/8QAGwABAAMBAQEBAAAAAAAAAAAAAAECAwQFBgf/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAP3EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAIAAAJAFAAAAAAAAAAAAAAAAAAAAAAAAABAgAAEgCgAAAAAAAAAAAAAAAAAAAABERLSM1zM4zXMzjMoUIqCCSSS8XNC9mpoaVomharWTQAAAAAAAAAAAAAAAAEREtIoZrnGZkucUKFStQQSTFixdNDStF0TWrmiWqbJoAAAAAAAAAAAAAIgiWkZy4HNLzHLXKcxzpzmFYmRkUKFSCCSSxcuampsbR0HSdK9R1R1HTZvWll0mlAAAAAAAAAAAIiKLnLjHNLynLXKcycxzmNYmJmUKFSCAWLFy5qamxvHQvSdJ0nVHUdFm1aparWKAjNWSKAAAAARBEtYzlyXnjmOSuM4U4q4jjOM5a5k5zAyMjOqFCCCCSSS5c0jU1NzoOk6pew7TtjuO1e0646jezWr2WSaUAAAAAECIqtZco55eY464zhTirhOI5Dks5jAwMTIzqhUqQASWLFzSNTY3Og6V646zsO2O47V7DrjqNzWy9nlZ1c0LlrLEk0EQQVipRczIyMU5q5F4U8+vOPOrgThOOuU5jAxMjMzKpUggigJiSSxY0XQ1Njc6TqjtO49CX0D0T0Y7l7E6JdzU1NEvViSalBAWIqVKLSMjIxOauM4U86vPPOrz04TjrkOYwMTIzKJQqQQCKmBJJYutzQ1Njc6TrOyO475fRPRPQjuXsToXWPn6kkkEkhCkEAgggqVMjlrzzzDy7PMPPrhOQ5jBMqoVIIIAAIAJAAJJJLFzWN16TsO49CPTPUl9Q9A6o1LFiSSSSQpCwQQCCCpVMjlrzzyzy7PMPPrhOM5kwM6zKlQQAAQASAASCxY0NI3XpOw7j0I9M9SX0z0DqjU+UqpQqVIBFgEyixJYuWLFDkrzE8o8yvOONOasipBAAAAAAAAAAABJJY2OiO1fQPUj1T0pewuVKlCCqQsBIUSSSSWLlyTM5K808pPLrzziTnrEqQQAAAAAAAAAAASSWNjojtX0D1I9VfSOuND4uzMzqhQqVIALEli5c1jUuQc1vnp5pwJzVmQQAAAAAAAAAAAAAASSaHTHevpHoHTFjMyM6zKlSpABJJcsaGkamhU5q88804E5qzIIAAAAAAAAAAAAAAJJNDpjvX0j0Dqix8dVDMolSpAqCYElixc0XU0IMjlTlrIqAAAAAAAAAAAAAAAAAWNTqjqXYGZkZpUoQQRSFIsSXLroaGhBkcqctZFQAAAAAAAAAAAAAAAACxqdUdS7EngWQCAAQASACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYFSCCAACCQACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYGIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAJABAAAAAAAAAJBILEli5Y0LlzQ0Lly5csWLAkgFSChUoUMyhmUMyhQqVKkEEAEAAAAAAAAAkEgsSWLljQuXNDQuXLlyxYsCSAVIKFShQzKGZQzKFCpUqQe+ZmZkUKFCpUEEAAkksWLFzQ0NTU2NzY3Og3NzoNzc2NjU1NS5csSAQVKmZmZGRiYmBgYHOYGBgYGBiZGRkUMypUqQCAASSWLFi5oaGpqbG5sbnQbm50G5ubGxqampcuWJAIIKGZmZGRiYmBgYHOYGBgYGR+jmBzmBzmJiZGZQoQQSSWLmhqbGxudB0nSdJ1HSdR1HSdJ0G5qamhcsWJJJBIIIBUqVKFDIyMDA5jmOU5TlOY5TmOc5znMTEyMyhQggFixc0NTY2NzoOk6TpOo6TqOo6TpOg3NTU0LlixJJIJBAIKkFChQyMjAwOY5jlOU5jnP00yMTnOc5zAwMjMoVIJJLmhqbmx0HQdBubmxqXLkkgAAAAAAAAAAAAAEEFTMzMTEwOc5znMDAyMyhUgkkuaGpsbnQdB0G5ubGpcuSSAAAAAAAAAAAAAAQQVKGZ1gAEEEEFSCACSSxJJJIAAAAAAAAAAAAAAAAAAAAAAABBBBBUggAkkksSSSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSSSSAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSWBIAAKFiQAAAAAAAAACCpUoUMzIyMzMzMyhQoVKkEEAgkEkklixYuXNDQ0NTQ1NC5cuWJAAAAAAAAAAIKlShQzMjIzMzMzKFChUqQQQCCQSSSWLFyxoXNDQ1NDU0LljUkkAAAAAAAAAAggggEEAgAAAAAAAAAAAAAEkgkkkkkAAAAAAAAAAgggggEAgAAAAAEgEAAAAAAEkgkkuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADyyCCCCCCCCAQASCSQWJJJJLEkkkkkgkkEgkAEgAAEAAgEAggEEEEEEEFSCCCCCCAQASCSQWJJJJLEkkkkkgkkEgEgEgAAEAAgEAggEEEEEH5AQQQQVBBAIAAJBIJJJLEkkkkliSSSSSQSSCQSAAAQAQQCCCCCCCCCpBBBBBUEEEAgAAkEgkkksSSSSSWJJJJJJBJIJBIAABABBAIIIIIIIIKg/LCAQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQAQQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQfPgAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/xAApEAAABQUBAQACAwACAwAAAAABAgQFFQMGERQWEhNAUAAgMGCAkKCw/9oACAEBAAECAP8AwTZznOf3mc5/YZE41xVivFyM6i7C8C8C8zMzMzMyDyDyDyDwV4K7ldSuZV5VgVwqZ/SCca4qxXmcjOouwvAvEzMzMzMzMyDyDyDwV4K7ldSuRVwKgrgf88TDWMrO4VHOo61Hao7ndzvB3k7yZ5M8i8i8zMzMzMyDyDyDyV5K8keSPJHmm8U3em70nam603Mi8qotUDfk5GqZUdfUc6jrUdqjvUeDvB3kzyZ5M8i8i8zMzMzMzMg8g8leSvJHkjyR5pvFN4pu9N2pOtNzIvKqLWA39PX+/saplJlh1tRfVcKrlVdKrrVdqrvVdzu53Y7sZ2M6mdRdRdBdJSUk5SUB0B0B1K6kdSOxHam7Unek70nei7UXWi6UXKk40l9NaRWWuB8/75E41zKjraq+q41nOq6VXas7VXeq71Hc7ud2O7GdRdRdZQXSUlJSUlAdCugOpXUjqR2I7U3em70nek70nai60XSk5UnGkvItIrKoCsC0FwLgXAuBbube3ubm7uiuFcZcZaZYdZUWVl1dwruVdzrulZ0qulVzqOR3EzgZeZcZcK0Vm3t7W1tbW1tgrBYC0q0q4q8jgRxpuVJzoulB0oOlBzoOVBworqa0iwi0i0q4FwLQWAr2trZ2trb3RWiuFcZaZadbUW1l1ZwruVd0rulZ0qulVzqOR3E7gZeZeK4VorNzb29ra2tsFe2CwFpVxVxV5HAjjTcqTnRdKDpQdKDnQcqDhRXU1pFhVm/ISUnKSkrLSsrKyspJyUhvitOtrLq69Q4qHGu41nGqvqLjrDKhUDW+nv1nP+Oc+vYVArFUEVEWUl1FfQcU7imckzinX0VxFoLgXyMlJykrLS0tLS0rKSclI74rjraq6uvUuKhxruNdxqr6i46wysVA1vp79Zz/AI5z6A4VArFUEVkWUl1FfQcU7imcUzinX0VxFoLZKTlJWVlpaXl5eWlpWUB0BzBxkDr669SvUr666stqqz1xqes/j5AxahFFJXRWp1yZemX0F5HCQkpOUlZaWlpeXl5aWB2lQdAcwcZE7hWcFLgpXqF1ZbVVnUDU9Z/HyBi1CV6SuitTrky9MvoLyL5AXEXEXIXIXKSkpKSkpIHIHIHIrkVxK4yJnCsvrra6uqpPVE354GJVpKaCtOtoryuEiZxM5C5C5C5SUnJSclJSQOQORXIrkVxBxM4VV9dbXV1VJ6om/PAxKtFTQVp1tFeRwkRWitFYKvb2tra2draBUCsFgLCrSrQWitOsqqT1RN+jAxKtJTTWFWitMtMtFYKzb29ra2tnaBUCsFZVhVpVoLRWnWVFJ6om/RgYlWkpprAW73v36zn++c+gOFQKv1GoJv04GCp9Rq/T36zn++c+gOFT7fUagm/TgYKn1+3/AKEeMefHjx8/n8vl8vn8/Hjx5xj9bjHnx48fP5/L5fL5/Px48ecY/wAvOPxceQIFIKIJgSAiBAVuK2FaitINAM4MwMwMsJCQkJCQkJCwosws4tAtItQtgtot4oRSCm+Hy8ecfi48gQKQUQTAkBECArcVsK1FaQaAZwZgZgZYSEhISEhISFhRZhZxaBaRahbBbRbxQikFN8BpfMWgWozWLaLcKAUWpq62vr/DX19YEoJARAhBvK2laytRGgjORlIyEYiMJLfJbxLdJbhLbJbRLaJbJbZLbAWxzHMcxzHMcxzHMDbBrYNbJraNbRrbPbh7dPbx7fOwHYjsZ2UzMZoM0maxbRbhQCi1NXW19fX19fW1QSAiBCDeVtK1laiNBGYjKRkIxEYSW+S3iW6S3CW2S2iW0S2S2yW2AtgLY5jmOY5jmOY5gbYNbJrZNbRraPbZ7cPbp7ePb52A7EdjOymZjW4e3D26e3j2+ZgMwmYhYxY4SEhISEBjKxlYiMJGAjAS3iW9TtynblO26dtUrap2zTtmnbNO2SW2S3isRWYGkG0EAItTW1/h8Phr6+rp6AtwtQs5mI9vntw9tHtk9s1LZqWzUto9tnts9uHt09vHt8zAZhMxCxixwkJCQkIDGVjKxEYSMBGAlvEt6nblO3Kdt0rap21TtmnbNO2SWyS2yW8ViKzA1A2ggBFqa2v8Ph8NfW1dPRFuFqMzGYjW+e3D20e2T2zUtk9tHto1tCzHYj2+e3T24e3D24a3DW4Nuc5znOc4FuBbhbcLbhLcJblO3CW4S3iMRGcrYVECcKYB+cJBoCjM2maDsZ7fPbp7cPbh7cNbhrcG3Oc5znOcC3C24W3C24S3CW5TtwluEt4jERnK2FRAnCmAfnCQaAoxb/7ePl8NbU09PT1NYKHy8Y/ZePl8NbU09PT1NYKHy8Y/4Z6+g1tjb3d+Rk5SVlZWVlZSTkd8Fu3s/b6es/pvX0Gtsbe7vyMnKSkrKysrKSciC8Fu3s/YKnrP9gqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqoqsqsqoFIVwqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqkqsqsqsFIV/Hn8XHj5/H4a+traurq6mpqampqampqampqampqampqampqamrq62tr/D4/Lx5/Fx4+fx+Gvra2rq6upqampqampqamrq6upqampqampqamrq6utra/w+Py/wCgEzNTc5OTs7PT09PT8/Pz09PT07Ozk3Ng9TMxLy0rKSclJSMhIb+9vbu9u7u7u7u7u729vb2/vyEjJSUnKSstLzEzNTc5OTs7Oz09PT8/Pz09PT07Ozk5NzUzMS8tKyknJSUjISG/v727vbu7u7u7u7u9u729v78hIyUlJykrLS8x0nR9H0fR9H0XRdF0XRdD0PQ9F0XRdF0XRdF0fR9H0nSdJ0vS9L0vTdN03TdP0/T9P0/T9P0/T9P0/T9R0/T9P0/T9P0/TdN03S9L0vS9J0nSdJ0fR9H0XRdF0PRdD0PQ9D0PRdF0XRdF0XR9H0fSdJ0nS9L0vS9N03TdN0/T9P0/T9P0/T9P0/T9P1HT9P0/T9P0/T9N03TdL0vS9L0vSS8tLy0tLS0rKysrKysrKysrKystLS0vLS8vLy8vMTExMTExMzMzMTMzMzM1NTUzMzMzMzMzMzExMTExMS8vLy8vLy8tKy0tKysrKysrKysrKysrLS0tLy0vLy8vLzExMTExMTMzMzEzMzMzNTU1MzMzMzMzMzMxMTExMTEvLy8vnOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5znOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5z/9YD//xAArEAEAAgIDAQABBAICAQUAAAAAAVICYgNRYQRBEEBQUzFCIDARYICQoLD/2gAIAQEAAz8A/wDgmhCEI/nYQj+RhjH5ccflxw44YMe0dtmzZs2bNmzZs2bIsjtiwlxy45/Ljn8se0fwuPbjj8uOPy44YQxR2izZs2bNmzZs2bNkWR2xYS45cc/lhP5Y9/wEQwj8sIRD1s2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNmyLMZYZMZ/KJ/dRDCPywhjCI/LZs2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNkWYywlhP5RP/ABj9hDGGMIh69bNmzZs2bNmzZsmybJsmybJsmybJsmybJsmybJs2bNmzZs2bNmzZ7+mMsZYyj9hDGGMIj9NmzZs2bNmzZs2bJsmybJsmybJs2TZNk2TZNk2bJs2bNmzZs2bNmzZ6iWMsXr16hiwYMGDBgwYo/T169/T162bNmzZs2TZNk2T2ntPae09pSlKUpSlPae09p7T2mybJsmzZs2bNmz17+nr16hiwYOPtx9uPtx9sO2DBih69evXr1s2bNmzZsmybJsmye09p7T2lKUpSlKU9p7T2ntNk2TZNmzZs2bNmz17+vr1s2bNmzZs2bNmzZs2evXr169bNmye09p7SlKUp/wC6UpSlKe09p7etmzZs9evWzZs2bNmzZs2bNmzZs2bPXr1s9bNmye09p7SlKUp/7pSlKUp7T29bPWz169evWzZs2bNmzZs2bNmzZs2bNmzZs2evU9plM/vJhMJ7T29bNnrZ62bNmzZs2bNmzZs2bNmzZs2bNnr39J7TKZ/eTCYT3+nr162bNnrZs2bJsntNk2TZPabNmzZs2etnr39JlM/wUwmP09etmzZs2bNk2TZNk2TZNk2bNmzZs2bNnv6TKZ/gphMfp69etk9p7T2ntKUpSlKUp7T2nt69e/pMpn+GmH/j9PXr1Pae09pSySlklKU9p7T29evf0mUz/DTCY/T16lP/AHSlKU/xUpSlP/dKUpT/ABUpT/8AQllKWTJl0y6ZdMumXTLpl0y6ZJSn+QlKWTJl0y6ZdMumXTLpl0y6ZJSn/sn9xKWXTLpn0z6Z9M+mXTLplVlVlVlVlVlVlVlVlVlVlRlVlVlRlVlVlVlVlVlVlVl0z6Z9M4/DPpn0z6ZdMkp/byll0y6Z9M+mfTPpn0y6ZVZVZVZVZVZVZVZVZUZVZUZVZVZVZVZVZVZVZVZVZVZdM+mfTOPwz6Z9M+mTJlVlVlVl0yZ9M2fTPpn0z6Z9M+mbPpn0z6Z9M2fTPpl0yqyqyqyqyqyomiaJomiaJomiaJomjRo0aNGjRo0aNGjRNE0TRNE0TRNE0TRNE0ZVZVZVZVZVZVZM+mbPpn0z6Z9M+mfTNn0z6Z9M+mfTPpl0y6ZVZVZVTVlVlRNE0TRlRNE0TRNE0TRo0aNGjRo0aNGjRomiaJomiaJomiaJomqaJqyq0TRNE0TRNE0TVNE1TVNU1TRNE1TVNU0TRNE0TRNGjRo0aNGjRhWHFHTgh88Pmj8Pnj/V89HBRwf1w4f64cNMXFSHFTFxUxcVIcP9cOGkOCkPno+ej55/D55cEuKemHUIo0aNGjRo0TRNE0TRNE0TVNE0TVNE1TVNE1TRNU0TRNE0TRNGjRo0aNGjRhWHFHThh88Pnj8Pnq+ejgo4P64cP9cOKkOKkOKmLipi4aYuH+uHBSHBSHz0fPR88/h88uCXFNWHUIo0aNGjRo4ZcU9MOoRRFGjRo0aNGjRo0aNGjRo0RRhVxR04IcGP4cGP+jij/GEMI/xjCP3+M/5xhxT/AJwhwT/o4Mv9XBk4p6YdQiiKNGjRo0aNGjRo0aNGjRoijGsOKOnBi4Mfw4I/0cUf4whhH+MYR+/xn/OMOKf84Q4J/wBHBP8Ar/zxrDCsOKkOKjhq4auGrhq4auGjipDjpDGsI/k8awwrDipDio4aOGrhq4auGrho4qQ46QxrCP8A0bHcMLQ47w4rw4buCzgs4O3A4HA4XA4HA4HA4O3BZwWcN3Fdx3hhaGNoR/Dx3DC0OO8OK8OG7gs4LODtwOBwOFwOBwOBwODtwWcFnDdxXcd4YWhjaEf88UftoQh4y6ZuRyuVzOZzeudz+uf1z+uf1z+uf1z+uf1zuf1z+uf1z+uf1z+udzR25nM5o7c3rlcrlZsniOkSj9tCEPGXTNyuVy+uZzOb1z+uf1z+uf1z+uf1z+uf1z+udz+uf1z+uf1z+uf1z+ueO3O5nM5vXK5XKzZPEdMUftoYsemHTDpx9OPpxVcVXDVw1cNXDVw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDVw1cNXFVxVcVXFVx9OPph0w6Yo/bQxY9MOnH04+nH04quKrhq4auGrhq4aOGjho4aOGjho4aOGkOGkOGkOGjho4aOGjho4aOGjhq4auGriq4quKriq4+nH0w6Ydf+wHgcLhcLicTjYdww7hh3DDuGPcMe4Y9ww7hh3DDuGHcONxuJxOFwuBwOB8753z2fPZ89nz3fNd893zXfPd893z3fP/Y+e757uC75/wCyHz/2Q+f+yHBd893z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDgcLhcLicTjYdww7hh3DDuGHcMe4Ydww7hh3DDuGHcONxuJxOFwuBwPnfO+d89nz2fPZ893zXfPd813z3fPd893z/2Pnu+e7gu+f8Ash8/9kPn/shwXcF3z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDdu3bt03bt26bpum6bpum6bt27du3bt26bt26bpum6bpum6bpum6bt03TdN26bpum6bpum7dN03TdN03TdN03TdN03Tdum7dum7dN27dum6bpum6bpum6bpum7du3bt03bpu3bpum6bpum6bpum6bpu3TdN03bpum6bpum6bt03TdN03TdN03TdN03TdN03TduysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysmzKzKzKybMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrJT+2lKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSn9tKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpT/wDrA//EAB0RAAMBAAMBAQEAAAAAAAAAAAABERIwQFAgkMD/2gAIAQIBAT8A/COlKioqKioqKi+zSoqKioqL59Ro0aKyvpVlZWaNFXiVGkaNFZWV9CsrNGjRpFXepo0V8c69Zo0u1pGilfVnJWaNF+NFXNUaNFfmU0aReamkaNPzNM19VlZWaKysrK/XrKzTNGjRWaKyv+u0/8QAHREBAQACAQUAAAAAAAAAAAAAEQBAUCAQITCQwP/aAAgBAwEBPwD1NkRER07eYiIiNMRERGARERGgIiNAREZRERoCIjiYBERqiIwiI1REcCIiIiIjbkREREREfXZ//9k=";l();l();var K6=!1;function x4(){return K6}o(x4,"isTestMode");var pp=class pp{constructor(t){f(this,"backgroundAlpha",1);f(this,"backgroundColor",new Mt);f(this,"width",0);f(this,"height",0);f(this,"options",{});f(this,"renderer");f(this,"enabledLayers",new Set([0,1]));f(this,"handleWebGLContextCreationError",o(t=>{var r,n;(n=(r=this.options).onWebGLContextCreationError)==null||n.call(r,t)},"handleWebGLContextCreationError"));f(this,"handleWebGLContextLost",o(t=>{var r,n;(n=(r=this.options).onWebGLContextLost)==null||n.call(r,t)},"handleWebGLContextLost"));f(this,"handleWebGLContextRestored",o(t=>{var r,n;(n=(r=this.options).onWebGLContextRestored)==null||n.call(r,t)},"handleWebGLContextRestored"));var r,n,i,a,u;try{this.options=t,x4()?(this.renderer={setSize:o(()=>{},"setSize"),state:{reset:o(()=>{},"reset")},properties:{get:o(()=>{},"get")},getSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getSize"),getDrawingBufferSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getDrawingBufferSize"),getClearAlpha:o(()=>1,"getClearAlpha"),getClearColor:o(()=>new Mt,"getClearColor"),autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:o(()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),"getContext"),readRenderTargetPixelsAsync:o(()=>Promise.resolve([]),"readRenderTargetPixelsAsync"),setRenderTarget:o(()=>{},"setRenderTarget"),setClearColor:o(()=>{},"setClearColor"),clear:o(()=>{},"clear"),render:o(()=>{},"render"),clearStencil:o(()=>{},"clearStencil"),clearDepth:o(()=>{},"clearDepth"),domElement:document.createElement("canvas"),capabilities:{isWebGL2:!0}},this.renderer.domElement.style.width="1920px",Object.defineProperty(this.renderer.domElement,"clientWidth",{value:1920}),this.renderer.domElement.style.height="1080px",Object.defineProperty(this.renderer.domElement,"clientHeight",{value:1080})):(this.renderer=new yy({canvas:t.canvas,alpha:t.alpha||!1,stencil:!0,antialias:typeof t.antialias=="boolean"?t.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new Mt((r=t.backgroundColor)!=null?r:"#ffffff"),this.backgroundAlpha=(n=t.backgroundAlpha)!=null?n:1}catch(c){De.error(c),t.onWebGLRendererError&&t.onWebGLRendererError(c)}(i=this.domElement())==null||i.addEventListener("webglcontextlost",this.handleWebGLContextLost),(a=this.domElement())==null||a.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(u=this.domElement())==null||u.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var t,r,n,i,a;this.renderer&&((r=(t=this.renderer).dispose)==null||r.call(t)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}render(t,r){if(this.renderer){this.renderer.state.reset(),r.layers.disableAll();for(let n of this.enabledLayers.values())r.layers.enable(n);this.renderer.clearStencil(),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,r),this.renderer.clearDepth(),r.layers.disableAll(),r.layers.enable(Hr.ALWAYS_ON_TOP_PATHS),this.renderer.render(t,r),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){y.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};o(pp,"Renderer");var Vc=pp;l();l();var E4='"use strict";(()=>{var Ya=Object.defineProperty,fl=Object.defineProperties;var pl=Object.getOwnPropertyDescriptors;var qa=Object.getOwnPropertySymbols;var gl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable;var Mr=(e,r,n)=>r in e?Ya(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,m=(e,r)=>{for(var n in r||(r={}))gl.call(r,n)&&Mr(e,n,r[n]);if(qa)for(var n of qa(r))vl.call(r,n)&&Mr(e,n,r[n]);return e},z=(e,r)=>fl(e,pl(r));var _e=(e,r)=>{for(var n in r)Ya(e,n,{get:r[n],enumerable:!0})};var M=(e,r,n)=>Mr(e,typeof r!="symbol"?r+"":r,n);function Qa(e,r){return r.x+r.w<e.x+e.w&&r.x>e.x&&r.y>e.y&&r.y+r.h<e.y+e.h}function Ha(e,r){let[n,i]=r;return n>=e.x&&n<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}function eu(e,r){let n=r.x,i=r.y,t=r.x+r.w,o=r.y+r.h,u=e.x,l=e.y,c=e.x+e.w,a=e.y+e.h;return n<c&&u<t&&i<a&&l<o}function ue(e,r){for(let n=0;n<r.length;n++)e.push(r[n])}var E=class{constructor(r,n,i,t,o){M(this,"x");M(this,"y");M(this,"w");M(this,"h");M(this,"userData");this.userData=typeof o>"u"?null:o,this.x=r,this.y=n,this.w=i,this.h=t}contains(r){return r===this?!1:Qa(this,r)}intersects(r){return eu(this,r)}intersectsPoint(r){return Ha(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var Me=class e{constructor(r,n){M(this,"topLeft");M(this,"topRight");M(this,"bottomLeft");M(this,"bottomRight");M(this,"divided",!1);M(this,"boundary");M(this,"capacity",16);M(this,"objects",[]);M(this,"parent");this.parent=n,this.boundary=r}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:r,y:n,w:i,h:t}=this.boundary;this.topLeft=new e(new E(r,n,i/2,t/2),this),this.topRight=new e(new E(r+i/2,n,i/2,t/2),this),this.bottomLeft=new e(new E(r,n+t/2,i/2,t/2),this),this.bottomRight=new e(new E(r+i/2,n+t/2,i/2,t/2),this),this.divided=!0}queryRect(r){let n=[];if(this.boundary.intersects(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryRect(r)),ue(n,this.topRight.queryRect(r)),ue(n,this.bottomLeft.queryRect(r)),ue(n,this.bottomRight.queryRect(r))),n}queryPoint(r){let n=[];if(this.boundary.intersectsPoint(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryPoint(r)),ue(n,this.topRight.queryPoint(r)),ue(n,this.bottomLeft.queryPoint(r)),ue(n,this.bottomRight.queryPoint(r))),n}insert(r){return(this.parent?!this.boundary.contains(r):!this.boundary.intersects(r))?!1:this.objects.length<this.capacity?(this.objects.push(r),!0):(this.divided||this.subdivide(),(this.topLeft.insert(r)||this.topRight.insert(r)||this.bottomLeft.insert(r)||this.bottomRight.insert(r))===!1&&this.objects.push(r),!0)}drawObjects(r){this.objects.forEach(n=>n.draw(r)),this.divided&&(this.topLeft.drawObjects(r),this.topRight.drawObjects(r),this.bottomLeft.drawObjects(r),this.bottomRight.drawObjects(r))}draw(r){r.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(r),this.topRight.draw(r),this.bottomLeft.draw(r),this.bottomRight.draw(r)),r.strokeStyle="black",r.lineWidth=4,r.stroke()}};var Fe={};_e(Fe,{$brand:()=>Pt,$input:()=>lo,$output:()=>co,NEVER:()=>Br,TimePrecision:()=>fo,ZodAny:()=>Oc,ZodArray:()=>Zc,ZodBase64:()=>Ua,ZodBase64URL:()=>Na,ZodBigInt:()=>Ot,ZodBigIntFormat:()=>Ta,ZodBoolean:()=>jt,ZodCIDRv4:()=>Oa,ZodCIDRv6:()=>Pa,ZodCUID:()=>xa,ZodCUID2:()=>ka,ZodCatch:()=>Qc,ZodCodec:()=>Ba,ZodCustom:()=>Ar,ZodCustomStringFormat:()=>wt,ZodDate:()=>Dr,ZodDefault:()=>Kc,ZodDiscriminatedUnion:()=>Dc,ZodE164:()=>Za,ZodEmail:()=>ba,ZodEmoji:()=>_a,ZodEnum:()=>zt,ZodError:()=>Bd,ZodFile:()=>Jc,ZodFirstPartyTypeKind:()=>Ka,ZodFunction:()=>ul,ZodGUID:()=>Or,ZodIPv4:()=>Sa,ZodIPv6:()=>ja,ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,ZodIntersection:()=>Tc,ZodIssueCode:()=>rf,ZodJWT:()=>Da,ZodKSUID:()=>wa,ZodLazy:()=>il,ZodLiteral:()=>Fc,ZodMap:()=>Cc,ZodNaN:()=>el,ZodNanoID:()=>ya,ZodNever:()=>Uc,ZodNonOptional:()=>Ja,ZodNull:()=>Sc,ZodNullable:()=>Bc,ZodNumber:()=>St,ZodNumberFormat:()=>Ve,ZodObject:()=>Er,ZodOptional:()=>Fa,ZodPipe:()=>Ma,ZodPrefault:()=>Wc,ZodPromise:()=>al,ZodReadonly:()=>tl,ZodRealError:()=>X,ZodRecord:()=>La,ZodSet:()=>Vc,ZodString:()=>It,ZodStringFormat:()=>A,ZodSuccess:()=>Yc,ZodSymbol:()=>Ic,ZodTemplateLiteral:()=>nl,ZodTransform:()=>Mc,ZodTuple:()=>Ac,ZodType:()=>U,ZodULID:()=>za,ZodURL:()=>Zr,ZodUUID:()=>de,ZodUndefined:()=>wc,ZodUnion:()=>Aa,ZodUnknown:()=>Pc,ZodVoid:()=>Nc,ZodXID:()=>Ia,_ZodString:()=>$a,_default:()=>Gc,_function:()=>Xm,any:()=>Om,array:()=>Tr,base64:()=>mm,base64url:()=>fm,bigint:()=>zm,boolean:()=>zc,catch:()=>Hc,check:()=>qm,cidrv4:()=>sm,cidrv6:()=>dm,clone:()=>K,codec:()=>Km,coerce:()=>Rr,config:()=>L,core:()=>ae,cuid:()=>nm,cuid2:()=>im,custom:()=>Ym,date:()=>Um,decode:()=>la,decodeAsync:()=>da,discriminatedUnion:()=>Em,e164:()=>pm,email:()=>Gd,emoji:()=>tm,encode:()=>ca,encodeAsync:()=>sa,endsWith:()=>vt,enum:()=>Ca,file:()=>Fm,flattenError:()=>He,float32:()=>_m,float64:()=>ym,formatError:()=>et,function:()=>Xm,getErrorMap:()=>of,globalRegistry:()=>oe,gt:()=>le,gte:()=>W,guid:()=>Wd,hash:()=>bm,hex:()=>$m,hostname:()=>hm,httpUrl:()=>em,includes:()=>pt,instanceof:()=>Qm,int:()=>ha,int32:()=>xm,int64:()=>Im,intersection:()=>Ec,ipv4:()=>cm,ipv6:()=>lm,iso:()=>kt,json:()=>ef,jwt:()=>gm,keyof:()=>Nm,ksuid:()=>um,lazy:()=>ol,length:()=>Re,literal:()=>Vm,locales:()=>ze,looseObject:()=>Tm,lowercase:()=>mt,lt:()=>ce,lte:()=>H,map:()=>Rm,maxLength:()=>Ae,maxSize:()=>Ee,mime:()=>ht,minLength:()=>$e,minSize:()=>we,multipleOf:()=>Ie,nan:()=>Bm,nanoid:()=>rm,nativeEnum:()=>Cm,negative:()=>Fo,never:()=>Ea,nonnegative:()=>Mo,nonoptional:()=>qc,nonpositive:()=>Jo,normalize:()=>$t,null:()=>jc,nullable:()=>Ur,nullish:()=>Jm,number:()=>kc,object:()=>Zm,optional:()=>Pr,overwrite:()=>se,parse:()=>ia,parseAsync:()=>oa,partialRecord:()=>Am,pipe:()=>Nr,positive:()=>Vo,prefault:()=>Xc,preprocess:()=>tf,prettifyError:()=>rn,promise:()=>Wm,property:()=>Bo,readonly:()=>rl,record:()=>Lc,refine:()=>cl,regex:()=>dt,regexes:()=>Q,registry:()=>ir,safeDecode:()=>fa,safeDecodeAsync:()=>ga,safeEncode:()=>ma,safeEncodeAsync:()=>pa,safeParse:()=>aa,safeParseAsync:()=>ua,set:()=>Lm,setErrorMap:()=>nf,size:()=>st,startsWith:()=>gt,strictObject:()=>Dm,string:()=>va,stringFormat:()=>vm,stringbool:()=>Hm,success:()=>Mm,superRefine:()=>ll,symbol:()=>Sm,templateLiteral:()=>Gm,toJSONSchema:()=>Qo,toLowerCase:()=>_t,toUpperCase:()=>yt,transform:()=>Va,treeifyError:()=>tn,trim:()=>bt,tuple:()=>Rc,uint32:()=>km,uint64:()=>wm,ulid:()=>om,undefined:()=>jm,union:()=>Ra,unknown:()=>Ce,uppercase:()=>ft,url:()=>Hd,util:()=>_,uuid:()=>Xd,uuidv4:()=>qd,uuidv6:()=>Yd,uuidv7:()=>Qd,void:()=>Pm,xid:()=>am});var ae={};_e(ae,{$ZodAny:()=>Ui,$ZodArray:()=>Ei,$ZodAsyncError:()=>te,$ZodBase64:()=>yi,$ZodBase64URL:()=>xi,$ZodBigInt:()=>Qt,$ZodBigIntFormat:()=>Si,$ZodBoolean:()=>it,$ZodCIDRv4:()=>$i,$ZodCIDRv6:()=>bi,$ZodCUID:()=>ui,$ZodCUID2:()=>ci,$ZodCatch:()=>Hi,$ZodCheck:()=>R,$ZodCheckBigIntFormat:()=>An,$ZodCheckEndsWith:()=>Xn,$ZodCheckGreaterThan:()=>Bt,$ZodCheckIncludes:()=>Gn,$ZodCheckLengthEquals:()=>Jn,$ZodCheckLessThan:()=>Mt,$ZodCheckLowerCase:()=>Bn,$ZodCheckMaxLength:()=>Vn,$ZodCheckMaxSize:()=>Rn,$ZodCheckMimeType:()=>Yn,$ZodCheckMinLength:()=>Fn,$ZodCheckMinSize:()=>Ln,$ZodCheckMultipleOf:()=>Tn,$ZodCheckNumberFormat:()=>En,$ZodCheckOverwrite:()=>Qn,$ZodCheckProperty:()=>qn,$ZodCheckRegex:()=>Mn,$ZodCheckSizeEquals:()=>Cn,$ZodCheckStartsWith:()=>Wn,$ZodCheckStringFormat:()=>De,$ZodCheckUpperCase:()=>Kn,$ZodCodec:()=>ot,$ZodCustom:()=>uo,$ZodCustomStringFormat:()=>Ii,$ZodDate:()=>Ti,$ZodDefault:()=>Xi,$ZodDiscriminatedUnion:()=>Ri,$ZodE164:()=>ki,$ZodEmail:()=>ni,$ZodEmoji:()=>oi,$ZodEncodeError:()=>me,$ZodEnum:()=>Ji,$ZodError:()=>Qe,$ZodFile:()=>Bi,$ZodFunction:()=>io,$ZodGUID:()=>ti,$ZodIPv4:()=>vi,$ZodIPv6:()=>hi,$ZodISODate:()=>fi,$ZodISODateTime:()=>mi,$ZodISODuration:()=>gi,$ZodISOTime:()=>pi,$ZodIntersection:()=>Li,$ZodJWT:()=>zi,$ZodKSUID:()=>di,$ZodLazy:()=>ao,$ZodLiteral:()=>Mi,$ZodMap:()=>Vi,$ZodNaN:()=>eo,$ZodNanoID:()=>ai,$ZodNever:()=>Zi,$ZodNonOptional:()=>Yi,$ZodNull:()=>Pi,$ZodNullable:()=>Wi,$ZodNumber:()=>Yt,$ZodNumberFormat:()=>wi,$ZodObject:()=>wu,$ZodObjectJIT:()=>Ai,$ZodOptional:()=>Gi,$ZodPipe:()=>to,$ZodPrefault:()=>qi,$ZodPromise:()=>oo,$ZodReadonly:()=>ro,$ZodRealError:()=>G,$ZodRecord:()=>Ci,$ZodRegistry:()=>Te,$ZodSet:()=>Fi,$ZodString:()=>ke,$ZodStringFormat:()=>T,$ZodSuccess:()=>Qi,$ZodSymbol:()=>ji,$ZodTemplateLiteral:()=>no,$ZodTransform:()=>Ki,$ZodTuple:()=>er,$ZodType:()=>O,$ZodULID:()=>li,$ZodURL:()=>ii,$ZodUUID:()=>ri,$ZodUndefined:()=>Oi,$ZodUnion:()=>Ht,$ZodUnknown:()=>Ni,$ZodVoid:()=>Di,$ZodXID:()=>si,$brand:()=>Pt,$constructor:()=>d,$input:()=>lo,$output:()=>co,Doc:()=>nt,JSONSchema:()=>Ho,JSONSchemaGenerator:()=>xt,NEVER:()=>Br,TimePrecision:()=>fo,_any:()=>Do,_array:()=>Ko,_base64:()=>yr,_base64url:()=>xr,_bigint:()=>So,_boolean:()=>Io,_catch:()=>Rd,_check:()=>_c,_cidrv4:()=>br,_cidrv6:()=>_r,_coercedBigint:()=>jo,_coercedBoolean:()=>wo,_coercedDate:()=>Lo,_coercedNumber:()=>bo,_coercedString:()=>mo,_cuid:()=>mr,_cuid2:()=>fr,_custom:()=>Wo,_date:()=>Ro,_decode:()=>Et,_decodeAsync:()=>Rt,_default:()=>Td,_discriminatedUnion:()=>kd,_e164:()=>kr,_email:()=>or,_emoji:()=>sr,_encode:()=>Tt,_encodeAsync:()=>At,_endsWith:()=>vt,_enum:()=>Od,_file:()=>Go,_float32:()=>yo,_float64:()=>xo,_gt:()=>le,_gte:()=>W,_guid:()=>ct,_includes:()=>pt,_int:()=>_o,_int32:()=>ko,_int64:()=>Oo,_intersection:()=>zd,_ipv4:()=>hr,_ipv6:()=>$r,_isoDate:()=>go,_isoDateTime:()=>po,_isoDuration:()=>ho,_isoTime:()=>vo,_jwt:()=>zr,_ksuid:()=>vr,_lazy:()=>Fd,_length:()=>Re,_literal:()=>Ud,_lowercase:()=>mt,_lt:()=>ce,_lte:()=>H,_map:()=>Sd,_max:()=>H,_maxLength:()=>Ae,_maxSize:()=>Ee,_mime:()=>ht,_min:()=>W,_minLength:()=>$e,_minSize:()=>we,_multipleOf:()=>Ie,_nan:()=>Co,_nanoid:()=>dr,_nativeEnum:()=>Pd,_negative:()=>Fo,_never:()=>Eo,_nonnegative:()=>Mo,_nonoptional:()=>Ed,_nonpositive:()=>Jo,_normalize:()=>$t,_null:()=>Zo,_nullable:()=>Dd,_number:()=>$o,_optional:()=>Zd,_overwrite:()=>se,_parse:()=>Pe,_parseAsync:()=>Ue,_pipe:()=>Ld,_positive:()=>Vo,_promise:()=>Jd,_property:()=>Bo,_readonly:()=>Cd,_record:()=>wd,_refine:()=>Xo,_regex:()=>dt,_safeDecode:()=>Ct,_safeDecodeAsync:()=>Ft,_safeEncode:()=>Lt,_safeEncodeAsync:()=>Vt,_safeParse:()=>Ne,_safeParseAsync:()=>Ze,_set:()=>jd,_size:()=>st,_startsWith:()=>gt,_string:()=>so,_stringFormat:()=>Le,_stringbool:()=>Yo,_success:()=>Ad,_superRefine:()=>qo,_symbol:()=>Uo,_templateLiteral:()=>Vd,_toLowerCase:()=>_t,_toUpperCase:()=>yt,_transform:()=>Nd,_trim:()=>bt,_tuple:()=>Id,_uint32:()=>zo,_uint64:()=>Po,_ulid:()=>pr,_undefined:()=>No,_union:()=>xd,_unknown:()=>To,_uppercase:()=>ft,_url:()=>lt,_uuid:()=>ar,_uuidv4:()=>ur,_uuidv6:()=>cr,_uuidv7:()=>lr,_void:()=>Ao,_xid:()=>gr,clone:()=>K,config:()=>L,decode:()=>Ml,decodeAsync:()=>Kl,encode:()=>Jl,encodeAsync:()=>Bl,flattenError:()=>He,formatError:()=>et,globalConfig:()=>Be,globalRegistry:()=>oe,isValidBase64:()=>_i,isValidBase64URL:()=>xu,isValidJWT:()=>ku,locales:()=>ze,parse:()=>Zt,parseAsync:()=>Dt,prettifyError:()=>rn,regexes:()=>Q,registry:()=>ir,safeDecode:()=>Wl,safeDecodeAsync:()=>ql,safeEncode:()=>Gl,safeEncodeAsync:()=>Xl,safeParse:()=>nn,safeParseAsync:()=>on,toDotPath:()=>ou,toJSONSchema:()=>Qo,treeifyError:()=>tn,util:()=>_,version:()=>Hn});var Br=Object.freeze({status:"aborted"});function d(e,r,n){var l;function i(c,a){var v,f;var s;Object.defineProperty(c,"_zod",{value:(v=c._zod)!=null?v:{},enumerable:!1}),(f=(s=c._zod).traits)!=null||(s.traits=new Set),c._zod.traits.add(e),r(c,a);for(let h in u.prototype)h in c||Object.defineProperty(c,h,{value:u.prototype[h].bind(c)});c._zod.constr=u,c._zod.def=a}let t=(l=n==null?void 0:n.Parent)!=null?l:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function u(c){var v;var a;let s=n!=null&&n.Parent?new o:this;i(s,c),(v=(a=s._zod).deferred)!=null||(a.deferred=[]);for(let f of s._zod.deferred)f();return s}return Object.defineProperty(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:c=>{var a,s;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(s=(a=c==null?void 0:c._zod)==null?void 0:a.traits)==null?void 0:s.has(e)}}),Object.defineProperty(u,"name",{value:e}),u}var Pt=Symbol("zod_brand"),te=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},me=class extends Error{constructor(r){super("Encountered unidirectional transform during encode: ".concat(r)),this.name="ZodEncodeError"}},Be={};function L(e){return e&&Object.assign(Be,e),Be}var _={};_e(_,{BIGINT_FORMAT_RANGES:()=>en,Class:()=>Gr,NUMBER_FORMAT_RANGES:()=>Hr,aborted:()=>he,allowsEval:()=>Xr,assert:()=>yl,assertEqual:()=>hl,assertIs:()=>bl,assertNever:()=>_l,assertNotEqual:()=>$l,assignProp:()=>pe,base64ToUint8Array:()=>ru,base64urlToUint8Array:()=>Rl,cached:()=>je,captureStackTrace:()=>Nt,cleanEnum:()=>Al,cleanRegex:()=>We,clone:()=>K,cloneDef:()=>kl,createTransparentProxy:()=>Ol,defineLazy:()=>Z,esc:()=>Ut,escapeRegex:()=>ie,extend:()=>Nl,finalizeIssue:()=>Y,floatSafeRemainder:()=>Wr,getElementAtPath:()=>zl,getEnumValues:()=>Ge,getLengthableOrigin:()=>Ye,getParsedType:()=>jl,getSizableOrigin:()=>qe,hexToUint8Array:()=>Cl,isObject:()=>ye,isPlainObject:()=>ve,issue:()=>Oe,joinValues:()=>p,jsonStringifyReplacer:()=>Se,merge:()=>Dl,mergeDefs:()=>ge,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>Sl,objectClone:()=>xl,omit:()=>Ul,optionalKeys:()=>Qr,partial:()=>Tl,pick:()=>Pl,prefixIssues:()=>q,primitiveTypes:()=>Yr,promiseAllObject:()=>Il,propertyKeyTypes:()=>Xe,randomString:()=>wl,required:()=>El,safeExtend:()=>Zl,shallowClone:()=>qr,stringifyPrimitive:()=>b,uint8ArrayToBase64:()=>nu,uint8ArrayToBase64url:()=>Ll,uint8ArrayToHex:()=>Vl,unwrapMessage:()=>Ke});function hl(e){return e}function $l(e){return e}function bl(e){}function _l(e){throw new Error}function yl(e){}function Ge(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function p(e,r="|"){return e.map(n=>b(n)).join(r)}function Se(e,r){return typeof r=="bigint"?r.toString():r}function je(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(e){return e==null}function We(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Wr(e,r){let n=(e.toString().split(".")[1]||"").length,i=r.toString(),t=(i.split(".")[1]||"").length;if(t===0&&/\\d?e-\\d?/.test(i)){let c=i.match(/\\d?e-(\\d?)/);c!=null&&c[1]&&(t=Number.parseInt(c[1]))}let o=n>t?n:t,u=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(r.toFixed(o).replace(".",""));return u%l/10**o}var tu=Symbol("evaluating");function Z(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==tu)return i===void 0&&(i=tu,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function xl(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pe(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ge(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function kl(e){return ge(e._zod.def)}function zl(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function Il(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<r.length;o++)t[r[o]]=i[o];return t})}function wl(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function Ut(e){return JSON.stringify(e)}var Nt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xr=je(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let r=Function;return new r(""),!0}catch(r){return!1}});function ve(e){if(ye(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(ye(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function qr(e){return ve(e)?m({},e):Array.isArray(e)?[...e]:e}function Sl(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var jl=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error("Unknown data type: ".concat(r))}},Xe=new Set(["string","number","symbol"]),Yr=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ie(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function K(e,r,n){let i=new e._zod.constr(r!=null?r:e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function y(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?z(m({},r),{error:()=>r.error}):r}function Ol(e){let r;return new Proxy({},{get(n,i,t){return r!=null||(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r!=null||(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r!=null||(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r!=null||(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r!=null||(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r!=null||(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r!=null||(r=e()),Reflect.defineProperty(r,i,t)}})}function b(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?\'"\'.concat(e,\'"\'):"".concat(e)}function Qr(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var Hr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},en={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Pl(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t={};for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&(t[o]=n.shape[o])}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Ul(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t=m({},e._zod.def.shape);for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&delete t[o]}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Nl(e,r){if(!ve(r))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let t=ge(e._zod.def,{get shape(){let o=m(m({},e._zod.def.shape),r);return pe(this,"shape",o),o},checks:[]});return K(e,t)}function Zl(e,r){if(!ve(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=z(m({},e._zod.def),{get shape(){let i=m(m({},e._zod.def.shape),r);return pe(this,"shape",i),i},checks:e._zod.def.checks});return K(e,n)}function Dl(e,r){let n=ge(e._zod.def,{get shape(){let i=m(m({},e._zod.def.shape),r._zod.def.shape);return pe(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return K(e,n)}function Tl(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in t))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=e?new e({type:"optional",innerType:t[u]}):t[u])}else for(let u in t)o[u]=e?new e({type:"optional",innerType:t[u]}):t[u];return pe(this,"shape",o),o},checks:[]});return K(r,i)}function El(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in o))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=new e({type:"nonoptional",innerType:t[u]}))}else for(let u in t)o[u]=new e({type:"nonoptional",innerType:t[u]});return pe(this,"shape",o),o},checks:[]});return K(r,i)}function he(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function q(e,r){return r.map(n=>{var t;var i;return(t=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function Ke(e){return typeof e=="string"?e:e==null?void 0:e.message}function Y(e,r,n){var t,o,u,l,c,a,s,v,f,h,x;let i=z(m({},e),{path:(t=e.path)!=null?t:[]});if(!e.message){let S=(x=(h=(v=(a=Ke((l=(u=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:u.error)==null?void 0:l.call(u,e)))!=null?a:Ke((c=r==null?void 0:r.error)==null?void 0:c.call(r,e)))!=null?v:Ke((s=n.customError)==null?void 0:s.call(n,e)))!=null?h:Ke((f=n.localeError)==null?void 0:f.call(n,e)))!=null?x:"Invalid input";i.message=S}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function qe(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ye(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Oe(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:m({},r)}function Al(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function ru(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}function nu(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function Rl(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return ru(r+n)}function Ll(e){return nu(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function Cl(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let i=0;i<r.length;i+=2)n[i/2]=Number.parseInt(r.slice(i,i+2),16);return n}function Vl(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}var Gr=class{constructor(...r){}};var iu=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Se,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qe=d("$ZodError",iu),G=d("$ZodError",iu,{Parent:Error});function He(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function et(e,r=n=>n.message){let n={_errors:[]},i=t=>{for(let o of t.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(u=>i({issues:u}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let u=n,l=0;for(;l<o.path.length;){let c=o.path[l];l===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],l++}}};return i(e),n}function tn(e,r=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var c,a,s,v;var u,l;for(let f of t.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(h=>i({issues:h},f.path));else if(f.code==="invalid_key")i({issues:f.issues},f.path);else if(f.code==="invalid_element")i({issues:f.issues},f.path);else{let h=[...o,...f.path];if(h.length===0){n.errors.push(r(f));continue}let x=n,S=0;for(;S<h.length;){let I=h[S],C=S===h.length-1;typeof I=="string"?((c=x.properties)!=null||(x.properties={}),(a=(u=x.properties)[I])!=null||(u[I]={errors:[]}),x=x.properties[I]):((s=x.items)!=null||(x.items=[]),(v=(l=x.items)[I])!=null||(l[I]={errors:[]}),x=x.items[I]),C&&x.errors.push(r(f)),S++}}};return i(e),n}function ou(e){let r=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push("[".concat(i,"]")):typeof i=="symbol"?r.push("[".concat(JSON.stringify(String(i)),"]")):/[^\\w$]/.test(i)?r.push("[".concat(JSON.stringify(i),"]")):(r.length&&r.push("."),r.push(i));return r.join("")}function rn(e){var i;let r=[],n=[...e.issues].sort((t,o)=>{var u,l;return((u=t.path)!=null?u:[]).length-((l=o.path)!=null?l:[]).length});for(let t of n)r.push("\\u2716 ".concat(t.message)),(i=t.path)!=null&&i.length&&r.push(" \\u2192 at ".concat(ou(t.path)));return r.join("\\n")}var Pe=e=>(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!1}):{async:!1},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new te;if(u.issues.length){let c=new((l=t==null?void 0:t.Err)!=null?l:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Zt=Pe(G),Ue=e=>async(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!0}):{async:!0},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new((l=t==null?void 0:t.Err)!=null?l:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Dt=Ue(G),Ne=e=>(r,n,i)=>{let t=i?z(m({},i),{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new te;return o.issues.length?{success:!1,error:new(e!=null?e:Qe)(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},nn=Ne(G),Ze=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},on=Ze(G),Tt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pe(e)(r,n,t)},Jl=Tt(G),Et=e=>(r,n,i)=>Pe(e)(r,n,i),Ml=Et(G),At=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ue(e)(r,n,t)},Bl=At(G),Rt=e=>async(r,n,i)=>Ue(e)(r,n,i),Kl=Rt(G),Lt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ne(e)(r,n,t)},Gl=Lt(G),Ct=e=>(r,n,i)=>Ne(e)(r,n,i),Wl=Ct(G),Vt=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ze(e)(r,n,t)},Xl=Vt(G),Ft=e=>async(r,n,i)=>Ze(e)(r,n,i),ql=Ft(G);var Q={};_e(Q,{base64:()=>_n,base64url:()=>Jt,bigint:()=>Sn,boolean:()=>Pn,browserEmail:()=>is,cidrv4:()=>$n,cidrv6:()=>bn,cuid:()=>an,cuid2:()=>un,date:()=>kn,datetime:()=>In,domain:()=>as,duration:()=>mn,e164:()=>xn,email:()=>pn,emoji:()=>gn,extendedDuration:()=>Yl,guid:()=>fn,hex:()=>us,hostname:()=>yn,html5Email:()=>ts,idnEmail:()=>ns,integer:()=>jn,ipv4:()=>vn,ipv6:()=>hn,ksuid:()=>sn,lowercase:()=>Zn,md5_base64:()=>ls,md5_base64url:()=>ss,md5_hex:()=>cs,nanoid:()=>dn,null:()=>Un,number:()=>On,rfc5322Email:()=>rs,sha1_base64:()=>ms,sha1_base64url:()=>fs,sha1_hex:()=>ds,sha256_base64:()=>gs,sha256_base64url:()=>vs,sha256_hex:()=>ps,sha384_base64:()=>$s,sha384_base64url:()=>bs,sha384_hex:()=>hs,sha512_base64:()=>ys,sha512_base64url:()=>xs,sha512_hex:()=>_s,string:()=>wn,time:()=>zn,ulid:()=>cn,undefined:()=>Nn,unicodeEmail:()=>au,uppercase:()=>Dn,uuid:()=>xe,uuid4:()=>Ql,uuid6:()=>Hl,uuid7:()=>es,xid:()=>ln});var an=/^[cC][^\\s-]{8,}$/,un=/^[0-9a-z]+$/,cn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ln=/^[0-9a-vA-V]{20}$/,sn=/^[A-Za-z0-9]{27}$/,dn=/^[a-zA-Z0-9_-]{21}$/,mn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Yl=/^[-+]?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)?)??$/,fn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xe=e=>e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(e,"[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$")):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ql=xe(4),Hl=xe(6),es=xe(7),pn=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,ts=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rs=/^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,au=new RegExp(\'^[^\\\\s@"]{1,64}@[^\\\\s@]{1,255}$\',"u"),ns=au,is=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,os="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$";function gn(){return new RegExp(os,"u")}var vn=/^(?:(?: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])$/,hn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,bn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_n=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jt=/^[A-Za-z0-9_-]*$/,yn=/^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/,as=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,xn=/^\\+(?:[0-9]){6,14}[0-9]$/,uu="(?:(?:\\\\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])))",kn=new RegExp("^".concat(uu,"$"));function cu(e){let r="(?:[01]\\\\d|2[0-3]):[0-5]\\\\d";return typeof e.precision=="number"?e.precision===-1?"".concat(r):e.precision===0?"".concat(r,":[0-5]\\\\d"):"".concat(r,":[0-5]\\\\d\\\\.\\\\d{").concat(e.precision,"}"):"".concat(r,"(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?")}function zn(e){return new RegExp("^".concat(cu(e),"$"))}function In(e){let r=cu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)");let i="".concat(r,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(uu,"T(?:").concat(i,")$"))}var wn=e=>{var n,i;let r=e?"[\\\\s\\\\S]{".concat((n=e==null?void 0:e.minimum)!=null?n:0,",").concat((i=e==null?void 0:e.maximum)!=null?i:"","}"):"[\\\\s\\\\S]*";return new RegExp("^".concat(r,"$"))},Sn=/^-?\\d+n?$/,jn=/^-?\\d+$/,On=/^-?\\d+(?:\\.\\d+)?/,Pn=/^(?:true|false)$/i,Un=/^null$/i;var Nn=/^undefined$/i;var Zn=/^[^A-Z]*$/,Dn=/^[^a-z]*$/,us=/^[0-9a-fA-F]*$/;function tt(e,r){return new RegExp("^[A-Za-z0-9+/]{".concat(e,"}").concat(r,"$"))}function rt(e){return new RegExp("^[A-Za-z0-9_-]{".concat(e,"}$"))}var cs=/^[0-9a-fA-F]{32}$/,ls=tt(22,"=="),ss=rt(22),ds=/^[0-9a-fA-F]{40}$/,ms=tt(27,"="),fs=rt(27),ps=/^[0-9a-fA-F]{64}$/,gs=tt(43,"="),vs=rt(43),hs=/^[0-9a-fA-F]{96}$/,$s=tt(64,""),bs=rt(64),_s=/^[0-9a-fA-F]{128}$/,ys=tt(86,"=="),xs=rt(86);var R=d("$ZodCheck",(e,r)=>{var i,t;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=r,(t=(n=e._zod).onattach)!=null||(n.onattach=[])}),su={number:"number",bigint:"bigint",object:"date"},Mt=d("$ZodCheckLessThan",(e,r)=>{R.init(e,r);let n=su[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.maximum:t.exclusiveMaximum)!=null?u:Number.POSITIVE_INFINITY;r.value<o&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Bt=d("$ZodCheckGreaterThan",(e,r)=>{R.init(e,r);let n=su[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.minimum:t.exclusiveMinimum)!=null?u:Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Tn=d("$ZodCheckMultipleOf",(e,r)=>{R.init(e,r),e._zod.onattach.push(n=>{var t;var i;(t=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Wr(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),En=d("$ZodCheckNumberFormat",(e,r)=>{var u;R.init(e,r),r.format=r.format||"float64";let n=(u=r.format)==null?void 0:u.includes("int"),i=n?"int":"number",[t,o]=Hr[r.format];e._zod.onattach.push(l=>{let c=l._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o,n&&(c.pattern=jn)}),e._zod.check=l=>{let c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort}):l.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort});return}}c<t&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),c>o&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),An=d("$ZodCheckBigIntFormat",(e,r)=>{R.init(e,r);let[n,i]=en[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Rn=d("$ZodCheckMaxSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;o.size<=r.maximum||t.issues.push({origin:qe(o),code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Ln=d("$ZodCheckMinSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;o.size>=r.minimum||t.issues.push({origin:qe(o),code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Cn=d("$ZodCheckSizeEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.size,o.maximum=r.size,o.size=r.size}),e._zod.check=t=>{let o=t.value,u=o.size;if(u===r.size)return;let l=u>r.size;t.issues.push(z(m({origin:qe(o)},l?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Vn=d("$ZodCheckMaxLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;if(o.length<=r.maximum)return;let l=Ye(o);t.issues.push({origin:l,code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Fn=d("$ZodCheckMinLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;if(o.length>=r.minimum)return;let l=Ye(o);t.issues.push({origin:l,code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Jn=d("$ZodCheckLengthEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.length,o.maximum=r.length,o.length=r.length}),e._zod.check=t=>{let o=t.value,u=o.length;if(u===r.length)return;let l=Ye(o),c=u>r.length;t.issues.push(z(m({origin:l},c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),De=d("$ZodCheckStringFormat",(e,r)=>{var t,o;var n,i;R.init(e,r),e._zod.onattach.push(u=>{var c;let l=u._zod.bag;l.format=r.format,r.pattern&&((c=l.patterns)!=null||(l.patterns=new Set),l.patterns.add(r.pattern))}),r.pattern?(t=(n=e._zod).check)!=null||(n.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push(z(m({origin:"string",code:"invalid_format",format:r.format,input:u.value},r.pattern?{pattern:r.pattern.toString()}:{}),{inst:e,continue:!r.abort}))}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),Mn=d("$ZodCheckRegex",(e,r)=>{De.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Bn=d("$ZodCheckLowerCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Zn),De.init(e,r)}),Kn=d("$ZodCheckUpperCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Dn),De.init(e,r)}),Gn=d("$ZodCheckIncludes",(e,r)=>{R.init(e,r);let n=ie(r.includes),i=new RegExp(typeof r.position=="number"?"^.{".concat(r.position,"}").concat(n):n);r.pattern=i,e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Wn=d("$ZodCheckStartsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp("^".concat(ie(r.prefix),".*"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.startsWith(r.prefix)||t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:t.value,inst:e,continue:!r.abort})}}),Xn=d("$ZodCheckEndsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp(".*".concat(ie(r.suffix),"$"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.endsWith(r.suffix)||t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:t.value,inst:e,continue:!r.abort})}});function lu(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues))}var qn=d("$ZodCheckProperty",(e,r)=>{R.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>lu(t,n,r.property));lu(i,n,r.property)}}),Yn=d("$ZodCheckMimeType",(e,r)=>{R.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Qn=d("$ZodCheckOverwrite",(e,r)=>{R.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var nt=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split("\\n").filter(u=>u),t=Math.min(...i.map(u=>u.length-u.trimStart().length)),o=i.map(u=>u.slice(t)).map(u=>" ".repeat(this.indent*2)+u);for(let u of o)this.content.push(u)}compile(){var o;let r=Function,n=this==null?void 0:this.args,t=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(u=>" ".concat(u))];return new r(...n,t.join("\\n"))}};var Hn={major:4,minor:1,patch:12};var O=d("$ZodType",(e,r)=>{var t,o,u;var n;e!=null||(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Hn;let i=[...(t=e._zod.def.checks)!=null?t:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let l of i)for(let c of l._zod.onattach)c(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(u=e._zod.deferred)==null||u.push(()=>{e._zod.run=e._zod.parse});else{let l=(a,s,v)=>{let f=he(a),h;for(let x of s){if(x._zod.def.when){if(!x._zod.def.when(a))continue}else if(f)continue;let S=a.issues.length,I=x._zod.check(a);if(I instanceof Promise&&(v==null?void 0:v.async)===!1)throw new te;if(h||I instanceof Promise)h=(h!=null?h:Promise.resolve()).then(async()=>{await I,a.issues.length!==S&&(f||(f=he(a,S)))});else{if(a.issues.length===S)continue;f||(f=he(a,S))}}return h?h.then(()=>a):a},c=(a,s,v)=>{if(he(a))return a.aborted=!0,a;let f=l(s,i,v);if(f instanceof Promise){if(v.async===!1)throw new te;return f.then(h=>e._zod.parse(h,v))}return e._zod.parse(f,v)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let f=e._zod.parse({value:a.value,issues:[]},z(m({},s),{skipChecks:!0}));return f instanceof Promise?f.then(h=>c(h,a,s)):c(f,a,s)}let v=e._zod.parse(a,s);if(v instanceof Promise){if(s.async===!1)throw new te;return v.then(f=>l(f,i,s))}return l(v,i,s)}}e["~standard"]={validate:l=>{var c;try{let a=nn(e,l);return a.success?{value:a.data}:{issues:(c=a.error)==null?void 0:c.issues}}catch(a){return on(e,l).then(s=>{var v;return s.success?{value:s.data}:{issues:(v=s.error)==null?void 0:v.issues}})}},vendor:"zod",version:1}}),ke=d("$ZodString",(e,r)=>{var n,i,t;O.init(e,r),e._zod.pattern=(t=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?t:wn(e._zod.bag),e._zod.parse=(o,u)=>{if(r.coerce)try{o.value=String(o.value)}catch(l){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),T=d("$ZodStringFormat",(e,r)=>{De.init(e,r),ke.init(e,r)}),ti=d("$ZodGUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=fn),T.init(e,r)}),ri=d("$ZodUUID",(e,r)=>{var n,i;if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(\'Invalid UUID version: "\'.concat(r.version,\'"\'));(n=r.pattern)!=null||(r.pattern=xe(o))}else(i=r.pattern)!=null||(r.pattern=xe());T.init(e,r)}),ni=d("$ZodEmail",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=pn),T.init(e,r)}),ii=d("$ZodURL",(e,r)=>{T.init(e,r),e._zod.check=n=>{try{let i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:yn.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),oi=d("$ZodEmoji",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=gn()),T.init(e,r)}),ai=d("$ZodNanoID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=dn),T.init(e,r)}),ui=d("$ZodCUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=an),T.init(e,r)}),ci=d("$ZodCUID2",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=un),T.init(e,r)}),li=d("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=cn),T.init(e,r)}),si=d("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ln),T.init(e,r)}),di=d("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=sn),T.init(e,r)}),mi=d("$ZodISODateTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=In(r)),T.init(e,r)}),fi=d("$ZodISODate",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=kn),T.init(e,r)}),pi=d("$ZodISOTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=zn(r)),T.init(e,r)}),gi=d("$ZodISODuration",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=mn),T.init(e,r)}),vi=d("$ZodIPv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=vn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv4"})}),hi=d("$ZodIPv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=hn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv6"}),e._zod.check=i=>{try{new URL("http://[".concat(i.value,"]"))}catch(t){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}}),$i=d("$ZodCIDRv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=$n),T.init(e,r)}),bi=d("$ZodCIDRv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=bn),T.init(e,r),e._zod.check=i=>{let t=i.value.split("/");try{if(t.length!==2)throw new Error;let[o,u]=t;if(!u)throw new Error;let l=Number(u);if("".concat(l)!==u)throw new Error;if(l<0||l>128)throw new Error;new URL("http://[".concat(o,"]"))}catch(o){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function _i(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(r){return!1}}var yi=d("$ZodBase64",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=_n),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64"}),e._zod.check=i=>{_i(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function xu(e){if(!Jt.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return _i(n)}var xi=d("$ZodBase64URL",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Jt),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64url"}),e._zod.check=i=>{xu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),ki=d("$ZodE164",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=xn),T.init(e,r)});function ku(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch(n){return!1}}var zi=d("$ZodJWT",(e,r)=>{T.init(e,r),e._zod.check=n=>{ku(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Ii=d("$ZodCustomStringFormat",(e,r)=>{T.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),Yt=d("$ZodNumber",(e,r)=>{var n;O.init(e,r),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:On,e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=Number(i.value)}catch(l){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push(m({expected:"number",code:"invalid_type",input:o,inst:e},u?{received:u}:{})),i}}),wi=d("$ZodNumber",(e,r)=>{En.init(e,r),Yt.init(e,r)}),it=d("$ZodBoolean",(e,r)=>{O.init(e,r),e._zod.pattern=Pn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch(o){}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Qt=d("$ZodBigInt",(e,r)=>{O.init(e,r),e._zod.pattern=Sn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch(t){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Si=d("$ZodBigInt",(e,r)=>{An.init(e,r),Qt.init(e,r)}),ji=d("$ZodSymbol",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),Oi=d("$ZodUndefined",(e,r)=>{O.init(e,r),e._zod.pattern=Nn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),Pi=d("$ZodNull",(e,r)=>{O.init(e,r),e._zod.pattern=Un,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),Ui=d("$ZodAny",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Ni=d("$ZodUnknown",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Zi=d("$ZodNever",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Di=d("$ZodVoid",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),Ti=d("$ZodDate",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(l){}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push(z(m({expected:"date",code:"invalid_type",input:t},o?{received:"Invalid Date"}:{}),{inst:e})),n}});function mu(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ei=d("$ZodArray",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let o=[];for(let u=0;u<t.length;u++){let l=t[u],c=r.element._zod.run({value:l,issues:[]},i);c instanceof Promise?o.push(c.then(a=>mu(a,n,u))):mu(c,n,u)}return o.length?Promise.all(o).then(()=>n):n}});function qt(e,r,n,i){e.issues.length&&r.issues.push(...q(n,e.issues)),e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function zu(e){var i,t,o,u;let r=Object.keys(e.shape);for(let l of r)if(!((u=(o=(t=(i=e.shape)==null?void 0:i[l])==null?void 0:t._zod)==null?void 0:o.traits)!=null&&u.has("$ZodType")))throw new Error(\'Invalid element at key "\'.concat(l,\'": expected a Zod schema\'));let n=Qr(e.shape);return z(m({},e),{keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)})}function Iu(e,r,n,i,t,o){let u=[],l=t.keySet,c=t.catchall._zod,a=c.def.type;for(let s of Object.keys(r)){if(l.has(s))continue;if(a==="never"){u.push(s);continue}let v=c.run({value:r[s],issues:[]},i);v instanceof Promise?e.push(v.then(f=>qt(f,n,s,r))):qt(v,n,s,r)}return u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:r,inst:o}),e.length?Promise.all(e).then(()=>n):n}var wu=d("$ZodObject",(e,r)=>{O.init(e,r);let n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){let l=r.shape;Object.defineProperty(r,"shape",{get:()=>{let c=m({},l);return Object.defineProperty(r,"shape",{value:c}),c}})}let i=je(()=>zu(r));Z(e._zod,"propValues",()=>{var a;let l=r.shape,c={};for(let s in l){let v=l[s]._zod;if(v.values){(a=c[s])!=null||(c[s]=new Set);for(let f of v.values)c[s].add(f)}}return c});let t=ye,o=r.catchall,u;e._zod.parse=(l,c)=>{u!=null||(u=i.value);let a=l.value;if(!t(a))return l.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),l;l.value={};let s=[],v=u.shape;for(let f of u.keys){let x=v[f]._zod.run({value:a[f],issues:[]},c);x instanceof Promise?s.push(x.then(S=>qt(S,l,f,a))):qt(x,l,f,a)}return o?Iu(s,a,l,c,i.value,e):s.length?Promise.all(s).then(()=>l):l}}),Ai=d("$ZodObjectJIT",(e,r)=>{wu.init(e,r);let n=e._zod.parse,i=je(()=>zu(r)),t=f=>{let h=new nt(["shape","payload","ctx"]),x=i.value,S=g=>{let $=Ut(g);return"shape[".concat($,"]._zod.run({ value: input[").concat($,"], issues: [] }, ctx)")};h.write("const input = payload.value;");let I=Object.create(null),C=0;for(let g of x.keys)I[g]="key_".concat(C++);h.write("const newResult = {};");for(let g of x.keys){let $=I[g],k=Ut(g);h.write("const ".concat($," = ").concat(S(g),";")),h.write("\\n if (".concat($,".issues.length) {\\n payload.issues = payload.issues.concat(").concat($,".issues.map(iss => ({\\n ...iss,\\n path: iss.path ? [").concat(k,", ...iss.path] : [").concat(k,"]\\n })));\\n }\\n \\n \\n if (").concat($,".value === undefined) {\\n if (").concat(k," in input) {\\n newResult[").concat(k,"] = undefined;\\n }\\n } else {\\n newResult[").concat(k,"] = ").concat($,".value;\\n }\\n \\n "))}h.write("payload.value = newResult;"),h.write("return payload;");let j=h.compile();return(g,$)=>j(f,g,$)},o,u=ye,l=!Be.jitless,a=l&&Xr.value,s=r.catchall,v;e._zod.parse=(f,h)=>{v!=null||(v=i.value);let x=f.value;return u(x)?l&&a&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(o||(o=t(r.shape)),f=o(f,h),s?Iu([],x,f,h,v,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),f)}});function fu(e,r,n,i){for(let o of e)if(o.issues.length===0)return r.value=o.value,r;let t=e.filter(o=>!he(o));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(u=>Y(u,i,L())))}),r)}var Ht=d("$ZodUnion",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),Z(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(o=>o._zod.pattern);return new RegExp("^(".concat(t.map(o=>We(o.source)).join("|"),")$"))}});let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,o)=>{if(n)return i(t,o);let u=!1,l=[];for(let c of r.options){let a=c._zod.run({value:t.value,issues:[]},o);if(a instanceof Promise)l.push(a),u=!0;else{if(a.issues.length===0)return a;l.push(a)}}return u?Promise.all(l).then(c=>fu(c,t,e,o)):fu(l,t,e,o)}}),Ri=d("$ZodDiscriminatedUnion",(e,r)=>{Ht.init(e,r);let n=e._zod.parse;Z(e._zod,"propValues",()=>{let t={};for(let o of r.options){let u=o._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(o),\'"\'));for(let[l,c]of Object.entries(u)){t[l]||(t[l]=new Set);for(let a of c)t[l].add(a)}}return t});let i=je(()=>{var u;let t=r.options,o=new Map;for(let l of t){let c=(u=l._zod.propValues)==null?void 0:u[r.discriminator];if(!c||c.size===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(l),\'"\'));for(let a of c){if(o.has(a))throw new Error(\'Duplicate discriminator value "\'.concat(String(a),\'"\'));o.set(a,l)}}return o});e._zod.parse=(t,o)=>{let u=t.value;if(!ye(u))return t.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),t;let l=i.value.get(u==null?void 0:u[r.discriminator]);return l?l._zod.run(t,o):r.unionFallback?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:u,path:[r.discriminator],inst:e}),t)}}),Li=d("$ZodIntersection",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),u=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||u instanceof Promise?Promise.all([o,u]).then(([c,a])=>pu(n,c,a)):pu(n,o,u)}});function ei(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(ve(e)&&ve(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t=m(m({},e),r);for(let o of i){let u=ei(e[o],r[o]);if(!u.valid)return{valid:!1,mergeErrorPath:[o,...u.mergeErrorPath]};t[o]=u.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],o=r[i],u=ei(t,o);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};n.push(u.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pu(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),he(e))return e;let i=ei(r.value,n.value);if(!i.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(i.mergeErrorPath)));return e.value=i.data,e}var er=d("$ZodTuple",(e,r)=>{O.init(e,r);let n=r.items,i=n.length-[...n].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,o)=>{let u=t.value;if(!Array.isArray(u))return t.issues.push({input:u,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];let l=[];if(!r.rest){let a=u.length>n.length,s=u.length<i-1;if(a||s)return t.issues.push(z(m({},a?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}),{input:u,inst:e,origin:"array"})),t}let c=-1;for(let a of n){if(c++,c>=u.length&&c>=i)continue;let s=a._zod.run({value:u[c],issues:[]},o);s instanceof Promise?l.push(s.then(v=>Kt(v,t,c))):Kt(s,t,c)}if(r.rest){let a=u.slice(n.length);for(let s of a){c++;let v=r.rest._zod.run({value:s,issues:[]},o);v instanceof Promise?l.push(v.then(f=>Kt(f,t,c))):Kt(v,t,c)}}return l.length?Promise.all(l).then(()=>t):t}});function Kt(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ci=d("$ZodRecord",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!ve(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[];if(r.keyType._zod.values){let u=r.keyType._zod.values;n.value={};for(let c of u)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let a=r.valueType._zod.run({value:t[c],issues:[]},i);a instanceof Promise?o.push(a.then(s=>{s.issues.length&&n.issues.push(...q(c,s.issues)),n.value[c]=s.value})):(a.issues.length&&n.issues.push(...q(c,a.issues)),n.value[c]=a.value)}let l;for(let c in t)u.has(c)||(l=l!=null?l:[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(let u of Reflect.ownKeys(t)){if(u==="__proto__")continue;let l=r.keyType._zod.run({value:u,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(a=>Y(a,i,L())),input:u,path:[u],inst:e}),n.value[l.value]=l.value;continue}let c=r.valueType._zod.run({value:t[u],issues:[]},i);c instanceof Promise?o.push(c.then(a=>{a.issues.length&&n.issues.push(...q(u,a.issues)),n.value[l.value]=a.value})):(c.issues.length&&n.issues.push(...q(u,c.issues)),n.value[l.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Vi=d("$ZodMap",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let o=[];n.value=new Map;for(let[u,l]of t){let c=r.keyType._zod.run({value:u,issues:[]},i),a=r.valueType._zod.run({value:l,issues:[]},i);c instanceof Promise||a instanceof Promise?o.push(Promise.all([c,a]).then(([s,v])=>{gu(s,v,n,u,t,e,i)})):gu(c,a,n,u,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function gu(e,r,n,i,t,o,u){e.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:e.issues.map(l=>Y(l,u,L()))})),r.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(l=>Y(l,u,L()))})),n.value.set(e.value,r.value)}var Fi=d("$ZodSet",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let u of t){let l=r.valueType._zod.run({value:u,issues:[]},i);l instanceof Promise?o.push(l.then(c=>vu(c,n))):vu(l,n)}return o.length?Promise.all(o).then(()=>n):n}});function vu(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Ji=d("$ZodEnum",(e,r)=>{O.init(e,r);let n=Ge(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp("^(".concat(n.filter(t=>Xe.has(typeof t)).map(t=>typeof t=="string"?ie(t):t.toString()).join("|"),")$")),e._zod.parse=(t,o)=>{let u=t.value;return i.has(u)||t.issues.push({code:"invalid_value",values:n,input:u,inst:e}),t}}),Mi=d("$ZodLiteral",(e,r)=>{if(O.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp("^(".concat(r.values.map(n=>typeof n=="string"?ie(n):n?ie(n.toString()):String(n)).join("|"),")$")),e._zod.parse=(n,i)=>{let t=n.value;return e._zod.values.has(t)||n.issues.push({code:"invalid_value",values:r.values,input:t,inst:e}),n}}),Bi=d("$ZodFile",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Ki=d("$ZodTransform",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(u=>(n.value=u,n));if(t instanceof Promise)throw new te;return n.value=t,n}});function hu(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var Gi=d("$ZodOptional",(e,r)=>{O.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),")?$")):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>hu(o,n.value)):hu(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Wi=d("$ZodNullable",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),"|null)$")):void 0}),Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),Xi=d("$ZodDefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>$u(o,r)):$u(t,r)}});function $u(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var qi=d("$ZodPrefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Yi=d("$ZodNonOptional",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>bu(o,e)):bu(t,e)}});function bu(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Qi=d("$ZodSuccess",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Hi=d("$ZodCatch",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:o.issues.map(u=>Y(u,i,L()))},input:n.value})),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:t.issues.map(o=>Y(o,i,L()))},input:n.value})),n.issues=[]),n)}}),eo=d("$ZodNaN",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),to=d("$ZodPipe",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Gt(u,r.in,i)):Gt(o,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>Gt(o,r.out,i)):Gt(t,r.out,i)}});function Gt(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var ot=d("$ZodCodec",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=r.in._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}else{let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}}});function Wt(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let t=r.transform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.out,n)):Xt(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.in,n)):Xt(e,t,r.in,n)}}function Xt(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var ro=d("$ZodReadonly",(e,r)=>{O.init(e,r),Z(e._zod,"propValues",()=>r.innerType._zod.propValues),Z(e._zod,"values",()=>r.innerType._zod.values),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(_u):_u(t)}});function _u(e){return e.value=Object.freeze(e.value),e}var no=d("$ZodTemplateLiteral",(e,r)=>{O.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error("Invalid template literal part, no pattern found: ".concat([...i._zod.traits].shift()));let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error("Invalid template literal part: ".concat(i._zod.traits));let o=t.startsWith("^")?1:0,u=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,u))}else if(i===null||Yr.has(typeof i))n.push(ie("".concat(i)));else throw new Error("Invalid template literal part: ".concat(i));e._zod.pattern=new RegExp("^".concat(n.join(""),"$")),e._zod.parse=(i,t)=>{var o;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:(o=r.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),i)}}),io=d("$ZodFunction",(e,r)=>(O.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let t=e._def.input?Zt(e._def.input,i):i,o=Reflect.apply(n,this,t);return e._def.output?Zt(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await Dt(e._def.input,i):i,o=await Reflect.apply(n,this,t);return e._def.output?await Dt(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new er({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),oo=d("$ZodPromise",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),ao=d("$ZodLazy",(e,r)=>{O.init(e,r),Z(e._zod,"innerType",()=>r.getter()),Z(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Z(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Z(e._zod,"optin",()=>{var n;return(n=e._zod.innerType._zod.optin)!=null?n:void 0}),Z(e._zod,"optout",()=>{var n;return(n=e._zod.innerType._zod.optout)!=null?n:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),uo=d("$ZodCustom",(e,r)=>{R.init(e,r),O.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(o=>yu(o,n,i,e));yu(t,n,i,e)}});function yu(e,r,n,i){var t;if(!e){let o={code:"custom",input:n,inst:i,path:[...(t=i._zod.def.path)!=null?t:[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),r.issues.push(Oe(o))}}var ze={};_e(ze,{ar:()=>Su,az:()=>ju,be:()=>Pu,bg:()=>Uu,ca:()=>Nu,cs:()=>Zu,da:()=>Du,de:()=>Tu,en:()=>tr,eo:()=>Eu,es:()=>Au,fa:()=>Ru,fi:()=>Lu,fr:()=>Cu,frCA:()=>Vu,he:()=>Fu,hu:()=>Ju,id:()=>Mu,is:()=>Bu,it:()=>Ku,ja:()=>Gu,ka:()=>Wu,kh:()=>Xu,km:()=>rr,ko:()=>qu,lt:()=>Qu,mk:()=>Hu,ms:()=>ec,nl:()=>tc,no:()=>rc,ota:()=>nc,pl:()=>oc,ps:()=>ic,pt:()=>ac,ru:()=>cc,sl:()=>lc,sv:()=>sc,ta:()=>dc,th:()=>mc,tr:()=>fc,ua:()=>pc,uk:()=>nr,ur:()=>gc,vi:()=>vc,yo:()=>bc,zhCN:()=>hc,zhTW:()=>$c});var zs=()=>{let e={string:{unit:"\\u062D\\u0631\\u0641",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},file:{unit:"\\u0628\\u0627\\u064A\\u062A",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},array:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},set:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0645\\u062F\\u062E\\u0644",email:"\\u0628\\u0631\\u064A\\u062F \\u0625\\u0644\\u0643\\u062A\\u0631\\u0648\\u0646\\u064A",url:"\\u0631\\u0627\\u0628\\u0637",emoji:"\\u0625\\u064A\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0648\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",date:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",time:"\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",duration:"\\u0645\\u062F\\u0629 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",ipv4:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv4",ipv6:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv6",cidrv4:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv4",cidrv6:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv6",base64:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64-encoded",base64url:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64url-encoded",json_string:"\\u0646\\u064E\\u0635 \\u0639\\u0644\\u0649 \\u0647\\u064A\\u0626\\u0629 JSON",e164:"\\u0631\\u0642\\u0645 \\u0647\\u0627\\u062A\\u0641 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 E.164",jwt:"JWT",template_literal:"\\u0645\\u062F\\u062E\\u0644"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(t.expected,"\\u060C \\u0648\\u0644\\u0643\\u0646 \\u062A\\u0645 \\u0625\\u062F\\u062E\\u0627\\u0644 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(b(t.values[0])):"\\u0627\\u062E\\u062A\\u064A\\u0627\\u0631 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062A\\u0648\\u0642\\u0639 \\u0627\\u0646\\u062A\\u0642\\u0627\\u0621 \\u0623\\u062D\\u062F \\u0647\\u0630\\u0647 \\u0627\\u0644\\u062E\\u064A\\u0627\\u0631\\u0627\\u062A: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?" \\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((o=t.origin)!=null?o:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"):"\\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((l=t.origin)!=null?l:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0628\\u062F\\u0623 \\u0628\\u0640 "\'.concat(t.prefix,\'"\'):a.format==="ends_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0646\\u062A\\u0647\\u064A \\u0628\\u0640 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u062A\\u0636\\u0645\\u0651\\u064E\\u0646 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0637\\u0627\\u0628\\u0642 \\u0627\\u0644\\u0646\\u0645\\u0637 ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644")}case"not_multiple_of":return"\\u0631\\u0642\\u0645 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 \\u0645\\u0646 \\u0645\\u0636\\u0627\\u0639\\u0641\\u0627\\u062A ".concat(t.divisor);case"unrecognized_keys":return"\\u0645\\u0639\\u0631\\u0641".concat(t.keys.length>1?"\\u0627\\u062A":""," \\u063A\\u0631\\u064A\\u0628").concat(t.keys.length>1?"\\u0629":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"\\u0645\\u0639\\u0631\\u0641 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);case"invalid_union":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644";case"invalid_element":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);default:return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644"}}};function Su(){return{localeError:zs()}}var Is=()=>{let e={string:{unit:"simvol",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"element",verb:"olmal\\u0131d\\u0131r"},set:{unit:"element",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(t.expected,", daxil olan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(b(t.values[0])):"Yanl\\u0131\\u015F se\\xE7im: a\\u015Fa\\u011F\\u0131dak\\u0131lardan biri olmal\\u0131d\\u0131r: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((o=t.origin)!=null?o:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"element"):"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((l=t.origin)!=null?l:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.prefix,\'" il\\u0259 ba\\u015Flamal\\u0131d\\u0131r\'):a.format==="ends_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.suffix,\'" il\\u0259 bitm\\u0259lidir\'):a.format==="includes"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.includes,\'" daxil olmal\\u0131d\\u0131r\'):a.format==="regex"?"Yanl\\u0131\\u015F m\\u0259tn: ".concat(a.pattern," \\u015Fablonuna uy\\u011Fun olmal\\u0131d\\u0131r"):"Yanl\\u0131\\u015F ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Yanl\\u0131\\u015F \\u0259d\\u0259d: ".concat(t.divisor," il\\u0259 b\\xF6l\\xFCn\\u0259 bil\\u0259n olmal\\u0131d\\u0131r");case"unrecognized_keys":return"Tan\\u0131nmayan a\\xE7ar".concat(t.keys.length>1?"lar":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F a\\xE7ar");case"invalid_union":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r";case"invalid_element":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F d\\u0259y\\u0259r");default:return"Yanl\\u0131\\u015F d\\u0259y\\u0259r"}}};function ju(){return{localeError:Is()}}function Ou(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var ws=()=>{let e={string:{unit:{one:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B",few:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u044B",many:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u044B",many:"\\u0431\\u0430\\u0439\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u043B\\u0456\\u043A";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0456\\u045E";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0443\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0430\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0456 \\u0447\\u0430\\u0441",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0447\\u0430\\u0441",duration:"ISO \\u043F\\u0440\\u0430\\u0446\\u044F\\u0433\\u043B\\u0430\\u0441\\u0446\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0430\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0430\\u0441",cidrv4:"IPv4 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64",base64url:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64url",json_string:"JSON \\u0440\\u0430\\u0434\\u043E\\u043A",e164:"\\u043D\\u0443\\u043C\\u0430\\u0440 E.164",jwt:"JWT",template_literal:"\\u0443\\u0432\\u043E\\u0434"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F ".concat(t.expected,", \\u0430\\u0442\\u0440\\u044B\\u043C\\u0430\\u043D\\u0430 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0432\\u0430\\u0440\\u044B\\u044F\\u043D\\u0442: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F \\u0430\\u0434\\u0437\\u0456\\u043D \\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),v=Ou(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),v=Ou(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u043F\\u0430\\u0447\\u044B\\u043D\\u0430\\u0446\\u0446\\u0430 \\u0437 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0432\\u0430\\u0446\\u0446\\u0430 \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u043C\\u044F\\u0448\\u0447\\u0430\\u0446\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0430\\u0434\\u043F\\u0430\\u0432\\u044F\\u0434\\u0430\\u0446\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B ".concat((l=i[c.format])!=null?l:t.format)}case"not_multiple_of":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043B\\u0456\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0431\\u044B\\u0446\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u0430\\u0437\\u043D\\u0430\\u043D\\u044B ".concat(t.keys.length>1?"\\u043A\\u043B\\u044E\\u0447\\u044B":"\\u043A\\u043B\\u044E\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434";case"invalid_element":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u0430\\u0435 \\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435 \\u045E ".concat(t.origin);default:return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434"}}};function Pu(){return{localeError:ws()}}var Ss=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(e))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},js=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u0432\\u0445\\u043E\\u0434",email:"\\u0438\\u043C\\u0435\\u0439\\u043B \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0436\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u043F\\u0440\\u043E\\u0434\\u044A\\u043B\\u0436\\u0438\\u0442\\u0435\\u043B\\u043D\\u043E\\u0441\\u0442",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"base64-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",base64url:"base64url-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",json_string:"JSON \\u043D\\u0438\\u0437",e164:"E.164 \\u043D\\u043E\\u043C\\u0435\\u0440",jwt:"JWT",template_literal:"\\u0432\\u0445\\u043E\\u0434"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(i.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D ").concat(Ss(i.input));case"invalid_value":return i.values.length===1?"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(b(i.values[0])):"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u044F: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D\\u043E \\u0435\\u0434\\u043D\\u043E \\u043E\\u0442 ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((t=i.origin)!=null?t:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430"):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((u=i.origin)!=null?u:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;if(c.format==="starts_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u0432\\u0430 \\u0441 "\'.concat(c.prefix,\'"\');if(c.format==="ends_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u044A\\u0440\\u0448\\u0432\\u0430 \\u0441 "\'.concat(c.suffix,\'"\');if(c.format==="includes")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0432\\u0430 "\'.concat(c.includes,\'"\');if(c.format==="regex")return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0441\\u044A\\u0432\\u043F\\u0430\\u0434\\u0430 \\u0441 ".concat(c.pattern);let a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D";return c.format==="emoji"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="datetime"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="date"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),c.format==="time"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="duration"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),"".concat(a," ").concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 \\u043A\\u0440\\u0430\\u0442\\u043D\\u043E \\u043D\\u0430 ".concat(i.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0437\\u043F\\u043E\\u0437\\u043D\\u0430\\u0442".concat(i.keys.length>1?"\\u0438":""," \\u043A\\u043B\\u044E\\u0447").concat(i.keys.length>1?"\\u043E\\u0432\\u0435":"",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(i.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442 \\u0432 ".concat(i.origin);default:return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434"}}};function Uu(){return{localeError:js()}}var Os=()=>{let e={string:{unit:"car\\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entrada",email:"adre\\xE7a electr\\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\\xE7a IPv4",ipv6:"adre\\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Tipus inv\\xE0lid: s\'esperava ".concat(t.expected,", s\'ha rebut ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Valor inv\\xE0lid: s\'esperava ".concat(b(t.values[0])):"Opci\\xF3 inv\\xE0lida: s\'esperava una de ".concat(p(t.values," o "));case"too_big":{let a=t.inclusive?"com a m\\xE0xim":"menys de",s=r(t.origin);return s?"Massa gran: s\'esperava que ".concat((o=t.origin)!=null?o:"el valor"," contingu\\xE9s ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"):"Massa gran: s\'esperava que ".concat((l=t.origin)!=null?l:"el valor"," fos ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"com a m\\xEDnim":"m\\xE9s de",s=r(t.origin);return s?"Massa petit: s\'esperava que ".concat(t.origin," contingu\\xE9s ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"Massa petit: s\'esperava que ".concat(t.origin," fos ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Format inv\\xE0lid: ha de comen\\xE7ar amb "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?"Format inv\\xE0lid: ha d\'acabar amb \\"".concat(a.suffix,\'"\'):a.format==="includes"?"Format inv\\xE0lid: ha d\'incloure \\"".concat(a.includes,\'"\'):a.format==="regex"?"Format inv\\xE0lid: ha de coincidir amb el patr\\xF3 ".concat(a.pattern):"Format inv\\xE0lid per a ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE0lid: ha de ser m\\xFAltiple de ".concat(t.divisor);case"unrecognized_keys":return"Clau".concat(t.keys.length>1?"s":""," no reconeguda").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Clau inv\\xE0lida a ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE0lida";case"invalid_element":return"Element inv\\xE0lid a ".concat(t.origin);default:return"Entrada inv\\xE0lida"}}};function Nu(){return{localeError:Os()}}var Ps=()=>{let e={string:{unit:"znak\\u016F",verb:"m\\xEDt"},file:{unit:"bajt\\u016F",verb:"m\\xEDt"},array:{unit:"prvk\\u016F",verb:"m\\xEDt"},set:{unit:"prvk\\u016F",verb:"m\\xEDt"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u010D\\xEDslo";case"string":return"\\u0159et\\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regul\\xE1rn\\xED v\\xFDraz",email:"e-mailov\\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \\u010Das ve form\\xE1tu ISO",date:"datum ve form\\xE1tu ISO",time:"\\u010Das ve form\\xE1tu ISO",duration:"doba trv\\xE1n\\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64",base64url:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64url",json_string:"\\u0159et\\u011Bzec ve form\\xE1tu JSON",e164:"\\u010D\\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(t.expected,", obdr\\u017Eeno ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(b(t.values[0])):"Neplatn\\xE1 mo\\u017Enost: o\\u010Dek\\xE1v\\xE1na jedna z hodnot ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((o=t.origin)!=null?o:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((l=t.origin)!=null?l:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((c=t.origin)!=null?c:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((s=t.origin)!=null?s:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED za\\u010D\\xEDnat na "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED kon\\u010Dit na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED obsahovat "\'.concat(f.includes,\'"\'):f.format==="regex"?"Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED odpov\\xEDdat vzoru ".concat(f.pattern):"Neplatn\\xFD form\\xE1t ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Neplatn\\xE9 \\u010D\\xEDslo: mus\\xED b\\xFDt n\\xE1sobkem ".concat(t.divisor);case"unrecognized_keys":return"Nezn\\xE1m\\xE9 kl\\xED\\u010De: ".concat(p(t.keys,", "));case"invalid_key":return"Neplatn\\xFD kl\\xED\\u010D v ".concat(t.origin);case"invalid_union":return"Neplatn\\xFD vstup";case"invalid_element":return"Neplatn\\xE1 hodnota v ".concat(t.origin);default:return"Neplatn\\xFD vstup"}}};function Zu(){return{localeError:Ps()}}var Us=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},r={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\\xE6t",file:"fil"};function n(u){var l;return(l=e[u])!=null?l:null}function i(u){var l;return(l=r[u])!=null?l:u}let t=u=>{let l=typeof u;switch(l){case"number":return Number.isNaN(u)?"NaN":"tal";case"object":return Array.isArray(u)?"liste":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype&&u.constructor?u.constructor.name:"objekt"}return l},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\\xE6t",date:"ISO-dato",time:"ISO-klokkesl\\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return u=>{var l,c;switch(u.code){case"invalid_type":return"Ugyldigt input: forventede ".concat(i(u.expected),", fik ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Ugyldig v\\xE6rdi: forventede ".concat(b(u.values[0])):"Ugyldigt valg: forventede en af f\\xF8lgende ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",s=n(u.origin),v=i(u.origin);return s?"For stor: forventede ".concat(v!=null?v:"value"," ").concat(s.verb," ").concat(a," ").concat(u.maximum.toString()," ").concat((l=s.unit)!=null?l:"elementer"):"For stor: forventede ".concat(v!=null?v:"value"," havde ").concat(a," ").concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",s=n(u.origin),v=i(u.origin);return s?"For lille: forventede ".concat(v," ").concat(s.verb," ").concat(a," ").concat(u.minimum.toString()," ").concat(s.unit):"For lille: forventede ".concat(v," havde ").concat(a," ").concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Ugyldig streng: skal starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: skal ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: skal indeholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: skal matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"Ugyldigt tal: skal v\\xE6re deleligt med ".concat(u.divisor);case"unrecognized_keys":return"".concat(u.keys.length>1?"Ukendte n\\xF8gler":"Ukendt n\\xF8gle",": ").concat(p(u.keys,", "));case"invalid_key":return"Ugyldig n\\xF8gle i ".concat(u.origin);case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return"Ugyldig v\\xE6rdi i ".concat(u.origin);default:return"Ugyldigt input"}}};function Du(){return{localeError:Us()}}var Ns=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ung\\xFCltige Eingabe: erwartet ".concat(t.expected,", erhalten ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ung\\xFCltige Eingabe: erwartet ".concat(b(t.values[0])):"Ung\\xFCltige Option: erwartet eine von ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Zu gro\\xDF: erwartet, dass ".concat((o=t.origin)!=null?o:"Wert"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"Elemente"," hat"):"Zu gro\\xDF: erwartet, dass ".concat((l=t.origin)!=null?l:"Wert"," ").concat(a).concat(t.maximum.toString()," ist")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," hat"):"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ist")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.suffix,\'" enden\'):a.format==="includes"?\'Ung\\xFCltiger String: muss "\'.concat(a.includes,\'" enthalten\'):a.format==="regex"?"Ung\\xFCltiger String: muss dem Muster ".concat(a.pattern," entsprechen"):"Ung\\xFCltig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ung\\xFCltige Zahl: muss ein Vielfaches von ".concat(t.divisor," sein");case"unrecognized_keys":return"".concat(t.keys.length>1?"Unbekannte Schl\\xFCssel":"Unbekannter Schl\\xFCssel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ung\\xFCltiger Schl\\xFCssel in ".concat(t.origin);case"invalid_union":return"Ung\\xFCltige Eingabe";case"invalid_element":return"Ung\\xFCltiger Wert in ".concat(t.origin);default:return"Ung\\xFCltige Eingabe"}}};function Tu(){return{localeError:Ns()}}var Zs=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Ds=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Invalid input: expected ".concat(i.expected,", received ").concat(Zs(i.input));case"invalid_value":return i.values.length===1?"Invalid input: expected ".concat(b(i.values[0])):"Invalid option: expected one of ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Too big: expected ".concat((t=i.origin)!=null?t:"value"," to have ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elements"):"Too big: expected ".concat((u=i.origin)!=null?u:"value"," to be ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Too small: expected ".concat(i.origin," to have ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Too small: expected ".concat(i.origin," to be ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Invalid string: must start with "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Invalid string: must end with "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Invalid string: must include "\'.concat(c.includes,\'"\'):c.format==="regex"?"Invalid string: must match pattern ".concat(c.pattern):"Invalid ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Invalid number: must be a multiple of ".concat(i.divisor);case"unrecognized_keys":return"Unrecognized key".concat(i.keys.length>1?"s":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Invalid key in ".concat(i.origin);case"invalid_union":return"Invalid input";case"invalid_element":return"Invalid value in ".concat(i.origin);default:return"Invalid input"}}};function tr(){return{localeError:Ds()}}var Ts=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Es=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Nevalida enigo: atendi\\u011Dis ".concat(i.expected,", ricevi\\u011Dis ").concat(Ts(i.input));case"invalid_value":return i.values.length===1?"Nevalida enigo: atendi\\u011Dis ".concat(b(i.values[0])):"Nevalida opcio: atendi\\u011Dis unu el ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Tro granda: atendi\\u011Dis ke ".concat((t=i.origin)!=null?t:"valoro"," havu ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elementojn"):"Tro granda: atendi\\u011Dis ke ".concat((u=i.origin)!=null?u:"valoro"," havu ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," havu ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," estu ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Nevalida karaktraro: devas komenci\\u011Di per "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Nevalida karaktraro: devas fini\\u011Di per "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Nevalida karaktraro: devas inkluzivi "\'.concat(c.includes,\'"\'):c.format==="regex"?"Nevalida karaktraro: devas kongrui kun la modelo ".concat(c.pattern):"Nevalida ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Nevalida nombro: devas esti oblo de ".concat(i.divisor);case"unrecognized_keys":return"Nekonata".concat(i.keys.length>1?"j":""," \\u015Dlosilo").concat(i.keys.length>1?"j":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Nevalida \\u015Dlosilo en ".concat(i.origin);case"invalid_union":return"Nevalida enigo";case"invalid_element":return"Nevalida valoro en ".concat(i.origin);default:return"Nevalida enigo"}}};function Eu(){return{localeError:Es()}}var As=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},r={string:"texto",number:"n\\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\\xFAmero grande",symbol:"s\\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\\xF3n",union:"uni\\xF3n",literal:"literal",promise:"promesa",void:"vac\\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(u){var l;return(l=e[u])!=null?l:null}function i(u){var l;return(l=r[u])!=null?l:u}let t=u=>{let l=typeof u;switch(l){case"number":return Number.isNaN(u)?"NaN":"number";case"object":return Array.isArray(u)?"array":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype?u.constructor.name:"object"}return l},o={regex:"entrada",email:"direcci\\xF3n de correo electr\\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\\xF3n ISO",ipv4:"direcci\\xF3n IPv4",ipv6:"direcci\\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return u=>{var l,c;switch(u.code){case"invalid_type":return"Entrada inv\\xE1lida: se esperaba ".concat(i(u.expected),", recibido ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Entrada inv\\xE1lida: se esperaba ".concat(b(u.values[0])):"Opci\\xF3n inv\\xE1lida: se esperaba una de ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",s=n(u.origin),v=i(u.origin);return s?"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," tuviera ").concat(a).concat(u.maximum.toString()," ").concat((l=s.unit)!=null?l:"elementos"):"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," fuera ").concat(a).concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",s=n(u.origin),v=i(u.origin);return s?"Demasiado peque\\xF1o: se esperaba que ".concat(v," tuviera ").concat(a).concat(u.minimum.toString()," ").concat(s.unit):"Demasiado peque\\xF1o: se esperaba que ".concat(v," fuera ").concat(a).concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Cadena inv\\xE1lida: debe comenzar con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cadena inv\\xE1lida: debe terminar en "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cadena inv\\xE1lida: debe incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cadena inv\\xE1lida: debe coincidir con el patr\\xF3n ".concat(a.pattern):"Inv\\xE1lido ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: debe ser m\\xFAltiplo de ".concat(u.divisor);case"unrecognized_keys":return"Llave".concat(u.keys.length>1?"s":""," desconocida").concat(u.keys.length>1?"s":"",": ").concat(p(u.keys,", "));case"invalid_key":return"Llave inv\\xE1lida en ".concat(i(u.origin));case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido en ".concat(i(u.origin));default:return"Entrada inv\\xE1lida"}}};function Au(){return{localeError:As()}}var Rs=()=>{let e={string:{unit:"\\u06A9\\u0627\\u0631\\u0627\\u06A9\\u062A\\u0631",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},file:{unit:"\\u0628\\u0627\\u06CC\\u062A",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},array:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},set:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u0627\\u06CC\\u0647";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u06CC",email:"\\u0622\\u062F\\u0631\\u0633 \\u0627\\u06CC\\u0645\\u06CC\\u0644",url:"URL",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0648 \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",date:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0627\\u06CC\\u0632\\u0648",time:"\\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",duration:"\\u0645\\u062F\\u062A \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",ipv4:"IPv4 \\u0622\\u062F\\u0631\\u0633",ipv6:"IPv6 \\u0622\\u062F\\u0631\\u0633",cidrv4:"IPv4 \\u062F\\u0627\\u0645\\u0646\\u0647",cidrv6:"IPv6 \\u062F\\u0627\\u0645\\u0646\\u0647",base64:"base64-encoded \\u0631\\u0634\\u062A\\u0647",base64url:"base64url-encoded \\u0631\\u0634\\u062A\\u0647",json_string:"JSON \\u0631\\u0634\\u062A\\u0647",e164:"E.164 \\u0639\\u062F\\u062F",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u06CC"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(t.expected," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F\\u060C ").concat(n(t.input)," \\u062F\\u0631\\u06CC\\u0627\\u0641\\u062A \\u0634\\u062F");case"invalid_value":return t.values.length===1?"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(b(t.values[0])," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F"):"\\u06AF\\u0632\\u06CC\\u0646\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A \\u06CC\\u06A9\\u06CC \\u0627\\u0632 ".concat(p(t.values,"|")," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((o=t.origin)!=null?o:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((l=t.origin)!=null?l:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.prefix,\'" \\u0634\\u0631\\u0648\\u0639 \\u0634\\u0648\\u062F\'):a.format==="ends_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.suffix,\'" \\u062A\\u0645\\u0627\\u0645 \\u0634\\u0648\\u062F\'):a.format==="includes"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0634\\u0627\\u0645\\u0644 "\'.concat(a.includes,\'" \\u0628\\u0627\\u0634\\u062F\'):a.format==="regex"?"\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 \\u0627\\u0644\\u06AF\\u0648\\u06CC ".concat(a.pattern," \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631")}case"not_multiple_of":return"\\u0639\\u062F\\u062F \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0645\\u0636\\u0631\\u0628 ".concat(t.divisor," \\u0628\\u0627\\u0634\\u062F");case"unrecognized_keys":return"\\u06A9\\u0644\\u06CC\\u062F".concat(t.keys.length>1?"\\u0647\\u0627\\u06CC":""," \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633: ").concat(p(t.keys,", "));case"invalid_key":return"\\u06A9\\u0644\\u06CC\\u062F \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633 \\u062F\\u0631 ".concat(t.origin);case"invalid_union":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631";case"invalid_element":return"\\u0645\\u0642\\u062F\\u0627\\u0631 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631 \\u062F\\u0631 ".concat(t.origin);default:return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631"}}};function Ru(){return{localeError:Rs()}}var Ls=()=>{let e={string:{unit:"merkki\\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4n"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"s\\xE4\\xE4nn\\xF6llinen lauseke",email:"s\\xE4hk\\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{var o;switch(t.code){case"invalid_type":return"Virheellinen tyyppi: odotettiin ".concat(t.expected,", oli ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Virheellinen sy\\xF6te: t\\xE4ytyy olla ".concat(b(t.values[0])):"Virheellinen valinta: t\\xE4ytyy olla yksi seuraavista: ".concat(p(t.values,"|"));case"too_big":{let u=t.inclusive?"<=":"<",l=r(t.origin);return l?"Liian suuri: ".concat(l.subject," t\\xE4ytyy olla ").concat(u).concat(t.maximum.toString()," ").concat(l.unit).trim():"Liian suuri: arvon t\\xE4ytyy olla ".concat(u).concat(t.maximum.toString())}case"too_small":{let u=t.inclusive?">=":">",l=r(t.origin);return l?"Liian pieni: ".concat(l.subject," t\\xE4ytyy olla ").concat(u).concat(t.minimum.toString()," ").concat(l.unit).trim():"Liian pieni: arvon t\\xE4ytyy olla ".concat(u).concat(t.minimum.toString())}case"invalid_format":{let u=t;return u.format==="starts_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy alkaa "\'.concat(u.prefix,\'"\'):u.format==="ends_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy loppua "\'.concat(u.suffix,\'"\'):u.format==="includes"?\'Virheellinen sy\\xF6te: t\\xE4ytyy sis\\xE4lt\\xE4\\xE4 "\'.concat(u.includes,\'"\'):u.format==="regex"?"Virheellinen sy\\xF6te: t\\xE4ytyy vastata s\\xE4\\xE4nn\\xF6llist\\xE4 lauseketta ".concat(u.pattern):"Virheellinen ".concat((o=i[u.format])!=null?o:t.format)}case"not_multiple_of":return"Virheellinen luku: t\\xE4ytyy olla luvun ".concat(t.divisor," monikerta");case"unrecognized_keys":return"".concat(t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain",": ").concat(p(t.keys,", "));case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\\xF6te"}}};function Lu(){return{localeError:Ls()}}var Cs=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : ".concat(t.expected," attendu, ").concat(n(t.input)," re\\xE7u");case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : ".concat(b(t.values[0])," attendu"):"Option invalide : une valeur parmi ".concat(p(t.values,"|")," attendue");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Trop grand : ".concat((o=t.origin)!=null?o:"valeur"," doit ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\xE9l\\xE9ment(s)"):"Trop grand : ".concat((l=t.origin)!=null?l:"valeur"," doit \\xEAtre ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Trop petit : ".concat(t.origin," doit ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Trop petit : ".concat(t.origin," doit \\xEAtre ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cha\\xEEne invalide : doit correspondre au mod\\xE8le ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Cu(){return{localeError:Cs()}}var Vs=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : attendu ".concat(t.expected,", re\\xE7u ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : attendu ".concat(b(t.values[0])):"Option invalide : attendu l\'une des valeurs suivantes ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"\\u2264":"<",a=r(t.origin);return a?"Trop grand : attendu que ".concat((o=t.origin)!=null?o:"la valeur"," ait ").concat(c).concat(t.maximum.toString()," ").concat(a.unit):"Trop grand : attendu que ".concat((u=t.origin)!=null?u:"la valeur"," soit ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?"\\u2265":">",a=r(t.origin);return a?"Trop petit : attendu que ".concat(t.origin," ait ").concat(c).concat(t.minimum.toString()," ").concat(a.unit):"Trop petit : attendu que ".concat(t.origin," soit ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(c.includes,\'"\'):c.format==="regex"?"Cha\\xEEne invalide : doit correspondre au motif ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Vu(){return{localeError:Vs()}}var Fs=()=>{let e={string:{unit:"\\u05D0\\u05D5\\u05EA\\u05D9\\u05D5\\u05EA",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},file:{unit:"\\u05D1\\u05D9\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},array:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},set:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u05E7\\u05DC\\u05D8",email:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05D0\\u05D9\\u05DE\\u05D9\\u05D9\\u05DC",url:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05E8\\u05E9\\u05EA",emoji:"\\u05D0\\u05D9\\u05DE\\u05D5\\u05D2\'\\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA \\u05D5\\u05D6\\u05DE\\u05DF ISO",date:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA ISO",time:"\\u05D6\\u05DE\\u05DF ISO",duration:"\\u05DE\\u05E9\\u05DA \\u05D6\\u05DE\\u05DF ISO",ipv4:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv4",ipv6:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv6",cidrv4:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv4",cidrv6:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv6",base64:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64",base64url:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64 \\u05DC\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA \\u05E8\\u05E9\\u05EA",json_string:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA JSON",e164:"\\u05DE\\u05E1\\u05E4\\u05E8 E.164",jwt:"JWT",template_literal:"\\u05E7\\u05DC\\u05D8"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(t.expected,", \\u05D4\\u05EA\\u05E7\\u05D1\\u05DC ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(b(t.values[0])):"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA \\u05D0\\u05D7\\u05EA \\u05DE\\u05D4\\u05D0\\u05E4\\u05E9\\u05E8\\u05D5\\u05D9\\u05D5\\u05EA ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((o=t.origin)!=null?o:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"):"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((l=t.origin)!=null?l:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D7\\u05D9\\u05DC \\u05D1"\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05E1\\u05EA\\u05D9\\u05D9\\u05DD \\u05D1 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05DB\\u05DC\\u05D5\\u05DC "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D0\\u05D9\\u05DD \\u05DC\\u05EA\\u05D1\\u05E0\\u05D9\\u05EA ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF")}case"not_multiple_of":return"\\u05DE\\u05E1\\u05E4\\u05E8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D7\\u05D9\\u05D9\\u05D1 \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA \\u05DE\\u05DB\\u05E4\\u05DC\\u05D4 \\u05E9\\u05DC ".concat(t.divisor);case"unrecognized_keys":return"\\u05DE\\u05E4\\u05EA\\u05D7".concat(t.keys.length>1?"\\u05D5\\u05EA":""," \\u05DC\\u05D0 \\u05DE\\u05D6\\u05D5\\u05D4").concat(t.keys.length>1?"\\u05D9\\u05DD":"\\u05D4",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u05DE\\u05E4\\u05EA\\u05D7 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);case"invalid_union":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF";case"invalid_element":return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);default:return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF"}}};function Fu(){return{localeError:Fs()}}var Js=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"sz\\xE1m";case"object":{if(Array.isArray(t))return"t\\xF6mb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"bemenet",email:"email c\\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\\u0151b\\xE9lyeg",date:"ISO d\\xE1tum",time:"ISO id\\u0151",duration:"ISO id\\u0151intervallum",ipv4:"IPv4 c\\xEDm",ipv6:"IPv6 c\\xEDm",cidrv4:"IPv4 tartom\\xE1ny",cidrv6:"IPv6 tartom\\xE1ny",base64:"base64-k\\xF3dolt string",base64url:"base64url-k\\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\\xE1m",jwt:"JWT",template_literal:"bemenet"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(t.expected,", a kapott \\xE9rt\\xE9k ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(b(t.values[0])):"\\xC9rv\\xE9nytelen opci\\xF3: valamelyik \\xE9rt\\xE9k v\\xE1rt ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"T\\xFAl nagy: ".concat((o=t.origin)!=null?o:"\\xE9rt\\xE9k"," m\\xE9rete t\\xFAl nagy ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elem"):"T\\xFAl nagy: a bemeneti \\xE9rt\\xE9k ".concat((l=t.origin)!=null?l:"\\xE9rt\\xE9k"," t\\xFAl nagy: ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," m\\xE9rete t\\xFAl kicsi ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," t\\xFAl kicsi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.prefix,\'" \\xE9rt\\xE9kkel kell kezd\\u0151dnie\'):a.format==="ends_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.suffix,\'" \\xE9rt\\xE9kkel kell v\\xE9gz\\u0151dnie\'):a.format==="includes"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.includes,\'" \\xE9rt\\xE9ket kell tartalmaznia\'):a.format==="regex"?"\\xC9rv\\xE9nytelen string: ".concat(a.pattern," mint\\xE1nak kell megfelelnie"):"\\xC9rv\\xE9nytelen ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\xC9rv\\xE9nytelen sz\\xE1m: ".concat(t.divisor," t\\xF6bbsz\\xF6r\\xF6s\\xE9nek kell lennie");case"unrecognized_keys":return"Ismeretlen kulcs".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\xC9rv\\xE9nytelen kulcs ".concat(t.origin);case"invalid_union":return"\\xC9rv\\xE9nytelen bemenet";case"invalid_element":return"\\xC9rv\\xE9nytelen \\xE9rt\\xE9k: ".concat(t.origin);default:return"\\xC9rv\\xE9nytelen bemenet"}}};function Ju(){return{localeError:Js()}}var Ms=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input tidak valid: diharapkan ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak valid: diharapkan ".concat(b(t.values[0])):"Pilihan tidak valid: diharapkan salah satu dari ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Terlalu besar: diharapkan ".concat((o=t.origin)!=null?o:"value"," memiliki ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elemen"):"Terlalu besar: diharapkan ".concat((l=t.origin)!=null?l:"value"," menjadi ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Terlalu kecil: diharapkan ".concat(t.origin," memiliki ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Terlalu kecil: diharapkan ".concat(t.origin," menjadi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak valid: harus dimulai dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak valid: harus berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak valid: harus menyertakan "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak valid: harus sesuai pola ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak valid")}case"not_multiple_of":return"Angka tidak valid: harus kelipatan dari ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak valid di ".concat(t.origin);case"invalid_union":return"Input tidak valid";case"invalid_element":return"Nilai tidak valid di ".concat(t.origin);default:return"Input tidak valid"}}};function Mu(){return{localeError:Ms()}}var Bs=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"n\\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Ks=()=>{let e={string:{unit:"stafi",verb:"a\\xF0 hafa"},file:{unit:"b\\xE6ti",verb:"a\\xF0 hafa"},array:{unit:"hluti",verb:"a\\xF0 hafa"},set:{unit:"hluti",verb:"a\\xF0 hafa"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"gildi",email:"netfang",url:"vefsl\\xF3\\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\\xEDmi",date:"ISO dagsetning",time:"ISO t\\xEDmi",duration:"ISO t\\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(Bs(i.input)," \\xFEar sem \\xE1 a\\xF0 vera ").concat(i.expected);case"invalid_value":return i.values.length===1?"Rangt gildi: gert r\\xE1\\xF0 fyrir ".concat(b(i.values[0])):"\\xD3gilt val: m\\xE1 vera eitt af eftirfarandi ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((t=i.origin)!=null?t:"gildi"," hafi ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"hluti"):"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((u=i.origin)!=null?u:"gildi"," s\\xE9 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," hafi ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," s\\xE9 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 byrja \\xE1 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 enda \\xE1 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 innihalda "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\xD3gildur strengur: ver\\xF0ur a\\xF0 fylgja mynstri ".concat(c.pattern):"Rangt ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"R\\xF6ng tala: ver\\xF0ur a\\xF0 vera margfeldi af ".concat(i.divisor);case"unrecognized_keys":return"\\xD3\\xFEekkt ".concat(i.keys.length>1?"ir lyklar":"ur lykill",": ").concat(p(i.keys,", "));case"invalid_key":return"Rangur lykill \\xED ".concat(i.origin);case"invalid_union":return"Rangt gildi";case"invalid_element":return"Rangt gildi \\xED ".concat(i.origin);default:return"Rangt gildi"}}};function Bu(){return{localeError:Ks()}}var Gs=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input non valido: atteso ".concat(t.expected,", ricevuto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input non valido: atteso ".concat(b(t.values[0])):"Opzione non valida: atteso uno tra ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Troppo grande: ".concat((o=t.origin)!=null?o:"valore"," deve avere ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementi"):"Troppo grande: ".concat((l=t.origin)!=null?l:"valore"," deve essere ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Troppo piccolo: ".concat(t.origin," deve avere ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Troppo piccolo: ".concat(t.origin," deve essere ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Stringa non valida: deve iniziare con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Stringa non valida: deve terminare con "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Stringa non valida: deve includere "\'.concat(a.includes,\'"\'):a.format==="regex"?"Stringa non valida: deve corrispondere al pattern ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Numero non valido: deve essere un multiplo di ".concat(t.divisor);case"unrecognized_keys":return"Chiav".concat(t.keys.length>1?"i":"e"," non riconosciut").concat(t.keys.length>1?"e":"a",": ").concat(p(t.keys,", "));case"invalid_key":return"Chiave non valida in ".concat(t.origin);case"invalid_union":return"Input non valido";case"invalid_element":return"Valore non valido in ".concat(t.origin);default:return"Input non valido"}}};function Ku(){return{localeError:Gs()}}var Ws=()=>{let e={string:{unit:"\\u6587\\u5B57",verb:"\\u3067\\u3042\\u308B"},file:{unit:"\\u30D0\\u30A4\\u30C8",verb:"\\u3067\\u3042\\u308B"},array:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"},set:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u6570\\u5024";case"object":{if(Array.isArray(t))return"\\u914D\\u5217";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u5165\\u529B\\u5024",email:"\\u30E1\\u30FC\\u30EB\\u30A2\\u30C9\\u30EC\\u30B9",url:"URL",emoji:"\\u7D75\\u6587\\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u6642",date:"ISO\\u65E5\\u4ED8",time:"ISO\\u6642\\u523B",duration:"ISO\\u671F\\u9593",ipv4:"IPv4\\u30A2\\u30C9\\u30EC\\u30B9",ipv6:"IPv6\\u30A2\\u30C9\\u30EC\\u30B9",cidrv4:"IPv4\\u7BC4\\u56F2",cidrv6:"IPv6\\u7BC4\\u56F2",base64:"base64\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",base64url:"base64url\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",json_string:"JSON\\u6587\\u5B57\\u5217",e164:"E.164\\u756A\\u53F7",jwt:"JWT",template_literal:"\\u5165\\u529B\\u5024"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(t.expected,"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F\\u304C\\u3001").concat(n(t.input),"\\u304C\\u5165\\u529B\\u3055\\u308C\\u307E\\u3057\\u305F");case"invalid_value":return t.values.length===1?"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(b(t.values[0]),"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F"):"\\u7121\\u52B9\\u306A\\u9078\\u629E: ".concat(p(t.values,"\\u3001"),"\\u306E\\u3044\\u305A\\u308C\\u304B\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"too_big":{let a=t.inclusive?"\\u4EE5\\u4E0B\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5C0F\\u3055\\u3044",s=r(t.origin);return s?"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((o=t.origin)!=null?o:"\\u5024","\\u306F").concat(t.maximum.toString()).concat((u=s.unit)!=null?u:"\\u8981\\u7D20").concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((l=t.origin)!=null?l:"\\u5024","\\u306F").concat(t.maximum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"too_small":{let a=t.inclusive?"\\u4EE5\\u4E0A\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5927\\u304D\\u3044",s=r(t.origin);return s?"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(s.unit).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.prefix,\'"\\u3067\\u59CB\\u307E\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="ends_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.suffix,\'"\\u3067\\u7D42\\u308F\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="includes"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.includes,\'"\\u3092\\u542B\\u3080\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="regex"?"\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: \\u30D1\\u30BF\\u30FC\\u30F3".concat(a.pattern,"\\u306B\\u4E00\\u81F4\\u3059\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u7121\\u52B9\\u306A".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u52B9\\u306A\\u6570\\u5024: ".concat(t.divisor,"\\u306E\\u500D\\u6570\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"unrecognized_keys":return"\\u8A8D\\u8B58\\u3055\\u308C\\u3066\\u3044\\u306A\\u3044\\u30AD\\u30FC".concat(t.keys.length>1?"\\u7FA4":"",": ").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u30AD\\u30FC");case"invalid_union":return"\\u7121\\u52B9\\u306A\\u5165\\u529B";case"invalid_element":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u5024");default:return"\\u7121\\u52B9\\u306A\\u5165\\u529B"}}};function Gu(){return{localeError:Ws()}}var Xs=e=>{var i;let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8";case"object":{if(Array.isArray(e))return"\\u10DB\\u10D0\\u10E1\\u10D8\\u10D5\\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return(i={string:"\\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",boolean:"\\u10D1\\u10E3\\u10DA\\u10D4\\u10D0\\u10DC\\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\\u10E4\\u10E3\\u10DC\\u10E5\\u10EA\\u10D8\\u10D0"}[r])!=null?i:r},qs=()=>{let e={string:{unit:"\\u10E1\\u10D8\\u10DB\\u10D1\\u10DD\\u10DA\\u10DD",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},file:{unit:"\\u10D1\\u10D0\\u10D8\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},array:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},set:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0",email:"\\u10D4\\u10DA-\\u10E4\\u10DD\\u10E1\\u10E2\\u10D8\\u10E1 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",url:"URL",emoji:"\\u10D4\\u10DB\\u10DD\\u10EF\\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8-\\u10D3\\u10E0\\u10DD",date:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8",time:"\\u10D3\\u10E0\\u10DD",duration:"\\u10EE\\u10D0\\u10DC\\u10D2\\u10E0\\u10EB\\u10DA\\u10D8\\u10D5\\u10DD\\u10D1\\u10D0",ipv4:"IPv4 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",ipv6:"IPv6 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",cidrv4:"IPv4 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",cidrv6:"IPv6 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",base64:"base64-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",base64url:"base64url-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",json_string:"JSON \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",e164:"E.164 \\u10DC\\u10DD\\u10DB\\u10D4\\u10E0\\u10D8",jwt:"JWT",template_literal:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"};return i=>{var t,o,u;switch(i.code){case"invalid_type":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.expected,", \\u10DB\\u10D8\\u10E6\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 ").concat(Xs(i.input));case"invalid_value":return i.values.length===1?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(b(i.values[0])):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D5\\u10D0\\u10E0\\u10D8\\u10D0\\u10DC\\u10E2\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8\\u10D0 \\u10D4\\u10E0\\u10D7-\\u10D4\\u10E0\\u10D7\\u10D8 ".concat(p(i.values,"|"),"-\\u10D3\\u10D0\\u10DC");case"too_big":{let l=i.inclusive?"<=":"<",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((t=i.origin)!=null?t:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," ").concat(c.verb," ").concat(l).concat(i.maximum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((o=i.origin)!=null?o:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," ").concat(c.verb," ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10EC\\u10E7\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(l.prefix,\'"-\\u10D8\\u10D7\'):l.format==="ends_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10DB\\u10D7\\u10D0\\u10D5\\u10E0\\u10D3\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(l.suffix,\'"-\\u10D8\\u10D7\'):l.format==="includes"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1 "\'.concat(l.includes,\'"-\\u10E1\'):l.format==="regex"?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D4\\u10E1\\u10D0\\u10D1\\u10D0\\u10DB\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 \\u10E8\\u10D0\\u10D1\\u10DA\\u10DD\\u10DC\\u10E1 ".concat(l.pattern):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10E7\\u10DD\\u10E1 ".concat(i.divisor,"-\\u10D8\\u10E1 \\u10EF\\u10D4\\u10E0\\u10D0\\u10D3\\u10D8");case"unrecognized_keys":return"\\u10E3\\u10EA\\u10DC\\u10DD\\u10D1\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1".concat(i.keys.length>1?"\\u10D4\\u10D1\\u10D8":"\\u10D8",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1\\u10D8 ".concat(i.origin,"-\\u10E8\\u10D8");case"invalid_union":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0";case"invalid_element":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0 ".concat(i.origin,"-\\u10E8\\u10D8");default:return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"}}};function Wu(){return{localeError:qs()}}var Ys=()=>{let e={string:{unit:"\\u178F\\u17BD\\u17A2\\u1780\\u17D2\\u179F\\u179A",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},file:{unit:"\\u1794\\u17C3",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},array:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},set:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u1798\\u17B7\\u1793\\u1798\\u17C2\\u1793\\u1787\\u17B6\\u179B\\u17C1\\u1781 (NaN)":"\\u179B\\u17C1\\u1781";case"object":{if(Array.isArray(t))return"\\u17A2\\u17B6\\u179A\\u17C1 (Array)";if(t===null)return"\\u1782\\u17D2\\u1798\\u17B6\\u1793\\u178F\\u1798\\u17D2\\u179B\\u17C3 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B",email:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793\\u17A2\\u17CA\\u17B8\\u1798\\u17C2\\u179B",url:"URL",emoji:"\\u179F\\u1789\\u17D2\\u1789\\u17B6\\u17A2\\u17B6\\u179A\\u1798\\u17D2\\u1798\\u178E\\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 \\u1793\\u17B7\\u1784\\u1798\\u17C9\\u17C4\\u1784 ISO",date:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 ISO",time:"\\u1798\\u17C9\\u17C4\\u1784 ISO",duration:"\\u179A\\u1799\\u17C8\\u1796\\u17C1\\u179B ISO",ipv4:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",ipv6:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",cidrv4:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",cidrv6:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",base64:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64",base64url:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64url",json_string:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A JSON",e164:"\\u179B\\u17C1\\u1781 E.164",jwt:"JWT",template_literal:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.expected," \\u1794\\u17C9\\u17BB\\u1793\\u17D2\\u178F\\u17C2\\u1791\\u1791\\u17BD\\u179B\\u1794\\u17B6\\u1793 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(b(t.values[0])):"\\u1787\\u1798\\u17D2\\u179A\\u17BE\\u179F\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1787\\u17B6\\u1798\\u17BD\\u1799\\u1780\\u17D2\\u1793\\u17BB\\u1784\\u1785\\u17C6\\u178E\\u17C4\\u1798 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((o=t.origin)!=null?o:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u1792\\u17B6\\u178F\\u17BB"):"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((l=t.origin)!=null?l:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1785\\u17B6\\u1794\\u17CB\\u1795\\u17D2\\u178F\\u17BE\\u1798\\u178A\\u17C4\\u1799 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1794\\u1789\\u17D2\\u1785\\u1794\\u17CB\\u178A\\u17C4\\u1799 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1798\\u17B6\\u1793 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1795\\u17D2\\u1782\\u17BC\\u1795\\u17D2\\u1782\\u1784\\u1793\\u17B9\\u1784\\u1791\\u1798\\u17D2\\u179A\\u1784\\u17CB\\u178A\\u17C2\\u179B\\u1794\\u17B6\\u1793\\u1780\\u17C6\\u178E\\u178F\\u17CB ".concat(a.pattern):"\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u179B\\u17C1\\u1781\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1787\\u17B6\\u1796\\u17A0\\u17BB\\u1782\\u17BB\\u178E\\u1793\\u17C3 ".concat(t.divisor);case"unrecognized_keys":return"\\u179A\\u1780\\u1783\\u17BE\\u1789\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u179F\\u17D2\\u1782\\u17B6\\u179B\\u17CB\\u17D6 ".concat(p(t.keys,", "));case"invalid_key":return"\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);case"invalid_union":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C";case"invalid_element":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);default:return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C"}}};function rr(){return{localeError:Ys()}}function Xu(){return rr()}var Qs=()=>{let e={string:{unit:"\\uBB38\\uC790",verb:"to have"},file:{unit:"\\uBC14\\uC774\\uD2B8",verb:"to have"},array:{unit:"\\uAC1C",verb:"to have"},set:{unit:"\\uAC1C",verb:"to have"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\uC785\\uB825",email:"\\uC774\\uBA54\\uC77C \\uC8FC\\uC18C",url:"URL",emoji:"\\uC774\\uBAA8\\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\uB0A0\\uC9DC\\uC2DC\\uAC04",date:"ISO \\uB0A0\\uC9DC",time:"ISO \\uC2DC\\uAC04",duration:"ISO \\uAE30\\uAC04",ipv4:"IPv4 \\uC8FC\\uC18C",ipv6:"IPv6 \\uC8FC\\uC18C",cidrv4:"IPv4 \\uBC94\\uC704",cidrv6:"IPv6 \\uBC94\\uC704",base64:"base64 \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",base64url:"base64url \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",json_string:"JSON \\uBB38\\uC790\\uC5F4",e164:"E.164 \\uBC88\\uD638",jwt:"JWT",template_literal:"\\uC785\\uB825"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uC608\\uC0C1 \\uD0C0\\uC785\\uC740 ".concat(t.expected,", \\uBC1B\\uC740 \\uD0C0\\uC785\\uC740 ").concat(n(t.input),"\\uC785\\uB2C8\\uB2E4");case"invalid_value":return t.values.length===1?"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uAC12\\uC740 ".concat(b(t.values[0])," \\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C \\uC635\\uC158: ".concat(p(t.values,"\\uB610\\uB294 ")," \\uC911 \\uD558\\uB098\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"too_big":{let f=t.inclusive?"\\uC774\\uD558":"\\uBBF8\\uB9CC",h=f==="\\uBBF8\\uB9CC"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(o=x==null?void 0:x.unit)!=null?o:"\\uC694\\uC18C";return x?"".concat((u=t.origin)!=null?u:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()).concat(S," ").concat(f).concat(h):"".concat((l=t.origin)!=null?l:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()," ").concat(f).concat(h)}case"too_small":{let f=t.inclusive?"\\uC774\\uC0C1":"\\uCD08\\uACFC",h=f==="\\uC774\\uC0C1"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(c=x==null?void 0:x.unit)!=null?c:"\\uC694\\uC18C";return x?"".concat((a=t.origin)!=null?a:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()).concat(S," ").concat(f).concat(h):"".concat((s=t.origin)!=null?s:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()," ").concat(f).concat(h)}case"invalid_format":{let f=t;return f.format==="starts_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.prefix,\'"(\\uC73C)\\uB85C \\uC2DC\\uC791\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="ends_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.suffix,\'"(\\uC73C)\\uB85C \\uB05D\\uB098\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="includes"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.includes,\'"\\uC744(\\uB97C) \\uD3EC\\uD568\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="regex"?"\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: \\uC815\\uADDC\\uC2DD ".concat(f.pattern," \\uD328\\uD134\\uACFC \\uC77C\\uCE58\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"\\uC798\\uBABB\\uB41C \\uC22B\\uC790: ".concat(t.divisor,"\\uC758 \\uBC30\\uC218\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"unrecognized_keys":return"\\uC778\\uC2DD\\uD560 \\uC218 \\uC5C6\\uB294 \\uD0A4: ".concat(p(t.keys,", "));case"invalid_key":return"\\uC798\\uBABB\\uB41C \\uD0A4: ".concat(t.origin);case"invalid_union":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825";case"invalid_element":return"\\uC798\\uBABB\\uB41C \\uAC12: ".concat(t.origin);default:return"\\uC798\\uBABB\\uB41C \\uC785\\uB825"}}};function qu(){return{localeError:Qs()}}var Hs=e=>ut(typeof e,e),ut=(e,r=void 0)=>{switch(e){case"number":return Number.isNaN(r)?"NaN":"skai\\u010Dius";case"bigint":return"sveikasis skai\\u010Dius";case"string":return"eilut\\u0117";case"boolean":return"login\\u0117 reik\\u0161m\\u0117";case"undefined":case"void":return"neapibr\\u0117\\u017Eta reik\\u0161m\\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return r===void 0?"ne\\u017Einomas objektas":r===null?"nulin\\u0117 reik\\u0161m\\u0117":Array.isArray(r)?"masyvas":Object.getPrototypeOf(r)!==Object.prototype&&r.constructor?r.constructor.name:"objektas";case"null":return"nulin\\u0117 reik\\u0161m\\u0117"}return e},at=e=>e.charAt(0).toUpperCase()+e.slice(1);function Yu(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var ed=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne ilgesn\\u0117 kaip",notInclusive:"turi b\\u016Bti trumpesn\\u0117 kaip"},bigger:{inclusive:"turi b\\u016Bti ne trumpesn\\u0117 kaip",notInclusive:"turi b\\u016Bti ilgesn\\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne didesnis kaip",notInclusive:"turi b\\u016Bti ma\\u017Eesnis kaip"},bigger:{inclusive:"turi b\\u016Bti ne ma\\u017Eesnis kaip",notInclusive:"turi b\\u016Bti didesnis kaip"}}},array:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}},set:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}}};function r(i,t,o,u){var c;let l=(c=e[i])!=null?c:null;return l===null?l:{unit:l.unit[t],verb:l.verb[u][o?"inclusive":"notInclusive"]}}let n={regex:"\\u012Fvestis",email:"el. pa\\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\\u017Ekoduota eilut\\u0117",base64url:"base64url u\\u017Ekoduota eilut\\u0117",json_string:"JSON eilut\\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\\u012Fvestis"};return i=>{var t,o,u,l,c,a,s,v,f,h;switch(i.code){case"invalid_type":return"Gautas tipas ".concat(Hs(i.input),", o tik\\u0117tasi - ").concat(ut(i.expected));case"invalid_value":return i.values.length===1?"Privalo b\\u016Bti ".concat(b(i.values[0])):"Privalo b\\u016Bti vienas i\\u0161 ".concat(p(i.values,"|")," pasirinkim\\u0173");case"too_big":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.maximum)),(t=i.inclusive)!=null?t:!1,"smaller");if(S!=null&&S.verb)return"".concat(at((o=x!=null?x:i.origin)!=null?o:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.maximum.toString()," ").concat((u=S.unit)!=null?u:"element\\u0173");let I=i.inclusive?"ne didesnis kaip":"ma\\u017Eesnis kaip";return"".concat(at((l=x!=null?x:i.origin)!=null?l:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.maximum.toString()," ").concat(S==null?void 0:S.unit)}case"too_small":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.minimum)),(c=i.inclusive)!=null?c:!1,"bigger");if(S!=null&&S.verb)return"".concat(at((a=x!=null?x:i.origin)!=null?a:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.minimum.toString()," ").concat((s=S.unit)!=null?s:"element\\u0173");let I=i.inclusive?"ne ma\\u017Eesnis kaip":"didesnis kaip";return"".concat(at((v=x!=null?x:i.origin)!=null?v:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.minimum.toString()," ").concat(S==null?void 0:S.unit)}case"invalid_format":{let x=i;return x.format==="starts_with"?\'Eilut\\u0117 privalo prasid\\u0117ti "\'.concat(x.prefix,\'"\'):x.format==="ends_with"?\'Eilut\\u0117 privalo pasibaigti "\'.concat(x.suffix,\'"\'):x.format==="includes"?\'Eilut\\u0117 privalo \\u012Ftraukti "\'.concat(x.includes,\'"\'):x.format==="regex"?"Eilut\\u0117 privalo atitikti ".concat(x.pattern):"Neteisingas ".concat((f=n[x.format])!=null?f:i.format)}case"not_multiple_of":return"Skai\\u010Dius privalo b\\u016Bti ".concat(i.divisor," kartotinis.");case"unrecognized_keys":return"Neatpa\\u017Eint".concat(i.keys.length>1?"i":"as"," rakt").concat(i.keys.length>1?"ai":"as",": ").concat(p(i.keys,", "));case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \\u012Fvestis";case"invalid_element":{let x=ut(i.origin);return"".concat(at((h=x!=null?x:i.origin)!=null?h:"reik\\u0161m\\u0117")," turi klaiding\\u0105 \\u012Fvest\\u012F")}default:return"Klaidinga \\u012Fvestis"}}};function Qu(){return{localeError:ed()}}var td=()=>{let e={string:{unit:"\\u0437\\u043D\\u0430\\u0446\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},file:{unit:"\\u0431\\u0430\\u0458\\u0442\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},array:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},set:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0431\\u0440\\u043E\\u0458";case"object":{if(Array.isArray(t))return"\\u043D\\u0438\\u0437\\u0430";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u043D\\u0435\\u0441",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u043D\\u0430 \\u0435-\\u043F\\u043E\\u0448\\u0442\\u0430",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u045F\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C \\u0438 \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435\\u0442\\u0440\\u0430\\u0435\\u045A\\u0435",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",cidrv4:"IPv4 \\u043E\\u043F\\u0441\\u0435\\u0433",cidrv6:"IPv6 \\u043E\\u043F\\u0441\\u0435\\u0433",base64:"base64-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",base64url:"base64url-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",json_string:"JSON \\u043D\\u0438\\u0437\\u0430",e164:"E.164 \\u0431\\u0440\\u043E\\u0458",jwt:"JWT",template_literal:"\\u0432\\u043D\\u0435\\u0441"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.expected,", \\u043F\\u0440\\u0438\\u043C\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Invalid input: expected ".concat(b(t.values[0])):"\\u0413\\u0440\\u0435\\u0448\\u0430\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u0458\\u0430: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 \\u0435\\u0434\\u043D\\u0430 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((o=t.origin)!=null?o:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0438"):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((l=t.origin)!=null?l:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u043D\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u0440\\u0448\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u0443\\u0447\\u0443\\u0432\\u0430 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u043E\\u0434\\u0433\\u043E\\u0430\\u0440\\u0430 \\u043D\\u0430 \\u043F\\u0430\\u0442\\u0435\\u0440\\u043D\\u043E\\u0442 ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0431\\u0440\\u043E\\u0458: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 \\u0434\\u0435\\u043B\\u0438\\u0432 \\u0441\\u043E ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D\\u0438 \\u043A\\u043B\\u0443\\u0447\\u0435\\u0432\\u0438":"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447 \\u0432\\u043E ".concat(t.origin);case"invalid_union":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441";case"invalid_element":return"\\u0413\\u0440\\u0435\\u0448\\u043D\\u0430 \\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442 \\u0432\\u043E ".concat(t.origin);default:return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441"}}};function Hu(){return{localeError:td()}}var rd=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input tidak sah: dijangka ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak sah: dijangka ".concat(b(t.values[0])):"Pilihan tidak sah: dijangka salah satu daripada ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Terlalu besar: dijangka ".concat((o=t.origin)!=null?o:"nilai"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elemen"):"Terlalu besar: dijangka ".concat((l=t.origin)!=null?l:"nilai"," adalah ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Terlalu kecil: dijangka ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Terlalu kecil: dijangka ".concat(t.origin," adalah ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak sah: mesti bermula dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak sah: mesti berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak sah: mesti mengandungi "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak sah: mesti sepadan dengan corak ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak sah")}case"not_multiple_of":return"Nombor tidak sah: perlu gandaan ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali: ".concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak sah dalam ".concat(t.origin);case"invalid_union":return"Input tidak sah";case"invalid_element":return"Nilai tidak sah dalam ".concat(t.origin);default:return"Input tidak sah"}}};function ec(){return{localeError:rd()}}var nd=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ongeldige invoer: verwacht ".concat(t.expected,", ontving ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ongeldige invoer: verwacht ".concat(b(t.values[0])):"Ongeldige optie: verwacht \\xE9\\xE9n van ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Te lang: verwacht dat ".concat((o=t.origin)!=null?o:"waarde"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementen"," bevat"):"Te lang: verwacht dat ".concat((l=t.origin)!=null?l:"waarde"," ").concat(a).concat(t.maximum.toString()," is")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," bevat"):"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," is")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ongeldige tekst: moet met "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ongeldige tekst: moet op "\'.concat(a.suffix,\'" eindigen\'):a.format==="includes"?\'Ongeldige tekst: moet "\'.concat(a.includes,\'" bevatten\'):a.format==="regex"?"Ongeldige tekst: moet overeenkomen met patroon ".concat(a.pattern):"Ongeldig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ongeldig getal: moet een veelvoud van ".concat(t.divisor," zijn");case"unrecognized_keys":return"Onbekende key".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Ongeldige key in ".concat(t.origin);case"invalid_union":return"Ongeldige invoer";case"invalid_element":return"Ongeldige waarde in ".concat(t.origin);default:return"Ongeldige invoer"}}};function tc(){return{localeError:nd()}}var id=()=>{let e={string:{unit:"tegn",verb:"\\xE5 ha"},file:{unit:"bytes",verb:"\\xE5 ha"},array:{unit:"elementer",verb:"\\xE5 inneholde"},set:{unit:"elementer",verb:"\\xE5 inneholde"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ugyldig input: forventet ".concat(t.expected,", fikk ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ugyldig verdi: forventet ".concat(b(t.values[0])):"Ugyldig valg: forventet en av ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"For stor(t): forventet ".concat((o=t.origin)!=null?o:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementer"):"For stor(t): forventet ".concat((l=t.origin)!=null?l:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ugyldig streng: m\\xE5 starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: m\\xE5 ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: m\\xE5 inneholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: m\\xE5 matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ugyldig tall: m\\xE5 v\\xE6re et multiplum av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ukjente n\\xF8kler":"Ukjent n\\xF8kkel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ugyldig n\\xF8kkel i ".concat(t.origin);case"invalid_union":return"Ugyldig input";case"invalid_element":return"Ugyldig verdi i ".concat(t.origin);default:return"Ugyldig input"}}};function rc(){return{localeError:id()}}var od=()=>{let e={string:{unit:"harf",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"},set:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"giren",email:"epostag\\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\\xE2m\\u0131",date:"ISO tarihi",time:"ISO zaman\\u0131",duration:"ISO m\\xFCddeti",ipv4:"IPv4 ni\\u015F\\xE2n\\u0131",ipv6:"IPv6 ni\\u015F\\xE2n\\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\\u015Fifreli metin",base64url:"base64url-\\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"giren"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"F\\xE2sit giren: umulan ".concat(t.expected,", al\\u0131nan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"F\\xE2sit giren: umulan ".concat(b(t.values[0])):"F\\xE2sit tercih: m\\xFBteberler ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Fazla b\\xFCy\\xFCk: ".concat((o=t.origin)!=null?o:"value",", ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"," sahip olmal\\u0131yd\\u0131."):"Fazla b\\xFCy\\xFCk: ".concat((l=t.origin)!=null?l:"value",", ").concat(a).concat(t.maximum.toString()," olmal\\u0131yd\\u0131.")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," sahip olmal\\u0131yd\\u0131."):"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," olmal\\u0131yd\\u0131.")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'F\\xE2sit metin: "\'.concat(a.prefix,\'" ile ba\\u015Flamal\\u0131.\'):a.format==="ends_with"?\'F\\xE2sit metin: "\'.concat(a.suffix,\'" ile bitmeli.\'):a.format==="includes"?\'F\\xE2sit metin: "\'.concat(a.includes,\'" ihtiv\\xE2 etmeli.\'):a.format==="regex"?"F\\xE2sit metin: ".concat(a.pattern," nak\\u015F\\u0131na uymal\\u0131."):"F\\xE2sit ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"F\\xE2sit say\\u0131: ".concat(t.divisor," kat\\u0131 olmal\\u0131yd\\u0131.");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan anahtar var.");case"invalid_union":return"Giren tan\\u0131namad\\u0131.";case"invalid_element":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan k\\u0131ymet var.");default:return"K\\u0131ymet tan\\u0131namad\\u0131."}}};function nc(){return{localeError:od()}}var ad=()=>{let e={string:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},file:{unit:"\\u0628\\u0627\\u06CC\\u067C\\u0633",verb:"\\u0648\\u0644\\u0631\\u064A"},array:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},set:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0627\\u0631\\u06D0";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u064A",email:"\\u0628\\u0631\\u06CC\\u069A\\u0646\\u0627\\u0644\\u06CC\\u06A9",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0646\\u06CC\\u067C\\u0647 \\u0627\\u0648 \\u0648\\u062E\\u062A",date:"\\u0646\\u06D0\\u067C\\u0647",time:"\\u0648\\u062E\\u062A",duration:"\\u0645\\u0648\\u062F\\u0647",ipv4:"\\u062F IPv4 \\u067E\\u062A\\u0647",ipv6:"\\u062F IPv6 \\u067E\\u062A\\u0647",cidrv4:"\\u062F IPv4 \\u0633\\u0627\\u062D\\u0647",cidrv6:"\\u062F IPv6 \\u0633\\u0627\\u062D\\u0647",base64:"base64-encoded \\u0645\\u062A\\u0646",base64url:"base64url-encoded \\u0645\\u062A\\u0646",json_string:"JSON \\u0645\\u062A\\u0646",e164:"\\u062F E.164 \\u0634\\u0645\\u06D0\\u0631\\u0647",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u064A"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(t.expected," \\u0648\\u0627\\u06CC, \\u0645\\u06AB\\u0631 ").concat(n(t.input)," \\u062A\\u0631\\u0644\\u0627\\u0633\\u0647 \\u0634\\u0648");case"invalid_value":return t.values.length===1?"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(b(t.values[0])," \\u0648\\u0627\\u06CC"):"\\u0646\\u0627\\u0633\\u0645 \\u0627\\u0646\\u062A\\u062E\\u0627\\u0628: \\u0628\\u0627\\u06CC\\u062F \\u06CC\\u0648 \\u0644\\u0647 ".concat(p(t.values,"|")," \\u0685\\u062E\\u0647 \\u0648\\u0627\\u06CC");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((o=t.origin)!=null?o:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631\\u0648\\u0646\\u0647"," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((l=t.origin)!=null?l:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0648\\u064A")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0648\\u064A")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.prefix,\'" \\u0633\\u0631\\u0647 \\u067E\\u06CC\\u0644 \\u0634\\u064A\'):a.format==="ends_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.suffix,\'" \\u0633\\u0631\\u0647 \\u067E\\u0627\\u06CC \\u062A\\u0647 \\u0648\\u0631\\u0633\\u064A\\u0696\\u064A\'):a.format==="includes"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F "\'.concat(a.includes,\'" \\u0648\\u0644\\u0631\\u064A\'):a.format==="regex"?"\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(a.pattern," \\u0633\\u0631\\u0647 \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u0648\\u0644\\u0631\\u064A"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0633\\u0645 \\u062F\\u06CC")}case"not_multiple_of":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u062F\\u062F: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(t.divisor," \\u0645\\u0636\\u0631\\u0628 \\u0648\\u064A");case"unrecognized_keys":return"\\u0646\\u0627\\u0633\\u0645 ".concat(t.keys.length>1?"\\u06A9\\u0644\\u06CC\\u0689\\u0648\\u0646\\u0647":"\\u06A9\\u0644\\u06CC\\u0689",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0646\\u0627\\u0633\\u0645 \\u06A9\\u0644\\u06CC\\u0689 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");case"invalid_union":return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A";case"invalid_element":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u0646\\u0635\\u0631 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");default:return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A"}}};function ic(){return{localeError:ad()}}var ud=()=>{let e={string:{unit:"znak\\xF3w",verb:"mie\\u0107"},file:{unit:"bajt\\xF3w",verb:"mie\\u0107"},array:{unit:"element\\xF3w",verb:"mie\\u0107"},set:{unit:"element\\xF3w",verb:"mie\\u0107"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"wyra\\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\\u0105g znak\\xF3w zakodowany w formacie base64",base64url:"ci\\u0105g znak\\xF3w zakodowany w formacie base64url",json_string:"ci\\u0105g znak\\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\\u015Bcie"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(t.expected,", otrzymano ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(b(t.values[0])):"Nieprawid\\u0142owa opcja: oczekiwano jednej z warto\\u015Bci ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Za du\\u017Ca warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((o=t.origin)!=null?o:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"element\\xF3w"):"Zbyt du\\u017C(y/a/e): oczekiwano, \\u017Ce ".concat((l=t.origin)!=null?l:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Za ma\\u0142a warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((c=t.origin)!=null?c:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"element\\xF3w"):"Zbyt ma\\u0142(y/a/e): oczekiwano, \\u017Ce ".concat((s=t.origin)!=null?s:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zaczyna\\u0107 si\\u0119 od "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi ko\\u0144czy\\u0107 si\\u0119 na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zawiera\\u0107 "\'.concat(f.includes,\'"\'):f.format==="regex"?"Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi odpowiada\\u0107 wzorcowi ".concat(f.pattern):"Nieprawid\\u0142ow(y/a/e) ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Nieprawid\\u0142owa liczba: musi by\\u0107 wielokrotno\\u015Bci\\u0105 ".concat(t.divisor);case"unrecognized_keys":return"Nierozpoznane klucze".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Nieprawid\\u0142owy klucz w ".concat(t.origin);case"invalid_union":return"Nieprawid\\u0142owe dane wej\\u015Bciowe";case"invalid_element":return"Nieprawid\\u0142owa warto\\u015B\\u0107 w ".concat(t.origin);default:return"Nieprawid\\u0142owe dane wej\\u015Bciowe"}}};function oc(){return{localeError:ud()}}var cd=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\xFAmero";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"padr\\xE3o",email:"endere\\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\\xE7\\xE3o ISO",ipv4:"endere\\xE7o IPv4",ipv6:"endere\\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Tipo inv\\xE1lido: esperado ".concat(t.expected,", recebido ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entrada inv\\xE1lida: esperado ".concat(b(t.values[0])):"Op\\xE7\\xE3o inv\\xE1lida: esperada uma das ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Muito grande: esperado que ".concat((o=t.origin)!=null?o:"valor"," tivesse ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementos"):"Muito grande: esperado que ".concat((l=t.origin)!=null?l:"valor"," fosse ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Muito pequeno: esperado que ".concat(t.origin," tivesse ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Muito pequeno: esperado que ".concat(t.origin," fosse ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Texto inv\\xE1lido: deve come\\xE7ar com "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Texto inv\\xE1lido: deve terminar com "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Texto inv\\xE1lido: deve incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Texto inv\\xE1lido: deve corresponder ao padr\\xE3o ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," inv\\xE1lido")}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: deve ser m\\xFAltiplo de ".concat(t.divisor);case"unrecognized_keys":return"Chave".concat(t.keys.length>1?"s":""," desconhecida").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Chave inv\\xE1lida em ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido em ".concat(t.origin);default:return"Campo inv\\xE1lido"}}};function ac(){return{localeError:cd()}}function uc(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var ld=()=>{let e={string:{unit:{one:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B",few:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",many:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u0430",many:"\\u0431\\u0430\\u0439\\u0442"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u044F",duration:"ISO \\u0434\\u043B\\u0438\\u0442\\u0435\\u043B\\u044C\\u043D\\u043E\\u0441\\u0442\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64",base64url:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64url",json_string:"JSON \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0432\\u043E\\u0434"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(t.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(b(t.values[0])):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0430\\u0440\\u0438\\u0430\\u043D\\u0442: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C \\u043E\\u0434\\u043D\\u043E \\u0438\\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),v=uc(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),v=uc(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u043D\\u0430\\u0447\\u0438\\u043D\\u0430\\u0442\\u044C\\u0441\\u044F \\u0441 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0438\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u0434\\u0435\\u0440\\u0436\\u0430\\u0442\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u043E\\u0442\\u0432\\u0435\\u0442\\u0441\\u0442\\u0432\\u043E\\u0432\\u0430\\u0442\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 ".concat((l=i[c.format])!=null?l:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0434\\u043E\\u043B\\u0436\\u043D\\u043E \\u0431\\u044B\\u0442\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u043E\\u0437\\u043D\\u0430\\u043D\\u043D".concat(t.keys.length>1?"\\u044B\\u0435":"\\u044B\\u0439"," \\u043A\\u043B\\u044E\\u0447").concat(t.keys.length>1?"\\u0438":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435 \\u0432 ".concat(t.origin);default:return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435"}}};function cc(){return{localeError:ld()}}var sd=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0161tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"vnos",email:"e-po\\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \\u010Das",date:"ISO datum",time:"ISO \\u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \\u0161tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Neveljaven vnos: pri\\u010Dakovano ".concat(t.expected,", prejeto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neveljaven vnos: pri\\u010Dakovano ".concat(b(t.values[0])):"Neveljavna mo\\u017Enost: pri\\u010Dakovano eno izmed ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Preveliko: pri\\u010Dakovano, da bo ".concat((o=t.origin)!=null?o:"vrednost"," imelo ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementov"):"Preveliko: pri\\u010Dakovano, da bo ".concat((l=t.origin)!=null?l:"vrednost"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," imelo ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Neveljaven niz: mora se za\\u010Deti z "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Neveljaven niz: mora se kon\\u010Dati z "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Neveljaven niz: mora vsebovati "\'.concat(a.includes,\'"\'):a.format==="regex"?"Neveljaven niz: mora ustrezati vzorcu ".concat(a.pattern):"Neveljaven ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Neveljavno \\u0161tevilo: mora biti ve\\u010Dkratnik ".concat(t.divisor);case"unrecognized_keys":return"Neprepoznan".concat(t.keys.length>1?"i klju\\u010Di":" klju\\u010D",": ").concat(p(t.keys,", "));case"invalid_key":return"Neveljaven klju\\u010D v ".concat(t.origin);case"invalid_union":return"Neveljaven vnos";case"invalid_element":return"Neveljavna vrednost v ".concat(t.origin);default:return"Neveljaven vnos"}}};function lc(){return{localeError:sd()}}var dd=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\\xE5lla"},set:{unit:"objekt",verb:"att inneh\\xE5lla"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regulj\\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\\xE4ng",base64url:"base64url-kodad str\\xE4ng",json_string:"JSON-str\\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return t=>{var o,u,l,c,a,s,v,f;switch(t.code){case"invalid_type":return"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(t.expected,", fick ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(b(t.values[0])):"Ogiltigt val: f\\xF6rv\\xE4ntade en av ".concat(p(t.values,"|"));case"too_big":{let h=t.inclusive?"<=":"<",x=r(t.origin);return x?"F\\xF6r stor(t): f\\xF6rv\\xE4ntade ".concat((o=t.origin)!=null?o:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString()," ").concat((u=x.unit)!=null?u:"element"):"F\\xF6r stor(t): f\\xF6rv\\xE4ntat ".concat((l=t.origin)!=null?l:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString())}case"too_small":{let h=t.inclusive?">=":">",x=r(t.origin);return x?"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((c=t.origin)!=null?c:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString()," ").concat(x.unit):"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((a=t.origin)!=null?a:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString())}case"invalid_format":{let h=t;return h.format==="starts_with"?\'Ogiltig str\\xE4ng: m\\xE5ste b\\xF6rja med "\'.concat(h.prefix,\'"\'):h.format==="ends_with"?\'Ogiltig str\\xE4ng: m\\xE5ste sluta med "\'.concat(h.suffix,\'"\'):h.format==="includes"?\'Ogiltig str\\xE4ng: m\\xE5ste inneh\\xE5lla "\'.concat(h.includes,\'"\'):h.format==="regex"?\'Ogiltig str\\xE4ng: m\\xE5ste matcha m\\xF6nstret "\'.concat(h.pattern,\'"\'):"Ogiltig(t) ".concat((s=i[h.format])!=null?s:t.format)}case"not_multiple_of":return"Ogiltigt tal: m\\xE5ste vara en multipel av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ok\\xE4nda nycklar":"Ok\\xE4nd nyckel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ogiltig nyckel i ".concat((v=t.origin)!=null?v:"v\\xE4rdet");case"invalid_union":return"Ogiltig input";case"invalid_element":return"Ogiltigt v\\xE4rde i ".concat((f=t.origin)!=null?f:"v\\xE4rdet");default:return"Ogiltig input"}}};function sc(){return{localeError:dd()}}var md=()=>{let e={string:{unit:"\\u0B8E\\u0BB4\\u0BC1\\u0BA4\\u0BCD\\u0BA4\\u0BC1\\u0B95\\u0BCD\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},file:{unit:"\\u0BAA\\u0BC8\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},array:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},set:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0B8E\\u0BA3\\u0BCD \\u0B85\\u0BB2\\u0BCD\\u0BB2\\u0BBE\\u0BA4\\u0BA4\\u0BC1":"\\u0B8E\\u0BA3\\u0BCD";case"object":{if(Array.isArray(t))return"\\u0B85\\u0BA3\\u0BBF";if(t===null)return"\\u0BB5\\u0BC6\\u0BB1\\u0BC1\\u0BAE\\u0BC8";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1",email:"\\u0BAE\\u0BBF\\u0BA9\\u0BCD\\u0BA9\\u0B9E\\u0BCD\\u0B9A\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",date:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF",time:"ISO \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",duration:"ISO \\u0B95\\u0BBE\\u0BB2 \\u0B85\\u0BB3\\u0BB5\\u0BC1",ipv4:"IPv4 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",ipv6:"IPv6 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",cidrv4:"IPv4 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",cidrv6:"IPv6 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",base64:"base64-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",base64url:"base64url-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",json_string:"JSON \\u0B9A\\u0BB0\\u0BAE\\u0BCD",e164:"E.164 \\u0B8E\\u0BA3\\u0BCD",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.expected,", \\u0BAA\\u0BC6\\u0BB1\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(b(t.values[0])):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0BB0\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BAE\\u0BCD: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(p(t.values,"|")," \\u0B87\\u0BB2\\u0BCD \\u0B92\\u0BA9\\u0BCD\\u0BB1\\u0BC1");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((o=t.origin)!=null?o:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD"," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((l=t.origin)!=null?l:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.prefix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BCA\\u0B9F\\u0B99\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="ends_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.suffix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B9F\\u0BBF\\u0BB5\\u0B9F\\u0BC8\\u0BAF \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="includes"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.includes,\'" \\u0B90 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0B9F\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="regex"?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: ".concat(a.pattern," \\u0BAE\\u0BC1\\u0BB1\\u0BC8\\u0BAA\\u0BBE\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B9F\\u0BA9\\u0BCD \\u0BAA\\u0BCA\\u0BB0\\u0BC1\\u0BA8\\u0BCD\\u0BA4 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B8E\\u0BA3\\u0BCD: ".concat(t.divisor," \\u0B87\\u0BA9\\u0BCD \\u0BAA\\u0BB2\\u0BAE\\u0BBE\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD");case"unrecognized_keys":return"\\u0B85\\u0B9F\\u0BC8\\u0BAF\\u0BBE\\u0BB3\\u0BAE\\u0BCD \\u0BA4\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BBE\\u0BA4 \\u0BB5\\u0BBF\\u0B9A\\u0BC8".concat(t.keys.length>1?"\\u0B95\\u0BB3\\u0BCD":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0B9A\\u0BC8");case"invalid_union":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1";case"invalid_element":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1");default:return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1"}}};function dc(){return{localeError:md()}}var fd=()=>{let e={string:{unit:"\\u0E15\\u0E31\\u0E27\\u0E2D\\u0E31\\u0E01\\u0E29\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},file:{unit:"\\u0E44\\u0E1A\\u0E15\\u0E4C",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},array:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},set:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0E44\\u0E21\\u0E48\\u0E43\\u0E0A\\u0E48\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02 (NaN)":"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02";case"object":{if(Array.isArray(t))return"\\u0E2D\\u0E32\\u0E23\\u0E4C\\u0E40\\u0E23\\u0E22\\u0E4C (Array)";if(t===null)return"\\u0E44\\u0E21\\u0E48\\u0E21\\u0E35\\u0E04\\u0E48\\u0E32 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19",email:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48\\u0E2D\\u0E35\\u0E40\\u0E21\\u0E25",url:"URL",emoji:"\\u0E2D\\u0E34\\u0E42\\u0E21\\u0E08\\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",date:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E41\\u0E1A\\u0E1A ISO",time:"\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",duration:"\\u0E0A\\u0E48\\u0E27\\u0E07\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",ipv4:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv4",ipv6:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv6",cidrv4:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv4",cidrv6:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv6",base64:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64",base64url:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64 \\u0E2A\\u0E33\\u0E2B\\u0E23\\u0E31\\u0E1A URL",json_string:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A JSON",e164:"\\u0E40\\u0E1A\\u0E2D\\u0E23\\u0E4C\\u0E42\\u0E17\\u0E23\\u0E28\\u0E31\\u0E1E\\u0E17\\u0E4C\\u0E23\\u0E30\\u0E2B\\u0E27\\u0E48\\u0E32\\u0E07\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E17\\u0E28 (E.164)",jwt:"\\u0E42\\u0E17\\u0E40\\u0E04\\u0E19 JWT",template_literal:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E20\\u0E17\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(t.expected," \\u0E41\\u0E15\\u0E48\\u0E44\\u0E14\\u0E49\\u0E23\\u0E31\\u0E1A ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0E04\\u0E48\\u0E32\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(b(t.values[0])):"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E37\\u0E2D\\u0E01\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E2B\\u0E19\\u0E36\\u0E48\\u0E07\\u0E43\\u0E19 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"\\u0E44\\u0E21\\u0E48\\u0E40\\u0E01\\u0E34\\u0E19":"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32",s=r(t.origin);return s?"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((o=t.origin)!=null?o:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23"):"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((l=t.origin)!=null?l:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"\\u0E2D\\u0E22\\u0E48\\u0E32\\u0E07\\u0E19\\u0E49\\u0E2D\\u0E22":"\\u0E21\\u0E32\\u0E01\\u0E01\\u0E27\\u0E48\\u0E32",s=r(t.origin);return s?"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E02\\u0E36\\u0E49\\u0E19\\u0E15\\u0E49\\u0E19\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E25\\u0E07\\u0E17\\u0E49\\u0E32\\u0E22\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E21\\u0E35 "\'.concat(a.includes,\'" \\u0E2D\\u0E22\\u0E39\\u0E48\\u0E43\\u0E19\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\'):a.format==="regex"?"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14 ".concat(a.pattern):"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E08\\u0E33\\u0E19\\u0E27\\u0E19\\u0E17\\u0E35\\u0E48\\u0E2B\\u0E32\\u0E23\\u0E14\\u0E49\\u0E27\\u0E22 ".concat(t.divisor," \\u0E44\\u0E14\\u0E49\\u0E25\\u0E07\\u0E15\\u0E31\\u0E27");case"unrecognized_keys":return"\\u0E1E\\u0E1A\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E17\\u0E35\\u0E48\\u0E44\\u0E21\\u0E48\\u0E23\\u0E39\\u0E49\\u0E08\\u0E31\\u0E01: ".concat(p(t.keys,", "));case"invalid_key":return"\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);case"invalid_union":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E44\\u0E21\\u0E48\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E22\\u0E39\\u0E40\\u0E19\\u0E35\\u0E22\\u0E19\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14\\u0E44\\u0E27\\u0E49";case"invalid_element":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);default:return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07"}}};function mc(){return{localeError:fd()}}var pd=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},gd=()=>{let e={string:{unit:"karakter",verb:"olmal\\u0131"},file:{unit:"bayt",verb:"olmal\\u0131"},array:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"},set:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\\u0131\\u011F\\u0131",cidrv6:"IPv6 aral\\u0131\\u011F\\u0131",base64:"base64 ile \\u015Fifrelenmi\\u015F metin",base64url:"base64url ile \\u015Fifrelenmi\\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"\\u015Eablon dizesi"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(i.expected,", al\\u0131nan ").concat(pd(i.input));case"invalid_value":return i.values.length===1?"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(b(i.values[0])):"Ge\\xE7ersiz se\\xE7enek: a\\u015Fa\\u011F\\u0131dakilerden biri olmal\\u0131: ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((t=i.origin)!=null?t:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\xF6\\u011Fe"):"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((u=i.origin)!=null?u:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.prefix,\'" ile ba\\u015Flamal\\u0131\'):c.format==="ends_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.suffix,\'" ile bitmeli\'):c.format==="includes"?\'Ge\\xE7ersiz metin: "\'.concat(c.includes,\'" i\\xE7ermeli\'):c.format==="regex"?"Ge\\xE7ersiz metin: ".concat(c.pattern," desenine uymal\\u0131"):"Ge\\xE7ersiz ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Ge\\xE7ersiz say\\u0131: ".concat(i.divisor," ile tam b\\xF6l\\xFCnebilmeli");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar".concat(i.keys.length>1?"lar":"",": ").concat(p(i.keys,", "));case"invalid_key":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz anahtar");case"invalid_union":return"Ge\\xE7ersiz de\\u011Fer";case"invalid_element":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz de\\u011Fer");default:return"Ge\\xE7ersiz de\\u011Fer"}}};function fc(){return{localeError:gd()}}var vd=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u0435\\u043B\\u0435\\u043A\\u0442\\u0440\\u043E\\u043D\\u043D\\u043E\\u0457 \\u043F\\u043E\\u0448\\u0442\\u0438",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0434\\u0430\\u0442\\u0430 \\u0442\\u0430 \\u0447\\u0430\\u0441 ISO",date:"\\u0434\\u0430\\u0442\\u0430 ISO",time:"\\u0447\\u0430\\u0441 ISO",duration:"\\u0442\\u0440\\u0438\\u0432\\u0430\\u043B\\u0456\\u0441\\u0442\\u044C ISO",ipv4:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv4",ipv6:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv6",cidrv4:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv4",cidrv6:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv6",base64:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64",base64url:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64url",json_string:"\\u0440\\u044F\\u0434\\u043E\\u043A JSON",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(t.expected,", \\u043E\\u0442\\u0440\\u0438\\u043C\\u0430\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0456\\u044F: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F \\u043E\\u0434\\u043D\\u0435 \\u0437 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432"):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((l=t.origin)!=null?l:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043F\\u043E\\u0447\\u0438\\u043D\\u0430\\u0442\\u0438\\u0441\\u044F \\u0437 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0456\\u043D\\u0447\\u0443\\u0432\\u0430\\u0442\\u0438\\u0441\\u044F \\u043D\\u0430 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043C\\u0456\\u0441\\u0442\\u0438\\u0442\\u0438 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0432\\u0456\\u0434\\u043F\\u043E\\u0432\\u0456\\u0434\\u0430\\u0442\\u0438 \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(a.pattern):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u043F\\u043E\\u0432\\u0438\\u043D\\u043D\\u043E \\u0431\\u0443\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0442\\u043D\\u0438\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u043E\\u0437\\u043F\\u0456\\u0437\\u043D\\u0430\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447".concat(t.keys.length>1?"\\u0456":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456";case"invalid_element":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F \\u0443 ".concat(t.origin);default:return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"}}};function nr(){return{localeError:vd()}}function pc(){return nr()}var hd=()=>{let e={string:{unit:"\\u062D\\u0631\\u0648\\u0641",verb:"\\u06C1\\u0648\\u0646\\u0627"},file:{unit:"\\u0628\\u0627\\u0626\\u0679\\u0633",verb:"\\u06C1\\u0648\\u0646\\u0627"},array:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"},set:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0646\\u0645\\u0628\\u0631";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u06D2";if(t===null)return"\\u0646\\u0644";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0627\\u0646 \\u067E\\u0679",email:"\\u0627\\u06CC \\u0645\\u06CC\\u0644 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",uuidv4:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 4",uuidv6:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 6",nanoid:"\\u0646\\u06CC\\u0646\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",guid:"\\u062C\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid2:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC 2",ulid:"\\u06CC\\u0648 \\u0627\\u06CC\\u0644 \\u0622\\u0626\\u06CC \\u0688\\u06CC",xid:"\\u0627\\u06CC\\u06A9\\u0633 \\u0622\\u0626\\u06CC \\u0688\\u06CC",ksuid:"\\u06A9\\u06D2 \\u0627\\u06CC\\u0633 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",datetime:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0688\\u06CC\\u0679 \\u0679\\u0627\\u0626\\u0645",date:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u062A\\u0627\\u0631\\u06CC\\u062E",time:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0648\\u0642\\u062A",duration:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0645\\u062F\\u062A",ipv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",ipv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",cidrv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0631\\u06CC\\u0646\\u062C",cidrv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0631\\u06CC\\u0646\\u062C",base64:"\\u0628\\u06CC\\u0633 64 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",base64url:"\\u0628\\u06CC\\u0633 64 \\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",json_string:"\\u062C\\u06D2 \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0627\\u06CC\\u0646 \\u0633\\u0679\\u0631\\u0646\\u06AF",e164:"\\u0627\\u06CC 164 \\u0646\\u0645\\u0628\\u0631",jwt:"\\u062C\\u06D2 \\u0688\\u0628\\u0644\\u06CC\\u0648 \\u0679\\u06CC",template_literal:"\\u0627\\u0646 \\u067E\\u0679"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(t.expected," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627\\u060C ").concat(n(t.input)," \\u0645\\u0648\\u0635\\u0648\\u0644 \\u06C1\\u0648\\u0627");case"invalid_value":return t.values.length===1?"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(b(t.values[0])," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627"):"\\u063A\\u0644\\u0637 \\u0622\\u067E\\u0634\\u0646: ".concat(p(t.values,"|")," \\u0645\\u06CC\\u06BA \\u0633\\u06D2 \\u0627\\u06CC\\u06A9 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((o=t.origin)!=null?o:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u06D2 ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0627\\u0635\\u0631"," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((l=t.origin)!=null?l:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u0627 ").concat(a).concat(t.maximum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u06D2 ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u0627 ").concat(a).concat(t.minimum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.prefix,\'" \\u0633\\u06D2 \\u0634\\u0631\\u0648\\u0639 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="ends_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.suffix,\'" \\u067E\\u0631 \\u062E\\u062A\\u0645 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="includes"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.includes,\'" \\u0634\\u0627\\u0645\\u0644 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="regex"?"\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: \\u067E\\u06CC\\u0679\\u0631\\u0646 ".concat(a.pattern," \\u0633\\u06D2 \\u0645\\u06CC\\u0686 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2"):"\\u063A\\u0644\\u0637 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u063A\\u0644\\u0637 \\u0646\\u0645\\u0628\\u0631: ".concat(t.divisor," \\u06A9\\u0627 \\u0645\\u0636\\u0627\\u0639\\u0641 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2");case"unrecognized_keys":return"\\u063A\\u06CC\\u0631 \\u062A\\u0633\\u0644\\u06CC\\u0645 \\u0634\\u062F\\u06C1 \\u06A9\\u06CC".concat(t.keys.length>1?"\\u0632":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u06A9\\u06CC");case"invalid_union":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679";case"invalid_element":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u0648\\u06CC\\u0644\\u06CC\\u0648");default:return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679"}}};function gc(){return{localeError:hd()}}var $d=()=>{let e={string:{unit:"k\\xFD t\\u1EF1",verb:"c\\xF3"},file:{unit:"byte",verb:"c\\xF3"},array:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"},set:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"s\\u1ED1";case"object":{if(Array.isArray(t))return"m\\u1EA3ng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0111\\u1EA7u v\\xE0o",email:"\\u0111\\u1ECBa ch\\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\\xE0y gi\\u1EDD ISO",date:"ng\\xE0y ISO",time:"gi\\u1EDD ISO",duration:"kho\\u1EA3ng th\\u1EDDi gian ISO",ipv4:"\\u0111\\u1ECBa ch\\u1EC9 IPv4",ipv6:"\\u0111\\u1ECBa ch\\u1EC9 IPv6",cidrv4:"d\\u1EA3i IPv4",cidrv6:"d\\u1EA3i IPv6",base64:"chu\\u1ED7i m\\xE3 h\\xF3a base64",base64url:"chu\\u1ED7i m\\xE3 h\\xF3a base64url",json_string:"chu\\u1ED7i JSON",e164:"s\\u1ED1 E.164",jwt:"JWT",template_literal:"\\u0111\\u1EA7u v\\xE0o"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(t.expected,", nh\\u1EADn \\u0111\\u01B0\\u1EE3c ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(b(t.values[0])):"T\\xF9y ch\\u1ECDn kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i m\\u1ED9t trong c\\xE1c gi\\xE1 tr\\u1ECB ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((o=t.origin)!=null?o:"gi\\xE1 tr\\u1ECB"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"ph\\u1EA7n t\\u1EED"):"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((l=t.origin)!=null?l:"gi\\xE1 tr\\u1ECB"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i b\\u1EAFt \\u0111\\u1EA7u b\\u1EB1ng "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i k\\u1EBFt th\\xFAc b\\u1EB1ng "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i bao g\\u1ED3m "\'.concat(a.includes,\'"\'):a.format==="regex"?"Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i kh\\u1EDBp v\\u1EDBi m\\u1EABu ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," kh\\xF4ng h\\u1EE3p l\\u1EC7")}case"not_multiple_of":return"S\\u1ED1 kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i l\\xE0 b\\u1ED9i s\\u1ED1 c\\u1EE7a ".concat(t.divisor);case"unrecognized_keys":return"Kh\\xF3a kh\\xF4ng \\u0111\\u01B0\\u1EE3c nh\\u1EADn d\\u1EA1ng: ".concat(p(t.keys,", "));case"invalid_key":return"Kh\\xF3a kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);case"invalid_union":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7";case"invalid_element":return"Gi\\xE1 tr\\u1ECB kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);default:return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7"}}};function vc(){return{localeError:$d()}}var bd=()=>{let e={string:{unit:"\\u5B57\\u7B26",verb:"\\u5305\\u542B"},file:{unit:"\\u5B57\\u8282",verb:"\\u5305\\u542B"},array:{unit:"\\u9879",verb:"\\u5305\\u542B"},set:{unit:"\\u9879",verb:"\\u5305\\u542B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u975E\\u6570\\u5B57(NaN)":"\\u6570\\u5B57";case"object":{if(Array.isArray(t))return"\\u6570\\u7EC4";if(t===null)return"\\u7A7A\\u503C(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F93\\u5165",email:"\\u7535\\u5B50\\u90AE\\u4EF6",url:"URL",emoji:"\\u8868\\u60C5\\u7B26\\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u671F\\u65F6\\u95F4",date:"ISO\\u65E5\\u671F",time:"ISO\\u65F6\\u95F4",duration:"ISO\\u65F6\\u957F",ipv4:"IPv4\\u5730\\u5740",ipv6:"IPv6\\u5730\\u5740",cidrv4:"IPv4\\u7F51\\u6BB5",cidrv6:"IPv6\\u7F51\\u6BB5",base64:"base64\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",base64url:"base64url\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",json_string:"JSON\\u5B57\\u7B26\\u4E32",e164:"E.164\\u53F7\\u7801",jwt:"JWT",template_literal:"\\u8F93\\u5165"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(t.expected,"\\uFF0C\\u5B9E\\u9645\\u63A5\\u6536 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(b(t.values[0])):"\\u65E0\\u6548\\u9009\\u9879\\uFF1A\\u671F\\u671B\\u4EE5\\u4E0B\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((o=t.origin)!=null?o:"\\u503C"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u4E2A\\u5143\\u7D20"):"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((l=t.origin)!=null?l:"\\u503C"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.prefix,\'" \\u5F00\\u5934\'):a.format==="ends_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.suffix,\'" \\u7ED3\\u5C3E\'):a.format==="includes"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u6EE1\\u8DB3\\u6B63\\u5219\\u8868\\u8FBE\\u5F0F ".concat(a.pattern):"\\u65E0\\u6548".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u65E0\\u6548\\u6570\\u5B57\\uFF1A\\u5FC5\\u987B\\u662F ".concat(t.divisor," \\u7684\\u500D\\u6570");case"unrecognized_keys":return"\\u51FA\\u73B0\\u672A\\u77E5\\u7684\\u952E(key): ".concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u7684\\u952E(key)\\u65E0\\u6548");case"invalid_union":return"\\u65E0\\u6548\\u8F93\\u5165";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u5305\\u542B\\u65E0\\u6548\\u503C(value)");default:return"\\u65E0\\u6548\\u8F93\\u5165"}}};function hc(){return{localeError:bd()}}var _d=()=>{let e={string:{unit:"\\u5B57\\u5143",verb:"\\u64C1\\u6709"},file:{unit:"\\u4F4D\\u5143\\u7D44",verb:"\\u64C1\\u6709"},array:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"},set:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F38\\u5165",email:"\\u90F5\\u4EF6\\u5730\\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u65E5\\u671F\\u6642\\u9593",date:"ISO \\u65E5\\u671F",time:"ISO \\u6642\\u9593",duration:"ISO \\u671F\\u9593",ipv4:"IPv4 \\u4F4D\\u5740",ipv6:"IPv6 \\u4F4D\\u5740",cidrv4:"IPv4 \\u7BC4\\u570D",cidrv6:"IPv6 \\u7BC4\\u570D",base64:"base64 \\u7DE8\\u78BC\\u5B57\\u4E32",base64url:"base64url \\u7DE8\\u78BC\\u5B57\\u4E32",json_string:"JSON \\u5B57\\u4E32",e164:"E.164 \\u6578\\u503C",jwt:"JWT",template_literal:"\\u8F38\\u5165"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(t.expected,"\\uFF0C\\u4F46\\u6536\\u5230 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(b(t.values[0])):"\\u7121\\u6548\\u7684\\u9078\\u9805\\uFF1A\\u9810\\u671F\\u70BA\\u4EE5\\u4E0B\\u5176\\u4E2D\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((o=t.origin)!=null?o:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u500B\\u5143\\u7D20"):"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((l=t.origin)!=null?l:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.prefix,\'" \\u958B\\u982D\'):a.format==="ends_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.suffix,\'" \\u7D50\\u5C3E\'):a.format==="includes"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u7B26\\u5408\\u683C\\u5F0F ".concat(a.pattern):"\\u7121\\u6548\\u7684 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u6548\\u7684\\u6578\\u5B57\\uFF1A\\u5FC5\\u9808\\u70BA ".concat(t.divisor," \\u7684\\u500D\\u6578");case"unrecognized_keys":return"\\u7121\\u6CD5\\u8B58\\u5225\\u7684\\u9375\\u503C".concat(t.keys.length>1?"\\u5011":"","\\uFF1A").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u9375\\u503C");case"invalid_union":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u503C");default:return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C"}}};function $c(){return{localeError:_d()}}var yd=()=>{let e={string:{unit:"\\xE0mi",verb:"n\\xED"},file:{unit:"bytes",verb:"n\\xED"},array:{unit:"nkan",verb:"n\\xED"},set:{unit:"nkan",verb:"n\\xED"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\u1ECD\\u0301mb\\xE0";case"object":{if(Array.isArray(t))return"akop\\u1ECD";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9",email:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC \\xECm\\u1EB9\\u0301l\\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\xE0k\\xF3k\\xF2 ISO",date:"\\u1ECDj\\u1ECD\\u0301 ISO",time:"\\xE0k\\xF3k\\xF2 ISO",duration:"\\xE0k\\xF3k\\xF2 t\\xF3 p\\xE9 ISO",ipv4:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv4",ipv6:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv6",cidrv4:"\\xE0gb\\xE8gb\\xE8 IPv4",cidrv6:"\\xE0gb\\xE8gb\\xE8 IPv6",base64:"\\u1ECD\\u0300r\\u1ECD\\u0300 t\\xED a k\\u1ECD\\u0301 n\\xED base64",base64url:"\\u1ECD\\u0300r\\u1ECD\\u0300 base64url",json_string:"\\u1ECD\\u0300r\\u1ECD\\u0300 JSON",e164:"n\\u1ECD\\u0301mb\\xE0 E.164",jwt:"JWT",template_literal:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9"};return t=>{var o,u;switch(t.code){case"invalid_type":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(t.expected,", \\xE0m\\u1ECD\\u0300 a r\\xED ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(b(t.values[0])):"\\xC0\\u1E63\\xE0y\\xE0n a\\u1E63\\xEC\\u1E63e: yan \\u1ECD\\u0300kan l\\xE1ra ".concat(p(t.values,"|"));case"too_big":{let l=t.inclusive?"<=":"<",c=r(t.origin);return c?"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat((o=t.origin)!=null?o:"iye"," ").concat(c.verb," ").concat(l).concat(t.maximum," ").concat(c.unit):"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(l).concat(t.maximum)}case"too_small":{let l=t.inclusive?">=":">",c=r(t.origin);return c?"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat(t.origin," ").concat(c.verb," ").concat(l).concat(t.minimum," ").concat(c.unit):"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(l).concat(t.minimum)}case"invalid_format":{let l=t;return l.format==="starts_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\u1EB9\\u0300r\\u1EB9\\u0300 p\\u1EB9\\u0300l\\xFA "\'.concat(l.prefix,\'"\'):l.format==="ends_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 par\\xED p\\u1EB9\\u0300l\\xFA "\'.concat(l.suffix,\'"\'):l.format==="includes"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 n\\xED "\'.concat(l.includes,\'"\'):l.format==="regex"?"\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\xE1 \\xE0p\\u1EB9\\u1EB9r\\u1EB9 mu ".concat(l.pattern):"A\\u1E63\\xEC\\u1E63e: ".concat((u=i[l.format])!=null?u:t.format)}case"not_multiple_of":return"N\\u1ECD\\u0301mb\\xE0 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 j\\u1EB9\\u0301 \\xE8y\\xE0 p\\xEDp\\xEDn ti ".concat(t.divisor);case"unrecognized_keys":return"B\\u1ECDt\\xECn\\xEC \\xE0\\xECm\\u1ECD\\u0300: ".concat(p(t.keys,", "));case"invalid_key":return"B\\u1ECDt\\xECn\\xEC a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);case"invalid_union":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e";case"invalid_element":return"Iye a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);default:return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e"}}};function bc(){return{localeError:yd()}}var co=Symbol("ZodOutput"),lo=Symbol("ZodInput"),Te=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];if(this._map.set(r,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error("ID ".concat(i.id," already exists in the registry"));this._idmap.set(i.id,r)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){var i;let n=r._zod.parent;if(n){let t=m({},(i=this.get(n))!=null?i:{});delete t.id;let o=m(m({},t),this._map.get(r));return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function ir(){return new Te}var oe=ir();function so(e,r){return new e(m({type:"string"},y(r)))}function mo(e,r){return new e(m({type:"string",coerce:!0},y(r)))}function or(e,r){return new e(m({type:"string",format:"email",check:"string_format",abort:!1},y(r)))}function ct(e,r){return new e(m({type:"string",format:"guid",check:"string_format",abort:!1},y(r)))}function ar(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1},y(r)))}function ur(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},y(r)))}function cr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},y(r)))}function lr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},y(r)))}function lt(e,r){return new e(m({type:"string",format:"url",check:"string_format",abort:!1},y(r)))}function sr(e,r){return new e(m({type:"string",format:"emoji",check:"string_format",abort:!1},y(r)))}function dr(e,r){return new e(m({type:"string",format:"nanoid",check:"string_format",abort:!1},y(r)))}function mr(e,r){return new e(m({type:"string",format:"cuid",check:"string_format",abort:!1},y(r)))}function fr(e,r){return new e(m({type:"string",format:"cuid2",check:"string_format",abort:!1},y(r)))}function pr(e,r){return new e(m({type:"string",format:"ulid",check:"string_format",abort:!1},y(r)))}function gr(e,r){return new e(m({type:"string",format:"xid",check:"string_format",abort:!1},y(r)))}function vr(e,r){return new e(m({type:"string",format:"ksuid",check:"string_format",abort:!1},y(r)))}function hr(e,r){return new e(m({type:"string",format:"ipv4",check:"string_format",abort:!1},y(r)))}function $r(e,r){return new e(m({type:"string",format:"ipv6",check:"string_format",abort:!1},y(r)))}function br(e,r){return new e(m({type:"string",format:"cidrv4",check:"string_format",abort:!1},y(r)))}function _r(e,r){return new e(m({type:"string",format:"cidrv6",check:"string_format",abort:!1},y(r)))}function yr(e,r){return new e(m({type:"string",format:"base64",check:"string_format",abort:!1},y(r)))}function xr(e,r){return new e(m({type:"string",format:"base64url",check:"string_format",abort:!1},y(r)))}function kr(e,r){return new e(m({type:"string",format:"e164",check:"string_format",abort:!1},y(r)))}function zr(e,r){return new e(m({type:"string",format:"jwt",check:"string_format",abort:!1},y(r)))}var fo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function po(e,r){return new e(m({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},y(r)))}function go(e,r){return new e(m({type:"string",format:"date",check:"string_format"},y(r)))}function vo(e,r){return new e(m({type:"string",format:"time",check:"string_format",precision:null},y(r)))}function ho(e,r){return new e(m({type:"string",format:"duration",check:"string_format"},y(r)))}function $o(e,r){return new e(m({type:"number",checks:[]},y(r)))}function bo(e,r){return new e(m({type:"number",coerce:!0,checks:[]},y(r)))}function _o(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"safeint"},y(r)))}function yo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float32"},y(r)))}function xo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float64"},y(r)))}function ko(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"int32"},y(r)))}function zo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"uint32"},y(r)))}function Io(e,r){return new e(m({type:"boolean"},y(r)))}function wo(e,r){return new e(m({type:"boolean",coerce:!0},y(r)))}function So(e,r){return new e(m({type:"bigint"},y(r)))}function jo(e,r){return new e(m({type:"bigint",coerce:!0},y(r)))}function Oo(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},y(r)))}function Po(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},y(r)))}function Uo(e,r){return new e(m({type:"symbol"},y(r)))}function No(e,r){return new e(m({type:"undefined"},y(r)))}function Zo(e,r){return new e(m({type:"null"},y(r)))}function Do(e){return new e({type:"any"})}function To(e){return new e({type:"unknown"})}function Eo(e,r){return new e(m({type:"never"},y(r)))}function Ao(e,r){return new e(m({type:"void"},y(r)))}function Ro(e,r){return new e(m({type:"date"},y(r)))}function Lo(e,r){return new e(m({type:"date",coerce:!0},y(r)))}function Co(e,r){return new e(m({type:"nan"},y(r)))}function ce(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!1}))}function H(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!0}))}function le(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!1}))}function W(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!0}))}function Vo(e){return le(0,e)}function Fo(e){return ce(0,e)}function Jo(e){return H(0,e)}function Mo(e){return W(0,e)}function Ie(e,r){return new Tn(z(m({check:"multiple_of"},y(r)),{value:e}))}function Ee(e,r){return new Rn(z(m({check:"max_size"},y(r)),{maximum:e}))}function we(e,r){return new Ln(z(m({check:"min_size"},y(r)),{minimum:e}))}function st(e,r){return new Cn(z(m({check:"size_equals"},y(r)),{size:e}))}function Ae(e,r){return new Vn(z(m({check:"max_length"},y(r)),{maximum:e}))}function $e(e,r){return new Fn(z(m({check:"min_length"},y(r)),{minimum:e}))}function Re(e,r){return new Jn(z(m({check:"length_equals"},y(r)),{length:e}))}function dt(e,r){return new Mn(z(m({check:"string_format",format:"regex"},y(r)),{pattern:e}))}function mt(e){return new Bn(m({check:"string_format",format:"lowercase"},y(e)))}function ft(e){return new Kn(m({check:"string_format",format:"uppercase"},y(e)))}function pt(e,r){return new Gn(z(m({check:"string_format",format:"includes"},y(r)),{includes:e}))}function gt(e,r){return new Wn(z(m({check:"string_format",format:"starts_with"},y(r)),{prefix:e}))}function vt(e,r){return new Xn(z(m({check:"string_format",format:"ends_with"},y(r)),{suffix:e}))}function Bo(e,r,n){return new qn(m({check:"property",property:e,schema:r},y(n)))}function ht(e,r){return new Yn(m({check:"mime_type",mime:e},y(r)))}function se(e){return new Qn({check:"overwrite",tx:e})}function $t(e){return se(r=>r.normalize(e))}function bt(){return se(e=>e.trim())}function _t(){return se(e=>e.toLowerCase())}function yt(){return se(e=>e.toUpperCase())}function Ko(e,r,n){return new e(m({type:"array",element:r},y(n)))}function xd(e,r,n){return new e(m({type:"union",options:r},y(n)))}function kd(e,r,n,i){return new e(m({type:"union",options:n,discriminator:r},y(i)))}function zd(e,r,n){return new e({type:"intersection",left:r,right:n})}function Id(e,r,n,i){let t=n instanceof O,o=t?i:n,u=t?n:null;return new e(m({type:"tuple",items:r,rest:u},y(o)))}function wd(e,r,n,i){return new e(m({type:"record",keyType:r,valueType:n},y(i)))}function Sd(e,r,n,i){return new e(m({type:"map",keyType:r,valueType:n},y(i)))}function jd(e,r,n){return new e(m({type:"set",valueType:r},y(n)))}function Od(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e(m({type:"enum",entries:i},y(n)))}function Pd(e,r,n){return new e(m({type:"enum",entries:r},y(n)))}function Ud(e,r,n){return new e(m({type:"literal",values:Array.isArray(r)?r:[r]},y(n)))}function Go(e,r){return new e(m({type:"file"},y(r)))}function Nd(e,r){return new e({type:"transform",transform:r})}function Zd(e,r){return new e({type:"optional",innerType:r})}function Dd(e,r){return new e({type:"nullable",innerType:r})}function Td(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():qr(n)}})}function Ed(e,r,n){return new e(m({type:"nonoptional",innerType:r},y(n)))}function Ad(e,r){return new e({type:"success",innerType:r})}function Rd(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Ld(e,r,n){return new e({type:"pipe",in:r,out:n})}function Cd(e,r){return new e({type:"readonly",innerType:r})}function Vd(e,r,n){return new e(m({type:"template_literal",parts:r},y(n)))}function Fd(e,r){return new e({type:"lazy",getter:r})}function Jd(e,r){return new e({type:"promise",innerType:r})}function Wo(e,r,n){var o;let i=y(n);return(o=i.abort)!=null||(i.abort=!0),new e(m({type:"custom",check:"custom",fn:r},i))}function Xo(e,r,n){return new e(m({type:"custom",check:"custom",fn:r},y(n)))}function qo(e){let r=_c(n=>(n.addIssue=i=>{var t,o,u,l;if(typeof i=="string")n.issues.push(Oe(i,n.value,r._zod.def));else{let c=i;c.fatal&&(c.continue=!1),(t=c.code)!=null||(c.code="custom"),(o=c.input)!=null||(c.input=n.value),(u=c.inst)!=null||(c.inst=r),(l=c.continue)!=null||(c.continue=!r._zod.def.abort),n.issues.push(Oe(c))}},e(n.value,n)));return r}function _c(e,r){let n=new R(m({check:"custom"},y(r)));return n._zod.check=e,n}function Yo(e,r){var h,x,S,I,C;let n=y(r),i=(h=n.truthy)!=null?h:["true","1","yes","on","y","enabled"],t=(x=n.falsy)!=null?x:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(j=>typeof j=="string"?j.toLowerCase():j),t=t.map(j=>typeof j=="string"?j.toLowerCase():j));let o=new Set(i),u=new Set(t),l=(S=e.Codec)!=null?S:ot,c=(I=e.Boolean)!=null?I:it,a=(C=e.String)!=null?C:ke,s=new a({type:"string",error:n.error}),v=new c({type:"boolean",error:n.error}),f=new l({type:"pipe",in:s,out:v,transform:(j,g)=>{let $=j;return n.case!=="sensitive"&&($=$.toLowerCase()),o.has($)?!0:u.has($)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...u],input:g.value,inst:f,continue:!1}),{})},reverseTransform:(j,g)=>j===!0?i[0]||"true":t[0]||"false",error:n.error});return f}function Le(e,r,n,i={}){let t=y(i),o=m(z(m({},y(i)),{check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:l=>n.test(l)}),t);return n instanceof RegExp&&(o.pattern=n),new e(o)}var xt=class{constructor(r){var n,i,t,o,u;this.counter=0,this.metadataRegistry=(n=r==null?void 0:r.metadata)!=null?n:oe,this.target=(i=r==null?void 0:r.target)!=null?i:"draft-2020-12",this.unrepresentable=(t=r==null?void 0:r.unrepresentable)!=null?t:"throw",this.override=(o=r==null?void 0:r.override)!=null?o:()=>{},this.io=(u=r==null?void 0:r.io)!=null?u:"output",this.seen=new Map}process(r,n={path:[],schemaPath:[]}){var v,f,h,x,S;var i;let t=r._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},u=this.seen.get(r);if(u)return u.count++,n.schemaPath.includes(r)&&(u.cycle=n.path),u.schema;let l={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,l);let c=(f=(v=r._zod).toJSONSchema)==null?void 0:f.call(v);if(c)l.schema=c;else{let I=z(m({},n),{schemaPath:[...n.schemaPath,r],path:n.path}),C=r._zod.parent;if(C)l.ref=C,this.process(C,I),this.seen.get(C).isParent=!0;else{let j=l.schema;switch(t.type){case"string":{let g=j;g.type="string";let{minimum:$,maximum:k,format:N,patterns:P,contentEncoding:w}=r._zod.bag;if(typeof $=="number"&&(g.minLength=$),typeof k=="number"&&(g.maxLength=k),N&&(g.format=(h=o[N])!=null?h:N,g.format===""&&delete g.format),w&&(g.contentEncoding=w),P&&P.size>0){let D=[...P];D.length===1?g.pattern=D[0].source:D.length>1&&(l.schema.allOf=[...D.map(B=>z(m({},this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{}),{pattern:B.source}))])}break}case"number":{let g=j,{minimum:$,maximum:k,format:N,multipleOf:P,exclusiveMaximum:w,exclusiveMinimum:D}=r._zod.bag;typeof N=="string"&&N.includes("int")?g.type="integer":g.type="number",typeof D=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.minimum=D,g.exclusiveMinimum=!0):g.exclusiveMinimum=D),typeof $=="number"&&(g.minimum=$,typeof D=="number"&&this.target!=="draft-4"&&(D>=$?delete g.minimum:delete g.exclusiveMinimum)),typeof w=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.maximum=w,g.exclusiveMaximum=!0):g.exclusiveMaximum=w),typeof k=="number"&&(g.maximum=k,typeof w=="number"&&this.target!=="draft-4"&&(w<=k?delete g.maximum:delete g.exclusiveMaximum)),typeof P=="number"&&(g.multipleOf=P);break}case"boolean":{let g=j;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(j.type="string",j.nullable=!0,j.enum=[null]):j.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{j.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=j,{minimum:$,maximum:k}=r._zod.bag;typeof $=="number"&&(g.minItems=$),typeof k=="number"&&(g.maxItems=k),g.type="array",g.items=this.process(t.element,z(m({},I),{path:[...I.path,"items"]}));break}case"object":{let g=j;g.type="object",g.properties={};let $=t.shape;for(let P in $)g.properties[P]=this.process($[P],z(m({},I),{path:[...I.path,"properties",P]}));let k=new Set(Object.keys($)),N=new Set([...k].filter(P=>{let w=t.shape[P]._zod;return this.io==="input"?w.optin===void 0:w.optout===void 0}));N.size>0&&(g.required=Array.from(N)),((x=t.catchall)==null?void 0:x._zod.def.type)==="never"?g.additionalProperties=!1:t.catchall?t.catchall&&(g.additionalProperties=this.process(t.catchall,z(m({},I),{path:[...I.path,"additionalProperties"]}))):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=j,$=t.options.map((k,N)=>this.process(k,z(m({},I),{path:[...I.path,"anyOf",N]})));g.anyOf=$;break}case"intersection":{let g=j,$=this.process(t.left,z(m({},I),{path:[...I.path,"allOf",0]})),k=this.process(t.right,z(m({},I),{path:[...I.path,"allOf",1]})),N=w=>"allOf"in w&&Object.keys(w).length===1,P=[...N($)?$.allOf:[$],...N(k)?k.allOf:[k]];g.allOf=P;break}case"tuple":{let g=j;g.type="array";let $=this.target==="draft-2020-12"?"prefixItems":"items",k=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",N=t.items.map((B,V)=>this.process(B,z(m({},I),{path:[...I.path,$,V]}))),P=t.rest?this.process(t.rest,z(m({},I),{path:[...I.path,k,...this.target==="openapi-3.0"?[t.items.length]:[]]})):null;this.target==="draft-2020-12"?(g.prefixItems=N,P&&(g.items=P)):this.target==="openapi-3.0"?(g.items={anyOf:N},P&&g.items.anyOf.push(P),g.minItems=N.length,P||(g.maxItems=N.length)):(g.items=N,P&&(g.additionalItems=P));let{minimum:w,maximum:D}=r._zod.bag;typeof w=="number"&&(g.minItems=w),typeof D=="number"&&(g.maxItems=D);break}case"record":{let g=j;g.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(g.propertyNames=this.process(t.keyType,z(m({},I),{path:[...I.path,"propertyNames"]}))),g.additionalProperties=this.process(t.valueType,z(m({},I),{path:[...I.path,"additionalProperties"]}));break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=j,$=Ge(t.entries);$.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),g.enum=$;break}case"literal":{let g=j,$=[];for(let k of t.values)if(k===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");$.push(Number(k))}else $.push(k);if($.length!==0)if($.length===1){let k=$[0];g.type=k===null?"null":typeof k,this.target==="draft-4"||this.target==="openapi-3.0"?g.enum=[k]:g.const=k}else $.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),$.every(k=>typeof k=="boolean")&&(g.type="string"),$.every(k=>k===null)&&(g.type="null"),g.enum=$;break}case"file":{let g=j,$={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:N,mime:P}=r._zod.bag;k!==void 0&&($.minLength=k),N!==void 0&&($.maxLength=N),P?P.length===1?($.contentMediaType=P[0],Object.assign(g,$)):g.anyOf=P.map(w=>z(m({},$),{contentMediaType:w})):Object.assign(g,$);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(t.innerType,I);this.target==="openapi-3.0"?(l.ref=t.innerType,j.nullable=!0):j.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,I),l.ref=t.innerType;break}case"success":{let g=j;g.type="boolean";break}case"default":{this.process(t.innerType,I),l.ref=t.innerType,j.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,I),l.ref=t.innerType,this.io==="input"&&(j._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,I),l.ref=t.innerType;let g;try{g=t.catchValue(void 0)}catch($){throw new Error("Dynamic catch values are not supported in JSON Schema")}j.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=j,$=r._zod.pattern;if(!$)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=$.source;break}case"pipe":{let g=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(g,I),l.ref=g;break}case"readonly":{this.process(t.innerType,I),l.ref=t.innerType,j.readOnly=!0;break}case"promise":{this.process(t.innerType,I),l.ref=t.innerType;break}case"optional":{this.process(t.innerType,I),l.ref=t.innerType;break}case"lazy":{let g=r._zod.innerType;this.process(g,I),l.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let a=this.metadataRegistry.get(r);return a&&Object.assign(l.schema,a),this.io==="input"&&J(r)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((S=(i=l.schema).default)!=null||(i.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(r).schema}emit(r,n){var s,v,f,h,x,S,I,C,j,g;let i={cycles:(s=n==null?void 0:n.cycles)!=null?s:"ref",reused:(v=n==null?void 0:n.reused)!=null?v:"inline",external:(f=n==null?void 0:n.external)!=null?f:void 0},t=this.seen.get(r);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=$=>{var D,B,V,re,F;let k=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let ne=(D=i.external.registry.get($[0]))==null?void 0:D.id,Je=(B=i.external.uri)!=null?B:Vr=>Vr;if(ne)return{ref:Je(ne)};let ee=(re=(V=$[1].defId)!=null?V:$[1].schema.id)!=null?re:"schema".concat(this.counter++);return $[1].defId=ee,{defId:ee,ref:"".concat(Je("__shared"),"#/").concat(k,"/").concat(ee)}}if($[1]===t)return{ref:"#"};let P="".concat("#","/").concat(k,"/"),w=(F=$[1].schema.id)!=null?F:"__schema".concat(this.counter++);return{defId:w,ref:P+w}},u=$=>{if($[1].schema.$ref)return;let k=$[1],{ref:N,defId:P}=o($);k.def=m({},k.schema),P&&(k.defId=P);let w=k.schema;for(let D in w)delete w[D];w.$ref=N};if(i.cycles==="throw")for(let $ of this.seen.entries()){let k=$[1];if(k.cycle)throw new Error("Cycle detected: "+"#/".concat((h=k.cycle)==null?void 0:h.join("/"),"/<root>")+\'\\n\\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.\')}for(let $ of this.seen.entries()){let k=$[1];if(r===$[0]){u($);continue}if(i.external){let P=(x=i.external.registry.get($[0]))==null?void 0:x.id;if(r!==$[0]&&P){u($);continue}}if((S=this.metadataRegistry.get($[0]))==null?void 0:S.id){u($);continue}if(k.cycle){u($);continue}if(k.count>1&&i.reused==="ref"){u($);continue}}let l=($,k)=>{var B,V,re;let N=this.seen.get($),P=(B=N.def)!=null?B:N.schema,w=m({},P);if(N.ref===null)return;let D=N.ref;if(N.ref=null,D){l(D,k);let F=this.seen.get(D).schema;F.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?(P.allOf=(V=P.allOf)!=null?V:[],P.allOf.push(F)):(Object.assign(P,F),Object.assign(P,w))}N.isParent||this.override({zodSchema:$,jsonSchema:P,path:(re=N.path)!=null?re:[]})};for(let $ of[...this.seen.entries()].reverse())l($[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn("Invalid target: ".concat(this.target)),(I=i.external)!=null&&I.uri){let $=(C=i.external.registry.get(r))==null?void 0:C.id;if(!$)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri($)}Object.assign(c,t.def);let a=(g=(j=i.external)==null?void 0:j.defs)!=null?g:{};for(let $ of this.seen.entries()){let k=$[1];k.def&&k.defId&&(a[k.defId]=k.def)}i.external||Object.keys(a).length>0&&(this.target==="draft-2020-12"?c.$defs=a:c.definitions=a);try{return JSON.parse(JSON.stringify(c))}catch($){throw new Error("Error converting schema to JSON.")}}};function Qo(e,r){if(e instanceof Te){let i=new xt(r),t={};for(let l of e._idmap.entries()){let[c,a]=l;i.process(a)}let o={},u={registry:e,uri:r==null?void 0:r.uri,defs:t};for(let l of e._idmap.entries()){let[c,a]=l;o[c]=i.emit(a,z(m({},r),{external:u}))}if(Object.keys(t).length>0){let l=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:t}}return{schemas:o}}let n=new xt(r);return n.process(e),n.emit(e,r)}function J(e,r){let n=r!=null?r:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return J(t.element,n);case"object":{for(let o in t.shape)if(J(t.shape[o],n))return!0;return!1}case"union":{for(let o of t.options)if(J(o,n))return!0;return!1}case"intersection":return J(t.left,n)||J(t.right,n);case"tuple":{for(let o of t.items)if(J(o,n))return!0;return!!(t.rest&&J(t.rest,n))}case"record":return J(t.keyType,n)||J(t.valueType,n);case"map":return J(t.keyType,n)||J(t.valueType,n);case"set":return J(t.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return J(t.innerType,n);case"lazy":return J(t.getter(),n);case"default":return J(t.innerType,n);case"prefault":return J(t.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return J(t.in,n)||J(t.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error("Unknown schema type: ".concat(t.type))}var Ho={};var kt={};_e(kt,{ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,date:()=>ta,datetime:()=>ea,duration:()=>na,time:()=>ra});var Ir=d("ZodISODateTime",(e,r)=>{mi.init(e,r),A.init(e,r)});function ea(e){return po(Ir,e)}var wr=d("ZodISODate",(e,r)=>{fi.init(e,r),A.init(e,r)});function ta(e){return go(wr,e)}var Sr=d("ZodISOTime",(e,r)=>{pi.init(e,r),A.init(e,r)});function ra(e){return vo(Sr,e)}var jr=d("ZodISODuration",(e,r)=>{gi.init(e,r),A.init(e,r)});function na(e){return ho(jr,e)}var xc=(e,r)=>{Qe.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>et(e,n)},flatten:{value:n=>He(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Se,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bd=d("ZodError",xc),X=d("ZodError",xc,{Parent:Error});var ia=Pe(X),oa=Ue(X),aa=Ne(X),ua=Ze(X),ca=Tt(X),la=Et(X),sa=At(X),da=Rt(X),ma=Lt(X),fa=Ct(X),pa=Vt(X),ga=Ft(X);var U=d("ZodType",(e,r)=>(O.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>{var i;return e.clone(_.mergeDefs(r,{checks:[...(i=r.checks)!=null?i:[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}))},e.clone=(n,i)=>K(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>ia(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>aa(e,n,i),e.parseAsync=async(n,i)=>oa(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ua(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>ca(e,n,i),e.decode=(n,i)=>la(e,n,i),e.encodeAsync=async(n,i)=>sa(e,n,i),e.decodeAsync=async(n,i)=>da(e,n,i),e.safeEncode=(n,i)=>ma(e,n,i),e.safeDecode=(n,i)=>fa(e,n,i),e.safeEncodeAsync=async(n,i)=>pa(e,n,i),e.safeDecodeAsync=async(n,i)=>ga(e,n,i),e.refine=(n,i)=>e.check(cl(n,i)),e.superRefine=n=>e.check(ll(n)),e.overwrite=n=>e.check(se(n)),e.optional=()=>Pr(e),e.nullable=()=>Ur(e),e.nullish=()=>Pr(Ur(e)),e.nonoptional=n=>qc(e,n),e.array=()=>Tr(e),e.or=n=>Ra([e,n]),e.and=n=>Ec(e,n),e.transform=n=>Nr(e,Va(n)),e.default=n=>Gc(e,n),e.prefault=n=>Xc(e,n),e.catch=n=>Hc(e,n),e.pipe=n=>Nr(e,n),e.readonly=()=>rl(e),e.describe=n=>{let i=e.clone();return oe.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=oe.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return oe.get(e);let i=e.clone();return oe.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$a=d("_ZodString",(e,r)=>{var i,t,o;ke.init(e,r),U.init(e,r);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(t=n.minimum)!=null?t:null,e.maxLength=(o=n.maximum)!=null?o:null,e.regex=(...u)=>e.check(dt(...u)),e.includes=(...u)=>e.check(pt(...u)),e.startsWith=(...u)=>e.check(gt(...u)),e.endsWith=(...u)=>e.check(vt(...u)),e.min=(...u)=>e.check($e(...u)),e.max=(...u)=>e.check(Ae(...u)),e.length=(...u)=>e.check(Re(...u)),e.nonempty=(...u)=>e.check($e(1,...u)),e.lowercase=u=>e.check(mt(u)),e.uppercase=u=>e.check(ft(u)),e.trim=()=>e.check(bt()),e.normalize=(...u)=>e.check($t(...u)),e.toLowerCase=()=>e.check(_t()),e.toUpperCase=()=>e.check(yt())}),It=d("ZodString",(e,r)=>{ke.init(e,r),$a.init(e,r),e.email=n=>e.check(or(ba,n)),e.url=n=>e.check(lt(Zr,n)),e.jwt=n=>e.check(zr(Da,n)),e.emoji=n=>e.check(sr(_a,n)),e.guid=n=>e.check(ct(Or,n)),e.uuid=n=>e.check(ar(de,n)),e.uuidv4=n=>e.check(ur(de,n)),e.uuidv6=n=>e.check(cr(de,n)),e.uuidv7=n=>e.check(lr(de,n)),e.nanoid=n=>e.check(dr(ya,n)),e.guid=n=>e.check(ct(Or,n)),e.cuid=n=>e.check(mr(xa,n)),e.cuid2=n=>e.check(fr(ka,n)),e.ulid=n=>e.check(pr(za,n)),e.base64=n=>e.check(yr(Ua,n)),e.base64url=n=>e.check(xr(Na,n)),e.xid=n=>e.check(gr(Ia,n)),e.ksuid=n=>e.check(vr(wa,n)),e.ipv4=n=>e.check(hr(Sa,n)),e.ipv6=n=>e.check($r(ja,n)),e.cidrv4=n=>e.check(br(Oa,n)),e.cidrv6=n=>e.check(_r(Pa,n)),e.e164=n=>e.check(kr(Za,n)),e.datetime=n=>e.check(ea(n)),e.date=n=>e.check(ta(n)),e.time=n=>e.check(ra(n)),e.duration=n=>e.check(na(n))});function va(e){return so(It,e)}var A=d("ZodStringFormat",(e,r)=>{T.init(e,r),$a.init(e,r)}),ba=d("ZodEmail",(e,r)=>{ni.init(e,r),A.init(e,r)});function Gd(e){return or(ba,e)}var Or=d("ZodGUID",(e,r)=>{ti.init(e,r),A.init(e,r)});function Wd(e){return ct(Or,e)}var de=d("ZodUUID",(e,r)=>{ri.init(e,r),A.init(e,r)});function Xd(e){return ar(de,e)}function qd(e){return ur(de,e)}function Yd(e){return cr(de,e)}function Qd(e){return lr(de,e)}var Zr=d("ZodURL",(e,r)=>{ii.init(e,r),A.init(e,r)});function Hd(e){return lt(Zr,e)}function em(e){return lt(Zr,m({protocol:/^https?$/,hostname:Q.domain},_.normalizeParams(e)))}var _a=d("ZodEmoji",(e,r)=>{oi.init(e,r),A.init(e,r)});function tm(e){return sr(_a,e)}var ya=d("ZodNanoID",(e,r)=>{ai.init(e,r),A.init(e,r)});function rm(e){return dr(ya,e)}var xa=d("ZodCUID",(e,r)=>{ui.init(e,r),A.init(e,r)});function nm(e){return mr(xa,e)}var ka=d("ZodCUID2",(e,r)=>{ci.init(e,r),A.init(e,r)});function im(e){return fr(ka,e)}var za=d("ZodULID",(e,r)=>{li.init(e,r),A.init(e,r)});function om(e){return pr(za,e)}var Ia=d("ZodXID",(e,r)=>{si.init(e,r),A.init(e,r)});function am(e){return gr(Ia,e)}var wa=d("ZodKSUID",(e,r)=>{di.init(e,r),A.init(e,r)});function um(e){return vr(wa,e)}var Sa=d("ZodIPv4",(e,r)=>{vi.init(e,r),A.init(e,r)});function cm(e){return hr(Sa,e)}var ja=d("ZodIPv6",(e,r)=>{hi.init(e,r),A.init(e,r)});function lm(e){return $r(ja,e)}var Oa=d("ZodCIDRv4",(e,r)=>{$i.init(e,r),A.init(e,r)});function sm(e){return br(Oa,e)}var Pa=d("ZodCIDRv6",(e,r)=>{bi.init(e,r),A.init(e,r)});function dm(e){return _r(Pa,e)}var Ua=d("ZodBase64",(e,r)=>{yi.init(e,r),A.init(e,r)});function mm(e){return yr(Ua,e)}var Na=d("ZodBase64URL",(e,r)=>{xi.init(e,r),A.init(e,r)});function fm(e){return xr(Na,e)}var Za=d("ZodE164",(e,r)=>{ki.init(e,r),A.init(e,r)});function pm(e){return kr(Za,e)}var Da=d("ZodJWT",(e,r)=>{zi.init(e,r),A.init(e,r)});function gm(e){return zr(Da,e)}var wt=d("ZodCustomStringFormat",(e,r)=>{Ii.init(e,r),A.init(e,r)});function vm(e,r,n={}){return Le(wt,e,r,n)}function hm(e){return Le(wt,"hostname",Q.hostname,e)}function $m(e){return Le(wt,"hex",Q.hex,e)}function bm(e,r){var o;let n=(o=r==null?void 0:r.enc)!=null?o:"hex",i="".concat(e,"_").concat(n),t=Q[i];if(!t)throw new Error("Unrecognized hash format: ".concat(i));return Le(wt,i,t,r)}var St=d("ZodNumber",(e,r)=>{var i,t,o,u,l,c,a,s,v;Yt.init(e,r),U.init(e,r),e.gt=(f,h)=>e.check(le(f,h)),e.gte=(f,h)=>e.check(W(f,h)),e.min=(f,h)=>e.check(W(f,h)),e.lt=(f,h)=>e.check(ce(f,h)),e.lte=(f,h)=>e.check(H(f,h)),e.max=(f,h)=>e.check(H(f,h)),e.int=f=>e.check(ha(f)),e.safe=f=>e.check(ha(f)),e.positive=f=>e.check(le(0,f)),e.nonnegative=f=>e.check(W(0,f)),e.negative=f=>e.check(ce(0,f)),e.nonpositive=f=>e.check(H(0,f)),e.multipleOf=(f,h)=>e.check(Ie(f,h)),e.step=(f,h)=>e.check(Ie(f,h)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(o=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(t=n.exclusiveMinimum)!=null?t:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(c=Math.min((u=n.maximum)!=null?u:Number.POSITIVE_INFINITY,(l=n.exclusiveMaximum)!=null?l:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((a=n.format)!=null?a:"").includes("int")||Number.isSafeInteger((s=n.multipleOf)!=null?s:.5),e.isFinite=!0,e.format=(v=n.format)!=null?v:null});function kc(e){return $o(St,e)}var Ve=d("ZodNumberFormat",(e,r)=>{wi.init(e,r),St.init(e,r)});function ha(e){return _o(Ve,e)}function _m(e){return yo(Ve,e)}function ym(e){return xo(Ve,e)}function xm(e){return ko(Ve,e)}function km(e){return zo(Ve,e)}var jt=d("ZodBoolean",(e,r)=>{it.init(e,r),U.init(e,r)});function zc(e){return Io(jt,e)}var Ot=d("ZodBigInt",(e,r)=>{var i,t,o;Qt.init(e,r),U.init(e,r),e.gte=(u,l)=>e.check(W(u,l)),e.min=(u,l)=>e.check(W(u,l)),e.gt=(u,l)=>e.check(le(u,l)),e.gte=(u,l)=>e.check(W(u,l)),e.min=(u,l)=>e.check(W(u,l)),e.lt=(u,l)=>e.check(ce(u,l)),e.lte=(u,l)=>e.check(H(u,l)),e.max=(u,l)=>e.check(H(u,l)),e.positive=u=>e.check(le(BigInt(0),u)),e.negative=u=>e.check(ce(BigInt(0),u)),e.nonpositive=u=>e.check(H(BigInt(0),u)),e.nonnegative=u=>e.check(W(BigInt(0),u)),e.multipleOf=(u,l)=>e.check(Ie(u,l));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(t=n.maximum)!=null?t:null,e.format=(o=n.format)!=null?o:null});function zm(e){return So(Ot,e)}var Ta=d("ZodBigIntFormat",(e,r)=>{Si.init(e,r),Ot.init(e,r)});function Im(e){return Oo(Ta,e)}function wm(e){return Po(Ta,e)}var Ic=d("ZodSymbol",(e,r)=>{ji.init(e,r),U.init(e,r)});function Sm(e){return Uo(Ic,e)}var wc=d("ZodUndefined",(e,r)=>{Oi.init(e,r),U.init(e,r)});function jm(e){return No(wc,e)}var Sc=d("ZodNull",(e,r)=>{Pi.init(e,r),U.init(e,r)});function jc(e){return Zo(Sc,e)}var Oc=d("ZodAny",(e,r)=>{Ui.init(e,r),U.init(e,r)});function Om(){return Do(Oc)}var Pc=d("ZodUnknown",(e,r)=>{Ni.init(e,r),U.init(e,r)});function Ce(){return To(Pc)}var Uc=d("ZodNever",(e,r)=>{Zi.init(e,r),U.init(e,r)});function Ea(e){return Eo(Uc,e)}var Nc=d("ZodVoid",(e,r)=>{Di.init(e,r),U.init(e,r)});function Pm(e){return Ao(Nc,e)}var Dr=d("ZodDate",(e,r)=>{Ti.init(e,r),U.init(e,r),e.min=(i,t)=>e.check(W(i,t)),e.max=(i,t)=>e.check(H(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Um(e){return Ro(Dr,e)}var Zc=d("ZodArray",(e,r)=>{Ei.init(e,r),U.init(e,r),e.element=r.element,e.min=(n,i)=>e.check($e(n,i)),e.nonempty=n=>e.check($e(1,n)),e.max=(n,i)=>e.check(Ae(n,i)),e.length=(n,i)=>e.check(Re(n,i)),e.unwrap=()=>e.element});function Tr(e,r){return Ko(Zc,e,r)}function Nm(e){let r=e._zod.def.shape;return Ca(Object.keys(r))}var Er=d("ZodObject",(e,r)=>{Ai.init(e,r),U.init(e,r),_.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Ca(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(z(m({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.loose=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.strict=()=>e.clone(z(m({},e._zod.def),{catchall:Ea()})),e.strip=()=>e.clone(z(m({},e._zod.def),{catchall:void 0})),e.extend=n=>_.extend(e,n),e.safeExtend=n=>_.safeExtend(e,n),e.merge=n=>_.merge(e,n),e.pick=n=>_.pick(e,n),e.omit=n=>_.omit(e,n),e.partial=(...n)=>_.partial(Fa,e,n[0]),e.required=(...n)=>_.required(Ja,e,n[0])});function Zm(e,r){let n=m({type:"object",shape:e!=null?e:{}},_.normalizeParams(r));return new Er(n)}function Dm(e,r){return new Er(m({type:"object",shape:e,catchall:Ea()},_.normalizeParams(r)))}function Tm(e,r){return new Er(m({type:"object",shape:e,catchall:Ce()},_.normalizeParams(r)))}var Aa=d("ZodUnion",(e,r)=>{Ht.init(e,r),U.init(e,r),e.options=r.options});function Ra(e,r){return new Aa(m({type:"union",options:e},_.normalizeParams(r)))}var Dc=d("ZodDiscriminatedUnion",(e,r)=>{Aa.init(e,r),Ri.init(e,r)});function Em(e,r,n){return new Dc(m({type:"union",options:r,discriminator:e},_.normalizeParams(n)))}var Tc=d("ZodIntersection",(e,r)=>{Li.init(e,r),U.init(e,r)});function Ec(e,r){return new Tc({type:"intersection",left:e,right:r})}var Ac=d("ZodTuple",(e,r)=>{er.init(e,r),U.init(e,r),e.rest=n=>e.clone(z(m({},e._zod.def),{rest:n}))});function Rc(e,r,n){let i=r instanceof O,t=i?n:r,o=i?r:null;return new Ac(m({type:"tuple",items:e,rest:o},_.normalizeParams(t)))}var La=d("ZodRecord",(e,r)=>{Ci.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Lc(e,r,n){return new La(m({type:"record",keyType:e,valueType:r},_.normalizeParams(n)))}function Am(e,r,n){let i=K(e);return i._zod.values=void 0,new La(m({type:"record",keyType:i,valueType:r},_.normalizeParams(n)))}var Cc=d("ZodMap",(e,r)=>{Vi.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Rm(e,r,n){return new Cc(m({type:"map",keyType:e,valueType:r},_.normalizeParams(n)))}var Vc=d("ZodSet",(e,r)=>{Fi.init(e,r),U.init(e,r),e.min=(...n)=>e.check(we(...n)),e.nonempty=n=>e.check(we(1,n)),e.max=(...n)=>e.check(Ee(...n)),e.size=(...n)=>e.check(st(...n))});function Lm(e,r){return new Vc(m({type:"set",valueType:e},_.normalizeParams(r)))}var zt=d("ZodEnum",(e,r)=>{Ji.init(e,r),U.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let o={};for(let u of i)if(n.has(u))o[u]=r.entries[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))},e.exclude=(i,t)=>{let o=m({},r.entries);for(let u of i)if(n.has(u))delete o[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))}});function Ca(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new zt(m({type:"enum",entries:n},_.normalizeParams(r)))}function Cm(e,r){return new zt(m({type:"enum",entries:e},_.normalizeParams(r)))}var Fc=d("ZodLiteral",(e,r)=>{Mi.init(e,r),U.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Vm(e,r){return new Fc(m({type:"literal",values:Array.isArray(e)?e:[e]},_.normalizeParams(r)))}var Jc=d("ZodFile",(e,r)=>{Bi.init(e,r),U.init(e,r),e.min=(n,i)=>e.check(we(n,i)),e.max=(n,i)=>e.check(Ee(n,i)),e.mime=(n,i)=>e.check(ht(Array.isArray(n)?n:[n],i))});function Fm(e){return Go(Jc,e)}var Mc=d("ZodTransform",(e,r)=>{Ki.init(e,r),U.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);n.addIssue=o=>{var u,l,c;if(typeof o=="string")n.issues.push(_.issue(o,n.value,r));else{let a=o;a.fatal&&(a.continue=!1),(u=a.code)!=null||(a.code="custom"),(l=a.input)!=null||(a.input=n.value),(c=a.inst)!=null||(a.inst=e),n.issues.push(_.issue(a))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n)):(n.value=t,n)}});function Va(e){return new Mc({type:"transform",transform:e})}var Fa=d("ZodOptional",(e,r)=>{Gi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Pr(e){return new Fa({type:"optional",innerType:e})}var Bc=d("ZodNullable",(e,r)=>{Wi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Ur(e){return new Bc({type:"nullable",innerType:e})}function Jm(e){return Pr(Ur(e))}var Kc=d("ZodDefault",(e,r)=>{Xi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gc(e,r){return new Kc({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Wc=d("ZodPrefault",(e,r)=>{qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Xc(e,r){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Ja=d("ZodNonOptional",(e,r)=>{Yi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qc(e,r){return new Ja(m({type:"nonoptional",innerType:e},_.normalizeParams(r)))}var Yc=d("ZodSuccess",(e,r)=>{Qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e){return new Yc({type:"success",innerType:e})}var Qc=d("ZodCatch",(e,r)=>{Hi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hc(e,r){return new Qc({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var el=d("ZodNaN",(e,r)=>{eo.init(e,r),U.init(e,r)});function Bm(e){return Co(el,e)}var Ma=d("ZodPipe",(e,r)=>{to.init(e,r),U.init(e,r),e.in=r.in,e.out=r.out});function Nr(e,r){return new Ma({type:"pipe",in:e,out:r})}var Ba=d("ZodCodec",(e,r)=>{Ma.init(e,r),ot.init(e,r)});function Km(e,r,n){return new Ba({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var tl=d("ZodReadonly",(e,r)=>{ro.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function rl(e){return new tl({type:"readonly",innerType:e})}var nl=d("ZodTemplateLiteral",(e,r)=>{no.init(e,r),U.init(e,r)});function Gm(e,r){return new nl(m({type:"template_literal",parts:e},_.normalizeParams(r)))}var il=d("ZodLazy",(e,r)=>{ao.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.getter()});function ol(e){return new il({type:"lazy",getter:e})}var al=d("ZodPromise",(e,r)=>{oo.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Wm(e){return new al({type:"promise",innerType:e})}var ul=d("ZodFunction",(e,r)=>{io.init(e,r),U.init(e,r)});function Xm(e){var r,n;return new ul({type:"function",input:Array.isArray(e==null?void 0:e.input)?Rc(e==null?void 0:e.input):(r=e==null?void 0:e.input)!=null?r:Tr(Ce()),output:(n=e==null?void 0:e.output)!=null?n:Ce()})}var Ar=d("ZodCustom",(e,r)=>{uo.init(e,r),U.init(e,r)});function qm(e){let r=new R({check:"custom"});return r._zod.check=e,r}function Ym(e,r){return Wo(Ar,e!=null?e:()=>!0,r)}function cl(e,r={}){return Xo(Ar,e,r)}function ll(e){return qo(e)}function Qm(e,r={error:"Input not instance of ".concat(e.name)}){let n=new Ar(m({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0},_.normalizeParams(r)));return n._zod.bag.Class=e,n}var Hm=(...e)=>Yo({Codec:Ba,Boolean:jt,String:It},...e);function ef(e){let r=ol(()=>Ra([va(e),kc(),zc(),jc(),Tr(r),Lc(va(),r)]));return r}function tf(e,r){return Nr(Va(e),r)}var rf={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nf(e){L({customError:e})}function of(){return L().customError}var Ka;Ka||(Ka={});var Rr={};_e(Rr,{bigint:()=>lf,boolean:()=>cf,date:()=>sf,number:()=>uf,string:()=>af});function af(e){return mo(It,e)}function uf(e){return bo(St,e)}function cf(e){return wo(jt,e)}function lf(e){return jo(Ot,e)}function sf(e){return Lo(Dr,e)}L(tr());var bv=Fe.union([Fe.enum(["low","medium","high","always-visible"]),Fe.number()]);var Lr=5;var df=9,be=200,Cr=10;function sl(e,r,n,i,t,o,u="-1"){var N,P;let l=1/0,c=1/0,a=-1/0,s=-1/0,v=new E(-Cr,0,5,n),f=new E(-Cr,0,r,5),h=new E(r-5,0,r+Cr,n),x=new E(0,n-5,r,n+Cr),S=mf(r,n,i,t,o),I=[v,f,h,x],C=new E(-be,-be,r+be*2,n+be*2);for(let w of e){let D,B;for(let V=0;V<w.bboxes.length;V++){if(w.bboxes[V]==null||(D=w.bboxes[V].boundingBox,B=w.bboxes[V].index,w.lockedToStrategyIndex!==-1&&B!==w.lockedToStrategyIndex))continue;let[re,F,ne,Je]=D,[ee,Vr,Ga,ml]=[w.y-re,w.y+F,w.x-ne,w.x+Je],Fr=Ga,Jr=ee,Wa=ml-Ga,Xa=Vr-ee;l=Math.min(l,Fr)-be,c=Math.min(c,Jr)-be,a=Math.max(a,Fr+Wa)+be,s=Math.max(s,Jr+Xa)+be,w.bboxes[V].boundingRect=new E(Fr,Jr,Wa,Xa)}}let j=new Me(new E(l,c,a-l,s-c)),g={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},$=0;for(let w=0;w<e.length;w++){let D=e[w];((P=(N=D.bboxes)==null?void 0:N[0])==null?void 0:P.index)===df&&(g.staticColliders.push(D.bboxes[0].boundingRect),j.insert(D.bboxes[0].boundingRect),$++)}e=e.slice($,e.length);let k;for(let w=0;w<e.length;w++)if(k=e[w],g.colliders[w]=[-1,0],k.enabledAndVisible){let[D,B,V]=[1/0,-1,void 0];for(let{index:re,boundingRect:F}of k.bboxes){if(F==null)continue;let ne=[];if(ne=j.queryRect(F).filter(ee=>F.intersects(ee)),k.shouldCollideWithScreenEdges&&I.forEach(ee=>{F.intersects(ee)&&ne.push(ee)}),F.intersects(S)){g.colliders[w]=[-1,0,F];break}if(ne.length<=D&&(V=F,B=re,D=ne.length),ne.length===0){j.insert(F),g.colliders[w]=[re,C.contains(F)?0:1,F];break}}k.rank===Lr&&V!=null&&(j.insert(V),g.colliders[w]=[B,C.contains(V)?0:1,V])}else g.colliders[w]=[-1,0];return g}function mf(e,r,n,i,t){switch(t){case"top-left":return new E(0,0,n,i);case"top-right":return new E(e-n,0,n,i);case"bottom-left":return new E(0,r-i,n,i);case"bottom-right":return new E(e-n,r-i,n,i);case"center":return new E((e-n)/2,(r-i)/2,n,i);case"top":return new E((e-n)/2,0,n,i);case"bottom":return new E((e-n)/2,r-i,n,i);case"left":return new E(0,(r-i)/2,n,i);case"right":return new E(e-n,(r-i)/2,n,i);default:return new E(0,r-i,n,i)}}function dl(e){let r=e[0].map(n=>{let i=n[0].map(t=>({index:t[4],boundingBox:[t[0],t[1],t[2],t[3]]}));return{enabledAndVisible:n[1]===1,rank:n[2]===1?Lr:0,x:n[3],y:n[4],shouldCollideWithScreenEdges:n[5]===1,bboxes:i,lockedToStrategyIndex:n[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:r,devicePixelRatio:e[1]}}self.onmessage=e=>{let r=dl(e.data);self.postMessage(sl(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId))};})();\n';l();l();l();l();l();function C4(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}o(C4,"contains");l();function I4(e,t){let[r,n]=t;return r>=e.x&&r<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}o(I4,"intersectPoint");l();function D4(e,t){let r=t.x,n=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x,c=e.y,m=e.x+e.w,d=e.y+e.h;return r<m&&u<i&&n<d&&c<a}o(D4,"intersects");l();function si(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}o(si,"appendItems");l();var fp=class fp{constructor(t,r,n,i,a){f(this,"x");f(this,"y");f(this,"w");f(this,"h");f(this,"userData");this.userData=typeof a>"u"?null:a,this.x=t,this.y=r,this.w=n,this.h=i}contains(t){return t===this?!1:C4(this,t)}intersects(t){return D4(this,t)}intersectsPoint(t){return I4(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.8)",t.fillRect(this.x,this.y,this.w,this.h)}};o(fp,"Rectangle");var Se=fp;var Do=class Do{constructor(t,r){f(this,"topLeft");f(this,"topRight");f(this,"bottomLeft");f(this,"bottomRight");f(this,"divided",!1);f(this,"boundary");f(this,"capacity",16);f(this,"objects",[]);f(this,"parent");this.parent=r,this.boundary=t}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:t,y:r,w:n,h:i}=this.boundary;this.topLeft=new Do(new Se(t,r,n/2,i/2),this),this.topRight=new Do(new Se(t+n/2,r,n/2,i/2),this),this.bottomLeft=new Do(new Se(t,r+i/2,n/2,i/2),this),this.bottomRight=new Do(new Se(t+n/2,r+i/2,n/2,i/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(si(r,this.topLeft.queryRect(t)),si(r,this.topRight.queryRect(t)),si(r,this.bottomLeft.queryRect(t)),si(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(si(r,this.topLeft.queryPoint(t)),si(r,this.topRight.queryPoint(t)),si(r,this.bottomLeft.queryPoint(t)),si(r,this.bottomRight.queryPoint(t))),r}insert(t){return(this.parent?!this.boundary.contains(t):!this.boundary.intersects(t))?!1:this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0)}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};o(Do,"QuadTree");var qr=Do;l();function S4(e,t,r){let n,i,a,u=null,c=0;r||(r={});let m=o(function(){c=r.leading===!1?0:Date.now(),u=null,a=e.apply(n,i),u||(n=i=null)},"later");return function(){let d=Date.now();!c&&r.leading===!1&&(c=d);let h=t-(d-c);return n=globalThis,i=arguments,h<=0||h>t?(u&&(clearTimeout(u),u=null),c=d,a=e.apply(n,i),u||(n=i=null)):!u&&r.trailing!==!1&&(u=setTimeout(m,h)),a}}o(S4,"throttle");function w4(e){let t=e[0].map(r=>{let n=r[0].map(i=>({index:i[4],boundingBox:[i[0],i[1],i[2],i[3]]}));return{enabledAndVisible:r[1]===1,rank:r[2]===1?la:0,x:r[3],y:r[4],shouldCollideWithScreenEdges:r[5]===1,bboxes:n,lockedToStrategyIndex:r[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:t,devicePixelRatio:e[1]}}o(w4,"unpackMessage");l();var hp=9,Gi=200,Wc=10;function A4(e,t,r,n,i,a,u="-1"){var T,k;let c=1/0,m=1/0,d=-1/0,h=-1/0,g=new Se(-Wc,0,5,r),v=new Se(-Wc,0,t,5),b=new Se(t-5,0,t+Wc,r),S=new Se(0,r-5,t,r+Wc),O=q6(t,r,n,i,a),x=[g,v,b,S],E=new Se(-Gi,-Gi,t+Gi*2,r+Gi*2);for(let j of e){let U,G;for(let $=0;$<j.bboxes.length;$++){if(j.bboxes[$]==null||(U=j.bboxes[$].boundingBox,G=j.bboxes[$].index,j.lockedToStrategyIndex!==-1&&G!==j.lockedToStrategyIndex))continue;let[X,V,Y,oe]=U,[Z,ee,te,Q]=[j.y-X,j.y+V,j.x-Y,j.x+oe],de=te,je=Z,Me=Q-te,Ve=ee-Z;c=Math.min(c,de)-Gi,m=Math.min(m,je)-Gi,d=Math.max(d,de+Me)+Gi,h=Math.max(h,je+Ve)+Gi,j.bboxes[$].boundingRect=new Se(de,je,Me,Ve)}}let I=new qr(new Se(c,m,d-c,h-m)),D={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},C=0;for(let j=0;j<e.length;j++){let U=e[j];((k=(T=U.bboxes)==null?void 0:T[0])==null?void 0:k.index)===hp&&(D.staticColliders.push(U.bboxes[0].boundingRect),I.insert(U.bboxes[0].boundingRect),C++)}e=e.slice(C,e.length);let A;for(let j=0;j<e.length;j++)if(A=e[j],D.colliders[j]=[-1,0],A.enabledAndVisible){let[U,G,$]=[1/0,-1,void 0];for(let{index:X,boundingRect:V}of A.bboxes){if(V==null)continue;let Y=[];if(Y=I.queryRect(V).filter(Z=>V.intersects(Z)),A.shouldCollideWithScreenEdges&&x.forEach(Z=>{V.intersects(Z)&&Y.push(Z)}),V.intersects(O)){D.colliders[j]=[-1,0,V];break}if(Y.length<=U&&($=V,G=X,U=Y.length),Y.length===0){I.insert(V),D.colliders[j]=[X,E.contains(V)?0:1,V];break}}A.rank===la&&$!=null&&(I.insert($),D.colliders[j]=[G,E.contains($)?0:1,$])}else D.colliders[j]=[-1,0];return D}o(A4,"processColliders");function q6(e,t,r,n,i){switch(i){case"top-left":return new Se(0,0,r,n);case"top-right":return new Se(e-r,0,r,n);case"bottom-left":return new Se(0,t-n,r,n);case"bottom-right":return new Se(e-r,t-n,r,n);case"center":return new Se((e-r)/2,(t-n)/2,r,n);case"top":return new Se((e-r)/2,0,r,n);case"bottom":return new Se((e-r)/2,t-n,r,n);case"left":return new Se(0,(t-n)/2,r,n);case"right":return new Se(e-r,(t-n)/2,r,n);default:return new Se(0,t-n,r,n)}}o(q6,"getWatermarkBoundary");l();var gp=class gp{constructor(){f(this,"onerror",o(()=>{},"onerror"));f(this,"onmessage",o(()=>{},"onmessage"));f(this,"postMessage",o(t=>{let r=w4(t);this.onmessage({data:A4(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId)})},"postMessage"));f(this,"terminate",o(()=>{},"terminate"))}};o(gp,"SyncWorker");var $u=gp;l();l();globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var t=performance.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:o(function(){return Math.max(0,50-(performance.now()-t))},"timeRemaining")})},0)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){clearTimeout(e)};l();l();l();l();l();l();l();l();l();l();l();function yp(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}o(yp,"getCoord");function So(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}o(So,"getCoords");function ya(e){return e.type==="Feature"?e.geometry:e}o(ya,"getGeom");function Zi(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=yp(e),i=ya(t),a=i.type,u=t.bbox,c=i.coordinates;if(u&&J6(n,u)===!1)return!1;a==="Polygon"&&(c=[c]);for(var m=!1,d=0;d<c.length&&!m;d++)if(F4(n,c[d][0],r.ignoreBoundary)){for(var h=!1,g=1;g<c[d].length&&!h;)F4(n,c[d][g],!r.ignoreBoundary)&&(h=!0),g++;h||(m=!0)}return m}o(Zi,"booleanPointInPolygon");function F4(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var u=t[i][0],c=t[i][1],m=t[a][0],d=t[a][1],h=e[1]*(u-m)+c*(m-e[0])+d*(e[0]-u)===0&&(u-e[0])*(m-e[0])<=0&&(c-e[1])*(d-e[1])<=0;if(h)return!r;var g=c>e[1]!=d>e[1]&&e[0]<(m-u)*(e[1]-c)/(d-c)+u;g&&(n=!n)}return n}o(F4,"inRing");function J6(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}o(J6,"inBBox");l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();var _e={};_i(_e,{HasPropertyKey:()=>e2,IsArray:()=>lr,IsAsyncIterator:()=>bp,IsBigInt:()=>Gu,IsBoolean:()=>Vi,IsDate:()=>wo,IsFunction:()=>vp,IsIterator:()=>xp,IsNull:()=>Ep,IsNumber:()=>vn,IsObject:()=>at,IsRegExp:()=>Zu,IsString:()=>pt,IsSymbol:()=>Cp,IsUint8Array:()=>ci,IsUndefined:()=>xt});l();function e2(e,t){return t in e}o(e2,"HasPropertyKey");function bp(e){return at(e)&&!lr(e)&&!ci(e)&&Symbol.asyncIterator in e}o(bp,"IsAsyncIterator");function lr(e){return Array.isArray(e)}o(lr,"IsArray");function Gu(e){return typeof e=="bigint"}o(Gu,"IsBigInt");function Vi(e){return typeof e=="boolean"}o(Vi,"IsBoolean");function wo(e){return e instanceof globalThis.Date}o(wo,"IsDate");function vp(e){return typeof e=="function"}o(vp,"IsFunction");function xp(e){return at(e)&&!lr(e)&&!ci(e)&&Symbol.iterator in e}o(xp,"IsIterator");function Ep(e){return e===null}o(Ep,"IsNull");function vn(e){return typeof e=="number"}o(vn,"IsNumber");function at(e){return typeof e=="object"&&e!==null}o(at,"IsObject");function Zu(e){return e instanceof globalThis.RegExp}o(Zu,"IsRegExp");function pt(e){return typeof e=="string"}o(pt,"IsString");function Cp(e){return typeof e=="symbol"}o(Cp,"IsSymbol");function ci(e){return e instanceof globalThis.Uint8Array}o(ci,"IsUint8Array");function xt(e){return e===void 0}o(xt,"IsUndefined");function t2(e){return e.map(t=>Hc(t))}o(t2,"ArrayType");function r2(e){return new Date(e.getTime())}o(r2,"DateType");function n2(e){return new Uint8Array(e)}o(n2,"Uint8ArrayType");function i2(e){return new RegExp(e.source,e.flags)}o(i2,"RegExpType");function o2(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Hc(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Hc(e[r]);return t}o(o2,"ObjectType");function Hc(e){return lr(e)?t2(e):wo(e)?r2(e):ci(e)?n2(e):Zu(e)?i2(e):at(e)?o2(e):e}o(Hc,"Visit");function ht(e){return Hc(e)}o(ht,"Clone");function B4(e){return e.map(t=>Vu(t))}o(B4,"CloneRest");function Vu(e,t){return t===void 0?ht(e):ht(R(R({},t),e))}o(Vu,"CloneType");l();l();l();function Kc(e){return Ee(e)&&Symbol.asyncIterator in e}o(Kc,"IsAsyncIterator");function qc(e){return Ee(e)&&Symbol.iterator in e}o(qc,"IsIterator");function Ip(e){return Ee(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(Ip,"IsStandardObject");function Jc(e){return e instanceof Promise}o(Jc,"IsPromise");function xr(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(xr,"IsDate");function P4(e){return e instanceof globalThis.Map}o(P4,"IsMap");function M4(e){return e instanceof globalThis.Set}o(M4,"IsSet");function Jr(e){return ArrayBuffer.isView(e)}o(Jr,"IsTypedArray");function ba(e){return e instanceof globalThis.Uint8Array}o(ba,"IsUint8Array");function ge(e,t){return t in e}o(ge,"HasPropertyKey");function Ee(e){return e!==null&&typeof e=="object"}o(Ee,"IsObject");function ve(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ve,"IsArray");function Et(e){return e===void 0}o(Et,"IsUndefined");function li(e){return e===null}o(li,"IsNull");function Un(e){return typeof e=="boolean"}o(Un,"IsBoolean");function pe(e){return typeof e=="number"}o(pe,"IsNumber");function Xc(e){return Number.isInteger(e)}o(Xc,"IsInteger");function er(e){return typeof e=="bigint"}o(er,"IsBigInt");function Le(e){return typeof e=="string"}o(Le,"IsString");function Wi(e){return typeof e=="function"}o(Wi,"IsFunction");function mi(e){return typeof e=="symbol"}o(mi,"IsSymbol");function tr(e){return er(e)||Un(e)||li(e)||pe(e)||Le(e)||mi(e)||Et(e)}o(tr,"IsValueType");var Ye;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(u,c){return e.ExactOptionalPropertyTypes?c in u:u[c]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){let c=Ee(u);return e.AllowArrayObject?c:c&&!ve(u)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return r(u)&&!(u instanceof Date)&&!(u instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return e.AllowNaN?pe(u):Number.isFinite(u)}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){let c=Et(u);return e.AllowNullVoid?c||u===null:c}o(a,"IsVoidLike"),e.IsVoidLike=a})(Ye||(Ye={}));l();function a2(e){return globalThis.Object.freeze(e).map(t=>Wu(t))}o(a2,"ImmutableArray");function u2(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Wu(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Wu(e[r]);return globalThis.Object.freeze(t)}o(u2,"ImmutableObject");function Wu(e){return lr(e)?a2(e):wo(e)?e:ci(e)?e:Zu(e)?e:at(e)?u2(e):e}o(Wu,"Immutable");function H(e,t){let r=t!==void 0?R(R({},t),e):e;switch(Ye.InstanceMode){case"freeze":return Wu(r);case"clone":return ht(r);default:return r}}o(H,"CreateType");l();var Dp=class Dp extends Error{constructor(t){super(t)}};o(Dp,"TypeBoxError");var fe=Dp;l();l();l();var gt=Symbol.for("TypeBox.Transform"),di=Symbol.for("TypeBox.Readonly"),Er=Symbol.for("TypeBox.Optional"),Xr=Symbol.for("TypeBox.Hint"),L=Symbol.for("TypeBox.Kind");function T4(e){return at(e)&&e[di]==="Readonly"}o(T4,"IsReadonly");function zn(e){return at(e)&&e[Er]==="Optional"}o(zn,"IsOptional");function Sp(e){return Ue(e,"Any")}o(Sp,"IsAny");function pi(e){return Ue(e,"Array")}o(pi,"IsArray");function Hu(e){return Ue(e,"AsyncIterator")}o(Hu,"IsAsyncIterator");function wp(e){return Ue(e,"BigInt")}o(wp,"IsBigInt");function Ap(e){return Ue(e,"Boolean")}o(Ap,"IsBoolean");function Ku(e){return Ue(e,"Constructor")}o(Ku,"IsConstructor");function s2(e){return Ue(e,"Date")}o(s2,"IsDate");function qu(e){return Ue(e,"Function")}o(qu,"IsFunction");function Ao(e){return Ue(e,"Integer")}o(Ao,"IsInteger");function kt(e){return Ue(e,"Intersect")}o(kt,"IsIntersect");function Ju(e){return Ue(e,"Iterator")}o(Ju,"IsIterator");function Ue(e,t){return at(e)&&L in e&&e[L]===t}o(Ue,"IsKindOf");function fi(e){return Ue(e,"Literal")}o(fi,"IsLiteral");function Rr(e){return Ue(e,"MappedKey")}o(Rr,"IsMappedKey");function yt(e){return Ue(e,"MappedResult")}o(yt,"IsMappedResult");function Hi(e){return Ue(e,"Never")}o(Hi,"IsNever");function c2(e){return Ue(e,"Not")}o(c2,"IsNot");function l2(e){return Ue(e,"Null")}o(l2,"IsNull");function Fo(e){return Ue(e,"Number")}o(Fo,"IsNumber");function zt(e){return Ue(e,"Object")}o(zt,"IsObject");function Oo(e){return Ue(e,"Promise")}o(Oo,"IsPromise");function Fp(e){return Ue(e,"Record")}o(Fp,"IsRecord");function Op(e){return Ue(e,"Ref")}o(Op,"IsRef");function Bp(e){return Ue(e,"RegExp")}o(Bp,"IsRegExp");function Xu(e){return Ue(e,"String")}o(Xu,"IsString");function m2(e){return Ue(e,"Symbol")}o(m2,"IsSymbol");function Nr(e){return Ue(e,"TemplateLiteral")}o(Nr,"IsTemplateLiteral");function d2(e){return Ue(e,"This")}o(d2,"IsThis");function va(e){return at(e)&&gt in e}o(va,"IsTransform");function xn(e){return Ue(e,"Tuple")}o(xn,"IsTuple");function p2(e){return Ue(e,"Undefined")}o(p2,"IsUndefined");function We(e){return Ue(e,"Union")}o(We,"IsUnion");function f2(e){return Ue(e,"Uint8Array")}o(f2,"IsUint8Array");function h2(e){return Ue(e,"Unknown")}o(h2,"IsUnknown");function g2(e){return Ue(e,"Unsafe")}o(g2,"IsUnsafe");function y2(e){return Ue(e,"Void")}o(y2,"IsVoid");function Ki(e){return at(e)&&L in e&&pt(e[L])}o(Ki,"IsKind");function En(e){return Sp(e)||pi(e)||Ap(e)||wp(e)||Hu(e)||Ku(e)||s2(e)||qu(e)||Ao(e)||kt(e)||Ju(e)||fi(e)||Rr(e)||yt(e)||Hi(e)||c2(e)||l2(e)||Fo(e)||zt(e)||Oo(e)||Fp(e)||Op(e)||Bp(e)||Xu(e)||m2(e)||Nr(e)||d2(e)||xn(e)||p2(e)||We(e)||f2(e)||h2(e)||g2(e)||y2(e)||Ki(e)}o(En,"IsSchema");var w={};_i(w,{IsAny:()=>R4,IsArray:()=>N4,IsAsyncIterator:()=>j4,IsBigInt:()=>U4,IsBoolean:()=>z4,IsConstructor:()=>$4,IsDate:()=>G4,IsFunction:()=>Z4,IsInteger:()=>V4,IsIntersect:()=>W4,IsIterator:()=>H4,IsKind:()=>y1,IsKindOf:()=>Ne,IsLiteral:()=>Qu,IsLiteralBoolean:()=>I2,IsLiteralNumber:()=>q4,IsLiteralString:()=>K4,IsLiteralValue:()=>J4,IsMappedKey:()=>X4,IsMappedResult:()=>Y4,IsNever:()=>Q4,IsNot:()=>e1,IsNull:()=>t1,IsNumber:()=>r1,IsObject:()=>n1,IsOptional:()=>C2,IsPromise:()=>i1,IsProperties:()=>kp,IsReadonly:()=>E2,IsRecord:()=>o1,IsRecursive:()=>D2,IsRef:()=>a1,IsRegExp:()=>u1,IsSchema:()=>Re,IsString:()=>s1,IsSymbol:()=>c1,IsTemplateLiteral:()=>l1,IsThis:()=>m1,IsTransform:()=>ft,IsTuple:()=>d1,IsUint8Array:()=>p1,IsUndefined:()=>xa,IsUnion:()=>_p,IsUnionLiteral:()=>S2,IsUnknown:()=>f1,IsUnsafe:()=>h1,IsVoid:()=>g1,TypeGuardUnknownTypeError:()=>Pp});l();var Lp=class Lp extends fe{};o(Lp,"TypeGuardUnknownTypeError");var Pp=Lp,b2=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function k4(e){try{return new RegExp(e),!0}catch(t){return!1}}o(k4,"IsPattern");function Mp(e){if(!pt(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(Mp,"IsControlCharacterFree");function _4(e){return Tp(e)||Re(e)}o(_4,"IsAdditionalProperties");function Yu(e){return xt(e)||Gu(e)}o(Yu,"IsOptionalBigInt");function mt(e){return xt(e)||vn(e)}o(mt,"IsOptionalNumber");function Tp(e){return xt(e)||Vi(e)}o(Tp,"IsOptionalBoolean");function tt(e){return xt(e)||pt(e)}o(tt,"IsOptionalString");function v2(e){return xt(e)||pt(e)&&Mp(e)&&k4(e)}o(v2,"IsOptionalPattern");function x2(e){return xt(e)||pt(e)&&Mp(e)}o(x2,"IsOptionalFormat");function L4(e){return xt(e)||Re(e)}o(L4,"IsOptionalSchema");function E2(e){return at(e)&&e[di]==="Readonly"}o(E2,"IsReadonly");function C2(e){return at(e)&&e[Er]==="Optional"}o(C2,"IsOptional");function R4(e){return Ne(e,"Any")&&tt(e.$id)}o(R4,"IsAny");function N4(e){return Ne(e,"Array")&&e.type==="array"&&tt(e.$id)&&Re(e.items)&&mt(e.minItems)&&mt(e.maxItems)&&Tp(e.uniqueItems)&&L4(e.contains)&&mt(e.minContains)&&mt(e.maxContains)}o(N4,"IsArray");function j4(e){return Ne(e,"AsyncIterator")&&e.type==="AsyncIterator"&&tt(e.$id)&&Re(e.items)}o(j4,"IsAsyncIterator");function U4(e){return Ne(e,"BigInt")&&e.type==="bigint"&&tt(e.$id)&&Yu(e.exclusiveMaximum)&&Yu(e.exclusiveMinimum)&&Yu(e.maximum)&&Yu(e.minimum)&&Yu(e.multipleOf)}o(U4,"IsBigInt");function z4(e){return Ne(e,"Boolean")&&e.type==="boolean"&&tt(e.$id)}o(z4,"IsBoolean");function $4(e){return Ne(e,"Constructor")&&e.type==="Constructor"&&tt(e.$id)&&lr(e.parameters)&&e.parameters.every(t=>Re(t))&&Re(e.returns)}o($4,"IsConstructor");function G4(e){return Ne(e,"Date")&&e.type==="Date"&&tt(e.$id)&&mt(e.exclusiveMaximumTimestamp)&&mt(e.exclusiveMinimumTimestamp)&&mt(e.maximumTimestamp)&&mt(e.minimumTimestamp)&&mt(e.multipleOfTimestamp)}o(G4,"IsDate");function Z4(e){return Ne(e,"Function")&&e.type==="Function"&&tt(e.$id)&&lr(e.parameters)&&e.parameters.every(t=>Re(t))&&Re(e.returns)}o(Z4,"IsFunction");function V4(e){return Ne(e,"Integer")&&e.type==="integer"&&tt(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(V4,"IsInteger");function kp(e){return at(e)&&Object.entries(e).every(([t,r])=>Mp(t)&&Re(r))}o(kp,"IsProperties");function W4(e){return Ne(e,"Intersect")&&!(pt(e.type)&&e.type!=="object")&&lr(e.allOf)&&e.allOf.every(t=>Re(t)&&!ft(t))&&tt(e.type)&&(Tp(e.unevaluatedProperties)||L4(e.unevaluatedProperties))&&tt(e.$id)}o(W4,"IsIntersect");function H4(e){return Ne(e,"Iterator")&&e.type==="Iterator"&&tt(e.$id)&&Re(e.items)}o(H4,"IsIterator");function Ne(e,t){return at(e)&&L in e&&e[L]===t}o(Ne,"IsKindOf");function K4(e){return Qu(e)&&pt(e.const)}o(K4,"IsLiteralString");function q4(e){return Qu(e)&&vn(e.const)}o(q4,"IsLiteralNumber");function I2(e){return Qu(e)&&Vi(e.const)}o(I2,"IsLiteralBoolean");function Qu(e){return Ne(e,"Literal")&&tt(e.$id)&&J4(e.const)}o(Qu,"IsLiteral");function J4(e){return Vi(e)||vn(e)||pt(e)}o(J4,"IsLiteralValue");function X4(e){return Ne(e,"MappedKey")&&lr(e.keys)&&e.keys.every(t=>vn(t)||pt(t))}o(X4,"IsMappedKey");function Y4(e){return Ne(e,"MappedResult")&&kp(e.properties)}o(Y4,"IsMappedResult");function Q4(e){return Ne(e,"Never")&&at(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(Q4,"IsNever");function e1(e){return Ne(e,"Not")&&Re(e.not)}o(e1,"IsNot");function t1(e){return Ne(e,"Null")&&e.type==="null"&&tt(e.$id)}o(t1,"IsNull");function r1(e){return Ne(e,"Number")&&e.type==="number"&&tt(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(r1,"IsNumber");function n1(e){return Ne(e,"Object")&&e.type==="object"&&tt(e.$id)&&kp(e.properties)&&_4(e.additionalProperties)&&mt(e.minProperties)&&mt(e.maxProperties)}o(n1,"IsObject");function i1(e){return Ne(e,"Promise")&&e.type==="Promise"&&tt(e.$id)&&Re(e.item)}o(i1,"IsPromise");function o1(e){return Ne(e,"Record")&&e.type==="object"&&tt(e.$id)&&_4(e.additionalProperties)&&at(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&k4(r[0])&&at(t.patternProperties)&&Re(t.patternProperties[r[0]])})(e)}o(o1,"IsRecord");function D2(e){return at(e)&&Xr in e&&e[Xr]==="Recursive"}o(D2,"IsRecursive");function a1(e){return Ne(e,"Ref")&&tt(e.$id)&&pt(e.$ref)}o(a1,"IsRef");function u1(e){return Ne(e,"RegExp")&&tt(e.$id)&&pt(e.source)&&pt(e.flags)&&mt(e.maxLength)&&mt(e.minLength)}o(u1,"IsRegExp");function s1(e){return Ne(e,"String")&&e.type==="string"&&tt(e.$id)&&mt(e.minLength)&&mt(e.maxLength)&&v2(e.pattern)&&x2(e.format)}o(s1,"IsString");function c1(e){return Ne(e,"Symbol")&&e.type==="symbol"&&tt(e.$id)}o(c1,"IsSymbol");function l1(e){return Ne(e,"TemplateLiteral")&&e.type==="string"&&pt(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(l1,"IsTemplateLiteral");function m1(e){return Ne(e,"This")&&tt(e.$id)&&pt(e.$ref)}o(m1,"IsThis");function ft(e){return at(e)&&gt in e}o(ft,"IsTransform");function d1(e){return Ne(e,"Tuple")&&e.type==="array"&&tt(e.$id)&&vn(e.minItems)&&vn(e.maxItems)&&e.minItems===e.maxItems&&(xt(e.items)&&xt(e.additionalItems)&&e.minItems===0||lr(e.items)&&e.items.every(t=>Re(t)))}o(d1,"IsTuple");function xa(e){return Ne(e,"Undefined")&&e.type==="undefined"&&tt(e.$id)}o(xa,"IsUndefined");function S2(e){return _p(e)&&e.anyOf.every(t=>K4(t)||q4(t))}o(S2,"IsUnionLiteral");function _p(e){return Ne(e,"Union")&&tt(e.$id)&&at(e)&&lr(e.anyOf)&&e.anyOf.every(t=>Re(t))}o(_p,"IsUnion");function p1(e){return Ne(e,"Uint8Array")&&e.type==="Uint8Array"&&tt(e.$id)&&mt(e.minByteLength)&&mt(e.maxByteLength)}o(p1,"IsUint8Array");function f1(e){return Ne(e,"Unknown")&&tt(e.$id)}o(f1,"IsUnknown");function h1(e){return Ne(e,"Unsafe")}o(h1,"IsUnsafe");function g1(e){return Ne(e,"Void")&&e.type==="void"&&tt(e.$id)}o(g1,"IsVoid");function y1(e){return at(e)&&L in e&&pt(e[L])&&!b2.includes(e[L])}o(y1,"IsKind");function Re(e){return at(e)&&(R4(e)||N4(e)||z4(e)||U4(e)||j4(e)||$4(e)||G4(e)||Z4(e)||V4(e)||W4(e)||H4(e)||Qu(e)||X4(e)||Y4(e)||Q4(e)||e1(e)||t1(e)||r1(e)||n1(e)||i1(e)||o1(e)||a1(e)||u1(e)||s1(e)||c1(e)||l1(e)||m1(e)||d1(e)||xa(e)||_p(e)||p1(e)||f1(e)||h1(e)||g1(e)||y1(e))}o(Re,"IsSchema");l();var Rp="(true|false)",es="(0|[1-9][0-9]*)",Np="(.*)",w2="(?!.*)",i8="^".concat(Rp,"$"),hi="^".concat(es,"$"),gi="^".concat(Np,"$"),b1="^".concat(w2,"$");l();var Cr={};_i(Cr,{Clear:()=>F2,Delete:()=>O2,Entries:()=>A2,Get:()=>M2,Has:()=>B2,Set:()=>P2});l();var Ea=new Map;function A2(){return new Map(Ea)}o(A2,"Entries");function F2(){return Ea.clear()}o(F2,"Clear");function O2(e){return Ea.delete(e)}o(O2,"Delete");function B2(e){return Ea.has(e)}o(B2,"Has");function P2(e,t){Ea.set(e,t)}o(P2,"Set");function M2(e){return Ea.get(e)}o(M2,"Get");var $t={};_i($t,{Clear:()=>k2,Delete:()=>_2,Entries:()=>T2,Get:()=>N2,Has:()=>L2,Set:()=>R2});l();var Ca=new Map;function T2(){return new Map(Ca)}o(T2,"Entries");function k2(){return Ca.clear()}o(k2,"Clear");function _2(e){return Ca.delete(e)}o(_2,"Delete");function L2(e){return Ca.has(e)}o(L2,"Has");function R2(e,t){Ca.set(e,t)}o(R2,"Set");function N2(e){return Ca.get(e)}o(N2,"Get");l();function v1(e,t){return e.includes(t)}o(v1,"SetIncludes");function x1(e){return[...new Set(e)]}o(x1,"SetDistinct");function j2(e,t){return e.filter(r=>t.includes(r))}o(j2,"SetIntersect");function U2(e,t){return e.reduce((r,n)=>j2(r,n),t)}o(U2,"SetIntersectManyResolve");function E1(e){return e.length===1?e[0]:e.length>1?U2(e.slice(1),e[0]):[]}o(E1,"SetIntersectMany");function C1(e){let t=[];for(let r of e)t.push(...r);return t}o(C1,"SetUnionMany");l();function qi(e){return H({[L]:"Any"},e)}o(qi,"Any");l();function Yc(e,t){return H({[L]:"Array",type:"array",items:e},t)}o(Yc,"Array");l();function Qc(e,t){return H({[L]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(Qc,"AsyncIterator");l();l();l();function z2(e,t){let i=e,{[t]:r}=i;return yo(i,[yc(t)])}o(z2,"DiscardKey");function At(e,t){return t.reduce((r,n)=>z2(r,n),e)}o(At,"Discard");l();function rt(e){return H({[L]:"Never",not:{}},e)}o(rt,"Never");l();l();function ze(e){return H({[L]:"MappedResult",properties:e})}o(ze,"MappedResult");l();l();function el(e,t,r){return H({[L]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(el,"Constructor");l();function Ji(e,t,r){return H({[L]:"Function",type:"Function",parameters:e,returns:t},r)}o(Ji,"Function");l();l();l();l();function ts(e,t){return H({[L]:"Union",anyOf:e},t)}o(ts,"UnionCreate");function $2(e){return e.some(t=>zn(t))}o($2,"IsUnionOptional");function I1(e){return e.map(t=>zn(t)?G2(t):t)}o(I1,"RemoveOptionalFromRest");function G2(e){return At(e,[Er])}o(G2,"RemoveOptionalFromType");function Z2(e,t){return $2(e)?Or(ts(I1(e),t)):ts(I1(e),t)}o(Z2,"ResolveUnion");function $n(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):Z2(e,t)}o($n,"UnionEvaluated");l();function nt(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):ts(e,t)}o(nt,"Union");l();l();l();var Up=class Up extends fe{};o(Up,"TemplateLiteralParserError");var tl=Up;function V2(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(V2,"Unescape");function jp(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(jp,"IsNonEscaped");function yi(e,t){return jp(e,t,"(")}o(yi,"IsOpenParen");function rs(e,t){return jp(e,t,")")}o(rs,"IsCloseParen");function D1(e,t){return jp(e,t,"|")}o(D1,"IsSeparator");function W2(e){if(!(yi(e,0)&&rs(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(yi(e,r)&&(t+=1),rs(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(W2,"IsGroup");function H2(e){return e.slice(1,e.length-1)}o(H2,"InGroup");function K2(e){let t=0;for(let r=0;r<e.length;r++)if(yi(e,r)&&(t+=1),rs(e,r)&&(t-=1),D1(e,r)&&t===0)return!0;return!1}o(K2,"IsPrecedenceOr");function q2(e){for(let t=0;t<e.length;t++)if(yi(e,t))return!0;return!1}o(q2,"IsPrecedenceAnd");function J2(e){let[t,r]=[0,0],n=[];for(let a=0;a<e.length;a++)if(yi(e,a)&&(t+=1),rs(e,a)&&(t-=1),D1(e,a)&&t===0){let u=e.slice(r,a);u.length>0&&n.push(Ia(u)),r=a+1}let i=e.slice(r);return i.length>0&&n.push(Ia(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(J2,"Or");function X2(e){function t(i,a){if(!yi(i,a))throw new tl("TemplateLiteralParser: Index must point to open parens");let u=0;for(let c=a;c<i.length;c++)if(yi(i,c)&&(u+=1),rs(i,c)&&(u-=1),u===0)return[a,c];throw new tl("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,a){for(let u=a;u<i.length;u++)if(yi(i,u))return[a,u];return[a,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(yi(e,i)){let[a,u]=t(e,i),c=e.slice(a,u+1);n.push(Ia(c)),i=u}else{let[a,u]=r(e,i),c=e.slice(a,u);c.length>0&&n.push(Ia(c)),i=u-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(X2,"And");function Ia(e){return W2(e)?Ia(H2(e)):K2(e)?J2(e):q2(e)?X2(e):{type:"const",const:V2(e)}}o(Ia,"TemplateLiteralParse");function Da(e){return Ia(e.slice(1,e.length-1))}o(Da,"TemplateLiteralParseExact");var $p=class $p extends fe{};o($p,"TemplateLiteralFiniteError");var zp=$p;function Y2(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}o(Y2,"IsNumberExpression");function Q2(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}o(Q2,"IsBooleanExpression");function eC(e){return e.type==="const"&&e.const===".*"}o(eC,"IsStringExpression");function Bo(e){return Y2(e)||eC(e)?!1:Q2(e)?!0:e.type==="and"?e.expr.every(t=>Bo(t)):e.type==="or"?e.expr.every(t=>Bo(t)):e.type==="const"?!0:(()=>{throw new zp("Unknown expression type")})()}o(Bo,"IsTemplateLiteralExpressionFinite");function rl(e){let t=Da(e.pattern);return Bo(t)}o(rl,"IsTemplateLiteralFinite");l();var Zp=class Zp extends fe{};o(Zp,"TemplateLiteralGenerateError");var Gp=Zp;function*S1(e){if(e.length===1)return yield*K(e[0]);for(let t of e[0])for(let r of S1(e.slice(1)))yield"".concat(t).concat(r)}o(S1,"GenerateReduce");function*tC(e){return yield*K(S1(e.expr.map(t=>[...ns(t)])))}o(tC,"GenerateAnd");function*rC(e){for(let t of e.expr)yield*K(ns(t))}o(rC,"GenerateOr");function*nC(e){return yield e.const}o(nC,"GenerateConst");function*ns(e){return e.type==="and"?yield*K(tC(e)):e.type==="or"?yield*K(rC(e)):e.type==="const"?yield*K(nC(e)):(()=>{throw new Gp("Unknown expression")})()}o(ns,"TemplateLiteralExpressionGenerate");function Sa(e){let t=Da(e.pattern);return Bo(t)?[...ns(t)]:[]}o(Sa,"TemplateLiteralGenerate");l();l();function Ke(e,t){return H({[L]:"Literal",const:e,type:typeof e},t)}o(Ke,"Literal");l();function nl(e){return H({[L]:"Boolean",type:"boolean"},e)}o(nl,"Boolean");l();function wa(e){return H({[L]:"BigInt",type:"bigint"},e)}o(wa,"BigInt");l();function Gn(e){return H({[L]:"Number",type:"number"},e)}o(Gn,"Number");l();function Yr(e){return H({[L]:"String",type:"string"},e)}o(Yr,"String");function*iC(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield nl():t==="number"?yield Gn():t==="bigint"?yield wa():t==="string"?yield Yr():yield(()=>{let r=t.split("|").map(n=>Ke(n.trim()));return r.length===0?rt():r.length===1?r[0]:$n(r)})()}o(iC,"FromUnion");function*oC(e){if(e[1]!=="{"){let t=Ke("$"),r=Vp(e.slice(1));return yield*K([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=iC(e.slice(2,t)),n=Vp(e.slice(t+1));return yield*K([...r,...n])}yield Ke(e)}o(oC,"FromTerminal");function*Vp(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=Ke(e.slice(0,t)),n=oC(e.slice(t));return yield*K([r,...n])}yield Ke(e)}o(Vp,"FromSyntax");function w1(e){return[...Vp(e)]}o(w1,"TemplateLiteralSyntax");l();var Kp=class Kp extends fe{};o(Kp,"TemplateLiteralPatternError");var Wp=Kp;function aC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(aC,"Escape");function A1(e,t){return Nr(e)?e.pattern.slice(1,e.pattern.length-1):We(e)?"(".concat(e.anyOf.map(r=>A1(r,t)).join("|"),")"):Fo(e)?"".concat(t).concat(es):Ao(e)?"".concat(t).concat(es):wp(e)?"".concat(t).concat(es):Xu(e)?"".concat(t).concat(Np):fi(e)?"".concat(t).concat(aC(e.const.toString())):Ap(e)?"".concat(t).concat(Rp):(()=>{throw new Wp("Unexpected Kind '".concat(e[L],"'"))})()}o(A1,"Visit");function Hp(e){return"^".concat(e.map(t=>A1(t,"")).join(""),"$")}o(Hp,"TemplateLiteralPattern");l();function Po(e){let r=Sa(e).map(n=>Ke(n));return $n(r)}o(Po,"TemplateLiteralToUnion");l();function il(e,t){let r=pt(e)?Hp(w1(e)):Hp(e);return H({[L]:"TemplateLiteral",type:"string",pattern:r},t)}o(il,"TemplateLiteral");function uC(e){return Sa(e).map(r=>r.toString())}o(uC,"FromTemplateLiteral");function sC(e){let t=[];for(let r of e)t.push(...Br(r));return t}o(sC,"FromUnion");function cC(e){return[e.toString()]}o(cC,"FromLiteral");function Br(e){return[...new Set(Nr(e)?uC(e):We(e)?sC(e.anyOf):fi(e)?cC(e.const):Fo(e)?["[number]"]:Ao(e)?["[number]"]:[])]}o(Br,"IndexPropertyKeys");l();function lC(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Aa(e,Br(t[i]),r);return n}o(lC,"FromProperties");function mC(e,t,r){return lC(e,t.properties,r)}o(mC,"FromMappedResult");function F1(e,t,r){let n=mC(e,t,r);return ze(n)}o(F1,"IndexFromMappedResult");function B1(e,t){return e.map(r=>P1(r,t))}o(B1,"FromRest");function dC(e){return e.filter(t=>!Hi(t))}o(dC,"FromIntersectRest");function pC(e,t){return ol(dC(B1(e,t)))}o(pC,"FromIntersect");function fC(e){return e.some(t=>Hi(t))?[]:e}o(fC,"FromUnionRest");function hC(e,t){return $n(fC(B1(e,t)))}o(hC,"FromUnion");function gC(e,t){return t in e?e[t]:t==="[number]"?$n(e):rt()}o(gC,"FromTuple");function yC(e,t){return t==="[number]"?e:rt()}o(yC,"FromArray");function bC(e,t){return t in e?e[t]:rt()}o(bC,"FromProperty");function P1(e,t){var r;return kt(e)?pC(e.allOf,t):We(e)?hC(e.anyOf,t):xn(e)?gC((r=e.items)!=null?r:[],t):pi(e)?yC(e.items,t):zt(e)?bC(e.properties,t):rt()}o(P1,"IndexFromPropertyKey");function is(e,t){return t.map(r=>P1(e,r))}o(is,"IndexFromPropertyKeys");function O1(e,t){return $n(is(e,t))}o(O1,"FromSchema");function Aa(e,t,r){return yt(t)?F1(e,t,r):Rr(t)?M1(e,t,r):H(En(t)?O1(e,Br(t)):O1(e,t),r)}o(Aa,"Index");function vC(e,t,r){return{[t]:Aa(e,[t],ht(r))}}o(vC,"MappedIndexPropertyKey");function xC(e,t,r){return t.reduce((n,i)=>R(R({},n),vC(e,i,r)),{})}o(xC,"MappedIndexPropertyKeys");function EC(e,t,r){return xC(e,t.keys,r)}o(EC,"MappedIndexProperties");function M1(e,t,r){let n=EC(e,t,r);return ze(n)}o(M1,"IndexFromMappedKey");l();function al(e,t){return H({[L]:"Iterator",type:"Iterator",items:e},t)}o(al,"Iterator");l();function CC(e){let t=[];for(let r in e)zn(e[r])||t.push(r);return t}o(CC,"RequiredKeys");function IC(e,t){let r=CC(e),n=r.length>0?{[L]:"Object",type:"object",properties:e,required:r}:{[L]:"Object",type:"object",properties:e};return H(n,t)}o(IC,"_Object");var ut=IC;l();function ul(e,t){return H({[L]:"Promise",type:"Promise",item:e},t)}o(ul,"Promise");l();l();function DC(e){return H(At(e,[di]))}o(DC,"RemoveReadonly");function SC(e){return H(xe(R({},e),{[di]:"Readonly"}))}o(SC,"AddReadonly");function wC(e,t){return t===!1?DC(e):SC(e)}o(wC,"ReadonlyWithFlag");function Qr(e,t){let r=t!=null?t:!0;return yt(e)?T1(e,r):wC(e,r)}o(Qr,"Readonly");function AC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Qr(e[n],t);return r}o(AC,"FromProperties");function FC(e,t){return AC(e.properties,t)}o(FC,"FromMappedResult");function T1(e,t){let r=FC(e,t);return ze(r)}o(T1,"ReadonlyFromMappedResult");l();function Zn(e,t){return H(e.length>0?{[L]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[L]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(Zn,"Tuple");function k1(e,t){return e in t?en(e,t[e]):ze(t)}o(k1,"FromMappedResult");function OC(e){return{[e]:Ke(e)}}o(OC,"MappedKeyToKnownMappedResultProperties");function BC(e){let t={};for(let r of e)t[r]=Ke(r);return t}o(BC,"MappedKeyToUnknownMappedResultProperties");function PC(e,t){return v1(t,e)?OC(e):BC(t)}o(PC,"MappedKeyToMappedResultProperties");function MC(e,t){let r=PC(e,t);return k1(e,r)}o(MC,"FromMappedKey");function os(e,t){return t.map(r=>en(e,r))}o(os,"FromRest");function TC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=en(e,t[n]);return r}o(TC,"FromProperties");function en(e,t){var n;let r=R({},t);return zn(t)?Or(en(e,At(t,[Er]))):T4(t)?Qr(en(e,At(t,[di]))):yt(t)?k1(e,t.properties):Rr(t)?MC(e,t.keys):Ku(t)?el(os(e,t.parameters),en(e,t.returns),r):qu(t)?Ji(os(e,t.parameters),en(e,t.returns),r):Hu(t)?Qc(en(e,t.items),r):Ju(t)?al(en(e,t.items),r):kt(t)?Pr(os(e,t.allOf),r):We(t)?nt(os(e,t.anyOf),r):xn(t)?Zn(os(e,(n=t.items)!=null?n:[]),r):zt(t)?ut(TC(e,t.properties),r):pi(t)?Yc(en(e,t.items),r):Oo(t)?ul(en(e,t.item),r):t}o(en,"FromSchemaType");function kC(e,t){let r={};for(let n of e)r[n]=en(n,t);return r}o(kC,"MappedFunctionReturnType");function _1(e,t,r){let n=En(e)?Br(e):e,i=t({[L]:"MappedKey",keys:n}),a=kC(n,i);return ut(a,r)}o(_1,"Mapped");l();function _C(e){return H(At(e,[Er]))}o(_C,"RemoveOptional");function LC(e){return H(xe(R({},e),{[Er]:"Optional"}))}o(LC,"AddOptional");function RC(e,t){return t===!1?_C(e):LC(e)}o(RC,"OptionalWithFlag");function Or(e,t){let r=t!=null?t:!0;return yt(e)?L1(e,r):RC(e,r)}o(Or,"Optional");function NC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Or(e[n],t);return r}o(NC,"FromProperties");function jC(e,t){return NC(e.properties,t)}o(jC,"FromMappedResult");function L1(e,t){let r=jC(e,t);return ze(r)}o(L1,"OptionalFromMappedResult");l();function as(e,t={}){let r=e.every(i=>zt(i)),n=En(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return H(t.unevaluatedProperties===!1||En(t.unevaluatedProperties)||r?xe(R({},n),{[L]:"Intersect",type:"object",allOf:e}):xe(R({},n),{[L]:"Intersect",allOf:e}),t)}o(as,"IntersectCreate");function UC(e){return e.every(t=>zn(t))}o(UC,"IsIntersectOptional");function zC(e){return At(e,[Er])}o(zC,"RemoveOptionalFromType");function R1(e){return e.map(t=>zn(t)?zC(t):t)}o(R1,"RemoveOptionalFromRest");function $C(e,t){return UC(e)?Or(as(R1(e),t)):as(R1(e),t)}o($C,"ResolveIntersect");function ol(e,t={}){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>va(r)))throw new Error("Cannot intersect transform types");return $C(e,t)}o(ol,"IntersectEvaluated");l();function Pr(e,t){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>va(r)))throw new Error("Cannot intersect transform types");return as(e,t)}o(Pr,"Intersect");function N1(e){return e.map(t=>qp(t))}o(N1,"FromRest");function GC(e){return Pr(N1(e))}o(GC,"FromIntersect");function ZC(e){return nt(N1(e))}o(ZC,"FromUnion");function VC(e){return qp(e)}o(VC,"FromPromise");function qp(e){return kt(e)?GC(e.allOf):We(e)?ZC(e.anyOf):Oo(e)?VC(e.item):e}o(qp,"AwaitedResolve");function j1(e,t){return H(qp(e),t)}o(j1,"Awaited");l();l();l();l();function U1(e){let t=[];for(let r of e)t.push(Kt(r));return t}o(U1,"FromRest");function WC(e){let t=U1(e);return C1(t)}o(WC,"FromIntersect");function HC(e){let t=U1(e);return E1(t)}o(HC,"FromUnion");function KC(e){return e.map((t,r)=>r.toString())}o(KC,"FromTuple");function qC(e){return["[number]"]}o(qC,"FromArray");function JC(e){return globalThis.Object.getOwnPropertyNames(e)}o(JC,"FromProperties");function XC(e){return Jp?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(XC,"FromPatternProperties");function Kt(e){var t;return kt(e)?WC(e.allOf):We(e)?HC(e.anyOf):xn(e)?KC((t=e.items)!=null?t:[]):pi(e)?qC(e.items):zt(e)?JC(e.properties):Fp(e)?XC(e.patternProperties):[]}o(Kt,"KeyOfPropertyKeys");var Jp=!1;function bi(e){Jp=!0;let t=Kt(e);Jp=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(bi,"KeyOfPattern");function YC(e){return e.map(t=>t==="[number]"?Gn():Ke(t))}o(YC,"KeyOfPropertyKeysToRest");function sl(e,t){if(yt(e))return z1(e,t);{let r=Kt(e),n=YC(r),i=$n(n);return H(i,t)}}o(sl,"KeyOf");function QC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=sl(e[n],ht(t));return r}o(QC,"FromProperties");function eI(e,t){return QC(e.properties,t)}o(eI,"FromMappedResult");function z1(e,t){let r=eI(e,t);return ze(r)}o(z1,"KeyOfFromMappedResult");l();function Xi(e){let t=Kt(e),r=is(e,t);return t.map((n,i)=>[t[i],r[i]])}o(Xi,"KeyOfPropertyEntries");function tI(e){let t=[];for(let r of e)t.push(...Kt(r));return x1(t)}o(tI,"CompositeKeys");function rI(e){return e.filter(t=>!Hi(t))}o(rI,"FilterNever");function nI(e,t){let r=[];for(let n of e)r.push(...is(n,[t]));return rI(r)}o(nI,"CompositeProperty");function iI(e,t){let r={};for(let n of t)r[n]=ol(nI(e,n));return r}o(iI,"CompositeProperties");function $1(e,t){let r=tI(e),n=iI(e,r);return ut(n,t)}o($1,"Composite");l();l();function cl(e){return H({[L]:"Date",type:"Date"},e)}o(cl,"Date");l();function ll(e){return H({[L]:"Null",type:"null"},e)}o(ll,"Null");l();function ml(e){return H({[L]:"Symbol",type:"symbol"},e)}o(ml,"Symbol");l();function dl(e){return H({[L]:"Undefined",type:"undefined"},e)}o(dl,"Undefined");l();function pl(e){return H({[L]:"Uint8Array",type:"Uint8Array"},e)}o(pl,"Uint8Array");l();function vi(e){return H({[L]:"Unknown"},e)}o(vi,"Unknown");function oI(e){return e.map(t=>Xp(t,!1))}o(oI,"FromArray");function aI(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Qr(Xp(e[r],!1));return t}o(aI,"FromProperties");function fl(e,t){return t===!0?e:Qr(e)}o(fl,"ConditionalReadonly");function Xp(e,t){return bp(e)?fl(qi(),t):xp(e)?fl(qi(),t):lr(e)?Qr(Zn(oI(e))):ci(e)?pl():wo(e)?cl():at(e)?fl(ut(aI(e)),t):vp(e)?fl(Ji([],vi()),t):xt(e)?dl():Ep(e)?ll():Cp(e)?ml():Gu(e)?wa():vn(e)?Ke(e):Vi(e)?Ke(e):pt(e)?Ke(e):ut({})}o(Xp,"FromValue");function G1(e,t){return H(Xp(e,!0),t)}o(G1,"Const");l();function Z1(e,t){return Zn(e.parameters,t)}o(Z1,"ConstructorParameters");l();function us(e,t){return e.map(r=>Cn(r,t))}o(us,"FromRest");function uI(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Cn(e[n],t);return r}o(uI,"FromProperties");function sI(e,t){return e.parameters=us(e.parameters,t),e.returns=Cn(e.returns,t),e}o(sI,"FromConstructor");function cI(e,t){return e.parameters=us(e.parameters,t),e.returns=Cn(e.returns,t),e}o(cI,"FromFunction");function lI(e,t){return e.allOf=us(e.allOf,t),e}o(lI,"FromIntersect");function mI(e,t){return e.anyOf=us(e.anyOf,t),e}o(mI,"FromUnion");function dI(e,t){return xt(e.items)||(e.items=us(e.items,t)),e}o(dI,"FromTuple");function pI(e,t){return e.items=Cn(e.items,t),e}o(pI,"FromArray");function fI(e,t){return e.properties=uI(e.properties,t),e}o(fI,"FromObject");function hI(e,t){return e.item=Cn(e.item,t),e}o(hI,"FromPromise");function gI(e,t){return e.items=Cn(e.items,t),e}o(gI,"FromAsyncIterator");function yI(e,t){return e.items=Cn(e.items,t),e}o(yI,"FromIterator");function bI(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=At(r,["$id"]);return Cn(n,t)}o(bI,"FromRef");function vI(e,t){return Ku(e)?sI(e,t):qu(e)?cI(e,t):kt(e)?lI(e,t):We(e)?mI(e,t):xn(e)?dI(e,t):pi(e)?pI(e,t):zt(e)?fI(e,t):Oo(e)?hI(e,t):Hu(e)?gI(e,t):Ju(e)?yI(e,t):Op(e)?bI(e,t):e}o(vI,"DerefResolve");function Cn(e,t){return vI(Vu(e),B4(t))}o(Cn,"Deref");l();function V1(e,t){if(xt(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),i=[...new Set(r)].map(a=>Ke(a));return nt(i,xe(R({},t),{[Xr]:"Enum"}))}o(V1,"Enum");l();l();l();var i0=class i0 extends fe{};o(i0,"ExtendsResolverError");var Qp=i0,z;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(z||(z={}));function tn(e){return e===z.False?e:z.True}o(tn,"IntoBooleanResult");function Fa(e){throw new Qp(e)}o(Fa,"Throw");function Nt(e){return w.IsNever(e)||w.IsIntersect(e)||w.IsUnion(e)||w.IsUnknown(e)||w.IsAny(e)}o(Nt,"IsStructuralRight");function jt(e,t){return w.IsNever(t)?Y1(e,t):w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsUnknown(t)?rb(e,t):w.IsAny(t)?r0(e,t):Fa("StructuralRight")}o(jt,"StructuralRight");function r0(e,t){return z.True}o(r0,"FromAnyRight");function xI(e,t){return w.IsIntersect(t)?hl(e,t):w.IsUnion(t)&&t.anyOf.some(r=>w.IsAny(r)||w.IsUnknown(r))?z.True:w.IsUnion(t)?z.Union:w.IsUnknown(t)||w.IsAny(t)?z.True:z.Union}o(xI,"FromAny");function EI(e,t){return w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:w.IsNever(e)?z.True:z.False}o(EI,"FromArrayRight");function CI(e,t){return w.IsObject(t)&&gl(t)?z.True:Nt(t)?jt(e,t):w.IsArray(t)?tn(it(e.items,t.items)):z.False}o(CI,"FromArray");function II(e,t){return Nt(t)?jt(e,t):w.IsAsyncIterator(t)?tn(it(e.items,t.items)):z.False}o(II,"FromAsyncIterator");function DI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsBigInt(t)?z.True:z.False}o(DI,"FromBigInt");function J1(e,t){return w.IsLiteralBoolean(e)||w.IsBoolean(e)?z.True:z.False}o(J1,"FromBooleanRight");function SI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsBoolean(t)?z.True:z.False}o(SI,"FromBoolean");function wI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsConstructor(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>tn(it(t.parameters[n],r))===z.True)?tn(it(e.returns,t.returns)):z.False:z.False}o(wI,"FromConstructor");function AI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsDate(t)?z.True:z.False}o(AI,"FromDate");function FI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsFunction(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>tn(it(t.parameters[n],r))===z.True)?tn(it(e.returns,t.returns)):z.False:z.False}o(FI,"FromFunction");function X1(e,t){return w.IsLiteral(e)&&_e.IsNumber(e.const)||w.IsNumber(e)||w.IsInteger(e)?z.True:z.False}o(X1,"FromIntegerRight");function OI(e,t){return w.IsInteger(t)||w.IsNumber(t)?z.True:Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):z.False}o(OI,"FromInteger");function hl(e,t){return t.allOf.every(r=>it(e,r)===z.True)?z.True:z.False}o(hl,"FromIntersectRight");function BI(e,t){return e.allOf.some(r=>it(r,t)===z.True)?z.True:z.False}o(BI,"FromIntersect");function PI(e,t){return Nt(t)?jt(e,t):w.IsIterator(t)?tn(it(e.items,t.items)):z.False}o(PI,"FromIterator");function MI(e,t){return w.IsLiteral(t)&&t.const===e.const?z.True:Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsString(t)?tb(e,t):w.IsNumber(t)?Q1(e,t):w.IsInteger(t)?X1(e,t):w.IsBoolean(t)?J1(e,t):z.False}o(MI,"FromLiteral");function Y1(e,t){return z.False}o(Y1,"FromNeverRight");function TI(e,t){return z.True}o(TI,"FromNever");function W1(e){let[t,r]=[e,0];for(;w.IsNot(t);)t=t.not,r+=1;return r%2===0?t:vi()}o(W1,"UnwrapTNot");function kI(e,t){return w.IsNot(e)?it(W1(e),t):w.IsNot(t)?it(e,W1(t)):Fa("Invalid fallthrough for Not")}o(kI,"FromNot");function _I(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsNull(t)?z.True:z.False}o(_I,"FromNull");function Q1(e,t){return w.IsLiteralNumber(e)||w.IsNumber(e)||w.IsInteger(e)?z.True:z.False}o(Q1,"FromNumberRight");function LI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsInteger(t)||w.IsNumber(t)?z.True:z.False}o(LI,"FromNumber");function Mr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(Mr,"IsObjectPropertyCount");function H1(e){return gl(e)}o(H1,"IsObjectStringLike");function K1(e){return Mr(e,0)||Mr(e,1)&&"description"in e.properties&&w.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(w.IsString(e.properties.description.anyOf[0])&&w.IsUndefined(e.properties.description.anyOf[1])||w.IsString(e.properties.description.anyOf[1])&&w.IsUndefined(e.properties.description.anyOf[0]))}o(K1,"IsObjectSymbolLike");function Yp(e){return Mr(e,0)}o(Yp,"IsObjectNumberLike");function q1(e){return Mr(e,0)}o(q1,"IsObjectBooleanLike");function RI(e){return Mr(e,0)}o(RI,"IsObjectBigIntLike");function NI(e){return Mr(e,0)}o(NI,"IsObjectDateLike");function jI(e){return gl(e)}o(jI,"IsObjectUint8ArrayLike");function UI(e){let t=Gn();return Mr(e,0)||Mr(e,1)&&"length"in e.properties&&tn(it(e.properties.length,t))===z.True}o(UI,"IsObjectFunctionLike");function zI(e){return Mr(e,0)}o(zI,"IsObjectConstructorLike");function gl(e){let t=Gn();return Mr(e,0)||Mr(e,1)&&"length"in e.properties&&tn(it(e.properties.length,t))===z.True}o(gl,"IsObjectArrayLike");function $I(e){let t=Ji([qi()],qi());return Mr(e,0)||Mr(e,1)&&"then"in e.properties&&tn(it(e.properties.then,t))===z.True}o($I,"IsObjectPromiseLike");function eb(e,t){return it(e,t)===z.False||w.IsOptional(e)&&!w.IsOptional(t)?z.False:z.True}o(eb,"Property");function mr(e,t){return w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:w.IsNever(e)||w.IsLiteralString(e)&&H1(t)||w.IsLiteralNumber(e)&&Yp(t)||w.IsLiteralBoolean(e)&&q1(t)||w.IsSymbol(e)&&K1(t)||w.IsBigInt(e)&&RI(t)||w.IsString(e)&&H1(t)||w.IsSymbol(e)&&K1(t)||w.IsNumber(e)&&Yp(t)||w.IsInteger(e)&&Yp(t)||w.IsBoolean(e)&&q1(t)||w.IsUint8Array(e)&&jI(t)||w.IsDate(e)&&NI(t)||w.IsConstructor(e)&&zI(t)||w.IsFunction(e)&&UI(t)?z.True:w.IsRecord(e)&&w.IsString(e0(e))?t[Xr]==="Record"?z.True:z.False:w.IsRecord(e)&&w.IsNumber(e0(e))?Mr(t,0)?z.True:z.False:z.False}o(mr,"FromObjectRight");function GI(e,t){return Nt(t)?jt(e,t):w.IsRecord(t)?rn(e,t):w.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!w.IsOptional(t.properties[r]))return z.False;if(w.IsOptional(t.properties[r]))return z.True;if(eb(e.properties[r],t.properties[r])===z.False)return z.False}return z.True})():z.False}o(GI,"FromObject");function ZI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)&&$I(t)?z.True:w.IsPromise(t)?tn(it(e.item,t.item)):z.False}o(ZI,"FromPromise");function e0(e){return hi in e.patternProperties?Gn():gi in e.patternProperties?Yr():Fa("Unknown record key pattern")}o(e0,"RecordKey");function t0(e){return hi in e.patternProperties?e.patternProperties[hi]:gi in e.patternProperties?e.patternProperties[gi]:Fa("Unable to get record value schema")}o(t0,"RecordValue");function rn(e,t){let[r,n]=[e0(t),t0(t)];return w.IsLiteralString(e)&&w.IsNumber(r)&&tn(it(e,n))===z.True?z.True:w.IsUint8Array(e)&&w.IsNumber(r)||w.IsString(e)&&w.IsNumber(r)||w.IsArray(e)&&w.IsNumber(r)?it(e,n):w.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(eb(n,e.properties[i])===z.False)return z.False;return z.True})():z.False}o(rn,"FromRecordRight");function VI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?it(t0(e),t0(t)):z.False}o(VI,"FromRecord");function WI(e,t){let r=w.IsRegExp(e)?Yr():e,n=w.IsRegExp(t)?Yr():t;return it(r,n)}o(WI,"FromRegExp");function tb(e,t){return w.IsLiteral(e)&&_e.IsString(e.const)||w.IsString(e)?z.True:z.False}o(tb,"FromStringRight");function HI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsString(t)?z.True:z.False}o(HI,"FromString");function KI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsSymbol(t)?z.True:z.False}o(KI,"FromSymbol");function qI(e,t){return w.IsTemplateLiteral(e)?it(Po(e),t):w.IsTemplateLiteral(t)?it(e,Po(t)):Fa("Invalid fallthrough for TemplateLiteral")}o(qI,"FromTemplateLiteral");function JI(e,t){return w.IsArray(t)&&e.items!==void 0&&e.items.every(r=>it(r,t.items)===z.True)}o(JI,"IsArrayOfTuple");function XI(e,t){return w.IsNever(e)?z.True:w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:z.False}o(XI,"FromTupleRight");function YI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)&&gl(t)||w.IsArray(t)&&JI(e,t)?z.True:w.IsTuple(t)?_e.IsUndefined(e.items)&&!_e.IsUndefined(t.items)||!_e.IsUndefined(e.items)&&_e.IsUndefined(t.items)?z.False:_e.IsUndefined(e.items)&&!_e.IsUndefined(t.items)||e.items.every((r,n)=>it(r,t.items[n])===z.True)?z.True:z.False:z.False}o(YI,"FromTuple");function QI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsUint8Array(t)?z.True:z.False}o(QI,"FromUint8Array");function eD(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsVoid(t)?nD(e,t):w.IsUndefined(t)?z.True:z.False}o(eD,"FromUndefined");function n0(e,t){return t.anyOf.some(r=>it(e,r)===z.True)?z.True:z.False}o(n0,"FromUnionRight");function tD(e,t){return e.anyOf.every(r=>it(r,t)===z.True)?z.True:z.False}o(tD,"FromUnion");function rb(e,t){return z.True}o(rb,"FromUnknownRight");function rD(e,t){return w.IsNever(t)?Y1(e,t):w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsAny(t)?r0(e,t):w.IsString(t)?tb(e,t):w.IsNumber(t)?Q1(e,t):w.IsInteger(t)?X1(e,t):w.IsBoolean(t)?J1(e,t):w.IsArray(t)?EI(e,t):w.IsTuple(t)?XI(e,t):w.IsObject(t)?mr(e,t):w.IsUnknown(t)?z.True:z.False}o(rD,"FromUnknown");function nD(e,t){return w.IsUndefined(e)||w.IsUndefined(e)?z.True:z.False}o(nD,"FromVoidRight");function iD(e,t){return w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsUnknown(t)?rb(e,t):w.IsAny(t)?r0(e,t):w.IsObject(t)?mr(e,t):w.IsVoid(t)?z.True:z.False}o(iD,"FromVoid");function it(e,t){return w.IsTemplateLiteral(e)||w.IsTemplateLiteral(t)?qI(e,t):w.IsRegExp(e)||w.IsRegExp(t)?WI(e,t):w.IsNot(e)||w.IsNot(t)?kI(e,t):w.IsAny(e)?xI(e,t):w.IsArray(e)?CI(e,t):w.IsBigInt(e)?DI(e,t):w.IsBoolean(e)?SI(e,t):w.IsAsyncIterator(e)?II(e,t):w.IsConstructor(e)?wI(e,t):w.IsDate(e)?AI(e,t):w.IsFunction(e)?FI(e,t):w.IsInteger(e)?OI(e,t):w.IsIntersect(e)?BI(e,t):w.IsIterator(e)?PI(e,t):w.IsLiteral(e)?MI(e,t):w.IsNever(e)?TI(e,t):w.IsNull(e)?_I(e,t):w.IsNumber(e)?LI(e,t):w.IsObject(e)?GI(e,t):w.IsRecord(e)?VI(e,t):w.IsString(e)?HI(e,t):w.IsSymbol(e)?KI(e,t):w.IsTuple(e)?YI(e,t):w.IsPromise(e)?ZI(e,t):w.IsUint8Array(e)?QI(e,t):w.IsUndefined(e)?eD(e,t):w.IsUnion(e)?tD(e,t):w.IsUnknown(e)?rD(e,t):w.IsVoid(e)?iD(e,t):Fa("Unknown left type operand '".concat(e[L],"'"))}o(it,"Visit");function Yi(e,t){return it(e,t)}o(Yi,"ExtendsCheck");l();l();l();function oD(e,t,r,n,i){let a={};for(let u of globalThis.Object.getOwnPropertyNames(e))a[u]=Oa(e[u],t,r,n,ht(i));return a}o(oD,"FromProperties");function aD(e,t,r,n,i){return oD(e.properties,t,r,n,i)}o(aD,"FromMappedResult");function nb(e,t,r,n,i){let a=aD(e,t,r,n,i);return ze(a)}o(nb,"ExtendsFromMappedResult");function uD(e,t,r,n){let i=Yi(e,t);return i===z.Union?nt([r,n]):i===z.True?r:n}o(uD,"ExtendsResolve");function Oa(e,t,r,n,i){return yt(e)?nb(e,t,r,n,i):Rr(e)?H(ib(e,t,r,n,i)):H(uD(e,t,r,n),i)}o(Oa,"Extends");function sD(e,t,r,n,i){return{[e]:Oa(Ke(e),t,r,n,ht(i))}}o(sD,"FromPropertyKey");function cD(e,t,r,n,i){return e.reduce((a,u)=>R(R({},a),sD(u,t,r,n,i)),{})}o(cD,"FromPropertyKeys");function lD(e,t,r,n,i){return cD(e.keys,t,r,n,i)}o(lD,"FromMappedKey");function ib(e,t,r,n,i){let a=lD(e,t,r,n,i);return ze(a)}o(ib,"ExtendsFromMappedKey");l();function mD(e){return e.allOf.every(t=>xi(t))}o(mD,"Intersect");function dD(e){return e.anyOf.some(t=>xi(t))}o(dD,"Union");function pD(e){return!xi(e.not)}o(pD,"Not");function xi(e){return e[L]==="Intersect"?mD(e):e[L]==="Union"?dD(e):e[L]==="Not"?pD(e):e[L]==="Undefined"}o(xi,"ExtendsUndefinedCheck");l();function ob(e,t){return Ba(Po(e),t)}o(ob,"ExcludeFromTemplateLiteral");function fD(e,t){let r=e.filter(n=>Yi(n,t)===z.False);return r.length===1?r[0]:nt(r)}o(fD,"ExcludeRest");function Ba(e,t,r={}){return Nr(e)?H(ob(e,t),r):yt(e)?H(ab(e,t),r):H(We(e)?fD(e.anyOf,t):Yi(e,t)!==z.False?rt():e,r)}o(Ba,"Exclude");function hD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ba(e[n],t);return r}o(hD,"FromProperties");function gD(e,t){return hD(e.properties,t)}o(gD,"FromMappedResult");function ab(e,t){let r=gD(e,t);return ze(r)}o(ab,"ExcludeFromMappedResult");l();l();l();function ub(e,t){return Pa(Po(e),t)}o(ub,"ExtractFromTemplateLiteral");function yD(e,t){let r=e.filter(n=>Yi(n,t)!==z.False);return r.length===1?r[0]:nt(r)}o(yD,"ExtractRest");function Pa(e,t,r){return Nr(e)?H(ub(e,t),r):yt(e)?H(sb(e,t),r):H(We(e)?yD(e.anyOf,t):Yi(e,t)!==z.False?e:rt(),r)}o(Pa,"Extract");function bD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Pa(e[n],t);return r}o(bD,"FromProperties");function vD(e,t){return bD(e.properties,t)}o(vD,"FromMappedResult");function sb(e,t){let r=vD(e,t);return ze(r)}o(sb,"ExtractFromMappedResult");l();function cb(e,t){return H(e.returns,t)}o(cb,"InstanceType");l();function lb(e){return H({[L]:"Integer",type:"integer"},e)}o(lb,"Integer");l();l();l();function xD(e,t,r){return{[e]:In(Ke(e),t,ht(r))}}o(xD,"MappedIntrinsicPropertyKey");function ED(e,t,r){return e.reduce((i,a)=>R(R({},i),xD(a,t,r)),{})}o(ED,"MappedIntrinsicPropertyKeys");function CD(e,t,r){return ED(e.keys,t,r)}o(CD,"MappedIntrinsicProperties");function mb(e,t,r){let n=CD(e,t,r);return ze(n)}o(mb,"IntrinsicFromMappedKey");function ID(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(ID,"ApplyUncapitalize");function DD(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(DD,"ApplyCapitalize");function SD(e){return e.toUpperCase()}o(SD,"ApplyUppercase");function wD(e){return e.toLowerCase()}o(wD,"ApplyLowercase");function AD(e,t,r){let n=Da(e.pattern);if(!Bo(n))return xe(R({},e),{pattern:db(e.pattern,t)});let u=[...ns(n)].map(d=>Ke(d)),c=pb(u,t),m=nt(c);return il([m],r)}o(AD,"FromTemplateLiteral");function db(e,t){return typeof e=="string"?t==="Uncapitalize"?ID(e):t==="Capitalize"?DD(e):t==="Uppercase"?SD(e):t==="Lowercase"?wD(e):e:e.toString()}o(db,"FromLiteralValue");function pb(e,t){return e.map(r=>In(r,t))}o(pb,"FromRest");function In(e,t,r={}){return Rr(e)?mb(e,t,r):Nr(e)?AD(e,t,r):We(e)?nt(pb(e.anyOf,t),r):fi(e)?Ke(db(e.const,t),r):H(e,r)}o(In,"Intrinsic");function fb(e,t={}){return In(e,"Capitalize",t)}o(fb,"Capitalize");l();function hb(e,t={}){return In(e,"Lowercase",t)}o(hb,"Lowercase");l();function gb(e,t={}){return In(e,"Uncapitalize",t)}o(gb,"Uncapitalize");l();function yb(e,t={}){return In(e,"Uppercase",t)}o(yb,"Uppercase");l();function bb(e,t){return H({[L]:"Not",not:e},t)}o(bb,"Not");l();l();l();function FD(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ma(e[i],t,ht(r));return n}o(FD,"FromProperties");function OD(e,t,r){return FD(e.properties,t,r)}o(OD,"FromMappedResult");function vb(e,t,r){let n=OD(e,t,r);return ze(n)}o(vb,"OmitFromMappedResult");function BD(e,t){return e.map(r=>o0(r,t))}o(BD,"FromIntersect");function PD(e,t){return e.map(r=>o0(r,t))}o(PD,"FromUnion");function MD(e,t){let i=e,{[t]:r}=i;return yo(i,[yc(t)])}o(MD,"FromProperty");function TD(e,t){return t.reduce((r,n)=>MD(r,n),e)}o(TD,"FromProperties");function kD(e,t){let r=At(e,[gt,"$id","required","properties"]),n=TD(e.properties,t);return ut(n,r)}o(kD,"FromObject");function o0(e,t){return kt(e)?Pr(BD(e.allOf,t)):We(e)?nt(PD(e.anyOf,t)):zt(e)?kD(e,t):ut({})}o(o0,"OmitResolve");function Ma(e,t,r){if(Rr(t))return xb(e,t,r);if(yt(e))return vb(e,t,r);let n=En(t)?Br(t):t;return H(R(R({},o0(e,n)),r))}o(Ma,"Omit");function _D(e,t,r){return{[t]:Ma(e,[t],ht(r))}}o(_D,"FromPropertyKey");function LD(e,t,r){return t.reduce((n,i)=>R(R({},n),_D(e,i,r)),{})}o(LD,"FromPropertyKeys");function RD(e,t,r){return LD(e,t.keys,r)}o(RD,"FromMappedKey");function xb(e,t,r){let n=RD(e,t,r);return ze(n)}o(xb,"OmitFromMappedKey");l();function Eb(e,t){return Zn(e.parameters,t)}o(Eb,"Parameters");l();l();function Cb(e){return e.map(t=>Ib(t))}o(Cb,"FromRest");function ND(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Or(e[r]);return t}o(ND,"FromProperties");function jD(e){let t=At(e,[gt,"$id","required","properties"]),r=ND(e.properties);return ut(r,t)}o(jD,"FromObject");function Ib(e){return kt(e)?Pr(Cb(e.allOf)):We(e)?nt(Cb(e.anyOf)):zt(e)?jD(e):ut({})}o(Ib,"PartialResolve");function yl(e,t){return yt(e)?Db(e,t):H(R(R({},Ib(e)),t))}o(yl,"Partial");function UD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=yl(e[n],ht(t));return r}o(UD,"FromProperties");function zD(e,t){return UD(e.properties,t)}o(zD,"FromMappedResult");function Db(e,t){let r=zD(e,t);return ze(r)}o(Db,"PartialFromMappedResult");l();l();l();function $D(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ta(e[i],t,ht(r));return n}o($D,"FromProperties");function GD(e,t,r){return $D(e.properties,t,r)}o(GD,"FromMappedResult");function Sb(e,t,r){let n=GD(e,t,r);return ze(n)}o(Sb,"PickFromMappedResult");function ZD(e,t){return e.map(r=>a0(r,t))}o(ZD,"FromIntersect");function VD(e,t){return e.map(r=>a0(r,t))}o(VD,"FromUnion");function WD(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(WD,"FromProperties");function HD(e,t){let r=At(e,[gt,"$id","required","properties"]),n=WD(e.properties,t);return ut(n,r)}o(HD,"FromObject");function a0(e,t){return kt(e)?Pr(ZD(e.allOf,t)):We(e)?nt(VD(e.anyOf,t)):zt(e)?HD(e,t):ut({})}o(a0,"PickResolve");function Ta(e,t,r){if(Rr(t))return wb(e,t,r);if(yt(e))return Sb(e,t,r);let n=En(t)?Br(t):t;return H(R(R({},a0(e,n)),r))}o(Ta,"Pick");function KD(e,t,r){return{[t]:Ta(e,[t],ht(r))}}o(KD,"FromPropertyKey");function qD(e,t,r){return t.reduce((n,i)=>R(R({},n),KD(e,i,r)),{})}o(qD,"FromPropertyKeys");function JD(e,t,r){return qD(e,t.keys,r)}o(JD,"FromMappedKey");function wb(e,t,r){let n=JD(e,t,r);return ze(n)}o(wb,"PickFromMappedKey");l();function Ab(e){return Qr(Or(e))}o(Ab,"ReadonlyOptional");l();function Mo(e,t,r){return H({[L]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Mo,"RecordCreateFromPattern");function u0(e,t,r){let n={};for(let i of e)n[i]=t;return ut(n,xe(R({},r),{[Xr]:"Record"}))}o(u0,"RecordCreateFromKeys");function XD(e,t,r){return rl(e)?u0(Br(e),t,r):Mo(e.pattern,t,r)}o(XD,"FromTemplateLiteralKey");function YD(e,t,r){return u0(Br(nt(e)),t,r)}o(YD,"FromUnionKey");function QD(e,t,r){return u0([e.toString()],t,r)}o(QD,"FromLiteralKey");function eS(e,t,r){return Mo(e.source,t,r)}o(eS,"FromRegExpKey");function tS(e,t,r){let n=xt(e.pattern)?gi:e.pattern;return Mo(n,t,r)}o(tS,"FromStringKey");function rS(e,t,r){return Mo(gi,t,r)}o(rS,"FromAnyKey");function nS(e,t,r){return Mo(b1,t,r)}o(nS,"FromNeverKey");function iS(e,t,r){return Mo(hi,t,r)}o(iS,"FromIntegerKey");function oS(e,t,r){return Mo(hi,t,r)}o(oS,"FromNumberKey");function Fb(e,t,r={}){return We(e)?YD(e.anyOf,t,r):Nr(e)?XD(e,t,r):fi(e)?QD(e.const,t,r):Ao(e)?iS(e,t,r):Fo(e)?oS(e,t,r):Bp(e)?eS(e,t,r):Xu(e)?tS(e,t,r):Sp(e)?rS(e,t,r):Hi(e)?nS(e,t,r):rt(r)}o(Fb,"Record");l();var aS=0;function Ob(e,t={}){xt(t.$id)&&(t.$id="T".concat(aS++));let r=Vu(e({[L]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,H(R({[Xr]:"Recursive"},r),t)}o(Ob,"Recursive");l();function Bb(e,t){if(pt(e))return H({[L]:"Ref",$ref:e},t);if(xt(e.$id))throw new Error("Reference target type must specify an $id");return H({[L]:"Ref",$ref:e.$id},t)}o(Bb,"Ref");l();function Pb(e,t){let r=pt(e)?new globalThis.RegExp(e):e;return H({[L]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(Pb,"RegExp");l();l();function Mb(e){return e.map(t=>Tb(t))}o(Mb,"FromRest");function uS(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=At(e[r],[Er]);return t}o(uS,"FromProperties");function sS(e){let t=At(e,[gt,"$id","required","properties"]),r=uS(e.properties);return ut(r,t)}o(sS,"FromObject");function Tb(e){return kt(e)?Pr(Mb(e.allOf)):We(e)?nt(Mb(e.anyOf)):zt(e)?sS(e):ut({})}o(Tb,"RequiredResolve");function bl(e,t){return yt(e)?kb(e,t):H(R(R({},Tb(e)),t))}o(bl,"Required");function cS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=bl(e[n],t);return r}o(cS,"FromProperties");function lS(e,t){return cS(e.properties,t)}o(lS,"FromMappedResult");function kb(e,t){let r=lS(e,t);return ze(r)}o(kb,"RequiredFromMappedResult");l();function mS(e){var t;return kt(e)?e.allOf:We(e)?e.anyOf:xn(e)?(t=e.items)!=null?t:[]:[]}o(mS,"RestResolve");function _b(e){return mS(e)}o(_b,"Rest");l();function Lb(e,t){return H(e.returns,t)}o(Lb,"ReturnType");l();function Rb(e){return JSON.parse(JSON.stringify(e))}o(Rb,"Strict");l();var l0=class l0{constructor(t){this.schema=t}Decode(t){return new c0(this.schema,t)}};o(l0,"TransformDecodeBuilder");var s0=l0,m0=class m0{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let a={Encode:o(u=>r[gt].Encode(t(u)),"Encode"),Decode:o(u=>this.decode(r[gt].Decode(u)),"Decode")};return xe(R({},r),{[gt]:a})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return xe(R({},r),{[gt]:n})}Encode(t){return va(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(m0,"TransformEncodeBuilder");var c0=m0;function Nb(e){return new s0(e)}o(Nb,"Transform");l();function vl(e={}){var t;return H({[L]:(t=e[L])!=null?t:"Unsafe"},e)}o(vl,"Unsafe");l();function jb(e){return H({[L]:"Void",type:"void"},e)}o(jb,"Void");l();var d0={};_i(d0,{Any:()=>qi,Array:()=>Yc,AsyncIterator:()=>Qc,Awaited:()=>j1,BigInt:()=>wa,Boolean:()=>nl,Capitalize:()=>fb,Composite:()=>$1,Const:()=>G1,Constructor:()=>el,ConstructorParameters:()=>Z1,Date:()=>cl,Deref:()=>Cn,Enum:()=>V1,Exclude:()=>Ba,Extends:()=>Oa,Extract:()=>Pa,Function:()=>Ji,Index:()=>Aa,InstanceType:()=>cb,Integer:()=>lb,Intersect:()=>Pr,Iterator:()=>al,KeyOf:()=>sl,Literal:()=>Ke,Lowercase:()=>hb,Mapped:()=>_1,Never:()=>rt,Not:()=>bb,Null:()=>ll,Number:()=>Gn,Object:()=>ut,Omit:()=>Ma,Optional:()=>Or,Parameters:()=>Eb,Partial:()=>yl,Pick:()=>Ta,Promise:()=>ul,Readonly:()=>Qr,ReadonlyOptional:()=>Ab,Record:()=>Fb,Recursive:()=>Ob,Ref:()=>Bb,RegExp:()=>Pb,Required:()=>bl,Rest:()=>_b,ReturnType:()=>Lb,Strict:()=>Rb,String:()=>Yr,Symbol:()=>ml,TemplateLiteral:()=>il,Transform:()=>Nb,Tuple:()=>Zn,Uint8Array:()=>pl,Uncapitalize:()=>gb,Undefined:()=>dl,Union:()=>nt,Unknown:()=>vi,Unsafe:()=>vl,Uppercase:()=>yb,Void:()=>jb});l();var p=d0;l();var ss=p.Object({externalId:p.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:p.String({description:"The name of the entity."}),shortName:p.String({description:"A short name for the entity."}),description:p.String({description:"A description of the entity."}),icon:p.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),p0=p.Partial(ss,{$id:"Details",description:"Additional information about a given entity."}),jr=p.Object({details:p.Optional(p.Ref(p0))},{$id:"WithDetails"}),To=o(e=>{let t=[...e].sort(),r=p.Pick(ss,e),n=p.Omit(ss,e);return p.Object({details:p.Intersect([r,p.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),f0=[ss,p0];l();var ka=p.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),_a=p.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),ko=p.Tuple([p.Ref(ka),p.Ref(_a)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),dr=p.Object({type:p.Literal("Point"),coordinates:p.Ref(ko)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),xl=p.Object({type:p.Literal("MultiPoint"),coordinates:p.Array(p.Ref(ko))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),El=p.Object({type:p.Literal("LineString"),coordinates:p.Array(p.Ref(ko),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Cl=p.Object({type:p.Literal("MultiLineString"),coordinates:p.Array(p.Array(p.Ref(ko),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),Ub=p.Array(p.Ref(ko),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),h0=p.Array(p.Ref(Ub),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),La=p.Object({type:p.Literal("Polygon"),coordinates:p.Ref(h0)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ra=p.Object({type:p.Literal("MultiPolygon"),coordinates:p.Array(p.Ref(h0))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),rr=o((e,t,r)=>p.Object({type:p.Literal("Feature"),geometry:e,properties:t},r),"Feature"),Ir=o((e,t,r)=>p.Object({type:p.Literal("FeatureCollection"),features:p.Array(e,r)},t),"FeatureCollection"),g0=[ka,_a,ko,dr,xl,El,Cl,Ub,h0,La,Ra];l();var Ft=o((e,t)=>p.Unsafe(p.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),"Ident"),pr=Ft("g","GeometryId"),ke=Ft("f","FloorId"),y0=[pr,ke];l();l();l();var b0=class b0{constructor(t){f(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(b0,"OptionIterator");var Il=b0,v0=class v0{constructor(t){f(this,"_tag","Some");f(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return zb(t(this.value))}mapAsync(t){return t(this.value).then(r=>zb(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:Qi()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?Qi():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return se(this.value)}okOrElse(t){return se(this.value)}iter(){return new Il(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Na([this.value,t.value]):Qi()}zipWith(t,r){return t.isSome()?Na(r(this.value,t.value)):Qi()}get[Symbol.toStringTag](){return"Some"}};o(v0,"Some");var Dl=v0,x0=class x0{constructor(){f(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return ce(t)}okOrElse(t){return ce(t())}iter(){return new Il(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(x0,"None");var Sl=x0,Na=o(e=>new Dl(e),"some"),Qi=o(()=>new Sl,"none"),zb=o(e=>e instanceof Dl||e instanceof Sl?e:e==null?Qi():Na(e),"option");var I0=class I0{constructor(t){f(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(I0,"ResultIterator");var wl=I0,D0=class D0{constructor(t){f(this,"_tag","Ok");f(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Na(this.value)}err(){return Qi()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return se(t(this.value))}async mapAsync(t){return t(this.value).then(se)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new wl(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(D0,"Ok");var E0=D0,Al=class Al{constructor(t){f(this,"_tag","Err");f(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return Qi()}err(){return Na(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new wl(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new Al(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(Al,"Err");var C0=Al,se=o(e=>new E0(e),"ok"),ce=o(e=>new C0(e),"err");l();var Tr;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(Tr||(Tr={}));l();l();l();l();var w0=class w0 extends fe{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(w0,"TypeSystemDuplicateTypeKind");var S0=w0,A0=class A0 extends fe{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(A0,"TypeSystemDuplicateFormat");var cs=A0,Fl;(function(e){function t(n,i){if($t.Has(n))throw new S0(n);return $t.Set(n,i),(a={})=>vl(xe(R({},a),{[L]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(Cr.Has(n))throw new cs(n);return Cr.Set(n,i),n}o(r,"Format"),e.Format=r})(Fl||(Fl={}));l();function dS(e){switch(e.errorType){case N.ArrayContains:return"Expected array to contain at least one matching value";case N.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case N.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case N.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case N.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case N.ArrayUniqueItems:return"Expected array elements to be unique";case N.Array:return"Expected array";case N.AsyncIterator:return"Expected AsyncIterator";case N.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case N.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case N.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case N.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case N.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case N.BigInt:return"Expected bigint";case N.Boolean:return"Expected boolean";case N.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case N.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case N.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case N.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case N.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case N.Date:return"Expected Date";case N.Function:return"Expected function";case N.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case N.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case N.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case N.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case N.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case N.Integer:return"Expected integer";case N.IntersectUnevaluatedProperties:return"Unexpected property";case N.Intersect:return"Expected all values to match";case N.Iterator:return"Expected Iterator";case N.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case N.Never:return"Never";case N.Not:return"Value should not match";case N.Null:return"Expected null";case N.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case N.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case N.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case N.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case N.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case N.Number:return"Expected number";case N.Object:return"Expected object";case N.ObjectAdditionalProperties:return"Unexpected property";case N.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case N.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case N.ObjectRequiredProperty:return"Expected required property";case N.Promise:return"Expected Promise";case N.RegExp:return"Expected string to match regular expression";case N.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case N.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case N.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case N.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case N.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case N.String:return"Expected string";case N.Symbol:return"Expected symbol";case N.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case N.Tuple:return"Expected tuple";case N.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case N.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case N.Uint8Array:return"Expected Uint8Array";case N.Undefined:return"Expected undefined";case N.Union:return"Expected union value";case N.Void:return"Expected void";case N.Kind:return"Expected kind '".concat(e.schema[L],"'");default:return"Unknown error type"}}o(dS,"DefaultErrorFunction");var pS=dS;function $b(){return pS}o($b,"GetErrorFunction");l();var O0=class O0 extends fe{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(O0,"TypeDereferenceError");var F0=O0;function fS(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new F0(e);return $e(r,t)}o(fS,"Resolve");function nn(e,t){return!Le(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(nn,"Pushref");function $e(e,t){return e[L]==="This"||e[L]==="Ref"?fS(e,t):e}o($e,"Deref");l();var P0=class P0 extends fe{constructor(t){super("Unable to hash value"),this.value=t}};o(P0,"ValueHashError");var B0=P0,Ur;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Ur||(Ur={}));var ja=BigInt("14695981039346656037"),[hS,gS]=[BigInt("1099511628211"),BigInt("18446744073709551616")],yS=Array.from({length:256}).map((e,t)=>BigInt(t)),Gb=new Float64Array(1),Zb=new DataView(Gb.buffer),Vb=new Uint8Array(Gb.buffer);function*bS(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(bS,"NumberToBytes");function vS(e){fr(Ur.Array);for(let t of e)Ua(t)}o(vS,"ArrayType");function xS(e){fr(Ur.Boolean),fr(e?1:0)}o(xS,"BooleanType");function ES(e){fr(Ur.BigInt),Zb.setBigInt64(0,e);for(let t of Vb)fr(t)}o(ES,"BigIntType");function CS(e){fr(Ur.Date),Ua(e.getTime())}o(CS,"DateType");function IS(e){fr(Ur.Null)}o(IS,"NullType");function DS(e){fr(Ur.Number),Zb.setFloat64(0,e);for(let t of Vb)fr(t)}o(DS,"NumberType");function SS(e){fr(Ur.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Ua(t),Ua(e[t])}o(SS,"ObjectType");function wS(e){fr(Ur.String);for(let t=0;t<e.length;t++)for(let r of bS(e.charCodeAt(t)))fr(r)}o(wS,"StringType");function AS(e){fr(Ur.Symbol),Ua(e.description)}o(AS,"SymbolType");function FS(e){fr(Ur.Uint8Array);for(let t=0;t<e.length;t++)fr(e[t])}o(FS,"Uint8ArrayType");function OS(e){return fr(Ur.Undefined)}o(OS,"UndefinedType");function Ua(e){if(ve(e))return vS(e);if(Un(e))return xS(e);if(er(e))return ES(e);if(xr(e))return CS(e);if(li(e))return IS(e);if(pe(e))return DS(e);if(Ee(e))return SS(e);if(Le(e))return wS(e);if(mi(e))return AS(e);if(ba(e))return FS(e);if(Et(e))return OS(e);throw new B0(e)}o(Ua,"Visit");function fr(e){ja=ja^yS[e],ja=ja*hS%gS}o(fr,"FNV1A64");function eo(e){return ja=BigInt("14695981039346656037"),Ua(e),ja}o(eo,"Hash");l();var T0=class T0 extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(T0,"ValueCheckUnknownTypeError");var M0=T0;function BS(e){return e[L]==="Any"||e[L]==="Unknown"}o(BS,"IsAnyOrUnknown");function Be(e){return e!==void 0}o(Be,"IsDefined");function PS(e,t,r){return!0}o(PS,"FromAny");function MS(e,t,r){if(!ve(r)||Be(e.minItems)&&!(r.length>=e.minItems)||Be(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(a=>nr(e.items,t,a))||e.uniqueItems===!0&&!function(){let a=new Set;for(let u of r){let c=eo(u);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(Be(e.contains)||pe(e.minContains)||pe(e.maxContains)))return!0;let n=Be(e.contains)?e.contains:rt(),i=r.reduce((a,u)=>nr(n,t,u)?a+1:a,0);return!(i===0||pe(e.minContains)&&i<e.minContains||pe(e.maxContains)&&i>e.maxContains)}o(MS,"FromArray");function TS(e,t,r){return Kc(r)}o(TS,"FromAsyncIterator");function kS(e,t,r){return!(!er(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(kS,"FromBigInt");function _S(e,t,r){return Un(r)}o(_S,"FromBoolean");function LS(e,t,r){return nr(e.returns,t,r.prototype)}o(LS,"FromConstructor");function RS(e,t,r){return!(!xr(r)||Be(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||Be(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||Be(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||Be(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||Be(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(RS,"FromDate");function NS(e,t,r){return Wi(r)}o(NS,"FromFunction");function jS(e,t,r){return!(!Xc(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(jS,"FromInteger");function US(e,t,r){let n=e.allOf.every(i=>nr(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(bi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u));return n&&a}else if(Re(e.unevaluatedProperties)){let i=new RegExp(bi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u)||nr(e.unevaluatedProperties,t,r[u]));return n&&a}else return n}o(US,"FromIntersect");function zS(e,t,r){return qc(r)}o(zS,"FromIterator");function $S(e,t,r){return r===e.const}o($S,"FromLiteral");function GS(e,t,r){return!1}o(GS,"FromNever");function ZS(e,t,r){return!nr(e.not,t,r)}o(ZS,"FromNot");function VS(e,t,r){return li(r)}o(VS,"FromNull");function WS(e,t,r){return!(!Ye.IsNumberLike(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(WS,"FromNumber");function HS(e,t,r){if(!Ye.IsObjectLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let a=e.properties[i];if(e.required&&e.required.includes(i)){if(!nr(a,t,r[i])||(xi(a)||BS(a))&&!(i in r))return!1}else if(Ye.IsExactOptionalProperty(r,i)&&!nr(a,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(a=>n.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(a=>n.includes(a)||nr(e.additionalProperties,t,r[a])):!0}o(HS,"FromObject");function KS(e,t,r){return Jc(r)}o(KS,"FromPromise");function qS(e,t,r){if(!Ye.IsRecordLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],a=new RegExp(n),u=Object.entries(r).every(([d,h])=>a.test(d)?nr(i,t,h):!0),c=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,h])=>a.test(d)?!0:nr(e.additionalProperties,t,h)):!0,m=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>a.test(d)):!0;return u&&c&&m}o(qS,"FromRecord");function JS(e,t,r){return nr($e(e,t),t,r)}o(JS,"FromRef");function XS(e,t,r){let n=new RegExp(e.source,e.flags);return Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(XS,"FromRegExp");function YS(e,t,r){return!Le(r)||Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)||Be(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:Be(e.format)?Cr.Has(e.format)?Cr.Get(e.format)(r):!1:!0}o(YS,"FromString");function QS(e,t,r){return mi(r)}o(QS,"FromSymbol");function ew(e,t,r){return Le(r)&&new RegExp(e.pattern).test(r)}o(ew,"FromTemplateLiteral");function tw(e,t,r){return nr($e(e,t),t,r)}o(tw,"FromThis");function rw(e,t,r){if(!ve(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!nr(e.items[n],t,r[n]))return!1;return!0}o(rw,"FromTuple");function nw(e,t,r){return Et(r)}o(nw,"FromUndefined");function iw(e,t,r){return e.anyOf.some(n=>nr(n,t,r))}o(iw,"FromUnion");function ow(e,t,r){return!(!ba(r)||Be(e.maxByteLength)&&!(r.length<=e.maxByteLength)||Be(e.minByteLength)&&!(r.length>=e.minByteLength))}o(ow,"FromUint8Array");function aw(e,t,r){return!0}o(aw,"FromUnknown");function uw(e,t,r){return Ye.IsVoidLike(r)}o(uw,"FromVoid");function sw(e,t,r){return $t.Has(e[L])?$t.Get(e[L])(e,r):!1}o(sw,"FromKind");function nr(e,t,r){let n=Be(e.$id)?[...t,e]:t,i=e;switch(i[L]){case"Any":return PS(i,n,r);case"Array":return MS(i,n,r);case"AsyncIterator":return TS(i,n,r);case"BigInt":return kS(i,n,r);case"Boolean":return _S(i,n,r);case"Constructor":return LS(i,n,r);case"Date":return RS(i,n,r);case"Function":return NS(i,n,r);case"Integer":return jS(i,n,r);case"Intersect":return US(i,n,r);case"Iterator":return zS(i,n,r);case"Literal":return $S(i,n,r);case"Never":return GS(i,n,r);case"Not":return ZS(i,n,r);case"Null":return VS(i,n,r);case"Number":return WS(i,n,r);case"Object":return HS(i,n,r);case"Promise":return KS(i,n,r);case"Record":return qS(i,n,r);case"Ref":return JS(i,n,r);case"RegExp":return XS(i,n,r);case"String":return YS(i,n,r);case"Symbol":return QS(i,n,r);case"TemplateLiteral":return ew(i,n,r);case"This":return tw(i,n,r);case"Tuple":return rw(i,n,r);case"Undefined":return nw(i,n,r);case"Union":return iw(i,n,r);case"Uint8Array":return ow(i,n,r);case"Unknown":return aw(i,n,r);case"Void":return uw(i,n,r);default:if(!$t.Has(i[L]))throw new M0(i);return sw(i,n,r)}}o(nr,"Visit");function we(...e){return e.length===3?nr(e[0],e[1],e[2]):nr(e[0],[],e[1])}o(we,"Check");var N;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(N||(N={}));var _0=class _0 extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(_0,"ValueErrorsUnknownTypeError");var k0=_0;function Ei(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Ei,"EscapeKey");function Pe(e){return e!==void 0}o(Pe,"IsDefined");var L0=class L0{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(L0,"ValueErrorIterator");var on=L0;function ne(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:$b()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(ne,"Create");function*cw(e,t,r,n){}o(cw,"FromAny");function*lw(e,t,r,n){if(!ve(n))return yield ne(N.Array,e,r,n);Pe(e.minItems)&&!(n.length>=e.minItems)&&(yield ne(N.ArrayMinItems,e,r,n)),Pe(e.maxItems)&&!(n.length<=e.maxItems)&&(yield ne(N.ArrayMaxItems,e,r,n));for(let u=0;u<n.length;u++)yield*K(ir(e.items,t,"".concat(r,"/").concat(u),n[u]));if(e.uniqueItems===!0&&!function(){let u=new Set;for(let c of n){let m=eo(c);if(u.has(m))return!1;u.add(m)}return!0}()&&(yield ne(N.ArrayUniqueItems,e,r,n)),!(Pe(e.contains)||Pe(e.minContains)||Pe(e.maxContains)))return;let i=Pe(e.contains)?e.contains:rt(),a=n.reduce((u,c,m)=>ir(i,t,"".concat(r).concat(m),c).next().done===!0?u+1:u,0);a===0&&(yield ne(N.ArrayContains,e,r,n)),pe(e.minContains)&&a<e.minContains&&(yield ne(N.ArrayMinContains,e,r,n)),pe(e.maxContains)&&a>e.maxContains&&(yield ne(N.ArrayMaxContains,e,r,n))}o(lw,"FromArray");function*mw(e,t,r,n){Kc(n)||(yield ne(N.AsyncIterator,e,r,n))}o(mw,"FromAsyncIterator");function*dw(e,t,r,n){if(!er(n))return yield ne(N.BigInt,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.BigIntExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.BigIntExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.BigIntMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.BigIntMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield ne(N.BigIntMultipleOf,e,r,n))}o(dw,"FromBigInt");function*pw(e,t,r,n){Un(n)||(yield ne(N.Boolean,e,r,n))}o(pw,"FromBoolean");function*fw(e,t,r,n){yield*K(ir(e.returns,t,r,n.prototype))}o(fw,"FromConstructor");function*hw(e,t,r,n){if(!xr(n))return yield ne(N.Date,e,r,n);Pe(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield ne(N.DateExclusiveMaximumTimestamp,e,r,n)),Pe(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield ne(N.DateExclusiveMinimumTimestamp,e,r,n)),Pe(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield ne(N.DateMaximumTimestamp,e,r,n)),Pe(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield ne(N.DateMinimumTimestamp,e,r,n)),Pe(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield ne(N.DateMultipleOfTimestamp,e,r,n))}o(hw,"FromDate");function*gw(e,t,r,n){Wi(n)||(yield ne(N.Function,e,r,n))}o(gw,"FromFunction");function*yw(e,t,r,n){if(!Xc(n))return yield ne(N.Integer,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.IntegerExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.IntegerExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.IntegerMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.IntegerMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==0&&(yield ne(N.IntegerMultipleOf,e,r,n))}o(yw,"FromInteger");function*bw(e,t,r,n){let i=!1;for(let a of e.allOf)for(let u of ir(a,t,r,n))i=!0,yield u;if(i)return yield ne(N.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let a=new RegExp(bi(e));for(let u of Object.getOwnPropertyNames(n))a.test(u)||(yield ne(N.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(u),n))}if(typeof e.unevaluatedProperties=="object"){let a=new RegExp(bi(e));for(let u of Object.getOwnPropertyNames(n))if(!a.test(u)){let c=ir(e.unevaluatedProperties,t,"".concat(r,"/").concat(u),n[u]).next();c.done||(yield c.value)}}}o(bw,"FromIntersect");function*vw(e,t,r,n){qc(n)||(yield ne(N.Iterator,e,r,n))}o(vw,"FromIterator");function*xw(e,t,r,n){n!==e.const&&(yield ne(N.Literal,e,r,n))}o(xw,"FromLiteral");function*Ew(e,t,r,n){yield ne(N.Never,e,r,n)}o(Ew,"FromNever");function*Cw(e,t,r,n){ir(e.not,t,r,n).next().done===!0&&(yield ne(N.Not,e,r,n))}o(Cw,"FromNot");function*Iw(e,t,r,n){li(n)||(yield ne(N.Null,e,r,n))}o(Iw,"FromNull");function*Dw(e,t,r,n){if(!Ye.IsNumberLike(n))return yield ne(N.Number,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.NumberExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.NumberExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.NumberMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.NumberMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==0&&(yield ne(N.NumberMultipleOf,e,r,n))}o(Dw,"FromNumber");function*Sw(e,t,r,n){if(!Ye.IsObjectLike(n))return yield ne(N.Object,e,r,n);Pe(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ne(N.ObjectMinProperties,e,r,n)),Pe(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ne(N.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),u=Object.getOwnPropertyNames(n);for(let c of i)u.includes(c)||(yield ne(N.ObjectRequiredProperty,e.properties[c],"".concat(r,"/").concat(Ei(c)),void 0));if(e.additionalProperties===!1)for(let c of u)a.includes(c)||(yield ne(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Ei(c)),n[c]));if(typeof e.additionalProperties=="object")for(let c of u)a.includes(c)||(yield*K(ir(e.additionalProperties,t,"".concat(r,"/").concat(Ei(c)),n[c])));for(let c of a){let m=e.properties[c];e.required&&e.required.includes(c)?(yield*K(ir(m,t,"".concat(r,"/").concat(Ei(c)),n[c])),xi(e)&&!(c in n)&&(yield ne(N.ObjectRequiredProperty,m,"".concat(r,"/").concat(Ei(c)),void 0))):Ye.IsExactOptionalProperty(n,c)&&(yield*K(ir(m,t,"".concat(r,"/").concat(Ei(c)),n[c])))}}o(Sw,"FromObject");function*ww(e,t,r,n){Jc(n)||(yield ne(N.Promise,e,r,n))}o(ww,"FromPromise");function*Aw(e,t,r,n){if(!Ye.IsRecordLike(n))return yield ne(N.Object,e,r,n);Pe(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ne(N.ObjectMinProperties,e,r,n)),Pe(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ne(N.ObjectMaxProperties,e,r,n));let[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let[c,m]of Object.entries(n))u.test(c)&&(yield*K(ir(a,t,"".concat(r,"/").concat(Ei(c)),m)));if(typeof e.additionalProperties=="object")for(let[c,m]of Object.entries(n))u.test(c)||(yield*K(ir(e.additionalProperties,t,"".concat(r,"/").concat(Ei(c)),m)));if(e.additionalProperties===!1){for(let[c,m]of Object.entries(n))if(!u.test(c))return yield ne(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Ei(c)),m)}}o(Aw,"FromRecord");function*Fw(e,t,r,n){yield*K(ir($e(e,t),t,r,n))}o(Fw,"FromRef");function*Ow(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);if(Pe(e.minLength)&&!(n.length>=e.minLength)&&(yield ne(N.StringMinLength,e,r,n)),Pe(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ne(N.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield ne(N.RegExp,e,r,n)}o(Ow,"FromRegExp");function*Bw(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);Pe(e.minLength)&&!(n.length>=e.minLength)&&(yield ne(N.StringMinLength,e,r,n)),Pe(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ne(N.StringMaxLength,e,r,n)),Le(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield ne(N.StringPattern,e,r,n))),Le(e.format)&&(Cr.Has(e.format)?Cr.Get(e.format)(n)||(yield ne(N.StringFormat,e,r,n)):yield ne(N.StringFormatUnknown,e,r,n))}o(Bw,"FromString");function*Pw(e,t,r,n){mi(n)||(yield ne(N.Symbol,e,r,n))}o(Pw,"FromSymbol");function*Mw(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);new RegExp(e.pattern).test(n)||(yield ne(N.StringPattern,e,r,n))}o(Mw,"FromTemplateLiteral");function*Tw(e,t,r,n){yield*K(ir($e(e,t),t,r,n))}o(Tw,"FromThis");function*kw(e,t,r,n){if(!ve(n))return yield ne(N.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield ne(N.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield ne(N.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*K(ir(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(kw,"FromTuple");function*_w(e,t,r,n){Et(n)||(yield ne(N.Undefined,e,r,n))}o(_w,"FromUndefined");function*Lw(e,t,r,n){if(we(e,t,n))return;let i=e.anyOf.map(a=>new on(ir(a,t,r,n)));yield ne(N.Union,e,r,n,i)}o(Lw,"FromUnion");function*Rw(e,t,r,n){if(!ba(n))return yield ne(N.Uint8Array,e,r,n);Pe(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield ne(N.Uint8ArrayMaxByteLength,e,r,n)),Pe(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield ne(N.Uint8ArrayMinByteLength,e,r,n))}o(Rw,"FromUint8Array");function*Nw(e,t,r,n){}o(Nw,"FromUnknown");function*jw(e,t,r,n){Ye.IsVoidLike(n)||(yield ne(N.Void,e,r,n))}o(jw,"FromVoid");function*Uw(e,t,r,n){$t.Get(e[L])(e,n)||(yield ne(N.Kind,e,r,n))}o(Uw,"FromKind");function*ir(e,t,r,n){let i=Pe(e.$id)?[...t,e]:t,a=e;switch(a[L]){case"Any":return yield*K(cw(a,i,r,n));case"Array":return yield*K(lw(a,i,r,n));case"AsyncIterator":return yield*K(mw(a,i,r,n));case"BigInt":return yield*K(dw(a,i,r,n));case"Boolean":return yield*K(pw(a,i,r,n));case"Constructor":return yield*K(fw(a,i,r,n));case"Date":return yield*K(hw(a,i,r,n));case"Function":return yield*K(gw(a,i,r,n));case"Integer":return yield*K(yw(a,i,r,n));case"Intersect":return yield*K(bw(a,i,r,n));case"Iterator":return yield*K(vw(a,i,r,n));case"Literal":return yield*K(xw(a,i,r,n));case"Never":return yield*K(Ew(a,i,r,n));case"Not":return yield*K(Cw(a,i,r,n));case"Null":return yield*K(Iw(a,i,r,n));case"Number":return yield*K(Dw(a,i,r,n));case"Object":return yield*K(Sw(a,i,r,n));case"Promise":return yield*K(ww(a,i,r,n));case"Record":return yield*K(Aw(a,i,r,n));case"Ref":return yield*K(Fw(a,i,r,n));case"RegExp":return yield*K(Ow(a,i,r,n));case"String":return yield*K(Bw(a,i,r,n));case"Symbol":return yield*K(Pw(a,i,r,n));case"TemplateLiteral":return yield*K(Mw(a,i,r,n));case"This":return yield*K(Tw(a,i,r,n));case"Tuple":return yield*K(kw(a,i,r,n));case"Undefined":return yield*K(_w(a,i,r,n));case"Union":return yield*K(Lw(a,i,r,n));case"Uint8Array":return yield*K(Rw(a,i,r,n));case"Unknown":return yield*K(Nw(a,i,r,n));case"Void":return yield*K(jw(a,i,r,n));default:if(!$t.Has(a[L]))throw new k0(e);return yield*K(Uw(a,i,r,n))}}o(ir,"Visit");function Vn(...e){let t=e.length===3?ir(e[0],e[1],"",e[2]):ir(e[0],[],"",e[1]);return new on(t)}o(Vn,"Errors");l();l();var zw=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Hb=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},R0,Ol,Kb,j0=class j0 extends fe{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),R0.add(this),Ol.set(this,void 0),zw(this,Ol,t,"f"),this.error=r}Errors(){return new on(Hb(this,R0,"m",Kb).call(this))}};o(j0,"AssertError");var N0=j0;Ol=new WeakMap,R0=new WeakSet,Kb=o(function*(){this.error&&(yield this.error),yield*K(Hb(this,Ol,"f"))},"_AssertError_Iterator");function Wb(e,t,r){if(!we(e,t,r))throw new N0(Vn(e,t,r))}o(Wb,"AssertValue");function Bl(...e){return e.length===3?Wb(e[0],e[1],e[2]):Wb(e[0],[],e[1])}o(Bl,"Assert");l();l();l();function $w(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ge(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ge(e[r]);return t}o($w,"FromObject");function Gw(e){return e.map(t=>Ge(t))}o(Gw,"FromArray");function Zw(e){return e.slice()}o(Zw,"FromTypedArray");function Vw(e){return new Map(Ge([...e.entries()]))}o(Vw,"FromMap");function Ww(e){return new Set(Ge([...e.entries()]))}o(Ww,"FromSet");function Hw(e){return new Date(e.toISOString())}o(Hw,"FromDate");function Ge(e){if(ve(e))return Gw(e);if(xr(e))return Hw(e);if(Jr(e))return Zw(e);if(P4(e))return Vw(e);if(M4(e))return Ww(e);if(Ee(e))return $w(e);if(tr(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Ge,"Clone");var U0=class U0 extends fe{constructor(t,r){super(r),this.schema=t}};o(U0,"ValueCreateError");var zr=U0;function Ze(e){return Wi(e)?e():Ge(e)}o(Ze,"FromDefault");function Kw(e,t){return ge(e,"default")?Ze(e.default):{}}o(Kw,"FromAny");function qw(e,t){if(e.uniqueItems===!0&&!ge(e,"default"))throw new zr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ge(e,"default"))throw new zr(e,"Array with the contains constraint requires a default value");return"default"in e?Ze(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>$r(e.items,t)):[]}o(qw,"FromArray");function Jw(e,t){return ge(e,"default")?Ze(e.default):function(){return Yg(this,null,function*(){})}()}o(Jw,"FromAsyncIterator");function Xw(e,t){return ge(e,"default")?Ze(e.default):BigInt(0)}o(Xw,"FromBigInt");function Yw(e,t){return ge(e,"default")?Ze(e.default):!1}o(Yw,"FromBoolean");function Qw(e,t){if(ge(e,"default"))return Ze(e.default);{let r=$r(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let a=this;a[n]=i}}}:class{}}}o(Qw,"FromConstructor");function eA(e,t){return ge(e,"default")?Ze(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(eA,"FromDate");function tA(e,t){return ge(e,"default")?Ze(e.default):()=>$r(e.returns,t)}o(tA,"FromFunction");function rA(e,t){return ge(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(rA,"FromInteger");function nA(e,t){if(ge(e,"default"))return Ze(e.default);{let r=e.allOf.reduce((n,i)=>{let a=$r(i,t);return typeof a=="object"?R(R({},n),a):a},{});if(!we(e,t,r))throw new zr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(nA,"FromIntersect");function iA(e,t){return ge(e,"default")?Ze(e.default):function*(){}()}o(iA,"FromIterator");function oA(e,t){return ge(e,"default")?Ze(e.default):e.const}o(oA,"FromLiteral");function aA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"Never types cannot be created. Consider using a default value.")}o(aA,"FromNever");function uA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"Not types must have a default value")}o(uA,"FromNot");function sA(e,t){return ge(e,"default")?Ze(e.default):null}o(sA,"FromNull");function cA(e,t){return ge(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(cA,"FromNumber");function lA(e,t){if(ge(e,"default"))return Ze(e.default);{let r=new Set(e.required),n={};for(let[i,a]of Object.entries(e.properties))r.has(i)&&(n[i]=$r(a,t));return n}}o(lA,"FromObject");function mA(e,t){return ge(e,"default")?Ze(e.default):Promise.resolve($r(e.item,t))}o(mA,"FromPromise");function dA(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(ge(e,"default"))return Ze(e.default);if(r===gi||r===hi)return{};{let i=r.slice(1,r.length-1).split("|"),a={};for(let u of i)a[u]=$r(n,t);return a}}o(dA,"FromRecord");function pA(e,t){return ge(e,"default")?Ze(e.default):$r($e(e,t),t)}o(pA,"FromRef");function fA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"RegExp types cannot be created. Consider using a default value.")}o(fA,"FromRegExp");function hA(e,t){if(e.pattern!==void 0){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"String types with formats must specify a default value")}else return ge(e,"default")?Ze(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(hA,"FromString");function gA(e,t){return ge(e,"default")?Ze(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(gA,"FromSymbol");function yA(e,t){if(ge(e,"default"))return Ze(e.default);if(!rl(e))throw new zr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Sa(e)[0]}o(yA,"FromTemplateLiteral");function bA(e,t){if(qb++>wA)throw new zr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ge(e,"default")?Ze(e.default):$r($e(e,t),t)}o(bA,"FromThis");function vA(e,t){return ge(e,"default")?Ze(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>$r(e.items[n],t))}o(vA,"FromTuple");function xA(e,t){if(ge(e,"default"))return Ze(e.default)}o(xA,"FromUndefined");function EA(e,t){if(ge(e,"default"))return Ze(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return $r(e.anyOf[0],t)}o(EA,"FromUnion");function CA(e,t){return ge(e,"default")?Ze(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(CA,"FromUint8Array");function IA(e,t){return ge(e,"default")?Ze(e.default):{}}o(IA,"FromUnknown");function DA(e,t){if(ge(e,"default"))return Ze(e.default)}o(DA,"FromVoid");function SA(e,t){if(ge(e,"default"))return Ze(e.default);throw new Error("User defined types must specify a default value")}o(SA,"FromKind");function $r(e,t){let r=nn(e,t),n=e;switch(n[L]){case"Any":return Kw(n,r);case"Array":return qw(n,r);case"AsyncIterator":return Jw(n,r);case"BigInt":return Xw(n,r);case"Boolean":return Yw(n,r);case"Constructor":return Qw(n,r);case"Date":return eA(n,r);case"Function":return tA(n,r);case"Integer":return rA(n,r);case"Intersect":return nA(n,r);case"Iterator":return iA(n,r);case"Literal":return oA(n,r);case"Never":return aA(n,r);case"Not":return uA(n,r);case"Null":return sA(n,r);case"Number":return cA(n,r);case"Object":return lA(n,r);case"Promise":return mA(n,r);case"Record":return dA(n,r);case"Ref":return pA(n,r);case"RegExp":return fA(n,r);case"String":return hA(n,r);case"Symbol":return gA(n,r);case"TemplateLiteral":return yA(n,r);case"This":return bA(n,r);case"Tuple":return vA(n,r);case"Undefined":return xA(n,r);case"Union":return EA(n,r);case"Uint8Array":return CA(n,r);case"Unknown":return IA(n,r);case"Void":return DA(n,r);default:if(!$t.Has(n[L]))throw new zr(n,"Unknown type");return SA(n,r)}}o($r,"Visit");var wA=512,qb=0;function an(...e){return qb=0,e.length===2?$r(e[0],e[1]):$r(e[0],[])}o(an,"Create");var $0=class $0 extends fe{constructor(t,r){super(r),this.schema=t}};o($0,"ValueCastError");var Pl=$0;function AA(e,t,r){if(e[L]==="Object"&&typeof r=="object"&&!li(r)){let n=e,i=Object.getOwnPropertyNames(r),a=Object.entries(n.properties),[u,c]=[1/a.length,a.length];return a.reduce((m,[d,h])=>{let g=h[L]==="Literal"&&h.const===r[d]?c:0,v=we(h,t,r[d])?u:0,b=i.includes(d)?u:0;return m+(g+v+b)},0)}else return we(e,t,r)?1:0}o(AA,"ScoreUnion");function FA(e,t,r){let n=e.anyOf.map(u=>$e(u,t)),[i,a]=[n[0],0];for(let u of n){let c=AA(u,t,r);c>a&&(i=u,a=c)}return i}o(FA,"SelectUnion");function OA(e,t,r){if("default"in e)return typeof r=="function"?e.default:Ge(e.default);{let n=FA(e,t,r);return z0(n,t,r)}}o(OA,"CastUnion");function BA(e,t,r){return we(e,t,r)?Ge(r):an(e,t)}o(BA,"DefaultClone");function PA(e,t,r){return we(e,t,r)?r:an(e,t)}o(PA,"Default");function MA(e,t,r){if(we(e,t,r))return Ge(r);let n=ve(r)?Ge(r):an(e,t),i=pe(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,u=(pe(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(m=>Wn(e.items,t,m));if(e.uniqueItems!==!0)return u;let c=[...new Set(u)];if(!we(e,t,c))throw new Pl(e,"Array cast produced invalid data due to uniqueItems constraint");return c}o(MA,"FromArray");function TA(e,t,r){if(we(e,t,r))return an(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[a,u]of Object.entries(e.returns.properties))!n.has(a)&&r.prototype[a]===void 0||(i.prototype[a]=Wn(u,t,r.prototype[a]));return i}o(TA,"FromConstructor");function kA(e,t,r){let n=an(e,t),i=Ee(n)&&Ee(r)?R(R({},n),r):r;return we(e,t,i)?i:an(e,t)}o(kA,"FromIntersect");function _A(e,t,r){throw new Pl(e,"Never types cannot be cast")}o(_A,"FromNever");function LA(e,t,r){if(we(e,t,r))return r;if(r===null||typeof r!="object")return an(e,t);let n=new Set(e.required||[]),i={};for(let[a,u]of Object.entries(e.properties))!n.has(a)&&r[a]===void 0||(i[a]=Wn(u,t,r[a]));if(typeof e.additionalProperties=="object"){let a=Object.getOwnPropertyNames(e.properties);for(let u of Object.getOwnPropertyNames(r))a.includes(u)||(i[u]=Wn(e.additionalProperties,t,r[u]))}return i}o(LA,"FromObject");function RA(e,t,r){if(we(e,t,r))return Ge(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return an(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],a={};for(let[u,c]of Object.entries(r))a[u]=Wn(i,t,c);return a}o(RA,"FromRecord");function NA(e,t,r){return Wn($e(e,t),t,r)}o(NA,"FromRef");function jA(e,t,r){return Wn($e(e,t),t,r)}o(jA,"FromThis");function UA(e,t,r){return we(e,t,r)?Ge(r):ve(r)?e.items===void 0?[]:e.items.map((n,i)=>Wn(n,t,r[i])):an(e,t)}o(UA,"FromTuple");function zA(e,t,r){return we(e,t,r)?Ge(r):OA(e,t,r)}o(zA,"FromUnion");function Wn(e,t,r){let n=Le(e.$id)?[...t,e]:t,i=e;switch(e[L]){case"Array":return MA(i,n,r);case"Constructor":return TA(i,n,r);case"Intersect":return kA(i,n,r);case"Never":return _A(i,n,r);case"Object":return LA(i,n,r);case"Record":return RA(i,n,r);case"Ref":return NA(i,n,r);case"This":return jA(i,n,r);case"Tuple":return UA(i,n,r);case"Union":return zA(i,n,r);case"Date":case"Symbol":case"Uint8Array":return BA(e,t,r);default:return PA(i,n,r)}}o(Wn,"Visit");function z0(...e){return e.length===3?Wn(e[0],e[1],e[2]):Wn(e[0],[],e[1])}o(z0,"Cast");l();function $A(e){return Ki(e)&&e[L]!=="Unsafe"}o($A,"IsCheckable");function GA(e,t,r){return ve(r)?r.map(n=>Gr(e.items,t,n)):r}o(GA,"FromArray");function ZA(e,t,r){let n=e.unevaluatedProperties,a=e.allOf.map(c=>Gr(c,t,Ge(r))).reduce((c,m)=>Ee(m)?R(R({},c),m):m,{});if(!Ee(r)||!Ee(a)||!Ki(n))return a;let u=Kt(e);for(let c of Object.getOwnPropertyNames(r))u.includes(c)||we(n,t,r[c])&&(a[c]=Gr(n,t,r[c]));return a}o(ZA,"FromIntersect");function VA(e,t,r){if(!Ee(r)||ve(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(ge(e.properties,i)){r[i]=Gr(e.properties[i],t,r[i]);continue}if(Ki(n)&&we(n,t,r[i])){r[i]=Gr(n,t,r[i]);continue}delete r[i]}return r}o(VA,"FromObject");function WA(e,t,r){if(!Ee(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of i){if(c.test(m)){r[m]=Gr(u,t,r[m]);continue}if(Ki(n)&&we(n,t,r[m])){r[m]=Gr(n,t,r[m]);continue}delete r[m]}return r}o(WA,"FromRecord");function HA(e,t,r){return Gr($e(e,t),t,r)}o(HA,"FromRef");function KA(e,t,r){return Gr($e(e,t),t,r)}o(KA,"FromThis");function qA(e,t,r){if(!ve(r))return r;if(Et(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Gr(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(qA,"FromTuple");function JA(e,t,r){for(let n of e.anyOf)if($A(n)&&we(n,t,r))return Gr(n,t,r);return r}o(JA,"FromUnion");function Gr(e,t,r){let n=Le(e.$id)?[...t,e]:t,i=e;switch(i[L]){case"Array":return GA(i,n,r);case"Intersect":return ZA(i,n,r);case"Object":return VA(i,n,r);case"Record":return WA(i,n,r);case"Ref":return HA(i,n,r);case"This":return KA(i,n,r);case"Tuple":return qA(i,n,r);case"Union":return JA(i,n,r);default:return r}}o(Gr,"Visit");function Ml(...e){return e.length===3?Gr(e[0],e[1],e[2]):Gr(e[0],[],e[1])}o(Ml,"Clean");l();function Tl(e){return Le(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(Tl,"IsStringNumeric");function XA(e){return er(e)||Un(e)||pe(e)}o(XA,"IsValueToString");function ls(e){return e===!0||pe(e)&&e===1||er(e)&&e===BigInt("1")||Le(e)&&(e.toLowerCase()==="true"||e==="1")}o(ls,"IsValueTrue");function ms(e){return e===!1||pe(e)&&(e===0||Object.is(e,-0))||er(e)&&e===BigInt("0")||Le(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(ms,"IsValueFalse");function YA(e){return Le(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(YA,"IsTimeStringWithTimeZone");function QA(e){return Le(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(QA,"IsTimeStringWithoutTimeZone");function e5(e){return Le(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(e5,"IsDateTimeStringWithTimeZone");function t5(e){return Le(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(t5,"IsDateTimeStringWithoutTimeZone");function r5(e){return Le(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(r5,"IsDateString");function n5(e,t){let r=Xb(e);return r===t?r:e}o(n5,"TryConvertLiteralString");function i5(e,t){let r=Yb(e);return r===t?r:e}o(i5,"TryConvertLiteralNumber");function o5(e,t){let r=Jb(e);return r===t?r:e}o(o5,"TryConvertLiteralBoolean");function a5(e,t){return Le(e.const)?n5(t,e.const):pe(e.const)?i5(t,e.const):Un(e.const)?o5(t,e.const):t}o(a5,"TryConvertLiteral");function Jb(e){return ls(e)?!0:ms(e)?!1:e}o(Jb,"TryConvertBoolean");function u5(e){let t=o(r=>r.split(".")[0],"truncateInteger");return Tl(e)?BigInt(t(e)):pe(e)?BigInt(Math.trunc(e)):ms(e)?BigInt(0):ls(e)?BigInt(1):e}o(u5,"TryConvertBigInt");function Xb(e){return XA(e)?e.toString():mi(e)&&e.description!==void 0?e.description.toString():e}o(Xb,"TryConvertString");function Yb(e){return Tl(e)?parseFloat(e):ls(e)?1:ms(e)?0:e}o(Yb,"TryConvertNumber");function s5(e){return Tl(e)?parseInt(e):pe(e)?e|0:ls(e)?1:ms(e)?0:e}o(s5,"TryConvertInteger");function c5(e){return Le(e)&&e.toLowerCase()==="null"?null:e}o(c5,"TryConvertNull");function l5(e){return Le(e)&&e==="undefined"?void 0:e}o(l5,"TryConvertUndefined");function m5(e){return xr(e)?e:pe(e)?new Date(e):ls(e)?new Date(1):ms(e)?new Date(0):Tl(e)?new Date(parseInt(e)):QA(e)?new Date("1970-01-01T".concat(e,".000Z")):YA(e)?new Date("1970-01-01T".concat(e)):t5(e)?new Date("".concat(e,".000Z")):e5(e)?new Date(e):r5(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(m5,"TryConvertDate");function d5(e,t,r){return(ve(r)?r:[r]).map(i=>Hn(e.items,t,i))}o(d5,"FromArray");function p5(e,t,r){return u5(r)}o(p5,"FromBigInt");function f5(e,t,r){return Jb(r)}o(f5,"FromBoolean");function h5(e,t,r){return m5(r)}o(h5,"FromDate");function g5(e,t,r){return s5(r)}o(g5,"FromInteger");function y5(e,t,r){return e.allOf.reduce((n,i)=>Hn(i,t,n),r)}o(y5,"FromIntersect");function b5(e,t,r){return a5(e,r)}o(b5,"FromLiteral");function v5(e,t,r){return c5(r)}o(v5,"FromNull");function x5(e,t,r){return Yb(r)}o(x5,"FromNumber");function E5(e,t,r){if(!Ee(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))ge(r,n)&&(r[n]=Hn(e.properties[n],t,r[n]));return r}o(E5,"FromObject");function C5(e,t,r){if(!Ee(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=e.patternProperties[i];for(let[u,c]of Object.entries(r))r[u]=Hn(a,t,c);return r}o(C5,"FromRecord");function I5(e,t,r){return Hn($e(e,t),t,r)}o(I5,"FromRef");function D5(e,t,r){return Xb(r)}o(D5,"FromString");function S5(e,t,r){return Le(r)||pe(r)?Symbol(r):r}o(S5,"FromSymbol");function w5(e,t,r){return Hn($e(e,t),t,r)}o(w5,"FromThis");function A5(e,t,r){return ve(r)&&!Et(e.items)?r.map((i,a)=>a<e.items.length?Hn(e.items[a],t,i):i):r}o(A5,"FromTuple");function F5(e,t,r){return l5(r)}o(F5,"FromUndefined");function O5(e,t,r){for(let n of e.anyOf){let i=Hn(n,t,Ge(r));if(we(n,t,i))return i}return r}o(O5,"FromUnion");function Hn(e,t,r){let n=nn(e,t),i=e;switch(e[L]){case"Array":return d5(i,n,r);case"BigInt":return p5(i,n,r);case"Boolean":return f5(i,n,r);case"Date":return h5(i,n,r);case"Integer":return g5(i,n,r);case"Intersect":return y5(i,n,r);case"Literal":return b5(i,n,r);case"Null":return v5(i,n,r);case"Number":return x5(i,n,r);case"Object":return E5(i,n,r);case"Record":return C5(i,n,r);case"Ref":return I5(i,n,r);case"String":return D5(i,n,r);case"Symbol":return S5(i,n,r);case"This":return w5(i,n,r);case"Tuple":return A5(i,n,r);case"Undefined":return F5(i,n,r);case"Union":return O5(i,n,r);default:return r}}o(Hn,"Visit");function kl(...e){return e.length===3?Hn(e[0],e[1],e[2]):Hn(e[0],[],e[1])}o(kl,"Convert");l();l();var G0=class G0 extends fe{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(G0,"TransformDecodeCheckError");var za=G0,Z0=class Z0 extends fe{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Z0,"TransformDecodeError");var _o=Z0;function Ct(e,t,r){try{return ft(e)?e[gt].Decode(r):r}catch(n){throw new _o(e,t,r,n)}}o(Ct,"Default");function B5(e,t,r,n){return ve(n)?Ct(e,r,n.map((i,a)=>Kn(e.items,t,"".concat(r,"/").concat(a),i))):Ct(e,r,n)}o(B5,"FromArray");function P5(e,t,r,n){if(!Ee(n)||tr(n))return Ct(e,r,n);let i=Xi(e),a=i.map(h=>h[0]),u=R({},n);for(let[h,g]of i)h in u&&(u[h]=Kn(g,t,"".concat(r,"/").concat(h),u[h]));if(!ft(e.unevaluatedProperties))return Ct(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.unevaluatedProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=Ct(m,"".concat(r,"/").concat(h),d[h]));return Ct(e,r,d)}o(P5,"FromIntersect");function M5(e,t,r,n){return Ct(e,r,Kn(e.not,t,r,n))}o(M5,"FromNot");function T5(e,t,r,n){if(!Ee(n))return Ct(e,r,n);let i=Kt(e),a=R({},n);for(let d of i)ge(a,d)&&(Et(a[d])&&(!xa(e.properties[d])||Ye.IsExactOptionalProperty(a,d))||(a[d]=Kn(e.properties[d],t,"".concat(r,"/").concat(d),a[d])));if(!Re(e.additionalProperties))return Ct(e,r,a);let u=Object.getOwnPropertyNames(a),c=e.additionalProperties,m=R({},a);for(let d of u)i.includes(d)||(m[d]=Ct(c,"".concat(r,"/").concat(d),m[d]));return Ct(e,r,m)}o(T5,"FromObject");function k5(e,t,r,n){if(!Ee(n))return Ct(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=R({},n);for(let h of Object.getOwnPropertyNames(n))a.test(h)&&(u[h]=Kn(e.patternProperties[i],t,"".concat(r,"/").concat(h),u[h]));if(!Re(e.additionalProperties))return Ct(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.test(h)||(d[h]=Ct(m,"".concat(r,"/").concat(h),d[h]));return Ct(e,r,d)}o(k5,"FromRecord");function _5(e,t,r,n){let i=$e(e,t);return Ct(e,r,Kn(i,t,r,n))}o(_5,"FromRef");function L5(e,t,r,n){let i=$e(e,t);return Ct(e,r,Kn(i,t,r,n))}o(L5,"FromThis");function R5(e,t,r,n){return ve(n)&&ve(e.items)?Ct(e,r,e.items.map((i,a)=>Kn(i,t,"".concat(r,"/").concat(a),n[a]))):Ct(e,r,n)}o(R5,"FromTuple");function N5(e,t,r,n){for(let i of e.anyOf){if(!we(i,t,n))continue;let a=Kn(i,t,r,n);return Ct(e,r,a)}return Ct(e,r,n)}o(N5,"FromUnion");function Kn(e,t,r,n){let i=nn(e,t),a=e;switch(e[L]){case"Array":return B5(a,i,r,n);case"Intersect":return P5(a,i,r,n);case"Not":return M5(a,i,r,n);case"Object":return T5(a,i,r,n);case"Record":return k5(a,i,r,n);case"Ref":return _5(a,i,r,n);case"Symbol":return Ct(a,r,n);case"This":return L5(a,i,r,n);case"Tuple":return R5(a,i,r,n);case"Union":return N5(a,i,r,n);default:return Ct(a,r,n)}}o(Kn,"Visit");function $a(e,t,r){return Kn(e,t,"",r)}o($a,"TransformDecode");l();var V0=class V0 extends fe{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(V0,"TransformEncodeCheckError");var Ga=V0,W0=class W0 extends fe{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(W0,"TransformEncodeError");var Lo=W0;function hr(e,t,r){try{return ft(e)?e[gt].Encode(r):r}catch(n){throw new Lo(e,t,r,n)}}o(hr,"Default");function j5(e,t,r,n){let i=hr(e,r,n);return ve(i)?i.map((a,u)=>qn(e.items,t,"".concat(r,"/").concat(u),a)):i}o(j5,"FromArray");function U5(e,t,r,n){let i=hr(e,r,n);if(!Ee(n)||tr(n))return i;let a=Xi(e),u=a.map(g=>g[0]),c=R({},i);for(let[g,v]of a)g in c&&(c[g]=qn(v,t,"".concat(r,"/").concat(g),c[g]));if(!ft(e.unevaluatedProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=hr(d,"".concat(r,"/").concat(g),h[g]));return h}o(U5,"FromIntersect");function z5(e,t,r,n){return hr(e.not,r,hr(e,r,n))}o(z5,"FromNot");function $5(e,t,r,n){let i=hr(e,r,n);if(!Ee(i))return i;let a=Kt(e),u=R({},i);for(let h of a)ge(u,h)&&(Et(u[h])&&(!xa(e.properties[h])||Ye.IsExactOptionalProperty(u,h))||(u[h]=qn(e.properties[h],t,"".concat(r,"/").concat(h),u[h])));if(!Re(e.additionalProperties))return u;let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=hr(m,"".concat(r,"/").concat(h),d[h]));return d}o($5,"FromObject");function G5(e,t,r,n){let i=hr(e,r,n);if(!Ee(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},i);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=qn(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g]));if(!Re(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.test(g)||(h[g]=hr(d,"".concat(r,"/").concat(g),h[g]));return h}o(G5,"FromRecord");function Z5(e,t,r,n){let i=$e(e,t),a=qn(i,t,r,n);return hr(e,r,a)}o(Z5,"FromRef");function V5(e,t,r,n){let i=$e(e,t),a=qn(i,t,r,n);return hr(e,r,a)}o(V5,"FromThis");function W5(e,t,r,n){let i=hr(e,r,n);return ve(e.items)?e.items.map((a,u)=>qn(a,t,"".concat(r,"/").concat(u),i[u])):[]}o(W5,"FromTuple");function H5(e,t,r,n){for(let i of e.anyOf){if(!we(i,t,n))continue;let a=qn(i,t,r,n);return hr(e,r,a)}for(let i of e.anyOf){let a=qn(i,t,r,n);if(we(e,t,a))return hr(e,r,a)}return hr(e,r,n)}o(H5,"FromUnion");function qn(e,t,r,n){let i=nn(e,t),a=e;switch(e[L]){case"Array":return j5(a,i,r,n);case"Intersect":return U5(a,i,r,n);case"Not":return z5(a,i,r,n);case"Object":return $5(a,i,r,n);case"Record":return G5(a,i,r,n);case"Ref":return Z5(a,i,r,n);case"This":return V5(a,i,r,n);case"Tuple":return W5(a,i,r,n);case"Union":return H5(a,i,r,n);default:return hr(a,r,n)}}o(qn,"Visit");function _l(e,t,r){return qn(e,t,"",r)}o(_l,"TransformEncode");l();function K5(e,t){return ft(e)||qt(e.items,t)}o(K5,"FromArray");function q5(e,t){return ft(e)||qt(e.items,t)}o(q5,"FromAsyncIterator");function J5(e,t){return ft(e)||qt(e.returns,t)||e.parameters.some(r=>qt(r,t))}o(J5,"FromConstructor");function X5(e,t){return ft(e)||qt(e.returns,t)||e.parameters.some(r=>qt(r,t))}o(X5,"FromFunction");function Y5(e,t){return ft(e)||ft(e.unevaluatedProperties)||e.allOf.some(r=>qt(r,t))}o(Y5,"FromIntersect");function Q5(e,t){return ft(e)||qt(e.items,t)}o(Q5,"FromIterator");function eF(e,t){return ft(e)||qt(e.not,t)}o(eF,"FromNot");function tF(e,t){return ft(e)||Object.values(e.properties).some(r=>qt(r,t))||Re(e.additionalProperties)&&qt(e.additionalProperties,t)}o(tF,"FromObject");function rF(e,t){return ft(e)||qt(e.item,t)}o(rF,"FromPromise");function nF(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return ft(e)||qt(n,t)||Re(e.additionalProperties)&&ft(e.additionalProperties)}o(nF,"FromRecord");function iF(e,t){return ft(e)?!0:qt($e(e,t),t)}o(iF,"FromRef");function oF(e,t){return ft(e)?!0:qt($e(e,t),t)}o(oF,"FromThis");function aF(e,t){return ft(e)||!Et(e.items)&&e.items.some(r=>qt(r,t))}o(aF,"FromTuple");function uF(e,t){return ft(e)||e.anyOf.some(r=>qt(r,t))}o(uF,"FromUnion");function qt(e,t){let r=nn(e,t),n=e;if(e.$id&&H0.has(e.$id))return!1;switch(e.$id&&H0.add(e.$id),e[L]){case"Array":return K5(n,r);case"AsyncIterator":return q5(n,r);case"Constructor":return J5(n,r);case"Function":return X5(n,r);case"Intersect":return Y5(n,r);case"Iterator":return Q5(n,r);case"Not":return eF(n,r);case"Object":return tF(n,r);case"Promise":return rF(n,r);case"Record":return nF(n,r);case"Ref":return iF(n,r);case"This":return oF(n,r);case"Tuple":return aF(n,r);case"Union":return uF(n,r);default:return ft(e)}}o(qt,"Visit");var H0=new Set;function Jn(e,t){return H0.clear(),qt(e,t)}o(Jn,"HasTransform");function Qb(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!we(t,r,n))throw new za(t,n,Vn(t,r,n).First());return Jn(t,r)?$a(t,r,n):n}o(Qb,"Decode");l();function Ci(e,t){let r=ge(e,"default")?e.default:void 0,n=Wi(r)?r():Ge(r);return Et(t)?n:Ee(t)&&Ee(n)?Object.assign(n,t):t}o(Ci,"ValueOrDefault");function K0(e){return Ki(e)&&"default"in e}o(K0,"HasDefaultProperty");function sF(e,t,r){let n=Ci(e,r);if(!ve(n))return n;for(let i=0;i<n.length;i++)n[i]=Zr(e.items,t,n[i]);return n}o(sF,"FromArray");function cF(e,t,r){return xr(r)?r:Ci(e,r)}o(cF,"FromDate");function lF(e,t,r){let n=Ci(e,r);return e.allOf.reduce((i,a)=>{let u=Zr(a,t,n);return Ee(u)?R(R({},i),u):u},{})}o(lF,"FromIntersect");function mF(e,t,r){let n=Ci(e,r);if(!Ee(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let a of i){let u=Zr(e.properties[a],t,n[a]);Et(u)||(n[a]=Zr(e.properties[a],t,n[a]))}if(!K0(e.additionalProperties))return n;for(let a of Object.getOwnPropertyNames(n))i.includes(a)||(n[a]=Zr(e.additionalProperties,t,n[a]));return n}o(mF,"FromObject");function dF(e,t,r){let n=Ci(e,r);if(!Ee(n))return n;let i=e.additionalProperties,[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of Object.getOwnPropertyNames(n))c.test(m)&&K0(u)&&(n[m]=Zr(u,t,n[m]));if(!K0(i))return n;for(let m of Object.getOwnPropertyNames(n))c.test(m)||(n[m]=Zr(i,t,n[m]));return n}o(dF,"FromRecord");function pF(e,t,r){return Zr($e(e,t),t,Ci(e,r))}o(pF,"FromRef");function fF(e,t,r){return Zr($e(e,t),t,r)}o(fF,"FromThis");function hF(e,t,r){let n=Ci(e,r);if(!ve(n)||Et(e.items))return n;let[i,a]=[e.items,Math.max(e.items.length,n.length)];for(let u=0;u<a;u++)u<i.length&&(n[u]=Zr(i[u],t,n[u]));return n}o(hF,"FromTuple");function gF(e,t,r){let n=Ci(e,r);for(let i of e.anyOf){let a=Zr(i,t,Ge(n));if(we(i,t,a))return a}return n}o(gF,"FromUnion");function Zr(e,t,r){let n=nn(e,t),i=e;switch(i[L]){case"Array":return sF(i,n,r);case"Date":return cF(i,n,r);case"Intersect":return lF(i,n,r);case"Object":return mF(i,n,r);case"Record":return dF(i,n,r);case"Ref":return pF(i,n,r);case"This":return fF(i,n,r);case"Tuple":return hF(i,n,r);case"Union":return gF(i,n,r);default:return Ci(i,r)}}o(Zr,"Visit");function Ll(...e){return e.length===3?Zr(e[0],e[1],e[2]):Zr(e[0],[],e[1])}o(Ll,"Default");l();l();var un={};_i(un,{Delete:()=>bF,Format:()=>ds,Get:()=>xF,Has:()=>vF,Set:()=>yF,ValuePointerRootDeleteError:()=>Nl,ValuePointerRootSetError:()=>Rl});l();var q0=class q0 extends fe{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(q0,"ValuePointerRootSetError");var Rl=q0,J0=class J0 extends fe{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(J0,"ValuePointerRootDeleteError");var Nl=J0;function ev(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(ev,"Escape");function*ds(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield ev(e.slice(t,r))),t=n+1):r=n;yield ev(e.slice(t))}o(ds,"Format");function yF(e,t,r){if(t==="")throw new Rl(e,t,r);let[n,i,a]=[null,e,""];for(let u of ds(t))i[u]===void 0&&(i[u]={}),n=i,i=i[u],a=u;n[a]=r}o(yF,"Set");function bF(e,t){if(t==="")throw new Nl(e,t);let[r,n,i]=[null,e,""];for(let a of ds(t)){if(n[a]===void 0||n[a]===null)return;r=n,n=n[a],i=a}if(Array.isArray(r)){let a=parseInt(i);r.splice(a,1)}else delete r[i]}o(bF,"Delete");function vF(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let a of ds(t)){if(n[a]===void 0)return!1;r=n,n=n[a],i=a}return Object.getOwnPropertyNames(r).includes(i)}o(vF,"Has");function xF(e,t){if(t==="")return e;let r=e;for(let n of ds(t)){if(r[n]===void 0)return;r=r[n]}return r}o(xF,"Get");l();function EF(e,t){if(!Ee(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>Ro(e[i],t[i]))}o(EF,"ObjectType");function CF(e,t){return xr(t)&&e.getTime()===t.getTime()}o(CF,"DateType");function IF(e,t){return!ve(t)||e.length!==t.length?!1:e.every((r,n)=>Ro(r,t[n]))}o(IF,"ArrayType");function DF(e,t){return!Jr(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>Ro(r,t[n]))}o(DF,"TypedArrayType");function SF(e,t){return e===t}o(SF,"ValueType");function Ro(e,t){if(xr(e))return CF(e,t);if(Jr(e))return DF(e,t);if(ve(e))return IF(e,t);if(Ee(e))return EF(e,t);if(tr(e))return SF(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Ro,"Equal");var wF=ut({type:Ke("insert"),path:Yr(),value:vi()}),AF=ut({type:Ke("update"),path:Yr(),value:vi()}),FF=ut({type:Ke("delete"),path:Yr()}),rv=nt([wF,AF,FF]),X0=class X0 extends fe{constructor(t,r){super(r),this.value=t}};o(X0,"ValueDiffError");var jl=X0;function Ul(e,t){return{type:"update",path:e,value:t}}o(Ul,"CreateUpdate");function nv(e,t){return{type:"insert",path:e,value:t}}o(nv,"CreateInsert");function iv(e){return{type:"delete",path:e}}o(iv,"CreateDelete");function tv(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new jl(e,"Cannot diff objects with symbols")}o(tv,"AssertDiffable");function*OF(e,t,r){if(tv(t),tv(r),!Ip(r))return yield Ul(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let a of i)ge(t,a)||(yield nv("".concat(e,"/").concat(a),r[a]));for(let a of n)ge(r,a)&&(Ro(t,r)||(yield*K(zl("".concat(e,"/").concat(a),t[a],r[a]))));for(let a of n)ge(r,a)||(yield iv("".concat(e,"/").concat(a)))}o(OF,"ObjectType");function*BF(e,t,r){if(!ve(r))return yield Ul(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(zl("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield nv("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield iv("".concat(e,"/").concat(n)))}o(BF,"ArrayType");function*PF(e,t,r){if(!Jr(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield Ul(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(zl("".concat(e,"/").concat(n),t[n],r[n]))}o(PF,"TypedArrayType");function*MF(e,t,r){t!==r&&(yield Ul(e,r))}o(MF,"ValueType");function*zl(e,t,r){if(Ip(t))return yield*K(OF(e,t,r));if(ve(t))return yield*K(BF(e,t,r));if(Jr(t))return yield*K(PF(e,t,r));if(tr(t))return yield*K(MF(e,t,r));throw new jl(t,"Unable to diff value")}o(zl,"Visit");function ov(e,t){return[...zl("",e,t)]}o(ov,"Diff");function TF(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(TF,"IsRootUpdate");function kF(e){return e.length===0}o(kF,"IsIdentity");function av(e,t){if(TF(t))return Ge(t[0].value);if(kF(t))return Ge(e);let r=Ge(e);for(let n of t)switch(n.type){case"insert":{un.Set(r,n.path,n.value);break}case"update":{un.Set(r,n.path,n.value);break}case"delete":{un.Delete(r,n.path);break}}return r}o(av,"Patch");l();function uv(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=Jn(t,r)?_l(t,r,n):n;if(!we(t,r,i))throw new Ga(t,i,Vn(t,r,i).First());return i}o(uv,"Encode");l();var Q0=class Q0 extends fe{constructor(t){super(t)}};o(Q0,"ValueMutateError");var $l=Q0;function _F(e,t,r,n){if(!Ee(r))un.Set(e,t,Ge(n));else{let i=Object.getOwnPropertyNames(r),a=Object.getOwnPropertyNames(n);for(let u of i)a.includes(u)||delete r[u];for(let u of a)i.includes(u)||(r[u]=null);for(let u of a)Y0(e,"".concat(t,"/").concat(u),r[u],n[u])}}o(_F,"ObjectType");function LF(e,t,r,n){if(!ve(r))un.Set(e,t,Ge(n));else{for(let i=0;i<n.length;i++)Y0(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(LF,"ArrayType");function RF(e,t,r,n){if(Jr(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else un.Set(e,t,Ge(n))}o(RF,"TypedArrayType");function NF(e,t,r,n){r!==n&&un.Set(e,t,n)}o(NF,"ValueType");function Y0(e,t,r,n){if(ve(n))return LF(e,t,r,n);if(Jr(n))return RF(e,t,r,n);if(Ee(n))return _F(e,t,r,n);if(tr(n))return NF(e,t,r,n)}o(Y0,"Visit");function sv(e){return Jr(e)||tr(e)}o(sv,"IsNonMutableValue");function jF(e,t){return Ee(e)&&ve(t)||ve(e)&&Ee(t)}o(jF,"IsMismatchedValue");function cv(e,t){if(sv(e)||sv(t))throw new $l("Only object and array types can be mutated at the root level");if(jF(e,t))throw new $l("Cannot assign due type mismatch of assignable values");Y0(e,"",e,t)}o(cv,"Mutate");l();var UF=[(e,t,r)=>Ge(r),(e,t,r)=>Ll(e,t,r),(e,t,r)=>Ml(e,t,r),(e,t,r)=>kl(e,t,r),(e,t,r)=>(Bl(e,t,r),r),(e,t,r)=>Jn(e,t)?$a(e,t,r):r];function lv(e,t,r){return UF.reduce((n,i)=>i(e,t,n),r)}o(lv,"ParseValue");function mv(...e){return e.length===3?lv(e[0],e[1],e[2]):lv(e[0],[],e[1])}o(mv,"Parse");l();var sn={};_i(sn,{Assert:()=>Bl,Cast:()=>z0,Check:()=>we,Clean:()=>Ml,Clone:()=>Ge,Convert:()=>kl,Create:()=>an,Decode:()=>Qb,Default:()=>Ll,Diff:()=>ov,Edit:()=>rv,Encode:()=>uv,Equal:()=>Ro,Errors:()=>Vn,Hash:()=>eo,Mutate:()=>cv,Parse:()=>mv,Patch:()=>av,ValueErrorIterator:()=>on});l();l();var dv={},zF=o(function(e,t,r,n,i){var a=new Worker(dv[t]||(dv[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(u){var c=u.data,m=c.$e$;if(m){var d=new Error(m[0]);d.code=m[1],d.stack=m[2],i(d,null)}else i(null,c)},a.postMessage(r,n),a},"wk"),st=Uint8Array,Dr=Uint16Array,gs=Int32Array,Ka=new st([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qa=new st([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ps=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hv=o(function(e,t){for(var r=new Dr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new gs(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},"freb"),gv=hv(Ka,2),af=gv.b,Hl=gv.r;af[28]=258,Hl[258]=28;var yv=hv(qa,0),bv=yv.b,tf=yv.r,fs=new Dr(32768);for(Je=0;Je<32768;++Je)Ii=(Je&43690)>>1|(Je&21845)<<1,Ii=(Ii&52428)>>2|(Ii&13107)<<2,Ii=(Ii&61680)>>4|(Ii&3855)<<4,fs[Je]=((Ii&65280)>>8|(Ii&255)<<8)>>1;var Ii,Je,ln=o(function(e,t,r){for(var n=e.length,i=0,a=new Dr(t);i<n;++i)e[i]&&++a[e[i]-1];var u=new Dr(t);for(i=1;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;var c;if(r){c=new Dr(1<<t);var m=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],h=t-e[i],g=u[e[i]-1]++<<h,v=g|(1<<h)-1;g<=v;++g)c[fs[g]>>m]=d}else for(c=new Dr(n),i=0;i<n;++i)e[i]&&(c[i]=fs[u[e[i]-1]++]>>15-e[i]);return c},"hMap"),Di=new st(288);for(Je=0;Je<144;++Je)Di[Je]=8;var Je;for(Je=144;Je<256;++Je)Di[Je]=9;var Je;for(Je=256;Je<280;++Je)Di[Je]=7;var Je;for(Je=280;Je<288;++Je)Di[Je]=8;var Je,Wa=new st(32);for(Je=0;Je<32;++Je)Wa[Je]=5;var Je,vv=ln(Di,9,0),xv=ln(Di,9,1),Ev=ln(Wa,5,0),Cv=ln(Wa,5,1),Zl=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),cn=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Vl=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),ys=o(function(e){return(e+7)/8|0},"shft"),to=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},"slc"),Xl={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Iv=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],It=o(function(e,t,r){var n=new Error(t||Iv[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,It),!r)throw n;return n},"err"),Dv=o(function(e,t,r,n){var i=e.length,a=n?n.length:0;if(!i||t.f&&!t.l)return r||new st(0);var u=!r,c=u||t.i!=2,m=t.i;u&&(r=new st(i*3));var d=o(function(B){var ae=r.length;if(B>ae){var J=new st(Math.max(ae*2,B));J.set(r),r=J}},"cbuf"),h=t.f||0,g=t.p||0,v=t.b||0,b=t.l,S=t.d,O=t.m,x=t.n,E=i*8;do{if(!b){h=cn(e,g,1);var I=cn(e,g+1,3);if(g+=3,I)if(I==1)b=xv,S=Cv,O=9,x=5;else if(I==2){var T=cn(e,g,31)+257,k=cn(e,g+10,15)+4,j=T+cn(e,g+5,31)+1;g+=14;for(var U=new st(j),G=new st(19),$=0;$<k;++$)G[ps[$]]=cn(e,g+$*3,7);g+=k*3;for(var X=Zl(G),V=(1<<X)-1,Y=ln(G,X,1),$=0;$<j;){var oe=Y[cn(e,g,V)];g+=oe&15;var D=oe>>4;if(D<16)U[$++]=D;else{var Z=0,ee=0;for(D==16?(ee=3+cn(e,g,3),g+=2,Z=U[$-1]):D==17?(ee=3+cn(e,g,7),g+=3):D==18&&(ee=11+cn(e,g,127),g+=7);ee--;)U[$++]=Z}}var te=U.subarray(0,T),Q=U.subarray(T);O=Zl(te),x=Zl(Q),b=ln(te,O,1),S=ln(Q,x,1)}else It(1);else{var D=ys(g)+4,C=e[D-4]|e[D-3]<<8,A=D+C;if(A>i){m&&It(0);break}c&&d(v+C),r.set(e.subarray(D,A),v),t.b=v+=C,t.p=g=A*8,t.f=h;continue}if(g>E){m&&It(0);break}}c&&d(v+131072);for(var de=(1<<O)-1,je=(1<<x)-1,Me=g;;Me=g){var Z=b[Vl(e,g)&de],Ve=Z>>4;if(g+=Z&15,g>E){m&&It(0);break}if(Z||It(2),Ve<256)r[v++]=Ve;else if(Ve==256){Me=g,b=null;break}else{var qe=Ve-254;if(Ve>264){var $=Ve-257,Ae=Ka[$];qe=cn(e,g,(1<<Ae)-1)+af[$],g+=Ae}var ot=S[Vl(e,g)&je],Pt=ot>>4;ot||It(3),g+=ot&15;var Q=bv[Pt];if(Pt>3){var Ae=qa[Pt];Q+=Vl(e,g)&(1<<Ae)-1,g+=Ae}if(g>E){m&&It(0);break}c&&d(v+131072);var Ht=v+qe;if(v<Q){var F=a-Q,q=Math.min(Q,Ht);for(F+v<0&&It(3);v<q;++v)r[v]=n[F+v]}for(;v<Ht;++v)r[v]=r[v-Q]}}t.l=b,t.p=Me,t.b=v,t.f=h,b&&(h=1,t.m=O,t.d=S,t.n=x)}while(!h);return v!=r.length&&u?to(r,0,v):r.subarray(0,v)},"inflt"),Xn=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),Za=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),Wl=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:sf,l:0};if(i==1){var u=new st(r[0].s+1);return u[r[0].s]=1,{t:u,l:1}}r.sort(function(A,T){return A.f-T.f}),r.push({s:-1,f:25001});var c=r[0],m=r[1],d=0,h=1,g=2;for(r[0]={s:-1,f:c.f+m.f,l:c,r:m};h!=i-1;)c=r[r[d].f<r[g].f?d++:g++],m=r[d!=h&&r[d].f<r[g].f?d++:g++],r[h++]={s:-1,f:c.f+m.f,l:c,r:m};for(var v=a[0].s,n=1;n<i;++n)a[n].s>v&&(v=a[n].s);var b=new Dr(v+1),S=Kl(r[h-1],b,0);if(S>t){var n=0,O=0,x=S-t,E=1<<x;for(a.sort(function(T,k){return b[k.s]-b[T.s]||T.f-k.f});n<i;++n){var I=a[n].s;if(b[I]>t)O+=E-(1<<S-b[I]),b[I]=t;else break}for(O>>=x;O>0;){var D=a[n].s;b[D]<t?O-=1<<t-b[D]++-1:++n}for(;n>=0&&O;--n){var C=a[n].s;b[C]==t&&(--b[C],++O)}S=t}return{t:new st(b),l:S}},"hTree"),Kl=o(function(e,t,r){return e.s==-1?Math.max(Kl(e.l,t,r+1),Kl(e.r,t,r+1)):t[e.s]=r},"ln"),rf=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Dr(++t),n=0,i=e[0],a=1,u=o(function(m){r[n++]=m},"w"),c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(i),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(i);a=1,i=e[c]}return{c:r.subarray(0,n),n:t}},"lc"),Va=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),uf=o(function(e,t,r){var n=r.length,i=ys(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},"wfblk"),nf=o(function(e,t,r,n,i,a,u,c,m,d,h){Xn(t,h++,r),++i[256];for(var g=Wl(i,15),v=g.t,b=g.l,S=Wl(a,15),O=S.t,x=S.l,E=rf(v),I=E.c,D=E.n,C=rf(O),A=C.c,T=C.n,k=new Dr(19),j=0;j<I.length;++j)++k[I[j]&31];for(var j=0;j<A.length;++j)++k[A[j]&31];for(var U=Wl(k,7),G=U.t,$=U.l,X=19;X>4&&!G[ps[X-1]];--X);var V=d+5<<3,Y=Va(i,Di)+Va(a,Wa)+u,oe=Va(i,v)+Va(a,O)+u+14+3*X+Va(k,G)+2*k[16]+3*k[17]+7*k[18];if(m>=0&&V<=Y&&V<=oe)return uf(t,h,e.subarray(m,m+d));var Z,ee,te,Q;if(Xn(t,h,1+(oe<Y)),h+=2,oe<Y){Z=ln(v,b,0),ee=v,te=ln(O,x,0),Q=O;var de=ln(G,$,0);Xn(t,h,D-257),Xn(t,h+5,T-1),Xn(t,h+10,X-4),h+=14;for(var j=0;j<X;++j)Xn(t,h+3*j,G[ps[j]]);h+=3*X;for(var je=[I,A],Me=0;Me<2;++Me)for(var Ve=je[Me],j=0;j<Ve.length;++j){var qe=Ve[j]&31;Xn(t,h,de[qe]),h+=G[qe],qe>15&&(Xn(t,h,Ve[j]>>5&127),h+=Ve[j]>>12)}}else Z=vv,ee=Di,te=Ev,Q=Wa;for(var j=0;j<c;++j){var Ae=n[j];if(Ae>255){var qe=Ae>>18&31;Za(t,h,Z[qe+257]),h+=ee[qe+257],qe>7&&(Xn(t,h,Ae>>23&31),h+=Ka[qe]);var ot=Ae&31;Za(t,h,te[ot]),h+=Q[ot],ot>3&&(Za(t,h,Ae>>5&8191),h+=qa[ot])}else Za(t,h,Z[Ae]),h+=ee[Ae]}return Za(t,h,Z[256]),h+ee[256]},"wblk"),Sv=new gs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sf=new st(0),wv=o(function(e,t,r,n,i,a){var u=a.z||e.length,c=new st(n+u+5*(1+Math.ceil(u/7e3))+i),m=c.subarray(n,c.length-i),d=a.l,h=(a.r||0)&7;if(t){h&&(m[0]=a.r>>3);for(var g=Sv[t-1],v=g>>13,b=g&8191,S=(1<<r)-1,O=a.p||new Dr(32768),x=a.h||new Dr(S+1),E=Math.ceil(r/3),I=2*E,D=o(function(re){return(e[re]^e[re+1]<<E^e[re+2]<<I)&S},"hsh"),C=new gs(25e3),A=new Dr(288),T=new Dr(32),k=0,j=0,U=a.i||0,G=0,$=a.w||0,X=0;U+2<u;++U){var V=D(U),Y=U&32767,oe=x[V];if(O[Y]=oe,x[V]=Y,$<=U){var Z=u-U;if((k>7e3||G>24576)&&(Z>423||!d)){h=nf(e,m,0,C,A,T,j,G,X,U-X,h),G=k=j=0,X=U;for(var ee=0;ee<286;++ee)A[ee]=0;for(var ee=0;ee<30;++ee)T[ee]=0}var te=2,Q=0,de=b,je=Y-oe&32767;if(Z>2&&V==D(U-je))for(var Me=Math.min(v,Z)-1,Ve=Math.min(32767,U),qe=Math.min(258,Z);je<=Ve&&--de&&Y!=oe;){if(e[U+te]==e[U+te-je]){for(var Ae=0;Ae<qe&&e[U+Ae]==e[U+Ae-je];++Ae);if(Ae>te){if(te=Ae,Q=je,Ae>Me)break;for(var ot=Math.min(je,Ae-2),Pt=0,ee=0;ee<ot;++ee){var Ht=U-je+ee&32767,F=O[Ht],q=Ht-F&32767;q>Pt&&(Pt=q,oe=Ht)}}}Y=oe,oe=O[Y],je+=Y-oe&32767}if(Q){C[G++]=268435456|Hl[te]<<18|tf[Q];var B=Hl[te]&31,ae=tf[Q]&31;j+=Ka[B]+qa[ae],++A[257+B],++T[ae],$=U+te,++k}else C[G++]=e[U],++A[e[U]]}}for(U=Math.max(U,$);U<u;++U)C[G++]=e[U],++A[e[U]];h=nf(e,m,d,C,A,T,j,G,X,U-X,h),d||(a.r=h&7|m[h/8|0]<<3,h-=7,a.h=x,a.p=O,a.i=U,a.w=$)}else{for(var U=a.w||0;U<u+d;U+=65535){var J=U+65535;J>=u&&(m[h/8|0]=d,J=u),h=uf(m,h+1,e.subarray(U,J))}a.i=u}return to(c,0,n+ys(h)+i)},"dflt"),$F=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),Av=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=$F[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var Fv=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),u=new st(a.length+e.length);u.set(a),u.set(e,a.length),e=u,i.w=a.length}return wv(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),Yl=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),pv=o(function(e,t,r){for(var n=e(),i=e.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),u=0;u<n.length;++u){var c=n[u],m=a[u];if(typeof c=="function"){t+=";"+m+"=";var d=c.toString();if(c.prototype)if(d.indexOf("[native code]")!=-1){var h=d.indexOf(" ",8)+1;t+=d.slice(h,d.indexOf("(",h))}else{t+=d;for(var g in c.prototype)t+=";"+m+".prototype."+g+"="+c.prototype[g].toString()}else t+=d}else r[m]=c}return t},"wcln"),Gl=[],GF=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),ZF=o(function(e,t,r,n){if(!Gl[r]){for(var i="",a={},u=e.length-1,c=0;c<u;++c)i=pv(e[c],i,a);Gl[r]={c:pv(e[u],i,a),e:a}}var m=Yl({},Gl[r].e);return zF(Gl[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,m,GF(m),n)},"wrkr"),VF=o(function(){return[st,Dr,gs,Ka,qa,ps,af,bv,xv,Cv,fs,Iv,ln,Zl,cn,Vl,ys,to,It,Dv,tm,Ql,Ov]},"bInflt"),WF=o(function(){return[st,Dr,gs,Ka,qa,ps,Hl,tf,vv,Di,Ev,Wa,fs,Sv,sf,ln,Xn,Za,Wl,Kl,rf,Va,uf,nf,ys,to,wv,Fv,em,Ql]},"bDflt");var Ql=o(function(e){return postMessage(e,[e.buffer])},"pbf"),Ov=o(function(e){return e&&{out:e.size&&new st(e.size),dictionary:e.dictionary}},"gopt"),Bv=o(function(e,t,r,n,i,a){var u=ZF(r,n,i,function(c,m){u.terminate(),a(c,m)});return u.postMessage([e,t],t.consume?[e.buffer]:[]),function(){u.terminate()}},"cbify");var Dn=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),ar=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),ef=o(function(e,t){return ar(e,t)+ar(e,t+4)*4294967296},"b8"),or=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function HF(e,t,r){return r||(r=t,t={}),typeof r!="function"&&It(7),Bv(e,t,[WF],function(n){return Ql(em(n.data[0],n.data[1]))},0,r)}o(HF,"deflate");function em(e,t){return Fv(e,t||{},0,0)}o(em,"deflateSync");function KF(e,t,r){return r||(r=t,t={}),typeof r!="function"&&It(7),Bv(e,t,[VF],function(n){return Ql(tm(n.data[0],Ov(n.data[1])))},1,r)}o(KF,"inflate");function tm(e,t){return Dv(e,{i:2},t&&t.out,t&&t.dictionary)}o(tm,"inflateSync");var cf=o(function(e,t,r,n){for(var i in e){var a=e[i],u=t+i,c=n;Array.isArray(a)&&(c=Yl(n,a[1]),a=a[0]),a instanceof st?r[u]=[a,c]:(r[u+="/"]=[new st(0),c],cf(a,u,r,n))}},"fltn"),fv=typeof TextEncoder<"u"&&new TextEncoder,of=typeof TextDecoder<"u"&&new TextDecoder,qF=0;try{of.decode(sf,{stream:!0}),qF=1}catch(e){}var JF=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:to(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function Ha(e,t){if(t){for(var r=new st(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(fv)return fv.encode(e);for(var i=e.length,a=new st(e.length+(e.length>>1)),u=0,c=o(function(h){a[u++]=h},"w"),n=0;n<i;++n){if(u+5>a.length){var m=new st(u+8+(i-n<<1));m.set(a),a=m}var d=e.charCodeAt(n);d<128||t?c(d):d<2048?(c(192|d>>6),c(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,c(240|d>>18),c(128|d>>12&63),c(128|d>>6&63),c(128|d&63)):(c(224|d>>12),c(128|d>>6&63),c(128|d&63))}return to(a,0,u)}o(Ha,"strToU8");function lf(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(of)return of.decode(e);var i=JF(e),a=i.s,r=i.r;return r.length&&It(8),a}}o(lf,"strFromU8");var Pv=o(function(e,t){return t+30+Dn(e,t+26)+Dn(e,t+28)},"slzh"),Mv=o(function(e,t,r){var n=Dn(e,t+28),i=lf(e.subarray(t+46,t+46+n),!(Dn(e,t+8)&2048)),a=t+46+n,u=ar(e,t+20),c=r&&u==4294967295?XF(e,a):[u,ar(e,t+24),ar(e,t+42)],m=c[0],d=c[1],h=c[2];return[Dn(e,t+10),m,d,i,a+Dn(e,t+30)+Dn(e,t+32),h]},"zh"),XF=o(function(e,t){for(;Dn(e,t)!=1;t+=4+Dn(e,t+2));return[ef(e,t+12),ef(e,t+4),ef(e,t+20)]},"z64e"),hs=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&It(9),t+=n+4}return t},"exfl"),ql=o(function(e,t,r,n,i,a,u,c){var m=n.length,d=r.extra,h=c&&c.length,g=hs(d);or(e,t,u!=null?33639248:67324752),t+=4,u!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var v=new Date(r.mtime==null?Date.now():r.mtime),b=v.getFullYear()-1980;if((b<0||b>119)&&It(10),or(e,t,b<<25|v.getMonth()+1<<21|v.getDate()<<16|v.getHours()<<11|v.getMinutes()<<5|v.getSeconds()>>1),t+=4,a!=-1&&(or(e,t,r.crc),or(e,t+4,a<0?-a-2:a),or(e,t+8,r.size)),or(e,t+12,m),or(e,t+14,g),t+=16,u!=null&&(or(e,t,h),or(e,t+6,r.attrs),or(e,t+10,u),t+=14),e.set(n,t),t+=m,g)for(var S in d){var O=d[S],x=O.length;or(e,t,+S),or(e,t+2,x),e.set(O,t+4),t+=4+x}return h&&(e.set(c,t),t+=h),t},"wzh"),Tv=o(function(e,t,r,n,i){or(e,t,101010256),or(e,t+8,r),or(e,t+10,r),or(e,t+12,n),or(e,t+16,i)},"wzf");function kv(e,t,r){r||(r=t,t={}),typeof r!="function"&&It(7);var n={};cf(e,"",n,t);var i=Object.keys(n),a=i.length,u=0,c=0,m=a,d=new Array(a),h=[],g=o(function(){for(var x=0;x<h.length;++x)h[x]()},"tAll"),v=o(function(x,E){Jl(function(){r(x,E)})},"cbd");Jl(function(){v=r});var b=o(function(){var x=new st(c+22),E=u,I=c-u;c=0;for(var D=0;D<m;++D){var C=d[D];try{var A=C.c.length;ql(x,c,C,C.f,C.u,A);var T=30+C.f.length+hs(C.extra),k=c+T;x.set(C.c,k),ql(x,u,C,C.f,C.u,A,c,C.m),u+=16+T+(C.m?C.m.length:0),c=k+A}catch(j){return v(j,null)}}Tv(x,u,d.length,I,E),v(null,x)},"cbf");a||b();for(var S=o(function(x){var E=i[x],I=n[E],D=I[0],C=I[1],A=Av(),T=D.length;A.p(D);var k=Ha(E),j=k.length,U=C.comment,G=U&&Ha(U),$=G&&G.length,X=hs(C.extra),V=C.level==0?0:8,Y=o(function(oe,Z){if(oe)g(),v(oe,null);else{var ee=Z.length;d[x]=Yl(C,{size:T,crc:A.d(),c:Z,f:k,m:G,u:j!=E.length||G&&U.length!=$,compression:V}),u+=30+j+X+ee,c+=76+2*(j+X)+($||0)+ee,--a||b()}},"cbl");if(j>65535&&Y(It(11,0,1),null),!V)Y(null,D);else if(T<16e4)try{Y(null,em(D,C))}catch(oe){Y(oe,null)}else h.push(HF(D,C,Y))},"_loop_1"),O=0;O<m;++O)S(O);return g}o(kv,"zip");function _v(e,t){t||(t={});var r={},n=[];cf(e,"",r,t);var i=0,a=0;for(var u in r){var c=r[u],m=c[0],d=c[1],h=d.level==0?0:8,g=Ha(u),v=g.length,b=d.comment,S=b&&Ha(b),O=S&&S.length,x=hs(d.extra);v>65535&&It(11);var E=h?em(m,d):m,I=E.length,D=Av();D.p(m),n.push(Yl(d,{size:m.length,crc:D.d(),c:E,f:g,m:S,u:v!=u.length||S&&b.length!=O,o:i,compression:h})),i+=30+v+x+I,a+=76+2*(v+x)+(O||0)+I}for(var C=new st(a+22),A=i,T=a-i,k=0;k<n.length;++k){var g=n[k];ql(C,g.o,g,g.f,g.u,g.c.length);var j=30+g.f.length+hs(g.extra);C.set(g.c,g.o+j),ql(C,i,g,g.f,g.u,g.c.length,g.o,g.m),i+=16+j+(g.m?g.m.length:0)}return Tv(C,i,n.length,T,A),C}o(_v,"zipSync");var Jl=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function Lv(e,t,r){r||(r=t,t={}),typeof r!="function"&&It(7);var n=[],i=o(function(){for(var x=0;x<n.length;++x)n[x]()},"tAll"),a={},u=o(function(x,E){Jl(function(){r(x,E)})},"cbd");Jl(function(){u=r});for(var c=e.length-22;ar(e,c)!=101010256;--c)if(!c||e.length-c>65558)return u(It(13,0,1),null),i;var m=Dn(e,c+8);if(m){var d=m,h=ar(e,c+16),g=h==4294967295||d==65535;if(g){var v=ar(e,c-12);g=ar(e,v)==101075792,g&&(d=m=ar(e,v+32),h=ar(e,v+48))}for(var b=t&&t.filter,S=o(function(x){var E=Mv(e,h,g),I=E[0],D=E[1],C=E[2],A=E[3],T=E[4],k=E[5],j=Pv(e,k);h=T;var U=o(function($,X){$?(i(),u($,null)):(X&&(a[A]=X),--m||u(null,a))},"cbl");if(!b||b({name:A,size:D,originalSize:C,compression:I}))if(!I)U(null,to(e,j,j+D));else if(I==8){var G=e.subarray(j,j+D);if(C<524288||D>.8*C)try{U(null,tm(G,{out:new st(C)}))}catch($){U($,null)}else n.push(KF(G,{size:C},U))}else U(It(14,"unknown compression type "+I,1),null);else U(null,null)},"_loop_3"),O=0;O<d;++O)S(O)}else u(null,{});return i}o(Lv,"unzip");function Rv(e,t){for(var r={},n=e.length-22;ar(e,n)!=101010256;--n)(!n||e.length-n>65558)&&It(13);var i=Dn(e,n+8);if(!i)return{};var a=ar(e,n+16),u=a==4294967295||i==65535;if(u){var c=ar(e,n-12);u=ar(e,c)==101075792,u&&(i=ar(e,c+32),a=ar(e,c+48))}for(var m=t&&t.filter,d=0;d<i;++d){var h=Mv(e,a,u),g=h[0],v=h[1],b=h[2],S=h[3],O=h[4],x=h[5],E=Pv(e,x);a=O,(!m||m({name:S,size:v,originalSize:b,compression:g}))&&(g?g==8?r[S]=tm(e.subarray(E,E+v),{out:new st(b)}):It(14,"unknown compression type "+g):r[S]=to(e,E,E+v))}return r}o(Rv,"unzipSync");l();var YF=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),QF=o(e=>e!=null,"notNull"),rm=o((e,t,r=0)=>{var n;if(w.IsNull(e))return"null";if(w.IsUndefined(e))return"undefined";if(w.IsString(e))return"<string>";if(w.IsNumber(e))return"<number>";if(w.IsBoolean(e))return"<boolean>";if(w.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(w.IsRef(e)){let i=t.find(a=>a.$id===e.$ref);return i==null?e.$ref:rm(i,t,r)}if(w.IsArray(e))return"".concat(rm(e.items,t,r+1),"[]");if(w.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let a="".concat(e.anyOf.map(u=>rm(u,t,r+1)).filter(QF).join(" | "));return r>0?"(".concat(a,")"):a}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),e7=o((e,t,r)=>{var a;let n=t.message;w.IsUnion(t.schema)&&(n="Expected one of: ".concat(rm(t.schema,r)));let i="#/definitions/".concat(e).concat((a=YF(t.path))!=null?a:"");return"".concat(i,": ").concat(n)},"errorHandler"),nm=o((e,t,r)=>{let n=t.First();if(n!=null)return e7(e,n,r)},"shortError");var Ja;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Ja||(Ja={}));var mf=class mf extends Error{constructor(r,n){super(n);f(this,"name");f(this,"kind");this.name="CompressError",this.kind=r}};o(mf,"CompressError");var Xa=mf,t7=o(e=>new Xa(Ja.Archive,e.message),"flateErrorIntoCompressError"),r7=o(e=>{let t=Object.values(Xl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),n7=o((e,t,r)=>{var n;return new Xa(Ja.Validate,(n=nm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),i7=o(e=>new Xa(Ja.Encode,e.message),"encodeErrorIntoCompressError"),o7=o(e=>new Xa(Ja.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),bs=o((e,t,r)=>t instanceof Lo?i7(t):t instanceof on?n7(e,t,r):r7(t)?t7(t):o7(t),"intoCompressError");l();var Ya;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(Ya||(Ya={}));var df=class df extends Error{constructor(r,n){super(n);f(this,"name");f(this,"kind");this.name="DecompressError",this.kind=r}};o(df,"DecompressError");var Qa=df,a7=o(e=>new Qa(Ya.Unarchive,e.message),"flateErrorIntoDecompressError"),u7=o(e=>{let t=Object.values(Xl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),s7=o((e,t,r)=>{var n;return new Qa(Ya.Validate,(n=nm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),c7=o(e=>new Qa(Ya.Decode,e.message),"decodeErrorIntoDecompressError"),l7=o(e=>new Qa(Ya.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),vs=o((e,t,r)=>t instanceof _o?c7(t):t instanceof on?s7(e,t,r):u7(t)?a7(t):l7(t),"intoDecompressError");var Nv=o(function*(e,t=""){if(e!=null){if(Array.isArray(e)){for(let r=0;r<e.length;r++)yield[t+"[".concat(r,"]"),e[r]];return}if("features"in e){for(let r=0;r<e.features.length;r++)yield[t===""?"features[".concat(r,"]"):"".concat(t,".features[").concat(r,"]"),e.features[r]];return}for(let[r,n]of Object.entries(e)){let i=t===""?r:"".concat(t,".").concat(r);yield*K(Nv(n,i))}}},"iterRecord"),m7=o((e,t)=>e===""?t:t.startsWith("[")?"".concat(e).concat(t):"".concat(e,".").concat(t),"getPath"),Ot=o((e,t,r)=>{let n=new Set;for(let[i,a]of Nv(e)){let u=t(a);if(n.has(u))return ce({kind:Tr.DuplicateIdError,properties:{id:u,path:m7(r,i)}});n.add(u)}return se(!0)},"ensureUniqueIds");var jv=o(e=>e.floors==null?ce({kind:Tr.FloorMissingError,properties:null}):Ot(e.floors.features,t=>t.properties.id,"floors"),"validateFloors");var Uv=p.Intersect([p.Object({id:p.Ref(ke),elevation:p.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:p.Optional(p.String({description:"The subtitle of the floor."})),maxHeight:p.Optional(p.Number({description:"The maximum height of the floor in meters. This includes the thickness of the floor itself, up to the tallest point on any wall. If the floor does not have a consistent height (eg, one room on the floor has a vaulted ceiling, the rest do not), this value represents the highest point anywhere on the floor. Must be a positive number, or undefined.",minimum:0}))}),jr],{$id:"FloorProperties"}),zv=rr(p.Union([p.Ref(La),p.Ref(Ra),p.Null()]),p.Ref(Uv),{$id:"FloorFeature"}),$v=Ir(p.Ref(zv),{$id:"FloorCollection"}),d7=p.Object({floors:p.Ref($v)}),Gv={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),integrityCheck:jv,schema:d7,references:[Uv,zv,$v]};l();l();var Bt=o(e=>p.Unsafe(e),"PartialRecord");l();var Qe=o(e=>Object.keys(e),"typedKeys");l();l();var p7=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),Sn=o(e=>{let t=p7(e);return o(n=>{let i=t.get(n);return i==null?ce({kind:Tr.UnknownFloorError,properties:{floorId:n}}):se(i)},"floorLookup")},"createFloorLookup");var Zv=o(e=>{if(e.floors==null)return ce({kind:Tr.FloorMissingError,properties:null});if(e.geometry==null)return ce({kind:Tr.GeometryMissingError,properties:null});let t=Ot(e.geometry,n=>n.properties.id,"geometry");if(t.isErr())return t;let r=Sn(e);for(let n of Qe(e.geometry)){let i=r(n);if(i.isErr())return i}return se(!0)},"validateGeometry");var Vv=p.Intersect([p.Object({id:p.Ref(pr)}),jr],{$id:"GeometryProperties"}),Wv=rr(p.Union([p.Ref(dr),p.Ref(xl),p.Ref(El),p.Ref(Cl),p.Ref(La),p.Ref(Ra)]),p.Ref(Vv),{$id:"GeometryFeature"}),Hv=Ir(p.Ref(Wv),{$id:"GeometryCollection"}),f7=p.Object({geometry:Bt(p.Record(ke,p.Ref(Hv),{additionalProperties:!1}))},{$id:"GeometrySchema"}),h7=/^geometry\/(.*)\.geojson$/,Kv={name:"core:geometry",schema:f7,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Qe(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(h7))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[Vv,Wv,Hv],integrityCheck:Zv};l();var pf=p.Object({type:p.Literal("file"),name:p.String({description:"The name of the file."})},{$id:"ManifestFile"}),qv=p.Recursive(e=>p.Object({type:p.Literal("folder"),name:p.String({description:"The name of the folder."}),children:p.Array(p.Union([e,p.Ref(pf)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),Jv=p.Object({name:p.String({description:"The name of the map."}),version:p.Literal("3.0.0",{description:"The version of the manifest."}),orgId:p.Optional(p.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:p.Optional(p.String({description:"The identifier of the map that this MVF is for."})),contents:p.Array(p.Union([p.Ref(qv),p.Ref(pf)]),{minItems:1,description:"The contents of the MVF bundle."}),time:p.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:p.Optional(p.Unsafe(p.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:p.Optional(p.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:p.Optional(p.Ref(ke,{description:"The default floor ID of the map."})),language:p.Optional(p.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),Xv=Ir(rr(dr,p.Ref(Jv)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),g7=p.Object({manifest:p.Ref(Xv)}),Yv={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:g7,references:[pf,qv,Jv,Xv]};l();l();l();l();var hf=class hf extends fe{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));f(this,"schema");this.schema=r}};o(hf,"TypeDereferenceError");var ff=hf;function y7(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new ff(e);return No(r,t)}o(y7,"Resolve");function im(e,t){return!_e.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(im,"Pushref");function No(e,t){return e[L]==="This"||e[L]==="Ref"?y7(e,t):e}o(No,"Deref");l();function b7(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=Jn(t,r);return e.set(t,i),i}o(b7,"HasTransformCached");function om(){let e=new WeakMap;return{HasTransform:o((t,r)=>b7(e,t,r),"HasTransform")}}o(om,"CreateTransformCache");function Dt(e,t,r){try{return w.IsTransform(e)?e[gt].Decode(r):r}catch(n){throw new _o(e,t,r,n)}}o(Dt,"Default");function v7(e,t,r,n,i){return _e.IsArray(n)?Dt(e,r,n.map((a,u)=>Yn(e.items,t,"".concat(r,"/").concat(u),a,i))):Dt(e,r,n)}o(v7,"FromArray");function x7(e,t,r,n,i){if(!_e.IsObject(n)||tr(n))return Dt(e,r,n);let a=Xi(e),u=a.map(g=>g[0]),c=R({},n);for(let[g,v]of a)g in c&&(c[g]=Yn(v,t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsTransform(e.unevaluatedProperties))return Dt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=Dt(d,"".concat(r,"/").concat(g),h[g]));return Dt(e,r,h)}o(x7,"FromIntersect");function E7(e,t,r,n,i){return Dt(e,r,Yn(e.not,t,r,n,i))}o(E7,"FromNot");function C7(e,t,r,n,i){if(!_e.IsObject(n))return Dt(e,r,n);let a=Kt(e),u=R({},n);for(let h of a)_e.HasPropertyKey(u,h)&&(_e.IsUndefined(u[h])&&(!w.IsUndefined(e.properties[h])||Ye.IsExactOptionalProperty(u,h))||(u[h]=Yn(e.properties[h],t,"".concat(r,"/").concat(h),u[h],i)));if(!w.IsSchema(e.additionalProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=Dt(m,"".concat(r,"/").concat(h),d[h]));return Dt(e,r,d)}o(C7,"FromObject");function I7(e,t,r,n,i){if(!_e.IsObject(n))return Dt(e,r,n);let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},n);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=Yn(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsSchema(e.additionalProperties))return Dt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.test(g)||(h[g]=Dt(d,"".concat(r,"/").concat(g),h[g]));return Dt(e,r,h)}o(I7,"FromRecord");function D7(e,t,r,n,i){let a=No(e,t);return Dt(e,r,Yn(a,t,r,n,i))}o(D7,"FromRef");function S7(e,t,r,n,i){let a=No(e,t);return Dt(e,r,Yn(a,t,r,n,i))}o(S7,"FromThis");function w7(e,t,r,n,i){return _e.IsArray(n)&&_e.IsArray(e.items)?Dt(e,r,e.items.map((a,u)=>Yn(a,t,"".concat(r,"/").concat(u),n[u],i))):Dt(e,r,n)}o(w7,"FromTuple");function A7(e,t,r,n,i){for(let a of e.anyOf){if(!sn.Check(a,t,n))continue;let u=Yn(a,t,r,n,i);return Dt(e,r,u)}return Dt(e,r,n)}o(A7,"FromUnion");function Yn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=im(e,t),u=e;switch(e[L]){case"Array":return v7(u,a,r,n,i);case"Intersect":return x7(u,a,r,n,i);case"Not":return E7(u,a,r,n,i);case"Object":return C7(u,a,r,n,i);case"Record":return I7(u,a,r,n,i);case"Ref":return D7(u,a,r,n,i);case"Symbol":return Dt(u,r,n);case"This":return S7(u,a,r,n,i);case"Tuple":return w7(u,a,r,n,i);case"Union":return A7(u,a,r,n,i);default:return Dt(u,r,n)}}o(Yn,"Visit");function Qv(e,t,r){let n=om();return Yn(e,t,"",r,n)}o(Qv,"FastTransformDecode");l();function gr(e,t,r){try{return w.IsTransform(e)?e[gt].Encode(r):r}catch(n){throw new Lo(e,t,r,n)}}o(gr,"Default");function F7(e,t,r,n,i){let a=gr(e,r,n);return _e.IsArray(a)?a.map((u,c)=>Qn(e.items,t,"".concat(r,"/").concat(c),u,i)):a}o(F7,"FromArray");function O7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(n)||tr(n))return a;let u=Xi(e),c=u.map(v=>v[0]),m=R({},a);for(let[v,b]of u)v in m&&(m[v]=Qn(b,t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsTransform(e.unevaluatedProperties))return m;let d=Object.getOwnPropertyNames(m),h=e.unevaluatedProperties,g=R({},m);for(let v of d)c.includes(v)||(g[v]=gr(h,"".concat(r,"/").concat(v),g[v]));return g}o(O7,"FromIntersect");function B7(e,t,r,n){return gr(e.not,r,gr(e,r,n))}o(B7,"FromNot");function P7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(a))return a;let u=Kt(e),c=R({},a);for(let g of u)_e.HasPropertyKey(c,g)&&(_e.IsUndefined(c[g])&&(!w.IsUndefined(e.properties[g])||Ye.IsExactOptionalProperty(c,g))||(c[g]=Qn(e.properties[g],t,"".concat(r,"/").concat(g),c[g],i)));if(!w.IsSchema(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=gr(d,"".concat(r,"/").concat(g),h[g]));return h}o(P7,"FromObject");function M7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(n))return a;let u=Object.getOwnPropertyNames(e.patternProperties)[0],c=new RegExp(u),m=R({},a);for(let v of Object.getOwnPropertyNames(n))c.test(v)&&(m[v]=Qn(e.patternProperties[u],t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsSchema(e.additionalProperties))return m;let d=Object.getOwnPropertyNames(m),h=e.additionalProperties,g=R({},m);for(let v of d)c.test(v)||(g[v]=gr(h,"".concat(r,"/").concat(v),g[v]));return g}o(M7,"FromRecord");function T7(e,t,r,n,i){let a=No(e,t),u=Qn(a,t,r,n,i);return gr(e,r,u)}o(T7,"FromRef");function k7(e,t,r,n,i){let a=No(e,t),u=Qn(a,t,r,n,i);return gr(e,r,u)}o(k7,"FromThis");function _7(e,t,r,n,i){let a=gr(e,r,n);return _e.IsArray(e.items)?e.items.map((u,c)=>Qn(u,t,"".concat(r,"/").concat(c),a[c],i)):[]}o(_7,"FromTuple");function L7(e,t,r,n,i){for(let a of e.anyOf){if(!sn.Check(a,t,n))continue;let u=Qn(a,t,r,n,i);return gr(e,r,u)}for(let a of e.anyOf){let u=Qn(a,t,r,n,i);if(sn.Check(e,t,u))return gr(e,r,u)}return gr(e,r,n)}o(L7,"FromUnion");function Qn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=im(e,t),u=e;switch(e[L]){case"Array":return F7(u,a,r,n,i);case"Intersect":return O7(u,a,r,n,i);case"Not":return B7(u,a,r,n);case"Object":return P7(u,a,r,n,i);case"Record":return M7(u,a,r,n,i);case"Ref":return T7(u,a,r,n,i);case"This":return k7(u,a,r,n,i);case"Tuple":return _7(u,a,r,n,i);case"Union":return L7(u,a,r,n,i);default:return gr(u,r,n)}}o(Qn,"Visit");function ex(e,t,r){let n=om();return Qn(e,t,"",r,n)}o(ex,"FastTransformEncode");l();var xf=class xf{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=Jn(t,r)}Code(){return this.code}Errors(t){return Vn(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new za(this.schema,t,this.Errors(t).First());return this.hasTransform?$a(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?_l(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Ga(this.schema,t,this.Errors(t).First());return r}};o(xf,"TypeCheck");var gf=xf,Si;(function(e){function t(a){return a===36}o(t,"DollarSign"),e.DollarSign=t;function r(a){return a===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(a){return a>=65&&a<=90||a>=97&&a<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(a){return a>=48&&a<=57}o(i,"IsNumeric"),e.IsNumeric=i})(Si||(Si={}));var am;(function(e){function t(a){return a.length===0?!1:Si.IsNumeric(a.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(a){if(t(a))return!1;for(let u=0;u<a.length;u++){let c=a.charCodeAt(u);if(!(Si.IsAlpha(c)||Si.IsNumeric(c)||Si.DollarSign(c)||Si.IsUnderscore(c)))return!1}return!0}o(r,"IsAccessor");function n(a){return a.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(a,u){return r(u)?"".concat(a,".").concat(u):"".concat(a,"['").concat(n(u),"']")}o(i,"Encode"),e.Encode=i})(am||(am={}));var yf;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);Si.IsNumeric(a)||Si.IsAlpha(a)?n.push(r.charAt(i)):n.push("_".concat(a,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(yf||(yf={}));var bf;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(bf||(bf={}));var Ef=class Ef extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(Ef,"TypeCompilerUnknownTypeError");var vf=Ef,Cf=class Cf extends fe{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(Cf,"TypeCompilerTypeGuardError");var um=Cf,jo;(function(e){function t(u,c,m){return Ye.ExactOptionalPropertyTypes?"('".concat(c,"' in ").concat(u," ? ").concat(m," : true)"):"(".concat(am.Encode(u,c)," !== undefined ? ").concat(m," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null)"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,") && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return Ye.AllowNaN?"typeof ".concat(u," === 'number'"):"Number.isFinite(".concat(u,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){return Ye.AllowNullVoid?"(".concat(u," === undefined || ").concat(u," === null)"):"".concat(u," === undefined")}o(a,"IsVoidLike"),e.IsVoidLike=a})(jo||(jo={}));var sm;(function(e){function t(F){return F[L]==="Any"||F[L]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(F,q,B){yield"true"}o(r,"FromAny");function*n(F,q,B){yield"Array.isArray(".concat(B,")");let[ae,J]=[qe("value","any"),qe("acc","number")];pe(F.maxItems)&&(yield"".concat(B,".length <= ").concat(F.maxItems)),pe(F.minItems)&&(yield"".concat(B,".length >= ").concat(F.minItems));let re=de(F.items,q,"value");if(yield"".concat(B,".every((").concat(ae,") => ").concat(re,")"),Re(F.contains)||pe(F.minContains)||pe(F.maxContains)){let Ce=Re(F.contains)?F.contains:rt(),bt=de(Ce,q,"value"),ye=pe(F.minContains)?["(count >= ".concat(F.minContains,")")]:[],le=pe(F.maxContains)?["(count <= ".concat(F.maxContains,")")]:[],He="const count = value.reduce((".concat(J,", ").concat(ae,") => ").concat(bt," ? acc + 1 : acc, 0)"),Wr=["(count > 0)",...ye,...le].join(" && ");yield"((".concat(ae,") => { ").concat(He,"; return ").concat(Wr,"})(").concat(B,")")}if(F.uniqueItems===!0){let bt="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(ae,") => { ").concat(bt," )(").concat(B,")")}}o(n,"FromArray");function*i(F,q,B){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(B,")")}o(i,"FromAsyncIterator");function*a(F,q,B){yield"(typeof ".concat(B," === 'bigint')"),er(F.exclusiveMaximum)&&(yield"".concat(B," < BigInt(").concat(F.exclusiveMaximum,")")),er(F.exclusiveMinimum)&&(yield"".concat(B," > BigInt(").concat(F.exclusiveMinimum,")")),er(F.maximum)&&(yield"".concat(B," <= BigInt(").concat(F.maximum,")")),er(F.minimum)&&(yield"".concat(B," >= BigInt(").concat(F.minimum,")")),er(F.multipleOf)&&(yield"(".concat(B," % BigInt(").concat(F.multipleOf,")) === 0"))}o(a,"FromBigInt");function*u(F,q,B){yield"(typeof ".concat(B," === 'boolean')")}o(u,"FromBoolean");function*c(F,q,B){yield*K(te(F.returns,q,"".concat(B,".prototype")))}o(c,"FromConstructor");function*m(F,q,B){yield"(".concat(B," instanceof Date) && Number.isFinite(").concat(B,".getTime())"),pe(F.exclusiveMaximumTimestamp)&&(yield"".concat(B,".getTime() < ").concat(F.exclusiveMaximumTimestamp)),pe(F.exclusiveMinimumTimestamp)&&(yield"".concat(B,".getTime() > ").concat(F.exclusiveMinimumTimestamp)),pe(F.maximumTimestamp)&&(yield"".concat(B,".getTime() <= ").concat(F.maximumTimestamp)),pe(F.minimumTimestamp)&&(yield"".concat(B,".getTime() >= ").concat(F.minimumTimestamp)),pe(F.multipleOfTimestamp)&&(yield"(".concat(B,".getTime() % ").concat(F.multipleOfTimestamp,") === 0"))}o(m,"FromDate");function*d(F,q,B){yield"(typeof ".concat(B," === 'function')")}o(d,"FromFunction");function*h(F,q,B){yield"Number.isInteger(".concat(B,")"),pe(F.exclusiveMaximum)&&(yield"".concat(B," < ").concat(F.exclusiveMaximum)),pe(F.exclusiveMinimum)&&(yield"".concat(B," > ").concat(F.exclusiveMinimum)),pe(F.maximum)&&(yield"".concat(B," <= ").concat(F.maximum)),pe(F.minimum)&&(yield"".concat(B," >= ").concat(F.minimum)),pe(F.multipleOf)&&(yield"(".concat(B," % ").concat(F.multipleOf,") === 0"))}o(h,"FromInteger");function*g(F,q,B){let ae=F.allOf.map(J=>de(J,q,B)).join(" && ");if(F.unevaluatedProperties===!1){let J=Me("".concat(new RegExp(bi(F)),";")),re="Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".test(key))");yield"(".concat(ae," && ").concat(re,")")}else if(Re(F.unevaluatedProperties)){let J=Me("".concat(new RegExp(bi(F)),";")),re="Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".test(key) || ").concat(de(F.unevaluatedProperties,q,"".concat(B,"[key]")),")");yield"(".concat(ae," && ").concat(re,")")}else yield"(".concat(ae,")")}o(g,"FromIntersect");function*v(F,q,B){yield"(typeof value === 'object' && Symbol.iterator in ".concat(B,")")}o(v,"FromIterator");function*b(F,q,B){typeof F.const=="number"||typeof F.const=="boolean"?yield"(".concat(B," === ").concat(F.const,")"):yield"(".concat(B," === '").concat(bf.Escape(F.const),"')")}o(b,"FromLiteral");function*S(F,q,B){yield"false"}o(S,"FromNever");function*O(F,q,B){let ae=de(F.not,q,B);yield"(!".concat(ae,")")}o(O,"FromNot");function*x(F,q,B){yield"(".concat(B," === null)")}o(x,"FromNull");function*E(F,q,B){yield jo.IsNumberLike(B),pe(F.exclusiveMaximum)&&(yield"".concat(B," < ").concat(F.exclusiveMaximum)),pe(F.exclusiveMinimum)&&(yield"".concat(B," > ").concat(F.exclusiveMinimum)),pe(F.maximum)&&(yield"".concat(B," <= ").concat(F.maximum)),pe(F.minimum)&&(yield"".concat(B," >= ").concat(F.minimum)),pe(F.multipleOf)&&(yield"(".concat(B," % ").concat(F.multipleOf,") === 0"))}o(E,"FromNumber");function*I(F,q,B){yield jo.IsObjectLike(B),pe(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length >= ").concat(F.minProperties)),pe(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length <= ").concat(F.maxProperties));let ae=Object.getOwnPropertyNames(F.properties);for(let J of ae){let re=am.Encode(B,J),Ce=F.properties[J];if(F.required&&F.required.includes(J))yield*K(te(Ce,q,re)),(xi(Ce)||t(Ce))&&(yield"('".concat(J,"' in ").concat(B,")"));else{let bt=de(Ce,q,re);yield jo.IsExactOptionalProperty(B,J,bt)}}if(F.additionalProperties===!1)if(F.required&&F.required.length===ae.length)yield"Object.getOwnPropertyNames(".concat(B,").length === ").concat(ae.length);else{let J="[".concat(ae.map(re=>"'".concat(re,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".includes(key))")}if(typeof F.additionalProperties=="object"){let J=de(F.additionalProperties,q,"".concat(B,"[key]")),re="[".concat(ae.map(Ce=>"'".concat(Ce,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(re,".includes(key) || ").concat(J,"))")}}o(I,"FromObject");function*D(F,q,B){yield"(typeof value === 'object' && typeof ".concat(B,".then === 'function')")}o(D,"FromPromise");function*C(F,q,B){yield jo.IsRecordLike(B),pe(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length >= ").concat(F.minProperties)),pe(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length <= ").concat(F.maxProperties));let[ae,J]=Object.entries(F.patternProperties)[0],re=Me("".concat(new RegExp(ae))),Ce=de(J,q,"value"),bt=Re(F.additionalProperties)?de(F.additionalProperties,q,B):F.additionalProperties===!1?"false":"true",ye="(".concat(re,".test(key) ? ").concat(Ce," : ").concat(bt,")");yield"(Object.entries(".concat(B,").every(([key, value]) => ").concat(ye,"))")}o(C,"FromRecord");function*A(F,q,B){let ae=$e(F,q);if(Q.functions.has(F.$ref))return yield"".concat(je(F.$ref),"(").concat(B,")");yield*K(te(ae,q,B))}o(A,"FromRef");function*T(F,q,B){let ae=Me("".concat(new RegExp(F.source,F.flags),";"));yield"(typeof ".concat(B," === 'string')"),pe(F.maxLength)&&(yield"".concat(B,".length <= ").concat(F.maxLength)),pe(F.minLength)&&(yield"".concat(B,".length >= ").concat(F.minLength)),yield"".concat(ae,".test(").concat(B,")")}o(T,"FromRegExp");function*k(F,q,B){if(yield"(typeof ".concat(B," === 'string')"),pe(F.maxLength)&&(yield"".concat(B,".length <= ").concat(F.maxLength)),pe(F.minLength)&&(yield"".concat(B,".length >= ").concat(F.minLength)),F.pattern!==void 0){let ae=Me("".concat(new RegExp(F.pattern),";"));yield"".concat(ae,".test(").concat(B,")")}F.format!==void 0&&(yield"format('".concat(F.format,"', ").concat(B,")"))}o(k,"FromString");function*j(F,q,B){yield"(typeof ".concat(B," === 'symbol')")}o(j,"FromSymbol");function*U(F,q,B){yield"(typeof ".concat(B," === 'string')");let ae=Me("".concat(new RegExp(F.pattern),";"));yield"".concat(ae,".test(").concat(B,")")}o(U,"FromTemplateLiteral");function*G(F,q,B){yield"".concat(je(F.$ref),"(").concat(B,")")}o(G,"FromThis");function*$(F,q,B){if(yield"Array.isArray(".concat(B,")"),F.items===void 0)return yield"".concat(B,".length === 0");yield"(".concat(B,".length === ").concat(F.maxItems,")");for(let ae=0;ae<F.items.length;ae++){let J=de(F.items[ae],q,"".concat(B,"[").concat(ae,"]"));yield"".concat(J)}}o($,"FromTuple");function*X(F,q,B){yield"".concat(B," === undefined")}o(X,"FromUndefined");function*V(F,q,B){let ae=F.anyOf.map(J=>de(J,q,B));yield"(".concat(ae.join(" || "),")")}o(V,"FromUnion");function*Y(F,q,B){yield"".concat(B," instanceof Uint8Array"),pe(F.maxByteLength)&&(yield"(".concat(B,".length <= ").concat(F.maxByteLength,")")),pe(F.minByteLength)&&(yield"(".concat(B,".length >= ").concat(F.minByteLength,")"))}o(Y,"FromUint8Array");function*oe(F,q,B){yield"true"}o(oe,"FromUnknown");function*Z(F,q,B){yield jo.IsVoidLike(B)}o(Z,"FromVoid");function*ee(F,q,B){let ae=Q.instances.size;Q.instances.set(ae,F),yield"kind('".concat(F[L],"', ").concat(ae,", ").concat(B,")")}o(ee,"FromKind");function*te(F,q,B,ae=!0){let J=Le(F.$id)?[...q,F]:q,re=F;if(ae&&Le(F.$id)){let Ce=je(F.$id);if(Q.functions.has(Ce))return yield"".concat(Ce,"(").concat(B,")");{let bt=Ve(Ce,F,q,"value",!1);return Q.functions.set(Ce,bt),yield"".concat(Ce,"(").concat(B,")")}}switch(re[L]){case"Any":return yield*K(r(re,J,B));case"Array":return yield*K(n(re,J,B));case"AsyncIterator":return yield*K(i(re,J,B));case"BigInt":return yield*K(a(re,J,B));case"Boolean":return yield*K(u(re,J,B));case"Constructor":return yield*K(c(re,J,B));case"Date":return yield*K(m(re,J,B));case"Function":return yield*K(d(re,J,B));case"Integer":return yield*K(h(re,J,B));case"Intersect":return yield*K(g(re,J,B));case"Iterator":return yield*K(v(re,J,B));case"Literal":return yield*K(b(re,J,B));case"Never":return yield*K(S(re,J,B));case"Not":return yield*K(O(re,J,B));case"Null":return yield*K(x(re,J,B));case"Number":return yield*K(E(re,J,B));case"Object":return yield*K(I(re,J,B));case"Promise":return yield*K(D(re,J,B));case"Record":return yield*K(C(re,J,B));case"Ref":return yield*K(A(re,J,B));case"RegExp":return yield*K(T(re,J,B));case"String":return yield*K(k(re,J,B));case"Symbol":return yield*K(j(re,J,B));case"TemplateLiteral":return yield*K(U(re,J,B));case"This":return yield*K(G(re,J,B));case"Tuple":return yield*K($(re,J,B));case"Undefined":return yield*K(X(re,J,B));case"Union":return yield*K(V(re,J,B));case"Uint8Array":return yield*K(Y(re,J,B));case"Unknown":return yield*K(oe(re,J,B));case"Void":return yield*K(Z(re,J,B));default:if(!$t.Has(re[L]))throw new vf(F);return yield*K(ee(re,J,B))}}o(te,"Visit");let Q={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function de(F,q,B,ae=!0){return"(".concat([...te(F,q,B,ae)].join(" && "),")")}o(de,"CreateExpression");function je(F){return"check_".concat(yf.Encode(F))}o(je,"CreateFunctionName");function Me(F){let q="local_".concat(Q.variables.size);return Q.variables.set(q,"const ".concat(q," = ").concat(F)),q}o(Me,"CreateVariable");function Ve(F,q,B,ae,J=!0){let[re,Ce]=["\n",He=>"".padStart(He," ")],bt=qe("value","any"),ye=Ae("boolean"),le=[...te(q,B,ae,J)].map(He=>"".concat(Ce(4)).concat(He)).join(" &&".concat(re));return"function ".concat(F,"(").concat(bt,")").concat(ye," {").concat(re).concat(Ce(2),"return (").concat(re).concat(le).concat(re).concat(Ce(2),")\n}")}o(Ve,"CreateFunction");function qe(F,q){let B=Q.language==="typescript"?": ".concat(q):"";return"".concat(F).concat(B)}o(qe,"CreateParameter");function Ae(F){return Q.language==="typescript"?": ".concat(F):""}o(Ae,"CreateReturns");function ot(F,q,B){let ae=Ve("check",F,q,"value"),J=qe("value","any"),re=Ae("boolean"),Ce=[...Q.functions.values()],bt=[...Q.variables.values()],ye=Le(F.$id)?"return function check(".concat(J,")").concat(re," {\n return ").concat(je(F.$id),"(value)\n}"):"return ".concat(ae);return[...bt,...Ce,ye].join("\n")}o(ot,"Build");function Pt(...F){let q={language:"javascript"},[B,ae,J]=F.length===2&&ve(F[1])?[F[0],F[1],q]:F.length===2&&!ve(F[1])?[F[0],[],F[1]]:F.length===3?[F[0],F[1],F[2]]:F.length===1?[F[0],[],q]:[null,[],q];if(Q.language=J.language,Q.variables.clear(),Q.functions.clear(),Q.instances.clear(),!Re(B))throw new um(B);for(let re of ae)if(!Re(re))throw new um(re);return ot(B,ae,J)}o(Pt,"Code"),e.Code=Pt;function Ht(F,q=[]){let B=Pt(F,q,{language:"javascript"}),ae=globalThis.Function("kind","format","hash",B),J=new Map(Q.instances);function re(le,He,Wr){if(!$t.Has(le)||!J.has(He))return!1;let Ou=$t.Get(le),Bu=J.get(He);return Ou(Bu,Wr)}o(re,"typeRegistryFunction");function Ce(le,He){return Cr.Has(le)?Cr.Get(le)(He):!1}o(Ce,"formatRegistryFunction");function bt(le){return eo(le)}o(bt,"hashFunction");let ye=ae(re,Ce,bt);return new gf(F,q,ye,B)}o(Ht,"Compile"),e.Compile=Ht})(sm||(sm={}));l();l();l();var R7=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,N7=[0,31,28,31,30,31,30,31,31,30,31,30,31],j7=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),cm=o(e=>{let t=R7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&j7(r)?29:N7[n])},"isDate");l();var U7=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,lm=o(e=>{let t=U7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],a=t[4],u=t[5]==="-"?-1:1,c=+(t[6]||0),m=+(t[7]||0);if(c>23||m>59||!a)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-m*u,h=r-c*u-(d<0?1:0);return(h===23||h===-1)&&(d===59||d===-1)&&i<61},"isTime");var z7=/t|\s/i,tx=o(e=>{let t=e.split(z7);return t.length===2&&cm(t[0])&&lm(t[1])},"isDateTime");l();var $7=/\/|:/,G7=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,rx=o(e=>$7.test(e)&&G7.test(e),"isUri");var Z7=[["date",cm],["time",lm],["date-time",tx],["uri",rx]],nx=o(()=>{for(let[e,t]of Z7)try{Fl.Format(e,t)}catch(r){if(r instanceof cs)continue;throw r}},"registerFormats");l();var If=p.Record(p.String(),p.Unknown(),{$id:"Extra"}),wn=p.Object({extra:p.Optional(p.Ref(If))}),Df=[If];l();l();l();l();l();l();var yr=o(e=>Object.entries(e),"typedEntries");var V7=o(e=>{var r;let t=new Map;for(let[n,i]of yr((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(a=>[a.properties.id,a])));return t},"createLookupMap"),Gt=o(e=>{let t=V7(e);return o((n,i)=>{let a=t.get(n);if(a==null)return ce({kind:Tr.UnknownFloorError,properties:{floorId:n}});let u=a.get(i);return u==null?ce({kind:Tr.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):se(u)},"geometryLookup")},"createGeometryLookup");l();var mn=p.Object({geometryId:p.Ref(pr)},{$id:"WithGeometryId"}),eu=p.Object({geometryIds:p.Array(p.Ref(pr))},{$id:"WithGeometryIds"}),Sf=[mn,eu];l();l();l();var ix=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var tu=o(e=>(...t)=>{try{return se(e(...t))}catch(r){return ce(ix(r))}},"safeFn");var ox=tu((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Ha(JSON.stringify(i.contents));return r}),wf=o(async(e,t,r)=>ox(e,t).andThenAsync(n=>new Promise(i=>{kv(n,xe(R({},r),{consume:!0}),(a,u)=>{i(a?ce(a):se(u))})})),"compress"),W7=tu(_v),Af=o((e,t,r)=>ox(e,t).andThen(n=>W7(n,r)),"compressSync");l();l();function mm(e,t,r=[]){let n=R({},e);for(let[i,a]of Object.entries(t))if(a!==void 0)if(i in n){let u=i;if(Array.isArray(a)&&a.length>0){let c=H7(a[0],r);if(c){let m=n[u];if(!Array.isArray(m))throw new Error("Expected array at ".concat(i,", got ").concat(typeof m));let d=new Map(a.map(v=>[ax(v,c),v])),g=m.map(v=>{let b=d.get(ax(v,c));return b?mm(v,b,r):v});n[u]=g}else n[u]=a}else{let c=n[u];typeof c=="object"&&c!==null&&typeof a=="object"&&a!==null?Object.keys(a).length===0?n[u]=a:n[u]=mm(c,a,r):n[i]=a}}else n[i]=a;return n}o(mm,"deepMergeOn");function H7(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,a]of Object.entries(n)){let u=r(a);if(u)return[i,...u]}return null}return o(r,"search"),r(e)}o(H7,"findIdentifierKey");function ax(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(ax,"getValueByKeyPath");var K7=o(e=>e,"identity"),q7=o(e=>JSON.parse(lf(e)),"jsonDecode"),ux=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,K7)!==void 0),"isFileExpected"),sx=tu((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let a of t){let u=a.fromBundle(n,i,q7);if(u){r=mm(r,u,[]);break}}}return r}),Ff=o(async(e,t)=>new Promise(r=>Lv(e,{filter:o(n=>ux(n,t),"filter")},(n,i)=>{r(n?ce(n):se(i))})).then(r=>r.andThen(n=>sx(n,t))),"decompress"),J7=tu(Rv),Of=o((e,t)=>J7(e,{filter:o(r=>ux(r,t),"filter")}).andThen(r=>sx(r,t)),"decompressSync");l();var X7=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),Y7=o(e=>{if(e.length<2)return!1;let t=e.filter(X7);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),dm=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&Y7(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,dm(r)])):Array.isArray(e)?e.map(dm):e,"fixDuplicateAllOf");l();var pm=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?xe(R({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,pm(r)])):Array.isArray(e)?e.map(pm):e,"prefixReferences");var ru;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(ru||(ru={}));var Q7=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),eO=o((...e)=>{let t=new Map;for(let r of Q7(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return ce({kind:ru.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return se(t)},"computeReferenceMap"),Jt,nu,Vr,ur,hm=class hm{constructor(t,r,n,i){_(this,Jt);_(this,nu);_(this,Vr,[]);_(this,ur);W(this,Jt,t),W(this,nu,r),W(this,Vr,n),W(this,ur,i),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(t,r="CoreMVF",n=!1){let i=p.Composite(t.extensions.map(u=>u.schema),{$id:r});if(!w.IsSchema(i))return ce({kind:ru.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:i});let a=eO(g0.values(),y0.values(),f0.values(),Df.values(),Bf.values(),Sf.values(),t.extensions.flatMap(u=>{var c;return(c=u.references)!=null?c:[]}).values());if(!a.isOk())return a;try{nx();let u=n?null:sm.Compile(i,[...a.value.values()]);return se(new hm(i,u,t.extensions,a.value))}catch(u){return u instanceof fe?ce({kind:ru.TypeboxError,message:u.message,original:u}):ce({kind:ru.UnknownError,message:"An unknown error occurred while compiling the schema",original:u})}}is(t){var r,n;return(n=(r=s(this,nu))==null?void 0:r.Check(t))!=null?n:sn.Check(s(this,Jt),[...s(this,ur).values()],t)}parse(t){var r,n;return this.is(t)?se(t):ce((n=(r=s(this,nu))==null?void 0:r.Errors(t))!=null?n:sn.Errors(s(this,Jt),[...s(this,ur).values()],t))}decode(t){try{return se(Qv(s(this,Jt),[...s(this,ur).values()],t))}catch(r){return ce(r)}}encode(t){try{return se(ex(s(this,Jt),[...s(this,ur).values()],t))}catch(r){return ce(r)}}verify(t){for(let r of s(this,Vr))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return ce(n.error)}return se(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([s(this,Jt),...s(this,ur).values()])),r=dm(pm({$id:"#/definitions/".concat((n=s(this,Jt).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>wf(r,s(this,Vr))).then(r=>r.mapErr(n=>{var i;return bs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>wf(r,s(this,Vr))).then(r=>r.mapErr(n=>{var i;return bs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}compressSync(t){return this.encode(t).andThen(r=>this.parse(r)).andThen(r=>Af(r,s(this,Vr))).mapErr(r=>{var n;return bs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}compressUnsafeSync(t){return this.encode(t).andThen(r=>Af(r,s(this,Vr))).mapErr(r=>{var n;return bs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}async decompress(t){return Ff(t,s(this,Vr)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return vs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}async decompressUnsafe(t){return Ff(t,s(this,Vr)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return vs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}decompressSync(t){return Of(t,s(this,Vr)).andThen(r=>this.parse(r)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return vs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}decompressUnsafeSync(t){return Of(t,s(this,Vr)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return vs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}};Jt=new WeakMap,nu=new WeakMap,Vr=new WeakMap,ur=new WeakMap,o(hm,"MVFParser");var fm=hm;var iu,Pf=class Pf{constructor(){_(this,iu,[]);this.extend=this.extend.bind(this)}extend(t){return s(this,iu).push(t),this}extendOptional(t){let r=xe(R({},t),{schema:p.Partial(t.schema)});return s(this,iu).push(r),this}build(t){return fm.create(this,void 0,t==null?void 0:t.cspSafe)}get extensions(){return s(this,iu)}};iu=new WeakMap,o(Pf,"MVFParserBuilder");var gm=Pf;l();l();l();l();var ou=p.Object({geometryId:p.Ref(pr),floorId:p.Ref(ke)},{$id:"GeometryAnchor"}),tO=p.Object({geometryAnchor:p.Ref(ou)}),xs=o((e,t)=>p.Object({geometryAnchors:p.Array(p.Ref(ou),e)},t),"WithGeometryAnchors"),Bf=[ou];l();l();l();var cx=o((e,t)=>p.Unsafe(p.Transform(p.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),kr=o((e,t)=>{let r=cx(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(a=>[a,a])));return{schema:r,values:n,record:i}},"SafeStringEnum");var lx=o(()=>new gm().extend(Gv).extend(Kv).extend(Yv),"createParser");l();l();l();l();l();l();var Es;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(Es||(Es={}));var mx=o(e=>{var i;if(e.annotations==null)return se(!0);let t=Ot(e.annotations,a=>a.id,"annotations");if(t.isErr())return t;let r=Gt(e),n=new Set(Qe((i=e.annotationSymbols)!=null?i:{}));for(let a of Qe(e.annotations)){let u=e.annotations[a];if(u!=null)for(let c of u){if(!n.has(c.symbolKey))return ce({kind:Es.AnnotationUnknownSymbolError,properties:{annotationId:c.id,symbolKey:c.symbolKey}});let m=r(a,c.geometryId);if(m.isErr())return m;if(m.value.geometry.type!=="Point")return ce({kind:Es.AnnotationNonPointGeometryError,properties:{annotationId:c.id,floorId:a,geometryId:c.geometryId}})}}return se(!0)},"validateAnnotations");var dx=Ft("a","AnnotationId"),Mf=p.Intersect([mn,p.Object({id:p.Ref(dx,{description:"The unique identifier for the annotation."}),externalId:p.Optional(p.String({description:"The external identifier for the annotation."})),symbolKey:p.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),px=p.Object({url:p.String({format:"uri",description:"The URL for the symbol."}),name:p.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),rO=p.Object({annotations:Bt(p.Record(ke,p.Array(p.Ref(Mf)),{additionalProperties:!1})),annotationSymbols:Bt(p.Record(p.Index(Mf,["symbolKey"]),p.Ref(px)))},{$id:"AnnotationsSchema"}),nO=/^annotations\/(.*)\.json$/,fx={name:"ext:mvf-annotations",schema:rO,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Qe(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(nO))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[dx,Mf,px],integrityCheck:mx};l();l();l();var wi=Ft("lcat","LocationCategoryId"),Tf=p.Intersect([p.Object({id:p.Ref(wi),parent:p.Optional(p.Ref(wi))}),To(["name"]),wn],{$id:"LocationCategory"}),hx=[wi,Tf];l();l();var Uo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Uo||(Uo={}));var gx=o(e=>{var i,a,u,c,m,d,h,g,v;if(e.locationCategories==null&&e.locations==null)return se(!0);if(e.locationCategories!=null){let b=Ot(e.locationCategories,S=>S.id,"locationCategories");if(b.isErr())return b}if(e.locations!=null){let b=Ot(e.locations,S=>S.id,"locations");if(b.isErr())return b}if(e.locationInstances!=null){let b=Ot(e.locationInstances,S=>S.id,"locationInstances");if(b.isErr())return b}let t=new Set((a=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?a:[]);for(let b of(u=e.locationCategories)!=null?u:[])if(b.parent!=null&&!t.has(b.parent))return ce({kind:Uo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=Gt(e);for(let b of(c=e.locations)!=null?c:[]){for(let S of b.categories)if(!t.has(S))return ce({kind:Uo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of b.geometryAnchors){let O=r(S.floorId,S.geometryId);if(O.isErr())return O}}let n=new Set((d=(m=e.locations)==null?void 0:m.map(b=>b.id))!=null?d:[]);for(let b of(h=e.locationInstances)!=null?h:[]){if(!n.has(b.parentId))return ce({kind:Uo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let S of(g=b.categories)!=null?g:[])if(!t.has(S))return ce({kind:Uo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of(v=b.geometryAnchors)!=null?v:[]){let O=r(S.floorId,S.geometryId);if(O.isErr())return O}}return se(!0)},"validateLocations");l();var Ai=Ft("loc","LocationId"),ym=Ft("loci","LocationInstanceId"),yx=p.Object({name:p.String(),url:p.String({format:"uri"})},{$id:"LocationSocial"}),bx=p.Object({url:p.String({format:"uri"})},{$id:"LocationImage"}),kf=p.Object({label:p.String(),url:p.String({format:"uri"})},{$id:"LocationLink"}),_f=p.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),vx=p.Union([p.Literal("Sunday"),p.Literal("Monday"),p.Literal("Tuesday"),p.Literal("Wednesday"),p.Literal("Thursday"),p.Literal("Friday"),p.Literal("Saturday")],{$id:"OpeningHoursDay"}),iO="PublicHolidays",Lf=p.Union([vx,p.Literal(iO)],{$id:"OpeningHoursDayOrPublicHoliday"}),bm=p.Object({"@type":p.Optional(p.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:p.Optional(p.Ref(_f,{description:"The time the opening hours start"})),closes:p.Optional(p.Ref(_f,{description:"The time the opening hours end"})),dayOfWeek:p.Optional(p.Union([p.Ref(Lf),p.Array(p.Ref(Lf))],{description:"The days of the week the opening hours apply to"})),validFrom:p.Optional(p.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:p.Optional(p.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),vm=p.Intersect([p.Object({id:p.Ref(Ai),categories:p.Array(p.Ref(wi)),logo:p.Optional(p.String({format:"uri"})),phone:p.Optional(p.String()),social:p.Array(p.Ref(yx)),images:p.Array(p.Ref(bx)),links:p.Array(p.Ref(kf)),website:p.Optional(p.Ref(kf)),openingHours:p.Optional(p.Array(p.Ref(bm)))}),To(["name"]),xs(),wn],{$id:"Location"}),Rf=p.Intersect([p.Object({id:p.Ref(ym),parentId:p.Ref(Ai)}),p.Partial(p.Omit(vm,["id","parentId","details"])),jr],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),xm=[Ai,ym,yx,bx,kf,_f,vx,Lf,bm,vm,Rf];var oO=p.Object({locations:p.Array(p.Ref(vm)),locationCategories:p.Array(p.Ref(Tf)),locationInstances:p.Optional(p.Array(p.Ref(Rf)))},{$id:"LocationsExtensionSchema"}),xx="locations.json",Ex="location-categories.json",Cx="location-instances.json",Ix={name:"ext:locations",schema:oO,intoBundle:o(function*(e){e.locations!=null&&(yield{path:xx,contents:e.locations}),e.locationCategories!=null&&(yield{path:Ex,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:Cx,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===xx)return{locations:r(t)};if(e===Ex)return{locationCategories:r(t)};if(e===Cx)return{locationInstances:r(t)}},"fromBundle"),references:[...hx,...xm],integrityCheck:gx};l();l();var An;(function(e){e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling",e.EnterpriseVenueWithUnknownTopLocationError="EnterpriseVenueWithUnknownTopLocationError",e.EnterpriseLocationWithInvalidPrimaryCategory="EnterpriseLocationWithInvalidPrimaryCategory"})(An||(An={}));var Dx=o(e=>{var v,b,S,O,x,E,I,D,C,A,T,k,j,U,G,$,X,V,Y,oe;if(e.cms==null)return se(!0);let t=e.cms,r=Ot(e.cms.categories,Z=>Z.id,"cms.categories");if(r.isErr())return r;let n=new Set((b=(v=e.locationCategories)==null?void 0:v.map(Z=>Z.id))!=null?b:[]);for(let Z of(S=t.categories)!=null?S:[])if(!n.has(Z.categoryId))return ce({kind:An.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:Z.id,locationCategoryId:Z.categoryId}});let i=Ot(e.cms.locations,Z=>Z.id,"cms.locations");if(i.isErr())return i;let a=new Map((x=(O=e.locations)==null?void 0:O.map(Z=>[Z.id,Z]))!=null?x:[]);for(let Z of(E=t.locations)!=null?E:[]){if(!a.has(Z.locationId))return ce({kind:An.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId}});for(let ee of(I=Z.siblingGroups)!=null?I:[])for(let te of(D=ee.siblings)!=null?D:[])if(!a.has(te))return ce({kind:An.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:Z.id,siblingLocationId:te,label:ee.label}});if(Z.primaryCategory!=null){let ee=a.get(Z.locationId);if(ee!=null&&!ee.categories.includes(Z.primaryCategory))return ce({kind:An.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId,primaryCategory:Z.primaryCategory}})}}if(((C=t.venue)==null?void 0:C.topLocations)!=null){for(let Z of t.venue.topLocations)if(!a.has(Z))return ce({kind:An.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:Z}})}let u=new Set((T=(A=e.cms.locations)==null?void 0:A.map(Z=>Z.id))!=null?T:[]),c=Ot(e.cms.locationInstances,Z=>Z.id,"cms.locationInstances");if(c.isErr())return c;let m=new Set((j=(k=e.locationInstances)==null?void 0:k.map(Z=>Z.id))!=null?j:[]);for(let Z of(U=t.locationInstances)!=null?U:[]){if(!u.has(Z.parentId))return ce({kind:An.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:Z.id,enterpriseLocationId:Z.parentId}});if(!m.has(Z.locationInstanceId))return ce({kind:An.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:Z.id,locationInstanceId:Z.locationInstanceId}});for(let ee of(G=Z.siblingGroups)!=null?G:[])for(let te of($=ee.siblings)!=null?$:[])if(!a.has(te))return ce({kind:An.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:Z.id,siblingLocationId:te,label:ee.label}})}let d=Sn(e),h=Gt(e),g=Ot(e.cms.floorText,Z=>Z.properties.id,"cms.floorText");if(g.isErr())return g;for(let[Z,ee]of yr((X=t.floorText)!=null?X:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee.features){if(!("geometryId"in Q.properties))continue;let de=h(Z,Q.properties.geometryId);if(de.isErr())return de}}for(let[Z,ee]of yr((V=t.textures)!=null?V:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee){let de=h(Z,Q.geometryId);if(de.isErr())return de}}for(let[Z,ee]of yr((Y=t.layers)!=null?Y:{})){let te=d(Z);if(te.isErr())return te;for(let Q of Qe(ee!=null?ee:{})){let de=h(Z,Q);if(de.isErr())return de}}for(let[Z,ee]of yr((oe=t.textAreas)!=null?oe:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee.features)if("geometryId"in Q.properties){let de=h(Z,Q.properties.geometryId);if(de.isErr())return de}}return se(!0)},"validateCMS");l();l();var Cs=Ft("el","EnterpriseLocationId"),Nf=Ft("ec","EnterpriseCategoryId"),jf=Ft("eli","EnterpriseLocationInstanceId"),Uf=Ft("ev","EnterpriseVenueId"),zf=Ft("eft","EnterpriseFloorTextId"),Sx=[Cs,Nf,jf,Uf,zf];var wx=p.Object({id:p.Ref(Nf),categoryId:p.Ref(wi),color:p.Optional(p.String()),sortOrder:p.Number(),iconFromDefaultList:p.Optional(p.Union([p.String(),p.Null()])),picture:p.Optional(p.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),$f=p.Object({categories:p.Optional(p.Array(p.Ref(wx)))},{$id:"EnterpriseCategoriesSchema"}),Ax=[wx,$f];l();var Fx=kr(["left","center","right"]),aO=Fx.schema,mie=Fx.values,Gf=p.Object({id:p.Ref(zf),text:p.String(),visible:p.Boolean({default:!0}),fontSize:p.Number({default:12,exclusiveMinimum:0}),fontFamily:p.String({default:"Droid Sans"}),color:p.String({default:"black"}),rotation:p.Number({minimum:0,maximum:360}),align:aO},{$id:"FloorTextCommonProperties"}),Zf=p.Intersect([p.Ref(Gf),mn],{$id:"AnchoredFloorTextProperties"}),Vf=p.Intersect([p.Ref(Gf),p.Object({verticalOffset:p.Number()})],{$id:"FloatingFloorTextProperties"}),Ox=p.Union([p.Ref(Zf),p.Ref(Vf)],{$id:"FloorTextProperties"}),Bx=rr(dr,p.Ref(Ox),{$id:"FloorTextFeature"}),uO=rr(dr,p.Ref(Zf),{$id:"AnchoredFloorTextFeature"}),sO=rr(dr,p.Ref(Vf),{$id:"FloatingFloorTextFeature"}),Px=Ir(p.Ref(Bx),{$id:"EnterpriseFloorTextFeatureCollection"}),Mx=p.Record(ke,p.Ref(Px),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Wf=p.Object({floorText:p.Optional(p.Ref(Mx))},{$id:"EnterpriseFloorTextSchema"}),Tx=[Gf,Zf,Vf,Ox,Bx,uO,sO,Px,Mx,Wf];l();var kx=Bt(p.Record(pr,p.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),_x=Bt(p.Record(ke,p.Ref(kx),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Hf=p.Object({layers:p.Optional(p.Ref(_x))},{$id:"EnterpriseLayersSchema"}),Lx=[kx,_x,Hf];l();l();l();var Kf=kr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),cO=Kf.schema,Cie=Kf.values,Iie=Kf.record,qf=p.Object({type:cO,start:p.Optional(p.String({format:"date",description:"The start date of the state"})),end:p.Optional(p.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),Jf=p.Object({label:p.String(),siblings:p.Array(p.Ref(Ai))},{$id:"SiblingGroup"}),Em=p.Object({name:p.String(),code:p.String()},{$id:"Language"}),Rx=[qf,Jf,Em];var Cm=p.Object({id:p.Ref(Cs),locationId:p.Ref(Ai),cmsId:p.String(),type:p.String(),sortOrder:p.Number(),tags:p.Optional(p.Array(p.String())),picture:p.Optional(p.String({format:"uri",description:"The picture of the location"})),states:p.Optional(p.Array(p.Ref(qf),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:p.Optional(p.Array(p.Ref(Jf))),gallery:p.Optional(p.Array(p.Object({caption:p.Optional(p.String()),image:p.String({format:"uri"}),embeddedUrl:p.Optional(p.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:p.Optional(p.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:p.Optional(p.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:p.Optional(p.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:p.Optional(p.Ref(wi))},{$id:"EnterpriseLocation"}),Xf=p.Object({locations:p.Optional(p.Array(p.Ref(Cm)))},{$id:"EnterpriseLocationsSchema"}),Nx=[Cm,Xf];var jx=p.Intersect([p.Object({id:p.Ref(jf),parentId:p.Ref(Cs),locationInstanceId:p.Ref(ym)}),p.Partial(p.Omit(Cm,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),Yf=p.Object({locationInstances:p.Optional(p.Array(p.Ref(jx)))},{$id:"EnterpriseLocationInstancesSchema"}),Ux=[jx,Yf];l();var Qf=kr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),zx=Qf.schema,$ie=Qf.values,Gie=Qf.record,eh=p.Object({maxWidth:p.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:p.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:p.Ref(zx),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),$x=p.Intersect([p.Ref(eh),mn],{$id:"EnterpriseAnchoredTextAreaProperties"}),Gx=p.Intersect([p.Ref(eh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),Zx=p.Union([$x,Gx],{$id:"EnterpriseTextAreaProperties"}),Vx=rr(p.Ref(dr),Zx,{$id:"EnterpriseTextAreaFeature"}),Wx=Ir(p.Ref(Vx),{$id:"EnterpriseTextAreaCollection"}),Hx=p.Record(ke,p.Ref(Wx),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),Kx=p.Object({textAreas:p.Optional(p.Ref(Hx))},{$id:"EnterpriseTextAreasSchema"}),qx=[zx,eh,$x,Gx,Zx,Vx,Wx,Hx];l();var th=p.Object({u:p.Number(),v:p.Number()},{$id:"EnterpriseTextureUV"}),rh=kr(["top","side"],{$id:"EnterpriseTextureFace"}),Jx=rh.schema,Kie=rh.values,qie=rh.record,nh=kr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),Xx=nh.schema,Jie=nh.values,Xie=nh.record,Yx=p.Tuple([ka,_a,ka,_a],{$id:"EnterpriseTextureBounds"}),Qx=p.Intersect([p.Object({repeat:p.Ref(th),offset:p.Ref(th),rotation:p.Number({minimum:0,maximum:360}),path:p.String({format:"uri"}),face:p.Ref(Jx),surface:p.Ref(Xx),bounds:p.Ref(Yx)},{$id:"EnterpriseTextureProperties"}),mn],{$id:"EnterpriseTexture"}),e3=p.Array(p.Ref(Qx),{$id:"EnterpriseTextures"}),t3=p.Record(ke,p.Ref(e3),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),ih=p.Object({textures:p.Optional(p.Ref(t3))},{$id:"EnterpriseTexturesSchema"}),r3=[Qx,e3,ih,th,Jx,Xx,Yx,t3];l();var n3=p.Intersect([p.Object({id:p.Ref(Uf),slug:p.String(),defaultLanguage:p.Ref(Em),languages:p.Array(p.Ref(Em)),countrycode:p.Optional(p.String()),logo:p.Optional(p.String({format:"uri"})),mappedinWebUrl:p.Optional(p.String({format:"uri"})),topLocations:p.Optional(p.Array(p.Ref(Ai))),operationHours:p.Optional(p.Array(p.Ref(bm))),coverImage:p.Optional(p.String({format:"uri"}))}),To(["name"]),wn],{$id:"EnterpriseVenue"}),oh=p.Object({venue:p.Optional(p.Ref(n3))},{$id:"EnterpriseVenueSchema"}),i3=[n3,oh];var a3=p.Intersect([oh,Xf,Yf,$f,ih,Wf,Hf,Kx],{$id:"CMSProperties"}),o3=p.Object({cms:p.Optional(p.Ref(a3))},{$id:"CMSExtensionSchema"}),lO=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,u3={name:"ext:cms",schema:o3,intoBundle:o(function*(e){var r,n,i,a,u,c;if(e.cms==null)return;let t=e.cms;for(let m of Qe(t))switch(m){case"floorText":for(let d of Qe((r=t.floorText)!=null?r:{}))yield{path:"cms/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of Qe((i=t.textures)!=null?i:{}))yield{path:"cms/textures/".concat(d,".json"),contents:((a=t.textures)!=null?a:{})[d]};continue;case"textAreas":for(let d of Qe((u=t.textAreas)!=null?u:{}))yield{path:"cms/textAreas/".concat(d,".geojson"),contents:((c=t.textAreas)!=null?c:{})[d]};continue;default:yield{path:"cms/".concat(m,".json"),contents:t[m]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(lO);if(!n)return;let[,i,a]=n,u=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{cms:{[i]:{[a]:u}}};default:return{cms:{[a]:u}}}},"fromBundle"),references:[a3,o3,...i3,...Nx,...Ux,...Ax,...r3,...Lx,...Tx,...qx,...Sx,...Rx,...xm],integrityCheck:Dx};l();l();l();l();var Fn;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Fn||(Fn={}));var s3=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return se(!0);let r=Object.entries(t).map(([a,u])=>R({key:a},u)).sort((a,u)=>a.index!==u.index?a.index-u.index:a.bit-u.bit),n=0,i=-1;for(let a of r){if(a.bit===i)return ce({kind:Fn.NavigationFlagDuplicateBit,properties:{index:a.index,bit:a.bit,path:"navigationFlags.".concat(a.key)}});if(a.index!=n){if(i!=31)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(a.index!=n+1||a.bit!=0)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=a.index,i=0}else{if(a.bit!==i+1)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:a.index,bit:i+1,path:"navigationFlags"}});i=a.bit}}return se(!0)},"validateNavigationFlags");l();var c3=2**32-1,Is=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),au=o((e,t,r)=>{if(t.index==-1&&e.length===0)return se(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return ce({kind:Fn.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let a=e[i];if(i<t.index){if(a>c3)return ce({kind:Fn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:c3,path:r}});continue}else if(a>t.flag)return ce({kind:Fn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:t.flag,path:r}})}return se(!0)},"validateFlags");var mO=p.Object({index:p.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:p.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),l3=p.Intersect([mO,jr],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'});var m3=p.Record(p.String(),l3,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),dO=p.Object({navigationFlags:p.Ref(m3)},{$id:"NavigationFlagsSchema"}),Im=p.Array(p.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),ah=p.Object({flags:p.Ref(Im)},{$id:"WithFlags"}),zo=p.Intersect([ou,ah],{$id:"FlaggedGeometryAnchor"}),pO=p.Object({geometryAnchor:zo},{$id:"WithFlaggedGeometryAnchor"}),fO=p.Object({geometryAnchors:p.Array(zo)},{$id:"WithFlaggedGeometryAnchors"}),d3={name:"ext:mvf-navigation-flags",schema:dO,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[l3,m3,Im,zo,pO,fO],integrityCheck:s3};l();var p3=o(e=>{if(e.connections==null)return se(!0);let t=Ot(e.connections,i=>i.id,"connections");if(t.isErr())return t;let r=Gt(e),n=Is(e);for(let[i,a]of e.connections.entries()){for(let[u,c]of a.entrances.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=au(c.flags,n,"connections[".concat(i,"].entrances[").concat(u,"]"));if(d.isErr())return d}for(let[u,c]of a.exits.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=au(c.flags,n,"connections[".concat(i,"].exits[").concat(u,"]"));if(d.isErr())return d}}return se(!0)},"validateConnections");var h3=Ft("c","ConnectionId"),{schema:hO,values:rae,record:nae}=kr(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),g3=hO;var y3=p.Intersect([p.Object({id:p.Ref(h3,{description:"The unique identifier for the connection."}),entrances:p.Array(p.Ref(zo)),exits:p.Array(p.Ref(zo)),entryCost:p.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:p.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:p.Ref(g3,{description:"The type of connection."})}),jr,wn],{$id:"ConnectionsProperties"}),b3=p.Array(p.Ref(y3),{$id:"ConnectionsCollection"}),gO=p.Object({connections:p.Ref(b3)},{$id:"ConnectionsExtensionSchema"}),f3="connections.json",v3={name:"ext:connections",schema:gO,intoBundle:o(function*(e){e.connections!=null&&(yield{path:f3,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===f3)return{connections:r(t)}},"fromBundle"),references:[y3,b3,g3,h3,zo,Im],integrityCheck:p3};l();l();var x3=o(e=>{if(e.defaultStyle==null)return se(!0);let t=Gt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return se(!0)},"validateDefaultStyle");var E3=p.Intersect([xs(),wn,p.Object({altitude:p.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:p.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:p.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:p.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:p.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:p.Optional(p.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),C3=p.Record(p.String(),p.Ref(E3),{$id:"DefaultStyleCollection",additionalProperties:!1}),yO=p.Object({defaultStyle:p.Ref(C3)},{$id:"DefaultStyleSchema"}),I3={name:"ext:mvf-default-style",schema:yO,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[E3,C3],integrityCheck:x3};l();l();l();l();var Dm;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Dm||(Dm={}));var D3=o(e=>{if(e.floorStacks==null)return se(!0);let t=Ot(e.floorStacks,n=>n.id,"floorStacks");if(t.isErr())return t;let r=Sn(e);for(let n of e.floorStacks){for(let i of n.floors){let a=r(i);if(a.isErr())return a}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return ce({kind:Dm.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return se(!0)},"validateFloorStacks");var Ds=Ft("fs","FloorStackId"),w3=p.Intersect([p.Object({id:p.Ref(Ds,{description:"The unique identifier for the floor stack."}),floors:p.Array(p.Ref(ke),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:p.Optional(p.Ref(ke,{description:"The default floor for the floor stack."}))}),jr],{$id:"FloorStacksProperties"}),A3=p.Array(p.Ref(w3),{$id:"FloorStackCollection"}),bO=p.Object({floorStacks:p.Ref(A3)},{$id:"FloorStackExtensionSchema"}),S3="floor-stacks.json",F3={name:"ext:floor-stacks",schema:bO,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:S3,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===S3)return{floorStacks:r(t)}},"fromBundle"),references:[Ds,w3,A3],integrityCheck:D3};l();l();var Ss;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(Ss||(Ss={}));var O3=o(e=>{if(e.facade==null)return se(!0);if(e.floorStacks==null)return ce({kind:Ss.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(i=>i.id)),r=Gt(e),n=Sn(e);for(let[i,a]of yr(e.facade)){if(a==null)continue;let u=n(i);if(u.isErr())return u;for(let c of a){let{floorStackId:m,geometryIds:d}=c;if(!t.has(m))return ce({kind:Ss.UnknownFloorStackError,properties:{floorStackId:m}});for(let h of d){let g=r(i,h);if(g.isErr())return g}}}return se(!0)},"validateFacade");var B3=p.Intersect([p.Object({floorStackId:p.Ref(Ds)}),eu],{$id:"Facade"}),vO=p.Object({facade:Bt(p.Record(ke,p.Array(p.Ref(B3)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),xO=/^facade\/(.*)\.json$/,P3={name:"ext:facade",schema:vO,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Qe(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(xO))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[Ds,B3],integrityCheck:O3};l();l();var M3=o(e=>{if(e.floorImages==null)return se(!0);let t=Gt(e);for(let[r,n]of yr(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let a=i.properties.geometryId,u=t(r,a);if(u.isErr())return u}return se(!0)},"validateFloorImages");var uh=p.Object({path:p.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:p.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:p.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),T3=p.Intersect([p.Ref(uh),mn],{$id:"AnchoredFloorImageProperties"}),k3=p.Intersect([p.Ref(uh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),_3=p.Union([T3,k3],{$id:"FloorImageProperties"}),L3=rr(p.Ref(dr),_3,{$id:"FloorImageFeature"}),R3=Ir(p.Ref(L3),{$id:"FloorImageCollection"}),EO=p.Object({floorImages:Bt(p.Record(ke,p.Ref(R3),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),CO=/^floorImages\/(.*)\.geojson$/,N3={name:"ext:floor-images",schema:EO,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Qe(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(CO))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[uh,T3,k3,_3,L3,R3],integrityCheck:M3};l();l();var j3=o(e=>{if(e.kinds==null)return se(!0);let t=Gt(e);for(let[r,n]of yr(e.kinds))if(n!=null)for(let i of Qe(n)){let a=t(r,i);if(a.isErr())return a}return se(!0)},"validateKinds");var{values:Sue,schema:IO,record:wue}=kr(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),U3=IO;var z3=Bt(p.Record(pr,p.Ref(U3),{additionalProperties:!1,$id:"GeometryKinds"})),DO=p.Object({kinds:Bt(p.Record(ke,p.Ref(z3),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),SO=/^kinds\/(.*)\.json$/,$3={name:"ext:kinds",schema:DO,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Qe(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(SO))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[U3,z3],integrityCheck:j3};l();l();l();var ws;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(ws||(ws={}));var G3=o(e=>{if(e.nodes==null)return se(!0);let t=Ot(e.nodes,i=>i.properties.id,"nodes");if(t.isErr())return t;let r=Gt(e),n=Is(e);for(let[i,a]of yr(e.nodes)){if(a==null)continue;let u=new Set(a.features.map(c=>c.properties.id));for(let[c,m]of a.features.entries()){for(let d of m.properties.geometryIds){let h=r(i,d);if(h.isErr())return h}for(let[d,h]of m.properties.neighbors.entries()){if(!u.has(h.id))return ce({kind:ws.UnknownNeighbor,properties:{floorId:i,nodeId:m.properties.id,neighborId:h.id}});if(h.id===m.properties.id)return ce({kind:ws.SelfReference,properties:{floorId:i,nodeId:m.properties.id}});let g=au(h.flags,n,'nodes["'.concat(i,'"].features[').concat(c,"].properties.neighbors[").concat(d,"]"));if(g.isErr())return g}}}return se(!0)},"validateNodes");var sh=Ft("n","NodeId"),Z3=p.Intersect([p.Object({id:p.Ref(sh,{description:"The unique identifier for the node."}),extraCost:p.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),ah],{$id:"NodeNeighbor"}),V3=p.Intersect([p.Object({id:p.Ref(sh,{description:"The unique identifier for the node."}),neighbors:p.Array(p.Ref(Z3),{description:"The neighbors of the node."})}),eu],{$id:"NodeProperties"}),W3=rr(p.Ref(dr),V3,{$id:"NodeFeature"}),H3=Ir(p.Ref(W3),{$id:"NodeCollection"}),wO=p.Object({nodes:Bt(p.Record(ke,p.Ref(H3),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),AO=/^nodes\/(.*)\.(geo)?json$/,K3={name:"ext:nodes",schema:wO,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Qe(e.nodes))yield{path:"nodes/".concat(t,".geojson"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(AO))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[sh,Z3,V3,W3,H3],integrityCheck:G3};l();l();l();var Sm;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(Sm||(Sm={}));var q3=o(e=>{if(e.outdoors==null)return se(!0);let t=Sn(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return ce({kind:Sm.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return se(!0)},"validateOutdoors");var X3=p.Object({floors:p.Array(p.Ref(ke),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),FO=p.Object({outdoors:p.Ref(X3)},{$id:"OutdoorsExtensionSchema"}),J3="outdoors.json",Y3={name:"ext:outdoors",schema:FO,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:J3,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===J3)return{outdoors:r(t)}},"fromBundle"),references:[X3],integrityCheck:q3};l();l();l();var wm;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(wm||(wm={}));var Q3=o(e=>{if(e.tileset==null)return se(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return ce({kind:wm.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return se(!0)},"validateTilesets");var ch=p.Object({key:p.String({minLength:1,description:"Unique identifier for the tileset style."}),name:p.String({minLength:1,description:"Display name of the tileset style."}),url:p.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),eE=p.Object({default:p.Ref(ch,{description:"The default tileset style, which should be used."}),others:p.Optional(p.Array(p.Ref(ch,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),OO=p.Object({tileset:p.Ref(eE)},{$id:"TilesetExtensionSchema"}),tE={name:"ext:mvf-tileset",schema:OO,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[ch,eE],integrityCheck:Q3};l();var rE=p.Object({},{$id:"WalkableProperties"}),nE=p.Object({},{$id:"NonWalkableProperties"}),iE=Bt(p.Record(pr,p.Ref(rE),{$id:"WalkableGeometries",additionalProperties:!1})),oE=Bt(p.Record(pr,p.Ref(nE),{$id:"NonWalkableGeometries",additionalProperties:!1})),BO=p.Object({walkable:Bt(p.Record(ke,p.Ref(iE),{additionalProperties:!1})),nonwalkable:Bt(p.Record(ke,p.Ref(oE),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),PO=/^walkable\/(.*)\.json$/,MO=/^nonwalkable\/(.*)\.json$/,aE={name:"ext:mvf-traversability",schema:BO,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Qe(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Qe(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var a,u;let n=(a=e.match(PO))==null?void 0:a[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(u=e.match(MO))==null?void 0:u[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[rE,nE,iE,oE]};l();l();l();l();l();l();l();l();l();l();l();var RO=Xg(cE(),1);l();l();l();l();var Ple=lx().extendOptional(d3).extendOptional(K3).extendOptional(v3).extendOptional($3).extendOptional(aE).extendOptional(I3).extendOptional(F3).extendOptional(Y3).extendOptional(tE).extendOptional(N3).extendOptional(P3).extendOptional(fx).extendOptional(Ix).extendOptional(u3).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");l();l();var ph="\xA9 Mappedin",jO="https://info.mappedin.com/feedback",hh=["top-left","top-right","bottom-left","bottom-right"],UO=640,zO=o(()=>"<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>\n <circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/>\n <path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/>\n </svg>","getAttributionButtonIcon"),fh={custom:[],position:"bottom-right",feedback:!0},uu,gh=class gh{constructor(t,r={}){f(this,"controlContainerEl");f(this,"controlPositions");f(this,"compact");_(this,uu);f(this,"attribContainerEl");f(this,"attribInnerEl");f(this,"attribButtonEl");f(this,"feedbackLinkEl");f(this,"attribHTML",ph);f(this,"customAttributions",[]);f(this,"toggleAttribution",o(t=>{this.attribContainerEl!=null&&(t.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))},"toggleAttribution"));W(this,uu,!!r.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=hh.reduce((n,i)=>{let a=document.createElement("div");return a.classList.add("mappedin-ctrl-".concat(i)),this.controlContainerEl.appendChild(a),n[i]=a,n},{})}addAttributionControl(t=fh){var i;let r=t.position&&hh.includes(t.position)?t.position:fh.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(r)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=zO(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,uu)?ph:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((i=t.feedback)!=null?i:fh.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=jO,this.feedbackLinkEl.target="_blank",this.feedbackLinkEl.rel="noopener",this.feedbackLinkEl.textContent="Provide Feedback",this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner"),this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner-bold"),this.attribContainerEl.appendChild(this.feedbackLinkEl)),t.custom&&(this.customAttributions=t.custom),this.updateAttributionDisplay()}updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=s(this,uu)?[ph]:[],n=t.style.sourceCaches;for(let i in n){let a=n[i];if(a.used||a.usedForTerrain){let u=a.getSource();u.attribution&&r.indexOf(u.attribution)<0&&r.push(u.attribution)}}r=r.filter(i=>String(i).trim()),r=r.filter((i,a)=>{for(let u=a+1;u<r.length;u++)if(r[u].indexOf(i)>=0)return!1;return!0}),this.attribHTML=r.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let t=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=t)}resizeAttribution(t){this.attribContainerEl&&(t<=UO||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};uu=new WeakMap,o(gh,"HTMLControlsSystem");var Fm=gh;l();l();var dn=Object.freeze({Linear:Object.freeze({None:o(function(e){return e},"None"),In:o(function(e){return e},"In"),Out:o(function(e){return e},"Out"),InOut:o(function(e){return e},"InOut")}),Quadratic:Object.freeze({In:o(function(e){return e*e},"In"),Out:o(function(e){return e*(2-e)},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},"InOut")}),Cubic:Object.freeze({In:o(function(e){return e*e*e},"In"),Out:o(function(e){return--e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},"InOut")}),Quartic:Object.freeze({In:o(function(e){return e*e*e*e},"In"),Out:o(function(e){return 1- --e*e*e*e},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},"InOut")}),Quintic:Object.freeze({In:o(function(e){return e*e*e*e*e},"In"),Out:o(function(e){return--e*e*e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},"InOut")}),Sinusoidal:Object.freeze({In:o(function(e){return 1-Math.sin((1-e)*Math.PI/2)},"In"),Out:o(function(e){return Math.sin(e*Math.PI/2)},"Out"),InOut:o(function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))},"InOut")}),Exponential:Object.freeze({In:o(function(e){return e===0?0:Math.pow(1024,e-1)},"In"),Out:o(function(e){return e===1?1:1-Math.pow(2,-10*e)},"Out"),InOut:o(function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},"InOut")}),Circular:Object.freeze({In:o(function(e){return 1-Math.sqrt(1-e*e)},"In"),Out:o(function(e){return Math.sqrt(1- --e*e)},"Out"),InOut:o(function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},"InOut")}),Elastic:Object.freeze({In:o(function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},"In"),Out:o(function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},"Out"),InOut:o(function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)},"InOut")}),Back:Object.freeze({In:o(function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},"In"),Out:o(function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},"Out"),InOut:o(function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},"InOut")}),Bounce:Object.freeze({In:o(function(e){return 1-dn.Bounce.Out(1-e)},"In"),Out:o(function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},"Out"),InOut:o(function(e){return e<.5?dn.Bounce.In(e*2)*.5:dn.Bounce.Out(e*2-1)*.5+.5},"InOut")}),generatePow:o(function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:o(function(t){return Math.pow(t,e)},"In"),Out:o(function(t){return 1-Math.pow(1-t,e)},"Out"),InOut:o(function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5},"InOut")}},"generatePow")}),As=o(function(){return performance.now()},"now"),Om=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return o(e,"Group"),e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(r){return t._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var u=a[i];(t=u._group)===null||t===void 0||t.remove(u),u._group=this,this._tweens[u.getId()]=u,this._tweensAddedDuringUpdate[u.getId()]=u}},e.prototype.remove=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,r){t===void 0&&(t=As()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var a=this._tweens[n[i]],u=!r;a&&a.update(t,u)===!1&&!r&&this.remove(a)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),su={Linear:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=su.Utils.Linear;return t<0?a(e[0],e[1],n):t>1?a(e[r],e[r-1],r-n):a(e[i],e[i+1>r?r:i+1],n-i)},"Linear"),Bezier:o(function(e,t){for(var r=0,n=e.length-1,i=Math.pow,a=su.Utils.Bernstein,u=0;u<=n;u++)r+=i(1-t,n-u)*i(t,u)*e[u]*a(n,u);return r},"Bezier"),CatmullRom:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=su.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(i=Math.floor(n=r*(1+t))),a(e[(i-1+r)%r],e[i],e[(i+1)%r],e[(i+2)%r],n-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[r]-(a(e[r],e[r],e[r-1],e[r-1],n-r)-e[r]):a(e[i?i-1:0],e[i],e[r<i+1?r:i+1],e[r<i+2?r:i+2],n-i)},"CatmullRom"),Utils:{Linear:o(function(e,t,r){return(t-e)*r+e},"Linear"),Bernstein:o(function(e,t){var r=su.Utils.Factorial;return r(e)/r(t)/r(e-t)},"Bernstein"),Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var n=t;n>1;n--)r*=n;return e[t]=r,r}}(),CatmullRom:o(function(e,t,r,n,i){var a=(r-e)*.5,u=(n-t)*.5,c=i*i,m=i*c;return(2*t-2*r+a+u)*m+(-3*t+3*r-2*a-u)*c+a*i+t},"CatmullRom")}},lE=function(){function e(){}return o(e,"Sequence"),e.nextId=function(){return e._nextId++},e._nextId=0,e}(),yh=new Om,mE=function(){function e(t,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=dn.Linear.None,this._interpolationFunction=su.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=lE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=yh,yh.add(this))}return o(e,"Tween"),e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,r){if(t===void 0&&(t=As()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,r,n,i,a){for(var u in n){var c=t[u],m=Array.isArray(c),d=m?"array":typeof c,h=!m&&Array.isArray(n[u]);if(!(d==="undefined"||d==="function")){if(h){var g=n[u];if(g.length===0)continue;for(var v=[c],b=0,S=g.length;b<S;b+=1){var O=this._handleRelativeValue(c,g[b]);if(isNaN(O)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}v.push(O)}h&&(n[u]=v)}if((d==="object"||m)&&c&&!h){r[u]=m?[]:{};var x=c;for(var E in x)r[u][E]=x[E];i[u]=m?[]:{};var g=n[u];if(!this._isDynamic){var I={};for(var E in g)I[E]=g[E];n[u]=g=I}this._setupProperties(x,r[u],g,i[u],a)}else(typeof r[u]>"u"||a)&&(r[u]=c),m||(r[u]*=1),h?i[u]=n[u].slice().reverse():i[u]=r[u]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=As()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=As()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,r=this._chainedTweens.length;t<r;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=dn.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=su.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,r){var n=this,i;if(t===void 0&&(t=As()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=t-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),m=this._duration+this._repeat*c,d=o(function(){if(n._duration===0||u>m)return 1;var O=Math.trunc(u/c),x=u-O*c,E=Math.min(x/n._duration,1);return E===0&&u===n._duration?1:E},"calculateElapsedPortion"),h=d(),g=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var v=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=v);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*v,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,S=this._chainedTweens.length;b<S;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,r,n,i){for(var a in n)if(r[a]!==void 0){var u=r[a]||0,c=n[a],m=Array.isArray(t[a]),d=Array.isArray(c),h=!m&&d;h?t[a]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(t[a],u,c,i):(c=this._handleRelativeValue(u,c),typeof c=="number"&&(t[a]=u+(c-u)*i))}},e.prototype._handleRelativeValue=function(t,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?t+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(t){var r=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=r},e.autoStartOnUpdate=!1,e}();var Fme=lE.nextId,ei=yh,Ome=ei.getAll.bind(ei),Bme=ei.removeAll.bind(ei),Pme=ei.add.bind(ei),Mme=ei.remove.bind(ei),Tme=ei.update.bind(ei);l();l();l();l();l();var dE=o((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),pE=o((e,t)=>new Ie(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),bh=o((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),Fs=o((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),vh=o((e,t)=>new Ie((e.x+t.x)/2,(e.y+t.y)/2),"average"),xh=o(e=>{let t=0,{wheelDelta:r,detail:n}=e;return r!==void 0?t=r:n!==void 0&&(t=-n),t},"getScrollDelta");var Eh=class Eh{constructor(t,r){f(this,"input1");f(this,"input2");f(this,"lastAngle");f(this,"lastDistance");f(this,"totalDistance");f(this,"first");f(this,"second");this.input1=t,this.input2=r,this.lastAngle=bh(t,r),this.lastDistance=Fs(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let n=Fs(t,r);this.input1=t,this.input2=r;let i=bh(t,r);this.lastAngle=i,this.lastDistance=n,this.totalDistance+=(Fs(this.first,t)+Fs(this.second,r))/2,this.first=vh(this.first,t),this.second=vh(this.second,r)}};o(Eh,"InputSet");var Bm=Eh;l();var Ch=class Ch{constructor(t,r,n){f(this,"touch");f(this,"camera");f(this,"cameraPlane");f(this,"viewCoordinate");f(this,"snapHolderMatrix");f(this,"snapCamera");f(this,"cameraPosition");f(this,"raycaster");f(this,"worldCoordinate");f(this,"snapshotted",!1);this.touch=t,this.camera=r,this.cameraPlane=n,this.viewCoordinate={x:t.x,y:t.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let t=new Ie(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Ln,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var n,i;let t=new Ie(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(t,this.snapCamera);let r=(i=this.raycaster)==null?void 0:i.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};o(Ch,"TouchAnchor");var Os=Ch;var pn={};_i(pn,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>GO,CLIPPING_RADIUS:()=>Bs,CONTROL_OPTIONS:()=>$O,DEFAULT_ANIMATION_DURATION:()=>Ah,DEFAULT_BEARING:()=>KO,DEFAULT_MAX_ZOOM_LEVEL:()=>WO,DEFAULT_MIN_ZOOM_LEVEL:()=>Fh,DEFAULT_PITCH:()=>HO,DEFAULT_ZOOM_LEVEL:()=>VO,EVENTS:()=>km,MAPLIBRE_TILE_SIZE:()=>Pm,MAX_LAT:()=>Dh,MAX_MERCATOR_ZOOM_LEVEL:()=>Tm,MIN_LAT:()=>Ih,MIN_MERCATOR_ZOOM_LEVEL:()=>Mm,ROOM_MERCATOR_ZOOM_LEVEL:()=>ZO,TWO_PI:()=>Sh,WHEEL_ZOOM_MULTIPLIER:()=>wh,ZRANGE:()=>cu});l();var Pm=512,Ih=-85.051129,Dh=85.051129,Bs=1e4,$O={chain:"chain",cancel:"cancel"},Sh=Math.PI*2,cu=100,wh=1e4,Mm=0,Tm=24,GO=17,ZO=20,Ah=200,km=["change","pan-start","pan-end","rotate-start","rotate-end","zoom-start","zoom-end","multi-start","multi-end","multi-cancel","pedestal-start","pedestal-change","pedestal-end","user-pan-start","user-pedestal-start","user-rotate-start","user-dolly-start","user-zoom-start","user-tilt-start","user-pan-end","user-pedestal-end","user-rotate-end","user-dolly-end","user-zoom-end","user-tilt-end","position-updated","zoom-updated","tilt-updated","rotation-updated"],VO=18,Fh=12,WO=22,HO=0,KO=0;var _m=!1,qO=!1;var Lm,Rm=class Rm extends Te{constructor(r,n,i,a,u){super();f(this,"dirty",!1);f(this,"zoomDirty",!1);f(this,"rotationDirty",!1);f(this,"panDirty",!1);f(this,"stateDirty",!1);_(this,Lm,Fh);f(this,"zoomSpeed",5);f(this,"rotateSpeed",100);f(this,"enabled",!0);f(this,"enableZoom",!0);f(this,"enablePan",!0);f(this,"enablePedestal",!1);f(this,"maxPedestal",1/0);f(this,"minPedestal",0);f(this,"enableRotate",!0);f(this,"minZoomAltitude",0);f(this,"maxZoomAltitude",1/0);f(this,"ignoreZoomLimits",!1);f(this,"zoomFactor",1);f(this,"panBounds",{min:new ue(1/0,1/0),max:new ue(-1/0,-1/0),center:new ue(0,0,0),radius:1/0});f(this,"minTilt",0);f(this,"maxTilt",1.2);f(this,"MOUSE_BUTTONS",{ORBIT:bc.RIGHT,ZOOM:bc.MIDDLE,PAN:bc.LEFT});f(this,"camera");f(this,"scene");f(this,"renderer");f(this,"elevation");f(this,"orbit");f(this,"cameraPlane");f(this,"raycaster",new Ln);f(this,"rendererState");f(this,"options");f(this,"state",-1);f(this,"intersection");f(this,"viewState",null);f(this,"tweens",new Map);f(this,"clock",new hy(!0));f(this,"coords",{mouse:new Ie,rotateStart:new Ie,rotateEnd:new Ie,rotateDelta:new Ie,panStart:new ue,panCameraStart:new ue,panEnd:new ue,panDelta:new ue,initialShiftPos:new Ie,initialPedestal:0,floorAnchor:new ue});f(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});f(this,"scrollTimer",null);f(this,"lastWheelTime",0);f(this,"resetZoom",!1);f(this,"zoomStart");f(this,"pedestalScaleFactor",1);f(this,"isUserZooming",!1);f(this,"stayInsideBounds",!0);f(this,"userInteracting",!1);f(this,"cameraMoving",!1);f(this,"lastCameraMoveTime",Date.now());f(this,"raycastToFloor",o(r=>{this.raycaster.setFromCamera(r,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new ue},"raycastToFloor"));f(this,"isUserInteracting",o(()=>this.userInteracting,"isUserInteracting"));f(this,"getPosition",o(()=>new ue(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z),"getPosition"));f(this,"getPedestal",o(()=>this.orbit.position.z,"getPedestal"));f(this,"pan",o((r,n)=>{isNaN(r)||isNaN(n)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+n),this.publish("position-updated"))},"pan"));f(this,"postRender",o(()=>{(this.state===2||this.state===6)&&(this.raycaster.setFromCamera(this.coords.mouse,this.camera),this.intersection=this.raycaster.intersectObject(this.cameraPlane,!1)[0],this.intersection&&(this.coords.panStart.set(this.intersection.point.x,this.intersection.point.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0))),this.state===3&&this.resetZoom&&(this.resetZoom=!1,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0)),this.state===7&&this.isAnimating===!1&&(this.state=-1,this.publish("multi-end"))},"postRender"));f(this,"isCameraMoving",o(()=>this.cameraMoving,"isCameraMoving"));f(this,"lastCameraStoppedMovingTime",o(()=>this.lastCameraMoveTime,"lastCameraStoppedMovingTime"));f(this,"setPosition",o((r,n)=>{r===void 0||n===void 0||isNaN(r)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(r,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)},"setPosition"));f(this,"updateCameraPosition",o((r,n)=>{let i=r-this.panBounds.center.x,a=n-this.panBounds.center.y,u=Math.sqrt(i*i+a*a);if(this.stayInsideBounds&&u>this.panBounds.radius){let c=Math.atan2(a,i),m={x:Math.cos(c)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(c)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=m.x,this.orbit.position.y=m.y}else this.orbit.position.x=r,this.orbit.position.y=n},"updateCameraPosition"));f(this,"tilt",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+this.getTilt();n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end"),this.stateDirty=!0},"tilt"));f(this,"zoomIn",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a/1.5},r,n,i)},"zoomIn"));f(this,"zoomOut",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a*1.5},r,n,i)},"zoomOut"));f(this,"getRotation",o(()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2),"getRotation"));f(this,"cancelAnimation",o(()=>{let r=Array.from(this.tweens.keys());if(r.length<1)return;let n=r[r.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)},"cancelAnimation"));f(this,"animateCamera",o((r,n,i,a,u,c)=>{let m=R({interruptible:!0},c),d={},h={},g=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(d.x=g.x,h.x=r.position.x),r.position.y!==void 0&&(d.y=g.y,h.y=r.position.y),r.position.z!==void 0&&(d.z=g.z,h.z=r.position.z)),r.zoom!==void 0&&(d.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?h.zoom=r.zoom:h.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let{start:D,end:C}=Iy(this.getRotation(),r.rotation);d.rotation=D,h.rotation=C}r.tilt!==void 0&&(d.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?h.tilt=r.tilt:h.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let v=d.zoom!==h.zoom,b=d.rotation!==h.rotation,S=d.tilt!==h.tilt,O=new mE(d).to(h,y.env.TESTING?0:n).onUpdate(D=>{this.setMulti({x:D.x,y:D.y,z:D.z},D.zoom,D.rotation,D.tilt)}).onComplete(()=>{this.completeTween(O),this.publish("multi-end",{zooming:v,rotating:b,tilting:S}),a&&a()}).onStart(()=>{this.state!==7&&(this.state=7,O.state=7,this.publish("multi-start",{zooming:v,rotating:b,tilting:S})),this.publish("change")});this.rendererState.internalTweenGroup.add(O);let x=Array.from(this.tweens.entries()),E=x[x.length-1],I=!1;return E!=null&&(E[1].interruptible?(typeof E[1].cancelledCallback=="function"&&E[1].cancelledCallback(),this.completeTween(E[0])):(I=!0,E[0].chain(O))),this.tweens.set(O,{cancelledCallback:u,interruptible:m.interruptible}),i?O.easing(i):O.easing(dn.Quadratic.In),!r.doNotAutoStart&&!I&&(O.start(),this.publish("change")),O.cameraAnimation=!0,O},"animateCamera"));f(this,"setMulti",o((r,n,i,a,u=!0)=>{this.state===-1&&this.publish("multi-start");let c=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&r.y!==void 0&&!isNaN(r.y)&&(this.updateCameraPosition(r.x,r.y),c=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0,!1),c=!0)),c&&this.publish("position-updated");let m={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let d=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;d!==this.camera.position.z&&(m.zooming=!0,this.camera.position.z=d,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>Bs&&(this.camera.near=n-Bs,this.camera.far=n+Bs):(this.camera.near=n/cu,this.camera.far=n*cu),this.camera.updateProjectionMatrix())}if(i!==void 0&&!isNaN(i)&&i!==this.getRotation()&&(m.rotating=!0,this.orbit.rotation.z=-i,this.publish("rotation-updated")),a!==void 0&&!isNaN(a)){let d=this.stayInsideBounds?Math.max(Math.min(a,this.maxTilt),this.minTilt):a;d!==this.elevation.rotation.x&&(m.tilting=!0,this.elevation.rotation.x=d,this.publish("tilt-updated"))}u&&this.publish("change"),this.state===-1&&this.publish("multi-end",m),this.stateDirty=!0},"setMulti"));f(this,"getZoomScaledMin",o(()=>this.minZoomAltitude*this.zoomFactor,"getZoomScaledMin"));f(this,"getZoomScaledMax",o(()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)},"getZoomScaledMax"));f(this,"setRotation",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=-(r%Sh);i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,n||this.publish("rotation-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,this.rotationDirty=!0,n||(this.stateDirty=!0)},"setRotation"));f(this,"setZoomAltitude",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/cu,this.camera.far=n*cu,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0},"setZoomAltitude"));f(this,"setZoomLevel",o(r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))},"setZoomLevel"));f(this,"getZoomAltitude",o(()=>this.camera.position.z,"getZoomAltitude"));f(this,"getZoomLevel",o(()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()),"getZoomLevel"));f(this,"setTilt",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)},"setTilt"));f(this,"getTilt",o(()=>this.elevation.rotation.x,"getTilt"));f(this,"setCameraPlaneElevation",o(r=>{this.cameraPlane.position.z=r},"setCameraPlaneElevation"));f(this,"zoom",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-r;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(n,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):n,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.stateDirty=!0},"zoom"));f(this,"getProjectionScaleFactor",o((r,n,i)=>ip(r,n,i),"getProjectionScaleFactor"));f(this,"update",o(()=>{this.orbit.updateMatrixWorld(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())},"update"));f(this,"setPedestal",o((r,n=!1,i=!0)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,n&&(this.publishPedestalChangeEvent(r),this.publish("pedestal-change",{pedestal:r})),this.publish("change"),this.dirty=!0,i&&(this.stateDirty=!0))},"setPedestal"));f(this,"dispose",o(()=>{for(let r of km)r.endsWith("start")?(this.off(r,this.setCameraMoving),r.startsWith("user")&&this.off(r,this.setUserInteracting)):(r.endsWith("end")||r.endsWith("cancel"))&&(this.off(r,this.unsetCameraMoving),r.startsWith("user")&&this.off(r,this.unsetUserInteracting));this.removeEventListeners(),this.scene.remove(this.cameraPlane),this.destroy()},"dispose"));f(this,"createCameraPlane",o(()=>{let r=_m?2e3:1e10,n=_m?100:1,i=new yn(r,r,n,n),a=new cr({color:0,wireframe:_m,visible:_m}),u=new Oe(i,a);return this.scene.add(u),u},"createCameraPlane"));f(this,"addEventListeners",o(()=>{let{domElement:r}=this.renderer;for(let n of km)n.endsWith("start")?(this.on(n,this.setCameraMoving),n.startsWith("user")&&this.on(n,this.setUserInteracting)):(n.endsWith("end")||n.endsWith("cancel"))&&(this.on(n,this.unsetCameraMoving),n.startsWith("user")&&this.on(n,this.unsetUserInteracting));r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)},"addEventListeners"));f(this,"addMouseEventListeners",o(()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)},"addMouseEventListeners"));f(this,"addMouseMoveEventListeners",o(()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)},"addMouseMoveEventListeners"));f(this,"removeMouseMoveEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)},"removeMouseMoveEventListeners"));f(this,"removeEventListeners",o(()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeEventListeners"));f(this,"removeMouseUpEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeMouseUpEventListeners"));f(this,"onContextMenu",o(r=>{r.preventDefault()},"onContextMenu"));f(this,"onMouseUp",o(()=>{if(this.enabled!==!1){switch(this.removeMouseUpEventListeners(),this.state){case 2:this.publish("pan-end"),this.publish("user-pan-end");break;case 1:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}this.state=-1,this.panDirty=!1}},"onMouseUp"));f(this,"onMouseMove",o(r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(r)},"onMouseMove"));f(this,"onTouchStart",o(r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new Bm(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}},"onTouchStart"));f(this,"onTouchMove",o(r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let n=R({},this.touch.inputs.first),i=R({},this.touch.inputs.second),a=new Ie(this.touch.touches[0].x,this.touch.touches[0].y),u=new Ie(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let c=n.y<a.y&&i.y<u.y,m=n.y>a.y&&i.y>u.y;this.enableRotate&&this.state!==4&&(m||c)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}},"onTouchMove"));f(this,"onTouchEnd",o(r=>{if(this.enabled!==!1){switch(this.handleTouchEnd(),this.state){case 2:case 6:this.publish("user-pan-end");break;case 4:this.publish("pan-end"),this.publish("user-tilt-end");break;case 1:case 5:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:case 9:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}r.touches.length?this.onTouchStart(r):this.state=-1}},"onTouchEnd"));f(this,"handleTouchMovePan",o(r=>{let n=Object.hasOwn(r,"x")?new Ie(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panEnd.set(i.x,i.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0},"handleTouchMovePan"));f(this,"handleTouchStartDolly",o(()=>{let r=this.touch.touches[0].x-this.touch.touches[1].x,n=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let i=new Ie(this.touch.touches[0].x-r/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(i),this.orbit.updateMatrixWorld(),this.touch.anchor1=new Os(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new Os(this.touch.touches[1],this.camera,this.cameraPlane),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-dolly-start"),this.publish("zoom-start"),this.publish("multi-start")},"handleTouchStartDolly"));f(this,"handleMouseMovePan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0},"handleMouseMovePan"));f(this,"handleTouchStartTilt",o(r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")},"handleTouchStartTilt"));f(this,"handleTouchMovePedestal",o(r=>{this.handleMouseMovePedestal(r.touches[0])},"handleTouchMovePedestal"));f(this,"handleTouchMoveTilt",o(r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)},"handleTouchMoveTilt"));f(this,"handleTouchMoveDolly",o(()=>{let r=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let i=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);i&&this.setCameraFromTransformMatrix(i),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,n)},"handleTouchMoveDolly"));f(this,"handleTouchEnd",o(()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1},"handleTouchEnd"));f(this,"handleTouchStartPan",o(r=>{let n=Object.hasOwn(r,"x")?new Ie(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panStart.set(i.x,i.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")},"handleTouchStartPan"));f(this,"handleTouchStartPedestal",o(r=>{this.handleMouseDownPedestal(r.touches[0])},"handleTouchStartPedestal"));f(this,"onMouseDown",o(r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}},"onMouseDown"));f(this,"onMouseWheel",o(r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(r))},"onMouseWheel"));f(this,"handleMouseWheel",o(r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),i=n-xh(r)*n/wh*this.zoomSpeed;if(this.setZoomAltitude(i),this.enablePan){let a=i/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-a),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")},"handleMouseWheel"));f(this,"setCameraFromTransformMatrix",o(r=>{this.orbit.updateMatrixWorld();let n=new ia;n.setFromRotationMatrix(r,"ZYX");let i=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),a=n.z,u=new ue(0,0,1);u.applyEuler(n),u.setLength(i);let c=new ue;c.setFromMatrixPosition(r),c.sub(u),this.enablePan&&this.setPosition(c.x,c.y),this.enableZoom&&this.setZoomAltitude(i),this.enableRotate&&this.setRotation(-a)},"setCameraFromTransformMatrix"));f(this,"makeTransformFromTouchAnchors",o((r,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let i=this.camera.projectionMatrix.clone(),a=r.worldCoordinate,u=n.worldCoordinate,c=r.reUnproject(),m=n.reUnproject();if(!c||!m||!a||!u)return null;let d=r.viewCoordinate,h=n.viewCoordinate,g=u.x-a.x,v=u.y-a.y,b=Math.atan2(v,g),S=m.x-c.x,O=m.y-c.y,x=Math.atan2(O,S),E=dE(b,x),I=new _r;I.makeRotationZ(-E);let D=I.clone();D.multiply(r.snapHolderMatrix);let C=o((Z6,V6,W6)=>Z6.elements[(V6-1)*4+W6-1],"m"),A=C(i,1,1)*C(D,1,1)-d.x*C(i,3,4)*C(D,3,1),T=C(i,1,1)*C(D,1,2)-d.x*C(i,3,4)*C(D,3,2),k=C(i,1,1)*C(D,1,3)-d.x*C(i,3,4)*C(D,3,3),j=a.x*A+a.y*T+a.z*k,U=C(i,2,2)*C(D,2,1)-d.y*C(i,3,4)*C(D,3,1),G=C(i,2,2)*C(D,2,2)-d.y*C(i,3,4)*C(D,3,2),$=C(i,2,2)*C(D,2,3)-d.y*C(i,3,4)*C(D,3,3),X=a.x*U+a.y*G+a.z*$,V=C(i,1,1)*C(D,1,1)-h.x*C(i,3,4)*C(D,3,1),Y=C(i,1,1)*C(D,1,2)-h.x*C(i,3,4)*C(D,3,2),oe=C(i,1,1)*C(D,1,3)-h.x*C(i,3,4)*C(D,3,3),Z=u.x*V+u.y*Y+u.z*oe,ee=C(i,2,2)*C(D,2,1)-h.y*C(i,3,4)*C(D,3,1),te=C(i,2,2)*C(D,2,2)-h.y*C(i,3,4)*C(D,3,2),Q=C(i,2,2)*C(D,2,3)-h.y*C(i,3,4)*C(D,3,3),de=u.x*ee+u.y*te+u.z*Q,je=Math.abs(V-A),Me=Math.abs(Y-T),Ve=Math.abs(oe-k),qe=Math.abs(V-U),Ae=Math.abs(Y-G),ot=Math.abs(oe-$),Pt=Math.abs(ee-A),Ht=Math.abs(te-T),F=Math.abs(Q-k),q=Math.abs(ee-U),B=Math.abs(te-G),ae=Math.abs(Q-$),J=Math.min(je+Me+Ve,qe+Ae+ot),re=Math.min(Pt+Ht+F,q+B+ae);J<re&&(V=ee,Y=te,oe=Q,Z=de);let Ce=U*k-A*$,bt=G*k-T*$,ye=X*k-j*$,le=V*$-U*oe,He=Y*$-G*oe,Wr=Z*$-X*oe,Ou=(Wr*bt-ye*He)/(le*bt-Ce*He),Bu=(Wr*Ce-ye*le)/(He*Ce-bt*le),na=G*A-T*U,z6=$*A-k*U,$6=X*A-j*U,qg=Y*U-G*V,G6=oe*U-$*V,Jg=((Z*U-X*V)*na-$6*qg)/(G6*na-z6*qg),gc=D.clone();return gc.elements[12]=Ou,gc.elements[13]=Bu,gc.elements[14]=Jg,Jg>0?gc:null},"makeTransformFromTouchAnchors"));f(this,"updateTouchOrigin",o(()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top},"updateTouchOrigin"));f(this,"touchToScene",o(r=>{this.touch.touches=[];for(let n=0,i=r.touches.length;n<i;n++){let a=r.touches[n],u=pE(a,this.touch.origin);this.touch.touches.push(new Ie(u.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(u.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]},"touchToScene"));f(this,"canScrollZoom",o(r=>{let n=xh(r),i=this.getZoomAltitude();return!(n<0&&i===this.getZoomScaledMax()||n>0&&i===this.getZoomScaledMin())},"canScrollZoom"));f(this,"mouseToScene",o(r=>{let n=this.getMousePos(r);return this.coords.mouse.x=n.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(n.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse},"mouseToScene"));f(this,"getMousePos",o(r=>({x:r.offsetX,y:r.offsetY}),"getMousePos"));f(this,"handleMouseDownRotate",o(r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")},"handleMouseDownRotate"));f(this,"handleMouseDownPan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")},"handleMouseDownPan"));f(this,"handleMouseDownPedestal",o(r=>{let n=new Ie(r.clientX,r.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=ip(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")},"handleMouseDownPedestal"));f(this,"handleMouseMovePedestal",o(r=>{let n={x:r.clientX,y:r.clientY},i=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(i<this.minPedestal?i=Math.max(i,this.minPedestal):i>this.maxPedestal&&(i=Math.min(i,this.maxPedestal))),i!==this.getPedestal()&&this.setPedestal(i,!0)},"handleMouseMovePedestal"));f(this,"handleMouseMoveRotate",o(r=>{this.coords.rotateEnd.set(r.clientX,r.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setRotation(this.getRotation()+this.coords.rotateDelta.x/this.rotateSpeed),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd),this.publish("change")},"handleMouseMoveRotate"));f(this,"publishUserZoomDebounced",ju(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));f(this,"publishUserZoomEvent",o(()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())},"publishUserZoomEvent"));f(this,"setCameraMoving",o(()=>{this.cameraMoving=!0},"setCameraMoving"));f(this,"unsetCameraMoving",o(()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()},"unsetCameraMoving"));f(this,"setUserInteracting",o(()=>{this.userInteracting=!0},"setUserInteracting"));f(this,"unsetUserInteracting",o(()=>{this.userInteracting=!1},"unsetUserInteracting"));f(this,"publishPedestalChangeEvent",o(r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})},"publishPedestalChangeEvent"));f(this,"convertAltitudeToZoomLevel",o(r=>{let[,n]=this.center,i=this.computeMetersPerPixelFromAltitude(r),a=Math.cos(Fe.degToRad(n))*2*Math.PI*Qd/i;return Fe.clamp(Math.log2(a/512),Mm,Tm)},"convertAltitudeToZoomLevel"));f(this,"convertZoomLevelToAltitude",o(r=>this.computeMetersPerPixelFromZoomLevel(r)*this.options.canvasHeight/2/Math.tan(Fe.degToRad(this.camera.fov)/2),"convertZoomLevelToAltitude"));f(this,"completeTween",o(r=>{r.isPlaying()&&r.stop(),this.rendererState.internalTweenGroup.remove(r),this.tweens.delete(r)},"completeTween"));f(this,"debugContainer",new xo);this.camera=r,this.renderer=i,this.rendererState=a,this.scene=n,this.options=u,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,u.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,Lm)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get scrollPercent(){let r=this.minPedestal,n=this.maxPedestal,i=this.getPedestal();return i=Math.min(i,n),i=Math.max(i,r),(i-r)/(n-r)*100}get fov(){return this.camera.fov}get scrolledToBottom(){return this.minPedestal===0||Math.floor(this.getPedestal())<=this.minPedestal}get scrolledToTop(){return this.maxPedestal===0||Math.ceil(this.getPedestal())>=this.maxPedestal}get center(){var a,u,c,m;let r=this.getPosition(),{lat:n,lon:i}=Rc((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(m=(c=this.rendererState.center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n]}setCenter(r,n){var u,c,m,d;let{x:i,y:a}=Nc((c=(u=this.rendererState.center)==null?void 0:u[1])!=null?c:0,(d=(m=this.rendererState.center)==null?void 0:m[0])!=null?d:0,n,r);this.setPosition(i,a)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(r=>r.cameraAnimation)}getCameraFrameForCoordinates(r,n){var v,b;let i=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,a=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,u=this.options.canvasWidth,c=this.options.canvasHeight,m=this.getRotation(),d=this.getTilt(),h=this.getPosition();this.setRotation((v=n.rotation)!=null?v:m,!0),this.setTilt((b=n.tilt)!=null?b:d,!0);let g=fE(r,{canvasWidth:u,canvasHeight:c,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:i,maxZoom:a,position:h,camera:this.camera,orbit:this.orbit});return this.setRotation(m,!0),this.setTilt(d,!0),{center:g.position,zoomLevel:this.convertAltitudeToZoomLevel(g.zoom)}}focusOn(r,n){if(qO){this.debugContainer&&Rt(this.debugContainer);let x=new Ri(4,4,4),E=new cr({color:65280,depthTest:!1}),I=new _n(x,E,r.length),D=new _r;r.forEach((C,A)=>{D.setPosition(C),I.setMatrixAt(A,D)}),I.instanceMatrix.needsUpdate=!0,this.debugContainer.add(I),this.scene.add(this.debugContainer)}let i=n.curve,a=n.callback,u=n.cancelledCallback,c=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,d=this.options.canvasWidth,h=this.options.canvasHeight,g;n.duration!==void 0?g=n.duration:y.env.TESTING==="true"?g=0:g=Ah;let v=n.padding,b=this.getRotation(),S=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let O=fE(r,{canvasHeight:h,paddingOption:v,canvasWidth:d,minZoom:c,maxZoom:m,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(b),this.setTilt(S),this.animateCamera({position:O.position,tilt:n.tilt,rotation:n.rotation,zoom:O.zoom},g,i,a,u,n)}resize(r,n){this.options.canvasWidth=r,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(r){let[,n]=this.center,i=Fe.clamp(r,Mm,Tm),a=Math.pow(2,i),u=Fe.clamp(n,Ih,Dh),c=a*512;return Math.cos(Fe.degToRad(u))*Math.PI*2*Qd/c}computeMetersPerPixelFromAltitude(r){return r*2*Math.tan(Fe.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};Lm=new WeakMap,o(Rm,"CameraSystem"),f(Rm,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);var lu=Rm;function fE(e,{canvasWidth:t,orbit:r,paddingOption:n,verticalPadding:i=0,canvasHeight:a,minZoom:u,maxZoom:c,camera:m,position:d}){let h={zoom:u,position:d};if(e.length===0)return h;for(let Ce of lu.CAMERA_FRAME_PADDING_SIDES)typeof n[Ce]!="number"&&(n[Ce]=0);let g=n.type==="portion"?{top:n.top*a,bottom:n.bottom*a,left:n.left*t,right:n.right*t,type:"pixel"}:n;if(g.left+g.right>=t||g.top+g.bottom>=a)return h;r.updateMatrixWorld();let v=m.matrixWorldInverse,b=m.fov*(Math.PI/180)/2,S=b,x=Math.atan(Math.tan(b)*(t/a)),E=new ue(1/0,1/0,1/0),I=new ue(-1/0,-1/0,-1/0),D=new Qt,C=new ue;for(let Ce=0,bt=e.length;Ce<bt;Ce++)C.copy(e[Ce]),D.expandByPoint(C),C.applyMatrix4(v),E.min(C),I.max(C),C.copy(e[Ce]),C.z-=i,C.applyMatrix4(v),E.min(C),I.max(C),C.copy(e[Ce]),C.z+=i,C.applyMatrix4(v),E.min(C),I.max(C);let A=I.x-E.x,T=I.y-E.y,k=t-g.left-g.right,j=a-g.top-g.bottom,U=(I.x+E.x)/2,G=(I.y+E.y)/2,$=A/k,X=T/j,V=u,Y=c,oe=V*Math.tan(x)*2,Z=Y*Math.tan(x)*2,ee=oe/t,te=Z/t,Q=Math.max($,X);Q=Fe.clamp(Q,ee,te);let de=k*Q,je=j*Q,Me={min:{x:U-de/2-g.left*Q,y:G-je/2-g.bottom*Q},max:{x:U+de/2+g.right*Q,y:G+je/2+g.top*Q}},Ve=(Me.min.x+Me.max.x)/2,qe=(Me.min.y+Me.max.y)/2,Ae=D.getCenter(new ue),ot=Math.abs(Ve-Me.min.x),Pt=Math.abs(qe-Me.min.y),Ht=ot/Math.tan(x),F=Pt/Math.tan(S),q=new ue;q.set(Ve,qe,I.z+Math.max(Ht,F)),q.applyMatrix4(m.matrixWorld);let B=new ue;B.set(Ve,qe,I.z),B.applyMatrix4(m.matrixWorld);let ae=new ue().subVectors(B,q),J=(Ae.z-q.z)/ae.z,re=new ue().copy(q).add(ae.clone().multiplyScalar(J));return B.set(re.x,re.y,re.z),q.sub(B),{position:re,zoom:q.length()}}o(fE,"getCameraFrameForPoints");var JO=0,XO=90,YO=(y.env.NODE_ENV==="test",!1),Nm={linear:dn.Linear.None,"ease-in":dn.Quadratic.In,"ease-out":dn.Quadratic.Out,"ease-in-out":dn.Quadratic.InOut},QO=-50,me,be,Fi,Ps,Ms,Bh,Ph=class Ph{constructor(t,r,n){_(this,Ms);_(this,me);_(this,be);_(this,Fi);_(this,Ps);W(this,me,t),W(this,be,r),W(this,Fi,n),s(this,me).map&&s(this,me).map.transform.setMinElevationForCurrentTile(QO),s(this,be).cameraSystem.on("pedestal-change",({pedestal:i})=>{s(this,be).cameraSystem.setCameraPlaneElevation(i)})}get center(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map).getCenter)==null?void 0:r.call(t).toArray():s(this,be).cameraSystem.center}setCenter(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setCenter(t),s(this,be).interactionSystem.handleHover();return}s(this,be).cameraSystem.setCenter(t[0],t[1]),s(this,be).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getZoom():s(this,be).cameraSystem.getZoomLevel()}setZoomLevel(t){var r;s(this,me).mode==="outdoors-overlay"&&s(this,me).map&&((r=s(this,me).map)==null||r.setZoom(t)),s(this,be).cameraSystem.setZoomLevel(Rn(t,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits."))}getState(){return{zoomLevel:this.zoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,minPitch:this.minPitch,maxPitch:this.maxPitch,autoMinZoomLevel:this.autoMinZoomLevel,panMode:this.panMode,screenOffsets:this.insetsPadding,center:this.center,bearing:this.bearing,pitch:this.pitch,elevation:this.elevation}}get isAnimating(){return s(this,be).cameraSystem.isAnimating}cancelAnimation(){s(this,be).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,be).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,be).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,be).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,be).panBoundsSystem.dirty=!0,s(this,be).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,be).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,r=!1){var i;r&&this.setAutoMinZoomLevel(!1);let n=Rn(t,pn.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(pn.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,be).cameraSystem.setMinZoomLevel(n),this.zoomLevel<n&&this.setZoomLevel(n),(i=s(this,me).map)==null||i.setMinZoom(n)}setMaxZoomLevel(t){var n;let r=Rn(t,this.minZoomLevel,pn.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(pn.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,be).cameraSystem.setMaxZoomLevel(r),this.zoomLevel>r&&this.setZoomLevel(r),(n=s(this,me).map)==null||n.setMaxZoom(r)}get maxPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMaxPitch)==null?void 0:r.call(t):Fe.radToDeg(s(this,be).cameraSystem.maxTilt)}get minPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMinPitch)==null?void 0:r.call(t):Fe.radToDeg(s(this,be).cameraSystem.minTilt)}setMinPitch(t){var n;let r=Math.max(JO,t);(n=s(this,me).map)==null||n.setMinPitch(r),s(this,be).cameraSystem.minTilt=Fe.degToRad(r)}setMaxPitch(t){var n;let r=Math.min(XO,t);(n=s(this,me).map)==null||n.setMaxPitch(r),s(this,be).cameraSystem.maxTilt=Fe.degToRad(r)}get bearing(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getBearing():Fe.radToDeg(s(this,be).cameraSystem.getRotation())}setBearing(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setBearing(t);return}s(this,be).cameraSystem.setRotation(Fe.degToRad(t))}get pitch(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getPitch():Fe.radToDeg(s(this,be).cameraSystem.getTilt())}setPitch(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setPitch(t);return}s(this,be).cameraSystem.setTilt(Fe.degToRad(Rn(t,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")))}get elevation(){return s(this,be).cameraSystem.getPedestal()}setElevation(t){s(this,be).cameraSystem.setPedestal(t,!0)}animateElevation(t,r){return s(this,Ps)&&s(this,Ps).stop(),new Promise(n=>{var i;s(this,be).cameraSystem.animateCamera({position:{z:t}},(r==null?void 0:r.duration)||300,Nm[(r==null?void 0:r.easing)||"ease-in-out"],n,n,{interruptible:(i=r==null?void 0:r.interruptible)!=null?i:!0})})}get insetsPadding(){return s(this,Fi).insetsPadding}get panMode(){return s(this,be).cameraSystem.enablePan===!1&&s(this,be).cameraSystem.enablePedestal===!0?"elevation":"default"}setPanMode(t){if(t!=="default"&&t!=="elevation")throw new Error("Invalid pan mode");t!==this.panMode&&(t==="default"?(s(this,be).cameraSystem.enablePan=!0,s(this,be).cameraSystem.enablePedestal=!1):(s(this,be).cameraSystem.enablePan=!1,s(this,be).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Fi).insetsPadding=Object.assign({},s(this,Fi).insetsPadding,t)}animateTo(t){var u,c,m,d,h,g;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map)return(g=s(this,me).map)==null||g.flyTo({center:(u=t.center)!=null?u:this.center,zoom:(c=t.zoomLevel)!=null?c:this.zoomLevel,bearing:(m=t.bearing)!=null?m:this.bearing,pitch:(d=t.pitch)!=null?d:this.pitch,duration:(h=t.duration)!=null?h:600}),Promise.resolve();let r=t.center?s(this,me).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0,n=t.zoomLevel!==void 0?s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.zoomLevel,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits.")):void 0,i=t.bearing!==void 0?Fe.degToRad(t.bearing):void 0,a=t.pitch!==void 0?Fe.degToRad(Rn(t.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0;return new Promise(v=>{var b;s(this,be).cameraSystem.animateCamera({position:r,zoom:n,rotation:i,tilt:a},t.duration||0,Nm[t.easing||"ease-in-out"],()=>{s(this,be).interactionSystem.handleHover(),v()},v,{interruptible:(b=t==null?void 0:t.interruptible)!=null?b:!0})})}getCameraFrameForCoordinates(t,r){let n=dt(this,Ms,Bh).call(this,r||{},()=>Promise.resolve()),{pointCloud:i}=hE(t,s(this,me),s(this,Fi).geometry3DMap);if(i.length===0)return De.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};let{center:a,zoomLevel:u}=s(this,be).cameraSystem.getCameraFrameForCoordinates(i,n);return{center:s(this,me).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,r){var u,c,m,d;let{pointCloud:n,geoBounds:i,firstPosition:a}=hE(t,s(this,me),s(this,Fi).geometry3DMap);return n.length===0?(De.error("No valid coordinates found in targets:",t),Promise.resolve()):s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(n.length===1&&a?(u=s(this,me).map)==null||u.flyTo({center:[a[0],a[1]],duration:(r==null?void 0:r.duration)||s(this,me).map.getBearing(),animate:!0,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,zoom:(r==null?void 0:r.maxZoomLevel)||s(this,me).map.getMaxZoom()}):(YO&&eB(s(this,me),i),(d=s(this,me).map)==null||d.fitBounds(i,{duration:(c=r==null?void 0:r.duration)!=null?c:pn.DEFAULT_ANIMATION_DURATION,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,maxZoom:(m=r==null?void 0:r.maxZoomLevel)!=null?m:s(this,me).map.getMaxZoom()})),s(this,be).interactionSystem.handleHover(),Promise.resolve()):new Promise(h=>{s(this,be).cameraSystem.focusOn(n,dt(this,Ms,Bh).call(this,r||{},h))})}};me=new WeakMap,be=new WeakMap,Fi=new WeakMap,Ps=new WeakMap,Ms=new WeakSet,Bh=o(function(t,r){var n;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(t==null?void 0:t.minZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:t!=null&&t.padding?Object.assign({},Lc,t==null?void 0:t.padding):this.insetsPadding,curve:Nm[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:Fe.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?Fe.degToRad(Rn(t.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0,duration:t==null?void 0:t.duration,callback:o(()=>{s(this,be).interactionSystem.handleHover(),r()},"callback"),cancelledCallback:r,interruptible:(n=t==null?void 0:t.interruptible)!=null?n:!0,verticalPadding:t==null?void 0:t.verticalPadding}},"#convertToLegacy"),o(Ph,"Camera");var jm=Ph;function Oh(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}o(Oh,"updateBounds");function hE(e,t,r){var c;let n=[],i=[1/0,1/0,-1/0,-1/0],a=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:i,firstPosition:a};let u=t.getSystems().renderSystem;for(let m of e)if(typeof m=="string"){(u.threeDdirty||u.twoDdirty)&&t.renderSync();let d=r.get(m);if(!d){De.error("Entity not found with id:",m);continue}let h=new Qt;My(t,"userData"in d&&(c=d.userData.entityId)!=null?c:d.id,n,h,d instanceof Ut?d.position.z:void 0);let g=t.convert3DMapPositionToCoordinate(h.min),v=t.convert3DMapPositionToCoordinate(h.max);Oh(i,g),Oh(i,v),a||(a=t.convert3DMapPositionToCoordinate(h.getCenter(new ue)))}else n.push(t.convertTo3DMapPosition(m[1],m[0],m[2]||0)),Oh(i,m),a||(a=m);return{pointCloud:n,geoBounds:i,firstPosition:a}}o(hE,"processTargets");function eB(e,t){var n,i,a,u;let r=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(i=e.map)!=null&&i.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(a=e.map)==null||a.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:r}}}),(u=e.map)==null||u.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}o(eB,"drawBounds");var Mh="";var mu=!1,tB=150,kh=class kh extends Te{constructor(r,n,i=!0){super();f(this,"worker");f(this,"debugContext");f(this,"debugCanvas");f(this,"collidersDirty",!0);f(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);f(this,"visibleCollidersQTree",new qr(new Se(0,0,0,0)));f(this,"interactiveCollidersQTree",new qr(new Se(0,0,0,0)));f(this,"coreState");f(this,"postMessage");f(this,"showCollisionBoxes",o(()=>{mu=!0,this.debugCanvas.style.display="block"},"showCollisionBoxes"));f(this,"hideCollisionBoxes",o(()=>{mu=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"},"hideCollisionBoxes"));f(this,"currentMsgId","");f(this,"working",!1);f(this,"_postMessage",o(()=>{this.worker.postMessage(this.packedMessage)},"_postMessage"));f(this,"componentArray",[]);f(this,"update",o((r,n,i="bottom-left",a=!1,u=[])=>{let c=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let h;for(let g of this.coreState.geometry2DIdsInScene){let v=this.coreState.geometry2DMap.get(g);v&&(h=v.components[0],this.componentArray.push(h))}this.resize(r,n,i),this.collidersDirty=!1,c=!0}else c=this.componentArray.some(h=>h.collisionDirty===!0);c&&this.componentArray.sort((h,g)=>g.rank-h.rank);let m=0;for(let h of u)this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=[[h.h/2,h.h/2,h.w/2,h.w/2,hp]],this.packedMessage[0][m][1]=1,this.packedMessage[0][m][2]=1,this.packedMessage[0][m][3]=h.x,this.packedMessage[0][m][4]=h.y,this.packedMessage[0][m][5]=0,this.packedMessage[0][m][6]=-1,m++;let d=0;for(;m<this.componentArray.length+u.length;){if(this.packedMessage){let h=this.componentArray[d].toPackedMessage(a&&!c);this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=h.bboxes,this.packedMessage[0][m][1]=h.enabled&&this.componentArray[d].visible&&!this.componentArray[d].isOccluded?1:0,this.packedMessage[0][m][2]=h.rank===la?1:0,this.packedMessage[0][m][3]=h.x,this.packedMessage[0][m][4]=h.y,this.packedMessage[0][m][5]=h.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][m][6]=h.lockedToStrategyIndex}m++,d++}this.working||this.postMessage()},"update"));f(this,"resolve",o(r=>{if(this.working=!1,this.collidersDirty||!r.data)return;let n=r.data.colliders,i=-1,a,u,c,m=new Se(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new qr(m),this.interactiveCollidersQTree=new qr(m),mu)for(let d of r.data.staticColliders)this.visibleCollidersQTree.insert(new Se(d.x,d.y,d.w,d.h));for(let d=0;d<this.componentArray.length;d++){let h=this.componentArray[d];n[d]!=null&&(i=n[d][0],a=n[d][2],h.offscreen=n[d][1]===1,i!==-1&&a!=null?(c=new Se(a.x,a.y,a.w,a.h,{entityId:h.id}),this.visibleCollidersQTree.insert(c),u=this.coreState.geometry2DMap.get(h.id),(u==null?void 0:u.components[1])!=null&&this.interactiveCollidersQTree.insert(c),(h.canShow===!1||h.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate="show"),i!==-1&&i!==h.currentStrategyIndex&&(h.activeBoundingBox=c,h.onStrategySelected(i))):((h.canShow===!0||h.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate="hide"),i!==-1&&i!==h.currentStrategyIndex&&h.onStrategySelected(i)))}mu&&this.drawDebug(),this.publish("visibility-changed")},"resolve"));f(this,"drawDebug",o(()=>{mu&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))},"drawDebug"));f(this,"destroy",o(()=>{this.worker.terminate()},"destroy"));this.worker=i===!1?new $u:Mh!==""?new Worker(Mh):new Worker(URL.createObjectURL(new Blob([E4],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new $u,this.worker.onmessage=a=>this.resolve(a)},this.coreState=n,this.debugCanvas=r,this.debugContext=r.getContext("2d"),this.worker.onmessage=a=>this.resolve(a),this.postMessage=S4(this._postMessage,tB,!1),mu?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(r,n,i){this.packedMessage[6]=i,this.packedMessage[5]=n,this.packedMessage[4]=r,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};o(kh,"CollisionSystem");var Um=kh;l();l();l();l();var Lh=class Lh{constructor(t){f(this,"type");f(this,"event");this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};o(Lh,"Tap");var zm=Lh,Rh=class Rh{constructor(){f(this,"taps",[])}add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};o(Rh,"TapsController");var $m=Rh;l();function Nh(e){let t=new Set;for(let r of e){let n=r.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!t.has(n.parent);)n=n.parent,n instanceof Ut&&n.type==="group-container"&&n.visible&&n.components[0]&&t.add(n)}return Array.from(t)}o(Nh,"getUniqueIntersectedGroupContainers");var du,jh=class jh extends Te{constructor(r,n,i,a,u){super();f(this,"raycaster",new Ln);f(this,"state",{hovered3DEntity:void 0,hovered2DEntity:void 0,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});f(this,"coreState");f(this,"camera");f(this,"worldPlane");f(this,"_quadtree",new qr(new Se(0,0,0,0)));f(this,"_container");f(this,"lastPointerEvent");f(this,"cursor","grab");f(this,"touchesCount",0);f(this,"isUserInteracting");f(this,"hasTouched",!1);_(this,du);f(this,"onPointerMoveRaf",o(r=>{this.lastPointerEvent=r,s(this,du)&&cancelAnimationFrame(s(this,du)),W(this,du,requestAnimationFrame(()=>{this.onPointerMove(r)}))},"onPointerMoveRaf"));f(this,"onPointerMove",o(r=>{r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor()},"onPointerMove"));f(this,"tapsControl",new $m);f(this,"onPointerDown",o(r=>{r.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:r.timeStamp,offsetX:r.offsetX,offsetY:r.offsetY},this.lastPointerEvent=r,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&(this.tapsControl.add(new zm(r)),this.touchesCount=Math.max(0,this.touchesCount+1)))},"onPointerDown"));f(this,"clickTimeout");f(this,"onPointerUp",o(r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this.lastPointerEvent=r,this.touchesCount=Math.max(0,this.touchesCount-1),this.touchesCount===0&&(this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)),this.updateInteractionStateIfPanning(r);let{mouseDownStart:n}=this.state.interaction;!n||this.state.interaction.distanceFromMouseDown==null||(Date.now()<n.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(r.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())},"onPointerUp"));f(this,"dirty3D",!0);f(this,"cachedHitBoxes",{entities:[]});f(this,"ndcPoint",new Ie);f(this,"debugPanel");this.isUserInteracting=u,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=i,this._container=r,this.coreState=n,this.worldPlane=a,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}getThreeDIntersectsFromXY(r){this.raycaster.setFromCamera(r,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(a=>{var u,c;return((u=a.object)==null?void 0:u.name)==="worldPlane"||((c=a.object)==null?void 0:c.visible)}),i=n.findIndex(a=>{var u;return((u=a.object)==null?void 0:u.name)==="worldPlane"});return i!==-1&&n.push(n.splice(i,1)[0]),n}getGroupContainerIntersectsFromXY(r){let n=this.getThreeDIntersectsFromXY(r),i;return n!=null&&n.length>0&&(i=Nh(n)),i}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){let n=r||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserInteracting())return;let{entity3D:i,entity2D:a,position:u,groupContainers:c}=this.intersect(n);(this.detect3DEntityHover(i)||this.detect2DEntityHover(a)||this.detect3DContainerHover(c))&&(this.state.hovered3DEntity=i,this.state.lastHover=i,this.state.hovered2DEntity=a,this.state.hovered3DContainers=c,this.publish("hover",{entity2D:this.state.hovered2DEntity,entity3D:this.state.hovered3DEntity,position:u,groupContainers:c})),this.handleCursor()}handleCursor(){var u;let r=!!(this.state.hovered3DEntity&&((u=this.state.hovered3DEntity)!=null&&u.components[2])||this.state.hovered2DEntity),n=!!this.state.interaction.mouseDownStart,i=this.state.interaction.isPanning,a=iB(r,i,n);this.cursor!==a&&(this.cursor=a,a==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(r){return this.state.hovered2DEntity!==r}handleClick(r){let n=this.intersect(r);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let r;for(let n of this.coreState.geometry3DIdsInScene)r=this.coreState.geometry3DMap.get(n),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model"||(r==null?void 0:r.type)==="path"||(r==null?void 0:r.type)==="custom-geometry")&&r.components[0].mesh&&!this.cachedHitBoxes.entities.includes(r.components[0].mesh)&&this.cachedHitBoxes.entities.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var E,I,D,C,A;let{offsetX:n,offsetY:i}=r,a=[n,i],u=this._quadtree.queryPoint(a),[c]=u.filter(T=>T.intersectsPoint(a));this.ndcPoint.x=n/this._container.clientWidth*2-1,this.ndcPoint.y=-(i/this._container.clientHeight)*2+1;let m=this.getThreeDIntersectsFromXY(this.ndcPoint),d=(E=m[0])==null?void 0:E.point,h=[],g=[],v=m.filter(T=>T.object.name!=="worldPlane");for(let T of v)T.object instanceof Oe&&T.object.material.depthTest===!1?h.push(T):g.push(T);let b=(D=(I=h[0])!=null?I:g[0])!=null?D:void 0,S,O;if(b!=null){if(S=aB(b.object,this.coreState.geometry3DMap),!S){let T=(C=b==null?void 0:b.instanceId)!=null?C:b==null?void 0:b.batchId;S=T!=null&&(b!=null&&b.object.userData.entities)?this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entities[T]):this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entityId)}S!=null&&S.components[2]&&(O=S)}let x=Nh(v);return{entity2D:((A=c==null?void 0:c.userData)==null?void 0:A.entityId)==="watermark"?{id:"watermark"}:this.coreState.geometry2DMap.get(c==null?void 0:c.userData.entityId),entity3D:O,position:d,groupContainers:x.length>0?x:void 0}}detect3DEntityHover(r){return this.state.lastHover!==r&&(this.state.lastHover&&EE(this.state.lastHover,!1,this.coreState),r&&EE(r,!0,this.coreState)),this.state.hovered3DEntity!==r}detect3DContainerHover(r){return!Ey(this.state.hovered3DContainers,r)}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.offsetX-this.state.interaction.mouseDownStart.offsetX,2)+Math.pow(r.offsetY-this.state.interaction.mouseDownStart.offsetY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.worldPlane],!1)}destroy(){this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",n=>{var i,a,u;this.queueDebugMessage("CLICK \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.id," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var i,a,u;this.queueDebugMessage("HOVER \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.id," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,n){var a;let i=document.createElement("pre");i.style.maxWidth="300px",i.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",i.style.backgroundColor=n,i.textContent=r,(a=this.debugPanel)==null||a.prepend(i),setTimeout(()=>{i.style.opacity="0",setTimeout(()=>{i.remove()},500)},2500)}getCursor(){return this.cursor}};du=new WeakMap,o(jh,"InteractionSystem");var Ts=jh;function EE(e,t,r){var u;let n=e.components[2];n&&n.hover!==!0&&(n.hover=t?"user-interaction":!1,n.dirty=!0);let i=(u=e.components[0].textMesh)==null?void 0:u.userData.entityId;if(!i)return;let a=r.geometry3DMap.get(i);(a==null?void 0:a.type)==="text3d"&&(a.components[1].hoverByPolygon=t,a.components[1].dirty=!0)}o(EE,"updateHover");function iB(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}o(iB,"processCursor");function oB(e){let t=e;for(;t!=null&&t.parent;){if(t instanceof ji)return;if(t.userData.isSingleModel)return t;t=t.parent}}o(oB,"findModelParent");function aB(e,t){let r=oB(e);return r?t.get(r.userData.entityId):void 0}o(aB,"findModelParentEntity");l();l();var $o,ti,Gm,io,CE,_s,Zm,IE,DE,Ls,Vm,Rs,Ns,Wm,Uh=class Uh{constructor(t){_(this,io);_(this,$o,null);_(this,ti);f(this,"getCurrentSceneGLTF",o(async t=>{let r=R({onlyVisible:!0,binary:!0,light:!0,scale:1},t),n=await dt(this,io,CE).call(this),i=s(this,Gm).call(this,r),a=await n.parseAsync(i,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),u;if(a instanceof ArrayBuffer)u=new Blob([a],{type:"application/octet-stream"});else{let c=JSON.stringify(a,null,2);u=new Blob([c],{type:"text/plain"})}return u},"getCurrentSceneGLTF"));_(this,Gm,o(t=>{let{scale:r,light:n,onlyVisible:i}=t,a=new ji,u=new Qt().setFromObject(s(this,ti).entityScene);if(s(this,_s).call(this,s(this,ti).entityScene,a,i),n){let c=new Mc(16777215,.3*Math.PI);c.position.set(0,Math.max(u.max.x,u.max.y)*r*.5,u.max.y*r*4),c.lookAt(0,0,-1),c.target.position.set(0,0,-1),c.add(c.target),a.add(c)}return a},"#getExportedScene"));_(this,_s,o((t,r,n)=>{t.material&&(t instanceof Oc?dt(this,io,IE).call(this,t).forEach(i=>r.add(i)):t instanceof Tu&&r.add(dt(this,io,DE).call(this,t))),t.children.forEach(i=>{(!n||i.visible)&&s(this,_s).call(this,i,r,n)})},"#processObject3D"));_(this,Zm,o((t,r,n)=>{let i=new ku({color:new Mt(t),metalness:0});return i.opacity=r,i.transparent=n,i},"#createStandardMaterial"));_(this,Ls,o(t=>{let{geometry:r,material:n,position:i,rotation:a,quaternion:u,scale:c}=t;if(!(r!=null&&r.isBufferGeometry))return t;let m=r.attributes.position,d=r.attributes.normal,h=r.attributes.uv;return s(this,Vm).call(this,m,d),s(this,Ns).call(this,i,c,a,u),h&&s(this,Wm).call(this,h),n!=null&&n.map&&r.type==="PlaneGeometry"&&(t.side=oi),t},"#convertGeometry"));_(this,Vm,o((t,r)=>{let n=new ue,i=new ue;for(let a=0;a<t.count;a++)n.fromBufferAttribute(t,a),s(this,Rs).call(this,n),t.setXYZ(a,n.x,n.y,n.z),r&&(i.fromBufferAttribute(r,a),s(this,Rs).call(this,i),r.setXYZ(a,i.x,i.y,i.z))},"#convertAttributes"));_(this,Rs,o(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));_(this,Ns,o((t,r,n,i)=>{let a=t.y;t.y=t.z,t.z=-a;let u=r.y;if(r.y=r.z,r.z=u,n instanceof ia)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let c=i.y;i.set(i.x,i.z,-c,i.w)}},"#convertObjectProperties"));_(this,Wm,o(t=>{for(let r=0;r<t.count;r++){let n=t.getX(r),i=t.getY(r);t.setXY(r,n,i)}},"#convertUVs"));W(this,ti,t),s(this,ti).entityScene=t.entityScene,s(this,ti).geometry3DMap=t.geometry3DMap}destroy(){W(this,$o,null)}};$o=new WeakMap,ti=new WeakMap,Gm=new WeakMap,io=new WeakSet,CE=o(async function(){if(!s(this,$o)){let{GLTFExporter:t}=await import("./GLTFExporter-ZNG777AV.js");W(this,$o,new t)}return s(this,$o)},"#getGLTFExporter"),_s=new WeakMap,Zm=new WeakMap,IE=o(function(t){var u,c;let r=[],i=((u=t.userData)!=null&&u.entities?Object.values((c=t.userData)==null?void 0:c.entities):[]).map(m=>s(this,ti).geometry3DMap.get(m)),a=new Map;return i.forEach(m=>{var b;if(!m||!(m instanceof et))return;let d=m.components[1],h=m.components[2];if(!d.visible||d instanceof jn&&d.opacity===0||d instanceof Uu||d instanceof Uc)return;let g=h!=null&&h.hover?d.hoverColor||s(this,ti).hoverColor:d.color,v="".concat(g,"-").concat(d.opacity,"-").concat(Number(d.visible));a.has(v)||a.set(v,[]),(b=a.get(v))==null||b.push(m)}),a.forEach((m,d)=>{let[h,g,v]=d.split("-"),b=m.reduce((E,I)=>{if(I.type==="custom-geometry")return E;let D=I.components[0];return"geometry"in D&&D.geometry instanceof wc&&E.push(D.geometry),E},[]),S=s(this,Zm).call(this,h,Number(g),t.material.transparent),O=Kr(b,!0),x=new Oe(O,S);x.position.copy(t.position),x.rotation.copy(t.rotation),x.scale.copy(t.scale),x.visible=!!v,s(this,Ns).call(this,x.position,x.scale,x.rotation,x.quaternion),r.push(s(this,Ls).call(this,x))}),r},"#processBatchedMesh"),DE=o(function(t){let r=t.geometry.clone(),n=t.material,i=new cr({color:n.color,side:oi});i.opacity=n.opacity,i.transparent=n.transparent;let a=new Tu(r,i);return a.position.copy(t.position),a.rotation.copy(t.rotation),a.scale.copy(t.scale),a.visible=t.visible,s(this,Ls).call(this,a)},"#processLineSegments"),Ls=new WeakMap,Vm=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,Wm=new WeakMap,o(Uh,"ExporterSystem");var ks=Uh;l();l();var uB="gray",sB=.1,js=100,zh=new Nn.ClipperOffset;function cB(e,t){zh.Clear(),t/=2;let r=e.map(i=>({X:i.x*js,Y:i.y*js}));zh.AddPath(r,Nn.JoinType.jtMiter,Nn.EndType.etClosedPolygon);let n=new Nn.Paths;return zh.Execute(n,t*js),n.length?n.map(a=>a.map(u=>({x:u.X/js,y:u.Y/js}))):[e]}o(cB,"offset");function Km(e,t,r){var b,S,O,x,E;let{color:n=uB,opacity:i=1,altitude:a=0,height:u=sB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a},center:{x:0,y:0,z:(u+a)/2}},d=e.geometry.coordinates[0].map(I=>{let D=t(I[1],I[0]);return c.min.x=Math.min(c.min.x,D.x),c.min.y=Math.min(c.min.y,D.y),c.max.x=Math.max(c.max.x,D.x),c.max.y=Math.max(c.max.y,D.y),D});((S=(b=e.properties)==null?void 0:b.style)==null?void 0:S.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((O=e.properties)==null?void 0:O.image)!=null?d=cB(d,((E=(x=e.properties)==null?void 0:x.style)==null?void 0:E.edgeOffset)||0):d=[d];let h=[];for(let I of d){let D=new aa;D.moveTo(I[0].x,I[0].y),I.slice(1).forEach(k=>D.lineTo(k.x,k.y)),D.lineTo(I[0].x,I[0].y);let C=e.geometry.coordinates.slice(1);D.holes=C.map(k=>{let j=k.map(G=>t(G[1],G[0])),U=new oa;return U.moveTo(j[0].x,j[0].y),j.slice(1).forEach(G=>U.lineTo(G.x,G.y)),U.lineTo(j[0].x,j[0].y),U});let A=Ru(r==null?void 0:r.bevel,u),T=new ua(D,A);T.userData={style:{color:n,opacity:i},usedBevelSettings:A},h.push(T)}if(h.length===1)return h[0];let g=Kr(h);h.forEach(I=>I.dispose());let v=Ru(r==null?void 0:r.bevel,u);return g.userData={style:{color:n,opacity:i},usedBevelSettings:v,_split:!0},g}o(Km,"renderPolygonGeometry");l();var lB="gray",mB=.1;function qm(e,t,r){let{color:n=lB,opacity:i=1,altitude:a=0,height:u=mB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a}},m=Ru(r==null?void 0:r.bevel,u),d=[];e.geometry.coordinates.forEach(g=>{let v=new aa,b=g[0].map(x=>{let E=t(x[1],x[0]);return c.min.x=Math.min(c.min.x,E.x),c.min.y=Math.min(c.min.y,E.y),c.max.x=Math.max(c.max.x,E.x),c.max.y=Math.max(c.max.y,E.y),E});v.moveTo(b[0].x,b[0].y),b.slice(1).forEach(x=>v.lineTo(x.x,x.y)),v.lineTo(b[0].x,b[0].y);let S=g.slice(1);v.holes=S.map(x=>{let E=x.map(D=>t(D[1],D[0])),I=new oa;return I.moveTo(E[0].x,E[0].y),E.slice(1).forEach(D=>I.lineTo(D.x,D.y)),I.lineTo(E[0].x,E[0].y),I});let O=new ua(v,m);d.push(O)});let h=Kr(d);return d.forEach(g=>g.dispose()),h.translate(0,0,a||0),h.userData={style:{color:n,opacity:i},usedBevelSettings:m},h}o(qm,"renderMultiPolygonGeometry");l();var Sr=100,dB=.22,pB=.01;function SE(e,t,r={}){let{width:n=dB,height:i=pB,color:a="gray",opacity:u=1,altitude:c=0}=r,m={min:{x:1/0,y:1/0,z:c},max:{x:-1/0,y:-1/0,z:c+i}},d={bevelEnabled:!1,depth:i},h=new Nn.ClipperOffset,g=e.geometry.coordinates.map(O=>O.map(x=>t(x[1],x[0])));h.AddPaths(g.map(O=>O.map(x=>({X:x.x*Sr,Y:x.y*Sr}))),Nn.JoinType.jsMiter,Nn.EndType.etOpenRound);let v=new Nn.PolyTree;h.Execute(v,n/2*Sr);let b=[];for(let O of v.m_AllPolys){let x=new aa;if(O.IsHole())continue;m.min.x=Math.min(m.min.x,O.m_polygon[0].X),m.min.y=Math.min(m.min.y,O.m_polygon[0].Y),m.max.x=Math.max(m.max.x,O.m_polygon[0].X),m.max.y=Math.max(m.max.y,O.m_polygon[0].Y);let E=O.m_polygon;x.moveTo(E[0].X/Sr,E[0].Y/Sr),E.slice(1).forEach(I=>x.lineTo(I.X/Sr,I.Y/Sr)),x.lineTo(E[0].X/Sr,E[0].Y/Sr),x.holes=O.m_Childs.map(I=>{let D=new oa,C=I.m_polygon;return D.moveTo(C[0].X/Sr,C[0].Y/Sr),C.slice(1).forEach(A=>D.lineTo(A.X/Sr,A.Y/Sr)),D.lineTo(C[0].X/Sr,C[0].Y/Sr),D}),b.push(new ua(x,d))}let S=Kr(b);return S.translate(0,0,c||0),S.userData={style:{color:a,opacity:u}},h.Clear(),S}o(SE,"renderMultiLineStringGeometry");l();l();var pu=ie.object({type:ie.enum(["Point"]),coordinates:ie.array(ie.number()).min(2).max(3)});var fB=ie.object({rotation:ie.array(ie.number()).length(3).optional(),altitude:ie.number().optional(),scale:ie.array(ie.number()).length(3).optional(),interactive:ie.boolean().optional(),verticalOffset:ie.number().optional(),id:ie.union([ie.number(),ie.string()]).optional()}),hB=ie.object({type:ie.enum(["Feature"]),geometry:pu,properties:fB}),gB=ie.object({type:ie.enum(["FeatureCollection"]),features:ie.array(hB)}),yB=ie.object({color:ie.string()}),bB=ie.object({url:ie.string(),color:ie.string().optional(),opacity:ie.number().optional(),material:ie.record(ie.string(),yB).optional()});function AE(e,t,r){ie.union([ie.number(),ie.string()]).parse(e),gB.parse(t),bB.parse(r)}o(AE,"validateModelGroup");var Us,zs,$s,fu,On,$h=class $h{constructor(t){f(this,"mesh");f(this,"type","model");f(this,"positionDirty",!0);f(this,"outline");f(this,"geometry");f(this,"material");f(this,"feature");f(this,"instanceIndex",-1);_(this,Us,!0);f(this,"color",new Mt);f(this,"clippingPlane");f(this,"position",new ue);_(this,zs,0);_(this,$s,1);_(this,fu,Hr.GEOMETRY);_(this,On,!1);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:s(this,Us)}set visible(t){W(this,Us,t),this.mesh&&(this.mesh.visible=t)}setOpacity(){}setColor(){}get altitude(){return s(this,zs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,zs,t))}getRotation(){return this.mesh?[this.mesh.rotation.x,this.mesh.rotation.y,this.mesh.rotation.z]:void 0}setRotation(t){this.mesh&&this.mesh.rotation.set(Fe.degToRad(t[0]),Fe.degToRad(t[1]),Fe.degToRad(t[2]))}getScale(){return this.mesh?[this.mesh.scale.x,this.mesh.scale.y,this.mesh.scale.z]:void 0}setScale(t){this.mesh&&this.mesh.scale.set(t[0],t[1],t[2])}get opacity(){return s(this,$s)}set opacity(t){var r,n,i;if(this.mesh){if(this.mesh.children[0]instanceof _n){for(let a of this.mesh.children)if(a instanceof _n){((r=a.userData)==null?void 0:r.originalOpacity)===void 0&&(a.userData.originalOpacity=a.material.opacity);let u=Co(t,0,(n=a.userData)==null?void 0:n.originalOpacity,0,1);a.material.opacity=u,a.material.transparent=u<1,a.material.needsUpdate=!0}}else(i=this.mesh)==null||i.traverse(a=>{a instanceof Oe&&a.material&&(Array.isArray(a.material)?a.material.forEach(u=>{wE(u,t)}):wE(a.material,t))});W(this,$s,t)}}get renderOrder(){return s(this,fu)}set renderOrder(t){var r;if(!(!this.mesh||t===s(this,fu)))if(W(this,fu,t),this.mesh.children[0]instanceof _n){this.mesh.renderOrder=t;for(let n of this.mesh.children)n instanceof _n&&(n.material.depthWrite=!s(this,On),n.material.depthTest=!s(this,On),n.material.needsUpdate=!0)}else(r=this.mesh)==null||r.traverse(n=>{n instanceof Oe&&n.material&&(n.renderOrder=t,Array.isArray(n.material)?n.material.forEach(i=>{i.depthWrite=!s(this,On),i.depthTest=!s(this,On),i.needsUpdate=!0}):(n.material.depthWrite=!s(this,On),n.material.depthTest=!s(this,On),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,On)}set visibleThroughGeometry(t){W(this,On,t)}};Us=new WeakMap,zs=new WeakMap,$s=new WeakMap,fu=new WeakMap,On=new WeakMap,o($h,"ModelComponent");var oo=$h;function wE(e,t){e.opacity!==t&&(t===1?(e.opacity=1,e.transparent=!1):(e.opacity=t,e.transparent=!0),e.needsUpdate=!0)}o(wE,"updateMaterialOpacity");l();function Jm(e){var c,m;let t=e.components[0],r=e.components[1];r.opacity!=null&&r.opacity!==t.opacity&&(t.opacity=r.opacity);let n=r.material,i=r.color;if(n||i){let d=vB(i,n);(c=t.mesh)==null||c.traverse(h=>{h instanceof Oe&&h.material&&(Array.isArray(h.material)?h.material.forEach(g=>{d[g.name]?(g.color.set(d[g.name].color),g.vertexColors=!1):g.color.set(i)}):d[h.material.name]?(h.material.color.set(d[h.material.name].color),h.material.vertexColors=!1):h.material.color.set(i))})}let a=(m=t.feature.geometry.coordinates[2])!=null?m:0,u=r.verticalOffset+a;t.altitude!==u&&(t.altitude=u),r.visible!==t.visible&&(t.visible=r.visible),r.rotation&&t.setRotation(r.rotation),r.scale&&t.setScale(r.scale),r.visibleThroughGeometry!==t.visibleThroughGeometry&&(t.visibleThroughGeometry=r.visibleThroughGeometry)}o(Jm,"applyModelGeometryStyle");function vB(e,t){let r={};if(t)for(let n in t)t[n].color&&(r[n]={color:t[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let i of n)r[i]||(r[i]={color:e})}return r}o(vB,"consolidateColorAndMaterial");function FE(e,t){var u,c;let r=e.components[0],i=(u=e.components[1].verticalOffset)!=null?u:0,a=r.feature.geometry.coordinates.slice();a[2]=((c=a[2])!=null?c:0)+i,r.mesh?r.mesh.position.copy(t(a)):r.position.copy(t(a))}o(FE,"applyModelPosition");function Oi(e){return e instanceof Tt?e.material:null}o(Oi,"getMaterial");function OE(e){return e.side===Pu?"back":e.side===vo?"front":"double"}o(OE,"getMaterialSide");function BE(e,t){e.side=t==="back"?Pu:t==="front"?vo:oi}o(BE,"setMaterialSide");function xB(e){let{color:t,opacity:r,topColor:n,texture:i,topTexture:a}=e;return"".concat(t).concat(r).concat(n||"").concat(i||"").concat(a||"")}o(xB,"generateIndex");var Gh=class Gh extends Te{constructor(r,n){super();f(this,"state");f(this,"convertTo3DMapPosition");f(this,"loader");f(this,"optimizePromise",[]);this.state=r,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:r}=await import("./GLTFLoader-QD4ZLTRH.js");return this.loader=new r,this.loader}createEntityFromFeature(r,n,i){var h,g,v,b;let a=new Tt(n),u=(h=n==null?void 0:n.properties)==null?void 0:h.bevel,c=i&&"bevel"in i?i.bevel:void 0,m;c?m=R(R({},u),c):u&&(m=u);let d=new et(a,new jn(xe(R({},i),{url:(v=(g=n.properties)==null?void 0:g.image)==null?void 0:v.path,bevel:m})));return i!=null&&i.outline&&(d.components[3]=new Zy(Hy(i.color))),i!=null&&i.focusable&&(d.components[4]=new zu),((b=n.properties)==null?void 0:b.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?d.components[6]=new Io(n.properties.textures.find(S=>S.face==="side"),n.properties.textures.find(S=>S.face==="top")):(i!=null&&"texture"in i&&i.texture!=null||i!=null&&"topTexture"in i&&i.topTexture!=null)&&(d.components[6]=new Io(i.texture,i.topTexture)),d.id=r,d}createModelFromFeature(r,n,i){let a=new oo(n),u=R({},i);n.properties.verticalOffset!=null&&(u.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(u.rotation=n.properties.rotation),n.properties.scale!=null&&(u.scale=n.properties.scale);let c=new Uc(u),m=new et(a,c);return m.id=r,m}populateEntityMesh(r,n){let i=r.components[0];i.geometry=n,i.batchedProps={range:{start:0,count:1/0,indexCount:1/0,indexStart:0,vertexCount:1/0,vertexStart:0,reservedVertexCount:1/0,reservedIndexCount:1/0},geometryId:-1,positionCount:n.attributes.position.count},i.currentHeight=r.components[1].height,i.dirty=!1}async populateModelGroup(r,n,i){let a=new _r,u=new ia,c=new Sc,m=new ue,d=new zi,h=await this.getGLTFLoader(),g=new Promise(v=>{let b=o(O=>{"entities3D"in i.userData&&(i.userData.entities3D.size>1?O.scene.traverse(x=>{let E=x;if("isMesh"in E&&E.isMesh===!0){let I=new _n(E.geometry,E.material,r.size);I.userData={entities:{}},d.add(I),i.add(d)}}):(O.scene.traverse(x=>{"isMesh"in x&&x.isMesh===!0&&(x.position.set(0,0,0),x.rotation.set(0,0,0),x.scale.set(1,1,1),x.updateMatrix())}),d.add(O.scene),i.add(d),d.userData.isSingleModel=!0,d.userData.entityId=r.values().next().value,d.userData.type="model")),v()},"processGLTF");if(n.trimStart().startsWith("{")||n.startsWith("data:")&&n.includes("application/json")){let O=n.startsWith("data:")?atob(n.split(",")[1]):n;h.parse(O,"",b)}else h.load(n,b)});return this.optimizePromise.push(g.then(()=>{var S,O,x,E,I,D,C,A,T,k,j,U;let v=0,b;for(let G of r.values()){if(b=this.state.geometry3DMap.get(G),!b||(b==null?void 0:b.type)!=="model")continue;let $=b.components[0],X=b.components[1],V=b.components[0].feature;$.mesh=d,$.instanceIndex=v,Jm(b),b.components[1].dirty=!1;let{x:Y,y:oe}=this.convertTo3DMapPosition(V.geometry.coordinates[1],V.geometry.coordinates[0],0);$.position.set(Y,oe,$.altitude),u.set(Fe.degToRad((O=(S=X.rotation)==null?void 0:S[0])!=null?O:ha[0]),Fe.degToRad((E=(x=X.rotation)==null?void 0:x[1])!=null?E:ha[1]),Fe.degToRad((D=(I=X.rotation)==null?void 0:I[2])!=null?D:ha[2])),m.set((A=(C=X.scale)==null?void 0:C[0])!=null?A:fa[0],(k=(T=X.scale)==null?void 0:T[1])!=null?k:fa[1],(U=(j=X.scale)==null?void 0:j[2])!=null?U:fa[2]),c.setFromEuler(u),a.compose($.position,c,m),d.children.forEach(Z=>{!b||(b==null?void 0:b.type)!=="model"||!(Z instanceof _n)||(Z.setMatrixAt(v,a),Z.userData.entities[v]=b.id)}),$.mesh.userData.isSingleModel&&($.mesh.matrix.copy(a),$.mesh.matrix.decompose($.mesh.position,$.mesh.quaternion,$.mesh.scale)),v++}this.publish("model-loaded")})),d}populateEntityGroup(r){var c;let n,i,a,u;for(let m of r.values())u=this.state.geometry3DMap.get(m),u.components[0]instanceof Tt&&(i=u.components[0].feature,a=u.components[1],i.geometry.type==="Polygon"?(n=Km(i,this.convertTo3DMapPosition,a),(c=i.properties)!=null&&c.textures&&i.properties.textures.length>0&&Ky(n,i.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(u,n)):i.geometry.type==="MultiPolygon"?(n=qm(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="LineString"?(n=h4(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="MultiLineString"&&(n=SE(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)));return r}update(){var r;for(let n of this.state.geometryGroupIdsToLoad.values()){let i=this.state.geometry3DMap.get(n);if(i instanceof bn&&i.userData.dirty){if(i.userData.modelURL)i.userData.modelURL&&(this.populateModelGroup(i.userData.entities3D,i.userData.modelURL,i),i.userData.dirty=!1);else try{this.populateEntityGroup(i.userData.entities3D)}catch(c){De.warn(c)}let a,u={};for(let c of i.userData.entities3D.values()){a=this.state.geometry3DMap.get(c);let m=a==null?void 0:a.components[0];if((a==null?void 0:a.type)==="geometry"){let d=a.components[1],h=xB(d);u[h]===void 0&&(u[h]={style:d,entities:[]}),u[h].entities.push(a)}else m&&"mesh"in m&&m.mesh&&((r=m.mesh)==null?void 0:r.parent)!==i&&i.add(m.mesh)}for(let c in u){let m=Wy(u[c].entities,u[c].style);i.add(m)}for(let c of i.userData.entities3D.values())if(a=this.state.geometry3DMap.get(c),a!=null&&a.entities2D.size>0)for(let m of a.entities2D.values())m&&(a.attach(m),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),i.userData.dirty=!1}}return Promise.resolve()}};o(Gh,"MeshCreationAndOptimizationSystem");var Xm=Gh;l();var Zh=class Zh{constructor(t,r){f(this,"state");f(this,"dirty",!0);f(this,"domTree");this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.geometry2DMap.get(r.userData.entityId),t){let n=t.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(r),t){let n=t.components[0];n instanceof ui&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:t.id},this.domTree.appendChild(n.markerContainer),n.updateDimensions())}this.dirty=!1}}};o(Zh,"DOMVisibilitySystem");var Ym=Zh;l();var Vh=class Vh{constructor(t,r){f(this,"state");f(this,"project");this.state=t,this.project=r}update(){let t,r=0,n=0,i,a;for(let u of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(u),t){a=t.components[0];let c=t.attachedTo?this.state.geometry3DMap.get(t.attachedTo):void 0;if(c instanceof et)if(this.state.geometry3DIdsInScene.has(c.id)){i=c.components[1],a=t.components[0],(i.dirty||t.components[0].attachedDirty)&&(r=i.height,n=i.altitude,t.setAltitude(r+n));let m=i.visible;a.visible!==m&&(a.visible=m)}else a.visible===!0&&(a.visible=!1);this.project(t.components[0].projection,t.position),t.components[0].attachedDirty=!1}}};o(Vh,"TwoDProjectionSystem");var Qm=Vh;l();l();l();var EB=o(function(){let t,r;return n=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*n,t.height=500*n,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),PE=o(({text:e,size:t,maxWidth:r,pixelRatio:n,maxLines:i=2,lineHeight:a=1.2,options:u={strokeText:!0}})=>{let c="bold ".concat(t*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:m}=EB(n);m.font=c;let d=[],h=e.split(" "),g=0,v=0,b=0;for(;v<h.length;){let E=h[v];if(g===i&&g>0){d[g-1]+="...";break}if(d[g]==null&&(d[g]=E,v++),h.length===1){d[g]=E;break}if(h[v]==null)break;let{width:I}=m.measureText(d[g]+" "+h[v]);I<=r*n?(d[g]+=" "+h[v],v++):g++}d.forEach(E=>{let{width:I}=m.measureText(E);b=Math.max(I,b)});let S=t*n*a,O=d.length*S;return{maxWidth:b,maxHeight:O,lines:d.length,draw:o((E,I,D)=>{d.length===1?(u.strokeText&&E.strokeText(d[0],I,D),E.fillText(d[0],I,D)):(u.strokeText&&(E.strokeText(d[0],I,D-S/2),E.strokeText(d[1],I,D+S/2)),E.fillText(d[0],I,D-S/2),E.fillText(d[1],I,D+S/2))},"draw")}},"shaveText");l();function ME(e){let t=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?t.src="data:image/svg+xml;base64,".concat(btoa(e)):t.src=e),t}o(ME,"createImage");var Hh=class Hh extends Te{constructor(r,n,i){super();f(this,"dirty",!1);f(this,"state");f(this,"colliderContext");f(this,"colliderCanvas");f(this,"transformRequestFunc");f(this,"transformRequest",o(async r=>this.transformRequestFunc?await this.transformRequestFunc(r):{url:r},"transformRequest"));f(this,"pinCache",{});f(this,"imageCache",{});f(this,"imagePromiseCache",{});f(this,"imageDimensionsCache",{});f(this,"textCache",{});f(this,"update",o(r=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let i,a,u,c,m,d,h;for(let g of this.state.geometry2DIdsInScene)if(h=this.state.geometry2DMap.get(g),h!=null&&(d=h.components[0],d instanceof ai&&!h.disposed)){if(m=d.appearance.iconVisible,d.appearance.icon!=null&&m!=null){let b=typeof m=="boolean"?m:r>=m;b!==d.iconVisible&&(d.iconVisible=b,d.dirty=!0)}if((d.dirty||this.dirty)&&d.calculatePinSize(),a={active:d.appearance.pinColor,inactive:d.appearance.pinColorInactive},u={active:d.appearance.pinOutlineColor,inactive:d.appearance.pinOutlineColorInactive},c=sa(d.pinSize,2),i="".concat(a.active,"-").concat(a.inactive,"-").concat(u.active,"-").concat(u.inactive,"-").concat(c,"-").concat(d.iconVisible),d.labelCacheId=i,(!this.pinCache[i]||this.dirty)&&(this.prepare(d,i,this.colliderContext),d.dirty=!0),(d.appearance.icon&&(!d.imageHash||d.pinDirty)||this.dirty)&&this.cacheImage(d),this.textCache[d.id]==null||d.textDirty||this.dirty){d.dirty=!0,this.textCache[d.id]={};let{textDrawFn:b,width:S,height:O}=this.processText(d.text,d.appearance.textSize,d.appearance.maxWidth,d.appearance.maxLines,d.appearance.lineHeight);["left","center","right"].forEach(x=>{this.textCache[d.id][x]=this.textToCanvas(b,d.appearance.textSize,x,S,O,d.appearance.textColor,d.appearance.textOutlineColor)}),d.dimensions={width:Math.ceil(S/n),height:Math.ceil(O/n)}}let v=1;if(d.appearance.iconScale)if(typeof d.appearance.iconScale=="number")v=d.appearance.iconScale;else{let{on:b,input:S,output:O,easing:x}=d.appearance.iconScale;b==="zoom-level"?v=Fy(r,S,O,x!=null?x:"linear"):De.warn("Unsupported interpolation property: ".concat(b))}d.recomputeCurrentStrategy(d.iconVisible?v:1),d.canShow&&d.visible&&(d.enabled||d.visibilityNeedsUpdate!==!1)&&this.draw(d,i,this.colliderContext),d.textDirty=!1,d.pinDirty=!1}this.dirty=!1},"update"));f(this,"processText",o((r,n,i,a,u)=>{let c=this.state.pixelRatio,{draw:m,maxWidth:d,maxHeight:h}=PE({text:r,size:n,pixelRatio:c,maxWidth:i,maxLines:a,lineHeight:u});return{textDrawFn:m,width:d+2.5*c*2,height:h+2.5*c*2}},"processText"));f(this,"textToCanvas",o((r,n,i,a,u,c,m)=>{let d=this.state.pixelRatio,h,g=a,v=u;window.OffscreenCanvas!=null&&!Ty()?h=new OffscreenCanvas(g,v):(h=document.createElement("canvas"),h.width=g,h.height=v,h.style.width=g+"px",h.style.height=v+"px");let b=h.getContext("2d",{willReadFrequently:!0});if(!b)return;let S=2.5*d;b.textAlign=i,b.font="bold ".concat(n*d,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),b.textBaseline="middle",b.lineJoin="miter",b.miterLimit=2,b.strokeStyle="white",b.lineWidth=S,b.fillStyle=c,b.strokeStyle=m;let O=i==="left"?S/2:i==="center"?g/2:g-S/2;return r(b,O,(v+S/2)/2),h},"textToCanvas"));f(this,"cacheImage",o(r=>{if(!r.appearance.icon)return;let n=Ly(r.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(i=>{this.transformRequest(r.appearance.icon).then(a=>{let u=ME(a.url);u.onload=()=>{this.imageCache[n]=u,this.publish("img:loaded"),i(u)}})})),r.imageHash!==n&&(r.imageHash=n,this.imagePromiseCache[n].then(()=>{r.dirty=!0}))},"cacheImage"));f(this,"createPinCanvas",o((r,n,i,a,u=1)=>{let c,m=this.state.pixelRatio,d=r.totalPinSize*2*m*u;window.OffscreenCanvas!=null?c=new OffscreenCanvas(d,d):(c=document.createElement("canvas"),c.width=d,c.height=d,c.style.width=d/m+"px",c.style.height=d/m+"px");let h=c.getContext("2d");return h.shadowColor="rgba(0,0,0,0.3)",h.shadowOffsetY=2*m,h.shadowBlur=5*m,h.beginPath(),h.arc(d/2,d/2,(n/2+2.5*m/2)*u,0,2*Math.PI),h.fillStyle=i,h.fill(),h.beginPath(),h.arc(d/2,d/2,n/2*u,0,2*Math.PI),h.shadowColor="transparent",h.fillStyle=a,h.fill(),c},"createPinCanvas"));f(this,"prepare",o((r,n,i)=>{let a=this.state.pixelRatio;i.lineWidth=4*a;let u=typeof r.appearance.iconScale=="number"?[r.appearance.iconScale]:r.appearance.iconScale==null?[]:r.appearance.iconScale.output,c=u.length>0?Math.max(...u):void 0,m=this.createPinCanvas(r,r.pinSize,r.appearance.pinOutlineColor,r.appearance.pinColor,c),d=this.createPinCanvas(r,3.5*a,r.appearance.pinOutlineColorInactive,r.appearance.pinColorInactive,c);this.pinCache[n]=[m,d]},"prepare"));this.state=r,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=i}draw(r,n,i){var h;if(!r.canShow||!r.visible)return;i.save(),i.globalAlpha=r.currentOpacity;let a=this.state.pixelRatio,u=r.projection.x*a,c=r.projection.y*a,m=r.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],d=r.style.pinVisibility===1?r.scaledPinSize*a:r.totalPinSize*a;if(r.style.pinVisibility!==0&&i.drawImage(m,u-d,c-d,d*2,d*2),r.appearance.icon&&r.iconVisible&&r.imageHash&&r.appearance.iconSize&&this.imageCache[r.imageHash]&&r.style.pinVisibility===1){let g=this.imageCache[r.imageHash],v=(r.scaledPinSize-r.scaledIconPadding)*a,b=r.appearance.iconFit,S=v,O=v,x="".concat(r.imageHash,"_").concat(b);if(this.imageDimensionsCache[x])S=this.imageDimensionsCache[x].width,O=this.imageDimensionsCache[x].height;else{let E=g.width*a,I=g.height*a;if(b==="contain"){let D=Math.sqrt(E**2+I**2),C=v/D;S=E*C,O=I*C}if(b==="cover"){let D=v/E,C=v/I,A=Math.max(D,C);S=E*A,O=I*A}}i.save(),i.beginPath(),i.arc(u,c,v/2,0,2*Math.PI),i.closePath(),((h=r==null?void 0:r.appearance)==null?void 0:h.iconOverflow)!=="visible"&&i.clip(),i.drawImage(g,u-S/2,c-O/2,S,O),i.restore()}r.style.textLabelVisible&&r.style.textAlign!=null&&r.style.left!=null&&r.style.top!=null&&i.drawImage(this.textCache[r.id][r.style.textAlign],u+r.style.left*a,c+r.style.top*a),i.restore()}};o(Hh,"TwoDDrawSystem");var ed=Hh;l();function wB(e,t){let r=e.components[2],n=e.components[1];return r!=null&&r.hover?[n.hoverColor||t,n.hoverColor||t]:[n.color,n.topColor||n.color]}o(wB,"processColor");var Kh=class Kh{constructor(t,r){f(this,"state");f(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=r,this.state=t}determineTextureVisiblity(t,r,n){let i=Oi(t);((i==null?void 0:i.texture)!=null||(i==null?void 0:i.topTexture)!=null)&&(n!=null&&n.hover&&i.texturesVisible?i.hideTextures(t.instanceIndex):i.texturesVisible||i.showTextures(t.instanceIndex),r.texture==null&&i.removeSideTexture(t.instanceIndex),r.topTexture==null&&i.removeTopTexture(t.instanceIndex))}update(){var i,a,u,c,m,d,h,g,v,b,S,O,x,E,I,D,C,A,T,k,j;let t,r,n;for(let U of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(U),n&&(n.type==="geometry"||n.type==="custom-geometry")&&((i=n.components[1])!=null&&i.dirty||(a=n.components[2])!=null&&a.dirty)){let G=n.components[0],$=n.components[1];r=n.components[2];let X=wB(n,this.state.hoverColor);G.setColor(X[0],X[1]);let V=Oi(G);if($.visible!==G.visible&&(G.visible=$.visible,G instanceof Tt&&G.textMesh)){let oe=this.state.geometry3DMap.get(G.textMesh.userData.entityId);(oe==null?void 0:oe.type)==="text3d"&&oe.components[0].polygonEntityId!=null&&(oe.components[0].visible=$.visible)}$.altitude!==G.altitude&&(G.altitude=$.altitude);let Y=$.opacity*da(n);if(Y!==G.opacity&&(G.opacity=Y),$.renderOrder!==G.renderOrder&&(G.renderOrder=$.renderOrder),V&&$.side!==OE(V)&&BE(V,$.side),G instanceof Tt&&$.shading!=null&&(((u=$.shading)==null?void 0:u.start)!==((c=Oi(G))==null?void 0:c.getGradientShading().start)||((m=$.shading)==null?void 0:m.end)!==((d=Oi(G))==null?void 0:d.getGradientShading().end)||((h=$.shading)==null?void 0:h.intensity)!==((g=Oi(G))==null?void 0:g.getGradientShading().intensity))&&((I=Oi(G))==null||I.setGradientShading((b=(v=$.shading)==null?void 0:v.start)!=null?b:0,(O=(S=$.shading)==null?void 0:S.end)!=null?O:0,(E=(x=$.shading)==null?void 0:x.intensity)!=null?E:0)),$.dirty=!1,G instanceof Tt){let oe=n.components[6];oe instanceof Io&&this.determineTextureVisiblity(G,oe,r)}n.components[2]&&(n.components[2].dirty=!1)}else if((n==null?void 0:n.type)==="model")n.components[1].dirty&&(Jm(n),n.components[1].dirty=!1),n.components[0].positionDirty&&(FE(n,this.convertTo3DMapPosition),n.components[0].positionDirty=!1);else if((n==null?void 0:n.type)==="image"&&((D=n.components[1])!=null&&D.dirty)){t=n.components[0];let G=n.components[1];G.visible!==t.visible&&(t.visible=G.visible),G.dirty=!1}else if((n==null?void 0:n.type)==="text3d"&&((C=n.components[1])!=null&&C.dirty)&&n.components[0].polygonEntityId!=null){t=n.components[0];let G=n.components[1];G.visible!=null&&G.visible!==t.visible&&(t.visible=G.visible);let{textMesh:$}=t;if($){Object.assign($,G.getState());let X=(A=G.hoverColor)!=null?A:this.state.text3dHoverColor;$.color=G.hoverByPolygon?X:(T=G.color)!=null?T:pa.color,$.outlineColor=G.hoverByPolygon?X:(k=G.outlineColor)!=null?k:pa.outlineColor,$.strokeColor=G.hoverByPolygon?X:(j=G.strokeColor)!=null?j:pa.strokeColor}G.dirty=!1}}};o(Kh,"DrawSystem");var td=Kh;l();var qh=class qh extends Te{constructor(r){super();f(this,"state");f(this,"animating",new Map);f(this,"isAnimating",!1);f(this,"startTime",-1);f(this,"showDuration",300);f(this,"hideDuration",250);f(this,"update",o(()=>{var i;this.animating.clear();let r,n;for(let a of this.state.geometry2DIdsInScene)r=this.state.geometry2DMap.get(a),r&&(n=r.components[0],n instanceof ai&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(i=n.appearance.opacity)!=null?i:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")},"update"));f(this,"playAnimations");this.state=r,this.playAnimations=this._playAnimations}_playAnimations(){let r=performance.now();for(let[n,[i,a]]of this.animating.entries()){let u=a===1?this.showDuration:this.hideDuration,c=(r-this.startTime)/u;n.currentOpacity=Co(c,0,1,i,a,a===0?Sy:wy),r-this.startTime>=u&&(a===1?n.canShow=!0:a===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};o(qh,"TwoDVisibilitySystem");var rd=qh;l();var Jh=class Jh extends Te{constructor(r,n,i,a,u,c,m){super();f(this,"state");f(this,"renderer");f(this,"mode");f(this,"scene");f(this,"cameraObject");f(this,"viewCamera");f(this,"systems");f(this,"needs2DRecompute",!1);f(this,"twoDdirty",!0);f(this,"threeDdirty",!0);f(this,"frameId",null);f(this,"twoDFrameId",null);f(this,"animationFrameId",null);f(this,"nextFrame",null);f(this,"update",o((r=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(r){let i=this.commitRenderState();return this.paint(),i}else return this.frameId?Promise.resolve():new Promise((i,a)=>{this.frameId=requestAnimationFrame(()=>{var u,c;return((u=this.renderer)==null?void 0:u.renderer)==null?i():this.mode==="standalone"?(c=this.commitRenderState())==null?void 0:c.then(()=>{this.paint(),i()}).catch(m=>{a(m)}):i()})})},"update"));f(this,"animate2D",o(()=>{this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})},"animate2D"));f(this,"drawEntities2D",o(()=>{this.twoDFrameId||(this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel())}))},"drawEntities2D"));f(this,"updateEntities2D",o(()=>{this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})},"updateEntities2D"));f(this,"commitRenderState",o(()=>{try{let r=[];this.frameId=null,this.publish("pre-render"),this.state.internalTweenGroup.update(),this.state.externalTweenGroup.update(),(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.geometry2DIdsInScene.clear(),_y(this.state.entityScene,this.state.geometry2DIdsInScene),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.geometry3DIdsInScene.clear(),this.state.geometryGroupIdsToLoad.clear(),ky(this.state.entityScene,this.state.geometry3DIdsInScene,this.state.geometryGroupIdsToLoad),this.threeDdirty=!1,this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0,this.systems.outlineInterpolationSystem.geometries3DDirty=!0,this.systems.geometryInFocusSystem.focusablesDirty=!0);let n=this.systems.meshOptimizationSystem.update();n&&r.push(n),this.systems.borderSystem.update(),this.systems.meshModificationSystem.update(),this.systems.meshDetachmentSystem.update(),this.systems.renderOrderSystem.update(),this.systems.clippingPlaneSystem.update(),this.systems.imageSystem.update(this.systems.cameraSystem.getRotation()),r.push(this.systems.text3DSystem.update(this.systems.cameraSystem.getRotation())),this.systems.customGeometrySystem.update(),this.systems.panBoundsSystem.update(),this.systems.geometryInFocusSystem.update(this.systems.cameraSystem.isCameraMoving(),this.systems.cameraSystem.lastCameraStoppedMovingTime()),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.pathSystem.update(this.systems.cameraSystem.minZoomAltitude,this.systems.cameraSystem.maxZoomAltitude,this.systems.cameraSystem.getZoomAltitude()),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.occlusion2DSystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.systems.watermarkSystem.update();let i=this.needs2DRecompute;return this.nextFrame=requestAnimationFrame(()=>{this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height,this.systems.watermarkSystem.options.position,!i,this.systems.imageSystem.currentImageScreenBBoxes)}),this.systems.textureSystem.update(),this.systems.drawSystem.update(),this.systems.geometryDisposalSystem.update(),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1,this.systems.cameraSystem.rotationDirty=!1,this.systems.cameraSystem.stateDirty&&(this.publish("camera-state-change"),this.systems.cameraSystem.stateDirty=!1),this.publish("post-render"),this.needs2DRecompute=!1,Promise.all(r)}catch(r){return Promise.reject(r)}},"commitRenderState"));this.renderer=r,this.state=n,this.mode=i,this.scene=a,this.cameraObject=u,this.viewCamera=c,this.systems=m,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D),this.systems.cameraSystem.on("pan-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-end",()=>this.needs2DRecompute=!0),this.systems.cameraSystem.on("rotate-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("rotate-end",()=>this.needs2DRecompute=!0)}paint(){var r;(r=this.renderer)!=null&&r.renderer&&(this.mode==="standalone"&&this.renderer.clear(),this.renderer.render(this.scene,this.state.useStandaloneCamera||this.mode==="standalone"?this.cameraObject:this.viewCamera))}destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.geometry2DIdsInScene.clear(),this.state.geometry3DIdsInScene.clear(),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};o(Jh,"RenderSystem");var nd=Jh;l();var AB=ie.object({interactive:ie.boolean().optional(),id:ie.string().optional(),width:ie.union([ie.number(),ie.object({on:ie.literal("zoom-level").optional(),input:ie.array(ie.number()).nonempty(),output:ie.array(ie.number()).nonempty(),easing:ie.string().optional()})]).optional(),accentColor:ie.string().optional(),displayArrowsOnPath:ie.boolean().optional(),animateArrowsOnPath:ie.boolean().optional(),visibleThroughGeometry:ie.boolean().optional(),dashed:ie.boolean().optional()}),FB=ie.object({type:ie.enum(["Feature"]),geometry:pu,properties:ie.object({parentId:ie.any().optional()})});function TE(e,t){ie.object({features:ie.array(FB)}).parse(e),AB.parse(t)}o(TE,"validatePath");var Gs,Xh=class Xh{constructor(t,r){f(this,"type","path");f(this,"mesh",new zi);f(this,"material");f(this,"geometry");f(this,"outline");f(this,"feature");f(this,"options");f(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});f(this,"breakpoint",0);f(this,"altitudeBreakpoints");f(this,"accentColor","blue");f(this,"completeFraction",1);f(this,"altitudeAdjustment",1);f(this,"displayArrowsOnPath",!1);f(this,"animateArrowsOnPath",!1);f(this,"visibleThroughGeometry",!1);f(this,"highlightStartFraction",0);f(this,"highlightEndFraction",0);f(this,"highlightCompleteFraction",1);f(this,"highlightWidthMultiplier",1.1);f(this,"highlightColor","red");f(this,"dashed",!1);f(this,"isVertical",!1);f(this,"dirty",!0);f(this,"materialDirty",!0);f(this,"position",new ue);_(this,Gs,0);var n,i,a,u,c,m;this.feature=t,this.options=r||{},this.width=(n=r==null?void 0:r.width)!=null?n:this.width,this.accentColor=(i=r==null?void 0:r.accentColor)!=null?i:this.accentColor,this.displayArrowsOnPath=(a=r==null?void 0:r.displayArrowsOnPath)!=null?a:this.displayArrowsOnPath,this.animateArrowsOnPath=(u=r==null?void 0:r.animateArrowsOnPath)!=null?u:this.animateArrowsOnPath,this.visibleThroughGeometry=(c=r==null?void 0:r.visibleThroughGeometry)!=null?c:this.visibleThroughGeometry,this.dashed=(m=r==null?void 0:r.dashed)!=null?m:this.dashed}setColor(){}setOpacity(){}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,Gs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,Gs,t))}set complete(t){this.material&&(this.material.uniforms.complete.value=t,this.material.needsUpdate=!0)}};Gs=new WeakMap,o(Xh,"PathComponent");var ao=Xh;l();var OB=300,Zs,Vs,Yh=class Yh{constructor(t){f(this,"state");_(this,Zs,new ue);_(this,Vs,new ue);this.state=t}update(t){var i;let r,n;this.state.cameraObject.getWorldPosition(s(this,Vs));for(let a of this.state.geometry2DIdsInScene)if(r=this.state.geometry2DMap.get(a),r&&(n=r.components[0],n&&"containerEl"in n&&n.markerContainer!=null)){if(n.visibilityNeedsUpdate!==!1&&(n.visibilityNeedsUpdate==="show"?n.canShow=!0:n.canShow=!1),(n.canShow&&n.visible===!0||((i=n.animation)==null?void 0:i.pending)===!0)&&!n.offscreen)if(n.options.zIndex!=null)n.markerContainer.style.transform="translate3D(".concat(n.projection.x,"px, ").concat(n.projection.y,"px, ").concat(n.options.zIndex,"px)");else{r.object3d.getWorldPosition(s(this,Zs));let u=s(this,Vs).distanceTo(s(this,Zs));n.markerContainer.style.transform="translate3D(".concat(n.projection.x,"px, ").concat(n.projection.y,"px, ").concat(-u,"px)")}if(n.canShow===!0&&n.visible===!0?n.markerContainer.style.pointerEvents=t?"none":n.pointerEvents:n.markerContainer.style.pointerEvents="none",n.currentStrategyIndex===-1&&n.visible&&n.visibilityNeedsUpdate==="show")continue;n.visibilityNeedsUpdate!==!1&&!n.offscreen&&(n.visibilityNeedsUpdate==="show"&&(n.markerContainer.style.opacity="0"),n.animation&&n.animation.cancel(),n.animation=n.markerContainer.animate([{opacity:n.canShow&&n.visible?"1":"0"}],{duration:OB,easing:"ease-in-out",fill:"forwards"}),n.visibilityNeedsUpdate=!1)}}};Zs=new WeakMap,Vs=new WeakMap,o(Yh,"DOMDrawSystem");var id=Yh;l();var Qh=class Qh extends Te{constructor(r,n){super();f(this,"state");f(this,"dirty",!0);f(this,"domTree");f(this,"observers",new Map);f(this,"updateDimensions",o(r=>{r.forEach(n=>{var u;let a=(u=n.target.parentElement)==null?void 0:u.getAttribute("data-marker-id");if(a){let c=this.state.geometry2DMap.get(a),m=c==null?void 0:c.components[0];c&&m instanceof ui&&(m.updateDimensions(n.contentRect.width,n.contentRect.height),m.collisionDirty=!0)}}),this.publish("dimensions-update")},"updateDimensions"));this.state=r,this.domTree=n}setupObserver(){var i;if(this.observers){for(let a of this.observers.values())a.disconnect();this.observers.clear()}let r,n;for(let a of this.domTree.children){let u=a.getAttribute("data-marker-id");if(u!=null&&(r=this.state.geometry2DMap.get(u),n=r.components[0],(i=n.options)!=null&&i.dynamicResize)){let c=new ResizeObserver(this.updateDimensions);c.observe(n.containerEl),this.observers.set(a.userData.entityId,c)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let r of this.observers.values())r.disconnect();this.observers.clear()}};o(Qh,"DOMResizeSystem");var od=Qh;l();l();var kE="uniform vec4 uSize;\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n // Scale the position by the size of the quad\n // and shift to top left corner for 0,0\n vec2 transformed = position.xy * uSize.xy - vec2(1.0, -1.0);\n // Apply width .x and height .y of image\n transformed += vec2(uSize.x, -uSize.y);\n // Apply left .w and top .z offset\n transformed += vec2(uSize.w, -uSize.z) * 2.0;\n gl_Position = vec4(transformed, 1.0, 1.0);\n}";l();var _E="varying vec2 vUv;\nuniform sampler2D uTexture;\nuniform float uOpacity;\nvoid main() {\n #ifndef debug\n vec4 texture = texture2D(uTexture, vUv);\n gl_FragColor = vec4(texture.rgb, texture.a * uOpacity);\n #else\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n #endif\n}";l();var LE=4.291666666666667,RE=15,NE=25,jE=43/60;l();var UE=["horizontal","icon"],BB=new Map([[UE[0],'<svg viewBox="0 0 206 48">\n <path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z"/>\n <path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z"/>\n <path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z"/>\n <path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z"/>\n </svg>'],[UE[1],'<svg viewBox="0 0 43 60">\n <path d="M14.0291 7.06645C14.0291 10.9691 10.8885 14.1329 7.01453 14.1329C3.14051 14.1329 0 10.9691 0 7.06645C0 3.16376 3.14051 0 7.01453 0C10.8885 0 14.0291 3.16376 14.0291 7.06645Z"/>\n <path d="M28.7335 18.3468H35.1045C36.7455 18.3468 37.5178 19.0599 37.5821 20.6158V57.7309C37.5821 59.2868 36.8099 60 35.1367 60H28.9588C27.1569 60 26.642 59.7406 25.6767 58.282L12.6452 38.282V57.7309C12.6452 59.2868 11.8729 60 10.1997 60H3.82873C2.15554 60 1.3833 59.2868 1.3833 57.7309V20.6158C1.3833 19.0599 2.15554 18.3468 3.82873 18.3468H10.1032C11.9051 18.4116 12.4843 18.671 13.3852 20.0648L26.3524 40.162V20.6158C26.3524 19.0599 27.1247 18.3468 28.7335 18.3468Z"/>\n <path d="M41.5 60C42.3362 60 43 59.3143 43 58.5V58.4914C43 57.6771 42.3448 57 41.5 57C40.6638 57 40 57.6857 40 58.5V58.5086C40 59.3229 40.6552 60 41.5 60ZM41.5 59.8371C40.7414 59.8371 40.1724 59.2371 40.1724 58.5086V58.5C40.1724 57.7714 40.75 57.1629 41.5 57.1629C42.2586 57.1629 42.8276 57.7629 42.8276 58.4914V58.5C42.8276 59.2286 42.25 59.8371 41.5 59.8371ZM40.9138 59.2286H41.2069V58.7057H41.5259L41.8879 59.2286H42.2414L41.8362 58.6543C42.0431 58.5943 42.1897 58.44 42.1897 58.1914C42.1897 57.8743 41.9397 57.7114 41.6034 57.7114H40.9138V59.2286ZM41.2069 58.4657V57.9686H41.5776C41.7759 57.9686 41.8879 58.0543 41.8879 58.2171C41.8879 58.3629 41.7759 58.4657 41.5776 58.4657H41.2069Z"/>\n </svg>']]),PB=/<svg([^>]*)>/g;function zE(e,t,r,n){let i=BB.get(e);return i?i.replace(PB,'<svg$1 width="'.concat(r,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(t,';">')):""}o(zE,"getLogoIcon");l();var uo=class uo{constructor(){f(this,"loader");this.loader=new Pc}static getInstance(){return uo.instance||(uo.instance=new uo),uo.instance}getLoader(){return this.loader}load(t){return new Promise((r,n)=>{this.loader.load(t,r,void 0,n)})}};o(uo,"TextureLoaderSingleton"),f(uo,"instance");var eg=uo,so=eg.getInstance();var $E=!1,ct,Bi,hu,Zt,wr,Go,Bn,ri,tg=class tg extends Te{constructor(r,n,i){super();_(this,ct,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:o(()=>{window!=null&&window.open("https://www.mappedin.com")},"onClick"),interactive:!0,visible:!0});_(this,Bi);_(this,hu);_(this,Zt);_(this,wr);_(this,Go);_(this,Bn,0);_(this,ri,0);f(this,"dirty",!0);f(this,"getPositionAlignedCanvasCoordinates",o((r,n)=>({"top-left":{x:0,y:0},"top-right":{x:r,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:r,y:n},center:{x:r/2,y:n/2},top:{x:r/2,y:0},bottom:{x:r/2,y:n},left:{x:0,y:n/2},right:{x:r,y:n/2}})[s(this,ct).position],"getPositionAlignedCanvasCoordinates"));f(this,"getPositionAlignedPadding",o(()=>{var i,a,u,c;let r=s(this,ct).padding;if(typeof r=="number")return{"top-left":{x:r,y:r},"top-right":{x:-r,y:r},"bottom-left":{x:r,y:-r},"bottom-right":{x:-r,y:-r},center:{x:0,y:0},top:{x:0,y:r},bottom:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0}}[s(this,ct).position];let n={top:(i=r.top)!=null?i:0,right:(a=r.right)!=null?a:0,bottom:(u=r.bottom)!=null?u:0,left:(c=r.left)!=null?c:0};return{x:n.left-n.right,y:n.top-n.bottom}},"getPositionAlignedPadding"));i&&Object.entries(i).forEach(([a,u])=>{u!==void 0&&(s(this,ct)[a]=u)}),W(this,hu,r),W(this,Bi,n)}get color(){return s(this,ct).color==="light"?"white":"#293136"}get iconName(){return s(this,ct).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,ct).iconOnly?RE:75}get defaultWidth(){return s(this,ct).iconOnly?NE:150}get aspectRatio(){return s(this,ct).iconOnly?jE:LE}get options(){return R({},s(this,ct))}set options(r){var n,i;W(this,ct,{padding:r.padding||s(this,ct).padding,position:r.position||s(this,ct).position,iconOnly:r.iconOnly||s(this,ct).iconOnly,color:r.color||s(this,ct).color,scale:r.scale||s(this,ct).scale,onClick:s(this,ct).onClick,interactive:(n=r.interactive)!=null?n:s(this,ct).interactive,visible:(i=r.visible)!=null?i:s(this,ct).visible})}get icon(){return zE(this.iconName,this.color,s(this,Bn)*s(this,Bi).pixelRatio,s(this,ri)*s(this,Bi).pixelRatio)}setSize(r,n){s(this,wr)&&(s(this,wr).uniforms.uSize.value.x=r,s(this,wr).uniforms.uSize.value.y=n)}setXY(r,n){s(this,wr)&&(s(this,wr).uniforms.uSize.value.w=r,s(this,wr).uniforms.uSize.value.z=n)}get width(){return s(this,Bn)}get height(){return s(this,ri)}getPositionAlignedOffset(r,n){return{"top-left":{x:0,y:0},"top-right":{x:-r,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-r,y:-n},center:{x:-(r/2),y:-(n/2)},top:{x:-(r/2),y:0},bottom:{x:-(r/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-r,y:-(n/2)}}[s(this,ct).position]}insertIntoQuadTree(r){s(this,Go)!=null&&typeof s(this,ct).onClick=="function"&&s(this,ct).interactive&&r.insert(s(this,Go))}resize(r,n){if(s(this,ct).visible!==!0)return;let i=this.getPositionAlignedCanvasCoordinates(r,n),a=this.getPositionAlignedPadding(),u=this.getPositionAlignedOffset(s(this,Bn),s(this,ri)),c=Math.min(r-s(this,Bn),Math.max(0,i.x+a.x+u.x)),m=Math.min(n-s(this,ri),Math.max(0,i.y+a.y+u.y));this.setSize(s(this,Bn)/r,s(this,ri)/n),this.setXY(c/r,m/n),W(this,Go,new Se(c,m,s(this,Bn),s(this,ri),{entityId:"watermark"}))}update(){this.dirty&&(s(this,ct).visible===!0?(W(this,Bn,Math.min(s(this,Bi).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,ct).scale))),W(this,ri,s(this,Bn)/this.aspectRatio),so.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),r=>{if(W(this,wr,new Ni({uniforms:{uTexture:{value:r},uSize:{value:new oy(0,0,0,0)},uOpacity:{value:.7}},vertexShader:kE,fragmentShader:_E,depthWrite:!1,depthTest:!1,defines:{debug:$E},wireframe:$E,transparent:!0,visible:!0})),s(this,Zt))s(this,Zt).visible=!0,s(this,Zt).material=s(this,wr),s(this,Zt).material.needsUpdate=!0;else{let n=new yn(2,2,1,1);W(this,Zt,new Oe(n,s(this,wr))),s(this,Zt).position.set(0,0,-1),s(this,Zt).frustumCulled=!1,s(this,Zt).renderOrder=999;let i=new Ri(1,1,1),a=new Oe(i,new cr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));a.frustumCulled=!1,a.layers.set(1),s(this,Zt).add(a),s(this,hu).add(s(this,Zt))}this.resize(s(this,Bi).canvasWidth,s(this,Bi).canvasHeight),this.publish("texture-loaded")})):s(this,Zt)&&(s(this,Zt).visible=!1),this.dirty=!1)}destroy(){s(this,Zt)&&(s(this,hu).remove(s(this,Zt)),Rt(s(this,Zt))),W(this,Zt,void 0),s(this,wr)&&s(this,wr).dispose(),W(this,wr,void 0),W(this,Go,void 0)}};ct=new WeakMap,Bi=new WeakMap,hu=new WeakMap,Zt=new WeakMap,wr=new WeakMap,Go=new WeakMap,Bn=new WeakMap,ri=new WeakMap,o(tg,"WatermarkSystem");var ad=tg;l();var ud=100,kB=!1,rg=class rg extends Te{constructor(r,n){super();f(this,"currentTotalBoundingBox");f(this,"state");f(this,"cameraSystem");f(this,"debugMesh",null);f(this,"dirty",!0);f(this,"autoMinZoomLevel",!0);this.state=r,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Qt,this.state.entityScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new ue(0,0,0),new ue(ud*2,ud*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.entityScene),this.currentTotalBoundingBox.expandByScalar(ud)));let r=new Qt().setFromObject(this.state.entityScene);this.currentTotalBoundingBox.union(r);let n=r.getSize(new ue),i=Math.max(n.x,n.y,n.z);for(let u of this.state.geometry2DMap.values())u.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(u.position),u.positionDirty=!1);let a=sd.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(i,ud)).getBoundingSphere(_B).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new ue),min:sd.min,max:sd.max,radius:a},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,kB&&this.state.entityScene.parent instanceof ji){this.debugMesh&&(this.state.entityScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new xo,this.debugMesh.add(new Oe(new Bc(this.cameraSystem.panBounds.radius),new cr({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.entityScene.parent.add(this.debugMesh);let u=new ue;sd.getSize(u);let c=new Ri(u.x,u.y,u.z),m=new cr({color:65280,wireframe:!0,transparent:!0,opacity:.5}),d=new Oe(c,m);d.position.copy(this.currentTotalBoundingBox.getCenter(new ue)),this.debugMesh.add(d)}}}};o(rg,"PanBoundsSystem");var cd=rg,sd=new Qt,_B=new uy;l();var Ws,Hs,ng=class ng{constructor(t,r){f(this,"mesh");f(this,"type","custom-geometry");f(this,"dirty",!0);f(this,"feature");f(this,"builder");f(this,"outline");_(this,Ws,1);f(this,"color",new Mt);_(this,Hs,0);this.mesh=new zi,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}set opacity(t){W(this,Ws,t)}get opacity(){return s(this,Ws)}setColor(t){this.color.set(t)}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return s(this,Hs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,Hs,t))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(t){this.mesh&&(this.mesh.renderOrder=t)}};Ws=new WeakMap,Hs=new WeakMap,o(ng,"CustomGeometryComponent");var gu=ng;l();var ig=class ig{constructor(t,r){f(this,"state");f(this,"convertTo3DMapPosition");this.state=t,this.convertTo3DMapPosition=r}update(){let t,r;for(let n of this.state.geometry3DIdsInScene){let i=this.state.geometry3DMap.get(n);(i==null?void 0:i.type)==="custom-geometry"&&(t=i.components[0],r=i.components[1],t.dirty&&r.visible!==!1&&(t.position.copy(this.convertTo3DMapPosition(t.feature.geometry.coordinates[1],t.feature.geometry.coordinates[0],r.altitude)),t.builder.setup(t.mesh),t.mesh.traverse(a=>{a.userData=xe(R({},a.userData),{entityId:n,type:"custom-geometry"})}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}}};o(ig,"CustomGeometrySystem");var ld=ig;l();l();function GE(e){return e.children.some(t=>t.userData.isOutline)}o(GE,"hasOutline");function ZE(e,t){var n;let r=e.userData.entities3D.values().next().value;return r?((n=t.geometry3DMap.get(r))==null?void 0:n.components[3])!==void 0:!1}o(ZE,"needsOutline");function md(e,t,r,n){let a=e.getAttribute("position").array,u=-1/0;for(let c=0;c<t.count;c++){let d=(t.start+c)*3,h=a[d+2];u=Math.max(u,h)}for(let c=0;c<t.count;c++){let d=(t.start+c)*3,h=a[d+2];Math.abs(h-u)<1e-4?a[d+2]=Math.max(r+n,2e-4+n):a[d+2]=n}e.attributes.position.needsUpdate=!0}o(md,"updateBufferGeometryHeight");l();function og(e){var d,h;let t=new wc,r=(d=e.mesh)==null?void 0:d.geometry;if(!r||!((h=e.batchedProps)!=null&&h.range))return;let n=e.batchedProps.range,i=n.start,a=n.count,u=r.getAttribute("position");if(u){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=u.array[b*3],g[v*3+1]=u.array[b*3+1],g[v*3+2]=u.array[b*3+2]}t.setAttribute("position",new vr(g,3))}let c=r.getAttribute("normal");if(c){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=c.array[b*3],g[v*3+1]=c.array[b*3+1],g[v*3+2]=c.array[b*3+2]}t.setAttribute("normal",new vr(g,3))}let m=r.getAttribute("uv");if(m){let g=new Float32Array(a*2);for(let v=0;v<a;v++){let b=i+v;g[v*2]=m.array[b*2],g[v*2+1]=m.array[b*2+1]}t.setAttribute("uv",new vr(g,2))}if(r.index){let g=r.index,v=new Uint32Array(a);for(let b=0;b<a;b++)v[b]=g.array[i+b];t.setIndex(new vr(v,1))}return t}o(og,"extractBufferGeometryFromBatchedGeometry");function VE(e,t,r){let n=og(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,r),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let i=t.addGeometry(n);t.addInstance(i),t.setMatrixAt(i,r);let a=t.getGeometryIdAt(i),u=t.getGeometryRangeAt(a);return u&&e.batchedProps&&(e.batchedProps.range=u),n.dispose(),i}o(VE,"transferGeometryToNewBatchedMesh");l();l();var WE="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\nattribute float visibility;\nvarying vec4 v_color;\n\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n vLineDistance = scale * lineDistance;\n v_color = color;\n\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n if (visibility < 0.5) {\n gl_Position = vec4(-2.0, -2.0, -2.0, 1.0);\n }\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n\n}";l();var HE="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\nvarying vec4 v_color;\n\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n discard;\n\n }\n\n vec3 outgoingLight = vec3( 0.0 );\n\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n\n outgoingLight = diffuseColor.rgb; // simple shader\n\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n\n // Discard alpha lower than 0.01 to avoid opacity fighting\n if (v_color.a <= 0.01) { \n discard;\n }\n}\n";var ag=class ag extends ly{constructor(t){super(t),this.onBeforeCompile=r=>{r.vertexShader=WE,r.fragmentShader=HE}}};o(ag,"OutlineLineMaterial");var dd=ag;l();var Pn,Zo,co,lo,Ks,ug,sg=class sg{constructor(){_(this,Ks);_(this,Pn,[]);_(this,Zo,!1);_(this,co);_(this,lo)}get size(){return s(this,Pn).length}add(t){s(this,Pn).push(t),s(this,Zo)||dt(this,Ks,ug).call(this)}onComplete(t){W(this,co,t)}clearOnComplete(){W(this,co,void 0)}clearAll(){W(this,Pn,[]),W(this,Zo,!1),W(this,co,void 0),s(this,lo)!==void 0&&(cancelIdleCallback(s(this,lo)),W(this,lo,void 0))}};Pn=new WeakMap,Zo=new WeakMap,co=new WeakMap,lo=new WeakMap,Ks=new WeakSet,ug=o(function(){W(this,Zo,!0),W(this,lo,requestIdleCallback(t=>{let r=0;for(;s(this,Pn).length>0&&t.timeRemaining()>2;){let n=s(this,Pn).shift();n&&(n(),r++)}if(r===0&&s(this,Pn).length>0&&t.timeRemaining()<2){let n=s(this,Pn).shift();n&&n()}W(this,lo,void 0),s(this,Pn).length>0?dt(this,Ks,ug).call(this):(W(this,Zo,!1),s(this,co)&&s(this,co).call(this))},{timeout:3e3}))},"#processQueue"),o(sg,"IdleQueue");var Vo=sg;var NB=80,Wo,yu,fd,hd,gd,cg=class cg extends Te{constructor(r){super();f(this,"rendererState");f(this,"outlineOpacitiesDirty",!0);f(this,"useIdleFramesOnly",!0);_(this,Wo,!0);_(this,yu,-1/0);f(this,"idleBuildQueue",new Vo);f(this,"idleComputeBoundingSphereQueue",new Vo);_(this,fd,new Map);_(this,hd,new dd({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:vo}));_(this,gd,o(()=>{this.publish("needs-render")},"#publishRender"));this.rendererState=r,this.idleBuildQueue.onComplete(s(this,gd))}get geometries3DDirty(){return s(this,Wo)}set geometries3DDirty(r){W(this,Wo,r)}buildOutlines(r){var v;let n=[];for(let b of r.userData.entities3D.values()){let S=this.rendererState.geometry3DMap.get(b);if(S instanceof et&&S.type==="geometry"&&S.components[3]&&S.components[3].dirty===!0&&S.components[0].material!=null){let O=S.components[0].geometry,x=!1;O||(O=og(S.components[0]),x=!0);let E=S.components[1];n.push([S.components[3],new dy(O,(v=E.bevel)!=null&&v.enabled?1:NB)]),x&&(O==null||O.dispose(),O=void 0)}}if(n.length===0)return;let i=Kr(n.map(b=>b[1]),!1);if(i==null)return;let a=i.getAttribute("position"),u=new Float32Array(a.count*4),c=new vr(u,4);i.setAttribute("color",c);let m=new Uint8Array(a.count);m.fill(0);let d=new vr(m,1,!1);i.setAttribute("visibility",d);let h=0;for(let b=0;b<n.length;b++){let[S,O]=n[b],x=O.getAttribute("position").count;S.edgeColors=c,S.edgeVisibility=d,S.geometry=i,S.ranges={count:x,start:h},h+=x,O.dispose()}let g=new Tu(i,s(this,hd));g.userData.isOutline=!0,r.add(g)}update(r,n=!0){var u,c;let i;if(this.geometries3DDirty){for(let m of this.rendererState.geometry3DIdsInScene){let d=this.rendererState.geometry3DMap.get(m);d instanceof bn&&ZE(d,this.rendererState)&&!GE(d)&&d.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(d)):this.buildOutlines(d))}W(this,Wo,!1),this.outlineOpacitiesDirty=!0}for(let m of this.rendererState.geometry3DIdsInScene){let d=this.rendererState.geometry3DMap.get(m);if(d instanceof et&&d.type==="geometry"&&d.components[3]&&d.components[3].dirty===!0&&d.components[0].material!=null&&d.parentObject3D instanceof bn){let h=d.components[3].geometry;if(!h)continue;let g=d.components[3];if(!g)continue;let v=g.enabled&&d.components[1].visible;if(g.visible!==v&&(g.visible=v),!g.visible)continue;let b=g.edgeColors;if(!b||!g.ranges)continue;let S=new Mt(g.color);for(let I=0;I<g.ranges.count;I++){let D=g.ranges.start+I;b.setXYZ(D,S.r,S.g,S.b)}let O=d.components[1].height,x=d.components[1].altitude;((c=(u=d.components[1])==null?void 0:u.bevel)==null?void 0:c.enabled)||md(h,g.ranges,O,x),h.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>h.computeBoundingSphere()),g.dirty=!1}}let a=n?Co(r,16,19,0,1):s(this,yu);if((a!==s(this,yu)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DIdsInScene.size>0){for(let m of this.rendererState.geometry3DIdsInScene)if(i=this.rendererState.geometry3DMap.get(m),(i==null?void 0:i.type)==="geometry"&&i.components[0]instanceof Tt){let d=i.components[3];if(d&&d.edgeColors&&d.geometry&&d.visible){let h=Math.min(a,i.components[1].opacity*da(i));if(d.currentOpacity!==h){for(let g=0;g<d.ranges.count;g++){let v=d.ranges.start+g;d.edgeColors.setW(v,h)}d.geometry.attributes.color.needsUpdate=!0}}}}W(this,yu,a),W(this,Wo,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,fd).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};Wo=new WeakMap,yu=new WeakMap,fd=new WeakMap,hd=new WeakMap,gd=new WeakMap,o(cg,"OutlineInterpolationSystem");var pd=cg;l();l();var lg=class lg extends Oe{constructor(){super(...arguments);f(this,"userData",{entityId:""})}};o(lg,"EntityMesh");var yd=lg,jB=ie.object({flipImageToFaceCamera:ie.boolean().optional(),url:ie.string()}),UB=ie.object({type:ie.enum(["Feature"]),properties:ie.object({width:ie.number(),height:ie.number(),rotation:ie.number().min(0).max(360).optional(),verticalOffset:ie.number().optional()}),geometry:pu});function KE(e,t,r){ie.union([ie.number(),ie.string()]).parse(e),UB.parse(t),jB.parse(r)}o(KE,"validateImage");var mg=class mg{constructor(t){f(this,"mesh",new zi);f(this,"imageMesh");f(this,"outline");f(this,"type","image");f(this,"instanceIndex",-1);f(this,"geometry");f(this,"material");f(this,"feature");f(this,"position",new ue);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:!1}set visible(t){this.mesh&&(this.mesh.visible=t)}};o(mg,"ImageComponent");var bd=mg;l();function dg(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}}o(dg,"rotatePoint");function zB(e,t){return e.map(r=>dg(r,t))}o(zB,"rotatePoints");function $B(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}o($B,"getBounds");function GB(e,t){let r=!1;for(let n=0,i=t.length-1;n<t.length;i=n++){let a=t[n].x,u=t[n].y,c=t[i].x,m=t[i].y;u>e.y!=m>e.y&&e.x<(c-a)*(e.y-u)/(m-u)+a&&(r=!r)}return r}o(GB,"pointInPolygon");function qE(e,t,r,n,i){for(let a=0;a<i;a++)for(let u=0;u<n;u++)if(e[r+a][t+u]!==1)return!1;return!0}o(qE,"isValidRectangle");function ZB(e,t,r){let n=e.maxX-e.minX,i=e.maxY-e.minY,a,u,c=R({},e);return n/i>t?(u=i/r,a=u*t,c.minX+=(n-a*r)/2):(a=n/r,u=a/t,c.minY+=(i-u*r)/2),{dx:a,dy:u,gridBounds:c}}o(ZB,"calculateGridDimensions");function VB(e,t,r,n,i){let a=Array(r).fill(0).map(()=>Array(r).fill(0));for(let u=0;u<r;u++)for(let c=0;c<r;c++){let m={x:t.minX+c*n,y:t.minY+u*i};GB(m,e)&&(a[u][c]=1)}return a}o(VB,"createAndFillGrid");function WB(e,t){let r=Array(t).fill(0).map(()=>Array(t).fill(0));for(let n=0;n<t;n++)for(let i=0;i<t;i++)if(e[n][i]===1){let a=0;for(let u=1;u<=Math.min(t-i,t-n)&&qE(e,i,n,u,u);u++)a=u;r[n][i]=a}return r}o(WB,"calculateRectSizes");function HB(e,t,r,n,i,a){let u=0,c=0,m=0;for(let d=0;d<n;d++)for(let h=0;h<n;h++)if(e[d][h]===1){let g=Math.pow(t[d][h],2),v=r.minX+h*i,b=r.minY+d*a;u+=g,c+=v*g,m+=b*g}return{x:c/u,y:m/u}}o(HB,"calculatePolygonCenter");function KB(e,t,r,n,i,a,u){let c=-1/0,m=null,d=e.length,h=Math.sqrt(Math.pow(t.maxX-t.minX,2)+Math.pow(t.maxY-t.minY,2));for(let g=0;g<d;g++)for(let v=0;v<d;v++)if(e[g][v]===1)for(let b=1;b<=d-v;b++){let S=b;if(!(S>d-g)&&qE(e,v,g,b,S)){let O=b*S,x=t.minX+(v+b/2)*r,E=t.minY+(g+S/2)*n,I={x,y:E},C=Math.sqrt(Math.pow(I.x-i.x,2)+Math.pow(I.y-i.y,2))/h,A=O*(1-a)-C*a*O;A>c&&(c=A,m={center:I,width:b*r*u,height:b*n*u})}}return m}o(KB,"findBestRectangle");function pg(e,t,r,n={}){let{scaleFactor:i=.9,centerPriority:a=.5,resolution:u=100,minimumSizeRatio:c=.5}=n,m=Cy(r),d=e.width/e.height,h=zB(t,m),g=$B(h),{dx:v,dy:b,gridBounds:S}=ZB(g,d,u),O=VB(h,S,u,v,b),x=WB(O,u),E=HB(O,x,S,u,v,b),I=KB(O,S,v,b,E,a,i);return!I||I.width<e.width*c||I.height<e.height*c?e:xe(R({},I),{center:dg(I.center,-m),rotation:r,polygonCenter:dg(E,-m)})}o(pg,"findLargestInteriorRectangle");var qs=Math.PI*2,qB=Math.PI/2,JB=Math.PI*1.5,XB=sa(qB,2),YB=sa(JB,2),QB=.01,JE=!1,fg=class fg extends Te{constructor(r,n,i,a=0,u=0,c={}){super();f(this,"rendererState");f(this,"convertTo3DMapPosition");f(this,"projectToScreen");f(this,"initialBearing",0);f(this,"naturalBearing",0);f(this,"imagePlacementOptions");f(this,"cameraFrustum",new Fc);f(this,"imageLoadingCache",new Map);f(this,"currentImageScreenBBoxes",[]);f(this,"viewProjectionMatrix",new _r);this.rendererState=r,this.convertTo3DMapPosition=n,this.projectToScreen=i,this.initialBearing=a,this.naturalBearing=u,this.imagePlacementOptions=c}createImageMesh(r,n,i,a=0,u,c){var S,O,x;let m={width:i.width,height:i.height,center:this.convertTo3DMapPosition(u),rotation:(S=i.rotation)!=null?S:0},d=(O=this.imagePlacementOptions.mode)!=null?O:"default",h=(()=>{switch(d){case"fit-nearest-90":let E=(this.initialBearing-this.naturalBearing+360)%180;return E>=45&&E<=135?pg(m,c,m.rotation+90,this.imagePlacementOptions):m;case"fit-initial-bearing":return pg(m,c,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return m}})();if(JE&&h.polygonCenter){let E=new Oe(new Bc(1),new _u({color:65280}));E.position.set(h.polygonCenter.x,h.polygonCenter.y,a),this.rendererState.entityScene.add(E)}let g=new _u({transparent:!0,depthWrite:!1,side:oi}),v=new yn(h.width,h.height),b=new yd(v);if(b.visible=!1,b.renderOrder=Hr.IMAGE_MESH,(x=this.getOrDownloadImage(n))==null||x.then(E=>{g.map=E,g.needsUpdate=!0,g.map.colorSpace=vc,b.visible=!0,this.publish("image-loaded")}),b.userData.entityId=r,b.material=g,JE){let E=new Oe(new yn(i.width,i.height),new _u({color:"gray"}));b.add(E);let I=new gy;b.add(I),I.scale.set(10,10,10)}return b.position.set(h.center.x,h.center.y,a+QB),b.rotation.z=(-Fe.degToRad(h.rotation)+qs)%qs,b}getOrDownloadImage(r){var n;if(this.imageLoadingCache.has(r))return(n=this.imageLoadingCache.get(r))==null?void 0:n.promise;{let i=new Promise(a=>{so.getLoader().load(r,u=>{let c=this.imageLoadingCache.get(r);c&&!c.loaded&&(c.loaded=!0),a(u)})});return this.imageLoadingCache.set(r,{loaded:!1,promise:i}),i}}flipIfNeeded(r,n){if(r.imageMesh==null)return;let i=-n,a=r.imageMesh.rotation.z,u=sa((a-i+qs)%qs,2);u>XB&&u<YB&&(r.imageMesh.rotation.z=(a+Math.PI)%qs)}update(r){var u,c,m,d,h;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,i,a;for(let g of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(g),(n==null?void 0:n.type)==="image"){if(i=n.components[0],a=n.components[1],a.url&&i.imageMesh==null){let v=this.convertTo3DMapPosition(i.feature.geometry.coordinates),b={x:v.x,y:v.y};i.imageMesh=this.createImageMesh(n.id,a.url,i.feature.properties,i.feature.properties.verticalOffset,i.feature.geometry.coordinates,[b]),i.mesh.add(i.imageMesh),i.position.copy(i.imageMesh.position)}i.imageMesh&&(a.flipImageToFaceCamera&&this.flipIfNeeded(i,r),i.imageMesh.material instanceof _u&&a.dirty&&(i.imageMesh.material.opacity=a.opacity))}else if((n==null?void 0:n.type)==="geometry"){if(i=n.components[0],a=n.components[1],a.showImage&&((u=i.feature.properties)!=null&&u.image)&&i.imageMesh==null&&i.visible&&i.mesh!=null&&i.mesh.parent!=null&&((c=i.feature.properties)==null?void 0:c.image.position)!=null&&i.feature.geometry.coordinates!=null&&i.feature.geometry.coordinates.length>0){let v=i.feature.geometry.coordinates[0].map(S=>{let O=this.convertTo3DMapPosition(S);return{x:O.x,y:O.y}}),b=this.createImageMesh(g,(m=i.feature.properties)==null?void 0:m.image.path,(d=i.feature.properties)==null?void 0:d.image,a.height,(h=i.feature.properties)==null?void 0:h.image.position,v);i.mesh.parent.add(b),i.imageMesh=b}if(i.imageMesh){if(!i.visible)i.imageMesh.visible=!1;else if(a.showImage&&!i.imageMesh.visible)if(a.url){let v=this.imageLoadingCache.get(a.url);v&&v.loaded&&(i.imageMesh.visible=!0)}else i.imageMesh.visible=!0;else!a.showImage&&i.imageMesh.visible&&(i.imageMesh.visible=!1);a.flipImageToFaceCamera&&this.flipIfNeeded(i,r),a.enableImageCollisions===!0&&this.updateImageScreenBBoxes(i)}}}updateImageScreenBBoxes(r){if(r.imageMesh==null)return;let n=r.imageMesh.geometry.boundingBox;if(n!=null){let i=new ue;if(r.imageMesh.getWorldPosition(i),!this.cameraFrustum.containsPoint(i))return;let a=new Ie;this.projectToScreen(a,i);let u=[new ue(n.min.x,n.min.y,n.min.z),new ue(n.max.x,n.min.y,n.min.z),new ue(n.min.x,n.max.y,n.min.z),new ue(n.max.x,n.max.y,n.min.z),new ue(n.min.x,n.min.y,n.max.z),new ue(n.max.x,n.min.y,n.max.z),new ue(n.min.x,n.max.y,n.max.z),new ue(n.max.x,n.max.y,n.max.z)],c=[];for(let b of u){let S=b.clone().applyMatrix4(r.imageMesh.matrixWorld),O=new Ie;this.projectToScreen(O,S),c.push(O)}let m=1/0,d=1/0,h=-1/0,g=-1/0;for(let b of c)m=Math.min(m,b.x),d=Math.min(d,b.y),h=Math.max(h,b.x),g=Math.max(g,b.y);let v=new Se(a.x,a.y,h-m,g-d);this.currentImageScreenBBoxes.push(v)}}};o(fg,"ImageSystem");var vd=fg;l();var eP=250,mo,hg=class hg extends Te{constructor(r,n){super();f(this,"cameraDirty",!0);f(this,"focusablesDirty",!0);f(this,"state");f(this,"camera");f(this,"debugEl",null);f(this,"raycasters",[]);f(this,"collisions",new Map);f(this,"focusableEntities",new Set);f(this,"debugRaycasters",!1);_(this,mo);f(this,"update",o((r=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!r&&(Date.now()-n>eP||(s(this,mo)&&cancelAnimationFrame(s(this,mo)),W(this,mo,requestAnimationFrame(()=>{this.updateRaf()}))))},"update"));this.state=r,this.camera=n,this.buildRaycasters()}resize(){this.buildRaycasters()}buildRaycasters(){this.debugEl&&this.debugEl.remove();let r=new Ie(this.state.canvasWidth/2,this.state.canvasHeight/2),n=new Ie(r.x/1.2,r.y/1.2),i=new Ie(r.x+(r.x-n.x),n.y),a=new Ie(n.x,r.y+(r.y-n.y)),u=new Ie(i.x,a.y),c=new Ie(r.x,r.y/1.5),m=new Ie(r.x,r.y+(r.y-c.y));this.debugEl=document.createElement("div"),Object.assign(this.debugEl.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none"}),document.body.append(this.debugEl),this.raycasters=[r,c,m,n,i,a,u].map((d,h)=>{if(this.debugRaycasters){let O=document.createElement("div");O.style.position="absolute",O.style.top=d.y+"px",O.style.left=d.x+"px",O.style.width="10px",O.style.height="10px",O.style.backgroundColor="red",this.debugEl.append(O)}let g=d.x/this.state.canvasWidth*2-1,v=-(d.y/this.state.canvasHeight)*2+1,b=new Ie(g,v),S=new Ln;return S.setFromCamera(b,this.camera),[S,b,h===0?10:h<7?2:1]})}updateFocusableEntities(){this.focusableEntities.clear();let r,n,i;for(let a of this.state.geometry3DIdsInScene)if(i=this.state.geometry3DMap.get(a),i!=null){if(i.type==="group-container"&&i.components[1]!==void 0&&i.components[1]instanceof zu){if(n=i.components[1],n.dirty===!0||n.focusMesh==null){n.focusMesh&&Rt(n.focusMesh);let u=new Qt;u.setFromObject(i);let c=u.max.x-u.min.x,m=u.max.y-u.min.y,d=u.max.z-u.min.z;if(!isFinite(c)||!isFinite(m)||!isFinite(d)||isNaN(c)||isNaN(m)||isNaN(d)||c<=0||m<=0||d<=0)continue;let h=new Ri(c,m,d),g={transparent:!0,opacity:this.debugRaycasters?1:0,visible:this.debugRaycasters};if(this.debugRaycasters){let S=["red","green","blue","yellow","purple","orange","pink","brown","gray","black"];g.color=S[Math.floor(Math.random()*S.length)]}let v=new cr(g),b=new Oe(h,v);b.position.set((u.min.x+u.max.x)/2,(u.min.y+u.max.y)/2,0),b.userData={entityId:i.userData.entityId},n.focusMesh=b,i.add(b),i.components[1].dirty=!1}this.focusableEntities.add(n.focusMesh)}else if(i.type==="geometry"&&i.components[4]&&i.components[4]instanceof zu&&(r=i.components[0],n=i.components[4],r instanceof Tt&&r.geometry!=null&&(n.dirty===!0||n.focusMesh==null))){if(n.focusMesh==null){let u=new Oe(r.geometry);u.userData={entityId:i.id},n.focusMesh=u}this.focusableEntities.add(n.focusMesh)}}this.focusablesDirty=!1}updateRaf(){if(this.focusableEntities.size===0){this.publish("geometry-in-focus",[]);return}this.cameraDirty&&this.raycast()}raycast(){this.collisions.clear();for(let[n,i]of this.raycasters)n.setFromCamera(i,this.camera);for(let[n,i,a]of this.raycasters)n.intersectObjects(Array.from(this.focusableEntities.values())).forEach(c=>{var m;if((c==null?void 0:c.object)!=null&&"isMesh"in c.object&&(c!=null&&c.object.isMesh)){let d=c.object.userData.entityId,h=(m=this.collisions.get(d))!=null?m:0;this.collisions.set(d,h+a)}});let r=Array.from(this.collisions,([n,i])=>({entityId:n,weight:i})).sort((n,i)=>i.weight-n.weight).map(({entityId:n})=>n);this.publish("geometry-in-focus",r),this.cameraDirty=!1}showRaycasters(){this.debugRaycasters=!0,this.buildRaycasters()}hideRaycasters(){this.debugRaycasters=!1,this.buildRaycasters()}destroy(){s(this,mo)&&cancelAnimationFrame(s(this,mo)),this.debugEl&&this.debugEl.remove(),this.collisions.clear(),this.focusableEntities.clear(),this.raycasters=[]}};mo=new WeakMap,o(hg,"GeometryInFocusSystem");var xd=hg;l();l();l();l();l();function tP(e){if(!e)throw new Error("geojson is required");var t=[];return Ui(e,function(r){rP(r,t)}),Eo(t)}o(tP,"lineSegment");function rP(e,t){var r=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":r=So(n);break;case"LineString":r=[So(n)]}r.forEach(function(i){var a=nP(i,e.properties);a.forEach(function(u){u.id=t.length,t.push(u)})})}}o(rP,"lineSegmentFeature");function nP(e,t){var r=[];return e.reduce(function(n,i){var a=kc([n,i],t);return a.bbox=iP(n,i),r.push(a),i}),r}o(nP,"createSegments");function iP(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],u=r<i?r:i,c=n<a?n:a,m=r>i?r:i,d=n>a?n:a;return[u,c,m,d]}o(iP,"bbox");var gg=tP;var f6=Xg(d6(),1);function PP(e,t){var r={},n=[];if(e.type==="LineString"&&(e=Jd(e)),t.type==="LineString"&&(t=Jd(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=p6(e,t);return i&&n.push(i),Eo(n)}var a=(0,f6.default)();return a.load(gg(t)),Yd(gg(e),function(u){Yd(a.search(u),function(c){var m=p6(u,c);if(m){var d=So(m).join(",");r[d]||(r[d]=!0,n.push(m))}})}),Eo(n)}o(PP,"lineIntersect");function p6(e,t){var r=So(e),n=So(t);if(r.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],a=r[0][1],u=r[1][0],c=r[1][1],m=n[0][0],d=n[0][1],h=n[1][0],g=n[1][1],v=(g-d)*(u-i)-(h-m)*(c-a),b=(h-m)*(a-d)-(g-d)*(i-m),S=(u-i)*(a-d)-(c-a)*(i-m);if(v===0)return null;var O=b/v,x=S/v;if(O>=0&&O<=1&&x>=0&&x<=1){var E=i+O*(u-i),I=a+O*(c-a);return Xd([E,I])}return null}o(p6,"intersects");var Dd=PP;l();function Xs(e,t){t===void 0&&(t={});var r=ya(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return MP(r,t);case"MultiPolygon":return TP(r,t);default:throw new Error("invalid poly")}}o(Xs,"default");function MP(e,t){t===void 0&&(t={});var r=ya(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return h6(n,i)}o(MP,"polygonToLine");function TP(e,t){t===void 0&&(t={});var r=ya(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},a=[];return n.forEach(function(u){a.push(h6(u,i))}),Eo(a)}o(TP,"multiPolygonToLine");function h6(e,t){return e.length>1?by(e,t):kc(e[0],t)}o(h6,"coordsToLine");function kP(e,t){var r=!0;return Ui(e,function(n){Ui(t,function(i){if(r===!1)return!1;r=_P(n.geometry,i.geometry)})}),r}o(kP,"booleanDisjoint");function _P(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return!jP(e.coordinates,t.coordinates);case"LineString":return!g6(t,e);case"Polygon":return!Zi(e,t)}break;case"LineString":switch(t.type){case"Point":return!g6(e,t);case"LineString":return!LP(e,t);case"Polygon":return!y6(t,e)}break;case"Polygon":switch(t.type){case"Point":return!Zi(t,e);case"LineString":return!y6(e,t);case"Polygon":return!RP(t,e)}}return!1}o(_P,"disjoint");function g6(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(NP(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}o(g6,"isPointOnLine");function LP(e,t){var r=Dd(e,t);return r.features.length>0}o(LP,"isLineOnLine");function y6(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){var i=n[r];if(Zi(i,e))return!0}var a=Dd(t,Xs(e));return a.features.length>0}o(y6,"isLineInPoly");function RP(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){var i=n[r];if(Zi(i,t))return!0}for(var a=0,u=t.coordinates[0];a<u.length;a++){var c=u[a];if(Zi(c,e))return!0}var m=Dd(Xs(e),Xs(t));return m.features.length>0}o(RP,"isPolyInPoly");function NP(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],a=t[0]-e[0],u=t[1]-e[1],c=n*u-i*a;return c!==0?!1:Math.abs(a)>=Math.abs(u)?a>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:u>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}o(NP,"isPointOnLineSegment");function jP(e,t){return e[0]===t[0]&&e[1]===t[1]}o(jP,"compareCoords");var b6=kP;function Og(e,t){var r=!1;return Ui(e,function(n){Ui(t,function(i){if(r===!0)return!0;r=!b6(n.geometry,i.geometry)})}),r}o(Og,"booleanIntersects");var UP=5e3,Bg="outdoor-system-debug-container",v6=!1,Pi,_t,Ys,vu,Mi,fo,Ho,fn,xu,Qs,wd,Ad,Mn,Pg,Eu,Ko,x6,Fd,ec,E6,C6,Mg=class Mg{constructor(t){_(this,Mn);_(this,Pi,!0);_(this,_t);f(this,"idleQueue",new Vo);_(this,Ys,"");_(this,vu,new Set);_(this,Mi,new Set);_(this,fo);_(this,Ho);_(this,fn,null);_(this,xu,!1);_(this,Qs,o(t=>{if(!s(this,_t))throw new Error("Map not initialized");let n=[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]]].map(m=>s(this,_t).project(m)),i=Math.max(...n.map(m=>m.x)),a=Math.min(...n.map(m=>m.x)),u=Math.max(...n.map(m=>m.y)),c=Math.min(...n.map(m=>m.y));return[new Kd.default(a,c),new Kd.default(i,u)]},"#getScreenPoints"));_(this,wd,o(()=>{s(this,fn)&&(clearTimeout(s(this,fn)),W(this,fn,null),W(this,Pi,!1))},"#stopTrying"));_(this,Ad,o(()=>{s(this,fn)&&(clearTimeout(s(this,fn)),W(this,fn,null)),W(this,fn,setTimeout(()=>{s(this,wd).call(this)},UP))},"#startTrying"));_(this,Eu,o(async()=>{if(v6&&s(this,fo)){let t=s(this,Qs).call(this,s(this,fo));dt(this,Mn,C6).call(this,t)}if(!(!s(this,_t)||!s(this,xu))&&s(this,Pi)&&!(!s(this,Mi)||s(this,Mi).size===0)&&(s(this,Mn,x6)&&s(this,Fd).call(this),s(this,fo)&&s(this,Ho))){let t=s(this,Qs).call(this,s(this,fo)),r=s(this,_t).queryRenderedFeatures(t,{layers:Array.from(s(this,Mi))});if(r.length>0){this.idleQueue.onComplete(()=>{s(this,Ko).length>0&&(s(this,Mi).forEach(n=>{var i;(i=s(this,_t))==null||i.setFilter(n,["all",...s(this,Ko)])}),W(this,Pi,!1)),W(this,Ko,[])});for(let n of r)this.idleQueue.add(()=>{if(n.geometry!=null&&"coordinates"in n.geometry){if(s(this,Ho)==null)return;let i;if(n.geometry.type==="Polygon"?i=Tc(n.geometry.coordinates):n.geometry.type==="MultiPolygon"&&(i=vy(n.geometry.coordinates)),!i)return;for(let a of s(this,Ho))if(Og(a,i)){s(this,Ko).push(["!=",["id"],n.id]);return}}})}}},"#handleRender"));_(this,Ko,[]);_(this,Fd,o(()=>{this.idleQueue.clearAll()},"#cancelJobs"));_(this,ec,o(t=>{var r,n;if(s(this,_t)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,vu).size>0){let i=(n=(r=t==null?void 0:t.style)==null?void 0:r.stylesheet)==null?void 0:n.id;(!i||i!==s(this,Ys))&&(W(this,Ys,i),dt(this,Mn,Pg).call(this),W(this,Pi,!0))}},"#handleStyleChange"));t&&(W(this,_t,t),s(this,_t).on("styledata",s(this,ec)),s(this,_t).on("render",s(this,Eu)),W(this,xu,s(this,_t).loaded()),s(this,_t).on("load",()=>{W(this,xu,!0)})),v6&&dt(this,Mn,E6).call(this)}hideLayersIntersectingPolygons(t,r,n){s(this,fn)&&clearTimeout(s(this,fn)),s(this,Ad).call(this),W(this,fo,t),W(this,Ho,r.reduce((i,a)=>{if(a.geometry.type==="Polygon"){let u=Tc(a.geometry.coordinates);i.push(u)}else a.geometry.type==="MultiPolygon"&&i.push(...a.geometry.coordinates.map(u=>Tc(u)));return i},[]));for(let i of n)s(this,vu).add(i);W(this,Pi,!0),dt(this,Mn,Pg).call(this),s(this,Eu).call(this)}destroy(){s(this,_t)&&(s(this,_t).off("styledata",s(this,ec)),s(this,_t).off("render",s(this,Eu))),this.idleQueue.clearAll()}};Pi=new WeakMap,_t=new WeakMap,Ys=new WeakMap,vu=new WeakMap,Mi=new WeakMap,fo=new WeakMap,Ho=new WeakMap,fn=new WeakMap,xu=new WeakMap,Qs=new WeakMap,wd=new WeakMap,Ad=new WeakMap,Mn=new WeakSet,Pg=o(function(){if(W(this,Mi,new Set),s(this,_t))for(let t of s(this,vu))s(this,_t).getLayer(t)&&s(this,Mi).add(t)},"#filterStylesInMap"),Eu=new WeakMap,Ko=new WeakMap,x6=o(function(){return this.idleQueue.size!==0},"#running"),Fd=new WeakMap,ec=new WeakMap,E6=o(function(){if(!document.getElementById(Bg)&&s(this,_t)){let t=document.createElement("div");t.id=Bg,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.bottom="0",t.style.right="0",t.style.pointerEvents="none",t.style.zIndex="1000",s(this,_t).getContainer().appendChild(t)}},"#addDebugContainer"),C6=o(function(t){let r=document.getElementById(Bg);if(!r)return;let n=document.getElementById("bbox");n==null&&(n=document.createElement("div"),n.id="bbox",n.style.position="absolute",r.appendChild(n));let i=[Math.min(t[0].x,t[1].x),Math.min(t[0].y,t[1].y)],a=[Math.max(t[0].x,t[1].x),Math.max(t[0].y,t[1].y)];n.style.top=i[1]+"px",n.style.left=i[0]+"px",n.style.width=a[0]-i[0]+"px",n.style.height=a[1]-i[1]+"px",n.style.border="2px solid ".concat(s(this,Pi)?"red":"blue")},"#updateDebugBBox"),o(Mg,"OutdoorLayers");var Sd=Mg;l();l();l();l();var Od="attribute float pathDistance;\nattribute vec3 pathNormal;\nattribute vec3 pathTangent;\n\n\nuniform vec2 uvScale;\nuniform float vertexes;\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform float nearZoom;\nuniform float farZoom;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform vec2 cameraParameters;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform float highlightWidthMultiplier;\nuniform vec3 highlightColor;\n\nfloat flattenFactor = 0.0;\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping y = mx + b where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main() {\n fragPathDistance = pathDistance;\n\n // We can get an origin point for the cross-section of the path by\n // subtracting the surface normal times the radius, since the surface normal\n // points strictly away from the centre.\n vec3 origin = position - nearRadius * normal;\n \n // Inflate the path along its surface normal to increase its radius from\n // 'nearRadius' to 'farRadius' when the camera is at 'farZoom'.\n vec3 adjustedPosition = position;\n zoomLevel = clampRemap(cameraParameters.x, nearZoom, farZoom, 0.0, 1.0);\n\n // expansion factor uses the zoom level to increase/decrease the radius\n // for fixed widths, this number is ZERO\n float expansionFactor = (farRadius - nearRadius) * zoomLevel;\n\n adjustedPosition += normal * expansionFactor;\n\n\n // TODO: optimize by removing branching\n bool isHighlighted = fragPathDistance >= highlightStartFraction && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction);\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // we have to subtract 1., don't ask why\n adjustedPosition += normal * (highlightWidthMultiplier - 1.) / 2.;\n }\n \n\n // Determine how far the path extends \"up\" or \"down\" in the direction of the\n // path normal.\n float height = dot(adjustedPosition - origin, pathNormal);\n\n // For horizontal paths, flatten the bottom half entirely so that it's flat\n // against the floor. This makes the path look nicer when it's\n // semitransparent behind opaque geometry, so you don't see it\n // peeking through. For vertical paths, preserve the full tube geometry.\n if (!pathIsVertical) {\n float desiredHeight = max(height, 0.0);\n desiredHeight = desiredHeight * flattenFactor;\n float flattenMagnitude = height - desiredHeight;\n adjustedPosition = adjustedPosition - pathNormal * flattenMagnitude;\n }\n\n // Transform the vertices into NDC.\n vec4 mvPosition = modelViewMatrix * vec4(adjustedPosition, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n\n fragTexcoord = uv;\n\n // Compute a texture coordinate for mapping the arrow texture to the path.\n // We don't want to use the u-value that Three.js provides, because the\n // path may end up twisting arbitrarily -- but we want the arrow texture to\n // always be on the top of the path.\n vec3 bitangent = cross(normal, pathTangent);\n fragTopTextureU = -dot(bitangent, pathNormal) * 0.5 + 0.5;\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // TODO: fix scaling\n fragTopTextureU = -dot(bitangent, pathNormal * highlightWidthMultiplier) * 0.5 + 0.5;\n }\n\n radius = mix(nearRadius, farRadius, zoomLevel);\n}\n";l();var Tg="#define ARROW_FADING_POINT 0.15\n\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform vec2 resolution;\nuniform vec2 cameraParameters;\nuniform vec3 color;\nuniform float pathLength;\nuniform bool showPulse;\nuniform vec3 pulseColor;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform float arrowAnimationTimer;\nuniform float opacityMultiplier;\nuniform bool dashed;\nuniform sampler2D arrowTexture;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform vec3 highlightColor;\n\n// How long the arrow should be, as a factor of pathRadius. Since we've\n// mostly flattened the top of the path, values near 2.0 (the diameter)\n// will probably look best.\nconst float arrowLength = 2.0;\n\n// How much of a relative margin the arrow texture should have inside the\n// area laid out for it. Useful to pull the arrow away from the edges of the\n// path, which slope down.\nconst float arrowMargin = 0.1;\n\n// How many arrow-lengths of space should be between arrows on a short path.\nconst float arrowSpacingOnShortPath = 6.0;\n\n// How many arrow-lengths of space should be between arrows on a long path.\nconst float arrowSpacingOnLongPath = 7.5;\n\n// How long a path must be to be considered \"long\", as a factor of\n// the path radius.\nconst float longPathLength = 200.;\n\n// How long a path must be to be considered \"short\", as a factor of the\n// path radius.\nconst float shortPathLength = 75.;\n\n// How much of the path's length the fade-in should comprise when going from\n// zero opacity to full opacity.\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // Compute the opacity of the path based on the distance from the current\n // fragment to the 'complete' value as it varies from 0.0 to 1.0.\n // Fragments that are at the 'complete' value or past it will be fully\n // transparent, while fragments that are at 'complete - completeLength'\n // or before it will be fully opaque. However, we adjust the 'complete'\n // value here so that it overshoots by one full 'completeLength', so that\n // the entire path will be opaque when the 'complete' value is at 1.0.\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n // Push in the texture coordinates so that they ramp up\n // at 'arrowMargin' instead of at zero; this remapping looks somewhat\n // like this:\n // 1 ^ ___\n // | /\n // | /\n // | /\n // | /\n // |___/\n // 0 +---------->\n // 0 ^ 1\n // arrowMargin\n // Making the arrows narrower on the path.\n float u = fragTopTextureU;\n u = clamp(\n u * (1. / (1. - arrowMargin * 2.)) - (1. / (1. - arrowMargin * 2.) - 1.) / 2.,\n 0.0,\n 1.0\n );\n\n float arrowSpacing = clampRemap(\n pathLength,\n shortPathLength * radius,\n longPathLength * radius,\n arrowSpacingOnShortPath,\n arrowSpacingOnLongPath\n );\n\n // Reduce the spacing between arrows when the camera zooms out, as increasing\n // the path radius will increase the arrow size and thus be able to fit\n // fewer arrows on in total, and this secondary movement of the arrows\n // \"zooming off\" the end of the path is unpleasant\n float expandAmount = mix(1.0, farRadius / nearRadius, zoomLevel);\n float effectiveArrowSpacing =\n arrowSpacing * 1.0 / expandAmount +\n arrowMargin * 2.0;\n\n float effectiveArrowLength = arrowLength * radius * (1. - arrowMargin * 2.0);\n\n // Adjust the slope of the vertical texture coordinate so that it goes\n // from 0 to 1 along the length of the arrow plus the spacing between\n // arrows, and adjust its x-intercept so that one arrow moves to the\n // exact position of the next arrow as 'arrowAnimationTimer' goes\n // from 0 to 1\n float v = (\n fragTexcoord.x * (pathLength / effectiveArrowLength)\n - arrowAnimationTimer * (1. + effectiveArrowSpacing)\n );\n\n // Compute a \"looping sawtooth\" wave for determining the vertical texture\n // coordinates of the arrow texture, roughly as follows:\n // 3 ^ /\n // | ___/\n // 2 | /\n // | ___/\n // 1 | /\n // |___/\n // 0 +--------------->\n // 0 ^ ^\n // ^ |_|\n // | effectiveArrowLength\n // |___|\n // effectiveArrowSpacing\n //\n // This is effectively equivalent to this sort of sawtooth wave:\n // ^\n // 1 | / / /\n // |___/ ___/ ___/\n // 0 +--------------->\n //\n // Causing the image of the arrow to repeat, with dead space (the bottom\n // edge of the texture stretched out) between the arrows at the provided\n // spacing. The reason why the \"looping\" design is preferred is because\n // it takes advantage of WebGL's 'GL_REPEAT' texture wrapping behaviour\n // to avoid the discontinuity that can end up causing visual artifacts.\n if (mod(v, (1. + effectiveArrowSpacing)) < 1.) {\n v = v - effectiveArrowSpacing * floor(v / (1. + effectiveArrowSpacing));\n } else {\n v = ceil(v / (1. + effectiveArrowSpacing));\n }\n\n // Use the r-component of the texture to determine whether the arrow covers\n // this fragment or not\n vec2 sampleTexcoord = vec2(u, v);\n float arrowAmount = 0.0;\n vec3 secondColor = pulseColor;\n\n vec3 finalColor = color;\n\n\n \n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n // [Anzor] I added 0.005 to make the highlight transition a little smoother when the width multiplier is too high\n if (fragPathDistance >= highlightStartFraction - 0.005 && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction)) {\n finalColor = highlightColor;\n }\n\n\n if (displayArrowsOnPath) {\n arrowAmount = texture2D(arrowTexture, sampleTexcoord).r;\n float delta = 1.0 - abs(fragPathDistance * 2.0 - 1.0);\n secondColor = mix(finalColor, pulseColor, 1.0 - smoothstep(ARROW_FADING_POINT, 0.0, delta));\n }\n\n if (dashed) {\n float dashLength = 0.1; // Adjust this value to change the dash length\n float gapLength = 0.1; // Adjust this value to change the gap length\n float totalLength = dashLength + gapLength;\n float numSegments = ceil(1.0 / totalLength);\n float adjustedTotalLength = 1.0 / numSegments;\n float adjustedDashLength = adjustedTotalLength * (dashLength / (dashLength + gapLength));\n float pattern = mod(fragPathDistance, adjustedTotalLength);\n opacity = pattern < adjustedDashLength ? 1.0 : 0.0;\n }\n\n\n\n if (showPulse) {\n // Add the pulse color to the path by determining how far the current fragment\n // is from 'pulse'\n float pulseLocation = remap(\n pulse,\n 0.0,\n 1.0,\n -pulseLength,\n 1.0 + pulseLength\n );\n float pulseDistance = smoothstep(\n 0.0,\n pulseLength,\n abs(fragPathDistance - pulseLocation)\n );\n\n // Blend the pulse color to the path based on how close this fragment is to\n // the 'pulse' value and whether it's covered by an arrow -- but if it's\n // covered by *both*, then we go back to using the regular path color\n // (making arrows look like \"holes\" when they're overlapping the pulse.)\n float pulseLevel = abs(1.0 - pulseDistance - arrowAmount);\n\n \n gl_FragColor = vec4(mix(finalColor, secondColor, pulseLevel), opacity * opacityMultiplier);\n } else if (displayArrowsOnPath) {\n gl_FragColor = vec4(mix(finalColor, pulseColor, arrowAmount), opacity * opacityMultiplier);\n } else {\n \n gl_FragColor = vec4(finalColor, opacity * opacityMultiplier);\n }\n #include <colorspace_fragment>\n}\n";l();var I6="uniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nvarying float fragPathDistance;\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // this ensures that the stencil mask moves along with the path above it, to avoid the progress bar effect\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, opacity);\n}";var D6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAQkHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZpZciQ7rkT/uYpeAicQ5HI4mr0dvOX3ATOl0li3q3SVJkUqFMEBcHc4IuX2///fcf/hK7cSXRatpZXi+cott9h5U/3j63EMPt+fL1/h+fPdeff6NnJMHNPjD2U/7+qcl183aH6eH+/PO52PN7E+B3qZ+Tlgspkjb57X1edAKT7Oh+fvrj3v6/nNdp7ftd057abHnz78npVgLGG8FF3cKSTPz2oXJFaQWuocCz9D0mhnEu8Tx54k6dexc98F77vY+f48n96HwvnyvKB8iNHzfJCvY3cj9HZF4dfM7/6QZ4j+7deb2J2z6jn7sbueC5Eq7rmpl63cd1w4GCrd2wov5Vt4r/fVeFW2OMnYIpuD13ShhUi0T8hhhR5O2Pc4w2SJOe5IuGOMM6Z7rhL+FudNSrZXOFFJz3KpkqtJ1hKn4+tawp233flmqMy8AlfGwGCBOz693Fcn/+b1OtA5Bt0QfH2NFeuKFnCWYZmzn1xFQsJ5xlRufO/LvcGNf5PYRAblhrmywe7HY4gh4Re20s1z4jrx2fkHNYKu5wCEiLmFxYREBnwJSUIJXmPUEIhjJT+dlceU4yADQSSu4A65SamQnBptbu7RcK+NEh+nkRYSIZBGSQ0EIlk5C/jRXMFQlyTZiUgRlSpNekklFymlaDGN6po0q2hR1apNe001V6mlaq211d5iS0iYtNLUtdpa651JO0N37u5c0fuII408ZJSho442+gQ+M0+ZZeqss82+4koL+q+y1K262uo7bKC085Zdtu662+4HrJ108pFTjp562umvWXtm9X3WwofM/T5r4Zk1y1i+1+mvrHFa9WWIYHIiljMyFnMg42oZANDRcuZryDla5ixnvkVIIZGsBbHkrGAZI4N5hygnvObuV+Z+mzcn+Y/yFr/LnLPU/RuZc5a6Z+Y+5+2LrK1+K0q6CTIWWkx9OggbF+zaY+1Wk/766H46wF8ONFY+O8hBMEc7oc4Vdh+8JsE+PUSrVjr70Zz1+H56PH3o9sRR1ql5Ha8bUMQxpe89Tki8Sb0tE23cw3DcfEo+ugnj2G3WEmononVfoag71pVjR+EmAE53eT5tqYfEHl/7ThMusaI+St0jktFa9gKnreiQqCNpZ2mJdSkbaiK6DrovYR4/JhJfRsx5d5EVZnEIPetHnU5KynJPTSuCPuC0lOuXH7n1DNq7DpUtHbhM5lDA0c2bnDCJoOObMnyj+aPjPwx0yiDUxKKsg35VnRnBEVhonKwK5hOk5NttUrhr2+tMOXkPJb1RZ+iAelYjL2MuO3pGRQ78GdxwOOaTAcJZcewq7ilB1RJCSozUdSEdwVJVb6asiBsHH1Bqgbiv3Cmkkis6ktVnZGRRwMNJjUA3Ao2127YWdhAIblxF51hzMcZsVZc0r0dJo5Liqfn41Q+q193SGhhkMkgaLJRNnEpqBtyVvbcVffIk+LE9QPFBTMTQe0aWkMXMnx3dy5sfHreDE60Ql50E+SqRcmfK16L2p0Ol8JFATu3qASXy7SvmiGW2cdMBxsty44CvtLogfGlv7WkCSV0WId2270EaD5Ym40cs+SAwZuNjPSTywAvEfLmzQhtLDntfCnhl/fNmUNnzyA2g76Zn0SP+c+I6bCC0FONUQ4L50e95dif+DH/m9htQjBEhPPpOjYjmm2ChbfEMIUaYtAIxmWJHlilLU8ZRs9pCsHbDpFaRgZljz2QandjDIBPZDGTuoZW1KdlYh52ALzisKJRNWSQmLAWx8iv9mGttT15bBc2oxd57bZtVF98CYtK3UH22Yd/A7WaKa+ZjNTOXEzNhMJ5kmQOvfzsbxbZALJ2xwGBjX2HFQybhi7kpbA7DVpS3RxMJwFyHwGk5gs6a4lrRHVqhYT0QTJC9UZcC9Yrelkn6yXch68NKNtG7CiU3vf/zMZAYXPWdrR9XZ/ctMV1sJQ2wJEGxzaHs7LmmHIwnUwbwnNAapBY9xhE19DNJW3ua0dDk/AjwITacR0PqZxkbyJ+E5jYbxI84x1TBE+y90hwDCYZIM0tqAKPZfCzFrbH8kYCm3eqQkZ2+2GovcL8Suokyg8yyCJes6dcouSLiNSLb0ETJU+/N/WFsBBSOXBbm9Cwp4CzlOag7ro7R2vC19nSsCPmAjIEMiobFwaoVXhjTU2XMpgEsDH/L3Sx54OCTMUSXI/IIA2V4QcLQpwVz12pInI0bY56pIQ2BSGRLL+yLfZ7JkiimbK+aepsbwRStpokx5gCqe1hjdMAwcINbkk5jmedrNRAG5pUXPe0sZIoXy1h7lSDxApzheg24JeDNtDS1oBDBUC4iWZFilBPhZx0Kqx2lihpbG9q4sYidksCN4yRYhNM4nxfBbTi4E3AT6B3igbvs9Gv8ZkHsIfdlep+2HelEDbkJdNjqZQ90B7k6OIoFfkkPNoY+z0gzACa1f2qcBYxVJpT2QQgS19dKQlbC24S92xiEAFRKB5Uy1qrBgOtwIge55G0kRPfIytGx0tMOrGfrijB2FHOk/TKcMjDTMPeBo4FnXD5cQ8vtdgoAN0yuzZQHQI09wm/5vAB6RHyI9rYKiZ6YWC6rbaiLmDtoaToC1bViXQFNtgWsOfEEKCleC3GWPSfgQWRQWMgw/9FDgvOZrFAT3SmsA3DLbqlsSppQG5QeOjPXavUUkxF/qgLM05vW5o7UakuBqo2ZW8Nj0LB7imVJC9QSA+wd7RPztIUZ80xQZq0ROrc8CSVncWzkTA/RwmunldCPAQKjqVC7bhRuTIv0plbk7gOX4m5OAi2YesYZ0KBQRToG8iv9x8dgGtgECYRBeEU87OxoSc8epu+s7Mq/MN0VbBT19dii7ekO66UZwdAMtoAVQd13J5nwZe98OgGslmVqAGBkeLZNVNVlWpV18qihntXKnBZvrDIVgFpx4q5poLqREOVplMPSpTF2KvjBAzDpprkruXIaaUmUD4Xo2yrGWcYlixKIwRFjl0jPQhKznUXZAoSjlg9c/NwAI4p3Q/w5bCNfhUZS7bGfqesHqKAlyZZxZgNrhGevZXccaqBys4NEqB3Vqfptji9uUrhCL6yXFqxtm0hhLyYU3Tjd8I/HZaWD1oyVjnG5hhpCN5yHSf8BQUZlVNd00OP4M0TK+JSM7iqWi01SinFkCQXWxiZJLqqAHiEt3G3I2WYd46KU9pIJIOkoRQYCcEAAPguHo0Y4k8Hl6SW50MoW0uZU8jJOUghKo38Nl5ZSwsJNAUC2/lFZWkfMjrU8dFrTjHpJnUrLCILQIxINiYdQlDXaE/razQ4jjQluN5jW1Eh/S7yYvI5gigSjdLYU9TiFXAcHjISiLhQd9obb3OQmwY+YqVwiBMCkOGLXaK/ljBShh56c1g0uyIb2lBRKO7ZTAFncw5c5UGjGSy3CsI1Jt2mtruZkfhBZmbR+842Yu1eDiWEl0V6LZcGem6Ct+LW4Wy3oAjyNObazKBHomhJ3HMKEKHgiGksH+Ig1nTidfNMyA+oYHqVFaRGLiQreVLc9GvQgftKjW9cfUSKNYL80rqU7Um2rwqQJR1ai31Wq7vzKJEsFHDj0bAEMUKXgvfD5bWbaLPBTKz1Nk/Fg+GUZvUzFw80CLaKtPAACVAWrismh863FU4IJ0716SXBUNVb/SDMVvZgDt34CXoOq1JKvg0n08gPHTwXBNgD5W8pZZ8E9EVWcv1DZMB2NFysIwkqBSaH5QRmsAHdkHB+UANvLJvFpQKAahSmYTLEd2AFO+5rsqRRU6sVv5IP0wsSPLcWsbC1Y95mte71CUm6RJJWwkg6Q4k+xWMM0ByElJPQ6j2ED5hY42ALpZRytx9RlgQlJLijzhKi5eX5JBSIRGfo9o2xhd/0aWku8OS+4D9ZnovHDQMPaYo4qm2mlZbUnd7pR6oQj29Z2BqJ9n3LRT+MTLu3IR+ZP2TCPh3EDw8H1NHpoT7FibNYU8WHd9ESHcY12aDOQCUBddi4Ucp+4yuzz8ybcCCu1h8zvzXhDN4HYLq1R+U0xzUqg5QSA3iSBgdDouy55Ifx0DaeEhgezxBRGmoEJ6AJitVuzwtKPlUskHgU2F0LS7AFIwW5jPu0RUL7sp+fkNk0ee8P6uXYgl40WM+cdCOW21r13e0ivt0ff/mYcUfrQZWs2BiN6G+MDTGz1BKORmUTNQp9YGSHFxAeTkQrKd6FoVUogyytW25OLy3OpaO5oZCQp46aPzb5LnJiFEIwAKkmbYVYIjzVv3vj7rA6HignEeQAXTAHKDhoD7Uujh0QjtsB6fTP1NzO7T1Nzq4F1GnfHdXCG1Yxjwdtjf+PGRGTzEtEAUCz7KLfTdItLwCXuSOAzVjaZB6LvbUZhYGWmifSZlcMDnGHPd6gPeiK9erhpiw7ZP9ahTrMhFDa1J53m9ri2DloziqGETTcVSppCbTDDjExg6RrZ6cPEzB8XArEjQSB29odrUoLyoS/65RfM9fprGGjlHpbhGgbYD8MtmW1eFcAWX5dbcMHcl8sUI2k+H7GPW9VrArw3G+BefcCrCaAT/N53YLvP26Uy0kMFnDEZz0DJkmQqEOlL7SlKweYhH8gxpYeAYi0f9magqPbMYZuUI6007lSZQoyoGfYQHsNRzHXR3MMINTSMZpq1KD2A5MDJgtMLdRU6R4CEOJcKGiIJ7K6P/vAM6xpECHI8rRHsaEj6smkngAUjXTzrRoSI48ZpHOqgOY5OejKVdpnmiYUChQnVdIPa6ekGqRSRgEO119oDHOiIUQ5ciYVgaF1oG8Udo8WYtD+DEi8D/w8rAJE2k2PoyV0oMtpauxreaFjpujAvxFlwBhjuNqM9P0IfI5iD8Nh8y1kG4igjJkDNkOijnlLhItAd9lhRd670yNRTu95cR/Xuu0c5WO4DEFk5YQAPtLvU4TYPGRh4APPEDNiuuwR6SC21JoFbQBBMr+zJmT32QplNI6p16PbculN/pCX1wAyTWGTeJ774aln0gvQikw7TmkfsNbdQNs0adutYUDqNtGc0RqngUYdhUYuHSL1/eLrgvqDTC5neu++vufRkEgP9D2T64Kg/c4n+s7k3dDr3me8nOr0c72MRNmgF7D4WySPP0YAI/bI4eixwc7K13QiRiL85A8fnSsUj+mvTrsZtVUEQZ6sTpVafW8nYJZyaZS0U+0xIb6et9PhhtoObozQbjKAoDf6eiFgx1UUvpUYj1GweH0MNMrofhynfWn7+KYu7n5r83hN9aqm+6qjcH7dUlgvZVLV3xqq4fbP16qv+eofuTz43eomAqfS7GBAB9zEE31WJ37eVIPtdGN5A8nMYPvvLt8t2/V/6gM19G4g/hIL7UXf9JgbuLRZ+AoW//AzyMxTcWyz8BAruLRZ+AgX3r3y2+mT/PwfiN1DoVI+QT3CZDmvb8022JeYb6HiQPQpPPvboFB+i1MZdcqWZqthHmix6vttw0UAI1z8oEnGwVe++c7JamxslC+8xKJE41XJmug1npz+6CUAKyURd9gSxo+kWxvtZth848GBlws/0SKjYhmbZ9IiV+mcGBSdWHk8sqSr2zz5J7QME/0yD+z4Pe+JuGn1MV/vUyZwOHojWPlmPXgf9CuoeN9UAT+FGwaLg44v3dWe6QpvuL3Ln/p3k/2AgqNDcfwHgqUmIIqn+hwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH4wYRESAMujenGAAAB9FJREFUeNrtnWlsFVUUx899fS1gUoKioEY+WBRUEohGkUhAKxgEjSgGoRGB4AJCNKAIJBJZJSiyGYMKKkIoLlEUKhUraxFkKUE2kU1aCrRgW2jpg9f29R2/sBTo67v3zL2zvfP73MzM+XU6mf+5504BGIZhGIZhGIZhGIZhGMZGGq3JvSmR62++BXHH7Ylbf9ouRMT99yVq/e0PICIiHumUmPV3PooXOf5EItafXoCXOdUn8ep/pgjrUDY40ervX4JXUTEiocoXL5/FawiNEwlU/6hzeB3hqQljQIwJYT3UzEkQA2JiGOslsiAhDIgZ1RiD6NIEMBD8NIKxyQr6vv7FtdgQa31uILg0ig2zsZmv4//yePUj7rjNv/U3yUEJ/r7Xr/XfvBmlOPKwT+vfhpIUdvdj/Wm7UZpTz/mv/g4HUYGyQb5r/+SjEhXD/VV/j5OoSGisj16LRe9iVCY8xTcGxIulSKBmtk8MiKHlSMIn8ViMqkQivojHgfcuIJ0VAc/XPzmMVljrcQOBmdVojY1NvVx/8mcRtEqeh+NxypJatM6+ezxb/7Io6uBwR4/e/1moicJunvz956A2ip/1Xv3Nt6JGSgd6rf47/0KtlHssHrfZi5rxVDwWDx5C7XgoHotHC9AANbO8YqBXERohMt8bv/8X/kNDRDM9cA+IgWVojhWuNxAYXo4mWePyeBwYHUKz5Lo6HidNvICmybvVxfXPqEbz7Gvr2vrn1KAdHH7IpX//8yNoD8dcGY+TM6NoF26MxzLTL26Mx0majtM4q5ed7yhNulVsd5WAxqset/mGS6/d5CIBLXI62/7I6ZKyzjUC0rIfsP+hE3zkxt9c8vy7tPnJbiKfuyP+Xdn8ZDeuiMei+zF0juWOGyBNv+iMxw4bEBkl6CzOxmPx6ll0mryWDtb/ViU6z17H4rEYG0I3cMiheByYFEZ34Ew8Dn5UjW7BiXisY/rFDfGYmgWCCwcngXto0q08z1YBSUsy3NWgb5Qe2WSjgJRlfdy2RJPcNXm9bQIarexpsP5VdxHjcbMcm2Q3/5P64i71U8k/ELuLNsVjcct2cnST+rGg+Jo4XmhLPBZ376GOfoOkAIB5NWTHxuu/nzj9ElkA8gLgA+pLlvF43IU4/VI9G1QEAHnIPjfVaP1PnqRdVngKqAkActDMa2Hw/u9zijjjNg5UBcBr1FbD3jbG6h9QSruk8ovfyFESABnUWSNT8VgMI06/lF7aBqomAJ4n3m+G4nHgbeJfZfHljcCKAqDHcWo87m2g/gnE53LhlS+lqQqATv9S4/FL2u//qcT2T34XoAuAdvuJBspf11z/LOKbyYG6q4bqAqDVTqKByjFa21/U6ZfdaWBNADTdTDQQnqSv/pRMYjrZevVLCUUAiF+JBqpnaqv/J2I+zb3mxZwkAMTPDq8ep1A3P/1y3ZOEJABgiaPxuOnvxLN/B7oEwELq/sPl1utvSdz8VPsl6BMAn1AbBKut1t96F+3ENXOFTgFiehXRwAZL8Vi0JW5+qppW7+HIAgDGnyca2G4hHouOh2knvTARdAuAkedsj8cinTj9Ujka9AuAV87YHI/F08TNT2eHgQkB0I/aIDhGmuIU/YnnKxkAZgTAU8SGHC0eDyJufiqKfTKrAqBrPtFAiXo8HlFBO1VBA7ebZQHQifhUVo7H4p2QgQeOdQHQbp8t8Tg4idj+2dPgwJIGAdBqhw3xmDz9EuelQ4cASP3DeDwOziW+ecdbldEiACDbcDxOWkBs/8QNHpoEAPXjLNFMmfpv+IZ4+PjRU5cAWGwwHqcQNz/J2NUmAMgjavHjMfEPTGpvvz4BQH1MrzMkoHoW2CsAppEaBFskemQUA+HJYLcAeJfQINgpNVuvbiA0FuwXAG8qNwh2S07WqxqQ/saPXgEwRDGu7W8te2Q1A6XSH0HWLAD6nVa5zoPS9asZKJb/DLZuAdDzhPx1Hu2gkobkDRQq/J8w7QJAfstevuI3+WQN1F39dkAAtP9H7jpPdFVtiMgZOKC0Z9aAAEiT+mrbScLQjIyBXWngtABokRf/kKefonRF4xvYqrjmYEQApG6Md8SyvrS+eDwDG5QbzUYExL3QMxnUlZGGD5wFbhEADQ7YVwyhr401YCD6LbhHACyK3SA4N9TK6mhMA5EvwE0CYF6sBkFopLXl8exYq9/gLgHwYf3x+PxoqwMC9RoIvw9uE1D/gH3VeOsjItnSq9/OCqhvwL5qAoABA5XU28qsAHjj2tW8mukABgzEXP12WgAMvrpBEPkYwICB2KvfjguAvnUH7GvnARgwUGRhEt24gLoD9tGvAAwYKLDyySzzAqDzpQH76CIAAwYOWtqNYoMAaH9xwP57AAMG9ljbj2SHALhjJyLijwAGDGyzuCPNFgGQuhlxpfw1yR94dfAxi5cmojI/lRyx+rtaX9XDhADr2CVABc//JycWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWIDToH8FyJUWtVWAALedDoFhGIZhGIZhGIZhGIYxyf+YwEMsIhMo/AAAAABJRU5ErkJggg==";var $P=new Pc;function S6(e,t,r){var Ce,bt;let{breakpoint:n,width:i,accentColor:a,completeFraction:u,isVertical:c,visibleThroughGeometry:m,dashed:d,highlightCompleteFraction:h,highlightStartFraction:g,highlightEndFraction:v,highlightColor:b,highlightWidthMultiplier:S}=t,{color:O}=r,x=!0,E=0,I=1/0,D=t.displayArrowsOnPath,C=!0,A=D,T=typeof i=="object"?Number(i.output[n])/2:i/2,k=typeof i=="object"?Number((Ce=i.output[n+1])!=null?Ce:i.output[n])/2:i/2,j=((bt=r.altitude)!=null?bt:0)+GP,U=0;e[0].z+=j;for(let ye=1;ye<e.length;++ye){e[ye].z+=j;let le=e[ye].x-e[ye-1].x,He=e[ye].z-e[ye-1].z;if(c)U+=Math.sqrt(le*le+He*He);else{let Wr=e[ye].y-e[ye-1].y;U+=Math.sqrt(le*le+Wr*Wr+He*He)}}if(!c){let ye=e[0],le=e[e.length-1];e.push(le.clone().setZ(le.z-.01)),e.unshift(ye.clone().setZ(ye.z-.01))}let G=new iy;A&&(G=$P.load(D6),G.colorSpace=vc);let $=new Mt(O),X=new Mt(a),V={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new Ie(1,1)},cameraParameters:{type:"v2",value:new Ie(E,0)},complete:{type:"f",value:x?0:1},color:{type:"c",value:$},pathLength:{type:"f",value:U},nearRadius:{type:"f",value:T},farRadius:{type:"f",value:k},nearZoom:{type:"f",value:E},farZoom:{type:"f",value:I},pulseColor:{type:"c",value:X},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:c},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:G},displayArrowsOnPath:{type:"b",value:D},showPulse:{type:"b",value:C},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:d},highlightCompleteFraction:{type:"f",value:h},highlightStartFraction:{type:"f",value:g},highlightEndFraction:{type:"f",value:v},highlightColor:{type:"c",value:new Mt(b)},highlightWidthMultiplier:{type:"f",value:S}},Y=new my(e);Y.curveType="catmullrom",Y.tension=0;let oe=30,Z=8,ee=oe*e.length,te=new py(Y,ee,T,Z,!1),Q=new Float32Array(te.attributes.position.count);for(let ye=e.length;ye<Q.length;ye++)Q[ye]=ye;te.setAttribute("vertexIndex",new vr(Q,1));let de=new Float32Array(te.attributes.position.count),je=new vr(de,1);for(let ye=0;ye<=ee;ye++)for(let le=0;le<=Z;++le)je.setX(ye*(Z+1)+le,ye/ee);te.setAttribute("pathDistance",je);let Me=new Float32Array(te.attributes.normal.count*3),Ve=new vr(Me,3);for(let ye=0;ye<ee;ye++){let le=te.tangents[ye];for(let He=0;He<=Z;++He)Ve.setXYZ(ye*(Z+1)+He,le.x,le.y,le.z)}te.setAttribute("pathTangent",Ve);let qe=new Float32Array(te.attributes.normal.count*3),Ae=new vr(qe,3);for(let ye=0;ye<ee;ye++){let le=te.tangents[ye];var ot,Pt,Ht;c?(ot=le.x*le.y,Pt=-1+le.y*le.y,Ht=le.z*le.y):(ot=-le.x*le.z,Pt=-le.y*le.z,Ht=1-le.z*le.z);let He=Math.sqrt(ot*ot+Pt*Pt+Ht*Ht);He===0&&(He=1);let Wr=ot/He,Ou=Pt/He,Bu=Ht/He;for(let na=0;na<=Z;++na)Ae.setXYZ(ye*(Z+1)+na,Wr,Ou,Bu)}te.setAttribute("pathNormal",Ae);let F=new Ni({uniforms:V,vertexShader:Od,fragmentShader:Tg});F.transparent=!0,F.alphaTest=.5,V.resolution.value.x=1,V.resolution.value.y=1,V.vertexes.value=Q.length,V.arrowTexture.value.wrapS=Mu,V.arrowTexture.value.wrapT=Mu,V.arrowTexture.value.anisotropy=16;let q=new Oe(te,F),B=q.clone(),ae=xe(R({},V),{opacityMultiplier:{type:"f",value:.25},pathIsVertical:{type:"b",value:c}});ae.complete.value=1,B.material=new Ni({uniforms:ae,vertexShader:Od,fragmentShader:Tg}),B.material.transparent=!0,B.material.alphaTest=.5,B.material.depthWrite=!1,B.material.depthTest=!1,ae.resolution.value.x=1,ae.resolution.value.y=1,ae.vertexes.value=Q.length,ae.arrowTexture.value.wrapS=Mu,ae.arrowTexture.value.wrapT=Mu,ae.arrowTexture.value.anisotropy=16,ae.complete.value=u,q.userData=B.userData=t.mesh.userData;let J=t.mesh;if(!m){let ye=new Ni({uniforms:V,vertexShader:Od,fragmentShader:I6}),le=new Oe(te,ye);le.name="stencil",le.material.colorWrite=!1,le.material.stencilWrite=!0,le.material.stencilRef=1,le.material.stencilFunc=Dc,le.material.stencilZPass=Li,le.material.stencilZFail=Li,le.material.stencilFail=Li,le.material.depthWrite=!1,le.material.depthTest=!1,le.userData=t.mesh.userData,J.add(le),J.add(B),B.renderOrder=0,q.renderOrder=1}if(J.add(q),c){let ye=new Qt().setFromObject(q),le=new ue;ye.getCenter(le),J.children.forEach(He=>{He.geometry.center(),He.position.copy(le)})}m&&(q.material.stencilWrite=!0,q.material.stencilRef=1,q.material.stencilFunc=Ic,q.material.stencilZPass=xc,q.material.stencilZFail=xc,q.material.stencilFail=xc,q.material.needsUpdate=!0,q.layers.disableAll(),q.layers.enable(Hr.ALWAYS_ON_TOP_PATHS)),te.computeBoundingBox();let re=new ue;return te.boundingBox.getCenter(re),{mesh:J,material:F,center:re}}o(S6,"buildPath");var GP=.15;var ZP=.5,kg=class kg extends Te{constructor(r,n,i,a){super();f(this,"rendererState");f(this,"verticalDistanceDirty",!0);f(this,"convertTo3DMapPosition");f(this,"getParentContainer");f(this,"convertZoomLevelToAltitude");this.rendererState=r,this.convertTo3DMapPosition=n,this.getParentContainer=i,this.convertZoomLevelToAltitude=a}update(r,n,i){let a,u=!1;for(let c of this.rendererState.geometry3DIdsInScene)if(a=this.rendererState.geometry3DMap.get(c),a&&a.type==="path"&&a.components[0].type==="path"){let m=a.components[0],d=a.components[1],h=m.isVertical&&this.verticalDistanceDirty;if(!(m instanceof ao))continue;let g=[];if(m.dirty||d.dirty||h){if(m.mesh.parent!=null)for(let v=m.mesh.children.length-1;v>=0;v--)Rt(m.mesh.children[0]);if(m.feature.features.length===2&&m.feature.features[0].properties.parentId&&m.feature.features[1].properties.parentId){let v=m.feature.features[0],b=m.feature.features[m.feature.features.length-1],S,O,x=v.geometry.coordinates[2]||0,E=b.geometry.coordinates[2]||0;v.properties.parentId&&(S=this.getParentContainer(v.properties.parentId,!0),S!=null&&S.altitude!=null&&(x+=S.altitude,m.isVertical=!0)),b.properties.parentId&&(O=this.getParentContainer(b.properties.parentId,!0),O!=null&&O.altitude!=null&&(E+=O.altitude,m.isVertical=!0));let I=this.convertTo3DMapPosition(v.geometry.coordinates[1],v.geometry.coordinates[0],x),D=this.convertTo3DMapPosition(b.geometry.coordinates[1],b.geometry.coordinates[0],E);Math.abs(I.z-D.z)>ZP&&S!=null&&S.visible&&O!=null&&O.visible&&(g=[I,D])}else{let v=m.feature.features;for(let b=0;b<v.length;b++)if(b===0||!jy(v[b].geometry.coordinates,v[b-1].geometry.coordinates)){let S=this.convertTo3DMapPosition(v[b].geometry.coordinates[1],v[b].geometry.coordinates[0],v[b].geometry.coordinates[2]||0);g.push(S)}}if(g.length>1){let{mesh:v,material:b,center:S}=S6(g,m,{color:d.color,altitude:d.altitude,isVertical:m.isVertical});m.mesh=v,m.material=b,m.position=S}m.dirty&&typeof m.width=="object"&&m.width.on==="zoom-level"&&(m.altitudeBreakpoints=m.width.input.map(v=>this.convertZoomLevelToAltitude(v))),m.dirty=!1}d.dirty&&(m.mesh.children.forEach(v=>{v.name!=="stencil"&&(v.material.uniforms.color.value.set(d.color),v.material.visible=d.visible,v.material.needsUpdate=!0)}),m.mesh.position.z=d.altitude,d.dirty=!1),m.material&&(m.mesh.children.forEach(v=>{var S,O,x,E,I,D,C;let b=v.material.uniforms;if(v.name==="stencil"){m.materialDirty&&w6(m,v.material);return}if(typeof m.width=="object"&&m.width.on==="zoom-level"){m.altitudeBreakpoints&&m.altitudeBreakpoints.length>2&&De.warn("Path width interpolation does not yet support more than 2 breakpoints! This will be added in a future version. Path width will only use the first two breakpoints.");let A=Ay(i,(O=(S=m.altitudeBreakpoints)==null?void 0:S.slice(0,2))!=null?O:[r,n]);m.breakpoint=A,b.nearZoom.value=(E=(x=m.altitudeBreakpoints)==null?void 0:x[A])!=null?E:r,b.farZoom.value=(D=(I=m.altitudeBreakpoints)==null?void 0:I[A+1])!=null?D:n,b.nearRadius.value=Number(m.width.output[A])/2,b.farRadius.value=Number((C=m.width.output[A+1])!=null?C:m.width.output[A])/2}b.cameraParameters.value.x=i,m.materialDirty&&(b.displayArrowsOnPath.value=m.displayArrowsOnPath,b.pulseColor.value.set(m.accentColor),b.complete.value=m.completeFraction,w6(m,v.material),typeof m.width=="number"&&(b.nearZoom.value=r,b.farZoom.value=n,b.nearRadius.value=Number(m.width)/2,b.farRadius.value=Number(m.width)/2))}),m.displayArrowsOnPath&&m.animateArrowsOnPath&&(m.mesh.children.forEach(v=>{v.name!=="stencil"&&(v.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,v.material.needsUpdate=!0)}),u=!0),m.materialDirty=!1)}this.verticalDistanceDirty=!1,u&&this.publish("animate:path")}};o(kg,"PathSystem");var tc=kg;function w6(e,t){let r=t.uniforms;r.highlightCompleteFraction.value=e.highlightCompleteFraction,r.highlightStartFraction.value=e.highlightStartFraction,r.highlightEndFraction.value=e.highlightEndFraction,r.highlightWidthMultiplier.value=e.highlightWidthMultiplier,r.highlightColor.value.set(e.highlightColor)}o(w6,"updateHighlightPathUniforms");l();var Lt,Cu,Ti,Pd,_g=class _g{constructor(t){f(this,"rendererState");f(this,"dirty",!1);_(this,Lt);_(this,Cu);_(this,Ti);_(this,Pd,new _r);this.rendererState=t}updateOne(t){if(t instanceof et&&t.components[0]instanceof Tt&&t.components[1]instanceof jn&&t.parentObject3D instanceof bn&&(W(this,Lt,t.components[0]),W(this,Ti,t.components[1]),!s(this,Lt).detached&&s(this,Lt).shouldDetach&&s(this,Lt).mesh!=null&&s(this,Lt).material!=null&&s(this,Lt).batchedProps!=null)){W(this,Cu,t.parentObject3D),s(this,Lt).visible=!1;let r=new Mt(s(this,Ti).color),n=s(this,Ti).opacity*da(t),i=new Vy({color:r,side:oi,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1},1,s(this,Lt).material.repeatYFactor),a=new b4(1,s(this,Lt).batchedProps.positionCount,0,i),u=VE(s(this,Lt),a,s(this,Pd));if(u==null)return;a.userData={entities:{0:t.id},detached:!0},s(this,Lt).instanceIndex=u,s(this,Lt).material.setColor(s(this,Lt).instanceIndex,r,s(this,Ti).topColor?new Mt(s(this,Ti).topColor):r),s(this,Lt).mesh=a,s(this,Lt).material=i,s(this,Cu).add(a),s(this,Lt).shouldDetach=!1,s(this,Lt).detached=!0}}update(){if(!this.dirty)return;let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.dirty=!1,this.cleanup()}cleanup(){W(this,Lt,void 0),W(this,Cu,void 0),W(this,Ti,void 0)}};Lt=new WeakMap,Cu=new WeakMap,Ti=new WeakMap,Pd=new WeakMap,o(_g,"MeshDetachmentSystem");var Bd=_g;l();l();function A6(e,t,r){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let i=t||1e-4,a=i/Math.max(r,1e-4);return md(e.mesh.geometry,e.batchedProps.range,i,0),e.material&&(e.material.repeatYFactor=a),e.currentHeight=i,!0}return!1}o(A6,"updateHeight");function F6(e,t,r,n,i,a){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,r),r.decompose(n,i,a),n.z=t,r.compose(n,i,a),e.mesh.setMatrixAt(e.instanceIndex,r),e.altitude=t,!0):!1}o(F6,"updateAltitude");var Tn,ii,Td,kd,_d,Ld,Lg=class Lg{constructor(t){f(this,"rendererState");f(this,"dirty",!1);_(this,Tn);_(this,ii);_(this,Td,new _r);_(this,kd,new ue);_(this,_d,new Sc);_(this,Ld,new ue);this.rendererState=t}updateOne(t){var r;if(t instanceof et&&t.type==="geometry"&&((r=t.components[1])!=null&&r.dirty)&&(W(this,Tn,t.components[0]),W(this,ii,t.components[1]),t.type==="geometry")){let n=!1;s(this,ii).height!==s(this,Tn).currentHeight&&(n=A6(s(this,Tn),s(this,ii).height,s(this,ii).initialHeight)),s(this,ii).altitude!==s(this,Tn).altitude&&(n=F6(s(this,Tn),s(this,ii).altitude,s(this,Td),s(this,kd),s(this,_d),s(this,Ld))),n&&s(this,Tn).mesh!=null&&s(this,Tn).mesh.computeBoundingSphere()}}update(){let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.cleanup()}cleanup(){W(this,Tn,void 0),W(this,ii,void 0)}};Tn=new WeakMap,ii=new WeakMap,Td=new WeakMap,kd=new WeakMap,_d=new WeakMap,Ld=new WeakMap,o(Lg,"MeshModificationSystem");var Md=Lg;l();var VP={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1},Rg=class Rg{constructor(t){f(this,"state",VP);f(this,"core");this.core=t}update(t){let r={};for(let[n,i]of Object.entries(t))n in this.state&&this.state[n]!==t[n]&&(this.state[n]=i,r[n]=i);this.handleUpdate(r)}handleUpdate(t){t.showPolygonLabelTextAreaMesh!=null&&(t.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),t.showEnvMap!=null&&(t.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),t.showCollisionBoxes!=null&&(t.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes())}};o(Rg,"Debug");var Rd=Rg;l();var rc=9,WP=!1,O6=.1;function HP(e,t,r){for(let n=0;n<t;n++){let i=(r&16711680)>>16,a=(r&65280)>>8,u=r&255;e[n*3]=i/255,e[n*3+1]=a/255,e[n*3+2]=u/255}}o(HP,"fillArrayWithColor");var Ng=class Ng{constructor(t,r,n){f(this,"state");f(this,"renderer");f(this,"renderService");f(this,"pickingTexture");f(this,"pickingMaterial");f(this,"pixelBuffer");f(this,"width",0);f(this,"height",0);f(this,"scale",1/2);f(this,"color",1);f(this,"convertTo3DMapPosition");f(this,"destroyed",!1);f(this,"enabled",!1);f(this,"backgroundId",16777215);f(this,"resize",o(()=>{let t=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/t*this.scale),this.height=Math.floor(this.renderer.domElement.height/t*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new ay(this.width,this.height,{format:ry,type:ty,internalFormat:"RGBA"})},"resize"));f(this,"shouldShowByXY",o((t,r,n)=>{if(this.pixelBuffer==null)return!1;let i=t+(this.height-r-1)*this.width,a=this.pixelBuffer[i*4],u=this.pixelBuffer[i*4+1],c=this.pixelBuffer[i*4+2],m=a<<16|u<<8|c;return m===n||m===this.backgroundId},"shouldShowByXY"));f(this,"activeOccluders",new Set);f(this,"update",o(()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let t,r;for(let i of this.state.geometry3DIdsInScene){let a=this.state.geometry3DMap.get(i);if(a&&a instanceof Ut&&a.userData.occluderFeature!=null&&a.userData.occluderId!=null&&(this.activeOccluders.add(a.userData.occluderId),a.userData.occluderDirty)){if(t=a.userData.occluderFeature,t.geometry.type==="Polygon"){let u=Km(t,this.convertTo3DMapPosition,{color:"white",height:O6});r=this.createOccluderMesh(u,a.userData.occluderId),a.add(r)}else if(t.geometry.type==="MultiPolygon"){let u=qm(t,this.convertTo3DMapPosition,{color:"white",height:O6});r=this.createOccluderMesh(u,a.userData.occluderId),a==null||a.add(r)}a.userData.occluderDirty=!1}}this.renderer.setRenderTarget(this.pickingTexture);let n=new Mt(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(rc),this.renderer.render(this.state.entityScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(rc),WP?this.renderService.enabledLayers.add(rc):this.renderService.enabledLayers.delete(rc),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let i of this.state.geometry2DIdsInScene){let a=this.state.geometry2DMap.get(i);if(a&&(a==null?void 0:a.occluderId)!=null&&this.activeOccluders.has(a==null?void 0:a.occluderId)){let u=a.components[0].projection,c=Math.floor(u.x*this.scale),m=Math.floor(u.y*this.scale),d=this.shouldShowByXY(c,m,a.occluderId);a.components[0].isOccluded=!d}}}).catch(i=>{this.destroyed||De.error(i)})},"update"));if(this.state=t,this.convertTo3DMapPosition=r,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new Ni({glslVersion:ny,vertexShader:"\n attribute vec3 color;\n varying vec3 vColor;\n void main() {\n vColor = color;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n varying vec3 vColor;\n out vec4 fragColor;\n\n void main() {\n fragColor = vec4(vColor, 1.0);\n }\n "})}applyId(t,r){let n=t.attributes.position,i=new Float32Array(n.count*3);HP(i,n.count,r),t.setAttribute("color",new vr(i,3))}createOccluderMesh(t,r){let n=new Oe(t,this.pickingMaterial);return n.layers.set(rc),this.applyId(n.geometry,r),n.userData.occluderId=r,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var t;this.destroyed=!0,(t=this.pickingTexture)==null||t.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};o(Ng,"Occlusion2DSystem");var Nd=Ng;l();var jg=class jg{constructor(t){this.state=t;f(this,"dirty",!0)}update(){var t;if(this.dirty){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(n instanceof et&&n.type==="geometry"&&((t=n.components[0])==null?void 0:t.geometry)!=null){let i=n.components[0];i.geometry&&(i.geometry.dispose(),i.geometry=void 0)}}this.dirty=!1}}};o(jg,"GeometryDisposalSystem");var jd=jg;l();var Ug=class Ug extends Te{constructor(r){super();f(this,"dirty",!0);f(this,"state");f(this,"texturePromiseCache",new Map);this.state=r}async loadTexture(r){if(this.texturePromiseCache.has(r))return this.texturePromiseCache.get(r);let n=new Promise((i,a)=>{so.getLoader().load(r,i,void 0,a)});return this.texturePromiseCache.set(r,n),n}update(){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(!(n instanceof et))continue;let i=n.components[6];if(!(i instanceof Io))continue;let a=n.components[0];if(!(a instanceof Tt)||!i.dirty)continue;let u=Oi(a);u!=null&&(i.texture!=null&&(i.texture.path===""?(u.texture=null,u.hideTextures(a.instanceIndex),i.dirty=!1):this.loadTexture(i.texture.path).then(c=>{c&&(i.textureInstance=c,u.texture=c,u.blendTexture=!0,u.showTextures(a.instanceIndex)),this.publish("texture-added")})),i.topTexture!=null&&(i.topTexture.path===""?(u.topTexture=null,u.hideTextures(a.instanceIndex),i.dirty=!1):this.loadTexture(i.topTexture.path).then(c=>{c&&(i.topTextureInstance=c,u.topTexture=c,u.blendTexture=!0,u.showTextures(a.instanceIndex)),this.publish("texture-added")})),i.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async r=>{(await r).dispose()}),this.texturePromiseCache.clear()}};o(Ug,"TextureSystem");var Ud=Ug;l();var zg=class zg{constructor(t){f(this,"currentOrder",Hr.ALWAYS_ON_TOP_MODELS);f(this,"assignedOrders",new WeakMap);f(this,"state");this.state=t}assignOrder(t){return this.assignedOrders.has(t)?this.assignedOrders.get(t):(this.currentOrder+=1,this.assignedOrders.set(t,this.currentOrder),this.currentOrder)}releaseOrder(t){return this.assignedOrders.delete(t),Hr.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(t){return this.assignedOrders.get(t)}update(){var i;let t,r,n;for(let a of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(a),n&&n.type==="model"&&(i=n.components[1])!=null&&i.dirty)if(t=n.components[1],r=n.components[0],t.visibleThroughGeometry===!0){let u=this.assignOrder(r);r.renderOrder!==u&&(r.renderOrder=u)}else r.renderOrder>Hr.GEOMETRY&&(r.renderOrder=this.releaseOrder(r))}};o(zg,"RenderOrderSystem");var zd=zg;l();var B6=500,$g=class $g{constructor(t){f(this,"rendererState");f(this,"dirty",!1);this.rendererState=t}update(){var i;let t,r,n;for(let a of this.rendererState.geometry3DIdsInScene)if(t=this.rendererState.geometry3DMap.get(a),(t==null?void 0:t.type)==="model"&&t.components[7]!=null&&(n=t.components[0],r=t.components[7],r.dirty&&n.mesh!=null&&(r==null?void 0:r.verticalOffset)!==1/0&&(r.plane==null&&(r.plane=new cy(new ue(0,0,-1),r.verticalOffset),this.process(n,r)),r.plane.constant!==r.verticalOffset&&(r.plane.constant=r.verticalOffset),r.topColor!=null&&((i=r.holeFillMesh)==null?void 0:i.material)instanceof ku&&r.holeFillMesh.material.color.set(r.topColor),r.topVisible!=null&&r.holeFillMesh!=null&&(r.holeFillMesh.visible=r.topVisible),r.dirty=!1),r.plane!=null&&r.holeFillMesh!=null&&r.topVisible===!0)){let u=r.plane,c=r.holeFillMesh;u.coplanarPoint(c.position),c.lookAt(c.position.x-u.normal.x,c.position.y-u.normal.y,c.position.z-u.normal.z)}}process(t,r){var v;if(t.mesh==null)return;let n=t.mesh.parent,i=[];t.mesh.traverse(b=>{if(b instanceof Oe){let S=b.geometry.clone();b.updateWorldMatrix(!0,!1),S.applyMatrix4(b.matrixWorld),i.push(S),S.computeVertexNormals(),b.material.clippingPlanes=[r.plane],b.material.transparent=!1}});let a=Kr(i),u=new Ac,c=new Ac,m=this.createHoleFillGeometry(a,r.plane,1);m.name="hole-fill-group";let d=new ku({color:(v=r.topColor)!=null?v:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:Ic,stencilFail:Li,stencilZFail:Li,stencilZPass:Li}),h=new yn(B6,B6),g=new Oe(h,d);g.name="hole-fill-mesh",r.holeFillMesh=g,g.renderOrder=1.1,c.add(m),c.add(t.mesh),u.add(c),u.add(g),n==null||n.add(u),t.mesh=u}createHoleFillGeometry(t,r,n=0){let i=new Ac,a=new cr;a.depthWrite=!1,a.depthTest=!1,a.colorWrite=!1,a.stencilWrite=!0,a.stencilFunc=Dc;let u=a.clone();u.side=Pu,u.clippingPlanes=[r],u.stencilFail=Ec,u.stencilZFail=Ec,u.stencilZPass=Ec;let c=new Oe(t,u);c.renderOrder=n,i.add(c);let m=a.clone();m.side=vo,m.clippingPlanes=[r],m.stencilFail=Cc,m.stencilZFail=Cc,m.stencilZPass=Cc;let d=new Oe(t,m);return d.renderOrder=n,i.add(d),i}};o($g,"ClippingPlaneSystem");var $d=$g;var P6=new Ln;var{DEFAULT_PITCH:gE,DEFAULT_BEARING:yE,DEFAULT_ZOOM_LEVEL:bE,DEFAULT_MIN_ZOOM_LEVEL:KP,DEFAULT_MAX_ZOOM_LEVEL:qP}=pn,JP=Fe.radToDeg(.6435011087932844),St,vt,qo,nc,Iu,ho,Jo,Du,sr,Zg,M,hn,Xo,Xe,kn,wt,gn,Yt,P,ic,Wt,lt,M6,T6,k6,ki,oc,ac,uc,sc,Su,Gd,cc,wu,lc,Yo,Vg,Qo,mc,dc,Ar,Fr,Wg,Zd,Vd,Au,pc,Hg=class Hg extends Te{constructor(r,n={}){var S,O,x,E,I,D,C,A,T,k,j,U,G,$,X;super();_(this,sr);f(this,"options");f(this,"container");f(this,"Debug");_(this,St);_(this,vt);_(this,qo);_(this,nc);_(this,Iu);_(this,ho);_(this,Jo);_(this,Du);f(this,"rendererDomElement");_(this,M,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,entityScene:new Ut("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:Lc,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new Om,externalTweenGroup:new Om,cameraObject:new qd,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1});_(this,hn,{});_(this,Xo,new AbortController);f(this,"camera");_(this,Xe);_(this,kn);_(this,wt);_(this,gn);_(this,Yt);_(this,P,{});_(this,ic,window.matchMedia("screen and (min-resolution: 2dppx)"));f(this,"map");_(this,Wt,o(()=>{var r;this.aborted||!((r=s(this,P))!=null&&r.renderSystem)||(s(this,P).renderSystem.twoDdirty=!0)},"#invalidate2DEntities"));_(this,lt,o(()=>{var r;this.aborted||!((r=s(this,P))!=null&&r.renderSystem)||(s(this,P).renderSystem.threeDdirty=!0)},"#invalidate3DEntities"));_(this,ki,"standalone");_(this,oc,o(()=>{s(this,P).geometryDisposalSystem.dirty=!0,this.render()},"#setGeometryDisposalDirty"));_(this,ac,o(r=>Math.trunc(r*10)/10,"#round10"));_(this,uc,o(()=>{dt(this,sr,Zg).call(this,Nu()),s(this,P).twoDDrawSystem.dirty=!0,s(this,Su).call(this,void 0,void 0,!0)},"#handlePixelRatioChange"));_(this,sc,o(()=>{s(this,Su).call(this)},"#handleWindowResizeWithEvent"));_(this,Su,o((r,n,i=!1)=>{let a=r!=null?r:this.rendererDomElement.clientWidth,u=n!=null?n:this.rendererDomElement.clientHeight;if((a===0||u===0)&&!i)return;s(this,M).canvasWidth=a,s(this,M).canvasHeight=u,dt(this,sr,Zg).call(this,Nu()),s(this,Yo).call(this),dt(this,sr,k6).call(this),s(this,P).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,P).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,P).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,P).htmlControlsSystem.resize(this.canvasWidth),s(this,P).geometryInFocusSystem.resize(),s(this,P).occlusion2DSystem.resize();let{top:c,left:m}=this.container.getBoundingClientRect();s(this,M).containerOffset=[c,m],this.publish("resize"),this.render()},"#handleWindowResize"));_(this,Gd,o(()=>{this.renderSync()},"#renderFull"));_(this,cc,new ue);_(this,wu,o((r,n)=>{let i=this.mode==="standalone"?s(this,vt):this.viewCamera;if(s(this,vt).position.z+this.camera.elevation>n.z){s(this,cc).copy(n);let a=s(this,cc).project(i),u=(a.x+1)/2*this.canvasWidth-0/2,c=(-a.y+1)/2*this.canvasHeight-0/2,m=s(this,ac).call(this,u),d=s(this,ac).call(this,c);r.x=m,r.y=d}else r.x=-1e3,r.y=-1e3},"#project"));_(this,lc,o((r,n)=>{s(this,Yt).setBufferSize(r,n),s(this,vt).aspect=r/n,s(this,vt).updateProjectionMatrix(),s(this,vt).updateMatrixWorld(!0),s(this,Iu).x=r,s(this,Iu).y=n},"#setBufferSize"));_(this,Yo,o(()=>{var u;let r=s(this,M).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,M).canvasHeight=this.rendererDomElement.clientHeight,i=Math.floor(r*this.resolutionScale),a=Math.floor(n*this.resolutionScale);s(this,lc).call(this,i,a),(u=this.map)==null||u.resize(),s(this,M).shouldMeasureCanvas=!1},"#measureCanvas"));f(this,"getParentContainer",o((r,n=!0)=>{if(!r)return n?s(this,M).entityScene:void 0;if(typeof r=="string"||typeof r=="number"){let i=s(this,M).geometry3DMap.get(r);return i instanceof Ut?i:(De.warn("Parent (".concat(typeof r=="object"?r.id:r,") is not a valid container, adding to scene")),n?s(this,M).entityScene:void 0)}else if(r.type==="group-container"){let i=s(this,M).geometry3DMap.get(r.id);if(i instanceof Ut)return i}return n?s(this,M).entityScene:void 0},"getParentContainer"));f(this,"showCollisionBoxes",o(()=>{s(this,P).collisionSystem.showCollisionBoxes(),this.render()},"showCollisionBoxes"));f(this,"hideCollisionBoxes",o(()=>{s(this,P).collisionSystem.hideCollisionBoxes(),this.render()},"hideCollisionBoxes"));f(this,"projectScreenXYToCoordinate",o((r,n,i=!1)=>{var g,v;let a=this.container.getBoundingClientRect(),u=(r-a.left)/s(this,M).canvasWidth*2-1,c=-((n-a.top)/s(this,M).canvasHeight)*2+1,m=new Ie(u,c),d,h;if(i)P6.setFromCamera(m,s(this,vt)),d=(g=P6.intersectObject(s(this,ho),!1)[0])==null?void 0:g.point;else{let b=s(this,P).interactionSystem.getThreeDIntersectsFromXY(m);d=(v=b==null?void 0:b[0])==null?void 0:v.point,h=s(this,P).interactionSystem.getGroupContainerIntersectsFromXY(m)}if(d)return{coordinate:this.convert3DMapPositionToCoordinate(d),groupContainers:h}},"projectScreenXYToCoordinate"));f(this,"projectCoordinateToScreenXY",o(r=>{let n=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),i=new Ie;return s(this,wu).call(this,i,n),{x:i.x,y:i.y}},"projectCoordinateToScreenXY"));f(this,"convert3DMapPositionToCoordinate",o(r=>{var a,u,c,m;let{lat:n,lon:i}=Rc((u=(a=s(this,M).center)==null?void 0:a[1])!=null?u:0,(m=(c=s(this,M).center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n,r.z]},"convert3DMapPositionToCoordinate"));f(this,"setBackgroundColor",o((r,n)=>{s(this,Yt).setBackgroundColor(r,n)},"setBackgroundColor"));f(this,"getMetersPerPixel",o(()=>s(this,P).cameraSystem.getCurrentMetersPerPixel(),"getMetersPerPixel"));f(this,"hideOutdoorLayersIntersectingPolygons",o((r,n,i)=>{s(this,P).outdoorLayersSystem.hideLayersIntersectingPolygons(r,n,i),this.render()},"hideOutdoorLayersIntersectingPolygons"));_(this,Qo,new Fc);_(this,mc,new _r);_(this,dc,o(r=>{var n;De.error("Render failed: ",r,(n=r.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:r})},"#onRenderError"));f(this,"render",o(()=>{var r;if(!(((r=s(this,P))==null?void 0:r.renderSystem)==null||this.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,P).renderSystem.update().catch(s(this,dc))},"render"));f(this,"renderSync",o(()=>this.aborted?Promise.resolve():s(this,P).renderSystem.update(!0).catch(s(this,dc)),"renderSync"));_(this,Ar,ju(()=>{this.publish("user-interaction-start",void 0)},0,!0));_(this,Fr,ju(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));f(this,"on",o((r,n)=>{this.aborted||(super.on(r,n),["outdoor-view-loaded","outdoor-style-loaded"].includes(r)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(De.warn('"'.concat(r,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(r)))},"on"));f(this,"off",o((r,n)=>{super.off(r,n)},"off"));f(this,"getCursor",o(()=>s(this,P).interactionSystem.getCursor(),"getCursor"));_(this,Zd,o(()=>{if(s(this,M).entityScene.removeEventListener("childadded",s(this,lt)),s(this,M).entityScene.removeEventListener("childadded",s(this,Wt)),s(this,M).entityScene.removeEventListener("childremoved",s(this,lt)),s(this,M).entityScene.removeEventListener("childremoved",s(this,Wt)),window.removeEventListener("resize",s(this,sc),!1),s(this,ic).removeEventListener("change",s(this,uc)),this.map){for(let r in s(this,hn))for(let n of s(this,hn)[r])this.map.off(r,n);W(this,hn,{})}this._subscribers={}},"#cleanupEventListeners"));_(this,Vd,o(()=>{try{s(this,ki)!=="outdoors-overlay"&&(this.map&&this.map.remove(),this.container&&this.rendererDomElement&&this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement)),this.container&&(s(this,gn)&&this.container.contains(s(this,gn))&&this.container.removeChild(s(this,gn)),s(this,Xe)&&this.container.contains(s(this,Xe))&&this.container.removeChild(s(this,Xe)))}catch(r){De.warn("Error during DOM cleanup, some elements may not have been removed:",r)}},"#cleanupDOMElements"));f(this,"destroy",o(()=>{var r;s(this,P)&&(s(this,P).textureSystem.destroy(),this.aborted||s(this,Xo).abort(),s(this,Zd).call(this),this.remove("__scene"),s(this,P).renderSystem.destroy(),s(this,P).cameraSystem.dispose(),s(this,P).exporterSystem.destroy(),s(this,P).outdoorLayersSystem.destroy(),s(this,P).borderSystem.destroy(),s(this,Jo)&&s(this,Jo).disconnect(),s(this,Yt).destroy(),(r=s(this,St))==null||r.traverse(n=>{Rt(n),"dispose"in n&&typeof n.dispose=="function"&&n.dispose()}),W(this,St,void 0),s(this,P).htmlControlsSystem.destroy(),s(this,P).collisionSystem.destroy(),s(this,P).interactionSystem.destroy(),s(this,P).domMutationSystem.destroy(),s(this,P).geometryInFocusSystem.destroy(),s(this,P).occlusion2DSystem.destroy(),W(this,P,void 0),s(this,Vd).call(this),W(this,Yt,void 0))},"destroy"));_(this,Au,new ue);_(this,pc,new ue);if(W(this,Xo,new AbortController),s(this,M).useStandaloneCamera=(S=n.useStandaloneCamera)!=null?S:!1,s(this,M).naturalBearing=(O=n.naturalBearing)!=null?O:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!r.clientWidth||!r.clientHeight)throw new Error("[MappedinJS] Container width and height must be greater than 0");this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),(n.mode==="outdoors-interleaved"||n.mode==="outdoors-overlay")&&n.map&&(W(this,ki,n.mode),this.map=n.map),s(this,M).entityScene.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).entityScene.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).geometry3DMap.set(s(this,M).entityScene.userData.entityId,s(this,M).entityScene),n.center&&(s(this,M).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=r,dt(this,sr,M6).call(this),dt(this,sr,T6).call(this),s(this,P).htmlControlsSystem=new Fm(this.container,{outdoorEnabled:!!this.map}),s(this,ki)!=="outdoors-overlay"&&s(this,P).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),W(this,Yt,new Vc({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(x=n.gl)==null?void 0:x.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:o(V=>{var Y;(Y=n.onWebGLContextRestored)==null||Y.call(n,V),s(this,Wt).call(this),s(this,lt).call(this),this.render()},"onWebGLContextRestored"),onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(E=n.backgroundAlpha)!=null?E:1})),W(this,St,new ji),s(this,ki)!=="standalone"&&s(this,St).add(Uy()),s(this,St).add(s(this,M).entityScene);let i=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof i<"u"&&(i.dispatchEvent(new CustomEvent("observe",{detail:s(this,St)})),i.dispatchEvent(new CustomEvent("observe",{detail:s(this,Yt)}))),W(this,vt,new qd(JP,this.aspect,50,1e5)),s(this,M).cameraObject=s(this,vt),W(this,nc,new sy),s(this,vt).renderOrder=999;let a=new xo;a.add(s(this,vt)),W(this,Du,new xo),s(this,Du).add(a),s(this,St).add(s(this,Du)),s(this,vt).updateProjectionMatrix(),s(this,vt).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:o(()=>0,"getNorth"),georeference:[{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}}]},this.rendererDomElement=s(this,Yt).domElement(),W(this,Iu,new Ie);let u=new yn(1e6,1e6),c=new cr({color:0,visible:!1});W(this,ho,new Oe(u,c)),s(this,ho).name="worldPlane",s(this,St).add(s(this,ho)),(I=n.gl)!=null&&I.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,sc),!1),s(this,ic).addEventListener("change",s(this,uc)),typeof ResizeObserver=="function"&&((D=y.env)==null?void 0:D.NODE_ENV)!=="test"&&(W(this,Jo,new ResizeObserver(Qg(V=>{s(this,Su).call(this,V[0].contentRect.width,V[0].contentRect.height)},50))),(C=s(this,Jo))==null||C.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(A=globalThis.MappedinDebug)!=null&&A.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(T=globalThis.MappedinDebug)!=null&&T.TEST_IOS?"1920px":"100%",y.env.NODE_ENV==="test"&&this.rendererDomElement.setAttribute("data-testid","mappedin-canvas"),this.mode!=="outdoors-overlay"&&this.rendererDomElement.tabIndex!==void 0&&this.rendererDomElement.removeAttribute("tabindex"),s(this,M).canvasWidth=this.rendererDomElement.clientWidth,s(this,M).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let m=this.canvasWidth,d=this.canvasHeight;s(this,P).watermarkSystem=new ad(s(this,vt),s(this,M),n==null?void 0:n.watermark),s(this,P).watermarkSystem.on("texture-loaded",this.render),s(this,M).shouldMeasureCanvas=!0,s(this,M).pixelRatio=this.resolutionScale,s(this,lc).call(this,Math.floor(m*this.resolutionScale),Math.floor(d*this.resolutionScale));let h=new Mc(16777215,.3*Math.PI);h.position.set(-150,-150,350),s(this,St).add(h);let g=new fy(16777215,.741*Math.PI);s(this,St).add(g),s(this,P).cameraSystem=new lu(s(this,vt),s(this,St),s(this,Yt).renderer,s(this,M),{mode:this.mode,canvasHeight:d,canvasWidth:m}),s(this,P).cameraSystem.on("user-dolly-start",s(this,Ar)),s(this,P).cameraSystem.on("user-pan-start",s(this,Ar)),s(this,P).cameraSystem.on("user-rotate-start",s(this,Ar)),s(this,P).cameraSystem.on("user-zoom-start",s(this,Ar)),s(this,P).cameraSystem.on("user-tilt-start",s(this,Ar)),s(this,P).cameraSystem.on("user-pedestal-start",s(this,Ar)),s(this,P).cameraSystem.on("user-dolly-end",s(this,Fr)),s(this,P).cameraSystem.on("user-pan-end",s(this,Fr)),s(this,P).cameraSystem.on("user-rotate-end",s(this,Fr)),s(this,P).cameraSystem.on("user-zoom-end",s(this,Fr)),s(this,P).cameraSystem.on("user-tilt-end",s(this,Fr)),s(this,P).cameraSystem.on("user-pedestal-end",s(this,Fr)),s(this,P).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,P).geometryInFocusSystem&&(s(this,P).geometryInFocusSystem.cameraDirty=!0),this.render()}),this.onAbort(()=>{s(this,P).cameraSystem.off("user-dolly-start",s(this,Ar)),s(this,P).cameraSystem.off("user-pan-start",s(this,Ar)),s(this,P).cameraSystem.off("user-rotate-start",s(this,Ar)),s(this,P).cameraSystem.off("user-zoom-start",s(this,Ar)),s(this,P).cameraSystem.off("user-tilt-start",s(this,Ar)),s(this,P).cameraSystem.off("user-pedestal-start",s(this,Ar)),s(this,P).cameraSystem.off("user-dolly-end",s(this,Fr)),s(this,P).cameraSystem.off("user-pan-end",s(this,Fr)),s(this,P).cameraSystem.off("user-rotate-end",s(this,Fr)),s(this,P).cameraSystem.off("user-zoom-end",s(this,Fr)),s(this,P).cameraSystem.off("user-tilt-end",s(this,Fr)),s(this,P).cameraSystem.off("user-pedestal-end",s(this,Fr)),s(this,P).renderSystem.off("measure-canvas",s(this,Yo)),s(this,P).cameraSystem.off("change",this.render),s(this,P).outlineInterpolationSystem.off("needs-render",this.render)}),s(this,P).pathSystem=new tc(s(this,M),this.convertTo3DMapPosition,this.getParentContainer,s(this,P).cameraSystem.convertZoomLevelToAltitude),s(this,P).pathSystem.on("animate:path",this.render),this.onAbort(()=>{s(this,P).pathSystem.off("animate:path",this.render)}),s(this,P).panBoundsSystem=new cd(s(this,M),s(this,P).cameraSystem);let v=o(()=>{let{panBounds:V,fov:Y,convertAltitudeToZoomLevel:oe}=s(this,P).cameraSystem;if(s(this,P).panBoundsSystem.autoMinZoomLevel){if(V.radius<=0)return;let Z=Math.min(s(this,M).canvasWidth/s(this,M).canvasHeight,1),ee=Y*Math.PI/180*Z,te=Math.tan(ee/2),{radius:Q,center:de}=s(this,P).cameraSystem.panBounds,je=Q/te,Me=this.getThreeCamera().getWorldPosition(new ue),Ve=de.distanceTo(Me),qe=Math.abs(Me.z-de.z),Ae=je*qe/Ve,ot=oe(Ae);Ny(ot,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(ot)}this.publish("pan-bounds-change",s(this,P).cameraSystem.panBounds)},"handlePanBoundsUpdate");s(this,P).panBoundsSystem.on("update",v),this.onAbort(()=>{s(this,P).panBoundsSystem.off("update",v)}),this.camera=new jm(this,s(this,P),s(this,M)),this.camera.setZoomLevel((k=n.zoomLevel)!=null?k:bE),this.camera.setBearing((j=n.bearing)!=null?j:yE),this.camera.setPitch((U=n.pitch)!=null?U:gE),this.camera.setMaxZoomLevel(qP),this.camera.setMinZoomLevel(KP),s(this,P).domVisiblitySystem=new Ym(s(this,M),s(this,gn)),s(this,P).domMutationSystem=new od(s(this,M),s(this,gn)),s(this,P).domMutationSystem.on("dimensions-update",()=>{s(this,P).collisionSystem.collidersDirty=!0,this.render()}),s(this,P).domDrawSystem=new id(s(this,M)),s(this,P).collisionSystem=new Um(s(this,kn),s(this,M),((G=n.useCollisionWorker)!=null?G:!0)&&(($=n.useWorkers)!=null?$:!0)),s(this,P).twoDDrawSystem=new ed(s(this,M),s(this,wt),n.transformImageRequest),s(this,P).twoDDrawSystem.on("img:loaded",this.render),s(this,P).interactionSystem=new Ts(this.rendererDomElement,s(this,M),s(this,vt),s(this,ho),s(this,P).cameraSystem.isUserInteracting),s(this,P).interactionSystem.on("doubletap-with-onefinger",V=>{var Y;s(this,P).cameraSystem.enableZoom&&this.camera.animateTo({center:(Y=this.projectScreenXYToCoordinate(V.clientX,V.clientY))==null?void 0:Y.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:rp,easing:"ease-out"})}),s(this,P).interactionSystem.on("singletap-with-twofinger",()=>{s(this,P).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:rp,easing:"ease-out"})}),s(this,P).interactionSystem.on("hover",this.render),s(this,P).interactionSystem.on("click",V=>{var oe,Z,ee,te,Q,de,je,Me,Ve,qe,Ae,ot;if(((oe=V.entity2D)==null?void 0:oe.id)==="watermark"&&typeof s(this,P).watermarkSystem.options.onClick=="function"&&s(this,P).watermarkSystem.options.interactive){s(this,P).watermarkSystem.options.onClick();return}let Y=V.entity3D?[(Z=V.entity3D)==null?void 0:Z.id]:[];(Q=(te=(ee=V.entity3D)==null?void 0:ee.parentObject3D)==null?void 0:te.userData)!=null&&Q.entityId&&Y.push((Me=(je=(de=V.entity3D)==null?void 0:de.parentObject3D)==null?void 0:je.userData)==null?void 0:Me.entityId),this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(V.position),geometry:Y,paths:((Ve=V.entity3D)==null?void 0:Ve.components[0])instanceof ao?[V.entity3D.id]:[],markers:((qe=V.entity2D)==null?void 0:qe.components[0])instanceof ui?[V.entity2D.id]:[],models:((Ae=V.entity3D)==null?void 0:Ae.components[0])instanceof oo?[V.entity3D.id]:[],labels:((ot=V.entity2D)==null?void 0:ot.components[0])instanceof ai?[V.entity2D.id]:[],containers:Array.isArray(V.groupContainers)?V.groupContainers.map(Pt=>Pt.userData.entityId):[],pointerEvent:V.pointerEvent})}),s(this,P).interactionSystem.on("hover",V=>{var Y,oe,Z,ee,te;V.position&&this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(V.position),geometry:V.entity3D?[(Y=V.entity3D)==null?void 0:Y.id]:[],paths:((oe=V.entity3D)==null?void 0:oe.components[0])instanceof ao?[V.entity3D.id]:[],markers:((Z=V.entity2D)==null?void 0:Z.components[0])instanceof ui?[V.entity2D.id]:[],models:((ee=V.entity3D)==null?void 0:ee.components[0])instanceof oo?[V.entity3D.id]:[],labels:((te=V.entity2D)==null?void 0:te.components[0])instanceof ai?[V.entity2D.id]:[],containers:Array.isArray(V.groupContainers)?V.groupContainers.map(Q=>Q.userData.entityId):[]})}),s(this,P).geometryInFocusSystem=new xd(s(this,M),s(this,vt));let b=o(V=>{this.publish("geometry-in-focus",V)},"handleGeometryInFocus");s(this,P).geometryInFocusSystem.on("geometry-in-focus",b),this.onAbort(()=>{s(this,P).geometryInFocusSystem.off("geometry-in-focus",b)}),s(this,P).twoDVisiblitySystem=new rd(s(this,M)),s(this,P).drawSystem=new td(s(this,M),this.convertTo3DMapPosition),s(this,P).twoDProjectionSystem=new Qm(s(this,M),s(this,wu)),s(this,P).exporterSystem=new ks(s(this,M)),s(this,P).meshOptimizationSystem=new Xm(s(this,M),this.convertTo3DMapPosition),s(this,P).meshOptimizationSystem.on("model-loaded",this.render),s(this,P).meshOptimizationSystem.on("geometry-2d-added",this.render),s(this,P).meshOptimizationSystem.on("geometry-group-added",s(this,oc)),this.onAbort(()=>{s(this,P).meshOptimizationSystem.off("model-loaded",this.render),s(this,P).meshOptimizationSystem.off("geometry-2d-added",this.render),s(this,P).meshOptimizationSystem.off("geometry-group-added",s(this,oc))}),s(this,P).meshDetachmentSystem=new Bd(s(this,M)),s(this,P).meshModificationSystem=new Md(s(this,M)),s(this,P).geometryDisposalSystem=new jd(s(this,M)),s(this,P).textureSystem=new Ud(s(this,M)),s(this,P).textureSystem.on("texture-added",this.render),this.onAbort(()=>{s(this,P).textureSystem.off("texture-added",this.render)}),s(this,P).borderSystem=new g4(s(this,M),this.convertTo3DMapPosition),s(this,P).clippingPlaneSystem=new $d(s(this,M)),s(this,P).renderOrderSystem=new zd(s(this,M)),s(this,P).customGeometrySystem=new ld(s(this,M),this.convertTo3DMapPosition),s(this,P).outlineInterpolationSystem=new pd(s(this,M)),s(this,P).outlineInterpolationSystem.on("needs-render",this.render),s(this,P).renderSystem=new nd(s(this,Yt),s(this,M),this.mode,s(this,St),s(this,vt),this.viewCamera,s(this,P)),s(this,P).imageSystem=new vd(s(this,M),this.convertTo3DMapPosition,s(this,wu),n.bearing,n.naturalBearing,n.imagePlacementOptions),s(this,P).text3DSystem=new $y(s(this,M),this.convertTo3DMapPosition,(X=n.useWorkers)!=null?X:!0),s(this,P).text3DSystem.on("render",this.render),s(this,P).imageSystem.on("image-loaded",this.render),s(this,P).renderSystem.on("pre-render",()=>this.publish("pre-render")),s(this,P).renderSystem.on("post-render",()=>this.publish("post-render")),s(this,P).renderSystem.on("measure-canvas",s(this,Yo)),this.onAbort(()=>{s(this,P).renderSystem.off("pre-render",()=>this.publish("pre-render")),s(this,P).renderSystem.off("post-render",()=>this.publish("post-render")),s(this,P).renderSystem.off("measure-canvas",s(this,Yo))}),s(this,P).outdoorLayersSystem=new Sd(this.map),s(this,P).occlusion2DSystem=new Nd(s(this,M),this.convertTo3DMapPosition,s(this,Yt)),n.occlusionEnabled&&s(this,P).occlusion2DSystem.enable(),this.Debug=new Rd(this),n.environment!==!1&&W(this,qo,dt(this,sr,Wg).call(this)),s(this,Gd).call(this)}get viewCamera(){return s(this,nc)}get canvasWidth(){return s(this,M).canvasWidth}get canvasHeight(){return s(this,M).canvasHeight}get resolutionScale(){var r,n;return(n=(r=this.map)==null?void 0:r._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:Nu()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,ki)}addGroupContainer(r,n,i){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let a=new Ut(r);a.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),a.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),(n==null?void 0:n.visible)!==void 0&&(a.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&a.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&Lr(a,n.interactive,s(this,M)),(n==null?void 0:n.focusable)!==void 0&&Zc(a,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(a.userData.preloadGeometry=n.preloadGeometry),s(this,M).geometry3DMap.set(r,a);let u=this.getParentContainer(i);u instanceof Ut&&u.addEntity(a),s(this,lt).call(this),this.render()}else De.error("Group container with ID '".concat(r,"' already exists. The group container cannot be added."));return{id:r,type:"group-container"}}addCustomGeometry(r,n,i,a,u){if(s(this,M).geometry3DMap.has(r))De.error("Custom geometry with ID '".concat(r,"' already exists. The custom geometry cannot be added."));else{let c=new gu(n,i),m=new et(c,new jn(a));(a==null?void 0:a.interactive)!==void 0&&Lr(m,a.interactive,s(this,M)),m.id=r,c.mesh.userData={entityId:r,type:"custom-geometry"},s(this,M).geometry3DMap.set(m.id,m);let d=this.getParentContainer(u);u&&d instanceof Ut?d.addEntity(m):s(this,M).entityScene.addEntity(m),s(this,lt).call(this),this.render()}return{id:r,type:"custom-geometry"}}addGeometryGroup(r,n,i,a){var c;if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let m=new bn(r);m.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),m.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),m.userData.dirty=!0,s(this,M).geometry3DMap.set(r,m);let u=i||{color:y4},{visible:d}=u,h=yo(u,["visible"]);for(let v of n.features){if(v.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(v.geometry.type))continue;let b=(v==null?void 0:v.id)||((c=v==null?void 0:v.properties)==null?void 0:c.id)||ca(),S=s(this,P).meshOptimizationSystem.createEntityFromFeature(b,v,R({outline:!0},h));s(this,M).geometry3DMap.set(b,S),m.userData.entities3D.add(b),s(this,P).textureSystem.dirty=!0}m.setVisible(d!=null?d:!0);let g=this.getParentContainer(a);g instanceof Ut&&g.addEntity(m),s(this,lt).call(this),this.render()}else De.error("Geometry group with ID '".concat(r,"' already exists. The geometry group cannot be added."));return s(this,P).outlineInterpolationSystem.geometries3DDirty=!0,{id:r,type:"geometry-group"}}addOccluder(r,n){let i=this.getParentContainer(n),a=s(this,P).occlusion2DSystem.reserveOccluderId();return i==null||i.addOccluderFeature(r,a),a}addImage(r,n,i,a){try{KE(r,n,i)}catch(u){De.error(u);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new bd(n),c=new et(u,new jn(i));c.id=r||ca(),u.mesh.userData={entityId:c.id,type:"path"},s(this,M).geometry3DMap.set(c.id,c);let m=this.getParentContainer(a);m instanceof Ut&&m.addEntity(c),s(this,lt).call(this),this.render()}else De.error("Image with ID '".concat(r,"' already exists. The image cannot be added."));return{id:r,type:"image"}}addModelGroup(r,n,i,{parent:a,onComplete:u}={}){var c,m;try{AE(r,n,i)}catch(d){De.error(d);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let d=new bn(r);d.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),d.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).geometry3DMap.set(r,d),d.userData.dirty=!0,d.userData.modelURL=i.url;for(let g of n.features){let v=g.id||g.properties.id||ca(),b=s(this,P).meshOptimizationSystem.createModelFromFeature(v,g,R({},i));(g.properties.interactive!==void 0||i.interactive!=null)&&Lr(b,(c=g.properties.interactive)!=null?c:i.interactive,s(this,M)),i.clippingPlaneZOffset!=null&&(b.components[7]=new qy,b.components[7].verticalOffset=i.clippingPlaneZOffset),b.parentId=d.userData.entityId,s(this,M).geometry3DMap.set(v,b),d.userData.entities3D.add(v)}let h=this.getParentContainer(a);h instanceof Ut&&h.addEntity(d),s(this,lt).call(this),(m=this.render())==null||m.then(u)}else De.error("Model group with ID '".concat(r,"' already exists. The model group cannot be added."));return{id:r,type:"geometry-group"}}addMarker2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{By(r,n,i||{})}catch(m){De.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,sr,Vg).call(this,r,new ui(n,i),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&i.interactive!=="pointer-events-auto"&&Lr(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&$c(m,i.enabled);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof et&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),this.render()}else De.error("Marker2D with ID '".concat(u,"' already exists. The marker cannot be added."));return{id:u,type:"marker"}}addText3D(r,n,i,a){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new zc(xe(R({},n),{properties:xe(R({},n.properties),{id:r,content:n.properties.text})})),c=new et(u,new Uu(i==null?void 0:i.appearance));c.id=r,u.mesh.userData.entityId=r.toString(),u.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(r,c);let m=this.getParentContainer(a);m instanceof Ut&&m.addEntity(c),s(this,lt).call(this),this.render()}else De.error("Text3D with ID '".concat(r,"' already exists. The text3d cannot be added."));return{id:r,type:"text3d"}}labelText3D(r,n,i={}){var d,h;try{if(!n||!r)throw new Error("content and meshGeometryId are required");Gy.parse(i)}catch(g){De.error(g);return}let a=s(this,M).geometry3DMap.get(r);if((a==null?void 0:a.type)!=="geometry"){De.error(".labelText3D failed: target incorrect");return}let u=a==null?void 0:a.components[0];if(!u.feature.properties.textArea)return;if(u.textEntityId){let g=s(this,M).geometry3DMap.get(u.textEntityId);if((g==null?void 0:g.type)!=="text3d"){De.error(".labelText3D failed: existing text3d not found");return}return{id:g.id,type:g.type}}let c=new zc({type:"Feature",geometry:{coordinates:(d=u.feature.properties.textArea)==null?void 0:d.position,type:"Point"},properties:{textArea:u.feature.properties.textArea,content:n,id:ca()}});c.polygonEntityId=r;let m=new et(c,new Uu(i==null?void 0:i.appearance));return u.textEntityId=m.id.toString(),c.mesh.userData.entityId=m.id.toString(),c.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(m.id.toString(),m),i.parentId&&((h=this.getParentContainer(i.parentId))==null||h.addEntity(m)),this.render(),{id:m.id,type:"text3d"}}addLabel2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{Oy(r,n,i||{})}catch(m){De.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,sr,Vg).call(this,r,new ai(n,i||{},s(this,M)),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&Lr(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&$c(m,i.enabled);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof et&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),s(this,Wt).call(this),this.render()}else De.error("Label2D with ID '".concat(u,"' already exists. The label cannot be added."));return{id:u,type:"label"}}addPath(r,n={},i){var m,d;try{TE(r,n||{})}catch(h){De.error(h);return}let a=new ao(r,l4(n)),u=new et(a,new jn({color:(m=n==null?void 0:n.color)!=null?m:"#ff834c",altitude:(d=n==null?void 0:n.verticalOffset)!=null?d:.1}));u.id=(n==null?void 0:n.id)||ca(),a.mesh.userData={entityId:u.id,type:"path"},s(this,M).geometry3DMap.set(u.id,u),(n==null?void 0:n.interactive)!=null&&Lr(u,n==null?void 0:n.interactive,s(this,M));let c=this.getParentContainer(i);return c instanceof Ut&&c.addEntity(u),s(this,lt).call(this),this.render(),{id:u.id,type:"path"}}updateWatermark(r){s(this,P).watermarkSystem.options=r,s(this,P).watermarkSystem.dirty=!0,s(this,P).collisionSystem.collidersDirty=!0,this.render()}remove(r){var i,a;let n;if(typeof r=="string"||typeof r=="number"?(n=s(this,M).geometry2DMap.get(r),n==null&&(n=s(this,M).geometry3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(n=s(this,M).geometry2DMap.get(r.id),n==null&&(n=s(this,M).geometry3DMap.get(r.id))):n=r,n!=null){if(n.type==="custom-geometry")s(this,M).geometry3DMap.delete(n.id),n.object3d&&Rt(n.object3d);else if(n.type==="group-container"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let c of n.childrenIds.values())this.remove(c),n.userData.entities2D.delete(c);let u=n.components[1];u&&u.focusMesh&&Rt(u.focusMesh),Rt(n)}else if(n.type==="geometry-group"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let u of n.userData.entities3D.values())this.remove(u),n.userData.entities3D.delete(u);Rt(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let u=n.components[0],c=n.components[4];if(n.entities2D.size>0){for(let d of n.entities2D.values())this.remove(d);n.removeAllEntities()}let m=(a=(i=n.parentObject3D)==null?void 0:i.userData.entityId)!=null?a:n.parentId;if(m){let d=s(this,M).geometry3DMap.get(m);d instanceof bn&&d.userData.entities3D.delete(n.id)}if(n.object3d&&Rt(n.object3d),n.type==="geometry"){let d=n.components[3];d&&(d.enabled=!1,d.dirty=!0)}c&&"focusMesh"in c&&c.focusMesh!=null&&Rt(c.focusMesh),"textMesh"in u&&u.textMesh!=null&&this.remove(u.textMesh.userData.entityId),s(this,M).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let u=n.attachedTo;if(u){let c=s(this,M).geometry3DMap.get(u);c instanceof et&&c.detach(n)}n.object3d&&Rt(n.object3d),n.type==="label"&&delete s(this,P).twoDDrawSystem.textCache[n.id],s(this,M).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&Rt(n.object3d),s(this,M).geometry3DMap.delete(n.id);else if(n.type==="text3d"){Rt(n.object3d);let{batchedText:u,textMesh:c,polygonEntityId:m}=n.components[0];if(c&&(u&&u.removeText(c),Rt(c)),m){s(this,P).text3DSystem.remove(m);let d=s(this,M).geometry3DMap.get(m);(d==null?void 0:d.type)==="geometry"&&(d.components[0].textMesh=void 0,d.components[0].textEntityId=void 0)}s(this,M).geometry3DMap.delete(n.id)}s(this,lt).call(this),s(this,Wt).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,St)}getThreeCamera(){return s(this,vt)}async setEnvironment(r){if(s(this,St))if(r==="basic"){s(this,qo)||W(this,qo,dt(this,sr,Wg).call(this));let n=await s(this,qo);s(this,St).environment=n}else s(this,St).environment=null}getEnvironment(){var r;return(r=s(this,St))!=null&&r.environment?"basic":!1}getCurrentSceneGLTF(r){return s(this,P).exporterSystem.getCurrentSceneGLTF(r)}getBoundingArea(r){(s(this,P).renderSystem.threeDdirty||s(this,P).renderSystem.twoDdirty)&&this.renderSync();let n=new Qt;if(r==null)n.setFromObject(s(this,M).entityScene);else{let i=ma(s(this,M),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let a=i.components[0],u=a instanceof Tt?a.geometry:void 0;a.mesh instanceof Oc&&u?(u.computeBoundingBox(),u.boundingBox&&n.union(u.boundingBox)):n.setFromObject(i.object3d)}else((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null&&n.setFromObject(i)}if(_c(n))return Py(n).map(this.convert3DMapPositionToCoordinate)}hasState(r){return ma(s(this,M),r)!=null}getState(r){var i,a,u,c,m,d,h,g,v,b,S,O,x,E,I,D,C;if(r==null)return{type:"map-view",hoverColor:s(this,M).hoverColor,text3dHoverColor:s(this,M).text3dHoverColor};let n=ma(s(this,M),r);if((n==null?void 0:n.type)==="custom-geometry"){let A=n.components[0],T=n.components[1];return{id:n.id,type:"custom-geometry",visible:T.visible,altitude:T.altitude,parent:(i=n.parentObject3D)==null?void 0:i.userData.entityId,position:this.convert3DMapPositionToCoordinate(A.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let A=Array.from(n.userData.entities3D.values()),T=A==null?void 0:A[0],k=T?this.getState(T):{};return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:k==null?void 0:k.altitude,initialColor:k==null?void 0:k.initialColor,color:k==null?void 0:k.color,side:(a=k==null?void 0:k.side)!=null?a:"double",opacity:k==null?void 0:k.opacity,height:k==null?void 0:k.height,texture:k==null?void 0:k.texture,topColor:k==null?void 0:k.topColor,topTexture:k==null?void 0:k.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(j=>s(this,M).geometry3DMap.get(j)).every(j=>j&&j.components[2]!=null),children:A,bevel:k==null?void 0:k.bevel}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(u=n.getWorldPosition(XP).z)!=null?u:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map(A=>this.getState(A)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let A=n.components[0],T=n.object3d.parent,k=T==null?void 0:T.userData.entityId;return{id:n.id,type:"label",text:A.text||"",parent:{id:k,type:T==null?void 0:T.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:A.enabled,visible:A.visible,initialRank:Lu(A.initialRank),options:{rank:Lu(A.rank),appearance:A.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo}}}else if((n==null?void 0:n.type)==="marker"){let A=n.components[0],T=n.object3d.parent,k=T==null?void 0:T.userData.entityId;return{id:n.id,type:"marker",enabled:A.enabled,visible:A.visible,placement:A.options.placement,dynamicResize:A.options.dynamicResize,parent:{id:k,type:T==null?void 0:T.type},position:this.convert3DMapPositionToCoordinate(n.position),element:A.containerEl,initialRank:Lu(A.initialRank),contentHTML:A.contentHtml,options:{rank:Lu(A.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:A.options.lowPriorityPin}}}else if((n==null?void 0:n.type)==="geometry"){let{color:A,hoverColor:T,initialColor:k,initialTopColor:j,topColor:U,altitude:G}=n.components[1],$=n.components[0],X=n.components[1],V=n.components[1],Y=n.components[6],oe=n.components[2],Z=n.components[3],ee=n.parentObject3D;return{id:n.id,type:"geometry",opacity:V.opacity,initialColor:k,color:A,focusable:X!=null&&X.focusMesh!=null,initialTopColor:j,topColor:U,side:V.side,hoverColor:T,hovered:!!(oe!=null&&oe.hover),height:V.height,visible:V.visible,outline:Z==null?void 0:Z.enabled,showImage:V.showImage,texture:(c=Y==null?void 0:Y.texture)==null?void 0:c.path,topTexture:(m=Y==null?void 0:Y.topTexture)==null?void 0:m.path,flipImageToFaceCamera:V.flipImageToFaceCamera,enableImageCollisions:V.enableImageCollisions,parent:{id:ee==null?void 0:ee.userData.entityId,type:ee==null?void 0:ee.type},altitude:G,bevel:V.bevel,position:this.convert3DMapPositionToCoordinate($.position),interactive:n.components[2]!=null,borderVisible:V.borderVisible,borderColor:V.borderColor,borderWidth:V.borderWidth}}else if((n==null?void 0:n.type)==="model"){let A=n.components[0],T=n.components[1],k=n.components[2];return{id:n.id,type:"model",position:A.mesh?this.convert3DMapPositionToCoordinate((d=A.mesh)==null?void 0:d.getWorldPosition(new ue)):this.convert3DMapPositionToCoordinate(A.position),interactive:k!=null,material:T.material,parent:(h=n.parentObject3D)!=null&&h.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:T.visible,verticalOffset:T.verticalOffset,color:T.color,opacity:T.opacity,rotation:(g=T.rotation)!=null?g:ha,scale:(v=T.scale)!=null?v:fa}}else if((n==null?void 0:n.type)==="path"){let A=n.components[0],T=n.components[2],k=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(A.position),visible:k.visible,interactive:T!=null,completeFraction:A.completeFraction,color:k.color,accentColor:A.accentColor,width:A.width,animateArrowsOnPath:A.animateArrowsOnPath,displayArrowsOnPath:A.displayArrowsOnPath,verticalOffset:k.altitude,highlightCompleteFraction:A.highlightCompleteFraction,highlightStartFraction:A.highlightStartFraction,highlightEndFraction:A.highlightEndFraction,highlightColor:A.highlightColor,highlightWidthMultiplier:A.highlightWidthMultiplier}}else if((n==null?void 0:n.type)==="image"){let A=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate(A.position),visible:n.components[1].visible,verticalOffset:(b=A.feature.properties.verticalOffset)!=null?b:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(S=A.feature.properties.width)!=null?S:0,height:(O=A.feature.properties.height)!=null?O:0,rotation:(x=A.feature.properties.rotation)!=null?x:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof zc&&"textArea"in n.components[0].feature.properties){m4(n);let A=n.components[0],T=n.components[1],{textMesh:k}=A,j=(E=A.mesh)==null?void 0:E.parent;j instanceof Ut&&((I=j.children.find($=>$.type==="batchedtext"))==null||I.getWorldPosition(s(this,pc))),s(this,Au).set(0,0,0);let U=k?k.getWorldPosition(s(this,Au)):s(this,Au);return Object.assign({},pa,T.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(U.add(s(this,pc))),visible:(D=A.visible)!=null?D:!1,content:(C=A.feature.properties.content)!=null?C:""})}else return}}setState(r,n){var a,u;if(typeof r=="object"&&n==null){"hoverColor"in r&&(Dy(r.hoverColor)?s(this,M).hoverColor=(a=r.hoverColor)!=null?a:s(this,M).hoverColor:De.warn('Failed to update global hover color. Invalid color "'.concat(r.hoverColor,'".'))),"text3dHoverColor"in r&&(s(this,M).text3dHoverColor=(u=r.text3dHoverColor)!=null?u:s(this,M).text3dHoverColor);return}let i=ma(s(this,M),r);if(i!=null){if(i.type==="custom-geometry"){let c=s(this,M).geometry3DMap.get(i.id);if(c instanceof et&&c.components[0]instanceof gu){let m=n;$i(i,s(this,M),m.visible),ga(i,s(this,M),m.altitude),up(i,m.position,this.convertTo3DMapPosition),sp(i,this.getParentContainer(m.parent,!1)),Lr(i,m.interactive,s(this,M))&&s(this,lt).call(this)}}else if(i.type==="path"){let c=n;Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),ga(i,s(this,M),c.verticalOffset),c4(i,s(this,M),c)}else if(i.type==="model"){let c=n;Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),$i(i,s(this,M),c.visible),p4(i,c),f4(i,c)}else if(i.type==="group-container"){let c=n;$i(i,s(this,M),c.visible)&&(s(this,P).pathSystem.verticalDistanceDirty=!0,s(this,P).geometryInFocusSystem.focusablesDirty=!0),ga(i,s(this,M),c.altitude)&&(s(this,P).pathSystem.verticalDistanceDirty=!0),Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),Gc(i,s(this,M),c.opacity)&&(s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),c.preloadGeometry&&i.userData.preloadGeometry!==!0&&(i.userData.preloadGeometry=!0,s(this,P).outlineInterpolationSystem.geometries3DDirty=!0),Zc(i,c.focusable)&&(s(this,P).geometryInFocusSystem.focusablesDirty=!0)}else if(i.type==="geometry-group"){let c=n;$i(i,s(this,M),c.visible),Jy(i,s(this,M),c),mp(i,s(this,M),c.outline),c.height!=null&&ap(i,s(this,M),c.height),ga(i,s(this,M),c.altitude),lp(i,s(this,M),c)&&(s(this,P).textureSystem.dirty=!0),lp(i,s(this,M),c),Xy(i,s(this,M),c.shading),Gc(i,s(this,M),c.opacity)&&(s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),Lr(i,c.interactive,s(this,M))&&(s(this,lt).call(this),s(this,Wt).call(this)),dp(i,s(this,M),c.side)}else if(i.type==="geometry"){if(i.components[0]instanceof Tt){let c=n;$i(i,s(this,M),c.visible),mp(i,s(this,M),c.outline),Yy(i,c),Zc(i,c.focusable)&&(s(this,P).geometryInFocusSystem.focusablesDirty=!0),u4(i,c.renderOrder)&&(s(this,P).meshDetachmentSystem.dirty=!0),a4(i,c.opacity)&&(s(this,P).meshDetachmentSystem.dirty=!0,s(this,P).interactionSystem.dirty3D=!0,s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),cp(i,c.flipImageToFaceCamera),i4(i,c.enableImageCollisions),ga(i,s(this,M),c.altitude),c.height!=null&&ap(i,s(this,M),c.height),o4(i,c)&&(s(this,P).meshDetachmentSystem.dirty=!0,s(this,P).textureSystem.dirty=!0),Qy(i,c),r4(i,c.hoverColor),Lr(i,c.interactive,s(this,M)),n4(i,c.hovered),dp(i,s(this,M),c.side),s4(i,c)}s(this,lt).call(this)}else if(i.type==="label"||i.type==="marker"){let c=n;t4(i,n,s(this,M)),e4(i,n,s(this,M))&&(s(this,Wt).call(this),s(this,P).domMutationSystem.dirty=!0),up(i,c.position,this.convertTo3DMapPosition),sp(i,this.getParentContainer(c.parent,!1))&&(s(this,Wt).call(this),s(this,P).panBoundsSystem.dirty=!0),$c(i,c.enabled),$i(i,s(this,M),c.visible)}else if(i.type==="image"){let c=n;$i(i,s(this,M),c.visible),Gc(i,s(this,M),c.opacity),cp(i,c.flipImageToFaceCamera)}else if(i.type==="text3d"){let c=n;d4(i,s(this,M),c)}this.render()}}convertTo3DMapPosition(r,n,i=0,a){var m,d,h,g,v;if(Array.isArray(r))return this.convertTo3DMapPosition(r[1],r[0],(m=r[2])!=null?m:i,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:u,y:c}=Nc((h=(d=s(this,M).center)==null?void 0:d[1])!=null?h:0,(v=(g=s(this,M).center)==null?void 0:g[0])!=null?v:0,r,n);return a?(a.set(u,c,i),a):new ue(u,c,i)}get backgroundColor(){return typeof s(this,Yt).backgroundColor=="string"?s(this,Yt).backgroundColor:"#".concat(s(this,Yt).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,Yt).backgroundAlpha}getThreeRenderer(){return s(this,Yt)}getCenter(r){let n=Array.isArray(r)?r:this.getBoundingArea(r);return n?Ry(n):void 0}isInView(r){let n=ma(s(this,M),r);if(s(this,mc).identity().multiply(s(this,vt).projectionMatrix).multiply(s(this,vt).matrixWorldInverse),s(this,Qo).setFromProjectionMatrix(s(this,mc)),n instanceof tp)return s(this,Qo).containsPoint(n.position);if(n instanceof et){let i=n==null?void 0:n.components[0];if(i instanceof gu||i instanceof oo)return s(this,Qo).containsPoint(this.convertTo3DMapPosition(i.feature.geometry.coordinates));if(i instanceof Tt){let a=new Qt(this.convertTo3DMapPosition(i.featureBbox[1],i.featureBbox[0],0),this.convertTo3DMapPosition(i.featureBbox[3],i.featureBbox[2],0));return s(this,Qo).intersectsBox(a)}}return!1}queryGeometry2DInView(r){let{screenOffsets:n,fullyContains:i}=r!=null?r:{},[a,u,c,m]=zy(this.container,n),d=new Se(a,u,c,m);return s(this,P).collisionSystem.visibleCollidersQTree.queryRect(d).filter(b=>i?d.contains(b):d.intersects(b)).map(b=>s(this,M).geometry2DMap.get(b.userData.entityId)).filter(b=>b!=null).filter(b=>b.components[0]instanceof ai||b.components[0]instanceof ui).map(b=>b.id.toString())}onMapLibreEvent(r,n){if(!this.map){De.warn('Tried to add event listener "'.concat(r,'" but MapLibre map is not initialized.'));return}this.map.on(r,n),s(this,hn)[r]=s(this,hn)[r]||[],s(this,hn)[r].push(n)}offMapLibreEvent(r,n){!this.map||!Array.isArray(s(this,hn)[r])||(this.map.off(r,n),s(this,hn)[r]=s(this,hn)[r].filter(i=>i!==n))}get aborted(){return s(this,Xo).signal.aborted}onAbort(r){s(this,Xo).signal.addEventListener("abort",r,{once:!0})}getSystems(){return s(this,P)}getInternalState(){return s(this,M)}getInternalTweenGroup(){return s(this,M).internalTweenGroup}getExternalTweenGroup(){return s(this,M).externalTweenGroup}computeMinZOffsetBetweenContainers(r,n,i){if(!r||!n)return-1;ep(r,"group-container"),ep(n,"group-container");let a=jc(r,this.getThreeCamera()),u=n.clone(),c=jc(u,this.getThreeCamera());if(!_c(a)||!_c(c))return-1;let m=0,d;i&&this.container.querySelectorAll(".debug-box").forEach(g=>g.remove());do{if(m>1e4)return-1;if(m+=20,u.position.z=m,u.updateMatrixWorld(),c.makeEmpty(),jc(u,s(this,vt),c),d=a.intersectsBox(c),i){let h=op(a,"blue",this.container),g=op(c,d?"red":"green",this.container);h.classList.add("debug-box"),g.classList.add("debug-box")}}while(d);return m}};St=new WeakMap,vt=new WeakMap,qo=new WeakMap,nc=new WeakMap,Iu=new WeakMap,ho=new WeakMap,Jo=new WeakMap,Du=new WeakMap,sr=new WeakSet,Zg=o(function(r){var n;s(this,ki)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(r)),s(this,M).pixelRatio=this.resolutionScale},"#setResolutionScale"),M=new WeakMap,hn=new WeakMap,Xo=new WeakMap,Xe=new WeakMap,kn=new WeakMap,wt=new WeakMap,gn=new WeakMap,Yt=new WeakMap,P=new WeakMap,ic=new WeakMap,Wt=new WeakMap,lt=new WeakMap,M6=o(function(){W(this,Xe,document.createElement("div")),s(this,Xe).classList.add("mappedin__smart-collision-engine__container"),W(this,kn,document.createElement("canvas")),s(this,kn).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Xe)),W(this,wt,document.createElement("canvas")),s(this,wt).classList.add("mappedin__smart-collision-engine__container"),s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,Xe).appendChild(s(this,kn)),s(this,Xe).appendChild(s(this,wt)),s(this,kn).width=s(this,Xe).clientWidth,s(this,kn).height=s(this,Xe).clientHeight,s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px"},"#renderEntity2DContainer"),T6=o(function(){W(this,gn,document.createElement("div")),s(this,gn).classList.add("mappedin-2d-entities"),Object.assign(s(this,gn).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,gn))},"#renderEntityDOMContainer"),k6=o(function(){s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,kn).width=s(this,Xe).clientWidth,s(this,kn).height=s(this,Xe).clientHeight,s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,P).collisionSystem.collidersDirty=!0},"#resizeCollisionCanvas"),ki=new WeakMap,oc=new WeakMap,ac=new WeakMap,uc=new WeakMap,sc=new WeakMap,Su=new WeakMap,Gd=new WeakMap,cc=new WeakMap,wu=new WeakMap,lc=new WeakMap,Yo=new WeakMap,Vg=o(function(r,n,i,a){let u=new tp(n,this.convertTo3DMapPosition(r[1],r[0],r[2]||0),a);return u.occluderId=i!=null?i:s(this,P).occlusion2DSystem.backgroundId,s(this,M).geometry2DMap.set(u.id,u),u},"#createEntity2D"),Qo=new WeakMap,mc=new WeakMap,dc=new WeakMap,Ar=new WeakMap,Fr=new WeakMap,Wg=o(async function(){return so.load(v4).then(r=>{var n;return s(this,St)&&((n=s(this,St).environment)==null||n.dispose(),r.mapping=ey,s(this,St).environment=r,this.render()),r})},"#loadEnvMap"),Zd=new WeakMap,Vd=new WeakMap,Au=new WeakMap,pc=new WeakMap,o(Hg,"Core");var Gg=Hg,XP=new ue,Th=Gg;var Kg=class Kg extends Te{constructor(r){super();f(this,"gl");f(this,"el",document.createElement("div"));f(this,"core");f(this,"origin");f(this,"map");f(this,"layer");f(this,"handleStyleChange",o(()=>{!this.map||!this.layer||this.map.getLayer(this.layer.id)||(this.map.addLayer(this.layer),this.core.camera.setMinZoomLevel(this.map.getMinZoom()),this.core.camera.setMaxZoomLevel(this.map.getMaxZoom()),this.core.camera.setMinPitch(this.map.getMinPitch()),this.core.camera.setMaxPitch(this.map.getMaxPitch()))},"handleStyleChange"));f(this,"handleMove",o(()=>{if(!this.map)return;let[r,n]=this.map.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(r,n),this.core.getSystems().cameraSystem.setZoomLevel(this.map.getZoom()),this.core.getSystems().cameraSystem.setRotation(Fe.degToRad(this.map.getBearing())),this.core.getSystems().cameraSystem.setTilt(Fe.degToRad(this.map.getPitch()))},"handleMove"));f(this,"handleError",o(r=>{De.warn(r)},"handleError"));this.origin=r}onAdd(r){this.origin=this.origin||r.getCenter().toArray(),this.gl=r.painter.context.gl,this.core=new Th(r._container,{center:this.origin,zoomLevel:r.getZoom(),pitch:r.getPitch(),bearing:r.getBearing(),gl:this.gl,map:r,mode:"outdoors-overlay"}),this.map=r,this.core.camera.setMinZoomLevel(r.getMinZoom()),this.core.camera.setMaxZoomLevel(r.getMaxZoom()),this.core.camera.setMinPitch(r.getMinPitch()),this.core.camera.setMaxPitch(r.getMaxPitch()),this.map.on("error",this.handleError);let n=Hd.fromLngLat(this.origin,0);return this.layer=np(n,this.core.viewCamera,()=>{this.core.renderSync()}),this.map.on("styledata",this.handleStyleChange),this.map.on("move",this.handleMove),this.handleStyleChange(),this.el}onRemove(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("move",this.handleMove),this.map.off("error",this.handleError),this.layer&&this.map.removeLayer(this.layer.id)),this.layer=void 0,this.map=void 0,this.core&&this.core.destroy(),this.core=void 0}};o(Kg,"MapLibreOverlay");var Wd=Kg;l();var _6=xy("",{prefix:"[MapLibreOverlay]"});l();var L6=o((e,{id:t}={})=>{let r=Array.isArray(e)?e:[e];if(!r.every(a=>typeof a=="string"))return;let n=r.join(""),i=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(i=a)}i==null&&(i=document.createElement("style")),t&&t!==""&&(i.id=t),i.textContent=n,document.head.appendChild(i)},"injectCSS");var R6=".mappedin-marker {\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n font-weight: normal;\n top: 0;\n position: absolute;\n font-weight: bold;\n color: black;\n display: flex;\n flex-direction: row;\n will-change: transform, opacity;\n transition: opacity 150ms ease-in-out;\n justify-content: center;\n opacity: 0;\n}\n\n/* Low priority pin strategy styles */\n\n/* Hide child elements as well */\n.mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {\n visibility: hidden;\n}\n\n/* Create the pin using ::before pseudo-element */\n.mappedin-marker::before {\n content: '';\n display: none;\n border-radius: 50%;\n position: relative;\n /* Default values - will be overridden by inline styles */\n width: var(--mappedin-pin-size, 2px);\n height: var(--mappedin-pin-size, 2px);\n background-color: var(--pin-color, #666);\n}\n\n.mappedin-marker[data-placement='hidden']::before {\n display: block;\n}\n";var N6=".mappedin__smart-collision-engine__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n /* Enables colliders to use translate3D */\n transform-style: preserve-3d;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n}\n\n.mappedin__smart-collision-engine-debug__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n will-change: opacity;\n &.interacting {\n opacity: 0.2;\n }\n}\n";var j6=".mappedin-map {\n .mappedin-interactive {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n\n &.mappedin-interaction-hover {\n cursor: pointer;\n }\n }\n}\n";var U6=".mappedin-map {\n .mappedin-control-container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n\n .mappedin-ctrl-top-left,\n .mappedin-ctrl-top-right,\n .mappedin-ctrl-bottom-left,\n .mappedin-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n }\n\n .mappedin-ctrl-top-left {\n top: 0;\n left: 0;\n }\n\n .mappedin-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n .mappedin-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n }\n\n .mappedin-ctrl-bottom-right {\n bottom: 0;\n right: 0;\n }\n\n .mappedin-ctrl-attrib {\n display: block;\n position: relative;\n pointer-events: auto;\n font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;\n padding: 3px 5px 1px 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n min-width: 11px;\n min-height: 11px;\n user-select: none;\n\n summary.mappedin-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n summary.mappedin-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n &.mappedin-compact .mappedin-ctrl-attrib-button,\n &.mappedin-compact-show .mappedin-ctrl-attrib-inner {\n display: inline-block;\n }\n\n &.mappedin-compact {\n background-color: transparent;\n }\n\n &.mappedin-compact-show {\n min-width: 15px;\n min-height: 15px;\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 0.5);\n }\n }\n\n .mappedin-ctrl-attrib-top-left {\n float: left;\n border-bottom-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-top-right {\n float: right;\n border-bottom-left-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-left {\n float: left;\n border-top-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-right {\n float: right;\n border-top-left-radius: 4px;\n }\n .mappedin-ctrl-attrib-top-left,\n .mappedin-ctrl-attrib-bottom-left {\n padding: 3px 5px 1px 20px;\n }\n\n .mappedin-ctrl-attrib-inner {\n display: inline-block;\n margin-right: 12px;\n }\n\n .mappedin-ctrl-attrib-inner,\n .mappedin-ctrl-attrib-inner a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n }\n\n .mappedin-ctrl-attrib-inner-bold,\n .mappedin-ctrl-attrib-inner-bold a {\n font-weight: bold;\n }\n\n .mappedin-ctrl-attrib-inner a:hover {\n color: #017ef1;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .mappedin-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 15px;\n height: 15px;\n box-sizing: border-box;\n border-radius: 50%;\n top: 0;\n right: 2px;\n border: 1px;\n }\n .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,\n .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {\n left: 2px;\n }\n }\n}\n";var nM=[R6,N6,j6,U6],kve=o((e,t)=>{fc.instance!=null&&_6.warn("Only a single map venue is supported at this time.");let r=new fc([e.mapCenter.longitude,e.mapCenter.latitude],e,t);return fc.instance=r,r},"createMapLibreOverlay"),iM=3,oM={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:iM}},ea,ta,Fu,go,ra,hc=class hc{constructor(t,r,n){_(this,ea);_(this,ta);_(this,Fu);_(this,go);_(this,ra);f(this,"on",o((t,r)=>{s(this,ea).on(t,r)},"on"));f(this,"off",o((t,r)=>{s(this,ea).off(t,r)},"off"));W(this,ea,new Te),W(this,ra,new Wd(t)),W(this,ta,r),W(this,Fu,n)}onAdd(t){var i,a,u;let r=s(this,ra).onAdd(t),n=xe(R(R({},oM),(i=s(this,Fu))!=null?i:{}),{outdoorView:R({token:s(this,ta).outdoorViewToken},(a=s(this,Fu))==null?void 0:a.outdoorView)});return W(this,go,new rM(s(this,ra).core)),((u=n.injectStyles)==null||u)&&L6(nM,{id:"mappedin__styles"}),s(this,go).addMap(s(this,ta),n).then(()=>{s(this,ea).publish("loaded",{mapView:s(this,go),mapData:s(this,ta)})}),r}onRemove(){s(this,go)&&s(this,go).clear(),hc.instance=null,s(this,ra).onRemove()}};ea=new WeakMap,ta=new WeakMap,Fu=new WeakMap,go=new WeakMap,ra=new WeakMap,o(hc,"MappedinMapLibreOverlay"),f(hc,"instance");var fc=hc;export{oM as DEFAULT_MAP_OPTIONS,iM as FLOOR_GAP,fc as MappedinMapLibreOverlay,kve as createMapLibreOverlay};
1
+ import{$ as Yc,$a as Ta,A as a4,Aa as O4,B as u4,Ba as P4,C as s4,Ca as ts,D as _o,Da as Lo,E as c4,Ea as B4,F as l4,Fa as Zr,G as oe,Ga as M4,H as Aa,Ha as T4,I as Xu,Ia as k4,J as m4,Ja as Rp,K as gi,Ka as _4,L as d4,La as Np,M as yi,Ma as Up,N as Bp,Na as rl,O as Qi,Oa as L4,P as at,Pa as R4,Q as Jc,Qa as jp,R as Yu,Ra as N4,S as Jt,Sa as U4,T as Mp,Ta as zp,U as bi,Ua as j4,V as p4,Va as eo,W as Fa,Wa as nl,X as f4,Xa as $p,Y as Qu,Ya as z4,Za as Gp,_ as Xc,_a as $4,a as Cp,aa as h4,ab as Zp,b as Ip,ba as g4,bb as il,c as Sp,ca as y4,cb as G4,d as wp,da as Tp,db as Vp,e as Wc,ea as b4,eb as Z4,f as Hc,fa as kp,fb as V4,g as ko,ga as v4,gb as W4,h as e4,ha as x4,hb as H4,i as t4,ia as Oa,ib as K4,j as Ap,ja as E4,jb as q4,k as Yi,ka as C4,kb as J4,l as Fp,la as Qc,lb as Wn,m as r4,ma as _p,mb as X4,n as Se,na as I4,nb as Nt,o as Op,oa as Lp,ob as Y4,p as Vn,pa as es,pb as ol,q as n4,qa as Pa,qb as Hn,r as i4,ra as el,rb as Q4,s as Kc,sa as Ba,sb as Lt,t as o4,ta as Ma,tb as Kn,u as qc,ua as D4,ub as nr,v as Da,va as S4,w as Sa,wa as tl,x as Pp,xa as w4,y as wa,ya as A4,z as Le,za as F4}from"./chunk-DHAMB223.js";import{a as en}from"./chunk-ZPHHCS52.js";import{$ as Ot,B as _c,D as zn,E as $n,Ea as Hy,F as Lc,Fa as Ea,G as Rc,Ga as Ky,H as Ry,Ha as Ca,I as ba,Ia,J as va,Ja as In,Ka as Gc,L as Ny,La as qy,M as Te,Ma as qu,N as Ae,Oa as Ju,R as Uy,S as jy,T as zy,U as Nc,V as ne,W as rr,X as $y,Y as Gr,Ya as Zc,Z as xa,_ as Mo,a as l,aa as Gy,ab as Vc,b as y,ba as fr,bb as Jy,ca as Ar,d as kc,da as Uc,e as Bo,ea as Pe,f as Hu,fa as qi,fb as Xy,g as hi,h as ky,ha as Ji,hb as Zn,i as Ku,ia as Zy,ja as Dp,jb as Yy,ka as jc,la as Xi,lb as Qy,r as _y,t as Ly,ta as Gn,ua as Vy,va as zc,wa as $c,xa as Wy,za as To}from"./chunk-PS4IVNPZ.js";import{a as R,b as De,c as o,d as Tc,e as Po,g as fi,h as Ki,i as My,j as h,k as s,l as L,m as K,n as pt,o as Ty,p as X}from"./chunk-LUJQR5EH.js";var $E=fi((Uh,jh)=>{l();(function(e,t){typeof Uh=="object"&&typeof jh<"u"?jh.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(Uh,function(){"use strict";var e=o(function(n,i){if(n===void 0&&(n=[]),i===void 0&&(i=t),this.data=n,this.length=this.data.length,this.compare=i,this.length>0)for(var a=(this.length>>1)-1;a>=0;a--)this._down(a)},"TinyQueue");e.prototype.push=o(function(n){this.data.push(n),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var n=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),n}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(n){for(var i=this,a=i.data,u=i.compare,c=a[n];n>0;){var m=n-1>>1,d=a[m];if(u(c,d)>=0)break;a[n]=d,n=m}a[n]=c},"_up"),e.prototype._down=o(function(n){for(var i=this,a=i.data,u=i.compare,c=this.length>>1,m=a[n];n<c;){var d=(n<<1)+1,f=a[d],g=d+1;if(g<this.length&&u(a[g],f)<0&&(d=g,f=a[g]),u(f,m)>=0)break;a[n]=f,n=d}a[n]=m},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var ZE=fi((rme,zh)=>{"use strict";l();var Hm=$E();Hm.default&&(Hm=Hm.default);zh.exports=GE;zh.exports.default=GE;function GE(e,t,r){t=t||1;for(var n,i,a,u,c=0;c<e[0].length;c++){var m=e[0][c];(!c||m[0]<n)&&(n=m[0]),(!c||m[1]<i)&&(i=m[1]),(!c||m[0]>a)&&(a=m[0]),(!c||m[1]>u)&&(u=m[1])}var d=a-n,f=u-i,g=Math.min(d,f),v=g/2;if(g===0){var b=[n,i];return b.distance=0,b}for(var D=new Hm(void 0,O7),A=n;A<a;A+=g)for(var x=i;x<u;x+=g)D.push(new ho(A+v,x+v,v,e));var E=B7(e),S=new ho(n+d/2,i+f/2,0,e);S.d>E.d&&(E=S);for(var I=D.length;D.length;){var C=D.pop();C.d>E.d&&(E=C,r&&console.log("found best %d after %d probes",Math.round(1e4*C.d)/1e4,I)),!(C.max-E.d<=t)&&(v=C.h/2,D.push(new ho(C.x-v,C.y-v,v,e)),D.push(new ho(C.x+v,C.y-v,v,e)),D.push(new ho(C.x-v,C.y+v,v,e)),D.push(new ho(C.x+v,C.y+v,v,e)),I+=4)}r&&(console.log("num probes: "+I),console.log("best distance: "+E.d));var k=[E.x,E.y];return k.distance=E.d,k}o(GE,"polylabel");function O7(e,t){return t.max-e.max}o(O7,"compareMax");function ho(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=P7(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(ho,"Cell");function P7(e,t,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var u=r[a],c=0,m=u.length,d=m-1;c<m;d=c++){var f=u[c],g=u[d];f[1]>t!=g[1]>t&&e<(g[0]-f[0])*(t-f[1])/(g[1]-f[1])+f[0]&&(n=!n),i=Math.min(i,M7(e,t,f,g))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(P7,"pointToPolygonDist");function B7(e){for(var t=0,r=0,n=0,i=e[0],a=0,u=i.length,c=u-1;a<u;c=a++){var m=i[a],d=i[c],f=m[0]*d[1]-d[0]*m[1];r+=(m[0]+d[0])*f,n+=(m[1]+d[1])*f,t+=f*3}return t===0?new ho(i[0][0],i[0][1],0,e):new ho(r/t,n/t,0,e)}o(B7,"getCentroidCell");function M7(e,t,r,n){var i=r[0],a=r[1],u=n[0]-i,c=n[1]-a;if(u!==0||c!==0){var m=((e-i)*u+(t-a)*c)/(u*u+c*c);m>1?(i=n[0],a=n[1]):m>0&&(i+=u*m,a+=c*m)}return u=e-i,c=t-a,u*u+c*c}o(M7,"getSegDistSq")});var T6=fi((Wg,Hg)=>{l();(function(e,t){typeof Wg=="object"&&typeof Hg<"u"?Hg.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(Wg,function(){"use strict";function e(x,E,S,I,C){o(function k(V,z,M,T,Z){for(;T>M;){if(T-M>600){var j=T-M+1,W=z-M+1,$=Math.log(j),q=.5*Math.exp(2*$/3),J=.5*Math.sqrt($*q*(j-q)/j)*(W-j/2<0?-1:1),G=Math.max(M,Math.floor(z-W*q/j+J)),ae=Math.min(T,Math.floor(z+(j-W)*q/j+J));k(V,z,G,ae,Z)}var te=V[z],ee=M,le=T;for(t(V,M,z),Z(V[T],te)>0&&t(V,M,T);ee<le;){for(t(V,ee,le),ee++,le--;Z(V[ee],te)<0;)ee++;for(;Z(V[le],te)>0;)le--}Z(V[M],te)===0?t(V,M,le):t(V,++le,T),le<=z&&(M=le+1),z<=le&&(T=le-1)}},"t")(x,E,S||0,I||x.length-1,C||r)}o(e,"t");function t(x,E,S){var I=x[E];x[E]=x[S],x[S]=I}o(t,"i");function r(x,E){return x<E?-1:x>E?1:0}o(r,"n");var n=o(function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function i(x,E,S){if(!S)return E.indexOf(x);for(var I=0;I<E.length;I++)if(S(x,E[I]))return I;return-1}o(i,"e");function a(x,E){u(x,0,x.children.length,E,x)}o(a,"a");function u(x,E,S,I,C){C||(C=D(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var k=E;k<S;k++){var V=x.children[k];c(C,x.leaf?I(V):V)}return C}o(u,"h");function c(x,E){return x.minX=Math.min(x.minX,E.minX),x.minY=Math.min(x.minY,E.minY),x.maxX=Math.max(x.maxX,E.maxX),x.maxY=Math.max(x.maxY,E.maxY),x}o(c,"o");function m(x,E){return x.minX-E.minX}o(m,"s");function d(x,E){return x.minY-E.minY}o(d,"l");function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}o(f,"f");function g(x){return x.maxX-x.minX+(x.maxY-x.minY)}o(g,"u");function v(x,E){return x.minX<=E.minX&&x.minY<=E.minY&&E.maxX<=x.maxX&&E.maxY<=x.maxY}o(v,"m");function b(x,E){return E.minX<=x.maxX&&E.minY<=x.maxY&&E.maxX>=x.minX&&E.maxY>=x.minY}o(b,"c");function D(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}o(D,"p");function A(x,E,S,I,C){for(var k=[E,S];k.length;)if(!((S=k.pop())-(E=k.pop())<=I)){var V=E+Math.ceil((S-E)/I/2)*I;e(x,V,E,S,C),k.push(E,V,V,S)}}return o(A,"d"),n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(x){var E=this.data,S=[];if(!b(x,E))return S;for(var I=this.toBBox,C=[];E;){for(var k=0;k<E.children.length;k++){var V=E.children[k],z=E.leaf?I(V):V;b(x,z)&&(E.leaf?S.push(V):v(x,z)?this._all(V,S):C.push(V))}E=C.pop()}return S},n.prototype.collides=function(x){var E=this.data;if(!b(x,E))return!1;for(var S=[];E;){for(var I=0;I<E.children.length;I++){var C=E.children[I],k=E.leaf?this.toBBox(C):C;if(b(x,k)){if(E.leaf||v(x,k))return!0;S.push(C)}}E=S.pop()}return!1},n.prototype.load=function(x){if(!x||!x.length)return this;if(x.length<this._minEntries){for(var E=0;E<x.length;E++)this.insert(x[E]);return this}var S=this._build(x.slice(),0,x.length-1,0);if(this.data.children.length)if(this.data.height===S.height)this._splitRoot(this.data,S);else{if(this.data.height<S.height){var I=this.data;this.data=S,S=I}this._insert(S,this.data.height-S.height-1,!0)}else this.data=S;return this},n.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},n.prototype.clear=function(){return this.data=D([]),this},n.prototype.remove=function(x,E){if(!x)return this;for(var S,I,C,k=this.data,V=this.toBBox(x),z=[],M=[];k||z.length;){if(k||(k=z.pop(),I=z[z.length-1],S=M.pop(),C=!0),k.leaf){var T=i(x,k.children,E);if(T!==-1)return k.children.splice(T,1),z.push(k),this._condense(z),this}C||k.leaf||!v(k,V)?I?(S++,k=I.children[S],C=!1):k=null:(z.push(k),M.push(S),S=0,I=k,k=k.children[0])}return this},n.prototype.toBBox=function(x){return x},n.prototype.compareMinX=function(x,E){return x.minX-E.minX},n.prototype.compareMinY=function(x,E){return x.minY-E.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(x){return this.data=x,this},n.prototype._all=function(x,E){for(var S=[];x;)x.leaf?E.push.apply(E,x.children):S.push.apply(S,x.children),x=S.pop();return E},n.prototype._build=function(x,E,S,I){var C,k=S-E+1,V=this._maxEntries;if(k<=V)return a(C=D(x.slice(E,S+1)),this.toBBox),C;I||(I=Math.ceil(Math.log(k)/Math.log(V)),V=Math.ceil(k/Math.pow(V,I-1))),(C=D([])).leaf=!1,C.height=I;var z=Math.ceil(k/V),M=z*Math.ceil(Math.sqrt(V));A(x,E,S,M,this.compareMinX);for(var T=E;T<=S;T+=M){var Z=Math.min(T+M-1,S);A(x,T,Z,z,this.compareMinY);for(var j=T;j<=Z;j+=z){var W=Math.min(j+z-1,Z);C.children.push(this._build(x,j,W,I-1))}}return a(C,this.toBBox),C},n.prototype._chooseSubtree=function(x,E,S,I){for(;I.push(E),!E.leaf&&I.length-1!==S;){for(var C=1/0,k=1/0,V=void 0,z=0;z<E.children.length;z++){var M=E.children[z],T=f(M),Z=(j=x,W=M,(Math.max(W.maxX,j.maxX)-Math.min(W.minX,j.minX))*(Math.max(W.maxY,j.maxY)-Math.min(W.minY,j.minY))-T);Z<k?(k=Z,C=T<C?T:C,V=M):Z===k&&T<C&&(C=T,V=M)}E=V||E.children[0]}var j,W;return E},n.prototype._insert=function(x,E,S){var I=S?x:this.toBBox(x),C=[],k=this._chooseSubtree(I,this.data,E,C);for(k.children.push(x),c(k,I);E>=0&&C[E].children.length>this._maxEntries;)this._split(C,E),E--;this._adjustParentBBoxes(I,C,E)},n.prototype._split=function(x,E){var S=x[E],I=S.children.length,C=this._minEntries;this._chooseSplitAxis(S,C,I);var k=this._chooseSplitIndex(S,C,I),V=D(S.children.splice(k,S.children.length-k));V.height=S.height,V.leaf=S.leaf,a(S,this.toBBox),a(V,this.toBBox),E?x[E-1].children.push(V):this._splitRoot(S,V)},n.prototype._splitRoot=function(x,E){this.data=D([x,E]),this.data.height=x.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(x,E,S){for(var I,C,k,V,z,M,T,Z=1/0,j=1/0,W=E;W<=S-E;W++){var $=u(x,0,W,this.toBBox),q=u(x,W,S,this.toBBox),J=(C=$,k=q,V=void 0,z=void 0,M=void 0,T=void 0,V=Math.max(C.minX,k.minX),z=Math.max(C.minY,k.minY),M=Math.min(C.maxX,k.maxX),T=Math.min(C.maxY,k.maxY),Math.max(0,M-V)*Math.max(0,T-z)),G=f($)+f(q);J<Z?(Z=J,I=W,j=G<j?G:j):J===Z&&G<j&&(j=G,I=W)}return I||S-E},n.prototype._chooseSplitAxis=function(x,E,S){var I=x.leaf?this.compareMinX:m,C=x.leaf?this.compareMinY:d;this._allDistMargin(x,E,S,I)<this._allDistMargin(x,E,S,C)&&x.children.sort(I)},n.prototype._allDistMargin=function(x,E,S,I){x.children.sort(I);for(var C=this.toBBox,k=u(x,0,E,C),V=u(x,S-E,S,C),z=g(k)+g(V),M=E;M<S-E;M++){var T=x.children[M];c(k,x.leaf?C(T):T),z+=g(k)}for(var Z=S-E-1;Z>=E;Z--){var j=x.children[Z];c(V,x.leaf?C(j):j),z+=g(V)}return z},n.prototype._adjustParentBBoxes=function(x,E,S){for(var I=S;I>=0;I--)c(E[I],x)},n.prototype._condense=function(x){for(var E=x.length-1,S=void 0;E>=0;E--)x[E].children.length===0?E>0?(S=x[E-1].children).splice(S.indexOf(x[E]),1):this.clear():a(x[E],this.toBBox)},n})});var Yg=fi(ge=>{"use strict";l();Object.defineProperty(ge,"__esModule",{value:!0});ge.earthRadius=63710088e-1;ge.factors={centimeters:ge.earthRadius*100,centimetres:ge.earthRadius*100,degrees:ge.earthRadius/111325,feet:ge.earthRadius*3.28084,inches:ge.earthRadius*39.37,kilometers:ge.earthRadius/1e3,kilometres:ge.earthRadius/1e3,meters:ge.earthRadius,metres:ge.earthRadius,miles:ge.earthRadius/1609.344,millimeters:ge.earthRadius*1e3,millimetres:ge.earthRadius*1e3,nauticalmiles:ge.earthRadius/1852,radians:1,yards:ge.earthRadius*1.0936};ge.unitsFactors={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/ge.earthRadius,yards:1.0936133};ge.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function So(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(So,"feature");ge.feature=So;function oM(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return Kg(t).geometry;case"LineString":return Jg(t).geometry;case"Polygon":return qg(t).geometry;case"MultiPoint":return _6(t).geometry;case"MultiLineString":return k6(t).geometry;case"MultiPolygon":return L6(t).geometry;default:throw new Error(e+" is invalid")}}o(oM,"geometry");ge.geometry=oM;function Kg(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!zd(e[0])||!zd(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return So(n,t,r)}o(Kg,"point");ge.point=Kg;function aM(e,t,r){return r===void 0&&(r={}),$d(e.map(function(n){return Kg(n,t)}),r)}o(aM,"points");ge.points=aM;function qg(e,t,r){r===void 0&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var u=0;u<a[a.length-1].length;u++)if(a[a.length-1][u]!==a[0][u])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:e};return So(c,t,r)}o(qg,"polygon");ge.polygon=qg;function uM(e,t,r){return r===void 0&&(r={}),$d(e.map(function(n){return qg(n,t)}),r)}o(uM,"polygons");ge.polygons=uM;function Jg(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return So(n,t,r)}o(Jg,"lineString");ge.lineString=Jg;function sM(e,t,r){return r===void 0&&(r={}),$d(e.map(function(n){return Jg(n,t)}),r)}o(sM,"lineStrings");ge.lineStrings=sM;function $d(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o($d,"featureCollection");ge.featureCollection=$d;function k6(e,t,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:e};return So(n,t,r)}o(k6,"multiLineString");ge.multiLineString=k6;function _6(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return So(n,t,r)}o(_6,"multiPoint");ge.multiPoint=_6;function L6(e,t,r){r===void 0&&(r={});var n={type:"MultiPolygon",coordinates:e};return So(n,t,r)}o(L6,"multiPolygon");ge.multiPolygon=L6;function cM(e,t,r){r===void 0&&(r={});var n={type:"GeometryCollection",geometries:e};return So(n,t,r)}o(cM,"geometryCollection");ge.geometryCollection=cM;function lM(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}o(lM,"round");ge.round=lM;function R6(e,t){t===void 0&&(t="kilometers");var r=ge.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(R6,"radiansToLength");ge.radiansToLength=R6;function Xg(e,t){t===void 0&&(t="kilometers");var r=ge.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(Xg,"lengthToRadians");ge.lengthToRadians=Xg;function mM(e,t){return N6(Xg(e,t))}o(mM,"lengthToDegrees");ge.lengthToDegrees=mM;function dM(e){var t=e%360;return t<0&&(t+=360),t}o(dM,"bearingToAzimuth");ge.bearingToAzimuth=dM;function N6(e){var t=e%(2*Math.PI);return t*180/Math.PI}o(N6,"radiansToDegrees");ge.radiansToDegrees=N6;function pM(e){var t=e%360;return t*Math.PI/180}o(pM,"degreesToRadians");ge.degreesToRadians=pM;function fM(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return R6(Xg(e,t),r)}o(fM,"convertLength");ge.convertLength=fM;function hM(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=ge.areaFactors[t];if(!n)throw new Error("invalid original units");var i=ge.areaFactors[r];if(!i)throw new Error("invalid final units");return e/n*i}o(hM,"convertArea");ge.convertArea=hM;function zd(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(zd,"isNumber");ge.isNumber=zd;function gM(e){return!!e&&e.constructor===Object}o(gM,"isObject");ge.isObject=gM;function yM(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!zd(t))throw new Error("bbox must only contain numbers")})}o(yM,"validateBBox");ge.validateBBox=yM;function bM(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}o(bM,"validateId");ge.validateId=bM});var G6=fi(Wt=>{"use strict";l();Object.defineProperty(Wt,"__esModule",{value:!0});var Ir=Yg();function mc(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,f=0,g=0,v,b=e.type,D=b==="FeatureCollection",A=b==="Feature",x=D?e.features.length:1,E=0;E<x;E++){d=D?e.features[E].geometry:A?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var S=0;S<c;S++){var I=0,C=0;if(u=v?d.geometries[S]:d,u!==null){m=u.coordinates;var k=u.type;switch(f=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":if(t(m,g,E,I,C)===!1)return!1;g++,I++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,E,I,C)===!1)return!1;g++,k==="MultiPoint"&&I++}k==="LineString"&&I++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-f;i++){if(t(m[n][i],g,E,I,C)===!1)return!1;g++}k==="MultiLineString"&&I++,k==="Polygon"&&C++}k==="Polygon"&&I++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-f;a++){if(t(m[n][i][a],g,E,I,C)===!1)return!1;g++}C++}I++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(mc(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(mc,"coordEach");function vM(e,t,r,n){var i=r;return mc(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(vM,"coordReduce");function U6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(U6,"propEach");function xM(e,t,r){var n=r;return U6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(xM,"propReduce");function j6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(j6,"featureEach");function EM(e,t,r){var n=r;return j6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(EM,"featureReduce");function CM(e){var t=[];return mc(e,function(r){t.push(r)}),t}o(CM,"coordAll");function Qg(e,t){var r,n,i,a,u,c,m,d,f,g,v=0,b=e.type==="FeatureCollection",D=e.type==="Feature",A=b?e.features.length:1;for(r=0;r<A;r++){for(c=b?e.features[r].geometry:D?e.geometry:e,d=b?e.features[r].properties:D?e.properties:{},f=b?e.features[r].bbox:D?e.bbox:void 0,g=b?e.features[r].id:D?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,f,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,f,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,f,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(Qg,"geomEach");function IM(e,t,r){var n=r;return Qg(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(IM,"geomReduce");function Gd(e,t){Qg(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(Ir.feature(r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var f=r.coordinates[d],g={type:m,coordinates:f};if(t(Ir.feature(g,i),n,d)===!1)return!1}})}o(Gd,"flattenEach");function DM(e,t,r){var n=r;return Gd(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(DM,"flattenReduce");function z6(e,t){Gd(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,f=0;if(mc(r,function(g,v,b,D,A){if(c===void 0||n>m||D>d||A>f){c=g,m=n,d=D,f=A,a=0;return}var x=Ir.lineString([c,g],r.properties);if(t(x,n,i,A,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(z6,"segmentEach");function SM(e,t,r){var n=r,i=!1;return z6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(SM,"segmentReduce");function $6(e,t){if(!e)throw new Error("geojson is required");Gd(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(Ir.lineString(u[c],r.properties),n,i,c)===!1)return!1;break}}})}o($6,"lineEach");function wM(e,t,r){var n=r;return $6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(wM,"lineReduce");function AM(e,t){if(t=t||{},!Ir.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),Ir.lineString([m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),Ir.lineString([m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),Ir.lineString([m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),Ir.lineString([m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(AM,"findSegment");function FM(e,t){if(t=t||{},!Ir.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return Ir.point(m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),Ir.point(m[n],u,t);case"LineString":return a<0&&(a=m.length+a),Ir.point(m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),Ir.point(m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),Ir.point(m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),Ir.point(m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(FM,"findPoint");Wt.coordAll=CM;Wt.coordEach=mc;Wt.coordReduce=vM;Wt.featureEach=j6;Wt.featureReduce=EM;Wt.findPoint=FM;Wt.findSegment=AM;Wt.flattenEach=Gd;Wt.flattenReduce=DM;Wt.geomEach=Qg;Wt.geomReduce=IM;Wt.lineEach=$6;Wt.lineReduce=wM;Wt.propEach=U6;Wt.propReduce=xM;Wt.segmentEach=z6;Wt.segmentReduce=SM});var q6=fi(qe=>{"use strict";l();Object.defineProperty(qe,"__esModule",{value:!0});var $r=63710088e-1,ty={centimeters:$r*100,centimetres:$r*100,degrees:360/(2*Math.PI),feet:$r*3.28084,inches:$r*39.37,kilometers:$r/1e3,kilometres:$r/1e3,meters:$r,metres:$r,miles:$r/1609.344,millimeters:$r*1e3,millimetres:$r*1e3,nauticalmiles:$r/1852,radians:1,yards:$r*1.0936},ey={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function wo(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(wo,"feature");function OM(e,t,r={}){switch(e){case"Point":return ry(t).geometry;case"LineString":return iy(t).geometry;case"Polygon":return ny(t).geometry;case"MultiPoint":return V6(t).geometry;case"MultiLineString":return Z6(t).geometry;case"MultiPolygon":return W6(t).geometry;default:throw new Error(e+" is invalid")}}o(OM,"geometry");function ry(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Zd(e[0])||!Zd(e[1]))throw new Error("coordinates must contain numbers");return wo({type:"Point",coordinates:e},t,r)}o(ry,"point");function PM(e,t,r={}){return Vd(e.map(n=>ry(n,t)),r)}o(PM,"points");function ny(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let 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.")}return wo({type:"Polygon",coordinates:e},t,r)}o(ny,"polygon");function BM(e,t,r={}){return Vd(e.map(n=>ny(n,t)),r)}o(BM,"polygons");function iy(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return wo({type:"LineString",coordinates:e},t,r)}o(iy,"lineString");function MM(e,t,r={}){return Vd(e.map(n=>iy(n,t)),r)}o(MM,"lineStrings");function Vd(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o(Vd,"featureCollection");function Z6(e,t,r={}){return wo({type:"MultiLineString",coordinates:e},t,r)}o(Z6,"multiLineString");function V6(e,t,r={}){return wo({type:"MultiPoint",coordinates:e},t,r)}o(V6,"multiPoint");function W6(e,t,r={}){return wo({type:"MultiPolygon",coordinates:e},t,r)}o(W6,"multiPolygon");function TM(e,t,r={}){return wo({type:"GeometryCollection",geometries:e},t,r)}o(TM,"geometryCollection");function kM(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}o(kM,"round");function H6(e,t="kilometers"){let r=ty[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(H6,"radiansToLength");function oy(e,t="kilometers"){let r=ty[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(oy,"lengthToRadians");function _M(e,t){return K6(oy(e,t))}o(_M,"lengthToDegrees");function LM(e){let t=e%360;return t<0&&(t+=360),t}o(LM,"bearingToAzimuth");function RM(e){return e=e%360,e>180?e-360:e<-180?e+360:e}o(RM,"azimuthToBearing");function K6(e){return e%(2*Math.PI)*180/Math.PI}o(K6,"radiansToDegrees");function NM(e){return e%360*Math.PI/180}o(NM,"degreesToRadians");function UM(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return H6(oy(e,t),r)}o(UM,"convertLength");function jM(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=ey[t];if(!n)throw new Error("invalid original units");let i=ey[r];if(!i)throw new Error("invalid final units");return e/n*i}o(jM,"convertArea");function Zd(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(Zd,"isNumber");function zM(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}o(zM,"isObject");function $M(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!Zd(t))throw new Error("bbox must only contain numbers")})}o($M,"validateBBox");function GM(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}o(GM,"validateId");qe.areaFactors=ey;qe.azimuthToBearing=RM;qe.bearingToAzimuth=LM;qe.convertArea=jM;qe.convertLength=UM;qe.degreesToRadians=NM;qe.earthRadius=$r;qe.factors=ty;qe.feature=wo;qe.featureCollection=Vd;qe.geometry=OM;qe.geometryCollection=TM;qe.isNumber=Zd;qe.isObject=zM;qe.lengthToDegrees=_M;qe.lengthToRadians=oy;qe.lineString=iy;qe.lineStrings=MM;qe.multiLineString=Z6;qe.multiPoint=V6;qe.multiPolygon=W6;qe.point=ry;qe.points=PM;qe.polygon=ny;qe.polygons=BM;qe.radiansToDegrees=K6;qe.radiansToLength=H6;qe.round=kM;qe.validateBBox=$M;qe.validateId=GM});var eC=fi(Ht=>{"use strict";l();Object.defineProperty(Ht,"__esModule",{value:!0});var Dr=q6();function dc(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,f=0,g=0,v,b=e.type,D=b==="FeatureCollection",A=b==="Feature",x=D?e.features.length:1,E=0;E<x;E++){d=D?e.features[E].geometry:A?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var S=0;S<c;S++){var I=0,C=0;if(u=v?d.geometries[S]:d,u!==null){m=u.coordinates;var k=u.type;switch(f=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":if(t(m,g,E,I,C)===!1)return!1;g++,I++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,E,I,C)===!1)return!1;g++,k==="MultiPoint"&&I++}k==="LineString"&&I++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-f;i++){if(t(m[n][i],g,E,I,C)===!1)return!1;g++}k==="MultiLineString"&&I++,k==="Polygon"&&C++}k==="Polygon"&&I++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-f;a++){if(t(m[n][i][a],g,E,I,C)===!1)return!1;g++}C++}I++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(dc(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(dc,"coordEach");function ZM(e,t,r,n){var i=r;return dc(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(ZM,"coordReduce");function J6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(J6,"propEach");function VM(e,t,r){var n=r;return J6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(VM,"propReduce");function X6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(X6,"featureEach");function WM(e,t,r){var n=r;return X6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(WM,"featureReduce");function HM(e){var t=[];return dc(e,function(r){t.push(r)}),t}o(HM,"coordAll");function ay(e,t){var r,n,i,a,u,c,m,d,f,g,v=0,b=e.type==="FeatureCollection",D=e.type==="Feature",A=b?e.features.length:1;for(r=0;r<A;r++){for(c=b?e.features[r].geometry:D?e.geometry:e,d=b?e.features[r].properties:D?e.properties:{},f=b?e.features[r].bbox:D?e.bbox:void 0,g=b?e.features[r].id:D?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,f,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,f,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,f,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(ay,"geomEach");function KM(e,t,r){var n=r;return ay(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(KM,"geomReduce");function Wd(e,t){ay(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(Dr.feature.call(void 0,r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var f=r.coordinates[d],g={type:m,coordinates:f};if(t(Dr.feature.call(void 0,g,i),n,d)===!1)return!1}})}o(Wd,"flattenEach");function qM(e,t,r){var n=r;return Wd(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(qM,"flattenReduce");function Y6(e,t){Wd(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,f=0;if(dc(r,function(g,v,b,D,A){if(c===void 0||n>m||D>d||A>f){c=g,m=n,d=D,f=A,a=0;return}var x=Dr.lineString.call(void 0,[c,g],r.properties);if(t(x,n,i,A,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(Y6,"segmentEach");function JM(e,t,r){var n=r,i=!1;return Y6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(JM,"segmentReduce");function Q6(e,t){if(!e)throw new Error("geojson is required");Wd(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(Dr.lineString.call(void 0,u[c],r.properties),n,i,c)===!1)return!1;break}}})}o(Q6,"lineEach");function XM(e,t,r){var n=r;return Q6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(XM,"lineReduce");function YM(e,t){if(t=t||{},!Dr.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),Dr.lineString.call(void 0,[m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),Dr.lineString.call(void 0,[m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),Dr.lineString.call(void 0,[m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),Dr.lineString.call(void 0,[m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(YM,"findSegment");function QM(e,t){if(t=t||{},!Dr.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return Dr.point.call(void 0,m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),Dr.point.call(void 0,m[n],u,t);case"LineString":return a<0&&(a=m.length+a),Dr.point.call(void 0,m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),Dr.point.call(void 0,m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),Dr.point.call(void 0,m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),Dr.point.call(void 0,m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(QM,"findPoint");Ht.coordAll=HM;Ht.coordEach=dc;Ht.coordReduce=ZM;Ht.featureEach=X6;Ht.featureReduce=WM;Ht.findPoint=QM;Ht.findSegment=YM;Ht.flattenEach=Wd;Ht.flattenReduce=qM;Ht.geomEach=ay;Ht.geomReduce=KM;Ht.lineEach=Q6;Ht.lineReduce=XM;Ht.propEach=J6;Ht.propReduce=VM;Ht.segmentEach=Y6;Ht.segmentReduce=JM});var rC=fi(Hd=>{"use strict";l();Object.defineProperty(Hd,"__esModule",{value:!0});var eT=eC();function tC(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return eT.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}o(tC,"bbox");var tT=tC;Hd.bbox=tC;Hd.default=tT});var uC=fi((Lbe,uy)=>{l();var mi=T6(),iC=Yg(),oC=G6(),ku=rC().default,rT=oC.featureEach,kbe=oC.coordEach,_be=iC.polygon,nC=iC.featureCollection;function aC(e){var t=new mi(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:ku(r),mi.prototype.insert.call(this,r)},t.load=function(r){var n=[];return Array.isArray(r)?r.forEach(function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:ku(i),n.push(i)}):rT(r,function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:ku(i),n.push(i)}),mi.prototype.load.call(this,n)},t.remove=function(r,n){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:ku(r),mi.prototype.remove.call(this,r,n)},t.clear=function(){return mi.prototype.clear.call(this)},t.search=function(r){var n=mi.prototype.search.call(this,this.toBBox(r));return nC(n)},t.collides=function(r){return mi.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=mi.prototype.all.call(this);return nC(r)},t.toJSON=function(){return mi.prototype.toJSON.call(this)},t.fromJSON=function(r){return mi.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var n;if(r.bbox)n=r.bbox;else if(Array.isArray(r)&&r.length===4)n=r;else if(Array.isArray(r)&&r.length===6)n=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")n=ku(r);else if(r.type==="FeatureCollection")n=ku(r);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}o(aC,"geojsonRbush");uy.exports=aC;uy.exports.default=aC});l();import{MapView as MT}from"@mappedin/mappedin-js";l();l();l();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:o(function(){return this},"get"),configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var eb="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkICAgKCgkLDhcPDg0NDhwUFREXIh4jIyEeICAlKjUtJScyKCAgLj8vMjc5PDw8JC1CRkE6RjU7PDn/2wBDAQoKCg4MDhsPDxs5JiAmOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTn/wgARCAIABAADAREAAhEBAxEB/8QAGwABAAMBAQEBAAAAAAAAAAAAAAECAwQFBgf/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAP3EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAIAAAJAFAAAAAAAAAAAAAAAAAAAAAAAAABAgAAEgCgAAAAAAAAAAAAAAAAAAAABERLSM1zM4zXMzjMoUIqCCSSS8XNC9mpoaVomharWTQAAAAAAAAAAAAAAAAEREtIoZrnGZkucUKFStQQSTFixdNDStF0TWrmiWqbJoAAAAAAAAAAAAAIgiWkZy4HNLzHLXKcxzpzmFYmRkUKFSCCSSxcuampsbR0HSdK9R1R1HTZvWll0mlAAAAAAAAAAAIiKLnLjHNLynLXKcycxzmNYmJmUKFSCAWLFy5qamxvHQvSdJ0nVHUdFm1aparWKAjNWSKAAAAARBEtYzlyXnjmOSuM4U4q4jjOM5a5k5zAyMjOqFCCCCSSS5c0jU1NzoOk6pew7TtjuO1e0646jezWr2WSaUAAAAAECIqtZco55eY464zhTirhOI5Dks5jAwMTIzqhUqQASWLFzSNTY3Og6V646zsO2O47V7DrjqNzWy9nlZ1c0LlrLEk0EQQVipRczIyMU5q5F4U8+vOPOrgThOOuU5jAxMjMzKpUggigJiSSxY0XQ1Njc6TqjtO49CX0D0T0Y7l7E6JdzU1NEvViSalBAWIqVKLSMjIxOauM4U86vPPOrz04TjrkOYwMTIzKJQqQQCKmBJJYutzQ1Njc6TrOyO475fRPRPQjuXsToXWPn6kkkEkhCkEAgggqVMjlrzzzDy7PMPPrhOQ5jBMqoVIIIAAIAJAAJJJLFzWN16TsO49CPTPUl9Q9A6o1LFiSSSSQpCwQQCCCpVMjlrzzyzy7PMPPrhOM5kwM6zKlQQAAQASAASCxY0NI3XpOw7j0I9M9SX0z0DqjU+UqpQqVIBFgEyixJYuWLFDkrzE8o8yvOONOasipBAAAAAAAAAAABJJY2OiO1fQPUj1T0pewuVKlCCqQsBIUSSSSWLlyTM5K808pPLrzziTnrEqQQAAAAAAAAAAASSWNjojtX0D1I9VfSOuND4uzMzqhQqVIALEli5c1jUuQc1vnp5pwJzVmQQAAAAAAAAAAAAAASSaHTHevpHoHTFjMyM6zKlSpABJJcsaGkamhU5q88804E5qzIIAAAAAAAAAAAAAAJJNDpjvX0j0Dqix8dVDMolSpAqCYElixc0XU0IMjlTlrIqAAAAAAAAAAAAAAAAAWNTqjqXYGZkZpUoQQRSFIsSXLroaGhBkcqctZFQAAAAAAAAAAAAAAAACxqdUdS7EngWQCAAQASACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYFSCCAACCQACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYGIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAJABAAAAAAAAAJBILEli5Y0LlzQ0Lly5csWLAkgFSChUoUMyhmUMyhQqVKkEEAEAAAAAAAAAkEgsSWLljQuXNDQuXLlyxYsCSAVIKFShQzKGZQzKFCpUqQe+ZmZkUKFCpUEEAAkksWLFzQ0NTU2NzY3Og3NzoNzc2NjU1NS5csSAQVKmZmZGRiYmBgYHOYGBgYGBiZGRkUMypUqQCAASSWLFi5oaGpqbG5sbnQbm50G5ubGxqampcuWJAIIKGZmZGRiYmBgYHOYGBgYGR+jmBzmBzmJiZGZQoQQSSWLmhqbGxudB0nSdJ1HSdR1HSdJ0G5qamhcsWJJJBIIIBUqVKFDIyMDA5jmOU5TlOY5TmOc5znMTEyMyhQggFixc0NTY2NzoOk6TpOo6TqOo6TpOg3NTU0LlixJJIJBAIKkFChQyMjAwOY5jlOU5jnP00yMTnOc5zAwMjMoVIJJLmhqbmx0HQdBubmxqXLkkgAAAAAAAAAAAAAEEFTMzMTEwOc5znMDAyMyhUgkkuaGpsbnQdB0G5ubGpcuSSAAAAAAAAAAAAAAQQVKGZ1gAEEEEFSCACSSxJJJIAAAAAAAAAAAAAAAAAAAAAAABBBBBUggAkkksSSSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSSSSAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSWBIAAKFiQAAAAAAAAACCpUoUMzIyMzMzMyhQoVKkEEAgkEkklixYuXNDQ0NTQ1NC5cuWJAAAAAAAAAAIKlShQzMjIzMzMzKFChUqQQQCCQSSSWLFyxoXNDQ1NDU0LljUkkAAAAAAAAAAggggEEAgAAAAAAAAAAAAAEkgkkkkkAAAAAAAAAAgggggEAgAAAAAEgEAAAAAAEkgkkuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADyyCCCCCCCCAQASCSQWJJJJLEkkkkkgkkEgkAEgAAEAAgEAggEEEEEEEFSCCCCCCAQASCSQWJJJJLEkkkkkgkkEgEgEgAAEAAgEAggEEEEEH5AQQQQVBBAIAAJBIJJJLEkkkkliSSSSSQSSCQSAAAQAQQCCCCCCCCCpBBBBBUEEEAgAAkEgkkksSSSSSWJJJJJJBJIJBIAABABBAIIIIIIIIKg/LCAQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQAQQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQfPgAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/xAApEAAABQUBAQACAwACAwAAAAABAgQFFQMGERQWEhNAUAAgMGCAkKCw/9oACAEBAAECAP8AwTZznOf3mc5/YZE41xVivFyM6i7C8C8C8zMzMzMyDyDyDyDwV4K7ldSuZV5VgVwqZ/SCca4qxXmcjOouwvAvEzMzMzMzMyDyDyDwV4K7ldSuRVwKgrgf88TDWMrO4VHOo61Hao7ndzvB3k7yZ5M8i8i8zMzMzMyDyDyDyV5K8keSPJHmm8U3em70nam603Mi8qotUDfk5GqZUdfUc6jrUdqjvUeDvB3kzyZ5M8i8i8zMzMzMzMg8g8leSvJHkjyR5pvFN4pu9N2pOtNzIvKqLWA39PX+/saplJlh1tRfVcKrlVdKrrVdqrvVdzu53Y7sZ2M6mdRdRdBdJSUk5SUB0B0B1K6kdSOxHam7Unek70nei7UXWi6UXKk40l9NaRWWuB8/75E41zKjraq+q41nOq6VXas7VXeq71Hc7ud2O7GdRdRdZQXSUlJSUlAdCugOpXUjqR2I7U3em70nek70nai60XSk5UnGkvItIrKoCsC0FwLgXAuBbube3ubm7uiuFcZcZaZYdZUWVl1dwruVdzrulZ0qulVzqOR3EzgZeZcZcK0Vm3t7W1tbW1tgrBYC0q0q4q8jgRxpuVJzoulB0oOlBzoOVBworqa0iwi0i0q4FwLQWAr2trZ2trb3RWiuFcZaZadbUW1l1ZwruVd0rulZ0qulVzqOR3E7gZeZeK4VorNzb29ra2tsFe2CwFpVxVxV5HAjjTcqTnRdKDpQdKDnQcqDhRXU1pFhVm/ISUnKSkrLSsrKyspJyUhvitOtrLq69Q4qHGu41nGqvqLjrDKhUDW+nv1nP+Oc+vYVArFUEVEWUl1FfQcU7imckzinX0VxFoLgXyMlJykrLS0tLS0rKSclI74rjraq6uvUuKhxruNdxqr6i46wysVA1vp79Zz/AI5z6A4VArFUEVkWUl1FfQcU7imcUzinX0VxFoLZKTlJWVlpaXl5eWlpWUB0BzBxkDr669SvUr666stqqz1xqes/j5AxahFFJXRWp1yZemX0F5HCQkpOUlZaWlpeXl5aWB2lQdAcwcZE7hWcFLgpXqF1ZbVVnUDU9Z/HyBi1CV6SuitTrky9MvoLyL5AXEXEXIXIXKSkpKSkpIHIHIHIrkVxK4yJnCsvrra6uqpPVE354GJVpKaCtOtoryuEiZxM5C5C5C5SUnJSclJSQOQORXIrkVxBxM4VV9dbXV1VJ6om/PAxKtFTQVp1tFeRwkRWitFYKvb2tra2draBUCsFgLCrSrQWitOsqqT1RN+jAxKtJTTWFWitMtMtFYKzb29ra2tnaBUCsFZVhVpVoLRWnWVFJ6om/RgYlWkpprAW73v36zn++c+gOFQKv1GoJv04GCp9Rq/T36zn++c+gOFT7fUagm/TgYKn1+3/AKEeMefHjx8/n8vl8vn8/Hjx5xj9bjHnx48fP5/L5fL5/Px48ecY/wAvOPxceQIFIKIJgSAiBAVuK2FaitINAM4MwMwMsJCQkJCQkJCwosws4tAtItQtgtot4oRSCm+Hy8ecfi48gQKQUQTAkBECArcVsK1FaQaAZwZgZgZYSEhISEhISFhRZhZxaBaRahbBbRbxQikFN8BpfMWgWozWLaLcKAUWpq62vr/DX19YEoJARAhBvK2laytRGgjORlIyEYiMJLfJbxLdJbhLbJbRLaJbJbZLbAWxzHMcxzHMcxzHMDbBrYNbJraNbRrbPbh7dPbx7fOwHYjsZ2UzMZoM0maxbRbhQCi1NXW19fX19fW1QSAiBCDeVtK1laiNBGYjKRkIxEYSW+S3iW6S3CW2S2iW0S2S2yW2AtgLY5jmOY5jmOY5gbYNbJrZNbRraPbZ7cPbp7ePb52A7EdjOymZjW4e3D26e3j2+ZgMwmYhYxY4SEhISEBjKxlYiMJGAjAS3iW9TtynblO26dtUrap2zTtmnbNO2SW2S3isRWYGkG0EAItTW1/h8Phr6+rp6AtwtQs5mI9vntw9tHtk9s1LZqWzUto9tnts9uHt09vHt8zAZhMxCxixwkJCQkIDGVjKxEYSMBGAlvEt6nblO3Kdt0rap21TtmnbNO2SWyS2yW8ViKzA1A2ggBFqa2v8Ph8NfW1dPRFuFqMzGYjW+e3D20e2T2zUtk9tHto1tCzHYj2+e3T24e3D24a3DW4Nuc5znOc4FuBbhbcLbhLcJblO3CW4S3iMRGcrYVECcKYB+cJBoCjM2maDsZ7fPbp7cPbh7cNbhrcG3Oc5znOcC3C24W3C24S3CW5TtwluEt4jERnK2FRAnCmAfnCQaAoxb/7ePl8NbU09PT1NYKHy8Y/ZePl8NbU09PT1NYKHy8Y/4Z6+g1tjb3d+Rk5SVlZWVlZSTkd8Fu3s/b6es/pvX0Gtsbe7vyMnKSkrKysrKSciC8Fu3s/YKnrP9gqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqoqsqsqoFIVwqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqkqsqsqsFIV/Hn8XHj5/H4a+traurq6mpqampqampqampqampqampqampqamrq62tr/D4/Lx5/Fx4+fx+Gvra2rq6upqampqampqamrq6upqampqampqamrq6utra/w+Py/wCgEzNTc5OTs7PT09PT8/Pz09PT07Ozk3Ng9TMxLy0rKSclJSMhIb+9vbu9u7u7u7u7u729vb2/vyEjJSUnKSstLzEzNTc5OTs7Oz09PT8/Pz09PT07Ozk5NzUzMS8tKyknJSUjISG/v727vbu7u7u7u7u9u729v78hIyUlJykrLS8x0nR9H0fR9H0XRdF0XRdD0PQ9F0XRdF0XRdF0fR9H0nSdJ0vS9L0vTdN03TdP0/T9P0/T9P0/T9P0/T9R0/T9P0/T9P0/TdN03S9L0vS9J0nSdJ0fR9H0XRdF0PRdD0PQ9D0PRdF0XRdF0XR9H0fSdJ0nS9L0vS9N03TdN0/T9P0/T9P0/T9P0/T9P1HT9P0/T9P0/T9N03TdL0vS9L0vSS8tLy0tLS0rKysrKysrKysrKystLS0vLS8vLy8vMTExMTExMzMzMTMzMzM1NTUzMzMzMzMzMzExMTExMS8vLy8vLy8tKy0tKysrKysrKysrKysrLS0tLy0vLy8vLzExMTExMTMzMzEzMzMzNTU1MzMzMzMzMzMxMTExMTEvLy8vnOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5znOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5z/9YD//xAArEAEAAgIDAQABBAICAQUAAAAAAVICYgNRYQRBEEBQUzFCIDARYICQoLD/2gAIAQEAAz8A/wDgmhCEI/nYQj+RhjH5ccflxw44YMe0dtmzZs2bNmzZs2bIsjtiwlxy45/Ljn8se0fwuPbjj8uOPy44YQxR2izZs2bNmzZs2bNkWR2xYS45cc/lhP5Y9/wEQwj8sIRD1s2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNmyLMZYZMZ/KJ/dRDCPywhjCI/LZs2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNkWYywlhP5RP/ABj9hDGGMIh69bNmzZs2bNmzZsmybJsmybJsmybJsmybJsmybJs2bNmzZs2bNmzZ7+mMsZYyj9hDGGMIj9NmzZs2bNmzZs2bJsmybJsmybJs2TZNk2TZNk2bJs2bNmzZs2bNmzZ6iWMsXr16hiwYMGDBgwYo/T169/T162bNmzZs2TZNk2T2ntPae09pSlKUpSlPae09p7T2mybJsmzZs2bNmz17+nr16hiwYOPtx9uPtx9sO2DBih69evXr1s2bNmzZsmybJsmye09p7T2lKUpSlKU9p7T2ntNk2TZNmzZs2bNmz17+vr1s2bNmzZs2bNmzZs2evXr169bNmye09p7SlKUp/wC6UpSlKe09p7etmzZs9evWzZs2bNmzZs2bNmzZs2bPXr1s9bNmye09p7SlKUp/7pSlKUp7T29bPWz169evWzZs2bNmzZs2bNmzZs2bNmzZs2evU9plM/vJhMJ7T29bNnrZ62bNmzZs2bNmzZs2bNmzZs2bNnr39J7TKZ/eTCYT3+nr162bNnrZs2bJsntNk2TZPabNmzZs2etnr39JlM/wUwmP09etmzZs2bNk2TZNk2TZNk2bNmzZs2bNnv6TKZ/gphMfp69etk9p7T2ntKUpSlKUp7T2nt69e/pMpn+GmH/j9PXr1Pae09pSySlklKU9p7T29evf0mUz/DTCY/T16lP/AHSlKU/xUpSlP/dKUpT/ABUpT/8AQllKWTJl0y6ZdMumXTLpl0y6ZJSn+QlKWTJl0y6ZdMumXTLpl0y6ZJSn/sn9xKWXTLpn0z6Z9M+mXTLplVlVlVlVlVlVlVlVlVlVlRlVlVlRlVlVlVlVlVlVlVl0z6Z9M4/DPpn0z6ZdMkp/byll0y6Z9M+mfTPpn0y6ZVZVZVZVZVZVZVZVZUZVZUZVZVZVZVZVZVZVZVZVZVZdM+mfTOPwz6Z9M+mTJlVlVlVl0yZ9M2fTPpn0z6Z9M+mbPpn0z6Z9M2fTPpl0yqyqyqyqyqyomiaJomiaJomiaJomjRo0aNGjRo0aNGjRNE0TRNE0TRNE0TRNE0ZVZVZVZVZVZVZM+mbPpn0z6Z9M+mfTNn0z6Z9M+mfTPpl0y6ZVZVZVTVlVlRNE0TRlRNE0TRNE0TRo0aNGjRo0aNGjRomiaJomiaJomiaJomqaJqyq0TRNE0TRNE0TVNE1TVNU1TRNE1TVNU0TRNE0TRNGjRo0aNGjRhWHFHTgh88Pmj8Pnj/V89HBRwf1w4f64cNMXFSHFTFxUxcVIcP9cOGkOCkPno+ej55/D55cEuKemHUIo0aNGjRo0TRNE0TRNE0TVNE0TVNE1TVNE1TRNU0TRNE0TRNGjRo0aNGjRhWHFHThh88Pnj8Pnq+ejgo4P64cP9cOKkOKkOKmLipi4aYuH+uHBSHBSHz0fPR88/h88uCXFNWHUIo0aNGjRo4ZcU9MOoRRFGjRo0aNGjRo0aNGjRo0RRhVxR04IcGP4cGP+jij/GEMI/xjCP3+M/5xhxT/AJwhwT/o4Mv9XBk4p6YdQiiKNGjRo0aNGjRo0aNGjRoijGsOKOnBi4Mfw4I/0cUf4whhH+MYR+/xn/OMOKf84Q4J/wBHBP8Ar/zxrDCsOKkOKjhq4auGrhq4auGjipDjpDGsI/k8awwrDipDio4aOGrhq4auGrho4qQ46QxrCP8A0bHcMLQ47w4rw4buCzgs4O3A4HA4XA4HA4HA4O3BZwWcN3Fdx3hhaGNoR/Dx3DC0OO8OK8OG7gs4LODtwOBwOFwOBwOBwODtwWcFnDdxXcd4YWhjaEf88UftoQh4y6ZuRyuVzOZzeudz+uf1z+uf1z+uf1z+uf1zuf1z+uf1z+uf1z+udzR25nM5o7c3rlcrlZsniOkSj9tCEPGXTNyuVy+uZzOb1z+uf1z+uf1z+uf1z+uf1z+udz+uf1z+uf1z+uf1z+ueO3O5nM5vXK5XKzZPEdMUftoYsemHTDpx9OPpxVcVXDVw1cNXDVw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDVw1cNXFVxVcVXFVx9OPph0w6Yo/bQxY9MOnH04+nH04quKrhq4auGrhq4aOGjho4aOGjho4aOGkOGkOGkOGjho4aOGjho4aOGjhq4auGriq4quKriq4+nH0w6Ydf+wHgcLhcLicTjYdww7hh3DDuGPcMe4Y9ww7hh3DDuGHcONxuJxOFwuBwOB8753z2fPZ89nz3fNd893zXfPd893z3fP/Y+e757uC75/wCyHz/2Q+f+yHBd893z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDgcLhcLicTjYdww7hh3DDuGHcMe4Ydww7hh3DDuGHcONxuJxOFwuBwPnfO+d89nz2fPZ893zXfPd813z3fPd893z/2Pnu+e7gu+f8Ash8/9kPn/shwXcF3z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDdu3bt03bt26bpum6bpum6bt27du3bt26bt26bpum6bpum6bpum6bt03TdN26bpum6bpum7dN03TdN03TdN03TdN03Tdum7dum7dN27dum6bpum6bpum6bpum7du3bt03bpu3bpum6bpum6bpum6bpu3TdN03bpum6bpum6bt03TdN03TdN03TdN03TdN03TduysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysmzKzKzKybMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrJT+2lKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSn9tKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpT/wDrA//EAB0RAAMBAAMBAQEAAAAAAAAAAAABERIwQFAgkMD/2gAIAQIBAT8A/COlKioqKioqKi+zSoqKioqL59Ro0aKyvpVlZWaNFXiVGkaNFZWV9CsrNGjRpFXepo0V8c69Zo0u1pGilfVnJWaNF+NFXNUaNFfmU0aReamkaNPzNM19VlZWaKysrK/XrKzTNGjRWaKyv+u0/8QAHREBAQACAQUAAAAAAAAAAAAAEQBAUCAQITCQwP/aAAgBAwEBPwD1NkRER07eYiIiNMRERGARERGgIiNAREZRERoCIjiYBERqiIwiI1REcCIiIiIjbkREREREfXZ//9k=";l();l();var ZC=!1;function tb(){return ZC}o(tb,"isTestMode");var Wp=class Wp{constructor(t){h(this,"backgroundAlpha",1);h(this,"backgroundColor",new Ot);h(this,"width",0);h(this,"height",0);h(this,"options",{});h(this,"renderer");h(this,"enabledLayers",new Set([0,1]));h(this,"matricesUpdatedThisFrame",!1);h(this,"handleWebGLContextCreationError",o(t=>{var r,n;(n=(r=this.options).onWebGLContextCreationError)==null||n.call(r,t)},"handleWebGLContextCreationError"));h(this,"handleWebGLContextLost",o(t=>{var r,n;(n=(r=this.options).onWebGLContextLost)==null||n.call(r,t)},"handleWebGLContextLost"));h(this,"handleWebGLContextRestored",o(t=>{var r,n;(n=(r=this.options).onWebGLContextRestored)==null||n.call(r,t)},"handleWebGLContextRestored"));var r,n,i,a,u;try{this.options=t,tb()?(this.renderer={setSize:o(()=>{},"setSize"),state:{reset:o(()=>{},"reset")},properties:{get:o(()=>{},"get")},getSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getSize"),getDrawingBufferSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getDrawingBufferSize"),getClearAlpha:o(()=>1,"getClearAlpha"),getClearColor:o(()=>new Ot,"getClearColor"),autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:o(()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),"getContext"),readRenderTargetPixelsAsync:o(()=>Promise.resolve([]),"readRenderTargetPixelsAsync"),setRenderTarget:o(()=>{},"setRenderTarget"),setClearColor:o(()=>{},"setClearColor"),clear:o(()=>{},"clear"),render:o(()=>{},"render"),clearStencil:o(()=>{},"clearStencil"),clearDepth:o(()=>{},"clearDepth"),domElement:document.createElement("canvas"),capabilities:{isWebGL2:!0}},this.renderer.domElement.style.width="1920px",Object.defineProperty(this.renderer.domElement,"clientWidth",{value:1920}),this.renderer.domElement.style.height="1080px",Object.defineProperty(this.renderer.domElement,"clientHeight",{value:1080})):(this.renderer=new Qy({canvas:t.canvas,alpha:t.alpha||!1,stencil:!0,antialias:typeof t.antialias=="boolean"?t.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new Ot((r=t.backgroundColor)!=null?r:"#ffffff"),this.backgroundAlpha=(n=t.backgroundAlpha)!=null?n:1}catch(c){Se.error(c),t.onWebGLRendererError&&t.onWebGLRendererError(c)}(i=this.domElement())==null||i.addEventListener("webglcontextlost",this.handleWebGLContextLost),(a=this.domElement())==null||a.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(u=this.domElement())==null||u.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var t,r,n,i,a;this.renderer&&((r=(t=this.renderer).dispose)==null||r.call(t)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}startFrame(){this.matricesUpdatedThisFrame=!1}updateMatricesIfNeeded(t){this.matricesUpdatedThisFrame||(t.updateMatrixWorld(),this.matricesUpdatedThisFrame=!0)}renderScene(t,r){this.renderer&&(this.updateMatricesIfNeeded(t),this.renderer.render(t,r))}renderFullScene(t,r){if(this.renderer){this.renderer.state.reset(),this.updateMatricesIfNeeded(t),this.renderer.clearStencil(),this.renderer.setRenderTarget(null),r.layers.disableAll(),this.renderer.autoClear=!1,r.layers.enable(Jt.MASKS),this.renderer.render(t,r),r.layers.disableAll();for(let n of this.enabledLayers.values())r.layers.enable(n);this.renderer.render(t,r),this.renderer.clearDepth(),r.layers.disableAll(),r.layers.enable(Jt.ALWAYS_ON_TOP_PATHS),this.renderer.render(t,r),this.renderer.clearStencil(),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){y.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};o(Wp,"Renderer");var al=Wp;l();l();var rb='"use strict";(()=>{var Ya=Object.defineProperty,fs=Object.defineProperties;var ps=Object.getOwnPropertyDescriptors;var qa=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,vs=Object.prototype.propertyIsEnumerable;var Mr=(e,r,n)=>r in e?Ya(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,m=(e,r)=>{for(var n in r||(r={}))gs.call(r,n)&&Mr(e,n,r[n]);if(qa)for(var n of qa(r))vs.call(r,n)&&Mr(e,n,r[n]);return e},z=(e,r)=>fs(e,ps(r));var _e=(e,r)=>{for(var n in r)Ya(e,n,{get:r[n],enumerable:!0})};var M=(e,r,n)=>Mr(e,typeof r!="symbol"?r+"":r,n);function Qa(e,r){return r.x+r.w<e.x+e.w&&r.x>e.x&&r.y>e.y&&r.y+r.h<e.y+e.h}function Ha(e,r){let[n,i]=r;return n>=e.x&&n<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}function eu(e,r){let n=r.x,i=r.y,t=r.x+r.w,o=r.y+r.h,u=e.x,s=e.y,c=e.x+e.w,a=e.y+e.h;return n<c&&u<t&&i<a&&s<o}function ue(e,r){for(let n=0;n<r.length;n++)e.push(r[n])}var E=class{constructor(r,n,i,t,o){M(this,"x");M(this,"y");M(this,"w");M(this,"h");M(this,"userData");this.userData=typeof o>"u"?null:o,this.x=r,this.y=n,this.w=i,this.h=t}contains(r){return r===this?!1:Qa(this,r)}intersects(r){return eu(this,r)}intersectsPoint(r){return Ha(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var Me=class e{constructor(r,n){M(this,"topLeft");M(this,"topRight");M(this,"bottomLeft");M(this,"bottomRight");M(this,"divided",!1);M(this,"boundary");M(this,"capacity",16);M(this,"objects",[]);M(this,"parent");this.parent=n,this.boundary=r}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:r,y:n,w:i,h:t}=this.boundary;this.topLeft=new e(new E(r,n,i/2,t/2),this),this.topRight=new e(new E(r+i/2,n,i/2,t/2),this),this.bottomLeft=new e(new E(r,n+t/2,i/2,t/2),this),this.bottomRight=new e(new E(r+i/2,n+t/2,i/2,t/2),this),this.divided=!0}queryRect(r){let n=[];if(this.boundary.intersects(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryRect(r)),ue(n,this.topRight.queryRect(r)),ue(n,this.bottomLeft.queryRect(r)),ue(n,this.bottomRight.queryRect(r))),n}queryPoint(r){let n=[];if(this.boundary.intersectsPoint(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryPoint(r)),ue(n,this.topRight.queryPoint(r)),ue(n,this.bottomLeft.queryPoint(r)),ue(n,this.bottomRight.queryPoint(r))),n}insert(r){return(this.parent?!this.boundary.contains(r):!this.boundary.intersects(r))?!1:this.objects.length<this.capacity?(this.objects.push(r),!0):(this.divided||this.subdivide(),(this.topLeft.insert(r)||this.topRight.insert(r)||this.bottomLeft.insert(r)||this.bottomRight.insert(r))===!1&&this.objects.push(r),!0)}drawObjects(r){this.objects.forEach(n=>n.draw(r)),this.divided&&(this.topLeft.drawObjects(r),this.topRight.drawObjects(r),this.bottomLeft.drawObjects(r),this.bottomRight.drawObjects(r))}draw(r){r.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(r),this.topRight.draw(r),this.bottomLeft.draw(r),this.bottomRight.draw(r)),r.strokeStyle="black",r.lineWidth=4,r.stroke()}};var Fe={};_e(Fe,{$brand:()=>Pt,$input:()=>so,$output:()=>co,NEVER:()=>Br,TimePrecision:()=>fo,ZodAny:()=>Oc,ZodArray:()=>Zc,ZodBase64:()=>Ua,ZodBase64URL:()=>Na,ZodBigInt:()=>Ot,ZodBigIntFormat:()=>Ta,ZodBoolean:()=>jt,ZodCIDRv4:()=>Oa,ZodCIDRv6:()=>Pa,ZodCUID:()=>xa,ZodCUID2:()=>ka,ZodCatch:()=>Qc,ZodCodec:()=>Ba,ZodCustom:()=>Ar,ZodCustomStringFormat:()=>wt,ZodDate:()=>Dr,ZodDefault:()=>Kc,ZodDiscriminatedUnion:()=>Dc,ZodE164:()=>Za,ZodEmail:()=>ba,ZodEmoji:()=>_a,ZodEnum:()=>zt,ZodError:()=>Bd,ZodFile:()=>Jc,ZodFirstPartyTypeKind:()=>Ka,ZodFunction:()=>us,ZodGUID:()=>Or,ZodIPv4:()=>Sa,ZodIPv6:()=>ja,ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,ZodIntersection:()=>Tc,ZodIssueCode:()=>rf,ZodJWT:()=>Da,ZodKSUID:()=>wa,ZodLazy:()=>is,ZodLiteral:()=>Fc,ZodMap:()=>Cc,ZodNaN:()=>es,ZodNanoID:()=>ya,ZodNever:()=>Uc,ZodNonOptional:()=>Ja,ZodNull:()=>Sc,ZodNullable:()=>Bc,ZodNumber:()=>St,ZodNumberFormat:()=>Ve,ZodObject:()=>Er,ZodOptional:()=>Fa,ZodPipe:()=>Ma,ZodPrefault:()=>Wc,ZodPromise:()=>as,ZodReadonly:()=>ts,ZodRealError:()=>X,ZodRecord:()=>La,ZodSet:()=>Vc,ZodString:()=>It,ZodStringFormat:()=>A,ZodSuccess:()=>Yc,ZodSymbol:()=>Ic,ZodTemplateLiteral:()=>ns,ZodTransform:()=>Mc,ZodTuple:()=>Ac,ZodType:()=>U,ZodULID:()=>za,ZodURL:()=>Zr,ZodUUID:()=>de,ZodUndefined:()=>wc,ZodUnion:()=>Aa,ZodUnknown:()=>Pc,ZodVoid:()=>Nc,ZodXID:()=>Ia,_ZodString:()=>$a,_default:()=>Gc,_function:()=>Xm,any:()=>Om,array:()=>Tr,base64:()=>mm,base64url:()=>fm,bigint:()=>zm,boolean:()=>zc,catch:()=>Hc,check:()=>qm,cidrv4:()=>lm,cidrv6:()=>dm,clone:()=>K,codec:()=>Km,coerce:()=>Rr,config:()=>L,core:()=>ae,cuid:()=>nm,cuid2:()=>im,custom:()=>Ym,date:()=>Um,decode:()=>sa,decodeAsync:()=>da,discriminatedUnion:()=>Em,e164:()=>pm,email:()=>Gd,emoji:()=>tm,encode:()=>ca,encodeAsync:()=>la,endsWith:()=>vt,enum:()=>Ca,file:()=>Fm,flattenError:()=>He,float32:()=>_m,float64:()=>ym,formatError:()=>et,function:()=>Xm,getErrorMap:()=>of,globalRegistry:()=>oe,gt:()=>se,gte:()=>W,guid:()=>Wd,hash:()=>bm,hex:()=>$m,hostname:()=>hm,httpUrl:()=>em,includes:()=>pt,instanceof:()=>Qm,int:()=>ha,int32:()=>xm,int64:()=>Im,intersection:()=>Ec,ipv4:()=>cm,ipv6:()=>sm,iso:()=>kt,json:()=>ef,jwt:()=>gm,keyof:()=>Nm,ksuid:()=>um,lazy:()=>os,length:()=>Re,literal:()=>Vm,locales:()=>ze,looseObject:()=>Tm,lowercase:()=>mt,lt:()=>ce,lte:()=>H,map:()=>Rm,maxLength:()=>Ae,maxSize:()=>Ee,mime:()=>ht,minLength:()=>$e,minSize:()=>we,multipleOf:()=>Ie,nan:()=>Bm,nanoid:()=>rm,nativeEnum:()=>Cm,negative:()=>Fo,never:()=>Ea,nonnegative:()=>Mo,nonoptional:()=>qc,nonpositive:()=>Jo,normalize:()=>$t,null:()=>jc,nullable:()=>Ur,nullish:()=>Jm,number:()=>kc,object:()=>Zm,optional:()=>Pr,overwrite:()=>le,parse:()=>ia,parseAsync:()=>oa,partialRecord:()=>Am,pipe:()=>Nr,positive:()=>Vo,prefault:()=>Xc,preprocess:()=>tf,prettifyError:()=>rn,promise:()=>Wm,property:()=>Bo,readonly:()=>rs,record:()=>Lc,refine:()=>cs,regex:()=>dt,regexes:()=>Q,registry:()=>ir,safeDecode:()=>fa,safeDecodeAsync:()=>ga,safeEncode:()=>ma,safeEncodeAsync:()=>pa,safeParse:()=>aa,safeParseAsync:()=>ua,set:()=>Lm,setErrorMap:()=>nf,size:()=>lt,startsWith:()=>gt,strictObject:()=>Dm,string:()=>va,stringFormat:()=>vm,stringbool:()=>Hm,success:()=>Mm,superRefine:()=>ss,symbol:()=>Sm,templateLiteral:()=>Gm,toJSONSchema:()=>Qo,toLowerCase:()=>_t,toUpperCase:()=>yt,transform:()=>Va,treeifyError:()=>tn,trim:()=>bt,tuple:()=>Rc,uint32:()=>km,uint64:()=>wm,ulid:()=>om,undefined:()=>jm,union:()=>Ra,unknown:()=>Ce,uppercase:()=>ft,url:()=>Hd,util:()=>_,uuid:()=>Xd,uuidv4:()=>qd,uuidv6:()=>Yd,uuidv7:()=>Qd,void:()=>Pm,xid:()=>am});var ae={};_e(ae,{$ZodAny:()=>Ui,$ZodArray:()=>Ei,$ZodAsyncError:()=>te,$ZodBase64:()=>yi,$ZodBase64URL:()=>xi,$ZodBigInt:()=>Qt,$ZodBigIntFormat:()=>Si,$ZodBoolean:()=>it,$ZodCIDRv4:()=>$i,$ZodCIDRv6:()=>bi,$ZodCUID:()=>ui,$ZodCUID2:()=>ci,$ZodCatch:()=>Hi,$ZodCheck:()=>R,$ZodCheckBigIntFormat:()=>An,$ZodCheckEndsWith:()=>Xn,$ZodCheckGreaterThan:()=>Bt,$ZodCheckIncludes:()=>Gn,$ZodCheckLengthEquals:()=>Jn,$ZodCheckLessThan:()=>Mt,$ZodCheckLowerCase:()=>Bn,$ZodCheckMaxLength:()=>Vn,$ZodCheckMaxSize:()=>Rn,$ZodCheckMimeType:()=>Yn,$ZodCheckMinLength:()=>Fn,$ZodCheckMinSize:()=>Ln,$ZodCheckMultipleOf:()=>Tn,$ZodCheckNumberFormat:()=>En,$ZodCheckOverwrite:()=>Qn,$ZodCheckProperty:()=>qn,$ZodCheckRegex:()=>Mn,$ZodCheckSizeEquals:()=>Cn,$ZodCheckStartsWith:()=>Wn,$ZodCheckStringFormat:()=>De,$ZodCheckUpperCase:()=>Kn,$ZodCodec:()=>ot,$ZodCustom:()=>uo,$ZodCustomStringFormat:()=>Ii,$ZodDate:()=>Ti,$ZodDefault:()=>Xi,$ZodDiscriminatedUnion:()=>Ri,$ZodE164:()=>ki,$ZodEmail:()=>ni,$ZodEmoji:()=>oi,$ZodEncodeError:()=>me,$ZodEnum:()=>Ji,$ZodError:()=>Qe,$ZodFile:()=>Bi,$ZodFunction:()=>io,$ZodGUID:()=>ti,$ZodIPv4:()=>vi,$ZodIPv6:()=>hi,$ZodISODate:()=>fi,$ZodISODateTime:()=>mi,$ZodISODuration:()=>gi,$ZodISOTime:()=>pi,$ZodIntersection:()=>Li,$ZodJWT:()=>zi,$ZodKSUID:()=>di,$ZodLazy:()=>ao,$ZodLiteral:()=>Mi,$ZodMap:()=>Vi,$ZodNaN:()=>eo,$ZodNanoID:()=>ai,$ZodNever:()=>Zi,$ZodNonOptional:()=>Yi,$ZodNull:()=>Pi,$ZodNullable:()=>Wi,$ZodNumber:()=>Yt,$ZodNumberFormat:()=>wi,$ZodObject:()=>wu,$ZodObjectJIT:()=>Ai,$ZodOptional:()=>Gi,$ZodPipe:()=>to,$ZodPrefault:()=>qi,$ZodPromise:()=>oo,$ZodReadonly:()=>ro,$ZodRealError:()=>G,$ZodRecord:()=>Ci,$ZodRegistry:()=>Te,$ZodSet:()=>Fi,$ZodString:()=>ke,$ZodStringFormat:()=>T,$ZodSuccess:()=>Qi,$ZodSymbol:()=>ji,$ZodTemplateLiteral:()=>no,$ZodTransform:()=>Ki,$ZodTuple:()=>er,$ZodType:()=>O,$ZodULID:()=>si,$ZodURL:()=>ii,$ZodUUID:()=>ri,$ZodUndefined:()=>Oi,$ZodUnion:()=>Ht,$ZodUnknown:()=>Ni,$ZodVoid:()=>Di,$ZodXID:()=>li,$brand:()=>Pt,$constructor:()=>d,$input:()=>so,$output:()=>co,Doc:()=>nt,JSONSchema:()=>Ho,JSONSchemaGenerator:()=>xt,NEVER:()=>Br,TimePrecision:()=>fo,_any:()=>Do,_array:()=>Ko,_base64:()=>yr,_base64url:()=>xr,_bigint:()=>So,_boolean:()=>Io,_catch:()=>Rd,_check:()=>_c,_cidrv4:()=>br,_cidrv6:()=>_r,_coercedBigint:()=>jo,_coercedBoolean:()=>wo,_coercedDate:()=>Lo,_coercedNumber:()=>bo,_coercedString:()=>mo,_cuid:()=>mr,_cuid2:()=>fr,_custom:()=>Wo,_date:()=>Ro,_decode:()=>Et,_decodeAsync:()=>Rt,_default:()=>Td,_discriminatedUnion:()=>kd,_e164:()=>kr,_email:()=>or,_emoji:()=>lr,_encode:()=>Tt,_encodeAsync:()=>At,_endsWith:()=>vt,_enum:()=>Od,_file:()=>Go,_float32:()=>yo,_float64:()=>xo,_gt:()=>se,_gte:()=>W,_guid:()=>ct,_includes:()=>pt,_int:()=>_o,_int32:()=>ko,_int64:()=>Oo,_intersection:()=>zd,_ipv4:()=>hr,_ipv6:()=>$r,_isoDate:()=>go,_isoDateTime:()=>po,_isoDuration:()=>ho,_isoTime:()=>vo,_jwt:()=>zr,_ksuid:()=>vr,_lazy:()=>Fd,_length:()=>Re,_literal:()=>Ud,_lowercase:()=>mt,_lt:()=>ce,_lte:()=>H,_map:()=>Sd,_max:()=>H,_maxLength:()=>Ae,_maxSize:()=>Ee,_mime:()=>ht,_min:()=>W,_minLength:()=>$e,_minSize:()=>we,_multipleOf:()=>Ie,_nan:()=>Co,_nanoid:()=>dr,_nativeEnum:()=>Pd,_negative:()=>Fo,_never:()=>Eo,_nonnegative:()=>Mo,_nonoptional:()=>Ed,_nonpositive:()=>Jo,_normalize:()=>$t,_null:()=>Zo,_nullable:()=>Dd,_number:()=>$o,_optional:()=>Zd,_overwrite:()=>le,_parse:()=>Pe,_parseAsync:()=>Ue,_pipe:()=>Ld,_positive:()=>Vo,_promise:()=>Jd,_property:()=>Bo,_readonly:()=>Cd,_record:()=>wd,_refine:()=>Xo,_regex:()=>dt,_safeDecode:()=>Ct,_safeDecodeAsync:()=>Ft,_safeEncode:()=>Lt,_safeEncodeAsync:()=>Vt,_safeParse:()=>Ne,_safeParseAsync:()=>Ze,_set:()=>jd,_size:()=>lt,_startsWith:()=>gt,_string:()=>lo,_stringFormat:()=>Le,_stringbool:()=>Yo,_success:()=>Ad,_superRefine:()=>qo,_symbol:()=>Uo,_templateLiteral:()=>Vd,_toLowerCase:()=>_t,_toUpperCase:()=>yt,_transform:()=>Nd,_trim:()=>bt,_tuple:()=>Id,_uint32:()=>zo,_uint64:()=>Po,_ulid:()=>pr,_undefined:()=>No,_union:()=>xd,_unknown:()=>To,_uppercase:()=>ft,_url:()=>st,_uuid:()=>ar,_uuidv4:()=>ur,_uuidv6:()=>cr,_uuidv7:()=>sr,_void:()=>Ao,_xid:()=>gr,clone:()=>K,config:()=>L,decode:()=>Ms,decodeAsync:()=>Ks,encode:()=>Js,encodeAsync:()=>Bs,flattenError:()=>He,formatError:()=>et,globalConfig:()=>Be,globalRegistry:()=>oe,isValidBase64:()=>_i,isValidBase64URL:()=>xu,isValidJWT:()=>ku,locales:()=>ze,parse:()=>Zt,parseAsync:()=>Dt,prettifyError:()=>rn,regexes:()=>Q,registry:()=>ir,safeDecode:()=>Ws,safeDecodeAsync:()=>qs,safeEncode:()=>Gs,safeEncodeAsync:()=>Xs,safeParse:()=>nn,safeParseAsync:()=>on,toDotPath:()=>ou,toJSONSchema:()=>Qo,treeifyError:()=>tn,util:()=>_,version:()=>Hn});var Br=Object.freeze({status:"aborted"});function d(e,r,n){var s;function i(c,a){var v,f;var l;Object.defineProperty(c,"_zod",{value:(v=c._zod)!=null?v:{},enumerable:!1}),(f=(l=c._zod).traits)!=null||(l.traits=new Set),c._zod.traits.add(e),r(c,a);for(let h in u.prototype)h in c||Object.defineProperty(c,h,{value:u.prototype[h].bind(c)});c._zod.constr=u,c._zod.def=a}let t=(s=n==null?void 0:n.Parent)!=null?s:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function u(c){var v;var a;let l=n!=null&&n.Parent?new o:this;i(l,c),(v=(a=l._zod).deferred)!=null||(a.deferred=[]);for(let f of l._zod.deferred)f();return l}return Object.defineProperty(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:c=>{var a,l;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(l=(a=c==null?void 0:c._zod)==null?void 0:a.traits)==null?void 0:l.has(e)}}),Object.defineProperty(u,"name",{value:e}),u}var Pt=Symbol("zod_brand"),te=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},me=class extends Error{constructor(r){super("Encountered unidirectional transform during encode: ".concat(r)),this.name="ZodEncodeError"}},Be={};function L(e){return e&&Object.assign(Be,e),Be}var _={};_e(_,{BIGINT_FORMAT_RANGES:()=>en,Class:()=>Gr,NUMBER_FORMAT_RANGES:()=>Hr,aborted:()=>he,allowsEval:()=>Xr,assert:()=>ys,assertEqual:()=>hs,assertIs:()=>bs,assertNever:()=>_s,assertNotEqual:()=>$s,assignProp:()=>pe,base64ToUint8Array:()=>ru,base64urlToUint8Array:()=>Rs,cached:()=>je,captureStackTrace:()=>Nt,cleanEnum:()=>As,cleanRegex:()=>We,clone:()=>K,cloneDef:()=>ks,createTransparentProxy:()=>Os,defineLazy:()=>Z,esc:()=>Ut,escapeRegex:()=>ie,extend:()=>Ns,finalizeIssue:()=>Y,floatSafeRemainder:()=>Wr,getElementAtPath:()=>zs,getEnumValues:()=>Ge,getLengthableOrigin:()=>Ye,getParsedType:()=>js,getSizableOrigin:()=>qe,hexToUint8Array:()=>Cs,isObject:()=>ye,isPlainObject:()=>ve,issue:()=>Oe,joinValues:()=>p,jsonStringifyReplacer:()=>Se,merge:()=>Ds,mergeDefs:()=>ge,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>Ss,objectClone:()=>xs,omit:()=>Us,optionalKeys:()=>Qr,partial:()=>Ts,pick:()=>Ps,prefixIssues:()=>q,primitiveTypes:()=>Yr,promiseAllObject:()=>Is,propertyKeyTypes:()=>Xe,randomString:()=>ws,required:()=>Es,safeExtend:()=>Zs,shallowClone:()=>qr,stringifyPrimitive:()=>b,uint8ArrayToBase64:()=>nu,uint8ArrayToBase64url:()=>Ls,uint8ArrayToHex:()=>Vs,unwrapMessage:()=>Ke});function hs(e){return e}function $s(e){return e}function bs(e){}function _s(e){throw new Error}function ys(e){}function Ge(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function p(e,r="|"){return e.map(n=>b(n)).join(r)}function Se(e,r){return typeof r=="bigint"?r.toString():r}function je(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(e){return e==null}function We(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Wr(e,r){let n=(e.toString().split(".")[1]||"").length,i=r.toString(),t=(i.split(".")[1]||"").length;if(t===0&&/\\d?e-\\d?/.test(i)){let c=i.match(/\\d?e-(\\d?)/);c!=null&&c[1]&&(t=Number.parseInt(c[1]))}let o=n>t?n:t,u=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(r.toFixed(o).replace(".",""));return u%s/10**o}var tu=Symbol("evaluating");function Z(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==tu)return i===void 0&&(i=tu,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function xs(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pe(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ge(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function ks(e){return ge(e._zod.def)}function zs(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function Is(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<r.length;o++)t[r[o]]=i[o];return t})}function ws(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function Ut(e){return JSON.stringify(e)}var Nt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xr=je(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let r=Function;return new r(""),!0}catch(r){return!1}});function ve(e){if(ye(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(ye(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function qr(e){return ve(e)?m({},e):Array.isArray(e)?[...e]:e}function Ss(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var js=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error("Unknown data type: ".concat(r))}},Xe=new Set(["string","number","symbol"]),Yr=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ie(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function K(e,r,n){let i=new e._zod.constr(r!=null?r:e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function y(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?z(m({},r),{error:()=>r.error}):r}function Os(e){let r;return new Proxy({},{get(n,i,t){return r!=null||(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r!=null||(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r!=null||(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r!=null||(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r!=null||(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r!=null||(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r!=null||(r=e()),Reflect.defineProperty(r,i,t)}})}function b(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?\'"\'.concat(e,\'"\'):"".concat(e)}function Qr(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var Hr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},en={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ps(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t={};for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&(t[o]=n.shape[o])}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Us(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t=m({},e._zod.def.shape);for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&delete t[o]}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Ns(e,r){if(!ve(r))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let t=ge(e._zod.def,{get shape(){let o=m(m({},e._zod.def.shape),r);return pe(this,"shape",o),o},checks:[]});return K(e,t)}function Zs(e,r){if(!ve(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=z(m({},e._zod.def),{get shape(){let i=m(m({},e._zod.def.shape),r);return pe(this,"shape",i),i},checks:e._zod.def.checks});return K(e,n)}function Ds(e,r){let n=ge(e._zod.def,{get shape(){let i=m(m({},e._zod.def.shape),r._zod.def.shape);return pe(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return K(e,n)}function Ts(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in t))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=e?new e({type:"optional",innerType:t[u]}):t[u])}else for(let u in t)o[u]=e?new e({type:"optional",innerType:t[u]}):t[u];return pe(this,"shape",o),o},checks:[]});return K(r,i)}function Es(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in o))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=new e({type:"nonoptional",innerType:t[u]}))}else for(let u in t)o[u]=new e({type:"nonoptional",innerType:t[u]});return pe(this,"shape",o),o},checks:[]});return K(r,i)}function he(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function q(e,r){return r.map(n=>{var t;var i;return(t=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function Ke(e){return typeof e=="string"?e:e==null?void 0:e.message}function Y(e,r,n){var t,o,u,s,c,a,l,v,f,h,x;let i=z(m({},e),{path:(t=e.path)!=null?t:[]});if(!e.message){let S=(x=(h=(v=(a=Ke((s=(u=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:u.error)==null?void 0:s.call(u,e)))!=null?a:Ke((c=r==null?void 0:r.error)==null?void 0:c.call(r,e)))!=null?v:Ke((l=n.customError)==null?void 0:l.call(n,e)))!=null?h:Ke((f=n.localeError)==null?void 0:f.call(n,e)))!=null?x:"Invalid input";i.message=S}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function qe(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ye(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Oe(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:m({},r)}function As(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function ru(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}function nu(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function Rs(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return ru(r+n)}function Ls(e){return nu(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function Cs(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let i=0;i<r.length;i+=2)n[i/2]=Number.parseInt(r.slice(i,i+2),16);return n}function Vs(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}var Gr=class{constructor(...r){}};var iu=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Se,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qe=d("$ZodError",iu),G=d("$ZodError",iu,{Parent:Error});function He(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function et(e,r=n=>n.message){let n={_errors:[]},i=t=>{for(let o of t.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(u=>i({issues:u}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let u=n,s=0;for(;s<o.path.length;){let c=o.path[s];s===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],s++}}};return i(e),n}function tn(e,r=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var c,a,l,v;var u,s;for(let f of t.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(h=>i({issues:h},f.path));else if(f.code==="invalid_key")i({issues:f.issues},f.path);else if(f.code==="invalid_element")i({issues:f.issues},f.path);else{let h=[...o,...f.path];if(h.length===0){n.errors.push(r(f));continue}let x=n,S=0;for(;S<h.length;){let I=h[S],C=S===h.length-1;typeof I=="string"?((c=x.properties)!=null||(x.properties={}),(a=(u=x.properties)[I])!=null||(u[I]={errors:[]}),x=x.properties[I]):((l=x.items)!=null||(x.items=[]),(v=(s=x.items)[I])!=null||(s[I]={errors:[]}),x=x.items[I]),C&&x.errors.push(r(f)),S++}}};return i(e),n}function ou(e){let r=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push("[".concat(i,"]")):typeof i=="symbol"?r.push("[".concat(JSON.stringify(String(i)),"]")):/[^\\w$]/.test(i)?r.push("[".concat(JSON.stringify(i),"]")):(r.length&&r.push("."),r.push(i));return r.join("")}function rn(e){var i;let r=[],n=[...e.issues].sort((t,o)=>{var u,s;return((u=t.path)!=null?u:[]).length-((s=o.path)!=null?s:[]).length});for(let t of n)r.push("\\u2716 ".concat(t.message)),(i=t.path)!=null&&i.length&&r.push(" \\u2192 at ".concat(ou(t.path)));return r.join("\\n")}var Pe=e=>(r,n,i,t)=>{var s;let o=i?Object.assign(i,{async:!1}):{async:!1},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new te;if(u.issues.length){let c=new((s=t==null?void 0:t.Err)!=null?s:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Zt=Pe(G),Ue=e=>async(r,n,i,t)=>{var s;let o=i?Object.assign(i,{async:!0}):{async:!0},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new((s=t==null?void 0:t.Err)!=null?s:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Dt=Ue(G),Ne=e=>(r,n,i)=>{let t=i?z(m({},i),{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new te;return o.issues.length?{success:!1,error:new(e!=null?e:Qe)(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},nn=Ne(G),Ze=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},on=Ze(G),Tt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pe(e)(r,n,t)},Js=Tt(G),Et=e=>(r,n,i)=>Pe(e)(r,n,i),Ms=Et(G),At=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ue(e)(r,n,t)},Bs=At(G),Rt=e=>async(r,n,i)=>Ue(e)(r,n,i),Ks=Rt(G),Lt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ne(e)(r,n,t)},Gs=Lt(G),Ct=e=>(r,n,i)=>Ne(e)(r,n,i),Ws=Ct(G),Vt=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ze(e)(r,n,t)},Xs=Vt(G),Ft=e=>async(r,n,i)=>Ze(e)(r,n,i),qs=Ft(G);var Q={};_e(Q,{base64:()=>_n,base64url:()=>Jt,bigint:()=>Sn,boolean:()=>Pn,browserEmail:()=>il,cidrv4:()=>$n,cidrv6:()=>bn,cuid:()=>an,cuid2:()=>un,date:()=>kn,datetime:()=>In,domain:()=>al,duration:()=>mn,e164:()=>xn,email:()=>pn,emoji:()=>gn,extendedDuration:()=>Ys,guid:()=>fn,hex:()=>ul,hostname:()=>yn,html5Email:()=>tl,idnEmail:()=>nl,integer:()=>jn,ipv4:()=>vn,ipv6:()=>hn,ksuid:()=>ln,lowercase:()=>Zn,md5_base64:()=>sl,md5_base64url:()=>ll,md5_hex:()=>cl,nanoid:()=>dn,null:()=>Un,number:()=>On,rfc5322Email:()=>rl,sha1_base64:()=>ml,sha1_base64url:()=>fl,sha1_hex:()=>dl,sha256_base64:()=>gl,sha256_base64url:()=>vl,sha256_hex:()=>pl,sha384_base64:()=>$l,sha384_base64url:()=>bl,sha384_hex:()=>hl,sha512_base64:()=>yl,sha512_base64url:()=>xl,sha512_hex:()=>_l,string:()=>wn,time:()=>zn,ulid:()=>cn,undefined:()=>Nn,unicodeEmail:()=>au,uppercase:()=>Dn,uuid:()=>xe,uuid4:()=>Qs,uuid6:()=>Hs,uuid7:()=>el,xid:()=>sn});var an=/^[cC][^\\s-]{8,}$/,un=/^[0-9a-z]+$/,cn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sn=/^[0-9a-vA-V]{20}$/,ln=/^[A-Za-z0-9]{27}$/,dn=/^[a-zA-Z0-9_-]{21}$/,mn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Ys=/^[-+]?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)?)??$/,fn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xe=e=>e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(e,"[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$")):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qs=xe(4),Hs=xe(6),el=xe(7),pn=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,tl=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rl=/^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,au=new RegExp(\'^[^\\\\s@"]{1,64}@[^\\\\s@]{1,255}$\',"u"),nl=au,il=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ol="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$";function gn(){return new RegExp(ol,"u")}var vn=/^(?:(?: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])$/,hn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,bn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_n=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jt=/^[A-Za-z0-9_-]*$/,yn=/^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/,al=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,xn=/^\\+(?:[0-9]){6,14}[0-9]$/,uu="(?:(?:\\\\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])))",kn=new RegExp("^".concat(uu,"$"));function cu(e){let r="(?:[01]\\\\d|2[0-3]):[0-5]\\\\d";return typeof e.precision=="number"?e.precision===-1?"".concat(r):e.precision===0?"".concat(r,":[0-5]\\\\d"):"".concat(r,":[0-5]\\\\d\\\\.\\\\d{").concat(e.precision,"}"):"".concat(r,"(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?")}function zn(e){return new RegExp("^".concat(cu(e),"$"))}function In(e){let r=cu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)");let i="".concat(r,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(uu,"T(?:").concat(i,")$"))}var wn=e=>{var n,i;let r=e?"[\\\\s\\\\S]{".concat((n=e==null?void 0:e.minimum)!=null?n:0,",").concat((i=e==null?void 0:e.maximum)!=null?i:"","}"):"[\\\\s\\\\S]*";return new RegExp("^".concat(r,"$"))},Sn=/^-?\\d+n?$/,jn=/^-?\\d+$/,On=/^-?\\d+(?:\\.\\d+)?/,Pn=/^(?:true|false)$/i,Un=/^null$/i;var Nn=/^undefined$/i;var Zn=/^[^A-Z]*$/,Dn=/^[^a-z]*$/,ul=/^[0-9a-fA-F]*$/;function tt(e,r){return new RegExp("^[A-Za-z0-9+/]{".concat(e,"}").concat(r,"$"))}function rt(e){return new RegExp("^[A-Za-z0-9_-]{".concat(e,"}$"))}var cl=/^[0-9a-fA-F]{32}$/,sl=tt(22,"=="),ll=rt(22),dl=/^[0-9a-fA-F]{40}$/,ml=tt(27,"="),fl=rt(27),pl=/^[0-9a-fA-F]{64}$/,gl=tt(43,"="),vl=rt(43),hl=/^[0-9a-fA-F]{96}$/,$l=tt(64,""),bl=rt(64),_l=/^[0-9a-fA-F]{128}$/,yl=tt(86,"=="),xl=rt(86);var R=d("$ZodCheck",(e,r)=>{var i,t;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=r,(t=(n=e._zod).onattach)!=null||(n.onattach=[])}),lu={number:"number",bigint:"bigint",object:"date"},Mt=d("$ZodCheckLessThan",(e,r)=>{R.init(e,r);let n=lu[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.maximum:t.exclusiveMaximum)!=null?u:Number.POSITIVE_INFINITY;r.value<o&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Bt=d("$ZodCheckGreaterThan",(e,r)=>{R.init(e,r);let n=lu[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.minimum:t.exclusiveMinimum)!=null?u:Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Tn=d("$ZodCheckMultipleOf",(e,r)=>{R.init(e,r),e._zod.onattach.push(n=>{var t;var i;(t=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Wr(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),En=d("$ZodCheckNumberFormat",(e,r)=>{var u;R.init(e,r),r.format=r.format||"float64";let n=(u=r.format)==null?void 0:u.includes("int"),i=n?"int":"number",[t,o]=Hr[r.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o,n&&(c.pattern=jn)}),e._zod.check=s=>{let c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort});return}}c<t&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),An=d("$ZodCheckBigIntFormat",(e,r)=>{R.init(e,r);let[n,i]=en[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Rn=d("$ZodCheckMaxSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;o.size<=r.maximum||t.issues.push({origin:qe(o),code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Ln=d("$ZodCheckMinSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;o.size>=r.minimum||t.issues.push({origin:qe(o),code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Cn=d("$ZodCheckSizeEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.size,o.maximum=r.size,o.size=r.size}),e._zod.check=t=>{let o=t.value,u=o.size;if(u===r.size)return;let s=u>r.size;t.issues.push(z(m({origin:qe(o)},s?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Vn=d("$ZodCheckMaxLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;if(o.length<=r.maximum)return;let s=Ye(o);t.issues.push({origin:s,code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Fn=d("$ZodCheckMinLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;if(o.length>=r.minimum)return;let s=Ye(o);t.issues.push({origin:s,code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Jn=d("$ZodCheckLengthEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.length,o.maximum=r.length,o.length=r.length}),e._zod.check=t=>{let o=t.value,u=o.length;if(u===r.length)return;let s=Ye(o),c=u>r.length;t.issues.push(z(m({origin:s},c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),De=d("$ZodCheckStringFormat",(e,r)=>{var t,o;var n,i;R.init(e,r),e._zod.onattach.push(u=>{var c;let s=u._zod.bag;s.format=r.format,r.pattern&&((c=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(r.pattern))}),r.pattern?(t=(n=e._zod).check)!=null||(n.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push(z(m({origin:"string",code:"invalid_format",format:r.format,input:u.value},r.pattern?{pattern:r.pattern.toString()}:{}),{inst:e,continue:!r.abort}))}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),Mn=d("$ZodCheckRegex",(e,r)=>{De.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Bn=d("$ZodCheckLowerCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Zn),De.init(e,r)}),Kn=d("$ZodCheckUpperCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Dn),De.init(e,r)}),Gn=d("$ZodCheckIncludes",(e,r)=>{R.init(e,r);let n=ie(r.includes),i=new RegExp(typeof r.position=="number"?"^.{".concat(r.position,"}").concat(n):n);r.pattern=i,e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Wn=d("$ZodCheckStartsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp("^".concat(ie(r.prefix),".*"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.startsWith(r.prefix)||t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:t.value,inst:e,continue:!r.abort})}}),Xn=d("$ZodCheckEndsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp(".*".concat(ie(r.suffix),"$"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.endsWith(r.suffix)||t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:t.value,inst:e,continue:!r.abort})}});function su(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues))}var qn=d("$ZodCheckProperty",(e,r)=>{R.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>su(t,n,r.property));su(i,n,r.property)}}),Yn=d("$ZodCheckMimeType",(e,r)=>{R.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Qn=d("$ZodCheckOverwrite",(e,r)=>{R.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var nt=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split("\\n").filter(u=>u),t=Math.min(...i.map(u=>u.length-u.trimStart().length)),o=i.map(u=>u.slice(t)).map(u=>" ".repeat(this.indent*2)+u);for(let u of o)this.content.push(u)}compile(){var o;let r=Function,n=this==null?void 0:this.args,t=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(u=>" ".concat(u))];return new r(...n,t.join("\\n"))}};var Hn={major:4,minor:1,patch:12};var O=d("$ZodType",(e,r)=>{var t,o,u;var n;e!=null||(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Hn;let i=[...(t=e._zod.def.checks)!=null?t:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let s of i)for(let c of s._zod.onattach)c(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(u=e._zod.deferred)==null||u.push(()=>{e._zod.run=e._zod.parse});else{let s=(a,l,v)=>{let f=he(a),h;for(let x of l){if(x._zod.def.when){if(!x._zod.def.when(a))continue}else if(f)continue;let S=a.issues.length,I=x._zod.check(a);if(I instanceof Promise&&(v==null?void 0:v.async)===!1)throw new te;if(h||I instanceof Promise)h=(h!=null?h:Promise.resolve()).then(async()=>{await I,a.issues.length!==S&&(f||(f=he(a,S)))});else{if(a.issues.length===S)continue;f||(f=he(a,S))}}return h?h.then(()=>a):a},c=(a,l,v)=>{if(he(a))return a.aborted=!0,a;let f=s(l,i,v);if(f instanceof Promise){if(v.async===!1)throw new te;return f.then(h=>e._zod.parse(h,v))}return e._zod.parse(f,v)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let f=e._zod.parse({value:a.value,issues:[]},z(m({},l),{skipChecks:!0}));return f instanceof Promise?f.then(h=>c(h,a,l)):c(f,a,l)}let v=e._zod.parse(a,l);if(v instanceof Promise){if(l.async===!1)throw new te;return v.then(f=>s(f,i,l))}return s(v,i,l)}}e["~standard"]={validate:s=>{var c;try{let a=nn(e,s);return a.success?{value:a.data}:{issues:(c=a.error)==null?void 0:c.issues}}catch(a){return on(e,s).then(l=>{var v;return l.success?{value:l.data}:{issues:(v=l.error)==null?void 0:v.issues}})}},vendor:"zod",version:1}}),ke=d("$ZodString",(e,r)=>{var n,i,t;O.init(e,r),e._zod.pattern=(t=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?t:wn(e._zod.bag),e._zod.parse=(o,u)=>{if(r.coerce)try{o.value=String(o.value)}catch(s){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),T=d("$ZodStringFormat",(e,r)=>{De.init(e,r),ke.init(e,r)}),ti=d("$ZodGUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=fn),T.init(e,r)}),ri=d("$ZodUUID",(e,r)=>{var n,i;if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(\'Invalid UUID version: "\'.concat(r.version,\'"\'));(n=r.pattern)!=null||(r.pattern=xe(o))}else(i=r.pattern)!=null||(r.pattern=xe());T.init(e,r)}),ni=d("$ZodEmail",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=pn),T.init(e,r)}),ii=d("$ZodURL",(e,r)=>{T.init(e,r),e._zod.check=n=>{try{let i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:yn.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),oi=d("$ZodEmoji",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=gn()),T.init(e,r)}),ai=d("$ZodNanoID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=dn),T.init(e,r)}),ui=d("$ZodCUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=an),T.init(e,r)}),ci=d("$ZodCUID2",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=un),T.init(e,r)}),si=d("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=cn),T.init(e,r)}),li=d("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=sn),T.init(e,r)}),di=d("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ln),T.init(e,r)}),mi=d("$ZodISODateTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=In(r)),T.init(e,r)}),fi=d("$ZodISODate",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=kn),T.init(e,r)}),pi=d("$ZodISOTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=zn(r)),T.init(e,r)}),gi=d("$ZodISODuration",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=mn),T.init(e,r)}),vi=d("$ZodIPv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=vn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv4"})}),hi=d("$ZodIPv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=hn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv6"}),e._zod.check=i=>{try{new URL("http://[".concat(i.value,"]"))}catch(t){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}}),$i=d("$ZodCIDRv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=$n),T.init(e,r)}),bi=d("$ZodCIDRv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=bn),T.init(e,r),e._zod.check=i=>{let t=i.value.split("/");try{if(t.length!==2)throw new Error;let[o,u]=t;if(!u)throw new Error;let s=Number(u);if("".concat(s)!==u)throw new Error;if(s<0||s>128)throw new Error;new URL("http://[".concat(o,"]"))}catch(o){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function _i(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(r){return!1}}var yi=d("$ZodBase64",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=_n),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64"}),e._zod.check=i=>{_i(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function xu(e){if(!Jt.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return _i(n)}var xi=d("$ZodBase64URL",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Jt),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64url"}),e._zod.check=i=>{xu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),ki=d("$ZodE164",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=xn),T.init(e,r)});function ku(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch(n){return!1}}var zi=d("$ZodJWT",(e,r)=>{T.init(e,r),e._zod.check=n=>{ku(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Ii=d("$ZodCustomStringFormat",(e,r)=>{T.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),Yt=d("$ZodNumber",(e,r)=>{var n;O.init(e,r),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:On,e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=Number(i.value)}catch(s){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push(m({expected:"number",code:"invalid_type",input:o,inst:e},u?{received:u}:{})),i}}),wi=d("$ZodNumber",(e,r)=>{En.init(e,r),Yt.init(e,r)}),it=d("$ZodBoolean",(e,r)=>{O.init(e,r),e._zod.pattern=Pn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch(o){}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Qt=d("$ZodBigInt",(e,r)=>{O.init(e,r),e._zod.pattern=Sn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch(t){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Si=d("$ZodBigInt",(e,r)=>{An.init(e,r),Qt.init(e,r)}),ji=d("$ZodSymbol",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),Oi=d("$ZodUndefined",(e,r)=>{O.init(e,r),e._zod.pattern=Nn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),Pi=d("$ZodNull",(e,r)=>{O.init(e,r),e._zod.pattern=Un,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),Ui=d("$ZodAny",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Ni=d("$ZodUnknown",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Zi=d("$ZodNever",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Di=d("$ZodVoid",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),Ti=d("$ZodDate",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(s){}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push(z(m({expected:"date",code:"invalid_type",input:t},o?{received:"Invalid Date"}:{}),{inst:e})),n}});function mu(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ei=d("$ZodArray",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let o=[];for(let u=0;u<t.length;u++){let s=t[u],c=r.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(a=>mu(a,n,u))):mu(c,n,u)}return o.length?Promise.all(o).then(()=>n):n}});function qt(e,r,n,i){e.issues.length&&r.issues.push(...q(n,e.issues)),e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function zu(e){var i,t,o,u;let r=Object.keys(e.shape);for(let s of r)if(!((u=(o=(t=(i=e.shape)==null?void 0:i[s])==null?void 0:t._zod)==null?void 0:o.traits)!=null&&u.has("$ZodType")))throw new Error(\'Invalid element at key "\'.concat(s,\'": expected a Zod schema\'));let n=Qr(e.shape);return z(m({},e),{keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)})}function Iu(e,r,n,i,t,o){let u=[],s=t.keySet,c=t.catchall._zod,a=c.def.type;for(let l of Object.keys(r)){if(s.has(l))continue;if(a==="never"){u.push(l);continue}let v=c.run({value:r[l],issues:[]},i);v instanceof Promise?e.push(v.then(f=>qt(f,n,l,r))):qt(v,n,l,r)}return u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:r,inst:o}),e.length?Promise.all(e).then(()=>n):n}var wu=d("$ZodObject",(e,r)=>{O.init(e,r);let n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let c=m({},s);return Object.defineProperty(r,"shape",{value:c}),c}})}let i=je(()=>zu(r));Z(e._zod,"propValues",()=>{var a;let s=r.shape,c={};for(let l in s){let v=s[l]._zod;if(v.values){(a=c[l])!=null||(c[l]=new Set);for(let f of v.values)c[l].add(f)}}return c});let t=ye,o=r.catchall,u;e._zod.parse=(s,c)=>{u!=null||(u=i.value);let a=s.value;if(!t(a))return s.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),s;s.value={};let l=[],v=u.shape;for(let f of u.keys){let x=v[f]._zod.run({value:a[f],issues:[]},c);x instanceof Promise?l.push(x.then(S=>qt(S,s,f,a))):qt(x,s,f,a)}return o?Iu(l,a,s,c,i.value,e):l.length?Promise.all(l).then(()=>s):s}}),Ai=d("$ZodObjectJIT",(e,r)=>{wu.init(e,r);let n=e._zod.parse,i=je(()=>zu(r)),t=f=>{let h=new nt(["shape","payload","ctx"]),x=i.value,S=g=>{let $=Ut(g);return"shape[".concat($,"]._zod.run({ value: input[").concat($,"], issues: [] }, ctx)")};h.write("const input = payload.value;");let I=Object.create(null),C=0;for(let g of x.keys)I[g]="key_".concat(C++);h.write("const newResult = {};");for(let g of x.keys){let $=I[g],k=Ut(g);h.write("const ".concat($," = ").concat(S(g),";")),h.write("\\n if (".concat($,".issues.length) {\\n payload.issues = payload.issues.concat(").concat($,".issues.map(iss => ({\\n ...iss,\\n path: iss.path ? [").concat(k,", ...iss.path] : [").concat(k,"]\\n })));\\n }\\n \\n \\n if (").concat($,".value === undefined) {\\n if (").concat(k," in input) {\\n newResult[").concat(k,"] = undefined;\\n }\\n } else {\\n newResult[").concat(k,"] = ").concat($,".value;\\n }\\n \\n "))}h.write("payload.value = newResult;"),h.write("return payload;");let j=h.compile();return(g,$)=>j(f,g,$)},o,u=ye,s=!Be.jitless,a=s&&Xr.value,l=r.catchall,v;e._zod.parse=(f,h)=>{v!=null||(v=i.value);let x=f.value;return u(x)?s&&a&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(o||(o=t(r.shape)),f=o(f,h),l?Iu([],x,f,h,v,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),f)}});function fu(e,r,n,i){for(let o of e)if(o.issues.length===0)return r.value=o.value,r;let t=e.filter(o=>!he(o));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(u=>Y(u,i,L())))}),r)}var Ht=d("$ZodUnion",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),Z(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(o=>o._zod.pattern);return new RegExp("^(".concat(t.map(o=>We(o.source)).join("|"),")$"))}});let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,o)=>{if(n)return i(t,o);let u=!1,s=[];for(let c of r.options){let a=c._zod.run({value:t.value,issues:[]},o);if(a instanceof Promise)s.push(a),u=!0;else{if(a.issues.length===0)return a;s.push(a)}}return u?Promise.all(s).then(c=>fu(c,t,e,o)):fu(s,t,e,o)}}),Ri=d("$ZodDiscriminatedUnion",(e,r)=>{Ht.init(e,r);let n=e._zod.parse;Z(e._zod,"propValues",()=>{let t={};for(let o of r.options){let u=o._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(o),\'"\'));for(let[s,c]of Object.entries(u)){t[s]||(t[s]=new Set);for(let a of c)t[s].add(a)}}return t});let i=je(()=>{var u;let t=r.options,o=new Map;for(let s of t){let c=(u=s._zod.propValues)==null?void 0:u[r.discriminator];if(!c||c.size===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(s),\'"\'));for(let a of c){if(o.has(a))throw new Error(\'Duplicate discriminator value "\'.concat(String(a),\'"\'));o.set(a,s)}}return o});e._zod.parse=(t,o)=>{let u=t.value;if(!ye(u))return t.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),t;let s=i.value.get(u==null?void 0:u[r.discriminator]);return s?s._zod.run(t,o):r.unionFallback?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:u,path:[r.discriminator],inst:e}),t)}}),Li=d("$ZodIntersection",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),u=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||u instanceof Promise?Promise.all([o,u]).then(([c,a])=>pu(n,c,a)):pu(n,o,u)}});function ei(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(ve(e)&&ve(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t=m(m({},e),r);for(let o of i){let u=ei(e[o],r[o]);if(!u.valid)return{valid:!1,mergeErrorPath:[o,...u.mergeErrorPath]};t[o]=u.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],o=r[i],u=ei(t,o);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};n.push(u.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pu(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),he(e))return e;let i=ei(r.value,n.value);if(!i.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(i.mergeErrorPath)));return e.value=i.data,e}var er=d("$ZodTuple",(e,r)=>{O.init(e,r);let n=r.items,i=n.length-[...n].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,o)=>{let u=t.value;if(!Array.isArray(u))return t.issues.push({input:u,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];let s=[];if(!r.rest){let a=u.length>n.length,l=u.length<i-1;if(a||l)return t.issues.push(z(m({},a?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}),{input:u,inst:e,origin:"array"})),t}let c=-1;for(let a of n){if(c++,c>=u.length&&c>=i)continue;let l=a._zod.run({value:u[c],issues:[]},o);l instanceof Promise?s.push(l.then(v=>Kt(v,t,c))):Kt(l,t,c)}if(r.rest){let a=u.slice(n.length);for(let l of a){c++;let v=r.rest._zod.run({value:l,issues:[]},o);v instanceof Promise?s.push(v.then(f=>Kt(f,t,c))):Kt(v,t,c)}}return s.length?Promise.all(s).then(()=>t):t}});function Kt(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ci=d("$ZodRecord",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!ve(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[];if(r.keyType._zod.values){let u=r.keyType._zod.values;n.value={};for(let c of u)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let a=r.valueType._zod.run({value:t[c],issues:[]},i);a instanceof Promise?o.push(a.then(l=>{l.issues.length&&n.issues.push(...q(c,l.issues)),n.value[c]=l.value})):(a.issues.length&&n.issues.push(...q(c,a.issues)),n.value[c]=a.value)}let s;for(let c in t)u.has(c)||(s=s!=null?s:[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:s})}else{n.value={};for(let u of Reflect.ownKeys(t)){if(u==="__proto__")continue;let s=r.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(a=>Y(a,i,L())),input:u,path:[u],inst:e}),n.value[s.value]=s.value;continue}let c=r.valueType._zod.run({value:t[u],issues:[]},i);c instanceof Promise?o.push(c.then(a=>{a.issues.length&&n.issues.push(...q(u,a.issues)),n.value[s.value]=a.value})):(c.issues.length&&n.issues.push(...q(u,c.issues)),n.value[s.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Vi=d("$ZodMap",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let o=[];n.value=new Map;for(let[u,s]of t){let c=r.keyType._zod.run({value:u,issues:[]},i),a=r.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||a instanceof Promise?o.push(Promise.all([c,a]).then(([l,v])=>{gu(l,v,n,u,t,e,i)})):gu(c,a,n,u,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function gu(e,r,n,i,t,o,u){e.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:e.issues.map(s=>Y(s,u,L()))})),r.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(s=>Y(s,u,L()))})),n.value.set(e.value,r.value)}var Fi=d("$ZodSet",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let u of t){let s=r.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>vu(c,n))):vu(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function vu(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Ji=d("$ZodEnum",(e,r)=>{O.init(e,r);let n=Ge(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp("^(".concat(n.filter(t=>Xe.has(typeof t)).map(t=>typeof t=="string"?ie(t):t.toString()).join("|"),")$")),e._zod.parse=(t,o)=>{let u=t.value;return i.has(u)||t.issues.push({code:"invalid_value",values:n,input:u,inst:e}),t}}),Mi=d("$ZodLiteral",(e,r)=>{if(O.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp("^(".concat(r.values.map(n=>typeof n=="string"?ie(n):n?ie(n.toString()):String(n)).join("|"),")$")),e._zod.parse=(n,i)=>{let t=n.value;return e._zod.values.has(t)||n.issues.push({code:"invalid_value",values:r.values,input:t,inst:e}),n}}),Bi=d("$ZodFile",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Ki=d("$ZodTransform",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(u=>(n.value=u,n));if(t instanceof Promise)throw new te;return n.value=t,n}});function hu(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var Gi=d("$ZodOptional",(e,r)=>{O.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),")?$")):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>hu(o,n.value)):hu(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Wi=d("$ZodNullable",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),"|null)$")):void 0}),Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),Xi=d("$ZodDefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>$u(o,r)):$u(t,r)}});function $u(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var qi=d("$ZodPrefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Yi=d("$ZodNonOptional",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>bu(o,e)):bu(t,e)}});function bu(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Qi=d("$ZodSuccess",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Hi=d("$ZodCatch",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:o.issues.map(u=>Y(u,i,L()))},input:n.value})),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:t.issues.map(o=>Y(o,i,L()))},input:n.value})),n.issues=[]),n)}}),eo=d("$ZodNaN",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),to=d("$ZodPipe",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Gt(u,r.in,i)):Gt(o,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>Gt(o,r.out,i)):Gt(t,r.out,i)}});function Gt(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var ot=d("$ZodCodec",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=r.in._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}else{let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}}});function Wt(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let t=r.transform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.out,n)):Xt(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.in,n)):Xt(e,t,r.in,n)}}function Xt(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var ro=d("$ZodReadonly",(e,r)=>{O.init(e,r),Z(e._zod,"propValues",()=>r.innerType._zod.propValues),Z(e._zod,"values",()=>r.innerType._zod.values),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(_u):_u(t)}});function _u(e){return e.value=Object.freeze(e.value),e}var no=d("$ZodTemplateLiteral",(e,r)=>{O.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error("Invalid template literal part, no pattern found: ".concat([...i._zod.traits].shift()));let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error("Invalid template literal part: ".concat(i._zod.traits));let o=t.startsWith("^")?1:0,u=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,u))}else if(i===null||Yr.has(typeof i))n.push(ie("".concat(i)));else throw new Error("Invalid template literal part: ".concat(i));e._zod.pattern=new RegExp("^".concat(n.join(""),"$")),e._zod.parse=(i,t)=>{var o;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:(o=r.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),i)}}),io=d("$ZodFunction",(e,r)=>(O.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let t=e._def.input?Zt(e._def.input,i):i,o=Reflect.apply(n,this,t);return e._def.output?Zt(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await Dt(e._def.input,i):i,o=await Reflect.apply(n,this,t);return e._def.output?await Dt(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new er({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),oo=d("$ZodPromise",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),ao=d("$ZodLazy",(e,r)=>{O.init(e,r),Z(e._zod,"innerType",()=>r.getter()),Z(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Z(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Z(e._zod,"optin",()=>{var n;return(n=e._zod.innerType._zod.optin)!=null?n:void 0}),Z(e._zod,"optout",()=>{var n;return(n=e._zod.innerType._zod.optout)!=null?n:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),uo=d("$ZodCustom",(e,r)=>{R.init(e,r),O.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(o=>yu(o,n,i,e));yu(t,n,i,e)}});function yu(e,r,n,i){var t;if(!e){let o={code:"custom",input:n,inst:i,path:[...(t=i._zod.def.path)!=null?t:[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),r.issues.push(Oe(o))}}var ze={};_e(ze,{ar:()=>Su,az:()=>ju,be:()=>Pu,bg:()=>Uu,ca:()=>Nu,cs:()=>Zu,da:()=>Du,de:()=>Tu,en:()=>tr,eo:()=>Eu,es:()=>Au,fa:()=>Ru,fi:()=>Lu,fr:()=>Cu,frCA:()=>Vu,he:()=>Fu,hu:()=>Ju,id:()=>Mu,is:()=>Bu,it:()=>Ku,ja:()=>Gu,ka:()=>Wu,kh:()=>Xu,km:()=>rr,ko:()=>qu,lt:()=>Qu,mk:()=>Hu,ms:()=>ec,nl:()=>tc,no:()=>rc,ota:()=>nc,pl:()=>oc,ps:()=>ic,pt:()=>ac,ru:()=>cc,sl:()=>sc,sv:()=>lc,ta:()=>dc,th:()=>mc,tr:()=>fc,ua:()=>pc,uk:()=>nr,ur:()=>gc,vi:()=>vc,yo:()=>bc,zhCN:()=>hc,zhTW:()=>$c});var zl=()=>{let e={string:{unit:"\\u062D\\u0631\\u0641",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},file:{unit:"\\u0628\\u0627\\u064A\\u062A",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},array:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},set:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0645\\u062F\\u062E\\u0644",email:"\\u0628\\u0631\\u064A\\u062F \\u0625\\u0644\\u0643\\u062A\\u0631\\u0648\\u0646\\u064A",url:"\\u0631\\u0627\\u0628\\u0637",emoji:"\\u0625\\u064A\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0648\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",date:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",time:"\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",duration:"\\u0645\\u062F\\u0629 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",ipv4:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv4",ipv6:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv6",cidrv4:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv4",cidrv6:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv6",base64:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64-encoded",base64url:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64url-encoded",json_string:"\\u0646\\u064E\\u0635 \\u0639\\u0644\\u0649 \\u0647\\u064A\\u0626\\u0629 JSON",e164:"\\u0631\\u0642\\u0645 \\u0647\\u0627\\u062A\\u0641 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 E.164",jwt:"JWT",template_literal:"\\u0645\\u062F\\u062E\\u0644"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(t.expected,"\\u060C \\u0648\\u0644\\u0643\\u0646 \\u062A\\u0645 \\u0625\\u062F\\u062E\\u0627\\u0644 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(b(t.values[0])):"\\u0627\\u062E\\u062A\\u064A\\u0627\\u0631 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062A\\u0648\\u0642\\u0639 \\u0627\\u0646\\u062A\\u0642\\u0627\\u0621 \\u0623\\u062D\\u062F \\u0647\\u0630\\u0647 \\u0627\\u0644\\u062E\\u064A\\u0627\\u0631\\u0627\\u062A: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?" \\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((o=t.origin)!=null?o:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"):"\\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((s=t.origin)!=null?s:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString()," ").concat(l.unit):"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0628\\u062F\\u0623 \\u0628\\u0640 "\'.concat(t.prefix,\'"\'):a.format==="ends_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0646\\u062A\\u0647\\u064A \\u0628\\u0640 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u062A\\u0636\\u0645\\u0651\\u064E\\u0646 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0637\\u0627\\u0628\\u0642 \\u0627\\u0644\\u0646\\u0645\\u0637 ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644")}case"not_multiple_of":return"\\u0631\\u0642\\u0645 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 \\u0645\\u0646 \\u0645\\u0636\\u0627\\u0639\\u0641\\u0627\\u062A ".concat(t.divisor);case"unrecognized_keys":return"\\u0645\\u0639\\u0631\\u0641".concat(t.keys.length>1?"\\u0627\\u062A":""," \\u063A\\u0631\\u064A\\u0628").concat(t.keys.length>1?"\\u0629":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"\\u0645\\u0639\\u0631\\u0641 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);case"invalid_union":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644";case"invalid_element":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);default:return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644"}}};function Su(){return{localeError:zl()}}var Il=()=>{let e={string:{unit:"simvol",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"element",verb:"olmal\\u0131d\\u0131r"},set:{unit:"element",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(t.expected,", daxil olan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(b(t.values[0])):"Yanl\\u0131\\u015F se\\xE7im: a\\u015Fa\\u011F\\u0131dak\\u0131lardan biri olmal\\u0131d\\u0131r: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((o=t.origin)!=null?o:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"element"):"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((s=t.origin)!=null?s:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.prefix,\'" il\\u0259 ba\\u015Flamal\\u0131d\\u0131r\'):a.format==="ends_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.suffix,\'" il\\u0259 bitm\\u0259lidir\'):a.format==="includes"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.includes,\'" daxil olmal\\u0131d\\u0131r\'):a.format==="regex"?"Yanl\\u0131\\u015F m\\u0259tn: ".concat(a.pattern," \\u015Fablonuna uy\\u011Fun olmal\\u0131d\\u0131r"):"Yanl\\u0131\\u015F ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Yanl\\u0131\\u015F \\u0259d\\u0259d: ".concat(t.divisor," il\\u0259 b\\xF6l\\xFCn\\u0259 bil\\u0259n olmal\\u0131d\\u0131r");case"unrecognized_keys":return"Tan\\u0131nmayan a\\xE7ar".concat(t.keys.length>1?"lar":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F a\\xE7ar");case"invalid_union":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r";case"invalid_element":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F d\\u0259y\\u0259r");default:return"Yanl\\u0131\\u015F d\\u0259y\\u0259r"}}};function ju(){return{localeError:Il()}}function Ou(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var wl=()=>{let e={string:{unit:{one:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B",few:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u044B",many:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u044B",many:"\\u0431\\u0430\\u0439\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u043B\\u0456\\u043A";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0456\\u045E";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0443\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0430\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0456 \\u0447\\u0430\\u0441",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0447\\u0430\\u0441",duration:"ISO \\u043F\\u0440\\u0430\\u0446\\u044F\\u0433\\u043B\\u0430\\u0441\\u0446\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0430\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0430\\u0441",cidrv4:"IPv4 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64",base64url:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64url",json_string:"JSON \\u0440\\u0430\\u0434\\u043E\\u043A",e164:"\\u043D\\u0443\\u043C\\u0430\\u0440 E.164",jwt:"JWT",template_literal:"\\u0443\\u0432\\u043E\\u0434"};return t=>{var o,u,s;switch(t.code){case"invalid_type":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F ".concat(t.expected,", \\u0430\\u0442\\u0440\\u044B\\u043C\\u0430\\u043D\\u0430 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0432\\u0430\\u0440\\u044B\\u044F\\u043D\\u0442: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F \\u0430\\u0434\\u0437\\u0456\\u043D \\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let l=Number(t.maximum),v=Ou(l,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let l=Number(t.minimum),v=Ou(l,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u043F\\u0430\\u0447\\u044B\\u043D\\u0430\\u0446\\u0446\\u0430 \\u0437 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0432\\u0430\\u0446\\u0446\\u0430 \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u043C\\u044F\\u0448\\u0447\\u0430\\u0446\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0430\\u0434\\u043F\\u0430\\u0432\\u044F\\u0434\\u0430\\u0446\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B ".concat((s=i[c.format])!=null?s:t.format)}case"not_multiple_of":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043B\\u0456\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0431\\u044B\\u0446\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u0430\\u0437\\u043D\\u0430\\u043D\\u044B ".concat(t.keys.length>1?"\\u043A\\u043B\\u044E\\u0447\\u044B":"\\u043A\\u043B\\u044E\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434";case"invalid_element":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u0430\\u0435 \\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435 \\u045E ".concat(t.origin);default:return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434"}}};function Pu(){return{localeError:wl()}}var Sl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(e))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},jl=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u0432\\u0445\\u043E\\u0434",email:"\\u0438\\u043C\\u0435\\u0439\\u043B \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0436\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u043F\\u0440\\u043E\\u0434\\u044A\\u043B\\u0436\\u0438\\u0442\\u0435\\u043B\\u043D\\u043E\\u0441\\u0442",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"base64-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",base64url:"base64url-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",json_string:"JSON \\u043D\\u0438\\u0437",e164:"E.164 \\u043D\\u043E\\u043C\\u0435\\u0440",jwt:"JWT",template_literal:"\\u0432\\u0445\\u043E\\u0434"};return i=>{var t,o,u,s;switch(i.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(i.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D ").concat(Sl(i.input));case"invalid_value":return i.values.length===1?"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(b(i.values[0])):"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u044F: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D\\u043E \\u0435\\u0434\\u043D\\u043E \\u043E\\u0442 ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((t=i.origin)!=null?t:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430"):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((u=i.origin)!=null?u:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;if(c.format==="starts_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u0432\\u0430 \\u0441 "\'.concat(c.prefix,\'"\');if(c.format==="ends_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u044A\\u0440\\u0448\\u0432\\u0430 \\u0441 "\'.concat(c.suffix,\'"\');if(c.format==="includes")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0432\\u0430 "\'.concat(c.includes,\'"\');if(c.format==="regex")return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0441\\u044A\\u0432\\u043F\\u0430\\u0434\\u0430 \\u0441 ".concat(c.pattern);let a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D";return c.format==="emoji"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="datetime"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="date"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),c.format==="time"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="duration"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),"".concat(a," ").concat((s=n[c.format])!=null?s:i.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 \\u043A\\u0440\\u0430\\u0442\\u043D\\u043E \\u043D\\u0430 ".concat(i.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0437\\u043F\\u043E\\u0437\\u043D\\u0430\\u0442".concat(i.keys.length>1?"\\u0438":""," \\u043A\\u043B\\u044E\\u0447").concat(i.keys.length>1?"\\u043E\\u0432\\u0435":"",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(i.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442 \\u0432 ".concat(i.origin);default:return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434"}}};function Uu(){return{localeError:jl()}}var Ol=()=>{let e={string:{unit:"car\\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entrada",email:"adre\\xE7a electr\\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\\xE7a IPv4",ipv6:"adre\\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Tipus inv\\xE0lid: s\'esperava ".concat(t.expected,", s\'ha rebut ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Valor inv\\xE0lid: s\'esperava ".concat(b(t.values[0])):"Opci\\xF3 inv\\xE0lida: s\'esperava una de ".concat(p(t.values," o "));case"too_big":{let a=t.inclusive?"com a m\\xE0xim":"menys de",l=r(t.origin);return l?"Massa gran: s\'esperava que ".concat((o=t.origin)!=null?o:"el valor"," contingu\\xE9s ").concat(a," ").concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elements"):"Massa gran: s\'esperava que ".concat((s=t.origin)!=null?s:"el valor"," fos ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"com a m\\xEDnim":"m\\xE9s de",l=r(t.origin);return l?"Massa petit: s\'esperava que ".concat(t.origin," contingu\\xE9s ").concat(a," ").concat(t.minimum.toString()," ").concat(l.unit):"Massa petit: s\'esperava que ".concat(t.origin," fos ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Format inv\\xE0lid: ha de comen\\xE7ar amb "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?"Format inv\\xE0lid: ha d\'acabar amb \\"".concat(a.suffix,\'"\'):a.format==="includes"?"Format inv\\xE0lid: ha d\'incloure \\"".concat(a.includes,\'"\'):a.format==="regex"?"Format inv\\xE0lid: ha de coincidir amb el patr\\xF3 ".concat(a.pattern):"Format inv\\xE0lid per a ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE0lid: ha de ser m\\xFAltiple de ".concat(t.divisor);case"unrecognized_keys":return"Clau".concat(t.keys.length>1?"s":""," no reconeguda").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Clau inv\\xE0lida a ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE0lida";case"invalid_element":return"Element inv\\xE0lid a ".concat(t.origin);default:return"Entrada inv\\xE0lida"}}};function Nu(){return{localeError:Ol()}}var Pl=()=>{let e={string:{unit:"znak\\u016F",verb:"m\\xEDt"},file:{unit:"bajt\\u016F",verb:"m\\xEDt"},array:{unit:"prvk\\u016F",verb:"m\\xEDt"},set:{unit:"prvk\\u016F",verb:"m\\xEDt"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u010D\\xEDslo";case"string":return"\\u0159et\\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regul\\xE1rn\\xED v\\xFDraz",email:"e-mailov\\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \\u010Das ve form\\xE1tu ISO",date:"datum ve form\\xE1tu ISO",time:"\\u010Das ve form\\xE1tu ISO",duration:"doba trv\\xE1n\\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64",base64url:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64url",json_string:"\\u0159et\\u011Bzec ve form\\xE1tu JSON",e164:"\\u010D\\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return t=>{var o,u,s,c,a,l,v;switch(t.code){case"invalid_type":return"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(t.expected,", obdr\\u017Eeno ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(b(t.values[0])):"Neplatn\\xE1 mo\\u017Enost: o\\u010Dek\\xE1v\\xE1na jedna z hodnot ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((o=t.origin)!=null?o:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((s=t.origin)!=null?s:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((c=t.origin)!=null?c:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((l=t.origin)!=null?l:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED za\\u010D\\xEDnat na "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED kon\\u010Dit na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED obsahovat "\'.concat(f.includes,\'"\'):f.format==="regex"?"Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED odpov\\xEDdat vzoru ".concat(f.pattern):"Neplatn\\xFD form\\xE1t ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Neplatn\\xE9 \\u010D\\xEDslo: mus\\xED b\\xFDt n\\xE1sobkem ".concat(t.divisor);case"unrecognized_keys":return"Nezn\\xE1m\\xE9 kl\\xED\\u010De: ".concat(p(t.keys,", "));case"invalid_key":return"Neplatn\\xFD kl\\xED\\u010D v ".concat(t.origin);case"invalid_union":return"Neplatn\\xFD vstup";case"invalid_element":return"Neplatn\\xE1 hodnota v ".concat(t.origin);default:return"Neplatn\\xFD vstup"}}};function Zu(){return{localeError:Pl()}}var Ul=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},r={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\\xE6t",file:"fil"};function n(u){var s;return(s=e[u])!=null?s:null}function i(u){var s;return(s=r[u])!=null?s:u}let t=u=>{let s=typeof u;switch(s){case"number":return Number.isNaN(u)?"NaN":"tal";case"object":return Array.isArray(u)?"liste":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype&&u.constructor?u.constructor.name:"objekt"}return s},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\\xE6t",date:"ISO-dato",time:"ISO-klokkesl\\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return u=>{var s,c;switch(u.code){case"invalid_type":return"Ugyldigt input: forventede ".concat(i(u.expected),", fik ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Ugyldig v\\xE6rdi: forventede ".concat(b(u.values[0])):"Ugyldigt valg: forventede en af f\\xF8lgende ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",l=n(u.origin),v=i(u.origin);return l?"For stor: forventede ".concat(v!=null?v:"value"," ").concat(l.verb," ").concat(a," ").concat(u.maximum.toString()," ").concat((s=l.unit)!=null?s:"elementer"):"For stor: forventede ".concat(v!=null?v:"value"," havde ").concat(a," ").concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",l=n(u.origin),v=i(u.origin);return l?"For lille: forventede ".concat(v," ").concat(l.verb," ").concat(a," ").concat(u.minimum.toString()," ").concat(l.unit):"For lille: forventede ".concat(v," havde ").concat(a," ").concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Ugyldig streng: skal starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: skal ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: skal indeholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: skal matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"Ugyldigt tal: skal v\\xE6re deleligt med ".concat(u.divisor);case"unrecognized_keys":return"".concat(u.keys.length>1?"Ukendte n\\xF8gler":"Ukendt n\\xF8gle",": ").concat(p(u.keys,", "));case"invalid_key":return"Ugyldig n\\xF8gle i ".concat(u.origin);case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return"Ugyldig v\\xE6rdi i ".concat(u.origin);default:return"Ugyldigt input"}}};function Du(){return{localeError:Ul()}}var Nl=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Ung\\xFCltige Eingabe: erwartet ".concat(t.expected,", erhalten ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ung\\xFCltige Eingabe: erwartet ".concat(b(t.values[0])):"Ung\\xFCltige Option: erwartet eine von ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Zu gro\\xDF: erwartet, dass ".concat((o=t.origin)!=null?o:"Wert"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"Elemente"," hat"):"Zu gro\\xDF: erwartet, dass ".concat((s=t.origin)!=null?s:"Wert"," ").concat(a).concat(t.maximum.toString()," ist")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," hat"):"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ist")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.suffix,\'" enden\'):a.format==="includes"?\'Ung\\xFCltiger String: muss "\'.concat(a.includes,\'" enthalten\'):a.format==="regex"?"Ung\\xFCltiger String: muss dem Muster ".concat(a.pattern," entsprechen"):"Ung\\xFCltig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ung\\xFCltige Zahl: muss ein Vielfaches von ".concat(t.divisor," sein");case"unrecognized_keys":return"".concat(t.keys.length>1?"Unbekannte Schl\\xFCssel":"Unbekannter Schl\\xFCssel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ung\\xFCltiger Schl\\xFCssel in ".concat(t.origin);case"invalid_union":return"Ung\\xFCltige Eingabe";case"invalid_element":return"Ung\\xFCltiger Wert in ".concat(t.origin);default:return"Ung\\xFCltige Eingabe"}}};function Tu(){return{localeError:Nl()}}var Zl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Dl=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{var t,o,u,s;switch(i.code){case"invalid_type":return"Invalid input: expected ".concat(i.expected,", received ").concat(Zl(i.input));case"invalid_value":return i.values.length===1?"Invalid input: expected ".concat(b(i.values[0])):"Invalid option: expected one of ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Too big: expected ".concat((t=i.origin)!=null?t:"value"," to have ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elements"):"Too big: expected ".concat((u=i.origin)!=null?u:"value"," to be ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Too small: expected ".concat(i.origin," to have ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Too small: expected ".concat(i.origin," to be ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Invalid string: must start with "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Invalid string: must end with "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Invalid string: must include "\'.concat(c.includes,\'"\'):c.format==="regex"?"Invalid string: must match pattern ".concat(c.pattern):"Invalid ".concat((s=n[c.format])!=null?s:i.format)}case"not_multiple_of":return"Invalid number: must be a multiple of ".concat(i.divisor);case"unrecognized_keys":return"Unrecognized key".concat(i.keys.length>1?"s":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Invalid key in ".concat(i.origin);case"invalid_union":return"Invalid input";case"invalid_element":return"Invalid value in ".concat(i.origin);default:return"Invalid input"}}};function tr(){return{localeError:Dl()}}var Tl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},El=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{var t,o,u,s;switch(i.code){case"invalid_type":return"Nevalida enigo: atendi\\u011Dis ".concat(i.expected,", ricevi\\u011Dis ").concat(Tl(i.input));case"invalid_value":return i.values.length===1?"Nevalida enigo: atendi\\u011Dis ".concat(b(i.values[0])):"Nevalida opcio: atendi\\u011Dis unu el ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Tro granda: atendi\\u011Dis ke ".concat((t=i.origin)!=null?t:"valoro"," havu ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elementojn"):"Tro granda: atendi\\u011Dis ke ".concat((u=i.origin)!=null?u:"valoro"," havu ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," havu ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," estu ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Nevalida karaktraro: devas komenci\\u011Di per "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Nevalida karaktraro: devas fini\\u011Di per "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Nevalida karaktraro: devas inkluzivi "\'.concat(c.includes,\'"\'):c.format==="regex"?"Nevalida karaktraro: devas kongrui kun la modelo ".concat(c.pattern):"Nevalida ".concat((s=n[c.format])!=null?s:i.format)}case"not_multiple_of":return"Nevalida nombro: devas esti oblo de ".concat(i.divisor);case"unrecognized_keys":return"Nekonata".concat(i.keys.length>1?"j":""," \\u015Dlosilo").concat(i.keys.length>1?"j":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Nevalida \\u015Dlosilo en ".concat(i.origin);case"invalid_union":return"Nevalida enigo";case"invalid_element":return"Nevalida valoro en ".concat(i.origin);default:return"Nevalida enigo"}}};function Eu(){return{localeError:El()}}var Al=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},r={string:"texto",number:"n\\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\\xFAmero grande",symbol:"s\\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\\xF3n",union:"uni\\xF3n",literal:"literal",promise:"promesa",void:"vac\\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(u){var s;return(s=e[u])!=null?s:null}function i(u){var s;return(s=r[u])!=null?s:u}let t=u=>{let s=typeof u;switch(s){case"number":return Number.isNaN(u)?"NaN":"number";case"object":return Array.isArray(u)?"array":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype?u.constructor.name:"object"}return s},o={regex:"entrada",email:"direcci\\xF3n de correo electr\\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\\xF3n ISO",ipv4:"direcci\\xF3n IPv4",ipv6:"direcci\\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return u=>{var s,c;switch(u.code){case"invalid_type":return"Entrada inv\\xE1lida: se esperaba ".concat(i(u.expected),", recibido ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Entrada inv\\xE1lida: se esperaba ".concat(b(u.values[0])):"Opci\\xF3n inv\\xE1lida: se esperaba una de ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",l=n(u.origin),v=i(u.origin);return l?"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," tuviera ").concat(a).concat(u.maximum.toString()," ").concat((s=l.unit)!=null?s:"elementos"):"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," fuera ").concat(a).concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",l=n(u.origin),v=i(u.origin);return l?"Demasiado peque\\xF1o: se esperaba que ".concat(v," tuviera ").concat(a).concat(u.minimum.toString()," ").concat(l.unit):"Demasiado peque\\xF1o: se esperaba que ".concat(v," fuera ").concat(a).concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Cadena inv\\xE1lida: debe comenzar con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cadena inv\\xE1lida: debe terminar en "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cadena inv\\xE1lida: debe incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cadena inv\\xE1lida: debe coincidir con el patr\\xF3n ".concat(a.pattern):"Inv\\xE1lido ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: debe ser m\\xFAltiplo de ".concat(u.divisor);case"unrecognized_keys":return"Llave".concat(u.keys.length>1?"s":""," desconocida").concat(u.keys.length>1?"s":"",": ").concat(p(u.keys,", "));case"invalid_key":return"Llave inv\\xE1lida en ".concat(i(u.origin));case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido en ".concat(i(u.origin));default:return"Entrada inv\\xE1lida"}}};function Au(){return{localeError:Al()}}var Rl=()=>{let e={string:{unit:"\\u06A9\\u0627\\u0631\\u0627\\u06A9\\u062A\\u0631",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},file:{unit:"\\u0628\\u0627\\u06CC\\u062A",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},array:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},set:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u0627\\u06CC\\u0647";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u06CC",email:"\\u0622\\u062F\\u0631\\u0633 \\u0627\\u06CC\\u0645\\u06CC\\u0644",url:"URL",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0648 \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",date:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0627\\u06CC\\u0632\\u0648",time:"\\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",duration:"\\u0645\\u062F\\u062A \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",ipv4:"IPv4 \\u0622\\u062F\\u0631\\u0633",ipv6:"IPv6 \\u0622\\u062F\\u0631\\u0633",cidrv4:"IPv4 \\u062F\\u0627\\u0645\\u0646\\u0647",cidrv6:"IPv6 \\u062F\\u0627\\u0645\\u0646\\u0647",base64:"base64-encoded \\u0631\\u0634\\u062A\\u0647",base64url:"base64url-encoded \\u0631\\u0634\\u062A\\u0647",json_string:"JSON \\u0631\\u0634\\u062A\\u0647",e164:"E.164 \\u0639\\u062F\\u062F",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u06CC"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(t.expected," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F\\u060C ").concat(n(t.input)," \\u062F\\u0631\\u06CC\\u0627\\u0641\\u062A \\u0634\\u062F");case"invalid_value":return t.values.length===1?"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(b(t.values[0])," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F"):"\\u06AF\\u0632\\u06CC\\u0646\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A \\u06CC\\u06A9\\u06CC \\u0627\\u0632 ".concat(p(t.values,"|")," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F");case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((o=t.origin)!=null?o:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((s=t.origin)!=null?s:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.prefix,\'" \\u0634\\u0631\\u0648\\u0639 \\u0634\\u0648\\u062F\'):a.format==="ends_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.suffix,\'" \\u062A\\u0645\\u0627\\u0645 \\u0634\\u0648\\u062F\'):a.format==="includes"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0634\\u0627\\u0645\\u0644 "\'.concat(a.includes,\'" \\u0628\\u0627\\u0634\\u062F\'):a.format==="regex"?"\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 \\u0627\\u0644\\u06AF\\u0648\\u06CC ".concat(a.pattern," \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631")}case"not_multiple_of":return"\\u0639\\u062F\\u062F \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0645\\u0636\\u0631\\u0628 ".concat(t.divisor," \\u0628\\u0627\\u0634\\u062F");case"unrecognized_keys":return"\\u06A9\\u0644\\u06CC\\u062F".concat(t.keys.length>1?"\\u0647\\u0627\\u06CC":""," \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633: ").concat(p(t.keys,", "));case"invalid_key":return"\\u06A9\\u0644\\u06CC\\u062F \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633 \\u062F\\u0631 ".concat(t.origin);case"invalid_union":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631";case"invalid_element":return"\\u0645\\u0642\\u062F\\u0627\\u0631 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631 \\u062F\\u0631 ".concat(t.origin);default:return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631"}}};function Ru(){return{localeError:Rl()}}var Ll=()=>{let e={string:{unit:"merkki\\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4n"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"s\\xE4\\xE4nn\\xF6llinen lauseke",email:"s\\xE4hk\\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{var o;switch(t.code){case"invalid_type":return"Virheellinen tyyppi: odotettiin ".concat(t.expected,", oli ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Virheellinen sy\\xF6te: t\\xE4ytyy olla ".concat(b(t.values[0])):"Virheellinen valinta: t\\xE4ytyy olla yksi seuraavista: ".concat(p(t.values,"|"));case"too_big":{let u=t.inclusive?"<=":"<",s=r(t.origin);return s?"Liian suuri: ".concat(s.subject," t\\xE4ytyy olla ").concat(u).concat(t.maximum.toString()," ").concat(s.unit).trim():"Liian suuri: arvon t\\xE4ytyy olla ".concat(u).concat(t.maximum.toString())}case"too_small":{let u=t.inclusive?">=":">",s=r(t.origin);return s?"Liian pieni: ".concat(s.subject," t\\xE4ytyy olla ").concat(u).concat(t.minimum.toString()," ").concat(s.unit).trim():"Liian pieni: arvon t\\xE4ytyy olla ".concat(u).concat(t.minimum.toString())}case"invalid_format":{let u=t;return u.format==="starts_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy alkaa "\'.concat(u.prefix,\'"\'):u.format==="ends_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy loppua "\'.concat(u.suffix,\'"\'):u.format==="includes"?\'Virheellinen sy\\xF6te: t\\xE4ytyy sis\\xE4lt\\xE4\\xE4 "\'.concat(u.includes,\'"\'):u.format==="regex"?"Virheellinen sy\\xF6te: t\\xE4ytyy vastata s\\xE4\\xE4nn\\xF6llist\\xE4 lauseketta ".concat(u.pattern):"Virheellinen ".concat((o=i[u.format])!=null?o:t.format)}case"not_multiple_of":return"Virheellinen luku: t\\xE4ytyy olla luvun ".concat(t.divisor," monikerta");case"unrecognized_keys":return"".concat(t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain",": ").concat(p(t.keys,", "));case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\\xF6te"}}};function Lu(){return{localeError:Ll()}}var Cl=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : ".concat(t.expected," attendu, ").concat(n(t.input)," re\\xE7u");case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : ".concat(b(t.values[0])," attendu"):"Option invalide : une valeur parmi ".concat(p(t.values,"|")," attendue");case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Trop grand : ".concat((o=t.origin)!=null?o:"valeur"," doit ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\xE9l\\xE9ment(s)"):"Trop grand : ".concat((s=t.origin)!=null?s:"valeur"," doit \\xEAtre ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Trop petit : ".concat(t.origin," doit ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Trop petit : ".concat(t.origin," doit \\xEAtre ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cha\\xEEne invalide : doit correspondre au mod\\xE8le ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Cu(){return{localeError:Cl()}}var Vl=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,s;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : attendu ".concat(t.expected,", re\\xE7u ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : attendu ".concat(b(t.values[0])):"Option invalide : attendu l\'une des valeurs suivantes ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"\\u2264":"<",a=r(t.origin);return a?"Trop grand : attendu que ".concat((o=t.origin)!=null?o:"la valeur"," ait ").concat(c).concat(t.maximum.toString()," ").concat(a.unit):"Trop grand : attendu que ".concat((u=t.origin)!=null?u:"la valeur"," soit ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?"\\u2265":">",a=r(t.origin);return a?"Trop petit : attendu que ".concat(t.origin," ait ").concat(c).concat(t.minimum.toString()," ").concat(a.unit):"Trop petit : attendu que ".concat(t.origin," soit ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(c.includes,\'"\'):c.format==="regex"?"Cha\\xEEne invalide : doit correspondre au motif ".concat(c.pattern):"".concat((s=i[c.format])!=null?s:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Vu(){return{localeError:Vl()}}var Fl=()=>{let e={string:{unit:"\\u05D0\\u05D5\\u05EA\\u05D9\\u05D5\\u05EA",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},file:{unit:"\\u05D1\\u05D9\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},array:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},set:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u05E7\\u05DC\\u05D8",email:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05D0\\u05D9\\u05DE\\u05D9\\u05D9\\u05DC",url:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05E8\\u05E9\\u05EA",emoji:"\\u05D0\\u05D9\\u05DE\\u05D5\\u05D2\'\\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA \\u05D5\\u05D6\\u05DE\\u05DF ISO",date:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA ISO",time:"\\u05D6\\u05DE\\u05DF ISO",duration:"\\u05DE\\u05E9\\u05DA \\u05D6\\u05DE\\u05DF ISO",ipv4:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv4",ipv6:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv6",cidrv4:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv4",cidrv6:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv6",base64:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64",base64url:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64 \\u05DC\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA \\u05E8\\u05E9\\u05EA",json_string:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA JSON",e164:"\\u05DE\\u05E1\\u05E4\\u05E8 E.164",jwt:"JWT",template_literal:"\\u05E7\\u05DC\\u05D8"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(t.expected,", \\u05D4\\u05EA\\u05E7\\u05D1\\u05DC ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(b(t.values[0])):"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA \\u05D0\\u05D7\\u05EA \\u05DE\\u05D4\\u05D0\\u05E4\\u05E9\\u05E8\\u05D5\\u05D9\\u05D5\\u05EA ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((o=t.origin)!=null?o:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elements"):"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((s=t.origin)!=null?s:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D7\\u05D9\\u05DC \\u05D1"\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05E1\\u05EA\\u05D9\\u05D9\\u05DD \\u05D1 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05DB\\u05DC\\u05D5\\u05DC "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D0\\u05D9\\u05DD \\u05DC\\u05EA\\u05D1\\u05E0\\u05D9\\u05EA ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF")}case"not_multiple_of":return"\\u05DE\\u05E1\\u05E4\\u05E8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D7\\u05D9\\u05D9\\u05D1 \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA \\u05DE\\u05DB\\u05E4\\u05DC\\u05D4 \\u05E9\\u05DC ".concat(t.divisor);case"unrecognized_keys":return"\\u05DE\\u05E4\\u05EA\\u05D7".concat(t.keys.length>1?"\\u05D5\\u05EA":""," \\u05DC\\u05D0 \\u05DE\\u05D6\\u05D5\\u05D4").concat(t.keys.length>1?"\\u05D9\\u05DD":"\\u05D4",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u05DE\\u05E4\\u05EA\\u05D7 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);case"invalid_union":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF";case"invalid_element":return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);default:return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF"}}};function Fu(){return{localeError:Fl()}}var Jl=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"sz\\xE1m";case"object":{if(Array.isArray(t))return"t\\xF6mb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"bemenet",email:"email c\\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\\u0151b\\xE9lyeg",date:"ISO d\\xE1tum",time:"ISO id\\u0151",duration:"ISO id\\u0151intervallum",ipv4:"IPv4 c\\xEDm",ipv6:"IPv6 c\\xEDm",cidrv4:"IPv4 tartom\\xE1ny",cidrv6:"IPv6 tartom\\xE1ny",base64:"base64-k\\xF3dolt string",base64url:"base64url-k\\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\\xE1m",jwt:"JWT",template_literal:"bemenet"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(t.expected,", a kapott \\xE9rt\\xE9k ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(b(t.values[0])):"\\xC9rv\\xE9nytelen opci\\xF3: valamelyik \\xE9rt\\xE9k v\\xE1rt ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"T\\xFAl nagy: ".concat((o=t.origin)!=null?o:"\\xE9rt\\xE9k"," m\\xE9rete t\\xFAl nagy ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elem"):"T\\xFAl nagy: a bemeneti \\xE9rt\\xE9k ".concat((s=t.origin)!=null?s:"\\xE9rt\\xE9k"," t\\xFAl nagy: ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," m\\xE9rete t\\xFAl kicsi ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," t\\xFAl kicsi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.prefix,\'" \\xE9rt\\xE9kkel kell kezd\\u0151dnie\'):a.format==="ends_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.suffix,\'" \\xE9rt\\xE9kkel kell v\\xE9gz\\u0151dnie\'):a.format==="includes"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.includes,\'" \\xE9rt\\xE9ket kell tartalmaznia\'):a.format==="regex"?"\\xC9rv\\xE9nytelen string: ".concat(a.pattern," mint\\xE1nak kell megfelelnie"):"\\xC9rv\\xE9nytelen ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\xC9rv\\xE9nytelen sz\\xE1m: ".concat(t.divisor," t\\xF6bbsz\\xF6r\\xF6s\\xE9nek kell lennie");case"unrecognized_keys":return"Ismeretlen kulcs".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\xC9rv\\xE9nytelen kulcs ".concat(t.origin);case"invalid_union":return"\\xC9rv\\xE9nytelen bemenet";case"invalid_element":return"\\xC9rv\\xE9nytelen \\xE9rt\\xE9k: ".concat(t.origin);default:return"\\xC9rv\\xE9nytelen bemenet"}}};function Ju(){return{localeError:Jl()}}var Ml=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Input tidak valid: diharapkan ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak valid: diharapkan ".concat(b(t.values[0])):"Pilihan tidak valid: diharapkan salah satu dari ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Terlalu besar: diharapkan ".concat((o=t.origin)!=null?o:"value"," memiliki ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elemen"):"Terlalu besar: diharapkan ".concat((s=t.origin)!=null?s:"value"," menjadi ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Terlalu kecil: diharapkan ".concat(t.origin," memiliki ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Terlalu kecil: diharapkan ".concat(t.origin," menjadi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak valid: harus dimulai dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak valid: harus berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak valid: harus menyertakan "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak valid: harus sesuai pola ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak valid")}case"not_multiple_of":return"Angka tidak valid: harus kelipatan dari ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak valid di ".concat(t.origin);case"invalid_union":return"Input tidak valid";case"invalid_element":return"Nilai tidak valid di ".concat(t.origin);default:return"Input tidak valid"}}};function Mu(){return{localeError:Ml()}}var Bl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"n\\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Kl=()=>{let e={string:{unit:"stafi",verb:"a\\xF0 hafa"},file:{unit:"b\\xE6ti",verb:"a\\xF0 hafa"},array:{unit:"hluti",verb:"a\\xF0 hafa"},set:{unit:"hluti",verb:"a\\xF0 hafa"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"gildi",email:"netfang",url:"vefsl\\xF3\\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\\xEDmi",date:"ISO dagsetning",time:"ISO t\\xEDmi",duration:"ISO t\\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return i=>{var t,o,u,s;switch(i.code){case"invalid_type":return"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(Bl(i.input)," \\xFEar sem \\xE1 a\\xF0 vera ").concat(i.expected);case"invalid_value":return i.values.length===1?"Rangt gildi: gert r\\xE1\\xF0 fyrir ".concat(b(i.values[0])):"\\xD3gilt val: m\\xE1 vera eitt af eftirfarandi ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((t=i.origin)!=null?t:"gildi"," hafi ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"hluti"):"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((u=i.origin)!=null?u:"gildi"," s\\xE9 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," hafi ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," s\\xE9 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 byrja \\xE1 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 enda \\xE1 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 innihalda "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\xD3gildur strengur: ver\\xF0ur a\\xF0 fylgja mynstri ".concat(c.pattern):"Rangt ".concat((s=n[c.format])!=null?s:i.format)}case"not_multiple_of":return"R\\xF6ng tala: ver\\xF0ur a\\xF0 vera margfeldi af ".concat(i.divisor);case"unrecognized_keys":return"\\xD3\\xFEekkt ".concat(i.keys.length>1?"ir lyklar":"ur lykill",": ").concat(p(i.keys,", "));case"invalid_key":return"Rangur lykill \\xED ".concat(i.origin);case"invalid_union":return"Rangt gildi";case"invalid_element":return"Rangt gildi \\xED ".concat(i.origin);default:return"Rangt gildi"}}};function Bu(){return{localeError:Kl()}}var Gl=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Input non valido: atteso ".concat(t.expected,", ricevuto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input non valido: atteso ".concat(b(t.values[0])):"Opzione non valida: atteso uno tra ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Troppo grande: ".concat((o=t.origin)!=null?o:"valore"," deve avere ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementi"):"Troppo grande: ".concat((s=t.origin)!=null?s:"valore"," deve essere ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Troppo piccolo: ".concat(t.origin," deve avere ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Troppo piccolo: ".concat(t.origin," deve essere ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Stringa non valida: deve iniziare con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Stringa non valida: deve terminare con "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Stringa non valida: deve includere "\'.concat(a.includes,\'"\'):a.format==="regex"?"Stringa non valida: deve corrispondere al pattern ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Numero non valido: deve essere un multiplo di ".concat(t.divisor);case"unrecognized_keys":return"Chiav".concat(t.keys.length>1?"i":"e"," non riconosciut").concat(t.keys.length>1?"e":"a",": ").concat(p(t.keys,", "));case"invalid_key":return"Chiave non valida in ".concat(t.origin);case"invalid_union":return"Input non valido";case"invalid_element":return"Valore non valido in ".concat(t.origin);default:return"Input non valido"}}};function Ku(){return{localeError:Gl()}}var Wl=()=>{let e={string:{unit:"\\u6587\\u5B57",verb:"\\u3067\\u3042\\u308B"},file:{unit:"\\u30D0\\u30A4\\u30C8",verb:"\\u3067\\u3042\\u308B"},array:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"},set:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u6570\\u5024";case"object":{if(Array.isArray(t))return"\\u914D\\u5217";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u5165\\u529B\\u5024",email:"\\u30E1\\u30FC\\u30EB\\u30A2\\u30C9\\u30EC\\u30B9",url:"URL",emoji:"\\u7D75\\u6587\\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u6642",date:"ISO\\u65E5\\u4ED8",time:"ISO\\u6642\\u523B",duration:"ISO\\u671F\\u9593",ipv4:"IPv4\\u30A2\\u30C9\\u30EC\\u30B9",ipv6:"IPv6\\u30A2\\u30C9\\u30EC\\u30B9",cidrv4:"IPv4\\u7BC4\\u56F2",cidrv6:"IPv6\\u7BC4\\u56F2",base64:"base64\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",base64url:"base64url\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",json_string:"JSON\\u6587\\u5B57\\u5217",e164:"E.164\\u756A\\u53F7",jwt:"JWT",template_literal:"\\u5165\\u529B\\u5024"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(t.expected,"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F\\u304C\\u3001").concat(n(t.input),"\\u304C\\u5165\\u529B\\u3055\\u308C\\u307E\\u3057\\u305F");case"invalid_value":return t.values.length===1?"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(b(t.values[0]),"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F"):"\\u7121\\u52B9\\u306A\\u9078\\u629E: ".concat(p(t.values,"\\u3001"),"\\u306E\\u3044\\u305A\\u308C\\u304B\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"too_big":{let a=t.inclusive?"\\u4EE5\\u4E0B\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5C0F\\u3055\\u3044",l=r(t.origin);return l?"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((o=t.origin)!=null?o:"\\u5024","\\u306F").concat(t.maximum.toString()).concat((u=l.unit)!=null?u:"\\u8981\\u7D20").concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((s=t.origin)!=null?s:"\\u5024","\\u306F").concat(t.maximum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"too_small":{let a=t.inclusive?"\\u4EE5\\u4E0A\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5927\\u304D\\u3044",l=r(t.origin);return l?"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(l.unit).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.prefix,\'"\\u3067\\u59CB\\u307E\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="ends_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.suffix,\'"\\u3067\\u7D42\\u308F\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="includes"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.includes,\'"\\u3092\\u542B\\u3080\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="regex"?"\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: \\u30D1\\u30BF\\u30FC\\u30F3".concat(a.pattern,"\\u306B\\u4E00\\u81F4\\u3059\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u7121\\u52B9\\u306A".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u52B9\\u306A\\u6570\\u5024: ".concat(t.divisor,"\\u306E\\u500D\\u6570\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"unrecognized_keys":return"\\u8A8D\\u8B58\\u3055\\u308C\\u3066\\u3044\\u306A\\u3044\\u30AD\\u30FC".concat(t.keys.length>1?"\\u7FA4":"",": ").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u30AD\\u30FC");case"invalid_union":return"\\u7121\\u52B9\\u306A\\u5165\\u529B";case"invalid_element":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u5024");default:return"\\u7121\\u52B9\\u306A\\u5165\\u529B"}}};function Gu(){return{localeError:Wl()}}var Xl=e=>{var i;let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8";case"object":{if(Array.isArray(e))return"\\u10DB\\u10D0\\u10E1\\u10D8\\u10D5\\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return(i={string:"\\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",boolean:"\\u10D1\\u10E3\\u10DA\\u10D4\\u10D0\\u10DC\\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\\u10E4\\u10E3\\u10DC\\u10E5\\u10EA\\u10D8\\u10D0"}[r])!=null?i:r},ql=()=>{let e={string:{unit:"\\u10E1\\u10D8\\u10DB\\u10D1\\u10DD\\u10DA\\u10DD",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},file:{unit:"\\u10D1\\u10D0\\u10D8\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},array:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},set:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0",email:"\\u10D4\\u10DA-\\u10E4\\u10DD\\u10E1\\u10E2\\u10D8\\u10E1 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",url:"URL",emoji:"\\u10D4\\u10DB\\u10DD\\u10EF\\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8-\\u10D3\\u10E0\\u10DD",date:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8",time:"\\u10D3\\u10E0\\u10DD",duration:"\\u10EE\\u10D0\\u10DC\\u10D2\\u10E0\\u10EB\\u10DA\\u10D8\\u10D5\\u10DD\\u10D1\\u10D0",ipv4:"IPv4 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",ipv6:"IPv6 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",cidrv4:"IPv4 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",cidrv6:"IPv6 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",base64:"base64-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",base64url:"base64url-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",json_string:"JSON \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",e164:"E.164 \\u10DC\\u10DD\\u10DB\\u10D4\\u10E0\\u10D8",jwt:"JWT",template_literal:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"};return i=>{var t,o,u;switch(i.code){case"invalid_type":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.expected,", \\u10DB\\u10D8\\u10E6\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 ").concat(Xl(i.input));case"invalid_value":return i.values.length===1?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(b(i.values[0])):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D5\\u10D0\\u10E0\\u10D8\\u10D0\\u10DC\\u10E2\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8\\u10D0 \\u10D4\\u10E0\\u10D7-\\u10D4\\u10E0\\u10D7\\u10D8 ".concat(p(i.values,"|"),"-\\u10D3\\u10D0\\u10DC");case"too_big":{let s=i.inclusive?"<=":"<",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((t=i.origin)!=null?t:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," ").concat(c.verb," ").concat(s).concat(i.maximum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((o=i.origin)!=null?o:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(s).concat(i.maximum.toString())}case"too_small":{let s=i.inclusive?">=":">",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," ").concat(c.verb," ").concat(s).concat(i.minimum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(s).concat(i.minimum.toString())}case"invalid_format":{let s=i;return s.format==="starts_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10EC\\u10E7\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(s.prefix,\'"-\\u10D8\\u10D7\'):s.format==="ends_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10DB\\u10D7\\u10D0\\u10D5\\u10E0\\u10D3\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(s.suffix,\'"-\\u10D8\\u10D7\'):s.format==="includes"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1 "\'.concat(s.includes,\'"-\\u10E1\'):s.format==="regex"?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D4\\u10E1\\u10D0\\u10D1\\u10D0\\u10DB\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 \\u10E8\\u10D0\\u10D1\\u10DA\\u10DD\\u10DC\\u10E1 ".concat(s.pattern):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 ".concat((u=n[s.format])!=null?u:i.format)}case"not_multiple_of":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10E7\\u10DD\\u10E1 ".concat(i.divisor,"-\\u10D8\\u10E1 \\u10EF\\u10D4\\u10E0\\u10D0\\u10D3\\u10D8");case"unrecognized_keys":return"\\u10E3\\u10EA\\u10DC\\u10DD\\u10D1\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1".concat(i.keys.length>1?"\\u10D4\\u10D1\\u10D8":"\\u10D8",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1\\u10D8 ".concat(i.origin,"-\\u10E8\\u10D8");case"invalid_union":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0";case"invalid_element":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0 ".concat(i.origin,"-\\u10E8\\u10D8");default:return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"}}};function Wu(){return{localeError:ql()}}var Yl=()=>{let e={string:{unit:"\\u178F\\u17BD\\u17A2\\u1780\\u17D2\\u179F\\u179A",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},file:{unit:"\\u1794\\u17C3",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},array:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},set:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u1798\\u17B7\\u1793\\u1798\\u17C2\\u1793\\u1787\\u17B6\\u179B\\u17C1\\u1781 (NaN)":"\\u179B\\u17C1\\u1781";case"object":{if(Array.isArray(t))return"\\u17A2\\u17B6\\u179A\\u17C1 (Array)";if(t===null)return"\\u1782\\u17D2\\u1798\\u17B6\\u1793\\u178F\\u1798\\u17D2\\u179B\\u17C3 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B",email:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793\\u17A2\\u17CA\\u17B8\\u1798\\u17C2\\u179B",url:"URL",emoji:"\\u179F\\u1789\\u17D2\\u1789\\u17B6\\u17A2\\u17B6\\u179A\\u1798\\u17D2\\u1798\\u178E\\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 \\u1793\\u17B7\\u1784\\u1798\\u17C9\\u17C4\\u1784 ISO",date:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 ISO",time:"\\u1798\\u17C9\\u17C4\\u1784 ISO",duration:"\\u179A\\u1799\\u17C8\\u1796\\u17C1\\u179B ISO",ipv4:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",ipv6:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",cidrv4:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",cidrv6:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",base64:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64",base64url:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64url",json_string:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A JSON",e164:"\\u179B\\u17C1\\u1781 E.164",jwt:"JWT",template_literal:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.expected," \\u1794\\u17C9\\u17BB\\u1793\\u17D2\\u178F\\u17C2\\u1791\\u1791\\u17BD\\u179B\\u1794\\u17B6\\u1793 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(b(t.values[0])):"\\u1787\\u1798\\u17D2\\u179A\\u17BE\\u179F\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1787\\u17B6\\u1798\\u17BD\\u1799\\u1780\\u17D2\\u1793\\u17BB\\u1784\\u1785\\u17C6\\u178E\\u17C4\\u1798 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((o=t.origin)!=null?o:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u1792\\u17B6\\u178F\\u17BB"):"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((s=t.origin)!=null?s:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString()," ").concat(l.unit):"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1785\\u17B6\\u1794\\u17CB\\u1795\\u17D2\\u178F\\u17BE\\u1798\\u178A\\u17C4\\u1799 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1794\\u1789\\u17D2\\u1785\\u1794\\u17CB\\u178A\\u17C4\\u1799 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1798\\u17B6\\u1793 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1795\\u17D2\\u1782\\u17BC\\u1795\\u17D2\\u1782\\u1784\\u1793\\u17B9\\u1784\\u1791\\u1798\\u17D2\\u179A\\u1784\\u17CB\\u178A\\u17C2\\u179B\\u1794\\u17B6\\u1793\\u1780\\u17C6\\u178E\\u178F\\u17CB ".concat(a.pattern):"\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u179B\\u17C1\\u1781\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1787\\u17B6\\u1796\\u17A0\\u17BB\\u1782\\u17BB\\u178E\\u1793\\u17C3 ".concat(t.divisor);case"unrecognized_keys":return"\\u179A\\u1780\\u1783\\u17BE\\u1789\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u179F\\u17D2\\u1782\\u17B6\\u179B\\u17CB\\u17D6 ".concat(p(t.keys,", "));case"invalid_key":return"\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);case"invalid_union":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C";case"invalid_element":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);default:return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C"}}};function rr(){return{localeError:Yl()}}function Xu(){return rr()}var Ql=()=>{let e={string:{unit:"\\uBB38\\uC790",verb:"to have"},file:{unit:"\\uBC14\\uC774\\uD2B8",verb:"to have"},array:{unit:"\\uAC1C",verb:"to have"},set:{unit:"\\uAC1C",verb:"to have"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\uC785\\uB825",email:"\\uC774\\uBA54\\uC77C \\uC8FC\\uC18C",url:"URL",emoji:"\\uC774\\uBAA8\\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\uB0A0\\uC9DC\\uC2DC\\uAC04",date:"ISO \\uB0A0\\uC9DC",time:"ISO \\uC2DC\\uAC04",duration:"ISO \\uAE30\\uAC04",ipv4:"IPv4 \\uC8FC\\uC18C",ipv6:"IPv6 \\uC8FC\\uC18C",cidrv4:"IPv4 \\uBC94\\uC704",cidrv6:"IPv6 \\uBC94\\uC704",base64:"base64 \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",base64url:"base64url \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",json_string:"JSON \\uBB38\\uC790\\uC5F4",e164:"E.164 \\uBC88\\uD638",jwt:"JWT",template_literal:"\\uC785\\uB825"};return t=>{var o,u,s,c,a,l,v;switch(t.code){case"invalid_type":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uC608\\uC0C1 \\uD0C0\\uC785\\uC740 ".concat(t.expected,", \\uBC1B\\uC740 \\uD0C0\\uC785\\uC740 ").concat(n(t.input),"\\uC785\\uB2C8\\uB2E4");case"invalid_value":return t.values.length===1?"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uAC12\\uC740 ".concat(b(t.values[0])," \\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C \\uC635\\uC158: ".concat(p(t.values,"\\uB610\\uB294 ")," \\uC911 \\uD558\\uB098\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"too_big":{let f=t.inclusive?"\\uC774\\uD558":"\\uBBF8\\uB9CC",h=f==="\\uBBF8\\uB9CC"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(o=x==null?void 0:x.unit)!=null?o:"\\uC694\\uC18C";return x?"".concat((u=t.origin)!=null?u:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()).concat(S," ").concat(f).concat(h):"".concat((s=t.origin)!=null?s:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()," ").concat(f).concat(h)}case"too_small":{let f=t.inclusive?"\\uC774\\uC0C1":"\\uCD08\\uACFC",h=f==="\\uC774\\uC0C1"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(c=x==null?void 0:x.unit)!=null?c:"\\uC694\\uC18C";return x?"".concat((a=t.origin)!=null?a:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()).concat(S," ").concat(f).concat(h):"".concat((l=t.origin)!=null?l:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()," ").concat(f).concat(h)}case"invalid_format":{let f=t;return f.format==="starts_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.prefix,\'"(\\uC73C)\\uB85C \\uC2DC\\uC791\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="ends_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.suffix,\'"(\\uC73C)\\uB85C \\uB05D\\uB098\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="includes"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.includes,\'"\\uC744(\\uB97C) \\uD3EC\\uD568\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="regex"?"\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: \\uC815\\uADDC\\uC2DD ".concat(f.pattern," \\uD328\\uD134\\uACFC \\uC77C\\uCE58\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"\\uC798\\uBABB\\uB41C \\uC22B\\uC790: ".concat(t.divisor,"\\uC758 \\uBC30\\uC218\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"unrecognized_keys":return"\\uC778\\uC2DD\\uD560 \\uC218 \\uC5C6\\uB294 \\uD0A4: ".concat(p(t.keys,", "));case"invalid_key":return"\\uC798\\uBABB\\uB41C \\uD0A4: ".concat(t.origin);case"invalid_union":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825";case"invalid_element":return"\\uC798\\uBABB\\uB41C \\uAC12: ".concat(t.origin);default:return"\\uC798\\uBABB\\uB41C \\uC785\\uB825"}}};function qu(){return{localeError:Ql()}}var Hl=e=>ut(typeof e,e),ut=(e,r=void 0)=>{switch(e){case"number":return Number.isNaN(r)?"NaN":"skai\\u010Dius";case"bigint":return"sveikasis skai\\u010Dius";case"string":return"eilut\\u0117";case"boolean":return"login\\u0117 reik\\u0161m\\u0117";case"undefined":case"void":return"neapibr\\u0117\\u017Eta reik\\u0161m\\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return r===void 0?"ne\\u017Einomas objektas":r===null?"nulin\\u0117 reik\\u0161m\\u0117":Array.isArray(r)?"masyvas":Object.getPrototypeOf(r)!==Object.prototype&&r.constructor?r.constructor.name:"objektas";case"null":return"nulin\\u0117 reik\\u0161m\\u0117"}return e},at=e=>e.charAt(0).toUpperCase()+e.slice(1);function Yu(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var ed=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne ilgesn\\u0117 kaip",notInclusive:"turi b\\u016Bti trumpesn\\u0117 kaip"},bigger:{inclusive:"turi b\\u016Bti ne trumpesn\\u0117 kaip",notInclusive:"turi b\\u016Bti ilgesn\\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne didesnis kaip",notInclusive:"turi b\\u016Bti ma\\u017Eesnis kaip"},bigger:{inclusive:"turi b\\u016Bti ne ma\\u017Eesnis kaip",notInclusive:"turi b\\u016Bti didesnis kaip"}}},array:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}},set:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}}};function r(i,t,o,u){var c;let s=(c=e[i])!=null?c:null;return s===null?s:{unit:s.unit[t],verb:s.verb[u][o?"inclusive":"notInclusive"]}}let n={regex:"\\u012Fvestis",email:"el. pa\\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\\u017Ekoduota eilut\\u0117",base64url:"base64url u\\u017Ekoduota eilut\\u0117",json_string:"JSON eilut\\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\\u012Fvestis"};return i=>{var t,o,u,s,c,a,l,v,f,h;switch(i.code){case"invalid_type":return"Gautas tipas ".concat(Hl(i.input),", o tik\\u0117tasi - ").concat(ut(i.expected));case"invalid_value":return i.values.length===1?"Privalo b\\u016Bti ".concat(b(i.values[0])):"Privalo b\\u016Bti vienas i\\u0161 ".concat(p(i.values,"|")," pasirinkim\\u0173");case"too_big":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.maximum)),(t=i.inclusive)!=null?t:!1,"smaller");if(S!=null&&S.verb)return"".concat(at((o=x!=null?x:i.origin)!=null?o:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.maximum.toString()," ").concat((u=S.unit)!=null?u:"element\\u0173");let I=i.inclusive?"ne didesnis kaip":"ma\\u017Eesnis kaip";return"".concat(at((s=x!=null?x:i.origin)!=null?s:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.maximum.toString()," ").concat(S==null?void 0:S.unit)}case"too_small":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.minimum)),(c=i.inclusive)!=null?c:!1,"bigger");if(S!=null&&S.verb)return"".concat(at((a=x!=null?x:i.origin)!=null?a:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.minimum.toString()," ").concat((l=S.unit)!=null?l:"element\\u0173");let I=i.inclusive?"ne ma\\u017Eesnis kaip":"didesnis kaip";return"".concat(at((v=x!=null?x:i.origin)!=null?v:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.minimum.toString()," ").concat(S==null?void 0:S.unit)}case"invalid_format":{let x=i;return x.format==="starts_with"?\'Eilut\\u0117 privalo prasid\\u0117ti "\'.concat(x.prefix,\'"\'):x.format==="ends_with"?\'Eilut\\u0117 privalo pasibaigti "\'.concat(x.suffix,\'"\'):x.format==="includes"?\'Eilut\\u0117 privalo \\u012Ftraukti "\'.concat(x.includes,\'"\'):x.format==="regex"?"Eilut\\u0117 privalo atitikti ".concat(x.pattern):"Neteisingas ".concat((f=n[x.format])!=null?f:i.format)}case"not_multiple_of":return"Skai\\u010Dius privalo b\\u016Bti ".concat(i.divisor," kartotinis.");case"unrecognized_keys":return"Neatpa\\u017Eint".concat(i.keys.length>1?"i":"as"," rakt").concat(i.keys.length>1?"ai":"as",": ").concat(p(i.keys,", "));case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \\u012Fvestis";case"invalid_element":{let x=ut(i.origin);return"".concat(at((h=x!=null?x:i.origin)!=null?h:"reik\\u0161m\\u0117")," turi klaiding\\u0105 \\u012Fvest\\u012F")}default:return"Klaidinga \\u012Fvestis"}}};function Qu(){return{localeError:ed()}}var td=()=>{let e={string:{unit:"\\u0437\\u043D\\u0430\\u0446\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},file:{unit:"\\u0431\\u0430\\u0458\\u0442\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},array:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},set:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0431\\u0440\\u043E\\u0458";case"object":{if(Array.isArray(t))return"\\u043D\\u0438\\u0437\\u0430";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u043D\\u0435\\u0441",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u043D\\u0430 \\u0435-\\u043F\\u043E\\u0448\\u0442\\u0430",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u045F\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C \\u0438 \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435\\u0442\\u0440\\u0430\\u0435\\u045A\\u0435",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",cidrv4:"IPv4 \\u043E\\u043F\\u0441\\u0435\\u0433",cidrv6:"IPv6 \\u043E\\u043F\\u0441\\u0435\\u0433",base64:"base64-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",base64url:"base64url-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",json_string:"JSON \\u043D\\u0438\\u0437\\u0430",e164:"E.164 \\u0431\\u0440\\u043E\\u0458",jwt:"JWT",template_literal:"\\u0432\\u043D\\u0435\\u0441"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.expected,", \\u043F\\u0440\\u0438\\u043C\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Invalid input: expected ".concat(b(t.values[0])):"\\u0413\\u0440\\u0435\\u0448\\u0430\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u0458\\u0430: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 \\u0435\\u0434\\u043D\\u0430 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((o=t.origin)!=null?o:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0438"):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((s=t.origin)!=null?s:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u043D\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u0440\\u0448\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u0443\\u0447\\u0443\\u0432\\u0430 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u043E\\u0434\\u0433\\u043E\\u0430\\u0440\\u0430 \\u043D\\u0430 \\u043F\\u0430\\u0442\\u0435\\u0440\\u043D\\u043E\\u0442 ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0431\\u0440\\u043E\\u0458: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 \\u0434\\u0435\\u043B\\u0438\\u0432 \\u0441\\u043E ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D\\u0438 \\u043A\\u043B\\u0443\\u0447\\u0435\\u0432\\u0438":"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447 \\u0432\\u043E ".concat(t.origin);case"invalid_union":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441";case"invalid_element":return"\\u0413\\u0440\\u0435\\u0448\\u043D\\u0430 \\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442 \\u0432\\u043E ".concat(t.origin);default:return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441"}}};function Hu(){return{localeError:td()}}var rd=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Input tidak sah: dijangka ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak sah: dijangka ".concat(b(t.values[0])):"Pilihan tidak sah: dijangka salah satu daripada ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Terlalu besar: dijangka ".concat((o=t.origin)!=null?o:"nilai"," ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elemen"):"Terlalu besar: dijangka ".concat((s=t.origin)!=null?s:"nilai"," adalah ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Terlalu kecil: dijangka ".concat(t.origin," ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Terlalu kecil: dijangka ".concat(t.origin," adalah ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak sah: mesti bermula dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak sah: mesti berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak sah: mesti mengandungi "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak sah: mesti sepadan dengan corak ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak sah")}case"not_multiple_of":return"Nombor tidak sah: perlu gandaan ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali: ".concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak sah dalam ".concat(t.origin);case"invalid_union":return"Input tidak sah";case"invalid_element":return"Nilai tidak sah dalam ".concat(t.origin);default:return"Input tidak sah"}}};function ec(){return{localeError:rd()}}var nd=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Ongeldige invoer: verwacht ".concat(t.expected,", ontving ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ongeldige invoer: verwacht ".concat(b(t.values[0])):"Ongeldige optie: verwacht \\xE9\\xE9n van ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Te lang: verwacht dat ".concat((o=t.origin)!=null?o:"waarde"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementen"," bevat"):"Te lang: verwacht dat ".concat((s=t.origin)!=null?s:"waarde"," ").concat(a).concat(t.maximum.toString()," is")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," bevat"):"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," is")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ongeldige tekst: moet met "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ongeldige tekst: moet op "\'.concat(a.suffix,\'" eindigen\'):a.format==="includes"?\'Ongeldige tekst: moet "\'.concat(a.includes,\'" bevatten\'):a.format==="regex"?"Ongeldige tekst: moet overeenkomen met patroon ".concat(a.pattern):"Ongeldig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ongeldig getal: moet een veelvoud van ".concat(t.divisor," zijn");case"unrecognized_keys":return"Onbekende key".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Ongeldige key in ".concat(t.origin);case"invalid_union":return"Ongeldige invoer";case"invalid_element":return"Ongeldige waarde in ".concat(t.origin);default:return"Ongeldige invoer"}}};function tc(){return{localeError:nd()}}var id=()=>{let e={string:{unit:"tegn",verb:"\\xE5 ha"},file:{unit:"bytes",verb:"\\xE5 ha"},array:{unit:"elementer",verb:"\\xE5 inneholde"},set:{unit:"elementer",verb:"\\xE5 inneholde"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Ugyldig input: forventet ".concat(t.expected,", fikk ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ugyldig verdi: forventet ".concat(b(t.values[0])):"Ugyldig valg: forventet en av ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"For stor(t): forventet ".concat((o=t.origin)!=null?o:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementer"):"For stor(t): forventet ".concat((s=t.origin)!=null?s:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ugyldig streng: m\\xE5 starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: m\\xE5 ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: m\\xE5 inneholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: m\\xE5 matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ugyldig tall: m\\xE5 v\\xE6re et multiplum av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ukjente n\\xF8kler":"Ukjent n\\xF8kkel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ugyldig n\\xF8kkel i ".concat(t.origin);case"invalid_union":return"Ugyldig input";case"invalid_element":return"Ugyldig verdi i ".concat(t.origin);default:return"Ugyldig input"}}};function rc(){return{localeError:id()}}var od=()=>{let e={string:{unit:"harf",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"},set:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"giren",email:"epostag\\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\\xE2m\\u0131",date:"ISO tarihi",time:"ISO zaman\\u0131",duration:"ISO m\\xFCddeti",ipv4:"IPv4 ni\\u015F\\xE2n\\u0131",ipv6:"IPv6 ni\\u015F\\xE2n\\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\\u015Fifreli metin",base64url:"base64url-\\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"giren"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"F\\xE2sit giren: umulan ".concat(t.expected,", al\\u0131nan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"F\\xE2sit giren: umulan ".concat(b(t.values[0])):"F\\xE2sit tercih: m\\xFBteberler ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Fazla b\\xFCy\\xFCk: ".concat((o=t.origin)!=null?o:"value",", ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elements"," sahip olmal\\u0131yd\\u0131."):"Fazla b\\xFCy\\xFCk: ".concat((s=t.origin)!=null?s:"value",", ").concat(a).concat(t.maximum.toString()," olmal\\u0131yd\\u0131.")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," sahip olmal\\u0131yd\\u0131."):"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," olmal\\u0131yd\\u0131.")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'F\\xE2sit metin: "\'.concat(a.prefix,\'" ile ba\\u015Flamal\\u0131.\'):a.format==="ends_with"?\'F\\xE2sit metin: "\'.concat(a.suffix,\'" ile bitmeli.\'):a.format==="includes"?\'F\\xE2sit metin: "\'.concat(a.includes,\'" ihtiv\\xE2 etmeli.\'):a.format==="regex"?"F\\xE2sit metin: ".concat(a.pattern," nak\\u015F\\u0131na uymal\\u0131."):"F\\xE2sit ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"F\\xE2sit say\\u0131: ".concat(t.divisor," kat\\u0131 olmal\\u0131yd\\u0131.");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan anahtar var.");case"invalid_union":return"Giren tan\\u0131namad\\u0131.";case"invalid_element":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan k\\u0131ymet var.");default:return"K\\u0131ymet tan\\u0131namad\\u0131."}}};function nc(){return{localeError:od()}}var ad=()=>{let e={string:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},file:{unit:"\\u0628\\u0627\\u06CC\\u067C\\u0633",verb:"\\u0648\\u0644\\u0631\\u064A"},array:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},set:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0627\\u0631\\u06D0";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u064A",email:"\\u0628\\u0631\\u06CC\\u069A\\u0646\\u0627\\u0644\\u06CC\\u06A9",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0646\\u06CC\\u067C\\u0647 \\u0627\\u0648 \\u0648\\u062E\\u062A",date:"\\u0646\\u06D0\\u067C\\u0647",time:"\\u0648\\u062E\\u062A",duration:"\\u0645\\u0648\\u062F\\u0647",ipv4:"\\u062F IPv4 \\u067E\\u062A\\u0647",ipv6:"\\u062F IPv6 \\u067E\\u062A\\u0647",cidrv4:"\\u062F IPv4 \\u0633\\u0627\\u062D\\u0647",cidrv6:"\\u062F IPv6 \\u0633\\u0627\\u062D\\u0647",base64:"base64-encoded \\u0645\\u062A\\u0646",base64url:"base64url-encoded \\u0645\\u062A\\u0646",json_string:"JSON \\u0645\\u062A\\u0646",e164:"\\u062F E.164 \\u0634\\u0645\\u06D0\\u0631\\u0647",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u064A"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(t.expected," \\u0648\\u0627\\u06CC, \\u0645\\u06AB\\u0631 ").concat(n(t.input)," \\u062A\\u0631\\u0644\\u0627\\u0633\\u0647 \\u0634\\u0648");case"invalid_value":return t.values.length===1?"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(b(t.values[0])," \\u0648\\u0627\\u06CC"):"\\u0646\\u0627\\u0633\\u0645 \\u0627\\u0646\\u062A\\u062E\\u0627\\u0628: \\u0628\\u0627\\u06CC\\u062F \\u06CC\\u0648 \\u0644\\u0647 ".concat(p(t.values,"|")," \\u0685\\u062E\\u0647 \\u0648\\u0627\\u06CC");case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((o=t.origin)!=null?o:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631\\u0648\\u0646\\u0647"," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((s=t.origin)!=null?s:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0648\\u064A")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0648\\u064A")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.prefix,\'" \\u0633\\u0631\\u0647 \\u067E\\u06CC\\u0644 \\u0634\\u064A\'):a.format==="ends_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.suffix,\'" \\u0633\\u0631\\u0647 \\u067E\\u0627\\u06CC \\u062A\\u0647 \\u0648\\u0631\\u0633\\u064A\\u0696\\u064A\'):a.format==="includes"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F "\'.concat(a.includes,\'" \\u0648\\u0644\\u0631\\u064A\'):a.format==="regex"?"\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(a.pattern," \\u0633\\u0631\\u0647 \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u0648\\u0644\\u0631\\u064A"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0633\\u0645 \\u062F\\u06CC")}case"not_multiple_of":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u062F\\u062F: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(t.divisor," \\u0645\\u0636\\u0631\\u0628 \\u0648\\u064A");case"unrecognized_keys":return"\\u0646\\u0627\\u0633\\u0645 ".concat(t.keys.length>1?"\\u06A9\\u0644\\u06CC\\u0689\\u0648\\u0646\\u0647":"\\u06A9\\u0644\\u06CC\\u0689",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0646\\u0627\\u0633\\u0645 \\u06A9\\u0644\\u06CC\\u0689 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");case"invalid_union":return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A";case"invalid_element":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u0646\\u0635\\u0631 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");default:return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A"}}};function ic(){return{localeError:ad()}}var ud=()=>{let e={string:{unit:"znak\\xF3w",verb:"mie\\u0107"},file:{unit:"bajt\\xF3w",verb:"mie\\u0107"},array:{unit:"element\\xF3w",verb:"mie\\u0107"},set:{unit:"element\\xF3w",verb:"mie\\u0107"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"wyra\\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\\u0105g znak\\xF3w zakodowany w formacie base64",base64url:"ci\\u0105g znak\\xF3w zakodowany w formacie base64url",json_string:"ci\\u0105g znak\\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\\u015Bcie"};return t=>{var o,u,s,c,a,l,v;switch(t.code){case"invalid_type":return"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(t.expected,", otrzymano ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(b(t.values[0])):"Nieprawid\\u0142owa opcja: oczekiwano jednej z warto\\u015Bci ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Za du\\u017Ca warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((o=t.origin)!=null?o:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"element\\xF3w"):"Zbyt du\\u017C(y/a/e): oczekiwano, \\u017Ce ".concat((s=t.origin)!=null?s:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Za ma\\u0142a warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((c=t.origin)!=null?c:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"element\\xF3w"):"Zbyt ma\\u0142(y/a/e): oczekiwano, \\u017Ce ".concat((l=t.origin)!=null?l:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zaczyna\\u0107 si\\u0119 od "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi ko\\u0144czy\\u0107 si\\u0119 na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zawiera\\u0107 "\'.concat(f.includes,\'"\'):f.format==="regex"?"Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi odpowiada\\u0107 wzorcowi ".concat(f.pattern):"Nieprawid\\u0142ow(y/a/e) ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Nieprawid\\u0142owa liczba: musi by\\u0107 wielokrotno\\u015Bci\\u0105 ".concat(t.divisor);case"unrecognized_keys":return"Nierozpoznane klucze".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Nieprawid\\u0142owy klucz w ".concat(t.origin);case"invalid_union":return"Nieprawid\\u0142owe dane wej\\u015Bciowe";case"invalid_element":return"Nieprawid\\u0142owa warto\\u015B\\u0107 w ".concat(t.origin);default:return"Nieprawid\\u0142owe dane wej\\u015Bciowe"}}};function oc(){return{localeError:ud()}}var cd=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\xFAmero";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"padr\\xE3o",email:"endere\\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\\xE7\\xE3o ISO",ipv4:"endere\\xE7o IPv4",ipv6:"endere\\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Tipo inv\\xE1lido: esperado ".concat(t.expected,", recebido ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entrada inv\\xE1lida: esperado ".concat(b(t.values[0])):"Op\\xE7\\xE3o inv\\xE1lida: esperada uma das ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Muito grande: esperado que ".concat((o=t.origin)!=null?o:"valor"," tivesse ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementos"):"Muito grande: esperado que ".concat((s=t.origin)!=null?s:"valor"," fosse ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Muito pequeno: esperado que ".concat(t.origin," tivesse ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Muito pequeno: esperado que ".concat(t.origin," fosse ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Texto inv\\xE1lido: deve come\\xE7ar com "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Texto inv\\xE1lido: deve terminar com "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Texto inv\\xE1lido: deve incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Texto inv\\xE1lido: deve corresponder ao padr\\xE3o ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," inv\\xE1lido")}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: deve ser m\\xFAltiplo de ".concat(t.divisor);case"unrecognized_keys":return"Chave".concat(t.keys.length>1?"s":""," desconhecida").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Chave inv\\xE1lida em ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido em ".concat(t.origin);default:return"Campo inv\\xE1lido"}}};function ac(){return{localeError:cd()}}function uc(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var sd=()=>{let e={string:{unit:{one:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B",few:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",many:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u0430",many:"\\u0431\\u0430\\u0439\\u0442"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u044F",duration:"ISO \\u0434\\u043B\\u0438\\u0442\\u0435\\u043B\\u044C\\u043D\\u043E\\u0441\\u0442\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64",base64url:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64url",json_string:"JSON \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0432\\u043E\\u0434"};return t=>{var o,u,s;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(t.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(b(t.values[0])):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0430\\u0440\\u0438\\u0430\\u043D\\u0442: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C \\u043E\\u0434\\u043D\\u043E \\u0438\\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let l=Number(t.maximum),v=uc(l,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let l=Number(t.minimum),v=uc(l,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u043D\\u0430\\u0447\\u0438\\u043D\\u0430\\u0442\\u044C\\u0441\\u044F \\u0441 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0438\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u0434\\u0435\\u0440\\u0436\\u0430\\u0442\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u043E\\u0442\\u0432\\u0435\\u0442\\u0441\\u0442\\u0432\\u043E\\u0432\\u0430\\u0442\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 ".concat((s=i[c.format])!=null?s:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0434\\u043E\\u043B\\u0436\\u043D\\u043E \\u0431\\u044B\\u0442\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u043E\\u0437\\u043D\\u0430\\u043D\\u043D".concat(t.keys.length>1?"\\u044B\\u0435":"\\u044B\\u0439"," \\u043A\\u043B\\u044E\\u0447").concat(t.keys.length>1?"\\u0438":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435 \\u0432 ".concat(t.origin);default:return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435"}}};function cc(){return{localeError:sd()}}var ld=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0161tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"vnos",email:"e-po\\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \\u010Das",date:"ISO datum",time:"ISO \\u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \\u0161tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"Neveljaven vnos: pri\\u010Dakovano ".concat(t.expected,", prejeto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neveljaven vnos: pri\\u010Dakovano ".concat(b(t.values[0])):"Neveljavna mo\\u017Enost: pri\\u010Dakovano eno izmed ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Preveliko: pri\\u010Dakovano, da bo ".concat((o=t.origin)!=null?o:"vrednost"," imelo ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementov"):"Preveliko: pri\\u010Dakovano, da bo ".concat((s=t.origin)!=null?s:"vrednost"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," imelo ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Neveljaven niz: mora se za\\u010Deti z "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Neveljaven niz: mora se kon\\u010Dati z "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Neveljaven niz: mora vsebovati "\'.concat(a.includes,\'"\'):a.format==="regex"?"Neveljaven niz: mora ustrezati vzorcu ".concat(a.pattern):"Neveljaven ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Neveljavno \\u0161tevilo: mora biti ve\\u010Dkratnik ".concat(t.divisor);case"unrecognized_keys":return"Neprepoznan".concat(t.keys.length>1?"i klju\\u010Di":" klju\\u010D",": ").concat(p(t.keys,", "));case"invalid_key":return"Neveljaven klju\\u010D v ".concat(t.origin);case"invalid_union":return"Neveljaven vnos";case"invalid_element":return"Neveljavna vrednost v ".concat(t.origin);default:return"Neveljaven vnos"}}};function sc(){return{localeError:ld()}}var dd=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\\xE5lla"},set:{unit:"objekt",verb:"att inneh\\xE5lla"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regulj\\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\\xE4ng",base64url:"base64url-kodad str\\xE4ng",json_string:"JSON-str\\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return t=>{var o,u,s,c,a,l,v,f;switch(t.code){case"invalid_type":return"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(t.expected,", fick ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(b(t.values[0])):"Ogiltigt val: f\\xF6rv\\xE4ntade en av ".concat(p(t.values,"|"));case"too_big":{let h=t.inclusive?"<=":"<",x=r(t.origin);return x?"F\\xF6r stor(t): f\\xF6rv\\xE4ntade ".concat((o=t.origin)!=null?o:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString()," ").concat((u=x.unit)!=null?u:"element"):"F\\xF6r stor(t): f\\xF6rv\\xE4ntat ".concat((s=t.origin)!=null?s:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString())}case"too_small":{let h=t.inclusive?">=":">",x=r(t.origin);return x?"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((c=t.origin)!=null?c:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString()," ").concat(x.unit):"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((a=t.origin)!=null?a:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString())}case"invalid_format":{let h=t;return h.format==="starts_with"?\'Ogiltig str\\xE4ng: m\\xE5ste b\\xF6rja med "\'.concat(h.prefix,\'"\'):h.format==="ends_with"?\'Ogiltig str\\xE4ng: m\\xE5ste sluta med "\'.concat(h.suffix,\'"\'):h.format==="includes"?\'Ogiltig str\\xE4ng: m\\xE5ste inneh\\xE5lla "\'.concat(h.includes,\'"\'):h.format==="regex"?\'Ogiltig str\\xE4ng: m\\xE5ste matcha m\\xF6nstret "\'.concat(h.pattern,\'"\'):"Ogiltig(t) ".concat((l=i[h.format])!=null?l:t.format)}case"not_multiple_of":return"Ogiltigt tal: m\\xE5ste vara en multipel av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ok\\xE4nda nycklar":"Ok\\xE4nd nyckel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ogiltig nyckel i ".concat((v=t.origin)!=null?v:"v\\xE4rdet");case"invalid_union":return"Ogiltig input";case"invalid_element":return"Ogiltigt v\\xE4rde i ".concat((f=t.origin)!=null?f:"v\\xE4rdet");default:return"Ogiltig input"}}};function lc(){return{localeError:dd()}}var md=()=>{let e={string:{unit:"\\u0B8E\\u0BB4\\u0BC1\\u0BA4\\u0BCD\\u0BA4\\u0BC1\\u0B95\\u0BCD\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},file:{unit:"\\u0BAA\\u0BC8\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},array:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},set:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0B8E\\u0BA3\\u0BCD \\u0B85\\u0BB2\\u0BCD\\u0BB2\\u0BBE\\u0BA4\\u0BA4\\u0BC1":"\\u0B8E\\u0BA3\\u0BCD";case"object":{if(Array.isArray(t))return"\\u0B85\\u0BA3\\u0BBF";if(t===null)return"\\u0BB5\\u0BC6\\u0BB1\\u0BC1\\u0BAE\\u0BC8";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1",email:"\\u0BAE\\u0BBF\\u0BA9\\u0BCD\\u0BA9\\u0B9E\\u0BCD\\u0B9A\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",date:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF",time:"ISO \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",duration:"ISO \\u0B95\\u0BBE\\u0BB2 \\u0B85\\u0BB3\\u0BB5\\u0BC1",ipv4:"IPv4 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",ipv6:"IPv6 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",cidrv4:"IPv4 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",cidrv6:"IPv6 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",base64:"base64-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",base64url:"base64url-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",json_string:"JSON \\u0B9A\\u0BB0\\u0BAE\\u0BCD",e164:"E.164 \\u0B8E\\u0BA3\\u0BCD",jwt:"JWT",template_literal:"input"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.expected,", \\u0BAA\\u0BC6\\u0BB1\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(b(t.values[0])):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0BB0\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BAE\\u0BCD: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(p(t.values,"|")," \\u0B87\\u0BB2\\u0BCD \\u0B92\\u0BA9\\u0BCD\\u0BB1\\u0BC1");case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((o=t.origin)!=null?o:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD"," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((s=t.origin)!=null?s:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.prefix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BCA\\u0B9F\\u0B99\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="ends_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.suffix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B9F\\u0BBF\\u0BB5\\u0B9F\\u0BC8\\u0BAF \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="includes"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.includes,\'" \\u0B90 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0B9F\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="regex"?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: ".concat(a.pattern," \\u0BAE\\u0BC1\\u0BB1\\u0BC8\\u0BAA\\u0BBE\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B9F\\u0BA9\\u0BCD \\u0BAA\\u0BCA\\u0BB0\\u0BC1\\u0BA8\\u0BCD\\u0BA4 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B8E\\u0BA3\\u0BCD: ".concat(t.divisor," \\u0B87\\u0BA9\\u0BCD \\u0BAA\\u0BB2\\u0BAE\\u0BBE\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD");case"unrecognized_keys":return"\\u0B85\\u0B9F\\u0BC8\\u0BAF\\u0BBE\\u0BB3\\u0BAE\\u0BCD \\u0BA4\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BBE\\u0BA4 \\u0BB5\\u0BBF\\u0B9A\\u0BC8".concat(t.keys.length>1?"\\u0B95\\u0BB3\\u0BCD":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0B9A\\u0BC8");case"invalid_union":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1";case"invalid_element":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1");default:return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1"}}};function dc(){return{localeError:md()}}var fd=()=>{let e={string:{unit:"\\u0E15\\u0E31\\u0E27\\u0E2D\\u0E31\\u0E01\\u0E29\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},file:{unit:"\\u0E44\\u0E1A\\u0E15\\u0E4C",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},array:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},set:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0E44\\u0E21\\u0E48\\u0E43\\u0E0A\\u0E48\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02 (NaN)":"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02";case"object":{if(Array.isArray(t))return"\\u0E2D\\u0E32\\u0E23\\u0E4C\\u0E40\\u0E23\\u0E22\\u0E4C (Array)";if(t===null)return"\\u0E44\\u0E21\\u0E48\\u0E21\\u0E35\\u0E04\\u0E48\\u0E32 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19",email:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48\\u0E2D\\u0E35\\u0E40\\u0E21\\u0E25",url:"URL",emoji:"\\u0E2D\\u0E34\\u0E42\\u0E21\\u0E08\\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",date:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E41\\u0E1A\\u0E1A ISO",time:"\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",duration:"\\u0E0A\\u0E48\\u0E27\\u0E07\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",ipv4:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv4",ipv6:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv6",cidrv4:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv4",cidrv6:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv6",base64:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64",base64url:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64 \\u0E2A\\u0E33\\u0E2B\\u0E23\\u0E31\\u0E1A URL",json_string:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A JSON",e164:"\\u0E40\\u0E1A\\u0E2D\\u0E23\\u0E4C\\u0E42\\u0E17\\u0E23\\u0E28\\u0E31\\u0E1E\\u0E17\\u0E4C\\u0E23\\u0E30\\u0E2B\\u0E27\\u0E48\\u0E32\\u0E07\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E17\\u0E28 (E.164)",jwt:"\\u0E42\\u0E17\\u0E40\\u0E04\\u0E19 JWT",template_literal:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E20\\u0E17\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(t.expected," \\u0E41\\u0E15\\u0E48\\u0E44\\u0E14\\u0E49\\u0E23\\u0E31\\u0E1A ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0E04\\u0E48\\u0E32\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(b(t.values[0])):"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E37\\u0E2D\\u0E01\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E2B\\u0E19\\u0E36\\u0E48\\u0E07\\u0E43\\u0E19 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"\\u0E44\\u0E21\\u0E48\\u0E40\\u0E01\\u0E34\\u0E19":"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32",l=r(t.origin);return l?"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((o=t.origin)!=null?o:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23"):"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((s=t.origin)!=null?s:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"\\u0E2D\\u0E22\\u0E48\\u0E32\\u0E07\\u0E19\\u0E49\\u0E2D\\u0E22":"\\u0E21\\u0E32\\u0E01\\u0E01\\u0E27\\u0E48\\u0E32",l=r(t.origin);return l?"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString()," ").concat(l.unit):"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E02\\u0E36\\u0E49\\u0E19\\u0E15\\u0E49\\u0E19\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E25\\u0E07\\u0E17\\u0E49\\u0E32\\u0E22\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E21\\u0E35 "\'.concat(a.includes,\'" \\u0E2D\\u0E22\\u0E39\\u0E48\\u0E43\\u0E19\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\'):a.format==="regex"?"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14 ".concat(a.pattern):"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E08\\u0E33\\u0E19\\u0E27\\u0E19\\u0E17\\u0E35\\u0E48\\u0E2B\\u0E32\\u0E23\\u0E14\\u0E49\\u0E27\\u0E22 ".concat(t.divisor," \\u0E44\\u0E14\\u0E49\\u0E25\\u0E07\\u0E15\\u0E31\\u0E27");case"unrecognized_keys":return"\\u0E1E\\u0E1A\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E17\\u0E35\\u0E48\\u0E44\\u0E21\\u0E48\\u0E23\\u0E39\\u0E49\\u0E08\\u0E31\\u0E01: ".concat(p(t.keys,", "));case"invalid_key":return"\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);case"invalid_union":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E44\\u0E21\\u0E48\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E22\\u0E39\\u0E40\\u0E19\\u0E35\\u0E22\\u0E19\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14\\u0E44\\u0E27\\u0E49";case"invalid_element":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);default:return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07"}}};function mc(){return{localeError:fd()}}var pd=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},gd=()=>{let e={string:{unit:"karakter",verb:"olmal\\u0131"},file:{unit:"bayt",verb:"olmal\\u0131"},array:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"},set:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\\u0131\\u011F\\u0131",cidrv6:"IPv6 aral\\u0131\\u011F\\u0131",base64:"base64 ile \\u015Fifrelenmi\\u015F metin",base64url:"base64url ile \\u015Fifrelenmi\\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"\\u015Eablon dizesi"};return i=>{var t,o,u,s;switch(i.code){case"invalid_type":return"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(i.expected,", al\\u0131nan ").concat(pd(i.input));case"invalid_value":return i.values.length===1?"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(b(i.values[0])):"Ge\\xE7ersiz se\\xE7enek: a\\u015Fa\\u011F\\u0131dakilerden biri olmal\\u0131: ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((t=i.origin)!=null?t:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\xF6\\u011Fe"):"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((u=i.origin)!=null?u:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.prefix,\'" ile ba\\u015Flamal\\u0131\'):c.format==="ends_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.suffix,\'" ile bitmeli\'):c.format==="includes"?\'Ge\\xE7ersiz metin: "\'.concat(c.includes,\'" i\\xE7ermeli\'):c.format==="regex"?"Ge\\xE7ersiz metin: ".concat(c.pattern," desenine uymal\\u0131"):"Ge\\xE7ersiz ".concat((s=n[c.format])!=null?s:i.format)}case"not_multiple_of":return"Ge\\xE7ersiz say\\u0131: ".concat(i.divisor," ile tam b\\xF6l\\xFCnebilmeli");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar".concat(i.keys.length>1?"lar":"",": ").concat(p(i.keys,", "));case"invalid_key":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz anahtar");case"invalid_union":return"Ge\\xE7ersiz de\\u011Fer";case"invalid_element":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz de\\u011Fer");default:return"Ge\\xE7ersiz de\\u011Fer"}}};function fc(){return{localeError:gd()}}var vd=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u0435\\u043B\\u0435\\u043A\\u0442\\u0440\\u043E\\u043D\\u043D\\u043E\\u0457 \\u043F\\u043E\\u0448\\u0442\\u0438",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0434\\u0430\\u0442\\u0430 \\u0442\\u0430 \\u0447\\u0430\\u0441 ISO",date:"\\u0434\\u0430\\u0442\\u0430 ISO",time:"\\u0447\\u0430\\u0441 ISO",duration:"\\u0442\\u0440\\u0438\\u0432\\u0430\\u043B\\u0456\\u0441\\u0442\\u044C ISO",ipv4:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv4",ipv6:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv6",cidrv4:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv4",cidrv6:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv6",base64:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64",base64url:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64url",json_string:"\\u0440\\u044F\\u0434\\u043E\\u043A JSON",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(t.expected,", \\u043E\\u0442\\u0440\\u0438\\u043C\\u0430\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0456\\u044F: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F \\u043E\\u0434\\u043D\\u0435 \\u0437 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432"):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((s=t.origin)!=null?s:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043F\\u043E\\u0447\\u0438\\u043D\\u0430\\u0442\\u0438\\u0441\\u044F \\u0437 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0456\\u043D\\u0447\\u0443\\u0432\\u0430\\u0442\\u0438\\u0441\\u044F \\u043D\\u0430 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043C\\u0456\\u0441\\u0442\\u0438\\u0442\\u0438 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0432\\u0456\\u0434\\u043F\\u043E\\u0432\\u0456\\u0434\\u0430\\u0442\\u0438 \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(a.pattern):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u043F\\u043E\\u0432\\u0438\\u043D\\u043D\\u043E \\u0431\\u0443\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0442\\u043D\\u0438\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u043E\\u0437\\u043F\\u0456\\u0437\\u043D\\u0430\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447".concat(t.keys.length>1?"\\u0456":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456";case"invalid_element":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F \\u0443 ".concat(t.origin);default:return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"}}};function nr(){return{localeError:vd()}}function pc(){return nr()}var hd=()=>{let e={string:{unit:"\\u062D\\u0631\\u0648\\u0641",verb:"\\u06C1\\u0648\\u0646\\u0627"},file:{unit:"\\u0628\\u0627\\u0626\\u0679\\u0633",verb:"\\u06C1\\u0648\\u0646\\u0627"},array:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"},set:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0646\\u0645\\u0628\\u0631";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u06D2";if(t===null)return"\\u0646\\u0644";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0627\\u0646 \\u067E\\u0679",email:"\\u0627\\u06CC \\u0645\\u06CC\\u0644 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",uuidv4:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 4",uuidv6:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 6",nanoid:"\\u0646\\u06CC\\u0646\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",guid:"\\u062C\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid2:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC 2",ulid:"\\u06CC\\u0648 \\u0627\\u06CC\\u0644 \\u0622\\u0626\\u06CC \\u0688\\u06CC",xid:"\\u0627\\u06CC\\u06A9\\u0633 \\u0622\\u0626\\u06CC \\u0688\\u06CC",ksuid:"\\u06A9\\u06D2 \\u0627\\u06CC\\u0633 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",datetime:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0688\\u06CC\\u0679 \\u0679\\u0627\\u0626\\u0645",date:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u062A\\u0627\\u0631\\u06CC\\u062E",time:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0648\\u0642\\u062A",duration:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0645\\u062F\\u062A",ipv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",ipv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",cidrv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0631\\u06CC\\u0646\\u062C",cidrv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0631\\u06CC\\u0646\\u062C",base64:"\\u0628\\u06CC\\u0633 64 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",base64url:"\\u0628\\u06CC\\u0633 64 \\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",json_string:"\\u062C\\u06D2 \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0627\\u06CC\\u0646 \\u0633\\u0679\\u0631\\u0646\\u06AF",e164:"\\u0627\\u06CC 164 \\u0646\\u0645\\u0628\\u0631",jwt:"\\u062C\\u06D2 \\u0688\\u0628\\u0644\\u06CC\\u0648 \\u0679\\u06CC",template_literal:"\\u0627\\u0646 \\u067E\\u0679"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(t.expected," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627\\u060C ").concat(n(t.input)," \\u0645\\u0648\\u0635\\u0648\\u0644 \\u06C1\\u0648\\u0627");case"invalid_value":return t.values.length===1?"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(b(t.values[0])," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627"):"\\u063A\\u0644\\u0637 \\u0622\\u067E\\u0634\\u0646: ".concat(p(t.values,"|")," \\u0645\\u06CC\\u06BA \\u0633\\u06D2 \\u0627\\u06CC\\u06A9 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627");case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((o=t.origin)!=null?o:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u06D2 ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u0639\\u0646\\u0627\\u0635\\u0631"," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((s=t.origin)!=null?s:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u0627 ").concat(a).concat(t.maximum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u06D2 ").concat(a).concat(t.minimum.toString()," ").concat(l.unit," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u0627 ").concat(a).concat(t.minimum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.prefix,\'" \\u0633\\u06D2 \\u0634\\u0631\\u0648\\u0639 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="ends_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.suffix,\'" \\u067E\\u0631 \\u062E\\u062A\\u0645 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="includes"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.includes,\'" \\u0634\\u0627\\u0645\\u0644 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="regex"?"\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: \\u067E\\u06CC\\u0679\\u0631\\u0646 ".concat(a.pattern," \\u0633\\u06D2 \\u0645\\u06CC\\u0686 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2"):"\\u063A\\u0644\\u0637 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u063A\\u0644\\u0637 \\u0646\\u0645\\u0628\\u0631: ".concat(t.divisor," \\u06A9\\u0627 \\u0645\\u0636\\u0627\\u0639\\u0641 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2");case"unrecognized_keys":return"\\u063A\\u06CC\\u0631 \\u062A\\u0633\\u0644\\u06CC\\u0645 \\u0634\\u062F\\u06C1 \\u06A9\\u06CC".concat(t.keys.length>1?"\\u0632":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u06A9\\u06CC");case"invalid_union":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679";case"invalid_element":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u0648\\u06CC\\u0644\\u06CC\\u0648");default:return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679"}}};function gc(){return{localeError:hd()}}var $d=()=>{let e={string:{unit:"k\\xFD t\\u1EF1",verb:"c\\xF3"},file:{unit:"byte",verb:"c\\xF3"},array:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"},set:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"s\\u1ED1";case"object":{if(Array.isArray(t))return"m\\u1EA3ng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0111\\u1EA7u v\\xE0o",email:"\\u0111\\u1ECBa ch\\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\\xE0y gi\\u1EDD ISO",date:"ng\\xE0y ISO",time:"gi\\u1EDD ISO",duration:"kho\\u1EA3ng th\\u1EDDi gian ISO",ipv4:"\\u0111\\u1ECBa ch\\u1EC9 IPv4",ipv6:"\\u0111\\u1ECBa ch\\u1EC9 IPv6",cidrv4:"d\\u1EA3i IPv4",cidrv6:"d\\u1EA3i IPv6",base64:"chu\\u1ED7i m\\xE3 h\\xF3a base64",base64url:"chu\\u1ED7i m\\xE3 h\\xF3a base64url",json_string:"chu\\u1ED7i JSON",e164:"s\\u1ED1 E.164",jwt:"JWT",template_literal:"\\u0111\\u1EA7u v\\xE0o"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(t.expected,", nh\\u1EADn \\u0111\\u01B0\\u1EE3c ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(b(t.values[0])):"T\\xF9y ch\\u1ECDn kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i m\\u1ED9t trong c\\xE1c gi\\xE1 tr\\u1ECB ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((o=t.origin)!=null?o:"gi\\xE1 tr\\u1ECB"," ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"ph\\u1EA7n t\\u1EED"):"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((s=t.origin)!=null?s:"gi\\xE1 tr\\u1ECB"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i b\\u1EAFt \\u0111\\u1EA7u b\\u1EB1ng "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i k\\u1EBFt th\\xFAc b\\u1EB1ng "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i bao g\\u1ED3m "\'.concat(a.includes,\'"\'):a.format==="regex"?"Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i kh\\u1EDBp v\\u1EDBi m\\u1EABu ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," kh\\xF4ng h\\u1EE3p l\\u1EC7")}case"not_multiple_of":return"S\\u1ED1 kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i l\\xE0 b\\u1ED9i s\\u1ED1 c\\u1EE7a ".concat(t.divisor);case"unrecognized_keys":return"Kh\\xF3a kh\\xF4ng \\u0111\\u01B0\\u1EE3c nh\\u1EADn d\\u1EA1ng: ".concat(p(t.keys,", "));case"invalid_key":return"Kh\\xF3a kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);case"invalid_union":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7";case"invalid_element":return"Gi\\xE1 tr\\u1ECB kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);default:return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7"}}};function vc(){return{localeError:$d()}}var bd=()=>{let e={string:{unit:"\\u5B57\\u7B26",verb:"\\u5305\\u542B"},file:{unit:"\\u5B57\\u8282",verb:"\\u5305\\u542B"},array:{unit:"\\u9879",verb:"\\u5305\\u542B"},set:{unit:"\\u9879",verb:"\\u5305\\u542B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u975E\\u6570\\u5B57(NaN)":"\\u6570\\u5B57";case"object":{if(Array.isArray(t))return"\\u6570\\u7EC4";if(t===null)return"\\u7A7A\\u503C(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F93\\u5165",email:"\\u7535\\u5B50\\u90AE\\u4EF6",url:"URL",emoji:"\\u8868\\u60C5\\u7B26\\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u671F\\u65F6\\u95F4",date:"ISO\\u65E5\\u671F",time:"ISO\\u65F6\\u95F4",duration:"ISO\\u65F6\\u957F",ipv4:"IPv4\\u5730\\u5740",ipv6:"IPv6\\u5730\\u5740",cidrv4:"IPv4\\u7F51\\u6BB5",cidrv6:"IPv6\\u7F51\\u6BB5",base64:"base64\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",base64url:"base64url\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",json_string:"JSON\\u5B57\\u7B26\\u4E32",e164:"E.164\\u53F7\\u7801",jwt:"JWT",template_literal:"\\u8F93\\u5165"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(t.expected,"\\uFF0C\\u5B9E\\u9645\\u63A5\\u6536 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(b(t.values[0])):"\\u65E0\\u6548\\u9009\\u9879\\uFF1A\\u671F\\u671B\\u4EE5\\u4E0B\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((o=t.origin)!=null?o:"\\u503C"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u4E2A\\u5143\\u7D20"):"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((s=t.origin)!=null?s:"\\u503C"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.prefix,\'" \\u5F00\\u5934\'):a.format==="ends_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.suffix,\'" \\u7ED3\\u5C3E\'):a.format==="includes"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u6EE1\\u8DB3\\u6B63\\u5219\\u8868\\u8FBE\\u5F0F ".concat(a.pattern):"\\u65E0\\u6548".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u65E0\\u6548\\u6570\\u5B57\\uFF1A\\u5FC5\\u987B\\u662F ".concat(t.divisor," \\u7684\\u500D\\u6570");case"unrecognized_keys":return"\\u51FA\\u73B0\\u672A\\u77E5\\u7684\\u952E(key): ".concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u7684\\u952E(key)\\u65E0\\u6548");case"invalid_union":return"\\u65E0\\u6548\\u8F93\\u5165";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u5305\\u542B\\u65E0\\u6548\\u503C(value)");default:return"\\u65E0\\u6548\\u8F93\\u5165"}}};function hc(){return{localeError:bd()}}var _d=()=>{let e={string:{unit:"\\u5B57\\u5143",verb:"\\u64C1\\u6709"},file:{unit:"\\u4F4D\\u5143\\u7D44",verb:"\\u64C1\\u6709"},array:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"},set:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F38\\u5165",email:"\\u90F5\\u4EF6\\u5730\\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u65E5\\u671F\\u6642\\u9593",date:"ISO \\u65E5\\u671F",time:"ISO \\u6642\\u9593",duration:"ISO \\u671F\\u9593",ipv4:"IPv4 \\u4F4D\\u5740",ipv6:"IPv6 \\u4F4D\\u5740",cidrv4:"IPv4 \\u7BC4\\u570D",cidrv6:"IPv6 \\u7BC4\\u570D",base64:"base64 \\u7DE8\\u78BC\\u5B57\\u4E32",base64url:"base64url \\u7DE8\\u78BC\\u5B57\\u4E32",json_string:"JSON \\u5B57\\u4E32",e164:"E.164 \\u6578\\u503C",jwt:"JWT",template_literal:"\\u8F38\\u5165"};return t=>{var o,u,s,c;switch(t.code){case"invalid_type":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(t.expected,"\\uFF0C\\u4F46\\u6536\\u5230 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(b(t.values[0])):"\\u7121\\u6548\\u7684\\u9078\\u9805\\uFF1A\\u9810\\u671F\\u70BA\\u4EE5\\u4E0B\\u5176\\u4E2D\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((o=t.origin)!=null?o:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u500B\\u5143\\u7D20"):"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((s=t.origin)!=null?s:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString()," ").concat(l.unit):"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.prefix,\'" \\u958B\\u982D\'):a.format==="ends_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.suffix,\'" \\u7D50\\u5C3E\'):a.format==="includes"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u7B26\\u5408\\u683C\\u5F0F ".concat(a.pattern):"\\u7121\\u6548\\u7684 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u6548\\u7684\\u6578\\u5B57\\uFF1A\\u5FC5\\u9808\\u70BA ".concat(t.divisor," \\u7684\\u500D\\u6578");case"unrecognized_keys":return"\\u7121\\u6CD5\\u8B58\\u5225\\u7684\\u9375\\u503C".concat(t.keys.length>1?"\\u5011":"","\\uFF1A").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u9375\\u503C");case"invalid_union":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u503C");default:return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C"}}};function $c(){return{localeError:_d()}}var yd=()=>{let e={string:{unit:"\\xE0mi",verb:"n\\xED"},file:{unit:"bytes",verb:"n\\xED"},array:{unit:"nkan",verb:"n\\xED"},set:{unit:"nkan",verb:"n\\xED"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\u1ECD\\u0301mb\\xE0";case"object":{if(Array.isArray(t))return"akop\\u1ECD";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9",email:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC \\xECm\\u1EB9\\u0301l\\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\xE0k\\xF3k\\xF2 ISO",date:"\\u1ECDj\\u1ECD\\u0301 ISO",time:"\\xE0k\\xF3k\\xF2 ISO",duration:"\\xE0k\\xF3k\\xF2 t\\xF3 p\\xE9 ISO",ipv4:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv4",ipv6:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv6",cidrv4:"\\xE0gb\\xE8gb\\xE8 IPv4",cidrv6:"\\xE0gb\\xE8gb\\xE8 IPv6",base64:"\\u1ECD\\u0300r\\u1ECD\\u0300 t\\xED a k\\u1ECD\\u0301 n\\xED base64",base64url:"\\u1ECD\\u0300r\\u1ECD\\u0300 base64url",json_string:"\\u1ECD\\u0300r\\u1ECD\\u0300 JSON",e164:"n\\u1ECD\\u0301mb\\xE0 E.164",jwt:"JWT",template_literal:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9"};return t=>{var o,u;switch(t.code){case"invalid_type":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(t.expected,", \\xE0m\\u1ECD\\u0300 a r\\xED ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(b(t.values[0])):"\\xC0\\u1E63\\xE0y\\xE0n a\\u1E63\\xEC\\u1E63e: yan \\u1ECD\\u0300kan l\\xE1ra ".concat(p(t.values,"|"));case"too_big":{let s=t.inclusive?"<=":"<",c=r(t.origin);return c?"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat((o=t.origin)!=null?o:"iye"," ").concat(c.verb," ").concat(s).concat(t.maximum," ").concat(c.unit):"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(s).concat(t.maximum)}case"too_small":{let s=t.inclusive?">=":">",c=r(t.origin);return c?"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat(t.origin," ").concat(c.verb," ").concat(s).concat(t.minimum," ").concat(c.unit):"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(s).concat(t.minimum)}case"invalid_format":{let s=t;return s.format==="starts_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\u1EB9\\u0300r\\u1EB9\\u0300 p\\u1EB9\\u0300l\\xFA "\'.concat(s.prefix,\'"\'):s.format==="ends_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 par\\xED p\\u1EB9\\u0300l\\xFA "\'.concat(s.suffix,\'"\'):s.format==="includes"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 n\\xED "\'.concat(s.includes,\'"\'):s.format==="regex"?"\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\xE1 \\xE0p\\u1EB9\\u1EB9r\\u1EB9 mu ".concat(s.pattern):"A\\u1E63\\xEC\\u1E63e: ".concat((u=i[s.format])!=null?u:t.format)}case"not_multiple_of":return"N\\u1ECD\\u0301mb\\xE0 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 j\\u1EB9\\u0301 \\xE8y\\xE0 p\\xEDp\\xEDn ti ".concat(t.divisor);case"unrecognized_keys":return"B\\u1ECDt\\xECn\\xEC \\xE0\\xECm\\u1ECD\\u0300: ".concat(p(t.keys,", "));case"invalid_key":return"B\\u1ECDt\\xECn\\xEC a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);case"invalid_union":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e";case"invalid_element":return"Iye a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);default:return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e"}}};function bc(){return{localeError:yd()}}var co=Symbol("ZodOutput"),so=Symbol("ZodInput"),Te=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];if(this._map.set(r,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error("ID ".concat(i.id," already exists in the registry"));this._idmap.set(i.id,r)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){var i;let n=r._zod.parent;if(n){let t=m({},(i=this.get(n))!=null?i:{});delete t.id;let o=m(m({},t),this._map.get(r));return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function ir(){return new Te}var oe=ir();function lo(e,r){return new e(m({type:"string"},y(r)))}function mo(e,r){return new e(m({type:"string",coerce:!0},y(r)))}function or(e,r){return new e(m({type:"string",format:"email",check:"string_format",abort:!1},y(r)))}function ct(e,r){return new e(m({type:"string",format:"guid",check:"string_format",abort:!1},y(r)))}function ar(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1},y(r)))}function ur(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},y(r)))}function cr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},y(r)))}function sr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},y(r)))}function st(e,r){return new e(m({type:"string",format:"url",check:"string_format",abort:!1},y(r)))}function lr(e,r){return new e(m({type:"string",format:"emoji",check:"string_format",abort:!1},y(r)))}function dr(e,r){return new e(m({type:"string",format:"nanoid",check:"string_format",abort:!1},y(r)))}function mr(e,r){return new e(m({type:"string",format:"cuid",check:"string_format",abort:!1},y(r)))}function fr(e,r){return new e(m({type:"string",format:"cuid2",check:"string_format",abort:!1},y(r)))}function pr(e,r){return new e(m({type:"string",format:"ulid",check:"string_format",abort:!1},y(r)))}function gr(e,r){return new e(m({type:"string",format:"xid",check:"string_format",abort:!1},y(r)))}function vr(e,r){return new e(m({type:"string",format:"ksuid",check:"string_format",abort:!1},y(r)))}function hr(e,r){return new e(m({type:"string",format:"ipv4",check:"string_format",abort:!1},y(r)))}function $r(e,r){return new e(m({type:"string",format:"ipv6",check:"string_format",abort:!1},y(r)))}function br(e,r){return new e(m({type:"string",format:"cidrv4",check:"string_format",abort:!1},y(r)))}function _r(e,r){return new e(m({type:"string",format:"cidrv6",check:"string_format",abort:!1},y(r)))}function yr(e,r){return new e(m({type:"string",format:"base64",check:"string_format",abort:!1},y(r)))}function xr(e,r){return new e(m({type:"string",format:"base64url",check:"string_format",abort:!1},y(r)))}function kr(e,r){return new e(m({type:"string",format:"e164",check:"string_format",abort:!1},y(r)))}function zr(e,r){return new e(m({type:"string",format:"jwt",check:"string_format",abort:!1},y(r)))}var fo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function po(e,r){return new e(m({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},y(r)))}function go(e,r){return new e(m({type:"string",format:"date",check:"string_format"},y(r)))}function vo(e,r){return new e(m({type:"string",format:"time",check:"string_format",precision:null},y(r)))}function ho(e,r){return new e(m({type:"string",format:"duration",check:"string_format"},y(r)))}function $o(e,r){return new e(m({type:"number",checks:[]},y(r)))}function bo(e,r){return new e(m({type:"number",coerce:!0,checks:[]},y(r)))}function _o(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"safeint"},y(r)))}function yo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float32"},y(r)))}function xo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float64"},y(r)))}function ko(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"int32"},y(r)))}function zo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"uint32"},y(r)))}function Io(e,r){return new e(m({type:"boolean"},y(r)))}function wo(e,r){return new e(m({type:"boolean",coerce:!0},y(r)))}function So(e,r){return new e(m({type:"bigint"},y(r)))}function jo(e,r){return new e(m({type:"bigint",coerce:!0},y(r)))}function Oo(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},y(r)))}function Po(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},y(r)))}function Uo(e,r){return new e(m({type:"symbol"},y(r)))}function No(e,r){return new e(m({type:"undefined"},y(r)))}function Zo(e,r){return new e(m({type:"null"},y(r)))}function Do(e){return new e({type:"any"})}function To(e){return new e({type:"unknown"})}function Eo(e,r){return new e(m({type:"never"},y(r)))}function Ao(e,r){return new e(m({type:"void"},y(r)))}function Ro(e,r){return new e(m({type:"date"},y(r)))}function Lo(e,r){return new e(m({type:"date",coerce:!0},y(r)))}function Co(e,r){return new e(m({type:"nan"},y(r)))}function ce(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!1}))}function H(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!0}))}function se(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!1}))}function W(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!0}))}function Vo(e){return se(0,e)}function Fo(e){return ce(0,e)}function Jo(e){return H(0,e)}function Mo(e){return W(0,e)}function Ie(e,r){return new Tn(z(m({check:"multiple_of"},y(r)),{value:e}))}function Ee(e,r){return new Rn(z(m({check:"max_size"},y(r)),{maximum:e}))}function we(e,r){return new Ln(z(m({check:"min_size"},y(r)),{minimum:e}))}function lt(e,r){return new Cn(z(m({check:"size_equals"},y(r)),{size:e}))}function Ae(e,r){return new Vn(z(m({check:"max_length"},y(r)),{maximum:e}))}function $e(e,r){return new Fn(z(m({check:"min_length"},y(r)),{minimum:e}))}function Re(e,r){return new Jn(z(m({check:"length_equals"},y(r)),{length:e}))}function dt(e,r){return new Mn(z(m({check:"string_format",format:"regex"},y(r)),{pattern:e}))}function mt(e){return new Bn(m({check:"string_format",format:"lowercase"},y(e)))}function ft(e){return new Kn(m({check:"string_format",format:"uppercase"},y(e)))}function pt(e,r){return new Gn(z(m({check:"string_format",format:"includes"},y(r)),{includes:e}))}function gt(e,r){return new Wn(z(m({check:"string_format",format:"starts_with"},y(r)),{prefix:e}))}function vt(e,r){return new Xn(z(m({check:"string_format",format:"ends_with"},y(r)),{suffix:e}))}function Bo(e,r,n){return new qn(m({check:"property",property:e,schema:r},y(n)))}function ht(e,r){return new Yn(m({check:"mime_type",mime:e},y(r)))}function le(e){return new Qn({check:"overwrite",tx:e})}function $t(e){return le(r=>r.normalize(e))}function bt(){return le(e=>e.trim())}function _t(){return le(e=>e.toLowerCase())}function yt(){return le(e=>e.toUpperCase())}function Ko(e,r,n){return new e(m({type:"array",element:r},y(n)))}function xd(e,r,n){return new e(m({type:"union",options:r},y(n)))}function kd(e,r,n,i){return new e(m({type:"union",options:n,discriminator:r},y(i)))}function zd(e,r,n){return new e({type:"intersection",left:r,right:n})}function Id(e,r,n,i){let t=n instanceof O,o=t?i:n,u=t?n:null;return new e(m({type:"tuple",items:r,rest:u},y(o)))}function wd(e,r,n,i){return new e(m({type:"record",keyType:r,valueType:n},y(i)))}function Sd(e,r,n,i){return new e(m({type:"map",keyType:r,valueType:n},y(i)))}function jd(e,r,n){return new e(m({type:"set",valueType:r},y(n)))}function Od(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e(m({type:"enum",entries:i},y(n)))}function Pd(e,r,n){return new e(m({type:"enum",entries:r},y(n)))}function Ud(e,r,n){return new e(m({type:"literal",values:Array.isArray(r)?r:[r]},y(n)))}function Go(e,r){return new e(m({type:"file"},y(r)))}function Nd(e,r){return new e({type:"transform",transform:r})}function Zd(e,r){return new e({type:"optional",innerType:r})}function Dd(e,r){return new e({type:"nullable",innerType:r})}function Td(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():qr(n)}})}function Ed(e,r,n){return new e(m({type:"nonoptional",innerType:r},y(n)))}function Ad(e,r){return new e({type:"success",innerType:r})}function Rd(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Ld(e,r,n){return new e({type:"pipe",in:r,out:n})}function Cd(e,r){return new e({type:"readonly",innerType:r})}function Vd(e,r,n){return new e(m({type:"template_literal",parts:r},y(n)))}function Fd(e,r){return new e({type:"lazy",getter:r})}function Jd(e,r){return new e({type:"promise",innerType:r})}function Wo(e,r,n){var o;let i=y(n);return(o=i.abort)!=null||(i.abort=!0),new e(m({type:"custom",check:"custom",fn:r},i))}function Xo(e,r,n){return new e(m({type:"custom",check:"custom",fn:r},y(n)))}function qo(e){let r=_c(n=>(n.addIssue=i=>{var t,o,u,s;if(typeof i=="string")n.issues.push(Oe(i,n.value,r._zod.def));else{let c=i;c.fatal&&(c.continue=!1),(t=c.code)!=null||(c.code="custom"),(o=c.input)!=null||(c.input=n.value),(u=c.inst)!=null||(c.inst=r),(s=c.continue)!=null||(c.continue=!r._zod.def.abort),n.issues.push(Oe(c))}},e(n.value,n)));return r}function _c(e,r){let n=new R(m({check:"custom"},y(r)));return n._zod.check=e,n}function Yo(e,r){var h,x,S,I,C;let n=y(r),i=(h=n.truthy)!=null?h:["true","1","yes","on","y","enabled"],t=(x=n.falsy)!=null?x:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(j=>typeof j=="string"?j.toLowerCase():j),t=t.map(j=>typeof j=="string"?j.toLowerCase():j));let o=new Set(i),u=new Set(t),s=(S=e.Codec)!=null?S:ot,c=(I=e.Boolean)!=null?I:it,a=(C=e.String)!=null?C:ke,l=new a({type:"string",error:n.error}),v=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:l,out:v,transform:(j,g)=>{let $=j;return n.case!=="sensitive"&&($=$.toLowerCase()),o.has($)?!0:u.has($)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...u],input:g.value,inst:f,continue:!1}),{})},reverseTransform:(j,g)=>j===!0?i[0]||"true":t[0]||"false",error:n.error});return f}function Le(e,r,n,i={}){let t=y(i),o=m(z(m({},y(i)),{check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:s=>n.test(s)}),t);return n instanceof RegExp&&(o.pattern=n),new e(o)}var xt=class{constructor(r){var n,i,t,o,u;this.counter=0,this.metadataRegistry=(n=r==null?void 0:r.metadata)!=null?n:oe,this.target=(i=r==null?void 0:r.target)!=null?i:"draft-2020-12",this.unrepresentable=(t=r==null?void 0:r.unrepresentable)!=null?t:"throw",this.override=(o=r==null?void 0:r.override)!=null?o:()=>{},this.io=(u=r==null?void 0:r.io)!=null?u:"output",this.seen=new Map}process(r,n={path:[],schemaPath:[]}){var v,f,h,x,S;var i;let t=r._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},u=this.seen.get(r);if(u)return u.count++,n.schemaPath.includes(r)&&(u.cycle=n.path),u.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,s);let c=(f=(v=r._zod).toJSONSchema)==null?void 0:f.call(v);if(c)s.schema=c;else{let I=z(m({},n),{schemaPath:[...n.schemaPath,r],path:n.path}),C=r._zod.parent;if(C)s.ref=C,this.process(C,I),this.seen.get(C).isParent=!0;else{let j=s.schema;switch(t.type){case"string":{let g=j;g.type="string";let{minimum:$,maximum:k,format:N,patterns:P,contentEncoding:w}=r._zod.bag;if(typeof $=="number"&&(g.minLength=$),typeof k=="number"&&(g.maxLength=k),N&&(g.format=(h=o[N])!=null?h:N,g.format===""&&delete g.format),w&&(g.contentEncoding=w),P&&P.size>0){let D=[...P];D.length===1?g.pattern=D[0].source:D.length>1&&(s.schema.allOf=[...D.map(B=>z(m({},this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{}),{pattern:B.source}))])}break}case"number":{let g=j,{minimum:$,maximum:k,format:N,multipleOf:P,exclusiveMaximum:w,exclusiveMinimum:D}=r._zod.bag;typeof N=="string"&&N.includes("int")?g.type="integer":g.type="number",typeof D=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.minimum=D,g.exclusiveMinimum=!0):g.exclusiveMinimum=D),typeof $=="number"&&(g.minimum=$,typeof D=="number"&&this.target!=="draft-4"&&(D>=$?delete g.minimum:delete g.exclusiveMinimum)),typeof w=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.maximum=w,g.exclusiveMaximum=!0):g.exclusiveMaximum=w),typeof k=="number"&&(g.maximum=k,typeof w=="number"&&this.target!=="draft-4"&&(w<=k?delete g.maximum:delete g.exclusiveMaximum)),typeof P=="number"&&(g.multipleOf=P);break}case"boolean":{let g=j;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(j.type="string",j.nullable=!0,j.enum=[null]):j.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{j.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=j,{minimum:$,maximum:k}=r._zod.bag;typeof $=="number"&&(g.minItems=$),typeof k=="number"&&(g.maxItems=k),g.type="array",g.items=this.process(t.element,z(m({},I),{path:[...I.path,"items"]}));break}case"object":{let g=j;g.type="object",g.properties={};let $=t.shape;for(let P in $)g.properties[P]=this.process($[P],z(m({},I),{path:[...I.path,"properties",P]}));let k=new Set(Object.keys($)),N=new Set([...k].filter(P=>{let w=t.shape[P]._zod;return this.io==="input"?w.optin===void 0:w.optout===void 0}));N.size>0&&(g.required=Array.from(N)),((x=t.catchall)==null?void 0:x._zod.def.type)==="never"?g.additionalProperties=!1:t.catchall?t.catchall&&(g.additionalProperties=this.process(t.catchall,z(m({},I),{path:[...I.path,"additionalProperties"]}))):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=j,$=t.options.map((k,N)=>this.process(k,z(m({},I),{path:[...I.path,"anyOf",N]})));g.anyOf=$;break}case"intersection":{let g=j,$=this.process(t.left,z(m({},I),{path:[...I.path,"allOf",0]})),k=this.process(t.right,z(m({},I),{path:[...I.path,"allOf",1]})),N=w=>"allOf"in w&&Object.keys(w).length===1,P=[...N($)?$.allOf:[$],...N(k)?k.allOf:[k]];g.allOf=P;break}case"tuple":{let g=j;g.type="array";let $=this.target==="draft-2020-12"?"prefixItems":"items",k=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",N=t.items.map((B,V)=>this.process(B,z(m({},I),{path:[...I.path,$,V]}))),P=t.rest?this.process(t.rest,z(m({},I),{path:[...I.path,k,...this.target==="openapi-3.0"?[t.items.length]:[]]})):null;this.target==="draft-2020-12"?(g.prefixItems=N,P&&(g.items=P)):this.target==="openapi-3.0"?(g.items={anyOf:N},P&&g.items.anyOf.push(P),g.minItems=N.length,P||(g.maxItems=N.length)):(g.items=N,P&&(g.additionalItems=P));let{minimum:w,maximum:D}=r._zod.bag;typeof w=="number"&&(g.minItems=w),typeof D=="number"&&(g.maxItems=D);break}case"record":{let g=j;g.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(g.propertyNames=this.process(t.keyType,z(m({},I),{path:[...I.path,"propertyNames"]}))),g.additionalProperties=this.process(t.valueType,z(m({},I),{path:[...I.path,"additionalProperties"]}));break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=j,$=Ge(t.entries);$.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),g.enum=$;break}case"literal":{let g=j,$=[];for(let k of t.values)if(k===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");$.push(Number(k))}else $.push(k);if($.length!==0)if($.length===1){let k=$[0];g.type=k===null?"null":typeof k,this.target==="draft-4"||this.target==="openapi-3.0"?g.enum=[k]:g.const=k}else $.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),$.every(k=>typeof k=="boolean")&&(g.type="string"),$.every(k=>k===null)&&(g.type="null"),g.enum=$;break}case"file":{let g=j,$={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:N,mime:P}=r._zod.bag;k!==void 0&&($.minLength=k),N!==void 0&&($.maxLength=N),P?P.length===1?($.contentMediaType=P[0],Object.assign(g,$)):g.anyOf=P.map(w=>z(m({},$),{contentMediaType:w})):Object.assign(g,$);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(t.innerType,I);this.target==="openapi-3.0"?(s.ref=t.innerType,j.nullable=!0):j.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,I),s.ref=t.innerType;break}case"success":{let g=j;g.type="boolean";break}case"default":{this.process(t.innerType,I),s.ref=t.innerType,j.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,I),s.ref=t.innerType,this.io==="input"&&(j._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,I),s.ref=t.innerType;let g;try{g=t.catchValue(void 0)}catch($){throw new Error("Dynamic catch values are not supported in JSON Schema")}j.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=j,$=r._zod.pattern;if(!$)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=$.source;break}case"pipe":{let g=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(g,I),s.ref=g;break}case"readonly":{this.process(t.innerType,I),s.ref=t.innerType,j.readOnly=!0;break}case"promise":{this.process(t.innerType,I),s.ref=t.innerType;break}case"optional":{this.process(t.innerType,I),s.ref=t.innerType;break}case"lazy":{let g=r._zod.innerType;this.process(g,I),s.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let a=this.metadataRegistry.get(r);return a&&Object.assign(s.schema,a),this.io==="input"&&J(r)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((S=(i=s.schema).default)!=null||(i.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(r).schema}emit(r,n){var l,v,f,h,x,S,I,C,j,g;let i={cycles:(l=n==null?void 0:n.cycles)!=null?l:"ref",reused:(v=n==null?void 0:n.reused)!=null?v:"inline",external:(f=n==null?void 0:n.external)!=null?f:void 0},t=this.seen.get(r);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=$=>{var D,B,V,re,F;let k=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let ne=(D=i.external.registry.get($[0]))==null?void 0:D.id,Je=(B=i.external.uri)!=null?B:Vr=>Vr;if(ne)return{ref:Je(ne)};let ee=(re=(V=$[1].defId)!=null?V:$[1].schema.id)!=null?re:"schema".concat(this.counter++);return $[1].defId=ee,{defId:ee,ref:"".concat(Je("__shared"),"#/").concat(k,"/").concat(ee)}}if($[1]===t)return{ref:"#"};let P="".concat("#","/").concat(k,"/"),w=(F=$[1].schema.id)!=null?F:"__schema".concat(this.counter++);return{defId:w,ref:P+w}},u=$=>{if($[1].schema.$ref)return;let k=$[1],{ref:N,defId:P}=o($);k.def=m({},k.schema),P&&(k.defId=P);let w=k.schema;for(let D in w)delete w[D];w.$ref=N};if(i.cycles==="throw")for(let $ of this.seen.entries()){let k=$[1];if(k.cycle)throw new Error("Cycle detected: "+"#/".concat((h=k.cycle)==null?void 0:h.join("/"),"/<root>")+\'\\n\\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.\')}for(let $ of this.seen.entries()){let k=$[1];if(r===$[0]){u($);continue}if(i.external){let P=(x=i.external.registry.get($[0]))==null?void 0:x.id;if(r!==$[0]&&P){u($);continue}}if((S=this.metadataRegistry.get($[0]))==null?void 0:S.id){u($);continue}if(k.cycle){u($);continue}if(k.count>1&&i.reused==="ref"){u($);continue}}let s=($,k)=>{var B,V,re;let N=this.seen.get($),P=(B=N.def)!=null?B:N.schema,w=m({},P);if(N.ref===null)return;let D=N.ref;if(N.ref=null,D){s(D,k);let F=this.seen.get(D).schema;F.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?(P.allOf=(V=P.allOf)!=null?V:[],P.allOf.push(F)):(Object.assign(P,F),Object.assign(P,w))}N.isParent||this.override({zodSchema:$,jsonSchema:P,path:(re=N.path)!=null?re:[]})};for(let $ of[...this.seen.entries()].reverse())s($[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn("Invalid target: ".concat(this.target)),(I=i.external)!=null&&I.uri){let $=(C=i.external.registry.get(r))==null?void 0:C.id;if(!$)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri($)}Object.assign(c,t.def);let a=(g=(j=i.external)==null?void 0:j.defs)!=null?g:{};for(let $ of this.seen.entries()){let k=$[1];k.def&&k.defId&&(a[k.defId]=k.def)}i.external||Object.keys(a).length>0&&(this.target==="draft-2020-12"?c.$defs=a:c.definitions=a);try{return JSON.parse(JSON.stringify(c))}catch($){throw new Error("Error converting schema to JSON.")}}};function Qo(e,r){if(e instanceof Te){let i=new xt(r),t={};for(let s of e._idmap.entries()){let[c,a]=s;i.process(a)}let o={},u={registry:e,uri:r==null?void 0:r.uri,defs:t};for(let s of e._idmap.entries()){let[c,a]=s;o[c]=i.emit(a,z(m({},r),{external:u}))}if(Object.keys(t).length>0){let s=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[s]:t}}return{schemas:o}}let n=new xt(r);return n.process(e),n.emit(e,r)}function J(e,r){let n=r!=null?r:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return J(t.element,n);case"object":{for(let o in t.shape)if(J(t.shape[o],n))return!0;return!1}case"union":{for(let o of t.options)if(J(o,n))return!0;return!1}case"intersection":return J(t.left,n)||J(t.right,n);case"tuple":{for(let o of t.items)if(J(o,n))return!0;return!!(t.rest&&J(t.rest,n))}case"record":return J(t.keyType,n)||J(t.valueType,n);case"map":return J(t.keyType,n)||J(t.valueType,n);case"set":return J(t.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return J(t.innerType,n);case"lazy":return J(t.getter(),n);case"default":return J(t.innerType,n);case"prefault":return J(t.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return J(t.in,n)||J(t.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error("Unknown schema type: ".concat(t.type))}var Ho={};var kt={};_e(kt,{ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,date:()=>ta,datetime:()=>ea,duration:()=>na,time:()=>ra});var Ir=d("ZodISODateTime",(e,r)=>{mi.init(e,r),A.init(e,r)});function ea(e){return po(Ir,e)}var wr=d("ZodISODate",(e,r)=>{fi.init(e,r),A.init(e,r)});function ta(e){return go(wr,e)}var Sr=d("ZodISOTime",(e,r)=>{pi.init(e,r),A.init(e,r)});function ra(e){return vo(Sr,e)}var jr=d("ZodISODuration",(e,r)=>{gi.init(e,r),A.init(e,r)});function na(e){return ho(jr,e)}var xc=(e,r)=>{Qe.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>et(e,n)},flatten:{value:n=>He(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Se,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bd=d("ZodError",xc),X=d("ZodError",xc,{Parent:Error});var ia=Pe(X),oa=Ue(X),aa=Ne(X),ua=Ze(X),ca=Tt(X),sa=Et(X),la=At(X),da=Rt(X),ma=Lt(X),fa=Ct(X),pa=Vt(X),ga=Ft(X);var U=d("ZodType",(e,r)=>(O.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>{var i;return e.clone(_.mergeDefs(r,{checks:[...(i=r.checks)!=null?i:[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}))},e.clone=(n,i)=>K(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>ia(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>aa(e,n,i),e.parseAsync=async(n,i)=>oa(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ua(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>ca(e,n,i),e.decode=(n,i)=>sa(e,n,i),e.encodeAsync=async(n,i)=>la(e,n,i),e.decodeAsync=async(n,i)=>da(e,n,i),e.safeEncode=(n,i)=>ma(e,n,i),e.safeDecode=(n,i)=>fa(e,n,i),e.safeEncodeAsync=async(n,i)=>pa(e,n,i),e.safeDecodeAsync=async(n,i)=>ga(e,n,i),e.refine=(n,i)=>e.check(cs(n,i)),e.superRefine=n=>e.check(ss(n)),e.overwrite=n=>e.check(le(n)),e.optional=()=>Pr(e),e.nullable=()=>Ur(e),e.nullish=()=>Pr(Ur(e)),e.nonoptional=n=>qc(e,n),e.array=()=>Tr(e),e.or=n=>Ra([e,n]),e.and=n=>Ec(e,n),e.transform=n=>Nr(e,Va(n)),e.default=n=>Gc(e,n),e.prefault=n=>Xc(e,n),e.catch=n=>Hc(e,n),e.pipe=n=>Nr(e,n),e.readonly=()=>rs(e),e.describe=n=>{let i=e.clone();return oe.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=oe.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return oe.get(e);let i=e.clone();return oe.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$a=d("_ZodString",(e,r)=>{var i,t,o;ke.init(e,r),U.init(e,r);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(t=n.minimum)!=null?t:null,e.maxLength=(o=n.maximum)!=null?o:null,e.regex=(...u)=>e.check(dt(...u)),e.includes=(...u)=>e.check(pt(...u)),e.startsWith=(...u)=>e.check(gt(...u)),e.endsWith=(...u)=>e.check(vt(...u)),e.min=(...u)=>e.check($e(...u)),e.max=(...u)=>e.check(Ae(...u)),e.length=(...u)=>e.check(Re(...u)),e.nonempty=(...u)=>e.check($e(1,...u)),e.lowercase=u=>e.check(mt(u)),e.uppercase=u=>e.check(ft(u)),e.trim=()=>e.check(bt()),e.normalize=(...u)=>e.check($t(...u)),e.toLowerCase=()=>e.check(_t()),e.toUpperCase=()=>e.check(yt())}),It=d("ZodString",(e,r)=>{ke.init(e,r),$a.init(e,r),e.email=n=>e.check(or(ba,n)),e.url=n=>e.check(st(Zr,n)),e.jwt=n=>e.check(zr(Da,n)),e.emoji=n=>e.check(lr(_a,n)),e.guid=n=>e.check(ct(Or,n)),e.uuid=n=>e.check(ar(de,n)),e.uuidv4=n=>e.check(ur(de,n)),e.uuidv6=n=>e.check(cr(de,n)),e.uuidv7=n=>e.check(sr(de,n)),e.nanoid=n=>e.check(dr(ya,n)),e.guid=n=>e.check(ct(Or,n)),e.cuid=n=>e.check(mr(xa,n)),e.cuid2=n=>e.check(fr(ka,n)),e.ulid=n=>e.check(pr(za,n)),e.base64=n=>e.check(yr(Ua,n)),e.base64url=n=>e.check(xr(Na,n)),e.xid=n=>e.check(gr(Ia,n)),e.ksuid=n=>e.check(vr(wa,n)),e.ipv4=n=>e.check(hr(Sa,n)),e.ipv6=n=>e.check($r(ja,n)),e.cidrv4=n=>e.check(br(Oa,n)),e.cidrv6=n=>e.check(_r(Pa,n)),e.e164=n=>e.check(kr(Za,n)),e.datetime=n=>e.check(ea(n)),e.date=n=>e.check(ta(n)),e.time=n=>e.check(ra(n)),e.duration=n=>e.check(na(n))});function va(e){return lo(It,e)}var A=d("ZodStringFormat",(e,r)=>{T.init(e,r),$a.init(e,r)}),ba=d("ZodEmail",(e,r)=>{ni.init(e,r),A.init(e,r)});function Gd(e){return or(ba,e)}var Or=d("ZodGUID",(e,r)=>{ti.init(e,r),A.init(e,r)});function Wd(e){return ct(Or,e)}var de=d("ZodUUID",(e,r)=>{ri.init(e,r),A.init(e,r)});function Xd(e){return ar(de,e)}function qd(e){return ur(de,e)}function Yd(e){return cr(de,e)}function Qd(e){return sr(de,e)}var Zr=d("ZodURL",(e,r)=>{ii.init(e,r),A.init(e,r)});function Hd(e){return st(Zr,e)}function em(e){return st(Zr,m({protocol:/^https?$/,hostname:Q.domain},_.normalizeParams(e)))}var _a=d("ZodEmoji",(e,r)=>{oi.init(e,r),A.init(e,r)});function tm(e){return lr(_a,e)}var ya=d("ZodNanoID",(e,r)=>{ai.init(e,r),A.init(e,r)});function rm(e){return dr(ya,e)}var xa=d("ZodCUID",(e,r)=>{ui.init(e,r),A.init(e,r)});function nm(e){return mr(xa,e)}var ka=d("ZodCUID2",(e,r)=>{ci.init(e,r),A.init(e,r)});function im(e){return fr(ka,e)}var za=d("ZodULID",(e,r)=>{si.init(e,r),A.init(e,r)});function om(e){return pr(za,e)}var Ia=d("ZodXID",(e,r)=>{li.init(e,r),A.init(e,r)});function am(e){return gr(Ia,e)}var wa=d("ZodKSUID",(e,r)=>{di.init(e,r),A.init(e,r)});function um(e){return vr(wa,e)}var Sa=d("ZodIPv4",(e,r)=>{vi.init(e,r),A.init(e,r)});function cm(e){return hr(Sa,e)}var ja=d("ZodIPv6",(e,r)=>{hi.init(e,r),A.init(e,r)});function sm(e){return $r(ja,e)}var Oa=d("ZodCIDRv4",(e,r)=>{$i.init(e,r),A.init(e,r)});function lm(e){return br(Oa,e)}var Pa=d("ZodCIDRv6",(e,r)=>{bi.init(e,r),A.init(e,r)});function dm(e){return _r(Pa,e)}var Ua=d("ZodBase64",(e,r)=>{yi.init(e,r),A.init(e,r)});function mm(e){return yr(Ua,e)}var Na=d("ZodBase64URL",(e,r)=>{xi.init(e,r),A.init(e,r)});function fm(e){return xr(Na,e)}var Za=d("ZodE164",(e,r)=>{ki.init(e,r),A.init(e,r)});function pm(e){return kr(Za,e)}var Da=d("ZodJWT",(e,r)=>{zi.init(e,r),A.init(e,r)});function gm(e){return zr(Da,e)}var wt=d("ZodCustomStringFormat",(e,r)=>{Ii.init(e,r),A.init(e,r)});function vm(e,r,n={}){return Le(wt,e,r,n)}function hm(e){return Le(wt,"hostname",Q.hostname,e)}function $m(e){return Le(wt,"hex",Q.hex,e)}function bm(e,r){var o;let n=(o=r==null?void 0:r.enc)!=null?o:"hex",i="".concat(e,"_").concat(n),t=Q[i];if(!t)throw new Error("Unrecognized hash format: ".concat(i));return Le(wt,i,t,r)}var St=d("ZodNumber",(e,r)=>{var i,t,o,u,s,c,a,l,v;Yt.init(e,r),U.init(e,r),e.gt=(f,h)=>e.check(se(f,h)),e.gte=(f,h)=>e.check(W(f,h)),e.min=(f,h)=>e.check(W(f,h)),e.lt=(f,h)=>e.check(ce(f,h)),e.lte=(f,h)=>e.check(H(f,h)),e.max=(f,h)=>e.check(H(f,h)),e.int=f=>e.check(ha(f)),e.safe=f=>e.check(ha(f)),e.positive=f=>e.check(se(0,f)),e.nonnegative=f=>e.check(W(0,f)),e.negative=f=>e.check(ce(0,f)),e.nonpositive=f=>e.check(H(0,f)),e.multipleOf=(f,h)=>e.check(Ie(f,h)),e.step=(f,h)=>e.check(Ie(f,h)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(o=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(t=n.exclusiveMinimum)!=null?t:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(c=Math.min((u=n.maximum)!=null?u:Number.POSITIVE_INFINITY,(s=n.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((a=n.format)!=null?a:"").includes("int")||Number.isSafeInteger((l=n.multipleOf)!=null?l:.5),e.isFinite=!0,e.format=(v=n.format)!=null?v:null});function kc(e){return $o(St,e)}var Ve=d("ZodNumberFormat",(e,r)=>{wi.init(e,r),St.init(e,r)});function ha(e){return _o(Ve,e)}function _m(e){return yo(Ve,e)}function ym(e){return xo(Ve,e)}function xm(e){return ko(Ve,e)}function km(e){return zo(Ve,e)}var jt=d("ZodBoolean",(e,r)=>{it.init(e,r),U.init(e,r)});function zc(e){return Io(jt,e)}var Ot=d("ZodBigInt",(e,r)=>{var i,t,o;Qt.init(e,r),U.init(e,r),e.gte=(u,s)=>e.check(W(u,s)),e.min=(u,s)=>e.check(W(u,s)),e.gt=(u,s)=>e.check(se(u,s)),e.gte=(u,s)=>e.check(W(u,s)),e.min=(u,s)=>e.check(W(u,s)),e.lt=(u,s)=>e.check(ce(u,s)),e.lte=(u,s)=>e.check(H(u,s)),e.max=(u,s)=>e.check(H(u,s)),e.positive=u=>e.check(se(BigInt(0),u)),e.negative=u=>e.check(ce(BigInt(0),u)),e.nonpositive=u=>e.check(H(BigInt(0),u)),e.nonnegative=u=>e.check(W(BigInt(0),u)),e.multipleOf=(u,s)=>e.check(Ie(u,s));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(t=n.maximum)!=null?t:null,e.format=(o=n.format)!=null?o:null});function zm(e){return So(Ot,e)}var Ta=d("ZodBigIntFormat",(e,r)=>{Si.init(e,r),Ot.init(e,r)});function Im(e){return Oo(Ta,e)}function wm(e){return Po(Ta,e)}var Ic=d("ZodSymbol",(e,r)=>{ji.init(e,r),U.init(e,r)});function Sm(e){return Uo(Ic,e)}var wc=d("ZodUndefined",(e,r)=>{Oi.init(e,r),U.init(e,r)});function jm(e){return No(wc,e)}var Sc=d("ZodNull",(e,r)=>{Pi.init(e,r),U.init(e,r)});function jc(e){return Zo(Sc,e)}var Oc=d("ZodAny",(e,r)=>{Ui.init(e,r),U.init(e,r)});function Om(){return Do(Oc)}var Pc=d("ZodUnknown",(e,r)=>{Ni.init(e,r),U.init(e,r)});function Ce(){return To(Pc)}var Uc=d("ZodNever",(e,r)=>{Zi.init(e,r),U.init(e,r)});function Ea(e){return Eo(Uc,e)}var Nc=d("ZodVoid",(e,r)=>{Di.init(e,r),U.init(e,r)});function Pm(e){return Ao(Nc,e)}var Dr=d("ZodDate",(e,r)=>{Ti.init(e,r),U.init(e,r),e.min=(i,t)=>e.check(W(i,t)),e.max=(i,t)=>e.check(H(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Um(e){return Ro(Dr,e)}var Zc=d("ZodArray",(e,r)=>{Ei.init(e,r),U.init(e,r),e.element=r.element,e.min=(n,i)=>e.check($e(n,i)),e.nonempty=n=>e.check($e(1,n)),e.max=(n,i)=>e.check(Ae(n,i)),e.length=(n,i)=>e.check(Re(n,i)),e.unwrap=()=>e.element});function Tr(e,r){return Ko(Zc,e,r)}function Nm(e){let r=e._zod.def.shape;return Ca(Object.keys(r))}var Er=d("ZodObject",(e,r)=>{Ai.init(e,r),U.init(e,r),_.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Ca(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(z(m({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.loose=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.strict=()=>e.clone(z(m({},e._zod.def),{catchall:Ea()})),e.strip=()=>e.clone(z(m({},e._zod.def),{catchall:void 0})),e.extend=n=>_.extend(e,n),e.safeExtend=n=>_.safeExtend(e,n),e.merge=n=>_.merge(e,n),e.pick=n=>_.pick(e,n),e.omit=n=>_.omit(e,n),e.partial=(...n)=>_.partial(Fa,e,n[0]),e.required=(...n)=>_.required(Ja,e,n[0])});function Zm(e,r){let n=m({type:"object",shape:e!=null?e:{}},_.normalizeParams(r));return new Er(n)}function Dm(e,r){return new Er(m({type:"object",shape:e,catchall:Ea()},_.normalizeParams(r)))}function Tm(e,r){return new Er(m({type:"object",shape:e,catchall:Ce()},_.normalizeParams(r)))}var Aa=d("ZodUnion",(e,r)=>{Ht.init(e,r),U.init(e,r),e.options=r.options});function Ra(e,r){return new Aa(m({type:"union",options:e},_.normalizeParams(r)))}var Dc=d("ZodDiscriminatedUnion",(e,r)=>{Aa.init(e,r),Ri.init(e,r)});function Em(e,r,n){return new Dc(m({type:"union",options:r,discriminator:e},_.normalizeParams(n)))}var Tc=d("ZodIntersection",(e,r)=>{Li.init(e,r),U.init(e,r)});function Ec(e,r){return new Tc({type:"intersection",left:e,right:r})}var Ac=d("ZodTuple",(e,r)=>{er.init(e,r),U.init(e,r),e.rest=n=>e.clone(z(m({},e._zod.def),{rest:n}))});function Rc(e,r,n){let i=r instanceof O,t=i?n:r,o=i?r:null;return new Ac(m({type:"tuple",items:e,rest:o},_.normalizeParams(t)))}var La=d("ZodRecord",(e,r)=>{Ci.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Lc(e,r,n){return new La(m({type:"record",keyType:e,valueType:r},_.normalizeParams(n)))}function Am(e,r,n){let i=K(e);return i._zod.values=void 0,new La(m({type:"record",keyType:i,valueType:r},_.normalizeParams(n)))}var Cc=d("ZodMap",(e,r)=>{Vi.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Rm(e,r,n){return new Cc(m({type:"map",keyType:e,valueType:r},_.normalizeParams(n)))}var Vc=d("ZodSet",(e,r)=>{Fi.init(e,r),U.init(e,r),e.min=(...n)=>e.check(we(...n)),e.nonempty=n=>e.check(we(1,n)),e.max=(...n)=>e.check(Ee(...n)),e.size=(...n)=>e.check(lt(...n))});function Lm(e,r){return new Vc(m({type:"set",valueType:e},_.normalizeParams(r)))}var zt=d("ZodEnum",(e,r)=>{Ji.init(e,r),U.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let o={};for(let u of i)if(n.has(u))o[u]=r.entries[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))},e.exclude=(i,t)=>{let o=m({},r.entries);for(let u of i)if(n.has(u))delete o[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))}});function Ca(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new zt(m({type:"enum",entries:n},_.normalizeParams(r)))}function Cm(e,r){return new zt(m({type:"enum",entries:e},_.normalizeParams(r)))}var Fc=d("ZodLiteral",(e,r)=>{Mi.init(e,r),U.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Vm(e,r){return new Fc(m({type:"literal",values:Array.isArray(e)?e:[e]},_.normalizeParams(r)))}var Jc=d("ZodFile",(e,r)=>{Bi.init(e,r),U.init(e,r),e.min=(n,i)=>e.check(we(n,i)),e.max=(n,i)=>e.check(Ee(n,i)),e.mime=(n,i)=>e.check(ht(Array.isArray(n)?n:[n],i))});function Fm(e){return Go(Jc,e)}var Mc=d("ZodTransform",(e,r)=>{Ki.init(e,r),U.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);n.addIssue=o=>{var u,s,c;if(typeof o=="string")n.issues.push(_.issue(o,n.value,r));else{let a=o;a.fatal&&(a.continue=!1),(u=a.code)!=null||(a.code="custom"),(s=a.input)!=null||(a.input=n.value),(c=a.inst)!=null||(a.inst=e),n.issues.push(_.issue(a))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n)):(n.value=t,n)}});function Va(e){return new Mc({type:"transform",transform:e})}var Fa=d("ZodOptional",(e,r)=>{Gi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Pr(e){return new Fa({type:"optional",innerType:e})}var Bc=d("ZodNullable",(e,r)=>{Wi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Ur(e){return new Bc({type:"nullable",innerType:e})}function Jm(e){return Pr(Ur(e))}var Kc=d("ZodDefault",(e,r)=>{Xi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gc(e,r){return new Kc({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Wc=d("ZodPrefault",(e,r)=>{qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Xc(e,r){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Ja=d("ZodNonOptional",(e,r)=>{Yi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qc(e,r){return new Ja(m({type:"nonoptional",innerType:e},_.normalizeParams(r)))}var Yc=d("ZodSuccess",(e,r)=>{Qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e){return new Yc({type:"success",innerType:e})}var Qc=d("ZodCatch",(e,r)=>{Hi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hc(e,r){return new Qc({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var es=d("ZodNaN",(e,r)=>{eo.init(e,r),U.init(e,r)});function Bm(e){return Co(es,e)}var Ma=d("ZodPipe",(e,r)=>{to.init(e,r),U.init(e,r),e.in=r.in,e.out=r.out});function Nr(e,r){return new Ma({type:"pipe",in:e,out:r})}var Ba=d("ZodCodec",(e,r)=>{Ma.init(e,r),ot.init(e,r)});function Km(e,r,n){return new Ba({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var ts=d("ZodReadonly",(e,r)=>{ro.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function rs(e){return new ts({type:"readonly",innerType:e})}var ns=d("ZodTemplateLiteral",(e,r)=>{no.init(e,r),U.init(e,r)});function Gm(e,r){return new ns(m({type:"template_literal",parts:e},_.normalizeParams(r)))}var is=d("ZodLazy",(e,r)=>{ao.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.getter()});function os(e){return new is({type:"lazy",getter:e})}var as=d("ZodPromise",(e,r)=>{oo.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Wm(e){return new as({type:"promise",innerType:e})}var us=d("ZodFunction",(e,r)=>{io.init(e,r),U.init(e,r)});function Xm(e){var r,n;return new us({type:"function",input:Array.isArray(e==null?void 0:e.input)?Rc(e==null?void 0:e.input):(r=e==null?void 0:e.input)!=null?r:Tr(Ce()),output:(n=e==null?void 0:e.output)!=null?n:Ce()})}var Ar=d("ZodCustom",(e,r)=>{uo.init(e,r),U.init(e,r)});function qm(e){let r=new R({check:"custom"});return r._zod.check=e,r}function Ym(e,r){return Wo(Ar,e!=null?e:()=>!0,r)}function cs(e,r={}){return Xo(Ar,e,r)}function ss(e){return qo(e)}function Qm(e,r={error:"Input not instance of ".concat(e.name)}){let n=new Ar(m({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0},_.normalizeParams(r)));return n._zod.bag.Class=e,n}var Hm=(...e)=>Yo({Codec:Ba,Boolean:jt,String:It},...e);function ef(e){let r=os(()=>Ra([va(e),kc(),zc(),jc(),Tr(r),Lc(va(),r)]));return r}function tf(e,r){return Nr(Va(e),r)}var rf={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nf(e){L({customError:e})}function of(){return L().customError}var Ka;Ka||(Ka={});var Rr={};_e(Rr,{bigint:()=>sf,boolean:()=>cf,date:()=>lf,number:()=>uf,string:()=>af});function af(e){return mo(It,e)}function uf(e){return bo(St,e)}function cf(e){return wo(jt,e)}function sf(e){return jo(Ot,e)}function lf(e){return Lo(Dr,e)}L(tr());var bv=Fe.union([Fe.enum(["low","medium","high","always-visible"]),Fe.number()]);var Lr=5;var df=9,be=200,Cr=10;function ls(e,r,n,i,t,o,u="-1"){var N,P;let s=1/0,c=1/0,a=-1/0,l=-1/0,v=new E(-Cr,0,5,n),f=new E(-Cr,0,r,5),h=new E(r-5,0,r+Cr,n),x=new E(0,n-5,r,n+Cr),S=mf(r,n,i,t,o),I=[v,f,h,x],C=new E(-be,-be,r+be*2,n+be*2);for(let w of e){let D,B;for(let V=0;V<w.bboxes.length;V++){if(w.bboxes[V]==null||(D=w.bboxes[V].boundingBox,B=w.bboxes[V].index,w.lockedToStrategyIndex!==-1&&B!==w.lockedToStrategyIndex))continue;let[re,F,ne,Je]=D,[ee,Vr,Ga,ms]=[w.y-re,w.y+F,w.x-ne,w.x+Je],Fr=Ga,Jr=ee,Wa=ms-Ga,Xa=Vr-ee;s=Math.min(s,Fr)-be,c=Math.min(c,Jr)-be,a=Math.max(a,Fr+Wa)+be,l=Math.max(l,Jr+Xa)+be,w.bboxes[V].boundingRect=new E(Fr,Jr,Wa,Xa)}}let j=new Me(new E(s,c,a-s,l-c)),g={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},$=0;for(let w=0;w<e.length;w++){let D=e[w];((P=(N=D.bboxes)==null?void 0:N[0])==null?void 0:P.index)===df&&(g.staticColliders.push(D.bboxes[0].boundingRect),j.insert(D.bboxes[0].boundingRect),$++)}e=e.slice($,e.length);let k;for(let w=0;w<e.length;w++)if(k=e[w],g.colliders[w]=[-1,0],k.enabledAndVisible){let[D,B,V]=[1/0,-1,void 0];for(let{index:re,boundingRect:F}of k.bboxes){if(F==null)continue;let ne=[];if(ne=j.queryRect(F).filter(ee=>F.intersects(ee)),k.shouldCollideWithScreenEdges&&I.forEach(ee=>{F.intersects(ee)&&ne.push(ee)}),F.intersects(S)){g.colliders[w]=[-1,0,F];break}if(ne.length<=D&&(V=F,B=re,D=ne.length),ne.length===0){j.insert(F),g.colliders[w]=[re,C.contains(F)?0:1,F];break}}k.rank===Lr&&V!=null&&(j.insert(V),g.colliders[w]=[B,C.contains(V)?0:1,V])}else g.colliders[w]=[-1,0];return g}function mf(e,r,n,i,t){switch(t){case"top-left":return new E(0,0,n,i);case"top-right":return new E(e-n,0,n,i);case"bottom-left":return new E(0,r-i,n,i);case"bottom-right":return new E(e-n,r-i,n,i);case"center":return new E((e-n)/2,(r-i)/2,n,i);case"top":return new E((e-n)/2,0,n,i);case"bottom":return new E((e-n)/2,r-i,n,i);case"left":return new E(0,(r-i)/2,n,i);case"right":return new E(e-n,(r-i)/2,n,i);default:return new E(0,r-i,n,i)}}function ds(e){let r=e[0].map(n=>{let i=n[0].map(t=>({index:t[4],boundingBox:[t[0],t[1],t[2],t[3]]}));return{enabledAndVisible:n[1]===1,rank:n[2]===1?Lr:0,x:n[3],y:n[4],shouldCollideWithScreenEdges:n[5]===1,bboxes:i,lockedToStrategyIndex:n[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:r,devicePixelRatio:e[1]}}self.onmessage=e=>{let r=ds(e.data);self.postMessage(ls(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId))};})();\n';l();l();l();l();l();function nb(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}o(nb,"contains");l();function ib(e,t){let[r,n]=t;return r>=e.x&&r<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}o(ib,"intersectPoint");l();function ob(e,t){let r=t.x,n=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x,c=e.y,m=e.x+e.w,d=e.y+e.h;return r<m&&u<i&&n<d&&c<a}o(ob,"intersects");l();function vi(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}o(vi,"appendItems");l();var Hp=class Hp{constructor(t,r,n,i,a){h(this,"x");h(this,"y");h(this,"w");h(this,"h");h(this,"userData");this.userData=typeof a>"u"?null:a,this.x=t,this.y=r,this.w=n,this.h=i}contains(t){return t===this?!1:nb(this,t)}intersects(t){return ob(this,t)}intersectsPoint(t){return ib(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.8)",t.fillRect(this.x,this.y,this.w,this.h)}};o(Hp,"Rectangle");var Fe=Hp;var Ro=class Ro{constructor(t,r){h(this,"topLeft");h(this,"topRight");h(this,"bottomLeft");h(this,"bottomRight");h(this,"divided",!1);h(this,"boundary");h(this,"capacity",16);h(this,"objects",[]);h(this,"parent");this.parent=r,this.boundary=t}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:t,y:r,w:n,h:i}=this.boundary;this.topLeft=new Ro(new Fe(t,r,n/2,i/2),this),this.topRight=new Ro(new Fe(t+n/2,r,n/2,i/2),this),this.bottomLeft=new Ro(new Fe(t,r+i/2,n/2,i/2),this),this.bottomRight=new Ro(new Fe(t+n/2,r+i/2,n/2,i/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(vi(r,this.topLeft.queryRect(t)),vi(r,this.topRight.queryRect(t)),vi(r,this.bottomLeft.queryRect(t)),vi(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(vi(r,this.topLeft.queryPoint(t)),vi(r,this.topRight.queryPoint(t)),vi(r,this.bottomLeft.queryPoint(t)),vi(r,this.bottomRight.queryPoint(t))),r}insert(t){return(this.parent?!this.boundary.contains(t):!this.boundary.intersects(t))?!1:this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0)}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};o(Ro,"QuadTree");var tn=Ro;l();var Kp=9,to=200,ul=10;function ab(e,t,r,n,i,a,u="-1"){var V,z;let c=1/0,m=1/0,d=-1/0,f=-1/0,g=new Fe(-ul,0,5,r),v=new Fe(-ul,0,t,5),b=new Fe(t-5,0,t+ul,r),D=new Fe(0,r-5,t,r+ul),A=VC(t,r,n,i,a),x=[g,v,b,D],E=new Fe(-to,-to,t+to*2,r+to*2);for(let M of e){let T,Z;for(let j=0;j<M.bboxes.length;j++){if(M.bboxes[j]==null||(T=M.bboxes[j].boundingBox,Z=M.bboxes[j].index,M.lockedToStrategyIndex!==-1&&Z!==M.lockedToStrategyIndex))continue;let[W,$,q,J]=T,[G,ae,te,ee]=[M.y-W,M.y+$,M.x-q,M.x+J],le=te,fe=G,xe=ee-te,be=ae-G;c=Math.min(c,le)-to,m=Math.min(m,fe)-to,d=Math.max(d,le+xe)+to,f=Math.max(f,fe+be)+to,M.bboxes[j].boundingRect=new Fe(le,fe,xe,be)}}let S=new tn(new Fe(c,m,d-c,f-m)),I={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},C=0;for(let M=0;M<e.length;M++){let T=e[M];((z=(V=T.bboxes)==null?void 0:V[0])==null?void 0:z.index)===Kp&&(I.staticColliders.push(T.bboxes[0].boundingRect),S.insert(T.bboxes[0].boundingRect),C++)}e=e.slice(C,e.length);let k;for(let M=0;M<e.length;M++)if(k=e[M],I.colliders[M]=[-1,0],k.enabledAndVisible){let[T,Z,j]=[1/0,-1,void 0];for(let{index:W,boundingRect:$}of k.bboxes){if($==null)continue;let q=[];if(q=S.queryRect($).filter(G=>$.intersects(G)),k.shouldCollideWithScreenEdges&&x.forEach(G=>{$.intersects(G)&&q.push(G)}),$.intersects(A)){I.colliders[M]=[-1,0,$];break}if(q.length<=T&&(j=$,Z=W,T=q.length),q.length===0){S.insert($),I.colliders[M]=[W,E.contains($)?0:1,$];break}}k.rank===Aa&&j!=null&&(S.insert(j),I.colliders[M]=[Z,E.contains(j)?0:1,j])}else I.colliders[M]=[-1,0];return I}o(ab,"processColliders");function VC(e,t,r,n,i){switch(i){case"top-left":return new Fe(0,0,r,n);case"top-right":return new Fe(e-r,0,r,n);case"bottom-left":return new Fe(0,t-n,r,n);case"bottom-right":return new Fe(e-r,t-n,r,n);case"center":return new Fe((e-r)/2,(t-n)/2,r,n);case"top":return new Fe((e-r)/2,0,r,n);case"bottom":return new Fe((e-r)/2,t-n,r,n);case"left":return new Fe(0,(t-n)/2,r,n);case"right":return new Fe(e-r,(t-n)/2,r,n);default:return new Fe(0,t-n,r,n)}}o(VC,"getWatermarkBoundary");l();l();function ub(e){let t=e[0].map(r=>{let n=r[0].map(i=>({index:i[4],boundingBox:[i[0],i[1],i[2],i[3]]}));return{enabledAndVisible:r[1]===1,rank:r[2]===1?Aa:0,x:r[3],y:r[4],shouldCollideWithScreenEdges:r[5]===1,bboxes:n,lockedToStrategyIndex:r[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:t,devicePixelRatio:e[1]}}o(ub,"unpackMessage");var qp=class qp{constructor(){h(this,"onerror",o(()=>{},"onerror"));h(this,"onmessage",o(()=>{},"onmessage"));h(this,"postMessage",o(t=>{let r=ub(t);this.onmessage({data:ab(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId)})},"postMessage"));h(this,"terminate",o(()=>{},"terminate"))}};o(qp,"SyncWorker");var rs=qp;l();l();globalThis.MappedinDebug||(globalThis.MappedinDebug={});globalThis.MappedinDebug.__idleCallbackInteractionState={isInteracting:!1,interactionCheckers:[],pendingCallbacks:[],registerInteractionChecker:o(function(e){this.interactionCheckers.push(e)},"registerInteractionChecker"),unregisterInteractionChecker:o(function(e){let t;for(let r=this.interactionCheckers.length-1;r>=0;r--)if(t=this.interactionCheckers[r],t===e){this.interactionCheckers.splice(r,1);break}},"unregisterInteractionChecker"),checkInteraction:o(function(){let e=!1;for(let t=0;t<this.interactionCheckers.length;t++)if(e=this.interactionCheckers[t](),e)return!0;return!1},"checkInteraction"),addPendingCallback:o(function(e,t){this.pendingCallbacks.push({callback:e,timeoutId:t}),this.scheduleDeferredCheck()},"addPendingCallback"),scheduleDeferredCheck:o(function(){var e=this;this.checkTimeoutId||(this.checkTimeoutId=setTimeout(o(function t(){if(e.checkInteraction())e.checkTimeoutId=setTimeout(t,16);else{e.checkTimeoutId=null;var r=e.pendingCallbacks.slice();e.pendingCallbacks=[];let n;for(let i=0;i<r.length;i++)if(n=r[i],n&&n.callback)try{n.callback()}catch(a){}}},"checkAndExecute"),16))},"scheduleDeferredCheck"),removePendingCallback:o(function(e){let t;for(let r=this.pendingCallbacks.length-1;r>=0;r--)if(t=this.pendingCallbacks[r],t.timeoutId===e){this.pendingCallbacks.splice(r,1);break}},"removePendingCallback")};globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var a,u;var t=performance.now(),r,n=!1,i=o(function(){if(!n){n=!0;try{e({didTimeout:!1,timeRemaining:o(function(){return Math.max(0,50-(performance.now()-t))},"timeRemaining")})}catch(c){}}},"wrappedCallback");return(u=(a=globalThis.MappedinDebug)==null?void 0:a.__idleCallbackInteractionState)!=null&&u.checkInteraction()?(r=Date.now()+Math.random(),globalThis.MappedinDebug.__idleCallbackInteractionState.addPendingCallback(i,r),r):(r=setTimeout(i,0),r)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){var t,r;clearTimeout(e),(r=(t=globalThis.MappedinDebug)==null?void 0:t.__idleCallbackInteractionState)==null||r.removePendingCallback(e)};l();l();l();l();l();l();l();l();l();l();l();function Jp(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}o(Jp,"getCoord");function No(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}o(No,"getCoords");function ka(e){return e.type==="Feature"?e.geometry:e}o(ka,"getGeom");function ro(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Jp(e),i=ka(t),a=i.type,u=t.bbox,c=i.coordinates;if(u&&WC(n,u)===!1)return!1;a==="Polygon"&&(c=[c]);for(var m=!1,d=0;d<c.length&&!m;d++)if(sb(n,c[d][0],r.ignoreBoundary)){for(var f=!1,g=1;g<c[d].length&&!f;)sb(n,c[d][g],!r.ignoreBoundary)&&(f=!0),g++;f||(m=!0)}return m}o(ro,"booleanPointInPolygon");function sb(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var u=t[i][0],c=t[i][1],m=t[a][0],d=t[a][1],f=e[1]*(u-m)+c*(m-e[0])+d*(e[0]-u)===0&&(u-e[0])*(m-e[0])<=0&&(c-e[1])*(d-e[1])<=0;if(f)return!r;var g=c>e[1]!=d>e[1]&&e[0]<(m-u)*(e[1]-c)/(d-c)+u;g&&(n=!n)}return n}o(sb,"inRing");function WC(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}o(WC,"inBBox");l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();var Ne={};Ki(Ne,{HasPropertyKey:()=>JC,IsArray:()=>hr,IsAsyncIterator:()=>Xp,IsBigInt:()=>ns,IsBoolean:()=>no,IsDate:()=>Uo,IsFunction:()=>Yp,IsIterator:()=>Qp,IsNull:()=>e0,IsNumber:()=>Dn,IsObject:()=>ut,IsRegExp:()=>is,IsString:()=>ft,IsSymbol:()=>t0,IsUint8Array:()=>xi,IsUndefined:()=>Ct});l();function JC(e,t){return t in e}o(JC,"HasPropertyKey");function Xp(e){return ut(e)&&!hr(e)&&!xi(e)&&Symbol.asyncIterator in e}o(Xp,"IsAsyncIterator");function hr(e){return Array.isArray(e)}o(hr,"IsArray");function ns(e){return typeof e=="bigint"}o(ns,"IsBigInt");function no(e){return typeof e=="boolean"}o(no,"IsBoolean");function Uo(e){return e instanceof globalThis.Date}o(Uo,"IsDate");function Yp(e){return typeof e=="function"}o(Yp,"IsFunction");function Qp(e){return ut(e)&&!hr(e)&&!xi(e)&&Symbol.iterator in e}o(Qp,"IsIterator");function e0(e){return e===null}o(e0,"IsNull");function Dn(e){return typeof e=="number"}o(Dn,"IsNumber");function ut(e){return typeof e=="object"&&e!==null}o(ut,"IsObject");function is(e){return e instanceof globalThis.RegExp}o(is,"IsRegExp");function ft(e){return typeof e=="string"}o(ft,"IsString");function t0(e){return typeof e=="symbol"}o(t0,"IsSymbol");function xi(e){return e instanceof globalThis.Uint8Array}o(xi,"IsUint8Array");function Ct(e){return e===void 0}o(Ct,"IsUndefined");function XC(e){return e.map(t=>sl(t))}o(XC,"ArrayType");function YC(e){return new Date(e.getTime())}o(YC,"DateType");function QC(e){return new Uint8Array(e)}o(QC,"Uint8ArrayType");function eI(e){return new RegExp(e.source,e.flags)}o(eI,"RegExpType");function tI(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=sl(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=sl(e[r]);return t}o(tI,"ObjectType");function sl(e){return hr(e)?XC(e):Uo(e)?YC(e):xi(e)?QC(e):is(e)?eI(e):ut(e)?tI(e):e}o(sl,"Visit");function gt(e){return sl(e)}o(gt,"Clone");function lb(e){return e.map(t=>os(t))}o(lb,"CloneRest");function os(e,t){return t===void 0?gt(e):gt(R(R({},t),e))}o(os,"CloneType");l();l();l();function cl(e){return we(e)&&Symbol.asyncIterator in e}o(cl,"IsAsyncIterator");function ll(e){return we(e)&&Symbol.iterator in e}o(ll,"IsIterator");function r0(e){return we(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(r0,"IsStandardObject");function ml(e){return e instanceof Promise}o(ml,"IsPromise");function Fr(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(Fr,"IsDate");function mb(e){return e instanceof globalThis.Map}o(mb,"IsMap");function db(e){return e instanceof globalThis.Set}o(db,"IsSet");function rn(e){return ArrayBuffer.isView(e)}o(rn,"IsTypedArray");function _a(e){return e instanceof globalThis.Uint8Array}o(_a,"IsUint8Array");function ye(e,t){return t in e}o(ye,"HasPropertyKey");function we(e){return e!==null&&typeof e=="object"}o(we,"IsObject");function Ce(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(Ce,"IsArray");function It(e){return e===void 0}o(It,"IsUndefined");function Ei(e){return e===null}o(Ei,"IsNull");function qn(e){return typeof e=="boolean"}o(qn,"IsBoolean");function de(e){return typeof e=="number"}o(de,"IsNumber");function dl(e){return Number.isInteger(e)}o(dl,"IsInteger");function ir(e){return typeof e=="bigint"}o(ir,"IsBigInt");function Ue(e){return typeof e=="string"}o(Ue,"IsString");function io(e){return typeof e=="function"}o(io,"IsFunction");function Ci(e){return typeof e=="symbol"}o(Ci,"IsSymbol");function or(e){return ir(e)||qn(e)||Ei(e)||de(e)||Ue(e)||Ci(e)||It(e)}o(or,"IsValueType");var Qe;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(u,c){return e.ExactOptionalPropertyTypes?c in u:u[c]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){let c=we(u);return e.AllowArrayObject?c:c&&!Ce(u)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return r(u)&&!(u instanceof Date)&&!(u instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return e.AllowNaN?de(u):Number.isFinite(u)}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){let c=It(u);return e.AllowNullVoid?c||u===null:c}o(a,"IsVoidLike"),e.IsVoidLike=a})(Qe||(Qe={}));l();function rI(e){return globalThis.Object.freeze(e).map(t=>as(t))}o(rI,"ImmutableArray");function nI(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=as(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=as(e[r]);return globalThis.Object.freeze(t)}o(nI,"ImmutableObject");function as(e){return hr(e)?rI(e):Uo(e)?e:xi(e)?e:is(e)?e:ut(e)?nI(e):e}o(as,"Immutable");function H(e,t){let r=t!==void 0?R(R({},t),e):e;switch(Qe.InstanceMode){case"freeze":return as(r);case"clone":return gt(r);default:return r}}o(H,"CreateType");l();var n0=class n0 extends Error{constructor(t){super(t)}};o(n0,"TypeBoxError");var he=n0;l();l();l();var yt=Symbol.for("TypeBox.Transform"),Ii=Symbol.for("TypeBox.Readonly"),Or=Symbol.for("TypeBox.Optional"),nn=Symbol.for("TypeBox.Hint"),_=Symbol.for("TypeBox.Kind");function pb(e){return ut(e)&&e[Ii]==="Readonly"}o(pb,"IsReadonly");function Jn(e){return ut(e)&&e[Or]==="Optional"}o(Jn,"IsOptional");function i0(e){return $e(e,"Any")}o(i0,"IsAny");function Di(e){return $e(e,"Array")}o(Di,"IsArray");function us(e){return $e(e,"AsyncIterator")}o(us,"IsAsyncIterator");function o0(e){return $e(e,"BigInt")}o(o0,"IsBigInt");function a0(e){return $e(e,"Boolean")}o(a0,"IsBoolean");function ss(e){return $e(e,"Constructor")}o(ss,"IsConstructor");function iI(e){return $e(e,"Date")}o(iI,"IsDate");function cs(e){return $e(e,"Function")}o(cs,"IsFunction");function jo(e){return $e(e,"Integer")}o(jo,"IsInteger");function Rt(e){return $e(e,"Intersect")}o(Rt,"IsIntersect");function ls(e){return $e(e,"Iterator")}o(ls,"IsIterator");function $e(e,t){return ut(e)&&_ in e&&e[_]===t}o($e,"IsKindOf");function Si(e){return $e(e,"Literal")}o(Si,"IsLiteral");function Vr(e){return $e(e,"MappedKey")}o(Vr,"IsMappedKey");function bt(e){return $e(e,"MappedResult")}o(bt,"IsMappedResult");function oo(e){return $e(e,"Never")}o(oo,"IsNever");function oI(e){return $e(e,"Not")}o(oI,"IsNot");function aI(e){return $e(e,"Null")}o(aI,"IsNull");function zo(e){return $e(e,"Number")}o(zo,"IsNumber");function $t(e){return $e(e,"Object")}o($t,"IsObject");function $o(e){return $e(e,"Promise")}o($o,"IsPromise");function u0(e){return $e(e,"Record")}o(u0,"IsRecord");function s0(e){return $e(e,"Ref")}o(s0,"IsRef");function c0(e){return $e(e,"RegExp")}o(c0,"IsRegExp");function ms(e){return $e(e,"String")}o(ms,"IsString");function uI(e){return $e(e,"Symbol")}o(uI,"IsSymbol");function Wr(e){return $e(e,"TemplateLiteral")}o(Wr,"IsTemplateLiteral");function sI(e){return $e(e,"This")}o(sI,"IsThis");function La(e){return ut(e)&&yt in e}o(La,"IsTransform");function Sn(e){return $e(e,"Tuple")}o(Sn,"IsTuple");function cI(e){return $e(e,"Undefined")}o(cI,"IsUndefined");function He(e){return $e(e,"Union")}o(He,"IsUnion");function lI(e){return $e(e,"Uint8Array")}o(lI,"IsUint8Array");function mI(e){return $e(e,"Unknown")}o(mI,"IsUnknown");function dI(e){return $e(e,"Unsafe")}o(dI,"IsUnsafe");function pI(e){return $e(e,"Void")}o(pI,"IsVoid");function ao(e){return ut(e)&&_ in e&&ft(e[_])}o(ao,"IsKind");function wn(e){return i0(e)||Di(e)||a0(e)||o0(e)||us(e)||ss(e)||iI(e)||cs(e)||jo(e)||Rt(e)||ls(e)||Si(e)||Vr(e)||bt(e)||oo(e)||oI(e)||aI(e)||zo(e)||$t(e)||$o(e)||u0(e)||s0(e)||c0(e)||ms(e)||uI(e)||Wr(e)||sI(e)||Sn(e)||cI(e)||He(e)||lI(e)||mI(e)||dI(e)||pI(e)||ao(e)}o(wn,"IsSchema");var w={};Ki(w,{IsAny:()=>yb,IsArray:()=>bb,IsAsyncIterator:()=>vb,IsBigInt:()=>xb,IsBoolean:()=>Eb,IsConstructor:()=>Cb,IsDate:()=>Ib,IsFunction:()=>Db,IsInteger:()=>Sb,IsIntersect:()=>wb,IsIterator:()=>Ab,IsKind:()=>Xb,IsKindOf:()=>ze,IsLiteral:()=>ps,IsLiteralBoolean:()=>vI,IsLiteralNumber:()=>Ob,IsLiteralString:()=>Fb,IsLiteralValue:()=>Pb,IsMappedKey:()=>Bb,IsMappedResult:()=>Mb,IsNever:()=>Tb,IsNot:()=>kb,IsNull:()=>_b,IsNumber:()=>Lb,IsObject:()=>Rb,IsOptional:()=>bI,IsPromise:()=>Nb,IsProperties:()=>p0,IsReadonly:()=>yI,IsRecord:()=>Ub,IsRecursive:()=>xI,IsRef:()=>jb,IsRegExp:()=>zb,IsSchema:()=>je,IsString:()=>$b,IsSymbol:()=>Gb,IsTemplateLiteral:()=>Zb,IsThis:()=>Vb,IsTransform:()=>ht,IsTuple:()=>Wb,IsUint8Array:()=>Hb,IsUndefined:()=>Ra,IsUnion:()=>f0,IsUnionLiteral:()=>EI,IsUnknown:()=>Kb,IsUnsafe:()=>qb,IsVoid:()=>Jb,TypeGuardUnknownTypeError:()=>l0});l();var h0=class h0 extends he{};o(h0,"TypeGuardUnknownTypeError");var l0=h0,fI=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function fb(e){try{return new RegExp(e),!0}catch(t){return!1}}o(fb,"IsPattern");function m0(e){if(!ft(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(m0,"IsControlCharacterFree");function hb(e){return d0(e)||je(e)}o(hb,"IsAdditionalProperties");function ds(e){return Ct(e)||ns(e)}o(ds,"IsOptionalBigInt");function dt(e){return Ct(e)||Dn(e)}o(dt,"IsOptionalNumber");function d0(e){return Ct(e)||no(e)}o(d0,"IsOptionalBoolean");function tt(e){return Ct(e)||ft(e)}o(tt,"IsOptionalString");function hI(e){return Ct(e)||ft(e)&&m0(e)&&fb(e)}o(hI,"IsOptionalPattern");function gI(e){return Ct(e)||ft(e)&&m0(e)}o(gI,"IsOptionalFormat");function gb(e){return Ct(e)||je(e)}o(gb,"IsOptionalSchema");function yI(e){return ut(e)&&e[Ii]==="Readonly"}o(yI,"IsReadonly");function bI(e){return ut(e)&&e[Or]==="Optional"}o(bI,"IsOptional");function yb(e){return ze(e,"Any")&&tt(e.$id)}o(yb,"IsAny");function bb(e){return ze(e,"Array")&&e.type==="array"&&tt(e.$id)&&je(e.items)&&dt(e.minItems)&&dt(e.maxItems)&&d0(e.uniqueItems)&&gb(e.contains)&&dt(e.minContains)&&dt(e.maxContains)}o(bb,"IsArray");function vb(e){return ze(e,"AsyncIterator")&&e.type==="AsyncIterator"&&tt(e.$id)&&je(e.items)}o(vb,"IsAsyncIterator");function xb(e){return ze(e,"BigInt")&&e.type==="bigint"&&tt(e.$id)&&ds(e.exclusiveMaximum)&&ds(e.exclusiveMinimum)&&ds(e.maximum)&&ds(e.minimum)&&ds(e.multipleOf)}o(xb,"IsBigInt");function Eb(e){return ze(e,"Boolean")&&e.type==="boolean"&&tt(e.$id)}o(Eb,"IsBoolean");function Cb(e){return ze(e,"Constructor")&&e.type==="Constructor"&&tt(e.$id)&&hr(e.parameters)&&e.parameters.every(t=>je(t))&&je(e.returns)}o(Cb,"IsConstructor");function Ib(e){return ze(e,"Date")&&e.type==="Date"&&tt(e.$id)&&dt(e.exclusiveMaximumTimestamp)&&dt(e.exclusiveMinimumTimestamp)&&dt(e.maximumTimestamp)&&dt(e.minimumTimestamp)&&dt(e.multipleOfTimestamp)}o(Ib,"IsDate");function Db(e){return ze(e,"Function")&&e.type==="Function"&&tt(e.$id)&&hr(e.parameters)&&e.parameters.every(t=>je(t))&&je(e.returns)}o(Db,"IsFunction");function Sb(e){return ze(e,"Integer")&&e.type==="integer"&&tt(e.$id)&&dt(e.exclusiveMaximum)&&dt(e.exclusiveMinimum)&&dt(e.maximum)&&dt(e.minimum)&&dt(e.multipleOf)}o(Sb,"IsInteger");function p0(e){return ut(e)&&Object.entries(e).every(([t,r])=>m0(t)&&je(r))}o(p0,"IsProperties");function wb(e){return ze(e,"Intersect")&&!(ft(e.type)&&e.type!=="object")&&hr(e.allOf)&&e.allOf.every(t=>je(t)&&!ht(t))&&tt(e.type)&&(d0(e.unevaluatedProperties)||gb(e.unevaluatedProperties))&&tt(e.$id)}o(wb,"IsIntersect");function Ab(e){return ze(e,"Iterator")&&e.type==="Iterator"&&tt(e.$id)&&je(e.items)}o(Ab,"IsIterator");function ze(e,t){return ut(e)&&_ in e&&e[_]===t}o(ze,"IsKindOf");function Fb(e){return ps(e)&&ft(e.const)}o(Fb,"IsLiteralString");function Ob(e){return ps(e)&&Dn(e.const)}o(Ob,"IsLiteralNumber");function vI(e){return ps(e)&&no(e.const)}o(vI,"IsLiteralBoolean");function ps(e){return ze(e,"Literal")&&tt(e.$id)&&Pb(e.const)}o(ps,"IsLiteral");function Pb(e){return no(e)||Dn(e)||ft(e)}o(Pb,"IsLiteralValue");function Bb(e){return ze(e,"MappedKey")&&hr(e.keys)&&e.keys.every(t=>Dn(t)||ft(t))}o(Bb,"IsMappedKey");function Mb(e){return ze(e,"MappedResult")&&p0(e.properties)}o(Mb,"IsMappedResult");function Tb(e){return ze(e,"Never")&&ut(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(Tb,"IsNever");function kb(e){return ze(e,"Not")&&je(e.not)}o(kb,"IsNot");function _b(e){return ze(e,"Null")&&e.type==="null"&&tt(e.$id)}o(_b,"IsNull");function Lb(e){return ze(e,"Number")&&e.type==="number"&&tt(e.$id)&&dt(e.exclusiveMaximum)&&dt(e.exclusiveMinimum)&&dt(e.maximum)&&dt(e.minimum)&&dt(e.multipleOf)}o(Lb,"IsNumber");function Rb(e){return ze(e,"Object")&&e.type==="object"&&tt(e.$id)&&p0(e.properties)&&hb(e.additionalProperties)&&dt(e.minProperties)&&dt(e.maxProperties)}o(Rb,"IsObject");function Nb(e){return ze(e,"Promise")&&e.type==="Promise"&&tt(e.$id)&&je(e.item)}o(Nb,"IsPromise");function Ub(e){return ze(e,"Record")&&e.type==="object"&&tt(e.$id)&&hb(e.additionalProperties)&&ut(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&fb(r[0])&&ut(t.patternProperties)&&je(t.patternProperties[r[0]])})(e)}o(Ub,"IsRecord");function xI(e){return ut(e)&&nn in e&&e[nn]==="Recursive"}o(xI,"IsRecursive");function jb(e){return ze(e,"Ref")&&tt(e.$id)&&ft(e.$ref)}o(jb,"IsRef");function zb(e){return ze(e,"RegExp")&&tt(e.$id)&&ft(e.source)&&ft(e.flags)&&dt(e.maxLength)&&dt(e.minLength)}o(zb,"IsRegExp");function $b(e){return ze(e,"String")&&e.type==="string"&&tt(e.$id)&&dt(e.minLength)&&dt(e.maxLength)&&hI(e.pattern)&&gI(e.format)}o($b,"IsString");function Gb(e){return ze(e,"Symbol")&&e.type==="symbol"&&tt(e.$id)}o(Gb,"IsSymbol");function Zb(e){return ze(e,"TemplateLiteral")&&e.type==="string"&&ft(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(Zb,"IsTemplateLiteral");function Vb(e){return ze(e,"This")&&tt(e.$id)&&ft(e.$ref)}o(Vb,"IsThis");function ht(e){return ut(e)&&yt in e}o(ht,"IsTransform");function Wb(e){return ze(e,"Tuple")&&e.type==="array"&&tt(e.$id)&&Dn(e.minItems)&&Dn(e.maxItems)&&e.minItems===e.maxItems&&(Ct(e.items)&&Ct(e.additionalItems)&&e.minItems===0||hr(e.items)&&e.items.every(t=>je(t)))}o(Wb,"IsTuple");function Ra(e){return ze(e,"Undefined")&&e.type==="undefined"&&tt(e.$id)}o(Ra,"IsUndefined");function EI(e){return f0(e)&&e.anyOf.every(t=>Fb(t)||Ob(t))}o(EI,"IsUnionLiteral");function f0(e){return ze(e,"Union")&&tt(e.$id)&&ut(e)&&hr(e.anyOf)&&e.anyOf.every(t=>je(t))}o(f0,"IsUnion");function Hb(e){return ze(e,"Uint8Array")&&e.type==="Uint8Array"&&tt(e.$id)&&dt(e.minByteLength)&&dt(e.maxByteLength)}o(Hb,"IsUint8Array");function Kb(e){return ze(e,"Unknown")&&tt(e.$id)}o(Kb,"IsUnknown");function qb(e){return ze(e,"Unsafe")}o(qb,"IsUnsafe");function Jb(e){return ze(e,"Void")&&e.type==="void"&&tt(e.$id)}o(Jb,"IsVoid");function Xb(e){return ut(e)&&_ in e&&ft(e[_])&&!fI.includes(e[_])}o(Xb,"IsKind");function je(e){return ut(e)&&(yb(e)||bb(e)||Eb(e)||xb(e)||vb(e)||Cb(e)||Ib(e)||Db(e)||Sb(e)||wb(e)||Ab(e)||ps(e)||Bb(e)||Mb(e)||Tb(e)||kb(e)||_b(e)||Lb(e)||Rb(e)||Nb(e)||Ub(e)||jb(e)||zb(e)||$b(e)||Gb(e)||Zb(e)||Vb(e)||Wb(e)||Ra(e)||f0(e)||Hb(e)||Kb(e)||qb(e)||Jb(e)||Xb(e))}o(je,"IsSchema");l();var g0="(true|false)",fs="(0|[1-9][0-9]*)",y0="(.*)",CI="(?!.*)",T9="^".concat(g0,"$"),wi="^".concat(fs,"$"),Ai="^".concat(y0,"$"),Yb="^".concat(CI,"$");l();var Pr={};Ki(Pr,{Clear:()=>DI,Delete:()=>SI,Entries:()=>II,Get:()=>FI,Has:()=>wI,Set:()=>AI});l();var Na=new Map;function II(){return new Map(Na)}o(II,"Entries");function DI(){return Na.clear()}o(DI,"Clear");function SI(e){return Na.delete(e)}o(SI,"Delete");function wI(e){return Na.has(e)}o(wI,"Has");function AI(e,t){Na.set(e,t)}o(AI,"Set");function FI(e){return Na.get(e)}o(FI,"Get");var Gt={};Ki(Gt,{Clear:()=>PI,Delete:()=>BI,Entries:()=>OI,Get:()=>kI,Has:()=>MI,Set:()=>TI});l();var Ua=new Map;function OI(){return new Map(Ua)}o(OI,"Entries");function PI(){return Ua.clear()}o(PI,"Clear");function BI(e){return Ua.delete(e)}o(BI,"Delete");function MI(e){return Ua.has(e)}o(MI,"Has");function TI(e,t){Ua.set(e,t)}o(TI,"Set");function kI(e){return Ua.get(e)}o(kI,"Get");l();function Qb(e,t){return e.includes(t)}o(Qb,"SetIncludes");function e1(e){return[...new Set(e)]}o(e1,"SetDistinct");function _I(e,t){return e.filter(r=>t.includes(r))}o(_I,"SetIntersect");function LI(e,t){return e.reduce((r,n)=>_I(r,n),t)}o(LI,"SetIntersectManyResolve");function t1(e){return e.length===1?e[0]:e.length>1?LI(e.slice(1),e[0]):[]}o(t1,"SetIntersectMany");function r1(e){let t=[];for(let r of e)t.push(...r);return t}o(r1,"SetUnionMany");l();function uo(e){return H({[_]:"Any"},e)}o(uo,"Any");l();function pl(e,t){return H({[_]:"Array",type:"array",items:e},t)}o(pl,"Array");l();function fl(e,t){return H({[_]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(fl,"AsyncIterator");l();l();l();function RI(e,t){let i=e,{[t]:r}=i;return Po(i,[Tc(t)])}o(RI,"DiscardKey");function Pt(e,t){return t.reduce((r,n)=>RI(r,n),e)}o(Pt,"Discard");l();function rt(e){return H({[_]:"Never",not:{}},e)}o(rt,"Never");l();l();function Ge(e){return H({[_]:"MappedResult",properties:e})}o(Ge,"MappedResult");l();l();function hl(e,t,r){return H({[_]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(hl,"Constructor");l();function so(e,t,r){return H({[_]:"Function",type:"Function",parameters:e,returns:t},r)}o(so,"Function");l();l();l();l();function hs(e,t){return H({[_]:"Union",anyOf:e},t)}o(hs,"UnionCreate");function NI(e){return e.some(t=>Jn(t))}o(NI,"IsUnionOptional");function n1(e){return e.map(t=>Jn(t)?UI(t):t)}o(n1,"RemoveOptionalFromRest");function UI(e){return Pt(e,[Or])}o(UI,"RemoveOptionalFromType");function jI(e,t){return NI(e)?Rr(hs(n1(e),t)):hs(n1(e),t)}o(jI,"ResolveUnion");function Xn(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):jI(e,t)}o(Xn,"UnionEvaluated");l();function nt(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):hs(e,t)}o(nt,"Union");l();l();l();var v0=class v0 extends he{};o(v0,"TemplateLiteralParserError");var gl=v0;function zI(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(zI,"Unescape");function b0(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(b0,"IsNonEscaped");function Fi(e,t){return b0(e,t,"(")}o(Fi,"IsOpenParen");function gs(e,t){return b0(e,t,")")}o(gs,"IsCloseParen");function i1(e,t){return b0(e,t,"|")}o(i1,"IsSeparator");function $I(e){if(!(Fi(e,0)&&gs(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(Fi(e,r)&&(t+=1),gs(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o($I,"IsGroup");function GI(e){return e.slice(1,e.length-1)}o(GI,"InGroup");function ZI(e){let t=0;for(let r=0;r<e.length;r++)if(Fi(e,r)&&(t+=1),gs(e,r)&&(t-=1),i1(e,r)&&t===0)return!0;return!1}o(ZI,"IsPrecedenceOr");function VI(e){for(let t=0;t<e.length;t++)if(Fi(e,t))return!0;return!1}o(VI,"IsPrecedenceAnd");function WI(e){let[t,r]=[0,0],n=[];for(let a=0;a<e.length;a++)if(Fi(e,a)&&(t+=1),gs(e,a)&&(t-=1),i1(e,a)&&t===0){let u=e.slice(r,a);u.length>0&&n.push(ja(u)),r=a+1}let i=e.slice(r);return i.length>0&&n.push(ja(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(WI,"Or");function HI(e){function t(i,a){if(!Fi(i,a))throw new gl("TemplateLiteralParser: Index must point to open parens");let u=0;for(let c=a;c<i.length;c++)if(Fi(i,c)&&(u+=1),gs(i,c)&&(u-=1),u===0)return[a,c];throw new gl("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,a){for(let u=a;u<i.length;u++)if(Fi(i,u))return[a,u];return[a,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(Fi(e,i)){let[a,u]=t(e,i),c=e.slice(a,u+1);n.push(ja(c)),i=u}else{let[a,u]=r(e,i),c=e.slice(a,u);c.length>0&&n.push(ja(c)),i=u-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(HI,"And");function ja(e){return $I(e)?ja(GI(e)):ZI(e)?WI(e):VI(e)?HI(e):{type:"const",const:zI(e)}}o(ja,"TemplateLiteralParse");function za(e){return ja(e.slice(1,e.length-1))}o(za,"TemplateLiteralParseExact");var E0=class E0 extends he{};o(E0,"TemplateLiteralFiniteError");var x0=E0;function KI(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}o(KI,"IsNumberExpression");function qI(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}o(qI,"IsBooleanExpression");function JI(e){return e.type==="const"&&e.const===".*"}o(JI,"IsStringExpression");function Go(e){return KI(e)||JI(e)?!1:qI(e)?!0:e.type==="and"?e.expr.every(t=>Go(t)):e.type==="or"?e.expr.every(t=>Go(t)):e.type==="const"?!0:(()=>{throw new x0("Unknown expression type")})()}o(Go,"IsTemplateLiteralExpressionFinite");function yl(e){let t=za(e.pattern);return Go(t)}o(yl,"IsTemplateLiteralFinite");l();var I0=class I0 extends he{};o(I0,"TemplateLiteralGenerateError");var C0=I0;function*o1(e){if(e.length===1)return yield*X(e[0]);for(let t of e[0])for(let r of o1(e.slice(1)))yield"".concat(t).concat(r)}o(o1,"GenerateReduce");function*XI(e){return yield*X(o1(e.expr.map(t=>[...ys(t)])))}o(XI,"GenerateAnd");function*YI(e){for(let t of e.expr)yield*X(ys(t))}o(YI,"GenerateOr");function*QI(e){return yield e.const}o(QI,"GenerateConst");function*ys(e){return e.type==="and"?yield*X(XI(e)):e.type==="or"?yield*X(YI(e)):e.type==="const"?yield*X(QI(e)):(()=>{throw new C0("Unknown expression")})()}o(ys,"TemplateLiteralExpressionGenerate");function $a(e){let t=za(e.pattern);return Go(t)?[...ys(t)]:[]}o($a,"TemplateLiteralGenerate");l();l();function Ke(e,t){return H({[_]:"Literal",const:e,type:typeof e},t)}o(Ke,"Literal");l();function bl(e){return H({[_]:"Boolean",type:"boolean"},e)}o(bl,"Boolean");l();function Ga(e){return H({[_]:"BigInt",type:"bigint"},e)}o(Ga,"BigInt");l();function Yn(e){return H({[_]:"Number",type:"number"},e)}o(Yn,"Number");l();function on(e){return H({[_]:"String",type:"string"},e)}o(on,"String");function*e2(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield bl():t==="number"?yield Yn():t==="bigint"?yield Ga():t==="string"?yield on():yield(()=>{let r=t.split("|").map(n=>Ke(n.trim()));return r.length===0?rt():r.length===1?r[0]:Xn(r)})()}o(e2,"FromUnion");function*t2(e){if(e[1]!=="{"){let t=Ke("$"),r=D0(e.slice(1));return yield*X([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=e2(e.slice(2,t)),n=D0(e.slice(t+1));return yield*X([...r,...n])}yield Ke(e)}o(t2,"FromTerminal");function*D0(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=Ke(e.slice(0,t)),n=t2(e.slice(t));return yield*X([r,...n])}yield Ke(e)}o(D0,"FromSyntax");function a1(e){return[...D0(e)]}o(a1,"TemplateLiteralSyntax");l();var A0=class A0 extends he{};o(A0,"TemplateLiteralPatternError");var S0=A0;function r2(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(r2,"Escape");function u1(e,t){return Wr(e)?e.pattern.slice(1,e.pattern.length-1):He(e)?"(".concat(e.anyOf.map(r=>u1(r,t)).join("|"),")"):zo(e)?"".concat(t).concat(fs):jo(e)?"".concat(t).concat(fs):o0(e)?"".concat(t).concat(fs):ms(e)?"".concat(t).concat(y0):Si(e)?"".concat(t).concat(r2(e.const.toString())):a0(e)?"".concat(t).concat(g0):(()=>{throw new S0("Unexpected Kind '".concat(e[_],"'"))})()}o(u1,"Visit");function w0(e){return"^".concat(e.map(t=>u1(t,"")).join(""),"$")}o(w0,"TemplateLiteralPattern");l();function Zo(e){let r=$a(e).map(n=>Ke(n));return Xn(r)}o(Zo,"TemplateLiteralToUnion");l();function vl(e,t){let r=ft(e)?w0(a1(e)):w0(e);return H({[_]:"TemplateLiteral",type:"string",pattern:r},t)}o(vl,"TemplateLiteral");function n2(e){return $a(e).map(r=>r.toString())}o(n2,"FromTemplateLiteral");function i2(e){let t=[];for(let r of e)t.push(...Nr(r));return t}o(i2,"FromUnion");function o2(e){return[e.toString()]}o(o2,"FromLiteral");function Nr(e){return[...new Set(Wr(e)?n2(e):He(e)?i2(e.anyOf):Si(e)?o2(e.const):zo(e)?["[number]"]:jo(e)?["[number]"]:[])]}o(Nr,"IndexPropertyKeys");l();function a2(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Za(e,Nr(t[i]),r);return n}o(a2,"FromProperties");function u2(e,t,r){return a2(e,t.properties,r)}o(u2,"FromMappedResult");function s1(e,t,r){let n=u2(e,t,r);return Ge(n)}o(s1,"IndexFromMappedResult");function l1(e,t){return e.map(r=>m1(r,t))}o(l1,"FromRest");function s2(e){return e.filter(t=>!oo(t))}o(s2,"FromIntersectRest");function c2(e,t){return xl(s2(l1(e,t)))}o(c2,"FromIntersect");function l2(e){return e.some(t=>oo(t))?[]:e}o(l2,"FromUnionRest");function m2(e,t){return Xn(l2(l1(e,t)))}o(m2,"FromUnion");function d2(e,t){return t in e?e[t]:t==="[number]"?Xn(e):rt()}o(d2,"FromTuple");function p2(e,t){return t==="[number]"?e:rt()}o(p2,"FromArray");function f2(e,t){return t in e?e[t]:rt()}o(f2,"FromProperty");function m1(e,t){var r;return Rt(e)?c2(e.allOf,t):He(e)?m2(e.anyOf,t):Sn(e)?d2((r=e.items)!=null?r:[],t):Di(e)?p2(e.items,t):$t(e)?f2(e.properties,t):rt()}o(m1,"IndexFromPropertyKey");function bs(e,t){return t.map(r=>m1(e,r))}o(bs,"IndexFromPropertyKeys");function c1(e,t){return Xn(bs(e,t))}o(c1,"FromSchema");function Za(e,t,r){return bt(t)?s1(e,t,r):Vr(t)?d1(e,t,r):H(wn(t)?c1(e,Nr(t)):c1(e,t),r)}o(Za,"Index");function h2(e,t,r){return{[t]:Za(e,[t],gt(r))}}o(h2,"MappedIndexPropertyKey");function g2(e,t,r){return t.reduce((n,i)=>R(R({},n),h2(e,i,r)),{})}o(g2,"MappedIndexPropertyKeys");function y2(e,t,r){return g2(e,t.keys,r)}o(y2,"MappedIndexProperties");function d1(e,t,r){let n=y2(e,t,r);return Ge(n)}o(d1,"IndexFromMappedKey");l();function El(e,t){return H({[_]:"Iterator",type:"Iterator",items:e},t)}o(El,"Iterator");l();function b2(e){let t=[];for(let r in e)Jn(e[r])||t.push(r);return t}o(b2,"RequiredKeys");function v2(e,t){let r=b2(e),n=r.length>0?{[_]:"Object",type:"object",properties:e,required:r}:{[_]:"Object",type:"object",properties:e};return H(n,t)}o(v2,"_Object");var st=v2;l();function Cl(e,t){return H({[_]:"Promise",type:"Promise",item:e},t)}o(Cl,"Promise");l();l();function x2(e){return H(Pt(e,[Ii]))}o(x2,"RemoveReadonly");function E2(e){return H(De(R({},e),{[Ii]:"Readonly"}))}o(E2,"AddReadonly");function C2(e,t){return t===!1?x2(e):E2(e)}o(C2,"ReadonlyWithFlag");function an(e,t){let r=t!=null?t:!0;return bt(e)?p1(e,r):C2(e,r)}o(an,"Readonly");function I2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=an(e[n],t);return r}o(I2,"FromProperties");function D2(e,t){return I2(e.properties,t)}o(D2,"FromMappedResult");function p1(e,t){let r=D2(e,t);return Ge(r)}o(p1,"ReadonlyFromMappedResult");l();function Qn(e,t){return H(e.length>0?{[_]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[_]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(Qn,"Tuple");function f1(e,t){return e in t?un(e,t[e]):Ge(t)}o(f1,"FromMappedResult");function S2(e){return{[e]:Ke(e)}}o(S2,"MappedKeyToKnownMappedResultProperties");function w2(e){let t={};for(let r of e)t[r]=Ke(r);return t}o(w2,"MappedKeyToUnknownMappedResultProperties");function A2(e,t){return Qb(t,e)?S2(e):w2(t)}o(A2,"MappedKeyToMappedResultProperties");function F2(e,t){let r=A2(e,t);return f1(e,r)}o(F2,"FromMappedKey");function vs(e,t){return t.map(r=>un(e,r))}o(vs,"FromRest");function O2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=un(e,t[n]);return r}o(O2,"FromProperties");function un(e,t){var n;let r=R({},t);return Jn(t)?Rr(un(e,Pt(t,[Or]))):pb(t)?an(un(e,Pt(t,[Ii]))):bt(t)?f1(e,t.properties):Vr(t)?F2(e,t.keys):ss(t)?hl(vs(e,t.parameters),un(e,t.returns),r):cs(t)?so(vs(e,t.parameters),un(e,t.returns),r):us(t)?fl(un(e,t.items),r):ls(t)?El(un(e,t.items),r):Rt(t)?Ur(vs(e,t.allOf),r):He(t)?nt(vs(e,t.anyOf),r):Sn(t)?Qn(vs(e,(n=t.items)!=null?n:[]),r):$t(t)?st(O2(e,t.properties),r):Di(t)?pl(un(e,t.items),r):$o(t)?Cl(un(e,t.item),r):t}o(un,"FromSchemaType");function P2(e,t){let r={};for(let n of e)r[n]=un(n,t);return r}o(P2,"MappedFunctionReturnType");function h1(e,t,r){let n=wn(e)?Nr(e):e,i=t({[_]:"MappedKey",keys:n}),a=P2(n,i);return st(a,r)}o(h1,"Mapped");l();function B2(e){return H(Pt(e,[Or]))}o(B2,"RemoveOptional");function M2(e){return H(De(R({},e),{[Or]:"Optional"}))}o(M2,"AddOptional");function T2(e,t){return t===!1?B2(e):M2(e)}o(T2,"OptionalWithFlag");function Rr(e,t){let r=t!=null?t:!0;return bt(e)?g1(e,r):T2(e,r)}o(Rr,"Optional");function k2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Rr(e[n],t);return r}o(k2,"FromProperties");function _2(e,t){return k2(e.properties,t)}o(_2,"FromMappedResult");function g1(e,t){let r=_2(e,t);return Ge(r)}o(g1,"OptionalFromMappedResult");l();function xs(e,t={}){let r=e.every(i=>$t(i)),n=wn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return H(t.unevaluatedProperties===!1||wn(t.unevaluatedProperties)||r?De(R({},n),{[_]:"Intersect",type:"object",allOf:e}):De(R({},n),{[_]:"Intersect",allOf:e}),t)}o(xs,"IntersectCreate");function L2(e){return e.every(t=>Jn(t))}o(L2,"IsIntersectOptional");function R2(e){return Pt(e,[Or])}o(R2,"RemoveOptionalFromType");function y1(e){return e.map(t=>Jn(t)?R2(t):t)}o(y1,"RemoveOptionalFromRest");function N2(e,t){return L2(e)?Rr(xs(y1(e),t)):xs(y1(e),t)}o(N2,"ResolveIntersect");function xl(e,t={}){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>La(r)))throw new Error("Cannot intersect transform types");return N2(e,t)}o(xl,"IntersectEvaluated");l();function Ur(e,t){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>La(r)))throw new Error("Cannot intersect transform types");return xs(e,t)}o(Ur,"Intersect");function b1(e){return e.map(t=>F0(t))}o(b1,"FromRest");function U2(e){return Ur(b1(e))}o(U2,"FromIntersect");function j2(e){return nt(b1(e))}o(j2,"FromUnion");function z2(e){return F0(e)}o(z2,"FromPromise");function F0(e){return Rt(e)?U2(e.allOf):He(e)?j2(e.anyOf):$o(e)?z2(e.item):e}o(F0,"AwaitedResolve");function v1(e,t){return H(F0(e),t)}o(v1,"Awaited");l();l();l();l();function x1(e){let t=[];for(let r of e)t.push(Xt(r));return t}o(x1,"FromRest");function $2(e){let t=x1(e);return r1(t)}o($2,"FromIntersect");function G2(e){let t=x1(e);return t1(t)}o(G2,"FromUnion");function Z2(e){return e.map((t,r)=>r.toString())}o(Z2,"FromTuple");function V2(e){return["[number]"]}o(V2,"FromArray");function W2(e){return globalThis.Object.getOwnPropertyNames(e)}o(W2,"FromProperties");function H2(e){return O0?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(H2,"FromPatternProperties");function Xt(e){var t;return Rt(e)?$2(e.allOf):He(e)?G2(e.anyOf):Sn(e)?Z2((t=e.items)!=null?t:[]):Di(e)?V2(e.items):$t(e)?W2(e.properties):u0(e)?H2(e.patternProperties):[]}o(Xt,"KeyOfPropertyKeys");var O0=!1;function Oi(e){O0=!0;let t=Xt(e);O0=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(Oi,"KeyOfPattern");function K2(e){return e.map(t=>t==="[number]"?Yn():Ke(t))}o(K2,"KeyOfPropertyKeysToRest");function Il(e,t){if(bt(e))return E1(e,t);{let r=Xt(e),n=K2(r),i=Xn(n);return H(i,t)}}o(Il,"KeyOf");function q2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Il(e[n],gt(t));return r}o(q2,"FromProperties");function J2(e,t){return q2(e.properties,t)}o(J2,"FromMappedResult");function E1(e,t){let r=J2(e,t);return Ge(r)}o(E1,"KeyOfFromMappedResult");l();function co(e){let t=Xt(e),r=bs(e,t);return t.map((n,i)=>[t[i],r[i]])}o(co,"KeyOfPropertyEntries");function X2(e){let t=[];for(let r of e)t.push(...Xt(r));return e1(t)}o(X2,"CompositeKeys");function Y2(e){return e.filter(t=>!oo(t))}o(Y2,"FilterNever");function Q2(e,t){let r=[];for(let n of e)r.push(...bs(n,[t]));return Y2(r)}o(Q2,"CompositeProperty");function eD(e,t){let r={};for(let n of t)r[n]=xl(Q2(e,n));return r}o(eD,"CompositeProperties");function C1(e,t){let r=X2(e),n=eD(e,r);return st(n,t)}o(C1,"Composite");l();l();function Dl(e){return H({[_]:"Date",type:"Date"},e)}o(Dl,"Date");l();function Sl(e){return H({[_]:"Null",type:"null"},e)}o(Sl,"Null");l();function wl(e){return H({[_]:"Symbol",type:"symbol"},e)}o(wl,"Symbol");l();function Al(e){return H({[_]:"Undefined",type:"undefined"},e)}o(Al,"Undefined");l();function Fl(e){return H({[_]:"Uint8Array",type:"Uint8Array"},e)}o(Fl,"Uint8Array");l();function Pi(e){return H({[_]:"Unknown"},e)}o(Pi,"Unknown");function tD(e){return e.map(t=>P0(t,!1))}o(tD,"FromArray");function rD(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=an(P0(e[r],!1));return t}o(rD,"FromProperties");function Ol(e,t){return t===!0?e:an(e)}o(Ol,"ConditionalReadonly");function P0(e,t){return Xp(e)?Ol(uo(),t):Qp(e)?Ol(uo(),t):hr(e)?an(Qn(tD(e))):xi(e)?Fl():Uo(e)?Dl():ut(e)?Ol(st(rD(e)),t):Yp(e)?Ol(so([],Pi()),t):Ct(e)?Al():e0(e)?Sl():t0(e)?wl():ns(e)?Ga():Dn(e)?Ke(e):no(e)?Ke(e):ft(e)?Ke(e):st({})}o(P0,"FromValue");function I1(e,t){return H(P0(e,!0),t)}o(I1,"Const");l();function D1(e,t){return Qn(e.parameters,t)}o(D1,"ConstructorParameters");l();function Es(e,t){return e.map(r=>An(r,t))}o(Es,"FromRest");function nD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=An(e[n],t);return r}o(nD,"FromProperties");function iD(e,t){return e.parameters=Es(e.parameters,t),e.returns=An(e.returns,t),e}o(iD,"FromConstructor");function oD(e,t){return e.parameters=Es(e.parameters,t),e.returns=An(e.returns,t),e}o(oD,"FromFunction");function aD(e,t){return e.allOf=Es(e.allOf,t),e}o(aD,"FromIntersect");function uD(e,t){return e.anyOf=Es(e.anyOf,t),e}o(uD,"FromUnion");function sD(e,t){return Ct(e.items)||(e.items=Es(e.items,t)),e}o(sD,"FromTuple");function cD(e,t){return e.items=An(e.items,t),e}o(cD,"FromArray");function lD(e,t){return e.properties=nD(e.properties,t),e}o(lD,"FromObject");function mD(e,t){return e.item=An(e.item,t),e}o(mD,"FromPromise");function dD(e,t){return e.items=An(e.items,t),e}o(dD,"FromAsyncIterator");function pD(e,t){return e.items=An(e.items,t),e}o(pD,"FromIterator");function fD(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=Pt(r,["$id"]);return An(n,t)}o(fD,"FromRef");function hD(e,t){return ss(e)?iD(e,t):cs(e)?oD(e,t):Rt(e)?aD(e,t):He(e)?uD(e,t):Sn(e)?sD(e,t):Di(e)?cD(e,t):$t(e)?lD(e,t):$o(e)?mD(e,t):us(e)?dD(e,t):ls(e)?pD(e,t):s0(e)?fD(e,t):e}o(hD,"DerefResolve");function An(e,t){return hD(os(e),lb(t))}o(An,"Deref");l();function S1(e,t){if(Ct(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),i=[...new Set(r)].map(a=>Ke(a));return nt(i,De(R({},t),{[nn]:"Enum"}))}o(S1,"Enum");l();l();l();var R0=class R0 extends he{};o(R0,"ExtendsResolverError");var M0=R0,U;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(U||(U={}));function sn(e){return e===U.False?e:U.True}o(sn,"IntoBooleanResult");function Va(e){throw new M0(e)}o(Va,"Throw");function Ut(e){return w.IsNever(e)||w.IsIntersect(e)||w.IsUnion(e)||w.IsUnknown(e)||w.IsAny(e)}o(Ut,"IsStructuralRight");function jt(e,t){return w.IsNever(t)?M1(e,t):w.IsIntersect(t)?Pl(e,t):w.IsUnion(t)?L0(e,t):w.IsUnknown(t)?L1(e,t):w.IsAny(t)?_0(e,t):Va("StructuralRight")}o(jt,"StructuralRight");function _0(e,t){return U.True}o(_0,"FromAnyRight");function gD(e,t){return w.IsIntersect(t)?Pl(e,t):w.IsUnion(t)&&t.anyOf.some(r=>w.IsAny(r)||w.IsUnknown(r))?U.True:w.IsUnion(t)?U.Union:w.IsUnknown(t)||w.IsAny(t)?U.True:U.Union}o(gD,"FromAny");function yD(e,t){return w.IsUnknown(e)?U.False:w.IsAny(e)?U.Union:w.IsNever(e)?U.True:U.False}o(yD,"FromArrayRight");function bD(e,t){return w.IsObject(t)&&Bl(t)?U.True:Ut(t)?jt(e,t):w.IsArray(t)?sn(it(e.items,t.items)):U.False}o(bD,"FromArray");function vD(e,t){return Ut(t)?jt(e,t):w.IsAsyncIterator(t)?sn(it(e.items,t.items)):U.False}o(vD,"FromAsyncIterator");function xD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsBigInt(t)?U.True:U.False}o(xD,"FromBigInt");function P1(e,t){return w.IsLiteralBoolean(e)||w.IsBoolean(e)?U.True:U.False}o(P1,"FromBooleanRight");function ED(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsBoolean(t)?U.True:U.False}o(ED,"FromBoolean");function CD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsConstructor(t)?e.parameters.length>t.parameters.length?U.False:e.parameters.every((r,n)=>sn(it(t.parameters[n],r))===U.True)?sn(it(e.returns,t.returns)):U.False:U.False}o(CD,"FromConstructor");function ID(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsDate(t)?U.True:U.False}o(ID,"FromDate");function DD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsFunction(t)?e.parameters.length>t.parameters.length?U.False:e.parameters.every((r,n)=>sn(it(t.parameters[n],r))===U.True)?sn(it(e.returns,t.returns)):U.False:U.False}o(DD,"FromFunction");function B1(e,t){return w.IsLiteral(e)&&Ne.IsNumber(e.const)||w.IsNumber(e)||w.IsInteger(e)?U.True:U.False}o(B1,"FromIntegerRight");function SD(e,t){return w.IsInteger(t)||w.IsNumber(t)?U.True:Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):U.False}o(SD,"FromInteger");function Pl(e,t){return t.allOf.every(r=>it(e,r)===U.True)?U.True:U.False}o(Pl,"FromIntersectRight");function wD(e,t){return e.allOf.some(r=>it(r,t)===U.True)?U.True:U.False}o(wD,"FromIntersect");function AD(e,t){return Ut(t)?jt(e,t):w.IsIterator(t)?sn(it(e.items,t.items)):U.False}o(AD,"FromIterator");function FD(e,t){return w.IsLiteral(t)&&t.const===e.const?U.True:Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsString(t)?_1(e,t):w.IsNumber(t)?T1(e,t):w.IsInteger(t)?B1(e,t):w.IsBoolean(t)?P1(e,t):U.False}o(FD,"FromLiteral");function M1(e,t){return U.False}o(M1,"FromNeverRight");function OD(e,t){return U.True}o(OD,"FromNever");function w1(e){let[t,r]=[e,0];for(;w.IsNot(t);)t=t.not,r+=1;return r%2===0?t:Pi()}o(w1,"UnwrapTNot");function PD(e,t){return w.IsNot(e)?it(w1(e),t):w.IsNot(t)?it(e,w1(t)):Va("Invalid fallthrough for Not")}o(PD,"FromNot");function BD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsNull(t)?U.True:U.False}o(BD,"FromNull");function T1(e,t){return w.IsLiteralNumber(e)||w.IsNumber(e)||w.IsInteger(e)?U.True:U.False}o(T1,"FromNumberRight");function MD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsInteger(t)||w.IsNumber(t)?U.True:U.False}o(MD,"FromNumber");function jr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(jr,"IsObjectPropertyCount");function A1(e){return Bl(e)}o(A1,"IsObjectStringLike");function F1(e){return jr(e,0)||jr(e,1)&&"description"in e.properties&&w.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(w.IsString(e.properties.description.anyOf[0])&&w.IsUndefined(e.properties.description.anyOf[1])||w.IsString(e.properties.description.anyOf[1])&&w.IsUndefined(e.properties.description.anyOf[0]))}o(F1,"IsObjectSymbolLike");function B0(e){return jr(e,0)}o(B0,"IsObjectNumberLike");function O1(e){return jr(e,0)}o(O1,"IsObjectBooleanLike");function TD(e){return jr(e,0)}o(TD,"IsObjectBigIntLike");function kD(e){return jr(e,0)}o(kD,"IsObjectDateLike");function _D(e){return Bl(e)}o(_D,"IsObjectUint8ArrayLike");function LD(e){let t=Yn();return jr(e,0)||jr(e,1)&&"length"in e.properties&&sn(it(e.properties.length,t))===U.True}o(LD,"IsObjectFunctionLike");function RD(e){return jr(e,0)}o(RD,"IsObjectConstructorLike");function Bl(e){let t=Yn();return jr(e,0)||jr(e,1)&&"length"in e.properties&&sn(it(e.properties.length,t))===U.True}o(Bl,"IsObjectArrayLike");function ND(e){let t=so([uo()],uo());return jr(e,0)||jr(e,1)&&"then"in e.properties&&sn(it(e.properties.then,t))===U.True}o(ND,"IsObjectPromiseLike");function k1(e,t){return it(e,t)===U.False||w.IsOptional(e)&&!w.IsOptional(t)?U.False:U.True}o(k1,"Property");function gr(e,t){return w.IsUnknown(e)?U.False:w.IsAny(e)?U.Union:w.IsNever(e)||w.IsLiteralString(e)&&A1(t)||w.IsLiteralNumber(e)&&B0(t)||w.IsLiteralBoolean(e)&&O1(t)||w.IsSymbol(e)&&F1(t)||w.IsBigInt(e)&&TD(t)||w.IsString(e)&&A1(t)||w.IsSymbol(e)&&F1(t)||w.IsNumber(e)&&B0(t)||w.IsInteger(e)&&B0(t)||w.IsBoolean(e)&&O1(t)||w.IsUint8Array(e)&&_D(t)||w.IsDate(e)&&kD(t)||w.IsConstructor(e)&&RD(t)||w.IsFunction(e)&&LD(t)?U.True:w.IsRecord(e)&&w.IsString(T0(e))?t[nn]==="Record"?U.True:U.False:w.IsRecord(e)&&w.IsNumber(T0(e))?jr(t,0)?U.True:U.False:U.False}o(gr,"FromObjectRight");function UD(e,t){return Ut(t)?jt(e,t):w.IsRecord(t)?cn(e,t):w.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!w.IsOptional(t.properties[r]))return U.False;if(w.IsOptional(t.properties[r]))return U.True;if(k1(e.properties[r],t.properties[r])===U.False)return U.False}return U.True})():U.False}o(UD,"FromObject");function jD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)&&ND(t)?U.True:w.IsPromise(t)?sn(it(e.item,t.item)):U.False}o(jD,"FromPromise");function T0(e){return wi in e.patternProperties?Yn():Ai in e.patternProperties?on():Va("Unknown record key pattern")}o(T0,"RecordKey");function k0(e){return wi in e.patternProperties?e.patternProperties[wi]:Ai in e.patternProperties?e.patternProperties[Ai]:Va("Unable to get record value schema")}o(k0,"RecordValue");function cn(e,t){let[r,n]=[T0(t),k0(t)];return w.IsLiteralString(e)&&w.IsNumber(r)&&sn(it(e,n))===U.True?U.True:w.IsUint8Array(e)&&w.IsNumber(r)||w.IsString(e)&&w.IsNumber(r)||w.IsArray(e)&&w.IsNumber(r)?it(e,n):w.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(k1(n,e.properties[i])===U.False)return U.False;return U.True})():U.False}o(cn,"FromRecordRight");function zD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?it(k0(e),k0(t)):U.False}o(zD,"FromRecord");function $D(e,t){let r=w.IsRegExp(e)?on():e,n=w.IsRegExp(t)?on():t;return it(r,n)}o($D,"FromRegExp");function _1(e,t){return w.IsLiteral(e)&&Ne.IsString(e.const)||w.IsString(e)?U.True:U.False}o(_1,"FromStringRight");function GD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsString(t)?U.True:U.False}o(GD,"FromString");function ZD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsSymbol(t)?U.True:U.False}o(ZD,"FromSymbol");function VD(e,t){return w.IsTemplateLiteral(e)?it(Zo(e),t):w.IsTemplateLiteral(t)?it(e,Zo(t)):Va("Invalid fallthrough for TemplateLiteral")}o(VD,"FromTemplateLiteral");function WD(e,t){return w.IsArray(t)&&e.items!==void 0&&e.items.every(r=>it(r,t.items)===U.True)}o(WD,"IsArrayOfTuple");function HD(e,t){return w.IsNever(e)?U.True:w.IsUnknown(e)?U.False:w.IsAny(e)?U.Union:U.False}o(HD,"FromTupleRight");function KD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)&&Bl(t)||w.IsArray(t)&&WD(e,t)?U.True:w.IsTuple(t)?Ne.IsUndefined(e.items)&&!Ne.IsUndefined(t.items)||!Ne.IsUndefined(e.items)&&Ne.IsUndefined(t.items)?U.False:Ne.IsUndefined(e.items)&&!Ne.IsUndefined(t.items)||e.items.every((r,n)=>it(r,t.items[n])===U.True)?U.True:U.False:U.False}o(KD,"FromTuple");function qD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsUint8Array(t)?U.True:U.False}o(qD,"FromUint8Array");function JD(e,t){return Ut(t)?jt(e,t):w.IsObject(t)?gr(e,t):w.IsRecord(t)?cn(e,t):w.IsVoid(t)?QD(e,t):w.IsUndefined(t)?U.True:U.False}o(JD,"FromUndefined");function L0(e,t){return t.anyOf.some(r=>it(e,r)===U.True)?U.True:U.False}o(L0,"FromUnionRight");function XD(e,t){return e.anyOf.every(r=>it(r,t)===U.True)?U.True:U.False}o(XD,"FromUnion");function L1(e,t){return U.True}o(L1,"FromUnknownRight");function YD(e,t){return w.IsNever(t)?M1(e,t):w.IsIntersect(t)?Pl(e,t):w.IsUnion(t)?L0(e,t):w.IsAny(t)?_0(e,t):w.IsString(t)?_1(e,t):w.IsNumber(t)?T1(e,t):w.IsInteger(t)?B1(e,t):w.IsBoolean(t)?P1(e,t):w.IsArray(t)?yD(e,t):w.IsTuple(t)?HD(e,t):w.IsObject(t)?gr(e,t):w.IsUnknown(t)?U.True:U.False}o(YD,"FromUnknown");function QD(e,t){return w.IsUndefined(e)||w.IsUndefined(e)?U.True:U.False}o(QD,"FromVoidRight");function eS(e,t){return w.IsIntersect(t)?Pl(e,t):w.IsUnion(t)?L0(e,t):w.IsUnknown(t)?L1(e,t):w.IsAny(t)?_0(e,t):w.IsObject(t)?gr(e,t):w.IsVoid(t)?U.True:U.False}o(eS,"FromVoid");function it(e,t){return w.IsTemplateLiteral(e)||w.IsTemplateLiteral(t)?VD(e,t):w.IsRegExp(e)||w.IsRegExp(t)?$D(e,t):w.IsNot(e)||w.IsNot(t)?PD(e,t):w.IsAny(e)?gD(e,t):w.IsArray(e)?bD(e,t):w.IsBigInt(e)?xD(e,t):w.IsBoolean(e)?ED(e,t):w.IsAsyncIterator(e)?vD(e,t):w.IsConstructor(e)?CD(e,t):w.IsDate(e)?ID(e,t):w.IsFunction(e)?DD(e,t):w.IsInteger(e)?SD(e,t):w.IsIntersect(e)?wD(e,t):w.IsIterator(e)?AD(e,t):w.IsLiteral(e)?FD(e,t):w.IsNever(e)?OD(e,t):w.IsNull(e)?BD(e,t):w.IsNumber(e)?MD(e,t):w.IsObject(e)?UD(e,t):w.IsRecord(e)?zD(e,t):w.IsString(e)?GD(e,t):w.IsSymbol(e)?ZD(e,t):w.IsTuple(e)?KD(e,t):w.IsPromise(e)?jD(e,t):w.IsUint8Array(e)?qD(e,t):w.IsUndefined(e)?JD(e,t):w.IsUnion(e)?XD(e,t):w.IsUnknown(e)?YD(e,t):w.IsVoid(e)?eS(e,t):Va("Unknown left type operand '".concat(e[_],"'"))}o(it,"Visit");function lo(e,t){return it(e,t)}o(lo,"ExtendsCheck");l();l();l();function tS(e,t,r,n,i){let a={};for(let u of globalThis.Object.getOwnPropertyNames(e))a[u]=Wa(e[u],t,r,n,gt(i));return a}o(tS,"FromProperties");function rS(e,t,r,n,i){return tS(e.properties,t,r,n,i)}o(rS,"FromMappedResult");function R1(e,t,r,n,i){let a=rS(e,t,r,n,i);return Ge(a)}o(R1,"ExtendsFromMappedResult");function nS(e,t,r,n){let i=lo(e,t);return i===U.Union?nt([r,n]):i===U.True?r:n}o(nS,"ExtendsResolve");function Wa(e,t,r,n,i){return bt(e)?R1(e,t,r,n,i):Vr(e)?H(N1(e,t,r,n,i)):H(nS(e,t,r,n),i)}o(Wa,"Extends");function iS(e,t,r,n,i){return{[e]:Wa(Ke(e),t,r,n,gt(i))}}o(iS,"FromPropertyKey");function oS(e,t,r,n,i){return e.reduce((a,u)=>R(R({},a),iS(u,t,r,n,i)),{})}o(oS,"FromPropertyKeys");function aS(e,t,r,n,i){return oS(e.keys,t,r,n,i)}o(aS,"FromMappedKey");function N1(e,t,r,n,i){let a=aS(e,t,r,n,i);return Ge(a)}o(N1,"ExtendsFromMappedKey");l();function uS(e){return e.allOf.every(t=>Bi(t))}o(uS,"Intersect");function sS(e){return e.anyOf.some(t=>Bi(t))}o(sS,"Union");function cS(e){return!Bi(e.not)}o(cS,"Not");function Bi(e){return e[_]==="Intersect"?uS(e):e[_]==="Union"?sS(e):e[_]==="Not"?cS(e):e[_]==="Undefined"}o(Bi,"ExtendsUndefinedCheck");l();function U1(e,t){return Ha(Zo(e),t)}o(U1,"ExcludeFromTemplateLiteral");function lS(e,t){let r=e.filter(n=>lo(n,t)===U.False);return r.length===1?r[0]:nt(r)}o(lS,"ExcludeRest");function Ha(e,t,r={}){return Wr(e)?H(U1(e,t),r):bt(e)?H(j1(e,t),r):H(He(e)?lS(e.anyOf,t):lo(e,t)!==U.False?rt():e,r)}o(Ha,"Exclude");function mS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ha(e[n],t);return r}o(mS,"FromProperties");function dS(e,t){return mS(e.properties,t)}o(dS,"FromMappedResult");function j1(e,t){let r=dS(e,t);return Ge(r)}o(j1,"ExcludeFromMappedResult");l();l();l();function z1(e,t){return Ka(Zo(e),t)}o(z1,"ExtractFromTemplateLiteral");function pS(e,t){let r=e.filter(n=>lo(n,t)!==U.False);return r.length===1?r[0]:nt(r)}o(pS,"ExtractRest");function Ka(e,t,r){return Wr(e)?H(z1(e,t),r):bt(e)?H($1(e,t),r):H(He(e)?pS(e.anyOf,t):lo(e,t)!==U.False?e:rt(),r)}o(Ka,"Extract");function fS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ka(e[n],t);return r}o(fS,"FromProperties");function hS(e,t){return fS(e.properties,t)}o(hS,"FromMappedResult");function $1(e,t){let r=hS(e,t);return Ge(r)}o($1,"ExtractFromMappedResult");l();function G1(e,t){return H(e.returns,t)}o(G1,"InstanceType");l();function Z1(e){return H({[_]:"Integer",type:"integer"},e)}o(Z1,"Integer");l();l();l();function gS(e,t,r){return{[e]:Fn(Ke(e),t,gt(r))}}o(gS,"MappedIntrinsicPropertyKey");function yS(e,t,r){return e.reduce((i,a)=>R(R({},i),gS(a,t,r)),{})}o(yS,"MappedIntrinsicPropertyKeys");function bS(e,t,r){return yS(e.keys,t,r)}o(bS,"MappedIntrinsicProperties");function V1(e,t,r){let n=bS(e,t,r);return Ge(n)}o(V1,"IntrinsicFromMappedKey");function vS(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(vS,"ApplyUncapitalize");function xS(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(xS,"ApplyCapitalize");function ES(e){return e.toUpperCase()}o(ES,"ApplyUppercase");function CS(e){return e.toLowerCase()}o(CS,"ApplyLowercase");function IS(e,t,r){let n=za(e.pattern);if(!Go(n))return De(R({},e),{pattern:W1(e.pattern,t)});let u=[...ys(n)].map(d=>Ke(d)),c=H1(u,t),m=nt(c);return vl([m],r)}o(IS,"FromTemplateLiteral");function W1(e,t){return typeof e=="string"?t==="Uncapitalize"?vS(e):t==="Capitalize"?xS(e):t==="Uppercase"?ES(e):t==="Lowercase"?CS(e):e:e.toString()}o(W1,"FromLiteralValue");function H1(e,t){return e.map(r=>Fn(r,t))}o(H1,"FromRest");function Fn(e,t,r={}){return Vr(e)?V1(e,t,r):Wr(e)?IS(e,t,r):He(e)?nt(H1(e.anyOf,t),r):Si(e)?Ke(W1(e.const,t),r):H(e,r)}o(Fn,"Intrinsic");function K1(e,t={}){return Fn(e,"Capitalize",t)}o(K1,"Capitalize");l();function q1(e,t={}){return Fn(e,"Lowercase",t)}o(q1,"Lowercase");l();function J1(e,t={}){return Fn(e,"Uncapitalize",t)}o(J1,"Uncapitalize");l();function X1(e,t={}){return Fn(e,"Uppercase",t)}o(X1,"Uppercase");l();function Y1(e,t){return H({[_]:"Not",not:e},t)}o(Y1,"Not");l();l();l();function DS(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=qa(e[i],t,gt(r));return n}o(DS,"FromProperties");function SS(e,t,r){return DS(e.properties,t,r)}o(SS,"FromMappedResult");function Q1(e,t,r){let n=SS(e,t,r);return Ge(n)}o(Q1,"OmitFromMappedResult");function wS(e,t){return e.map(r=>N0(r,t))}o(wS,"FromIntersect");function AS(e,t){return e.map(r=>N0(r,t))}o(AS,"FromUnion");function FS(e,t){let i=e,{[t]:r}=i;return Po(i,[Tc(t)])}o(FS,"FromProperty");function OS(e,t){return t.reduce((r,n)=>FS(r,n),e)}o(OS,"FromProperties");function PS(e,t){let r=Pt(e,[yt,"$id","required","properties"]),n=OS(e.properties,t);return st(n,r)}o(PS,"FromObject");function N0(e,t){return Rt(e)?Ur(wS(e.allOf,t)):He(e)?nt(AS(e.anyOf,t)):$t(e)?PS(e,t):st({})}o(N0,"OmitResolve");function qa(e,t,r){if(Vr(t))return ev(e,t,r);if(bt(e))return Q1(e,t,r);let n=wn(t)?Nr(t):t;return H(R(R({},N0(e,n)),r))}o(qa,"Omit");function BS(e,t,r){return{[t]:qa(e,[t],gt(r))}}o(BS,"FromPropertyKey");function MS(e,t,r){return t.reduce((n,i)=>R(R({},n),BS(e,i,r)),{})}o(MS,"FromPropertyKeys");function TS(e,t,r){return MS(e,t.keys,r)}o(TS,"FromMappedKey");function ev(e,t,r){let n=TS(e,t,r);return Ge(n)}o(ev,"OmitFromMappedKey");l();function tv(e,t){return Qn(e.parameters,t)}o(tv,"Parameters");l();l();function rv(e){return e.map(t=>nv(t))}o(rv,"FromRest");function kS(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Rr(e[r]);return t}o(kS,"FromProperties");function _S(e){let t=Pt(e,[yt,"$id","required","properties"]),r=kS(e.properties);return st(r,t)}o(_S,"FromObject");function nv(e){return Rt(e)?Ur(rv(e.allOf)):He(e)?nt(rv(e.anyOf)):$t(e)?_S(e):st({})}o(nv,"PartialResolve");function Ml(e,t){return bt(e)?iv(e,t):H(R(R({},nv(e)),t))}o(Ml,"Partial");function LS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ml(e[n],gt(t));return r}o(LS,"FromProperties");function RS(e,t){return LS(e.properties,t)}o(RS,"FromMappedResult");function iv(e,t){let r=RS(e,t);return Ge(r)}o(iv,"PartialFromMappedResult");l();l();l();function NS(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ja(e[i],t,gt(r));return n}o(NS,"FromProperties");function US(e,t,r){return NS(e.properties,t,r)}o(US,"FromMappedResult");function ov(e,t,r){let n=US(e,t,r);return Ge(n)}o(ov,"PickFromMappedResult");function jS(e,t){return e.map(r=>U0(r,t))}o(jS,"FromIntersect");function zS(e,t){return e.map(r=>U0(r,t))}o(zS,"FromUnion");function $S(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o($S,"FromProperties");function GS(e,t){let r=Pt(e,[yt,"$id","required","properties"]),n=$S(e.properties,t);return st(n,r)}o(GS,"FromObject");function U0(e,t){return Rt(e)?Ur(jS(e.allOf,t)):He(e)?nt(zS(e.anyOf,t)):$t(e)?GS(e,t):st({})}o(U0,"PickResolve");function Ja(e,t,r){if(Vr(t))return av(e,t,r);if(bt(e))return ov(e,t,r);let n=wn(t)?Nr(t):t;return H(R(R({},U0(e,n)),r))}o(Ja,"Pick");function ZS(e,t,r){return{[t]:Ja(e,[t],gt(r))}}o(ZS,"FromPropertyKey");function VS(e,t,r){return t.reduce((n,i)=>R(R({},n),ZS(e,i,r)),{})}o(VS,"FromPropertyKeys");function WS(e,t,r){return VS(e,t.keys,r)}o(WS,"FromMappedKey");function av(e,t,r){let n=WS(e,t,r);return Ge(n)}o(av,"PickFromMappedKey");l();function uv(e){return an(Rr(e))}o(uv,"ReadonlyOptional");l();function Vo(e,t,r){return H({[_]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Vo,"RecordCreateFromPattern");function j0(e,t,r){let n={};for(let i of e)n[i]=t;return st(n,De(R({},r),{[nn]:"Record"}))}o(j0,"RecordCreateFromKeys");function HS(e,t,r){return yl(e)?j0(Nr(e),t,r):Vo(e.pattern,t,r)}o(HS,"FromTemplateLiteralKey");function KS(e,t,r){return j0(Nr(nt(e)),t,r)}o(KS,"FromUnionKey");function qS(e,t,r){return j0([e.toString()],t,r)}o(qS,"FromLiteralKey");function JS(e,t,r){return Vo(e.source,t,r)}o(JS,"FromRegExpKey");function XS(e,t,r){let n=Ct(e.pattern)?Ai:e.pattern;return Vo(n,t,r)}o(XS,"FromStringKey");function YS(e,t,r){return Vo(Ai,t,r)}o(YS,"FromAnyKey");function QS(e,t,r){return Vo(Yb,t,r)}o(QS,"FromNeverKey");function ew(e,t,r){return Vo(wi,t,r)}o(ew,"FromIntegerKey");function tw(e,t,r){return Vo(wi,t,r)}o(tw,"FromNumberKey");function sv(e,t,r={}){return He(e)?KS(e.anyOf,t,r):Wr(e)?HS(e,t,r):Si(e)?qS(e.const,t,r):jo(e)?ew(e,t,r):zo(e)?tw(e,t,r):c0(e)?JS(e,t,r):ms(e)?XS(e,t,r):i0(e)?YS(e,t,r):oo(e)?QS(e,t,r):rt(r)}o(sv,"Record");l();var rw=0;function cv(e,t={}){Ct(t.$id)&&(t.$id="T".concat(rw++));let r=os(e({[_]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,H(R({[nn]:"Recursive"},r),t)}o(cv,"Recursive");l();function lv(e,t){if(ft(e))return H({[_]:"Ref",$ref:e},t);if(Ct(e.$id))throw new Error("Reference target type must specify an $id");return H({[_]:"Ref",$ref:e.$id},t)}o(lv,"Ref");l();function mv(e,t){let r=ft(e)?new globalThis.RegExp(e):e;return H({[_]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(mv,"RegExp");l();l();function dv(e){return e.map(t=>pv(t))}o(dv,"FromRest");function nw(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Pt(e[r],[Or]);return t}o(nw,"FromProperties");function iw(e){let t=Pt(e,[yt,"$id","required","properties"]),r=nw(e.properties);return st(r,t)}o(iw,"FromObject");function pv(e){return Rt(e)?Ur(dv(e.allOf)):He(e)?nt(dv(e.anyOf)):$t(e)?iw(e):st({})}o(pv,"RequiredResolve");function Tl(e,t){return bt(e)?fv(e,t):H(R(R({},pv(e)),t))}o(Tl,"Required");function ow(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Tl(e[n],t);return r}o(ow,"FromProperties");function aw(e,t){return ow(e.properties,t)}o(aw,"FromMappedResult");function fv(e,t){let r=aw(e,t);return Ge(r)}o(fv,"RequiredFromMappedResult");l();function uw(e){var t;return Rt(e)?e.allOf:He(e)?e.anyOf:Sn(e)?(t=e.items)!=null?t:[]:[]}o(uw,"RestResolve");function hv(e){return uw(e)}o(hv,"Rest");l();function gv(e,t){return H(e.returns,t)}o(gv,"ReturnType");l();function yv(e){return JSON.parse(JSON.stringify(e))}o(yv,"Strict");l();var G0=class G0{constructor(t){this.schema=t}Decode(t){return new $0(this.schema,t)}};o(G0,"TransformDecodeBuilder");var z0=G0,Z0=class Z0{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let a={Encode:o(u=>r[yt].Encode(t(u)),"Encode"),Decode:o(u=>this.decode(r[yt].Decode(u)),"Decode")};return De(R({},r),{[yt]:a})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return De(R({},r),{[yt]:n})}Encode(t){return La(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(Z0,"TransformEncodeBuilder");var $0=Z0;function bv(e){return new z0(e)}o(bv,"Transform");l();function kl(e={}){var t;return H({[_]:(t=e[_])!=null?t:"Unsafe"},e)}o(kl,"Unsafe");l();function vv(e){return H({[_]:"Void",type:"void"},e)}o(vv,"Void");l();var V0={};Ki(V0,{Any:()=>uo,Array:()=>pl,AsyncIterator:()=>fl,Awaited:()=>v1,BigInt:()=>Ga,Boolean:()=>bl,Capitalize:()=>K1,Composite:()=>C1,Const:()=>I1,Constructor:()=>hl,ConstructorParameters:()=>D1,Date:()=>Dl,Deref:()=>An,Enum:()=>S1,Exclude:()=>Ha,Extends:()=>Wa,Extract:()=>Ka,Function:()=>so,Index:()=>Za,InstanceType:()=>G1,Integer:()=>Z1,Intersect:()=>Ur,Iterator:()=>El,KeyOf:()=>Il,Literal:()=>Ke,Lowercase:()=>q1,Mapped:()=>h1,Never:()=>rt,Not:()=>Y1,Null:()=>Sl,Number:()=>Yn,Object:()=>st,Omit:()=>qa,Optional:()=>Rr,Parameters:()=>tv,Partial:()=>Ml,Pick:()=>Ja,Promise:()=>Cl,Readonly:()=>an,ReadonlyOptional:()=>uv,Record:()=>sv,Recursive:()=>cv,Ref:()=>lv,RegExp:()=>mv,Required:()=>Tl,Rest:()=>hv,ReturnType:()=>gv,Strict:()=>yv,String:()=>on,Symbol:()=>wl,TemplateLiteral:()=>vl,Transform:()=>bv,Tuple:()=>Qn,Uint8Array:()=>Fl,Uncapitalize:()=>J1,Undefined:()=>Al,Union:()=>nt,Unknown:()=>Pi,Unsafe:()=>kl,Uppercase:()=>X1,Void:()=>vv});l();var p=V0;l();var Cs=p.Object({externalId:p.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:p.String({description:"The name of the entity."}),shortName:p.String({description:"A short name for the entity."}),description:p.String({description:"A description of the entity."}),icon:p.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),W0=p.Partial(Cs,{$id:"Details",description:"Additional information about a given entity."}),Hr=p.Object({details:p.Optional(p.Ref(W0))},{$id:"WithDetails"}),Wo=o(e=>{let t=[...e].sort(),r=p.Pick(Cs,e),n=p.Omit(Cs,e);return p.Object({details:p.Intersect([r,p.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),H0=[Cs,W0];l();var Xa=p.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Ya=p.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Ho=p.Tuple([p.Ref(Xa),p.Ref(Ya)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),yr=p.Object({type:p.Literal("Point"),coordinates:p.Ref(Ho)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),_l=p.Object({type:p.Literal("MultiPoint"),coordinates:p.Array(p.Ref(Ho))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),Ll=p.Object({type:p.Literal("LineString"),coordinates:p.Array(p.Ref(Ho),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Rl=p.Object({type:p.Literal("MultiLineString"),coordinates:p.Array(p.Array(p.Ref(Ho),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),xv=p.Array(p.Ref(Ho),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),K0=p.Array(p.Ref(xv),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Qa=p.Object({type:p.Literal("Polygon"),coordinates:p.Ref(K0)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),eu=p.Object({type:p.Literal("MultiPolygon"),coordinates:p.Array(p.Ref(K0))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),ar=o((e,t,r)=>p.Object({type:p.Literal("Feature"),geometry:e,properties:t},r),"Feature"),Br=o((e,t,r)=>p.Object({type:p.Literal("FeatureCollection"),features:p.Array(e,r)},t),"FeatureCollection"),q0=[Xa,Ya,Ho,yr,_l,Ll,Rl,xv,K0,Qa,eu];l();var Bt=o((e,t)=>p.Unsafe(p.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),"Ident"),br=Bt("g","GeometryId"),Re=Bt("f","FloorId"),J0=[br,Re];l();l();l();var X0=class X0{constructor(t){h(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(X0,"OptionIterator");var Nl=X0,Y0=class Y0{constructor(t){h(this,"_tag","Some");h(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return Ev(t(this.value))}mapAsync(t){return t(this.value).then(r=>Ev(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:mo()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?mo():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return ue(this.value)}okOrElse(t){return ue(this.value)}iter(){return new Nl(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?tu([this.value,t.value]):mo()}zipWith(t,r){return t.isSome()?tu(r(this.value,t.value)):mo()}get[Symbol.toStringTag](){return"Some"}};o(Y0,"Some");var Ul=Y0,Q0=class Q0{constructor(){h(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return se(t)}okOrElse(t){return se(t())}iter(){return new Nl(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(Q0,"None");var jl=Q0,tu=o(e=>new Ul(e),"some"),mo=o(()=>new jl,"none"),Ev=o(e=>e instanceof Ul||e instanceof jl?e:e==null?mo():tu(e),"option");var rf=class rf{constructor(t){h(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(rf,"ResultIterator");var zl=rf,nf=class nf{constructor(t){h(this,"_tag","Ok");h(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return tu(this.value)}err(){return mo()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return ue(t(this.value))}async mapAsync(t){return t(this.value).then(ue)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new zl(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(nf,"Ok");var ef=nf,$l=class $l{constructor(t){h(this,"_tag","Err");h(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return mo()}err(){return tu(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new zl(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new $l(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o($l,"Err");var tf=$l,ue=o(e=>new ef(e),"ok"),se=o(e=>new tf(e),"err");l();var zr;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(zr||(zr={}));l();l();l();l();var af=class af extends he{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(af,"TypeSystemDuplicateTypeKind");var of=af,uf=class uf extends he{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(uf,"TypeSystemDuplicateFormat");var Is=uf,Gl;(function(e){function t(n,i){if(Gt.Has(n))throw new of(n);return Gt.Set(n,i),(a={})=>kl(De(R({},a),{[_]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(Pr.Has(n))throw new Is(n);return Pr.Set(n,i),n}o(r,"Format"),e.Format=r})(Gl||(Gl={}));l();function sw(e){switch(e.errorType){case N.ArrayContains:return"Expected array to contain at least one matching value";case N.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case N.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case N.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case N.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case N.ArrayUniqueItems:return"Expected array elements to be unique";case N.Array:return"Expected array";case N.AsyncIterator:return"Expected AsyncIterator";case N.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case N.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case N.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case N.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case N.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case N.BigInt:return"Expected bigint";case N.Boolean:return"Expected boolean";case N.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case N.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case N.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case N.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case N.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case N.Date:return"Expected Date";case N.Function:return"Expected function";case N.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case N.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case N.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case N.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case N.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case N.Integer:return"Expected integer";case N.IntersectUnevaluatedProperties:return"Unexpected property";case N.Intersect:return"Expected all values to match";case N.Iterator:return"Expected Iterator";case N.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case N.Never:return"Never";case N.Not:return"Value should not match";case N.Null:return"Expected null";case N.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case N.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case N.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case N.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case N.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case N.Number:return"Expected number";case N.Object:return"Expected object";case N.ObjectAdditionalProperties:return"Unexpected property";case N.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case N.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case N.ObjectRequiredProperty:return"Expected required property";case N.Promise:return"Expected Promise";case N.RegExp:return"Expected string to match regular expression";case N.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case N.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case N.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case N.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case N.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case N.String:return"Expected string";case N.Symbol:return"Expected symbol";case N.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case N.Tuple:return"Expected tuple";case N.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case N.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case N.Uint8Array:return"Expected Uint8Array";case N.Undefined:return"Expected undefined";case N.Union:return"Expected union value";case N.Void:return"Expected void";case N.Kind:return"Expected kind '".concat(e.schema[_],"'");default:return"Unknown error type"}}o(sw,"DefaultErrorFunction");var cw=sw;function Cv(){return cw}o(Cv,"GetErrorFunction");l();var cf=class cf extends he{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(cf,"TypeDereferenceError");var sf=cf;function lw(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new sf(e);return Ze(r,t)}o(lw,"Resolve");function ln(e,t){return!Ue(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(ln,"Pushref");function Ze(e,t){return e[_]==="This"||e[_]==="Ref"?lw(e,t):e}o(Ze,"Deref");l();var mf=class mf extends he{constructor(t){super("Unable to hash value"),this.value=t}};o(mf,"ValueHashError");var lf=mf,Kr;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Kr||(Kr={}));var ru=BigInt("14695981039346656037"),[mw,dw]=[BigInt("1099511628211"),BigInt("18446744073709551616")],pw=Array.from({length:256}).map((e,t)=>BigInt(t)),Iv=new Float64Array(1),Dv=new DataView(Iv.buffer),Sv=new Uint8Array(Iv.buffer);function*fw(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(fw,"NumberToBytes");function hw(e){vr(Kr.Array);for(let t of e)nu(t)}o(hw,"ArrayType");function gw(e){vr(Kr.Boolean),vr(e?1:0)}o(gw,"BooleanType");function yw(e){vr(Kr.BigInt),Dv.setBigInt64(0,e);for(let t of Sv)vr(t)}o(yw,"BigIntType");function bw(e){vr(Kr.Date),nu(e.getTime())}o(bw,"DateType");function vw(e){vr(Kr.Null)}o(vw,"NullType");function xw(e){vr(Kr.Number),Dv.setFloat64(0,e);for(let t of Sv)vr(t)}o(xw,"NumberType");function Ew(e){vr(Kr.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())nu(t),nu(e[t])}o(Ew,"ObjectType");function Cw(e){vr(Kr.String);for(let t=0;t<e.length;t++)for(let r of fw(e.charCodeAt(t)))vr(r)}o(Cw,"StringType");function Iw(e){vr(Kr.Symbol),nu(e.description)}o(Iw,"SymbolType");function Dw(e){vr(Kr.Uint8Array);for(let t=0;t<e.length;t++)vr(e[t])}o(Dw,"Uint8ArrayType");function Sw(e){return vr(Kr.Undefined)}o(Sw,"UndefinedType");function nu(e){if(Ce(e))return hw(e);if(qn(e))return gw(e);if(ir(e))return yw(e);if(Fr(e))return bw(e);if(Ei(e))return vw(e);if(de(e))return xw(e);if(we(e))return Ew(e);if(Ue(e))return Cw(e);if(Ci(e))return Iw(e);if(_a(e))return Dw(e);if(It(e))return Sw(e);throw new lf(e)}o(nu,"Visit");function vr(e){ru=ru^pw[e],ru=ru*mw%dw}o(vr,"FNV1A64");function po(e){return ru=BigInt("14695981039346656037"),nu(e),ru}o(po,"Hash");l();var pf=class pf extends he{constructor(t){super("Unknown type"),this.schema=t}};o(pf,"ValueCheckUnknownTypeError");var df=pf;function ww(e){return e[_]==="Any"||e[_]==="Unknown"}o(ww,"IsAnyOrUnknown");function ke(e){return e!==void 0}o(ke,"IsDefined");function Aw(e,t,r){return!0}o(Aw,"FromAny");function Fw(e,t,r){if(!Ce(r)||ke(e.minItems)&&!(r.length>=e.minItems)||ke(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(a=>ur(e.items,t,a))||e.uniqueItems===!0&&!function(){let a=new Set;for(let u of r){let c=po(u);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(ke(e.contains)||de(e.minContains)||de(e.maxContains)))return!0;let n=ke(e.contains)?e.contains:rt(),i=r.reduce((a,u)=>ur(n,t,u)?a+1:a,0);return!(i===0||de(e.minContains)&&i<e.minContains||de(e.maxContains)&&i>e.maxContains)}o(Fw,"FromArray");function Ow(e,t,r){return cl(r)}o(Ow,"FromAsyncIterator");function Pw(e,t,r){return!(!ir(r)||ke(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||ke(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||ke(e.maximum)&&!(r<=e.maximum)||ke(e.minimum)&&!(r>=e.minimum)||ke(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(Pw,"FromBigInt");function Bw(e,t,r){return qn(r)}o(Bw,"FromBoolean");function Mw(e,t,r){return ur(e.returns,t,r.prototype)}o(Mw,"FromConstructor");function Tw(e,t,r){return!(!Fr(r)||ke(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||ke(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||ke(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||ke(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||ke(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(Tw,"FromDate");function kw(e,t,r){return io(r)}o(kw,"FromFunction");function _w(e,t,r){return!(!dl(r)||ke(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||ke(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||ke(e.maximum)&&!(r<=e.maximum)||ke(e.minimum)&&!(r>=e.minimum)||ke(e.multipleOf)&&r%e.multipleOf!==0)}o(_w,"FromInteger");function Lw(e,t,r){let n=e.allOf.every(i=>ur(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(Oi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u));return n&&a}else if(je(e.unevaluatedProperties)){let i=new RegExp(Oi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u)||ur(e.unevaluatedProperties,t,r[u]));return n&&a}else return n}o(Lw,"FromIntersect");function Rw(e,t,r){return ll(r)}o(Rw,"FromIterator");function Nw(e,t,r){return r===e.const}o(Nw,"FromLiteral");function Uw(e,t,r){return!1}o(Uw,"FromNever");function jw(e,t,r){return!ur(e.not,t,r)}o(jw,"FromNot");function zw(e,t,r){return Ei(r)}o(zw,"FromNull");function $w(e,t,r){return!(!Qe.IsNumberLike(r)||ke(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||ke(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||ke(e.minimum)&&!(r>=e.minimum)||ke(e.maximum)&&!(r<=e.maximum)||ke(e.multipleOf)&&r%e.multipleOf!==0)}o($w,"FromNumber");function Gw(e,t,r){if(!Qe.IsObjectLike(r)||ke(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||ke(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let a=e.properties[i];if(e.required&&e.required.includes(i)){if(!ur(a,t,r[i])||(Bi(a)||ww(a))&&!(i in r))return!1}else if(Qe.IsExactOptionalProperty(r,i)&&!ur(a,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(a=>n.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(a=>n.includes(a)||ur(e.additionalProperties,t,r[a])):!0}o(Gw,"FromObject");function Zw(e,t,r){return ml(r)}o(Zw,"FromPromise");function Vw(e,t,r){if(!Qe.IsRecordLike(r)||ke(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||ke(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],a=new RegExp(n),u=Object.entries(r).every(([d,f])=>a.test(d)?ur(i,t,f):!0),c=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,f])=>a.test(d)?!0:ur(e.additionalProperties,t,f)):!0,m=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>a.test(d)):!0;return u&&c&&m}o(Vw,"FromRecord");function Ww(e,t,r){return ur(Ze(e,t),t,r)}o(Ww,"FromRef");function Hw(e,t,r){let n=new RegExp(e.source,e.flags);return ke(e.minLength)&&!(r.length>=e.minLength)||ke(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(Hw,"FromRegExp");function Kw(e,t,r){return!Ue(r)||ke(e.minLength)&&!(r.length>=e.minLength)||ke(e.maxLength)&&!(r.length<=e.maxLength)||ke(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:ke(e.format)?Pr.Has(e.format)?Pr.Get(e.format)(r):!1:!0}o(Kw,"FromString");function qw(e,t,r){return Ci(r)}o(qw,"FromSymbol");function Jw(e,t,r){return Ue(r)&&new RegExp(e.pattern).test(r)}o(Jw,"FromTemplateLiteral");function Xw(e,t,r){return ur(Ze(e,t),t,r)}o(Xw,"FromThis");function Yw(e,t,r){if(!Ce(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!ur(e.items[n],t,r[n]))return!1;return!0}o(Yw,"FromTuple");function Qw(e,t,r){return It(r)}o(Qw,"FromUndefined");function eA(e,t,r){return e.anyOf.some(n=>ur(n,t,r))}o(eA,"FromUnion");function tA(e,t,r){return!(!_a(r)||ke(e.maxByteLength)&&!(r.length<=e.maxByteLength)||ke(e.minByteLength)&&!(r.length>=e.minByteLength))}o(tA,"FromUint8Array");function rA(e,t,r){return!0}o(rA,"FromUnknown");function nA(e,t,r){return Qe.IsVoidLike(r)}o(nA,"FromVoid");function iA(e,t,r){return Gt.Has(e[_])?Gt.Get(e[_])(e,r):!1}o(iA,"FromKind");function ur(e,t,r){let n=ke(e.$id)?[...t,e]:t,i=e;switch(i[_]){case"Any":return Aw(i,n,r);case"Array":return Fw(i,n,r);case"AsyncIterator":return Ow(i,n,r);case"BigInt":return Pw(i,n,r);case"Boolean":return Bw(i,n,r);case"Constructor":return Mw(i,n,r);case"Date":return Tw(i,n,r);case"Function":return kw(i,n,r);case"Integer":return _w(i,n,r);case"Intersect":return Lw(i,n,r);case"Iterator":return Rw(i,n,r);case"Literal":return Nw(i,n,r);case"Never":return Uw(i,n,r);case"Not":return jw(i,n,r);case"Null":return zw(i,n,r);case"Number":return $w(i,n,r);case"Object":return Gw(i,n,r);case"Promise":return Zw(i,n,r);case"Record":return Vw(i,n,r);case"Ref":return Ww(i,n,r);case"RegExp":return Hw(i,n,r);case"String":return Kw(i,n,r);case"Symbol":return qw(i,n,r);case"TemplateLiteral":return Jw(i,n,r);case"This":return Xw(i,n,r);case"Tuple":return Yw(i,n,r);case"Undefined":return Qw(i,n,r);case"Union":return eA(i,n,r);case"Uint8Array":return tA(i,n,r);case"Unknown":return rA(i,n,r);case"Void":return nA(i,n,r);default:if(!Gt.Has(i[_]))throw new df(i);return iA(i,n,r)}}o(ur,"Visit");function Be(...e){return e.length===3?ur(e[0],e[1],e[2]):ur(e[0],[],e[1])}o(Be,"Check");var N;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(N||(N={}));var hf=class hf extends he{constructor(t){super("Unknown type"),this.schema=t}};o(hf,"ValueErrorsUnknownTypeError");var ff=hf;function Mi(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Mi,"EscapeKey");function _e(e){return e!==void 0}o(_e,"IsDefined");var gf=class gf{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(gf,"ValueErrorIterator");var mn=gf;function ie(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:Cv()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(ie,"Create");function*oA(e,t,r,n){}o(oA,"FromAny");function*aA(e,t,r,n){if(!Ce(n))return yield ie(N.Array,e,r,n);_e(e.minItems)&&!(n.length>=e.minItems)&&(yield ie(N.ArrayMinItems,e,r,n)),_e(e.maxItems)&&!(n.length<=e.maxItems)&&(yield ie(N.ArrayMaxItems,e,r,n));for(let u=0;u<n.length;u++)yield*X(sr(e.items,t,"".concat(r,"/").concat(u),n[u]));if(e.uniqueItems===!0&&!function(){let u=new Set;for(let c of n){let m=po(c);if(u.has(m))return!1;u.add(m)}return!0}()&&(yield ie(N.ArrayUniqueItems,e,r,n)),!(_e(e.contains)||_e(e.minContains)||_e(e.maxContains)))return;let i=_e(e.contains)?e.contains:rt(),a=n.reduce((u,c,m)=>sr(i,t,"".concat(r).concat(m),c).next().done===!0?u+1:u,0);a===0&&(yield ie(N.ArrayContains,e,r,n)),de(e.minContains)&&a<e.minContains&&(yield ie(N.ArrayMinContains,e,r,n)),de(e.maxContains)&&a>e.maxContains&&(yield ie(N.ArrayMaxContains,e,r,n))}o(aA,"FromArray");function*uA(e,t,r,n){cl(n)||(yield ie(N.AsyncIterator,e,r,n))}o(uA,"FromAsyncIterator");function*sA(e,t,r,n){if(!ir(n))return yield ie(N.BigInt,e,r,n);_e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ie(N.BigIntExclusiveMaximum,e,r,n)),_e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ie(N.BigIntExclusiveMinimum,e,r,n)),_e(e.maximum)&&!(n<=e.maximum)&&(yield ie(N.BigIntMaximum,e,r,n)),_e(e.minimum)&&!(n>=e.minimum)&&(yield ie(N.BigIntMinimum,e,r,n)),_e(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield ie(N.BigIntMultipleOf,e,r,n))}o(sA,"FromBigInt");function*cA(e,t,r,n){qn(n)||(yield ie(N.Boolean,e,r,n))}o(cA,"FromBoolean");function*lA(e,t,r,n){yield*X(sr(e.returns,t,r,n.prototype))}o(lA,"FromConstructor");function*mA(e,t,r,n){if(!Fr(n))return yield ie(N.Date,e,r,n);_e(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield ie(N.DateExclusiveMaximumTimestamp,e,r,n)),_e(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield ie(N.DateExclusiveMinimumTimestamp,e,r,n)),_e(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield ie(N.DateMaximumTimestamp,e,r,n)),_e(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield ie(N.DateMinimumTimestamp,e,r,n)),_e(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield ie(N.DateMultipleOfTimestamp,e,r,n))}o(mA,"FromDate");function*dA(e,t,r,n){io(n)||(yield ie(N.Function,e,r,n))}o(dA,"FromFunction");function*pA(e,t,r,n){if(!dl(n))return yield ie(N.Integer,e,r,n);_e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ie(N.IntegerExclusiveMaximum,e,r,n)),_e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ie(N.IntegerExclusiveMinimum,e,r,n)),_e(e.maximum)&&!(n<=e.maximum)&&(yield ie(N.IntegerMaximum,e,r,n)),_e(e.minimum)&&!(n>=e.minimum)&&(yield ie(N.IntegerMinimum,e,r,n)),_e(e.multipleOf)&&n%e.multipleOf!==0&&(yield ie(N.IntegerMultipleOf,e,r,n))}o(pA,"FromInteger");function*fA(e,t,r,n){let i=!1;for(let a of e.allOf)for(let u of sr(a,t,r,n))i=!0,yield u;if(i)return yield ie(N.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let a=new RegExp(Oi(e));for(let u of Object.getOwnPropertyNames(n))a.test(u)||(yield ie(N.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(u),n))}if(typeof e.unevaluatedProperties=="object"){let a=new RegExp(Oi(e));for(let u of Object.getOwnPropertyNames(n))if(!a.test(u)){let c=sr(e.unevaluatedProperties,t,"".concat(r,"/").concat(u),n[u]).next();c.done||(yield c.value)}}}o(fA,"FromIntersect");function*hA(e,t,r,n){ll(n)||(yield ie(N.Iterator,e,r,n))}o(hA,"FromIterator");function*gA(e,t,r,n){n!==e.const&&(yield ie(N.Literal,e,r,n))}o(gA,"FromLiteral");function*yA(e,t,r,n){yield ie(N.Never,e,r,n)}o(yA,"FromNever");function*bA(e,t,r,n){sr(e.not,t,r,n).next().done===!0&&(yield ie(N.Not,e,r,n))}o(bA,"FromNot");function*vA(e,t,r,n){Ei(n)||(yield ie(N.Null,e,r,n))}o(vA,"FromNull");function*xA(e,t,r,n){if(!Qe.IsNumberLike(n))return yield ie(N.Number,e,r,n);_e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ie(N.NumberExclusiveMaximum,e,r,n)),_e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ie(N.NumberExclusiveMinimum,e,r,n)),_e(e.maximum)&&!(n<=e.maximum)&&(yield ie(N.NumberMaximum,e,r,n)),_e(e.minimum)&&!(n>=e.minimum)&&(yield ie(N.NumberMinimum,e,r,n)),_e(e.multipleOf)&&n%e.multipleOf!==0&&(yield ie(N.NumberMultipleOf,e,r,n))}o(xA,"FromNumber");function*EA(e,t,r,n){if(!Qe.IsObjectLike(n))return yield ie(N.Object,e,r,n);_e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ie(N.ObjectMinProperties,e,r,n)),_e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ie(N.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),u=Object.getOwnPropertyNames(n);for(let c of i)u.includes(c)||(yield ie(N.ObjectRequiredProperty,e.properties[c],"".concat(r,"/").concat(Mi(c)),void 0));if(e.additionalProperties===!1)for(let c of u)a.includes(c)||(yield ie(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Mi(c)),n[c]));if(typeof e.additionalProperties=="object")for(let c of u)a.includes(c)||(yield*X(sr(e.additionalProperties,t,"".concat(r,"/").concat(Mi(c)),n[c])));for(let c of a){let m=e.properties[c];e.required&&e.required.includes(c)?(yield*X(sr(m,t,"".concat(r,"/").concat(Mi(c)),n[c])),Bi(e)&&!(c in n)&&(yield ie(N.ObjectRequiredProperty,m,"".concat(r,"/").concat(Mi(c)),void 0))):Qe.IsExactOptionalProperty(n,c)&&(yield*X(sr(m,t,"".concat(r,"/").concat(Mi(c)),n[c])))}}o(EA,"FromObject");function*CA(e,t,r,n){ml(n)||(yield ie(N.Promise,e,r,n))}o(CA,"FromPromise");function*IA(e,t,r,n){if(!Qe.IsRecordLike(n))return yield ie(N.Object,e,r,n);_e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ie(N.ObjectMinProperties,e,r,n)),_e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ie(N.ObjectMaxProperties,e,r,n));let[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let[c,m]of Object.entries(n))u.test(c)&&(yield*X(sr(a,t,"".concat(r,"/").concat(Mi(c)),m)));if(typeof e.additionalProperties=="object")for(let[c,m]of Object.entries(n))u.test(c)||(yield*X(sr(e.additionalProperties,t,"".concat(r,"/").concat(Mi(c)),m)));if(e.additionalProperties===!1){for(let[c,m]of Object.entries(n))if(!u.test(c))return yield ie(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Mi(c)),m)}}o(IA,"FromRecord");function*DA(e,t,r,n){yield*X(sr(Ze(e,t),t,r,n))}o(DA,"FromRef");function*SA(e,t,r,n){if(!Ue(n))return yield ie(N.String,e,r,n);if(_e(e.minLength)&&!(n.length>=e.minLength)&&(yield ie(N.StringMinLength,e,r,n)),_e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ie(N.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield ie(N.RegExp,e,r,n)}o(SA,"FromRegExp");function*wA(e,t,r,n){if(!Ue(n))return yield ie(N.String,e,r,n);_e(e.minLength)&&!(n.length>=e.minLength)&&(yield ie(N.StringMinLength,e,r,n)),_e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ie(N.StringMaxLength,e,r,n)),Ue(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield ie(N.StringPattern,e,r,n))),Ue(e.format)&&(Pr.Has(e.format)?Pr.Get(e.format)(n)||(yield ie(N.StringFormat,e,r,n)):yield ie(N.StringFormatUnknown,e,r,n))}o(wA,"FromString");function*AA(e,t,r,n){Ci(n)||(yield ie(N.Symbol,e,r,n))}o(AA,"FromSymbol");function*FA(e,t,r,n){if(!Ue(n))return yield ie(N.String,e,r,n);new RegExp(e.pattern).test(n)||(yield ie(N.StringPattern,e,r,n))}o(FA,"FromTemplateLiteral");function*OA(e,t,r,n){yield*X(sr(Ze(e,t),t,r,n))}o(OA,"FromThis");function*PA(e,t,r,n){if(!Ce(n))return yield ie(N.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield ie(N.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield ie(N.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*X(sr(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(PA,"FromTuple");function*BA(e,t,r,n){It(n)||(yield ie(N.Undefined,e,r,n))}o(BA,"FromUndefined");function*MA(e,t,r,n){if(Be(e,t,n))return;let i=e.anyOf.map(a=>new mn(sr(a,t,r,n)));yield ie(N.Union,e,r,n,i)}o(MA,"FromUnion");function*TA(e,t,r,n){if(!_a(n))return yield ie(N.Uint8Array,e,r,n);_e(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield ie(N.Uint8ArrayMaxByteLength,e,r,n)),_e(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield ie(N.Uint8ArrayMinByteLength,e,r,n))}o(TA,"FromUint8Array");function*kA(e,t,r,n){}o(kA,"FromUnknown");function*_A(e,t,r,n){Qe.IsVoidLike(n)||(yield ie(N.Void,e,r,n))}o(_A,"FromVoid");function*LA(e,t,r,n){Gt.Get(e[_])(e,n)||(yield ie(N.Kind,e,r,n))}o(LA,"FromKind");function*sr(e,t,r,n){let i=_e(e.$id)?[...t,e]:t,a=e;switch(a[_]){case"Any":return yield*X(oA(a,i,r,n));case"Array":return yield*X(aA(a,i,r,n));case"AsyncIterator":return yield*X(uA(a,i,r,n));case"BigInt":return yield*X(sA(a,i,r,n));case"Boolean":return yield*X(cA(a,i,r,n));case"Constructor":return yield*X(lA(a,i,r,n));case"Date":return yield*X(mA(a,i,r,n));case"Function":return yield*X(dA(a,i,r,n));case"Integer":return yield*X(pA(a,i,r,n));case"Intersect":return yield*X(fA(a,i,r,n));case"Iterator":return yield*X(hA(a,i,r,n));case"Literal":return yield*X(gA(a,i,r,n));case"Never":return yield*X(yA(a,i,r,n));case"Not":return yield*X(bA(a,i,r,n));case"Null":return yield*X(vA(a,i,r,n));case"Number":return yield*X(xA(a,i,r,n));case"Object":return yield*X(EA(a,i,r,n));case"Promise":return yield*X(CA(a,i,r,n));case"Record":return yield*X(IA(a,i,r,n));case"Ref":return yield*X(DA(a,i,r,n));case"RegExp":return yield*X(SA(a,i,r,n));case"String":return yield*X(wA(a,i,r,n));case"Symbol":return yield*X(AA(a,i,r,n));case"TemplateLiteral":return yield*X(FA(a,i,r,n));case"This":return yield*X(OA(a,i,r,n));case"Tuple":return yield*X(PA(a,i,r,n));case"Undefined":return yield*X(BA(a,i,r,n));case"Union":return yield*X(MA(a,i,r,n));case"Uint8Array":return yield*X(TA(a,i,r,n));case"Unknown":return yield*X(kA(a,i,r,n));case"Void":return yield*X(_A(a,i,r,n));default:if(!Gt.Has(a[_]))throw new ff(e);return yield*X(LA(a,i,r,n))}}o(sr,"Visit");function ei(...e){let t=e.length===3?sr(e[0],e[1],"",e[2]):sr(e[0],[],"",e[1]);return new mn(t)}o(ei,"Errors");l();l();var RA=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Av=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},yf,Zl,Fv,vf=class vf extends he{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),yf.add(this),Zl.set(this,void 0),RA(this,Zl,t,"f"),this.error=r}Errors(){return new mn(Av(this,yf,"m",Fv).call(this))}};o(vf,"AssertError");var bf=vf;Zl=new WeakMap,yf=new WeakSet,Fv=o(function*(){this.error&&(yield this.error),yield*X(Av(this,Zl,"f"))},"_AssertError_Iterator");function wv(e,t,r){if(!Be(e,t,r))throw new bf(ei(e,t,r))}o(wv,"AssertValue");function Vl(...e){return e.length===3?wv(e[0],e[1],e[2]):wv(e[0],[],e[1])}o(Vl,"Assert");l();l();l();function NA(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ve(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ve(e[r]);return t}o(NA,"FromObject");function UA(e){return e.map(t=>Ve(t))}o(UA,"FromArray");function jA(e){return e.slice()}o(jA,"FromTypedArray");function zA(e){return new Map(Ve([...e.entries()]))}o(zA,"FromMap");function $A(e){return new Set(Ve([...e.entries()]))}o($A,"FromSet");function GA(e){return new Date(e.toISOString())}o(GA,"FromDate");function Ve(e){if(Ce(e))return UA(e);if(Fr(e))return GA(e);if(rn(e))return jA(e);if(mb(e))return zA(e);if(db(e))return $A(e);if(we(e))return NA(e);if(or(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Ve,"Clone");var xf=class xf extends he{constructor(t,r){super(r),this.schema=t}};o(xf,"ValueCreateError");var qr=xf;function We(e){return io(e)?e():Ve(e)}o(We,"FromDefault");function ZA(e,t){return ye(e,"default")?We(e.default):{}}o(ZA,"FromAny");function VA(e,t){if(e.uniqueItems===!0&&!ye(e,"default"))throw new qr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ye(e,"default"))throw new qr(e,"Array with the contains constraint requires a default value");return"default"in e?We(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>Jr(e.items,t)):[]}o(VA,"FromArray");function WA(e,t){return ye(e,"default")?We(e.default):function(){return Ty(this,null,function*(){})}()}o(WA,"FromAsyncIterator");function HA(e,t){return ye(e,"default")?We(e.default):BigInt(0)}o(HA,"FromBigInt");function KA(e,t){return ye(e,"default")?We(e.default):!1}o(KA,"FromBoolean");function qA(e,t){if(ye(e,"default"))return We(e.default);{let r=Jr(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let a=this;a[n]=i}}}:class{}}}o(qA,"FromConstructor");function JA(e,t){return ye(e,"default")?We(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(JA,"FromDate");function XA(e,t){return ye(e,"default")?We(e.default):()=>Jr(e.returns,t)}o(XA,"FromFunction");function YA(e,t){return ye(e,"default")?We(e.default):e.minimum!==void 0?e.minimum:0}o(YA,"FromInteger");function QA(e,t){if(ye(e,"default"))return We(e.default);{let r=e.allOf.reduce((n,i)=>{let a=Jr(i,t);return typeof a=="object"?R(R({},n),a):a},{});if(!Be(e,t,r))throw new qr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(QA,"FromIntersect");function e5(e,t){return ye(e,"default")?We(e.default):function*(){}()}o(e5,"FromIterator");function t5(e,t){return ye(e,"default")?We(e.default):e.const}o(t5,"FromLiteral");function r5(e,t){if(ye(e,"default"))return We(e.default);throw new qr(e,"Never types cannot be created. Consider using a default value.")}o(r5,"FromNever");function n5(e,t){if(ye(e,"default"))return We(e.default);throw new qr(e,"Not types must have a default value")}o(n5,"FromNot");function i5(e,t){return ye(e,"default")?We(e.default):null}o(i5,"FromNull");function o5(e,t){return ye(e,"default")?We(e.default):e.minimum!==void 0?e.minimum:0}o(o5,"FromNumber");function a5(e,t){if(ye(e,"default"))return We(e.default);{let r=new Set(e.required),n={};for(let[i,a]of Object.entries(e.properties))r.has(i)&&(n[i]=Jr(a,t));return n}}o(a5,"FromObject");function u5(e,t){return ye(e,"default")?We(e.default):Promise.resolve(Jr(e.item,t))}o(u5,"FromPromise");function s5(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(ye(e,"default"))return We(e.default);if(r===Ai||r===wi)return{};{let i=r.slice(1,r.length-1).split("|"),a={};for(let u of i)a[u]=Jr(n,t);return a}}o(s5,"FromRecord");function c5(e,t){return ye(e,"default")?We(e.default):Jr(Ze(e,t),t)}o(c5,"FromRef");function l5(e,t){if(ye(e,"default"))return We(e.default);throw new qr(e,"RegExp types cannot be created. Consider using a default value.")}o(l5,"FromRegExp");function m5(e,t){if(e.pattern!==void 0){if(ye(e,"default"))return We(e.default);throw new qr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ye(e,"default"))return We(e.default);throw new qr(e,"String types with formats must specify a default value")}else return ye(e,"default")?We(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(m5,"FromString");function d5(e,t){return ye(e,"default")?We(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(d5,"FromSymbol");function p5(e,t){if(ye(e,"default"))return We(e.default);if(!yl(e))throw new qr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return $a(e)[0]}o(p5,"FromTemplateLiteral");function f5(e,t){if(Ov++>C5)throw new qr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ye(e,"default")?We(e.default):Jr(Ze(e,t),t)}o(f5,"FromThis");function h5(e,t){return ye(e,"default")?We(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>Jr(e.items[n],t))}o(h5,"FromTuple");function g5(e,t){if(ye(e,"default"))return We(e.default)}o(g5,"FromUndefined");function y5(e,t){if(ye(e,"default"))return We(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return Jr(e.anyOf[0],t)}o(y5,"FromUnion");function b5(e,t){return ye(e,"default")?We(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(b5,"FromUint8Array");function v5(e,t){return ye(e,"default")?We(e.default):{}}o(v5,"FromUnknown");function x5(e,t){if(ye(e,"default"))return We(e.default)}o(x5,"FromVoid");function E5(e,t){if(ye(e,"default"))return We(e.default);throw new Error("User defined types must specify a default value")}o(E5,"FromKind");function Jr(e,t){let r=ln(e,t),n=e;switch(n[_]){case"Any":return ZA(n,r);case"Array":return VA(n,r);case"AsyncIterator":return WA(n,r);case"BigInt":return HA(n,r);case"Boolean":return KA(n,r);case"Constructor":return qA(n,r);case"Date":return JA(n,r);case"Function":return XA(n,r);case"Integer":return YA(n,r);case"Intersect":return QA(n,r);case"Iterator":return e5(n,r);case"Literal":return t5(n,r);case"Never":return r5(n,r);case"Not":return n5(n,r);case"Null":return i5(n,r);case"Number":return o5(n,r);case"Object":return a5(n,r);case"Promise":return u5(n,r);case"Record":return s5(n,r);case"Ref":return c5(n,r);case"RegExp":return l5(n,r);case"String":return m5(n,r);case"Symbol":return d5(n,r);case"TemplateLiteral":return p5(n,r);case"This":return f5(n,r);case"Tuple":return h5(n,r);case"Undefined":return g5(n,r);case"Union":return y5(n,r);case"Uint8Array":return b5(n,r);case"Unknown":return v5(n,r);case"Void":return x5(n,r);default:if(!Gt.Has(n[_]))throw new qr(n,"Unknown type");return E5(n,r)}}o(Jr,"Visit");var C5=512,Ov=0;function dn(...e){return Ov=0,e.length===2?Jr(e[0],e[1]):Jr(e[0],[])}o(dn,"Create");var Cf=class Cf extends he{constructor(t,r){super(r),this.schema=t}};o(Cf,"ValueCastError");var Wl=Cf;function I5(e,t,r){if(e[_]==="Object"&&typeof r=="object"&&!Ei(r)){let n=e,i=Object.getOwnPropertyNames(r),a=Object.entries(n.properties),[u,c]=[1/a.length,a.length];return a.reduce((m,[d,f])=>{let g=f[_]==="Literal"&&f.const===r[d]?c:0,v=Be(f,t,r[d])?u:0,b=i.includes(d)?u:0;return m+(g+v+b)},0)}else return Be(e,t,r)?1:0}o(I5,"ScoreUnion");function D5(e,t,r){let n=e.anyOf.map(u=>Ze(u,t)),[i,a]=[n[0],0];for(let u of n){let c=I5(u,t,r);c>a&&(i=u,a=c)}return i}o(D5,"SelectUnion");function S5(e,t,r){if("default"in e)return typeof r=="function"?e.default:Ve(e.default);{let n=D5(e,t,r);return Ef(n,t,r)}}o(S5,"CastUnion");function w5(e,t,r){return Be(e,t,r)?Ve(r):dn(e,t)}o(w5,"DefaultClone");function A5(e,t,r){return Be(e,t,r)?r:dn(e,t)}o(A5,"Default");function F5(e,t,r){if(Be(e,t,r))return Ve(r);let n=Ce(r)?Ve(r):dn(e,t),i=de(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,u=(de(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(m=>ti(e.items,t,m));if(e.uniqueItems!==!0)return u;let c=[...new Set(u)];if(!Be(e,t,c))throw new Wl(e,"Array cast produced invalid data due to uniqueItems constraint");return c}o(F5,"FromArray");function O5(e,t,r){if(Be(e,t,r))return dn(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[a,u]of Object.entries(e.returns.properties))!n.has(a)&&r.prototype[a]===void 0||(i.prototype[a]=ti(u,t,r.prototype[a]));return i}o(O5,"FromConstructor");function P5(e,t,r){let n=dn(e,t),i=we(n)&&we(r)?R(R({},n),r):r;return Be(e,t,i)?i:dn(e,t)}o(P5,"FromIntersect");function B5(e,t,r){throw new Wl(e,"Never types cannot be cast")}o(B5,"FromNever");function M5(e,t,r){if(Be(e,t,r))return r;if(r===null||typeof r!="object")return dn(e,t);let n=new Set(e.required||[]),i={};for(let[a,u]of Object.entries(e.properties))!n.has(a)&&r[a]===void 0||(i[a]=ti(u,t,r[a]));if(typeof e.additionalProperties=="object"){let a=Object.getOwnPropertyNames(e.properties);for(let u of Object.getOwnPropertyNames(r))a.includes(u)||(i[u]=ti(e.additionalProperties,t,r[u]))}return i}o(M5,"FromObject");function T5(e,t,r){if(Be(e,t,r))return Ve(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return dn(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],a={};for(let[u,c]of Object.entries(r))a[u]=ti(i,t,c);return a}o(T5,"FromRecord");function k5(e,t,r){return ti(Ze(e,t),t,r)}o(k5,"FromRef");function _5(e,t,r){return ti(Ze(e,t),t,r)}o(_5,"FromThis");function L5(e,t,r){return Be(e,t,r)?Ve(r):Ce(r)?e.items===void 0?[]:e.items.map((n,i)=>ti(n,t,r[i])):dn(e,t)}o(L5,"FromTuple");function R5(e,t,r){return Be(e,t,r)?Ve(r):S5(e,t,r)}o(R5,"FromUnion");function ti(e,t,r){let n=Ue(e.$id)?[...t,e]:t,i=e;switch(e[_]){case"Array":return F5(i,n,r);case"Constructor":return O5(i,n,r);case"Intersect":return P5(i,n,r);case"Never":return B5(i,n,r);case"Object":return M5(i,n,r);case"Record":return T5(i,n,r);case"Ref":return k5(i,n,r);case"This":return _5(i,n,r);case"Tuple":return L5(i,n,r);case"Union":return R5(i,n,r);case"Date":case"Symbol":case"Uint8Array":return w5(e,t,r);default:return A5(i,n,r)}}o(ti,"Visit");function Ef(...e){return e.length===3?ti(e[0],e[1],e[2]):ti(e[0],[],e[1])}o(Ef,"Cast");l();function N5(e){return ao(e)&&e[_]!=="Unsafe"}o(N5,"IsCheckable");function U5(e,t,r){return Ce(r)?r.map(n=>Xr(e.items,t,n)):r}o(U5,"FromArray");function j5(e,t,r){let n=e.unevaluatedProperties,a=e.allOf.map(c=>Xr(c,t,Ve(r))).reduce((c,m)=>we(m)?R(R({},c),m):m,{});if(!we(r)||!we(a)||!ao(n))return a;let u=Xt(e);for(let c of Object.getOwnPropertyNames(r))u.includes(c)||Be(n,t,r[c])&&(a[c]=Xr(n,t,r[c]));return a}o(j5,"FromIntersect");function z5(e,t,r){if(!we(r)||Ce(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(ye(e.properties,i)){r[i]=Xr(e.properties[i],t,r[i]);continue}if(ao(n)&&Be(n,t,r[i])){r[i]=Xr(n,t,r[i]);continue}delete r[i]}return r}o(z5,"FromObject");function $5(e,t,r){if(!we(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of i){if(c.test(m)){r[m]=Xr(u,t,r[m]);continue}if(ao(n)&&Be(n,t,r[m])){r[m]=Xr(n,t,r[m]);continue}delete r[m]}return r}o($5,"FromRecord");function G5(e,t,r){return Xr(Ze(e,t),t,r)}o(G5,"FromRef");function Z5(e,t,r){return Xr(Ze(e,t),t,r)}o(Z5,"FromThis");function V5(e,t,r){if(!Ce(r))return r;if(It(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Xr(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(V5,"FromTuple");function W5(e,t,r){for(let n of e.anyOf)if(N5(n)&&Be(n,t,r))return Xr(n,t,r);return r}o(W5,"FromUnion");function Xr(e,t,r){let n=Ue(e.$id)?[...t,e]:t,i=e;switch(i[_]){case"Array":return U5(i,n,r);case"Intersect":return j5(i,n,r);case"Object":return z5(i,n,r);case"Record":return $5(i,n,r);case"Ref":return G5(i,n,r);case"This":return Z5(i,n,r);case"Tuple":return V5(i,n,r);case"Union":return W5(i,n,r);default:return r}}o(Xr,"Visit");function Hl(...e){return e.length===3?Xr(e[0],e[1],e[2]):Xr(e[0],[],e[1])}o(Hl,"Clean");l();function Kl(e){return Ue(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(Kl,"IsStringNumeric");function H5(e){return ir(e)||qn(e)||de(e)}o(H5,"IsValueToString");function Ds(e){return e===!0||de(e)&&e===1||ir(e)&&e===BigInt("1")||Ue(e)&&(e.toLowerCase()==="true"||e==="1")}o(Ds,"IsValueTrue");function Ss(e){return e===!1||de(e)&&(e===0||Object.is(e,-0))||ir(e)&&e===BigInt("0")||Ue(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(Ss,"IsValueFalse");function K5(e){return Ue(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(K5,"IsTimeStringWithTimeZone");function q5(e){return Ue(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(q5,"IsTimeStringWithoutTimeZone");function J5(e){return Ue(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(J5,"IsDateTimeStringWithTimeZone");function X5(e){return Ue(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(X5,"IsDateTimeStringWithoutTimeZone");function Y5(e){return Ue(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(Y5,"IsDateString");function Q5(e,t){let r=Bv(e);return r===t?r:e}o(Q5,"TryConvertLiteralString");function eF(e,t){let r=Mv(e);return r===t?r:e}o(eF,"TryConvertLiteralNumber");function tF(e,t){let r=Pv(e);return r===t?r:e}o(tF,"TryConvertLiteralBoolean");function rF(e,t){return Ue(e.const)?Q5(t,e.const):de(e.const)?eF(t,e.const):qn(e.const)?tF(t,e.const):t}o(rF,"TryConvertLiteral");function Pv(e){return Ds(e)?!0:Ss(e)?!1:e}o(Pv,"TryConvertBoolean");function nF(e){let t=o(r=>r.split(".")[0],"truncateInteger");return Kl(e)?BigInt(t(e)):de(e)?BigInt(Math.trunc(e)):Ss(e)?BigInt(0):Ds(e)?BigInt(1):e}o(nF,"TryConvertBigInt");function Bv(e){return H5(e)?e.toString():Ci(e)&&e.description!==void 0?e.description.toString():e}o(Bv,"TryConvertString");function Mv(e){return Kl(e)?parseFloat(e):Ds(e)?1:Ss(e)?0:e}o(Mv,"TryConvertNumber");function iF(e){return Kl(e)?parseInt(e):de(e)?e|0:Ds(e)?1:Ss(e)?0:e}o(iF,"TryConvertInteger");function oF(e){return Ue(e)&&e.toLowerCase()==="null"?null:e}o(oF,"TryConvertNull");function aF(e){return Ue(e)&&e==="undefined"?void 0:e}o(aF,"TryConvertUndefined");function uF(e){return Fr(e)?e:de(e)?new Date(e):Ds(e)?new Date(1):Ss(e)?new Date(0):Kl(e)?new Date(parseInt(e)):q5(e)?new Date("1970-01-01T".concat(e,".000Z")):K5(e)?new Date("1970-01-01T".concat(e)):X5(e)?new Date("".concat(e,".000Z")):J5(e)?new Date(e):Y5(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(uF,"TryConvertDate");function sF(e,t,r){return(Ce(r)?r:[r]).map(i=>ri(e.items,t,i))}o(sF,"FromArray");function cF(e,t,r){return nF(r)}o(cF,"FromBigInt");function lF(e,t,r){return Pv(r)}o(lF,"FromBoolean");function mF(e,t,r){return uF(r)}o(mF,"FromDate");function dF(e,t,r){return iF(r)}o(dF,"FromInteger");function pF(e,t,r){return e.allOf.reduce((n,i)=>ri(i,t,n),r)}o(pF,"FromIntersect");function fF(e,t,r){return rF(e,r)}o(fF,"FromLiteral");function hF(e,t,r){return oF(r)}o(hF,"FromNull");function gF(e,t,r){return Mv(r)}o(gF,"FromNumber");function yF(e,t,r){if(!we(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))ye(r,n)&&(r[n]=ri(e.properties[n],t,r[n]));return r}o(yF,"FromObject");function bF(e,t,r){if(!we(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=e.patternProperties[i];for(let[u,c]of Object.entries(r))r[u]=ri(a,t,c);return r}o(bF,"FromRecord");function vF(e,t,r){return ri(Ze(e,t),t,r)}o(vF,"FromRef");function xF(e,t,r){return Bv(r)}o(xF,"FromString");function EF(e,t,r){return Ue(r)||de(r)?Symbol(r):r}o(EF,"FromSymbol");function CF(e,t,r){return ri(Ze(e,t),t,r)}o(CF,"FromThis");function IF(e,t,r){return Ce(r)&&!It(e.items)?r.map((i,a)=>a<e.items.length?ri(e.items[a],t,i):i):r}o(IF,"FromTuple");function DF(e,t,r){return aF(r)}o(DF,"FromUndefined");function SF(e,t,r){for(let n of e.anyOf){let i=ri(n,t,Ve(r));if(Be(n,t,i))return i}return r}o(SF,"FromUnion");function ri(e,t,r){let n=ln(e,t),i=e;switch(e[_]){case"Array":return sF(i,n,r);case"BigInt":return cF(i,n,r);case"Boolean":return lF(i,n,r);case"Date":return mF(i,n,r);case"Integer":return dF(i,n,r);case"Intersect":return pF(i,n,r);case"Literal":return fF(i,n,r);case"Null":return hF(i,n,r);case"Number":return gF(i,n,r);case"Object":return yF(i,n,r);case"Record":return bF(i,n,r);case"Ref":return vF(i,n,r);case"String":return xF(i,n,r);case"Symbol":return EF(i,n,r);case"This":return CF(i,n,r);case"Tuple":return IF(i,n,r);case"Undefined":return DF(i,n,r);case"Union":return SF(i,n,r);default:return r}}o(ri,"Visit");function ql(...e){return e.length===3?ri(e[0],e[1],e[2]):ri(e[0],[],e[1])}o(ql,"Convert");l();l();var If=class If extends he{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(If,"TransformDecodeCheckError");var iu=If,Df=class Df extends he{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Df,"TransformDecodeError");var Ko=Df;function Dt(e,t,r){try{return ht(e)?e[yt].Decode(r):r}catch(n){throw new Ko(e,t,r,n)}}o(Dt,"Default");function wF(e,t,r,n){return Ce(n)?Dt(e,r,n.map((i,a)=>ni(e.items,t,"".concat(r,"/").concat(a),i))):Dt(e,r,n)}o(wF,"FromArray");function AF(e,t,r,n){if(!we(n)||or(n))return Dt(e,r,n);let i=co(e),a=i.map(f=>f[0]),u=R({},n);for(let[f,g]of i)f in u&&(u[f]=ni(g,t,"".concat(r,"/").concat(f),u[f]));if(!ht(e.unevaluatedProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.unevaluatedProperties,d=R({},u);for(let f of c)a.includes(f)||(d[f]=Dt(m,"".concat(r,"/").concat(f),d[f]));return Dt(e,r,d)}o(AF,"FromIntersect");function FF(e,t,r,n){return Dt(e,r,ni(e.not,t,r,n))}o(FF,"FromNot");function OF(e,t,r,n){if(!we(n))return Dt(e,r,n);let i=Xt(e),a=R({},n);for(let d of i)ye(a,d)&&(It(a[d])&&(!Ra(e.properties[d])||Qe.IsExactOptionalProperty(a,d))||(a[d]=ni(e.properties[d],t,"".concat(r,"/").concat(d),a[d])));if(!je(e.additionalProperties))return Dt(e,r,a);let u=Object.getOwnPropertyNames(a),c=e.additionalProperties,m=R({},a);for(let d of u)i.includes(d)||(m[d]=Dt(c,"".concat(r,"/").concat(d),m[d]));return Dt(e,r,m)}o(OF,"FromObject");function PF(e,t,r,n){if(!we(n))return Dt(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=R({},n);for(let f of Object.getOwnPropertyNames(n))a.test(f)&&(u[f]=ni(e.patternProperties[i],t,"".concat(r,"/").concat(f),u[f]));if(!je(e.additionalProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let f of c)a.test(f)||(d[f]=Dt(m,"".concat(r,"/").concat(f),d[f]));return Dt(e,r,d)}o(PF,"FromRecord");function BF(e,t,r,n){let i=Ze(e,t);return Dt(e,r,ni(i,t,r,n))}o(BF,"FromRef");function MF(e,t,r,n){let i=Ze(e,t);return Dt(e,r,ni(i,t,r,n))}o(MF,"FromThis");function TF(e,t,r,n){return Ce(n)&&Ce(e.items)?Dt(e,r,e.items.map((i,a)=>ni(i,t,"".concat(r,"/").concat(a),n[a]))):Dt(e,r,n)}o(TF,"FromTuple");function kF(e,t,r,n){for(let i of e.anyOf){if(!Be(i,t,n))continue;let a=ni(i,t,r,n);return Dt(e,r,a)}return Dt(e,r,n)}o(kF,"FromUnion");function ni(e,t,r,n){let i=ln(e,t),a=e;switch(e[_]){case"Array":return wF(a,i,r,n);case"Intersect":return AF(a,i,r,n);case"Not":return FF(a,i,r,n);case"Object":return OF(a,i,r,n);case"Record":return PF(a,i,r,n);case"Ref":return BF(a,i,r,n);case"Symbol":return Dt(a,r,n);case"This":return MF(a,i,r,n);case"Tuple":return TF(a,i,r,n);case"Union":return kF(a,i,r,n);default:return Dt(a,r,n)}}o(ni,"Visit");function ou(e,t,r){return ni(e,t,"",r)}o(ou,"TransformDecode");l();var Sf=class Sf extends he{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(Sf,"TransformEncodeCheckError");var au=Sf,wf=class wf extends he{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(wf,"TransformEncodeError");var qo=wf;function xr(e,t,r){try{return ht(e)?e[yt].Encode(r):r}catch(n){throw new qo(e,t,r,n)}}o(xr,"Default");function _F(e,t,r,n){let i=xr(e,r,n);return Ce(i)?i.map((a,u)=>ii(e.items,t,"".concat(r,"/").concat(u),a)):i}o(_F,"FromArray");function LF(e,t,r,n){let i=xr(e,r,n);if(!we(n)||or(n))return i;let a=co(e),u=a.map(g=>g[0]),c=R({},i);for(let[g,v]of a)g in c&&(c[g]=ii(v,t,"".concat(r,"/").concat(g),c[g]));if(!ht(e.unevaluatedProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,f=R({},c);for(let g of m)u.includes(g)||(f[g]=xr(d,"".concat(r,"/").concat(g),f[g]));return f}o(LF,"FromIntersect");function RF(e,t,r,n){return xr(e.not,r,xr(e,r,n))}o(RF,"FromNot");function NF(e,t,r,n){let i=xr(e,r,n);if(!we(i))return i;let a=Xt(e),u=R({},i);for(let f of a)ye(u,f)&&(It(u[f])&&(!Ra(e.properties[f])||Qe.IsExactOptionalProperty(u,f))||(u[f]=ii(e.properties[f],t,"".concat(r,"/").concat(f),u[f])));if(!je(e.additionalProperties))return u;let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let f of c)a.includes(f)||(d[f]=xr(m,"".concat(r,"/").concat(f),d[f]));return d}o(NF,"FromObject");function UF(e,t,r,n){let i=xr(e,r,n);if(!we(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},i);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=ii(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g]));if(!je(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=R({},c);for(let g of m)u.test(g)||(f[g]=xr(d,"".concat(r,"/").concat(g),f[g]));return f}o(UF,"FromRecord");function jF(e,t,r,n){let i=Ze(e,t),a=ii(i,t,r,n);return xr(e,r,a)}o(jF,"FromRef");function zF(e,t,r,n){let i=Ze(e,t),a=ii(i,t,r,n);return xr(e,r,a)}o(zF,"FromThis");function $F(e,t,r,n){let i=xr(e,r,n);return Ce(e.items)?e.items.map((a,u)=>ii(a,t,"".concat(r,"/").concat(u),i[u])):[]}o($F,"FromTuple");function GF(e,t,r,n){for(let i of e.anyOf){if(!Be(i,t,n))continue;let a=ii(i,t,r,n);return xr(e,r,a)}for(let i of e.anyOf){let a=ii(i,t,r,n);if(Be(e,t,a))return xr(e,r,a)}return xr(e,r,n)}o(GF,"FromUnion");function ii(e,t,r,n){let i=ln(e,t),a=e;switch(e[_]){case"Array":return _F(a,i,r,n);case"Intersect":return LF(a,i,r,n);case"Not":return RF(a,i,r,n);case"Object":return NF(a,i,r,n);case"Record":return UF(a,i,r,n);case"Ref":return jF(a,i,r,n);case"This":return zF(a,i,r,n);case"Tuple":return $F(a,i,r,n);case"Union":return GF(a,i,r,n);default:return xr(a,r,n)}}o(ii,"Visit");function Jl(e,t,r){return ii(e,t,"",r)}o(Jl,"TransformEncode");l();function ZF(e,t){return ht(e)||Yt(e.items,t)}o(ZF,"FromArray");function VF(e,t){return ht(e)||Yt(e.items,t)}o(VF,"FromAsyncIterator");function WF(e,t){return ht(e)||Yt(e.returns,t)||e.parameters.some(r=>Yt(r,t))}o(WF,"FromConstructor");function HF(e,t){return ht(e)||Yt(e.returns,t)||e.parameters.some(r=>Yt(r,t))}o(HF,"FromFunction");function KF(e,t){return ht(e)||ht(e.unevaluatedProperties)||e.allOf.some(r=>Yt(r,t))}o(KF,"FromIntersect");function qF(e,t){return ht(e)||Yt(e.items,t)}o(qF,"FromIterator");function JF(e,t){return ht(e)||Yt(e.not,t)}o(JF,"FromNot");function XF(e,t){return ht(e)||Object.values(e.properties).some(r=>Yt(r,t))||je(e.additionalProperties)&&Yt(e.additionalProperties,t)}o(XF,"FromObject");function YF(e,t){return ht(e)||Yt(e.item,t)}o(YF,"FromPromise");function QF(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return ht(e)||Yt(n,t)||je(e.additionalProperties)&&ht(e.additionalProperties)}o(QF,"FromRecord");function eO(e,t){return ht(e)?!0:Yt(Ze(e,t),t)}o(eO,"FromRef");function tO(e,t){return ht(e)?!0:Yt(Ze(e,t),t)}o(tO,"FromThis");function rO(e,t){return ht(e)||!It(e.items)&&e.items.some(r=>Yt(r,t))}o(rO,"FromTuple");function nO(e,t){return ht(e)||e.anyOf.some(r=>Yt(r,t))}o(nO,"FromUnion");function Yt(e,t){let r=ln(e,t),n=e;if(e.$id&&Af.has(e.$id))return!1;switch(e.$id&&Af.add(e.$id),e[_]){case"Array":return ZF(n,r);case"AsyncIterator":return VF(n,r);case"Constructor":return WF(n,r);case"Function":return HF(n,r);case"Intersect":return KF(n,r);case"Iterator":return qF(n,r);case"Not":return JF(n,r);case"Object":return XF(n,r);case"Promise":return YF(n,r);case"Record":return QF(n,r);case"Ref":return eO(n,r);case"This":return tO(n,r);case"Tuple":return rO(n,r);case"Union":return nO(n,r);default:return ht(e)}}o(Yt,"Visit");var Af=new Set;function oi(e,t){return Af.clear(),Yt(e,t)}o(oi,"HasTransform");function Tv(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!Be(t,r,n))throw new iu(t,n,ei(t,r,n).First());return oi(t,r)?ou(t,r,n):n}o(Tv,"Decode");l();function Ti(e,t){let r=ye(e,"default")?e.default:void 0,n=io(r)?r():Ve(r);return It(t)?n:we(t)&&we(n)?Object.assign(n,t):t}o(Ti,"ValueOrDefault");function Ff(e){return ao(e)&&"default"in e}o(Ff,"HasDefaultProperty");function iO(e,t,r){let n=Ti(e,r);if(!Ce(n))return n;for(let i=0;i<n.length;i++)n[i]=Yr(e.items,t,n[i]);return n}o(iO,"FromArray");function oO(e,t,r){return Fr(r)?r:Ti(e,r)}o(oO,"FromDate");function aO(e,t,r){let n=Ti(e,r);return e.allOf.reduce((i,a)=>{let u=Yr(a,t,n);return we(u)?R(R({},i),u):u},{})}o(aO,"FromIntersect");function uO(e,t,r){let n=Ti(e,r);if(!we(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let a of i){let u=Yr(e.properties[a],t,n[a]);It(u)||(n[a]=Yr(e.properties[a],t,n[a]))}if(!Ff(e.additionalProperties))return n;for(let a of Object.getOwnPropertyNames(n))i.includes(a)||(n[a]=Yr(e.additionalProperties,t,n[a]));return n}o(uO,"FromObject");function sO(e,t,r){let n=Ti(e,r);if(!we(n))return n;let i=e.additionalProperties,[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of Object.getOwnPropertyNames(n))c.test(m)&&Ff(u)&&(n[m]=Yr(u,t,n[m]));if(!Ff(i))return n;for(let m of Object.getOwnPropertyNames(n))c.test(m)||(n[m]=Yr(i,t,n[m]));return n}o(sO,"FromRecord");function cO(e,t,r){return Yr(Ze(e,t),t,Ti(e,r))}o(cO,"FromRef");function lO(e,t,r){return Yr(Ze(e,t),t,r)}o(lO,"FromThis");function mO(e,t,r){let n=Ti(e,r);if(!Ce(n)||It(e.items))return n;let[i,a]=[e.items,Math.max(e.items.length,n.length)];for(let u=0;u<a;u++)u<i.length&&(n[u]=Yr(i[u],t,n[u]));return n}o(mO,"FromTuple");function dO(e,t,r){let n=Ti(e,r);for(let i of e.anyOf){let a=Yr(i,t,Ve(n));if(Be(i,t,a))return a}return n}o(dO,"FromUnion");function Yr(e,t,r){let n=ln(e,t),i=e;switch(i[_]){case"Array":return iO(i,n,r);case"Date":return oO(i,n,r);case"Intersect":return aO(i,n,r);case"Object":return uO(i,n,r);case"Record":return sO(i,n,r);case"Ref":return cO(i,n,r);case"This":return lO(i,n,r);case"Tuple":return mO(i,n,r);case"Union":return dO(i,n,r);default:return Ti(i,r)}}o(Yr,"Visit");function Xl(...e){return e.length===3?Yr(e[0],e[1],e[2]):Yr(e[0],[],e[1])}o(Xl,"Default");l();l();var pn={};Ki(pn,{Delete:()=>fO,Format:()=>ws,Get:()=>gO,Has:()=>hO,Set:()=>pO,ValuePointerRootDeleteError:()=>Ql,ValuePointerRootSetError:()=>Yl});l();var Of=class Of extends he{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(Of,"ValuePointerRootSetError");var Yl=Of,Pf=class Pf extends he{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(Pf,"ValuePointerRootDeleteError");var Ql=Pf;function kv(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(kv,"Escape");function*ws(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield kv(e.slice(t,r))),t=n+1):r=n;yield kv(e.slice(t))}o(ws,"Format");function pO(e,t,r){if(t==="")throw new Yl(e,t,r);let[n,i,a]=[null,e,""];for(let u of ws(t))i[u]===void 0&&(i[u]={}),n=i,i=i[u],a=u;n[a]=r}o(pO,"Set");function fO(e,t){if(t==="")throw new Ql(e,t);let[r,n,i]=[null,e,""];for(let a of ws(t)){if(n[a]===void 0||n[a]===null)return;r=n,n=n[a],i=a}if(Array.isArray(r)){let a=parseInt(i);r.splice(a,1)}else delete r[i]}o(fO,"Delete");function hO(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let a of ws(t)){if(n[a]===void 0)return!1;r=n,n=n[a],i=a}return Object.getOwnPropertyNames(r).includes(i)}o(hO,"Has");function gO(e,t){if(t==="")return e;let r=e;for(let n of ws(t)){if(r[n]===void 0)return;r=r[n]}return r}o(gO,"Get");l();function yO(e,t){if(!we(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>Jo(e[i],t[i]))}o(yO,"ObjectType");function bO(e,t){return Fr(t)&&e.getTime()===t.getTime()}o(bO,"DateType");function vO(e,t){return!Ce(t)||e.length!==t.length?!1:e.every((r,n)=>Jo(r,t[n]))}o(vO,"ArrayType");function xO(e,t){return!rn(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>Jo(r,t[n]))}o(xO,"TypedArrayType");function EO(e,t){return e===t}o(EO,"ValueType");function Jo(e,t){if(Fr(e))return bO(e,t);if(rn(e))return xO(e,t);if(Ce(e))return vO(e,t);if(we(e))return yO(e,t);if(or(e))return EO(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Jo,"Equal");var CO=st({type:Ke("insert"),path:on(),value:Pi()}),IO=st({type:Ke("update"),path:on(),value:Pi()}),DO=st({type:Ke("delete"),path:on()}),Lv=nt([CO,IO,DO]),Bf=class Bf extends he{constructor(t,r){super(r),this.value=t}};o(Bf,"ValueDiffError");var em=Bf;function tm(e,t){return{type:"update",path:e,value:t}}o(tm,"CreateUpdate");function Rv(e,t){return{type:"insert",path:e,value:t}}o(Rv,"CreateInsert");function Nv(e){return{type:"delete",path:e}}o(Nv,"CreateDelete");function _v(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new em(e,"Cannot diff objects with symbols")}o(_v,"AssertDiffable");function*SO(e,t,r){if(_v(t),_v(r),!r0(r))return yield tm(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let a of i)ye(t,a)||(yield Rv("".concat(e,"/").concat(a),r[a]));for(let a of n)ye(r,a)&&(Jo(t,r)||(yield*X(rm("".concat(e,"/").concat(a),t[a],r[a]))));for(let a of n)ye(r,a)||(yield Nv("".concat(e,"/").concat(a)))}o(SO,"ObjectType");function*wO(e,t,r){if(!Ce(r))return yield tm(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*X(rm("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield Rv("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield Nv("".concat(e,"/").concat(n)))}o(wO,"ArrayType");function*AO(e,t,r){if(!rn(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield tm(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*X(rm("".concat(e,"/").concat(n),t[n],r[n]))}o(AO,"TypedArrayType");function*FO(e,t,r){t!==r&&(yield tm(e,r))}o(FO,"ValueType");function*rm(e,t,r){if(r0(t))return yield*X(SO(e,t,r));if(Ce(t))return yield*X(wO(e,t,r));if(rn(t))return yield*X(AO(e,t,r));if(or(t))return yield*X(FO(e,t,r));throw new em(t,"Unable to diff value")}o(rm,"Visit");function Uv(e,t){return[...rm("",e,t)]}o(Uv,"Diff");function OO(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(OO,"IsRootUpdate");function PO(e){return e.length===0}o(PO,"IsIdentity");function jv(e,t){if(OO(t))return Ve(t[0].value);if(PO(t))return Ve(e);let r=Ve(e);for(let n of t)switch(n.type){case"insert":{pn.Set(r,n.path,n.value);break}case"update":{pn.Set(r,n.path,n.value);break}case"delete":{pn.Delete(r,n.path);break}}return r}o(jv,"Patch");l();function zv(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=oi(t,r)?Jl(t,r,n):n;if(!Be(t,r,i))throw new au(t,i,ei(t,r,i).First());return i}o(zv,"Encode");l();var Tf=class Tf extends he{constructor(t){super(t)}};o(Tf,"ValueMutateError");var nm=Tf;function BO(e,t,r,n){if(!we(r))pn.Set(e,t,Ve(n));else{let i=Object.getOwnPropertyNames(r),a=Object.getOwnPropertyNames(n);for(let u of i)a.includes(u)||delete r[u];for(let u of a)i.includes(u)||(r[u]=null);for(let u of a)Mf(e,"".concat(t,"/").concat(u),r[u],n[u])}}o(BO,"ObjectType");function MO(e,t,r,n){if(!Ce(r))pn.Set(e,t,Ve(n));else{for(let i=0;i<n.length;i++)Mf(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(MO,"ArrayType");function TO(e,t,r,n){if(rn(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else pn.Set(e,t,Ve(n))}o(TO,"TypedArrayType");function kO(e,t,r,n){r!==n&&pn.Set(e,t,n)}o(kO,"ValueType");function Mf(e,t,r,n){if(Ce(n))return MO(e,t,r,n);if(rn(n))return TO(e,t,r,n);if(we(n))return BO(e,t,r,n);if(or(n))return kO(e,t,r,n)}o(Mf,"Visit");function $v(e){return rn(e)||or(e)}o($v,"IsNonMutableValue");function _O(e,t){return we(e)&&Ce(t)||Ce(e)&&we(t)}o(_O,"IsMismatchedValue");function Gv(e,t){if($v(e)||$v(t))throw new nm("Only object and array types can be mutated at the root level");if(_O(e,t))throw new nm("Cannot assign due type mismatch of assignable values");Mf(e,"",e,t)}o(Gv,"Mutate");l();var LO=[(e,t,r)=>Ve(r),(e,t,r)=>Xl(e,t,r),(e,t,r)=>Hl(e,t,r),(e,t,r)=>ql(e,t,r),(e,t,r)=>(Vl(e,t,r),r),(e,t,r)=>oi(e,t)?ou(e,t,r):r];function Zv(e,t,r){return LO.reduce((n,i)=>i(e,t,n),r)}o(Zv,"ParseValue");function Vv(...e){return e.length===3?Zv(e[0],e[1],e[2]):Zv(e[0],[],e[1])}o(Vv,"Parse");l();var fn={};Ki(fn,{Assert:()=>Vl,Cast:()=>Ef,Check:()=>Be,Clean:()=>Hl,Clone:()=>Ve,Convert:()=>ql,Create:()=>dn,Decode:()=>Tv,Default:()=>Xl,Diff:()=>Uv,Edit:()=>Lv,Encode:()=>zv,Equal:()=>Jo,Errors:()=>ei,Hash:()=>po,Mutate:()=>Gv,Parse:()=>Vv,Patch:()=>jv,ValueErrorIterator:()=>mn});l();l();var Wv={},RO=o(function(e,t,r,n,i){var a=new Worker(Wv[t]||(Wv[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(u){var c=u.data,m=c.$e$;if(m){var d=new Error(m[0]);d.code=m[1],d.stack=m[2],i(d,null)}else i(null,c)},a.postMessage(r,n),a},"wk"),ct=Uint8Array,Mr=Uint16Array,Ps=Int32Array,mu=new ct([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),du=new ct([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),As=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qv=o(function(e,t){for(var r=new Mr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new Ps(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},"freb"),Jv=qv(mu,2),Uf=Jv.b,sm=Jv.r;Uf[28]=258,sm[258]=28;var Xv=qv(du,0),Yv=Xv.b,_f=Xv.r,Fs=new Mr(32768);for(Xe=0;Xe<32768;++Xe)ki=(Xe&43690)>>1|(Xe&21845)<<1,ki=(ki&52428)>>2|(ki&13107)<<2,ki=(ki&61680)>>4|(ki&3855)<<4,Fs[Xe]=((ki&65280)>>8|(ki&255)<<8)>>1;var ki,Xe,gn=o(function(e,t,r){for(var n=e.length,i=0,a=new Mr(t);i<n;++i)e[i]&&++a[e[i]-1];var u=new Mr(t);for(i=1;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;var c;if(r){c=new Mr(1<<t);var m=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],f=t-e[i],g=u[e[i]-1]++<<f,v=g|(1<<f)-1;g<=v;++g)c[Fs[g]>>m]=d}else for(c=new Mr(n),i=0;i<n;++i)e[i]&&(c[i]=Fs[u[e[i]-1]++]>>15-e[i]);return c},"hMap"),_i=new ct(288);for(Xe=0;Xe<144;++Xe)_i[Xe]=8;var Xe;for(Xe=144;Xe<256;++Xe)_i[Xe]=9;var Xe;for(Xe=256;Xe<280;++Xe)_i[Xe]=7;var Xe;for(Xe=280;Xe<288;++Xe)_i[Xe]=8;var Xe,cu=new ct(32);for(Xe=0;Xe<32;++Xe)cu[Xe]=5;var Xe,Qv=gn(_i,9,0),ex=gn(_i,9,1),tx=gn(cu,5,0),rx=gn(cu,5,1),om=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),hn=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),am=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),Bs=o(function(e){return(e+7)/8|0},"shft"),fo=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new ct(e.subarray(t,r))},"slc"),dm={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},nx=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],St=o(function(e,t,r){var n=new Error(t||nx[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,St),!r)throw n;return n},"err"),ix=o(function(e,t,r,n){var i=e.length,a=n?n.length:0;if(!i||t.f&&!t.l)return r||new ct(0);var u=!r,c=u||t.i!=2,m=t.i;u&&(r=new ct(i*3));var d=o(function(P){var ce=r.length;if(P>ce){var Q=new ct(Math.max(ce*2,P));Q.set(r),r=Q}},"cbuf"),f=t.f||0,g=t.p||0,v=t.b||0,b=t.l,D=t.d,A=t.m,x=t.n,E=i*8;do{if(!b){f=hn(e,g,1);var S=hn(e,g+1,3);if(g+=3,S)if(S==1)b=ex,D=rx,A=9,x=5;else if(S==2){var V=hn(e,g,31)+257,z=hn(e,g+10,15)+4,M=V+hn(e,g+5,31)+1;g+=14;for(var T=new ct(M),Z=new ct(19),j=0;j<z;++j)Z[As[j]]=hn(e,g+j*3,7);g+=z*3;for(var W=om(Z),$=(1<<W)-1,q=gn(Z,W,1),j=0;j<M;){var J=q[hn(e,g,$)];g+=J&15;var I=J>>4;if(I<16)T[j++]=I;else{var G=0,ae=0;for(I==16?(ae=3+hn(e,g,3),g+=2,G=T[j-1]):I==17?(ae=3+hn(e,g,7),g+=3):I==18&&(ae=11+hn(e,g,127),g+=7);ae--;)T[j++]=G}}var te=T.subarray(0,V),ee=T.subarray(V);A=om(te),x=om(ee),b=gn(te,A,1),D=gn(ee,x,1)}else St(1);else{var I=Bs(g)+4,C=e[I-4]|e[I-3]<<8,k=I+C;if(k>i){m&&St(0);break}c&&d(v+C),r.set(e.subarray(I,k),v),t.b=v+=C,t.p=g=k*8,t.f=f;continue}if(g>E){m&&St(0);break}}c&&d(v+131072);for(var le=(1<<A)-1,fe=(1<<x)-1,xe=g;;xe=g){var G=b[am(e,g)&le],be=G>>4;if(g+=G&15,g>E){m&&St(0);break}if(G||St(2),be<256)r[v++]=be;else if(be==256){xe=g,b=null;break}else{var Oe=be-254;if(be>264){var j=be-257,Ie=mu[j];Oe=hn(e,g,(1<<Ie)-1)+Uf[j],g+=Ie}var ot=D[am(e,g)&fe],Sr=ot>>4;ot||St(3),g+=ot&15;var ee=Yv[Sr];if(Sr>3){var Ie=du[Sr];ee+=am(e,g)&(1<<Ie)-1,g+=Ie}if(g>E){m&&St(0);break}c&&d(v+131072);var wr=v+Oe;if(v<ee){var F=a-ee,Y=Math.min(ee,wr);for(F+v<0&&St(3);v<Y;++v)r[v]=n[F+v]}for(;v<wr;++v)r[v]=r[v-ee]}}t.l=b,t.p=xe,t.b=v,t.f=f,b&&(f=1,t.m=A,t.d=D,t.n=x)}while(!f);return v!=r.length&&u?fo(r,0,v):r.subarray(0,v)},"inflt"),ai=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),uu=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),um=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:zf,l:0};if(i==1){var u=new ct(r[0].s+1);return u[r[0].s]=1,{t:u,l:1}}r.sort(function(k,V){return k.f-V.f}),r.push({s:-1,f:25001});var c=r[0],m=r[1],d=0,f=1,g=2;for(r[0]={s:-1,f:c.f+m.f,l:c,r:m};f!=i-1;)c=r[r[d].f<r[g].f?d++:g++],m=r[d!=f&&r[d].f<r[g].f?d++:g++],r[f++]={s:-1,f:c.f+m.f,l:c,r:m};for(var v=a[0].s,n=1;n<i;++n)a[n].s>v&&(v=a[n].s);var b=new Mr(v+1),D=cm(r[f-1],b,0);if(D>t){var n=0,A=0,x=D-t,E=1<<x;for(a.sort(function(V,z){return b[z.s]-b[V.s]||V.f-z.f});n<i;++n){var S=a[n].s;if(b[S]>t)A+=E-(1<<D-b[S]),b[S]=t;else break}for(A>>=x;A>0;){var I=a[n].s;b[I]<t?A-=1<<t-b[I]++-1:++n}for(;n>=0&&A;--n){var C=a[n].s;b[C]==t&&(--b[C],++A)}D=t}return{t:new ct(b),l:D}},"hTree"),cm=o(function(e,t,r){return e.s==-1?Math.max(cm(e.l,t,r+1),cm(e.r,t,r+1)):t[e.s]=r},"ln"),Lf=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Mr(++t),n=0,i=e[0],a=1,u=o(function(m){r[n++]=m},"w"),c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(i),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(i);a=1,i=e[c]}return{c:r.subarray(0,n),n:t}},"lc"),su=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),jf=o(function(e,t,r){var n=r.length,i=Bs(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},"wfblk"),Rf=o(function(e,t,r,n,i,a,u,c,m,d,f){ai(t,f++,r),++i[256];for(var g=um(i,15),v=g.t,b=g.l,D=um(a,15),A=D.t,x=D.l,E=Lf(v),S=E.c,I=E.n,C=Lf(A),k=C.c,V=C.n,z=new Mr(19),M=0;M<S.length;++M)++z[S[M]&31];for(var M=0;M<k.length;++M)++z[k[M]&31];for(var T=um(z,7),Z=T.t,j=T.l,W=19;W>4&&!Z[As[W-1]];--W);var $=d+5<<3,q=su(i,_i)+su(a,cu)+u,J=su(i,v)+su(a,A)+u+14+3*W+su(z,Z)+2*z[16]+3*z[17]+7*z[18];if(m>=0&&$<=q&&$<=J)return jf(t,f,e.subarray(m,m+d));var G,ae,te,ee;if(ai(t,f,1+(J<q)),f+=2,J<q){G=gn(v,b,0),ae=v,te=gn(A,x,0),ee=A;var le=gn(Z,j,0);ai(t,f,I-257),ai(t,f+5,V-1),ai(t,f+10,W-4),f+=14;for(var M=0;M<W;++M)ai(t,f+3*M,Z[As[M]]);f+=3*W;for(var fe=[S,k],xe=0;xe<2;++xe)for(var be=fe[xe],M=0;M<be.length;++M){var Oe=be[M]&31;ai(t,f,le[Oe]),f+=Z[Oe],Oe>15&&(ai(t,f,be[M]>>5&127),f+=be[M]>>12)}}else G=Qv,ae=_i,te=tx,ee=cu;for(var M=0;M<c;++M){var Ie=n[M];if(Ie>255){var Oe=Ie>>18&31;uu(t,f,G[Oe+257]),f+=ae[Oe+257],Oe>7&&(ai(t,f,Ie>>23&31),f+=mu[Oe]);var ot=Ie&31;uu(t,f,te[ot]),f+=ee[ot],ot>3&&(uu(t,f,Ie>>5&8191),f+=du[ot])}else uu(t,f,G[Ie]),f+=ae[Ie]}return uu(t,f,G[256]),f+ae[256]},"wblk"),ox=new Ps([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),zf=new ct(0),ax=o(function(e,t,r,n,i,a){var u=a.z||e.length,c=new ct(n+u+5*(1+Math.ceil(u/7e3))+i),m=c.subarray(n,c.length-i),d=a.l,f=(a.r||0)&7;if(t){f&&(m[0]=a.r>>3);for(var g=ox[t-1],v=g>>13,b=g&8191,D=(1<<r)-1,A=a.p||new Mr(32768),x=a.h||new Mr(D+1),E=Math.ceil(r/3),S=2*E,I=o(function(re){return(e[re]^e[re+1]<<E^e[re+2]<<S)&D},"hsh"),C=new Ps(25e3),k=new Mr(288),V=new Mr(32),z=0,M=0,T=a.i||0,Z=0,j=a.w||0,W=0;T+2<u;++T){var $=I(T),q=T&32767,J=x[$];if(A[q]=J,x[$]=q,j<=T){var G=u-T;if((z>7e3||Z>24576)&&(G>423||!d)){f=Rf(e,m,0,C,k,V,M,Z,W,T-W,f),Z=z=M=0,W=T;for(var ae=0;ae<286;++ae)k[ae]=0;for(var ae=0;ae<30;++ae)V[ae]=0}var te=2,ee=0,le=b,fe=q-J&32767;if(G>2&&$==I(T-fe))for(var xe=Math.min(v,G)-1,be=Math.min(32767,T),Oe=Math.min(258,G);fe<=be&&--le&&q!=J;){if(e[T+te]==e[T+te-fe]){for(var Ie=0;Ie<Oe&&e[T+Ie]==e[T+Ie-fe];++Ie);if(Ie>te){if(te=Ie,ee=fe,Ie>xe)break;for(var ot=Math.min(fe,Ie-2),Sr=0,ae=0;ae<ot;++ae){var wr=T-fe+ae&32767,F=A[wr],Y=wr-F&32767;Y>Sr&&(Sr=Y,J=wr)}}}q=J,J=A[q],fe+=q-J&32767}if(ee){C[Z++]=268435456|sm[te]<<18|_f[ee];var P=sm[te]&31,ce=_f[ee]&31;M+=mu[P]+du[ce],++k[257+P],++V[ce],j=T+te,++z}else C[Z++]=e[T],++k[e[T]]}}for(T=Math.max(T,j);T<u;++T)C[Z++]=e[T],++k[e[T]];f=Rf(e,m,d,C,k,V,M,Z,W,T-W,f),d||(a.r=f&7|m[f/8|0]<<3,f-=7,a.h=x,a.p=A,a.i=T,a.w=j)}else{for(var T=a.w||0;T<u+d;T+=65535){var Q=T+65535;Q>=u&&(m[f/8|0]=d,Q=u),f=jf(m,f+1,e.subarray(T,Q))}a.i=u}return fo(c,0,n+Bs(f)+i)},"dflt"),NO=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),ux=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=NO[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var sx=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),u=new ct(a.length+e.length);u.set(a),u.set(e,a.length),e=u,i.w=a.length}return ax(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),pm=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),Hv=o(function(e,t,r){for(var n=e(),i=e.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),u=0;u<n.length;++u){var c=n[u],m=a[u];if(typeof c=="function"){t+=";"+m+"=";var d=c.toString();if(c.prototype)if(d.indexOf("[native code]")!=-1){var f=d.indexOf(" ",8)+1;t+=d.slice(f,d.indexOf("(",f))}else{t+=d;for(var g in c.prototype)t+=";"+m+".prototype."+g+"="+c.prototype[g].toString()}else t+=d}else r[m]=c}return t},"wcln"),im=[],UO=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),jO=o(function(e,t,r,n){if(!im[r]){for(var i="",a={},u=e.length-1,c=0;c<u;++c)i=Hv(e[c],i,a);im[r]={c:Hv(e[u],i,a),e:a}}var m=pm({},im[r].e);return RO(im[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,m,UO(m),n)},"wrkr"),zO=o(function(){return[ct,Mr,Ps,mu,du,As,Uf,Yv,ex,rx,Fs,nx,gn,om,hn,am,Bs,fo,St,ix,gm,fm,cx]},"bInflt"),$O=o(function(){return[ct,Mr,Ps,mu,du,As,sm,_f,Qv,_i,tx,cu,Fs,ox,zf,gn,ai,uu,um,cm,Lf,su,jf,Rf,Bs,fo,ax,sx,hm,fm]},"bDflt");var fm=o(function(e){return postMessage(e,[e.buffer])},"pbf"),cx=o(function(e){return e&&{out:e.size&&new ct(e.size),dictionary:e.dictionary}},"gopt"),lx=o(function(e,t,r,n,i,a){var u=jO(r,n,i,function(c,m){u.terminate(),a(c,m)});return u.postMessage([e,t],t.consume?[e.buffer]:[]),function(){u.terminate()}},"cbify");var On=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),lr=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),kf=o(function(e,t){return lr(e,t)+lr(e,t+4)*4294967296},"b8"),cr=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function GO(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),lx(e,t,[$O],function(n){return fm(hm(n.data[0],n.data[1]))},0,r)}o(GO,"deflate");function hm(e,t){return sx(e,t||{},0,0)}o(hm,"deflateSync");function ZO(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),lx(e,t,[zO],function(n){return fm(gm(n.data[0],cx(n.data[1])))},1,r)}o(ZO,"inflate");function gm(e,t){return ix(e,{i:2},t&&t.out,t&&t.dictionary)}o(gm,"inflateSync");var $f=o(function(e,t,r,n){for(var i in e){var a=e[i],u=t+i,c=n;Array.isArray(a)&&(c=pm(n,a[1]),a=a[0]),a instanceof ct?r[u]=[a,c]:(r[u+="/"]=[new ct(0),c],$f(a,u,r,n))}},"fltn"),Kv=typeof TextEncoder<"u"&&new TextEncoder,Nf=typeof TextDecoder<"u"&&new TextDecoder,VO=0;try{Nf.decode(zf,{stream:!0}),VO=1}catch(e){}var WO=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:fo(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function lu(e,t){if(t){for(var r=new ct(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(Kv)return Kv.encode(e);for(var i=e.length,a=new ct(e.length+(e.length>>1)),u=0,c=o(function(f){a[u++]=f},"w"),n=0;n<i;++n){if(u+5>a.length){var m=new ct(u+8+(i-n<<1));m.set(a),a=m}var d=e.charCodeAt(n);d<128||t?c(d):d<2048?(c(192|d>>6),c(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,c(240|d>>18),c(128|d>>12&63),c(128|d>>6&63),c(128|d&63)):(c(224|d>>12),c(128|d>>6&63),c(128|d&63))}return fo(a,0,u)}o(lu,"strToU8");function Gf(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(Nf)return Nf.decode(e);var i=WO(e),a=i.s,r=i.r;return r.length&&St(8),a}}o(Gf,"strFromU8");var mx=o(function(e,t){return t+30+On(e,t+26)+On(e,t+28)},"slzh"),dx=o(function(e,t,r){var n=On(e,t+28),i=Gf(e.subarray(t+46,t+46+n),!(On(e,t+8)&2048)),a=t+46+n,u=lr(e,t+20),c=r&&u==4294967295?HO(e,a):[u,lr(e,t+24),lr(e,t+42)],m=c[0],d=c[1],f=c[2];return[On(e,t+10),m,d,i,a+On(e,t+30)+On(e,t+32),f]},"zh"),HO=o(function(e,t){for(;On(e,t)!=1;t+=4+On(e,t+2));return[kf(e,t+12),kf(e,t+4),kf(e,t+20)]},"z64e"),Os=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&St(9),t+=n+4}return t},"exfl"),lm=o(function(e,t,r,n,i,a,u,c){var m=n.length,d=r.extra,f=c&&c.length,g=Os(d);cr(e,t,u!=null?33639248:67324752),t+=4,u!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var v=new Date(r.mtime==null?Date.now():r.mtime),b=v.getFullYear()-1980;if((b<0||b>119)&&St(10),cr(e,t,b<<25|v.getMonth()+1<<21|v.getDate()<<16|v.getHours()<<11|v.getMinutes()<<5|v.getSeconds()>>1),t+=4,a!=-1&&(cr(e,t,r.crc),cr(e,t+4,a<0?-a-2:a),cr(e,t+8,r.size)),cr(e,t+12,m),cr(e,t+14,g),t+=16,u!=null&&(cr(e,t,f),cr(e,t+6,r.attrs),cr(e,t+10,u),t+=14),e.set(n,t),t+=m,g)for(var D in d){var A=d[D],x=A.length;cr(e,t,+D),cr(e,t+2,x),e.set(A,t+4),t+=4+x}return f&&(e.set(c,t),t+=f),t},"wzh"),px=o(function(e,t,r,n,i){cr(e,t,101010256),cr(e,t+8,r),cr(e,t+10,r),cr(e,t+12,n),cr(e,t+16,i)},"wzf");function fx(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n={};$f(e,"",n,t);var i=Object.keys(n),a=i.length,u=0,c=0,m=a,d=new Array(a),f=[],g=o(function(){for(var x=0;x<f.length;++x)f[x]()},"tAll"),v=o(function(x,E){mm(function(){r(x,E)})},"cbd");mm(function(){v=r});var b=o(function(){var x=new ct(c+22),E=u,S=c-u;c=0;for(var I=0;I<m;++I){var C=d[I];try{var k=C.c.length;lm(x,c,C,C.f,C.u,k);var V=30+C.f.length+Os(C.extra),z=c+V;x.set(C.c,z),lm(x,u,C,C.f,C.u,k,c,C.m),u+=16+V+(C.m?C.m.length:0),c=z+k}catch(M){return v(M,null)}}px(x,u,d.length,S,E),v(null,x)},"cbf");a||b();for(var D=o(function(x){var E=i[x],S=n[E],I=S[0],C=S[1],k=ux(),V=I.length;k.p(I);var z=lu(E),M=z.length,T=C.comment,Z=T&&lu(T),j=Z&&Z.length,W=Os(C.extra),$=C.level==0?0:8,q=o(function(J,G){if(J)g(),v(J,null);else{var ae=G.length;d[x]=pm(C,{size:V,crc:k.d(),c:G,f:z,m:Z,u:M!=E.length||Z&&T.length!=j,compression:$}),u+=30+M+W+ae,c+=76+2*(M+W)+(j||0)+ae,--a||b()}},"cbl");if(M>65535&&q(St(11,0,1),null),!$)q(null,I);else if(V<16e4)try{q(null,hm(I,C))}catch(J){q(J,null)}else f.push(GO(I,C,q))},"_loop_1"),A=0;A<m;++A)D(A);return g}o(fx,"zip");function hx(e,t){t||(t={});var r={},n=[];$f(e,"",r,t);var i=0,a=0;for(var u in r){var c=r[u],m=c[0],d=c[1],f=d.level==0?0:8,g=lu(u),v=g.length,b=d.comment,D=b&&lu(b),A=D&&D.length,x=Os(d.extra);v>65535&&St(11);var E=f?hm(m,d):m,S=E.length,I=ux();I.p(m),n.push(pm(d,{size:m.length,crc:I.d(),c:E,f:g,m:D,u:v!=u.length||D&&b.length!=A,o:i,compression:f})),i+=30+v+x+S,a+=76+2*(v+x)+(A||0)+S}for(var C=new ct(a+22),k=i,V=a-i,z=0;z<n.length;++z){var g=n[z];lm(C,g.o,g,g.f,g.u,g.c.length);var M=30+g.f.length+Os(g.extra);C.set(g.c,g.o+M),lm(C,i,g,g.f,g.u,g.c.length,g.o,g.m),i+=16+M+(g.m?g.m.length:0)}return px(C,i,n.length,V,k),C}o(hx,"zipSync");var mm=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function gx(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n=[],i=o(function(){for(var x=0;x<n.length;++x)n[x]()},"tAll"),a={},u=o(function(x,E){mm(function(){r(x,E)})},"cbd");mm(function(){u=r});for(var c=e.length-22;lr(e,c)!=101010256;--c)if(!c||e.length-c>65558)return u(St(13,0,1),null),i;var m=On(e,c+8);if(m){var d=m,f=lr(e,c+16),g=f==4294967295||d==65535;if(g){var v=lr(e,c-12);g=lr(e,v)==101075792,g&&(d=m=lr(e,v+32),f=lr(e,v+48))}for(var b=t&&t.filter,D=o(function(x){var E=dx(e,f,g),S=E[0],I=E[1],C=E[2],k=E[3],V=E[4],z=E[5],M=mx(e,z);f=V;var T=o(function(j,W){j?(i(),u(j,null)):(W&&(a[k]=W),--m||u(null,a))},"cbl");if(!b||b({name:k,size:I,originalSize:C,compression:S}))if(!S)T(null,fo(e,M,M+I));else if(S==8){var Z=e.subarray(M,M+I);if(C<524288||I>.8*C)try{T(null,gm(Z,{out:new ct(C)}))}catch(j){T(j,null)}else n.push(ZO(Z,{size:C},T))}else T(St(14,"unknown compression type "+S,1),null);else T(null,null)},"_loop_3"),A=0;A<d;++A)D(A)}else u(null,{});return i}o(gx,"unzip");function yx(e,t){for(var r={},n=e.length-22;lr(e,n)!=101010256;--n)(!n||e.length-n>65558)&&St(13);var i=On(e,n+8);if(!i)return{};var a=lr(e,n+16),u=a==4294967295||i==65535;if(u){var c=lr(e,n-12);u=lr(e,c)==101075792,u&&(i=lr(e,c+32),a=lr(e,c+48))}for(var m=t&&t.filter,d=0;d<i;++d){var f=dx(e,a,u),g=f[0],v=f[1],b=f[2],D=f[3],A=f[4],x=f[5],E=mx(e,x);a=A,(!m||m({name:D,size:v,originalSize:b,compression:g}))&&(g?g==8?r[D]=gm(e.subarray(E,E+v),{out:new ct(b)}):St(14,"unknown compression type "+g):r[D]=fo(e,E,E+v))}return r}o(yx,"unzipSync");l();var KO=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),qO=o(e=>e!=null,"notNull"),ym=o((e,t,r=0)=>{var n;if(w.IsNull(e))return"null";if(w.IsUndefined(e))return"undefined";if(w.IsString(e))return"<string>";if(w.IsNumber(e))return"<number>";if(w.IsBoolean(e))return"<boolean>";if(w.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(w.IsRef(e)){let i=t.find(a=>a.$id===e.$ref);return i==null?e.$ref:ym(i,t,r)}if(w.IsArray(e))return"".concat(ym(e.items,t,r+1),"[]");if(w.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let a="".concat(e.anyOf.map(u=>ym(u,t,r+1)).filter(qO).join(" | "));return r>0?"(".concat(a,")"):a}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),JO=o((e,t,r)=>{var a;let n=t.message;w.IsUnion(t.schema)&&(n="Expected one of: ".concat(ym(t.schema,r)));let i="#/definitions/".concat(e).concat((a=KO(t.path))!=null?a:"");return"".concat(i,": ").concat(n)},"errorHandler"),bm=o((e,t,r)=>{let n=t.First();if(n!=null)return JO(e,n,r)},"shortError");var pu;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(pu||(pu={}));var Zf=class Zf extends Error{constructor(r,n){super(n);h(this,"name");h(this,"kind");this.name="CompressError",this.kind=r}};o(Zf,"CompressError");var fu=Zf,XO=o(e=>new fu(pu.Archive,e.message),"flateErrorIntoCompressError"),YO=o(e=>{let t=Object.values(dm);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),QO=o((e,t,r)=>{var n;return new fu(pu.Validate,(n=bm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),eP=o(e=>new fu(pu.Encode,e.message),"encodeErrorIntoCompressError"),tP=o(e=>new fu(pu.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),Ms=o((e,t,r)=>t instanceof qo?eP(t):t instanceof mn?QO(e,t,r):YO(t)?XO(t):tP(t),"intoCompressError");l();var hu;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(hu||(hu={}));var Vf=class Vf extends Error{constructor(r,n){super(n);h(this,"name");h(this,"kind");this.name="DecompressError",this.kind=r}};o(Vf,"DecompressError");var gu=Vf,rP=o(e=>new gu(hu.Unarchive,e.message),"flateErrorIntoDecompressError"),nP=o(e=>{let t=Object.values(dm);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),iP=o((e,t,r)=>{var n;return new gu(hu.Validate,(n=bm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),oP=o(e=>new gu(hu.Decode,e.message),"decodeErrorIntoDecompressError"),aP=o(e=>new gu(hu.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),Ts=o((e,t,r)=>t instanceof Ko?oP(t):t instanceof mn?iP(e,t,r):nP(t)?rP(t):aP(t),"intoDecompressError");var bx=o(function*(e,t=""){if(e!=null){if(Array.isArray(e)){for(let r=0;r<e.length;r++)yield[t+"[".concat(r,"]"),e[r]];return}if("features"in e){for(let r=0;r<e.features.length;r++)yield[t===""?"features[".concat(r,"]"):"".concat(t,".features[").concat(r,"]"),e.features[r]];return}for(let[r,n]of Object.entries(e)){let i=t===""?r:"".concat(t,".").concat(r);yield*X(bx(n,i))}}},"iterRecord"),uP=o((e,t)=>e===""?t:t.startsWith("[")?"".concat(e).concat(t):"".concat(e,".").concat(t),"getPath"),Mt=o((e,t,r)=>{let n=new Set;for(let[i,a]of bx(e)){let u=t(a);if(n.has(u))return se({kind:zr.DuplicateIdError,properties:{id:u,path:uP(r,i)}});n.add(u)}return ue(!0)},"ensureUniqueIds");var vx=o(e=>e.floors==null?se({kind:zr.FloorMissingError,properties:null}):Mt(e.floors.features,t=>t.properties.id,"floors"),"validateFloors");var xx=p.Intersect([p.Object({id:p.Ref(Re),elevation:p.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:p.Optional(p.String({description:"The subtitle of the floor."})),maxHeight:p.Optional(p.Number({description:"The maximum height of the floor in meters. This includes the thickness of the floor itself, up to the tallest point on any wall. If the floor does not have a consistent height (eg, one room on the floor has a vaulted ceiling, the rest do not), this value represents the highest point anywhere on the floor. Must be a positive number, or undefined.",minimum:0}))}),Hr],{$id:"FloorProperties"}),Ex=ar(p.Union([p.Ref(Qa),p.Ref(eu),p.Null()]),p.Ref(xx),{$id:"FloorFeature"}),Cx=Br(p.Ref(Ex),{$id:"FloorCollection"}),sP=p.Object({floors:p.Ref(Cx)}),Ix={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),integrityCheck:vx,schema:sP,references:[xx,Ex,Cx]};l();l();var Tt=o(e=>p.Unsafe(e),"PartialRecord");l();var et=o(e=>Object.keys(e),"typedKeys");l();l();var cP=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),Pn=o(e=>{let t=cP(e);return o(n=>{let i=t.get(n);return i==null?se({kind:zr.UnknownFloorError,properties:{floorId:n}}):ue(i)},"floorLookup")},"createFloorLookup");var Dx=o(e=>{if(e.floors==null)return se({kind:zr.FloorMissingError,properties:null});if(e.geometry==null)return se({kind:zr.GeometryMissingError,properties:null});let t=Mt(e.geometry,n=>n.properties.id,"geometry");if(t.isErr())return t;let r=Pn(e);for(let n of et(e.geometry)){let i=r(n);if(i.isErr())return i}return ue(!0)},"validateGeometry");var Sx=p.Intersect([p.Object({id:p.Ref(br)}),Hr],{$id:"GeometryProperties"}),wx=ar(p.Union([p.Ref(yr),p.Ref(_l),p.Ref(Ll),p.Ref(Rl),p.Ref(Qa),p.Ref(eu)]),p.Ref(Sx),{$id:"GeometryFeature"}),Ax=Br(p.Ref(wx),{$id:"GeometryCollection"}),lP=p.Object({geometry:Tt(p.Record(Re,p.Ref(Ax),{additionalProperties:!1}))},{$id:"GeometrySchema"}),mP=/^geometry\/(.*)\.geojson$/,Fx={name:"core:geometry",schema:lP,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of et(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(mP))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[Sx,wx,Ax],integrityCheck:Dx};l();var Wf=p.Object({type:p.Literal("file"),name:p.String({description:"The name of the file."})},{$id:"ManifestFile"}),Ox=p.Recursive(e=>p.Object({type:p.Literal("folder"),name:p.String({description:"The name of the folder."}),children:p.Array(p.Union([e,p.Ref(Wf)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),Px=p.Object({name:p.String({description:"The name of the map."}),version:p.Literal("3.0.0",{description:"The version of the manifest."}),orgId:p.Optional(p.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:p.Optional(p.String({description:"The identifier of the map that this MVF is for."})),contents:p.Array(p.Union([p.Ref(Ox),p.Ref(Wf)]),{minItems:1,description:"The contents of the MVF bundle."}),time:p.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:p.Optional(p.Unsafe(p.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:p.Optional(p.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:p.Optional(p.Ref(Re,{description:"The default floor ID of the map."})),language:p.Optional(p.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),Bx=Br(ar(yr,p.Ref(Px)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),dP=p.Object({manifest:p.Ref(Bx)}),Mx={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:dP,references:[Wf,Ox,Px,Bx]};l();l();l();l();var Kf=class Kf extends he{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));h(this,"schema");this.schema=r}};o(Kf,"TypeDereferenceError");var Hf=Kf;function pP(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new Hf(e);return Xo(r,t)}o(pP,"Resolve");function vm(e,t){return!Ne.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(vm,"Pushref");function Xo(e,t){return e[_]==="This"||e[_]==="Ref"?pP(e,t):e}o(Xo,"Deref");l();function fP(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=oi(t,r);return e.set(t,i),i}o(fP,"HasTransformCached");function xm(){let e=new WeakMap;return{HasTransform:o((t,r)=>fP(e,t,r),"HasTransform")}}o(xm,"CreateTransformCache");function wt(e,t,r){try{return w.IsTransform(e)?e[yt].Decode(r):r}catch(n){throw new Ko(e,t,r,n)}}o(wt,"Default");function hP(e,t,r,n,i){return Ne.IsArray(n)?wt(e,r,n.map((a,u)=>ui(e.items,t,"".concat(r,"/").concat(u),a,i))):wt(e,r,n)}o(hP,"FromArray");function gP(e,t,r,n,i){if(!Ne.IsObject(n)||or(n))return wt(e,r,n);let a=co(e),u=a.map(g=>g[0]),c=R({},n);for(let[g,v]of a)g in c&&(c[g]=ui(v,t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsTransform(e.unevaluatedProperties))return wt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,f=R({},c);for(let g of m)u.includes(g)||(f[g]=wt(d,"".concat(r,"/").concat(g),f[g]));return wt(e,r,f)}o(gP,"FromIntersect");function yP(e,t,r,n,i){return wt(e,r,ui(e.not,t,r,n,i))}o(yP,"FromNot");function bP(e,t,r,n,i){if(!Ne.IsObject(n))return wt(e,r,n);let a=Xt(e),u=R({},n);for(let f of a)Ne.HasPropertyKey(u,f)&&(Ne.IsUndefined(u[f])&&(!w.IsUndefined(e.properties[f])||Qe.IsExactOptionalProperty(u,f))||(u[f]=ui(e.properties[f],t,"".concat(r,"/").concat(f),u[f],i)));if(!w.IsSchema(e.additionalProperties))return wt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let f of c)a.includes(f)||(d[f]=wt(m,"".concat(r,"/").concat(f),d[f]));return wt(e,r,d)}o(bP,"FromObject");function vP(e,t,r,n,i){if(!Ne.IsObject(n))return wt(e,r,n);let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},n);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=ui(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsSchema(e.additionalProperties))return wt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=R({},c);for(let g of m)u.test(g)||(f[g]=wt(d,"".concat(r,"/").concat(g),f[g]));return wt(e,r,f)}o(vP,"FromRecord");function xP(e,t,r,n,i){let a=Xo(e,t);return wt(e,r,ui(a,t,r,n,i))}o(xP,"FromRef");function EP(e,t,r,n,i){let a=Xo(e,t);return wt(e,r,ui(a,t,r,n,i))}o(EP,"FromThis");function CP(e,t,r,n,i){return Ne.IsArray(n)&&Ne.IsArray(e.items)?wt(e,r,e.items.map((a,u)=>ui(a,t,"".concat(r,"/").concat(u),n[u],i))):wt(e,r,n)}o(CP,"FromTuple");function IP(e,t,r,n,i){for(let a of e.anyOf){if(!fn.Check(a,t,n))continue;let u=ui(a,t,r,n,i);return wt(e,r,u)}return wt(e,r,n)}o(IP,"FromUnion");function ui(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=vm(e,t),u=e;switch(e[_]){case"Array":return hP(u,a,r,n,i);case"Intersect":return gP(u,a,r,n,i);case"Not":return yP(u,a,r,n,i);case"Object":return bP(u,a,r,n,i);case"Record":return vP(u,a,r,n,i);case"Ref":return xP(u,a,r,n,i);case"Symbol":return wt(u,r,n);case"This":return EP(u,a,r,n,i);case"Tuple":return CP(u,a,r,n,i);case"Union":return IP(u,a,r,n,i);default:return wt(u,r,n)}}o(ui,"Visit");function Tx(e,t,r){let n=xm();return ui(e,t,"",r,n)}o(Tx,"FastTransformDecode");l();function Er(e,t,r){try{return w.IsTransform(e)?e[yt].Encode(r):r}catch(n){throw new qo(e,t,r,n)}}o(Er,"Default");function DP(e,t,r,n,i){let a=Er(e,r,n);return Ne.IsArray(a)?a.map((u,c)=>si(e.items,t,"".concat(r,"/").concat(c),u,i)):a}o(DP,"FromArray");function SP(e,t,r,n,i){let a=Er(e,r,n);if(!Ne.IsObject(n)||or(n))return a;let u=co(e),c=u.map(v=>v[0]),m=R({},a);for(let[v,b]of u)v in m&&(m[v]=si(b,t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsTransform(e.unevaluatedProperties))return m;let d=Object.getOwnPropertyNames(m),f=e.unevaluatedProperties,g=R({},m);for(let v of d)c.includes(v)||(g[v]=Er(f,"".concat(r,"/").concat(v),g[v]));return g}o(SP,"FromIntersect");function wP(e,t,r,n){return Er(e.not,r,Er(e,r,n))}o(wP,"FromNot");function AP(e,t,r,n,i){let a=Er(e,r,n);if(!Ne.IsObject(a))return a;let u=Xt(e),c=R({},a);for(let g of u)Ne.HasPropertyKey(c,g)&&(Ne.IsUndefined(c[g])&&(!w.IsUndefined(e.properties[g])||Qe.IsExactOptionalProperty(c,g))||(c[g]=si(e.properties[g],t,"".concat(r,"/").concat(g),c[g],i)));if(!w.IsSchema(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=R({},c);for(let g of m)u.includes(g)||(f[g]=Er(d,"".concat(r,"/").concat(g),f[g]));return f}o(AP,"FromObject");function FP(e,t,r,n,i){let a=Er(e,r,n);if(!Ne.IsObject(n))return a;let u=Object.getOwnPropertyNames(e.patternProperties)[0],c=new RegExp(u),m=R({},a);for(let v of Object.getOwnPropertyNames(n))c.test(v)&&(m[v]=si(e.patternProperties[u],t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsSchema(e.additionalProperties))return m;let d=Object.getOwnPropertyNames(m),f=e.additionalProperties,g=R({},m);for(let v of d)c.test(v)||(g[v]=Er(f,"".concat(r,"/").concat(v),g[v]));return g}o(FP,"FromRecord");function OP(e,t,r,n,i){let a=Xo(e,t),u=si(a,t,r,n,i);return Er(e,r,u)}o(OP,"FromRef");function PP(e,t,r,n,i){let a=Xo(e,t),u=si(a,t,r,n,i);return Er(e,r,u)}o(PP,"FromThis");function BP(e,t,r,n,i){let a=Er(e,r,n);return Ne.IsArray(e.items)?e.items.map((u,c)=>si(u,t,"".concat(r,"/").concat(c),a[c],i)):[]}o(BP,"FromTuple");function MP(e,t,r,n,i){for(let a of e.anyOf){if(!fn.Check(a,t,n))continue;let u=si(a,t,r,n,i);return Er(e,r,u)}for(let a of e.anyOf){let u=si(a,t,r,n,i);if(fn.Check(e,t,u))return Er(e,r,u)}return Er(e,r,n)}o(MP,"FromUnion");function si(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=vm(e,t),u=e;switch(e[_]){case"Array":return DP(u,a,r,n,i);case"Intersect":return SP(u,a,r,n,i);case"Not":return wP(u,a,r,n);case"Object":return AP(u,a,r,n,i);case"Record":return FP(u,a,r,n,i);case"Ref":return OP(u,a,r,n,i);case"This":return PP(u,a,r,n,i);case"Tuple":return BP(u,a,r,n,i);case"Union":return MP(u,a,r,n,i);default:return Er(u,r,n)}}o(si,"Visit");function kx(e,t,r){let n=xm();return si(e,t,"",r,n)}o(kx,"FastTransformEncode");l();var Qf=class Qf{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=oi(t,r)}Code(){return this.code}Errors(t){return ei(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new iu(this.schema,t,this.Errors(t).First());return this.hasTransform?ou(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?Jl(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new au(this.schema,t,this.Errors(t).First());return r}};o(Qf,"TypeCheck");var qf=Qf,Li;(function(e){function t(a){return a===36}o(t,"DollarSign"),e.DollarSign=t;function r(a){return a===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(a){return a>=65&&a<=90||a>=97&&a<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(a){return a>=48&&a<=57}o(i,"IsNumeric"),e.IsNumeric=i})(Li||(Li={}));var Em;(function(e){function t(a){return a.length===0?!1:Li.IsNumeric(a.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(a){if(t(a))return!1;for(let u=0;u<a.length;u++){let c=a.charCodeAt(u);if(!(Li.IsAlpha(c)||Li.IsNumeric(c)||Li.DollarSign(c)||Li.IsUnderscore(c)))return!1}return!0}o(r,"IsAccessor");function n(a){return a.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(a,u){return r(u)?"".concat(a,".").concat(u):"".concat(a,"['").concat(n(u),"']")}o(i,"Encode"),e.Encode=i})(Em||(Em={}));var Jf;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);Li.IsNumeric(a)||Li.IsAlpha(a)?n.push(r.charAt(i)):n.push("_".concat(a,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(Jf||(Jf={}));var Xf;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(Xf||(Xf={}));var eh=class eh extends he{constructor(t){super("Unknown type"),this.schema=t}};o(eh,"TypeCompilerUnknownTypeError");var Yf=eh,th=class th extends he{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(th,"TypeCompilerTypeGuardError");var Cm=th,Yo;(function(e){function t(u,c,m){return Qe.ExactOptionalPropertyTypes?"('".concat(c,"' in ").concat(u," ? ").concat(m," : true)"):"(".concat(Em.Encode(u,c)," !== undefined ? ").concat(m," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){return Qe.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null)"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return Qe.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,") && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return Qe.AllowNaN?"typeof ".concat(u," === 'number'"):"Number.isFinite(".concat(u,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){return Qe.AllowNullVoid?"(".concat(u," === undefined || ").concat(u," === null)"):"".concat(u," === undefined")}o(a,"IsVoidLike"),e.IsVoidLike=a})(Yo||(Yo={}));var Im;(function(e){function t(F){return F[_]==="Any"||F[_]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(F,Y,P){yield"true"}o(r,"FromAny");function*n(F,Y,P){yield"Array.isArray(".concat(P,")");let[ce,Q]=[Oe("value","any"),Oe("acc","number")];de(F.maxItems)&&(yield"".concat(P,".length <= ").concat(F.maxItems)),de(F.minItems)&&(yield"".concat(P,".length >= ").concat(F.minItems));let re=le(F.items,Y,"value");if(yield"".concat(P,".every((").concat(ce,") => ").concat(re,")"),je(F.contains)||de(F.minContains)||de(F.maxContains)){let pe=je(F.contains)?F.contains:rt(),Je=le(pe,Y,"value"),Ft=de(F.minContains)?["(count >= ".concat(F.minContains,")")]:[],_t=de(F.maxContains)?["(count <= ".concat(F.maxContains,")")]:[],tr="const count = value.reduce((".concat(Q,", ").concat(ce,") => ").concat(Je," ? acc + 1 : acc, 0)"),jn=["(count > 0)",...Ft,..._t].join(" && ");yield"((".concat(ce,") => { ").concat(tr,"; return ").concat(jn,"})(").concat(P,")")}if(F.uniqueItems===!0){let Je="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(ce,") => { ").concat(Je," )(").concat(P,")")}}o(n,"FromArray");function*i(F,Y,P){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(P,")")}o(i,"FromAsyncIterator");function*a(F,Y,P){yield"(typeof ".concat(P," === 'bigint')"),ir(F.exclusiveMaximum)&&(yield"".concat(P," < BigInt(").concat(F.exclusiveMaximum,")")),ir(F.exclusiveMinimum)&&(yield"".concat(P," > BigInt(").concat(F.exclusiveMinimum,")")),ir(F.maximum)&&(yield"".concat(P," <= BigInt(").concat(F.maximum,")")),ir(F.minimum)&&(yield"".concat(P," >= BigInt(").concat(F.minimum,")")),ir(F.multipleOf)&&(yield"(".concat(P," % BigInt(").concat(F.multipleOf,")) === 0"))}o(a,"FromBigInt");function*u(F,Y,P){yield"(typeof ".concat(P," === 'boolean')")}o(u,"FromBoolean");function*c(F,Y,P){yield*X(te(F.returns,Y,"".concat(P,".prototype")))}o(c,"FromConstructor");function*m(F,Y,P){yield"(".concat(P," instanceof Date) && Number.isFinite(").concat(P,".getTime())"),de(F.exclusiveMaximumTimestamp)&&(yield"".concat(P,".getTime() < ").concat(F.exclusiveMaximumTimestamp)),de(F.exclusiveMinimumTimestamp)&&(yield"".concat(P,".getTime() > ").concat(F.exclusiveMinimumTimestamp)),de(F.maximumTimestamp)&&(yield"".concat(P,".getTime() <= ").concat(F.maximumTimestamp)),de(F.minimumTimestamp)&&(yield"".concat(P,".getTime() >= ").concat(F.minimumTimestamp)),de(F.multipleOfTimestamp)&&(yield"(".concat(P,".getTime() % ").concat(F.multipleOfTimestamp,") === 0"))}o(m,"FromDate");function*d(F,Y,P){yield"(typeof ".concat(P," === 'function')")}o(d,"FromFunction");function*f(F,Y,P){yield"Number.isInteger(".concat(P,")"),de(F.exclusiveMaximum)&&(yield"".concat(P," < ").concat(F.exclusiveMaximum)),de(F.exclusiveMinimum)&&(yield"".concat(P," > ").concat(F.exclusiveMinimum)),de(F.maximum)&&(yield"".concat(P," <= ").concat(F.maximum)),de(F.minimum)&&(yield"".concat(P," >= ").concat(F.minimum)),de(F.multipleOf)&&(yield"(".concat(P," % ").concat(F.multipleOf,") === 0"))}o(f,"FromInteger");function*g(F,Y,P){let ce=F.allOf.map(Q=>le(Q,Y,P)).join(" && ");if(F.unevaluatedProperties===!1){let Q=xe("".concat(new RegExp(Oi(F)),";")),re="Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(Q,".test(key))");yield"(".concat(ce," && ").concat(re,")")}else if(je(F.unevaluatedProperties)){let Q=xe("".concat(new RegExp(Oi(F)),";")),re="Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(Q,".test(key) || ").concat(le(F.unevaluatedProperties,Y,"".concat(P,"[key]")),")");yield"(".concat(ce," && ").concat(re,")")}else yield"(".concat(ce,")")}o(g,"FromIntersect");function*v(F,Y,P){yield"(typeof value === 'object' && Symbol.iterator in ".concat(P,")")}o(v,"FromIterator");function*b(F,Y,P){typeof F.const=="number"||typeof F.const=="boolean"?yield"(".concat(P," === ").concat(F.const,")"):yield"(".concat(P," === '").concat(Xf.Escape(F.const),"')")}o(b,"FromLiteral");function*D(F,Y,P){yield"false"}o(D,"FromNever");function*A(F,Y,P){let ce=le(F.not,Y,P);yield"(!".concat(ce,")")}o(A,"FromNot");function*x(F,Y,P){yield"(".concat(P," === null)")}o(x,"FromNull");function*E(F,Y,P){yield Yo.IsNumberLike(P),de(F.exclusiveMaximum)&&(yield"".concat(P," < ").concat(F.exclusiveMaximum)),de(F.exclusiveMinimum)&&(yield"".concat(P," > ").concat(F.exclusiveMinimum)),de(F.maximum)&&(yield"".concat(P," <= ").concat(F.maximum)),de(F.minimum)&&(yield"".concat(P," >= ").concat(F.minimum)),de(F.multipleOf)&&(yield"(".concat(P," % ").concat(F.multipleOf,") === 0"))}o(E,"FromNumber");function*S(F,Y,P){yield Yo.IsObjectLike(P),de(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length >= ").concat(F.minProperties)),de(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length <= ").concat(F.maxProperties));let ce=Object.getOwnPropertyNames(F.properties);for(let Q of ce){let re=Em.Encode(P,Q),pe=F.properties[Q];if(F.required&&F.required.includes(Q))yield*X(te(pe,Y,re)),(Bi(pe)||t(pe))&&(yield"('".concat(Q,"' in ").concat(P,")"));else{let Je=le(pe,Y,re);yield Yo.IsExactOptionalProperty(P,Q,Je)}}if(F.additionalProperties===!1)if(F.required&&F.required.length===ce.length)yield"Object.getOwnPropertyNames(".concat(P,").length === ").concat(ce.length);else{let Q="[".concat(ce.map(re=>"'".concat(re,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(Q,".includes(key))")}if(typeof F.additionalProperties=="object"){let Q=le(F.additionalProperties,Y,"".concat(P,"[key]")),re="[".concat(ce.map(pe=>"'".concat(pe,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(re,".includes(key) || ").concat(Q,"))")}}o(S,"FromObject");function*I(F,Y,P){yield"(typeof value === 'object' && typeof ".concat(P,".then === 'function')")}o(I,"FromPromise");function*C(F,Y,P){yield Yo.IsRecordLike(P),de(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length >= ").concat(F.minProperties)),de(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length <= ").concat(F.maxProperties));let[ce,Q]=Object.entries(F.patternProperties)[0],re=xe("".concat(new RegExp(ce))),pe=le(Q,Y,"value"),Je=je(F.additionalProperties)?le(F.additionalProperties,Y,P):F.additionalProperties===!1?"false":"true",Ft="(".concat(re,".test(key) ? ").concat(pe," : ").concat(Je,")");yield"(Object.entries(".concat(P,").every(([key, value]) => ").concat(Ft,"))")}o(C,"FromRecord");function*k(F,Y,P){let ce=Ze(F,Y);if(ee.functions.has(F.$ref))return yield"".concat(fe(F.$ref),"(").concat(P,")");yield*X(te(ce,Y,P))}o(k,"FromRef");function*V(F,Y,P){let ce=xe("".concat(new RegExp(F.source,F.flags),";"));yield"(typeof ".concat(P," === 'string')"),de(F.maxLength)&&(yield"".concat(P,".length <= ").concat(F.maxLength)),de(F.minLength)&&(yield"".concat(P,".length >= ").concat(F.minLength)),yield"".concat(ce,".test(").concat(P,")")}o(V,"FromRegExp");function*z(F,Y,P){if(yield"(typeof ".concat(P," === 'string')"),de(F.maxLength)&&(yield"".concat(P,".length <= ").concat(F.maxLength)),de(F.minLength)&&(yield"".concat(P,".length >= ").concat(F.minLength)),F.pattern!==void 0){let ce=xe("".concat(new RegExp(F.pattern),";"));yield"".concat(ce,".test(").concat(P,")")}F.format!==void 0&&(yield"format('".concat(F.format,"', ").concat(P,")"))}o(z,"FromString");function*M(F,Y,P){yield"(typeof ".concat(P," === 'symbol')")}o(M,"FromSymbol");function*T(F,Y,P){yield"(typeof ".concat(P," === 'string')");let ce=xe("".concat(new RegExp(F.pattern),";"));yield"".concat(ce,".test(").concat(P,")")}o(T,"FromTemplateLiteral");function*Z(F,Y,P){yield"".concat(fe(F.$ref),"(").concat(P,")")}o(Z,"FromThis");function*j(F,Y,P){if(yield"Array.isArray(".concat(P,")"),F.items===void 0)return yield"".concat(P,".length === 0");yield"(".concat(P,".length === ").concat(F.maxItems,")");for(let ce=0;ce<F.items.length;ce++){let Q=le(F.items[ce],Y,"".concat(P,"[").concat(ce,"]"));yield"".concat(Q)}}o(j,"FromTuple");function*W(F,Y,P){yield"".concat(P," === undefined")}o(W,"FromUndefined");function*$(F,Y,P){let ce=F.anyOf.map(Q=>le(Q,Y,P));yield"(".concat(ce.join(" || "),")")}o($,"FromUnion");function*q(F,Y,P){yield"".concat(P," instanceof Uint8Array"),de(F.maxByteLength)&&(yield"(".concat(P,".length <= ").concat(F.maxByteLength,")")),de(F.minByteLength)&&(yield"(".concat(P,".length >= ").concat(F.minByteLength,")"))}o(q,"FromUint8Array");function*J(F,Y,P){yield"true"}o(J,"FromUnknown");function*G(F,Y,P){yield Yo.IsVoidLike(P)}o(G,"FromVoid");function*ae(F,Y,P){let ce=ee.instances.size;ee.instances.set(ce,F),yield"kind('".concat(F[_],"', ").concat(ce,", ").concat(P,")")}o(ae,"FromKind");function*te(F,Y,P,ce=!0){let Q=Ue(F.$id)?[...Y,F]:Y,re=F;if(ce&&Ue(F.$id)){let pe=fe(F.$id);if(ee.functions.has(pe))return yield"".concat(pe,"(").concat(P,")");{let Je=be(pe,F,Y,"value",!1);return ee.functions.set(pe,Je),yield"".concat(pe,"(").concat(P,")")}}switch(re[_]){case"Any":return yield*X(r(re,Q,P));case"Array":return yield*X(n(re,Q,P));case"AsyncIterator":return yield*X(i(re,Q,P));case"BigInt":return yield*X(a(re,Q,P));case"Boolean":return yield*X(u(re,Q,P));case"Constructor":return yield*X(c(re,Q,P));case"Date":return yield*X(m(re,Q,P));case"Function":return yield*X(d(re,Q,P));case"Integer":return yield*X(f(re,Q,P));case"Intersect":return yield*X(g(re,Q,P));case"Iterator":return yield*X(v(re,Q,P));case"Literal":return yield*X(b(re,Q,P));case"Never":return yield*X(D(re,Q,P));case"Not":return yield*X(A(re,Q,P));case"Null":return yield*X(x(re,Q,P));case"Number":return yield*X(E(re,Q,P));case"Object":return yield*X(S(re,Q,P));case"Promise":return yield*X(I(re,Q,P));case"Record":return yield*X(C(re,Q,P));case"Ref":return yield*X(k(re,Q,P));case"RegExp":return yield*X(V(re,Q,P));case"String":return yield*X(z(re,Q,P));case"Symbol":return yield*X(M(re,Q,P));case"TemplateLiteral":return yield*X(T(re,Q,P));case"This":return yield*X(Z(re,Q,P));case"Tuple":return yield*X(j(re,Q,P));case"Undefined":return yield*X(W(re,Q,P));case"Union":return yield*X($(re,Q,P));case"Uint8Array":return yield*X(q(re,Q,P));case"Unknown":return yield*X(J(re,Q,P));case"Void":return yield*X(G(re,Q,P));default:if(!Gt.Has(re[_]))throw new Yf(F);return yield*X(ae(re,Q,P))}}o(te,"Visit");let ee={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function le(F,Y,P,ce=!0){return"(".concat([...te(F,Y,P,ce)].join(" && "),")")}o(le,"CreateExpression");function fe(F){return"check_".concat(Jf.Encode(F))}o(fe,"CreateFunctionName");function xe(F){let Y="local_".concat(ee.variables.size);return ee.variables.set(Y,"const ".concat(Y," = ").concat(F)),Y}o(xe,"CreateVariable");function be(F,Y,P,ce,Q=!0){let[re,pe]=["\n",tr=>"".padStart(tr," ")],Je=Oe("value","any"),Ft=Ie("boolean"),_t=[...te(Y,P,ce,Q)].map(tr=>"".concat(pe(4)).concat(tr)).join(" &&".concat(re));return"function ".concat(F,"(").concat(Je,")").concat(Ft," {").concat(re).concat(pe(2),"return (").concat(re).concat(_t).concat(re).concat(pe(2),")\n}")}o(be,"CreateFunction");function Oe(F,Y){let P=ee.language==="typescript"?": ".concat(Y):"";return"".concat(F).concat(P)}o(Oe,"CreateParameter");function Ie(F){return ee.language==="typescript"?": ".concat(F):""}o(Ie,"CreateReturns");function ot(F,Y,P){let ce=be("check",F,Y,"value"),Q=Oe("value","any"),re=Ie("boolean"),pe=[...ee.functions.values()],Je=[...ee.variables.values()],Ft=Ue(F.$id)?"return function check(".concat(Q,")").concat(re," {\n return ").concat(fe(F.$id),"(value)\n}"):"return ".concat(ce);return[...Je,...pe,Ft].join("\n")}o(ot,"Build");function Sr(...F){let Y={language:"javascript"},[P,ce,Q]=F.length===2&&Ce(F[1])?[F[0],F[1],Y]:F.length===2&&!Ce(F[1])?[F[0],[],F[1]]:F.length===3?[F[0],F[1],F[2]]:F.length===1?[F[0],[],Y]:[null,[],Y];if(ee.language=Q.language,ee.variables.clear(),ee.functions.clear(),ee.instances.clear(),!je(P))throw new Cm(P);for(let re of ce)if(!je(re))throw new Cm(re);return ot(P,ce,Q)}o(Sr,"Code"),e.Code=Sr;function wr(F,Y=[]){let P=Sr(F,Y,{language:"javascript"}),ce=globalThis.Function("kind","format","hash",P),Q=new Map(ee.instances);function re(_t,tr,jn){if(!Gt.Has(_t)||!Q.has(tr))return!1;let ha=Gt.Get(_t),ga=Q.get(tr);return ha(ga,jn)}o(re,"typeRegistryFunction");function pe(_t,tr){return Pr.Has(_t)?Pr.Get(_t)(tr):!1}o(pe,"formatRegistryFunction");function Je(_t){return po(_t)}o(Je,"hashFunction");let Ft=ce(re,pe,Je);return new qf(F,Y,Ft,P)}o(wr,"Compile"),e.Compile=wr})(Im||(Im={}));l();l();l();var TP=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,kP=[0,31,28,31,30,31,30,31,31,30,31,30,31],_P=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),Dm=o(e=>{let t=TP.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&_P(r)?29:kP[n])},"isDate");l();var LP=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Sm=o(e=>{let t=LP.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],a=t[4],u=t[5]==="-"?-1:1,c=+(t[6]||0),m=+(t[7]||0);if(c>23||m>59||!a)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-m*u,f=r-c*u-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&i<61},"isTime");var RP=/t|\s/i,_x=o(e=>{let t=e.split(RP);return t.length===2&&Dm(t[0])&&Sm(t[1])},"isDateTime");l();var NP=/\/|:/,UP=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Lx=o(e=>NP.test(e)&&UP.test(e),"isUri");var jP=[["date",Dm],["time",Sm],["date-time",_x],["uri",Lx]],Rx=o(()=>{for(let[e,t]of jP)try{Gl.Format(e,t)}catch(r){if(r instanceof Is)continue;throw r}},"registerFormats");l();var rh=p.Record(p.String(),p.Unknown(),{$id:"Extra"}),Bn=p.Object({extra:p.Optional(p.Ref(rh))}),nh=[rh];l();l();l();l();l();l();var Cr=o(e=>Object.entries(e),"typedEntries");var zP=o(e=>{var r;let t=new Map;for(let[n,i]of Cr((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(a=>[a.properties.id,a])));return t},"createLookupMap"),Zt=o(e=>{let t=zP(e);return o((n,i)=>{let a=t.get(n);if(a==null)return se({kind:zr.UnknownFloorError,properties:{floorId:n}});let u=a.get(i);return u==null?se({kind:zr.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):ue(u)},"geometryLookup")},"createGeometryLookup");l();var yn=p.Object({geometryId:p.Ref(br)},{$id:"WithGeometryId"}),yu=p.Object({geometryIds:p.Array(p.Ref(br))},{$id:"WithGeometryIds"}),ih=[yn,yu];l();l();l();var Nx=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var bu=o(e=>(...t)=>{try{return ue(e(...t))}catch(r){return se(Nx(r))}},"safeFn");var Ux=bu((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=lu(JSON.stringify(i.contents));return r}),oh=o(async(e,t,r)=>Ux(e,t).andThenAsync(n=>new Promise(i=>{fx(n,De(R({},r),{consume:!0}),(a,u)=>{i(a?se(a):ue(u))})})),"compress"),$P=bu(hx),ah=o((e,t,r)=>Ux(e,t).andThen(n=>$P(n,r)),"compressSync");l();l();function wm(e,t,r=[]){let n=R({},e);for(let[i,a]of Object.entries(t))if(a!==void 0)if(i in n){let u=i;if(Array.isArray(a)&&a.length>0){let c=GP(a[0],r);if(c){let m=n[u];if(!Array.isArray(m))throw new Error("Expected array at ".concat(i,", got ").concat(typeof m));let d=new Map(a.map(v=>[jx(v,c),v])),g=m.map(v=>{let b=d.get(jx(v,c));return b?wm(v,b,r):v});n[u]=g}else n[u]=a}else{let c=n[u];typeof c=="object"&&c!==null&&typeof a=="object"&&a!==null?Object.keys(a).length===0?n[u]=a:n[u]=wm(c,a,r):n[i]=a}}else n[i]=a;return n}o(wm,"deepMergeOn");function GP(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,a]of Object.entries(n)){let u=r(a);if(u)return[i,...u]}return null}return o(r,"search"),r(e)}o(GP,"findIdentifierKey");function jx(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(jx,"getValueByKeyPath");var ZP=o(e=>e,"identity"),VP=o(e=>JSON.parse(Gf(e)),"jsonDecode"),zx=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,ZP)!==void 0),"isFileExpected"),$x=bu((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let a of t){let u=a.fromBundle(n,i,VP);if(u){r=wm(r,u,[]);break}}}return r}),uh=o(async(e,t)=>new Promise(r=>gx(e,{filter:o(n=>zx(n,t),"filter")},(n,i)=>{r(n?se(n):ue(i))})).then(r=>r.andThen(n=>$x(n,t))),"decompress"),WP=bu(yx),sh=o((e,t)=>WP(e,{filter:o(r=>zx(r,t),"filter")}).andThen(r=>$x(r,t)),"decompressSync");l();var HP=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),KP=o(e=>{if(e.length<2)return!1;let t=e.filter(HP);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),Am=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&KP(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Am(r)])):Array.isArray(e)?e.map(Am):e,"fixDuplicateAllOf");l();var Fm=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?De(R({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Fm(r)])):Array.isArray(e)?e.map(Fm):e,"prefixReferences");var vu;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(vu||(vu={}));var qP=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),JP=o((...e)=>{let t=new Map;for(let r of qP(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return se({kind:vu.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return ue(t)},"computeReferenceMap"),Qt,xu,Qr,mr,Pm=class Pm{constructor(t,r,n,i){L(this,Qt);L(this,xu);L(this,Qr,[]);L(this,mr);K(this,Qt,t),K(this,xu,r),K(this,Qr,n),K(this,mr,i),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(t,r="CoreMVF",n=!1){let i=p.Composite(t.extensions.map(u=>u.schema),{$id:r});if(!w.IsSchema(i))return se({kind:vu.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:i});let a=JP(q0.values(),J0.values(),H0.values(),nh.values(),ch.values(),ih.values(),t.extensions.flatMap(u=>{var c;return(c=u.references)!=null?c:[]}).values());if(!a.isOk())return a;try{Rx();let u=n?null:Im.Compile(i,[...a.value.values()]);return ue(new Pm(i,u,t.extensions,a.value))}catch(u){return u instanceof he?se({kind:vu.TypeboxError,message:u.message,original:u}):se({kind:vu.UnknownError,message:"An unknown error occurred while compiling the schema",original:u})}}is(t){var r,n;return(n=(r=s(this,xu))==null?void 0:r.Check(t))!=null?n:fn.Check(s(this,Qt),[...s(this,mr).values()],t)}parse(t){var r,n;return this.is(t)?ue(t):se((n=(r=s(this,xu))==null?void 0:r.Errors(t))!=null?n:fn.Errors(s(this,Qt),[...s(this,mr).values()],t))}decode(t){try{return ue(Tx(s(this,Qt),[...s(this,mr).values()],t))}catch(r){return se(r)}}encode(t){try{return ue(kx(s(this,Qt),[...s(this,mr).values()],t))}catch(r){return se(r)}}verify(t){for(let r of s(this,Qr))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return se(n.error)}return ue(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([s(this,Qt),...s(this,mr).values()])),r=Am(Fm({$id:"#/definitions/".concat((n=s(this,Qt).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>oh(r,s(this,Qr))).then(r=>r.mapErr(n=>{var i;return Ms((i=s(this,Qt).$id)!=null?i:"CoreMVF",n,[...s(this,mr).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>oh(r,s(this,Qr))).then(r=>r.mapErr(n=>{var i;return Ms((i=s(this,Qt).$id)!=null?i:"CoreMVF",n,[...s(this,mr).values()])}))}compressSync(t){return this.encode(t).andThen(r=>this.parse(r)).andThen(r=>ah(r,s(this,Qr))).mapErr(r=>{var n;return Ms((n=s(this,Qt).$id)!=null?n:"CoreMVF",r,[...s(this,mr).values()])})}compressUnsafeSync(t){return this.encode(t).andThen(r=>ah(r,s(this,Qr))).mapErr(r=>{var n;return Ms((n=s(this,Qt).$id)!=null?n:"CoreMVF",r,[...s(this,mr).values()])})}async decompress(t){return uh(t,s(this,Qr)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return Ts((i=s(this,Qt).$id)!=null?i:"CoreMVF",n,[...s(this,mr).values()])}))}async decompressUnsafe(t){return uh(t,s(this,Qr)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return Ts((i=s(this,Qt).$id)!=null?i:"CoreMVF",n,[...s(this,mr).values()])}))}decompressSync(t){return sh(t,s(this,Qr)).andThen(r=>this.parse(r)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return Ts((n=s(this,Qt).$id)!=null?n:"CoreMVF",r,[...s(this,mr).values()])})}decompressUnsafeSync(t){return sh(t,s(this,Qr)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return Ts((n=s(this,Qt).$id)!=null?n:"CoreMVF",r,[...s(this,mr).values()])})}};Qt=new WeakMap,xu=new WeakMap,Qr=new WeakMap,mr=new WeakMap,o(Pm,"MVFParser");var Om=Pm;var Eu,lh=class lh{constructor(){L(this,Eu,[]);this.extend=this.extend.bind(this)}extend(t){return s(this,Eu).push(t),this}extendOptional(t){let r=De(R({},t),{schema:p.Partial(t.schema)});return s(this,Eu).push(r),this}build(t){return Om.create(this,void 0,t==null?void 0:t.cspSafe)}get extensions(){return s(this,Eu)}};Eu=new WeakMap,o(lh,"MVFParserBuilder");var Bm=lh;l();l();l();l();var Cu=p.Object({geometryId:p.Ref(br),floorId:p.Ref(Re)},{$id:"GeometryAnchor"}),XP=p.Object({geometryAnchor:p.Ref(Cu)}),ks=o((e,t)=>p.Object({geometryAnchors:p.Array(p.Ref(Cu),e)},t),"WithGeometryAnchors"),ch=[Cu];l();l();l();var Gx=o((e,t)=>p.Unsafe(p.Transform(p.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),dr=o((e,t)=>{let r=Gx(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(u=>[u,u])));return{schema:r,values:n,record:i,is:o(u=>Object.hasOwn(i,u),"is")}},"SafeStringEnum");var Zx=o(()=>new Bm().extend(Ix).extend(Fx).extend(Mx),"createParser");l();l();l();l();l();l();var _s;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(_s||(_s={}));var Vx=o(e=>{var i;if(e.annotations==null)return ue(!0);let t=Mt(e.annotations,a=>a.id,"annotations");if(t.isErr())return t;let r=Zt(e),n=new Set(et((i=e.annotationSymbols)!=null?i:{}));for(let a of et(e.annotations)){let u=e.annotations[a];if(u!=null)for(let c of u){if(!n.has(c.symbolKey))return se({kind:_s.AnnotationUnknownSymbolError,properties:{annotationId:c.id,symbolKey:c.symbolKey}});let m=r(a,c.geometryId);if(m.isErr())return m;if(m.value.geometry.type!=="Point")return se({kind:_s.AnnotationNonPointGeometryError,properties:{annotationId:c.id,floorId:a,geometryId:c.geometryId}})}}return ue(!0)},"validateAnnotations");var Wx=Bt("a","AnnotationId"),mh=p.Intersect([yn,p.Object({id:p.Ref(Wx,{description:"The unique identifier for the annotation."}),externalId:p.Optional(p.String({description:"The external identifier for the annotation."})),symbolKey:p.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),Hx=p.Object({url:p.String({format:"uri",description:"The URL for the symbol."}),name:p.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),YP=p.Object({annotations:Tt(p.Record(Re,p.Array(p.Ref(mh)),{additionalProperties:!1})),annotationSymbols:Tt(p.Record(p.Index(mh,["symbolKey"]),p.Ref(Hx)))},{$id:"AnnotationsSchema"}),QP=/^annotations\/(.*)\.json$/,Kx={name:"ext:mvf-annotations",schema:YP,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of et(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(QP))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[Wx,mh,Hx],integrityCheck:Vx};l();l();l();var Ri=Bt("lcat","LocationCategoryId"),dh=p.Intersect([p.Object({id:p.Ref(Ri),parent:p.Optional(p.Ref(Ri))}),Wo(["name"]),Bn],{$id:"LocationCategory"}),qx=[Ri,dh];l();l();var Qo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Qo||(Qo={}));var Jx=o(e=>{var i,a,u,c,m,d,f,g,v;if(e.locationCategories==null&&e.locations==null)return ue(!0);if(e.locationCategories!=null){let b=Mt(e.locationCategories,D=>D.id,"locationCategories");if(b.isErr())return b}if(e.locations!=null){let b=Mt(e.locations,D=>D.id,"locations");if(b.isErr())return b}if(e.locationInstances!=null){let b=Mt(e.locationInstances,D=>D.id,"locationInstances");if(b.isErr())return b}let t=new Set((a=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?a:[]);for(let b of(u=e.locationCategories)!=null?u:[])if(b.parent!=null&&!t.has(b.parent))return se({kind:Qo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=Zt(e);for(let b of(c=e.locations)!=null?c:[]){for(let D of b.categories)if(!t.has(D))return se({kind:Qo.UnknownCategoryError,properties:{locationId:b.id,categoryId:D}});for(let D of b.geometryAnchors){let A=r(D.floorId,D.geometryId);if(A.isErr())return A}}let n=new Set((d=(m=e.locations)==null?void 0:m.map(b=>b.id))!=null?d:[]);for(let b of(f=e.locationInstances)!=null?f:[]){if(!n.has(b.parentId))return se({kind:Qo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let D of(g=b.categories)!=null?g:[])if(!t.has(D))return se({kind:Qo.UnknownCategoryError,properties:{locationId:b.id,categoryId:D}});for(let D of(v=b.geometryAnchors)!=null?v:[]){let A=r(D.floorId,D.geometryId);if(A.isErr())return A}}return ue(!0)},"validateLocations");l();var Ni=Bt("loc","LocationId"),Mm=Bt("loci","LocationInstanceId"),Xx=p.Object({name:p.String(),url:p.String({format:"uri"})},{$id:"LocationSocial"}),Yx=p.Object({url:p.String({format:"uri"})},{$id:"LocationImage"}),ph=p.Object({label:p.String(),url:p.String({format:"uri"})},{$id:"LocationLink"}),fh=p.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),Qx=p.Union([p.Literal("Sunday"),p.Literal("Monday"),p.Literal("Tuesday"),p.Literal("Wednesday"),p.Literal("Thursday"),p.Literal("Friday"),p.Literal("Saturday")],{$id:"OpeningHoursDay"}),e7="PublicHolidays",hh=p.Union([Qx,p.Literal(e7)],{$id:"OpeningHoursDayOrPublicHoliday"}),Tm=p.Object({"@type":p.Optional(p.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:p.Optional(p.Ref(fh,{description:"The time the opening hours start"})),closes:p.Optional(p.Ref(fh,{description:"The time the opening hours end"})),dayOfWeek:p.Optional(p.Union([p.Ref(hh),p.Array(p.Ref(hh))],{description:"The days of the week the opening hours apply to"})),validFrom:p.Optional(p.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:p.Optional(p.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),km=p.Intersect([p.Object({id:p.Ref(Ni),categories:p.Array(p.Ref(Ri)),logo:p.Optional(p.String({format:"uri"})),phone:p.Optional(p.String()),social:p.Array(p.Ref(Xx)),images:p.Array(p.Ref(Yx)),links:p.Array(p.Ref(ph)),website:p.Optional(p.Ref(ph)),openingHours:p.Optional(p.Array(p.Ref(Tm)))}),Wo(["name"]),ks(),Bn],{$id:"Location"}),gh=p.Intersect([p.Object({id:p.Ref(Mm),parentId:p.Ref(Ni)}),p.Partial(p.Omit(km,["id","parentId","details"])),Hr],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),_m=[Ni,Mm,Xx,Yx,ph,fh,Qx,hh,Tm,km,gh];var t7=p.Object({locations:p.Array(p.Ref(km)),locationCategories:p.Array(p.Ref(dh)),locationInstances:p.Optional(p.Array(p.Ref(gh)))},{$id:"LocationsExtensionSchema"}),e3="locations.json",t3="location-categories.json",r3="location-instances.json",n3={name:"ext:locations",schema:t7,intoBundle:o(function*(e){e.locations!=null&&(yield{path:e3,contents:e.locations}),e.locationCategories!=null&&(yield{path:t3,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:r3,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===e3)return{locations:r(t)};if(e===t3)return{locationCategories:r(t)};if(e===r3)return{locationInstances:r(t)}},"fromBundle"),references:[...qx,..._m],integrityCheck:Jx};l();l();var Mn;(function(e){e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling",e.EnterpriseVenueWithUnknownTopLocationError="EnterpriseVenueWithUnknownTopLocationError",e.EnterpriseLocationWithInvalidPrimaryCategory="EnterpriseLocationWithInvalidPrimaryCategory"})(Mn||(Mn={}));var i3=o(e=>{var v,b,D,A,x,E,S,I,C,k,V,z,M,T,Z,j,W,$,q,J;if(e.cms==null)return ue(!0);let t=e.cms,r=Mt(e.cms.categories,G=>G.id,"cms.categories");if(r.isErr())return r;let n=new Set((b=(v=e.locationCategories)==null?void 0:v.map(G=>G.id))!=null?b:[]);for(let G of(D=t.categories)!=null?D:[])if(!n.has(G.categoryId))return se({kind:Mn.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:G.id,locationCategoryId:G.categoryId}});let i=Mt(e.cms.locations,G=>G.id,"cms.locations");if(i.isErr())return i;let a=new Map((x=(A=e.locations)==null?void 0:A.map(G=>[G.id,G]))!=null?x:[]);for(let G of(E=t.locations)!=null?E:[]){if(!a.has(G.locationId))return se({kind:Mn.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:G.id,locationId:G.locationId}});for(let ae of(S=G.siblingGroups)!=null?S:[])for(let te of(I=ae.siblings)!=null?I:[])if(!a.has(te))return se({kind:Mn.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:G.id,siblingLocationId:te,label:ae.label}});if(G.primaryCategory!=null){let ae=a.get(G.locationId);if(ae!=null&&!ae.categories.includes(G.primaryCategory))return se({kind:Mn.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:G.id,locationId:G.locationId,primaryCategory:G.primaryCategory}})}}if(((C=t.venue)==null?void 0:C.topLocations)!=null){for(let G of t.venue.topLocations)if(!a.has(G))return se({kind:Mn.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:G}})}let u=new Set((V=(k=e.cms.locations)==null?void 0:k.map(G=>G.id))!=null?V:[]),c=Mt(e.cms.locationInstances,G=>G.id,"cms.locationInstances");if(c.isErr())return c;let m=new Set((M=(z=e.locationInstances)==null?void 0:z.map(G=>G.id))!=null?M:[]);for(let G of(T=t.locationInstances)!=null?T:[]){if(!u.has(G.parentId))return se({kind:Mn.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:G.id,enterpriseLocationId:G.parentId}});if(!m.has(G.locationInstanceId))return se({kind:Mn.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:G.id,locationInstanceId:G.locationInstanceId}});for(let ae of(Z=G.siblingGroups)!=null?Z:[])for(let te of(j=ae.siblings)!=null?j:[])if(!a.has(te))return se({kind:Mn.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:G.id,siblingLocationId:te,label:ae.label}})}let d=Pn(e),f=Zt(e),g=Mt(e.cms.floorText,G=>G.properties.id,"cms.floorText");if(g.isErr())return g;for(let[G,ae]of Cr((W=t.floorText)!=null?W:{})){let te=d(G);if(te.isErr())return te;for(let ee of ae.features){if(!("geometryId"in ee.properties))continue;let le=f(G,ee.properties.geometryId);if(le.isErr())return le}}for(let[G,ae]of Cr(($=t.textures)!=null?$:{})){let te=d(G);if(te.isErr())return te;for(let ee of ae){let le=f(G,ee.geometryId);if(le.isErr())return le}}for(let[G,ae]of Cr((q=t.layers)!=null?q:{})){let te=d(G);if(te.isErr())return te;for(let ee of et(ae!=null?ae:{})){let le=f(G,ee);if(le.isErr())return le}}for(let[G,ae]of Cr((J=t.textAreas)!=null?J:{})){let te=d(G);if(te.isErr())return te;for(let ee of ae.features)if("geometryId"in ee.properties){let le=f(G,ee.properties.geometryId);if(le.isErr())return le}}return ue(!0)},"validateCMS");l();l();var Ls=Bt("el","EnterpriseLocationId"),yh=Bt("ec","EnterpriseCategoryId"),bh=Bt("eli","EnterpriseLocationInstanceId"),vh=Bt("ev","EnterpriseVenueId"),xh=Bt("eft","EnterpriseFloorTextId"),o3=[Ls,yh,bh,vh,xh];var a3=p.Object({id:p.Ref(yh),categoryId:p.Ref(Ri),color:p.Optional(p.String()),sortOrder:p.Number(),iconFromDefaultList:p.Optional(p.Union([p.String(),p.Null()])),picture:p.Optional(p.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),Eh=p.Object({categories:p.Optional(p.Array(p.Ref(a3)))},{$id:"EnterpriseCategoriesSchema"}),u3=[a3,Eh];l();var Lm=dr(["left","center","right"]),r7=Lm.schema,joe=Lm.values,zoe=Lm.record,$oe=Lm.is,Ch=p.Object({id:p.Ref(xh),text:p.String(),visible:p.Boolean({default:!0}),fontSize:p.Number({default:12,exclusiveMinimum:0}),fontFamily:p.String({default:"Droid Sans"}),color:p.String({default:"black"}),rotation:p.Number({minimum:0,maximum:360}),align:r7},{$id:"FloorTextCommonProperties"}),Ih=p.Intersect([p.Ref(Ch),yn],{$id:"AnchoredFloorTextProperties"}),Dh=p.Intersect([p.Ref(Ch),p.Object({verticalOffset:p.Number()})],{$id:"FloatingFloorTextProperties"}),s3=p.Union([p.Ref(Ih),p.Ref(Dh)],{$id:"FloorTextProperties"}),c3=ar(yr,p.Ref(s3),{$id:"FloorTextFeature"}),n7=ar(yr,p.Ref(Ih),{$id:"AnchoredFloorTextFeature"}),i7=ar(yr,p.Ref(Dh),{$id:"FloatingFloorTextFeature"}),l3=Br(p.Ref(c3),{$id:"EnterpriseFloorTextFeatureCollection"}),m3=p.Record(Re,p.Ref(l3),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Sh=p.Object({floorText:p.Optional(p.Ref(m3))},{$id:"EnterpriseFloorTextSchema"}),d3=[Ch,Ih,Dh,s3,c3,n7,i7,l3,m3,Sh];l();var p3=Tt(p.Record(br,p.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),f3=Tt(p.Record(Re,p.Ref(p3),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),wh=p.Object({layers:p.Optional(p.Ref(f3))},{$id:"EnterpriseLayersSchema"}),h3=[p3,f3,wh];l();l();l();var{schema:g3,values:Qoe,record:eae,is:tae}=dr(["reference-point","checkpoint","checkpoint-passport","parent"],{$id:"EnterpriseSiblingGroupType"}),Rm=dr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),o7=Rm.schema,rae=Rm.values,nae=Rm.record,iae=Rm.is,Ah=p.Object({type:o7,start:p.Optional(p.String({format:"date",description:"The start date of the state"})),end:p.Optional(p.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),Fh=p.Object({label:p.String(),siblings:p.Array(p.Ref(Ni)),type:p.Optional(p.Ref(g3)),subtype:p.Optional(p.String())},{$id:"SiblingGroup"}),Nm=p.Object({name:p.String(),code:p.String()},{$id:"Language"}),y3=[Ah,Fh,Nm,g3];var Um=p.Object({id:p.Ref(Ls),locationId:p.Ref(Ni),cmsId:p.String(),type:p.String(),sortOrder:p.Number(),tags:p.Optional(p.Array(p.String())),picture:p.Optional(p.String({format:"uri",description:"The picture of the location"})),states:p.Optional(p.Array(p.Ref(Ah),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:p.Optional(p.Array(p.Ref(Fh))),gallery:p.Optional(p.Array(p.Object({caption:p.Optional(p.String()),image:p.String({format:"uri"}),embeddedUrl:p.Optional(p.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:p.Optional(p.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:p.Optional(p.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:p.Optional(p.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:p.Optional(p.Ref(Ri)),headerImage:p.Optional(p.String({format:"uri",description:"The location's header image"}))},{$id:"EnterpriseLocation"}),Oh=p.Object({locations:p.Optional(p.Array(p.Ref(Um)))},{$id:"EnterpriseLocationsSchema"}),b3=[Um,Oh];var v3=p.Intersect([p.Object({id:p.Ref(bh),parentId:p.Ref(Ls),locationInstanceId:p.Ref(Mm)}),p.Partial(p.Omit(Um,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),Ph=p.Object({locationInstances:p.Optional(p.Array(p.Ref(v3)))},{$id:"EnterpriseLocationInstancesSchema"}),x3=[v3,Ph];l();var jm=dr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),E3=jm.schema,Iae=jm.values,Dae=jm.record,Sae=jm.is,Bh=p.Object({maxWidth:p.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:p.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:p.Ref(E3),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),C3=p.Intersect([p.Ref(Bh),yn],{$id:"EnterpriseAnchoredTextAreaProperties"}),I3=p.Intersect([p.Ref(Bh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),D3=p.Union([C3,I3],{$id:"EnterpriseTextAreaProperties"}),S3=ar(p.Ref(yr),D3,{$id:"EnterpriseTextAreaFeature"}),w3=Br(p.Ref(S3),{$id:"EnterpriseTextAreaCollection"}),A3=p.Record(Re,p.Ref(w3),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),F3=p.Object({textAreas:p.Optional(p.Ref(A3))},{$id:"EnterpriseTextAreasSchema"}),O3=[E3,Bh,C3,I3,D3,S3,w3,A3];l();var Mh=p.Object({u:p.Number(),v:p.Number()},{$id:"EnterpriseTextureUV"}),zm=dr(["top","side"],{$id:"EnterpriseTextureFace"}),P3=zm.schema,Pae=zm.values,Bae=zm.record,Mae=zm.is,$m=dr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),B3=$m.schema,Tae=$m.values,kae=$m.record,_ae=$m.is,M3=p.Tuple([Xa,Ya,Xa,Ya],{$id:"EnterpriseTextureBounds"}),T3=p.Intersect([p.Object({repeat:p.Ref(Mh),offset:p.Ref(Mh),rotation:p.Number({minimum:0,maximum:360}),path:p.String({format:"uri"}),face:p.Ref(P3),surface:p.Ref(B3),bounds:p.Ref(M3)},{$id:"EnterpriseTextureProperties"}),yn],{$id:"EnterpriseTexture"}),k3=p.Array(p.Ref(T3),{$id:"EnterpriseTextures"}),_3=p.Record(Re,p.Ref(k3),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),Th=p.Object({textures:p.Optional(p.Ref(_3))},{$id:"EnterpriseTexturesSchema"}),L3=[T3,k3,Th,Mh,P3,B3,M3,_3];l();var{schema:R3,values:Gae,record:Zae,is:Vae}=dr(["agriculture","airport","casino","city-district","convention-center","entertainment","event-centre","first-responder-building","government-building","grocery-store","healthcare","higher-education","hotel","library","manufacturing","medical-centre","mixed-use","multifamily","museum","office-building","oil-and-energy","other","parking-facility","religious-institution","resort","retail-store","schools-k-12","shopping-mall","stadium-or-arena","storage-facility","theme-park","transit","transportation-hub","warehousing"],{$id:"EnterpriseVenueType"}),N3=p.Intersect([p.Object({id:p.Ref(vh),slug:p.String(),defaultLanguage:p.Ref(Nm),languages:p.Array(p.Ref(Nm)),countrycode:p.Optional(p.String()),logo:p.Optional(p.String({format:"uri"})),mappedinWebUrl:p.Optional(p.String({format:"uri"})),topLocations:p.Optional(p.Array(p.Ref(Ni))),operationHours:p.Optional(p.Array(p.Ref(Tm))),coverImage:p.Optional(p.String({format:"uri"})),type:p.Optional(p.Ref(R3))}),Wo(["name"]),Bn],{$id:"EnterpriseVenue"}),kh=p.Object({venue:p.Optional(p.Ref(N3))},{$id:"EnterpriseVenueSchema"}),U3=[N3,kh,R3];var z3=p.Intersect([kh,Oh,Ph,Eh,Th,Sh,wh,F3],{$id:"CMSProperties"}),j3=p.Object({cms:p.Optional(p.Ref(z3))},{$id:"CMSExtensionSchema"}),a7=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,$3={name:"ext:cms",schema:j3,intoBundle:o(function*(e){var r,n,i,a,u,c;if(e.cms==null)return;let t=e.cms;for(let m of et(t))switch(m){case"floorText":for(let d of et((r=t.floorText)!=null?r:{}))yield{path:"cms/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of et((i=t.textures)!=null?i:{}))yield{path:"cms/textures/".concat(d,".json"),contents:((a=t.textures)!=null?a:{})[d]};continue;case"textAreas":for(let d of et((u=t.textAreas)!=null?u:{}))yield{path:"cms/textAreas/".concat(d,".geojson"),contents:((c=t.textAreas)!=null?c:{})[d]};continue;default:yield{path:"cms/".concat(m,".json"),contents:t[m]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(a7);if(!n)return;let[,i,a]=n,u=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{cms:{[i]:{[a]:u}}};default:return{cms:{[a]:u}}}},"fromBundle"),references:[z3,j3,...U3,...b3,...x3,...u3,...L3,...h3,...d3,...O3,...o3,...y3,..._m],integrityCheck:i3};l();l();l();l();var Tn;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Tn||(Tn={}));var G3=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return ue(!0);let r=Object.entries(t).map(([a,u])=>R({key:a},u)).sort((a,u)=>a.index!==u.index?a.index-u.index:a.bit-u.bit),n=0,i=-1;for(let a of r){if(a.bit===i)return se({kind:Tn.NavigationFlagDuplicateBit,properties:{index:a.index,bit:a.bit,path:"navigationFlags.".concat(a.key)}});if(a.index!=n){if(i!=31)return se({kind:Tn.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(a.index!=n+1||a.bit!=0)return se({kind:Tn.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=a.index,i=0}else{if(a.bit!==i+1)return se({kind:Tn.NavigationFlagMissingDeclaration,properties:{index:a.index,bit:i+1,path:"navigationFlags"}});i=a.bit}}return ue(!0)},"validateNavigationFlags");l();var Z3=2**32-1,Rs=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),Iu=o((e,t,r)=>{if(t.index==-1&&e.length===0)return ue(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return se({kind:Tn.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let a=e[i];if(i<t.index){if(a>Z3)return se({kind:Tn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:Z3,path:r}});continue}else if(a>t.flag)return se({kind:Tn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:t.flag,path:r}})}return ue(!0)},"validateFlags");var u7=p.Object({index:p.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:p.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),V3=p.Intersect([u7,Hr],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'});var W3=p.Record(p.String(),V3,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),s7=p.Object({navigationFlags:p.Ref(W3)},{$id:"NavigationFlagsSchema"}),Gm=p.Array(p.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),_h=p.Object({flags:p.Ref(Gm)},{$id:"WithFlags"}),ea=p.Intersect([Cu,_h],{$id:"FlaggedGeometryAnchor"}),c7=p.Object({geometryAnchor:ea},{$id:"WithFlaggedGeometryAnchor"}),l7=p.Object({geometryAnchors:p.Array(ea)},{$id:"WithFlaggedGeometryAnchors"}),H3={name:"ext:mvf-navigation-flags",schema:s7,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[V3,W3,Gm,ea,c7,l7],integrityCheck:G3};l();var K3=o(e=>{if(e.connections==null)return ue(!0);let t=Mt(e.connections,i=>i.id,"connections");if(t.isErr())return t;let r=Zt(e),n=Rs(e);for(let[i,a]of e.connections.entries()){for(let[u,c]of a.entrances.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=Iu(c.flags,n,"connections[".concat(i,"].entrances[").concat(u,"]"));if(d.isErr())return d}for(let[u,c]of a.exits.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=Iu(c.flags,n,"connections[".concat(i,"].exits[").concat(u,"]"));if(d.isErr())return d}}return ue(!0)},"validateConnections");var J3=Bt("c","ConnectionId"),{schema:m7,values:Gue,record:Zue,is:Vue}=dr(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),X3=m7;var Y3=p.Intersect([p.Object({id:p.Ref(J3,{description:"The unique identifier for the connection."}),entrances:p.Array(p.Ref(ea)),exits:p.Array(p.Ref(ea)),entryCost:p.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:p.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:p.Ref(X3,{description:"The type of connection."})}),Hr,Bn],{$id:"ConnectionsProperties"}),Q3=p.Array(p.Ref(Y3),{$id:"ConnectionsCollection"}),d7=p.Object({connections:p.Ref(Q3)},{$id:"ConnectionsExtensionSchema"}),q3="connections.json",eE={name:"ext:connections",schema:d7,intoBundle:o(function*(e){e.connections!=null&&(yield{path:q3,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===q3)return{connections:r(t)}},"fromBundle"),references:[Y3,Q3,X3,J3,ea,Gm],integrityCheck:K3};l();l();var tE=o(e=>{if(e.defaultStyle==null)return ue(!0);let t=Zt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return ue(!0)},"validateDefaultStyle");var rE=p.Intersect([ks(),Bn,p.Object({altitude:p.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:p.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:p.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:p.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:p.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:p.Optional(p.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),nE=p.Record(p.String(),p.Ref(rE),{$id:"DefaultStyleCollection",additionalProperties:!1}),p7=p.Object({defaultStyle:p.Ref(nE)},{$id:"DefaultStyleSchema"}),iE={name:"ext:mvf-default-style",schema:p7,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[rE,nE],integrityCheck:tE};l();l();l();l();var Zm;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Zm||(Zm={}));var oE=o(e=>{if(e.floorStacks==null)return ue(!0);let t=Mt(e.floorStacks,n=>n.id,"floorStacks");if(t.isErr())return t;let r=Pn(e);for(let n of e.floorStacks){for(let i of n.floors){let a=r(i);if(a.isErr())return a}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return se({kind:Zm.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return ue(!0)},"validateFloorStacks");var Ns=Bt("fs","FloorStackId"),uE=p.Intersect([p.Object({id:p.Ref(Ns,{description:"The unique identifier for the floor stack."}),floors:p.Array(p.Ref(Re),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:p.Optional(p.Ref(Re,{description:"The default floor for the floor stack."}))}),Hr],{$id:"FloorStacksProperties"}),sE=p.Array(p.Ref(uE),{$id:"FloorStackCollection"}),f7=p.Object({floorStacks:p.Ref(sE)},{$id:"FloorStackExtensionSchema"}),aE="floor-stacks.json",cE={name:"ext:floor-stacks",schema:f7,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:aE,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===aE)return{floorStacks:r(t)}},"fromBundle"),references:[Ns,uE,sE],integrityCheck:oE};l();l();var Us;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(Us||(Us={}));var lE=o(e=>{if(e.facade==null)return ue(!0);if(e.floorStacks==null)return se({kind:Us.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(i=>i.id)),r=Zt(e),n=Pn(e);for(let[i,a]of Cr(e.facade)){if(a==null)continue;let u=n(i);if(u.isErr())return u;for(let c of a){let{floorStackId:m,geometryIds:d}=c;if(!t.has(m))return se({kind:Us.UnknownFloorStackError,properties:{floorStackId:m}});for(let f of d){let g=r(i,f);if(g.isErr())return g}}}return ue(!0)},"validateFacade");var mE=p.Intersect([p.Object({floorStackId:p.Ref(Ns)}),yu],{$id:"Facade"}),h7=p.Object({facade:Tt(p.Record(Re,p.Array(p.Ref(mE)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),g7=/^facade\/(.*)\.json$/,dE={name:"ext:facade",schema:h7,intoBundle:o(function*(e){if(e.facade!=null)for(let t of et(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(g7))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[Ns,mE],integrityCheck:lE};l();l();var pE=o(e=>{if(e.floorImages==null)return ue(!0);let t=Zt(e);for(let[r,n]of Cr(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let a=i.properties.geometryId,u=t(r,a);if(u.isErr())return u}return ue(!0)},"validateFloorImages");var Lh=p.Object({path:p.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:p.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:p.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),fE=p.Intersect([p.Ref(Lh),yn],{$id:"AnchoredFloorImageProperties"}),hE=p.Intersect([p.Ref(Lh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),gE=p.Union([fE,hE],{$id:"FloorImageProperties"}),yE=ar(p.Ref(yr),gE,{$id:"FloorImageFeature"}),bE=Br(p.Ref(yE),{$id:"FloorImageCollection"}),y7=p.Object({floorImages:Tt(p.Record(Re,p.Ref(bE),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),b7=/^floorImages\/(.*)\.geojson$/,vE={name:"ext:floor-images",schema:y7,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of et(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(b7))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[Lh,fE,hE,gE,yE,bE],integrityCheck:pE};l();l();var xE=o(e=>{if(e.kinds==null)return ue(!0);let t=Zt(e);for(let[r,n]of Cr(e.kinds))if(n!=null)for(let i of et(n)){let a=t(r,i);if(a.isErr())return a}return ue(!0)},"validateKinds");var{values:pce,schema:v7,record:fce}=dr(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),EE=v7;var CE=Tt(p.Record(br,p.Ref(EE),{additionalProperties:!1,$id:"GeometryKinds"})),x7=p.Object({kinds:Tt(p.Record(Re,p.Ref(CE),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),E7=/^kinds\/(.*)\.json$/,IE={name:"ext:kinds",schema:x7,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of et(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(E7))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[EE,CE],integrityCheck:xE};l();l();l();var js;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(js||(js={}));var DE=o(e=>{if(e.nodes==null)return ue(!0);let t=Mt(e.nodes,i=>i.properties.id,"nodes");if(t.isErr())return t;let r=Zt(e),n=Rs(e);for(let[i,a]of Cr(e.nodes)){if(a==null)continue;let u=new Set(a.features.map(c=>c.properties.id));for(let[c,m]of a.features.entries()){for(let d of m.properties.geometryIds){let f=r(i,d);if(f.isErr())return f}for(let[d,f]of m.properties.neighbors.entries()){if(!u.has(f.id))return se({kind:js.UnknownNeighbor,properties:{floorId:i,nodeId:m.properties.id,neighborId:f.id}});if(f.id===m.properties.id)return se({kind:js.SelfReference,properties:{floorId:i,nodeId:m.properties.id}});let g=Iu(f.flags,n,'nodes["'.concat(i,'"].features[').concat(c,"].properties.neighbors[").concat(d,"]"));if(g.isErr())return g}}}return ue(!0)},"validateNodes");var Rh=Bt("n","NodeId"),SE=p.Intersect([p.Object({id:p.Ref(Rh,{description:"The unique identifier for the node."}),extraCost:p.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),_h],{$id:"NodeNeighbor"}),wE=p.Intersect([p.Object({id:p.Ref(Rh,{description:"The unique identifier for the node."}),neighbors:p.Array(p.Ref(SE),{description:"The neighbors of the node."})}),yu],{$id:"NodeProperties"}),AE=ar(p.Ref(yr),wE,{$id:"NodeFeature"}),FE=Br(p.Ref(AE),{$id:"NodeCollection"}),C7=p.Object({nodes:Tt(p.Record(Re,p.Ref(FE),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),I7=/^nodes\/(.*)\.(geo)?json$/,OE={name:"ext:nodes",schema:C7,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of et(e.nodes))yield{path:"nodes/".concat(t,".geojson"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(I7))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[Rh,SE,wE,AE,FE],integrityCheck:DE};l();l();l();var Vm;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(Vm||(Vm={}));var PE=o(e=>{if(e.outdoors==null)return ue(!0);let t=Pn(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return se({kind:Vm.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return ue(!0)},"validateOutdoors");var ME=p.Object({floors:p.Array(p.Ref(Re),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),D7=p.Object({outdoors:p.Ref(ME)},{$id:"OutdoorsExtensionSchema"}),BE="outdoors.json",TE={name:"ext:outdoors",schema:D7,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:BE,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===BE)return{outdoors:r(t)}},"fromBundle"),references:[ME],integrityCheck:PE};l();l();l();var Wm;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(Wm||(Wm={}));var kE=o(e=>{if(e.tileset==null)return ue(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return se({kind:Wm.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return ue(!0)},"validateTilesets");var Nh=p.Object({key:p.String({minLength:1,description:"Unique identifier for the tileset style."}),name:p.String({minLength:1,description:"Display name of the tileset style."}),url:p.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),_E=p.Object({default:p.Ref(Nh,{description:"The default tileset style, which should be used."}),others:p.Optional(p.Array(p.Ref(Nh,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),S7=p.Object({tileset:p.Ref(_E)},{$id:"TilesetExtensionSchema"}),LE={name:"ext:mvf-tileset",schema:S7,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[Nh,_E],integrityCheck:kE};l();var RE=p.Object({},{$id:"WalkableProperties"}),NE=p.Object({},{$id:"NonWalkableProperties"}),UE=Tt(p.Record(br,p.Ref(RE),{$id:"WalkableGeometries",additionalProperties:!1})),jE=Tt(p.Record(br,p.Ref(NE),{$id:"NonWalkableGeometries",additionalProperties:!1})),w7=p.Object({walkable:Tt(p.Record(Re,p.Ref(UE),{additionalProperties:!1})),nonwalkable:Tt(p.Record(Re,p.Ref(jE),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),A7=/^walkable\/(.*)\.json$/,F7=/^nonwalkable\/(.*)\.json$/,zE={name:"ext:mvf-traversability",schema:w7,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of et(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of et(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var a,u;let n=(a=e.match(A7))==null?void 0:a[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(u=e.match(F7))==null?void 0:u[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[RE,NE,UE,jE]};l();l();l();l();l();l();l();l();l();l();l();var T7=My(ZE(),1);l();l();l();l();var vde=Zx().extendOptional(H3).extendOptional(OE).extendOptional(eE).extendOptional(IE).extendOptional(zE).extendOptional(iE).extendOptional(cE).extendOptional(TE).extendOptional(LE).extendOptional(vE).extendOptional(dE).extendOptional(Kx).extendOptional(n3).extendOptional($3).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");l();l();var $h="\xA9 Mappedin",_7="https://info.mappedin.com/feedback",Zh=["top-left","top-right","bottom-left","bottom-right"],L7=640,R7=o(()=>"<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>\n <circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/>\n <path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/>\n </svg>","getAttributionButtonIcon"),Gh={custom:[],position:"bottom-right",feedback:!0},Du,Vh=class Vh{constructor(t,r={}){h(this,"controlContainerEl");h(this,"controlPositions");h(this,"compact");L(this,Du);h(this,"attribContainerEl");h(this,"attribInnerEl");h(this,"attribButtonEl");h(this,"feedbackLinkEl");h(this,"attribHTML",$h);h(this,"customAttributions",[]);h(this,"toggleAttribution",o(t=>{this.attribContainerEl!=null&&(t.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))},"toggleAttribution"));K(this,Du,!!r.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=Zh.reduce((n,i)=>{let a=document.createElement("div");return a.classList.add("mappedin-ctrl-".concat(i)),this.controlContainerEl.appendChild(a),n[i]=a,n},{})}addAttributionControl(t=Gh){var i;let r=t.position&&Zh.includes(t.position)?t.position:Gh.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(r)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=R7(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,Du)?$h:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((i=t.feedback)!=null?i:Gh.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=_7,this.feedbackLinkEl.target="_blank",this.feedbackLinkEl.rel="noopener",this.feedbackLinkEl.textContent="Provide Feedback",this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner"),this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner-bold"),this.attribContainerEl.appendChild(this.feedbackLinkEl)),t.custom&&(this.customAttributions=t.custom),this.updateAttributionDisplay()}updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=s(this,Du)?[$h]:[],n=t.style.sourceCaches;for(let i in n){let a=n[i];if(a.used||a.usedForTerrain){let u=a.getSource();u.attribution&&r.indexOf(u.attribution)<0&&r.push(u.attribution)}}r=r.filter(i=>String(i).trim()),r=r.filter((i,a)=>{for(let u=a+1;u<r.length;u++)if(r[u].indexOf(i)>=0)return!1;return!0}),this.attribHTML=r.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let t=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=t)}resizeAttribution(t){this.attribContainerEl&&(t<=L7||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};Du=new WeakMap,o(Vh,"HTMLControlsSystem");var Km=Vh;l();l();var bn=Object.freeze({Linear:Object.freeze({None:o(function(e){return e},"None"),In:o(function(e){return e},"In"),Out:o(function(e){return e},"Out"),InOut:o(function(e){return e},"InOut")}),Quadratic:Object.freeze({In:o(function(e){return e*e},"In"),Out:o(function(e){return e*(2-e)},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},"InOut")}),Cubic:Object.freeze({In:o(function(e){return e*e*e},"In"),Out:o(function(e){return--e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},"InOut")}),Quartic:Object.freeze({In:o(function(e){return e*e*e*e},"In"),Out:o(function(e){return 1- --e*e*e*e},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},"InOut")}),Quintic:Object.freeze({In:o(function(e){return e*e*e*e*e},"In"),Out:o(function(e){return--e*e*e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},"InOut")}),Sinusoidal:Object.freeze({In:o(function(e){return 1-Math.sin((1-e)*Math.PI/2)},"In"),Out:o(function(e){return Math.sin(e*Math.PI/2)},"Out"),InOut:o(function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))},"InOut")}),Exponential:Object.freeze({In:o(function(e){return e===0?0:Math.pow(1024,e-1)},"In"),Out:o(function(e){return e===1?1:1-Math.pow(2,-10*e)},"Out"),InOut:o(function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},"InOut")}),Circular:Object.freeze({In:o(function(e){return 1-Math.sqrt(1-e*e)},"In"),Out:o(function(e){return Math.sqrt(1- --e*e)},"Out"),InOut:o(function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},"InOut")}),Elastic:Object.freeze({In:o(function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},"In"),Out:o(function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},"Out"),InOut:o(function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)},"InOut")}),Back:Object.freeze({In:o(function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},"In"),Out:o(function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},"Out"),InOut:o(function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},"InOut")}),Bounce:Object.freeze({In:o(function(e){return 1-bn.Bounce.Out(1-e)},"In"),Out:o(function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},"Out"),InOut:o(function(e){return e<.5?bn.Bounce.In(e*2)*.5:bn.Bounce.Out(e*2-1)*.5+.5},"InOut")}),generatePow:o(function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:o(function(t){return Math.pow(t,e)},"In"),Out:o(function(t){return 1-Math.pow(1-t,e)},"Out"),InOut:o(function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5},"InOut")}},"generatePow")}),zs=o(function(){return performance.now()},"now"),qm=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return o(e,"Group"),e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(r){return t._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var u=a[i];(t=u._group)===null||t===void 0||t.remove(u),u._group=this,this._tweens[u.getId()]=u,this._tweensAddedDuringUpdate[u.getId()]=u}},e.prototype.remove=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,r){t===void 0&&(t=zs()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var a=this._tweens[n[i]],u=!r;a&&a.update(t,u)===!1&&!r&&this.remove(a)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Su={Linear:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=Su.Utils.Linear;return t<0?a(e[0],e[1],n):t>1?a(e[r],e[r-1],r-n):a(e[i],e[i+1>r?r:i+1],n-i)},"Linear"),Bezier:o(function(e,t){for(var r=0,n=e.length-1,i=Math.pow,a=Su.Utils.Bernstein,u=0;u<=n;u++)r+=i(1-t,n-u)*i(t,u)*e[u]*a(n,u);return r},"Bezier"),CatmullRom:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=Su.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(i=Math.floor(n=r*(1+t))),a(e[(i-1+r)%r],e[i],e[(i+1)%r],e[(i+2)%r],n-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[r]-(a(e[r],e[r],e[r-1],e[r-1],n-r)-e[r]):a(e[i?i-1:0],e[i],e[r<i+1?r:i+1],e[r<i+2?r:i+2],n-i)},"CatmullRom"),Utils:{Linear:o(function(e,t,r){return(t-e)*r+e},"Linear"),Bernstein:o(function(e,t){var r=Su.Utils.Factorial;return r(e)/r(t)/r(e-t)},"Bernstein"),Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var n=t;n>1;n--)r*=n;return e[t]=r,r}}(),CatmullRom:o(function(e,t,r,n,i){var a=(r-e)*.5,u=(n-t)*.5,c=i*i,m=i*c;return(2*t-2*r+a+u)*m+(-3*t+3*r-2*a-u)*c+a*i+t},"CatmullRom")}},VE=function(){function e(){}return o(e,"Sequence"),e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Wh=new qm,WE=function(){function e(t,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=bn.Linear.None,this._interpolationFunction=Su.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=VE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=Wh,Wh.add(this))}return o(e,"Tween"),e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,r){if(t===void 0&&(t=zs()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,r,n,i,a){for(var u in n){var c=t[u],m=Array.isArray(c),d=m?"array":typeof c,f=!m&&Array.isArray(n[u]);if(!(d==="undefined"||d==="function")){if(f){var g=n[u];if(g.length===0)continue;for(var v=[c],b=0,D=g.length;b<D;b+=1){var A=this._handleRelativeValue(c,g[b]);if(isNaN(A)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}v.push(A)}f&&(n[u]=v)}if((d==="object"||m)&&c&&!f){r[u]=m?[]:{};var x=c;for(var E in x)r[u][E]=x[E];i[u]=m?[]:{};var g=n[u];if(!this._isDynamic){var S={};for(var E in g)S[E]=g[E];n[u]=g=S}this._setupProperties(x,r[u],g,i[u],a)}else(typeof r[u]>"u"||a)&&(r[u]=c),m||(r[u]*=1),f?i[u]=n[u].slice().reverse():i[u]=r[u]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=zs()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=zs()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,r=this._chainedTweens.length;t<r;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=bn.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=Su.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,r){var n=this,i;if(t===void 0&&(t=zs()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=t-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),m=this._duration+this._repeat*c,d=o(function(){if(n._duration===0||u>m)return 1;var A=Math.trunc(u/c),x=u-A*c,E=Math.min(x/n._duration,1);return E===0&&u===n._duration?1:E},"calculateElapsedPortion"),f=d(),g=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||u>=this._duration)if(this._repeat>0){var v=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=v);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*v,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,D=this._chainedTweens.length;b<D;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,r,n,i){for(var a in n)if(r[a]!==void 0){var u=r[a]||0,c=n[a],m=Array.isArray(t[a]),d=Array.isArray(c),f=!m&&d;f?t[a]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(t[a],u,c,i):(c=this._handleRelativeValue(u,c),typeof c=="number"&&(t[a]=u+(c-u)*i))}},e.prototype._handleRelativeValue=function(t,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?t+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(t){var r=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=r},e.autoStartOnUpdate=!1,e}();var gpe=VE.nextId,ci=Wh,ype=ci.getAll.bind(ci),bpe=ci.removeAll.bind(ci),vpe=ci.add.bind(ci),xpe=ci.remove.bind(ci),Epe=ci.update.bind(ci);l();l();l();l();l();var HE=o((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),KE=o((e,t)=>new Ae(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),Hh=o((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),$s=o((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),Kh=o((e,t)=>new Ae((e.x+t.x)/2,(e.y+t.y)/2),"average"),qh=o(e=>{let t=0,{wheelDelta:r,detail:n}=e;return r!==void 0?t=r:n!==void 0&&(t=-n),t},"getScrollDelta");var Jh=class Jh{constructor(t,r){h(this,"input1");h(this,"input2");h(this,"lastAngle");h(this,"lastDistance");h(this,"totalDistance");h(this,"first");h(this,"second");this.input1=t,this.input2=r,this.lastAngle=Hh(t,r),this.lastDistance=$s(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let n=$s(t,r);this.input1=t,this.input2=r;let i=Hh(t,r);this.lastAngle=i,this.lastDistance=n,this.totalDistance+=($s(this.first,t)+$s(this.second,r))/2,this.first=Kh(this.first,t),this.second=Kh(this.second,r)}};o(Jh,"InputSet");var Jm=Jh;l();var Xh=class Xh{constructor(t,r,n){h(this,"touch");h(this,"camera");h(this,"cameraPlane");h(this,"viewCoordinate");h(this,"snapHolderMatrix");h(this,"snapCamera");h(this,"cameraPosition");h(this,"raycaster");h(this,"worldCoordinate");h(this,"snapshotted",!1);this.touch=t,this.camera=r,this.cameraPlane=n,this.viewCoordinate={x:t.x,y:t.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let t=new Ae(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Zn,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var n,i;let t=new Ae(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(t,this.snapCamera);let r=(i=this.raycaster)==null?void 0:i.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};o(Xh,"TouchAnchor");var Gs=Xh;var vn={};Ki(vn,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>U7,CLIPPING_RADIUS:()=>Zs,CONTROL_OPTIONS:()=>N7,DEFAULT_ANIMATION_DURATION:()=>rg,DEFAULT_BEARING:()=>Z7,DEFAULT_MAX_ZOOM_LEVEL:()=>$7,DEFAULT_MIN_ZOOM_LEVEL:()=>ng,DEFAULT_PITCH:()=>G7,DEFAULT_ZOOM_LEVEL:()=>z7,EVENTS:()=>ed,MAPLIBRE_TILE_SIZE:()=>Xm,MAX_LAT:()=>Qh,MAX_MERCATOR_ZOOM_LEVEL:()=>Qm,MIN_LAT:()=>Yh,MIN_MERCATOR_ZOOM_LEVEL:()=>Ym,ROOM_MERCATOR_ZOOM_LEVEL:()=>j7,TWO_PI:()=>eg,WHEEL_ZOOM_MULTIPLIER:()=>tg,ZRANGE:()=>wu});l();var Xm=512,Yh=-85.051129,Qh=85.051129,Zs=1e4,N7={chain:"chain",cancel:"cancel"},eg=Math.PI*2,wu=100,tg=1e4,Ym=0,Qm=24,U7=17,j7=20,rg=200,ed=["change","pan-start","pan-end","rotate-start","rotate-end","zoom-start","zoom-end","multi-start","multi-end","multi-cancel","pedestal-start","pedestal-change","pedestal-end","user-pan-start","user-pedestal-start","user-rotate-start","user-dolly-start","user-zoom-start","user-tilt-start","user-pan-end","user-pedestal-end","user-rotate-end","user-dolly-end","user-zoom-end","user-tilt-end","position-updated","zoom-updated","tilt-updated","rotation-updated"],z7=18,ng=12,$7=22,G7=0,Z7=0;var td=!1,V7=!1;var rd,nd=class nd extends Le{constructor(r,n,i,a,u){super();h(this,"dirty",!1);h(this,"zoomDirty",!1);h(this,"rotationDirty",!1);h(this,"panDirty",!1);h(this,"stateDirty",!1);L(this,rd,ng);h(this,"zoomSpeed",5);h(this,"rotateSpeed",100);h(this,"enabled",!0);h(this,"enableZoom",!0);h(this,"enablePan",!0);h(this,"enablePedestal",!1);h(this,"maxPedestal",1/0);h(this,"minPedestal",0);h(this,"enableRotate",!0);h(this,"minZoomAltitude",0);h(this,"maxZoomAltitude",1/0);h(this,"ignoreZoomLimits",!1);h(this,"zoomFactor",1);h(this,"panBounds",{min:new ne(1/0,1/0),max:new ne(-1/0,-1/0),center:new ne(0,0,0),radius:1/0});h(this,"minTilt",0);h(this,"maxTilt",1.2);h(this,"MOUSE_BUTTONS",{ORBIT:kc.RIGHT,ZOOM:kc.MIDDLE,PAN:kc.LEFT});h(this,"camera");h(this,"scene");h(this,"renderer");h(this,"elevation");h(this,"orbit");h(this,"cameraPlane");h(this,"raycaster",new Zn);h(this,"rendererState");h(this,"options");h(this,"state",-1);h(this,"intersection");h(this,"viewState",null);h(this,"tweens",new Map);h(this,"clock",new Xy(!0));h(this,"coords",{mouse:new Ae,rotateStart:new Ae,rotateEnd:new Ae,rotateDelta:new Ae,panStart:new ne,panCameraStart:new ne,panEnd:new ne,panDelta:new ne,initialShiftPos:new Ae,initialPedestal:0,floorAnchor:new ne});h(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});h(this,"scrollTimer",null);h(this,"lastWheelTime",0);h(this,"resetZoom",!1);h(this,"zoomStart");h(this,"pedestalScaleFactor",1);h(this,"isUserZooming",!1);h(this,"stayInsideBounds",!0);h(this,"userInteracting",!1);h(this,"cameraMoving",!1);h(this,"lastCameraMoveTime",Date.now());h(this,"raycastToFloor",o(r=>{this.raycaster.setFromCamera(r,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new ne},"raycastToFloor"));h(this,"isUserInteracting",o(()=>this.userInteracting,"isUserInteracting"));h(this,"getPosition",o(()=>new ne(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z),"getPosition"));h(this,"getPedestal",o(()=>this.orbit.position.z,"getPedestal"));h(this,"pan",o((r,n)=>{isNaN(r)||isNaN(n)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+n),this.publish("position-updated"))},"pan"));h(this,"postRender",o(()=>{(this.state===2||this.state===6)&&(this.raycaster.setFromCamera(this.coords.mouse,this.camera),this.intersection=this.raycaster.intersectObject(this.cameraPlane,!1)[0],this.intersection&&(this.coords.panStart.set(this.intersection.point.x,this.intersection.point.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0))),this.state===3&&this.resetZoom&&(this.resetZoom=!1,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0)),this.state===7&&this.isAnimating===!1&&(this.state=-1,this.publish("multi-end"))},"postRender"));h(this,"isCameraMoving",o(()=>this.cameraMoving,"isCameraMoving"));h(this,"lastCameraStoppedMovingTime",o(()=>this.lastCameraMoveTime,"lastCameraStoppedMovingTime"));h(this,"setPosition",o((r,n)=>{r===void 0||n===void 0||isNaN(r)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(r,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)},"setPosition"));h(this,"updateCameraPosition",o((r,n)=>{let i=r-this.panBounds.center.x,a=n-this.panBounds.center.y,u=Math.sqrt(i*i+a*a);if(this.stayInsideBounds&&u>this.panBounds.radius){let c=Math.atan2(a,i),m={x:Math.cos(c)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(c)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=m.x,this.orbit.position.y=m.y}else this.orbit.position.x=r,this.orbit.position.y=n},"updateCameraPosition"));h(this,"tilt",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+this.getTilt();n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end"),this.stateDirty=!0},"tilt"));h(this,"zoomIn",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a/1.5},r,n,i)},"zoomIn"));h(this,"zoomOut",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a*1.5},r,n,i)},"zoomOut"));h(this,"getRotation",o(()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2),"getRotation"));h(this,"cancelAnimation",o(()=>{let r=Array.from(this.tweens.keys());if(r.length<1)return;let n=r[r.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)},"cancelAnimation"));h(this,"animateCamera",o((r,n,i,a,u,c)=>{let m=R({interruptible:!0},c),d={},f={},g=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(d.x=g.x,f.x=r.position.x),r.position.y!==void 0&&(d.y=g.y,f.y=r.position.y),r.position.z!==void 0&&(d.z=g.z,f.z=r.position.z)),r.zoom!==void 0&&(d.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.zoom=r.zoom:f.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let{start:I,end:C}=o4(this.getRotation(),r.rotation);d.rotation=I,f.rotation=C}r.tilt!==void 0&&(d.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.tilt=r.tilt:f.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let v=d.zoom!==f.zoom,b=d.rotation!==f.rotation,D=d.tilt!==f.tilt,A=new WE(d).to(f,y.env.TESTING?0:n).onUpdate(I=>{this.setMulti({x:I.x,y:I.y,z:I.z},I.zoom,I.rotation,I.tilt)}).onComplete(()=>{this.completeTween(A),this.publish("multi-end",{zooming:v,rotating:b,tilting:D}),a&&a()}).onStart(()=>{this.state!==7&&(this.state=7,A.state=7,this.publish("multi-start",{zooming:v,rotating:b,tilting:D})),this.publish("change")});this.rendererState.internalTweenGroup.add(A);let x=Array.from(this.tweens.entries()),E=x[x.length-1],S=!1;return E!=null&&(E[1].interruptible?(typeof E[1].cancelledCallback=="function"&&E[1].cancelledCallback(),this.completeTween(E[0])):(S=!0,E[0].chain(A))),this.tweens.set(A,{cancelledCallback:u,interruptible:m.interruptible}),i?A.easing(i):A.easing(bn.Quadratic.In),!r.doNotAutoStart&&!S&&(A.start(),this.publish("change")),A.cameraAnimation=!0,A},"animateCamera"));h(this,"setMulti",o((r,n,i,a,u=!0)=>{this.state===-1&&this.publish("multi-start");let c=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&r.y!==void 0&&!isNaN(r.y)&&(this.updateCameraPosition(r.x,r.y),c=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0,!1),c=!0)),c&&this.publish("position-updated");let m={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let d=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;d!==this.camera.position.z&&(m.zooming=!0,this.camera.position.z=d,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>Zs&&(this.camera.near=n-Zs,this.camera.far=n+Zs):(this.camera.near=n/wu,this.camera.far=n*wu),this.camera.updateProjectionMatrix())}if(i!==void 0&&!isNaN(i)&&i!==this.getRotation()&&(m.rotating=!0,this.orbit.rotation.z=-i,this.publish("rotation-updated")),a!==void 0&&!isNaN(a)){let d=this.stayInsideBounds?Math.max(Math.min(a,this.maxTilt),this.minTilt):a;d!==this.elevation.rotation.x&&(m.tilting=!0,this.elevation.rotation.x=d,this.publish("tilt-updated"))}u&&this.publish("change"),this.state===-1&&this.publish("multi-end",m),this.stateDirty=!0},"setMulti"));h(this,"getZoomScaledMin",o(()=>this.minZoomAltitude*this.zoomFactor,"getZoomScaledMin"));h(this,"getZoomScaledMax",o(()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)},"getZoomScaledMax"));h(this,"setRotation",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=-(r%eg);i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,n||this.publish("rotation-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,this.rotationDirty=!0,n||(this.stateDirty=!0)},"setRotation"));h(this,"setZoomAltitude",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/wu,this.camera.far=n*wu,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0},"setZoomAltitude"));h(this,"setZoomLevel",o(r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))},"setZoomLevel"));h(this,"getZoomAltitude",o(()=>this.camera.position.z,"getZoomAltitude"));h(this,"getZoomLevel",o(()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()),"getZoomLevel"));h(this,"setTilt",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)},"setTilt"));h(this,"getTilt",o(()=>this.elevation.rotation.x,"getTilt"));h(this,"setCameraPlaneElevation",o(r=>{this.cameraPlane.position.z=r},"setCameraPlaneElevation"));h(this,"zoom",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-r;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(n,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):n,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.stateDirty=!0},"zoom"));h(this,"getProjectionScaleFactor",o((r,n,i)=>kp(r,n,i),"getProjectionScaleFactor"));h(this,"update",o(()=>{this.orbit.updateMatrixWorld(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())},"update"));h(this,"setPedestal",o((r,n=!1,i=!0)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,n&&(this.publishPedestalChangeEvent(r),this.publish("pedestal-change",{pedestal:r})),this.publish("change"),this.dirty=!0,i&&(this.stateDirty=!0))},"setPedestal"));h(this,"dispose",o(()=>{for(let r of ed)r.endsWith("start")?(this.off(r,this.setCameraMoving),r.startsWith("user")&&this.off(r,this.setUserInteracting)):(r.endsWith("end")||r.endsWith("cancel"))&&(this.off(r,this.unsetCameraMoving),r.startsWith("user")&&this.off(r,this.unsetUserInteracting));this.removeEventListeners(),this.scene.remove(this.cameraPlane),this.destroy()},"dispose"));h(this,"createCameraPlane",o(()=>{let r=td?2e3:1e10,n=td?100:1,i=new In(r,r,n,n),a=new fr({color:0,wireframe:td,visible:td}),u=new Pe(i,a);return this.scene.add(u),u},"createCameraPlane"));h(this,"addEventListeners",o(()=>{let{domElement:r}=this.renderer;for(let n of ed)n.endsWith("start")?(this.on(n,this.setCameraMoving),n.startsWith("user")&&this.on(n,this.setUserInteracting)):(n.endsWith("end")||n.endsWith("cancel"))&&(this.on(n,this.unsetCameraMoving),n.startsWith("user")&&this.on(n,this.unsetUserInteracting));r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)},"addEventListeners"));h(this,"addMouseEventListeners",o(()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)},"addMouseEventListeners"));h(this,"addMouseMoveEventListeners",o(()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)},"addMouseMoveEventListeners"));h(this,"removeMouseMoveEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)},"removeMouseMoveEventListeners"));h(this,"removeEventListeners",o(()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeEventListeners"));h(this,"removeMouseUpEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeMouseUpEventListeners"));h(this,"onContextMenu",o(r=>{r.preventDefault()},"onContextMenu"));h(this,"onMouseUp",o(()=>{if(this.enabled!==!1){switch(this.removeMouseUpEventListeners(),this.state){case 2:this.publish("pan-end"),this.publish("user-pan-end");break;case 1:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}this.state=-1,this.panDirty=!1}},"onMouseUp"));h(this,"onMouseMove",o(r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(r)},"onMouseMove"));h(this,"onTouchStart",o(r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new Jm(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}},"onTouchStart"));h(this,"onTouchMove",o(r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let n=R({},this.touch.inputs.first),i=R({},this.touch.inputs.second),a=new Ae(this.touch.touches[0].x,this.touch.touches[0].y),u=new Ae(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let c=n.y<a.y&&i.y<u.y,m=n.y>a.y&&i.y>u.y;this.enableRotate&&this.state!==4&&(m||c)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}},"onTouchMove"));h(this,"onTouchEnd",o(r=>{if(this.enabled!==!1){switch(this.handleTouchEnd(),this.state){case 2:case 6:this.publish("user-pan-end");break;case 4:this.publish("pan-end"),this.publish("user-tilt-end");break;case 1:case 5:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:case 9:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}r.touches.length?this.onTouchStart(r):this.state=-1}},"onTouchEnd"));h(this,"handleTouchMovePan",o(r=>{let n=Object.hasOwn(r,"x")?new Ae(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panEnd.set(i.x,i.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0},"handleTouchMovePan"));h(this,"handleTouchStartDolly",o(()=>{let r=this.touch.touches[0].x-this.touch.touches[1].x,n=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let i=new Ae(this.touch.touches[0].x-r/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(i),this.orbit.updateMatrixWorld(),this.touch.anchor1=new Gs(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new Gs(this.touch.touches[1],this.camera,this.cameraPlane),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-dolly-start"),this.publish("zoom-start"),this.publish("multi-start")},"handleTouchStartDolly"));h(this,"handleMouseMovePan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0},"handleMouseMovePan"));h(this,"handleTouchStartTilt",o(r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")},"handleTouchStartTilt"));h(this,"handleTouchMovePedestal",o(r=>{this.handleMouseMovePedestal(r.touches[0])},"handleTouchMovePedestal"));h(this,"handleTouchMoveTilt",o(r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)},"handleTouchMoveTilt"));h(this,"handleTouchMoveDolly",o(()=>{let r=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let i=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);i&&this.setCameraFromTransformMatrix(i),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,n)},"handleTouchMoveDolly"));h(this,"handleTouchEnd",o(()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1},"handleTouchEnd"));h(this,"handleTouchStartPan",o(r=>{let n=Object.hasOwn(r,"x")?new Ae(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panStart.set(i.x,i.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")},"handleTouchStartPan"));h(this,"handleTouchStartPedestal",o(r=>{this.handleMouseDownPedestal(r.touches[0])},"handleTouchStartPedestal"));h(this,"onMouseDown",o(r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}},"onMouseDown"));h(this,"onMouseWheel",o(r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(r))},"onMouseWheel"));h(this,"handleMouseWheel",o(r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),i=n-qh(r)*n/tg*this.zoomSpeed;if(this.setZoomAltitude(i),this.enablePan){let a=i/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-a),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")},"handleMouseWheel"));h(this,"setCameraFromTransformMatrix",o(r=>{this.orbit.updateMatrixWorld();let n=new xa;n.setFromRotationMatrix(r,"ZYX");let i=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),a=n.z,u=new ne(0,0,1);u.applyEuler(n),u.setLength(i);let c=new ne;c.setFromMatrixPosition(r),c.sub(u),this.enablePan&&this.setPosition(c.x,c.y),this.enableZoom&&this.setZoomAltitude(i),this.enableRotate&&this.setRotation(-a)},"setCameraFromTransformMatrix"));h(this,"makeTransformFromTouchAnchors",o((r,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let i=this.camera.projectionMatrix.clone(),a=r.worldCoordinate,u=n.worldCoordinate,c=r.reUnproject(),m=n.reUnproject();if(!c||!m||!a||!u)return null;let d=r.viewCoordinate,f=n.viewCoordinate,g=u.x-a.x,v=u.y-a.y,b=Math.atan2(v,g),D=m.x-c.x,A=m.y-c.y,x=Math.atan2(A,D),E=HE(b,x),S=new Gr;S.makeRotationZ(-E);let I=S.clone();I.multiply(r.snapHolderMatrix);let C=o((jC,zC,$C)=>jC.elements[(zC-1)*4+$C-1],"m"),k=C(i,1,1)*C(I,1,1)-d.x*C(i,3,4)*C(I,3,1),V=C(i,1,1)*C(I,1,2)-d.x*C(i,3,4)*C(I,3,2),z=C(i,1,1)*C(I,1,3)-d.x*C(i,3,4)*C(I,3,3),M=a.x*k+a.y*V+a.z*z,T=C(i,2,2)*C(I,2,1)-d.y*C(i,3,4)*C(I,3,1),Z=C(i,2,2)*C(I,2,2)-d.y*C(i,3,4)*C(I,3,2),j=C(i,2,2)*C(I,2,3)-d.y*C(i,3,4)*C(I,3,3),W=a.x*T+a.y*Z+a.z*j,$=C(i,1,1)*C(I,1,1)-f.x*C(i,3,4)*C(I,3,1),q=C(i,1,1)*C(I,1,2)-f.x*C(i,3,4)*C(I,3,2),J=C(i,1,1)*C(I,1,3)-f.x*C(i,3,4)*C(I,3,3),G=u.x*$+u.y*q+u.z*J,ae=C(i,2,2)*C(I,2,1)-f.y*C(i,3,4)*C(I,3,1),te=C(i,2,2)*C(I,2,2)-f.y*C(i,3,4)*C(I,3,2),ee=C(i,2,2)*C(I,2,3)-f.y*C(i,3,4)*C(I,3,3),le=u.x*ae+u.y*te+u.z*ee,fe=Math.abs($-k),xe=Math.abs(q-V),be=Math.abs(J-z),Oe=Math.abs($-T),Ie=Math.abs(q-Z),ot=Math.abs(J-j),Sr=Math.abs(ae-k),wr=Math.abs(te-V),F=Math.abs(ee-z),Y=Math.abs(ae-T),P=Math.abs(te-Z),ce=Math.abs(ee-j),Q=Math.min(fe+xe+be,Oe+Ie+ot),re=Math.min(Sr+wr+F,Y+P+ce);Q<re&&($=ae,q=te,J=ee,G=le);let pe=T*z-k*j,Je=Z*z-V*j,Ft=W*z-M*j,_t=$*j-T*J,tr=q*j-Z*J,jn=G*j-W*J,ha=(jn*Je-Ft*tr)/(_t*Je-pe*tr),ga=(jn*pe-Ft*_t)/(tr*pe-Je*_t),Wu=Z*k-V*T,Me=j*k-z*T,Ee=W*k-M*T,Et=q*T-Z*$,ya=J*T-j*$,Mc=((G*T-W*$)*Wu-Ee*Et)/(ya*Wu-Me*Et),Hi=I.clone();return Hi.elements[12]=ha,Hi.elements[13]=ga,Hi.elements[14]=Mc,Mc>0?Hi:null},"makeTransformFromTouchAnchors"));h(this,"updateTouchOrigin",o(()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top},"updateTouchOrigin"));h(this,"touchToScene",o(r=>{this.touch.touches=[];for(let n=0,i=r.touches.length;n<i;n++){let a=r.touches[n],u=KE(a,this.touch.origin);this.touch.touches.push(new Ae(u.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(u.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]},"touchToScene"));h(this,"canScrollZoom",o(r=>{let n=qh(r),i=this.getZoomAltitude();return!(n<0&&i===this.getZoomScaledMax()||n>0&&i===this.getZoomScaledMin())},"canScrollZoom"));h(this,"mouseToScene",o(r=>{let n=this.getMousePos(r);return this.coords.mouse.x=n.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(n.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse},"mouseToScene"));h(this,"getMousePos",o(r=>({x:r.offsetX,y:r.offsetY}),"getMousePos"));h(this,"handleMouseDownRotate",o(r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")},"handleMouseDownRotate"));h(this,"handleMouseDownPan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")},"handleMouseDownPan"));h(this,"handleMouseDownPedestal",o(r=>{let n=new Ae(r.clientX,r.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=kp(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")},"handleMouseDownPedestal"));h(this,"handleMouseMovePedestal",o(r=>{let n={x:r.clientX,y:r.clientY},i=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(i<this.minPedestal?i=Math.max(i,this.minPedestal):i>this.maxPedestal&&(i=Math.min(i,this.maxPedestal))),i!==this.getPedestal()&&this.setPedestal(i,!0)},"handleMouseMovePedestal"));h(this,"handleMouseMoveRotate",o(r=>{this.coords.rotateEnd.set(r.clientX,r.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setRotation(this.getRotation()+this.coords.rotateDelta.x/this.rotateSpeed),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd),this.publish("change")},"handleMouseMoveRotate"));h(this,"publishUserZoomDebounced",Da(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));h(this,"publishUserZoomEvent",o(()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())},"publishUserZoomEvent"));h(this,"setCameraMoving",o(()=>{this.cameraMoving=!0},"setCameraMoving"));h(this,"unsetCameraMoving",o(()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()},"unsetCameraMoving"));h(this,"setUserInteracting",o(()=>{this.userInteracting=!0},"setUserInteracting"));h(this,"unsetUserInteracting",o(()=>{this.userInteracting=!1},"unsetUserInteracting"));h(this,"publishPedestalChangeEvent",o(r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})},"publishPedestalChangeEvent"));h(this,"convertAltitudeToZoomLevel",o(r=>{let[,n]=this.center,i=this.computeMetersPerPixelFromAltitude(r),a=Math.cos(Te.degToRad(n))*2*Math.PI*Op/i;return Te.clamp(Math.log2(a/512),Ym,Qm)},"convertAltitudeToZoomLevel"));h(this,"convertZoomLevelToAltitude",o(r=>this.computeMetersPerPixelFromZoomLevel(r)*this.options.canvasHeight/2/Math.tan(Te.degToRad(this.camera.fov)/2),"convertZoomLevelToAltitude"));h(this,"completeTween",o(r=>{r.isPlaying()&&r.stop(),this.rendererState.internalTweenGroup.remove(r),this.tweens.delete(r)},"completeTween"));h(this,"debugContainer",new Mo);this.camera=r,this.renderer=i,this.rendererState=a,this.scene=n,this.options=u,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,u.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,rd)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get scrollPercent(){let r=this.minPedestal,n=this.maxPedestal,i=this.getPedestal();return i=Math.min(i,n),i=Math.max(i,r),(i-r)/(n-r)*100}get fov(){return this.camera.fov}get scrolledToBottom(){return this.minPedestal===0||Math.floor(this.getPedestal())<=this.minPedestal}get scrolledToTop(){return this.maxPedestal===0||Math.ceil(this.getPedestal())>=this.maxPedestal}get center(){var a,u,c,m;let r=this.getPosition(),{lat:n,lon:i}=Xc((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(m=(c=this.rendererState.center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n]}setCenter(r,n){var u,c,m,d;let{x:i,y:a}=Yc((c=(u=this.rendererState.center)==null?void 0:u[1])!=null?c:0,(d=(m=this.rendererState.center)==null?void 0:m[0])!=null?d:0,n,r);this.setPosition(i,a)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(r=>r.cameraAnimation)}getCameraFrameForCoordinates(r,n){var v,b;let i=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,a=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,u=this.options.canvasWidth,c=this.options.canvasHeight,m=this.getRotation(),d=this.getTilt(),f=this.getPosition();this.setRotation((v=n.rotation)!=null?v:m,!0),this.setTilt((b=n.tilt)!=null?b:d,!0);let g=qE(r,{canvasWidth:u,canvasHeight:c,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:i,maxZoom:a,position:f,camera:this.camera,orbit:this.orbit});return this.setRotation(m,!0),this.setTilt(d,!0),{center:g.position,zoomLevel:this.convertAltitudeToZoomLevel(g.zoom)}}focusOn(r,n){if(V7){this.debugContainer&&Nt(this.debugContainer);let x=new qi(4,4,4),E=new fr({color:65280,depthTest:!1}),S=new Gn(x,E,r.length),I=new Gr;r.forEach((C,k)=>{I.setPosition(C),S.setMatrixAt(k,I)}),S.instanceMatrix.needsUpdate=!0,this.debugContainer.add(S),this.scene.add(this.debugContainer)}let i=n.curve,a=n.callback,u=n.cancelledCallback,c=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,d=this.options.canvasWidth,f=this.options.canvasHeight,g;n.duration!==void 0?g=n.duration:y.env.TESTING==="true"?g=0:g=rg;let v=n.padding,b=this.getRotation(),D=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let A=qE(r,{canvasHeight:f,paddingOption:v,canvasWidth:d,minZoom:c,maxZoom:m,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(b),this.setTilt(D),this.animateCamera({position:A.position,tilt:n.tilt,rotation:n.rotation,zoom:A.zoom},g,i,a,u,n)}resize(r,n){this.options.canvasWidth=r,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(r){let[,n]=this.center,i=Te.clamp(r,Ym,Qm),a=Math.pow(2,i),u=Te.clamp(n,Yh,Qh),c=a*512;return Math.cos(Te.degToRad(u))*Math.PI*2*Op/c}computeMetersPerPixelFromAltitude(r){return r*2*Math.tan(Te.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};rd=new WeakMap,o(nd,"CameraSystem"),h(nd,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);var Au=nd;function qE(e,{canvasWidth:t,orbit:r,paddingOption:n,verticalPadding:i=0,canvasHeight:a,minZoom:u,maxZoom:c,camera:m,position:d}){let f={zoom:u,position:d};if(e.length===0)return f;for(let pe of Au.CAMERA_FRAME_PADDING_SIDES)typeof n[pe]!="number"&&(n[pe]=0);let g=n.type==="portion"?{top:n.top*a,bottom:n.bottom*a,left:n.left*t,right:n.right*t,type:"pixel"}:n;if(g.left+g.right>=t||g.top+g.bottom>=a)return f;r.updateMatrixWorld();let v=m.matrixWorldInverse,b=m.fov*(Math.PI/180)/2,D=b,x=Math.atan(Math.tan(b)*(t/a)),E=new ne(1/0,1/0,1/0),S=new ne(-1/0,-1/0,-1/0),I=new rr,C=new ne;for(let pe=0,Je=e.length;pe<Je;pe++)C.copy(e[pe]),I.expandByPoint(C),C.applyMatrix4(v),E.min(C),S.max(C),C.copy(e[pe]),C.z-=i,C.applyMatrix4(v),E.min(C),S.max(C),C.copy(e[pe]),C.z+=i,C.applyMatrix4(v),E.min(C),S.max(C);let k=S.x-E.x,V=S.y-E.y,z=t-g.left-g.right,M=a-g.top-g.bottom,T=(S.x+E.x)/2,Z=(S.y+E.y)/2,j=k/z,W=V/M,$=u,q=c,J=$*Math.tan(x)*2,G=q*Math.tan(x)*2,ae=J/t,te=G/t,ee=Math.max(j,W);ee=Te.clamp(ee,ae,te);let le=z*ee,fe=M*ee,xe={min:{x:T-le/2-g.left*ee,y:Z-fe/2-g.bottom*ee},max:{x:T+le/2+g.right*ee,y:Z+fe/2+g.top*ee}},be=(xe.min.x+xe.max.x)/2,Oe=(xe.min.y+xe.max.y)/2,Ie=I.getCenter(new ne),ot=Math.abs(be-xe.min.x),Sr=Math.abs(Oe-xe.min.y),wr=ot/Math.tan(x),F=Sr/Math.tan(D),Y=new ne;Y.set(be,Oe,S.z+Math.max(wr,F)),Y.applyMatrix4(m.matrixWorld);let P=new ne;P.set(be,Oe,S.z),P.applyMatrix4(m.matrixWorld);let ce=new ne().subVectors(P,Y),Q=(Ie.z-Y.z)/ce.z,re=new ne().copy(Y).add(ce.clone().multiplyScalar(Q));return P.set(re.x,re.y,re.z),Y.sub(P),{position:re,zoom:Y.length()}}o(qE,"getCameraFrameForPoints");var W7=0,H7=90,K7=(y.env.NODE_ENV==="test",!1),id={linear:bn.Linear.None,"ease-in":bn.Quadratic.In,"ease-out":bn.Quadratic.Out,"ease-in-out":bn.Quadratic.InOut},q7=-50,me,ve,Ui,Vs,Ws,og,ag=class ag{constructor(t,r,n){L(this,Ws);L(this,me);L(this,ve);L(this,Ui);L(this,Vs);K(this,me,t),K(this,ve,r),K(this,Ui,n),s(this,me).map&&s(this,me).map.transform.setMinElevationForCurrentTile(q7),s(this,ve).cameraSystem.on("pedestal-change",({pedestal:i})=>{s(this,ve).cameraSystem.setCameraPlaneElevation(i)})}get center(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map).getCenter)==null?void 0:r.call(t).toArray():s(this,ve).cameraSystem.center}setCenter(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setCenter(t),s(this,ve).interactionSystem.handleHover();return}s(this,ve).cameraSystem.setCenter(t[0],t[1]),s(this,ve).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getZoom():s(this,ve).cameraSystem.getZoomLevel()}setZoomLevel(t){var r;s(this,me).mode==="outdoors-overlay"&&s(this,me).map&&((r=s(this,me).map)==null||r.setZoom(t)),s(this,ve).cameraSystem.setZoomLevel(Vn(t,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits."))}getState(){return{zoomLevel:this.zoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,minPitch:this.minPitch,maxPitch:this.maxPitch,autoMinZoomLevel:this.autoMinZoomLevel,panMode:this.panMode,screenOffsets:this.insetsPadding,center:this.center,bearing:this.bearing,pitch:this.pitch,elevation:this.elevation}}get isAnimating(){return s(this,ve).cameraSystem.isAnimating}cancelAnimation(){s(this,ve).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,ve).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,ve).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,ve).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,ve).panBoundsSystem.dirty=!0,s(this,ve).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,ve).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,r=!1){var i;r&&this.setAutoMinZoomLevel(!1);let n=Vn(t,vn.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(vn.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,ve).cameraSystem.setMinZoomLevel(n),this.zoomLevel<n&&this.setZoomLevel(n),(i=s(this,me).map)==null||i.setMinZoom(n)}setMaxZoomLevel(t){var n;let r=Vn(t,this.minZoomLevel,vn.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(vn.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,ve).cameraSystem.setMaxZoomLevel(r),this.zoomLevel>r&&this.setZoomLevel(r),(n=s(this,me).map)==null||n.setMaxZoom(r)}get maxPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMaxPitch)==null?void 0:r.call(t):Te.radToDeg(s(this,ve).cameraSystem.maxTilt)}get minPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMinPitch)==null?void 0:r.call(t):Te.radToDeg(s(this,ve).cameraSystem.minTilt)}setMinPitch(t){var n;let r=Math.max(W7,t);(n=s(this,me).map)==null||n.setMinPitch(r),s(this,ve).cameraSystem.minTilt=Te.degToRad(r)}setMaxPitch(t){var n;let r=Math.min(H7,t);(n=s(this,me).map)==null||n.setMaxPitch(r),s(this,ve).cameraSystem.maxTilt=Te.degToRad(r)}get bearing(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getBearing():Te.radToDeg(s(this,ve).cameraSystem.getRotation())}setBearing(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setBearing(t);return}s(this,ve).cameraSystem.setRotation(Te.degToRad(t))}get pitch(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getPitch():Te.radToDeg(s(this,ve).cameraSystem.getTilt())}setPitch(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setPitch(t);return}s(this,ve).cameraSystem.setTilt(Te.degToRad(Vn(t,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")))}get elevation(){return s(this,ve).cameraSystem.getPedestal()}setElevation(t){s(this,ve).cameraSystem.setPedestal(t,!0)}animateElevation(t,r){return s(this,Vs)&&s(this,Vs).stop(),new Promise(n=>{var i;s(this,ve).cameraSystem.animateCamera({position:{z:t}},(r==null?void 0:r.duration)||300,id[(r==null?void 0:r.easing)||"ease-in-out"],n,n,{interruptible:(i=r==null?void 0:r.interruptible)!=null?i:!0})})}get insetsPadding(){return s(this,Ui).insetsPadding}get panMode(){return s(this,ve).cameraSystem.enablePan===!1&&s(this,ve).cameraSystem.enablePedestal===!0?"elevation":"default"}setPanMode(t){if(t!=="default"&&t!=="elevation")throw new Error("Invalid pan mode");t!==this.panMode&&(t==="default"?(s(this,ve).cameraSystem.enablePan=!0,s(this,ve).cameraSystem.enablePedestal=!1):(s(this,ve).cameraSystem.enablePan=!1,s(this,ve).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Ui).insetsPadding=Object.assign({},s(this,Ui).insetsPadding,t)}animateTo(t){var u,c,m,d,f,g;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map)return(g=s(this,me).map)==null||g.flyTo({center:(u=t.center)!=null?u:this.center,zoom:(c=t.zoomLevel)!=null?c:this.zoomLevel,bearing:(m=t.bearing)!=null?m:this.bearing,pitch:(d=t.pitch)!=null?d:this.pitch,duration:(f=t.duration)!=null?f:600}),Promise.resolve();let r=t.center?s(this,me).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0,n=t.zoomLevel!==void 0?s(this,ve).cameraSystem.convertZoomLevelToAltitude(Vn(t.zoomLevel,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits.")):void 0,i=t.bearing!==void 0?Te.degToRad(t.bearing):void 0,a=t.pitch!==void 0?Te.degToRad(Vn(t.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0;return new Promise(v=>{var b;s(this,ve).cameraSystem.animateCamera({position:r,zoom:n,rotation:i,tilt:a},t.duration||0,id[t.easing||"ease-in-out"],()=>{s(this,ve).interactionSystem.handleHover(),v()},v,{interruptible:(b=t==null?void 0:t.interruptible)!=null?b:!0})})}getCameraFrameForCoordinates(t,r){let n=pt(this,Ws,og).call(this,r||{},()=>Promise.resolve()),{pointCloud:i}=JE(t,s(this,me),s(this,Ui).geometry3DMap);if(i.length===0)return Se.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};let{center:a,zoomLevel:u}=s(this,ve).cameraSystem.getCameraFrameForCoordinates(i,n);return{center:s(this,me).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,r){var u,c,m,d;let{pointCloud:n,geoBounds:i,firstPosition:a}=JE(t,s(this,me),s(this,Ui).geometry3DMap);return n.length===0?(Se.error("No valid coordinates found in targets:",t),Promise.resolve()):s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(n.length===1&&a?(u=s(this,me).map)==null||u.flyTo({center:[a[0],a[1]],duration:(r==null?void 0:r.duration)||s(this,me).map.getBearing(),animate:!0,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,zoom:(r==null?void 0:r.maxZoomLevel)||s(this,me).map.getMaxZoom()}):(K7&&J7(s(this,me),i),(d=s(this,me).map)==null||d.fitBounds(i,{duration:(c=r==null?void 0:r.duration)!=null?c:vn.DEFAULT_ANIMATION_DURATION,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,maxZoom:(m=r==null?void 0:r.maxZoomLevel)!=null?m:s(this,me).map.getMaxZoom()})),s(this,ve).interactionSystem.handleHover(),Promise.resolve()):new Promise(f=>{s(this,ve).cameraSystem.focusOn(n,pt(this,Ws,og).call(this,r||{},f))})}};me=new WeakMap,ve=new WeakMap,Ui=new WeakMap,Vs=new WeakMap,Ws=new WeakSet,og=o(function(t,r){var n;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,ve).cameraSystem.convertZoomLevelToAltitude(Vn(t.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(t==null?void 0:t.minZoomLevel)===void 0?void 0:s(this,ve).cameraSystem.convertZoomLevelToAltitude(Vn(t.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:t!=null&&t.padding?Object.assign({},Jc,t==null?void 0:t.padding):this.insetsPadding,curve:id[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:Te.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?Te.degToRad(Vn(t.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0,duration:t==null?void 0:t.duration,callback:o(()=>{s(this,ve).interactionSystem.handleHover(),r()},"callback"),cancelledCallback:r,interruptible:(n=t==null?void 0:t.interruptible)!=null?n:!0,verticalPadding:t==null?void 0:t.verticalPadding}},"#convertToLegacy"),o(ag,"Camera");var od=ag;function ig(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}o(ig,"updateBounds");function JE(e,t,r){var c;let n=[],i=[1/0,1/0,-1/0,-1/0],a=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:i,firstPosition:a};let u=t.getSystems().renderSystem;for(let m of e)if(typeof m=="string"){(u.threeDdirty||u.twoDdirty)&&t.renderSync();let d=r.get(m);if(!d){Se.error("Entity not found with id:",m);continue}let f=new rr;f4(t,"userData"in d&&(c=d.userData.entityId)!=null?c:d.id,n,f,d instanceof nr?d.position.z:void 0);let g=t.convert3DMapPositionToCoordinate(f.min),v=t.convert3DMapPositionToCoordinate(f.max);ig(i,g),ig(i,v),a||(a=t.convert3DMapPositionToCoordinate(f.getCenter(new ne)))}else n.push(t.convertTo3DMapPosition(m[1],m[0],m[2]||0)),ig(i,m),a||(a=m);return{pointCloud:n,geoBounds:i,firstPosition:a}}o(JE,"processTargets");function J7(e,t){var n,i,a,u;let r=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(i=e.map)!=null&&i.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(a=e.map)==null||a.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:r}}}),(u=e.map)==null||u.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}o(J7,"drawBounds");var ug="";var Fu=!1,X7=150,cg=class cg extends Le{constructor(r,n,i=!0){super();h(this,"worker");h(this,"debugContext");h(this,"debugCanvas");h(this,"collidersDirty",!0);h(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);h(this,"visibleCollidersQTree",new tn(new Fe(0,0,0,0)));h(this,"interactiveCollidersQTree",new tn(new Fe(0,0,0,0)));h(this,"coreState");h(this,"postMessage");h(this,"showCollisionBoxes",o(()=>{Fu=!0,this.debugCanvas.style.display="block"},"showCollisionBoxes"));h(this,"hideCollisionBoxes",o(()=>{Fu=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"},"hideCollisionBoxes"));h(this,"currentMsgId","");h(this,"working",!1);h(this,"_postMessage",o(()=>{this.worker.postMessage(this.packedMessage)},"_postMessage"));h(this,"componentArray",[]);h(this,"update",o((r,n,i="bottom-left",a=!1,u=[])=>{let c=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let f;for(let g of this.coreState.geometry2DsInScene)f=g.components[0],this.componentArray.push(f);this.resize(r,n,i),this.collidersDirty=!1,c=!0}else c=this.componentArray.some(f=>f.collisionDirty===!0);c&&this.componentArray.sort((f,g)=>g.rank-f.rank);let m=0;for(let f of u)this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=[[f.h/2,f.h/2,f.w/2,f.w/2,Kp]],this.packedMessage[0][m][1]=1,this.packedMessage[0][m][2]=1,this.packedMessage[0][m][3]=f.x,this.packedMessage[0][m][4]=f.y,this.packedMessage[0][m][5]=0,this.packedMessage[0][m][6]=-1,m++;let d=0;for(;m<this.componentArray.length+u.length;){if(this.packedMessage){let f=this.componentArray[d].toPackedMessage(a&&!c);this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=f.bboxes,this.packedMessage[0][m][1]=f.enabled&&this.componentArray[d].visible&&!this.componentArray[d].isOccluded?1:0,this.packedMessage[0][m][2]=f.rank===Aa?1:0,this.packedMessage[0][m][3]=f.x,this.packedMessage[0][m][4]=f.y,this.packedMessage[0][m][5]=f.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][m][6]=f.lockedToStrategyIndex}m++,d++}this.working||this.postMessage()},"update"));h(this,"resolve",o(r=>{if(this.working=!1,this.collidersDirty||!r.data)return;let n=r.data.colliders,i=-1,a,u,c,m=new Fe(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new tn(m),this.interactiveCollidersQTree=new tn(m),Fu)for(let d of r.data.staticColliders)this.visibleCollidersQTree.insert(new Fe(d.x,d.y,d.w,d.h));for(let d=0;d<this.componentArray.length;d++){let f=this.componentArray[d];if(n[d]==null)continue;i=n[d][0],a=n[d][2];let g=f.offscreen,v=n[d][1]===1;f.offscreen=v,i!==-1&&a!=null?(c=new Fe(a.x,a.y,a.w,a.h,{entityId:f.id}),this.visibleCollidersQTree.insert(c),u=this.coreState.geometry2DMap.get(f.id),(u==null?void 0:u.components[1])!=null&&this.interactiveCollidersQTree.insert(c),(f.canShow===!1||f.visibilityNeedsUpdate!==!1||g&&!v)&&"visibilityNeedsUpdate"in f&&(f.visibilityNeedsUpdate="show"),i!==-1&&i!==f.currentStrategyIndex&&(f.activeBoundingBox=c,f.onStrategySelected(i))):((f.canShow===!0||f.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in f&&(f.visibilityNeedsUpdate="hide"),i!==-1&&i!==f.currentStrategyIndex&&f.onStrategySelected(i))}Fu&&this.drawDebug(),this.publish("visibility-changed")},"resolve"));h(this,"drawDebug",o(()=>{Fu&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))},"drawDebug"));h(this,"destroy",o(()=>{this.worker.terminate()},"destroy"));this.worker=i===!1?new rs:ug!==""?new Worker(ug):new Worker(URL.createObjectURL(new Blob([rb],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new rs,this.worker.onmessage=a=>this.resolve(a)},this.coreState=n,this.debugCanvas=r,this.debugContext=r.getContext("2d"),this.worker.onmessage=a=>this.resolve(a),this.postMessage=Sa(this._postMessage,X7),Fu?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(r,n,i){this.packedMessage[6]=i,this.packedMessage[5]=n,this.packedMessage[4]=r,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};o(cg,"CollisionSystem");var ad=cg;l();l();l();l();var mg=class mg{constructor(t){h(this,"type");h(this,"event");this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};o(mg,"Tap");var ud=mg,dg=class dg{constructor(){h(this,"taps",[])}add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};o(dg,"TapsController");var sd=dg;l();function pg(e){let t=new Set;for(let r of e){let n=r.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!t.has(n.parent);)n=n.parent,n instanceof nr&&n.type==="group-container"&&n.visible&&n.components[0]&&t.add(n)}return Array.from(t)}o(pg,"getUniqueIntersectedGroupContainers");var fg=class fg extends Le{constructor(r,n,i,a,u){super();h(this,"raycaster",new Zn);h(this,"state",{hovered3DEntity:void 0,hovered2DEntities:new Set,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});h(this,"coreState");h(this,"camera");h(this,"worldPlane");h(this,"_quadtree",new tn(new Fe(0,0,0,0)));h(this,"_container");h(this,"lastPointerEvent");h(this,"cursor","grab");h(this,"touchesCount",0);h(this,"isUserMovingCamera");h(this,"hasTouched",!1);h(this,"onPointerMove",Sa(r=>{r&&(r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor())},y.env.NODE_ENV==="test"?0:16,{leading:!0}));h(this,"tapsControl",new sd);h(this,"onPointerDown",o(r=>{r.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:r.timeStamp,offsetX:r.offsetX,offsetY:r.offsetY},this.lastPointerEvent=r,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&(this.tapsControl.add(new ud(r)),this.touchesCount=Math.max(0,this.touchesCount+1)))},"onPointerDown"));h(this,"clickTimeout");h(this,"onPointerUp",o(r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this.lastPointerEvent=r,this.touchesCount=Math.max(0,this.touchesCount-1),this.touchesCount===0&&(this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)),this.updateInteractionStateIfPanning(r);let{mouseDownStart:n}=this.state.interaction;!n||this.state.interaction.distanceFromMouseDown==null||(Date.now()<n.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(r.pointerType==="touch"&&!this.isUserMovingCamera()?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())},"onPointerUp"));h(this,"dirty3D",!0);h(this,"cachedHitBoxes",{entities:[]});h(this,"ndcPoint",new Ae);h(this,"debugPanel");this.isUserMovingCamera=u,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=i,this._container=r,this.coreState=n,this.worldPlane=a,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMove,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}getThreeDIntersectsFromXY(r){this.raycaster.setFromCamera(r,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(a=>{var u,c;return((u=a.object)==null?void 0:u.name)==="worldPlane"||((c=a.object)==null?void 0:c.visible)}),i=n.findIndex(a=>{var u;return((u=a.object)==null?void 0:u.name)==="worldPlane"});return i!==-1&&n.push(n.splice(i,1)[0]),n}getGroupContainerIntersectsFromXY(r){let n=this.getThreeDIntersectsFromXY(r),i;return n!=null&&n.length>0&&(i=pg(n)),i}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){let n=r||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserMovingCamera())return;let{entity3D:i,entity2D:a,position:u,groupContainers:c}=this.intersect(n);(this.detect3DEntityHover(i)||this.detect2DEntityHover(a)||this.detect3DContainerHover(c))&&(this.state.hovered3DEntity=i,this.state.lastHover=i,this.state.hovered2DEntities=new Set(a.map(m=>m.id)),this.state.hovered3DContainers=c,this.publish("hover",{entity2D:a,entity3D:this.state.hovered3DEntity,position:u,groupContainers:c})),this.handleCursor()}handleCursor(){var u;let r=!!(this.state.hovered3DEntity&&((u=this.state.hovered3DEntity)!=null&&u.components[2])||this.state.hovered2DEntities.size>0),n=!!this.state.interaction.mouseDownStart,i=this.state.interaction.isPanning,a=eB(r,i,n);this.cursor!==a&&(this.cursor=a,a==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(r){if(r.length!==this.state.hovered2DEntities.size)return!0;for(let n=0;n<r.length;n++)if(!this.state.hovered2DEntities.has(r[n].id))return!0;return!1}handleClick(r){let n=this.intersect(r);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let r;for(let n of this.coreState.geometry3DIdsInScene)r=this.coreState.geometry3DMap.get(n),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model"||(r==null?void 0:r.type)==="path"||(r==null?void 0:r.type)==="custom-geometry")&&r.components[0].mesh&&!this.cachedHitBoxes.entities.includes(r.components[0].mesh)&&this.cachedHitBoxes.entities.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var S,I,C,k,V;let{offsetX:n,offsetY:i}=r,a=[n,i],c=this._quadtree.queryPoint(a).filter(z=>z.intersectsPoint(a));this.ndcPoint.x=n/this._container.clientWidth*2-1,this.ndcPoint.y=-(i/this._container.clientHeight)*2+1;let m=this.getThreeDIntersectsFromXY(this.ndcPoint),d=(S=m[0])==null?void 0:S.point,f=[],g=[],v=m.filter(z=>z.object.name!=="worldPlane");for(let z of v)z.object instanceof Pe&&z.object.material.depthTest===!1?f.push(z):g.push(z);let b=(C=(I=f[0])!=null?I:g[0])!=null?C:void 0,D,A;if(b!=null){if(D=rB(b.object,this.coreState.geometry3DMap),!D){let z=(k=b==null?void 0:b.instanceId)!=null?k:b==null?void 0:b.batchId;D=z!=null&&(b!=null&&b.object.userData.entities)?this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entities[z]):this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entityId)}D!=null&&D.components[2]&&(A=D)}let x=pg(v),E=[];for(let z of c)if(((V=z==null?void 0:z.userData)==null?void 0:V.entityId)==="watermark")E.push({id:"watermark"});else{let M=this.coreState.geometry2DMap.get(z==null?void 0:z.userData.entityId);M&&E.push(M)}return nB(E),{entity2D:E,entity3D:A,position:d,groupContainers:x.length>0?x:void 0}}detect3DEntityHover(r){return this.state.lastHover!==r&&(this.state.lastHover&&r6(this.state.lastHover,!1,this.coreState),r&&r6(r,!0,this.coreState)),this.state.hovered3DEntity!==r}detect3DContainerHover(r){return!n4(this.state.hovered3DContainers,r)}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.offsetX-this.state.interaction.mouseDownStart.offsetX,2)+Math.pow(r.offsetY-this.state.interaction.mouseDownStart.offsetY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.worldPlane],!1)}destroy(){this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMove,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",n=>{var i,a,u;this.queueDebugMessage("CLICK \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.map(c=>c.id).join(", ")," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var i,a,u;this.queueDebugMessage("HOVER \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.map(c=>c.id).join(", ")," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,n){var a;let i=document.createElement("pre");i.style.maxWidth="300px",i.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",i.style.backgroundColor=n,i.textContent=r,(a=this.debugPanel)==null||a.prepend(i),setTimeout(()=>{i.style.opacity="0",setTimeout(()=>{i.remove()},500)},2500)}getCursor(){return this.cursor}};o(fg,"InteractionSystem");var Hs=fg;function r6(e,t,r){var u;let n=e.components[2];n&&n.hover!==!0&&(n.hover=t?"user-interaction":!1,n.dirty=!0);let i=(u=e.components[0].textMesh)==null?void 0:u.userData.entityId;if(!i)return;let a=r.geometry3DMap.get(i);(a==null?void 0:a.type)==="text3d"&&(a.components[1].hoverByPolygon=t,a.components[1].dirty=!0)}o(r6,"updateHover");function eB(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}o(eB,"processCursor");function tB(e){let t=e;for(;t!=null&&t.parent;){if(t instanceof Xi)return;if(t.userData.isSingleModel)return t;t=t.parent}}o(tB,"findModelParent");function rB(e,t){let r=tB(e);return r?t.get(r.userData.entityId):void 0}o(rB,"findModelParentEntity");function nB(e){if(e.length<=1)return;let t=[],r=[];for(let i=0;i<e.length;i++){let a=e[i];a.type==="marker"?t.push(a):r.push(a)}if(t.length>1){let i,a;t.sort((u,c)=>{i=u.components[0],a=c.components[0];let m=i.projection.y,d=a.projection.y;return m!==d?d-m:i.markerContainer.compareDocumentPosition(a.markerContainer)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})}if(r.length>1){let i=[];for(let a=0;a<r.length;a++){let u=r[a],c=u.components[0];i.push({entity:u,y:c.projection.y,idx:a})}i.sort((a,u)=>a.y!==u.y?u.y-a.y:u.idx-a.idx);for(let a=0;a<i.length;a++)r[a]=i[a].entity}let n=0;for(let i=0;i<t.length;i++)e[n++]=t[i];for(let i=0;i<r.length;i++)e[n++]=r[i]}o(nB,"sort2DEntitiesByVisualPriority");l();l();var ta,go,cd,yo,n6,qs,ld,i6,o6,Js,md,Xs,Ys,dd,hg=class hg{constructor(t){L(this,yo);L(this,ta,null);L(this,go);h(this,"getCurrentSceneGLTF",o(async t=>{let r=R({onlyVisible:!0,binary:!0,light:!0,scale:1},t),n=await pt(this,yo,n6).call(this),i=s(this,cd).call(this,r),a=await n.parseAsync(i,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),u;if(a instanceof ArrayBuffer)u=new Blob([a],{type:"application/octet-stream"});else{let c=JSON.stringify(a,null,2);u=new Blob([c],{type:"text/plain"})}return u},"getCurrentSceneGLTF"));L(this,cd,o(t=>{let{scale:r,light:n,onlyVisible:i}=t,a=new Xi,u=new rr().setFromObject(s(this,go).geometryScene);if(s(this,qs).call(this,s(this,go).geometryScene,a,i),n){let c=new Vc(16777215,.3*Math.PI);c.position.set(0,Math.max(u.max.x,u.max.y)*r*.5,u.max.y*r*4),c.lookAt(0,0,-1),c.target.position.set(0,0,-1),c.add(c.target),a.add(c)}return a},"#getExportedScene"));L(this,qs,o((t,r,n)=>{t.material&&(t instanceof $c?pt(this,yo,i6).call(this,t).forEach(i=>r.add(i)):t instanceof To&&r.add(pt(this,yo,o6).call(this,t))),t.children.forEach(i=>{(!n||i.visible)&&s(this,qs).call(this,i,r,n)})},"#processObject3D"));L(this,ld,o((t,r,n)=>{let i=new qu({color:new Ot(t),metalness:0});return i.opacity=r,i.transparent=n,i},"#createStandardMaterial"));L(this,Js,o(t=>{let{geometry:r,material:n,position:i,rotation:a,quaternion:u,scale:c}=t;if(!(r!=null&&r.isBufferGeometry))return t;let m=r.attributes.position,d=r.attributes.normal,f=r.attributes.uv;return s(this,md).call(this,m,d),s(this,Ys).call(this,i,c,a,u),f&&s(this,dd).call(this,f),n!=null&&n.map&&r.type==="PlaneGeometry"&&(t.side=hi),t},"#convertGeometry"));L(this,md,o((t,r)=>{let n=new ne,i=new ne;for(let a=0;a<t.count;a++)n.fromBufferAttribute(t,a),s(this,Xs).call(this,n),t.setXYZ(a,n.x,n.y,n.z),r&&(i.fromBufferAttribute(r,a),s(this,Xs).call(this,i),r.setXYZ(a,i.x,i.y,i.z))},"#convertAttributes"));L(this,Xs,o(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));L(this,Ys,o((t,r,n,i)=>{let a=t.y;t.y=t.z,t.z=-a;let u=r.y;if(r.y=r.z,r.z=u,n instanceof xa)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let c=i.y;i.set(i.x,i.z,-c,i.w)}},"#convertObjectProperties"));L(this,dd,o(t=>{for(let r=0;r<t.count;r++){let n=t.getX(r),i=t.getY(r);t.setXY(r,n,i)}},"#convertUVs"));K(this,go,t)}destroy(){K(this,ta,null)}};ta=new WeakMap,go=new WeakMap,cd=new WeakMap,yo=new WeakSet,n6=o(async function(){if(!s(this,ta)){let{GLTFExporter:t}=await import("./GLTFExporter-OK5VBG3G.js");K(this,ta,new t)}return s(this,ta)},"#getGLTFExporter"),qs=new WeakMap,ld=new WeakMap,i6=o(function(t){var u,c;let r=[],i=((u=t.userData)!=null&&u.entities?Object.values((c=t.userData)==null?void 0:c.entities):[]).map(m=>s(this,go).geometry3DMap.get(m)),a=new Map;return i.forEach(m=>{var b;if(!m||!(m instanceof at))return;let d=m.components[1],f=m.components[2];if(!d.visible||d instanceof Hn&&d.opacity===0||d instanceof es||d instanceof el)return;let g=f!=null&&f.hover?d.hoverColor||s(this,go).hoverColor:d.color,v="".concat(g,"-").concat(d.opacity,"-").concat(Number(d.visible));a.has(v)||a.set(v,[]),(b=a.get(v))==null||b.push(m)}),a.forEach((m,d)=>{let[f,g,v]=d.split("-"),b=m.reduce((E,S)=>{if(S.type==="custom-geometry")return E;let I=S.components[0];return"geometry"in I&&I.geometry instanceof Uc&&E.push(I.geometry),E},[]);if(b.length===0){Se.error("No geometries found for batched mesh");return}let D=s(this,ld).call(this,f,Number(g),t.material.transparent),A=en(b,!0);if(!A){Se.error("No merged geometry found for batched mesh");return}let x=new Pe(A,D);x.position.copy(t.position),x.rotation.copy(t.rotation),x.scale.copy(t.scale),x.visible=!!v,s(this,Ys).call(this,x.position,x.scale,x.rotation,x.quaternion),r.push(s(this,Js).call(this,x))}),r},"#processBatchedMesh"),o6=o(function(t){let r=t.geometry.clone(),n=t.material,i=new fr({color:n.color,side:hi});i.opacity=n.opacity,i.transparent=n.transparent;let a=new To(r,i);return a.position.copy(t.position),a.rotation.copy(t.rotation),a.scale.copy(t.scale),a.visible=t.visible,s(this,Js).call(this,a)},"#processLineSegments"),Js=new WeakMap,md=new WeakMap,Xs=new WeakMap,Ys=new WeakMap,dd=new WeakMap,o(hg,"ExporterSystem");var Ks=hg;l();l();var iB="gray",oB=.1,Qs=100,gg=new Wn.ClipperOffset;function aB(e,t){gg.Clear(),t/=2;let r=e.map(i=>({X:i.x*Qs,Y:i.y*Qs}));gg.AddPath(r,Wn.JoinType.jtMiter,Wn.EndType.etClosedPolygon);let n=new Wn.Paths;return gg.Execute(n,t*Qs),n.length?n.map(a=>a.map(u=>({x:u.X/Qs,y:u.Y/Qs}))):[e]}o(aB,"offset");function fd(e,t,r){var b,D,A,x,E;let{color:n=iB,opacity:i=1,altitude:a=0,height:u=oB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a},center:{x:0,y:0,z:(u+a)/2}},d=e.geometry.coordinates[0].map(S=>{let I=t(S[1],S[0]);return c.min.x=Math.min(c.min.x,I.x),c.min.y=Math.min(c.min.y,I.y),c.max.x=Math.max(c.max.x,I.x),c.max.y=Math.max(c.max.y,I.y),I});((D=(b=e.properties)==null?void 0:b.style)==null?void 0:D.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((A=e.properties)==null?void 0:A.image)!=null?d=aB(d,((E=(x=e.properties)==null?void 0:x.style)==null?void 0:E.edgeOffset)||0):d=[d];let f=[];for(let S of d){let I=new Ca;I.moveTo(S[0].x,S[0].y),S.slice(1).forEach(z=>I.lineTo(z.x,z.y)),I.lineTo(S[0].x,S[0].y);let C=e.geometry.coordinates.slice(1);I.holes=C.map(z=>{let M=z.map(Z=>t(Z[1],Z[0])),T=new Ea;return T.moveTo(M[0].x,M[0].y),M.slice(1).forEach(Z=>T.lineTo(Z.x,Z.y)),T.lineTo(M[0].x,M[0].y),T});let k=Yu(r==null?void 0:r.bevel,u),V=new Ia(I,k);V.userData={style:{color:n,opacity:i},usedBevelSettings:k},f.push(V)}if(f.length===1)return f[0];let g=en(f);f.forEach(S=>S.dispose());let v=Yu(r==null?void 0:r.bevel,u);return g.userData={style:{color:n,opacity:i},usedBevelSettings:v,_split:!0},g}o(fd,"renderPolygonGeometry");l();var uB="gray",sB=.1;function hd(e,t,r){let{color:n=uB,opacity:i=1,altitude:a=0,height:u=sB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a}},m=Yu(r==null?void 0:r.bevel,u),d=[];e.geometry.coordinates.forEach(g=>{let v=new Ca,b=g[0].map(x=>{let E=t(x[1],x[0]);return c.min.x=Math.min(c.min.x,E.x),c.min.y=Math.min(c.min.y,E.y),c.max.x=Math.max(c.max.x,E.x),c.max.y=Math.max(c.max.y,E.y),E});v.moveTo(b[0].x,b[0].y),b.slice(1).forEach(x=>v.lineTo(x.x,x.y)),v.lineTo(b[0].x,b[0].y);let D=g.slice(1);v.holes=D.map(x=>{let E=x.map(I=>t(I[1],I[0])),S=new Ea;return S.moveTo(E[0].x,E[0].y),E.slice(1).forEach(I=>S.lineTo(I.x,I.y)),S.lineTo(E[0].x,E[0].y),S});let A=new Ia(v,m);d.push(A)});let f=en(d);return d.forEach(g=>g.dispose()),f.translate(0,0,a||0),f.userData={style:{color:n,opacity:i},usedBevelSettings:m},f}o(hd,"renderMultiPolygonGeometry");l();var Tr=100,cB=.22,lB=.01;function a6(e,t,r={}){let{width:n=cB,height:i=lB,color:a="gray",opacity:u=1,altitude:c=0}=r,m={min:{x:1/0,y:1/0,z:c},max:{x:-1/0,y:-1/0,z:c+i}},d={bevelEnabled:!1,depth:i},f=new Wn.ClipperOffset,g=e.geometry.coordinates.map(A=>A.map(x=>t(x[1],x[0])));f.AddPaths(g.map(A=>A.map(x=>({X:x.x*Tr,Y:x.y*Tr}))),Wn.JoinType.jsMiter,Wn.EndType.etOpenRound);let v=new Wn.PolyTree;f.Execute(v,n/2*Tr);let b=[];for(let A of v.m_AllPolys){let x=new Ca;if(A.IsHole())continue;m.min.x=Math.min(m.min.x,A.m_polygon[0].X),m.min.y=Math.min(m.min.y,A.m_polygon[0].Y),m.max.x=Math.max(m.max.x,A.m_polygon[0].X),m.max.y=Math.max(m.max.y,A.m_polygon[0].Y);let E=A.m_polygon;x.moveTo(E[0].X/Tr,E[0].Y/Tr),E.slice(1).forEach(S=>x.lineTo(S.X/Tr,S.Y/Tr)),x.lineTo(E[0].X/Tr,E[0].Y/Tr),x.holes=A.m_Childs.map(S=>{let I=new Ea,C=S.m_polygon;return I.moveTo(C[0].X/Tr,C[0].Y/Tr),C.slice(1).forEach(k=>I.lineTo(k.X/Tr,k.Y/Tr)),I.lineTo(C[0].X/Tr,C[0].Y/Tr),I}),b.push(new Ia(x,d))}let D=en(b);return D.translate(0,0,c||0),D.userData={style:{color:a,opacity:u}},f.Clear(),D}o(a6,"renderMultiLineStringGeometry");l();l();var Ou=oe.object({type:oe.enum(["Point"]),coordinates:oe.array(oe.number()).min(2).max(3)});var mB=oe.object({rotation:oe.array(oe.number()).length(3).optional(),altitude:oe.number().optional(),scale:oe.array(oe.number()).length(3).optional(),interactive:oe.boolean().optional(),verticalOffset:oe.number().optional(),id:oe.union([oe.number(),oe.string()]).optional()}),dB=oe.object({type:oe.enum(["Feature"]),geometry:Ou,properties:mB}),pB=oe.object({type:oe.enum(["FeatureCollection"]),features:oe.array(dB)}),fB=oe.object({color:oe.string()}),hB=oe.object({url:oe.string(),color:oe.string().optional(),opacity:oe.number().optional(),material:oe.record(oe.string(),fB).optional()});function s6(e,t,r){oe.union([oe.number(),oe.string()]).parse(e),pB.parse(t),hB.parse(r)}o(s6,"validateModelGroup");var ec,tc,rc,Pu,kn,yg=class yg{constructor(t){h(this,"mesh");h(this,"type","model");h(this,"positionDirty",!0);h(this,"outline");h(this,"geometry");h(this,"material");h(this,"feature");h(this,"instanceIndex",-1);L(this,ec,!0);h(this,"color",new Ot);h(this,"clippingPlane");h(this,"position",new ne);L(this,tc,0);L(this,rc,1);L(this,Pu,Jt.GEOMETRY);L(this,kn,!1);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:s(this,ec)}set visible(t){K(this,ec,t),this.mesh&&(this.mesh.visible=t)}setOpacity(){}setColor(){}get modelScene(){var t;return this.clippingPlane?(t=this.mesh)==null?void 0:t.children.find(r=>r.name!=="hole-fill-mesh"):this.mesh}get altitude(){return s(this,tc)}set altitude(t){this.modelScene&&(this.modelScene.position.z=t,K(this,tc,t))}getRotation(){return this.modelScene?[this.modelScene.rotation.x,this.modelScene.rotation.y,this.modelScene.rotation.z]:void 0}setRotation(t){this.modelScene&&this.modelScene.rotation.set(Te.degToRad(t[0]),Te.degToRad(t[1]),Te.degToRad(t[2]))}getScale(){return this.modelScene?[this.modelScene.scale.x,this.modelScene.scale.y,this.modelScene.scale.z]:void 0}setScale(t){var r;this.modelScene&&((r=this.modelScene)==null||r.scale.set(t[0],t[1],t[2]))}get opacity(){return s(this,rc)}set opacity(t){var r,n,i;if(this.mesh){if(this.mesh.children[0]instanceof Gn){for(let a of this.mesh.children)if(a instanceof Gn){((r=a.userData)==null?void 0:r.originalOpacity)===void 0&&(a.userData.originalOpacity=a.material.opacity);let u=_o(t,0,(n=a.userData)==null?void 0:n.originalOpacity,0,1);a.material.opacity=u,a.material.transparent=u<1,a.material.needsUpdate=!0}}else(i=this.mesh)==null||i.traverse(a=>{a instanceof Pe&&a.material&&(Array.isArray(a.material)?a.material.forEach(u=>{u6(u,t)}):u6(a.material,t))});K(this,rc,t)}}get renderOrder(){return s(this,Pu)}set renderOrder(t){var r;if(!(!this.mesh||t===s(this,Pu)))if(K(this,Pu,t),this.mesh.children[0]instanceof Gn){this.mesh.renderOrder=t;for(let n of this.mesh.children)n instanceof Gn&&(n.material.depthWrite=!s(this,kn),n.material.depthTest=!s(this,kn),n.material.needsUpdate=!0)}else(r=this.mesh)==null||r.traverse(n=>{n instanceof Pe&&n.material&&(n.renderOrder=t,Array.isArray(n.material)?n.material.forEach(i=>{i.depthWrite=!s(this,kn),i.depthTest=!s(this,kn),i.needsUpdate=!0}):(n.material.depthWrite=!s(this,kn),n.material.depthTest=!s(this,kn),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,kn)}set visibleThroughGeometry(t){K(this,kn,t)}};ec=new WeakMap,tc=new WeakMap,rc=new WeakMap,Pu=new WeakMap,kn=new WeakMap,o(yg,"ModelComponent");var bo=yg;function u6(e,t){e.opacity!==t&&(t===1?(e.opacity=1,e.transparent=!1):(e.opacity=t,e.transparent=!0),e.needsUpdate=!0)}o(u6,"updateMaterialOpacity");l();function gd(e){var c,m;let t=e.components[0],r=e.components[1];r.opacity!=null&&r.opacity!==t.opacity&&(t.opacity=r.opacity);let n=r.material,i=r.color;if(n||i){let d=gB(i,n);(c=t.mesh)==null||c.traverse(f=>{f instanceof Pe&&f.material&&(Array.isArray(f.material)?f.material.forEach(g=>{d[g.name]?(g.color.set(d[g.name].color),g.vertexColors=!1):g.color.set(i)}):d[f.material.name]?(f.material.color.set(d[f.material.name].color),f.material.vertexColors=!1):f.material.color.set(i))})}let a=(m=t.feature.geometry.coordinates[2])!=null?m:0,u=r.verticalOffset+a;t.altitude!==u&&(t.altitude=u),r.visible!==t.visible&&(t.visible=r.visible),r.rotation&&t.setRotation(r.rotation),r.scale&&t.setScale(r.scale),r.visibleThroughGeometry!==t.visibleThroughGeometry&&(t.visibleThroughGeometry=r.visibleThroughGeometry)}o(gd,"applyModelGeometryStyle");function gB(e,t){let r={};if(t)for(let n in t)t[n].color&&(r[n]={color:t[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let i of n)r[i]||(r[i]={color:e})}return r}o(gB,"consolidateColorAndMaterial");function c6(e,t){var u,c;let r=e.components[0],i=(u=e.components[1].verticalOffset)!=null?u:0,a=r.feature.geometry.coordinates.slice();a[2]=((c=a[2])!=null?c:0)+i,r.mesh?r.mesh.position.copy(t(a)):r.position.copy(t(a))}o(c6,"applyModelPosition");function zi(e){return e instanceof Lt?e.material:null}o(zi,"getMaterial");function l6(e){return e.side===Hu?"back":e.side===Bo?"front":"double"}o(l6,"getMaterialSide");function m6(e,t){e.side=t==="back"?Hu:t==="front"?Bo:hi}o(m6,"setMaterialSide");function yB(e){let t=e[1],r=e[6],{opacity:n}=t!=null?t:{},{texture:i,topTexture:a}=r!=null?r:{};return"".concat(n).concat((i==null?void 0:i.path)||"").concat((a==null?void 0:a.path)||"")}o(yB,"generateIndex");var bg=class bg extends Le{constructor(r,n){super();h(this,"state");h(this,"convertTo3DMapPosition");h(this,"loader");h(this,"optimizePromise",[]);this.state=r,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:r}=await import("./GLTFLoader-I7XRBPCD.js");return this.loader=new r,this.loader}createEntityFromFeature(r,n,i){var f,g,v,b;let a=new Lt(n),u=(f=n==null?void 0:n.properties)==null?void 0:f.bevel,c=i&&"bevel"in i?i.bevel:void 0,m;c?m=R(R({},u),c):u&&(m=u);let d=new at(a,new Hn(De(R({},i),{url:(v=(g=n.properties)==null?void 0:g.image)==null?void 0:v.path,bevel:m})));return i!=null&&i.outline&&(d.components[3]=new w4(O4(i.color))),i!=null&&i.focusable&&(d.components[4]=new ts),((b=n.properties)==null?void 0:b.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?d.components[6]=new Lo(n.properties.textures.find(D=>D.face==="side"),n.properties.textures.find(D=>D.face==="top")):(i!=null&&"texture"in i&&i.texture!=null||i!=null&&"topTexture"in i&&i.topTexture!=null)&&(d.components[6]=new Lo(i.texture,i.topTexture)),d.id=r,d}createModelFromFeature(r,n,i){let a=new bo(n),u=R({},i);n.properties.verticalOffset!=null&&(u.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(u.rotation=n.properties.rotation),n.properties.scale!=null&&(u.scale=n.properties.scale);let c=new el(u),m=new at(a,c);return m.id=r,m}populateEntityMesh(r,n){let i=r.components[0];i.geometry=n,i.batchedProps={range:{start:0,count:1/0,indexCount:1/0,indexStart:0,vertexCount:1/0,vertexStart:0,reservedVertexCount:1/0,reservedIndexCount:1/0},geometryId:-1,positionCount:n.attributes.position.count},i.currentHeight=r.components[1].height,i.dirty=!1}async populateModelGroup(r,n,i){let a=new Gr,u=new xa,c=new Nc,m=new ne,d=new Qi,f=await this.getGLTFLoader(),g=new Promise(v=>{let b=o(A=>{"entities3D"in i.userData&&(i.userData.entities3D.size>1?A.scene.traverse(x=>{let E=x;if("isMesh"in E&&E.isMesh===!0){let S=new Gn(E.geometry,E.material,r.size);S.userData={entities:{}},d.add(S),i.add(d)}}):(A.scene.traverse(x=>{"isMesh"in x&&x.isMesh===!0&&(x.position.set(0,0,0),x.rotation.set(0,0,0),x.scale.set(1,1,1),x.updateMatrix())}),d.add(A.scene),i.add(d),d.userData.isSingleModel=!0,d.userData.entityId=r.values().next().value,d.userData.type="model")),v()},"processGLTF");if(n.trimStart().startsWith("{")||n.startsWith("data:")&&n.includes("application/json")){let A=n.startsWith("data:")?atob(n.split(",")[1]):n;f.parse(A,"",b)}else f.load(n,b)});return this.optimizePromise.push(g.then(()=>{var D,A,x,E,S,I,C,k,V,z,M,T;let v=0,b;for(let Z of r.values()){if(b=this.state.geometry3DMap.get(Z),!b||(b==null?void 0:b.type)!=="model")continue;let j=b.components[0],W=b.components[1],$=b.components[0].feature;j.mesh=d,j.instanceIndex=v,gd(b),b.components[1].dirty=!1;let{x:q,y:J}=this.convertTo3DMapPosition($.geometry.coordinates[1],$.geometry.coordinates[0],0);j.position.set(q,J,j.altitude),u.set(Te.degToRad((A=(D=W.rotation)==null?void 0:D[0])!=null?A:Ma[0]),Te.degToRad((E=(x=W.rotation)==null?void 0:x[1])!=null?E:Ma[1]),Te.degToRad((I=(S=W.rotation)==null?void 0:S[2])!=null?I:Ma[2])),m.set((k=(C=W.scale)==null?void 0:C[0])!=null?k:Ba[0],(z=(V=W.scale)==null?void 0:V[1])!=null?z:Ba[1],(T=(M=W.scale)==null?void 0:M[2])!=null?T:Ba[2]),c.setFromEuler(u),a.compose(j.position,c,m),d.children.forEach(G=>{!b||(b==null?void 0:b.type)!=="model"||!(G instanceof Gn)||(G.setMatrixAt(v,a),G.userData.entities[v]=b.id)}),j.mesh.userData.isSingleModel&&(j.mesh.matrix.copy(a),j.mesh.matrix.decompose(j.mesh.position,j.mesh.quaternion,j.mesh.scale)),v++}this.publish("model-loaded")})),d}populateEntityGroup(r){var c;let n,i,a,u;for(let m of r.values())u=this.state.geometry3DMap.get(m),u.components[0]instanceof Lt&&(i=u.components[0].feature,a=u.components[1],i.geometry.type==="Polygon"?(n=fd(i,this.convertTo3DMapPosition,a),(c=i.properties)!=null&&c.textures&&i.properties.textures.length>0&&P4(n,i.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(u,n)):i.geometry.type==="MultiPolygon"?(n=hd(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="LineString"?(n=X4(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="MultiLineString"&&(n=a6(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)));return r}update(){var r;for(let n of this.state.geometryGroupIdsToLoad.values()){let i=this.state.geometry3DMap.get(n);if(i instanceof Kn&&i.userData.dirty){if(i.userData.modelURL)i.userData.modelURL&&(this.populateModelGroup(i.userData.entities3D,i.userData.modelURL,i),i.userData.dirty=!1);else try{this.populateEntityGroup(i.userData.entities3D)}catch(c){Se.warn(c)}let a,u={};for(let c of i.userData.entities3D.values()){a=this.state.geometry3DMap.get(c);let m=a==null?void 0:a.components[0];if((a==null?void 0:a.type)==="geometry"){let d=yB(a.components);u[d]===void 0&&(u[d]={style:a.components[1],entities:[]}),u[d].entities.push(a)}else m&&"mesh"in m&&m.mesh&&((r=m.mesh)==null?void 0:r.parent)!==i&&i.add(m.mesh)}for(let c in u){let m=F4(u[c].entities,u[c].style);i.add(m)}for(let c of i.userData.entities3D.values())if(a=this.state.geometry3DMap.get(c),a!=null&&a.entities2D.size>0)for(let m of a.entities2D.values())m&&(a.attach(m),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),i.userData.dirty=!1}}return Promise.resolve()}};o(bg,"MeshCreationAndOptimizationSystem");var yd=bg;l();var vg=class vg{constructor(t,r){h(this,"state");h(this,"dirty",!0);h(this,"domTree");this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.geometry2DMap.get(r.userData.entityId),t){let n=t.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(r),t){let n=t.components[0];n instanceof yi&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:t.id},this.domTree.appendChild(n.markerContainer),n.updateDimensionsIfZeroWidthHeight())}this.dirty=!1}}};o(vg,"DOMVisibilitySystem");var bd=vg;l();var xg=class xg{constructor(t,r){h(this,"state");h(this,"project");this.state=t,this.project=r}update(){let t=0,r=0,n,i;for(let a of this.state.geometry2DsInScene){i=a.components[0];let u=a.attachedTo?this.state.geometry3DMap.get(a.attachedTo):void 0;if(u instanceof at)if(this.state.geometry3DsInScene.has(u)){n=u.components[1],i=a.components[0],(n.dirty||a.components[0].attachedDirty)&&(t=n.height,r=n.altitude,a.setAltitude(t+r));let c=n.visible;i.visible!==c&&(i.visible=c)}else i.visible===!0&&(i.visible=!1);this.project(a.components[0].projection,a.position),a.components[0].attachedDirty=!1}}};o(xg,"TwoDProjectionSystem");var vd=xg;l();l();l();var bB=o(function(){let t,r;return n=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*n,t.height=500*n,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),d6=o(({text:e,size:t,maxWidth:r,pixelRatio:n,maxLines:i=2,lineHeight:a=1.2,options:u={strokeText:!0}})=>{let c="bold ".concat(t*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:m}=bB(n);m.font=c;let d=[],f=e.split(" "),g=0,v=0,b=0;for(;v<f.length;){let E=f[v];if(g===i&&g>0){d[g-1]+="...";break}if(d[g]==null&&(d[g]=E,v++),f.length===1){d[g]=E;break}if(f[v]==null)break;let{width:S}=m.measureText(d[g]+" "+f[v]);S<=r*n?(d[g]+=" "+f[v],v++):g++}d.forEach(E=>{let{width:S}=m.measureText(E);b=Math.max(S,b)});let D=t*n*a,A=d.length*D;return{maxWidth:b,maxHeight:A,lines:d.length,draw:o((E,S,I)=>{d.length===1?(u.strokeText&&E.strokeText(d[0],S,I),E.fillText(d[0],S,I)):(u.strokeText&&(E.strokeText(d[0],S,I-D/2),E.strokeText(d[1],S,I+D/2)),E.fillText(d[0],S,I-D/2),E.fillText(d[1],S,I+D/2))},"draw")}},"shaveText");l();function p6(e){let t=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?t.src="data:image/svg+xml;base64,".concat(btoa(e)):t.src=e),t}o(p6,"createImage");l();var vB=(()=>{let e;return{getDeviceType(){if(e)return e;let{userAgent:t,platform:r,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(t),a=r==="iPad"||r.indexOf("Mac")===0&&n>0&&!window.MSStream,u=/android/i.test(t);return e={isIpad:a,isMobile:u||i||a,isIOS:i,isAndroid:u,isSafari12:/Version\/12.+Safari/.test(t),isFirefox:/Firefox/.test(t),isWindows:/windows/i.test(t)},e},_reset(){e=void 0}}})(),f6=vB.getDeviceType,h6=(()=>{let e,t,r;function n(){if(t!==void 0)return t;e||(e=document.createElement("canvas"));let a=e.getContext("webgl")||e.getContext("experimental-webgl");if(!a)return t;try{let u=f6().isFirefox?null:a.getExtension("WEBGL_debug_renderer_info");return t=u?a.getParameter(u.UNMASKED_RENDERER_WEBGL):a.getParameter(a.RENDERER),t}catch(u){let c=new Error("Failed getting device info");throw c.name="FailedGettingDeviceInfo",c}}o(n,"getInfo");function i(){var u,c;if(!f6().isWindows)return!1;if(r!==void 0)return r;let a=(c=(u=xB())==null?void 0:u.toLowerCase())!=null?c:"";return r=a.includes("intel")&&(a.includes("uhd")||a.includes("iris")),r}return o(i,"shouldDisableOffscreenCanvas"),{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(a){e=a,t=void 0,r=void 0}}})(),xB=h6.getInfo,g6=h6.shouldDisableOffscreenCanvas;var Cg=class Cg extends Le{constructor(r,n,i){super();h(this,"dirty",!1);h(this,"state");h(this,"colliderContext");h(this,"colliderCanvas");h(this,"transformRequestFunc");h(this,"transformRequest",o(async r=>this.transformRequestFunc?await this.transformRequestFunc(r):{url:r},"transformRequest"));h(this,"pinCache",{});h(this,"imageCache",{});h(this,"imagePromiseCache",{});h(this,"imageDimensionsCache",{});h(this,"textCache",{});h(this,"update",o(r=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let i,a,u,c,m,d;for(let f of this.state.geometry2DsInScene)if((f==null?void 0:f.components[0])instanceof gi&&!f.disposed){if(d=f.components[0],m=d.appearance.iconVisible,d.appearance.icon!=null&&m!=null){let v=typeof m=="boolean"?m:r>=m;v!==d.iconVisible&&(d.iconVisible=v,d.dirty=!0)}if((d.pinDirty||d.dirty||this.dirty)&&d.calculatePinSize(),d.offscreen||!d.visible)continue;if(a={active:d.appearance.pinColor,inactive:d.appearance.pinColorInactive},u={active:d.appearance.pinOutlineColor,inactive:d.appearance.pinOutlineColorInactive},c=Lp(d.pinSize),i="".concat(a.active,"-").concat(a.inactive,"-").concat(u.active,"-").concat(u.inactive,"-").concat(c,"-").concat(d.iconVisible),d.labelCacheId=i,(!this.pinCache[i]||this.dirty)&&(this.prepare(d,i,this.colliderContext),d.dirty=!0),(d.appearance.icon&&(!d.imageHash||d.pinDirty)||this.dirty)&&this.cacheImage(d),this.textCache[d.id]==null||d.textDirty||this.dirty){d.dirty=!0,this.textCache[d.id]={};let{textDrawFn:v,width:b,height:D}=this.processText(d.text,d.appearance.textSize,d.appearance.maxWidth,d.appearance.maxLines,d.appearance.lineHeight);["left","center","right"].forEach(A=>{this.textCache[d.id][A]=this.textToCanvas(v,d.appearance.textSize,A,b,D,d.appearance.textColor,d.appearance.textOutlineColor)}),d.dimensions={width:Math.ceil(b/n),height:Math.ceil(D/n)}}let g=1;if(d.appearance.iconScale)if(typeof d.appearance.iconScale=="number")g=d.appearance.iconScale;else{let{on:v,input:b,output:D,easing:A}=d.appearance.iconScale;v==="zoom-level"?g=Lp(l4(r,b,D,A!=null?A:"linear")):Se.warn("Unsupported interpolation property: ".concat(v))}d.recomputeCurrentStrategy(d.iconVisible?g:1),d.canShow&&(d.enabled||d.visibilityNeedsUpdate!==!1)&&this.draw(d,i,this.colliderContext),d.textDirty=!1,d.pinDirty=!1}this.dirty=!1},"update"));h(this,"processText",o((r,n,i,a,u)=>{let c=this.state.pixelRatio,{draw:m,maxWidth:d,maxHeight:f}=d6({text:r,size:n,pixelRatio:c,maxWidth:i,maxLines:a,lineHeight:u});return{textDrawFn:m,width:d+2.5*c*2,height:f+2.5*c*2}},"processText"));h(this,"textToCanvas",o((r,n,i,a,u,c,m)=>{let d=this.state.pixelRatio,f,g=a,v=u;window.OffscreenCanvas!=null&&!g6()?f=new OffscreenCanvas(g,v):(f=document.createElement("canvas"),f.width=g,f.height=v,f.style.width=g+"px",f.style.height=v+"px");let b=f.getContext("2d",{willReadFrequently:!0});if(!b)return;let D=2.5*d;b.textAlign=i,b.font="bold ".concat(n*d,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),b.textBaseline="middle",b.lineJoin="miter",b.miterLimit=2,b.strokeStyle="white",b.lineWidth=D,b.fillStyle=c,b.strokeStyle=m;let A=i==="left"?D/2:i==="center"?g/2:g-D/2;return r(b,A,(v+D/2)/2),f},"textToCanvas"));h(this,"cacheImage",o(r=>{if(!r.appearance.icon)return;let n=b4(r.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(i=>{this.transformRequest(r.appearance.icon).then(a=>{let u=p6(a.url);u.onload=()=>{this.imageCache[n]=u,this.publish("img:loaded"),i(u)}})})),r.imageHash!==n&&(r.imageHash=n,this.imagePromiseCache[n].then(()=>{r.dirty=!0}))},"cacheImage"));h(this,"createPinCanvas",o((r,n,i,a,u=1)=>{let c,m=this.state.pixelRatio,d=r.totalPinSize*2*m*u;window.OffscreenCanvas!=null?c=new OffscreenCanvas(d,d):(c=document.createElement("canvas"),c.width=d,c.height=d,c.style.width=d/m+"px",c.style.height=d/m+"px");let f=c.getContext("2d");return f.shadowColor="rgba(0,0,0,0.3)",f.shadowOffsetY=2*m,f.shadowBlur=5*m,f.beginPath(),f.arc(d/2,d/2,(n/2+2.5*m/2)*u,0,2*Math.PI),f.fillStyle=i,f.fill(),f.beginPath(),f.arc(d/2,d/2,n/2*u,0,2*Math.PI),f.shadowColor="transparent",f.fillStyle=a,f.fill(),c},"createPinCanvas"));h(this,"prepare",o((r,n,i)=>{let a=this.state.pixelRatio;i.lineWidth=4*a;let u=typeof r.appearance.iconScale=="number"?[r.appearance.iconScale]:r.appearance.iconScale==null?[]:r.appearance.iconScale.output,c=u.length>0?Math.max(...u):void 0,m=this.createPinCanvas(r,r.pinSize,r.appearance.pinOutlineColor,r.appearance.pinColor,c),d=this.createPinCanvas(r,3.5*a,r.appearance.pinOutlineColorInactive,r.appearance.pinColorInactive,c);this.pinCache[n]=[m,d]},"prepare"));this.state=r,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=i}draw(r,n,i){var f;if(!r.canShow||!r.visible)return;i.save(),i.globalAlpha=r.currentOpacity;let a=this.state.pixelRatio,u=r.projection.x*a,c=r.projection.y*a,m=r.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],d=r.style.pinVisibility===1?r.scaledPinSize*a:r.totalPinSize*a;if(r.style.pinVisibility!==0&&i.drawImage(m,u-d,c-d,d*2,d*2),r.appearance.icon&&r.iconVisible&&r.imageHash&&r.appearance.iconSize&&this.imageCache[r.imageHash]&&r.style.pinVisibility===1){let g=this.imageCache[r.imageHash],v=(r.scaledPinSize-r.scaledIconPadding)*a,b=r.appearance.iconFit,D=v,A=v,x="".concat(r.imageHash,"_").concat(b);if(this.imageDimensionsCache[x])D=this.imageDimensionsCache[x].width,A=this.imageDimensionsCache[x].height;else{let E=g.width*a,S=g.height*a;if(b==="contain"){let I=Math.sqrt(E**2+S**2),C=v/I;D=E*C,A=S*C}if(b==="cover"){let I=v/E,C=v/S,k=Math.max(I,C);D=E*k,A=S*k}}i.save(),i.beginPath(),i.arc(u,c,v/2,0,2*Math.PI),i.closePath(),((f=r==null?void 0:r.appearance)==null?void 0:f.iconOverflow)!=="visible"&&i.clip(),i.drawImage(g,u-D/2,c-A/2,D,A),i.restore()}r.style.textLabelVisible&&r.style.textAlign!=null&&r.style.left!=null&&r.style.top!=null&&i.drawImage(this.textCache[r.id][r.style.textAlign],u+r.style.left*a,c+r.style.top*a),i.restore()}};o(Cg,"TwoDDrawSystem");var xd=Cg;l();function SB(e,t){let r=e.components[2],n=e.components[1];return r!=null&&r.hover?[n.hoverColor||t,n.hoverColor||t]:[n.color,n.topColor||n.color]}o(SB,"processColor");var Ig=class Ig{constructor(t,r){h(this,"state");h(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=r,this.state=t}determineTextureVisiblity(t,r,n){let i=zi(t);((i==null?void 0:i.texture)!=null||(i==null?void 0:i.topTexture)!=null)&&(n!=null&&n.hover&&i.texturesVisible?i.hideTextures(t.instanceIndex):i.texturesVisible||i.showTextures(t.instanceIndex),r.texture==null&&i.removeSideTexture(t.instanceIndex),r.topTexture==null&&i.removeTopTexture(t.instanceIndex))}update(){var n,i,a,u,c,m,d,f,g,v,b,D,A,x,E,S,I,C,k,V,z;let t,r;for(let M of this.state.geometry3DsInScene)if((M.type==="geometry"||M.type==="custom-geometry")&&((n=M.components[1])!=null&&n.dirty||(i=M.components[2])!=null&&i.dirty)){let T=M.components[0],Z=M.components[1];r=M.components[2];let j=SB(M,this.state.hoverColor);T.setColor(j[0],j[1]);let W=zi(T);if(Z.visible!==T.visible&&(T.visible=Z.visible,T instanceof Lt&&T.textMesh)){let q=this.state.geometry3DMap.get(T.textMesh.userData.entityId);(q==null?void 0:q.type)==="text3d"&&q.components[0].polygonEntityId!=null&&(q.components[0].visible=Z.visible)}Z.altitude!==T.altitude&&(T.altitude=Z.altitude);let $=Z.opacity*Oa(M);if($!==T.opacity&&(T.opacity=$),Z.renderOrder!==T.renderOrder&&(T.renderOrder=Z.renderOrder),W&&Z.side!==l6(W)&&m6(W,Z.side),T instanceof Lt&&Z.shading!=null&&(((a=Z.shading)==null?void 0:a.start)!==((u=zi(T))==null?void 0:u.getGradientShading().start)||((c=Z.shading)==null?void 0:c.end)!==((m=zi(T))==null?void 0:m.getGradientShading().end)||((d=Z.shading)==null?void 0:d.intensity)!==((f=zi(T))==null?void 0:f.getGradientShading().intensity))&&((E=zi(T))==null||E.setGradientShading((v=(g=Z.shading)==null?void 0:g.start)!=null?v:0,(D=(b=Z.shading)==null?void 0:b.end)!=null?D:0,(x=(A=Z.shading)==null?void 0:A.intensity)!=null?x:0)),Z.dirty=!1,T instanceof Lt){let q=M.components[6];q instanceof Lo&&this.determineTextureVisiblity(T,q,r)}M.components[2]&&(M.components[2].dirty=!1)}else if((M==null?void 0:M.type)==="model")M.components[1].dirty&&(gd(M),M.components[1].dirty=!1),M.components[0].positionDirty&&(c6(M,this.convertTo3DMapPosition),M.components[0].positionDirty=!1);else if((M==null?void 0:M.type)==="image"&&((S=M.components[1])!=null&&S.dirty)){t=M.components[0];let T=M.components[1];T.visible!==t.visible&&(t.visible=T.visible),T.dirty=!1}else if((M==null?void 0:M.type)==="text3d"&&((I=M.components[1])!=null&&I.dirty)&&M.components[0].polygonEntityId!=null){t=M.components[0];let T=M.components[1];T.visible!=null&&T.visible!==t.visible&&(t.visible=T.visible);let{textMesh:Z}=t;if(Z){Object.assign(Z,T.getState());let j=(C=T.hoverColor)!=null?C:this.state.text3dHoverColor;Z.color=T.hoverByPolygon?j:(k=T.color)!=null?k:Pa.color,Z.outlineColor=T.hoverByPolygon?j:(V=T.outlineColor)!=null?V:Pa.outlineColor,Z.strokeColor=T.hoverByPolygon?j:(z=T.strokeColor)!=null?z:Pa.strokeColor}T.dirty=!1}}};o(Ig,"DrawSystem");var Ed=Ig;l();var Dg=class Dg extends Le{constructor(r){super();h(this,"state");h(this,"animating",new Map);h(this,"isAnimating",!1);h(this,"startTime",-1);h(this,"showDuration",300);h(this,"hideDuration",250);h(this,"update",o(()=>{var i;this.animating.clear();let r,n;for(let a of this.state.geometry2DIdsInScene)r=this.state.geometry2DMap.get(a),r&&(n=r.components[0],n instanceof gi&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(i=n.appearance.opacity)!=null?i:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")},"update"));h(this,"playAnimations");this.state=r,this.playAnimations=this._playAnimations}_playAnimations(){let r=performance.now();for(let[n,[i,a]]of this.animating.entries()){let u=a===1?this.showDuration:this.hideDuration,c=(r-this.startTime)/u;n.currentOpacity=_o(c,0,1,i,a,a===0?u4:s4),r-this.startTime>=u&&(a===1?n.canShow=!0:a===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};o(Dg,"TwoDVisibilitySystem");var Cd=Dg;l();var Sg=class Sg extends Le{constructor(r,n,i,a,u,c,m){super();h(this,"state");h(this,"renderer");h(this,"mode");h(this,"scene");h(this,"cameraObject");h(this,"viewCamera");h(this,"systems");h(this,"needs2DRecompute",!1);h(this,"twoDdirty",!0);h(this,"threeDdirty",!0);h(this,"frameId",null);h(this,"twoDFrameId",null);h(this,"animationFrameId",null);h(this,"nextFrame",null);h(this,"updateEntitiesFrameId",null);h(this,"update",o((r=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(r){this.renderer.startFrame();let i=this.commitRenderState();return this.paint(),i}else return this.frameId?Promise.resolve():new Promise((i,a)=>{this.frameId=requestAnimationFrame(()=>{var u,c;return((u=this.renderer)==null?void 0:u.renderer)==null?i():this.mode==="standalone"?(this.renderer.startFrame(),(c=this.commitRenderState())==null?void 0:c.then(()=>{this.paint(),i()}).catch(m=>{a(m)})):i()})})},"update"));h(this,"animate2D",o(()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})},"animate2D"));h(this,"drawEntities2D",o(()=>{this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})},"drawEntities2D"));h(this,"updateEntities2D",o(()=>{this.updateEntitiesFrameId&&(cancelAnimationFrame(this.updateEntitiesFrameId),this.updateEntitiesFrameId=null),this.updateEntitiesFrameId=requestAnimationFrame(()=>{this.updateEntitiesFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.drawEntities2D()})},"updateEntities2D"));h(this,"commitRenderState",o(()=>{try{let r=[];this.frameId=null,this.publish("pre-render"),this.state.internalTweenGroup.update(),this.state.externalTweenGroup.update(),(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.geometry2DIdsInScene.clear(),this.state.geometry2DsInScene.clear(),y4(this.state.geometryScene,this.state.geometry2DMap,this.state.geometry2DIdsInScene,this.state.geometry2DsInScene),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.geometry3DIdsInScene.clear(),this.state.geometry3DsInScene.clear(),this.state.geometryGroupIdsToLoad.clear(),g4(this.state.geometryScene,this.state.geometry3DMap,this.state.geometry3DIdsInScene,this.state.geometry3DsInScene,this.state.geometryGroupIdsToLoad),this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0,this.systems.outlineInterpolationSystem.geometries3DDirty=!0,this.systems.geometryInFocusSystem.focusablesDirty=!0,this.threeDdirty=!1);let n=this.systems.meshOptimizationSystem.update();n&&r.push(n),this.systems.borderSystem.update(),this.systems.meshModificationSystem.update(),this.systems.meshDetachmentSystem.update(),this.systems.renderOrderSystem.update(),this.systems.clippingPlaneSystem.update(),this.systems.imageSystem.update(this.systems.cameraSystem.getRotation()),r.push(this.systems.text3DSystem.update(this.systems.cameraSystem.getRotation())),this.systems.customGeometrySystem.update(),this.systems.panBoundsSystem.update(),this.systems.geometryInFocusSystem.update(this.systems.cameraSystem.isCameraMoving(),this.systems.cameraSystem.lastCameraStoppedMovingTime()),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.pathSystem.update(this.systems.cameraSystem.minZoomAltitude,this.systems.cameraSystem.maxZoomAltitude,this.systems.cameraSystem.getZoomAltitude()),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.occlusion2DSystem.update(),this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.systems.watermarkSystem.update();let i=this.needs2DRecompute;return this.nextFrame=requestAnimationFrame(()=>{this.nextFrame=null,this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height,this.systems.watermarkSystem.options.position,!i&&this.systems.cameraSystem.isCameraMoving(),this.systems.imageSystem.currentImageScreenBBoxes)}),this.systems.textureSystem.update(),this.systems.pluginSystem.update(this.state),this.systems.drawSystem.update(),this.systems.geometryDisposalSystem.update(),this.systems.maskingSystem.update(),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1,this.systems.cameraSystem.rotationDirty=!1,this.systems.cameraSystem.stateDirty&&(this.publish("camera-state-change"),this.systems.cameraSystem.stateDirty=!1),this.publish("post-render"),this.needs2DRecompute=!1,Promise.all(r)}catch(r){return Promise.reject(r)}},"commitRenderState"));this.renderer=r,this.state=n,this.mode=i,this.scene=a,this.cameraObject=u,this.viewCamera=c,this.systems=m,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D),this.systems.cameraSystem.on("pan-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-end",()=>this.needs2DRecompute=!0),this.systems.cameraSystem.on("rotate-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("rotate-end",()=>this.needs2DRecompute=!0)}paint(){var r;(r=this.renderer)!=null&&r.renderer&&(this.mode==="standalone"&&this.renderer.clear(),this.renderer.renderFullScene(this.scene,this.state.useStandaloneCamera||this.mode==="standalone"?this.cameraObject:this.viewCamera))}destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.geometry2DIdsInScene.clear(),this.state.geometry3DIdsInScene.clear(),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};o(Sg,"RenderSystem");var Id=Sg;l();var wB=oe.object({interactive:oe.boolean().optional(),id:oe.string().optional(),width:oe.union([oe.number(),oe.object({on:oe.literal("zoom-level").optional(),input:oe.array(oe.number()).nonempty(),output:oe.array(oe.number()).nonempty(),easing:oe.string().optional()})]).optional(),accentColor:oe.string().optional(),displayArrowsOnPath:oe.boolean().optional(),animateArrowsOnPath:oe.boolean().optional(),visibleThroughGeometry:oe.boolean().optional(),dashed:oe.boolean().optional(),smoothingTension:oe.number().optional(),smoothingCornerRadius:oe.number().optional()}),AB=oe.object({type:oe.enum(["Feature"]),geometry:Ou,properties:oe.object({parentId:oe.any().optional()})});function y6(e,t){oe.object({features:oe.array(AB)}).parse(e),wB.parse(t)}o(y6,"validatePath");var nc,wg=class wg{constructor(t,r){h(this,"type","path");h(this,"mesh",new Qi);h(this,"material");h(this,"geometry");h(this,"outline");h(this,"feature");h(this,"options");h(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});h(this,"breakpoint",0);h(this,"altitudeBreakpoints");h(this,"accentColor","blue");h(this,"completeFraction",1);h(this,"altitudeAdjustment",1);h(this,"displayArrowsOnPath",!1);h(this,"animateArrowsOnPath",!1);h(this,"visibleThroughGeometry",!1);h(this,"highlightStartFraction",0);h(this,"highlightEndFraction",0);h(this,"highlightCompleteFraction",1);h(this,"highlightWidthMultiplier",1.1);h(this,"highlightColor","red");h(this,"xrayOpacity",.25);h(this,"dashed",!1);h(this,"smoothingTension",bi.tension);h(this,"smoothingCornerRadius",bi.cornerRadius);h(this,"isVertical",!1);h(this,"dirty",!0);h(this,"materialDirty",!0);h(this,"position",new ne);L(this,nc,0);var n,i,a,u,c,m,d,f,g;this.feature=t,this.options=r||{},this.width=(n=r==null?void 0:r.width)!=null?n:this.width,this.accentColor=(i=r==null?void 0:r.accentColor)!=null?i:this.accentColor,this.displayArrowsOnPath=(a=r==null?void 0:r.displayArrowsOnPath)!=null?a:this.displayArrowsOnPath,this.animateArrowsOnPath=(u=r==null?void 0:r.animateArrowsOnPath)!=null?u:this.animateArrowsOnPath,this.visibleThroughGeometry=(c=r==null?void 0:r.visibleThroughGeometry)!=null?c:this.visibleThroughGeometry,this.dashed=(m=r==null?void 0:r.dashed)!=null?m:this.dashed,this.xrayOpacity=(d=r==null?void 0:r.xrayOpacity)!=null?d:this.xrayOpacity,this.smoothingTension=(f=r==null?void 0:r.smoothingTension)!=null?f:bi.tension,this.smoothingCornerRadius=(g=r==null?void 0:r.smoothingCornerRadius)!=null?g:bi.cornerRadius}setColor(){}setOpacity(){}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,nc)}set altitude(t){this.mesh&&(this.mesh.position.z=t,K(this,nc,t))}set complete(t){this.material&&(this.material.uniforms.complete.value=t,this.material.needsUpdate=!0)}};nc=new WeakMap,o(wg,"PathComponent");var vo=wg;l();var FB=300,OB=["running","paused"],ic,oc,Ag=class Ag{constructor(t){h(this,"state");L(this,ic,new ne);L(this,oc,new ne);this.state=t}update(t){let r;this.state.cameraObject.getWorldPosition(s(this,oc));for(let n of this.state.geometry2DsInScene)if(n&&(r=n.components[0],r&&"containerEl"in r&&r.markerContainer!=null)){r.visibilityNeedsUpdate!==!1&&(r.visibilityNeedsUpdate==="show"?r.canShow=!0:r.canShow=!1),r.offscreen&&(r.animation&&(r.animation.cancel(),r.animation=null),r.markerContainer.style.opacity="0");let i=r.animation!=null&&(r.animation.pending===!0||OB.includes(r.animation.playState));if((r.canShow&&r.visible===!0||i)&&!r.offscreen)if(r.options.zIndex!=null)r.markerContainer.style.transform="translate3D(".concat(r.projection.x,"px, ").concat(r.projection.y,"px, ").concat(r.options.zIndex,"px)");else{n.object3d.getWorldPosition(s(this,ic));let a=s(this,oc).distanceTo(s(this,ic));r.markerContainer.style.transform="translate3D(".concat(r.projection.x,"px, ").concat(r.projection.y,"px, ").concat(-a,"px)")}if(r.canShow===!0&&r.visible===!0&&!r.offscreen?r.markerContainer.style.pointerEvents=t?"none":r.pointerEvents:r.markerContainer.style.pointerEvents="none",r.currentStrategyIndex===-1&&r.visible&&r.visibilityNeedsUpdate==="show")continue;r.visibilityNeedsUpdate!==!1&&!r.offscreen&&(r.visibilityNeedsUpdate==="show"&&(r.markerContainer.style.opacity="0"),r.animation&&r.animation.cancel(),r.animation=r.markerContainer.animate([{opacity:r.canShow&&r.visible?"1":"0"}],{duration:FB,easing:"ease-in-out",fill:"forwards"}),r.visibilityNeedsUpdate=!1)}}};ic=new WeakMap,oc=new WeakMap,o(Ag,"DOMDrawSystem");var Dd=Ag;l();var Fg=class Fg extends Le{constructor(r,n){super();h(this,"state");h(this,"dirty",!0);h(this,"domTree");h(this,"observers",new Map);h(this,"updateDimensions",o(r=>{r.forEach(n=>{var u;let a=(u=n.target.parentElement)==null?void 0:u.getAttribute("data-marker-id");if(a){let c=this.state.geometry2DMap.get(a),m=c==null?void 0:c.components[0];c&&m instanceof yi&&(m.updateDimensions(n.contentRect.width,n.contentRect.height),m.collisionDirty=!0)}}),this.publish("dimensions-update")},"updateDimensions"));this.state=r,this.domTree=n}setupObserver(){var i;if(this.observers){for(let a of this.observers.values())a.disconnect();this.observers.clear()}let r,n;for(let a of this.domTree.children){let u=a.getAttribute("data-marker-id");if(u!=null&&(r=this.state.geometry2DMap.get(u),n=r.components[0],(i=n.options)!=null&&i.dynamicResize)){let c=new ResizeObserver(this.updateDimensions);c.observe(n.containerEl),this.observers.set(a.userData.entityId,c)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let r of this.observers.values())r.disconnect();this.observers.clear()}};o(Fg,"DOMResizeSystem");var Sd=Fg;l();l();var b6="uniform vec4 uSize;\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n // Scale the position by the size of the quad\n // and shift to top left corner for 0,0\n vec2 transformed = position.xy * uSize.xy - vec2(1.0, -1.0);\n // Apply width .x and height .y of image\n transformed += vec2(uSize.x, -uSize.y);\n // Apply left .w and top .z offset\n transformed += vec2(uSize.w, -uSize.z) * 2.0;\n gl_Position = vec4(transformed, 1.0, 1.0);\n}";l();var v6="varying vec2 vUv;\nuniform sampler2D uTexture;\nuniform float uOpacity;\nvoid main() {\n #ifndef debug\n vec4 texture = texture2D(uTexture, vUv);\n gl_FragColor = vec4(texture.rgb, texture.a * uOpacity);\n #else\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n #endif\n}";l();var x6=4.291666666666667,E6=15,C6=25,I6=43/60;l();var D6=["horizontal","icon"],PB=new Map([[D6[0],'<svg viewBox="0 0 206 48">\n <path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z"/>\n <path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z"/>\n <path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z"/>\n <path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z"/>\n </svg>'],[D6[1],'<svg viewBox="0 0 43 60">\n <path d="M14.0291 7.06645C14.0291 10.9691 10.8885 14.1329 7.01453 14.1329C3.14051 14.1329 0 10.9691 0 7.06645C0 3.16376 3.14051 0 7.01453 0C10.8885 0 14.0291 3.16376 14.0291 7.06645Z"/>\n <path d="M28.7335 18.3468H35.1045C36.7455 18.3468 37.5178 19.0599 37.5821 20.6158V57.7309C37.5821 59.2868 36.8099 60 35.1367 60H28.9588C27.1569 60 26.642 59.7406 25.6767 58.282L12.6452 38.282V57.7309C12.6452 59.2868 11.8729 60 10.1997 60H3.82873C2.15554 60 1.3833 59.2868 1.3833 57.7309V20.6158C1.3833 19.0599 2.15554 18.3468 3.82873 18.3468H10.1032C11.9051 18.4116 12.4843 18.671 13.3852 20.0648L26.3524 40.162V20.6158C26.3524 19.0599 27.1247 18.3468 28.7335 18.3468Z"/>\n <path d="M41.5 60C42.3362 60 43 59.3143 43 58.5V58.4914C43 57.6771 42.3448 57 41.5 57C40.6638 57 40 57.6857 40 58.5V58.5086C40 59.3229 40.6552 60 41.5 60ZM41.5 59.8371C40.7414 59.8371 40.1724 59.2371 40.1724 58.5086V58.5C40.1724 57.7714 40.75 57.1629 41.5 57.1629C42.2586 57.1629 42.8276 57.7629 42.8276 58.4914V58.5C42.8276 59.2286 42.25 59.8371 41.5 59.8371ZM40.9138 59.2286H41.2069V58.7057H41.5259L41.8879 59.2286H42.2414L41.8362 58.6543C42.0431 58.5943 42.1897 58.44 42.1897 58.1914C42.1897 57.8743 41.9397 57.7114 41.6034 57.7114H40.9138V59.2286ZM41.2069 58.4657V57.9686H41.5776C41.7759 57.9686 41.8879 58.0543 41.8879 58.2171C41.8879 58.3629 41.7759 58.4657 41.5776 58.4657H41.2069Z"/>\n </svg>']]),BB=/<svg([^>]*)>/g;function S6(e,t,r,n){let i=PB.get(e);return i?i.replace(BB,'<svg$1 width="'.concat(r,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(t,';">')):""}o(S6,"getLogoIcon");l();var xo=class xo{constructor(){h(this,"loader");this.loader=new Zc}static getInstance(){return xo.instance||(xo.instance=new xo),xo.instance}getLoader(){return this.loader}load(t){return new Promise((r,n)=>{this.loader.load(t,r,void 0,n)})}};o(xo,"TextureLoaderSingleton"),h(xo,"instance");var Og=xo,Eo=Og.getInstance();var w6=!1,lt,$i,Bu,Vt,kr,ra,_n,li,Pg=class Pg extends Le{constructor(r,n,i){super();L(this,lt,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:o(()=>{window!=null&&window.open("https://www.mappedin.com")},"onClick"),interactive:!0,visible:!0});L(this,$i);L(this,Bu);L(this,Vt);L(this,kr);L(this,ra);L(this,_n,0);L(this,li,0);h(this,"dirty",!0);h(this,"getPositionAlignedCanvasCoordinates",o((r,n)=>({"top-left":{x:0,y:0},"top-right":{x:r,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:r,y:n},center:{x:r/2,y:n/2},top:{x:r/2,y:0},bottom:{x:r/2,y:n},left:{x:0,y:n/2},right:{x:r,y:n/2}})[s(this,lt).position],"getPositionAlignedCanvasCoordinates"));h(this,"getPositionAlignedPadding",o(()=>{var i,a,u,c;let r=s(this,lt).padding;if(typeof r=="number")return{"top-left":{x:r,y:r},"top-right":{x:-r,y:r},"bottom-left":{x:r,y:-r},"bottom-right":{x:-r,y:-r},center:{x:0,y:0},top:{x:0,y:r},bottom:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0}}[s(this,lt).position];let n={top:(i=r.top)!=null?i:0,right:(a=r.right)!=null?a:0,bottom:(u=r.bottom)!=null?u:0,left:(c=r.left)!=null?c:0};return{x:n.left-n.right,y:n.top-n.bottom}},"getPositionAlignedPadding"));i&&Object.entries(i).forEach(([a,u])=>{u!==void 0&&(s(this,lt)[a]=u)}),K(this,Bu,r),K(this,$i,n)}get color(){return s(this,lt).color==="light"?"white":"#293136"}get iconName(){return s(this,lt).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,lt).iconOnly?E6:75}get defaultWidth(){return s(this,lt).iconOnly?C6:150}get aspectRatio(){return s(this,lt).iconOnly?I6:x6}get options(){return R({},s(this,lt))}set options(r){var n,i;K(this,lt,{padding:r.padding||s(this,lt).padding,position:r.position||s(this,lt).position,iconOnly:r.iconOnly||s(this,lt).iconOnly,color:r.color||s(this,lt).color,scale:r.scale||s(this,lt).scale,onClick:s(this,lt).onClick,interactive:(n=r.interactive)!=null?n:s(this,lt).interactive,visible:(i=r.visible)!=null?i:s(this,lt).visible})}get icon(){return S6(this.iconName,this.color,s(this,_n)*s(this,$i).pixelRatio,s(this,li)*s(this,$i).pixelRatio)}setSize(r,n){s(this,kr)&&(s(this,kr).uniforms.uSize.value.x=r,s(this,kr).uniforms.uSize.value.y=n)}setXY(r,n){s(this,kr)&&(s(this,kr).uniforms.uSize.value.w=r,s(this,kr).uniforms.uSize.value.z=n)}get width(){return s(this,_n)}get height(){return s(this,li)}getPositionAlignedOffset(r,n){return{"top-left":{x:0,y:0},"top-right":{x:-r,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-r,y:-n},center:{x:-(r/2),y:-(n/2)},top:{x:-(r/2),y:0},bottom:{x:-(r/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-r,y:-(n/2)}}[s(this,lt).position]}insertIntoQuadTree(r){s(this,ra)!=null&&typeof s(this,lt).onClick=="function"&&s(this,lt).interactive&&r.insert(s(this,ra))}resize(r,n){if(s(this,lt).visible!==!0)return;let i=this.getPositionAlignedCanvasCoordinates(r,n),a=this.getPositionAlignedPadding(),u=this.getPositionAlignedOffset(s(this,_n),s(this,li)),c=Math.min(r-s(this,_n),Math.max(0,i.x+a.x+u.x)),m=Math.min(n-s(this,li),Math.max(0,i.y+a.y+u.y));this.setSize(s(this,_n)/r,s(this,li)/n),this.setXY(c/r,m/n),K(this,ra,new Fe(c,m,s(this,_n),s(this,li),{entityId:"watermark"}))}update(){this.dirty&&(s(this,lt).visible===!0?(K(this,_n,Math.min(s(this,$i).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,lt).scale))),K(this,li,s(this,_n)/this.aspectRatio),Eo.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),r=>{if(K(this,kr,new Ji({uniforms:{uTexture:{value:r},uSize:{value:new jy(0,0,0,0)},uOpacity:{value:.7}},vertexShader:b6,fragmentShader:v6,depthWrite:!1,depthTest:!1,defines:{debug:w6},wireframe:w6,transparent:!0,visible:!0})),s(this,Vt))s(this,Vt).visible=!0,s(this,Vt).material=s(this,kr),s(this,Vt).material.needsUpdate=!0;else{let n=new In(2,2,1,1);K(this,Vt,new Pe(n,s(this,kr))),s(this,Vt).position.set(0,0,-1),s(this,Vt).frustumCulled=!1,s(this,Vt).renderOrder=999;let i=new qi(1,1,1),a=new Pe(i,new fr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));a.frustumCulled=!1,a.layers.set(1),s(this,Vt).add(a),s(this,Bu).add(s(this,Vt))}this.resize(s(this,$i).canvasWidth,s(this,$i).canvasHeight),this.publish("texture-loaded")})):s(this,Vt)&&(s(this,Vt).visible=!1),this.dirty=!1)}destroy(){s(this,Vt)&&(s(this,Bu).remove(s(this,Vt)),Nt(s(this,Vt))),K(this,Vt,void 0),s(this,kr)&&s(this,kr).dispose(),K(this,kr,void 0),K(this,ra,void 0)}};lt=new WeakMap,$i=new WeakMap,Bu=new WeakMap,Vt=new WeakMap,kr=new WeakMap,ra=new WeakMap,_n=new WeakMap,li=new WeakMap,o(Pg,"WatermarkSystem");var wd=Pg;l();var Ad=100,kB=!1,Bg=class Bg extends Le{constructor(r,n){super();h(this,"currentTotalBoundingBox");h(this,"state");h(this,"cameraSystem");h(this,"debugMesh",null);h(this,"dirty",!0);h(this,"autoMinZoomLevel",!0);this.state=r,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new rr,this.state.geometryScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new ne(0,0,0),new ne(Ad*2,Ad*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.geometryScene),this.currentTotalBoundingBox.expandByScalar(Ad)));let r=new rr().setFromObject(this.state.geometryScene);this.currentTotalBoundingBox.union(r);let n=r.getSize(new ne),i=Math.max(n.x,n.y,n.z);for(let u of this.state.geometry2DMap.values())u.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(u.position),u.positionDirty=!1);let a=Fd.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(i,Ad)).getBoundingSphere(_B).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new ne),min:Fd.min,max:Fd.max,radius:a},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,kB&&this.state.geometryScene.parent instanceof Xi){this.debugMesh&&(this.state.geometryScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new Mo,this.debugMesh.add(new Pe(new Gc(this.cameraSystem.panBounds.radius),new fr({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.geometryScene.parent.add(this.debugMesh);let u=new ne;Fd.getSize(u);let c=new qi(u.x,u.y,u.z),m=new fr({color:65280,wireframe:!0,transparent:!0,opacity:.5}),d=new Pe(c,m);d.position.copy(this.currentTotalBoundingBox.getCenter(new ne)),this.debugMesh.add(d)}}}};o(Bg,"PanBoundsSystem");var Od=Bg,Fd=new rr,_B=new $y;l();var ac,uc,Mg=class Mg{constructor(t,r){h(this,"mesh");h(this,"type","custom-geometry");h(this,"dirty",!0);h(this,"feature");h(this,"builder");h(this,"outline");L(this,ac,1);h(this,"color",new Ot);L(this,uc,0);this.mesh=new Qi,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}set opacity(t){K(this,ac,t)}get opacity(){return s(this,ac)}setColor(t){this.color.set(t)}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return s(this,uc)}set altitude(t){this.mesh&&(this.mesh.position.z=t,K(this,uc,t))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(t){this.mesh&&(this.mesh.renderOrder=t)}};ac=new WeakMap,uc=new WeakMap,o(Mg,"CustomGeometryComponent");var Mu=Mg;l();var Tg=class Tg{constructor(t,r){h(this,"state");h(this,"convertTo3DMapPosition");this.state=t,this.convertTo3DMapPosition=r}update(){let t,r;for(let n of this.state.geometry3DsInScene)(n==null?void 0:n.type)==="custom-geometry"&&(t=n.components[0],r=n.components[1],t.dirty&&r.visible!==!1&&(t.position.copy(this.convertTo3DMapPosition(t.feature.geometry.coordinates[1],t.feature.geometry.coordinates[0],r.altitude)),t.builder.setup(t.mesh),t.mesh.traverse(i=>{i.userData=De(R({},i.userData),{entityId:n.id,type:"custom-geometry"})}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}};o(Tg,"CustomGeometrySystem");var Pd=Tg;l();l();function Bd(e){return e.children.some(t=>t.userData.isOutline)}o(Bd,"hasOutline");function sc(e,t){var n;let r=e.userData.entities3D.values().next().value;return r?((n=t.geometry3DMap.get(r))==null?void 0:n.components[3])!==void 0:!1}o(sc,"needsOutline");function Md(e,t,r,n,i){let u=e.getAttribute("position").array,c=1/0,m=-1/0;for(let f=0;f<t.count;f++){let v=(t.start+f)*3,b=u[v+2];c=Math.min(c,b),m=Math.max(m,b)}let d=m-c;if(!i||i.thickness===0||d===0)for(let f=0;f<t.count;f++){let v=(t.start+f)*3,b=u[v+2];Math.abs(b-m)<1e-4?u[v+2]=Math.max(r+n,2e-4+n):u[v+2]=n}else{let f=i.thickness,g=c+f,v=c+f,b=m-f,D=m-f,A=n-f,x=n,E=n,S=n+r,I=n+r,C=n+r+f;for(let k=0;k<t.count;k++){let z=(t.start+k)*3,M=u[z+2],T;if(M<=g){let Z=f>0?(M-c)/f:0;T=A+Z*(x-A)}else if(M>=D){let Z=f>0?(M-D)/f:0;T=I+Z*(C-I)}else{let Z=b-v,j=Z>0?(M-v)/Z:0;T=E+j*(S-E)}u[z+2]=T}}e.attributes.position.needsUpdate=!0}o(Md,"updateBufferGeometryHeight");l();function kg(e){var d,f;let t=new Uc,r=(d=e.mesh)==null?void 0:d.geometry;if(!r||!((f=e.batchedProps)!=null&&f.range))return;let n=e.batchedProps.range,i=n.start,a=n.count,u=r.getAttribute("position");if(u){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=u.array[b*3],g[v*3+1]=u.array[b*3+1],g[v*3+2]=u.array[b*3+2]}t.setAttribute("position",new Ar(g,3))}let c=r.getAttribute("normal");if(c){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=c.array[b*3],g[v*3+1]=c.array[b*3+1],g[v*3+2]=c.array[b*3+2]}t.setAttribute("normal",new Ar(g,3))}let m=r.getAttribute("uv");if(m){let g=new Float32Array(a*2);for(let v=0;v<a;v++){let b=i+v;g[v*2]=m.array[b*2],g[v*2+1]=m.array[b*2+1]}t.setAttribute("uv",new Ar(g,2))}if(r.index){let g=r.index,v=new Uint32Array(a);for(let b=0;b<a;b++)v[b]=g.array[i+b];t.setIndex(new Ar(v,1))}return t}o(kg,"extractBufferGeometryFromBatchedGeometry");function A6(e,t,r){let n=kg(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,r),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let i=t.addGeometry(n);t.addInstance(i),t.setMatrixAt(i,r);let a=t.getGeometryIdAt(i),u=t.getGeometryRangeAt(a);return u&&e.batchedProps&&(e.batchedProps.range=u),n.dispose(),i}o(A6,"transferGeometryToNewBatchedMesh");l();l();var F6="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\nattribute float visibility;\nvarying vec4 v_color;\n\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n vLineDistance = scale * lineDistance;\n v_color = color;\n\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n if (visibility < 0.5) {\n gl_Position = vec4(-2.0, -2.0, -2.0, 1.0);\n }\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n\n}";l();var O6="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\nvarying vec4 v_color;\n\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n discard;\n\n }\n\n vec3 outgoingLight = vec3( 0.0 );\n\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n\n outgoingLight = diffuseColor.rgb; // simple shader\n\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n\n // Discard alpha lower than 0.01 to avoid opacity fighting\n if (v_color.a <= 0.01) { \n discard;\n }\n}\n";var _g=class _g extends Wy{constructor(t){super(t),this.onBeforeCompile=r=>{r.vertexShader=F6,r.fragmentShader=O6}}};o(_g,"OutlineLineMaterial");var Td=_g;l();var Ln,na,Co,Io,cc,Lg,Rg=class Rg{constructor(){L(this,cc);L(this,Ln,[]);L(this,na,!1);L(this,Co);L(this,Io)}get size(){return s(this,Ln).length}add(t){s(this,Ln).push(t),s(this,na)||pt(this,cc,Lg).call(this)}onComplete(t){K(this,Co,t)}clearOnComplete(){K(this,Co,void 0)}clearAll(){K(this,Ln,[]),K(this,na,!1),K(this,Co,void 0),s(this,Io)!==void 0&&(cancelIdleCallback(s(this,Io)),K(this,Io,void 0))}};Ln=new WeakMap,na=new WeakMap,Co=new WeakMap,Io=new WeakMap,cc=new WeakSet,Lg=o(function(){K(this,na,!0),K(this,Io,requestIdleCallback(t=>{let r=0;for(;s(this,Ln).length>0&&t.timeRemaining()>2;){let n=s(this,Ln).shift();n&&(n(),r++)}if(r===0&&s(this,Ln).length>0&&t.timeRemaining()<2){let n=s(this,Ln).shift();n&&n()}K(this,Io,void 0),s(this,Ln).length>0?pt(this,cc,Lg).call(this):(K(this,na,!1),s(this,Co)&&s(this,Co).call(this))},{timeout:3e3}))},"#processQueue"),o(Rg,"IdleQueue");var ia=Rg;var NB=80,oa,Tu,_d,Ld,Ng=class Ng extends Le{constructor(r){super();h(this,"rendererState");h(this,"outlineOpacitiesDirty",!0);h(this,"useIdleFramesOnly",!0);L(this,oa,!0);L(this,Tu,-1/0);h(this,"idleBuildQueue",new ia);h(this,"idleComputeBoundingSphereQueue",new ia);L(this,_d,new Map);L(this,Ld,o(()=>{this.publish("needs-render")},"#publishRender"));this.rendererState=r,this.idleBuildQueue.onComplete(s(this,Ld))}get geometries3DDirty(){return s(this,oa)}set geometries3DDirty(r){K(this,oa,r)}buildOutlines(r){var v;let n=[];for(let b of r.userData.entities3D.values()){let D=this.rendererState.geometry3DMap.get(b);if(D instanceof at&&D.type==="geometry"&&D.components[3]&&D.components[3].dirty===!0&&D.components[0].material!=null){let A=D.components[0].geometry,x=!1;A||(A=kg(D.components[0]),x=!0);let E=D.components[1];n.push([D.components[3],new Ky(A,(v=E.bevel)!=null&&v.enabled?1:NB)]),x&&(A==null||A.dispose(),A=void 0)}}if(n.length===0)return;let i=en(n.map(b=>b[1]),!1);if(i==null)return;let a=i.getAttribute("position"),u=new Float32Array(a.count*4),c=new Ar(u,4);i.setAttribute("color",c);let m=new Uint8Array(a.count);m.fill(0);let d=new Ar(m,1,!1);i.setAttribute("visibility",d);let f=0;for(let b=0;b<n.length;b++){let[D,A]=n[b],x=A.getAttribute("position").count;D.edgeColors=c,D.edgeVisibility=d,D.geometry=i,D.ranges={count:x,start:f},f+=x,A.dispose()}let g=new To(i,new Td({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:Bo}));g.userData.isOutline=!0,r.add(g)}update(r,n=!0){var a;if(this.geometries3DDirty){for(let u of this.rendererState.geometry3DsInScene)u.type==="geometry-group"&&sc(u,this.rendererState)&&!Bd(u)&&u.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(u)):this.buildOutlines(u));K(this,oa,!1),this.outlineOpacitiesDirty=!0}for(let u of this.rendererState.geometry3DsInScene)if(u.type==="geometry"&&u.components[3]&&u.components[3].dirty===!0&&u.components[0].material!=null&&u.parentObject3D instanceof Kn){let c=u.components[3].geometry;if(!c)continue;let m=u.components[3];if(!m)continue;let d=m.enabled&&u.components[1].visible;if(m.visible!==d&&(m.visible=d),!m.visible)continue;let f=m.edgeColors;if(!f||!m.ranges)continue;let g=new Ot(m.color);for(let A=0;A<m.ranges.count;A++){let x=m.ranges.start+A;f.setXYZ(x,g.r,g.g,g.b)}let v=u.components[1].height,b=u.components[1].altitude,D=(a=u.components[1])==null?void 0:a.bevel;Md(c,m.ranges,v,b,D),c.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>c.computeBoundingSphere()),m.dirty=!1}let i=n?_o(r,16,19,0,1):s(this,Tu);if((i!==s(this,Tu)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DsInScene.size>0){for(let u of this.rendererState.geometry3DsInScene)if(u.type==="geometry"&&u.components[0]instanceof Lt){let c=u.components[3];if(c&&c.edgeColors&&c.geometry&&c.visible){let m=Math.min(i,u.components[1].opacity*Oa(u));if(c.currentOpacity!==m){for(let d=0;d<c.ranges.count;d++){let f=c.ranges.start+d;c.edgeColors.setW(f,m)}c.geometry.attributes.color.needsUpdate=!0}}}}K(this,Tu,i),K(this,oa,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,_d).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};oa=new WeakMap,Tu=new WeakMap,_d=new WeakMap,Ld=new WeakMap,o(Ng,"OutlineInterpolationSystem");var kd=Ng;l();l();var Ug=class Ug extends Pe{constructor(){super(...arguments);h(this,"userData",{entityId:""})}};o(Ug,"EntityMesh");var Rd=Ug,UB=oe.object({flipImageToFaceCamera:oe.boolean().optional(),url:oe.string()}),jB=oe.object({type:oe.enum(["Feature"]),properties:oe.object({width:oe.number(),height:oe.number(),rotation:oe.number().min(0).max(360).optional(),verticalOffset:oe.number().optional()}),geometry:Ou});function P6(e,t,r){oe.union([oe.number(),oe.string()]).parse(e),jB.parse(t),UB.parse(r)}o(P6,"validateImage");var jg=class jg{constructor(t){h(this,"mesh",new Qi);h(this,"imageMesh");h(this,"outline");h(this,"type","image");h(this,"instanceIndex",-1);h(this,"geometry");h(this,"material");h(this,"feature");h(this,"position",new ne);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:!1}set visible(t){this.mesh&&(this.mesh.visible=t)}};o(jg,"ImageComponent");var Nd=jg;l();function zg(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}}o(zg,"rotatePoint");function zB(e,t){return e.map(r=>zg(r,t))}o(zB,"rotatePoints");function $B(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}o($B,"getBounds");function GB(e,t){let r=!1;for(let n=0,i=t.length-1;n<t.length;i=n++){let a=t[n].x,u=t[n].y,c=t[i].x,m=t[i].y;u>e.y!=m>e.y&&e.x<(c-a)*(e.y-u)/(m-u)+a&&(r=!r)}return r}o(GB,"pointInPolygon");function B6(e,t,r,n,i){for(let a=0;a<i;a++)for(let u=0;u<n;u++)if(e[r+a][t+u]!==1)return!1;return!0}o(B6,"isValidRectangle");function ZB(e,t,r){let n=e.maxX-e.minX,i=e.maxY-e.minY,a,u,c=R({},e);return n/i>t?(u=i/r,a=u*t,c.minX+=(n-a*r)/2):(a=n/r,u=a/t,c.minY+=(i-u*r)/2),{dx:a,dy:u,gridBounds:c}}o(ZB,"calculateGridDimensions");function VB(e,t,r,n,i){let a=Array(r).fill(0).map(()=>Array(r).fill(0));for(let u=0;u<r;u++)for(let c=0;c<r;c++){let m={x:t.minX+c*n,y:t.minY+u*i};GB(m,e)&&(a[u][c]=1)}return a}o(VB,"createAndFillGrid");function WB(e,t){let r=Array(t).fill(0).map(()=>Array(t).fill(0));for(let n=0;n<t;n++)for(let i=0;i<t;i++)if(e[n][i]===1){let a=0;for(let u=1;u<=Math.min(t-i,t-n)&&B6(e,i,n,u,u);u++)a=u;r[n][i]=a}return r}o(WB,"calculateRectSizes");function HB(e,t,r,n,i,a){let u=0,c=0,m=0;for(let d=0;d<n;d++)for(let f=0;f<n;f++)if(e[d][f]===1){let g=Math.pow(t[d][f],2),v=r.minX+f*i,b=r.minY+d*a;u+=g,c+=v*g,m+=b*g}return{x:c/u,y:m/u}}o(HB,"calculatePolygonCenter");function KB(e,t,r,n,i,a,u){let c=-1/0,m=null,d=e.length,f=Math.sqrt(Math.pow(t.maxX-t.minX,2)+Math.pow(t.maxY-t.minY,2));for(let g=0;g<d;g++)for(let v=0;v<d;v++)if(e[g][v]===1)for(let b=1;b<=d-v;b++){let D=b;if(!(D>d-g)&&B6(e,v,g,b,D)){let A=b*D,x=t.minX+(v+b/2)*r,E=t.minY+(g+D/2)*n,S={x,y:E},C=Math.sqrt(Math.pow(S.x-i.x,2)+Math.pow(S.y-i.y,2))/f,k=A*(1-a)-C*a*A;k>c&&(c=k,m={center:S,width:b*r*u,height:b*n*u})}}return m}o(KB,"findBestRectangle");function $g(e,t,r,n={}){let{scaleFactor:i=.9,centerPriority:a=.5,resolution:u=100,minimumSizeRatio:c=.5}=n,m=i4(r),d=e.width/e.height,f=zB(t,m),g=$B(f),{dx:v,dy:b,gridBounds:D}=ZB(g,d,u),A=VB(f,D,u,v,b),x=WB(A,u),E=HB(A,x,D,u,v,b),S=KB(A,D,v,b,E,a,i);return!S||S.width<e.width*c||S.height<e.height*c?e:De(R({},S),{center:zg(S.center,-m),rotation:r,polygonCenter:zg(E,-m)})}o($g,"findLargestInteriorRectangle");var lc=Math.PI*2,qB=Math.PI/2,JB=Math.PI*1.5,XB=Kc(qB,2),YB=Kc(JB,2),QB=.01,M6=!1,Gg=class Gg extends Le{constructor(r,n,i,a=0,u=0,c={}){super();h(this,"rendererState");h(this,"convertTo3DMapPosition");h(this,"projectToScreen");h(this,"initialBearing",0);h(this,"naturalBearing",0);h(this,"imagePlacementOptions");h(this,"cameraFrustum",new zc);h(this,"imageLoadingCache",new Map);h(this,"currentImageScreenBBoxes",[]);h(this,"viewProjectionMatrix",new Gr);this.rendererState=r,this.convertTo3DMapPosition=n,this.projectToScreen=i,this.initialBearing=a,this.naturalBearing=u,this.imagePlacementOptions=c}createImageMesh(r,n,i,a=0,u,c){var D,A,x;let m={width:i.width,height:i.height,center:this.convertTo3DMapPosition(u),rotation:(D=i.rotation)!=null?D:0},d=(A=this.imagePlacementOptions.mode)!=null?A:"default",f=(()=>{switch(d){case"fit-nearest-90":let E=(this.initialBearing-this.naturalBearing+360)%180;return E>=45&&E<=135?$g(m,c,m.rotation+90,this.imagePlacementOptions):m;case"fit-initial-bearing":return $g(m,c,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return m}})();if(M6&&f.polygonCenter){let E=new Pe(new Gc(1),new Ju({color:65280}));E.position.set(f.polygonCenter.x,f.polygonCenter.y,a),this.rendererState.geometryScene.add(E)}let g=new Ju({transparent:!0,depthWrite:!1,side:hi}),v=new In(f.width,f.height),b=new Rd(v);if(b.visible=!1,b.renderOrder=Jt.IMAGE_MESH,(x=this.getOrDownloadImage(n))==null||x.then(E=>{g.map=E,g.needsUpdate=!0,g.map.colorSpace=_c,b.visible=!0,this.publish("image-loaded")}),b.userData.entityId=r,b.material=g,M6){let E=new Pe(new In(i.width,i.height),new Ju({color:"gray"}));b.add(E);let S=new Yy;b.add(S),S.scale.set(10,10,10)}return b.position.set(f.center.x,f.center.y,a+QB),b.rotation.z=(-Te.degToRad(f.rotation)+lc)%lc,b}getOrDownloadImage(r){var n;if(this.imageLoadingCache.has(r))return(n=this.imageLoadingCache.get(r))==null?void 0:n.promise;{let i=new Promise(a=>{Eo.getLoader().load(r,u=>{let c=this.imageLoadingCache.get(r);c&&!c.loaded&&(c.loaded=!0),a(u)})});return this.imageLoadingCache.set(r,{loaded:!1,promise:i}),i}}flipIfNeeded(r,n){if(r.imageMesh==null)return;let i=-n,a=r.imageMesh.rotation.z,u=Kc((a-i+lc)%lc,2);u>XB&&u<YB&&(r.imageMesh.rotation.z=(a+Math.PI)%lc)}update(r){var a,u,c,m,d;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,i;for(let f of this.rendererState.geometry3DsInScene)if(f.type==="image"){if(n=f.components[0],i=f.components[1],i.url&&n.imageMesh==null){let g=this.convertTo3DMapPosition(n.feature.geometry.coordinates),v={x:g.x,y:g.y};n.imageMesh=this.createImageMesh(f.id,i.url,n.feature.properties,n.feature.properties.verticalOffset,n.feature.geometry.coordinates,[v]),n.mesh.add(n.imageMesh),n.position.copy(n.imageMesh.position)}n.imageMesh&&(i.flipImageToFaceCamera&&this.flipIfNeeded(n,r),n.imageMesh.material instanceof Ju&&i.dirty&&n.imageMesh.material.opacity!==i.opacity&&(n.imageMesh.material.opacity=i.opacity))}else if((f==null?void 0:f.type)==="geometry"){if(n=f.components[0],i=f.components[1],i.showImage&&((a=n.feature.properties)!=null&&a.image)&&n.imageMesh==null&&n.visible&&n.mesh!=null&&n.mesh.parent!=null&&((u=n.feature.properties)==null?void 0:u.image.position)!=null&&n.feature.geometry.coordinates!=null&&n.feature.geometry.coordinates.length>0){let g=n.feature.geometry.coordinates[0].map(b=>{let D=this.convertTo3DMapPosition(b);return{x:D.x,y:D.y}}),v=this.createImageMesh(f.id,(c=n.feature.properties)==null?void 0:c.image.path,(m=n.feature.properties)==null?void 0:m.image,i.height+i.altitude,(d=n.feature.properties)==null?void 0:d.image.position,g);n.mesh.parent.add(v),n.imageMesh=v}if(n.imageMesh){if(!n.visible)n.imageMesh.visible=!1;else if(i.showImage&&!n.imageMesh.visible)if(i.url){let g=this.imageLoadingCache.get(i.url);g&&g.loaded&&(n.imageMesh.visible=!0)}else n.imageMesh.visible=!0;else!i.showImage&&n.imageMesh.visible&&(n.imageMesh.visible=!1);i.flipImageToFaceCamera&&this.flipIfNeeded(n,r),i.enableImageCollisions===!0&&this.updateImageScreenBBoxes(n)}}}updateImageScreenBBoxes(r){if(r.imageMesh==null)return;let n=r.imageMesh.geometry.boundingBox;if(n!=null){let i=new ne;if(r.imageMesh.getWorldPosition(i),!this.cameraFrustum.containsPoint(i))return;let a=new Ae;this.projectToScreen(a,i);let u=[new ne(n.min.x,n.min.y,n.min.z),new ne(n.max.x,n.min.y,n.min.z),new ne(n.min.x,n.max.y,n.min.z),new ne(n.max.x,n.max.y,n.min.z),new ne(n.min.x,n.min.y,n.max.z),new ne(n.max.x,n.min.y,n.max.z),new ne(n.min.x,n.max.y,n.max.z),new ne(n.max.x,n.max.y,n.max.z)],c=[];for(let b of u){let D=b.clone().applyMatrix4(r.imageMesh.matrixWorld),A=new Ae;this.projectToScreen(A,D),c.push(A)}let m=1/0,d=1/0,f=-1/0,g=-1/0;for(let b of c)m=Math.min(m,b.x),d=Math.min(d,b.y),f=Math.max(f,b.x),g=Math.max(g,b.y);let v=new Fe(a.x,a.y,f-m,g-d);this.currentImageScreenBBoxes.push(v)}}};o(Gg,"ImageSystem");var Ud=Gg;l();var eM=250,Do,Zg=class Zg extends Le{constructor(r,n){super();h(this,"cameraDirty",!0);h(this,"focusablesDirty",!0);h(this,"state");h(this,"camera");h(this,"debugEl",null);h(this,"raycasters",[]);h(this,"collisions",new Map);h(this,"focusableEntities",new Set);h(this,"debugRaycasters",!1);L(this,Do);h(this,"update",o((r=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!r&&(Date.now()-n>eM||(s(this,Do)&&cancelAnimationFrame(s(this,Do)),K(this,Do,requestAnimationFrame(()=>{this.updateRaf()}))))},"update"));this.state=r,this.camera=n,this.buildRaycasters()}resize(){this.buildRaycasters()}buildRaycasters(){this.debugEl&&this.debugEl.remove();let r=new Ae(this.state.canvasWidth/2,this.state.canvasHeight/2),n=new Ae(r.x/1.2,r.y/1.2),i=new Ae(r.x+(r.x-n.x),n.y),a=new Ae(n.x,r.y+(r.y-n.y)),u=new Ae(i.x,a.y),c=new Ae(r.x,r.y/1.5),m=new Ae(r.x,r.y+(r.y-c.y));this.debugEl=document.createElement("div"),Object.assign(this.debugEl.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none"}),document.body.append(this.debugEl),this.raycasters=[r,c,m,n,i,a,u].map((d,f)=>{if(this.debugRaycasters){let A=document.createElement("div");A.style.position="absolute",A.style.top=d.y+"px",A.style.left=d.x+"px",A.style.width="10px",A.style.height="10px",A.style.backgroundColor="red",this.debugEl.append(A)}let g=d.x/this.state.canvasWidth*2-1,v=-(d.y/this.state.canvasHeight)*2+1,b=new Ae(g,v),D=new Zn;return D.setFromCamera(b,this.camera),[D,b,f===0?10:f<7?2:1]})}updateFocusableEntities(){this.focusableEntities.clear();let r,n,i;for(let a of this.state.geometry3DIdsInScene)if(i=this.state.geometry3DMap.get(a),i!=null){if(i.type==="group-container"&&i.components[1]!==void 0&&i.components[1]instanceof ts){if(n=i.components[1],n.dirty===!0||n.focusMesh==null){n.focusMesh&&Nt(n.focusMesh);let u=new rr;u.setFromObject(i);let c=u.max.x-u.min.x,m=u.max.y-u.min.y,d=u.max.z-u.min.z;if(!isFinite(c)||!isFinite(m)||!isFinite(d)||isNaN(c)||isNaN(m)||isNaN(d)||c<=0||m<=0||d<=0)continue;let f=new qi(c,m,d),g={transparent:!0,opacity:this.debugRaycasters?1:0,visible:this.debugRaycasters};if(this.debugRaycasters){let D=["red","green","blue","yellow","purple","orange","pink","brown","gray","black"];g.color=D[Math.floor(Math.random()*D.length)]}let v=new fr(g),b=new Pe(f,v);b.position.set((u.min.x+u.max.x)/2,(u.min.y+u.max.y)/2,0),b.userData={entityId:i.userData.entityId},n.focusMesh=b,i.add(b),i.components[1].dirty=!1}this.focusableEntities.add(n.focusMesh)}else if(i.type==="geometry"&&i.components[4]&&i.components[4]instanceof ts&&(r=i.components[0],n=i.components[4],r instanceof Lt&&r.geometry!=null&&(n.dirty===!0||n.focusMesh==null))){if(n.focusMesh==null){let u=new Pe(r.geometry);u.userData={entityId:i.id},n.focusMesh=u}this.focusableEntities.add(n.focusMesh)}}this.focusablesDirty=!1}updateRaf(){if(this.focusableEntities.size===0){this.publish("geometry-in-focus",[]);return}this.cameraDirty&&this.raycast()}raycast(){this.collisions.clear();for(let[n,i]of this.raycasters)n.setFromCamera(i,this.camera);for(let[n,i,a]of this.raycasters)n.intersectObjects(Array.from(this.focusableEntities.values())).forEach(c=>{var m;if((c==null?void 0:c.object)!=null&&"isMesh"in c.object&&(c!=null&&c.object.isMesh)){let d=c.object.userData.entityId,f=(m=this.collisions.get(d))!=null?m:0;this.collisions.set(d,f+a)}});let r=Array.from(this.collisions,([n,i])=>({entityId:n,weight:i})).sort((n,i)=>i.weight-n.weight).map(({entityId:n})=>n);this.publish("geometry-in-focus",r),this.cameraDirty=!1}showRaycasters(){this.debugRaycasters=!0,this.buildRaycasters()}hideRaycasters(){this.debugRaycasters=!1,this.buildRaycasters()}destroy(){s(this,Do)&&cancelAnimationFrame(s(this,Do)),this.debugEl&&this.debugEl.remove(),this.collisions.clear(),this.focusableEntities.clear(),this.raycasters=[]}};Do=new WeakMap,o(Zg,"GeometryInFocusSystem");var jd=Zg;l();l();l();l();l();function tM(e){if(!e)throw new Error("geojson is required");var t=[];return Yi(e,function(r){rM(r,t)}),ko(t)}o(tM,"lineSegment");function rM(e,t){var r=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":r=No(n);break;case"LineString":r=[No(n)]}r.forEach(function(i){var a=nM(i,e.properties);a.forEach(function(u){u.id=t.length,t.push(u)})})}}o(rM,"lineSegmentFeature");function nM(e,t){var r=[];return e.reduce(function(n,i){var a=Hc([n,i],t);return a.bbox=iM(n,i),r.push(a),i}),r}o(nM,"createSegments");function iM(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],u=r<i?r:i,c=n<a?n:a,m=r>i?r:i,d=n>a?n:a;return[u,c,m,d]}o(iM,"bbox");var Vg=tM;var cC=My(uC(),1);function nT(e,t){var r={},n=[];if(e.type==="LineString"&&(e=Sp(e)),t.type==="LineString"&&(t=Sp(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=sC(e,t);return i&&n.push(i),ko(n)}var a=(0,cC.default)();return a.load(Vg(t)),Ap(Vg(e),function(u){Ap(a.search(u),function(c){var m=sC(u,c);if(m){var d=No(m).join(",");r[d]||(r[d]=!0,n.push(m))}})}),ko(n)}o(nT,"lineIntersect");function sC(e,t){var r=No(e),n=No(t);if(r.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],a=r[0][1],u=r[1][0],c=r[1][1],m=n[0][0],d=n[0][1],f=n[1][0],g=n[1][1],v=(g-d)*(u-i)-(f-m)*(c-a),b=(f-m)*(a-d)-(g-d)*(i-m),D=(u-i)*(a-d)-(c-a)*(i-m);if(v===0)return null;var A=b/v,x=D/v;if(A>=0&&A<=1&&x>=0&&x<=1){var E=i+A*(u-i),S=a+A*(c-a);return wp([E,S])}return null}o(sC,"intersects");var Kd=nT;l();function pc(e,t){t===void 0&&(t={});var r=ka(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return iT(r,t);case"MultiPolygon":return oT(r,t);default:throw new Error("invalid poly")}}o(pc,"default");function iT(e,t){t===void 0&&(t={});var r=ka(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return lC(n,i)}o(iT,"polygonToLine");function oT(e,t){t===void 0&&(t={});var r=ka(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},a=[];return n.forEach(function(u){a.push(lC(u,i))}),ko(a)}o(oT,"multiPolygonToLine");function lC(e,t){return e.length>1?e4(e,t):Hc(e[0],t)}o(lC,"coordsToLine");function aT(e,t){var r=!0;return Yi(e,function(n){Yi(t,function(i){if(r===!1)return!1;r=uT(n.geometry,i.geometry)})}),r}o(aT,"booleanDisjoint");function uT(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return!mT(e.coordinates,t.coordinates);case"LineString":return!mC(t,e);case"Polygon":return!ro(e,t)}break;case"LineString":switch(t.type){case"Point":return!mC(e,t);case"LineString":return!sT(e,t);case"Polygon":return!dC(t,e)}break;case"Polygon":switch(t.type){case"Point":return!ro(t,e);case"LineString":return!dC(e,t);case"Polygon":return!cT(t,e)}}return!1}o(uT,"disjoint");function mC(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(lT(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}o(mC,"isPointOnLine");function sT(e,t){var r=Kd(e,t);return r.features.length>0}o(sT,"isLineOnLine");function dC(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){var i=n[r];if(ro(i,e))return!0}var a=Kd(t,pc(e));return a.features.length>0}o(dC,"isLineInPoly");function cT(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){var i=n[r];if(ro(i,t))return!0}for(var a=0,u=t.coordinates[0];a<u.length;a++){var c=u[a];if(ro(c,e))return!0}var m=Kd(pc(e),pc(t));return m.features.length>0}o(cT,"isPolyInPoly");function lT(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],a=t[0]-e[0],u=t[1]-e[1],c=n*u-i*a;return c!==0?!1:Math.abs(a)>=Math.abs(u)?a>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:u>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}o(lT,"isPointOnLineSegment");function mT(e,t){return e[0]===t[0]&&e[1]===t[1]}o(mT,"compareCoords");var pC=aT;function sy(e,t){var r=!1;return Yi(e,function(n){Yi(t,function(i){if(r===!0)return!0;r=!pC(n.geometry,i.geometry)})}),r}o(sy,"booleanIntersects");var dT=5e3,cy="outdoor-system-debug-container",fC=!1,Gi,kt,fc,_u,Zi,di,xn,Lu,hc,Jd,Xd,Rn,ly,Ru,aa,hC,Yd,gc,gC,yC,my=class my{constructor(t){L(this,Rn);L(this,Gi,!0);L(this,kt);h(this,"idleQueue",new ia);L(this,fc,"");L(this,_u,new Set);L(this,Zi,new Set);L(this,di);L(this,xn,null);L(this,Lu,!1);L(this,hc,o(t=>{if(!s(this,kt))throw new Error("Map not initialized");let n=[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]]].map(m=>s(this,kt).project(m)),i=Math.max(...n.map(m=>m.x)),a=Math.min(...n.map(m=>m.x)),u=Math.max(...n.map(m=>m.y)),c=Math.min(...n.map(m=>m.y));return[new Ip.default(a,c),new Ip.default(i,u)]},"#getScreenPoints"));L(this,Jd,o(()=>{s(this,xn)&&(clearTimeout(s(this,xn)),K(this,xn,null),K(this,Gi,!1))},"#stopTrying"));L(this,Xd,o(()=>{s(this,xn)&&(clearTimeout(s(this,xn)),K(this,xn,null)),K(this,xn,setTimeout(()=>{s(this,Jd).call(this)},dT))},"#startTrying"));L(this,Ru,o(async()=>{if(fC&&s(this,di)&&pt(this,Rn,yC).call(this),!(!s(this,kt)||!s(this,Lu))&&s(this,Gi)&&!(!s(this,Zi)||s(this,Zi).size===0)&&(s(this,Rn,hC)&&s(this,Yd).call(this),s(this,di))){let t=new Set;this.idleQueue.onComplete(()=>{s(this,aa).length>0&&(s(this,Zi).forEach(r=>{var n;(n=s(this,kt))==null||n.setFilter(r,["all",...s(this,aa)])}),K(this,Gi,!1)),K(this,aa,[])});for(let r of s(this,di)){let n=Fp(r),i=s(this,hc).call(this,n),a=s(this,kt).queryRenderedFeatures(i,{layers:Array.from(s(this,Zi))});for(let u of a)u.id==null||t.has(u.id)||this.idleQueue.add(()=>{if(u.geometry!=null&&"coordinates"in u.geometry){let c;if(u.geometry.type==="Polygon"?c=Wc(u.geometry.coordinates):u.geometry.type==="MultiPolygon"&&(c=t4(u.geometry.coordinates)),!c)return;sy(r,c)&&u.id!=null&&(t.add(u.id),s(this,aa).push(["!=",["id"],u.id]))}})}}},"#handleRender"));L(this,aa,[]);L(this,Yd,o(()=>{this.idleQueue.clearAll()},"#cancelJobs"));L(this,gc,o(t=>{var r,n;if(s(this,kt)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,_u).size>0){let i=(n=(r=t==null?void 0:t.style)==null?void 0:r.stylesheet)==null?void 0:n.id;(!i||i!==s(this,fc))&&(K(this,fc,i),pt(this,Rn,ly).call(this),K(this,Gi,!0))}},"#handleStyleChange"));t&&(K(this,kt,t),s(this,kt).on("styledata",s(this,gc)),s(this,kt).on("render",s(this,Ru)),K(this,Lu,s(this,kt).loaded()),s(this,kt).on("load",()=>{K(this,Lu,!0)})),fC&&pt(this,Rn,gC).call(this)}hideLayersIntersectingPolygons(t,r){s(this,xn)&&clearTimeout(s(this,xn)),s(this,Xd).call(this),K(this,di,t.reduce((n,i)=>{if(i.geometry.type==="Polygon"){let a=Wc(i.geometry.coordinates);n.push(a)}else i.geometry.type==="MultiPolygon"&&n.push(...i.geometry.coordinates.map(a=>Wc(a)));return n},[]));for(let n of r)s(this,_u).add(n);K(this,Gi,!0),pt(this,Rn,ly).call(this),s(this,Ru).call(this)}destroy(){s(this,kt)&&(s(this,kt).off("styledata",s(this,gc)),s(this,kt).off("render",s(this,Ru))),this.idleQueue.clearAll()}};Gi=new WeakMap,kt=new WeakMap,fc=new WeakMap,_u=new WeakMap,Zi=new WeakMap,di=new WeakMap,xn=new WeakMap,Lu=new WeakMap,hc=new WeakMap,Jd=new WeakMap,Xd=new WeakMap,Rn=new WeakSet,ly=o(function(){if(K(this,Zi,new Set),s(this,kt))for(let t of s(this,_u))s(this,kt).getLayer(t)&&s(this,Zi).add(t)},"#filterStylesInMap"),Ru=new WeakMap,aa=new WeakMap,hC=o(function(){return this.idleQueue.size!==0},"#running"),Yd=new WeakMap,gc=new WeakMap,gC=o(function(){if(!document.getElementById(cy)&&s(this,kt)){let t=document.createElement("div");t.id=cy,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.bottom="0",t.style.right="0",t.style.pointerEvents="none",t.style.zIndex="1000",s(this,kt).getContainer().appendChild(t)}},"#addDebugContainer"),yC=o(function(){let t=document.getElementById(cy);if(!t||!s(this,di)||!s(this,kt))return;let r=t.querySelectorAll('[id^="polygon-box-"]');for(let n=0;n<r.length;n++)r[n].remove();for(let n=0;n<s(this,di).length;n++){let i=s(this,di)[n],a=Fp(i),u=s(this,hc).call(this,a),c=document.createElement("div");c.id="polygon-box-".concat(n),c.style.position="absolute",t.appendChild(c);let m=[Math.min(u[0].x,u[1].x),Math.min(u[0].y,u[1].y)],d=[Math.max(u[0].x,u[1].x),Math.max(u[0].y,u[1].y)];c.style.top=m[1]+"px",c.style.left=m[0]+"px",c.style.width=d[0]-m[0]+"px",c.style.height=d[1]-m[1]+"px",c.style.border="2px solid ".concat(s(this,Gi)?"red":"blue")}},"#updateDebugBBoxes"),o(my,"OutdoorLayers");var qd=my;l();l();l();l();var Qd="attribute float pathDistance;\nattribute vec3 pathNormal;\nattribute vec3 pathTangent;\n\n\nuniform vec2 uvScale;\nuniform float vertexes;\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform float nearZoom;\nuniform float farZoom;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform vec2 cameraParameters;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform float highlightWidthMultiplier;\nuniform vec3 highlightColor;\n\nfloat flattenFactor = 0.0;\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping y = mx + b where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main() {\n fragPathDistance = pathDistance;\n\n // We can get an origin point for the cross-section of the path by\n // subtracting the surface normal times the radius, since the surface normal\n // points strictly away from the centre.\n vec3 origin = position - nearRadius * normal;\n \n // Inflate the path along its surface normal to increase its radius from\n // 'nearRadius' to 'farRadius' when the camera is at 'farZoom'.\n vec3 adjustedPosition = position;\n zoomLevel = clampRemap(cameraParameters.x, nearZoom, farZoom, 0.0, 1.0);\n\n // expansion factor uses the zoom level to increase/decrease the radius\n // for fixed widths, this number is ZERO\n float expansionFactor = (farRadius - nearRadius) * zoomLevel;\n\n adjustedPosition += normal * expansionFactor;\n\n\n // TODO: optimize by removing branching\n bool isHighlighted = fragPathDistance >= highlightStartFraction && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction);\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // we have to subtract 1., don't ask why\n adjustedPosition += normal * (highlightWidthMultiplier - 1.) / 2.;\n }\n \n\n // Determine how far the path extends \"up\" or \"down\" in the direction of the\n // path normal.\n float height = dot(adjustedPosition - origin, pathNormal);\n\n // For horizontal paths, flatten the bottom half entirely so that it's flat\n // against the floor. This makes the path look nicer when it's\n // semitransparent behind opaque geometry, so you don't see it\n // peeking through. For vertical paths, preserve the full tube geometry.\n if (!pathIsVertical) {\n float desiredHeight = max(height, 0.0);\n desiredHeight = desiredHeight * flattenFactor;\n float flattenMagnitude = height - desiredHeight;\n adjustedPosition = adjustedPosition - pathNormal * flattenMagnitude;\n }\n\n // Transform the vertices into NDC.\n vec4 mvPosition = modelViewMatrix * vec4(adjustedPosition, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n\n fragTexcoord = uv;\n\n // Compute a texture coordinate for mapping the arrow texture to the path.\n // We don't want to use the u-value that Three.js provides, because the\n // path may end up twisting arbitrarily -- but we want the arrow texture to\n // always be on the top of the path.\n vec3 bitangent = cross(normal, pathTangent);\n fragTopTextureU = -dot(bitangent, pathNormal) * 0.5 + 0.5;\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // TODO: fix scaling\n fragTopTextureU = -dot(bitangent, pathNormal * highlightWidthMultiplier) * 0.5 + 0.5;\n }\n\n radius = mix(nearRadius, farRadius, zoomLevel);\n}\n";l();var dy="#define ARROW_FADING_POINT 0.15\n\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform vec2 resolution;\nuniform vec2 cameraParameters;\nuniform vec3 color;\nuniform float pathLength;\nuniform bool showPulse;\nuniform vec3 pulseColor;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform float arrowAnimationTimer;\nuniform float opacityMultiplier;\nuniform bool dashed;\nuniform sampler2D arrowTexture;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform vec3 highlightColor;\n\n// How long the arrow should be, as a factor of pathRadius. Since we've\n// mostly flattened the top of the path, values near 2.0 (the diameter)\n// will probably look best.\nconst float arrowLength = 2.0;\n\n// How much of a relative margin the arrow texture should have inside the\n// area laid out for it. Useful to pull the arrow away from the edges of the\n// path, which slope down.\nconst float arrowMargin = 0.1;\n\n// How many arrow-lengths of space should be between arrows on a short path.\nconst float arrowSpacingOnShortPath = 6.0;\n\n// How many arrow-lengths of space should be between arrows on a long path.\nconst float arrowSpacingOnLongPath = 7.5;\n\n// How long a path must be to be considered \"long\", as a factor of\n// the path radius.\nconst float longPathLength = 200.;\n\n// How long a path must be to be considered \"short\", as a factor of the\n// path radius.\nconst float shortPathLength = 75.;\n\n// How much of the path's length the fade-in should comprise when going from\n// zero opacity to full opacity.\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // Compute the opacity of the path based on the distance from the current\n // fragment to the 'complete' value as it varies from 0.0 to 1.0.\n // Fragments that are at the 'complete' value or past it will be fully\n // transparent, while fragments that are at 'complete - completeLength'\n // or before it will be fully opaque. However, we adjust the 'complete'\n // value here so that it overshoots by one full 'completeLength', so that\n // the entire path will be opaque when the 'complete' value is at 1.0.\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n // Push in the texture coordinates so that they ramp up\n // at 'arrowMargin' instead of at zero; this remapping looks somewhat\n // like this:\n // 1 ^ ___\n // | /\n // | /\n // | /\n // | /\n // |___/\n // 0 +---------->\n // 0 ^ 1\n // arrowMargin\n // Making the arrows narrower on the path.\n float u = fragTopTextureU;\n u = clamp(\n u * (1. / (1. - arrowMargin * 2.)) - (1. / (1. - arrowMargin * 2.) - 1.) / 2.,\n 0.0,\n 1.0\n );\n\n float arrowSpacing = clampRemap(\n pathLength,\n shortPathLength * radius,\n longPathLength * radius,\n arrowSpacingOnShortPath,\n arrowSpacingOnLongPath\n );\n\n // Reduce the spacing between arrows when the camera zooms out, as increasing\n // the path radius will increase the arrow size and thus be able to fit\n // fewer arrows on in total, and this secondary movement of the arrows\n // \"zooming off\" the end of the path is unpleasant\n float expandAmount = mix(1.0, farRadius / nearRadius, zoomLevel);\n float effectiveArrowSpacing =\n arrowSpacing * 1.0 / expandAmount +\n arrowMargin * 2.0;\n\n float effectiveArrowLength = arrowLength * radius * (1. - arrowMargin * 2.0);\n\n // Adjust the slope of the vertical texture coordinate so that it goes\n // from 0 to 1 along the length of the arrow plus the spacing between\n // arrows, and adjust its x-intercept so that one arrow moves to the\n // exact position of the next arrow as 'arrowAnimationTimer' goes\n // from 0 to 1\n float v = (\n fragTexcoord.x * (pathLength / effectiveArrowLength)\n - arrowAnimationTimer * (1. + effectiveArrowSpacing)\n );\n\n // Compute a \"looping sawtooth\" wave for determining the vertical texture\n // coordinates of the arrow texture, roughly as follows:\n // 3 ^ /\n // | ___/\n // 2 | /\n // | ___/\n // 1 | /\n // |___/\n // 0 +--------------->\n // 0 ^ ^\n // ^ |_|\n // | effectiveArrowLength\n // |___|\n // effectiveArrowSpacing\n //\n // This is effectively equivalent to this sort of sawtooth wave:\n // ^\n // 1 | / / /\n // |___/ ___/ ___/\n // 0 +--------------->\n //\n // Causing the image of the arrow to repeat, with dead space (the bottom\n // edge of the texture stretched out) between the arrows at the provided\n // spacing. The reason why the \"looping\" design is preferred is because\n // it takes advantage of WebGL's 'GL_REPEAT' texture wrapping behaviour\n // to avoid the discontinuity that can end up causing visual artifacts.\n if (mod(v, (1. + effectiveArrowSpacing)) < 1.) {\n v = v - effectiveArrowSpacing * floor(v / (1. + effectiveArrowSpacing));\n } else {\n v = ceil(v / (1. + effectiveArrowSpacing));\n }\n\n // Use the r-component of the texture to determine whether the arrow covers\n // this fragment or not\n vec2 sampleTexcoord = vec2(u, v);\n float arrowAmount = 0.0;\n vec3 secondColor = pulseColor;\n\n vec3 finalColor = color;\n\n\n \n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n // [Anzor] I added 0.005 to make the highlight transition a little smoother when the width multiplier is too high\n if (fragPathDistance >= highlightStartFraction - 0.005 && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction)) {\n finalColor = highlightColor;\n }\n\n\n if (displayArrowsOnPath) {\n arrowAmount = texture2D(arrowTexture, sampleTexcoord).r;\n float delta = 1.0 - abs(fragPathDistance * 2.0 - 1.0);\n secondColor = mix(finalColor, pulseColor, 1.0 - smoothstep(ARROW_FADING_POINT, 0.0, delta));\n }\n\n if (dashed) {\n float dashLength = 0.1; // Adjust this value to change the dash length\n float gapLength = 0.1; // Adjust this value to change the gap length\n float totalLength = dashLength + gapLength;\n float numSegments = ceil(1.0 / totalLength);\n float adjustedTotalLength = 1.0 / numSegments;\n float adjustedDashLength = adjustedTotalLength * (dashLength / (dashLength + gapLength));\n float pattern = mod(fragPathDistance, adjustedTotalLength);\n opacity = pattern < adjustedDashLength ? 1.0 : 0.0;\n }\n\n\n\n if (showPulse) {\n // Add the pulse color to the path by determining how far the current fragment\n // is from 'pulse'\n float pulseLocation = remap(\n pulse,\n 0.0,\n 1.0,\n -pulseLength,\n 1.0 + pulseLength\n );\n float pulseDistance = smoothstep(\n 0.0,\n pulseLength,\n abs(fragPathDistance - pulseLocation)\n );\n\n // Blend the pulse color to the path based on how close this fragment is to\n // the 'pulse' value and whether it's covered by an arrow -- but if it's\n // covered by *both*, then we go back to using the regular path color\n // (making arrows look like \"holes\" when they're overlapping the pulse.)\n float pulseLevel = abs(1.0 - pulseDistance - arrowAmount);\n\n \n gl_FragColor = vec4(mix(finalColor, secondColor, pulseLevel), opacity * opacityMultiplier);\n } else if (displayArrowsOnPath) {\n gl_FragColor = vec4(mix(finalColor, pulseColor, arrowAmount), opacity * opacityMultiplier);\n } else {\n \n gl_FragColor = vec4(finalColor, opacity * opacityMultiplier);\n }\n #include <colorspace_fragment>\n}\n";l();var bC="uniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nvarying float fragPathDistance;\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // this ensures that the stencil mask moves along with the path above it, to avoid the progress bar effect\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, opacity);\n}";var vC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAQkHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZpZciQ7rkT/uYpeAicQ5HI4mr0dvOX3ATOl0li3q3SVJkUqFMEBcHc4IuX2///fcf/hK7cSXRatpZXi+cott9h5U/3j63EMPt+fL1/h+fPdeff6NnJMHNPjD2U/7+qcl183aH6eH+/PO52PN7E+B3qZ+Tlgspkjb57X1edAKT7Oh+fvrj3v6/nNdp7ftd057abHnz78npVgLGG8FF3cKSTPz2oXJFaQWuocCz9D0mhnEu8Tx54k6dexc98F77vY+f48n96HwvnyvKB8iNHzfJCvY3cj9HZF4dfM7/6QZ4j+7deb2J2z6jn7sbueC5Eq7rmpl63cd1w4GCrd2wov5Vt4r/fVeFW2OMnYIpuD13ShhUi0T8hhhR5O2Pc4w2SJOe5IuGOMM6Z7rhL+FudNSrZXOFFJz3KpkqtJ1hKn4+tawp233flmqMy8AlfGwGCBOz693Fcn/+b1OtA5Bt0QfH2NFeuKFnCWYZmzn1xFQsJ5xlRufO/LvcGNf5PYRAblhrmywe7HY4gh4Re20s1z4jrx2fkHNYKu5wCEiLmFxYREBnwJSUIJXmPUEIhjJT+dlceU4yADQSSu4A65SamQnBptbu7RcK+NEh+nkRYSIZBGSQ0EIlk5C/jRXMFQlyTZiUgRlSpNekklFymlaDGN6po0q2hR1apNe001V6mlaq211d5iS0iYtNLUtdpa651JO0N37u5c0fuII408ZJSho442+gQ+M0+ZZeqss82+4koL+q+y1K262uo7bKC085Zdtu662+4HrJ108pFTjp562umvWXtm9X3WwofM/T5r4Zk1y1i+1+mvrHFa9WWIYHIiljMyFnMg42oZANDRcuZryDla5ixnvkVIIZGsBbHkrGAZI4N5hygnvObuV+Z+mzcn+Y/yFr/LnLPU/RuZc5a6Z+Y+5+2LrK1+K0q6CTIWWkx9OggbF+zaY+1Wk/766H46wF8ONFY+O8hBMEc7oc4Vdh+8JsE+PUSrVjr70Zz1+H56PH3o9sRR1ql5Ha8bUMQxpe89Tki8Sb0tE23cw3DcfEo+ugnj2G3WEmononVfoag71pVjR+EmAE53eT5tqYfEHl/7ThMusaI+St0jktFa9gKnreiQqCNpZ2mJdSkbaiK6DrovYR4/JhJfRsx5d5EVZnEIPetHnU5KynJPTSuCPuC0lOuXH7n1DNq7DpUtHbhM5lDA0c2bnDCJoOObMnyj+aPjPwx0yiDUxKKsg35VnRnBEVhonKwK5hOk5NttUrhr2+tMOXkPJb1RZ+iAelYjL2MuO3pGRQ78GdxwOOaTAcJZcewq7ilB1RJCSozUdSEdwVJVb6asiBsHH1Bqgbiv3Cmkkis6ktVnZGRRwMNJjUA3Ao2127YWdhAIblxF51hzMcZsVZc0r0dJo5Liqfn41Q+q193SGhhkMkgaLJRNnEpqBtyVvbcVffIk+LE9QPFBTMTQe0aWkMXMnx3dy5sfHreDE60Ql50E+SqRcmfK16L2p0Ol8JFATu3qASXy7SvmiGW2cdMBxsty44CvtLogfGlv7WkCSV0WId2270EaD5Ym40cs+SAwZuNjPSTywAvEfLmzQhtLDntfCnhl/fNmUNnzyA2g76Zn0SP+c+I6bCC0FONUQ4L50e95dif+DH/m9htQjBEhPPpOjYjmm2ChbfEMIUaYtAIxmWJHlilLU8ZRs9pCsHbDpFaRgZljz2QandjDIBPZDGTuoZW1KdlYh52ALzisKJRNWSQmLAWx8iv9mGttT15bBc2oxd57bZtVF98CYtK3UH22Yd/A7WaKa+ZjNTOXEzNhMJ5kmQOvfzsbxbZALJ2xwGBjX2HFQybhi7kpbA7DVpS3RxMJwFyHwGk5gs6a4lrRHVqhYT0QTJC9UZcC9Yrelkn6yXch68NKNtG7CiU3vf/zMZAYXPWdrR9XZ/ctMV1sJQ2wJEGxzaHs7LmmHIwnUwbwnNAapBY9xhE19DNJW3ua0dDk/AjwITacR0PqZxkbyJ+E5jYbxI84x1TBE+y90hwDCYZIM0tqAKPZfCzFrbH8kYCm3eqQkZ2+2GovcL8Suokyg8yyCJes6dcouSLiNSLb0ETJU+/N/WFsBBSOXBbm9Cwp4CzlOag7ro7R2vC19nSsCPmAjIEMiobFwaoVXhjTU2XMpgEsDH/L3Sx54OCTMUSXI/IIA2V4QcLQpwVz12pInI0bY56pIQ2BSGRLL+yLfZ7JkiimbK+aepsbwRStpokx5gCqe1hjdMAwcINbkk5jmedrNRAG5pUXPe0sZIoXy1h7lSDxApzheg24JeDNtDS1oBDBUC4iWZFilBPhZx0Kqx2lihpbG9q4sYidksCN4yRYhNM4nxfBbTi4E3AT6B3igbvs9Gv8ZkHsIfdlep+2HelEDbkJdNjqZQ90B7k6OIoFfkkPNoY+z0gzACa1f2qcBYxVJpT2QQgS19dKQlbC24S92xiEAFRKB5Uy1qrBgOtwIge55G0kRPfIytGx0tMOrGfrijB2FHOk/TKcMjDTMPeBo4FnXD5cQ8vtdgoAN0yuzZQHQI09wm/5vAB6RHyI9rYKiZ6YWC6rbaiLmDtoaToC1bViXQFNtgWsOfEEKCleC3GWPSfgQWRQWMgw/9FDgvOZrFAT3SmsA3DLbqlsSppQG5QeOjPXavUUkxF/qgLM05vW5o7UakuBqo2ZW8Nj0LB7imVJC9QSA+wd7RPztIUZ80xQZq0ROrc8CSVncWzkTA/RwmunldCPAQKjqVC7bhRuTIv0plbk7gOX4m5OAi2YesYZ0KBQRToG8iv9x8dgGtgECYRBeEU87OxoSc8epu+s7Mq/MN0VbBT19dii7ekO66UZwdAMtoAVQd13J5nwZe98OgGslmVqAGBkeLZNVNVlWpV18qihntXKnBZvrDIVgFpx4q5poLqREOVplMPSpTF2KvjBAzDpprkruXIaaUmUD4Xo2yrGWcYlixKIwRFjl0jPQhKznUXZAoSjlg9c/NwAI4p3Q/w5bCNfhUZS7bGfqesHqKAlyZZxZgNrhGevZXccaqBys4NEqB3Vqfptji9uUrhCL6yXFqxtm0hhLyYU3Tjd8I/HZaWD1oyVjnG5hhpCN5yHSf8BQUZlVNd00OP4M0TK+JSM7iqWi01SinFkCQXWxiZJLqqAHiEt3G3I2WYd46KU9pIJIOkoRQYCcEAAPguHo0Y4k8Hl6SW50MoW0uZU8jJOUghKo38Nl5ZSwsJNAUC2/lFZWkfMjrU8dFrTjHpJnUrLCILQIxINiYdQlDXaE/razQ4jjQluN5jW1Eh/S7yYvI5gigSjdLYU9TiFXAcHjISiLhQd9obb3OQmwY+YqVwiBMCkOGLXaK/ljBShh56c1g0uyIb2lBRKO7ZTAFncw5c5UGjGSy3CsI1Jt2mtruZkfhBZmbR+842Yu1eDiWEl0V6LZcGem6Ct+LW4Wy3oAjyNObazKBHomhJ3HMKEKHgiGksH+Ig1nTidfNMyA+oYHqVFaRGLiQreVLc9GvQgftKjW9cfUSKNYL80rqU7Um2rwqQJR1ai31Wq7vzKJEsFHDj0bAEMUKXgvfD5bWbaLPBTKz1Nk/Fg+GUZvUzFw80CLaKtPAACVAWrismh863FU4IJ0716SXBUNVb/SDMVvZgDt34CXoOq1JKvg0n08gPHTwXBNgD5W8pZZ8E9EVWcv1DZMB2NFysIwkqBSaH5QRmsAHdkHB+UANvLJvFpQKAahSmYTLEd2AFO+5rsqRRU6sVv5IP0wsSPLcWsbC1Y95mte71CUm6RJJWwkg6Q4k+xWMM0ByElJPQ6j2ED5hY42ALpZRytx9RlgQlJLijzhKi5eX5JBSIRGfo9o2xhd/0aWku8OS+4D9ZnovHDQMPaYo4qm2mlZbUnd7pR6oQj29Z2BqJ9n3LRT+MTLu3IR+ZP2TCPh3EDw8H1NHpoT7FibNYU8WHd9ESHcY12aDOQCUBddi4Ucp+4yuzz8ybcCCu1h8zvzXhDN4HYLq1R+U0xzUqg5QSA3iSBgdDouy55Ifx0DaeEhgezxBRGmoEJ6AJitVuzwtKPlUskHgU2F0LS7AFIwW5jPu0RUL7sp+fkNk0ee8P6uXYgl40WM+cdCOW21r13e0ivt0ff/mYcUfrQZWs2BiN6G+MDTGz1BKORmUTNQp9YGSHFxAeTkQrKd6FoVUogyytW25OLy3OpaO5oZCQp46aPzb5LnJiFEIwAKkmbYVYIjzVv3vj7rA6HignEeQAXTAHKDhoD7Uujh0QjtsB6fTP1NzO7T1Nzq4F1GnfHdXCG1Yxjwdtjf+PGRGTzEtEAUCz7KLfTdItLwCXuSOAzVjaZB6LvbUZhYGWmifSZlcMDnGHPd6gPeiK9erhpiw7ZP9ahTrMhFDa1J53m9ri2DloziqGETTcVSppCbTDDjExg6RrZ6cPEzB8XArEjQSB29odrUoLyoS/65RfM9fprGGjlHpbhGgbYD8MtmW1eFcAWX5dbcMHcl8sUI2k+H7GPW9VrArw3G+BefcCrCaAT/N53YLvP26Uy0kMFnDEZz0DJkmQqEOlL7SlKweYhH8gxpYeAYi0f9magqPbMYZuUI6007lSZQoyoGfYQHsNRzHXR3MMINTSMZpq1KD2A5MDJgtMLdRU6R4CEOJcKGiIJ7K6P/vAM6xpECHI8rRHsaEj6smkngAUjXTzrRoSI48ZpHOqgOY5OejKVdpnmiYUChQnVdIPa6ekGqRSRgEO119oDHOiIUQ5ciYVgaF1oG8Udo8WYtD+DEi8D/w8rAJE2k2PoyV0oMtpauxreaFjpujAvxFlwBhjuNqM9P0IfI5iD8Nh8y1kG4igjJkDNkOijnlLhItAd9lhRd670yNRTu95cR/Xuu0c5WO4DEFk5YQAPtLvU4TYPGRh4APPEDNiuuwR6SC21JoFbQBBMr+zJmT32QplNI6p16PbculN/pCX1wAyTWGTeJ774aln0gvQikw7TmkfsNbdQNs0adutYUDqNtGc0RqngUYdhUYuHSL1/eLrgvqDTC5neu++vufRkEgP9D2T64Kg/c4n+s7k3dDr3me8nOr0c72MRNmgF7D4WySPP0YAI/bI4eixwc7K13QiRiL85A8fnSsUj+mvTrsZtVUEQZ6sTpVafW8nYJZyaZS0U+0xIb6et9PhhtoObozQbjKAoDf6eiFgx1UUvpUYj1GweH0MNMrofhynfWn7+KYu7n5r83hN9aqm+6qjcH7dUlgvZVLV3xqq4fbP16qv+eofuTz43eomAqfS7GBAB9zEE31WJ37eVIPtdGN5A8nMYPvvLt8t2/V/6gM19G4g/hIL7UXf9JgbuLRZ+AoW//AzyMxTcWyz8BAruLRZ+AgX3r3y2+mT/PwfiN1DoVI+QT3CZDmvb8022JeYb6HiQPQpPPvboFB+i1MZdcqWZqthHmix6vttw0UAI1z8oEnGwVe++c7JamxslC+8xKJE41XJmug1npz+6CUAKyURd9gSxo+kWxvtZth848GBlws/0SKjYhmbZ9IiV+mcGBSdWHk8sqSr2zz5J7QME/0yD+z4Pe+JuGn1MV/vUyZwOHojWPlmPXgf9CuoeN9UAT+FGwaLg44v3dWe6QpvuL3Ln/p3k/2AgqNDcfwHgqUmIIqn+hwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH4wYRESAMujenGAAAB9FJREFUeNrtnWlsFVUUx899fS1gUoKioEY+WBRUEohGkUhAKxgEjSgGoRGB4AJCNKAIJBJZJSiyGYMKKkIoLlEUKhUraxFkKUE2kU1aCrRgW2jpg9f29R2/sBTo67v3zL2zvfP73MzM+XU6mf+5504BGIZhGIZhGIZhGIZhGMZGGq3JvSmR62++BXHH7Ylbf9ouRMT99yVq/e0PICIiHumUmPV3PooXOf5EItafXoCXOdUn8ep/pgjrUDY40ervX4JXUTEiocoXL5/FawiNEwlU/6hzeB3hqQljQIwJYT3UzEkQA2JiGOslsiAhDIgZ1RiD6NIEMBD8NIKxyQr6vv7FtdgQa31uILg0ig2zsZmv4//yePUj7rjNv/U3yUEJ/r7Xr/XfvBmlOPKwT+vfhpIUdvdj/Wm7UZpTz/mv/g4HUYGyQb5r/+SjEhXD/VV/j5OoSGisj16LRe9iVCY8xTcGxIulSKBmtk8MiKHlSMIn8ViMqkQivojHgfcuIJ0VAc/XPzmMVljrcQOBmdVojY1NvVx/8mcRtEqeh+NxypJatM6+ezxb/7Io6uBwR4/e/1moicJunvz956A2ip/1Xv3Nt6JGSgd6rf47/0KtlHssHrfZi5rxVDwWDx5C7XgoHotHC9AANbO8YqBXERohMt8bv/8X/kNDRDM9cA+IgWVojhWuNxAYXo4mWePyeBwYHUKz5Lo6HidNvICmybvVxfXPqEbz7Gvr2vrn1KAdHH7IpX//8yNoD8dcGY+TM6NoF26MxzLTL26Mx0majtM4q5ed7yhNulVsd5WAxqset/mGS6/d5CIBLXI62/7I6ZKyzjUC0rIfsP+hE3zkxt9c8vy7tPnJbiKfuyP+Xdn8ZDeuiMei+zF0juWOGyBNv+iMxw4bEBkl6CzOxmPx6ll0mryWDtb/ViU6z17H4rEYG0I3cMiheByYFEZ34Ew8Dn5UjW7BiXisY/rFDfGYmgWCCwcngXto0q08z1YBSUsy3NWgb5Qe2WSjgJRlfdy2RJPcNXm9bQIarexpsP5VdxHjcbMcm2Q3/5P64i71U8k/ELuLNsVjcct2cnST+rGg+Jo4XmhLPBZ376GOfoOkAIB5NWTHxuu/nzj9ElkA8gLgA+pLlvF43IU4/VI9G1QEAHnIPjfVaP1PnqRdVngKqAkActDMa2Hw/u9zijjjNg5UBcBr1FbD3jbG6h9QSruk8ovfyFESABnUWSNT8VgMI06/lF7aBqomAJ4n3m+G4nHgbeJfZfHljcCKAqDHcWo87m2g/gnE53LhlS+lqQqATv9S4/FL2u//qcT2T34XoAuAdvuJBspf11z/LOKbyYG6q4bqAqDVTqKByjFa21/U6ZfdaWBNADTdTDQQnqSv/pRMYjrZevVLCUUAiF+JBqpnaqv/J2I+zb3mxZwkAMTPDq8ep1A3P/1y3ZOEJABgiaPxuOnvxLN/B7oEwELq/sPl1utvSdz8VPsl6BMAn1AbBKut1t96F+3ENXOFTgFiehXRwAZL8Vi0JW5+qppW7+HIAgDGnyca2G4hHouOh2knvTARdAuAkedsj8cinTj9Ujka9AuAV87YHI/F08TNT2eHgQkB0I/aIDhGmuIU/YnnKxkAZgTAU8SGHC0eDyJufiqKfTKrAqBrPtFAiXo8HlFBO1VBA7ebZQHQifhUVo7H4p2QgQeOdQHQbp8t8Tg4idj+2dPgwJIGAdBqhw3xmDz9EuelQ4cASP3DeDwOziW+ecdbldEiACDbcDxOWkBs/8QNHpoEAPXjLNFMmfpv+IZ4+PjRU5cAWGwwHqcQNz/J2NUmAMgjavHjMfEPTGpvvz4BQH1MrzMkoHoW2CsAppEaBFskemQUA+HJYLcAeJfQINgpNVuvbiA0FuwXAG8qNwh2S07WqxqQ/saPXgEwRDGu7W8te2Q1A6XSH0HWLAD6nVa5zoPS9asZKJb/DLZuAdDzhPx1Hu2gkobkDRQq/J8w7QJAfstevuI3+WQN1F39dkAAtP9H7jpPdFVtiMgZOKC0Z9aAAEiT+mrbScLQjIyBXWngtABokRf/kKefonRF4xvYqrjmYEQApG6Md8SyvrS+eDwDG5QbzUYExL3QMxnUlZGGD5wFbhEADQ7YVwyhr401YCD6LbhHACyK3SA4N9TK6mhMA5EvwE0CYF6sBkFopLXl8exYq9/gLgHwYf3x+PxoqwMC9RoIvw9uE1D/gH3VeOsjItnSq9/OCqhvwL5qAoABA5XU28qsAHjj2tW8mukABgzEXP12WgAMvrpBEPkYwICB2KvfjguAvnUH7GvnARgwUGRhEt24gLoD9tGvAAwYKLDyySzzAqDzpQH76CIAAwYOWtqNYoMAaH9xwP57AAMG9ljbj2SHALhjJyLijwAGDGyzuCPNFgGQuhlxpfw1yR94dfAxi5cmojI/lRyx+rtaX9XDhADr2CVABc//JycWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWIDToH8FyJUWtVWAALedDoFhGIZhGIZhGIZhGIYxyf+YwEMsIhMo/AAAAABJRU5ErkJggg==";l();var ep=new ne,tp=new ne,Nu=new ne,xC=new ne,Ao=new ne,fT=.5,hT=2;function gT(e,t,r){let n=e.x-t.x,i=e.y-t.y,a=e.z-t.z,u=r.x-t.x,c=r.y-t.y,m=r.z-t.z,d=n*u+i*c+a*m,f=Math.sqrt(n*n+i*i+a*a),g=Math.sqrt(u*u+c*c+m*m);if(f===0||g===0)return 0;let v=d/(f*g),b=Math.max(-1,Math.min(1,v));return Math.acos(b)}o(gT,"calculateCornerAngle");function CC(e,t=20){if(e.length<3||t<=0)return e;let r=t,n=t/2,i=[e[0]];for(let a=1;a<e.length-1;a++){let u=e[a],c=e[a-1],m=e[a+1],d=u.distanceTo(c),f=u.distanceTo(m);d>r&&(Ao.subVectors(u,c).normalize(),Nu.set(u.x-Ao.x*n,u.y-Ao.y*n,u.z-Ao.z*n),i.push(Nu.clone())),i.push(u),f>r&&(Ao.subVectors(m,u).normalize(),Nu.set(u.x+Ao.x*n,u.y+Ao.y*n,u.z+Ao.z*n),i.push(Nu.clone()))}return i.push(e[e.length-1]),i}o(CC,"reduceEdgeLengths");var EC=.0025;function IC(e,t,r,n=Math.PI*2/3){if(e.length<3||t<=0||r<=0)return e;let i=[e[0]];for(let a=1;a<e.length-1;a++){let u=e[a-1],c=e[a],m=e[a+1],d=c.distanceToSquared(u),f=c.distanceToSquared(m);if(d<EC||f<EC){i.push(c);continue}if(gT(u,c,m)<n){ep.subVectors(c,u).normalize(),tp.subVectors(m,c).normalize();let v=Math.sqrt(d),b=Math.sqrt(f),D=Math.max(fT,Math.min(hT,t)),A=Math.min(D,v*.5),x=Math.min(D,b*.5);Nu.set(c.x-ep.x*A,c.y-ep.y*A,c.z-ep.z*A),xC.set(c.x+tp.x*x,c.y+tp.y*x,c.z+tp.z*x),i.push(Nu.clone(),xC.clone())}else i.push(c)}return i.push(e[e.length-1]),i}o(IC,"insertCornerControlPoints");var yT=new Zc;function DC(e,t,r){var jn,ha,ga,Wu;let{breakpoint:n,width:i,accentColor:a,completeFraction:u,isVertical:c,visibleThroughGeometry:m,dashed:d,highlightCompleteFraction:f,highlightStartFraction:g,highlightEndFraction:v,highlightColor:b,highlightWidthMultiplier:D,xrayOpacity:A}=t,{color:x}=r,E=!0,S=0,I=1/0,C=t.displayArrowsOnPath,k=!0,V=C,z=typeof i=="object"?Number(i.output[n])/2:i/2,M=typeof i=="object"?Number((jn=i.output[n+1])!=null?jn:i.output[n])/2:i/2,T=((ha=r.altitude)!=null?ha:0)+bT,Z=0;e[0].z+=T;for(let Me=1;Me<e.length;++Me){e[Me].z+=T;let Ee=e[Me].x-e[Me-1].x,Et=e[Me].z-e[Me-1].z;if(c)Z+=Math.sqrt(Ee*Ee+Et*Et);else{let ya=e[Me].y-e[Me-1].y;Z+=Math.sqrt(Ee*Ee+ya*ya+Et*Et)}}let j=e,W=(ga=t.smoothingCornerRadius)!=null?ga:bi.cornerRadius,$=(Wu=t.smoothingTension)!=null?Wu:bi.tension,q=W>0&&$>0;if(q&&(j=CC(j),j=IC(j,W,$)),!c){let Me=j[0],Ee=j[j.length-1],Et=q?.01:-.01;j.push(Ee.clone().setZ(Ee.z+Et)),j.unshift(Me.clone().setZ(Me.z+Et))}let J=new Uy;V&&(J=yT.load(vC),J.colorSpace=_c);let G=new Ot(x),ae=new Ot(a),te={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new Ae(1,1)},cameraParameters:{type:"v2",value:new Ae(S,0)},complete:{type:"f",value:E?0:1},color:{type:"c",value:G},pathLength:{type:"f",value:Z},nearRadius:{type:"f",value:z},farRadius:{type:"f",value:M},nearZoom:{type:"f",value:S},farZoom:{type:"f",value:I},pulseColor:{type:"c",value:ae},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:c},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:J},displayArrowsOnPath:{type:"b",value:C},showPulse:{type:"b",value:k},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:d},highlightCompleteFraction:{type:"f",value:f},highlightStartFraction:{type:"f",value:g},highlightEndFraction:{type:"f",value:v},highlightColor:{type:"c",value:new Ot(b)},highlightWidthMultiplier:{type:"f",value:D}};q&&j.length>=2&&(j.unshift(j[0].clone()),j.push(j[j.length-1].clone()));let ee=new Hy(j);ee.curveType="catmullrom",ee.tension=$;let le=30,fe=8,xe=le*j.length,be=new qy(ee,xe,z,fe,!1),Oe=new Float32Array(be.attributes.position.count);for(let Me=j.length;Me<Oe.length;Me++)Oe[Me]=Me;be.setAttribute("vertexIndex",new Ar(Oe,1));let Ie=new Float32Array(be.attributes.position.count),ot=new Ar(Ie,1);for(let Me=0;Me<=xe;Me++)for(let Ee=0;Ee<=fe;++Ee)ot.setX(Me*(fe+1)+Ee,Me/xe);be.setAttribute("pathDistance",ot);let Sr=new Float32Array(be.attributes.normal.count*3),wr=new Ar(Sr,3);for(let Me=0;Me<xe;Me++){let Ee=be.tangents[Me];for(let Et=0;Et<=fe;++Et)wr.setXYZ(Me*(fe+1)+Et,Ee.x,Ee.y,Ee.z)}be.setAttribute("pathTangent",wr);let F=new Float32Array(be.attributes.normal.count*3),Y=new Ar(F,3);for(let Me=0;Me<xe;Me++){let Ee=be.tangents[Me];var P,ce,Q;c?(P=Ee.x*Ee.y,ce=-1+Ee.y*Ee.y,Q=Ee.z*Ee.y):(P=-Ee.x*Ee.z,ce=-Ee.y*Ee.z,Q=1-Ee.z*Ee.z);let Et=Math.sqrt(P*P+ce*ce+Q*Q);Et===0&&(Et=1);let ya=P/Et,By=ce/Et,Mc=Q/Et;for(let Hi=0;Hi<=fe;++Hi)Y.setXYZ(Me*(fe+1)+Hi,ya,By,Mc)}be.setAttribute("pathNormal",Y);let re=new Ji({uniforms:te,vertexShader:Qd,fragmentShader:dy});re.transparent=!0,re.alphaTest=.5,te.resolution.value.x=1,te.resolution.value.y=1,te.vertexes.value=Oe.length,te.arrowTexture.value.wrapS=Ku,te.arrowTexture.value.wrapT=Ku,te.arrowTexture.value.anisotropy=16;let pe=new Pe(be,re);pe.name="path";let Je=pe.clone();Je.name="xray";let Ft=De(R({},te),{opacityMultiplier:{type:"f",value:A},pathIsVertical:{type:"b",value:c}});Ft.complete.value=1,Je.material=new Ji({uniforms:Ft,vertexShader:Qd,fragmentShader:dy}),Je.material.transparent=!0,Je.material.alphaTest=.5,Je.material.depthWrite=!1,Je.material.depthTest=!1,Ft.resolution.value.x=1,Ft.resolution.value.y=1,Ft.vertexes.value=Oe.length,Ft.arrowTexture.value.wrapS=Ku,Ft.arrowTexture.value.wrapT=Ku,Ft.arrowTexture.value.anisotropy=16,Ft.complete.value=u,pe.userData=Je.userData=t.mesh.userData;let _t=t.mesh;if(!m){let Me=new Ji({uniforms:te,vertexShader:Qd,fragmentShader:bC}),Ee=new Pe(be,Me);Ee.name="stencil",Ee.material.colorWrite=!1,Ee.material.stencilWrite=!0,Ee.material.stencilRef=1,Ee.material.stencilFunc=va,Ee.material.stencilZPass=$n,Ee.material.stencilZFail=$n,Ee.material.stencilFail=$n,Ee.material.depthWrite=!1,Ee.material.depthTest=!1,Ee.userData=t.mesh.userData,_t.add(Ee),_t.add(Je),Je.renderOrder=Jt.XRAY_PATH,pe.renderOrder=Jt.STENCIL_PATH}if(_t.add(pe),c){let Me=new rr().setFromObject(pe),Ee=new ne;Me.getCenter(Ee),_t.children.forEach(Et=>{Et.geometry.center(),Et.position.copy(Ee)})}m&&(pe.material.stencilWrite=!0,pe.material.stencilRef=1,pe.material.stencilFunc=ba,pe.material.stencilZPass=zn,pe.material.stencilZFail=zn,pe.material.stencilFail=zn,pe.material.needsUpdate=!0,pe.layers.disableAll(),pe.layers.enable(Jt.ALWAYS_ON_TOP_PATHS)),be.computeBoundingBox();let tr=new ne;return be.boundingBox.getCenter(tr),{mesh:_t,material:re,center:tr}}o(DC,"buildPath");var bT=.15;var vT=.5,py=class py extends Le{constructor(r,n,i,a){super();h(this,"rendererState");h(this,"verticalDistanceDirty",!0);h(this,"convertTo3DMapPosition");h(this,"getParentContainer");h(this,"convertZoomLevelToAltitude");this.rendererState=r,this.convertTo3DMapPosition=n,this.getParentContainer=i,this.convertZoomLevelToAltitude=a}update(r,n,i){let a=!1;for(let u of this.rendererState.geometry3DsInScene)if(u&&u.type==="path"&&u.components[0].type==="path"){let c=u.components[0],m=u.components[1],d=c.isVertical&&this.verticalDistanceDirty;if(!(c instanceof vo))continue;let f=[];if(c.dirty||m.dirty||d){if(c.mesh.parent!=null)for(let g=c.mesh.children.length-1;g>=0;g--)Nt(c.mesh.children[0]);if(c.feature.features.length===2&&c.feature.features[0].properties.parentId&&c.feature.features[1].properties.parentId){let g=c.feature.features[0],v=c.feature.features[c.feature.features.length-1],b,D,A=g.geometry.coordinates[2]||0,x=v.geometry.coordinates[2]||0;g.properties.parentId&&(b=this.getParentContainer(g.properties.parentId,!0),b!=null&&b.altitude!=null&&(A+=b.altitude,c.isVertical=!0)),v.properties.parentId&&(D=this.getParentContainer(v.properties.parentId,!0),D!=null&&D.altitude!=null&&(x+=D.altitude,c.isVertical=!0));let E=this.convertTo3DMapPosition(g.geometry.coordinates[1],g.geometry.coordinates[0],A),S=this.convertTo3DMapPosition(v.geometry.coordinates[1],v.geometry.coordinates[0],x);Math.abs(E.z-S.z)>vT&&b!=null&&b.visible&&D!=null&&D.visible&&(f=[E,S])}else{let g=c.feature.features;for(let v=0;v<g.length;v++)if(v===0||!E4(g[v].geometry.coordinates,g[v-1].geometry.coordinates)){let b=this.convertTo3DMapPosition(g[v].geometry.coordinates[1],g[v].geometry.coordinates[0],g[v].geometry.coordinates[2]||0);f.push(b)}}if(f.length>1){let{mesh:g,material:v,center:b}=DC(f,c,{color:m.color,altitude:m.altitude,isVertical:c.isVertical});c.mesh=g,c.material=v,c.position=b}c.dirty&&typeof c.width=="object"&&c.width.on==="zoom-level"&&(c.altitudeBreakpoints=c.width.input.map(g=>this.convertZoomLevelToAltitude(g))),c.dirty=!1}m.dirty&&(c.mesh.children.forEach(g=>{g.name!=="stencil"&&(g.material.uniforms.color.value.set(m.color),g.material.visible=m.visible,g.material.needsUpdate=!0)}),c.mesh.position.z=m.altitude,m.dirty=!1),c.material&&(c.mesh.children.forEach(g=>{var b,D,A,x,E,S,I;let v=g.material.uniforms;if(g.name==="stencil"){c.materialDirty&&SC(c,g.material);return}if(c.materialDirty&&g.name==="xray"&&v.opacityMultiplier&&(v.opacityMultiplier.value=c.xrayOpacity),typeof c.width=="object"&&c.width.on==="zoom-level"){c.altitudeBreakpoints&&c.altitudeBreakpoints.length>2&&Se.warn("Path width interpolation does not yet support more than 2 breakpoints! This will be added in a future version. Path width will only use the first two breakpoints.");let C=c4(i,(D=(b=c.altitudeBreakpoints)==null?void 0:b.slice(0,2))!=null?D:[r,n]);c.breakpoint=C,v.nearZoom.value=(x=(A=c.altitudeBreakpoints)==null?void 0:A[C])!=null?x:r,v.farZoom.value=(S=(E=c.altitudeBreakpoints)==null?void 0:E[C+1])!=null?S:n,v.nearRadius.value=Number(c.width.output[C])/2,v.farRadius.value=Number((I=c.width.output[C+1])!=null?I:c.width.output[C])/2}v.cameraParameters.value.x=i,c.materialDirty&&(v.displayArrowsOnPath.value=c.displayArrowsOnPath,v.pulseColor.value.set(c.accentColor),v.complete.value=c.completeFraction,SC(c,g.material),typeof c.width=="number"&&(v.nearZoom.value=r,v.farZoom.value=n,v.nearRadius.value=Number(c.width)/2,v.farRadius.value=Number(c.width)/2))}),c.displayArrowsOnPath&&c.animateArrowsOnPath&&(c.mesh.children.forEach(g=>{g.name!=="stencil"&&(g.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,g.material.needsUpdate=!0)}),a=!0),c.materialDirty=!1)}this.verticalDistanceDirty=!1,a&&this.publish("animate:path")}};o(py,"PathSystem");var yc=py;function SC(e,t){let r=t.uniforms;r.highlightCompleteFraction.value=e.highlightCompleteFraction,r.highlightStartFraction.value=e.highlightStartFraction,r.highlightEndFraction.value=e.highlightEndFraction,r.highlightWidthMultiplier.value=e.highlightWidthMultiplier,r.highlightColor.value.set(e.highlightColor)}o(SC,"updateHighlightPathUniforms");l();var zt,Uu,Vi,np,fy=class fy{constructor(t){h(this,"rendererState");h(this,"dirty",!1);L(this,zt);L(this,Uu);L(this,Vi);L(this,np,new Gr);this.rendererState=t}updateOne(t){if(t instanceof at&&t.components[0]instanceof Lt&&t.components[1]instanceof Hn&&t.parentObject3D instanceof Kn&&(K(this,zt,t.components[0]),K(this,Vi,t.components[1]),!s(this,zt).detached&&s(this,zt).shouldDetach&&s(this,zt).mesh!=null&&s(this,zt).material!=null&&s(this,zt).batchedProps!=null)){K(this,Uu,t.parentObject3D),s(this,zt).visible=!1;let r=s(this,Vi).color,n=s(this,Vi).opacity*Oa(t),i=new A4({color:r,side:hi,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1},1,s(this,zt).material.repeatYFactor),a=new Q4(1,s(this,zt).batchedProps.positionCount,0,i),u=A6(s(this,zt),a,s(this,np));if(u==null)return;a.userData={entities:{0:t.id},detached:!0},s(this,zt).instanceIndex=u,i.setColor(s(this,zt).instanceIndex,new Ot(r),s(this,Vi).topColor?new Ot(s(this,Vi).topColor):new Ot(r)),s(this,zt).mesh=a,s(this,zt).material=i,s(this,Uu).add(a),s(this,zt).shouldDetach=!1,s(this,zt).detached=!0}}update(){if(!this.dirty)return;let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.dirty=!1,this.cleanup()}cleanup(){K(this,zt,void 0),K(this,Uu,void 0),K(this,Vi,void 0)}};zt=new WeakMap,Uu=new WeakMap,Vi=new WeakMap,np=new WeakMap,o(fy,"MeshDetachmentSystem");var rp=fy;l();l();function wC(e,t,r){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let i=t||1e-4,a=i/Math.max(r,1e-4);return Md(e.mesh.geometry,e.batchedProps.range,i,0),e.material&&(e.material.repeatYFactor=a),e.currentHeight=i,!0}return!1}o(wC,"updateHeight");function AC(e,t,r,n,i,a){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,r),r.decompose(n,i,a),n.z=t,r.compose(n,i,a),e.mesh.setMatrixAt(e.instanceIndex,r),e.altitude=t,!0):!1}o(AC,"updateAltitude");var Nn,pi,op,ap,up,sp,hy=class hy{constructor(t){h(this,"rendererState");h(this,"dirty",!1);L(this,Nn);L(this,pi);L(this,op,new Gr);L(this,ap,new ne);L(this,up,new Nc);L(this,sp,new ne);this.rendererState=t}updateOne(t){var r;if(t instanceof at&&t.type==="geometry"&&((r=t.components[1])!=null&&r.dirty)&&(K(this,Nn,t.components[0]),K(this,pi,t.components[1]),t.type==="geometry")){let n=!1;s(this,pi).height!==s(this,Nn).currentHeight&&(n=wC(s(this,Nn),s(this,pi).height,s(this,pi).initialHeight)),s(this,pi).altitude!==s(this,Nn).altitude&&(n=AC(s(this,Nn),s(this,pi).altitude,s(this,op),s(this,ap),s(this,up),s(this,sp))),n&&s(this,Nn).mesh!=null&&s(this,Nn).mesh.computeBoundingSphere()}}update(){for(let t of this.rendererState.geometry3DsInScene)this.updateOne(t);this.cleanup()}cleanup(){K(this,Nn,void 0),K(this,pi,void 0)}};Nn=new WeakMap,pi=new WeakMap,op=new WeakMap,ap=new WeakMap,up=new WeakMap,sp=new WeakMap,o(hy,"MeshModificationSystem");var ip=hy;l();var xT={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1},gy=class gy{constructor(t){h(this,"state",xT);h(this,"core");this.core=t}update(t){let r={};for(let[n,i]of Object.entries(t))n in this.state&&this.state[n]!==t[n]&&(this.state[n]=i,r[n]=i);this.handleUpdate(r)}handleUpdate(t){t.showPolygonLabelTextAreaMesh!=null&&(t.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),t.showEnvMap!=null&&(t.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),t.showCollisionBoxes!=null&&(t.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes())}};o(gy,"Debug");var cp=gy;l();var bc=9,ET=!1,FC=.1;function CT(e,t,r){for(let n=0;n<t;n++){let i=(r&16711680)>>16,a=(r&65280)>>8,u=r&255;e[n*3]=i/255,e[n*3+1]=a/255,e[n*3+2]=u/255}}o(CT,"fillArrayWithColor");var yy=class yy{constructor(t,r,n){h(this,"state");h(this,"renderer");h(this,"renderService");h(this,"pickingTexture");h(this,"pickingMaterial");h(this,"pixelBuffer");h(this,"width",0);h(this,"height",0);h(this,"scale",1/2);h(this,"color",1);h(this,"convertTo3DMapPosition");h(this,"destroyed",!1);h(this,"enabled",!1);h(this,"backgroundId",16777215);h(this,"resize",o(()=>{let t=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/t*this.scale),this.height=Math.floor(this.renderer.domElement.height/t*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new zy(this.width,this.height,{format:Ly,type:_y,internalFormat:"RGBA"})},"resize"));h(this,"shouldShowByXY",o((t,r,n)=>{if(this.pixelBuffer==null)return!1;let i=t+(this.height-r-1)*this.width,a=this.pixelBuffer[i*4],u=this.pixelBuffer[i*4+1],c=this.pixelBuffer[i*4+2],m=a<<16|u<<8|c;return m===n||m===this.backgroundId},"shouldShowByXY"));h(this,"activeOccluders",new Set);h(this,"update",o(()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let t,r;for(let i of this.state.geometry3DsInScene)if((i==null?void 0:i.type)==="group-container"&&i.userData.occluderFeature!=null&&i.userData.occluderId!=null&&(this.activeOccluders.add(i.userData.occluderId),i.userData.occluderDirty)){if(t=i.userData.occluderFeature,t.geometry.type==="Polygon"&&t.geometry.coordinates.length>0){let a=fd(t,this.convertTo3DMapPosition,{color:"white",height:FC});r=this.createOccluderMesh(a,i.userData.occluderId),i.add(r)}else if(t.geometry.type==="MultiPolygon"){let a=hd(t,this.convertTo3DMapPosition,{color:"white",height:FC});r=this.createOccluderMesh(a,i.userData.occluderId),i==null||i.add(r)}i.userData.occluderDirty=!1}this.renderer.setRenderTarget(this.pickingTexture);let n=new Ot(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(bc),this.renderService.renderScene(this.state.geometryScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(bc),ET?this.renderService.enabledLayers.add(bc):this.renderService.enabledLayers.delete(bc),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let i of this.state.geometry2DsInScene){let a=i==null?void 0:i.components[2];if(i&&(a==null?void 0:a.id)!=null&&this.activeOccluders.has(a.id)&&(a!=null&&a.enabled)){let u=i.components[0].projection,c=Math.floor(u.x*this.scale),m=Math.floor(u.y*this.scale),d=this.shouldShowByXY(c,m,a.id);i.components[0].isOccluded=!d}else i&&a&&!a.enabled&&(i.components[0].isOccluded=!1)}}).catch(i=>{this.destroyed||Se.error(i)})},"update"));if(this.state=t,this.convertTo3DMapPosition=r,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new Ji({glslVersion:Ny,vertexShader:"\n attribute vec3 color;\n varying vec3 vColor;\n void main() {\n vColor = color;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n varying vec3 vColor;\n out vec4 fragColor;\n\n void main() {\n fragColor = vec4(vColor, 1.0);\n }\n "})}applyId(t,r){let n=t.attributes.position,i=new Float32Array(n.count*3);CT(i,n.count,r),t.setAttribute("color",new Ar(i,3))}createOccluderMesh(t,r){let n=new Pe(t,this.pickingMaterial);return n.layers.set(bc),this.applyId(n.geometry,r),n.userData.occluderId=r,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var t;this.destroyed=!0,(t=this.pickingTexture)==null||t.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};o(yy,"Occlusion2DSystem");var lp=yy;l();var by=class by{constructor(t){this.state=t;h(this,"dirty",!0)}update(){var t;if(this.dirty){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(n instanceof at&&n.type==="geometry"&&((t=n.components[0])==null?void 0:t.geometry)!=null){let i=n.components[0];i.geometry&&(i.geometry.dispose(),i.geometry=void 0)}}this.dirty=!1}}};o(by,"GeometryDisposalSystem");var mp=by;l();var vy=class vy extends Le{constructor(r){super();h(this,"dirty",!0);h(this,"state");h(this,"texturePromiseCache",new Map);this.state=r}async loadTexture(r){if(this.texturePromiseCache.has(r))return this.texturePromiseCache.get(r);let n=new Promise((i,a)=>{Eo.getLoader().load(r,i,void 0,a)});return this.texturePromiseCache.set(r,n),n}update(){for(let r of this.state.geometry3DsInScene){if(!(r instanceof at))continue;let n=r.components[6];if(!(n instanceof Lo))continue;let i=r.components[0];if(!(i instanceof Lt)||!n.dirty)continue;let a=zi(i);a!=null&&(n.texture!=null&&(n.texture.path===""?(a.texture=null,a.hideTextures(i.instanceIndex),n.dirty=!1):this.loadTexture(n.texture.path).then(u=>{u&&(n.textureInstance=u,a.texture=u,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),n.topTexture!=null&&(n.topTexture.path===""?(a.topTexture=null,a.hideTextures(i.instanceIndex),n.dirty=!1):this.loadTexture(n.topTexture.path).then(u=>{u&&(n.topTextureInstance=u,a.topTexture=u,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),n.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async r=>{(await r).dispose()}),this.texturePromiseCache.clear()}};o(vy,"TextureSystem");var dp=vy;l();var xy=class xy{constructor(t){h(this,"currentOrder",Jt.ALWAYS_ON_TOP_MODELS);h(this,"assignedOrders",new WeakMap);h(this,"state");this.state=t}assignOrder(t){return this.assignedOrders.has(t)?this.assignedOrders.get(t):(this.currentOrder+=1,this.assignedOrders.set(t,this.currentOrder),this.currentOrder)}releaseOrder(t){return this.assignedOrders.delete(t),Jt.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(t){return this.assignedOrders.get(t)}update(){var n;let t,r;for(let i of this.state.geometry3DsInScene)if(i&&i.type==="model"&&(n=i.components[1])!=null&&n.dirty)if(t=i.components[1],r=i.components[0],t.visibleThroughGeometry===!0){let a=this.assignOrder(r);r.renderOrder!==a&&(r.renderOrder=a)}else r.renderOrder>Jt.GEOMETRY&&(r.renderOrder=this.releaseOrder(r))}};o(xy,"RenderOrderSystem");var pp=xy;l();var Ey=class Ey{constructor(t){h(this,"state");this.state=t}applyMask(t,r,n){this.disableMask(t,r),n.mode==="mask"&&n.maskId!=null&&n.enabled?this.enableMaskProducer(t,r,n):n.mode==="masked-object"&&n.maskId!=null&&n.enabled&&this.enableMaskReciever(t,n)}update(){let t;for(let r of this.state.geometry3DsInScene)(r==null?void 0:r.type)==="geometry-group"&&(!sc(r,this.state)||Bd(r)&&sc(r,this.state))&&(t=r.components[0],t!=null&&t.dirty&&r.userData&&(r.traverse(n=>{(n instanceof Pe||n instanceof To)&&n.material instanceof Gy&&t!=null&&!n.userData.detached&&(this.disableMask(n.material,n),this.applyMask(n.material,n,t))}),t.dirty=!1))}enableMaskProducer(t,r,n){t.stencilWrite=!0,t.colorWrite=!1,t.stencilRef=n.maskId,t.stencilFunc=va,t.stencilZPass=$n,t.stencilZFail=zn,t.stencilFail=zn,t.needsUpdate=!0,t.depthWrite=!1,r.layers.disableAll(),r.layers.set(Jt.MASKS)}enableMaskReciever(t,r){t.stencilWrite=!0,t.stencilRef=r.maskId,t.stencilFunc=r.effect==="reveal"?Ry:ba,t.stencilZPass=zn,t.stencilZFail=zn,t.stencilFail=zn,t.needsUpdate=!0}disableMask(t,r){t.stencilWrite=!1,t.colorWrite=!0,t.needsUpdate=!0,r.layers.disableAll(),r.layers.set(Jt.GEOMETRY)}};o(Ey,"MaskingSystem");var fp=Ey;l();var OC=1e4,Cy=class Cy{constructor(t){h(this,"rendererState");h(this,"dirty",!1);this.rendererState=t}update(){var n;let t,r;for(let i of this.rendererState.geometry3DsInScene)if(r=i.components[0],t=i.components[7],i.type==="model"&&t!=null&&(t.dirty&&r.mesh!=null&&(t==null?void 0:t.verticalOffset)!==1/0&&(t.plane==null&&(t.plane=new Vy(new ne(0,0,-1),t.verticalOffset),this.process(r,t)),t.plane.constant!==t.verticalOffset&&(t.plane.constant=t.verticalOffset),t.topColor!=null&&((n=t.holeFillMesh)==null?void 0:n.material)instanceof qu&&t.holeFillMesh.material.color.set(t.topColor),t.topVisible!=null&&t.holeFillMesh!=null&&(t.holeFillMesh.visible=t.topVisible),t.dirty=!1),t.plane!=null&&t.holeFillMesh!=null&&t.topVisible===!0)){let a=t.plane,u=t.holeFillMesh;a.coplanarPoint(u.position),u.lookAt(u.position.x-a.normal.x,u.position.y-a.normal.y,u.position.z-a.normal.z)}}process(t,r){var v;if(t.mesh==null)return;let n=t.mesh.parent,i=[];t.mesh.traverse(b=>{if(b instanceof Pe){let D=b.geometry.clone();b.updateWorldMatrix(!0,!1),D.applyMatrix4(b.matrixWorld),i.push(D),D.computeVertexNormals(),b.material.clippingPlanes=[r.plane],b.material.transparent=!1}});let a=en(i),u=new jc,c=new jc,m=this.createHoleFillGeometry(a,r.plane,1);m.name="hole-fill-group";let d=new qu({color:(v=r.topColor)!=null?v:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:ba,stencilFail:$n,stencilZFail:$n,stencilZPass:$n}),f=new In(OC,OC),g=new Pe(f,d);g.name="hole-fill-mesh",r.holeFillMesh=g,g.renderOrder=1.1,c.add(m),c.add(t.mesh),u.add(c),u.add(g),n==null||n.add(u),t.mesh=u}createHoleFillGeometry(t,r,n=0){let i=new jc,a=new fr;a.depthWrite=!1,a.depthTest=!1,a.colorWrite=!1,a.stencilWrite=!0,a.stencilFunc=va;let u=a.clone();u.side=Hu,u.clippingPlanes=[r],u.stencilFail=Lc,u.stencilZFail=Lc,u.stencilZPass=Lc;let c=new Pe(t,u);c.renderOrder=n,i.add(c);let m=a.clone();m.side=Bo,m.clippingPlanes=[r],m.stencilFail=Rc,m.stencilZFail=Rc,m.stencilZPass=Rc;let d=new Pe(t,m);return d.renderOrder=n,i.add(d),i}};o(Cy,"ClippingPlaneSystem");var hp=Cy;l();var Iy=class Iy{constructor(){h(this,"plugins",new Set)}registerPlugin(t){this.plugins.add(t)}unregisterPlugin(t){this.plugins.delete(t)}update(t){for(let r of this.plugins)r.update(t)}};o(Iy,"PluginSystem");var gp=Iy;l();var Dy=class Dy{constructor(t){h(this,"type","occlusion2d");h(this,"enabled",!0);h(this,"id");this.id=t}};o(Dy,"Occlusion2DComponent");var yp=Dy;var PC=new Zn;var{DEFAULT_PITCH:XE,DEFAULT_BEARING:YE,DEFAULT_ZOOM_LEVEL:QE,DEFAULT_MIN_ZOOM_LEVEL:DT,DEFAULT_MAX_ZOOM_LEVEL:ST}=vn,wT=Te.radToDeg(.6435011087932844),vt,xt,ua,vc,ju,Fo,sa,zu,pr,wy,B,En,ca,Ye,Un,At,Cn,Kt,O,xc,qt,mt,BC,MC,TC,Wi,Ec,Cc,Ic,Dc,$u,bp,Sc,Gu,wc,la,Ay,ma,Ac,Fc,_r,Lr,Fy,vp,xp,Zu,Oc,Oy=class Oy extends Le{constructor(r,n={}){var v,b,D,A,x,E,S,I,C,k,V,z,M,T,Z,j;super();L(this,pr);h(this,"options");h(this,"container");h(this,"Debug");L(this,vt);L(this,xt);L(this,ua);L(this,vc);L(this,ju);L(this,Fo);L(this,sa);L(this,zu);h(this,"rendererDomElement");L(this,B,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,geometry3DsInScene:new Set,geometry2DsInScene:new Set,geometryScene:new nr("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:Jc,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new qm,externalTweenGroup:new qm,cameraObject:new Dp,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1,directionalLight:new Vc(16777215,.3*Math.PI),ambientLight:new Jy(16777215,.741*Math.PI),renderer:void 0,threeJSScene:new Xi});L(this,En,{});L(this,ca,new AbortController);h(this,"camera");L(this,Ye);L(this,Un);L(this,At);L(this,Cn);L(this,Kt);L(this,O,{});L(this,xc,window.matchMedia("screen and (min-resolution: 2dppx)"));h(this,"map");L(this,qt,o(()=>{var r;this.aborted||!((r=s(this,O))!=null&&r.renderSystem)||(s(this,O).renderSystem.twoDdirty=!0)},"#invalidate2DEntities"));L(this,mt,o(()=>{var r;this.aborted||!((r=s(this,O))!=null&&r.renderSystem)||(s(this,O).renderSystem.threeDdirty=!0)},"#invalidate3DEntities"));L(this,Wi,"standalone");L(this,Ec,o(()=>{s(this,O).geometryDisposalSystem.dirty=!0,this.render()},"#setGeometryDisposalDirty"));L(this,Cc,o(r=>Math.trunc(r*10)/10,"#round10"));L(this,Ic,o(()=>{pt(this,pr,wy).call(this,Qu()),s(this,O).twoDDrawSystem.dirty=!0,s(this,$u).call(this,void 0,void 0,!0)},"#handlePixelRatioChange"));L(this,Dc,o(()=>{s(this,$u).call(this)},"#handleWindowResizeWithEvent"));L(this,$u,o((r,n,i=!1)=>{let a=r!=null?r:this.rendererDomElement.clientWidth,u=n!=null?n:this.rendererDomElement.clientHeight;if((a===0||u===0)&&!i)return;s(this,B).canvasWidth=a,s(this,B).canvasHeight=u,pt(this,pr,wy).call(this,Qu()),s(this,la).call(this),pt(this,pr,TC).call(this),s(this,O).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,O).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,O).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,O).htmlControlsSystem.resize(this.canvasWidth),s(this,O).geometryInFocusSystem.resize(),s(this,O).occlusion2DSystem.resize();let{top:c,left:m}=this.container.getBoundingClientRect();s(this,B).containerOffset=[c,m],this.publish("resize"),this.render()},"#handleWindowResize"));L(this,bp,o(()=>{this.renderSync()},"#renderFull"));L(this,Sc,new ne);L(this,Gu,o((r,n)=>{let i=this.mode==="standalone"?s(this,xt):this.viewCamera;if(s(this,xt).position.z+this.camera.elevation>n.z){s(this,Sc).copy(n);let a=s(this,Sc).project(i),u=(a.x+1)/2*this.canvasWidth-0/2,c=(-a.y+1)/2*this.canvasHeight-0/2,m=s(this,Cc).call(this,u),d=s(this,Cc).call(this,c);r.x=m,r.y=d}else r.x=-1e3,r.y=-1e3},"#project"));L(this,wc,o((r,n)=>{s(this,Kt).setBufferSize(r,n),s(this,xt).aspect=r/n,s(this,xt).updateProjectionMatrix(),s(this,xt).updateMatrixWorld(!0),s(this,ju).x=r,s(this,ju).y=n},"#setBufferSize"));L(this,la,o(()=>{var u;let r=s(this,B).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,B).canvasHeight=this.rendererDomElement.clientHeight,i=Math.floor(r*this.resolutionScale),a=Math.floor(n*this.resolutionScale);s(this,wc).call(this,i,a),(u=this.map)==null||u.resize(),s(this,B).shouldMeasureCanvas=!1},"#measureCanvas"));h(this,"getParentContainer",o((r,n=!0)=>{if(!r)return n?s(this,B).geometryScene:void 0;if(typeof r=="string"||typeof r=="number"){let i=s(this,B).geometry3DMap.get(r);return i instanceof nr?i:(Se.warn("Parent (".concat(typeof r=="object"?r.id:r,") is not a valid container, adding to scene")),n?s(this,B).geometryScene:void 0)}else if(r.type==="group-container"){let i=s(this,B).geometry3DMap.get(r.id);if(i instanceof nr)return i}return n?s(this,B).geometryScene:void 0},"getParentContainer"));h(this,"showCollisionBoxes",o(()=>{s(this,O).collisionSystem.showCollisionBoxes(),this.render()},"showCollisionBoxes"));h(this,"hideCollisionBoxes",o(()=>{s(this,O).collisionSystem.hideCollisionBoxes(),this.render()},"hideCollisionBoxes"));h(this,"projectScreenXYToCoordinate",o((r,n,i=!1)=>{var g,v;let a=this.container.getBoundingClientRect(),u=(r-a.left)/s(this,B).canvasWidth*2-1,c=-((n-a.top)/s(this,B).canvasHeight)*2+1,m=new Ae(u,c),d,f;if(i)PC.setFromCamera(m,s(this,xt)),d=(g=PC.intersectObject(s(this,Fo),!1)[0])==null?void 0:g.point;else{let b=s(this,O).interactionSystem.getThreeDIntersectsFromXY(m);d=(v=b==null?void 0:b[0])==null?void 0:v.point,f=s(this,O).interactionSystem.getGroupContainerIntersectsFromXY(m)}if(d)return{coordinate:this.convert3DMapPositionToCoordinate(d),groupContainers:f}},"projectScreenXYToCoordinate"));h(this,"projectCoordinateToScreenXY",o(r=>{let n=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),i=new Ae;return s(this,Gu).call(this,i,n),{x:i.x,y:i.y}},"projectCoordinateToScreenXY"));h(this,"convert3DMapPositionToCoordinate",o(r=>{var a,u,c,m;let{lat:n,lon:i}=Xc((u=(a=s(this,B).center)==null?void 0:a[1])!=null?u:0,(m=(c=s(this,B).center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n,r.z]},"convert3DMapPositionToCoordinate"));h(this,"setBackgroundColor",o((r,n)=>{s(this,Kt).setBackgroundColor(r,n)},"setBackgroundColor"));h(this,"getMetersPerPixel",o(()=>s(this,O).cameraSystem.getCurrentMetersPerPixel(),"getMetersPerPixel"));h(this,"hideOutdoorLayersIntersectingPolygons",o((r,n)=>{s(this,O).outdoorLayersSystem.hideLayersIntersectingPolygons(r,n),this.render()},"hideOutdoorLayersIntersectingPolygons"));L(this,ma,new zc);L(this,Ac,new Gr);L(this,Fc,o(r=>{var n;Se.error("Render failed: ",r,(n=r.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:r})},"#onRenderError"));h(this,"render",o(()=>{var r;if(!(((r=s(this,O))==null?void 0:r.renderSystem)==null||this.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,O).renderSystem.update().catch(s(this,Fc))},"render"));h(this,"renderSync",o(()=>this.aborted?Promise.resolve():s(this,O).renderSystem.update(!0).catch(s(this,Fc)),"renderSync"));L(this,_r,Da(()=>{this.publish("user-interaction-start",void 0)},0,!0));L(this,Lr,Da(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));h(this,"on",o((r,n)=>{this.aborted||(super.on(r,n),["outdoor-view-loaded","outdoor-style-loaded"].includes(r)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(Se.warn('"'.concat(r,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(r)))},"on"));h(this,"off",o((r,n)=>{super.off(r,n)},"off"));h(this,"getCursor",o(()=>s(this,O).interactionSystem.getCursor(),"getCursor"));L(this,vp,o(()=>{if(s(this,B).geometryScene.removeEventListener("childadded",s(this,mt)),s(this,B).geometryScene.removeEventListener("childadded",s(this,qt)),s(this,B).geometryScene.removeEventListener("childremoved",s(this,mt)),s(this,B).geometryScene.removeEventListener("childremoved",s(this,qt)),window.removeEventListener("resize",s(this,Dc),!1),s(this,xc).removeEventListener("change",s(this,Ic)),this.map){for(let r in s(this,En))for(let n of s(this,En)[r])this.map.off(r,n);K(this,En,{})}this._subscribers={}},"#cleanupEventListeners"));L(this,xp,o(()=>{try{s(this,Wi)!=="outdoors-overlay"&&(this.map&&this.map.remove(),this.container&&this.rendererDomElement&&this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement)),this.container&&(s(this,Cn)&&this.container.contains(s(this,Cn))&&this.container.removeChild(s(this,Cn)),s(this,Ye)&&this.container.contains(s(this,Ye))&&this.container.removeChild(s(this,Ye)))}catch(r){Se.warn("Error during DOM cleanup, some elements may not have been removed:",r)}},"#cleanupDOMElements"));h(this,"destroy",o(()=>{var r,n;s(this,O)&&(s(this,O).textureSystem.destroy(),this.aborted||s(this,ca).abort(),s(this,vp).call(this),(r=globalThis.MappedinDebug)!=null&&r.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,O).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,O).cameraSystem.isCameraMoving)),this.remove("__scene"),s(this,O).renderSystem.destroy(),s(this,O).cameraSystem.dispose(),s(this,O).exporterSystem.destroy(),s(this,O).outdoorLayersSystem.destroy(),s(this,O).borderSystem.destroy(),s(this,sa)&&s(this,sa).disconnect(),s(this,Kt).destroy(),(n=s(this,vt))==null||n.traverse(i=>{Nt(i),"dispose"in i&&typeof i.dispose=="function"&&i.dispose()}),K(this,vt,void 0),s(this,O).htmlControlsSystem.destroy(),s(this,O).collisionSystem.destroy(),s(this,O).interactionSystem.destroy(),s(this,O).domMutationSystem.destroy(),s(this,O).geometryInFocusSystem.destroy(),s(this,O).occlusion2DSystem.destroy(),K(this,O,void 0),s(this,xp).call(this),K(this,Kt,void 0))},"destroy"));L(this,Zu,new ne);L(this,Oc,new ne);if(K(this,ca,new AbortController),s(this,B).useStandaloneCamera=(v=n.useStandaloneCamera)!=null?v:!1,s(this,B).naturalBearing=(b=n.naturalBearing)!=null?b:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!r.clientWidth||!r.clientHeight)throw new Error("[MappedinJS] Container width and height must be greater than 0");this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),(n.mode==="outdoors-interleaved"||n.mode==="outdoors-overlay")&&n.map&&(K(this,Wi,n.mode),this.map=n.map),s(this,B).geometryScene.addEventListener("childadded",()=>{s(this,mt).call(this),s(this,qt).call(this)}),s(this,B).geometryScene.addEventListener("childremoved",()=>{s(this,mt).call(this),s(this,qt).call(this)}),s(this,B).geometry3DMap.set(s(this,B).geometryScene.userData.entityId,s(this,B).geometryScene),n.center&&(s(this,B).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=r,pt(this,pr,BC).call(this),pt(this,pr,MC).call(this),s(this,O).htmlControlsSystem=new Km(this.container,{outdoorEnabled:!!this.map}),s(this,O).maskingSystem=new fp(s(this,B)),s(this,Wi)!=="outdoors-overlay"&&s(this,O).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),K(this,Kt,new al({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(D=n.gl)==null?void 0:D.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:o(W=>{var $;($=n.onWebGLContextRestored)==null||$.call(n,W),s(this,qt).call(this),s(this,mt).call(this),this.render()},"onWebGLContextRestored"),onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(A=n.backgroundAlpha)!=null?A:1})),s(this,B).renderer=s(this,Kt).renderer,K(this,vt,s(this,B).threeJSScene),s(this,vt).matrixWorldAutoUpdate=!1,s(this,Wi)!=="standalone"&&s(this,vt).add(C4()),s(this,vt).add(s(this,B).geometryScene);let i=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof i<"u"&&(i.dispatchEvent(new CustomEvent("observe",{detail:s(this,vt)})),i.dispatchEvent(new CustomEvent("observe",{detail:s(this,Kt)}))),K(this,xt,new Dp(wT,this.aspect,50,1e5)),s(this,B).cameraObject=s(this,xt),K(this,vc,new Zy),s(this,xt).renderOrder=999;let a=new Mo;a.add(s(this,xt)),K(this,zu,new Mo),s(this,zu).add(a),s(this,vt).add(s(this,zu)),s(this,xt).updateProjectionMatrix(),s(this,xt).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:o(()=>0,"getNorth"),georeference:[{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}}]},this.rendererDomElement=s(this,Kt).domElement(),K(this,ju,new Ae);let u=new In(1e6,1e6),c=new fr({color:0,visible:!1});K(this,Fo,new Pe(u,c)),s(this,Fo).name="worldPlane",s(this,vt).add(s(this,Fo)),(x=n.gl)!=null&&x.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,Dc),!1),s(this,xc).addEventListener("change",s(this,Ic)),typeof ResizeObserver=="function"&&((E=y.env)==null?void 0:E.NODE_ENV)!=="test"&&(K(this,sa,new ResizeObserver(Sa(W=>{s(this,$u).call(this,W[0].contentRect.width,W[0].contentRect.height)},50))),(S=s(this,sa))==null||S.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(I=globalThis.MappedinDebug)!=null&&I.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(C=globalThis.MappedinDebug)!=null&&C.TEST_IOS?"1920px":"100%",y.env.NODE_ENV==="test"&&this.rendererDomElement.setAttribute("data-testid","mappedin-canvas"),this.mode!=="outdoors-overlay"&&this.rendererDomElement.tabIndex!==void 0&&this.rendererDomElement.removeAttribute("tabindex"),s(this,B).canvasWidth=this.rendererDomElement.clientWidth,s(this,B).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let m=this.canvasWidth,d=this.canvasHeight;s(this,O).watermarkSystem=new wd(s(this,xt),s(this,B),n==null?void 0:n.watermark),s(this,O).watermarkSystem.on("texture-loaded",this.render),s(this,B).shouldMeasureCanvas=!0,s(this,B).pixelRatio=this.resolutionScale,s(this,wc).call(this,Math.floor(m*this.resolutionScale),Math.floor(d*this.resolutionScale)),s(this,B).directionalLight.position.set(-150,-150,350),s(this,vt).add(s(this,B).directionalLight),s(this,vt).add(s(this,B).ambientLight),s(this,O).cameraSystem=new Au(s(this,xt),s(this,vt),s(this,Kt).renderer,s(this,B),{mode:this.mode,canvasHeight:d,canvasWidth:m}),(k=globalThis.MappedinDebug)!=null&&k.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,O).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,O).cameraSystem.isCameraMoving)),s(this,O).cameraSystem.on("user-dolly-start",s(this,_r)),s(this,O).cameraSystem.on("user-pan-start",s(this,_r)),s(this,O).cameraSystem.on("user-rotate-start",s(this,_r)),s(this,O).cameraSystem.on("user-zoom-start",s(this,_r)),s(this,O).cameraSystem.on("user-tilt-start",s(this,_r)),s(this,O).cameraSystem.on("user-pedestal-start",s(this,_r)),s(this,O).cameraSystem.on("user-dolly-end",s(this,Lr)),s(this,O).cameraSystem.on("user-pan-end",s(this,Lr)),s(this,O).cameraSystem.on("user-rotate-end",s(this,Lr)),s(this,O).cameraSystem.on("user-zoom-end",s(this,Lr)),s(this,O).cameraSystem.on("user-tilt-end",s(this,Lr)),s(this,O).cameraSystem.on("user-pedestal-end",s(this,Lr)),s(this,O).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,O).geometryInFocusSystem&&(s(this,O).geometryInFocusSystem.cameraDirty=!0),this.render()}),this.onAbort(()=>{s(this,O).cameraSystem.off("user-dolly-start",s(this,_r)),s(this,O).cameraSystem.off("user-pan-start",s(this,_r)),s(this,O).cameraSystem.off("user-rotate-start",s(this,_r)),s(this,O).cameraSystem.off("user-zoom-start",s(this,_r)),s(this,O).cameraSystem.off("user-tilt-start",s(this,_r)),s(this,O).cameraSystem.off("user-pedestal-start",s(this,_r)),s(this,O).cameraSystem.off("user-dolly-end",s(this,Lr)),s(this,O).cameraSystem.off("user-pan-end",s(this,Lr)),s(this,O).cameraSystem.off("user-rotate-end",s(this,Lr)),s(this,O).cameraSystem.off("user-zoom-end",s(this,Lr)),s(this,O).cameraSystem.off("user-tilt-end",s(this,Lr)),s(this,O).cameraSystem.off("user-pedestal-end",s(this,Lr)),s(this,O).renderSystem.off("measure-canvas",s(this,la)),s(this,O).cameraSystem.off("change",this.render),s(this,O).outlineInterpolationSystem.off("needs-render",this.render)}),s(this,O).pathSystem=new yc(s(this,B),this.convertTo3DMapPosition,this.getParentContainer,s(this,O).cameraSystem.convertZoomLevelToAltitude),s(this,O).pathSystem.on("animate:path",this.render),this.onAbort(()=>{s(this,O).pathSystem.off("animate:path",this.render)}),s(this,O).panBoundsSystem=new Od(s(this,B),s(this,O).cameraSystem);let f=o(()=>{let{panBounds:W,fov:$,convertAltitudeToZoomLevel:q}=s(this,O).cameraSystem;if(s(this,O).panBoundsSystem.autoMinZoomLevel){if(W.radius<=0)return;let J=Math.min(s(this,B).canvasWidth/s(this,B).canvasHeight,1),G=$*Math.PI/180*J,ae=Math.tan(G/2),{radius:te,center:ee}=s(this,O).cameraSystem.panBounds,le=te/ae,fe=this.getThreeCamera().getWorldPosition(new ne),xe=ee.distanceTo(fe),be=Math.abs(fe.z-ee.z),Oe=le*be/xe,Ie=q(Oe);x4(Ie,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(Ie)}this.publish("pan-bounds-change",s(this,O).cameraSystem.panBounds)},"handlePanBoundsUpdate");s(this,O).panBoundsSystem.on("update",f),this.onAbort(()=>{s(this,O).panBoundsSystem.off("update",f)}),this.camera=new od(this,s(this,O),s(this,B)),this.camera.setZoomLevel((V=n.zoomLevel)!=null?V:QE),this.camera.setBearing((z=n.bearing)!=null?z:YE),this.camera.setPitch((M=n.pitch)!=null?M:XE),this.camera.setMaxZoomLevel(ST),this.camera.setMinZoomLevel(DT),s(this,O).domVisiblitySystem=new bd(s(this,B),s(this,Cn)),s(this,O).domMutationSystem=new Sd(s(this,B),s(this,Cn)),s(this,O).domMutationSystem.on("dimensions-update",()=>{s(this,O).collisionSystem.collidersDirty=!0,this.render()}),s(this,O).domDrawSystem=new Dd(s(this,B)),s(this,O).collisionSystem=new ad(s(this,Un),s(this,B),((T=n.useCollisionWorker)!=null?T:!0)&&((Z=n.useWorkers)!=null?Z:!0)),s(this,O).twoDDrawSystem=new xd(s(this,B),s(this,At),n.transformImageRequest),s(this,O).twoDDrawSystem.on("img:loaded",this.render),s(this,O).interactionSystem=new Hs(this.rendererDomElement,s(this,B),s(this,xt),s(this,Fo),s(this,O).cameraSystem.isUserInteracting),s(this,O).interactionSystem.on("doubletap-with-onefinger",W=>{var $;s(this,O).cameraSystem.enableZoom&&this.camera.animateTo({center:($=this.projectScreenXYToCoordinate(W.clientX,W.clientY))==null?void 0:$.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:Mp,easing:"ease-out"})}),s(this,O).interactionSystem.on("singletap-with-twofinger",()=>{s(this,O).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:Mp,easing:"ease-out"})}),s(this,O).interactionSystem.on("hover",this.render),s(this,O).interactionSystem.on("click",W=>{var ae,te,ee,le,fe,xe,be,Oe,Ie;if(W.entity2D.some(ot=>ot.id==="watermark")&&typeof s(this,O).watermarkSystem.options.onClick=="function"&&s(this,O).watermarkSystem.options.interactive){s(this,O).watermarkSystem.options.onClick();return}let q=W.entity3D?[(ae=W.entity3D)==null?void 0:ae.id]:[];(le=(ee=(te=W.entity3D)==null?void 0:te.parentObject3D)==null?void 0:ee.userData)!=null&&le.entityId&&q.push((be=(xe=(fe=W.entity3D)==null?void 0:fe.parentObject3D)==null?void 0:xe.userData)==null?void 0:be.entityId);let J=[],G=[];for(let ot of W.entity2D)ot.components[0]instanceof yi?J.push(ot.id):ot.components[0]instanceof gi&&G.push(ot.id);this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(W.position),geometry:q,paths:((Oe=W.entity3D)==null?void 0:Oe.components[0])instanceof vo?[W.entity3D.id]:[],markers:J,models:((Ie=W.entity3D)==null?void 0:Ie.components[0])instanceof bo?[W.entity3D.id]:[],labels:G,containers:Array.isArray(W.groupContainers)?W.groupContainers.map(ot=>ot.userData.entityId):[],pointerEvent:W.pointerEvent})}),s(this,O).interactionSystem.on("hover",W=>{var J,G,ae;if(!W.position)return;let $=[],q=[];for(let te of W.entity2D)te.components[0]instanceof yi?$.push(te.id):te.components[0]instanceof gi&&q.push(te.id);this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(W.position),geometry:W.entity3D?[(J=W.entity3D)==null?void 0:J.id]:[],paths:((G=W.entity3D)==null?void 0:G.components[0])instanceof vo?[W.entity3D.id]:[],markers:$,models:((ae=W.entity3D)==null?void 0:ae.components[0])instanceof bo?[W.entity3D.id]:[],labels:q,containers:Array.isArray(W.groupContainers)?W.groupContainers.map(te=>te.userData.entityId):[]})}),s(this,O).geometryInFocusSystem=new jd(s(this,B),s(this,xt));let g=o(W=>{this.publish("geometry-in-focus",W)},"handleGeometryInFocus");s(this,O).geometryInFocusSystem.on("geometry-in-focus",g),this.onAbort(()=>{s(this,O).geometryInFocusSystem.off("geometry-in-focus",g)}),s(this,O).twoDVisiblitySystem=new Cd(s(this,B)),s(this,O).drawSystem=new Ed(s(this,B),this.convertTo3DMapPosition),s(this,O).twoDProjectionSystem=new vd(s(this,B),s(this,Gu)),s(this,O).exporterSystem=new Ks(s(this,B)),s(this,O).meshOptimizationSystem=new yd(s(this,B),this.convertTo3DMapPosition),s(this,O).meshOptimizationSystem.on("model-loaded",this.render),s(this,O).meshOptimizationSystem.on("geometry-2d-added",this.render),s(this,O).meshOptimizationSystem.on("geometry-group-added",s(this,Ec)),this.onAbort(()=>{s(this,O).meshOptimizationSystem.off("model-loaded",this.render),s(this,O).meshOptimizationSystem.off("geometry-2d-added",this.render),s(this,O).meshOptimizationSystem.off("geometry-group-added",s(this,Ec))}),s(this,O).meshDetachmentSystem=new rp(s(this,B)),s(this,O).meshModificationSystem=new ip(s(this,B)),s(this,O).geometryDisposalSystem=new mp(s(this,B)),s(this,O).textureSystem=new dp(s(this,B)),s(this,O).textureSystem.on("texture-added",this.render),this.onAbort(()=>{s(this,O).textureSystem.off("texture-added",this.render)}),s(this,O).borderSystem=new Y4(s(this,B),this.convertTo3DMapPosition),s(this,O).clippingPlaneSystem=new hp(s(this,B)),s(this,O).renderOrderSystem=new pp(s(this,B)),s(this,O).pluginSystem=new gp,s(this,O).customGeometrySystem=new Pd(s(this,B),this.convertTo3DMapPosition),s(this,O).outlineInterpolationSystem=new kd(s(this,B)),s(this,O).outlineInterpolationSystem.on("needs-render",this.render),s(this,O).renderSystem=new Id(s(this,Kt),s(this,B),this.mode,s(this,vt),s(this,xt),this.viewCamera,s(this,O)),s(this,O).imageSystem=new Ud(s(this,B),this.convertTo3DMapPosition,s(this,Gu),n.bearing,n.naturalBearing,n.imagePlacementOptions),s(this,O).text3DSystem=new D4(s(this,B),this.convertTo3DMapPosition,(j=n.useWorkers)!=null?j:!0),s(this,O).text3DSystem.on("render",this.render),s(this,O).imageSystem.on("image-loaded",this.render),s(this,O).renderSystem.on("pre-render",()=>this.publish("pre-render")),s(this,O).renderSystem.on("post-render",()=>this.publish("post-render")),s(this,O).renderSystem.on("measure-canvas",s(this,la)),this.onAbort(()=>{s(this,O).renderSystem.off("pre-render",()=>this.publish("pre-render")),s(this,O).renderSystem.off("post-render",()=>this.publish("post-render")),s(this,O).renderSystem.off("measure-canvas",s(this,la))}),s(this,O).outdoorLayersSystem=new qd(this.map),s(this,O).occlusion2DSystem=new lp(s(this,B),this.convertTo3DMapPosition,s(this,Kt)),n.occlusionEnabled&&s(this,O).occlusion2DSystem.enable(),this.Debug=new cp(this),n.environment!==!1&&K(this,ua,pt(this,pr,Fy).call(this)),s(this,bp).call(this)}get viewCamera(){return s(this,vc)}get canvasWidth(){return s(this,B).canvasWidth}get canvasHeight(){return s(this,B).canvasHeight}get resolutionScale(){var r,n;return(n=(r=this.map)==null?void 0:r._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:Qu()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,Wi)}addGroupContainer(r,n,i){if(!s(this,B).geometry3DMap.has(r)&&!s(this,B).geometry2DMap.has(r)){let a=new nr(r);a.addEventListener("childadded",()=>{s(this,mt).call(this),s(this,qt).call(this)}),a.addEventListener("childremoved",()=>{s(this,mt).call(this),s(this,qt).call(this)}),(n==null?void 0:n.visible)!==void 0&&(a.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&a.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&Zr(a,n.interactive,s(this,B)),(n==null?void 0:n.focusable)!==void 0&&il(a,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(a.userData.preloadGeometry=n.preloadGeometry),s(this,B).geometry3DMap.set(r,a);let u=this.getParentContainer(i);u instanceof nr&&u.addEntity(a),s(this,mt).call(this),this.render()}else Se.error("Group container with ID '".concat(r,"' already exists. The group container cannot be added."));return{id:r,type:"group-container"}}addCustomGeometry(r,n,i,a,u){if(s(this,B).geometry3DMap.has(r))Se.error("Custom geometry with ID '".concat(r,"' already exists. The custom geometry cannot be added."));else{let c=new Mu(n,i),m=new at(c,new Hn(a));(a==null?void 0:a.interactive)!==void 0&&Zr(m,a.interactive,s(this,B)),m.id=r,c.mesh.userData={entityId:r,type:"custom-geometry"},s(this,B).geometry3DMap.set(m.id,m);let d=this.getParentContainer(u);u&&d instanceof nr?d.addEntity(m):s(this,B).geometryScene.addEntity(m),s(this,mt).call(this),this.render()}return{id:r,type:"custom-geometry"}}registerPlugin(r){s(this,O).pluginSystem.registerPlugin(r)}unregisterPlugin(r){s(this,O).pluginSystem.unregisterPlugin(r)}addGeometryGroup(r,n,i,a){var u,c,d;if(!s(this,B).geometry3DMap.has(r)&&!s(this,B).geometry2DMap.has(r)){let f=new Kn(r);f.addEventListener("childadded",()=>{s(this,mt).call(this),s(this,qt).call(this)}),f.addEventListener("childremoved",()=>{s(this,mt).call(this),s(this,qt).call(this)}),f.userData.dirty=!0,s(this,B).geometry3DMap.set(r,f);let g=typeof i=="function"?i(n.features[0]):i;for(let b of n.features){if(b.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(b.geometry.type))continue;let D=(b==null?void 0:b.id)||((u=b==null?void 0:b.properties)==null?void 0:u.id)||wa(),A={color:ol};if(typeof i=="function")A=(c=i(b))!=null?c:{color:ol};else{let m=i||{color:ol},{visible:E}=m;A=Po(m,["visible"])}let x=s(this,O).meshOptimizationSystem.createEntityFromFeature(D,b,R({outline:!0},A));s(this,B).geometry3DMap.set(D,x),f.userData.entities3D.add(D),s(this,O).textureSystem.dirty=!0}(g==null?void 0:g.__EXPERIMENTAL_maskEnabled)===!0&&Gp(f,{enabled:g.__EXPERIMENTAL_maskEnabled,maskId:g.__EXPERIMENTAL_maskId,effect:g.__EXPERIMENTAL_maskEffect,mode:g.__EXPERIMENTAL_maskMode}),f.setVisible((d=g==null?void 0:g.visible)!=null?d:!0);let v=this.getParentContainer(a);v instanceof nr&&v.addEntity(f),s(this,mt).call(this),this.render()}else Se.error("Geometry group with ID '".concat(r,"' already exists. The geometry group cannot be added."));return s(this,O).outlineInterpolationSystem.geometries3DDirty=!0,{id:r,type:"geometry-group"}}addOccluder(r,n){let i=this.getParentContainer(n),a=s(this,O).occlusion2DSystem.reserveOccluderId();return i==null||i.addOccluderFeature(r,a),a}addImage(r,n,i,a){try{P6(r,n,i)}catch(u){Se.error(u);return}if(!s(this,B).geometry3DMap.has(r)&&!s(this,B).geometry2DMap.has(r)){let u=new Nd(n),c=new at(u,new Hn(i));c.id=r||wa(),u.mesh.userData={entityId:c.id,type:"path"},s(this,B).geometry3DMap.set(c.id,c);let m=this.getParentContainer(a);m instanceof nr&&m.addEntity(c),s(this,mt).call(this),this.render()}else Se.error("Image with ID '".concat(r,"' already exists. The image cannot be added."));return{id:r,type:"image"}}addModelGroup(r,n,i,{parent:a,onComplete:u}={}){var c,m;try{s6(r,n,i)}catch(d){Se.error(d);return}if(!s(this,B).geometry3DMap.has(r)&&!s(this,B).geometry2DMap.has(r)){let d=new Kn(r);d.addEventListener("childadded",()=>{s(this,mt).call(this),s(this,qt).call(this)}),d.addEventListener("childremoved",()=>{s(this,mt).call(this),s(this,qt).call(this)}),s(this,B).geometry3DMap.set(r,d),d.userData.dirty=!0,d.userData.modelURL=i.url;for(let g of n.features){let v=g.id||g.properties.id||wa(),b=s(this,O).meshOptimizationSystem.createModelFromFeature(v,g,R({},i));(g.properties.interactive!==void 0||i.interactive!=null)&&Zr(b,(c=g.properties.interactive)!=null?c:i.interactive,s(this,B)),i.clippingPlaneZOffset!=null&&(b.components[7]=new B4,b.components[7].verticalOffset=i.clippingPlaneZOffset),b.parentId=d.userData.entityId,s(this,B).geometry3DMap.set(v,b),d.userData.entities3D.add(v)}let f=this.getParentContainer(a);f instanceof nr&&f.addEntity(d),s(this,mt).call(this),(m=this.render())==null||m.then(u)}else Se.error("Model group with ID '".concat(r,"' already exists. The model group cannot be added."));return{id:r,type:"geometry-group"}}addMarker2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{d4(r,n,i||{})}catch(m){Se.error(m);return}if(u===void 0||!s(this,B).geometry2DMap.has(u)&&!s(this,B).geometry3DMap.has(u)){let m=pt(this,pr,Ay).call(this,r,new yi(n,i),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&i.interactive!=="pointer-events-auto"&&Zr(m,i==null?void 0:i.interactive,s(this,B)),(i==null?void 0:i.enabled)!=null&&rl(m,i.enabled),(i==null?void 0:i.occlude)!=null&&jp(m,i.occlude);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,B).geometry3DMap.get(i.attachTo):void 0;d instanceof at&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),this.render()}else Se.error("Marker2D with ID '".concat(u,"' already exists. The marker cannot be added."));return{id:u,type:"marker"}}addText3D(r,n,i,a){if(!s(this,B).geometry3DMap.has(r)&&!s(this,B).geometry2DMap.has(r)){let u=new tl(De(R({},n),{properties:De(R({},n.properties),{id:r,content:n.properties.text})})),c=new at(u,new es(i==null?void 0:i.appearance));c.id=r,u.mesh.userData.entityId=r.toString(),u.mesh.userData.type="text3d",s(this,B).geometry3DMap.set(r,c);let m=this.getParentContainer(a);m instanceof nr&&m.addEntity(c),s(this,mt).call(this),this.render()}else Se.error("Text3D with ID '".concat(r,"' already exists. The text3d cannot be added."));return{id:r,type:"text3d"}}labelText3D(r,n,i={}){var d,f;try{if(!n||!r)throw new Error("content and meshGeometryId are required");S4.parse(i)}catch(g){Se.error(g);return}let a=s(this,B).geometry3DMap.get(r);if((a==null?void 0:a.type)!=="geometry"){Se.error(".labelText3D failed: target incorrect");return}let u=a==null?void 0:a.components[0];if(!u.feature.properties.textArea)return;if(u.textEntityId){let g=s(this,B).geometry3DMap.get(u.textEntityId);if((g==null?void 0:g.type)!=="text3d"){Se.error(".labelText3D failed: existing text3d not found");return}return{id:g.id,type:g.type}}let c=new tl({type:"Feature",geometry:{coordinates:(d=u.feature.properties.textArea)==null?void 0:d.position,type:"Point"},properties:{textArea:u.feature.properties.textArea,content:n,id:wa()}});c.polygonEntityId=r;let m=new at(c,new es(i==null?void 0:i.appearance));return u.textEntityId=m.id.toString(),c.mesh.userData.entityId=m.id.toString(),c.mesh.userData.type="text3d",s(this,B).geometry3DMap.set(m.id.toString(),m),i.parentId&&((f=this.getParentContainer(i.parentId))==null||f.addEntity(m)),this.render(),{id:m.id,type:"text3d"}}addLabel2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{m4(r,n,i||{})}catch(m){Se.error(m);return}if(u===void 0||!s(this,B).geometry2DMap.has(u)&&!s(this,B).geometry3DMap.has(u)){let m=pt(this,pr,Ay).call(this,r,new gi(n,i||{},s(this,B)),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&Zr(m,i==null?void 0:i.interactive,s(this,B)),(i==null?void 0:i.enabled)!=null&&rl(m,i.enabled),(i==null?void 0:i.occlude)!=null&&jp(m,i.occlude);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,B).geometry3DMap.get(i.attachTo):void 0;d instanceof at&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),s(this,qt).call(this),this.render()}else Se.error("Label2D with ID '".concat(u,"' already exists. The label cannot be added."));return{id:u,type:"label"}}addPath(r,n={},i){var m,d;try{y6(r,n||{})}catch(f){Se.error(f);return}let a=new vo(r,W4(n)),u=new at(a,new Hn({color:(m=n==null?void 0:n.color)!=null?m:"#ff834c",altitude:(d=n==null?void 0:n.verticalOffset)!=null?d:.1}));u.id=(n==null?void 0:n.id)||wa(),a.mesh.userData={entityId:u.id,type:"path"},s(this,B).geometry3DMap.set(u.id,u),(n==null?void 0:n.interactive)!=null&&Zr(u,n==null?void 0:n.interactive,s(this,B));let c=this.getParentContainer(i);return c instanceof nr&&c.addEntity(u),s(this,mt).call(this),this.render(),{id:u.id,type:"path"}}updateWatermark(r){s(this,O).watermarkSystem.options=r,s(this,O).watermarkSystem.dirty=!0,s(this,O).collisionSystem.collidersDirty=!0,this.render()}remove(r){var i,a;let n;if(typeof r=="string"||typeof r=="number"?(n=s(this,B).geometry2DMap.get(r),n==null&&(n=s(this,B).geometry3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(n=s(this,B).geometry2DMap.get(r.id),n==null&&(n=s(this,B).geometry3DMap.get(r.id))):n=r,n!=null){if(n.type==="custom-geometry")s(this,B).geometry3DMap.delete(n.id),n.object3d&&Nt(n.object3d);else if(n.type==="group-container"){s(this,B).geometry3DMap.delete(n.userData.entityId);for(let c of n.childrenIds.values())this.remove(c),n.userData.entities2D.delete(c);let u=n.components[1];u&&u.focusMesh&&Nt(u.focusMesh),Nt(n)}else if(n.type==="geometry-group"){s(this,B).geometry3DMap.delete(n.userData.entityId);for(let u of n.userData.entities3D.values())this.remove(u),n.userData.entities3D.delete(u);Nt(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let u=n.components[0],c=n.components[4];if(n.entities2D.size>0){for(let d of n.entities2D.values())this.remove(d);n.removeAllEntities()}let m=(a=(i=n.parentObject3D)==null?void 0:i.userData.entityId)!=null?a:n.parentId;if(m){let d=s(this,B).geometry3DMap.get(m);d instanceof Kn&&d.userData.entities3D.delete(n.id)}if(n.object3d&&Nt(n.object3d),n.type==="geometry"){let d=n.components[3];d&&(d.enabled=!1,d.dirty=!0)}c&&"focusMesh"in c&&c.focusMesh!=null&&Nt(c.focusMesh),"textMesh"in u&&u.textMesh!=null&&this.remove(u.textMesh.userData.entityId),s(this,B).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let u=n.attachedTo;if(u){let c=s(this,B).geometry3DMap.get(u);c instanceof at&&c.detach(n)}n.object3d&&Nt(n.object3d),n.type==="label"&&delete s(this,O).twoDDrawSystem.textCache[n.id],s(this,B).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&Nt(n.object3d),s(this,B).geometry3DMap.delete(n.id);else if(n.type==="text3d"){Nt(n.object3d);let{batchedText:u,textMesh:c,polygonEntityId:m}=n.components[0];if(c&&(u&&u.removeText(c),Nt(c)),m){s(this,O).text3DSystem.remove(m);let d=s(this,B).geometry3DMap.get(m);(d==null?void 0:d.type)==="geometry"&&(d.components[0].textMesh=void 0,d.components[0].textEntityId=void 0)}s(this,B).geometry3DMap.delete(n.id)}s(this,mt).call(this),s(this,qt).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,vt)}getThreeCamera(){return s(this,xt)}async setEnvironment(r){if(s(this,vt))if(r==="basic"){s(this,ua)||K(this,ua,pt(this,pr,Fy).call(this));let n=await s(this,ua);s(this,vt).environment=n}else s(this,vt).environment=null}getEnvironment(){var r;return(r=s(this,vt))!=null&&r.environment?"basic":!1}getCurrentSceneGLTF(r){return s(this,O).exporterSystem.getCurrentSceneGLTF(r)}getBoundingArea(r){(s(this,O).renderSystem.threeDdirty||s(this,O).renderSystem.twoDdirty)&&this.renderSync();let n=new rr;if(r==null)n.setFromObject(s(this,B).geometryScene);else{let i=Fa(s(this,B),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let a=i.components[0],u=a instanceof Lt?a.geometry:void 0;a.mesh instanceof $c&&u?(u.computeBoundingBox(),u.boundingBox&&n.union(u.boundingBox)):n.setFromObject(i.object3d)}else((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null&&n.setFromObject(i)}if(qc(n))return p4(n).map(this.convert3DMapPositionToCoordinate)}hasState(r){return Fa(s(this,B),r)!=null}getState(r){var i,a,u,c,m,d,f,g,v,b,D,A,x,E,S,I,C,k,V,z,M,T,Z,j,W;if(r==null)return{type:"map-view",hoverColor:s(this,B).hoverColor,text3dHoverColor:s(this,B).text3dHoverColor};let n=Fa(s(this,B),r);if((n==null?void 0:n.type)==="custom-geometry"){let $=n.components[0],q=n.components[1];return{id:n.id,type:"custom-geometry",visible:q.visible,altitude:q.altitude,parent:(i=n.parentObject3D)==null?void 0:i.userData.entityId,position:this.convert3DMapPositionToCoordinate($.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let $=Array.from(n.userData.entities3D.values()),q=$==null?void 0:$[0],J=q?this.getState(q):{};return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:J==null?void 0:J.altitude,initialColor:J==null?void 0:J.initialColor,color:J==null?void 0:J.color,side:(a=J==null?void 0:J.side)!=null?a:"double",opacity:J==null?void 0:J.opacity,height:J==null?void 0:J.height,texture:J==null?void 0:J.texture,topColor:J==null?void 0:J.topColor,topTexture:J==null?void 0:J.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(G=>s(this,B).geometry3DMap.get(G)).every(G=>G&&G.components[2]!=null),children:$,bevel:J==null?void 0:J.bevel,maskId:(u=n.components[0])==null?void 0:u.maskId,maskEnabled:(c=n.components[0])==null?void 0:c.enabled,maskEffect:(m=n.components[0])==null?void 0:m.effect,maskMode:(d=n.components[0])==null?void 0:d.mode}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(f=n.getWorldPosition(AT).z)!=null?f:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map($=>this.getState($)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let $=n.components[0],q=n.object3d.parent,J=q==null?void 0:q.userData.entityId;return{id:n.id,type:"label",text:$.text||"",parent:{id:J,type:q==null?void 0:q.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:$.enabled,visible:$.visible,initialRank:Xu($.initialRank),options:{rank:Xu($.rank),appearance:$.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,occlude:(v=(g=n.components[2])==null?void 0:g.enabled)!=null?v:!1}}}else if((n==null?void 0:n.type)==="marker"){let $=n.components[0],q=n.object3d.parent,J=q==null?void 0:q.userData.entityId;return{id:n.id,type:"marker",enabled:$.enabled,visible:$.visible,placement:$.options.placement,dynamicResize:$.options.dynamicResize,parent:{id:J,type:q==null?void 0:q.type},position:this.convert3DMapPositionToCoordinate(n.position),element:$.containerEl,initialRank:Xu($.initialRank),contentHTML:$.contentHtml,options:{rank:Xu($.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:$.options.lowPriorityPin,occlude:(D=(b=n.components[2])==null?void 0:b.enabled)!=null?D:!1}}}else if((n==null?void 0:n.type)==="geometry"){let{color:$,hoverColor:q,initialColor:J,initialTopColor:G,topColor:ae,altitude:te}=n.components[1],ee=n.components[0],le=n.components[4],fe=n.components[1],xe=n.components[6],be=n.components[2],Oe=n.components[3],Ie=n.parentObject3D;return{id:n.id,type:"geometry",opacity:fe.opacity,initialColor:J,color:$,focusable:le!=null&&le.focusMesh!=null,initialTopColor:G,topColor:ae,side:fe.side,hoverColor:q,hovered:!!(be!=null&&be.hover),height:fe.height,visible:fe.visible,outline:Oe==null?void 0:Oe.enabled,showImage:fe.showImage,texture:(A=xe==null?void 0:xe.texture)==null?void 0:A.path,topTexture:(x=xe==null?void 0:xe.topTexture)==null?void 0:x.path,flipImageToFaceCamera:fe.flipImageToFaceCamera,enableImageCollisions:fe.enableImageCollisions,parent:{id:Ie==null?void 0:Ie.userData.entityId,type:Ie==null?void 0:Ie.type},altitude:te,bevel:fe.bevel,position:this.convert3DMapPositionToCoordinate(ee.position),interactive:n.components[2]!=null,borderVisible:fe.borderVisible,borderColor:fe.borderColor,borderWidth:fe.borderWidth}}else if((n==null?void 0:n.type)==="model"){let $=n.components[0],q=n.components[1],J=n.components[2];return{id:n.id,type:"model",position:$.mesh?this.convert3DMapPositionToCoordinate((E=$.mesh)==null?void 0:E.getWorldPosition(new ne)):this.convert3DMapPositionToCoordinate($.position),interactive:J!=null,material:q.material,parent:(S=n.parentObject3D)!=null&&S.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:q.visible,verticalOffset:q.verticalOffset,color:q.color,opacity:q.opacity,rotation:(I=q.rotation)!=null?I:Ma,scale:(C=q.scale)!=null?C:Ba}}else if((n==null?void 0:n.type)==="path"){let $=n.components[0],q=n.components[2],J=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate($.position),visible:J.visible,interactive:q!=null,completeFraction:$.completeFraction,color:J.color,accentColor:$.accentColor,width:$.width,animateArrowsOnPath:$.animateArrowsOnPath,displayArrowsOnPath:$.displayArrowsOnPath,verticalOffset:J.altitude,highlightCompleteFraction:$.highlightCompleteFraction,highlightStartFraction:$.highlightStartFraction,highlightEndFraction:$.highlightEndFraction,highlightColor:$.highlightColor,highlightWidthMultiplier:$.highlightWidthMultiplier,xrayOpacity:$.xrayOpacity,smoothingTension:$.smoothingTension,smoothingCornerRadius:$.smoothingCornerRadius}}else if((n==null?void 0:n.type)==="image"){let $=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate($.position),visible:n.components[1].visible,verticalOffset:(k=$.feature.properties.verticalOffset)!=null?k:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(V=$.feature.properties.width)!=null?V:0,height:(z=$.feature.properties.height)!=null?z:0,rotation:(M=$.feature.properties.rotation)!=null?M:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof tl&&"textArea"in n.components[0].feature.properties){H4(n);let $=n.components[0],q=n.components[1],{textMesh:J}=$,G=(T=$.mesh)==null?void 0:T.parent;G instanceof nr&&((Z=G.children.find(ee=>ee.type==="batchedtext"))==null||Z.getWorldPosition(s(this,Oc))),s(this,Zu).set(0,0,0);let ae=J?J.getWorldPosition(s(this,Zu)):s(this,Zu);return Object.assign({},Pa,q.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(ae.add(s(this,Oc))),visible:(j=$.visible)!=null?j:!1,content:(W=$.feature.properties.content)!=null?W:""})}else return}}setState(r,n){var a,u;if(typeof r=="object"&&n==null){"hoverColor"in r&&(a4(r.hoverColor)?s(this,B).hoverColor=(a=r.hoverColor)!=null?a:s(this,B).hoverColor:Se.warn('Failed to update global hover color. Invalid color "'.concat(r.hoverColor,'".'))),"text3dHoverColor"in r&&(s(this,B).text3dHoverColor=(u=r.text3dHoverColor)!=null?u:s(this,B).text3dHoverColor);return}let i=Fa(s(this,B),r);if(i!=null){if(i.type==="custom-geometry"){let c=s(this,B).geometry3DMap.get(i.id);if(c instanceof at&&c.components[0]instanceof Mu){let m=n;eo(i,s(this,B),m.visible),Ta(i,s(this,B),m.altitude),Np(i,m.position,this.convertTo3DMapPosition),Up(i,this.getParentContainer(m.parent,!1)),Zr(i,m.interactive,s(this,B))&&s(this,mt).call(this)}}else if(i.type==="path"){let c=n;Zr(i,c.interactive,s(this,B))&&s(this,mt).call(this),Ta(i,s(this,B),c.verticalOffset),V4(i,s(this,B),c)}else if(i.type==="model"){let c=n;Zr(i,c.interactive,s(this,B))&&s(this,mt).call(this),eo(i,s(this,B),c.visible),q4(i,c),J4(i,c)}else if(i.type==="group-container"){let c=n;eo(i,s(this,B),c.visible)&&(s(this,O).pathSystem.verticalDistanceDirty=!0,s(this,O).geometryInFocusSystem.focusablesDirty=!0),Ta(i,s(this,B),c.altitude)&&(s(this,O).pathSystem.verticalDistanceDirty=!0),Zr(i,c.interactive,s(this,B))&&s(this,mt).call(this),nl(i,s(this,B),c.opacity)&&(s(this,O).outlineInterpolationSystem.outlineOpacitiesDirty=!0),c.preloadGeometry&&i.userData.preloadGeometry!==!0&&(i.userData.preloadGeometry=!0,s(this,O).outlineInterpolationSystem.geometries3DDirty=!0),il(i,c.focusable)&&(s(this,O).geometryInFocusSystem.focusablesDirty=!0)}else if(i.type==="geometry-group"){let c=n;eo(i,s(this,B),c.visible),M4(i,s(this,B),c),Zp(i,s(this,B),c.outline),c.height!=null&&Rp(i,s(this,B),c.height),Ta(i,s(this,B),c.altitude),$p(i,s(this,B),c)&&(s(this,O).textureSystem.dirty=!0),$p(i,s(this,B),c),T4(i,s(this,B),c.shading),nl(i,s(this,B),c.opacity)&&(s(this,O).outlineInterpolationSystem.outlineOpacitiesDirty=!0),Zr(i,c.interactive,s(this,B))&&(s(this,mt).call(this),s(this,qt).call(this)),Vp(i,s(this,B),c.side),Gp(i,{maskId:c.maskId,enabled:c.maskEnabled,effect:c.maskEffect,mode:c.maskMode})}else if(i.type==="geometry"){if(i.components[0]instanceof Lt){let c=n;eo(i,s(this,B),c.visible),Zp(i,s(this,B),c.outline),k4(i,c),il(i,c.focusable)&&(s(this,O).geometryInFocusSystem.focusablesDirty=!0),G4(i,c.renderOrder)&&(s(this,O).meshDetachmentSystem.dirty=!0),$4(i,c.opacity)&&(s(this,O).meshDetachmentSystem.dirty=!0,s(this,O).interactionSystem.dirty3D=!0,s(this,O).outlineInterpolationSystem.outlineOpacitiesDirty=!0),zp(i,c.flipImageToFaceCamera),j4(i,c.enableImageCollisions),Ta(i,s(this,B),c.altitude),c.height!=null&&Rp(i,s(this,B),c.height),z4(i,c)&&(s(this,O).meshDetachmentSystem.dirty=!0,s(this,O).textureSystem.dirty=!0),_4(i,c),N4(i,c.hoverColor),Zr(i,c.interactive,s(this,B)),U4(i,c.hovered),Vp(i,s(this,B),c.side),Z4(i,c)}s(this,mt).call(this)}else if(i.type==="label"||i.type==="marker"){let c=n;R4(i,c,s(this,B)),L4(i,c,s(this,B))&&(s(this,qt).call(this),s(this,O).domMutationSystem.dirty=!0),Np(i,c.position,this.convertTo3DMapPosition),Up(i,this.getParentContainer(c.parent,!1))&&(s(this,qt).call(this),s(this,O).panBoundsSystem.dirty=!0),rl(i,c.enabled),eo(i,s(this,B),c.visible)}else if(i.type==="image"){let c=n;eo(i,s(this,B),c.visible),nl(i,s(this,B),c.opacity),zp(i,c.flipImageToFaceCamera)}else if(i.type==="text3d"){let c=n;K4(i,s(this,B),c)}this.render()}}convertTo3DMapPosition(r,n,i=0,a){var m,d,f,g,v;if(Array.isArray(r))return this.convertTo3DMapPosition(r[1],r[0],(m=r[2])!=null?m:i,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:u,y:c}=Yc((f=(d=s(this,B).center)==null?void 0:d[1])!=null?f:0,(v=(g=s(this,B).center)==null?void 0:g[0])!=null?v:0,r,n);return a?(a.set(u,c,i),a):new ne(u,c,i)}get backgroundColor(){return typeof s(this,Kt).backgroundColor=="string"?s(this,Kt).backgroundColor:"#".concat(s(this,Kt).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,Kt).backgroundAlpha}getThreeRenderer(){return s(this,Kt)}getCenter(r){let n=Array.isArray(r)?r:this.getBoundingArea(r);return n?v4(n):void 0}isInView(r){let n=Fa(s(this,B),r);if(s(this,Ac).identity().multiply(s(this,xt).projectionMatrix).multiply(s(this,xt).matrixWorldInverse),s(this,ma).setFromProjectionMatrix(s(this,Ac)),n instanceof Bp)return s(this,ma).containsPoint(n.position);if(n instanceof at){let i=n==null?void 0:n.components[0];if(i instanceof Mu||i instanceof bo)return s(this,ma).containsPoint(this.convertTo3DMapPosition(i.feature.geometry.coordinates));if(i instanceof Lt){let a=new rr(this.convertTo3DMapPosition(i.featureBbox[1],i.featureBbox[0],0),this.convertTo3DMapPosition(i.featureBbox[3],i.featureBbox[2],0));return s(this,ma).intersectsBox(a)}}return!1}queryGeometry2DInView(r){let{screenOffsets:n,fullyContains:i}=r!=null?r:{},[a,u,c,m]=I4(this.container,n),d=new Fe(a,u,c,m);return s(this,O).collisionSystem.visibleCollidersQTree.queryRect(d).filter(b=>i?d.contains(b):d.intersects(b)).map(b=>s(this,B).geometry2DMap.get(b.userData.entityId)).filter(b=>b!=null).filter(b=>b.components[0]instanceof gi||b.components[0]instanceof yi).map(b=>b.id.toString())}onMapLibreEvent(r,n){if(!this.map){Se.warn('Tried to add event listener "'.concat(r,'" but MapLibre map is not initialized.'));return}this.map.on(r,n),s(this,En)[r]=s(this,En)[r]||[],s(this,En)[r].push(n)}offMapLibreEvent(r,n){!this.map||!Array.isArray(s(this,En)[r])||(this.map.off(r,n),s(this,En)[r]=s(this,En)[r].filter(i=>i!==n))}get aborted(){return s(this,ca).signal.aborted}onAbort(r){s(this,ca).signal.addEventListener("abort",r,{once:!0})}getSystems(){return s(this,O)}getInternalState(){return s(this,B)}getInternalTweenGroup(){return s(this,B).internalTweenGroup}getExternalTweenGroup(){return s(this,B).externalTweenGroup}computeMinZOffsetBetweenContainers(r,n,i){if(!r||!n)return-1;Pp(r,"group-container"),Pp(n,"group-container"),r.updateMatrixWorld(!0),n.updateMatrixWorld(!0);let a=Qc(r,this.getThreeCamera()),u=n.clone(!0);h4(u,!0),u.updateMatrixWorld();let c=Qc(u,this.getThreeCamera());if(!qc(a)||!qc(c))return-1;let m=0,d;i&&this.container.querySelectorAll(".debug-box").forEach(g=>g.remove());do{if(m>1e4)return-1;if(m+=20,u.setAltitude(m),c.makeEmpty(),Qc(u,s(this,xt),c),d=a.intersectsBox(c),i){let f=_p(a,"blue",this.container),g=_p(c,d?"red":"green",this.container);f.classList.add("debug-box"),g.classList.add("debug-box")}}while(d);return m}};vt=new WeakMap,xt=new WeakMap,ua=new WeakMap,vc=new WeakMap,ju=new WeakMap,Fo=new WeakMap,sa=new WeakMap,zu=new WeakMap,pr=new WeakSet,wy=o(function(r){var n;s(this,Wi)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(r)),s(this,B).pixelRatio=this.resolutionScale},"#setResolutionScale"),B=new WeakMap,En=new WeakMap,ca=new WeakMap,Ye=new WeakMap,Un=new WeakMap,At=new WeakMap,Cn=new WeakMap,Kt=new WeakMap,O=new WeakMap,xc=new WeakMap,qt=new WeakMap,mt=new WeakMap,BC=o(function(){K(this,Ye,document.createElement("div")),s(this,Ye).classList.add("mappedin__smart-collision-engine__container"),K(this,Un,document.createElement("canvas")),s(this,Un).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Ye)),K(this,At,document.createElement("canvas")),s(this,At).classList.add("mappedin__smart-collision-engine__container"),s(this,At).width=s(this,Ye).clientWidth*this.resolutionScale,s(this,At).height=s(this,Ye).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Ye).clientWidth+"px",s(this,At).style.height=s(this,Ye).clientHeight+"px",s(this,Ye).appendChild(s(this,Un)),s(this,Ye).appendChild(s(this,At)),s(this,Un).width=s(this,Ye).clientWidth,s(this,Un).height=s(this,Ye).clientHeight,s(this,At).width=s(this,Ye).clientWidth*this.resolutionScale,s(this,At).height=s(this,Ye).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Ye).clientWidth+"px",s(this,At).style.height=s(this,Ye).clientHeight+"px"},"#renderEntity2DContainer"),MC=o(function(){K(this,Cn,document.createElement("div")),s(this,Cn).classList.add("mappedin-2d-entities"),Object.assign(s(this,Cn).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,Cn))},"#renderEntityDOMContainer"),TC=o(function(){s(this,At).width=s(this,Ye).clientWidth*this.resolutionScale,s(this,At).height=s(this,Ye).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Ye).clientWidth+"px",s(this,At).style.height=s(this,Ye).clientHeight+"px",s(this,Un).width=s(this,Ye).clientWidth,s(this,Un).height=s(this,Ye).clientHeight,s(this,At).width=s(this,Ye).clientWidth*this.resolutionScale,s(this,At).height=s(this,Ye).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Ye).clientWidth+"px",s(this,At).style.height=s(this,Ye).clientHeight+"px",s(this,O).collisionSystem.collidersDirty=!0},"#resizeCollisionCanvas"),Wi=new WeakMap,Ec=new WeakMap,Cc=new WeakMap,Ic=new WeakMap,Dc=new WeakMap,$u=new WeakMap,bp=new WeakMap,Sc=new WeakMap,Gu=new WeakMap,wc=new WeakMap,la=new WeakMap,Ay=o(function(r,n,i,a){let u=new Bp(n,this.convertTo3DMapPosition(r[1],r[0],r[2]||0),a);return u.components[2]=new yp(i!=null?i:s(this,O).occlusion2DSystem.backgroundId),s(this,B).geometry2DMap.set(u.id,u),u},"#createEntity2D"),ma=new WeakMap,Ac=new WeakMap,Fc=new WeakMap,_r=new WeakMap,Lr=new WeakMap,Fy=o(async function(){return Eo.load(eb).then(r=>{var n;return s(this,vt)&&((n=s(this,vt).environment)==null||n.dispose(),r.mapping=ky,s(this,vt).environment=r,this.render()),r})},"#loadEnvMap"),vp=new WeakMap,xp=new WeakMap,Zu=new WeakMap,Oc=new WeakMap,o(Oy,"Core");var Sy=Oy,AT=new ne,sg=Sy;var Py=class Py extends Le{constructor(r){super();h(this,"gl");h(this,"el",document.createElement("div"));h(this,"core");h(this,"origin");h(this,"map");h(this,"layer");h(this,"handleStyleChange",o(()=>{!this.map||!this.layer||this.map.getLayer(this.layer.id)||(this.map.addLayer(this.layer),this.core.camera.setMinZoomLevel(this.map.getMinZoom()),this.core.camera.setMaxZoomLevel(this.map.getMaxZoom()),this.core.camera.setMinPitch(this.map.getMinPitch()),this.core.camera.setMaxPitch(this.map.getMaxPitch()))},"handleStyleChange"));h(this,"handleMove",o(()=>{if(!this.map)return;let[r,n]=this.map.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(r,n),this.core.getSystems().cameraSystem.setZoomLevel(this.map.getZoom()),this.core.getSystems().cameraSystem.setRotation(Te.degToRad(this.map.getBearing())),this.core.getSystems().cameraSystem.setTilt(Te.degToRad(this.map.getPitch()))},"handleMove"));h(this,"handleError",o(r=>{Se.warn(r)},"handleError"));this.origin=r}onAdd(r){this.origin=this.origin||r.getCenter().toArray(),this.gl=r.painter.context.gl,this.core=new sg(r._container,{center:this.origin,zoomLevel:r.getZoom(),pitch:r.getPitch(),bearing:r.getBearing(),gl:this.gl,map:r,mode:"outdoors-overlay"}),this.map=r,this.core.camera.setMinZoomLevel(r.getMinZoom()),this.core.camera.setMaxZoomLevel(r.getMaxZoom()),this.core.camera.setMinPitch(r.getMinPitch()),this.core.camera.setMaxPitch(r.getMaxPitch()),this.map.on("error",this.handleError);let n=Cp.fromLngLat(this.origin,0);return this.layer=Tp(n,this.core.viewCamera,()=>{this.core.renderSync()}),this.map.on("styledata",this.handleStyleChange),this.map.on("move",this.handleMove),this.handleStyleChange(),this.el}onRemove(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("move",this.handleMove),this.map.off("error",this.handleError),this.layer&&this.map.removeLayer(this.layer.id)),this.layer=void 0,this.map=void 0,this.core&&this.core.destroy(),this.core=void 0}};o(Py,"MapLibreOverlay");var Ep=Py;l();var kC=r4("",{prefix:"[MapLibreOverlay]"});l();var _C=o((e,{id:t}={})=>{let r=Array.isArray(e)?e:[e];if(!r.every(a=>typeof a=="string"))return;let n=r.join(""),i=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(i=a)}i==null&&(i=document.createElement("style")),t&&t!==""&&(i.id=t),i.textContent=n,document.head.appendChild(i)},"injectCSS");var LC=".mappedin-marker {\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n font-weight: normal;\n top: 0;\n position: absolute;\n font-weight: bold;\n color: black;\n display: flex;\n flex-direction: row;\n will-change: transform, opacity;\n transition: opacity 150ms ease-in-out;\n justify-content: center;\n opacity: 0;\n}\n\n/* Low priority pin strategy styles */\n\n/* Hide child elements as well */\n.mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {\n visibility: hidden;\n}\n\n/* Create the pin using ::before pseudo-element */\n.mappedin-marker::before {\n content: '';\n display: none;\n border-radius: 50%;\n position: relative;\n /* Default values - will be overridden by inline styles */\n width: var(--mappedin-pin-size, 2px);\n height: var(--mappedin-pin-size, 2px);\n background-color: var(--pin-color, #666);\n}\n\n.mappedin-marker[data-placement='hidden']::before {\n display: block;\n}\n";var RC=".mappedin__smart-collision-engine__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n /* Enables colliders to use translate3D */\n transform-style: preserve-3d;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n}\n\n.mappedin__smart-collision-engine-debug__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n will-change: opacity;\n &.interacting {\n opacity: 0.2;\n }\n}\n";var NC=".mappedin-map {\n .mappedin-interactive {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n\n &.mappedin-interaction-hover {\n cursor: pointer;\n }\n }\n}\n";var UC=".mappedin-map {\n .mappedin-control-container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n\n .mappedin-ctrl-top-left,\n .mappedin-ctrl-top-right,\n .mappedin-ctrl-bottom-left,\n .mappedin-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n }\n\n .mappedin-ctrl-top-left {\n top: 0;\n left: 0;\n }\n\n .mappedin-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n .mappedin-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n }\n\n .mappedin-ctrl-bottom-right {\n bottom: 0;\n right: 0;\n }\n\n .mappedin-ctrl-attrib {\n display: block;\n position: relative;\n pointer-events: auto;\n font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;\n padding: 3px 5px 1px 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n min-width: 11px;\n min-height: 11px;\n user-select: none;\n\n summary.mappedin-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n summary.mappedin-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n &.mappedin-compact .mappedin-ctrl-attrib-button,\n &.mappedin-compact-show .mappedin-ctrl-attrib-inner {\n display: inline-block;\n }\n\n &.mappedin-compact {\n background-color: transparent;\n }\n\n &.mappedin-compact-show {\n min-width: 15px;\n min-height: 15px;\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 0.5);\n }\n }\n\n .mappedin-ctrl-attrib-top-left {\n float: left;\n border-bottom-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-top-right {\n float: right;\n border-bottom-left-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-left {\n float: left;\n border-top-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-right {\n float: right;\n border-top-left-radius: 4px;\n }\n .mappedin-ctrl-attrib-top-left,\n .mappedin-ctrl-attrib-bottom-left {\n padding: 3px 5px 1px 20px;\n }\n\n .mappedin-ctrl-attrib-inner {\n display: inline-block;\n margin-right: 12px;\n }\n\n .mappedin-ctrl-attrib-inner,\n .mappedin-ctrl-attrib-inner a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n }\n\n .mappedin-ctrl-attrib-inner-bold,\n .mappedin-ctrl-attrib-inner-bold a {\n font-weight: bold;\n }\n\n .mappedin-ctrl-attrib-inner a:hover {\n color: #017ef1;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .mappedin-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 15px;\n height: 15px;\n box-sizing: border-box;\n border-radius: 50%;\n top: 0;\n right: 2px;\n border: 1px;\n }\n .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,\n .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {\n left: 2px;\n }\n }\n}\n";var TT=[LC,RC,NC,UC],rEe=o((e,t)=>{Pc.instance!=null&&kC.warn("Only a single map venue is supported at this time.");let r=new Pc([e.mapCenter.longitude,e.mapCenter.latitude],e,t);return Pc.instance=r,r},"createMapLibreOverlay"),kT=3,_T={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:kT}},da,pa,Vu,Oo,fa,Bc=class Bc{constructor(t,r,n){L(this,da);L(this,pa);L(this,Vu);L(this,Oo);L(this,fa);h(this,"on",o((t,r)=>{s(this,da).on(t,r)},"on"));h(this,"off",o((t,r)=>{s(this,da).off(t,r)},"off"));K(this,da,new Le),K(this,fa,new Ep(t)),K(this,pa,r),K(this,Vu,n)}onAdd(t){var i,a,u;let r=s(this,fa).onAdd(t),n=De(R(R({},_T),(i=s(this,Vu))!=null?i:{}),{outdoorView:R({token:s(this,pa).outdoorViewToken},(a=s(this,Vu))==null?void 0:a.outdoorView)});return K(this,Oo,new MT(s(this,fa).core)),((u=n.injectStyles)==null||u)&&_C(TT,{id:"mappedin__styles"}),s(this,Oo).addMap(s(this,pa),n).then(()=>{s(this,da).publish("loaded",{mapView:s(this,Oo),mapData:s(this,pa)})}),r}onRemove(){s(this,Oo)&&s(this,Oo).clear(),Bc.instance=null,s(this,fa).onRemove()}};da=new WeakMap,pa=new WeakMap,Vu=new WeakMap,Oo=new WeakMap,fa=new WeakMap,o(Bc,"MappedinMapLibreOverlay"),h(Bc,"instance");var Pc=Bc;export{_T as DEFAULT_MAP_OPTIONS,kT as FLOOR_GAP,Pc as MappedinMapLibreOverlay,rEe as createMapLibreOverlay};