@mappedin/mappedin-js 6.9.1 → 6.10.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.
@@ -0,0 +1 @@
1
+ import{$ as Om,$a as oy,$b as iD,A as Us,Aa as fC,Ab as HC,B as Pm,Ba as oc,Bb as Tx,C as lx,Ca as mC,Cb as wx,D as q6,Da as Ud,Db as sy,E as J6,Ea as hC,Eb as ZC,F as Y6,Fb as WC,G as rc,Ga as gC,Gb as Mx,H as K6,Ha as ty,Hb as XC,I as Q6,Ia as ry,Ib as qC,J as cx,Ja as yC,Jb as Ax,K as Xa,Ka as bC,Kb as JC,L as Nd,La as vC,Lb as rl,M as Gs,Ma as xC,Mb as uy,N as nc,Na as EC,Nb as Px,O as eC,Oa as IC,Ob as YC,P as Kg,Pa as Ex,Pb as _x,Q as tC,Qa as SC,Qb as KC,R as rC,Ra as CC,Rb as Hd,S as _m,Sa as Gd,Sb as Ox,T as Lo,Ta as DC,Tb as ly,U as nC,Ua as TC,Ub as QC,V as dx,Va as ny,Vb as Fx,W as qa,Wa as Ix,Wb as eD,X as oC,Xa as wC,Xb as tD,Y as zs,Ya as Sx,Yb as rD,Z as Qg,Za as km,Zb as nD,_ as jd,_a as zd,_b as oD,aa as iC,ab as Vd,ac as aD,b as y6,ba as px,bb as $d,bc as Ja,ca as fx,cb as MC,cc as sD,d as K,da as aC,db as Cx,dc as an,e as En,ea as sC,ec as uD,f as b6,fa as uC,fb as AC,fc as cy,g as sx,ga as Vs,gb as PC,gc as Ya,h as Wa,ha as LB,hb as _C,hc as lD,i as $6,ia as mx,ib as iy,ic as sn,j as Jg,ja as lC,jb as OC,jc as Ka,k as H6,ka as $s,kb as ay,kc as un,l as Z6,la as cC,lb as FC,m as Qu,ma as dC,mb as kC,n as W6,na as hx,nb as BC,o as tc,oa as pC,ob as LC,p as Am,pa as gx,pb as RC,q as X6,qa as tl,qb as NC,r as Er,ra as Yt,rb as jC,s as js,sa as ey,sb as UC,t as Bd,ta as Fm,tb as ic,u as el,ua as yx,ub as GC,v as Ld,va as In,vb as ei,w as Rd,wa as bx,wb as zC,x as Jt,xa as Ii,xb as VC,y as Yg,ya as vx,yb as $C,z as Je,za as xx,zb as Dx}from"./chunk-JXD7QEJY.js";import{a as Si}from"./chunk-SN6R76R6.js";import{$ as Pd,Aa as Zg,B as C6,Ca as Za,D as Ug,F as za,G as Va,H as Gg,Ha as F6,I as zg,Ia as k6,J as D6,Ja as Od,K as Md,Ka as B6,L as Ad,La as Fd,Ma as kd,N as T6,Na as Bo,O as It,Oa as Wg,P as St,Pa as L6,Qa as wm,Sa as Mm,T as w6,Ta as R6,U as M6,V as Tm,W as Vg,X as Ce,Y as Zr,Z as A6,_ as wr,a as p,aa as Ei,ab as Xg,b as y,ba as or,ca as P6,d as jg,da as on,db as N6,e as Ql,ea as ko,eb as qg,f as Sm,fa as ec,fb as j6,g as Qo,ga as Ju,h as v6,ha as tt,i as x6,ia as Ns,j as Cm,jb as U6,ka as $a,la as _6,lb as Ku,ma as ux,na as $g,nb as G6,oa as Yu,ob as z6,p as Dm,qb as V6,s as E6,t as I6,v as S6,wa as Ha,xa as O6,ya as _d,za as Hg}from"./chunk-OHB32AEN.js";import{a as _,b as ne,c as Ng,d as kn,f as Ot,g as qu,h as Kl,i as m,j as s,k as M,l as k,m as he,n as g6,o as be}from"./chunk-5W2UDR4H.js";var gA=Ot((VE,$E)=>{p();(function(e,r){typeof VE=="object"&&typeof $E<"u"?$E.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self,e.TinyQueue=r())})(VE,function(){"use strict";var e=function(n,o){if(n===void 0&&(n=[]),o===void 0&&(o=r),this.data=n,this.length=this.data.length,this.compare=o,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)};e.prototype.push=function(n){this.data.push(n),this.length++,this._up(this.length-1)},e.prototype.pop=function(){if(this.length!==0){var n=this.data[0],o=this.data.pop();return this.length--,this.length>0&&(this.data[0]=o,this._down(0)),n}},e.prototype.peek=function(){return this.data[0]},e.prototype._up=function(n){for(var o=this,i=o.data,a=o.compare,u=i[n];n>0;){var l=n-1>>1,c=i[l];if(a(u,c)>=0)break;i[n]=c,n=l}i[n]=u},e.prototype._down=function(n){for(var o=this,i=o.data,a=o.compare,u=this.length>>1,l=i[n];n<u;){var c=(n<<1)+1,d=i[c],f=c+1;if(f<this.length&&a(i[f],d)<0&&(c=f,d=i[f]),a(d,l)>=0)break;i[n]=d,n=c}i[n]=l};function r(t,n){return t<n?-1:t>n?1:0}return e})});var bA=Ot((LSe,HE)=>{"use strict";p();var eb=gA();eb.default&&(eb=eb.default);HE.exports=yA;HE.exports.default=yA;function yA(e,r,t){r=r||1;for(var n,o,i,a,u=0;u<e[0].length;u++){var l=e[0][u];(!u||l[0]<n)&&(n=l[0]),(!u||l[1]<o)&&(o=l[1]),(!u||l[0]>i)&&(i=l[0]),(!u||l[1]>a)&&(a=l[1])}var c=i-n,d=a-o,f=Math.min(c,d),h=f/2;if(f===0){var g=[n,o];return g.distance=0,g}for(var b=new eb(void 0,NH),I=n;I<i;I+=f)for(var v=o;v<a;v+=f)b.push(new hl(I+h,v+h,h,e));var E=UH(e),T=new hl(n+c/2,o+d/2,0,e);T.d>E.d&&(E=T);for(var D=b.length;b.length;){var w=b.pop();w.d>E.d&&(E=w,t&&console.log("found best %d after %d probes",Math.round(1e4*w.d)/1e4,D)),!(w.max-E.d<=r)&&(h=w.h/2,b.push(new hl(w.x-h,w.y-h,h,e)),b.push(new hl(w.x+h,w.y-h,h,e)),b.push(new hl(w.x-h,w.y+h,h,e)),b.push(new hl(w.x+h,w.y+h,h,e)),D+=4)}t&&(console.log("num probes: "+D),console.log("best distance: "+E.d));var B=[E.x,E.y];return B.distance=E.d,B}function NH(e,r){return r.max-e.max}function hl(e,r,t,n){this.x=e,this.y=r,this.h=t,this.d=jH(e,r,n),this.max=this.d+this.h*Math.SQRT2}function jH(e,r,t){for(var n=!1,o=1/0,i=0;i<t.length;i++)for(var a=t[i],u=0,l=a.length,c=l-1;u<l;c=u++){var d=a[u],f=a[c];d[1]>r!=f[1]>r&&e<(f[0]-d[0])*(r-d[1])/(f[1]-d[1])+d[0]&&(n=!n),o=Math.min(o,GH(e,r,d,f))}return o===0?0:(n?1:-1)*Math.sqrt(o)}function UH(e){for(var r=0,t=0,n=0,o=e[0],i=0,a=o.length,u=a-1;i<a;u=i++){var l=o[i],c=o[u],d=l[0]*c[1]-c[0]*l[1];t+=(l[0]+c[0])*d,n+=(l[1]+c[1])*d,r+=d*3}return r===0?new hl(o[0][0],o[0][1],0,e):new hl(t/r,n/r,0,e)}function GH(e,r,t,n){var o=t[0],i=t[1],a=n[0]-o,u=n[1]-i;if(a!==0||u!==0){var l=((e-o)*a+(r-i)*u)/(a*a+u*u);l>1?(o=n[0],i=n[1]):l>0&&(o+=a*l,i+=u*l)}return a=e-o,u=r-i,a*a+u*u}});var YA=Ot((l2,c2)=>{p();(function(e,r){typeof l2=="object"&&typeof c2<"u"?c2.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self).RBush=r()})(l2,function(){"use strict";function e(v,E,T,D,w){(function B(X,L,P,R,$){for(;R>P;){if(R-P>600){var V=R-P+1,H=L-P+1,re=Math.log(V),j=.5*Math.exp(2*re/3),me=.5*Math.sqrt(re*j*(V-j)/V)*(H-V/2<0?-1:1),z=Math.max(P,Math.floor(L-H*j/V+me)),ue=Math.min(R,Math.floor(L+(V-H)*j/V+me));B(X,L,z,ue,$)}var se=X[L],pe=P,le=R;for(r(X,P,L),$(X[R],se)>0&&r(X,P,R);pe<le;){for(r(X,pe,le),pe++,le--;$(X[pe],se)<0;)pe++;for(;$(X[le],se)>0;)le--}$(X[P],se)===0?r(X,P,le):r(X,++le,R),le<=L&&(P=le+1),L<=le&&(R=le-1)}})(v,E,T||0,D||v.length-1,w||t)}function r(v,E,T){var D=v[E];v[E]=v[T],v[T]=D}function t(v,E){return v<E?-1:v>E?1:0}var n=function(v){v===void 0&&(v=9),this._maxEntries=Math.max(4,v),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(v,E,T){if(!T)return E.indexOf(v);for(var D=0;D<E.length;D++)if(T(v,E[D]))return D;return-1}function i(v,E){a(v,0,v.children.length,E,v)}function a(v,E,T,D,w){w||(w=b(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var B=E;B<T;B++){var X=v.children[B];u(w,v.leaf?D(X):X)}return w}function u(v,E){return v.minX=Math.min(v.minX,E.minX),v.minY=Math.min(v.minY,E.minY),v.maxX=Math.max(v.maxX,E.maxX),v.maxY=Math.max(v.maxY,E.maxY),v}function l(v,E){return v.minX-E.minX}function c(v,E){return v.minY-E.minY}function d(v){return(v.maxX-v.minX)*(v.maxY-v.minY)}function f(v){return v.maxX-v.minX+(v.maxY-v.minY)}function h(v,E){return v.minX<=E.minX&&v.minY<=E.minY&&E.maxX<=v.maxX&&E.maxY<=v.maxY}function g(v,E){return E.minX<=v.maxX&&E.minY<=v.maxY&&E.maxX>=v.minX&&E.maxY>=v.minY}function b(v){return{children:v,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(v,E,T,D,w){for(var B=[E,T];B.length;)if(!((T=B.pop())-(E=B.pop())<=D)){var X=E+Math.ceil((T-E)/D/2)*D;e(v,X,E,T,w),B.push(E,X,X,T)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(v){var E=this.data,T=[];if(!g(v,E))return T;for(var D=this.toBBox,w=[];E;){for(var B=0;B<E.children.length;B++){var X=E.children[B],L=E.leaf?D(X):X;g(v,L)&&(E.leaf?T.push(X):h(v,L)?this._all(X,T):w.push(X))}E=w.pop()}return T},n.prototype.collides=function(v){var E=this.data;if(!g(v,E))return!1;for(var T=[];E;){for(var D=0;D<E.children.length;D++){var w=E.children[D],B=E.leaf?this.toBBox(w):w;if(g(v,B)){if(E.leaf||h(v,B))return!0;T.push(w)}}E=T.pop()}return!1},n.prototype.load=function(v){if(!v||!v.length)return this;if(v.length<this._minEntries){for(var E=0;E<v.length;E++)this.insert(v[E]);return this}var T=this._build(v.slice(),0,v.length-1,0);if(this.data.children.length)if(this.data.height===T.height)this._splitRoot(this.data,T);else{if(this.data.height<T.height){var D=this.data;this.data=T,T=D}this._insert(T,this.data.height-T.height-1,!0)}else this.data=T;return this},n.prototype.insert=function(v){return v&&this._insert(v,this.data.height-1),this},n.prototype.clear=function(){return this.data=b([]),this},n.prototype.remove=function(v,E){if(!v)return this;for(var T,D,w,B=this.data,X=this.toBBox(v),L=[],P=[];B||L.length;){if(B||(B=L.pop(),D=L[L.length-1],T=P.pop(),w=!0),B.leaf){var R=o(v,B.children,E);if(R!==-1)return B.children.splice(R,1),L.push(B),this._condense(L),this}w||B.leaf||!h(B,X)?D?(T++,B=D.children[T],w=!1):B=null:(L.push(B),P.push(T),T=0,D=B,B=B.children[0])}return this},n.prototype.toBBox=function(v){return v},n.prototype.compareMinX=function(v,E){return v.minX-E.minX},n.prototype.compareMinY=function(v,E){return v.minY-E.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(v){return this.data=v,this},n.prototype._all=function(v,E){for(var T=[];v;)v.leaf?E.push.apply(E,v.children):T.push.apply(T,v.children),v=T.pop();return E},n.prototype._build=function(v,E,T,D){var w,B=T-E+1,X=this._maxEntries;if(B<=X)return i(w=b(v.slice(E,T+1)),this.toBBox),w;D||(D=Math.ceil(Math.log(B)/Math.log(X)),X=Math.ceil(B/Math.pow(X,D-1))),(w=b([])).leaf=!1,w.height=D;var L=Math.ceil(B/X),P=L*Math.ceil(Math.sqrt(X));I(v,E,T,P,this.compareMinX);for(var R=E;R<=T;R+=P){var $=Math.min(R+P-1,T);I(v,R,$,L,this.compareMinY);for(var V=R;V<=$;V+=L){var H=Math.min(V+L-1,$);w.children.push(this._build(v,V,H,D-1))}}return i(w,this.toBBox),w},n.prototype._chooseSubtree=function(v,E,T,D){for(;D.push(E),!E.leaf&&D.length-1!==T;){for(var w=1/0,B=1/0,X=void 0,L=0;L<E.children.length;L++){var P=E.children[L],R=d(P),$=(V=v,H=P,(Math.max(H.maxX,V.maxX)-Math.min(H.minX,V.minX))*(Math.max(H.maxY,V.maxY)-Math.min(H.minY,V.minY))-R);$<B?(B=$,w=R<w?R:w,X=P):$===B&&R<w&&(w=R,X=P)}E=X||E.children[0]}var V,H;return E},n.prototype._insert=function(v,E,T){var D=T?v:this.toBBox(v),w=[],B=this._chooseSubtree(D,this.data,E,w);for(B.children.push(v),u(B,D);E>=0&&w[E].children.length>this._maxEntries;)this._split(w,E),E--;this._adjustParentBBoxes(D,w,E)},n.prototype._split=function(v,E){var T=v[E],D=T.children.length,w=this._minEntries;this._chooseSplitAxis(T,w,D);var B=this._chooseSplitIndex(T,w,D),X=b(T.children.splice(B,T.children.length-B));X.height=T.height,X.leaf=T.leaf,i(T,this.toBBox),i(X,this.toBBox),E?v[E-1].children.push(X):this._splitRoot(T,X)},n.prototype._splitRoot=function(v,E){this.data=b([v,E]),this.data.height=v.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(v,E,T){for(var D,w,B,X,L,P,R,$=1/0,V=1/0,H=E;H<=T-E;H++){var re=a(v,0,H,this.toBBox),j=a(v,H,T,this.toBBox),me=(w=re,B=j,X=void 0,L=void 0,P=void 0,R=void 0,X=Math.max(w.minX,B.minX),L=Math.max(w.minY,B.minY),P=Math.min(w.maxX,B.maxX),R=Math.min(w.maxY,B.maxY),Math.max(0,P-X)*Math.max(0,R-L)),z=d(re)+d(j);me<$?($=me,D=H,V=z<V?z:V):me===$&&z<V&&(V=z,D=H)}return D||T-E},n.prototype._chooseSplitAxis=function(v,E,T){var D=v.leaf?this.compareMinX:l,w=v.leaf?this.compareMinY:c;this._allDistMargin(v,E,T,D)<this._allDistMargin(v,E,T,w)&&v.children.sort(D)},n.prototype._allDistMargin=function(v,E,T,D){v.children.sort(D);for(var w=this.toBBox,B=a(v,0,E,w),X=a(v,T-E,T,w),L=f(B)+f(X),P=E;P<T-E;P++){var R=v.children[P];u(B,v.leaf?w(R):R),L+=f(B)}for(var $=T-E-1;$>=E;$--){var V=v.children[$];u(X,v.leaf?w(V):V),L+=f(X)}return L},n.prototype._adjustParentBBoxes=function(v,E,T){for(var D=T;D>=0;D--)u(E[D],v)},n.prototype._condense=function(v){for(var E=v.length-1,T=void 0;E>=0;E--)v[E].children.length===0?E>0?(T=v[E-1].children).splice(T.indexOf(v[E]),1):this.clear():i(v[E],this.toBBox)},n})});var h2=Ot(Xe=>{"use strict";p();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.earthRadius=63710088e-1;Xe.factors={centimeters:Xe.earthRadius*100,centimetres:Xe.earthRadius*100,degrees:Xe.earthRadius/111325,feet:Xe.earthRadius*3.28084,inches:Xe.earthRadius*39.37,kilometers:Xe.earthRadius/1e3,kilometres:Xe.earthRadius/1e3,meters:Xe.earthRadius,metres:Xe.earthRadius,miles:Xe.earthRadius/1609.344,millimeters:Xe.earthRadius*1e3,millimetres:Xe.earthRadius*1e3,nauticalmiles:Xe.earthRadius/1852,radians:1,yards:Xe.earthRadius*1.0936};Xe.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/Xe.earthRadius,yards:1.0936133};Xe.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 bl(e,r,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=r||{},n.geometry=e,n}Xe.feature=bl;function ZZ(e,r,t){switch(t===void 0&&(t={}),e){case"Point":return d2(r).geometry;case"LineString":return f2(r).geometry;case"Polygon":return p2(r).geometry;case"MultiPoint":return QA(r).geometry;case"MultiLineString":return KA(r).geometry;case"MultiPolygon":return eP(r).geometry;default:throw new Error(e+" is invalid")}}Xe.geometry=ZZ;function d2(e,r,t){if(t===void 0&&(t={}),!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(!sb(e[0])||!sb(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return bl(n,r,t)}Xe.point=d2;function WZ(e,r,t){return t===void 0&&(t={}),ub(e.map(function(n){return d2(n,r)}),t)}Xe.points=WZ;function p2(e,r,t){t===void 0&&(t={});for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}var u={type:"Polygon",coordinates:e};return bl(u,r,t)}Xe.polygon=p2;function XZ(e,r,t){return t===void 0&&(t={}),ub(e.map(function(n){return p2(n,r)}),t)}Xe.polygons=XZ;function f2(e,r,t){if(t===void 0&&(t={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return bl(n,r,t)}Xe.lineString=f2;function qZ(e,r,t){return t===void 0&&(t={}),ub(e.map(function(n){return f2(n,r)}),t)}Xe.lineStrings=qZ;function ub(e,r){r===void 0&&(r={});var t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}Xe.featureCollection=ub;function KA(e,r,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:e};return bl(n,r,t)}Xe.multiLineString=KA;function QA(e,r,t){t===void 0&&(t={});var n={type:"MultiPoint",coordinates:e};return bl(n,r,t)}Xe.multiPoint=QA;function eP(e,r,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:e};return bl(n,r,t)}Xe.multiPolygon=eP;function JZ(e,r,t){t===void 0&&(t={});var n={type:"GeometryCollection",geometries:e};return bl(n,r,t)}Xe.geometryCollection=JZ;function YZ(e,r){if(r===void 0&&(r=0),r&&!(r>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,r||0);return Math.round(e*t)/t}Xe.round=YZ;function tP(e,r){r===void 0&&(r="kilometers");var t=Xe.factors[r];if(!t)throw new Error(r+" units is invalid");return e*t}Xe.radiansToLength=tP;function m2(e,r){r===void 0&&(r="kilometers");var t=Xe.factors[r];if(!t)throw new Error(r+" units is invalid");return e/t}Xe.lengthToRadians=m2;function KZ(e,r){return rP(m2(e,r))}Xe.lengthToDegrees=KZ;function QZ(e){var r=e%360;return r<0&&(r+=360),r}Xe.bearingToAzimuth=QZ;function rP(e){var r=e%(2*Math.PI);return r*180/Math.PI}Xe.radiansToDegrees=rP;function eW(e){var r=e%360;return r*Math.PI/180}Xe.degreesToRadians=eW;function tW(e,r,t){if(r===void 0&&(r="kilometers"),t===void 0&&(t="kilometers"),!(e>=0))throw new Error("length must be a positive number");return tP(m2(e,r),t)}Xe.convertLength=tW;function rW(e,r,t){if(r===void 0&&(r="meters"),t===void 0&&(t="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=Xe.areaFactors[r];if(!n)throw new Error("invalid original units");var o=Xe.areaFactors[t];if(!o)throw new Error("invalid final units");return e/n*o}Xe.convertArea=rW;function sb(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}Xe.isNumber=sb;function nW(e){return!!e&&e.constructor===Object}Xe.isObject=nW;function oW(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(r){if(!sb(r))throw new Error("bbox must only contain numbers")})}Xe.validateBBox=oW;function iW(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")}Xe.validateId=iW});var sP=Ot(pn=>{"use strict";p();Object.defineProperty(pn,"__esModule",{value:!0});var io=h2();function Ph(e,r,t){if(e!==null)for(var n,o,i,a,u,l,c,d=0,f=0,h,g=e.type,b=g==="FeatureCollection",I=g==="Feature",v=b?e.features.length:1,E=0;E<v;E++){c=b?e.features[E].geometry:I?e.geometry:e,h=c?c.type==="GeometryCollection":!1,u=h?c.geometries.length:1;for(var T=0;T<u;T++){var D=0,w=0;if(a=h?c.geometries[T]:c,a!==null){l=a.coordinates;var B=a.type;switch(d=t&&(B==="Polygon"||B==="MultiPolygon")?1:0,B){case null:break;case"Point":if(r(l,f,E,D,w)===!1)return!1;f++,D++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(r(l[n],f,E,D,w)===!1)return!1;f++,B==="MultiPoint"&&D++}B==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(o=0;o<l[n].length-d;o++){if(r(l[n][o],f,E,D,w)===!1)return!1;f++}B==="MultiLineString"&&D++,B==="Polygon"&&w++}B==="Polygon"&&D++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(w=0,o=0;o<l[n].length;o++){for(i=0;i<l[n][o].length-d;i++){if(r(l[n][o][i],f,E,D,w)===!1)return!1;f++}w++}D++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Ph(a.geometries[n],r,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function aW(e,r,t,n){var o=t;return Ph(e,function(i,a,u,l,c){a===0&&t===void 0?o=i:o=r(o,i,a,u,l,c)},n),o}function nP(e,r){var t;switch(e.type){case"FeatureCollection":for(t=0;t<e.features.length&&r(e.features[t].properties,t)!==!1;t++);break;case"Feature":r(e.properties,0);break}}function sW(e,r,t){var n=t;return nP(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function oP(e,r){if(e.type==="Feature")r(e,0);else if(e.type==="FeatureCollection")for(var t=0;t<e.features.length&&r(e.features[t],t)!==!1;t++);}function uW(e,r,t){var n=t;return oP(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function lW(e){var r=[];return Ph(e,function(t){r.push(t)}),r}function g2(e,r){var t,n,o,i,a,u,l,c,d,f,h=0,g=e.type==="FeatureCollection",b=e.type==="Feature",I=g?e.features.length:1;for(t=0;t<I;t++){for(u=g?e.features[t].geometry:b?e.geometry:e,c=g?e.features[t].properties:b?e.properties:{},d=g?e.features[t].bbox:b?e.bbox:void 0,f=g?e.features[t].id:b?e.id:void 0,l=u?u.type==="GeometryCollection":!1,a=l?u.geometries.length:1,o=0;o<a;o++){if(i=l?u.geometries[o]:u,i===null){if(r(null,h,c,d,f)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(r(i,h,c,d,f)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(r(i.geometries[n],h,c,d,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function cW(e,r,t){var n=t;return g2(e,function(o,i,a,u,l){i===0&&t===void 0?n=o:n=r(n,o,i,a,u,l)}),n}function lb(e,r){g2(e,function(t,n,o,i,a){var u=t===null?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return r(io.feature(t,o,{bbox:i,id:a}),n,0)===!1?!1:void 0}var l;switch(u){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var d=t.coordinates[c],f={type:l,coordinates:d};if(r(io.feature(f,o),n,c)===!1)return!1}})}function dW(e,r,t){var n=t;return lb(e,function(o,i,a){i===0&&a===0&&t===void 0?n=o:n=r(n,o,i,a)}),n}function iP(e,r){lb(e,function(t,n,o){var i=0;if(t.geometry){var a=t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,l=0,c=0,d=0;if(Ph(t,function(f,h,g,b,I){if(u===void 0||n>l||b>c||I>d){u=f,l=n,c=b,d=I,i=0;return}var v=io.lineString([u,f],t.properties);if(r(v,n,o,I,i)===!1)return!1;i++,u=f})===!1)return!1}}})}function pW(e,r,t){var n=t,o=!1;return iP(e,function(i,a,u,l,c){o===!1&&t===void 0?n=i:n=r(n,i,a,u,l,c),o=!0}),n}function aP(e,r){if(!e)throw new Error("geojson is required");lb(e,function(t,n,o){if(t.geometry!==null){var i=t.geometry.type,a=t.geometry.coordinates;switch(i){case"LineString":if(r(t,n,o,0,0)===!1)return!1;break;case"Polygon":for(var u=0;u<a.length;u++)if(r(io.lineString(a[u],t.properties),n,o,u)===!1)return!1;break}}})}function fW(e,r,t){var n=t;return aP(e,function(o,i,a,u){i===0&&t===void 0?n=o:n=r(n,o,i,a,u)}),n}function mW(e,r){if(r=r||{},!io.isObject(r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.segmentIndex||0,a=r.properties,u;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,u=e.features[t].geometry;break;case"Feature":a=a||e.properties,u=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=e;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var l=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return i<0&&(i=l.length+i-1),io.lineString([l[i],l[i+1]],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i-1),io.lineString([l[o][i],l[o][i+1]],a,r);case"MultiLineString":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i-1),io.lineString([l[n][i],l[n][i+1]],a,r);case"MultiPolygon":return n<0&&(n=l.length+n),o<0&&(o=l[n].length+o),i<0&&(i=l[n][o].length-i-1),io.lineString([l[n][o][i],l[n][o][i+1]],a,r)}throw new Error("geojson is invalid")}function hW(e,r){if(r=r||{},!io.isObject(r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.coordIndex||0,a=r.properties,u;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,u=e.features[t].geometry;break;case"Feature":a=a||e.properties,u=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=e;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var l=u.coordinates;switch(u.type){case"Point":return io.point(l,a,r);case"MultiPoint":return n<0&&(n=l.length+n),io.point(l[n],a,r);case"LineString":return i<0&&(i=l.length+i),io.point(l[i],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),io.point(l[o][i],a,r);case"MultiLineString":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),io.point(l[n][i],a,r);case"MultiPolygon":return n<0&&(n=l.length+n),o<0&&(o=l[n].length+o),i<0&&(i=l[n][o].length-i),io.point(l[n][o][i],a,r)}throw new Error("geojson is invalid")}pn.coordAll=lW;pn.coordEach=Ph;pn.coordReduce=aW;pn.featureEach=oP;pn.featureReduce=uW;pn.findPoint=hW;pn.findSegment=mW;pn.flattenEach=lb;pn.flattenReduce=dW;pn.geomEach=g2;pn.geomReduce=cW;pn.lineEach=aP;pn.lineReduce=fW;pn.propEach=nP;pn.propReduce=sW;pn.segmentEach=iP;pn.segmentReduce=pW});var fP=Ot(Rt=>{"use strict";p();Object.defineProperty(Rt,"__esModule",{value:!0});var zo=63710088e-1,b2={centimeters:zo*100,centimetres:zo*100,degrees:360/(2*Math.PI),feet:zo*3.28084,inches:zo*39.37,kilometers:zo/1e3,kilometres:zo/1e3,meters:zo,metres:zo,miles:zo/1609.344,millimeters:zo*1e3,millimetres:zo*1e3,nauticalmiles:zo/1852,radians:1,yards:zo*1.0936},y2={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 vl(e,r,t={}){let n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=r||{},n.geometry=e,n}function gW(e,r,t={}){switch(e){case"Point":return v2(r).geometry;case"LineString":return E2(r).geometry;case"Polygon":return x2(r).geometry;case"MultiPoint":return lP(r).geometry;case"MultiLineString":return uP(r).geometry;case"MultiPolygon":return cP(r).geometry;default:throw new Error(e+" is invalid")}}function v2(e,r,t={}){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(!cb(e[0])||!cb(e[1]))throw new Error("coordinates must contain numbers");return vl({type:"Point",coordinates:e},r,t)}function yW(e,r,t={}){return db(e.map(n=>v2(n,r)),t)}function x2(e,r,t={}){for(let o of e){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;i<o[o.length-1].length;i++)if(o[o.length-1][i]!==o[0][i])throw new Error("First and last Position are not equivalent.")}return vl({type:"Polygon",coordinates:e},r,t)}function bW(e,r,t={}){return db(e.map(n=>x2(n,r)),t)}function E2(e,r,t={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return vl({type:"LineString",coordinates:e},r,t)}function vW(e,r,t={}){return db(e.map(n=>E2(n,r)),t)}function db(e,r={}){let t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}function uP(e,r,t={}){return vl({type:"MultiLineString",coordinates:e},r,t)}function lP(e,r,t={}){return vl({type:"MultiPoint",coordinates:e},r,t)}function cP(e,r,t={}){return vl({type:"MultiPolygon",coordinates:e},r,t)}function xW(e,r,t={}){return vl({type:"GeometryCollection",geometries:e},r,t)}function EW(e,r=0){if(r&&!(r>=0))throw new Error("precision must be a positive number");let t=Math.pow(10,r||0);return Math.round(e*t)/t}function dP(e,r="kilometers"){let t=b2[r];if(!t)throw new Error(r+" units is invalid");return e*t}function I2(e,r="kilometers"){let t=b2[r];if(!t)throw new Error(r+" units is invalid");return e/t}function IW(e,r){return pP(I2(e,r))}function SW(e){let r=e%360;return r<0&&(r+=360),r}function CW(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function pP(e){return e%(2*Math.PI)*180/Math.PI}function DW(e){return e%360*Math.PI/180}function TW(e,r="kilometers",t="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return dP(I2(e,r),t)}function wW(e,r="meters",t="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=y2[r];if(!n)throw new Error("invalid original units");let o=y2[t];if(!o)throw new Error("invalid final units");return e/n*o}function cb(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function MW(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function AW(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(r=>{if(!cb(r))throw new Error("bbox must only contain numbers")})}function PW(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")}Rt.areaFactors=y2;Rt.azimuthToBearing=CW;Rt.bearingToAzimuth=SW;Rt.convertArea=wW;Rt.convertLength=TW;Rt.degreesToRadians=DW;Rt.earthRadius=zo;Rt.factors=b2;Rt.feature=vl;Rt.featureCollection=db;Rt.geometry=gW;Rt.geometryCollection=xW;Rt.isNumber=cb;Rt.isObject=MW;Rt.lengthToDegrees=IW;Rt.lengthToRadians=I2;Rt.lineString=E2;Rt.lineStrings=vW;Rt.multiLineString=uP;Rt.multiPoint=lP;Rt.multiPolygon=cP;Rt.point=v2;Rt.points=yW;Rt.polygon=x2;Rt.polygons=bW;Rt.radiansToDegrees=pP;Rt.radiansToLength=dP;Rt.round=EW;Rt.validateBBox=AW;Rt.validateId=PW});var bP=Ot(fn=>{"use strict";p();Object.defineProperty(fn,"__esModule",{value:!0});var ao=fP();function _h(e,r,t){if(e!==null)for(var n,o,i,a,u,l,c,d=0,f=0,h,g=e.type,b=g==="FeatureCollection",I=g==="Feature",v=b?e.features.length:1,E=0;E<v;E++){c=b?e.features[E].geometry:I?e.geometry:e,h=c?c.type==="GeometryCollection":!1,u=h?c.geometries.length:1;for(var T=0;T<u;T++){var D=0,w=0;if(a=h?c.geometries[T]:c,a!==null){l=a.coordinates;var B=a.type;switch(d=t&&(B==="Polygon"||B==="MultiPolygon")?1:0,B){case null:break;case"Point":if(r(l,f,E,D,w)===!1)return!1;f++,D++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(r(l[n],f,E,D,w)===!1)return!1;f++,B==="MultiPoint"&&D++}B==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(o=0;o<l[n].length-d;o++){if(r(l[n][o],f,E,D,w)===!1)return!1;f++}B==="MultiLineString"&&D++,B==="Polygon"&&w++}B==="Polygon"&&D++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(w=0,o=0;o<l[n].length;o++){for(i=0;i<l[n][o].length-d;i++){if(r(l[n][o][i],f,E,D,w)===!1)return!1;f++}w++}D++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(_h(a.geometries[n],r,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function _W(e,r,t,n){var o=t;return _h(e,function(i,a,u,l,c){a===0&&t===void 0?o=i:o=r(o,i,a,u,l,c)},n),o}function mP(e,r){var t;switch(e.type){case"FeatureCollection":for(t=0;t<e.features.length&&r(e.features[t].properties,t)!==!1;t++);break;case"Feature":r(e.properties,0);break}}function OW(e,r,t){var n=t;return mP(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function hP(e,r){if(e.type==="Feature")r(e,0);else if(e.type==="FeatureCollection")for(var t=0;t<e.features.length&&r(e.features[t],t)!==!1;t++);}function FW(e,r,t){var n=t;return hP(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function kW(e){var r=[];return _h(e,function(t){r.push(t)}),r}function S2(e,r){var t,n,o,i,a,u,l,c,d,f,h=0,g=e.type==="FeatureCollection",b=e.type==="Feature",I=g?e.features.length:1;for(t=0;t<I;t++){for(u=g?e.features[t].geometry:b?e.geometry:e,c=g?e.features[t].properties:b?e.properties:{},d=g?e.features[t].bbox:b?e.bbox:void 0,f=g?e.features[t].id:b?e.id:void 0,l=u?u.type==="GeometryCollection":!1,a=l?u.geometries.length:1,o=0;o<a;o++){if(i=l?u.geometries[o]:u,i===null){if(r(null,h,c,d,f)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(r(i,h,c,d,f)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(r(i.geometries[n],h,c,d,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function BW(e,r,t){var n=t;return S2(e,function(o,i,a,u,l){i===0&&t===void 0?n=o:n=r(n,o,i,a,u,l)}),n}function pb(e,r){S2(e,function(t,n,o,i,a){var u=t===null?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return r(ao.feature.call(void 0,t,o,{bbox:i,id:a}),n,0)===!1?!1:void 0}var l;switch(u){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var d=t.coordinates[c],f={type:l,coordinates:d};if(r(ao.feature.call(void 0,f,o),n,c)===!1)return!1}})}function LW(e,r,t){var n=t;return pb(e,function(o,i,a){i===0&&a===0&&t===void 0?n=o:n=r(n,o,i,a)}),n}function gP(e,r){pb(e,function(t,n,o){var i=0;if(t.geometry){var a=t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,l=0,c=0,d=0;if(_h(t,function(f,h,g,b,I){if(u===void 0||n>l||b>c||I>d){u=f,l=n,c=b,d=I,i=0;return}var v=ao.lineString.call(void 0,[u,f],t.properties);if(r(v,n,o,I,i)===!1)return!1;i++,u=f})===!1)return!1}}})}function RW(e,r,t){var n=t,o=!1;return gP(e,function(i,a,u,l,c){o===!1&&t===void 0?n=i:n=r(n,i,a,u,l,c),o=!0}),n}function yP(e,r){if(!e)throw new Error("geojson is required");pb(e,function(t,n,o){if(t.geometry!==null){var i=t.geometry.type,a=t.geometry.coordinates;switch(i){case"LineString":if(r(t,n,o,0,0)===!1)return!1;break;case"Polygon":for(var u=0;u<a.length;u++)if(r(ao.lineString.call(void 0,a[u],t.properties),n,o,u)===!1)return!1;break}}})}function NW(e,r,t){var n=t;return yP(e,function(o,i,a,u){i===0&&t===void 0?n=o:n=r(n,o,i,a,u)}),n}function jW(e,r){if(r=r||{},!ao.isObject.call(void 0,r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.segmentIndex||0,a=r.properties,u;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,u=e.features[t].geometry;break;case"Feature":a=a||e.properties,u=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=e;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var l=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return i<0&&(i=l.length+i-1),ao.lineString.call(void 0,[l[i],l[i+1]],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i-1),ao.lineString.call(void 0,[l[o][i],l[o][i+1]],a,r);case"MultiLineString":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i-1),ao.lineString.call(void 0,[l[n][i],l[n][i+1]],a,r);case"MultiPolygon":return n<0&&(n=l.length+n),o<0&&(o=l[n].length+o),i<0&&(i=l[n][o].length-i-1),ao.lineString.call(void 0,[l[n][o][i],l[n][o][i+1]],a,r)}throw new Error("geojson is invalid")}function UW(e,r){if(r=r||{},!ao.isObject.call(void 0,r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.coordIndex||0,a=r.properties,u;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,u=e.features[t].geometry;break;case"Feature":a=a||e.properties,u=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=e;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var l=u.coordinates;switch(u.type){case"Point":return ao.point.call(void 0,l,a,r);case"MultiPoint":return n<0&&(n=l.length+n),ao.point.call(void 0,l[n],a,r);case"LineString":return i<0&&(i=l.length+i),ao.point.call(void 0,l[i],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),ao.point.call(void 0,l[o][i],a,r);case"MultiLineString":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),ao.point.call(void 0,l[n][i],a,r);case"MultiPolygon":return n<0&&(n=l.length+n),o<0&&(o=l[n].length+o),i<0&&(i=l[n][o].length-i),ao.point.call(void 0,l[n][o][i],a,r)}throw new Error("geojson is invalid")}fn.coordAll=kW;fn.coordEach=_h;fn.coordReduce=_W;fn.featureEach=hP;fn.featureReduce=FW;fn.findPoint=UW;fn.findSegment=jW;fn.flattenEach=pb;fn.flattenReduce=LW;fn.geomEach=S2;fn.geomReduce=BW;fn.lineEach=yP;fn.lineReduce=NW;fn.propEach=mP;fn.propReduce=OW;fn.segmentEach=gP;fn.segmentReduce=RW});var xP=Ot(fb=>{"use strict";p();Object.defineProperty(fb,"__esModule",{value:!0});var GW=bP();function vP(e,r={}){if(e.bbox!=null&&r.recompute!==!0)return e.bbox;let t=[1/0,1/0,-1/0,-1/0];return GW.coordEach.call(void 0,e,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var zW=vP;fb.bbox=vP;fb.default=zW});var DP=Ot((SDe,C2)=>{p();var hs=YA(),IP=h2(),SP=sP(),Vp=xP().default,VW=SP.featureEach,EDe=SP.coordEach,IDe=IP.polygon,EP=IP.featureCollection;function CP(e){var r=new hs(e);return r.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:Vp(t),hs.prototype.insert.call(this,t)},r.load=function(t){var n=[];return Array.isArray(t)?t.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:Vp(o),n.push(o)}):VW(t,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:Vp(o),n.push(o)}),hs.prototype.load.call(this,n)},r.remove=function(t,n){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:Vp(t),hs.prototype.remove.call(this,t,n)},r.clear=function(){return hs.prototype.clear.call(this)},r.search=function(t){var n=hs.prototype.search.call(this,this.toBBox(t));return EP(n)},r.collides=function(t){return hs.prototype.collides.call(this,this.toBBox(t))},r.all=function(){var t=hs.prototype.all.call(this);return EP(t)},r.toJSON=function(){return hs.prototype.toJSON.call(this)},r.fromJSON=function(t){return hs.prototype.fromJSON.call(this,t)},r.toBBox=function(t){var n;if(t.bbox)n=t.bbox;else if(Array.isArray(t)&&t.length===4)n=t;else if(Array.isArray(t)&&t.length===6)n=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")n=Vp(t);else if(t.type==="FeatureCollection")n=Vp(t);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},r}C2.exports=CP;C2.exports.default=CP});var NP=Ot((Z2,W2)=>{p();(function(e,r){typeof Z2=="object"&&typeof W2<"u"?W2.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self,e.polygonClipping=r())})(Z2,function(){"use strict";function e(G,S){var C={label:0,sent:function(){if(F[0]&1)throw F[1];return F[1]},trys:[],ops:[]},A,O,F,Y;return Y={next:ee(0),throw:ee(1),return:ee(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ee(W){return function(ie){return de([W,ie])}}function de(W){if(A)throw new TypeError("Generator is already executing.");for(;C;)try{if(A=1,O&&(F=W[0]&2?O.return:W[0]?O.throw||((F=O.return)&&F.call(O),0):O.next)&&!(F=F.call(O,W[1])).done)return F;switch(O=0,F&&(W=[W[0]&2,F.value]),W[0]){case 0:case 1:F=W;break;case 4:return C.label++,{value:W[1],done:!1};case 5:C.label++,O=W[1],W=[0];continue;case 7:W=C.ops.pop(),C.trys.pop();continue;default:if(F=C.trys,!(F=F.length>0&&F[F.length-1])&&(W[0]===6||W[0]===2)){C=0;continue}if(W[0]===3&&(!F||W[1]>F[0]&&W[1]<F[3])){C.label=W[1];break}if(W[0]===6&&C.label<F[1]){C.label=F[1],F=W;break}if(F&&C.label<F[2]){C.label=F[2],C.ops.push(W);break}F[2]&&C.ops.pop(),C.trys.pop();continue}W=S.call(G,C)}catch(ie){W=[6,ie],O=0}finally{A=F=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}}var r=function(){function G(S,C){this.next=null,this.key=S,this.data=C,this.left=null,this.right=null}return G}();function t(G,S){return G>S?1:G<S?-1:0}function n(G,S,C){for(var A=new r(null,null),O=A,F=A;;){var Y=C(G,S.key);if(Y<0){if(S.left===null)break;if(C(G,S.left.key)<0){var ee=S.left;if(S.left=ee.right,ee.right=S,S=ee,S.left===null)break}F.left=S,F=S,S=S.left}else if(Y>0){if(S.right===null)break;if(C(G,S.right.key)>0){var ee=S.right;if(S.right=ee.left,ee.left=S,S=ee,S.right===null)break}O.right=S,O=S,S=S.right}else break}return O.right=S.left,F.left=S.right,S.left=A.right,S.right=A.left,S}function o(G,S,C,A){var O=new r(G,S);if(C===null)return O.left=O.right=null,O;C=n(G,C,A);var F=A(G,C.key);return F<0?(O.left=C.left,O.right=C,C.left=null):F>=0&&(O.right=C.right,O.left=C,C.right=null),O}function i(G,S,C){var A=null,O=null;if(S){S=n(G,S,C);var F=C(S.key,G);F===0?(A=S.left,O=S.right):F<0?(O=S.right,S.right=null,A=S):(A=S.left,S.left=null,O=S)}return{left:A,right:O}}function a(G,S,C){return S===null?G:(G===null||(S=n(G.key,S,C),S.left=G),S)}function u(G,S,C,A,O){if(G){A(""+S+(C?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+O(G)+"\n");var F=S+(C?" ":"\u2502 ");G.left&&u(G.left,F,!1,A,O),G.right&&u(G.right,F,!0,A,O)}}var l=function(){function G(S){S===void 0&&(S=t),this._root=null,this._size=0,this._comparator=S}return G.prototype.insert=function(S,C){return this._size++,this._root=o(S,C,this._root,this._comparator)},G.prototype.add=function(S,C){var A=new r(S,C);this._root===null&&(A.left=A.right=null,this._size++,this._root=A);var O=this._comparator,F=n(S,this._root,O),Y=O(S,F.key);return Y===0?this._root=F:(Y<0?(A.left=F.left,A.right=F,F.left=null):Y>0&&(A.right=F.right,A.left=F,F.right=null),this._size++,this._root=A),this._root},G.prototype.remove=function(S){this._root=this._remove(S,this._root,this._comparator)},G.prototype._remove=function(S,C,A){var O;if(C===null)return null;C=n(S,C,A);var F=A(S,C.key);return F===0?(C.left===null?O=C.right:(O=n(S,C.left,A),O.right=C.right),this._size--,O):C},G.prototype.pop=function(){var S=this._root;if(S){for(;S.left;)S=S.left;return this._root=n(S.key,this._root,this._comparator),this._root=this._remove(S.key,this._root,this._comparator),{key:S.key,data:S.data}}return null},G.prototype.findStatic=function(S){for(var C=this._root,A=this._comparator;C;){var O=A(S,C.key);if(O===0)return C;O<0?C=C.left:C=C.right}return null},G.prototype.find=function(S){return this._root&&(this._root=n(S,this._root,this._comparator),this._comparator(S,this._root.key)!==0)?null:this._root},G.prototype.contains=function(S){for(var C=this._root,A=this._comparator;C;){var O=A(S,C.key);if(O===0)return!0;O<0?C=C.left:C=C.right}return!1},G.prototype.forEach=function(S,C){for(var A=this._root,O=[],F=!1;!F;)A!==null?(O.push(A),A=A.left):O.length!==0?(A=O.pop(),S.call(C,A),A=A.right):F=!0;return this},G.prototype.range=function(S,C,A,O){for(var F=[],Y=this._comparator,ee=this._root,de;F.length!==0||ee;)if(ee)F.push(ee),ee=ee.left;else{if(ee=F.pop(),de=Y(ee.key,C),de>0)break;if(Y(ee.key,S)>=0&&A.call(O,ee))return this;ee=ee.right}return this},G.prototype.keys=function(){var S=[];return this.forEach(function(C){var A=C.key;return S.push(A)}),S},G.prototype.values=function(){var S=[];return this.forEach(function(C){var A=C.data;return S.push(A)}),S},G.prototype.min=function(){return this._root?this.minNode(this._root).key:null},G.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},G.prototype.minNode=function(S){if(S===void 0&&(S=this._root),S)for(;S.left;)S=S.left;return S},G.prototype.maxNode=function(S){if(S===void 0&&(S=this._root),S)for(;S.right;)S=S.right;return S},G.prototype.at=function(S){for(var C=this._root,A=!1,O=0,F=[];!A;)if(C)F.push(C),C=C.left;else if(F.length>0){if(C=F.pop(),O===S)return C;O++,C=C.right}else A=!0;return null},G.prototype.next=function(S){var C=this._root,A=null;if(S.right){for(A=S.right;A.left;)A=A.left;return A}for(var O=this._comparator;C;){var F=O(S.key,C.key);if(F===0)break;F<0?(A=C,C=C.left):C=C.right}return A},G.prototype.prev=function(S){var C=this._root,A=null;if(S.left!==null){for(A=S.left;A.right;)A=A.right;return A}for(var O=this._comparator;C;){var F=O(S.key,C.key);if(F===0)break;F<0?C=C.left:(A=C,C=C.right)}return A},G.prototype.clear=function(){return this._root=null,this._size=0,this},G.prototype.toList=function(){return f(this._root)},G.prototype.load=function(S,C,A){C===void 0&&(C=[]),A===void 0&&(A=!1);var O=S.length,F=this._comparator;if(A&&b(S,C,0,O-1,F),this._root===null)this._root=c(S,C,0,O),this._size=O;else{var Y=g(this.toList(),d(S,C),F);O=this._size+O,this._root=h({head:Y},0,O)}return this},G.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(G.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(G.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),G.prototype.toString=function(S){S===void 0&&(S=function(A){return String(A.key)});var C=[];return u(this._root,"",!0,function(A){return C.push(A)},S),C.join("")},G.prototype.update=function(S,C,A){var O=this._comparator,F=i(S,this._root,O),Y=F.left,ee=F.right;O(S,C)<0?ee=o(C,A,ee,O):Y=o(C,A,Y,O),this._root=a(Y,ee,O)},G.prototype.split=function(S){return i(S,this._root,this._comparator)},G.prototype[Symbol.iterator]=function(){var S,C,A;return e(this,function(O){switch(O.label){case 0:S=this._root,C=[],A=!1,O.label=1;case 1:return A?[3,6]:S===null?[3,2]:(C.push(S),S=S.left,[3,5]);case 2:return C.length===0?[3,4]:(S=C.pop(),[4,S]);case 3:return O.sent(),S=S.right,[3,5];case 4:A=!0,O.label=5;case 5:return[3,1];case 6:return[2]}})},G}();function c(G,S,C,A){var O=A-C;if(O>0){var F=C+Math.floor(O/2),Y=G[F],ee=S[F],de=new r(Y,ee);return de.left=c(G,S,C,F),de.right=c(G,S,F+1,A),de}return null}function d(G,S){for(var C=new r(null,null),A=C,O=0;O<G.length;O++)A=A.next=new r(G[O],S[O]);return A.next=null,C.next}function f(G){for(var S=G,C=[],A=!1,O=new r(null,null),F=O;!A;)S?(C.push(S),S=S.left):C.length>0?(S=F=F.next=C.pop(),S=S.right):A=!0;return F.next=null,O.next}function h(G,S,C){var A=C-S;if(A>0){var O=S+Math.floor(A/2),F=h(G,S,O),Y=G.head;return Y.left=F,G.head=G.head.next,Y.right=h(G,O+1,C),Y}return null}function g(G,S,C){for(var A=new r(null,null),O=A,F=G,Y=S;F!==null&&Y!==null;)C(F.key,Y.key)<0?(O.next=F,F=F.next):(O.next=Y,Y=Y.next),O=O.next;return F!==null?O.next=F:Y!==null&&(O.next=Y),A.next}function b(G,S,C,A,O){if(!(C>=A)){for(var F=G[C+A>>1],Y=C-1,ee=A+1;;){do Y++;while(O(G[Y],F)<0);do ee--;while(O(G[ee],F)>0);if(Y>=ee)break;var de=G[Y];G[Y]=G[ee],G[ee]=de,de=S[Y],S[Y]=S[ee],S[ee]=de}b(G,S,C,ee,O),b(G,S,ee+1,A,O)}}let I=(G,S)=>G.ll.x<=S.x&&S.x<=G.ur.x&&G.ll.y<=S.y&&S.y<=G.ur.y,v=(G,S)=>{if(S.ur.x<G.ll.x||G.ur.x<S.ll.x||S.ur.y<G.ll.y||G.ur.y<S.ll.y)return null;let C=G.ll.x<S.ll.x?S.ll.x:G.ll.x,A=G.ur.x<S.ur.x?G.ur.x:S.ur.x,O=G.ll.y<S.ll.y?S.ll.y:G.ll.y,F=G.ur.y<S.ur.y?G.ur.y:S.ur.y;return{ll:{x:C,y:O},ur:{x:A,y:F}}},E=Number.EPSILON;E===void 0&&(E=Math.pow(2,-52));let T=E*E,D=(G,S)=>{if(-E<G&&G<E&&-E<S&&S<E)return 0;let C=G-S;return C*C<T*G*S?0:G<S?-1:1};class w{constructor(){this.reset()}reset(){this.xRounder=new B,this.yRounder=new B}round(S,C){return{x:this.xRounder.round(S),y:this.yRounder.round(C)}}}class B{constructor(){this.tree=new l,this.round(0)}round(S){let C=this.tree.add(S),A=this.tree.prev(C);if(A!==null&&D(C.key,A.key)===0)return this.tree.remove(S),A.key;let O=this.tree.next(C);return O!==null&&D(C.key,O.key)===0?(this.tree.remove(S),O.key):S}}let X=new w,L=11102230246251565e-32,P=134217729,R=(3+8*L)*L;function $(G,S,C,A,O){let F,Y,ee,de,W=S[0],ie=A[0],J=0,fe=0;ie>W==ie>-W?(F=W,W=S[++J]):(F=ie,ie=A[++fe]);let Te=0;if(J<G&&fe<C)for(ie>W==ie>-W?(Y=W+F,ee=F-(Y-W),W=S[++J]):(Y=ie+F,ee=F-(Y-ie),ie=A[++fe]),F=Y,ee!==0&&(O[Te++]=ee);J<G&&fe<C;)ie>W==ie>-W?(Y=F+W,de=Y-F,ee=F-(Y-de)+(W-de),W=S[++J]):(Y=F+ie,de=Y-F,ee=F-(Y-de)+(ie-de),ie=A[++fe]),F=Y,ee!==0&&(O[Te++]=ee);for(;J<G;)Y=F+W,de=Y-F,ee=F-(Y-de)+(W-de),W=S[++J],F=Y,ee!==0&&(O[Te++]=ee);for(;fe<C;)Y=F+ie,de=Y-F,ee=F-(Y-de)+(ie-de),ie=A[++fe],F=Y,ee!==0&&(O[Te++]=ee);return(F!==0||Te===0)&&(O[Te++]=F),Te}function V(G,S){let C=S[0];for(let A=1;A<G;A++)C+=S[A];return C}function H(G){return new Float64Array(G)}let re=(3+16*L)*L,j=(2+12*L)*L,me=(9+64*L)*L*L,z=H(4),ue=H(8),se=H(12),pe=H(16),le=H(4);function ye(G,S,C,A,O,F,Y){let ee,de,W,ie,J,fe,Te,Be,Ve,ht,rt,qt,en,Tr,xn,nr,tn,rn,_o=G-O,fo=C-O,Oo=S-F,Gr=A-F;Tr=_o*Gr,fe=P*_o,Te=fe-(fe-_o),Be=_o-Te,fe=P*Gr,Ve=fe-(fe-Gr),ht=Gr-Ve,xn=Be*ht-(Tr-Te*Ve-Be*Ve-Te*ht),nr=Oo*fo,fe=P*Oo,Te=fe-(fe-Oo),Be=Oo-Te,fe=P*fo,Ve=fe-(fe-fo),ht=fo-Ve,tn=Be*ht-(nr-Te*Ve-Be*Ve-Te*ht),rt=xn-tn,J=xn-rt,z[0]=xn-(rt+J)+(J-tn),qt=Tr+rt,J=qt-Tr,en=Tr-(qt-J)+(rt-J),rt=en-nr,J=en-rt,z[1]=en-(rt+J)+(J-nr),rn=qt+rt,J=rn-qt,z[2]=qt-(rn-J)+(rt-J),z[3]=rn;let xi=V(4,z),Xu=j*Y;if(xi>=Xu||-xi>=Xu||(J=G-_o,ee=G-(_o+J)+(J-O),J=C-fo,W=C-(fo+J)+(J-O),J=S-Oo,de=S-(Oo+J)+(J-F),J=A-Gr,ie=A-(Gr+J)+(J-F),ee===0&&de===0&&W===0&&ie===0)||(Xu=me*Y+R*Math.abs(xi),xi+=_o*ie+Gr*ee-(Oo*W+fo*de),xi>=Xu||-xi>=Xu))return xi;Tr=ee*Gr,fe=P*ee,Te=fe-(fe-ee),Be=ee-Te,fe=P*Gr,Ve=fe-(fe-Gr),ht=Gr-Ve,xn=Be*ht-(Tr-Te*Ve-Be*Ve-Te*ht),nr=de*fo,fe=P*de,Te=fe-(fe-de),Be=de-Te,fe=P*fo,Ve=fe-(fe-fo),ht=fo-Ve,tn=Be*ht-(nr-Te*Ve-Be*Ve-Te*ht),rt=xn-tn,J=xn-rt,le[0]=xn-(rt+J)+(J-tn),qt=Tr+rt,J=qt-Tr,en=Tr-(qt-J)+(rt-J),rt=en-nr,J=en-rt,le[1]=en-(rt+J)+(J-nr),rn=qt+rt,J=rn-qt,le[2]=qt-(rn-J)+(rt-J),le[3]=rn;let Lg=$(4,z,4,le,ue);Tr=_o*ie,fe=P*_o,Te=fe-(fe-_o),Be=_o-Te,fe=P*ie,Ve=fe-(fe-ie),ht=ie-Ve,xn=Be*ht-(Tr-Te*Ve-Be*Ve-Te*ht),nr=Oo*W,fe=P*Oo,Te=fe-(fe-Oo),Be=Oo-Te,fe=P*W,Ve=fe-(fe-W),ht=W-Ve,tn=Be*ht-(nr-Te*Ve-Be*Ve-Te*ht),rt=xn-tn,J=xn-rt,le[0]=xn-(rt+J)+(J-tn),qt=Tr+rt,J=qt-Tr,en=Tr-(qt-J)+(rt-J),rt=en-nr,J=en-rt,le[1]=en-(rt+J)+(J-nr),rn=qt+rt,J=rn-qt,le[2]=qt-(rn-J)+(rt-J),le[3]=rn;let Rg=$(Lg,ue,4,le,se);Tr=ee*ie,fe=P*ee,Te=fe-(fe-ee),Be=ee-Te,fe=P*ie,Ve=fe-(fe-ie),ht=ie-Ve,xn=Be*ht-(Tr-Te*Ve-Be*Ve-Te*ht),nr=de*W,fe=P*de,Te=fe-(fe-de),Be=de-Te,fe=P*W,Ve=fe-(fe-W),ht=W-Ve,tn=Be*ht-(nr-Te*Ve-Be*Ve-Te*ht),rt=xn-tn,J=xn-rt,le[0]=xn-(rt+J)+(J-tn),qt=Tr+rt,J=qt-Tr,en=Tr-(qt-J)+(rt-J),rt=en-nr,J=en-rt,le[1]=en-(rt+J)+(J-nr),rn=qt+rt,J=rn-qt,le[2]=qt-(rn-J)+(rt-J),le[3]=rn;let ix=$(Rg,se,4,le,pe);return pe[ix-1]}function Fe(G,S,C,A,O,F){let Y=(S-F)*(C-O),ee=(G-O)*(A-F),de=Y-ee,W=Math.abs(Y+ee);return Math.abs(de)>=re*W?de:-ye(G,S,C,A,O,F,W)}let Ee=(G,S)=>G.x*S.y-G.y*S.x,Oe=(G,S)=>G.x*S.x+G.y*S.y,we=(G,S,C)=>{let A=Fe(G.x,G.y,S.x,S.y,C.x,C.y);return A>0?-1:A<0?1:0},Le=G=>Math.sqrt(Oe(G,G)),Qe=(G,S,C)=>{let A={x:S.x-G.x,y:S.y-G.y},O={x:C.x-G.x,y:C.y-G.y};return Ee(O,A)/Le(O)/Le(A)},Ge=(G,S,C)=>{let A={x:S.x-G.x,y:S.y-G.y},O={x:C.x-G.x,y:C.y-G.y};return Oe(O,A)/Le(O)/Le(A)},N=(G,S,C)=>S.y===0?null:{x:G.x+S.x/S.y*(C-G.y),y:C},xe=(G,S,C)=>S.x===0?null:{x:C,y:G.y+S.y/S.x*(C-G.x)},Z=(G,S,C,A)=>{if(S.x===0)return xe(C,A,G.x);if(A.x===0)return xe(G,S,C.x);if(S.y===0)return N(C,A,G.y);if(A.y===0)return N(G,S,C.y);let O=Ee(S,A);if(O==0)return null;let F={x:C.x-G.x,y:C.y-G.y},Y=Ee(F,S)/O,ee=Ee(F,A)/O,de=G.x+ee*S.x,W=C.x+Y*A.x,ie=G.y+ee*S.y,J=C.y+Y*A.y,fe=(de+W)/2,Te=(ie+J)/2;return{x:fe,y:Te}};class De{static compare(S,C){let A=De.comparePoints(S.point,C.point);return A!==0?A:(S.point!==C.point&&S.link(C),S.isLeft!==C.isLeft?S.isLeft?1:-1:ve.compare(S.segment,C.segment))}static comparePoints(S,C){return S.x<C.x?-1:S.x>C.x?1:S.y<C.y?-1:S.y>C.y?1:0}constructor(S,C){S.events===void 0?S.events=[this]:S.events.push(this),this.point=S,this.isLeft=C}link(S){if(S.point===this.point)throw new Error("Tried to link already linked events");let C=S.point.events;for(let A=0,O=C.length;A<O;A++){let F=C[A];this.point.events.push(F),F.point=this.point}this.checkForConsuming()}checkForConsuming(){let S=this.point.events.length;for(let C=0;C<S;C++){let A=this.point.events[C];if(A.segment.consumedBy===void 0)for(let O=C+1;O<S;O++){let F=this.point.events[O];F.consumedBy===void 0&&A.otherSE.point.events===F.otherSE.point.events&&A.segment.consume(F.segment)}}}getAvailableLinkedEvents(){let S=[];for(let C=0,A=this.point.events.length;C<A;C++){let O=this.point.events[C];O!==this&&!O.segment.ringOut&&O.segment.isInResult()&&S.push(O)}return S}getLeftmostComparator(S){let C=new Map,A=O=>{let F=O.otherSE;C.set(O,{sine:Qe(this.point,S.point,F.point),cosine:Ge(this.point,S.point,F.point)})};return(O,F)=>{C.has(O)||A(O),C.has(F)||A(F);let{sine:Y,cosine:ee}=C.get(O),{sine:de,cosine:W}=C.get(F);return Y>=0&&de>=0?ee<W?1:ee>W?-1:0:Y<0&&de<0?ee<W?-1:ee>W?1:0:de<Y?-1:de>Y?1:0}}}let Ie=0;class ve{static compare(S,C){let A=S.leftSE.point.x,O=C.leftSE.point.x,F=S.rightSE.point.x,Y=C.rightSE.point.x;if(Y<A)return 1;if(F<O)return-1;let ee=S.leftSE.point.y,de=C.leftSE.point.y,W=S.rightSE.point.y,ie=C.rightSE.point.y;if(A<O){if(de<ee&&de<W)return 1;if(de>ee&&de>W)return-1;let J=S.comparePoint(C.leftSE.point);if(J<0)return 1;if(J>0)return-1;let fe=C.comparePoint(S.rightSE.point);return fe!==0?fe:-1}if(A>O){if(ee<de&&ee<ie)return-1;if(ee>de&&ee>ie)return 1;let J=C.comparePoint(S.leftSE.point);if(J!==0)return J;let fe=S.comparePoint(C.rightSE.point);return fe<0?1:fe>0?-1:1}if(ee<de)return-1;if(ee>de)return 1;if(F<Y){let J=C.comparePoint(S.rightSE.point);if(J!==0)return J}if(F>Y){let J=S.comparePoint(C.rightSE.point);if(J<0)return 1;if(J>0)return-1}if(F!==Y){let J=W-ee,fe=F-A,Te=ie-de,Be=Y-O;if(J>fe&&Te<Be)return 1;if(J<fe&&Te>Be)return-1}return F>Y?1:F<Y||W<ie?-1:W>ie?1:S.id<C.id?-1:S.id>C.id?1:0}constructor(S,C,A,O){this.id=++Ie,this.leftSE=S,S.segment=this,S.otherSE=C,this.rightSE=C,C.segment=this,C.otherSE=S,this.rings=A,this.windings=O}static fromRing(S,C,A){let O,F,Y,ee=De.comparePoints(S,C);if(ee<0)O=S,F=C,Y=1;else if(ee>0)O=C,F=S,Y=-1;else throw new Error("Tried to create degenerate segment at [".concat(S.x,", ").concat(S.y,"]"));let de=new De(O,!0),W=new De(F,!1);return new ve(de,W,[A],[Y])}replaceRightSE(S){this.rightSE=S,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let S=this.leftSE.point.y,C=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:S<C?S:C},ur:{x:this.rightSE.point.x,y:S>C?S:C}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(S){return S.x===this.leftSE.point.x&&S.y===this.leftSE.point.y||S.x===this.rightSE.point.x&&S.y===this.rightSE.point.y}comparePoint(S){if(this.isAnEndpoint(S))return 0;let C=this.leftSE.point,A=this.rightSE.point,O=this.vector();if(C.x===A.x)return S.x===C.x?0:S.x<C.x?1:-1;let F=(S.y-C.y)/O.y,Y=C.x+F*O.x;if(S.x===Y)return 0;let ee=(S.x-C.x)/O.x,de=C.y+ee*O.y;return S.y===de?0:S.y<de?-1:1}getIntersection(S){let C=this.bbox(),A=S.bbox(),O=v(C,A);if(O===null)return null;let F=this.leftSE.point,Y=this.rightSE.point,ee=S.leftSE.point,de=S.rightSE.point,W=I(C,ee)&&this.comparePoint(ee)===0,ie=I(A,F)&&S.comparePoint(F)===0,J=I(C,de)&&this.comparePoint(de)===0,fe=I(A,Y)&&S.comparePoint(Y)===0;if(ie&&W)return fe&&!J?Y:!fe&&J?de:null;if(ie)return J&&F.x===de.x&&F.y===de.y?null:F;if(W)return fe&&Y.x===ee.x&&Y.y===ee.y?null:ee;if(fe&&J)return null;if(fe)return Y;if(J)return de;let Te=Z(F,this.vector(),ee,S.vector());return Te===null||!I(O,Te)?null:X.round(Te.x,Te.y)}split(S){let C=[],A=S.events!==void 0,O=new De(S,!0),F=new De(S,!1),Y=this.rightSE;this.replaceRightSE(F),C.push(F),C.push(O);let ee=new ve(O,Y,this.rings.slice(),this.windings.slice());return De.comparePoints(ee.leftSE.point,ee.rightSE.point)>0&&ee.swapEvents(),De.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),A&&(O.checkForConsuming(),F.checkForConsuming()),C}swapEvents(){let S=this.rightSE;this.rightSE=this.leftSE,this.leftSE=S,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let C=0,A=this.windings.length;C<A;C++)this.windings[C]*=-1}consume(S){let C=this,A=S;for(;C.consumedBy;)C=C.consumedBy;for(;A.consumedBy;)A=A.consumedBy;let O=ve.compare(C,A);if(O!==0){if(O>0){let F=C;C=A,A=F}if(C.prev===A){let F=C;C=A,A=F}for(let F=0,Y=A.rings.length;F<Y;F++){let ee=A.rings[F],de=A.windings[F],W=C.rings.indexOf(ee);W===-1?(C.rings.push(ee),C.windings.push(de)):C.windings[W]+=de}A.rings=null,A.windings=null,A.consumedBy=C,A.leftSE.consumedBy=C.leftSE,A.rightSE.consumedBy=C.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let S=this.prev.consumedBy||this.prev;this._beforeState=S.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let S=this.beforeState();this._afterState={rings:S.rings.slice(0),windings:S.windings.slice(0),multiPolys:[]};let C=this._afterState.rings,A=this._afterState.windings,O=this._afterState.multiPolys;for(let ee=0,de=this.rings.length;ee<de;ee++){let W=this.rings[ee],ie=this.windings[ee],J=C.indexOf(W);J===-1?(C.push(W),A.push(ie)):A[J]+=ie}let F=[],Y=[];for(let ee=0,de=C.length;ee<de;ee++){if(A[ee]===0)continue;let W=C[ee],ie=W.poly;if(Y.indexOf(ie)===-1)if(W.isExterior)F.push(ie);else{Y.indexOf(ie)===-1&&Y.push(ie);let J=F.indexOf(W.poly);J!==-1&&F.splice(J,1)}}for(let ee=0,de=F.length;ee<de;ee++){let W=F[ee].multiPoly;O.indexOf(W)===-1&&O.push(W)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let S=this.beforeState().multiPolys,C=this.afterState().multiPolys;switch(sr.type){case"union":{let A=S.length===0,O=C.length===0;this._isInResult=A!==O;break}case"intersection":{let A,O;S.length<C.length?(A=S.length,O=C.length):(A=C.length,O=S.length),this._isInResult=O===sr.numMultiPolys&&A<O;break}case"xor":{let A=Math.abs(S.length-C.length);this._isInResult=A%2===1;break}case"difference":{let A=O=>O.length===1&&O[0].isSubject;this._isInResult=A(S)!==A(C);break}default:throw new Error("Unrecognized operation type found ".concat(sr.type))}return this._isInResult}}class Ne{constructor(S,C,A){if(!Array.isArray(S)||S.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=C,this.isExterior=A,this.segments=[],typeof S[0][0]!="number"||typeof S[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let O=X.round(S[0][0],S[0][1]);this.bbox={ll:{x:O.x,y:O.y},ur:{x:O.x,y:O.y}};let F=O;for(let Y=1,ee=S.length;Y<ee;Y++){if(typeof S[Y][0]!="number"||typeof S[Y][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let de=X.round(S[Y][0],S[Y][1]);de.x===F.x&&de.y===F.y||(this.segments.push(ve.fromRing(F,de,this)),de.x<this.bbox.ll.x&&(this.bbox.ll.x=de.x),de.y<this.bbox.ll.y&&(this.bbox.ll.y=de.y),de.x>this.bbox.ur.x&&(this.bbox.ur.x=de.x),de.y>this.bbox.ur.y&&(this.bbox.ur.y=de.y),F=de)}(O.x!==F.x||O.y!==F.y)&&this.segments.push(ve.fromRing(F,O,this))}getSweepEvents(){let S=[];for(let C=0,A=this.segments.length;C<A;C++){let O=this.segments[C];S.push(O.leftSE),S.push(O.rightSE)}return S}}class Et{constructor(S,C){if(!Array.isArray(S))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Ne(S[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let A=1,O=S.length;A<O;A++){let F=new Ne(S[A],this,!1);F.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=F.bbox.ll.x),F.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=F.bbox.ll.y),F.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=F.bbox.ur.x),F.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=F.bbox.ur.y),this.interiorRings.push(F)}this.multiPoly=C}getSweepEvents(){let S=this.exteriorRing.getSweepEvents();for(let C=0,A=this.interiorRings.length;C<A;C++){let O=this.interiorRings[C].getSweepEvents();for(let F=0,Y=O.length;F<Y;F++)S.push(O[F])}return S}}class zt{constructor(S,C){if(!Array.isArray(S))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof S[0][0][0]=="number"&&(S=[S])}catch(A){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let A=0,O=S.length;A<O;A++){let F=new Et(S[A],this);F.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=F.bbox.ll.x),F.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=F.bbox.ll.y),F.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=F.bbox.ur.x),F.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=F.bbox.ur.y),this.polys.push(F)}this.isSubject=C}getSweepEvents(){let S=[];for(let C=0,A=this.polys.length;C<A;C++){let O=this.polys[C].getSweepEvents();for(let F=0,Y=O.length;F<Y;F++)S.push(O[F])}return S}}class Bt{static factory(S){let C=[];for(let A=0,O=S.length;A<O;A++){let F=S[A];if(!F.isInResult()||F.ringOut)continue;let Y=null,ee=F.leftSE,de=F.rightSE,W=[ee],ie=ee.point,J=[];for(;Y=ee,ee=de,W.push(ee),ee.point!==ie;)for(;;){let fe=ee.getAvailableLinkedEvents();if(fe.length===0){let Ve=W[0].point,ht=W[W.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(Ve.x,",")+" ".concat(Ve.y,"]. Last matching segment found ends at")+" [".concat(ht.x,", ").concat(ht.y,"]."))}if(fe.length===1){de=fe[0].otherSE;break}let Te=null;for(let Ve=0,ht=J.length;Ve<ht;Ve++)if(J[Ve].point===ee.point){Te=Ve;break}if(Te!==null){let Ve=J.splice(Te)[0],ht=W.splice(Ve.index);ht.unshift(ht[0].otherSE),C.push(new Bt(ht.reverse()));continue}J.push({index:W.length,point:ee.point});let Be=ee.getLeftmostComparator(Y);de=fe.sort(Be)[0].otherSE;break}C.push(new Bt(W))}return C}constructor(S){this.events=S;for(let C=0,A=S.length;C<A;C++)S[C].segment.ringOut=this;this.poly=null}getGeom(){let S=this.events[0].point,C=[S];for(let W=1,ie=this.events.length-1;W<ie;W++){let J=this.events[W].point,fe=this.events[W+1].point;we(J,S,fe)!==0&&(C.push(J),S=J)}if(C.length===1)return null;let A=C[0],O=C[1];we(A,S,O)===0&&C.shift(),C.push(C[0]);let F=this.isExteriorRing()?1:-1,Y=this.isExteriorRing()?0:C.length-1,ee=this.isExteriorRing()?C.length:-1,de=[];for(let W=Y;W!=ee;W+=F)de.push([C[W].x,C[W].y]);return de}isExteriorRing(){if(this._isExteriorRing===void 0){let S=this.enclosingRing();this._isExteriorRing=S?!S.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let S=this.events[0];for(let O=1,F=this.events.length;O<F;O++){let Y=this.events[O];De.compare(S,Y)>0&&(S=Y)}let C=S.segment.prevInResult(),A=C?C.prevInResult():null;for(;;){if(!C)return null;if(!A)return C.ringOut;if(A.ringOut!==C.ringOut)return A.ringOut.enclosingRing()!==C.ringOut?C.ringOut:C.ringOut.enclosingRing();C=A.prevInResult(),A=C?C.prevInResult():null}}}class rr{constructor(S){this.exteriorRing=S,S.poly=this,this.interiorRings=[]}addInterior(S){this.interiorRings.push(S),S.poly=this}getGeom(){let S=[this.exteriorRing.getGeom()];if(S[0]===null)return null;for(let C=0,A=this.interiorRings.length;C<A;C++){let O=this.interiorRings[C].getGeom();O!==null&&S.push(O)}return S}}class Hr{constructor(S){this.rings=S,this.polys=this._composePolys(S)}getGeom(){let S=[];for(let C=0,A=this.polys.length;C<A;C++){let O=this.polys[C].getGeom();O!==null&&S.push(O)}return S}_composePolys(S){let C=[];for(let A=0,O=S.length;A<O;A++){let F=S[A];if(!F.poly)if(F.isExteriorRing())C.push(new rr(F));else{let Y=F.enclosingRing();Y.poly||C.push(new rr(Y)),Y.poly.addInterior(F)}}return C}}class _n{constructor(S){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve.compare;this.queue=S,this.tree=new l(C),this.segments=[]}process(S){let C=S.segment,A=[];if(S.consumedBy)return S.isLeft?this.queue.remove(S.otherSE):this.tree.remove(C),A;let O=S.isLeft?this.tree.add(C):this.tree.find(C);if(!O)throw new Error("Unable to find segment #".concat(C.id," ")+"[".concat(C.leftSE.point.x,", ").concat(C.leftSE.point.y,"] -> ")+"[".concat(C.rightSE.point.x,", ").concat(C.rightSE.point.y,"] ")+"in SweepLine tree.");let F=O,Y=O,ee,de;for(;ee===void 0;)F=this.tree.prev(F),F===null?ee=null:F.key.consumedBy===void 0&&(ee=F.key);for(;de===void 0;)Y=this.tree.next(Y),Y===null?de=null:Y.key.consumedBy===void 0&&(de=Y.key);if(S.isLeft){let W=null;if(ee){let J=ee.getIntersection(C);if(J!==null&&(C.isAnEndpoint(J)||(W=J),!ee.isAnEndpoint(J))){let fe=this._splitSafely(ee,J);for(let Te=0,Be=fe.length;Te<Be;Te++)A.push(fe[Te])}}let ie=null;if(de){let J=de.getIntersection(C);if(J!==null&&(C.isAnEndpoint(J)||(ie=J),!de.isAnEndpoint(J))){let fe=this._splitSafely(de,J);for(let Te=0,Be=fe.length;Te<Be;Te++)A.push(fe[Te])}}if(W!==null||ie!==null){let J=null;W===null?J=ie:ie===null?J=W:J=De.comparePoints(W,ie)<=0?W:ie,this.queue.remove(C.rightSE),A.push(C.rightSE);let fe=C.split(J);for(let Te=0,Be=fe.length;Te<Be;Te++)A.push(fe[Te])}A.length>0?(this.tree.remove(C),A.push(S)):(this.segments.push(C),C.prev=ee)}else{if(ee&&de){let W=ee.getIntersection(de);if(W!==null){if(!ee.isAnEndpoint(W)){let ie=this._splitSafely(ee,W);for(let J=0,fe=ie.length;J<fe;J++)A.push(ie[J])}if(!de.isAnEndpoint(W)){let ie=this._splitSafely(de,W);for(let J=0,fe=ie.length;J<fe;J++)A.push(ie[J])}}}this.tree.remove(C)}return A}_splitSafely(S,C){this.tree.remove(S);let A=S.rightSE;this.queue.remove(A);let O=S.split(C);return O.push(A),S.consumedBy===void 0&&this.tree.add(S),O}}let On=typeof y<"u"&&y.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Fn=typeof y<"u"&&y.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class vr{run(S,C,A){sr.type=S,X.reset();let O=[new zt(C,!0)];for(let J=0,fe=A.length;J<fe;J++)O.push(new zt(A[J],!1));if(sr.numMultiPolys=O.length,sr.type==="difference"){let J=O[0],fe=1;for(;fe<O.length;)v(O[fe].bbox,J.bbox)!==null?fe++:O.splice(fe,1)}if(sr.type==="intersection")for(let J=0,fe=O.length;J<fe;J++){let Te=O[J];for(let Be=J+1,Ve=O.length;Be<Ve;Be++)if(v(Te.bbox,O[Be].bbox)===null)return[]}let F=new l(De.compare);for(let J=0,fe=O.length;J<fe;J++){let Te=O[J].getSweepEvents();for(let Be=0,Ve=Te.length;Be<Ve;Be++)if(F.insert(Te[Be]),F.size>On)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let Y=new _n(F),ee=F.size,de=F.pop();for(;de;){let J=de.key;if(F.size===ee){let Te=J.segment;throw new Error("Unable to pop() ".concat(J.isLeft?"left":"right"," SweepEvent ")+"[".concat(J.point.x,", ").concat(J.point.y,"] from segment #").concat(Te.id," ")+"[".concat(Te.leftSE.point.x,", ").concat(Te.leftSE.point.y,"] -> ")+"[".concat(Te.rightSE.point.x,", ").concat(Te.rightSE.point.y,"] from queue."))}if(F.size>On)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(Y.segments.length>Fn)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let fe=Y.process(J);for(let Te=0,Be=fe.length;Te<Be;Te++){let Ve=fe[Te];Ve.consumedBy===void 0&&F.insert(Ve)}ee=F.size,de=F.pop()}X.reset();let W=Bt.factory(Y.segments);return new Hr(W).getGeom()}}let sr=new vr;var Dr={union:function(G){for(var S=arguments.length,C=new Array(S>1?S-1:0),A=1;A<S;A++)C[A-1]=arguments[A];return sr.run("union",G,C)},intersection:function(G){for(var S=arguments.length,C=new Array(S>1?S-1:0),A=1;A<S;A++)C[A-1]=arguments[A];return sr.run("intersection",G,C)},xor:function(G){for(var S=arguments.length,C=new Array(S>1?S-1:0),A=1;A<S;A++)C[A-1]=arguments[A];return sr.run("xor",G,C)},difference:function(G){for(var S=arguments.length,C=new Array(S>1?S-1:0),A=1;A<S;A++)C[A-1]=arguments[A];return sr.run("difference",G,C)}};return Dr})});var dI=Ot((l7e,Tb)=>{p();(function(){"use strict";function e(a,u){var l=a.x-u.x,c=a.y-u.y;return l*l+c*c}function r(a,u,l){var c=u.x,d=u.y,f=l.x-c,h=l.y-d;if(f!==0||h!==0){var g=((a.x-c)*f+(a.y-d)*h)/(f*f+h*h);g>1?(c=l.x,d=l.y):g>0&&(c+=f*g,d+=h*g)}return f=a.x-c,h=a.y-d,f*f+h*h}function t(a,u){for(var l=a[0],c=[l],d,f=1,h=a.length;f<h;f++)d=a[f],e(d,l)>u&&(c.push(d),l=d);return l!==d&&c.push(d),c}function n(a,u,l,c,d){for(var f=c,h,g=u+1;g<l;g++){var b=r(a[g],a[u],a[l]);b>f&&(h=g,f=b)}f>c&&(h-u>1&&n(a,u,h,c,d),d.push(a[h]),l-h>1&&n(a,h,l,c,d))}function o(a,u){var l=a.length-1,c=[a[0]];return n(a,0,l,u,c),c.push(a[l]),c}function i(a,u,l){if(a.length<=2)return a;var c=u!==void 0?u*u:1;return a=l?a:t(a,c),a=o(a,c),a}typeof define=="function"&&define.amd?define(function(){return i}):typeof Tb<"u"?(Tb.exports=i,Tb.exports.default=i):typeof self<"u"?self.simplify=i:window.simplify=i})()});var Na=Ot(vi=>{"use strict";p();vi.__esModule=!0;vi.extend=r8;vi.indexOf=HY;vi.escapeExpression=ZY;vi.isEmpty=WY;vi.createFrame=XY;vi.blockParams=qY;vi.appendContextPath=JY;var GY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},zY=/[&<>"'`=]/g,VY=/[&<>"'`=]/;function $Y(e){return GY[e]}function r8(e){for(var r=1;r<arguments.length;r++)for(var t in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],t)&&(e[t]=arguments[r][t]);return e}var jS=Object.prototype.toString;vi.toString=jS;var NS=function(r){return typeof r=="function"};NS(/x/)&&(vi.isFunction=NS=function(e){return typeof e=="function"&&jS.call(e)==="[object Function]"});vi.isFunction=NS;var n8=Array.isArray||function(e){return e&&typeof e=="object"?jS.call(e)==="[object Array]":!1};vi.isArray=n8;function HY(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function ZY(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return VY.test(e)?e.replace(zY,$Y):e}function WY(e){return!e&&e!==0?!0:!!(n8(e)&&e.length===0)}function XY(e){var r=r8({},e);return r._parent=e,r}function qY(e,r){return e.path=r,e}function JY(e,r){return(e?e+".":"")+r}});var Xl=Ot((Lv,o8)=>{"use strict";p();Lv.__esModule=!0;var US=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function GS(e,r){var t=r&&r.loc,n=void 0,o=void 0,i=void 0,a=void 0;t&&(n=t.start.line,o=t.end.line,i=t.start.column,a=t.end.column,e+=" - "+n+":"+i);for(var u=Error.prototype.constructor.call(this,e),l=0;l<US.length;l++)this[US[l]]=u[US[l]];Error.captureStackTrace&&Error.captureStackTrace(this,GS);try{t&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch(c){}}GS.prototype=new Error;Lv.default=GS;o8.exports=Lv.default});var a8=Ot((Rv,i8)=>{"use strict";p();Rv.__esModule=!0;var zS=Na();Rv.default=function(e){e.registerHelper("blockHelperMissing",function(r,t){var n=t.inverse,o=t.fn;if(r===!0)return o(this);if(r===!1||r==null)return n(this);if(zS.isArray(r))return r.length>0?(t.ids&&(t.ids=[t.name]),e.helpers.each(r,t)):n(this);if(t.data&&t.ids){var i=zS.createFrame(t.data);i.contextPath=zS.appendContextPath(t.data.contextPath,t.name),t={data:i}}return o(r,t)})};i8.exports=Rv.default});var u8=Ot((Nv,s8)=>{"use strict";p();Nv.__esModule=!0;function YY(e){return e&&e.__esModule?e:{default:e}}var Ig=Na(),KY=Xl(),QY=YY(KY);Nv.default=function(e){e.registerHelper("each",function(r,t){if(!t)throw new QY.default("Must pass iterator to #each");var n=t.fn,o=t.inverse,i=0,a="",u=void 0,l=void 0;t.data&&t.ids&&(l=Ig.appendContextPath(t.data.contextPath,t.ids[0])+"."),Ig.isFunction(r)&&(r=r.call(this)),t.data&&(u=Ig.createFrame(t.data));function c(b,I,v){u&&(u.key=b,u.index=I,u.first=I===0,u.last=!!v,l&&(u.contextPath=l+b)),a=a+n(r[b],{data:u,blockParams:Ig.blockParams([r[b],b],[l+b,null])})}if(r&&typeof r=="object")if(Ig.isArray(r))for(var d=r.length;i<d;i++)i in r&&c(i,i,i===r.length-1);else if(typeof Symbol=="function"&&r[Symbol.iterator]){for(var f=[],h=r[Symbol.iterator](),g=h.next();!g.done;g=h.next())f.push(g.value);r=f;for(var d=r.length;i<d;i++)c(i,i,i===r.length-1)}else(function(){var b=void 0;Object.keys(r).forEach(function(I){b!==void 0&&c(b,i-1),b=I,i++}),b!==void 0&&c(b,i-1,!0)})();return i===0&&(a=o(this)),a})};s8.exports=Nv.default});var c8=Ot((jv,l8)=>{"use strict";p();jv.__esModule=!0;function eK(e){return e&&e.__esModule?e:{default:e}}var tK=Xl(),rK=eK(tK);jv.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new rK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};l8.exports=jv.default});var m8=Ot((Uv,f8)=>{"use strict";p();Uv.__esModule=!0;function nK(e){return e&&e.__esModule?e:{default:e}}var d8=Na(),oK=Xl(),p8=nK(oK);Uv.default=function(e){e.registerHelper("if",function(r,t){if(arguments.length!=2)throw new p8.default("#if requires exactly one argument");return d8.isFunction(r)&&(r=r.call(this)),!t.hash.includeZero&&!r||d8.isEmpty(r)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(r,t){if(arguments.length!=2)throw new p8.default("#unless requires exactly one argument");return e.helpers.if.call(this,r,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};f8.exports=Uv.default});var g8=Ot((Gv,h8)=>{"use strict";p();Gv.__esModule=!0;Gv.default=function(e){e.registerHelper("log",function(){for(var r=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)r.push(arguments[n]);var o=1;t.hash.level!=null?o=t.hash.level:t.data&&t.data.level!=null&&(o=t.data.level),r[0]=o,e.log.apply(e,r)})};h8.exports=Gv.default});var b8=Ot((zv,y8)=>{"use strict";p();zv.__esModule=!0;zv.default=function(e){e.registerHelper("lookup",function(r,t,n){return r&&n.lookupProperty(r,t)})};y8.exports=zv.default});var x8=Ot((Vv,v8)=>{"use strict";p();Vv.__esModule=!0;function iK(e){return e&&e.__esModule?e:{default:e}}var Sg=Na(),aK=Xl(),sK=iK(aK);Vv.default=function(e){e.registerHelper("with",function(r,t){if(arguments.length!=2)throw new sK.default("#with requires exactly one argument");Sg.isFunction(r)&&(r=r.call(this));var n=t.fn;if(Sg.isEmpty(r))return t.inverse(this);var o=t.data;return t.data&&t.ids&&(o=Sg.createFrame(t.data),o.contextPath=Sg.appendContextPath(t.data.contextPath,t.ids[0])),n(r,{data:o,blockParams:Sg.blockParams([r],[o&&o.contextPath])})})};v8.exports=Vv.default});var VS=Ot($v=>{"use strict";p();$v.__esModule=!0;$v.registerDefaultHelpers=IK;$v.moveHelperToHooks=SK;function Dd(e){return e&&e.__esModule?e:{default:e}}var uK=a8(),lK=Dd(uK),cK=u8(),dK=Dd(cK),pK=c8(),fK=Dd(pK),mK=m8(),hK=Dd(mK),gK=g8(),yK=Dd(gK),bK=b8(),vK=Dd(bK),xK=x8(),EK=Dd(xK);function IK(e){lK.default(e),dK.default(e),fK.default(e),hK.default(e),yK.default(e),vK.default(e),EK.default(e)}function SK(e,r,t){e.helpers[r]&&(e.hooks[r]=e.helpers[r],t||delete e.helpers[r])}});var I8=Ot((Hv,E8)=>{"use strict";p();Hv.__esModule=!0;var CK=Na();Hv.default=function(e){e.registerDecorator("inline",function(r,t,n,o){var i=r;return t.partials||(t.partials={},i=function(a,u){var l=n.partials;n.partials=CK.extend({},l,t.partials);var c=r(a,u);return n.partials=l,c}),t.partials[o.args[0]]=o.fn,i})};E8.exports=Hv.default});var S8=Ot($S=>{"use strict";p();$S.__esModule=!0;$S.registerDefaultDecorators=MK;function DK(e){return e&&e.__esModule?e:{default:e}}var TK=I8(),wK=DK(TK);function MK(e){wK.default(e)}});var HS=Ot((Zv,C8)=>{"use strict";p();Zv.__esModule=!0;var AK=Na(),mm={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(r){if(typeof r=="string"){var t=AK.indexOf(mm.methodMap,r.toLowerCase());t>=0?r=t:r=parseInt(r,10)}return r},log:function(r){if(r=mm.lookupLevel(r),typeof console<"u"&&mm.lookupLevel(mm.level)<=r){var t=mm.methodMap[r];console[t]||(t="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[t].apply(console,o)}}};Zv.default=mm;C8.exports=Zv.default});var D8=Ot(ZS=>{"use strict";p();ZS.__esModule=!0;ZS.createNewLookupObject=_K;var PK=Na();function _K(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return PK.extend.apply(void 0,[Object.create(null)].concat(r))}});var WS=Ot(Cg=>{"use strict";p();Cg.__esModule=!0;Cg.createProtoAccessControl=BK;Cg.resultIsAllowed=LK;Cg.resetLoggedProperties=NK;function OK(e){return e&&e.__esModule?e:{default:e}}var T8=D8(),FK=HS(),kK=OK(FK),Wv=Object.create(null);function BK(e){var r=Object.create(null);r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1;var t=Object.create(null);return t.__proto__=!1,{properties:{whitelist:T8.createNewLookupObject(t,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:T8.createNewLookupObject(r,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function LK(e,r,t){return w8(typeof e=="function"?r.methods:r.properties,t)}function w8(e,r){return e.whitelist[r]!==void 0?e.whitelist[r]===!0:e.defaultValue!==void 0?e.defaultValue:(RK(r),!1)}function RK(e){Wv[e]!==!0&&(Wv[e]=!0,kK.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function NK(){Object.keys(Wv).forEach(function(e){delete Wv[e]})}});var YS=Ot(ks=>{"use strict";p();ks.__esModule=!0;ks.HandlebarsEnvironment=JS;function M8(e){return e&&e.__esModule?e:{default:e}}var Td=Na(),jK=Xl(),XS=M8(jK),UK=VS(),GK=S8(),zK=HS(),Xv=M8(zK),VK=WS(),$K="4.7.8";ks.VERSION=$K;var HK=8;ks.COMPILER_REVISION=HK;var ZK=7;ks.LAST_COMPATIBLE_COMPILER_REVISION=ZK;var WK={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};ks.REVISION_CHANGES=WK;var qS="[object Object]";function JS(e,r,t){this.helpers=e||{},this.partials=r||{},this.decorators=t||{},UK.registerDefaultHelpers(this),GK.registerDefaultDecorators(this)}JS.prototype={constructor:JS,logger:Xv.default,log:Xv.default.log,registerHelper:function(r,t){if(Td.toString.call(r)===qS){if(t)throw new XS.default("Arg not supported with multiple helpers");Td.extend(this.helpers,r)}else this.helpers[r]=t},unregisterHelper:function(r){delete this.helpers[r]},registerPartial:function(r,t){if(Td.toString.call(r)===qS)Td.extend(this.partials,r);else{if(typeof t>"u")throw new XS.default('Attempting to register a partial called "'+r+'" as undefined');this.partials[r]=t}},unregisterPartial:function(r){delete this.partials[r]},registerDecorator:function(r,t){if(Td.toString.call(r)===qS){if(t)throw new XS.default("Arg not supported with multiple decorators");Td.extend(this.decorators,r)}else this.decorators[r]=t},unregisterDecorator:function(r){delete this.decorators[r]},resetLoggedPropertyAccesses:function(){VK.resetLoggedProperties()}};var XK=Xv.default.log;ks.log=XK;ks.createFrame=Td.createFrame;ks.logger=Xv.default});var P8=Ot((qv,A8)=>{"use strict";p();qv.__esModule=!0;function KS(e){this.string=e}KS.prototype.toString=KS.prototype.toHTML=function(){return""+this.string};qv.default=KS;A8.exports=qv.default});var _8=Ot(QS=>{"use strict";p();QS.__esModule=!0;QS.wrapHelper=qK;function qK(e,r){if(typeof e!="function")return e;var t=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=r(o),e.apply(this,arguments)};return t}});var L8=Ot(ql=>{"use strict";p();ql.__esModule=!0;ql.checkRevision=tQ;ql.template=rQ;ql.wrapProgram=Jv;ql.resolvePartial=nQ;ql.invokePartial=oQ;ql.noop=k8;function JK(e){return e&&e.__esModule?e:{default:e}}function YK(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}var KK=Na(),$u=YK(KK),QK=Xl(),Hu=JK(QK),Zu=YS(),O8=VS(),eQ=_8(),F8=WS();function tQ(e){var r=e&&e[0]||1,t=Zu.COMPILER_REVISION;if(!(r>=Zu.LAST_COMPATIBLE_COMPILER_REVISION&&r<=Zu.COMPILER_REVISION))if(r<Zu.LAST_COMPATIBLE_COMPILER_REVISION){var n=Zu.REVISION_CHANGES[t],o=Zu.REVISION_CHANGES[r];throw new Hu.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new Hu.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function rQ(e,r){if(!r)throw new Hu.default("No environment passed to template");if(!e||!e.main)throw new Hu.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,r.VM.checkRevision(e.compiler);var t=e.compiler&&e.compiler[0]===7;function n(a,u,l){l.hash&&(u=$u.extend({},u,l.hash),l.ids&&(l.ids[0]=!0)),a=r.VM.resolvePartial.call(this,a,u,l);var c=$u.extend({},l,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),d=r.VM.invokePartial.call(this,a,u,c);if(d==null&&r.compile&&(l.partials[l.name]=r.compile(a,e.compilerOptions,r),d=l.partials[l.name](u,c)),d!=null){if(l.indent){for(var f=d.split("\n"),h=0,g=f.length;h<g&&!(!f[h]&&h+1===g);h++)f[h]=l.indent+f[h];d=f.join("\n")}return d}else throw new Hu.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(u,l,c){if(!u||!(l in u))throw new Hu.default('"'+l+'" not defined in '+u,{loc:c});return o.lookupProperty(u,l)},lookupProperty:function(u,l){var c=u[l];if(c==null||Object.prototype.hasOwnProperty.call(u,l)||F8.resultIsAllowed(c,o.protoAccessControl,l))return c},lookup:function(u,l){for(var c=u.length,d=0;d<c;d++){var f=u[d]&&o.lookupProperty(u[d],l);if(f!=null)return u[d][l]}},lambda:function(u,l){return typeof u=="function"?u.call(l):u},escapeExpression:$u.escapeExpression,invokePartial:n,fn:function(u){var l=e[u];return l.decorator=e[u+"_d"],l},programs:[],program:function(u,l,c,d,f){var h=this.programs[u],g=this.fn(u);return l||f||d||c?h=Jv(this,u,g,l,c,d,f):h||(h=this.programs[u]=Jv(this,u,g)),h},data:function(u,l){for(;u&&l--;)u=u._parent;return u},mergeIfNeeded:function(u,l){var c=u||l;return u&&l&&u!==l&&(c=$u.extend({},l,u)),c},nullContext:Object.seal({}),noop:r.VM.noop,compilerInfo:e.compiler};function i(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=u.data;i._setup(u),!u.partial&&e.useData&&(l=iQ(a,l));var c=void 0,d=e.useBlockParams?[]:void 0;e.useDepths&&(u.depths?c=a!=u.depths[0]?[a].concat(u.depths):u.depths:c=[a]);function f(h){return""+e.main(o,h,o.helpers,o.partials,l,d,c)}return f=B8(e.main,f,o,u.depths||[],l,d),f(a,u)}return i.isTop=!0,i._setup=function(a){if(a.partial)o.protoAccessControl=a.protoAccessControl,o.helpers=a.helpers,o.partials=a.partials,o.decorators=a.decorators,o.hooks=a.hooks;else{var u=$u.extend({},r.helpers,a.helpers);aQ(u,o),o.helpers=u,e.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,r.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=$u.extend({},r.decorators,a.decorators)),o.hooks={},o.protoAccessControl=F8.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||t;O8.moveHelperToHooks(o,"helperMissing",l),O8.moveHelperToHooks(o,"blockHelperMissing",l)}},i._child=function(a,u,l,c){if(e.useBlockParams&&!l)throw new Hu.default("must pass block params");if(e.useDepths&&!c)throw new Hu.default("must pass parent depths");return Jv(o,a,e[a],u,0,l,c)},i}function Jv(e,r,t,n,o,i,a){function u(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&l!=a[0]&&!(l===e.nullContext&&a[0]===null)&&(d=[l].concat(a)),t(e,l,e.helpers,e.partials,c.data||n,i&&[c.blockParams].concat(i),d)}return u=B8(t,u,e,a,n,i),u.program=r,u.depth=a?a.length:0,u.blockParams=o||0,u}function nQ(e,r,t){return e?!e.call&&!t.name&&(t.name=e,e=t.partials[e]):t.name==="@partial-block"?e=t.data["partial-block"]:e=t.partials[t.name],e}function oQ(e,r,t){var n=t.data&&t.data["partial-block"];t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var o=void 0;if(t.fn&&t.fn!==k8&&function(){t.data=Zu.createFrame(t.data);var i=t.fn;o=t.data["partial-block"]=function(u){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Zu.createFrame(l.data),l.data["partial-block"]=n,i(u,l)},i.partials&&(t.partials=$u.extend({},t.partials,i.partials))}(),e===void 0&&o&&(e=o),e===void 0)throw new Hu.default("The partial "+t.name+" could not be found");if(e instanceof Function)return e(r,t)}function k8(){return""}function iQ(e,r){return(!r||!("root"in r))&&(r=r?Zu.createFrame(r):{},r.root=e),r}function B8(e,r,t,n,o,i){if(e.decorator){var a={};r=e.decorator(r,a,t,n&&n[0],o,i,n),$u.extend(r,a)}return r}function aQ(e,r){Object.keys(e).forEach(function(t){var n=e[t];e[t]=sQ(n,r)})}function sQ(e,r){var t=r.lookupProperty;return eQ.wrapHelper(e,function(n){return $u.extend({lookupProperty:t},n)})}});var N8=Ot((Yv,R8)=>{"use strict";p();Yv.__esModule=!0;Yv.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var r=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=r),e}};R8.exports=Yv.default});var V8=Ot((Kv,z8)=>{"use strict";p();Kv.__esModule=!0;function t6(e){return e&&e.__esModule?e:{default:e}}function r6(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}var uQ=YS(),j8=r6(uQ),lQ=P8(),cQ=t6(lQ),dQ=Xl(),pQ=t6(dQ),fQ=Na(),e6=r6(fQ),mQ=L8(),U8=r6(mQ),hQ=N8(),gQ=t6(hQ);function G8(){var e=new j8.HandlebarsEnvironment;return e6.extend(e,j8),e.SafeString=cQ.default,e.Exception=pQ.default,e.Utils=e6,e.escapeExpression=e6.escapeExpression,e.VM=U8,e.template=function(r){return U8.template(r,e)},e}var Dg=G8();Dg.create=G8;gQ.default(Dg);Dg.default=Dg;Kv.default=Dg;z8.exports=Kv.default});var H8=Ot((ZZe,$8)=>{p();$8.exports=V8().default});p();p();p();p();p();p();var Zd=e=>e!=null;var RB=function(){let r=globalThis.fetch;return{fetch(...t){if(!Zd(r))throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return r==null?void 0:r(...t)},setFetch(t){r=t}}}(),cD=RB.fetch;var hD=["websdk","web","webv2","kiosk","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke","reactsdk","minimap"],dD=hD[0],gD="https://api-gateway.mappedin.com/track-analytics/a/",yD="deny-watchposition",bD="load-mapview",vD="load-mapdata",xD="change-language",ED="query-directions";var Qa,Ci,Hs,Bx,dy,Wd=class{constructor(){M(this,Hs);M(this,Qa,Object.freeze({}));M(this,Ci);m(this,"oneTimeEventsSent",new Set);m(this,"sendGetDirectionsEvent",el((r,t,n)=>{let o={start:r,end:t,type:"location_to_location"};return n!==void 0&&(o.accessible=n),this.sendAnalyticEvent(ED,o)},2500));k(this,Ci,he(this,Hs,dy).call(this,s(this,Qa)))}init(r){this.reset(),this.updateStateWithOptions(r)}reset(){k(this,Qa,{}),k(this,Ci,he(this,Hs,dy).call(this,{})),this.oneTimeEventsSent.clear()}updateStateWithOptions(r){return k(this,Qa,Object.freeze(Object.assign({},s(this,Qa),r))),k(this,Ci,he(this,Hs,dy).call(this,r)),he(this,Hs,Bx).call(this,s(this,Ci)),s(this,Ci)}updateState(r){let t=_({},r);t.mapId&&(t.analyticsBaseUrl=kx(ne(_({},s(this,Ci)),{mapId:t.mapId}))),t.context&&(t.context=mD(t.context)),t.baseUri&&(t.analyticsBaseUrl=kx({baseUri:t.baseUri,mapId:s(this,Ci).mapId})),Object.assign(s(this,Ci),t),this.handleStateUpdate(r),he(this,Hs,Bx).call(this,t)}handleStateUpdate(r){var t;(t=r.userPosition)!=null&&t.floorLevel?this.sendBlueDotEvents("found-floor"):r.userPosition&&this.sendBlueDotEvents("found-position")}get authReady(){let{key:r,secret:t,accessToken:n}=this.getState();return!!(r&&t)||!!n}getState(){return s(this,Ci)}getContext(){return this.getState().context||s(this,Qa).context||dD}getSessionId(){return this.getState().sessionId||s(this,Qa).sessionId||fD()}getDeviceId(){return this.getState().deviceId||s(this,Qa).deviceId||pD()}sendAnalyticEvent(r,t={}){let n=this.getState(),o=NB(n.analyticsBaseUrl,r),i={"mi-context":this.getContext(),"mi-session":this.getSessionId(),"mi-device":this.getDeviceId()};if(n.logEvents&&K.log("Analytics.track",o,i),!n.sendEvents)return Promise.resolve();if(!this.authReady)return K.warn("Auth needs to be ready to send analytics.");let a=ne(_({},t),{g:n.geolocationMode,sdk_version:n.version});return n.userPosition&&Object.assign(a,n.userPosition),i["Content-Type"]="application/json",n.accessToken?i.Authorization="Bearer ".concat(n.accessToken):n.noAuth||n.secret&&n.key&&(i["x-mappedin-key"]=btoa(n.key),i["x-mappedin-secret"]=btoa(n.secret)),cD(o,{method:"POST",mode:"cors",headers:i,body:JSON.stringify(a)})}capture(r,t){if(UB.includes(r))return K.warn("".concat(r," event is sent internally.")),Promise.resolve();let n=jB.includes(r)?r.slice(1):r;return this.sendAnalyticEvent(n,t)}sendGetMapDataEvent(r){return this.sendAnalyticEvent(vD,r)}sendChangeLanguageEvent(r){return this.sendAnalyticEvent(xD,r)}sendWatchPositionDenied(){return this.sendAnalyticEvent(yD)}sendMapViewLoadedEvent({firstRenderDuration:r,dimension:t,collisionWorkerDisabled:n,outdoorsWorkerDisabled:o}){return this.sendAnalyticEvent(bD,{type:"3d",firstRenderDuration:r,width:t.width,height:t.height,devicePixelRatio:globalThis.devicePixelRatio||1,collisionWorkerDisabled:n,outdoorsWorkerDisabled:o})}sendBlueDotEvents(r){if(!((r==="found-floor"||r==="found-position")&&this.oneTimeEventsSent.has(r)))return this.oneTimeEventsSent.add(r),this.sendAnalyticEvent(r)}};Qa=new WeakMap,Ci=new WeakMap,Hs=new WeakSet,Bx=function(r){r.sessionId&&Us.getInstance().saveSessionData("id",r.sessionId),r.deviceId&&Us.getInstance().saveLocalData("deviceId",r.deviceId)},dy=function(r){var n,o,i,a;let t=(n=r.baseUri)!=null?n:gD;return{baseUri:t,analyticsBaseUrl:kx(ne(_({},r),{baseUri:t})),version:r.version||((o=y==null?void 0:y.env)==null?void 0:o.npm_package_version)||"v6",deviceId:r.deviceId||pD(),accessToken:r.accessToken,mapId:r.mapId,sessionId:r.sessionId||fD(),platformString:r.platformString||"",context:mD(r.context)||dD,geolocationMode:!1,sendEvents:(i=r.sendEvents)!=null?i:!0,logEvents:(a=r.logEvents)!=null?a:!1,noAuth:r.noAuth||!1,key:r.key,secret:r.secret}};function kx({mapId:e,baseUri:r=gD}){return"".concat(r).concat(e,"/")}function pD(){return Us.getInstance().loadLocalData("deviceId")}function fD(){return Us.getInstance().loadSessionData("id")}function NB(e,r){return e+r}function mD(e){return hD.find(r=>r===e)}var jB=["$select-location","$select-category","$query-suggest","$query-search"],UB=[bD,vD,ED,yD,xD],vee=new Wd,Di,Bm=class{constructor(r){M(this,Di);m(this,"capture");m(this,"updateState");k(this,Di,r),this.capture=s(this,Di).capture.bind(s(this,Di)),this.updateState=s(this,Di).updateState.bind(s(this,Di))}getState(){let o=s(this,Di).getState(),{sessionId:r,deviceId:t}=o;return kn(o,["sessionId","deviceId"])}getContext(){return s(this,Di).getContext()}getSessionId(){return s(this,Di).getSessionId()}getDeviceId(){return s(this,Di).getDeviceId()}};Di=new WeakMap;p();p();var Rm,Nm,jm,Lm=class{constructor(r,t,{enabled:n=!1}={}){M(this,Rm);m(this,"searchInstance");M(this,Nm);M(this,jm);m(this,"enabled",!1);k(this,Rm,r),k(this,Nm,t),k(this,jm,()=>{var o;(o=this.searchInstance)==null||o.then(i=>i.populate())}),n&&this.enable()}async query(r,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return K.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(r,t)}catch(n){return K.error("Search.query failed due to",n),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(r,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return K.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(r,t)}catch(n){return K.error("Search.suggest failed due to",n),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-2SADLPUG.js").then(({InternalSearch:r})=>new r(s(this,Rm)))),s(this,Nm).on("language-change",s(this,jm)),await this.searchInstance)}};Rm=new WeakMap,Nm=new WeakMap,jm=new WeakMap;var ID=new WeakMap,ac,mr,Lx=class{constructor(r,{search:t}={}){M(this,ac);M(this,mr);m(this,"Analytics");m(this,"Search");m(this,"Query");m(this,"internal");m(this,"on",(r,t)=>{s(this,ac).on(r,t)});m(this,"off",(r,t)=>{s(this,ac).off(r,t)});m(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>s(this,mr).__LEGACY_GET_DIRECTIONS_SYNC(r,t,n));m(this,"getDirections",(r,t,n)=>s(this,mr).getDirections(r,t,n));m(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>s(this,mr).__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n));m(this,"getDirectionsMultiDestination",(r,t,n)=>s(this,mr).getDirectionsMultiDestination(r,t,n));k(this,ac,new Je),k(this,mr,r),ID.set(this,r),this.Analytics=new Bm(r.Analytics),this.Query=r.Query,this.internal=r,this.Search=new Lm(this,r,{enabled:t==null?void 0:t.enabled}),s(this,mr).on("language-change",n=>{s(this,ac).publish("language-change",n)})}getEnv(){return s(this,mr).getEnv()}getAccessToken(){var r;return(r=s(this,mr).tokenManager)==null?void 0:r.getAccessToken().token}get mapName(){return s(this,mr).mapName}get mapId(){var r;return(r=s(this,mr).getMapDataOptions)==null?void 0:r.mapId}get mapCenter(){return s(this,mr).mapCenter}get organizationId(){return s(this,mr).organizationId}get outdoorViewToken(){return s(this,mr).outdoorViewToken}getByType(r){return s(this,mr).getByType(r)}getById(r,t){return s(this,mr).getById(r,t)}getByExternalId(r,t){return s(this,mr).getByExternalId(r,t)}getGeoJSON(r){return r.geoJSON}async changeLanguage(r){return s(this,mr).changeLanguage(r)}get currentLanguage(){return s(this,mr).currentLanguage}get naturalBearing(){var r;return(r=s(this,mr).naturalBearing)!=null?r:0}getDistance(r,t){return s(this,mr).getDistance(r,t)}toBinaryBundle({downloadLanguagePacks:r=!0}={}){return s(this,mr).toBinaryBundle({downloadLanguagePacks:r})}toJSONBundle({downloadLanguagePacks:r=!0}={}){return s(this,mr).toJSONBundle({downloadLanguagePacks:r})}};ac=new WeakMap,mr=new WeakMap;var Um=Lx;function Gm(e){let r=ID.get(e);if(!r)throw new Error("MapDataInternal not found");return r}p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();var py={accessible:"accessible",outdoors:"outdoors",public:"public"};p();p();p();p();p();p();var gt={};qu(gt,{HasPropertyKey:()=>GB,IsArray:()=>Kn,IsAsyncIterator:()=>Rx,IsBigInt:()=>zm,IsBoolean:()=>nl,IsDate:()=>sc,IsFunction:()=>Nx,IsIterator:()=>jx,IsNull:()=>Ux,IsNumber:()=>oa,IsObject:()=>Kt,IsRegExp:()=>Vm,IsString:()=>ur,IsSymbol:()=>Gx,IsUint8Array:()=>Zs,IsUndefined:()=>Mr});p();function GB(e,r){return r in e}function Rx(e){return Kt(e)&&!Kn(e)&&!Zs(e)&&Symbol.asyncIterator in e}function Kn(e){return Array.isArray(e)}function zm(e){return typeof e=="bigint"}function nl(e){return typeof e=="boolean"}function sc(e){return e instanceof globalThis.Date}function Nx(e){return typeof e=="function"}function jx(e){return Kt(e)&&!Kn(e)&&!Zs(e)&&Symbol.iterator in e}function Ux(e){return e===null}function oa(e){return typeof e=="number"}function Kt(e){return typeof e=="object"&&e!==null}function Vm(e){return e instanceof globalThis.RegExp}function ur(e){return typeof e=="string"}function Gx(e){return typeof e=="symbol"}function Zs(e){return e instanceof globalThis.Uint8Array}function Mr(e){return e===void 0}function zB(e){return e.map(r=>fy(r))}function VB(e){return new Date(e.getTime())}function $B(e){return new Uint8Array(e)}function HB(e){return new RegExp(e.source,e.flags)}function ZB(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=fy(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=fy(e[t]);return r}function fy(e){return Kn(e)?zB(e):sc(e)?VB(e):Zs(e)?$B(e):Vm(e)?HB(e):Kt(e)?ZB(e):e}function hr(e){return fy(e)}function SD(e){return e.map(r=>$m(r))}function $m(e,r){return r===void 0?hr(e):hr(_(_({},r),e))}p();p();p();function my(e){return nt(e)&&Symbol.asyncIterator in e}function hy(e){return nt(e)&&Symbol.iterator in e}function zx(e){return nt(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function gy(e){return e instanceof Promise}function mo(e){return e instanceof Date&&Number.isFinite(e.getTime())}function CD(e){return e instanceof globalThis.Map}function DD(e){return e instanceof globalThis.Set}function Ti(e){return ArrayBuffer.isView(e)}function Xd(e){return e instanceof globalThis.Uint8Array}function qe(e,r){return r in e}function nt(e){return e!==null&&typeof e=="object"}function et(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}function Ar(e){return e===void 0}function Ws(e){return e===null}function es(e){return typeof e=="boolean"}function ze(e){return typeof e=="number"}function yy(e){return Number.isInteger(e)}function Bn(e){return typeof e=="bigint"}function yt(e){return typeof e=="string"}function ol(e){return typeof e=="function"}function Xs(e){return typeof e=="symbol"}function Ln(e){return Bn(e)||es(e)||Ws(e)||ze(e)||yt(e)||Xs(e)||Ar(e)}var Gt;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function r(a,u){return e.ExactOptionalPropertyTypes?u in a:a[u]!==void 0}e.IsExactOptionalProperty=r;function t(a){let u=nt(a);return e.AllowArrayObject?u:u&&!et(a)}e.IsObjectLike=t;function n(a){return t(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}e.IsRecordLike=n;function o(a){return e.AllowNaN?ze(a):Number.isFinite(a)}e.IsNumberLike=o;function i(a){let u=Ar(a);return e.AllowNullVoid?u||a===null:u}e.IsVoidLike=i})(Gt||(Gt={}));p();function WB(e){return globalThis.Object.freeze(e).map(r=>Hm(r))}function XB(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=Hm(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=Hm(e[t]);return globalThis.Object.freeze(r)}function Hm(e){return Kn(e)?WB(e):sc(e)?e:Zs(e)?e:Vm(e)?e:Kt(e)?XB(e):e}function ge(e,r){let t=r!==void 0?_(_({},r),e):e;switch(Gt.InstanceMode){case"freeze":return Hm(t);case"clone":return hr(t);default:return t}}p();var We=class extends Error{constructor(r){super(r)}};p();p();p();var gr=Symbol.for("TypeBox.Transform"),qs=Symbol.for("TypeBox.Readonly"),ho=Symbol.for("TypeBox.Optional"),wi=Symbol.for("TypeBox.Hint"),oe=Symbol.for("TypeBox.Kind");function TD(e){return Kt(e)&&e[qs]==="Readonly"}function ts(e){return Kt(e)&&e[ho]==="Optional"}function Vx(e){return Ct(e,"Any")}function Js(e){return Ct(e,"Array")}function Zm(e){return Ct(e,"AsyncIterator")}function $x(e){return Ct(e,"BigInt")}function Hx(e){return Ct(e,"Boolean")}function Wm(e){return Ct(e,"Constructor")}function qB(e){return Ct(e,"Date")}function Xm(e){return Ct(e,"Function")}function uc(e){return Ct(e,"Integer")}function zr(e){return Ct(e,"Intersect")}function qm(e){return Ct(e,"Iterator")}function Ct(e,r){return Kt(e)&&oe in e&&e[oe]===r}function Ys(e){return Ct(e,"Literal")}function ti(e){return Ct(e,"MappedKey")}function yr(e){return Ct(e,"MappedResult")}function il(e){return Ct(e,"Never")}function JB(e){return Ct(e,"Not")}function YB(e){return Ct(e,"Null")}function lc(e){return Ct(e,"Number")}function ln(e){return Ct(e,"Object")}function cc(e){return Ct(e,"Promise")}function Zx(e){return Ct(e,"Record")}function Wx(e){return Ct(e,"Ref")}function Xx(e){return Ct(e,"RegExp")}function Jm(e){return Ct(e,"String")}function KB(e){return Ct(e,"Symbol")}function ri(e){return Ct(e,"TemplateLiteral")}function QB(e){return Ct(e,"This")}function qd(e){return Kt(e)&&gr in e}function ia(e){return Ct(e,"Tuple")}function e9(e){return Ct(e,"Undefined")}function Ft(e){return Ct(e,"Union")}function t9(e){return Ct(e,"Uint8Array")}function r9(e){return Ct(e,"Unknown")}function n9(e){return Ct(e,"Unsafe")}function o9(e){return Ct(e,"Void")}function al(e){return Kt(e)&&oe in e&&ur(e[oe])}function aa(e){return Vx(e)||Js(e)||Hx(e)||$x(e)||Zm(e)||Wm(e)||qB(e)||Xm(e)||uc(e)||zr(e)||qm(e)||Ys(e)||ti(e)||yr(e)||il(e)||JB(e)||YB(e)||lc(e)||ln(e)||cc(e)||Zx(e)||Wx(e)||Xx(e)||Jm(e)||KB(e)||ri(e)||QB(e)||ia(e)||e9(e)||Ft(e)||t9(e)||r9(e)||n9(e)||o9(e)||al(e)}var U={};qu(U,{IsAny:()=>PD,IsArray:()=>_D,IsAsyncIterator:()=>OD,IsBigInt:()=>FD,IsBoolean:()=>kD,IsConstructor:()=>BD,IsDate:()=>LD,IsFunction:()=>RD,IsInteger:()=>ND,IsIntersect:()=>jD,IsIterator:()=>UD,IsKind:()=>cT,IsKindOf:()=>vt,IsLiteral:()=>Km,IsLiteralBoolean:()=>c9,IsLiteralNumber:()=>zD,IsLiteralString:()=>GD,IsLiteralValue:()=>VD,IsMappedKey:()=>$D,IsMappedResult:()=>HD,IsNever:()=>ZD,IsNot:()=>WD,IsNull:()=>XD,IsNumber:()=>qD,IsObject:()=>JD,IsOptional:()=>l9,IsPromise:()=>YD,IsProperties:()=>Kx,IsReadonly:()=>u9,IsRecord:()=>KD,IsRecursive:()=>d9,IsRef:()=>QD,IsRegExp:()=>eT,IsSchema:()=>bt,IsString:()=>tT,IsSymbol:()=>rT,IsTemplateLiteral:()=>nT,IsThis:()=>oT,IsTransform:()=>lr,IsTuple:()=>iT,IsUint8Array:()=>aT,IsUndefined:()=>Jd,IsUnion:()=>Qx,IsUnionLiteral:()=>p9,IsUnknown:()=>sT,IsUnsafe:()=>uT,IsVoid:()=>lT,TypeGuardUnknownTypeError:()=>qx});p();var qx=class extends We{},i9=["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 wD(e){try{return new RegExp(e),!0}catch(r){return!1}}function Jx(e){if(!ur(e))return!1;for(let r=0;r<e.length;r++){let t=e.charCodeAt(r);if(t>=7&&t<=13||t===27||t===127)return!1}return!0}function MD(e){return Yx(e)||bt(e)}function Ym(e){return Mr(e)||zm(e)}function ir(e){return Mr(e)||oa(e)}function Yx(e){return Mr(e)||nl(e)}function Vt(e){return Mr(e)||ur(e)}function a9(e){return Mr(e)||ur(e)&&Jx(e)&&wD(e)}function s9(e){return Mr(e)||ur(e)&&Jx(e)}function AD(e){return Mr(e)||bt(e)}function u9(e){return Kt(e)&&e[qs]==="Readonly"}function l9(e){return Kt(e)&&e[ho]==="Optional"}function PD(e){return vt(e,"Any")&&Vt(e.$id)}function _D(e){return vt(e,"Array")&&e.type==="array"&&Vt(e.$id)&&bt(e.items)&&ir(e.minItems)&&ir(e.maxItems)&&Yx(e.uniqueItems)&&AD(e.contains)&&ir(e.minContains)&&ir(e.maxContains)}function OD(e){return vt(e,"AsyncIterator")&&e.type==="AsyncIterator"&&Vt(e.$id)&&bt(e.items)}function FD(e){return vt(e,"BigInt")&&e.type==="bigint"&&Vt(e.$id)&&Ym(e.exclusiveMaximum)&&Ym(e.exclusiveMinimum)&&Ym(e.maximum)&&Ym(e.minimum)&&Ym(e.multipleOf)}function kD(e){return vt(e,"Boolean")&&e.type==="boolean"&&Vt(e.$id)}function BD(e){return vt(e,"Constructor")&&e.type==="Constructor"&&Vt(e.$id)&&Kn(e.parameters)&&e.parameters.every(r=>bt(r))&&bt(e.returns)}function LD(e){return vt(e,"Date")&&e.type==="Date"&&Vt(e.$id)&&ir(e.exclusiveMaximumTimestamp)&&ir(e.exclusiveMinimumTimestamp)&&ir(e.maximumTimestamp)&&ir(e.minimumTimestamp)&&ir(e.multipleOfTimestamp)}function RD(e){return vt(e,"Function")&&e.type==="Function"&&Vt(e.$id)&&Kn(e.parameters)&&e.parameters.every(r=>bt(r))&&bt(e.returns)}function ND(e){return vt(e,"Integer")&&e.type==="integer"&&Vt(e.$id)&&ir(e.exclusiveMaximum)&&ir(e.exclusiveMinimum)&&ir(e.maximum)&&ir(e.minimum)&&ir(e.multipleOf)}function Kx(e){return Kt(e)&&Object.entries(e).every(([r,t])=>Jx(r)&&bt(t))}function jD(e){return vt(e,"Intersect")&&!(ur(e.type)&&e.type!=="object")&&Kn(e.allOf)&&e.allOf.every(r=>bt(r)&&!lr(r))&&Vt(e.type)&&(Yx(e.unevaluatedProperties)||AD(e.unevaluatedProperties))&&Vt(e.$id)}function UD(e){return vt(e,"Iterator")&&e.type==="Iterator"&&Vt(e.$id)&&bt(e.items)}function vt(e,r){return Kt(e)&&oe in e&&e[oe]===r}function GD(e){return Km(e)&&ur(e.const)}function zD(e){return Km(e)&&oa(e.const)}function c9(e){return Km(e)&&nl(e.const)}function Km(e){return vt(e,"Literal")&&Vt(e.$id)&&VD(e.const)}function VD(e){return nl(e)||oa(e)||ur(e)}function $D(e){return vt(e,"MappedKey")&&Kn(e.keys)&&e.keys.every(r=>oa(r)||ur(r))}function HD(e){return vt(e,"MappedResult")&&Kx(e.properties)}function ZD(e){return vt(e,"Never")&&Kt(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function WD(e){return vt(e,"Not")&&bt(e.not)}function XD(e){return vt(e,"Null")&&e.type==="null"&&Vt(e.$id)}function qD(e){return vt(e,"Number")&&e.type==="number"&&Vt(e.$id)&&ir(e.exclusiveMaximum)&&ir(e.exclusiveMinimum)&&ir(e.maximum)&&ir(e.minimum)&&ir(e.multipleOf)}function JD(e){return vt(e,"Object")&&e.type==="object"&&Vt(e.$id)&&Kx(e.properties)&&MD(e.additionalProperties)&&ir(e.minProperties)&&ir(e.maxProperties)}function YD(e){return vt(e,"Promise")&&e.type==="Promise"&&Vt(e.$id)&&bt(e.item)}function KD(e){return vt(e,"Record")&&e.type==="object"&&Vt(e.$id)&&MD(e.additionalProperties)&&Kt(e.patternProperties)&&(r=>{let t=Object.getOwnPropertyNames(r.patternProperties);return t.length===1&&wD(t[0])&&Kt(r.patternProperties)&&bt(r.patternProperties[t[0]])})(e)}function d9(e){return Kt(e)&&wi in e&&e[wi]==="Recursive"}function QD(e){return vt(e,"Ref")&&Vt(e.$id)&&ur(e.$ref)}function eT(e){return vt(e,"RegExp")&&Vt(e.$id)&&ur(e.source)&&ur(e.flags)&&ir(e.maxLength)&&ir(e.minLength)}function tT(e){return vt(e,"String")&&e.type==="string"&&Vt(e.$id)&&ir(e.minLength)&&ir(e.maxLength)&&a9(e.pattern)&&s9(e.format)}function rT(e){return vt(e,"Symbol")&&e.type==="symbol"&&Vt(e.$id)}function nT(e){return vt(e,"TemplateLiteral")&&e.type==="string"&&ur(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function oT(e){return vt(e,"This")&&Vt(e.$id)&&ur(e.$ref)}function lr(e){return Kt(e)&&gr in e}function iT(e){return vt(e,"Tuple")&&e.type==="array"&&Vt(e.$id)&&oa(e.minItems)&&oa(e.maxItems)&&e.minItems===e.maxItems&&(Mr(e.items)&&Mr(e.additionalItems)&&e.minItems===0||Kn(e.items)&&e.items.every(r=>bt(r)))}function Jd(e){return vt(e,"Undefined")&&e.type==="undefined"&&Vt(e.$id)}function p9(e){return Qx(e)&&e.anyOf.every(r=>GD(r)||zD(r))}function Qx(e){return vt(e,"Union")&&Vt(e.$id)&&Kt(e)&&Kn(e.anyOf)&&e.anyOf.every(r=>bt(r))}function aT(e){return vt(e,"Uint8Array")&&e.type==="Uint8Array"&&Vt(e.$id)&&ir(e.minByteLength)&&ir(e.maxByteLength)}function sT(e){return vt(e,"Unknown")&&Vt(e.$id)}function uT(e){return vt(e,"Unsafe")}function lT(e){return vt(e,"Void")&&e.type==="void"&&Vt(e.$id)}function cT(e){return Kt(e)&&oe in e&&ur(e[oe])&&!i9.includes(e[oe])}function bt(e){return Kt(e)&&(PD(e)||_D(e)||kD(e)||FD(e)||OD(e)||BD(e)||LD(e)||RD(e)||ND(e)||jD(e)||UD(e)||Km(e)||$D(e)||HD(e)||ZD(e)||WD(e)||XD(e)||qD(e)||JD(e)||YD(e)||KD(e)||QD(e)||eT(e)||tT(e)||rT(e)||nT(e)||oT(e)||iT(e)||Jd(e)||Qx(e)||aT(e)||sT(e)||uT(e)||lT(e)||cT(e))}p();var e3="(true|false)",Qm="(0|[1-9][0-9]*)",t3="(.*)",f9="(?!.*)",tre="^".concat(e3,"$"),Ks="^".concat(Qm,"$"),Qs="^".concat(t3,"$"),dT="^".concat(f9,"$");p();var go={};qu(go,{Clear:()=>h9,Delete:()=>g9,Entries:()=>m9,Get:()=>v9,Has:()=>y9,Set:()=>b9});p();var Yd=new Map;function m9(){return new Map(Yd)}function h9(){return Yd.clear()}function g9(e){return Yd.delete(e)}function y9(e){return Yd.has(e)}function b9(e,r){Yd.set(e,r)}function v9(e){return Yd.get(e)}var cn={};qu(cn,{Clear:()=>E9,Delete:()=>I9,Entries:()=>x9,Get:()=>D9,Has:()=>S9,Set:()=>C9});p();var Kd=new Map;function x9(){return new Map(Kd)}function E9(){return Kd.clear()}function I9(e){return Kd.delete(e)}function S9(e){return Kd.has(e)}function C9(e,r){Kd.set(e,r)}function D9(e){return Kd.get(e)}p();function pT(e,r){return e.includes(r)}function fT(e){return[...new Set(e)]}function T9(e,r){return e.filter(t=>r.includes(t))}function w9(e,r){return e.reduce((t,n)=>T9(t,n),r)}function mT(e){return e.length===1?e[0]:e.length>1?w9(e.slice(1),e[0]):[]}function hT(e){let r=[];for(let t of e)r.push(...t);return r}p();function sl(e){return ge({[oe]:"Any"},e)}p();function by(e,r){return ge({[oe]:"Array",type:"array",items:e},r)}p();function vy(e,r){return ge({[oe]:"AsyncIterator",type:"AsyncIterator",items:e},r)}p();p();p();function M9(e,r){let o=e,{[r]:t}=o;return kn(o,[Ng(r)])}function Lr(e,r){return r.reduce((t,n)=>M9(t,n),e)}p();function $t(e){return ge({[oe]:"Never",not:{}},e)}p();p();function Dt(e){return ge({[oe]:"MappedResult",properties:e})}p();p();function xy(e,r,t){return ge({[oe]:"Constructor",type:"Constructor",parameters:e,returns:r},t)}p();function ul(e,r,t){return ge({[oe]:"Function",type:"Function",parameters:e,returns:r},t)}p();p();p();p();function eh(e,r){return ge({[oe]:"Union",anyOf:e},r)}function A9(e){return e.some(r=>ts(r))}function gT(e){return e.map(r=>ts(r)?P9(r):r)}function P9(e){return Lr(e,[ho])}function _9(e,r){return A9(e)?Ro(eh(gT(e),r)):eh(gT(e),r)}function rs(e,r){return e.length===0?$t(r):e.length===1?ge(e[0],r):_9(e,r)}p();function Ht(e,r){return e.length===0?$t(r):e.length===1?ge(e[0],r):eh(e,r)}p();p();p();var Ey=class extends We{};function O9(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function r3(e,r,t){return e[r]===t&&e.charCodeAt(r-1)!==92}function eu(e,r){return r3(e,r,"(")}function th(e,r){return r3(e,r,")")}function yT(e,r){return r3(e,r,"|")}function F9(e){if(!(eu(e,0)&&th(e,e.length-1)))return!1;let r=0;for(let t=0;t<e.length;t++)if(eu(e,t)&&(r+=1),th(e,t)&&(r-=1),r===0&&t!==e.length-1)return!1;return!0}function k9(e){return e.slice(1,e.length-1)}function B9(e){let r=0;for(let t=0;t<e.length;t++)if(eu(e,t)&&(r+=1),th(e,t)&&(r-=1),yT(e,t)&&r===0)return!0;return!1}function L9(e){for(let r=0;r<e.length;r++)if(eu(e,r))return!0;return!1}function R9(e){let[r,t]=[0,0],n=[];for(let i=0;i<e.length;i++)if(eu(e,i)&&(r+=1),th(e,i)&&(r-=1),yT(e,i)&&r===0){let a=e.slice(t,i);a.length>0&&n.push(Qd(a)),t=i+1}let o=e.slice(t);return o.length>0&&n.push(Qd(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}function N9(e){function r(o,i){if(!eu(o,i))throw new Ey("TemplateLiteralParser: Index must point to open parens");let a=0;for(let u=i;u<o.length;u++)if(eu(o,u)&&(a+=1),th(o,u)&&(a-=1),a===0)return[i,u];throw new Ey("TemplateLiteralParser: Unclosed group parens in expression")}function t(o,i){for(let a=i;a<o.length;a++)if(eu(o,a))return[i,a];return[i,o.length]}let n=[];for(let o=0;o<e.length;o++)if(eu(e,o)){let[i,a]=r(e,o),u=e.slice(i,a+1);n.push(Qd(u)),o=a}else{let[i,a]=t(e,o),u=e.slice(i,a);u.length>0&&n.push(Qd(u)),o=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}function Qd(e){return F9(e)?Qd(k9(e)):B9(e)?R9(e):L9(e)?N9(e):{type:"const",const:O9(e)}}function ep(e){return Qd(e.slice(1,e.length-1))}var n3=class extends We{};function j9(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]*"}function U9(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"}function G9(e){return e.type==="const"&&e.const===".*"}function dc(e){return j9(e)||G9(e)?!1:U9(e)?!0:e.type==="and"?e.expr.every(r=>dc(r)):e.type==="or"?e.expr.every(r=>dc(r)):e.type==="const"?!0:(()=>{throw new n3("Unknown expression type")})()}function Iy(e){let r=ep(e.pattern);return dc(r)}p();var o3=class extends We{};function*bT(e){if(e.length===1)return yield*be(e[0]);for(let r of e[0])for(let t of bT(e.slice(1)))yield"".concat(r).concat(t)}function*z9(e){return yield*be(bT(e.expr.map(r=>[...rh(r)])))}function*V9(e){for(let r of e.expr)yield*be(rh(r))}function*$9(e){return yield e.const}function*rh(e){return e.type==="and"?yield*be(z9(e)):e.type==="or"?yield*be(V9(e)):e.type==="const"?yield*be($9(e)):(()=>{throw new o3("Unknown expression")})()}function tp(e){let r=ep(e.pattern);return dc(r)?[...rh(r)]:[]}p();p();function Lt(e,r){return ge({[oe]:"Literal",const:e,type:typeof e},r)}p();function Sy(e){return ge({[oe]:"Boolean",type:"boolean"},e)}p();function rp(e){return ge({[oe]:"BigInt",type:"bigint"},e)}p();function ns(e){return ge({[oe]:"Number",type:"number"},e)}p();function Mi(e){return ge({[oe]:"String",type:"string"},e)}function*H9(e){let r=e.trim().replace(/"|'/g,"");return r==="boolean"?yield Sy():r==="number"?yield ns():r==="bigint"?yield rp():r==="string"?yield Mi():yield(()=>{let t=r.split("|").map(n=>Lt(n.trim()));return t.length===0?$t():t.length===1?t[0]:rs(t)})()}function*Z9(e){if(e[1]!=="{"){let r=Lt("$"),t=i3(e.slice(1));return yield*be([r,...t])}for(let r=2;r<e.length;r++)if(e[r]==="}"){let t=H9(e.slice(2,r)),n=i3(e.slice(r+1));return yield*be([...t,...n])}yield Lt(e)}function*i3(e){for(let r=0;r<e.length;r++)if(e[r]==="$"){let t=Lt(e.slice(0,r)),n=Z9(e.slice(r));return yield*be([t,...n])}yield Lt(e)}function vT(e){return[...i3(e)]}p();var a3=class extends We{};function W9(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xT(e,r){return ri(e)?e.pattern.slice(1,e.pattern.length-1):Ft(e)?"(".concat(e.anyOf.map(t=>xT(t,r)).join("|"),")"):lc(e)?"".concat(r).concat(Qm):uc(e)?"".concat(r).concat(Qm):$x(e)?"".concat(r).concat(Qm):Jm(e)?"".concat(r).concat(t3):Ys(e)?"".concat(r).concat(W9(e.const.toString())):Hx(e)?"".concat(r).concat(e3):(()=>{throw new a3("Unexpected Kind '".concat(e[oe],"'"))})()}function s3(e){return"^".concat(e.map(r=>xT(r,"")).join(""),"$")}p();function pc(e){let t=tp(e).map(n=>Lt(n));return rs(t)}p();function Cy(e,r){let t=ur(e)?s3(vT(e)):s3(e);return ge({[oe]:"TemplateLiteral",type:"string",pattern:t},r)}function X9(e){return tp(e).map(t=>t.toString())}function q9(e){let r=[];for(let t of e)r.push(...No(t));return r}function J9(e){return[e.toString()]}function No(e){return[...new Set(ri(e)?X9(e):Ft(e)?q9(e.anyOf):Ys(e)?J9(e.const):lc(e)?["[number]"]:uc(e)?["[number]"]:[])]}p();function Y9(e,r,t){let n={};for(let o of Object.getOwnPropertyNames(r))n[o]=np(e,No(r[o]),t);return n}function K9(e,r,t){return Y9(e,r.properties,t)}function ET(e,r,t){let n=K9(e,r,t);return Dt(n)}function ST(e,r){return e.map(t=>CT(t,r))}function Q9(e){return e.filter(r=>!il(r))}function eL(e,r){return Dy(Q9(ST(e,r)))}function tL(e){return e.some(r=>il(r))?[]:e}function rL(e,r){return rs(tL(ST(e,r)))}function nL(e,r){return r in e?e[r]:r==="[number]"?rs(e):$t()}function oL(e,r){return r==="[number]"?e:$t()}function iL(e,r){return r in e?e[r]:$t()}function CT(e,r){var t;return zr(e)?eL(e.allOf,r):Ft(e)?rL(e.anyOf,r):ia(e)?nL((t=e.items)!=null?t:[],r):Js(e)?oL(e.items,r):ln(e)?iL(e.properties,r):$t()}function nh(e,r){return r.map(t=>CT(e,t))}function IT(e,r){return rs(nh(e,r))}function np(e,r,t){return yr(r)?ET(e,r,t):ti(r)?DT(e,r,t):ge(aa(r)?IT(e,No(r)):IT(e,r),t)}function aL(e,r,t){return{[r]:np(e,[r],hr(t))}}function sL(e,r,t){return r.reduce((n,o)=>_(_({},n),aL(e,o,t)),{})}function uL(e,r,t){return sL(e,r.keys,t)}function DT(e,r,t){let n=uL(e,r,t);return Dt(n)}p();function Ty(e,r){return ge({[oe]:"Iterator",type:"Iterator",items:e},r)}p();function lL(e){let r=[];for(let t in e)ts(e[t])||r.push(t);return r}function cL(e,r){let t=lL(e),n=t.length>0?{[oe]:"Object",type:"object",properties:e,required:t}:{[oe]:"Object",type:"object",properties:e};return ge(n,r)}var Qt=cL;p();function wy(e,r){return ge({[oe]:"Promise",type:"Promise",item:e},r)}p();p();function dL(e){return ge(Lr(e,[qs]))}function pL(e){return ge(ne(_({},e),{[qs]:"Readonly"}))}function fL(e,r){return r===!1?dL(e):pL(e)}function Ai(e,r){let t=r!=null?r:!0;return yr(e)?TT(e,t):fL(e,t)}function mL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ai(e[n],r);return t}function hL(e,r){return mL(e.properties,r)}function TT(e,r){let t=hL(e,r);return Dt(t)}p();function os(e,r){return ge(e.length>0?{[oe]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[oe]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},r)}function wT(e,r){return e in r?Pi(e,r[e]):Dt(r)}function gL(e){return{[e]:Lt(e)}}function yL(e){let r={};for(let t of e)r[t]=Lt(t);return r}function bL(e,r){return pT(r,e)?gL(e):yL(r)}function vL(e,r){let t=bL(e,r);return wT(e,t)}function oh(e,r){return r.map(t=>Pi(e,t))}function xL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(r))t[n]=Pi(e,r[n]);return t}function Pi(e,r){var n;let t=_({},r);return ts(r)?Ro(Pi(e,Lr(r,[ho]))):TD(r)?Ai(Pi(e,Lr(r,[qs]))):yr(r)?wT(e,r.properties):ti(r)?vL(e,r.keys):Wm(r)?xy(oh(e,r.parameters),Pi(e,r.returns),t):Xm(r)?ul(oh(e,r.parameters),Pi(e,r.returns),t):Zm(r)?vy(Pi(e,r.items),t):qm(r)?Ty(Pi(e,r.items),t):zr(r)?jo(oh(e,r.allOf),t):Ft(r)?Ht(oh(e,r.anyOf),t):ia(r)?os(oh(e,(n=r.items)!=null?n:[]),t):ln(r)?Qt(xL(e,r.properties),t):Js(r)?by(Pi(e,r.items),t):cc(r)?wy(Pi(e,r.item),t):r}function EL(e,r){let t={};for(let n of e)t[n]=Pi(n,r);return t}function MT(e,r,t){let n=aa(e)?No(e):e,o=r({[oe]:"MappedKey",keys:n}),i=EL(n,o);return Qt(i,t)}p();function IL(e){return ge(Lr(e,[ho]))}function SL(e){return ge(ne(_({},e),{[ho]:"Optional"}))}function CL(e,r){return r===!1?IL(e):SL(e)}function Ro(e,r){let t=r!=null?r:!0;return yr(e)?AT(e,t):CL(e,t)}function DL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ro(e[n],r);return t}function TL(e,r){return DL(e.properties,r)}function AT(e,r){let t=TL(e,r);return Dt(t)}p();function ih(e,r={}){let t=e.every(o=>ln(o)),n=aa(r.unevaluatedProperties)?{unevaluatedProperties:r.unevaluatedProperties}:{};return ge(r.unevaluatedProperties===!1||aa(r.unevaluatedProperties)||t?ne(_({},n),{[oe]:"Intersect",type:"object",allOf:e}):ne(_({},n),{[oe]:"Intersect",allOf:e}),r)}function wL(e){return e.every(r=>ts(r))}function ML(e){return Lr(e,[ho])}function PT(e){return e.map(r=>ts(r)?ML(r):r)}function AL(e,r){return wL(e)?Ro(ih(PT(e),r)):ih(PT(e),r)}function Dy(e,r={}){if(e.length===0)return $t(r);if(e.length===1)return ge(e[0],r);if(e.some(t=>qd(t)))throw new Error("Cannot intersect transform types");return AL(e,r)}p();function jo(e,r){if(e.length===0)return $t(r);if(e.length===1)return ge(e[0],r);if(e.some(t=>qd(t)))throw new Error("Cannot intersect transform types");return ih(e,r)}function _T(e){return e.map(r=>u3(r))}function PL(e){return jo(_T(e))}function _L(e){return Ht(_T(e))}function OL(e){return u3(e)}function u3(e){return zr(e)?PL(e.allOf):Ft(e)?_L(e.anyOf):cc(e)?OL(e.item):e}function OT(e,r){return ge(u3(e),r)}p();p();p();p();function FT(e){let r=[];for(let t of e)r.push(Sn(t));return r}function FL(e){let r=FT(e);return hT(r)}function kL(e){let r=FT(e);return mT(r)}function BL(e){return e.map((r,t)=>t.toString())}function LL(e){return["[number]"]}function RL(e){return globalThis.Object.getOwnPropertyNames(e)}function NL(e){return l3?globalThis.Object.getOwnPropertyNames(e).map(t=>t[0]==="^"&&t[t.length-1]==="$"?t.slice(1,t.length-1):t):[]}function Sn(e){var r;return zr(e)?FL(e.allOf):Ft(e)?kL(e.anyOf):ia(e)?BL((r=e.items)!=null?r:[]):Js(e)?LL(e.items):ln(e)?RL(e.properties):Zx(e)?NL(e.patternProperties):[]}var l3=!1;function tu(e){l3=!0;let r=Sn(e);l3=!1;let t=r.map(n=>"(".concat(n,")"));return"^(".concat(t.join("|"),")$")}function jL(e){return e.map(r=>r==="[number]"?ns():Lt(r))}function My(e,r){if(yr(e))return kT(e,r);{let t=Sn(e),n=jL(t),o=rs(n);return ge(o,r)}}function UL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=My(e[n],hr(r));return t}function GL(e,r){return UL(e.properties,r)}function kT(e,r){let t=GL(e,r);return Dt(t)}p();function ll(e){let r=Sn(e),t=nh(e,r);return r.map((n,o)=>[r[o],t[o]])}function zL(e){let r=[];for(let t of e)r.push(...Sn(t));return fT(r)}function VL(e){return e.filter(r=>!il(r))}function $L(e,r){let t=[];for(let n of e)t.push(...nh(n,[r]));return VL(t)}function HL(e,r){let t={};for(let n of r)t[n]=Dy($L(e,n));return t}function BT(e,r){let t=zL(e),n=HL(e,t);return Qt(n,r)}p();p();function Ay(e){return ge({[oe]:"Date",type:"Date"},e)}p();function Py(e){return ge({[oe]:"Null",type:"null"},e)}p();function _y(e){return ge({[oe]:"Symbol",type:"symbol"},e)}p();function Oy(e){return ge({[oe]:"Undefined",type:"undefined"},e)}p();function Fy(e){return ge({[oe]:"Uint8Array",type:"Uint8Array"},e)}p();function ru(e){return ge({[oe]:"Unknown"},e)}function ZL(e){return e.map(r=>c3(r,!1))}function WL(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Ai(c3(e[t],!1));return r}function ky(e,r){return r===!0?e:Ai(e)}function c3(e,r){return Rx(e)?ky(sl(),r):jx(e)?ky(sl(),r):Kn(e)?Ai(os(ZL(e))):Zs(e)?Fy():sc(e)?Ay():Kt(e)?ky(Qt(WL(e)),r):Nx(e)?ky(ul([],ru()),r):Mr(e)?Oy():Ux(e)?Py():Gx(e)?_y():zm(e)?rp():oa(e)?Lt(e):nl(e)?Lt(e):ur(e)?Lt(e):Qt({})}function LT(e,r){return ge(c3(e,!0),r)}p();function RT(e,r){return os(e.parameters,r)}p();function ah(e,r){return e.map(t=>sa(t,r))}function XL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=sa(e[n],r);return t}function qL(e,r){return e.parameters=ah(e.parameters,r),e.returns=sa(e.returns,r),e}function JL(e,r){return e.parameters=ah(e.parameters,r),e.returns=sa(e.returns,r),e}function YL(e,r){return e.allOf=ah(e.allOf,r),e}function KL(e,r){return e.anyOf=ah(e.anyOf,r),e}function QL(e,r){return Mr(e.items)||(e.items=ah(e.items,r)),e}function eR(e,r){return e.items=sa(e.items,r),e}function tR(e,r){return e.properties=XL(e.properties,r),e}function rR(e,r){return e.item=sa(e.item,r),e}function nR(e,r){return e.items=sa(e.items,r),e}function oR(e,r){return e.items=sa(e.items,r),e}function iR(e,r){let t=r.find(o=>o.$id===e.$ref);if(t===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=Lr(t,["$id"]);return sa(n,r)}function aR(e,r){return Wm(e)?qL(e,r):Xm(e)?JL(e,r):zr(e)?YL(e,r):Ft(e)?KL(e,r):ia(e)?QL(e,r):Js(e)?eR(e,r):ln(e)?tR(e,r):cc(e)?rR(e,r):Zm(e)?nR(e,r):qm(e)?oR(e,r):Wx(e)?iR(e,r):e}function sa(e,r){return aR($m(e),SD(r))}p();function NT(e,r){if(Mr(e))throw new Error("Enum undefined or empty");let t=globalThis.Object.getOwnPropertyNames(e).filter(i=>isNaN(i)).map(i=>e[i]),o=[...new Set(t)].map(i=>Lt(i));return Ht(o,ne(_({},r),{[wi]:"Enum"}))}p();p();p();var p3=class extends We{},ce;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(ce||(ce={}));function _i(e){return e===ce.False?e:ce.True}function op(e){throw new p3(e)}function Wr(e){return U.IsNever(e)||U.IsIntersect(e)||U.IsUnion(e)||U.IsUnknown(e)||U.IsAny(e)}function Xr(e,r){return U.IsNever(r)?HT(e,r):U.IsIntersect(r)?By(e,r):U.IsUnion(r)?g3(e,r):U.IsUnknown(r)?qT(e,r):U.IsAny(r)?h3(e,r):op("StructuralRight")}function h3(e,r){return ce.True}function sR(e,r){return U.IsIntersect(r)?By(e,r):U.IsUnion(r)&&r.anyOf.some(t=>U.IsAny(t)||U.IsUnknown(t))?ce.True:U.IsUnion(r)?ce.Union:U.IsUnknown(r)||U.IsAny(r)?ce.True:ce.Union}function uR(e,r){return U.IsUnknown(e)?ce.False:U.IsAny(e)?ce.Union:U.IsNever(e)?ce.True:ce.False}function lR(e,r){return U.IsObject(r)&&Ly(r)?ce.True:Wr(r)?Xr(e,r):U.IsArray(r)?_i(Zt(e.items,r.items)):ce.False}function cR(e,r){return Wr(r)?Xr(e,r):U.IsAsyncIterator(r)?_i(Zt(e.items,r.items)):ce.False}function dR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsBigInt(r)?ce.True:ce.False}function VT(e,r){return U.IsLiteralBoolean(e)||U.IsBoolean(e)?ce.True:ce.False}function pR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsBoolean(r)?ce.True:ce.False}function fR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsConstructor(r)?e.parameters.length>r.parameters.length?ce.False:e.parameters.every((t,n)=>_i(Zt(r.parameters[n],t))===ce.True)?_i(Zt(e.returns,r.returns)):ce.False:ce.False}function mR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsDate(r)?ce.True:ce.False}function hR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsFunction(r)?e.parameters.length>r.parameters.length?ce.False:e.parameters.every((t,n)=>_i(Zt(r.parameters[n],t))===ce.True)?_i(Zt(e.returns,r.returns)):ce.False:ce.False}function $T(e,r){return U.IsLiteral(e)&&gt.IsNumber(e.const)||U.IsNumber(e)||U.IsInteger(e)?ce.True:ce.False}function gR(e,r){return U.IsInteger(r)||U.IsNumber(r)?ce.True:Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):ce.False}function By(e,r){return r.allOf.every(t=>Zt(e,t)===ce.True)?ce.True:ce.False}function yR(e,r){return e.allOf.some(t=>Zt(t,r)===ce.True)?ce.True:ce.False}function bR(e,r){return Wr(r)?Xr(e,r):U.IsIterator(r)?_i(Zt(e.items,r.items)):ce.False}function vR(e,r){return U.IsLiteral(r)&&r.const===e.const?ce.True:Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsString(r)?XT(e,r):U.IsNumber(r)?ZT(e,r):U.IsInteger(r)?$T(e,r):U.IsBoolean(r)?VT(e,r):ce.False}function HT(e,r){return ce.False}function xR(e,r){return ce.True}function jT(e){let[r,t]=[e,0];for(;U.IsNot(r);)r=r.not,t+=1;return t%2===0?r:ru()}function ER(e,r){return U.IsNot(e)?Zt(jT(e),r):U.IsNot(r)?Zt(e,jT(r)):op("Invalid fallthrough for Not")}function IR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsNull(r)?ce.True:ce.False}function ZT(e,r){return U.IsLiteralNumber(e)||U.IsNumber(e)||U.IsInteger(e)?ce.True:ce.False}function SR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsInteger(r)||U.IsNumber(r)?ce.True:ce.False}function Uo(e,r){return Object.getOwnPropertyNames(e.properties).length===r}function UT(e){return Ly(e)}function GT(e){return Uo(e,0)||Uo(e,1)&&"description"in e.properties&&U.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(U.IsString(e.properties.description.anyOf[0])&&U.IsUndefined(e.properties.description.anyOf[1])||U.IsString(e.properties.description.anyOf[1])&&U.IsUndefined(e.properties.description.anyOf[0]))}function d3(e){return Uo(e,0)}function zT(e){return Uo(e,0)}function CR(e){return Uo(e,0)}function DR(e){return Uo(e,0)}function TR(e){return Ly(e)}function wR(e){let r=ns();return Uo(e,0)||Uo(e,1)&&"length"in e.properties&&_i(Zt(e.properties.length,r))===ce.True}function MR(e){return Uo(e,0)}function Ly(e){let r=ns();return Uo(e,0)||Uo(e,1)&&"length"in e.properties&&_i(Zt(e.properties.length,r))===ce.True}function AR(e){let r=ul([sl()],sl());return Uo(e,0)||Uo(e,1)&&"then"in e.properties&&_i(Zt(e.properties.then,r))===ce.True}function WT(e,r){return Zt(e,r)===ce.False||U.IsOptional(e)&&!U.IsOptional(r)?ce.False:ce.True}function Qn(e,r){return U.IsUnknown(e)?ce.False:U.IsAny(e)?ce.Union:U.IsNever(e)||U.IsLiteralString(e)&&UT(r)||U.IsLiteralNumber(e)&&d3(r)||U.IsLiteralBoolean(e)&&zT(r)||U.IsSymbol(e)&&GT(r)||U.IsBigInt(e)&&CR(r)||U.IsString(e)&&UT(r)||U.IsSymbol(e)&&GT(r)||U.IsNumber(e)&&d3(r)||U.IsInteger(e)&&d3(r)||U.IsBoolean(e)&&zT(r)||U.IsUint8Array(e)&&TR(r)||U.IsDate(e)&&DR(r)||U.IsConstructor(e)&&MR(r)||U.IsFunction(e)&&wR(r)?ce.True:U.IsRecord(e)&&U.IsString(f3(e))?r[wi]==="Record"?ce.True:ce.False:U.IsRecord(e)&&U.IsNumber(f3(e))?Uo(r,0)?ce.True:ce.False:ce.False}function PR(e,r){return Wr(r)?Xr(e,r):U.IsRecord(r)?Oi(e,r):U.IsObject(r)?(()=>{for(let t of Object.getOwnPropertyNames(r.properties)){if(!(t in e.properties)&&!U.IsOptional(r.properties[t]))return ce.False;if(U.IsOptional(r.properties[t]))return ce.True;if(WT(e.properties[t],r.properties[t])===ce.False)return ce.False}return ce.True})():ce.False}function _R(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)&&AR(r)?ce.True:U.IsPromise(r)?_i(Zt(e.item,r.item)):ce.False}function f3(e){return Ks in e.patternProperties?ns():Qs in e.patternProperties?Mi():op("Unknown record key pattern")}function m3(e){return Ks in e.patternProperties?e.patternProperties[Ks]:Qs in e.patternProperties?e.patternProperties[Qs]:op("Unable to get record value schema")}function Oi(e,r){let[t,n]=[f3(r),m3(r)];return U.IsLiteralString(e)&&U.IsNumber(t)&&_i(Zt(e,n))===ce.True?ce.True:U.IsUint8Array(e)&&U.IsNumber(t)||U.IsString(e)&&U.IsNumber(t)||U.IsArray(e)&&U.IsNumber(t)?Zt(e,n):U.IsObject(e)?(()=>{for(let o of Object.getOwnPropertyNames(e.properties))if(WT(n,e.properties[o])===ce.False)return ce.False;return ce.True})():ce.False}function OR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Zt(m3(e),m3(r)):ce.False}function FR(e,r){let t=U.IsRegExp(e)?Mi():e,n=U.IsRegExp(r)?Mi():r;return Zt(t,n)}function XT(e,r){return U.IsLiteral(e)&&gt.IsString(e.const)||U.IsString(e)?ce.True:ce.False}function kR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsString(r)?ce.True:ce.False}function BR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsSymbol(r)?ce.True:ce.False}function LR(e,r){return U.IsTemplateLiteral(e)?Zt(pc(e),r):U.IsTemplateLiteral(r)?Zt(e,pc(r)):op("Invalid fallthrough for TemplateLiteral")}function RR(e,r){return U.IsArray(r)&&e.items!==void 0&&e.items.every(t=>Zt(t,r.items)===ce.True)}function NR(e,r){return U.IsNever(e)?ce.True:U.IsUnknown(e)?ce.False:U.IsAny(e)?ce.Union:ce.False}function jR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)&&Ly(r)||U.IsArray(r)&&RR(e,r)?ce.True:U.IsTuple(r)?gt.IsUndefined(e.items)&&!gt.IsUndefined(r.items)||!gt.IsUndefined(e.items)&&gt.IsUndefined(r.items)?ce.False:gt.IsUndefined(e.items)&&!gt.IsUndefined(r.items)||e.items.every((t,n)=>Zt(t,r.items[n])===ce.True)?ce.True:ce.False:ce.False}function UR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsUint8Array(r)?ce.True:ce.False}function GR(e,r){return Wr(r)?Xr(e,r):U.IsObject(r)?Qn(e,r):U.IsRecord(r)?Oi(e,r):U.IsVoid(r)?$R(e,r):U.IsUndefined(r)?ce.True:ce.False}function g3(e,r){return r.anyOf.some(t=>Zt(e,t)===ce.True)?ce.True:ce.False}function zR(e,r){return e.anyOf.every(t=>Zt(t,r)===ce.True)?ce.True:ce.False}function qT(e,r){return ce.True}function VR(e,r){return U.IsNever(r)?HT(e,r):U.IsIntersect(r)?By(e,r):U.IsUnion(r)?g3(e,r):U.IsAny(r)?h3(e,r):U.IsString(r)?XT(e,r):U.IsNumber(r)?ZT(e,r):U.IsInteger(r)?$T(e,r):U.IsBoolean(r)?VT(e,r):U.IsArray(r)?uR(e,r):U.IsTuple(r)?NR(e,r):U.IsObject(r)?Qn(e,r):U.IsUnknown(r)?ce.True:ce.False}function $R(e,r){return U.IsUndefined(e)||U.IsUndefined(e)?ce.True:ce.False}function HR(e,r){return U.IsIntersect(r)?By(e,r):U.IsUnion(r)?g3(e,r):U.IsUnknown(r)?qT(e,r):U.IsAny(r)?h3(e,r):U.IsObject(r)?Qn(e,r):U.IsVoid(r)?ce.True:ce.False}function Zt(e,r){return U.IsTemplateLiteral(e)||U.IsTemplateLiteral(r)?LR(e,r):U.IsRegExp(e)||U.IsRegExp(r)?FR(e,r):U.IsNot(e)||U.IsNot(r)?ER(e,r):U.IsAny(e)?sR(e,r):U.IsArray(e)?lR(e,r):U.IsBigInt(e)?dR(e,r):U.IsBoolean(e)?pR(e,r):U.IsAsyncIterator(e)?cR(e,r):U.IsConstructor(e)?fR(e,r):U.IsDate(e)?mR(e,r):U.IsFunction(e)?hR(e,r):U.IsInteger(e)?gR(e,r):U.IsIntersect(e)?yR(e,r):U.IsIterator(e)?bR(e,r):U.IsLiteral(e)?vR(e,r):U.IsNever(e)?xR(e,r):U.IsNull(e)?IR(e,r):U.IsNumber(e)?SR(e,r):U.IsObject(e)?PR(e,r):U.IsRecord(e)?OR(e,r):U.IsString(e)?kR(e,r):U.IsSymbol(e)?BR(e,r):U.IsTuple(e)?jR(e,r):U.IsPromise(e)?_R(e,r):U.IsUint8Array(e)?UR(e,r):U.IsUndefined(e)?GR(e,r):U.IsUnion(e)?zR(e,r):U.IsUnknown(e)?VR(e,r):U.IsVoid(e)?HR(e,r):op("Unknown left type operand '".concat(e[oe],"'"))}function cl(e,r){return Zt(e,r)}p();p();p();function ZR(e,r,t,n,o){let i={};for(let a of globalThis.Object.getOwnPropertyNames(e))i[a]=ip(e[a],r,t,n,hr(o));return i}function WR(e,r,t,n,o){return ZR(e.properties,r,t,n,o)}function JT(e,r,t,n,o){let i=WR(e,r,t,n,o);return Dt(i)}function XR(e,r,t,n){let o=cl(e,r);return o===ce.Union?Ht([t,n]):o===ce.True?t:n}function ip(e,r,t,n,o){return yr(e)?JT(e,r,t,n,o):ti(e)?ge(YT(e,r,t,n,o)):ge(XR(e,r,t,n),o)}function qR(e,r,t,n,o){return{[e]:ip(Lt(e),r,t,n,hr(o))}}function JR(e,r,t,n,o){return e.reduce((i,a)=>_(_({},i),qR(a,r,t,n,o)),{})}function YR(e,r,t,n,o){return JR(e.keys,r,t,n,o)}function YT(e,r,t,n,o){let i=YR(e,r,t,n,o);return Dt(i)}p();function KR(e){return e.allOf.every(r=>nu(r))}function QR(e){return e.anyOf.some(r=>nu(r))}function eN(e){return!nu(e.not)}function nu(e){return e[oe]==="Intersect"?KR(e):e[oe]==="Union"?QR(e):e[oe]==="Not"?eN(e):e[oe]==="Undefined"}p();function KT(e,r){return ap(pc(e),r)}function tN(e,r){let t=e.filter(n=>cl(n,r)===ce.False);return t.length===1?t[0]:Ht(t)}function ap(e,r,t={}){return ri(e)?ge(KT(e,r),t):yr(e)?ge(QT(e,r),t):ge(Ft(e)?tN(e.anyOf,r):cl(e,r)!==ce.False?$t():e,t)}function rN(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=ap(e[n],r);return t}function nN(e,r){return rN(e.properties,r)}function QT(e,r){let t=nN(e,r);return Dt(t)}p();p();p();function e5(e,r){return sp(pc(e),r)}function oN(e,r){let t=e.filter(n=>cl(n,r)!==ce.False);return t.length===1?t[0]:Ht(t)}function sp(e,r,t){return ri(e)?ge(e5(e,r),t):yr(e)?ge(t5(e,r),t):ge(Ft(e)?oN(e.anyOf,r):cl(e,r)!==ce.False?e:$t(),t)}function iN(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=sp(e[n],r);return t}function aN(e,r){return iN(e.properties,r)}function t5(e,r){let t=aN(e,r);return Dt(t)}p();function r5(e,r){return ge(e.returns,r)}p();function n5(e){return ge({[oe]:"Integer",type:"integer"},e)}p();p();p();function sN(e,r,t){return{[e]:ua(Lt(e),r,hr(t))}}function uN(e,r,t){return e.reduce((o,i)=>_(_({},o),sN(i,r,t)),{})}function lN(e,r,t){return uN(e.keys,r,t)}function o5(e,r,t){let n=lN(e,r,t);return Dt(n)}function cN(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toLowerCase(),t].join("")}function dN(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toUpperCase(),t].join("")}function pN(e){return e.toUpperCase()}function fN(e){return e.toLowerCase()}function mN(e,r,t){let n=ep(e.pattern);if(!dc(n))return ne(_({},e),{pattern:i5(e.pattern,r)});let a=[...rh(n)].map(c=>Lt(c)),u=a5(a,r),l=Ht(u);return Cy([l],t)}function i5(e,r){return typeof e=="string"?r==="Uncapitalize"?cN(e):r==="Capitalize"?dN(e):r==="Uppercase"?pN(e):r==="Lowercase"?fN(e):e:e.toString()}function a5(e,r){return e.map(t=>ua(t,r))}function ua(e,r,t={}){return ti(e)?o5(e,r,t):ri(e)?mN(e,r,t):Ft(e)?Ht(a5(e.anyOf,r),t):Ys(e)?Lt(i5(e.const,r),t):ge(e,t)}function s5(e,r={}){return ua(e,"Capitalize",r)}p();function u5(e,r={}){return ua(e,"Lowercase",r)}p();function l5(e,r={}){return ua(e,"Uncapitalize",r)}p();function c5(e,r={}){return ua(e,"Uppercase",r)}p();function d5(e,r){return ge({[oe]:"Not",not:e},r)}p();p();p();function hN(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=up(e[o],r,hr(t));return n}function gN(e,r,t){return hN(e.properties,r,t)}function p5(e,r,t){let n=gN(e,r,t);return Dt(n)}function yN(e,r){return e.map(t=>y3(t,r))}function bN(e,r){return e.map(t=>y3(t,r))}function vN(e,r){let o=e,{[r]:t}=o;return kn(o,[Ng(r)])}function xN(e,r){return r.reduce((t,n)=>vN(t,n),e)}function EN(e,r){let t=Lr(e,[gr,"$id","required","properties"]),n=xN(e.properties,r);return Qt(n,t)}function y3(e,r){return zr(e)?jo(yN(e.allOf,r)):Ft(e)?Ht(bN(e.anyOf,r)):ln(e)?EN(e,r):Qt({})}function up(e,r,t){if(ti(r))return f5(e,r,t);if(yr(e))return p5(e,r,t);let n=aa(r)?No(r):r;return ge(_(_({},y3(e,n)),t))}function IN(e,r,t){return{[r]:up(e,[r],hr(t))}}function SN(e,r,t){return r.reduce((n,o)=>_(_({},n),IN(e,o,t)),{})}function CN(e,r,t){return SN(e,r.keys,t)}function f5(e,r,t){let n=CN(e,r,t);return Dt(n)}p();function m5(e,r){return os(e.parameters,r)}p();p();function h5(e){return e.map(r=>g5(r))}function DN(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Ro(e[t]);return r}function TN(e){let r=Lr(e,[gr,"$id","required","properties"]),t=DN(e.properties);return Qt(t,r)}function g5(e){return zr(e)?jo(h5(e.allOf)):Ft(e)?Ht(h5(e.anyOf)):ln(e)?TN(e):Qt({})}function Ry(e,r){return yr(e)?y5(e,r):ge(_(_({},g5(e)),r))}function wN(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ry(e[n],hr(r));return t}function MN(e,r){return wN(e.properties,r)}function y5(e,r){let t=MN(e,r);return Dt(t)}p();p();p();function AN(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=lp(e[o],r,hr(t));return n}function PN(e,r,t){return AN(e.properties,r,t)}function b5(e,r,t){let n=PN(e,r,t);return Dt(n)}function _N(e,r){return e.map(t=>b3(t,r))}function ON(e,r){return e.map(t=>b3(t,r))}function FN(e,r){let t={};for(let n of r)n in e&&(t[n]=e[n]);return t}function kN(e,r){let t=Lr(e,[gr,"$id","required","properties"]),n=FN(e.properties,r);return Qt(n,t)}function b3(e,r){return zr(e)?jo(_N(e.allOf,r)):Ft(e)?Ht(ON(e.anyOf,r)):ln(e)?kN(e,r):Qt({})}function lp(e,r,t){if(ti(r))return v5(e,r,t);if(yr(e))return b5(e,r,t);let n=aa(r)?No(r):r;return ge(_(_({},b3(e,n)),t))}function BN(e,r,t){return{[r]:lp(e,[r],hr(t))}}function LN(e,r,t){return r.reduce((n,o)=>_(_({},n),BN(e,o,t)),{})}function RN(e,r,t){return LN(e,r.keys,t)}function v5(e,r,t){let n=RN(e,r,t);return Dt(n)}p();function x5(e){return Ai(Ro(e))}p();function fc(e,r,t){return ge({[oe]:"Record",type:"object",patternProperties:{[e]:r}},t)}function v3(e,r,t){let n={};for(let o of e)n[o]=r;return Qt(n,ne(_({},t),{[wi]:"Record"}))}function NN(e,r,t){return Iy(e)?v3(No(e),r,t):fc(e.pattern,r,t)}function jN(e,r,t){return v3(No(Ht(e)),r,t)}function UN(e,r,t){return v3([e.toString()],r,t)}function GN(e,r,t){return fc(e.source,r,t)}function zN(e,r,t){let n=Mr(e.pattern)?Qs:e.pattern;return fc(n,r,t)}function VN(e,r,t){return fc(Qs,r,t)}function $N(e,r,t){return fc(dT,r,t)}function HN(e,r,t){return fc(Ks,r,t)}function ZN(e,r,t){return fc(Ks,r,t)}function E5(e,r,t={}){return Ft(e)?jN(e.anyOf,r,t):ri(e)?NN(e,r,t):Ys(e)?UN(e.const,r,t):uc(e)?HN(e,r,t):lc(e)?ZN(e,r,t):Xx(e)?GN(e,r,t):Jm(e)?zN(e,r,t):Vx(e)?VN(e,r,t):il(e)?$N(e,r,t):$t(t)}p();var WN=0;function I5(e,r={}){Mr(r.$id)&&(r.$id="T".concat(WN++));let t=$m(e({[oe]:"This",$ref:"".concat(r.$id)}));return t.$id=r.$id,ge(_({[wi]:"Recursive"},t),r)}p();function S5(e,r){if(ur(e))return ge({[oe]:"Ref",$ref:e},r);if(Mr(e.$id))throw new Error("Reference target type must specify an $id");return ge({[oe]:"Ref",$ref:e.$id},r)}p();function C5(e,r){let t=ur(e)?new globalThis.RegExp(e):e;return ge({[oe]:"RegExp",type:"RegExp",source:t.source,flags:t.flags},r)}p();p();function D5(e){return e.map(r=>T5(r))}function XN(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Lr(e[t],[ho]);return r}function qN(e){let r=Lr(e,[gr,"$id","required","properties"]),t=XN(e.properties);return Qt(t,r)}function T5(e){return zr(e)?jo(D5(e.allOf)):Ft(e)?Ht(D5(e.anyOf)):ln(e)?qN(e):Qt({})}function Ny(e,r){return yr(e)?w5(e,r):ge(_(_({},T5(e)),r))}function JN(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ny(e[n],r);return t}function YN(e,r){return JN(e.properties,r)}function w5(e,r){let t=YN(e,r);return Dt(t)}p();function KN(e){var r;return zr(e)?e.allOf:Ft(e)?e.anyOf:ia(e)?(r=e.items)!=null?r:[]:[]}function M5(e){return KN(e)}p();function A5(e,r){return ge(e.returns,r)}p();function P5(e){return JSON.parse(JSON.stringify(e))}p();var x3=class{constructor(r){this.schema=r}Decode(r){return new E3(this.schema,r)}},E3=class{constructor(r,t){this.schema=r,this.decode=t}EncodeTransform(r,t){let i={Encode:a=>t[gr].Encode(r(a)),Decode:a=>this.decode(t[gr].Decode(a))};return ne(_({},t),{[gr]:i})}EncodeSchema(r,t){let n={Decode:this.decode,Encode:r};return ne(_({},t),{[gr]:n})}Encode(r){return qd(this.schema)?this.EncodeTransform(r,this.schema):this.EncodeSchema(r,this.schema)}};function _5(e){return new x3(e)}p();function jy(e={}){var r;return ge({[oe]:(r=e[oe])!=null?r:"Unsafe"},e)}p();function O5(e){return ge({[oe]:"Void",type:"void"},e)}p();var I3={};qu(I3,{Any:()=>sl,Array:()=>by,AsyncIterator:()=>vy,Awaited:()=>OT,BigInt:()=>rp,Boolean:()=>Sy,Capitalize:()=>s5,Composite:()=>BT,Const:()=>LT,Constructor:()=>xy,ConstructorParameters:()=>RT,Date:()=>Ay,Deref:()=>sa,Enum:()=>NT,Exclude:()=>ap,Extends:()=>ip,Extract:()=>sp,Function:()=>ul,Index:()=>np,InstanceType:()=>r5,Integer:()=>n5,Intersect:()=>jo,Iterator:()=>Ty,KeyOf:()=>My,Literal:()=>Lt,Lowercase:()=>u5,Mapped:()=>MT,Never:()=>$t,Not:()=>d5,Null:()=>Py,Number:()=>ns,Object:()=>Qt,Omit:()=>up,Optional:()=>Ro,Parameters:()=>m5,Partial:()=>Ry,Pick:()=>lp,Promise:()=>wy,Readonly:()=>Ai,ReadonlyOptional:()=>x5,Record:()=>E5,Recursive:()=>I5,Ref:()=>S5,RegExp:()=>C5,Required:()=>Ny,Rest:()=>M5,ReturnType:()=>A5,Strict:()=>P5,String:()=>Mi,Symbol:()=>_y,TemplateLiteral:()=>Cy,Transform:()=>_5,Tuple:()=>os,Uint8Array:()=>Fy,Uncapitalize:()=>l5,Undefined:()=>Oy,Union:()=>Ht,Unknown:()=>ru,Unsafe:()=>jy,Uppercase:()=>c5,Void:()=>O5});p();var x=I3;p();var sh=x.Object({externalId:x.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:x.String({description:"The name of the entity."}),shortName:x.String({description:"A short name for the entity."}),description:x.String({description:"A description of the entity."}),icon:x.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),S3=x.Partial(sh,{$id:"Details",description:"Additional information about a given entity."}),ni=x.Object({details:x.Optional(x.Ref(S3))},{$id:"WithDetails"}),mc=e=>{let r=[...e].sort(),t=x.Pick(sh,e),n=x.Omit(sh,e);return x.Object({details:x.Intersect([t,x.Partial(n)])},{$id:"WithRequiredDetails_".concat(r.join("_"))})},C3=[sh,S3];p();var cp=x.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),dp=x.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),hc=x.Tuple([x.Ref(cp),x.Ref(dp)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),eo=x.Object({type:x.Literal("Point"),coordinates:x.Ref(hc)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),Uy=x.Object({type:x.Literal("MultiPoint"),coordinates:x.Array(x.Ref(hc))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),Gy=x.Object({type:x.Literal("LineString"),coordinates:x.Array(x.Ref(hc),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),zy=x.Object({type:x.Literal("MultiLineString"),coordinates:x.Array(x.Array(x.Ref(hc),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),F5=x.Array(x.Ref(hc),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),D3=x.Array(x.Ref(F5),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),pp=x.Object({type:x.Literal("Polygon"),coordinates:x.Ref(D3)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),fp=x.Object({type:x.Literal("MultiPolygon"),coordinates:x.Array(x.Ref(D3))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Rn=(e,r,t)=>x.Object({type:x.Literal("Feature"),geometry:e,properties:r},t),yo=(e,r,t)=>x.Object({type:x.Literal("FeatureCollection"),features:x.Array(e,t)},r),T3=[cp,dp,hc,eo,Uy,Gy,zy,F5,D3,pp,fp];p();var Rr=(e,r)=>x.Unsafe(x.String({$id:r,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),to=Rr("g","GeometryId"),mt=Rr("f","FloorId"),w3=[to,mt];p();p();p();var Vy=class{constructor(r){m(this,"_value");this._value=r}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let r=this._value;return this._value=null,{done:!1,value:r}}},$y=class{constructor(r){m(this,"_tag","Some");m(this,"_value");this._value=r}get value(){return this._value}isSome(){return!0}isSomeAnd(r){return r(this.value)}isNone(){return!1}equals(r){return r.isSome()&&r.value===this.value}expect(r){return this.value}unwrap(){return this.value}unwrapOr(r){return this.value}unwrapOrElse(r){return this.value}inspect(r){return r(this.value),this}inspectNone(r){return this}map(r){return k5(r(this.value))}mapAsync(r){return r(this.value).then(t=>k5(t))}mapOr(r,t){return this.map(r).unwrapOr(t)}mapOrAsync(r,t){return this.mapAsync(r).then(n=>n.unwrapOr(t))}mapOrElse(r,t){return this.map(r).unwrapOrElse(t)}mapOrElseAsync(r,t){return this.mapAsync(r).then(n=>n.unwrapOrElse(t))}and(r){return r}andThen(r){return r(this.value)}andThenAsync(r){return r(this.value)}filter(r){return r(this.value)?this:dl()}or(r){return this}orElse(r){return this}xor(r){return r.isSome()?dl():this}toString(){return"Some(".concat(this.value,")")}okOr(r){return Pe(this.value)}okOrElse(r){return Pe(this.value)}iter(){return new Vy(this.value)}[Symbol.iterator](){return this.iter()}zip(r){return r.isSome()?mp([this.value,r.value]):dl()}zipWith(r,t){return r.isSome()?mp(t(this.value,r.value)):dl()}get[Symbol.toStringTag](){return"Some"}},Hy=class{constructor(){m(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(r){return!1}isNone(){return!0}equals(r){return r.isNone()}expect(r){throw new Error(r)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(r){return r}unwrapOrElse(r){return r()}inspect(r){return this}inspectNone(r){return r(),this}map(r){return this}mapAsync(r){return Promise.resolve(this)}mapOr(r,t){return t}mapOrAsync(r,t){return Promise.resolve(t)}mapOrElse(r,t){return t()}mapOrElseAsync(r,t){return t()}and(r){return this}andThen(r){return this}andThenAsync(r){return Promise.resolve(this)}filter(r){return this}or(r){return r}orElse(r){return r()}xor(r){return r}toString(){return"None"}okOr(r){return _e(r)}okOrElse(r){return _e(r())}iter(){return new Vy(null)}[Symbol.iterator](){return this.iter()}zip(r){return this}zipWith(r,t){return this}get[Symbol.toStringTag](){return"None"}},mp=e=>new $y(e),dl=()=>new Hy,k5=e=>e instanceof $y||e instanceof Hy?e:e==null?dl():mp(e);var Zy=class{constructor(r){m(this,"_value");this._value=r}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let r=this._value;return this._value=null,{done:!1,value:r}}},M3=class{constructor(r){m(this,"_tag","Ok");m(this,"_value");this._value=r}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(r){return r(this.value)}isErr(){return!1}isErrAnd(r){return!1}ok(){return mp(this.value)}err(){return dl()}expect(r){return this.value}expectErr(r){throw new Error(r)}unwrap(){return this.value}unwrapOr(r){return this.value}unwrapOrElse(r){return this.value}inspect(r){return r(this.value),this}inspectErr(){return this}map(r){return Pe(r(this.value))}async mapAsync(r){return r(this.value).then(Pe)}mapOr(r,t){return r(this.value)}async mapOrAsync(r,t){return r(this.value)}mapOrElse(r,t){return r(this.value)}async mapOrElseAsync(r,t){return r(this.value)}mapErr(r){return this}iter(){return new Zy(this.value)}[Symbol.iterator](){return this.iter()}and(r){return r}andThen(r){return r(this.value)}or(r){return this}orElse(r){return this}async andThenAsync(r){return r(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}},A3=class e{constructor(r){m(this,"_tag","Err");m(this,"_error");this._error=r}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(r){return!1}isErr(){return!0}isErrAnd(r){return r(this.error)}ok(){return dl()}err(){return mp(this.error)}expect(r){throw new Error(r)}expectErr(r){return this.error}unwrap(){throw this.error}unwrapOr(r){return r}unwrapOrElse(r){return r()}inspect(){return this}inspectErr(r){return r(this.error),this}map(r){return this}iter(){return new Zy(null)}[Symbol.iterator](){return this.iter()}async mapAsync(r){return this}mapOr(r,t){return t}async mapOrAsync(r,t){return t}mapOrElse(r,t){return t()}async mapOrElseAsync(r,t){return t()}mapErr(r){return new e(r(this.error))}and(r){return this}andThen(r){return this}async andThenAsync(r){return this}or(r){return r}orElse(r){return r(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}},Pe=e=>new M3(e),_e=e=>new A3(e);p();var Go;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(Go||(Go={}));p();p();p();p();var P3=class extends We{constructor(r){super("Duplicate type kind '".concat(r,"' detected"))}},uh=class extends We{constructor(r){super("Duplicate string format '".concat(r,"' detected"))}},Wy;(function(e){function r(n,o){if(cn.Has(n))throw new P3(n);return cn.Set(n,o),(i={})=>jy(ne(_({},i),{[oe]:n}))}e.Type=r;function t(n,o){if(go.Has(n))throw new uh(n);return go.Set(n,o),n}e.Format=t})(Wy||(Wy={}));p();function QN(e){switch(e.errorType){case ae.ArrayContains:return"Expected array to contain at least one matching value";case ae.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case ae.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case ae.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case ae.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case ae.ArrayUniqueItems:return"Expected array elements to be unique";case ae.Array:return"Expected array";case ae.AsyncIterator:return"Expected AsyncIterator";case ae.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case ae.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case ae.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case ae.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case ae.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case ae.BigInt:return"Expected bigint";case ae.Boolean:return"Expected boolean";case ae.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case ae.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case ae.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case ae.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case ae.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case ae.Date:return"Expected Date";case ae.Function:return"Expected function";case ae.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case ae.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case ae.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case ae.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case ae.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case ae.Integer:return"Expected integer";case ae.IntersectUnevaluatedProperties:return"Unexpected property";case ae.Intersect:return"Expected all values to match";case ae.Iterator:return"Expected Iterator";case ae.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case ae.Never:return"Never";case ae.Not:return"Value should not match";case ae.Null:return"Expected null";case ae.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case ae.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case ae.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case ae.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case ae.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case ae.Number:return"Expected number";case ae.Object:return"Expected object";case ae.ObjectAdditionalProperties:return"Unexpected property";case ae.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case ae.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case ae.ObjectRequiredProperty:return"Expected required property";case ae.Promise:return"Expected Promise";case ae.RegExp:return"Expected string to match regular expression";case ae.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case ae.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case ae.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case ae.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case ae.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case ae.String:return"Expected string";case ae.Symbol:return"Expected symbol";case ae.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case ae.Tuple:return"Expected tuple";case ae.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case ae.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case ae.Uint8Array:return"Expected Uint8Array";case ae.Undefined:return"Expected undefined";case ae.Union:return"Expected union value";case ae.Void:return"Expected void";case ae.Kind:return"Expected kind '".concat(e.schema[oe],"'");default:return"Unknown error type"}}var ej=QN;function B5(){return ej}p();var _3=class extends We{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'")),this.schema=r}};function tj(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new _3(e);return Tt(t,r)}function Fi(e,r){return!yt(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function Tt(e,r){return e[oe]==="This"||e[oe]==="Ref"?tj(e,r):e}p();var O3=class extends We{constructor(r){super("Unable to hash value"),this.value=r}},oi;(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"})(oi||(oi={}));var hp=BigInt("14695981039346656037"),[rj,nj]=[BigInt("1099511628211"),BigInt("18446744073709551616")],oj=Array.from({length:256}).map((e,r)=>BigInt(r)),L5=new Float64Array(1),R5=new DataView(L5.buffer),N5=new Uint8Array(L5.buffer);function*ij(e){let r=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let t=0;t<r;t++)yield e>>8*(r-1-t)&255}function aj(e){ro(oi.Array);for(let r of e)gp(r)}function sj(e){ro(oi.Boolean),ro(e?1:0)}function uj(e){ro(oi.BigInt),R5.setBigInt64(0,e);for(let r of N5)ro(r)}function lj(e){ro(oi.Date),gp(e.getTime())}function cj(e){ro(oi.Null)}function dj(e){ro(oi.Number),R5.setFloat64(0,e);for(let r of N5)ro(r)}function pj(e){ro(oi.Object);for(let r of globalThis.Object.getOwnPropertyNames(e).sort())gp(r),gp(e[r])}function fj(e){ro(oi.String);for(let r=0;r<e.length;r++)for(let t of ij(e.charCodeAt(r)))ro(t)}function mj(e){ro(oi.Symbol),gp(e.description)}function hj(e){ro(oi.Uint8Array);for(let r=0;r<e.length;r++)ro(e[r])}function gj(e){return ro(oi.Undefined)}function gp(e){if(et(e))return aj(e);if(es(e))return sj(e);if(Bn(e))return uj(e);if(mo(e))return lj(e);if(Ws(e))return cj(e);if(ze(e))return dj(e);if(nt(e))return pj(e);if(yt(e))return fj(e);if(Xs(e))return mj(e);if(Xd(e))return hj(e);if(Ar(e))return gj(e);throw new O3(e)}function ro(e){hp=hp^oj[e],hp=hp*rj%nj}function pl(e){return hp=BigInt("14695981039346656037"),gp(e),hp}p();var F3=class extends We{constructor(r){super("Unknown type"),this.schema=r}};function yj(e){return e[oe]==="Any"||e[oe]==="Unknown"}function ct(e){return e!==void 0}function bj(e,r,t){return!0}function vj(e,r,t){if(!et(t)||ct(e.minItems)&&!(t.length>=e.minItems)||ct(e.maxItems)&&!(t.length<=e.maxItems)||!t.every(i=>Nn(e.items,r,i))||e.uniqueItems===!0&&!function(){let i=new Set;for(let a of t){let u=pl(a);if(i.has(u))return!1;i.add(u)}return!0}())return!1;if(!(ct(e.contains)||ze(e.minContains)||ze(e.maxContains)))return!0;let n=ct(e.contains)?e.contains:$t(),o=t.reduce((i,a)=>Nn(n,r,a)?i+1:i,0);return!(o===0||ze(e.minContains)&&o<e.minContains||ze(e.maxContains)&&o>e.maxContains)}function xj(e,r,t){return my(t)}function Ej(e,r,t){return!(!Bn(t)||ct(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||ct(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||ct(e.maximum)&&!(t<=e.maximum)||ct(e.minimum)&&!(t>=e.minimum)||ct(e.multipleOf)&&t%e.multipleOf!==BigInt(0))}function Ij(e,r,t){return es(t)}function Sj(e,r,t){return Nn(e.returns,r,t.prototype)}function Cj(e,r,t){return!(!mo(t)||ct(e.exclusiveMaximumTimestamp)&&!(t.getTime()<e.exclusiveMaximumTimestamp)||ct(e.exclusiveMinimumTimestamp)&&!(t.getTime()>e.exclusiveMinimumTimestamp)||ct(e.maximumTimestamp)&&!(t.getTime()<=e.maximumTimestamp)||ct(e.minimumTimestamp)&&!(t.getTime()>=e.minimumTimestamp)||ct(e.multipleOfTimestamp)&&t.getTime()%e.multipleOfTimestamp!==0)}function Dj(e,r,t){return ol(t)}function Tj(e,r,t){return!(!yy(t)||ct(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||ct(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||ct(e.maximum)&&!(t<=e.maximum)||ct(e.minimum)&&!(t>=e.minimum)||ct(e.multipleOf)&&t%e.multipleOf!==0)}function wj(e,r,t){let n=e.allOf.every(o=>Nn(o,r,t));if(e.unevaluatedProperties===!1){let o=new RegExp(tu(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a));return n&&i}else if(bt(e.unevaluatedProperties)){let o=new RegExp(tu(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a)||Nn(e.unevaluatedProperties,r,t[a]));return n&&i}else return n}function Mj(e,r,t){return hy(t)}function Aj(e,r,t){return t===e.const}function Pj(e,r,t){return!1}function _j(e,r,t){return!Nn(e.not,r,t)}function Oj(e,r,t){return Ws(t)}function Fj(e,r,t){return!(!Gt.IsNumberLike(t)||ct(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||ct(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||ct(e.minimum)&&!(t>=e.minimum)||ct(e.maximum)&&!(t<=e.maximum)||ct(e.multipleOf)&&t%e.multipleOf!==0)}function kj(e,r,t){if(!Gt.IsObjectLike(t)||ct(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||ct(e.maxProperties)&&!(Object.getOwnPropertyNames(t).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let o of n){let i=e.properties[o];if(e.required&&e.required.includes(o)){if(!Nn(i,r,t[o])||(nu(i)||yj(i))&&!(o in t))return!1}else if(Gt.IsExactOptionalProperty(t,o)&&!Nn(i,r,t[o]))return!1}if(e.additionalProperties===!1){let o=Object.getOwnPropertyNames(t);return e.required&&e.required.length===n.length&&o.length===n.length?!0:o.every(i=>n.includes(i))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(t).every(i=>n.includes(i)||Nn(e.additionalProperties,r,t[i])):!0}function Bj(e,r,t){return gy(t)}function Lj(e,r,t){if(!Gt.IsRecordLike(t)||ct(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||ct(e.maxProperties)&&!(Object.getOwnPropertyNames(t).length<=e.maxProperties))return!1;let[n,o]=Object.entries(e.patternProperties)[0],i=new RegExp(n),a=Object.entries(t).every(([c,d])=>i.test(c)?Nn(o,r,d):!0),u=typeof e.additionalProperties=="object"?Object.entries(t).every(([c,d])=>i.test(c)?!0:Nn(e.additionalProperties,r,d)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(t).every(c=>i.test(c)):!0;return a&&u&&l}function Rj(e,r,t){return Nn(Tt(e,r),r,t)}function Nj(e,r,t){let n=new RegExp(e.source,e.flags);return ct(e.minLength)&&!(t.length>=e.minLength)||ct(e.maxLength)&&!(t.length<=e.maxLength)?!1:n.test(t)}function jj(e,r,t){return!yt(t)||ct(e.minLength)&&!(t.length>=e.minLength)||ct(e.maxLength)&&!(t.length<=e.maxLength)||ct(e.pattern)&&!new RegExp(e.pattern).test(t)?!1:ct(e.format)?go.Has(e.format)?go.Get(e.format)(t):!1:!0}function Uj(e,r,t){return Xs(t)}function Gj(e,r,t){return yt(t)&&new RegExp(e.pattern).test(t)}function zj(e,r,t){return Nn(Tt(e,r),r,t)}function Vj(e,r,t){if(!et(t)||e.items===void 0&&t.length!==0||t.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!Nn(e.items[n],r,t[n]))return!1;return!0}function $j(e,r,t){return Ar(t)}function Hj(e,r,t){return e.anyOf.some(n=>Nn(n,r,t))}function Zj(e,r,t){return!(!Xd(t)||ct(e.maxByteLength)&&!(t.length<=e.maxByteLength)||ct(e.minByteLength)&&!(t.length>=e.minByteLength))}function Wj(e,r,t){return!0}function Xj(e,r,t){return Gt.IsVoidLike(t)}function qj(e,r,t){return cn.Has(e[oe])?cn.Get(e[oe])(e,t):!1}function Nn(e,r,t){let n=ct(e.$id)?[...r,e]:r,o=e;switch(o[oe]){case"Any":return bj(o,n,t);case"Array":return vj(o,n,t);case"AsyncIterator":return xj(o,n,t);case"BigInt":return Ej(o,n,t);case"Boolean":return Ij(o,n,t);case"Constructor":return Sj(o,n,t);case"Date":return Cj(o,n,t);case"Function":return Dj(o,n,t);case"Integer":return Tj(o,n,t);case"Intersect":return wj(o,n,t);case"Iterator":return Mj(o,n,t);case"Literal":return Aj(o,n,t);case"Never":return Pj(o,n,t);case"Not":return _j(o,n,t);case"Null":return Oj(o,n,t);case"Number":return Fj(o,n,t);case"Object":return kj(o,n,t);case"Promise":return Bj(o,n,t);case"Record":return Lj(o,n,t);case"Ref":return Rj(o,n,t);case"RegExp":return Nj(o,n,t);case"String":return jj(o,n,t);case"Symbol":return Uj(o,n,t);case"TemplateLiteral":return Gj(o,n,t);case"This":return zj(o,n,t);case"Tuple":return Vj(o,n,t);case"Undefined":return $j(o,n,t);case"Union":return Hj(o,n,t);case"Uint8Array":return Zj(o,n,t);case"Unknown":return Wj(o,n,t);case"Void":return Xj(o,n,t);default:if(!cn.Has(o[oe]))throw new F3(o);return qj(o,n,t)}}function st(...e){return e.length===3?Nn(e[0],e[1],e[2]):Nn(e[0],[],e[1])}var ae;(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"})(ae||(ae={}));var k3=class extends We{constructor(r){super("Unknown type"),this.schema=r}};function ou(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function dt(e){return e!==void 0}var ki=class{constructor(r){this.iterator=r}[Symbol.iterator](){return this.iterator}First(){let r=this.iterator.next();return r.done?void 0:r.value}};function Me(e,r,t,n,o=[]){return{type:e,schema:r,path:t,value:n,message:B5()({errorType:e,path:t,schema:r,value:n,errors:o}),errors:o}}function*Jj(e,r,t,n){}function*Yj(e,r,t,n){if(!et(n))return yield Me(ae.Array,e,t,n);dt(e.minItems)&&!(n.length>=e.minItems)&&(yield Me(ae.ArrayMinItems,e,t,n)),dt(e.maxItems)&&!(n.length<=e.maxItems)&&(yield Me(ae.ArrayMaxItems,e,t,n));for(let a=0;a<n.length;a++)yield*be(jn(e.items,r,"".concat(t,"/").concat(a),n[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let u of n){let l=pl(u);if(a.has(l))return!1;a.add(l)}return!0}()&&(yield Me(ae.ArrayUniqueItems,e,t,n)),!(dt(e.contains)||dt(e.minContains)||dt(e.maxContains)))return;let o=dt(e.contains)?e.contains:$t(),i=n.reduce((a,u,l)=>jn(o,r,"".concat(t).concat(l),u).next().done===!0?a+1:a,0);i===0&&(yield Me(ae.ArrayContains,e,t,n)),ze(e.minContains)&&i<e.minContains&&(yield Me(ae.ArrayMinContains,e,t,n)),ze(e.maxContains)&&i>e.maxContains&&(yield Me(ae.ArrayMaxContains,e,t,n))}function*Kj(e,r,t,n){my(n)||(yield Me(ae.AsyncIterator,e,t,n))}function*Qj(e,r,t,n){if(!Bn(n))return yield Me(ae.BigInt,e,t,n);dt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield Me(ae.BigIntExclusiveMaximum,e,t,n)),dt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield Me(ae.BigIntExclusiveMinimum,e,t,n)),dt(e.maximum)&&!(n<=e.maximum)&&(yield Me(ae.BigIntMaximum,e,t,n)),dt(e.minimum)&&!(n>=e.minimum)&&(yield Me(ae.BigIntMinimum,e,t,n)),dt(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield Me(ae.BigIntMultipleOf,e,t,n))}function*eU(e,r,t,n){es(n)||(yield Me(ae.Boolean,e,t,n))}function*tU(e,r,t,n){yield*be(jn(e.returns,r,t,n.prototype))}function*rU(e,r,t,n){if(!mo(n))return yield Me(ae.Date,e,t,n);dt(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield Me(ae.DateExclusiveMaximumTimestamp,e,t,n)),dt(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield Me(ae.DateExclusiveMinimumTimestamp,e,t,n)),dt(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield Me(ae.DateMaximumTimestamp,e,t,n)),dt(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield Me(ae.DateMinimumTimestamp,e,t,n)),dt(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield Me(ae.DateMultipleOfTimestamp,e,t,n))}function*nU(e,r,t,n){ol(n)||(yield Me(ae.Function,e,t,n))}function*oU(e,r,t,n){if(!yy(n))return yield Me(ae.Integer,e,t,n);dt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield Me(ae.IntegerExclusiveMaximum,e,t,n)),dt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield Me(ae.IntegerExclusiveMinimum,e,t,n)),dt(e.maximum)&&!(n<=e.maximum)&&(yield Me(ae.IntegerMaximum,e,t,n)),dt(e.minimum)&&!(n>=e.minimum)&&(yield Me(ae.IntegerMinimum,e,t,n)),dt(e.multipleOf)&&n%e.multipleOf!==0&&(yield Me(ae.IntegerMultipleOf,e,t,n))}function*iU(e,r,t,n){let o=!1;for(let i of e.allOf)for(let a of jn(i,r,t,n))o=!0,yield a;if(o)return yield Me(ae.Intersect,e,t,n);if(e.unevaluatedProperties===!1){let i=new RegExp(tu(e));for(let a of Object.getOwnPropertyNames(n))i.test(a)||(yield Me(ae.IntersectUnevaluatedProperties,e,"".concat(t,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let i=new RegExp(tu(e));for(let a of Object.getOwnPropertyNames(n))if(!i.test(a)){let u=jn(e.unevaluatedProperties,r,"".concat(t,"/").concat(a),n[a]).next();u.done||(yield u.value)}}}function*aU(e,r,t,n){hy(n)||(yield Me(ae.Iterator,e,t,n))}function*sU(e,r,t,n){n!==e.const&&(yield Me(ae.Literal,e,t,n))}function*uU(e,r,t,n){yield Me(ae.Never,e,t,n)}function*lU(e,r,t,n){jn(e.not,r,t,n).next().done===!0&&(yield Me(ae.Not,e,t,n))}function*cU(e,r,t,n){Ws(n)||(yield Me(ae.Null,e,t,n))}function*dU(e,r,t,n){if(!Gt.IsNumberLike(n))return yield Me(ae.Number,e,t,n);dt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield Me(ae.NumberExclusiveMaximum,e,t,n)),dt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield Me(ae.NumberExclusiveMinimum,e,t,n)),dt(e.maximum)&&!(n<=e.maximum)&&(yield Me(ae.NumberMaximum,e,t,n)),dt(e.minimum)&&!(n>=e.minimum)&&(yield Me(ae.NumberMinimum,e,t,n)),dt(e.multipleOf)&&n%e.multipleOf!==0&&(yield Me(ae.NumberMultipleOf,e,t,n))}function*pU(e,r,t,n){if(!Gt.IsObjectLike(n))return yield Me(ae.Object,e,t,n);dt(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield Me(ae.ObjectMinProperties,e,t,n)),dt(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield Me(ae.ObjectMaxProperties,e,t,n));let o=Array.isArray(e.required)?e.required:[],i=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let u of o)a.includes(u)||(yield Me(ae.ObjectRequiredProperty,e.properties[u],"".concat(t,"/").concat(ou(u)),void 0));if(e.additionalProperties===!1)for(let u of a)i.includes(u)||(yield Me(ae.ObjectAdditionalProperties,e,"".concat(t,"/").concat(ou(u)),n[u]));if(typeof e.additionalProperties=="object")for(let u of a)i.includes(u)||(yield*be(jn(e.additionalProperties,r,"".concat(t,"/").concat(ou(u)),n[u])));for(let u of i){let l=e.properties[u];e.required&&e.required.includes(u)?(yield*be(jn(l,r,"".concat(t,"/").concat(ou(u)),n[u])),nu(e)&&!(u in n)&&(yield Me(ae.ObjectRequiredProperty,l,"".concat(t,"/").concat(ou(u)),void 0))):Gt.IsExactOptionalProperty(n,u)&&(yield*be(jn(l,r,"".concat(t,"/").concat(ou(u)),n[u])))}}function*fU(e,r,t,n){gy(n)||(yield Me(ae.Promise,e,t,n))}function*mU(e,r,t,n){if(!Gt.IsRecordLike(n))return yield Me(ae.Object,e,t,n);dt(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield Me(ae.ObjectMinProperties,e,t,n)),dt(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield Me(ae.ObjectMaxProperties,e,t,n));let[o,i]=Object.entries(e.patternProperties)[0],a=new RegExp(o);for(let[u,l]of Object.entries(n))a.test(u)&&(yield*be(jn(i,r,"".concat(t,"/").concat(ou(u)),l)));if(typeof e.additionalProperties=="object")for(let[u,l]of Object.entries(n))a.test(u)||(yield*be(jn(e.additionalProperties,r,"".concat(t,"/").concat(ou(u)),l)));if(e.additionalProperties===!1){for(let[u,l]of Object.entries(n))if(!a.test(u))return yield Me(ae.ObjectAdditionalProperties,e,"".concat(t,"/").concat(ou(u)),l)}}function*hU(e,r,t,n){yield*be(jn(Tt(e,r),r,t,n))}function*gU(e,r,t,n){if(!yt(n))return yield Me(ae.String,e,t,n);if(dt(e.minLength)&&!(n.length>=e.minLength)&&(yield Me(ae.StringMinLength,e,t,n)),dt(e.maxLength)&&!(n.length<=e.maxLength)&&(yield Me(ae.StringMaxLength,e,t,n)),!new RegExp(e.source,e.flags).test(n))return yield Me(ae.RegExp,e,t,n)}function*yU(e,r,t,n){if(!yt(n))return yield Me(ae.String,e,t,n);dt(e.minLength)&&!(n.length>=e.minLength)&&(yield Me(ae.StringMinLength,e,t,n)),dt(e.maxLength)&&!(n.length<=e.maxLength)&&(yield Me(ae.StringMaxLength,e,t,n)),yt(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield Me(ae.StringPattern,e,t,n))),yt(e.format)&&(go.Has(e.format)?go.Get(e.format)(n)||(yield Me(ae.StringFormat,e,t,n)):yield Me(ae.StringFormatUnknown,e,t,n))}function*bU(e,r,t,n){Xs(n)||(yield Me(ae.Symbol,e,t,n))}function*vU(e,r,t,n){if(!yt(n))return yield Me(ae.String,e,t,n);new RegExp(e.pattern).test(n)||(yield Me(ae.StringPattern,e,t,n))}function*xU(e,r,t,n){yield*be(jn(Tt(e,r),r,t,n))}function*EU(e,r,t,n){if(!et(n))return yield Me(ae.Tuple,e,t,n);if(e.items===void 0&&n.length!==0)return yield Me(ae.TupleLength,e,t,n);if(n.length!==e.maxItems)return yield Me(ae.TupleLength,e,t,n);if(e.items)for(let o=0;o<e.items.length;o++)yield*be(jn(e.items[o],r,"".concat(t,"/").concat(o),n[o]))}function*IU(e,r,t,n){Ar(n)||(yield Me(ae.Undefined,e,t,n))}function*SU(e,r,t,n){if(st(e,r,n))return;let o=e.anyOf.map(i=>new ki(jn(i,r,t,n)));yield Me(ae.Union,e,t,n,o)}function*CU(e,r,t,n){if(!Xd(n))return yield Me(ae.Uint8Array,e,t,n);dt(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield Me(ae.Uint8ArrayMaxByteLength,e,t,n)),dt(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield Me(ae.Uint8ArrayMinByteLength,e,t,n))}function*DU(e,r,t,n){}function*TU(e,r,t,n){Gt.IsVoidLike(n)||(yield Me(ae.Void,e,t,n))}function*wU(e,r,t,n){cn.Get(e[oe])(e,n)||(yield Me(ae.Kind,e,t,n))}function*jn(e,r,t,n){let o=dt(e.$id)?[...r,e]:r,i=e;switch(i[oe]){case"Any":return yield*be(Jj(i,o,t,n));case"Array":return yield*be(Yj(i,o,t,n));case"AsyncIterator":return yield*be(Kj(i,o,t,n));case"BigInt":return yield*be(Qj(i,o,t,n));case"Boolean":return yield*be(eU(i,o,t,n));case"Constructor":return yield*be(tU(i,o,t,n));case"Date":return yield*be(rU(i,o,t,n));case"Function":return yield*be(nU(i,o,t,n));case"Integer":return yield*be(oU(i,o,t,n));case"Intersect":return yield*be(iU(i,o,t,n));case"Iterator":return yield*be(aU(i,o,t,n));case"Literal":return yield*be(sU(i,o,t,n));case"Never":return yield*be(uU(i,o,t,n));case"Not":return yield*be(lU(i,o,t,n));case"Null":return yield*be(cU(i,o,t,n));case"Number":return yield*be(dU(i,o,t,n));case"Object":return yield*be(pU(i,o,t,n));case"Promise":return yield*be(fU(i,o,t,n));case"Record":return yield*be(mU(i,o,t,n));case"Ref":return yield*be(hU(i,o,t,n));case"RegExp":return yield*be(gU(i,o,t,n));case"String":return yield*be(yU(i,o,t,n));case"Symbol":return yield*be(bU(i,o,t,n));case"TemplateLiteral":return yield*be(vU(i,o,t,n));case"This":return yield*be(xU(i,o,t,n));case"Tuple":return yield*be(EU(i,o,t,n));case"Undefined":return yield*be(IU(i,o,t,n));case"Union":return yield*be(SU(i,o,t,n));case"Uint8Array":return yield*be(CU(i,o,t,n));case"Unknown":return yield*be(DU(i,o,t,n));case"Void":return yield*be(TU(i,o,t,n));default:if(!cn.Has(i[oe]))throw new k3(e);return yield*be(wU(i,o,t,n))}}function is(...e){let r=e.length===3?jn(e[0],e[1],"",e[2]):jn(e[0],[],"",e[1]);return new ki(r)}p();p();var MU=function(e,r,t,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?e!==r||!o:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,t):o?o.value=t:r.set(e,t),t},U5=function(e,r,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(e):n?n.value:r.get(e)},B3,Xy,G5,L3=class extends We{constructor(r){let t=r.First();super(t===void 0?"Invalid Value":t.message),B3.add(this),Xy.set(this,void 0),MU(this,Xy,r,"f"),this.error=t}Errors(){return new ki(U5(this,B3,"m",G5).call(this))}};Xy=new WeakMap,B3=new WeakSet,G5=function*(){this.error&&(yield this.error),yield*be(U5(this,Xy,"f"))};function j5(e,r,t){if(!st(e,r,t))throw new L3(is(e,r,t))}function qy(...e){return e.length===3?j5(e[0],e[1],e[2]):j5(e[0],[],e[1])}p();p();p();function AU(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=wt(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=wt(e[t]);return r}function PU(e){return e.map(r=>wt(r))}function _U(e){return e.slice()}function OU(e){return new Map(wt([...e.entries()]))}function FU(e){return new Set(wt([...e.entries()]))}function kU(e){return new Date(e.toISOString())}function wt(e){if(et(e))return PU(e);if(mo(e))return kU(e);if(Ti(e))return _U(e);if(CD(e))return OU(e);if(DD(e))return FU(e);if(nt(e))return AU(e);if(Ln(e))return e;throw new Error("ValueClone: Unable to clone value")}var ii=class extends We{constructor(r,t){super(t),this.schema=r}};function Mt(e){return ol(e)?e():wt(e)}function BU(e,r){return qe(e,"default")?Mt(e.default):{}}function LU(e,r){if(e.uniqueItems===!0&&!qe(e,"default"))throw new ii(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!qe(e,"default"))throw new ii(e,"Array with the contains constraint requires a default value");return"default"in e?Mt(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(t=>ai(e.items,r)):[]}function RU(e,r){return qe(e,"default")?Mt(e.default):function(){return g6(this,null,function*(){})}()}function NU(e,r){return qe(e,"default")?Mt(e.default):BigInt(0)}function jU(e,r){return qe(e,"default")?Mt(e.default):!1}function UU(e,r){if(qe(e,"default"))return Mt(e.default);{let t=ai(e.returns,r);return typeof t=="object"&&!Array.isArray(t)?class{constructor(){for(let[n,o]of Object.entries(t)){let i=this;i[n]=o}}}:class{}}}function GU(e,r){return qe(e,"default")?Mt(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}function zU(e,r){return qe(e,"default")?Mt(e.default):()=>ai(e.returns,r)}function VU(e,r){return qe(e,"default")?Mt(e.default):e.minimum!==void 0?e.minimum:0}function $U(e,r){if(qe(e,"default"))return Mt(e.default);{let t=e.allOf.reduce((n,o)=>{let i=ai(o,r);return typeof i=="object"?_(_({},n),i):i},{});if(!st(e,r,t))throw new ii(e,"Intersect produced invalid value. Consider using a default value.");return t}}function HU(e,r){return qe(e,"default")?Mt(e.default):function*(){}()}function ZU(e,r){return qe(e,"default")?Mt(e.default):e.const}function WU(e,r){if(qe(e,"default"))return Mt(e.default);throw new ii(e,"Never types cannot be created. Consider using a default value.")}function XU(e,r){if(qe(e,"default"))return Mt(e.default);throw new ii(e,"Not types must have a default value")}function qU(e,r){return qe(e,"default")?Mt(e.default):null}function JU(e,r){return qe(e,"default")?Mt(e.default):e.minimum!==void 0?e.minimum:0}function YU(e,r){if(qe(e,"default"))return Mt(e.default);{let t=new Set(e.required),n={};for(let[o,i]of Object.entries(e.properties))t.has(o)&&(n[o]=ai(i,r));return n}}function KU(e,r){return qe(e,"default")?Mt(e.default):Promise.resolve(ai(e.item,r))}function QU(e,r){let[t,n]=Object.entries(e.patternProperties)[0];if(qe(e,"default"))return Mt(e.default);if(t===Qs||t===Ks)return{};{let o=t.slice(1,t.length-1).split("|"),i={};for(let a of o)i[a]=ai(n,r);return i}}function eG(e,r){return qe(e,"default")?Mt(e.default):ai(Tt(e,r),r)}function tG(e,r){if(qe(e,"default"))return Mt(e.default);throw new ii(e,"RegExp types cannot be created. Consider using a default value.")}function rG(e,r){if(e.pattern!==void 0){if(qe(e,"default"))return Mt(e.default);throw new ii(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(qe(e,"default"))return Mt(e.default);throw new ii(e,"String types with formats must specify a default value")}else return qe(e,"default")?Mt(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}function nG(e,r){return qe(e,"default")?Mt(e.default):"value"in e?Symbol.for(e.value):Symbol()}function oG(e,r){if(qe(e,"default"))return Mt(e.default);if(!Iy(e))throw new ii(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return tp(e)[0]}function iG(e,r){if(z5++>fG)throw new ii(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return qe(e,"default")?Mt(e.default):ai(Tt(e,r),r)}function aG(e,r){return qe(e,"default")?Mt(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((t,n)=>ai(e.items[n],r))}function sG(e,r){if(qe(e,"default"))return Mt(e.default)}function uG(e,r){if(qe(e,"default"))return Mt(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return ai(e.anyOf[0],r)}function lG(e,r){return qe(e,"default")?Mt(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}function cG(e,r){return qe(e,"default")?Mt(e.default):{}}function dG(e,r){if(qe(e,"default"))return Mt(e.default)}function pG(e,r){if(qe(e,"default"))return Mt(e.default);throw new Error("User defined types must specify a default value")}function ai(e,r){let t=Fi(e,r),n=e;switch(n[oe]){case"Any":return BU(n,t);case"Array":return LU(n,t);case"AsyncIterator":return RU(n,t);case"BigInt":return NU(n,t);case"Boolean":return jU(n,t);case"Constructor":return UU(n,t);case"Date":return GU(n,t);case"Function":return zU(n,t);case"Integer":return VU(n,t);case"Intersect":return $U(n,t);case"Iterator":return HU(n,t);case"Literal":return ZU(n,t);case"Never":return WU(n,t);case"Not":return XU(n,t);case"Null":return qU(n,t);case"Number":return JU(n,t);case"Object":return YU(n,t);case"Promise":return KU(n,t);case"Record":return QU(n,t);case"Ref":return eG(n,t);case"RegExp":return tG(n,t);case"String":return rG(n,t);case"Symbol":return nG(n,t);case"TemplateLiteral":return oG(n,t);case"This":return iG(n,t);case"Tuple":return aG(n,t);case"Undefined":return sG(n,t);case"Union":return uG(n,t);case"Uint8Array":return lG(n,t);case"Unknown":return cG(n,t);case"Void":return dG(n,t);default:if(!cn.Has(n[oe]))throw new ii(n,"Unknown type");return pG(n,t)}}var fG=512,z5=0;function Bi(...e){return z5=0,e.length===2?ai(e[0],e[1]):ai(e[0],[])}var Jy=class extends We{constructor(r,t){super(t),this.schema=r}};function mG(e,r,t){if(e[oe]==="Object"&&typeof t=="object"&&!Ws(t)){let n=e,o=Object.getOwnPropertyNames(t),i=Object.entries(n.properties),[a,u]=[1/i.length,i.length];return i.reduce((l,[c,d])=>{let f=d[oe]==="Literal"&&d.const===t[c]?u:0,h=st(d,r,t[c])?a:0,g=o.includes(c)?a:0;return l+(f+h+g)},0)}else return st(e,r,t)?1:0}function hG(e,r,t){let n=e.anyOf.map(a=>Tt(a,r)),[o,i]=[n[0],0];for(let a of n){let u=mG(a,r,t);u>i&&(o=a,i=u)}return o}function gG(e,r,t){if("default"in e)return typeof t=="function"?e.default:wt(e.default);{let n=hG(e,r,t);return R3(n,r,t)}}function yG(e,r,t){return st(e,r,t)?wt(t):Bi(e,r)}function bG(e,r,t){return st(e,r,t)?t:Bi(e,r)}function vG(e,r,t){if(st(e,r,t))return wt(t);let n=et(t)?wt(t):Bi(e,r),o=ze(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(ze(e.maxItems)&&o.length>e.maxItems?o.slice(0,e.maxItems):o).map(l=>as(e.items,r,l));if(e.uniqueItems!==!0)return a;let u=[...new Set(a)];if(!st(e,r,u))throw new Jy(e,"Array cast produced invalid data due to uniqueItems constraint");return u}function xG(e,r,t){if(st(e,r,t))return Bi(e,r);let n=new Set(e.returns.required||[]),o=function(){};for(let[i,a]of Object.entries(e.returns.properties))!n.has(i)&&t.prototype[i]===void 0||(o.prototype[i]=as(a,r,t.prototype[i]));return o}function EG(e,r,t){let n=Bi(e,r),o=nt(n)&&nt(t)?_(_({},n),t):t;return st(e,r,o)?o:Bi(e,r)}function IG(e,r,t){throw new Jy(e,"Never types cannot be cast")}function SG(e,r,t){if(st(e,r,t))return t;if(t===null||typeof t!="object")return Bi(e,r);let n=new Set(e.required||[]),o={};for(let[i,a]of Object.entries(e.properties))!n.has(i)&&t[i]===void 0||(o[i]=as(a,r,t[i]));if(typeof e.additionalProperties=="object"){let i=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(t))i.includes(a)||(o[a]=as(e.additionalProperties,r,t[a]))}return o}function CG(e,r,t){if(st(e,r,t))return wt(t);if(t===null||typeof t!="object"||Array.isArray(t)||t instanceof Date)return Bi(e,r);let n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n],i={};for(let[a,u]of Object.entries(t))i[a]=as(o,r,u);return i}function DG(e,r,t){return as(Tt(e,r),r,t)}function TG(e,r,t){return as(Tt(e,r),r,t)}function wG(e,r,t){return st(e,r,t)?wt(t):et(t)?e.items===void 0?[]:e.items.map((n,o)=>as(n,r,t[o])):Bi(e,r)}function MG(e,r,t){return st(e,r,t)?wt(t):gG(e,r,t)}function as(e,r,t){let n=yt(e.$id)?[...r,e]:r,o=e;switch(e[oe]){case"Array":return vG(o,n,t);case"Constructor":return xG(o,n,t);case"Intersect":return EG(o,n,t);case"Never":return IG(o,n,t);case"Object":return SG(o,n,t);case"Record":return CG(o,n,t);case"Ref":return DG(o,n,t);case"This":return TG(o,n,t);case"Tuple":return wG(o,n,t);case"Union":return MG(o,n,t);case"Date":case"Symbol":case"Uint8Array":return yG(e,r,t);default:return bG(o,n,t)}}function R3(...e){return e.length===3?as(e[0],e[1],e[2]):as(e[0],[],e[1])}p();function AG(e){return al(e)&&e[oe]!=="Unsafe"}function PG(e,r,t){return et(t)?t.map(n=>si(e.items,r,n)):t}function _G(e,r,t){let n=e.unevaluatedProperties,i=e.allOf.map(u=>si(u,r,wt(t))).reduce((u,l)=>nt(l)?_(_({},u),l):l,{});if(!nt(t)||!nt(i)||!al(n))return i;let a=Sn(e);for(let u of Object.getOwnPropertyNames(t))a.includes(u)||st(n,r,t[u])&&(i[u]=si(n,r,t[u]));return i}function OG(e,r,t){if(!nt(t)||et(t))return t;let n=e.additionalProperties;for(let o of Object.getOwnPropertyNames(t)){if(qe(e.properties,o)){t[o]=si(e.properties[o],r,t[o]);continue}if(al(n)&&st(n,r,t[o])){t[o]=si(n,r,t[o]);continue}delete t[o]}return t}function FG(e,r,t){if(!nt(t))return t;let n=e.additionalProperties,o=Object.getOwnPropertyNames(t),[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let l of o){if(u.test(l)){t[l]=si(a,r,t[l]);continue}if(al(n)&&st(n,r,t[l])){t[l]=si(n,r,t[l]);continue}delete t[l]}return t}function kG(e,r,t){return si(Tt(e,r),r,t)}function BG(e,r,t){return si(Tt(e,r),r,t)}function LG(e,r,t){if(!et(t))return t;if(Ar(e.items))return[];let n=Math.min(t.length,e.items.length);for(let o=0;o<n;o++)t[o]=si(e.items[o],r,t[o]);return t.length>n?t.slice(0,n):t}function RG(e,r,t){for(let n of e.anyOf)if(AG(n)&&st(n,r,t))return si(n,r,t);return t}function si(e,r,t){let n=yt(e.$id)?[...r,e]:r,o=e;switch(o[oe]){case"Array":return PG(o,n,t);case"Intersect":return _G(o,n,t);case"Object":return OG(o,n,t);case"Record":return FG(o,n,t);case"Ref":return kG(o,n,t);case"This":return BG(o,n,t);case"Tuple":return LG(o,n,t);case"Union":return RG(o,n,t);default:return t}}function Yy(...e){return e.length===3?si(e[0],e[1],e[2]):si(e[0],[],e[1])}p();function Ky(e){return yt(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}function NG(e){return Bn(e)||es(e)||ze(e)}function lh(e){return e===!0||ze(e)&&e===1||Bn(e)&&e===BigInt("1")||yt(e)&&(e.toLowerCase()==="true"||e==="1")}function ch(e){return e===!1||ze(e)&&(e===0||Object.is(e,-0))||Bn(e)&&e===BigInt("0")||yt(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}function jG(e){return yt(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}function UG(e){return yt(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}function GG(e){return yt(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)}function zG(e){return yt(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)}function VG(e){return yt(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}function $G(e,r){let t=$5(e);return t===r?t:e}function HG(e,r){let t=H5(e);return t===r?t:e}function ZG(e,r){let t=V5(e);return t===r?t:e}function WG(e,r){return yt(e.const)?$G(r,e.const):ze(e.const)?HG(r,e.const):es(e.const)?ZG(r,e.const):r}function V5(e){return lh(e)?!0:ch(e)?!1:e}function XG(e){let r=t=>t.split(".")[0];return Ky(e)?BigInt(r(e)):ze(e)?BigInt(Math.trunc(e)):ch(e)?BigInt(0):lh(e)?BigInt(1):e}function $5(e){return NG(e)?e.toString():Xs(e)&&e.description!==void 0?e.description.toString():e}function H5(e){return Ky(e)?parseFloat(e):lh(e)?1:ch(e)?0:e}function qG(e){return Ky(e)?parseInt(e):ze(e)?e|0:lh(e)?1:ch(e)?0:e}function JG(e){return yt(e)&&e.toLowerCase()==="null"?null:e}function YG(e){return yt(e)&&e==="undefined"?void 0:e}function KG(e){return mo(e)?e:ze(e)?new Date(e):lh(e)?new Date(1):ch(e)?new Date(0):Ky(e)?new Date(parseInt(e)):UG(e)?new Date("1970-01-01T".concat(e,".000Z")):jG(e)?new Date("1970-01-01T".concat(e)):zG(e)?new Date("".concat(e,".000Z")):GG(e)?new Date(e):VG(e)?new Date("".concat(e,"T00:00:00.000Z")):e}function QG(e,r,t){return(et(t)?t:[t]).map(o=>ss(e.items,r,o))}function ez(e,r,t){return XG(t)}function tz(e,r,t){return V5(t)}function rz(e,r,t){return KG(t)}function nz(e,r,t){return qG(t)}function oz(e,r,t){return e.allOf.reduce((n,o)=>ss(o,r,n),t)}function iz(e,r,t){return WG(e,t)}function az(e,r,t){return JG(t)}function sz(e,r,t){return H5(t)}function uz(e,r,t){if(!nt(t))return t;for(let n of Object.getOwnPropertyNames(e.properties))qe(t,n)&&(t[n]=ss(e.properties[n],r,t[n]));return t}function lz(e,r,t){if(!nt(t))return t;let o=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[o];for(let[a,u]of Object.entries(t))t[a]=ss(i,r,u);return t}function cz(e,r,t){return ss(Tt(e,r),r,t)}function dz(e,r,t){return $5(t)}function pz(e,r,t){return yt(t)||ze(t)?Symbol(t):t}function fz(e,r,t){return ss(Tt(e,r),r,t)}function mz(e,r,t){return et(t)&&!Ar(e.items)?t.map((o,i)=>i<e.items.length?ss(e.items[i],r,o):o):t}function hz(e,r,t){return YG(t)}function gz(e,r,t){for(let n of e.anyOf){let o=ss(n,r,wt(t));if(st(n,r,o))return o}return t}function ss(e,r,t){let n=Fi(e,r),o=e;switch(e[oe]){case"Array":return QG(o,n,t);case"BigInt":return ez(o,n,t);case"Boolean":return tz(o,n,t);case"Date":return rz(o,n,t);case"Integer":return nz(o,n,t);case"Intersect":return oz(o,n,t);case"Literal":return iz(o,n,t);case"Null":return az(o,n,t);case"Number":return sz(o,n,t);case"Object":return uz(o,n,t);case"Record":return lz(o,n,t);case"Ref":return cz(o,n,t);case"String":return dz(o,n,t);case"Symbol":return pz(o,n,t);case"This":return fz(o,n,t);case"Tuple":return mz(o,n,t);case"Undefined":return hz(o,n,t);case"Union":return gz(o,n,t);default:return t}}function Qy(...e){return e.length===3?ss(e[0],e[1],e[2]):ss(e[0],[],e[1])}p();p();var yp=class extends We{constructor(r,t,n){super("Unable to decode value as it does not match the expected schema"),this.schema=r,this.value=t,this.error=n}},gc=class extends We{constructor(r,t,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=r,this.path=t,this.value=n,this.error=o}};function Pr(e,r,t){try{return lr(e)?e[gr].Decode(t):t}catch(n){throw new gc(e,r,t,n)}}function yz(e,r,t,n){return et(n)?Pr(e,t,n.map((o,i)=>us(e.items,r,"".concat(t,"/").concat(i),o))):Pr(e,t,n)}function bz(e,r,t,n){if(!nt(n)||Ln(n))return Pr(e,t,n);let o=ll(e),i=o.map(d=>d[0]),a=_({},n);for(let[d,f]of o)d in a&&(a[d]=us(f,r,"".concat(t,"/").concat(d),a[d]));if(!lr(e.unevaluatedProperties))return Pr(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,c=_({},a);for(let d of u)i.includes(d)||(c[d]=Pr(l,"".concat(t,"/").concat(d),c[d]));return Pr(e,t,c)}function vz(e,r,t,n){return Pr(e,t,us(e.not,r,t,n))}function xz(e,r,t,n){if(!nt(n))return Pr(e,t,n);let o=Sn(e),i=_({},n);for(let c of o)qe(i,c)&&(Ar(i[c])&&(!Jd(e.properties[c])||Gt.IsExactOptionalProperty(i,c))||(i[c]=us(e.properties[c],r,"".concat(t,"/").concat(c),i[c])));if(!bt(e.additionalProperties))return Pr(e,t,i);let a=Object.getOwnPropertyNames(i),u=e.additionalProperties,l=_({},i);for(let c of a)o.includes(c)||(l[c]=Pr(u,"".concat(t,"/").concat(c),l[c]));return Pr(e,t,l)}function Ez(e,r,t,n){if(!nt(n))return Pr(e,t,n);let o=Object.getOwnPropertyNames(e.patternProperties)[0],i=new RegExp(o),a=_({},n);for(let d of Object.getOwnPropertyNames(n))i.test(d)&&(a[d]=us(e.patternProperties[o],r,"".concat(t,"/").concat(d),a[d]));if(!bt(e.additionalProperties))return Pr(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=_({},a);for(let d of u)i.test(d)||(c[d]=Pr(l,"".concat(t,"/").concat(d),c[d]));return Pr(e,t,c)}function Iz(e,r,t,n){let o=Tt(e,r);return Pr(e,t,us(o,r,t,n))}function Sz(e,r,t,n){let o=Tt(e,r);return Pr(e,t,us(o,r,t,n))}function Cz(e,r,t,n){return et(n)&&et(e.items)?Pr(e,t,e.items.map((o,i)=>us(o,r,"".concat(t,"/").concat(i),n[i]))):Pr(e,t,n)}function Dz(e,r,t,n){for(let o of e.anyOf){if(!st(o,r,n))continue;let i=us(o,r,t,n);return Pr(e,t,i)}return Pr(e,t,n)}function us(e,r,t,n){let o=Fi(e,r),i=e;switch(e[oe]){case"Array":return yz(i,o,t,n);case"Intersect":return bz(i,o,t,n);case"Not":return vz(i,o,t,n);case"Object":return xz(i,o,t,n);case"Record":return Ez(i,o,t,n);case"Ref":return Iz(i,o,t,n);case"Symbol":return Pr(i,t,n);case"This":return Sz(i,o,t,n);case"Tuple":return Cz(i,o,t,n);case"Union":return Dz(i,o,t,n);default:return Pr(i,t,n)}}function bp(e,r,t){return us(e,r,"",t)}p();var vp=class extends We{constructor(r,t,n){super("The encoded value does not match the expected schema"),this.schema=r,this.value=t,this.error=n}},yc=class extends We{constructor(r,t,n,o){super("".concat(o instanceof Error?o.message:"Unknown error")),this.schema=r,this.path=t,this.value=n,this.error=o}};function no(e,r,t){try{return lr(e)?e[gr].Encode(t):t}catch(n){throw new yc(e,r,t,n)}}function Tz(e,r,t,n){let o=no(e,t,n);return et(o)?o.map((i,a)=>ls(e.items,r,"".concat(t,"/").concat(a),i)):o}function wz(e,r,t,n){let o=no(e,t,n);if(!nt(n)||Ln(n))return o;let i=ll(e),a=i.map(f=>f[0]),u=_({},o);for(let[f,h]of i)f in u&&(u[f]=ls(h,r,"".concat(t,"/").concat(f),u[f]));if(!lr(e.unevaluatedProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=_({},u);for(let f of l)a.includes(f)||(d[f]=no(c,"".concat(t,"/").concat(f),d[f]));return d}function Mz(e,r,t,n){return no(e.not,t,no(e,t,n))}function Az(e,r,t,n){let o=no(e,t,n);if(!nt(o))return o;let i=Sn(e),a=_({},o);for(let d of i)qe(a,d)&&(Ar(a[d])&&(!Jd(e.properties[d])||Gt.IsExactOptionalProperty(a,d))||(a[d]=ls(e.properties[d],r,"".concat(t,"/").concat(d),a[d])));if(!bt(e.additionalProperties))return a;let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=_({},a);for(let d of u)i.includes(d)||(c[d]=no(l,"".concat(t,"/").concat(d),c[d]));return c}function Pz(e,r,t,n){let o=no(e,t,n);if(!nt(n))return o;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=_({},o);for(let f of Object.getOwnPropertyNames(n))a.test(f)&&(u[f]=ls(e.patternProperties[i],r,"".concat(t,"/").concat(f),u[f]));if(!bt(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=_({},u);for(let f of l)a.test(f)||(d[f]=no(c,"".concat(t,"/").concat(f),d[f]));return d}function _z(e,r,t,n){let o=Tt(e,r),i=ls(o,r,t,n);return no(e,t,i)}function Oz(e,r,t,n){let o=Tt(e,r),i=ls(o,r,t,n);return no(e,t,i)}function Fz(e,r,t,n){let o=no(e,t,n);return et(e.items)?e.items.map((i,a)=>ls(i,r,"".concat(t,"/").concat(a),o[a])):[]}function kz(e,r,t,n){for(let o of e.anyOf){if(!st(o,r,n))continue;let i=ls(o,r,t,n);return no(e,t,i)}for(let o of e.anyOf){let i=ls(o,r,t,n);if(st(e,r,i))return no(e,t,i)}return no(e,t,n)}function ls(e,r,t,n){let o=Fi(e,r),i=e;switch(e[oe]){case"Array":return Tz(i,o,t,n);case"Intersect":return wz(i,o,t,n);case"Not":return Mz(i,o,t,n);case"Object":return Az(i,o,t,n);case"Record":return Pz(i,o,t,n);case"Ref":return _z(i,o,t,n);case"This":return Oz(i,o,t,n);case"Tuple":return Fz(i,o,t,n);case"Union":return kz(i,o,t,n);default:return no(i,t,n)}}function e1(e,r,t){return ls(e,r,"",t)}p();function Bz(e,r){return lr(e)||Cn(e.items,r)}function Lz(e,r){return lr(e)||Cn(e.items,r)}function Rz(e,r){return lr(e)||Cn(e.returns,r)||e.parameters.some(t=>Cn(t,r))}function Nz(e,r){return lr(e)||Cn(e.returns,r)||e.parameters.some(t=>Cn(t,r))}function jz(e,r){return lr(e)||lr(e.unevaluatedProperties)||e.allOf.some(t=>Cn(t,r))}function Uz(e,r){return lr(e)||Cn(e.items,r)}function Gz(e,r){return lr(e)||Cn(e.not,r)}function zz(e,r){return lr(e)||Object.values(e.properties).some(t=>Cn(t,r))||bt(e.additionalProperties)&&Cn(e.additionalProperties,r)}function Vz(e,r){return lr(e)||Cn(e.item,r)}function $z(e,r){let t=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[t];return lr(e)||Cn(n,r)||bt(e.additionalProperties)&&lr(e.additionalProperties)}function Hz(e,r){return lr(e)?!0:Cn(Tt(e,r),r)}function Zz(e,r){return lr(e)?!0:Cn(Tt(e,r),r)}function Wz(e,r){return lr(e)||!Ar(e.items)&&e.items.some(t=>Cn(t,r))}function Xz(e,r){return lr(e)||e.anyOf.some(t=>Cn(t,r))}function Cn(e,r){let t=Fi(e,r),n=e;if(e.$id&&N3.has(e.$id))return!1;switch(e.$id&&N3.add(e.$id),e[oe]){case"Array":return Bz(n,t);case"AsyncIterator":return Lz(n,t);case"Constructor":return Rz(n,t);case"Function":return Nz(n,t);case"Intersect":return jz(n,t);case"Iterator":return Uz(n,t);case"Not":return Gz(n,t);case"Object":return zz(n,t);case"Promise":return Vz(n,t);case"Record":return $z(n,t);case"Ref":return Hz(n,t);case"This":return Zz(n,t);case"Tuple":return Wz(n,t);case"Union":return Xz(n,t);default:return lr(e)}}var N3=new Set;function cs(e,r){return N3.clear(),Cn(e,r)}function Z5(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!st(r,t,n))throw new yp(r,n,is(r,t,n).First());return cs(r,t)?bp(r,t,n):n}p();function iu(e,r){let t=qe(e,"default")?e.default:void 0,n=ol(t)?t():wt(t);return Ar(r)?n:nt(r)&&nt(n)?Object.assign(n,r):r}function j3(e){return al(e)&&"default"in e}function qz(e,r,t){let n=iu(e,t);if(!et(n))return n;for(let o=0;o<n.length;o++)n[o]=ui(e.items,r,n[o]);return n}function Jz(e,r,t){return mo(t)?t:iu(e,t)}function Yz(e,r,t){let n=iu(e,t);return e.allOf.reduce((o,i)=>{let a=ui(i,r,n);return nt(a)?_(_({},o),a):a},{})}function Kz(e,r,t){let n=iu(e,t);if(!nt(n))return n;let o=Object.getOwnPropertyNames(e.properties);for(let i of o){let a=ui(e.properties[i],r,n[i]);Ar(a)||(n[i]=ui(e.properties[i],r,n[i]))}if(!j3(e.additionalProperties))return n;for(let i of Object.getOwnPropertyNames(n))o.includes(i)||(n[i]=ui(e.additionalProperties,r,n[i]));return n}function Qz(e,r,t){let n=iu(e,t);if(!nt(n))return n;let o=e.additionalProperties,[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let l of Object.getOwnPropertyNames(n))u.test(l)&&j3(a)&&(n[l]=ui(a,r,n[l]));if(!j3(o))return n;for(let l of Object.getOwnPropertyNames(n))u.test(l)||(n[l]=ui(o,r,n[l]));return n}function eV(e,r,t){return ui(Tt(e,r),r,iu(e,t))}function tV(e,r,t){return ui(Tt(e,r),r,t)}function rV(e,r,t){let n=iu(e,t);if(!et(n)||Ar(e.items))return n;let[o,i]=[e.items,Math.max(e.items.length,n.length)];for(let a=0;a<i;a++)a<o.length&&(n[a]=ui(o[a],r,n[a]));return n}function nV(e,r,t){let n=iu(e,t);for(let o of e.anyOf){let i=ui(o,r,wt(n));if(st(o,r,i))return i}return n}function ui(e,r,t){let n=Fi(e,r),o=e;switch(o[oe]){case"Array":return qz(o,n,t);case"Date":return Jz(o,n,t);case"Intersect":return Yz(o,n,t);case"Object":return Kz(o,n,t);case"Record":return Qz(o,n,t);case"Ref":return eV(o,n,t);case"This":return tV(o,n,t);case"Tuple":return rV(o,n,t);case"Union":return nV(o,n,t);default:return iu(o,t)}}function t1(...e){return e.length===3?ui(e[0],e[1],e[2]):ui(e[0],[],e[1])}p();p();var Li={};qu(Li,{Delete:()=>iV,Format:()=>dh,Get:()=>sV,Has:()=>aV,Set:()=>oV,ValuePointerRootDeleteError:()=>n1,ValuePointerRootSetError:()=>r1});p();var r1=class extends We{constructor(r,t,n){super("Cannot set root value"),this.value=r,this.path=t,this.update=n}},n1=class extends We{constructor(r,t){super("Cannot delete root value"),this.value=r,this.path=t}};function W5(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function*dh(e){if(e==="")return;let[r,t]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(t=n,yield W5(e.slice(r,t))),r=n+1):t=n;yield W5(e.slice(r))}function oV(e,r,t){if(r==="")throw new r1(e,r,t);let[n,o,i]=[null,e,""];for(let a of dh(r))o[a]===void 0&&(o[a]={}),n=o,o=o[a],i=a;n[i]=t}function iV(e,r){if(r==="")throw new n1(e,r);let[t,n,o]=[null,e,""];for(let i of dh(r)){if(n[i]===void 0||n[i]===null)return;t=n,n=n[i],o=i}if(Array.isArray(t)){let i=parseInt(o);t.splice(i,1)}else delete t[o]}function aV(e,r){if(r==="")return!0;let[t,n,o]=[null,e,""];for(let i of dh(r)){if(n[i]===void 0)return!1;t=n,n=n[i],o=i}return Object.getOwnPropertyNames(t).includes(o)}function sV(e,r){if(r==="")return e;let t=e;for(let n of dh(r)){if(t[n]===void 0)return;t=t[n]}return t}p();function uV(e,r){if(!nt(r))return!1;let t=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(r),...Object.getOwnPropertySymbols(r)];return t.length!==n.length?!1:t.every(o=>bc(e[o],r[o]))}function lV(e,r){return mo(r)&&e.getTime()===r.getTime()}function cV(e,r){return!et(r)||e.length!==r.length?!1:e.every((t,n)=>bc(t,r[n]))}function dV(e,r){return!Ti(r)||e.length!==r.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(r).constructor.name?!1:e.every((t,n)=>bc(t,r[n]))}function pV(e,r){return e===r}function bc(e,r){if(mo(e))return lV(e,r);if(Ti(e))return dV(e,r);if(et(e))return cV(e,r);if(nt(e))return uV(e,r);if(Ln(e))return pV(e,r);throw new Error("ValueEquals: Unable to compare value")}var fV=Qt({type:Lt("insert"),path:Mi(),value:ru()}),mV=Qt({type:Lt("update"),path:Mi(),value:ru()}),hV=Qt({type:Lt("delete"),path:Mi()}),q5=Ht([fV,mV,hV]),o1=class extends We{constructor(r,t){super(t),this.value=r}};function i1(e,r){return{type:"update",path:e,value:r}}function J5(e,r){return{type:"insert",path:e,value:r}}function Y5(e){return{type:"delete",path:e}}function X5(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new o1(e,"Cannot diff objects with symbols")}function*gV(e,r,t){if(X5(r),X5(t),!zx(t))return yield i1(e,t);let n=globalThis.Object.getOwnPropertyNames(r),o=globalThis.Object.getOwnPropertyNames(t);for(let i of o)qe(r,i)||(yield J5("".concat(e,"/").concat(i),t[i]));for(let i of n)qe(t,i)&&(bc(r,t)||(yield*be(a1("".concat(e,"/").concat(i),r[i],t[i]))));for(let i of n)qe(t,i)||(yield Y5("".concat(e,"/").concat(i)))}function*yV(e,r,t){if(!et(t))return yield i1(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*be(a1("".concat(e,"/").concat(n),r[n],t[n]));for(let n=0;n<t.length;n++)n<r.length||(yield J5("".concat(e,"/").concat(n),t[n]));for(let n=r.length-1;n>=0;n--)n<t.length||(yield Y5("".concat(e,"/").concat(n)))}function*bV(e,r,t){if(!Ti(t)||r.length!==t.length||globalThis.Object.getPrototypeOf(r).constructor.name!==globalThis.Object.getPrototypeOf(t).constructor.name)return yield i1(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*be(a1("".concat(e,"/").concat(n),r[n],t[n]))}function*vV(e,r,t){r!==t&&(yield i1(e,t))}function*a1(e,r,t){if(zx(r))return yield*be(gV(e,r,t));if(et(r))return yield*be(yV(e,r,t));if(Ti(r))return yield*be(bV(e,r,t));if(Ln(r))return yield*be(vV(e,r,t));throw new o1(r,"Unable to diff value")}function K5(e,r){return[...a1("",e,r)]}function xV(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}function EV(e){return e.length===0}function Q5(e,r){if(xV(r))return wt(r[0].value);if(EV(r))return wt(e);let t=wt(e);for(let n of r)switch(n.type){case"insert":{Li.Set(t,n.path,n.value);break}case"update":{Li.Set(t,n.path,n.value);break}case"delete":{Li.Delete(t,n.path);break}}return t}p();function ew(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],o=cs(r,t)?e1(r,t,n):n;if(!st(r,t,o))throw new vp(r,o,is(r,t,o).First());return o}p();var s1=class extends We{constructor(r){super(r)}};function IV(e,r,t,n){if(!nt(t))Li.Set(e,r,wt(n));else{let o=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(n);for(let a of o)i.includes(a)||delete t[a];for(let a of i)o.includes(a)||(t[a]=null);for(let a of i)U3(e,"".concat(r,"/").concat(a),t[a],n[a])}}function SV(e,r,t,n){if(!et(t))Li.Set(e,r,wt(n));else{for(let o=0;o<n.length;o++)U3(e,"".concat(r,"/").concat(o),t[o],n[o]);t.splice(n.length)}}function CV(e,r,t,n){if(Ti(t)&&t.length===n.length)for(let o=0;o<t.length;o++)t[o]=n[o];else Li.Set(e,r,wt(n))}function DV(e,r,t,n){t!==n&&Li.Set(e,r,n)}function U3(e,r,t,n){if(et(n))return SV(e,r,t,n);if(Ti(n))return CV(e,r,t,n);if(nt(n))return IV(e,r,t,n);if(Ln(n))return DV(e,r,t,n)}function tw(e){return Ti(e)||Ln(e)}function TV(e,r){return nt(e)&&et(r)||et(e)&&nt(r)}function rw(e,r){if(tw(e)||tw(r))throw new s1("Only object and array types can be mutated at the root level");if(TV(e,r))throw new s1("Cannot assign due type mismatch of assignable values");U3(e,"",e,r)}p();var wV=[(e,r,t)=>wt(t),(e,r,t)=>t1(e,r,t),(e,r,t)=>Yy(e,r,t),(e,r,t)=>Qy(e,r,t),(e,r,t)=>(qy(e,r,t),t),(e,r,t)=>cs(e,r)?bp(e,r,t):t];function nw(e,r,t){return wV.reduce((n,o)=>o(e,r,n),t)}function ow(...e){return e.length===3?nw(e[0],e[1],e[2]):nw(e[0],[],e[1])}p();var Ri={};qu(Ri,{Assert:()=>qy,Cast:()=>R3,Check:()=>st,Clean:()=>Yy,Clone:()=>wt,Convert:()=>Qy,Create:()=>Bi,Decode:()=>Z5,Default:()=>t1,Diff:()=>K5,Edit:()=>q5,Encode:()=>ew,Equal:()=>bc,Errors:()=>is,Hash:()=>pl,Mutate:()=>rw,Parse:()=>ow,Patch:()=>Q5,ValueErrorIterator:()=>ki});p();p();var iw={},MV=function(e,r,t,n,o){var i=new Worker(iw[r]||(iw[r]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(a){var u=a.data,l=u.$e$;if(l){var c=new Error(l[0]);c.code=l[1],c.stack=l[2],o(c,null)}else o(null,u)},i.postMessage(t,n),i},er=Uint8Array,bo=Uint16Array,hh=Int32Array,Cp=new er([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]),Dp=new er([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]),ph=new er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),uw=function(e,r){for(var t=new bo(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new hh(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)o[i]=i-t[n]<<5|n;return{b:t,r:o}},lw=uw(Cp,2),Z3=lw.b,p1=lw.r;Z3[28]=258,p1[258]=28;var cw=uw(Dp,0),dw=cw.b,z3=cw.r,fh=new bo(32768);for(Nt=0;Nt<32768;++Nt)au=(Nt&43690)>>1|(Nt&21845)<<1,au=(au&52428)>>2|(au&13107)<<2,au=(au&61680)>>4|(au&3855)<<4,fh[Nt]=((au&65280)>>8|(au&255)<<8)>>1;var au,Nt,ji=function(e,r,t){for(var n=e.length,o=0,i=new bo(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new bo(r);for(o=1;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var u;if(t){u=new bo(1<<r);var l=15-r;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],d=r-e[o],f=a[e[o]-1]++<<d,h=f|(1<<d)-1;f<=h;++f)u[fh[f]>>l]=c}else for(u=new bo(n),o=0;o<n;++o)e[o]&&(u[o]=fh[a[e[o]-1]++]>>15-e[o]);return u},su=new er(288);for(Nt=0;Nt<144;++Nt)su[Nt]=8;var Nt;for(Nt=144;Nt<256;++Nt)su[Nt]=9;var Nt;for(Nt=256;Nt<280;++Nt)su[Nt]=7;var Nt;for(Nt=280;Nt<288;++Nt)su[Nt]=8;var Nt,Ip=new er(32);for(Nt=0;Nt<32;++Nt)Ip[Nt]=5;var Nt,pw=ji(su,9,0),fw=ji(su,9,1),mw=ji(Ip,5,0),hw=ji(Ip,5,1),l1=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Ni=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},c1=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},gh=function(e){return(e+7)/8|0},fl=function(e,r,t){return(r==null||r<0)&&(r=0),(t==null||t>e.length)&&(t=e.length),new er(e.subarray(r,t))},g1={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},gw=["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"],_r=function(e,r,t){var n=new Error(r||gw[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,_r),!t)throw n;return n},yw=function(e,r,t,n){var o=e.length,i=n?n.length:0;if(!o||r.f&&!r.l)return t||new er(0);var a=!t,u=a||r.i!=2,l=r.i;a&&(t=new er(o*3));var c=function(Z){var De=t.length;if(Z>De){var Ie=new er(Math.max(De*2,Z));Ie.set(t),t=Ie}},d=r.f||0,f=r.p||0,h=r.b||0,g=r.l,b=r.d,I=r.m,v=r.n,E=o*8;do{if(!g){d=Ni(e,f,1);var T=Ni(e,f+1,3);if(f+=3,T)if(T==1)g=fw,b=hw,I=9,v=5;else if(T==2){var X=Ni(e,f,31)+257,L=Ni(e,f+10,15)+4,P=X+Ni(e,f+5,31)+1;f+=14;for(var R=new er(P),$=new er(19),V=0;V<L;++V)$[ph[V]]=Ni(e,f+V*3,7);f+=L*3;for(var H=l1($),re=(1<<H)-1,j=ji($,H,1),V=0;V<P;){var me=j[Ni(e,f,re)];f+=me&15;var D=me>>4;if(D<16)R[V++]=D;else{var z=0,ue=0;for(D==16?(ue=3+Ni(e,f,3),f+=2,z=R[V-1]):D==17?(ue=3+Ni(e,f,7),f+=3):D==18&&(ue=11+Ni(e,f,127),f+=7);ue--;)R[V++]=z}}var se=R.subarray(0,X),pe=R.subarray(X);I=l1(se),v=l1(pe),g=ji(se,I,1),b=ji(pe,v,1)}else _r(1);else{var D=gh(f)+4,w=e[D-4]|e[D-3]<<8,B=D+w;if(B>o){l&&_r(0);break}u&&c(h+w),t.set(e.subarray(D,B),h),r.b=h+=w,r.p=f=B*8,r.f=d;continue}if(f>E){l&&_r(0);break}}u&&c(h+131072);for(var le=(1<<I)-1,ye=(1<<v)-1,Fe=f;;Fe=f){var z=g[c1(e,f)&le],Ee=z>>4;if(f+=z&15,f>E){l&&_r(0);break}if(z||_r(2),Ee<256)t[h++]=Ee;else if(Ee==256){Fe=f,g=null;break}else{var Oe=Ee-254;if(Ee>264){var V=Ee-257,we=Cp[V];Oe=Ni(e,f,(1<<we)-1)+Z3[V],f+=we}var Le=b[c1(e,f)&ye],Qe=Le>>4;Le||_r(3),f+=Le&15;var pe=dw[Qe];if(Qe>3){var we=Dp[Qe];pe+=c1(e,f)&(1<<we)-1,f+=we}if(f>E){l&&_r(0);break}u&&c(h+131072);var Ge=h+Oe;if(h<pe){var N=i-pe,xe=Math.min(pe,Ge);for(N+h<0&&_r(3);h<xe;++h)t[h]=n[N+h]}for(;h<Ge;++h)t[h]=t[h-pe]}}r.l=g,r.p=Fe,r.b=h,r.f=d,g&&(d=1,r.m=I,r.d=b,r.n=v)}while(!d);return h!=t.length&&a?fl(t,0,h):t.subarray(0,h)},ds=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},xp=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8,e[n+2]|=t>>16},d1=function(e,r){for(var t=[],n=0;n<e.length;++n)e[n]&&t.push({s:n,f:e[n]});var o=t.length,i=t.slice();if(!o)return{t:X3,l:0};if(o==1){var a=new er(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(B,X){return B.f-X.f}),t.push({s:-1,f:25001});var u=t[0],l=t[1],c=0,d=1,f=2;for(t[0]={s:-1,f:u.f+l.f,l:u,r:l};d!=o-1;)u=t[t[c].f<t[f].f?c++:f++],l=t[c!=d&&t[c].f<t[f].f?c++:f++],t[d++]={s:-1,f:u.f+l.f,l:u,r:l};for(var h=i[0].s,n=1;n<o;++n)i[n].s>h&&(h=i[n].s);var g=new bo(h+1),b=f1(t[d-1],g,0);if(b>r){var n=0,I=0,v=b-r,E=1<<v;for(i.sort(function(X,L){return g[L.s]-g[X.s]||X.f-L.f});n<o;++n){var T=i[n].s;if(g[T]>r)I+=E-(1<<b-g[T]),g[T]=r;else break}for(I>>=v;I>0;){var D=i[n].s;g[D]<r?I-=1<<r-g[D]++-1:++n}for(;n>=0&&I;--n){var w=i[n].s;g[w]==r&&(--g[w],++I)}b=r}return{t:new er(g),l:b}},f1=function(e,r,t){return e.s==-1?Math.max(f1(e.l,r,t+1),f1(e.r,r,t+1)):r[e.s]=t},V3=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new bo(++r),n=0,o=e[0],i=1,a=function(l){t[n++]=l},u=1;u<=r;++u)if(e[u]==o&&u!=r)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[u]}return{c:t.subarray(0,n),n:r}},Ep=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},W3=function(e,r,t){var n=t.length,o=gh(r+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=t[i];return(o+4+n)*8},$3=function(e,r,t,n,o,i,a,u,l,c,d){ds(r,d++,t),++o[256];for(var f=d1(o,15),h=f.t,g=f.l,b=d1(i,15),I=b.t,v=b.l,E=V3(h),T=E.c,D=E.n,w=V3(I),B=w.c,X=w.n,L=new bo(19),P=0;P<T.length;++P)++L[T[P]&31];for(var P=0;P<B.length;++P)++L[B[P]&31];for(var R=d1(L,7),$=R.t,V=R.l,H=19;H>4&&!$[ph[H-1]];--H);var re=c+5<<3,j=Ep(o,su)+Ep(i,Ip)+a,me=Ep(o,h)+Ep(i,I)+a+14+3*H+Ep(L,$)+2*L[16]+3*L[17]+7*L[18];if(l>=0&&re<=j&&re<=me)return W3(r,d,e.subarray(l,l+c));var z,ue,se,pe;if(ds(r,d,1+(me<j)),d+=2,me<j){z=ji(h,g,0),ue=h,se=ji(I,v,0),pe=I;var le=ji($,V,0);ds(r,d,D-257),ds(r,d+5,X-1),ds(r,d+10,H-4),d+=14;for(var P=0;P<H;++P)ds(r,d+3*P,$[ph[P]]);d+=3*H;for(var ye=[T,B],Fe=0;Fe<2;++Fe)for(var Ee=ye[Fe],P=0;P<Ee.length;++P){var Oe=Ee[P]&31;ds(r,d,le[Oe]),d+=$[Oe],Oe>15&&(ds(r,d,Ee[P]>>5&127),d+=Ee[P]>>12)}}else z=pw,ue=su,se=mw,pe=Ip;for(var P=0;P<u;++P){var we=n[P];if(we>255){var Oe=we>>18&31;xp(r,d,z[Oe+257]),d+=ue[Oe+257],Oe>7&&(ds(r,d,we>>23&31),d+=Cp[Oe]);var Le=we&31;xp(r,d,se[Le]),d+=pe[Le],Le>3&&(xp(r,d,we>>5&8191),d+=Dp[Le])}else xp(r,d,z[we]),d+=ue[we]}return xp(r,d,z[256]),d+ue[256]},bw=new hh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),X3=new er(0),vw=function(e,r,t,n,o,i){var a=i.z||e.length,u=new er(n+a+5*(1+Math.ceil(a/7e3))+o),l=u.subarray(n,u.length-o),c=i.l,d=(i.r||0)&7;if(r){d&&(l[0]=i.r>>3);for(var f=bw[r-1],h=f>>13,g=f&8191,b=(1<<t)-1,I=i.p||new bo(32768),v=i.h||new bo(b+1),E=Math.ceil(t/3),T=2*E,D=function(ve){return(e[ve]^e[ve+1]<<E^e[ve+2]<<T)&b},w=new hh(25e3),B=new bo(288),X=new bo(32),L=0,P=0,R=i.i||0,$=0,V=i.w||0,H=0;R+2<a;++R){var re=D(R),j=R&32767,me=v[re];if(I[j]=me,v[re]=j,V<=R){var z=a-R;if((L>7e3||$>24576)&&(z>423||!c)){d=$3(e,l,0,w,B,X,P,$,H,R-H,d),$=L=P=0,H=R;for(var ue=0;ue<286;++ue)B[ue]=0;for(var ue=0;ue<30;++ue)X[ue]=0}var se=2,pe=0,le=g,ye=j-me&32767;if(z>2&&re==D(R-ye))for(var Fe=Math.min(h,z)-1,Ee=Math.min(32767,R),Oe=Math.min(258,z);ye<=Ee&&--le&&j!=me;){if(e[R+se]==e[R+se-ye]){for(var we=0;we<Oe&&e[R+we]==e[R+we-ye];++we);if(we>se){if(se=we,pe=ye,we>Fe)break;for(var Le=Math.min(ye,we-2),Qe=0,ue=0;ue<Le;++ue){var Ge=R-ye+ue&32767,N=I[Ge],xe=Ge-N&32767;xe>Qe&&(Qe=xe,me=Ge)}}}j=me,me=I[j],ye+=j-me&32767}if(pe){w[$++]=268435456|p1[se]<<18|z3[pe];var Z=p1[se]&31,De=z3[pe]&31;P+=Cp[Z]+Dp[De],++B[257+Z],++X[De],V=R+se,++L}else w[$++]=e[R],++B[e[R]]}}for(R=Math.max(R,V);R<a;++R)w[$++]=e[R],++B[e[R]];d=$3(e,l,c,w,B,X,P,$,H,R-H,d),c||(i.r=d&7|l[d/8|0]<<3,d-=7,i.h=v,i.p=I,i.i=R,i.w=V)}else{for(var R=i.w||0;R<a+c;R+=65535){var Ie=R+65535;Ie>=a&&(l[d/8|0]=c,Ie=a),d=W3(l,d+1,e.subarray(R,Ie))}i.i=a}return fl(u,0,n+gh(d)+o)},AV=function(){for(var e=new Int32Array(256),r=0;r<256;++r){for(var t=r,n=9;--n;)t=(t&1&&-306674912)^t>>>1;e[r]=t}return e}(),xw=function(){var e=-1;return{p:function(r){for(var t=e,n=0;n<r.length;++n)t=AV[t&255^r[n]]^t>>>8;e=t},d:function(){return~e}}};var Ew=function(e,r,t,n,o){if(!o&&(o={l:1},r.dictionary)){var i=r.dictionary.subarray(-32768),a=new er(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length}return vw(e,r.level==null?6:r.level,r.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+r.mem,t,n,o)},y1=function(e,r){var t={};for(var n in e)t[n]=e[n];for(var n in r)t[n]=r[n];return t},aw=function(e,r,t){for(var n=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var u=n[a],l=i[a];if(typeof u=="function"){r+=";"+l+"=";var c=u.toString();if(u.prototype)if(c.indexOf("[native code]")!=-1){var d=c.indexOf(" ",8)+1;r+=c.slice(d,c.indexOf("(",d))}else{r+=c;for(var f in u.prototype)r+=";"+l+".prototype."+f+"="+u.prototype[f].toString()}else r+=c}else t[l]=u}return r},u1=[],PV=function(e){var r=[];for(var t in e)e[t].buffer&&r.push((e[t]=new e[t].constructor(e[t])).buffer);return r},_V=function(e,r,t,n){if(!u1[t]){for(var o="",i={},a=e.length-1,u=0;u<a;++u)o=aw(e[u],o,i);u1[t]={c:aw(e[a],o,i),e:i}}var l=y1({},u1[t].e);return MV(u1[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,l,PV(l),n)},OV=function(){return[er,bo,hh,Cp,Dp,ph,Z3,dw,fw,hw,fh,gw,ji,l1,Ni,c1,gh,fl,_r,yw,x1,b1,Iw]},FV=function(){return[er,bo,hh,Cp,Dp,ph,p1,z3,pw,su,mw,Ip,fh,bw,X3,ji,ds,xp,d1,f1,V3,Ep,W3,$3,gh,fl,vw,Ew,v1,b1]};var b1=function(e){return postMessage(e,[e.buffer])},Iw=function(e){return e&&{out:e.size&&new er(e.size),dictionary:e.dictionary}},Sw=function(e,r,t,n,o,i){var a=_V(t,n,o,function(u,l){a.terminate(),i(u,l)});return a.postMessage([e,r],r.consume?[e.buffer]:[]),function(){a.terminate()}};var la=function(e,r){return e[r]|e[r+1]<<8},Gn=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},G3=function(e,r){return Gn(e,r)+Gn(e,r+4)*4294967296},Un=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8};function kV(e,r,t){return t||(t=r,r={}),typeof t!="function"&&_r(7),Sw(e,r,[FV],function(n){return b1(v1(n.data[0],n.data[1]))},0,t)}function v1(e,r){return Ew(e,r||{},0,0)}function BV(e,r,t){return t||(t=r,r={}),typeof t!="function"&&_r(7),Sw(e,r,[OV],function(n){return b1(x1(n.data[0],Iw(n.data[1])))},1,t)}function x1(e,r){return yw(e,{i:2},r&&r.out,r&&r.dictionary)}var q3=function(e,r,t,n){for(var o in e){var i=e[o],a=r+o,u=n;Array.isArray(i)&&(u=y1(n,i[1]),i=i[0]),i instanceof er?t[a]=[i,u]:(t[a+="/"]=[new er(0),u],q3(i,a,t,n))}},sw=typeof TextEncoder<"u"&&new TextEncoder,H3=typeof TextDecoder<"u"&&new TextDecoder,LV=0;try{H3.decode(X3,{stream:!0}),LV=1}catch(e){}var RV=function(e){for(var r="",t=0;;){var n=e[t++],o=(n>127)+(n>223)+(n>239);if(t+o>e.length)return{s:r,r:fl(e,t-1)};o?o==3?(n=((n&15)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?r+=String.fromCharCode((n&31)<<6|e[t++]&63):r+=String.fromCharCode((n&15)<<12|(e[t++]&63)<<6|e[t++]&63):r+=String.fromCharCode(n)}};function Sp(e,r){if(r){for(var t=new er(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}if(sw)return sw.encode(e);for(var o=e.length,i=new er(e.length+(e.length>>1)),a=0,u=function(d){i[a++]=d},n=0;n<o;++n){if(a+5>i.length){var l=new er(a+8+(o-n<<1));l.set(i),i=l}var c=e.charCodeAt(n);c<128||r?u(c):c<2048?(u(192|c>>6),u(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,u(240|c>>18),u(128|c>>12&63),u(128|c>>6&63),u(128|c&63)):(u(224|c>>12),u(128|c>>6&63),u(128|c&63))}return fl(i,0,a)}function J3(e,r){if(r){for(var t="",n=0;n<e.length;n+=16384)t+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return t}else{if(H3)return H3.decode(e);var o=RV(e),i=o.s,t=o.r;return t.length&&_r(8),i}}var Cw=function(e,r){return r+30+la(e,r+26)+la(e,r+28)},Dw=function(e,r,t){var n=la(e,r+28),o=J3(e.subarray(r+46,r+46+n),!(la(e,r+8)&2048)),i=r+46+n,a=Gn(e,r+20),u=t&&a==4294967295?NV(e,i):[a,Gn(e,r+24),Gn(e,r+42)],l=u[0],c=u[1],d=u[2];return[la(e,r+10),l,c,o,i+la(e,r+30)+la(e,r+32),d]},NV=function(e,r){for(;la(e,r)!=1;r+=4+la(e,r+2));return[G3(e,r+12),G3(e,r+4),G3(e,r+20)]},mh=function(e){var r=0;if(e)for(var t in e){var n=e[t].length;n>65535&&_r(9),r+=n+4}return r},m1=function(e,r,t,n,o,i,a,u){var l=n.length,c=t.extra,d=u&&u.length,f=mh(c);Un(e,r,a!=null?33639248:67324752),r+=4,a!=null&&(e[r++]=20,e[r++]=t.os),e[r]=20,r+=2,e[r++]=t.flag<<1|(i<0&&8),e[r++]=o&&8,e[r++]=t.compression&255,e[r++]=t.compression>>8;var h=new Date(t.mtime==null?Date.now():t.mtime),g=h.getFullYear()-1980;if((g<0||g>119)&&_r(10),Un(e,r,g<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),r+=4,i!=-1&&(Un(e,r,t.crc),Un(e,r+4,i<0?-i-2:i),Un(e,r+8,t.size)),Un(e,r+12,l),Un(e,r+14,f),r+=16,a!=null&&(Un(e,r,d),Un(e,r+6,t.attrs),Un(e,r+10,a),r+=14),e.set(n,r),r+=l,f)for(var b in c){var I=c[b],v=I.length;Un(e,r,+b),Un(e,r+2,v),e.set(I,r+4),r+=4+v}return d&&(e.set(u,r),r+=d),r},Tw=function(e,r,t,n,o){Un(e,r,101010256),Un(e,r+8,t),Un(e,r+10,t),Un(e,r+12,n),Un(e,r+16,o)};function ww(e,r,t){t||(t=r,r={}),typeof t!="function"&&_r(7);var n={};q3(e,"",n,r);var o=Object.keys(n),i=o.length,a=0,u=0,l=i,c=new Array(i),d=[],f=function(){for(var v=0;v<d.length;++v)d[v]()},h=function(v,E){h1(function(){t(v,E)})};h1(function(){h=t});var g=function(){var v=new er(u+22),E=a,T=u-a;u=0;for(var D=0;D<l;++D){var w=c[D];try{var B=w.c.length;m1(v,u,w,w.f,w.u,B);var X=30+w.f.length+mh(w.extra),L=u+X;v.set(w.c,L),m1(v,a,w,w.f,w.u,B,u,w.m),a+=16+X+(w.m?w.m.length:0),u=L+B}catch(P){return h(P,null)}}Tw(v,a,c.length,T,E),h(null,v)};i||g();for(var b=function(v){var E=o[v],T=n[E],D=T[0],w=T[1],B=xw(),X=D.length;B.p(D);var L=Sp(E),P=L.length,R=w.comment,$=R&&Sp(R),V=$&&$.length,H=mh(w.extra),re=w.level==0?0:8,j=function(me,z){if(me)f(),h(me,null);else{var ue=z.length;c[v]=y1(w,{size:X,crc:B.d(),c:z,f:L,m:$,u:P!=E.length||$&&R.length!=V,compression:re}),a+=30+P+H+ue,u+=76+2*(P+H)+(V||0)+ue,--i||g()}};if(P>65535&&j(_r(11,0,1),null),!re)j(null,D);else if(X<16e4)try{j(null,v1(D,w))}catch(me){j(me,null)}else d.push(kV(D,w,j))},I=0;I<l;++I)b(I);return f}function Mw(e,r){r||(r={});var t={},n=[];q3(e,"",t,r);var o=0,i=0;for(var a in t){var u=t[a],l=u[0],c=u[1],d=c.level==0?0:8,f=Sp(a),h=f.length,g=c.comment,b=g&&Sp(g),I=b&&b.length,v=mh(c.extra);h>65535&&_r(11);var E=d?v1(l,c):l,T=E.length,D=xw();D.p(l),n.push(y1(c,{size:l.length,crc:D.d(),c:E,f,m:b,u:h!=a.length||b&&g.length!=I,o,compression:d})),o+=30+h+v+T,i+=76+2*(h+v)+(I||0)+T}for(var w=new er(i+22),B=o,X=i-o,L=0;L<n.length;++L){var f=n[L];m1(w,f.o,f,f.f,f.u,f.c.length);var P=30+f.f.length+mh(f.extra);w.set(f.c,f.o+P),m1(w,o,f,f.f,f.u,f.c.length,f.o,f.m),o+=16+P+(f.m?f.m.length:0)}return Tw(w,o,n.length,X,B),w}var h1=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function Aw(e,r,t){t||(t=r,r={}),typeof t!="function"&&_r(7);var n=[],o=function(){for(var v=0;v<n.length;++v)n[v]()},i={},a=function(v,E){h1(function(){t(v,E)})};h1(function(){a=t});for(var u=e.length-22;Gn(e,u)!=101010256;--u)if(!u||e.length-u>65558)return a(_r(13,0,1),null),o;var l=la(e,u+8);if(l){var c=l,d=Gn(e,u+16),f=d==4294967295||c==65535;if(f){var h=Gn(e,u-12);f=Gn(e,h)==101075792,f&&(c=l=Gn(e,h+32),d=Gn(e,h+48))}for(var g=r&&r.filter,b=function(v){var E=Dw(e,d,f),T=E[0],D=E[1],w=E[2],B=E[3],X=E[4],L=E[5],P=Cw(e,L);d=X;var R=function(V,H){V?(o(),a(V,null)):(H&&(i[B]=H),--l||a(null,i))};if(!g||g({name:B,size:D,originalSize:w,compression:T}))if(!T)R(null,fl(e,P,P+D));else if(T==8){var $=e.subarray(P,P+D);if(w<524288||D>.8*w)try{R(null,x1($,{out:new er(w)}))}catch(V){R(V,null)}else n.push(BV($,{size:w},R))}else R(_r(14,"unknown compression type "+T,1),null);else R(null,null)},I=0;I<c;++I)b(I)}else a(null,{});return o}function Pw(e,r){for(var t={},n=e.length-22;Gn(e,n)!=101010256;--n)(!n||e.length-n>65558)&&_r(13);var o=la(e,n+8);if(!o)return{};var i=Gn(e,n+16),a=i==4294967295||o==65535;if(a){var u=Gn(e,n-12);a=Gn(e,u)==101075792,a&&(o=Gn(e,u+32),i=Gn(e,u+48))}for(var l=r&&r.filter,c=0;c<o;++c){var d=Dw(e,i,a),f=d[0],h=d[1],g=d[2],b=d[3],I=d[4],v=d[5],E=Cw(e,v);i=I,(!l||l({name:b,size:h,originalSize:g,compression:f}))&&(f?f==8?t[b]=x1(e.subarray(E,E+h),{out:new er(g)}):_r(14,"unknown compression type "+f):t[b]=fl(e,E,E+h))}return t}p();var jV=e=>{if(e!=null)return e.trim()===""?void 0:e},UV=e=>e!=null,E1=(e,r,t=0)=>{var n;if(U.IsNull(e))return"null";if(U.IsUndefined(e))return"undefined";if(U.IsString(e))return"<string>";if(U.IsNumber(e))return"<number>";if(U.IsBoolean(e))return"<boolean>";if(U.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(U.IsRef(e)){let o=r.find(i=>i.$id===e.$ref);return o==null?e.$ref:E1(o,r,t)}if(U.IsArray(e))return"".concat(E1(e.items,r,t+1),"[]");if(U.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let i="".concat(e.anyOf.map(a=>E1(a,r,t+1)).filter(UV).join(" | "));return t>0?"(".concat(i,")"):i}return(n=e.$id)!=null?n:""},GV=(e,r,t)=>{var i;let n=r.message;U.IsUnion(r.schema)&&(n="Expected one of: ".concat(E1(r.schema,t)));let o="#/definitions/".concat(e).concat((i=jV(r.path))!=null?i:"");return"".concat(o,": ").concat(n)},I1=(e,r,t)=>{let n=r.First();if(n!=null)return GV(e,n,t)};var Tp;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Tp||(Tp={}));var wp=class extends Error{constructor(t,n){super(n);m(this,"name");m(this,"kind");this.name="CompressError",this.kind=t}},zV=e=>new wp(Tp.Archive,e.message),VV=e=>{let r=Object.values(g1);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},$V=(e,r,t)=>{var n;return new wp(Tp.Validate,(n=I1(e,r,t))!=null?n:"Unknown validate error")},HV=e=>new wp(Tp.Encode,e.message),ZV=e=>new wp(Tp.Unknown,e instanceof Error?e.message:String(e)),yh=(e,r,t)=>r instanceof yc?HV(r):r instanceof ki?$V(e,r,t):VV(r)?zV(r):ZV(r);p();var Mp;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(Mp||(Mp={}));var Ap=class extends Error{constructor(t,n){super(n);m(this,"name");m(this,"kind");this.name="DecompressError",this.kind=t}},WV=e=>new Ap(Mp.Unarchive,e.message),XV=e=>{let r=Object.values(g1);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},qV=(e,r,t)=>{var n;return new Ap(Mp.Validate,(n=I1(e,r,t))!=null?n:"Unknown validate error")},JV=e=>new Ap(Mp.Decode,e.message),YV=e=>new Ap(Mp.Unknown,e instanceof Error?e.message:String(e)),bh=(e,r,t)=>r instanceof gc?JV(r):r instanceof ki?qV(e,r,t):XV(r)?WV(r):YV(r);var _w=function*(e,r=""){if(e!=null){if(Array.isArray(e)){for(let t=0;t<e.length;t++)yield[r+"[".concat(t,"]"),e[t]];return}if("features"in e){for(let t=0;t<e.features.length;t++)yield[r===""?"features[".concat(t,"]"):"".concat(r,".features[").concat(t,"]"),e.features[t]];return}for(let[t,n]of Object.entries(e)){let o=r===""?t:"".concat(r,".").concat(t);yield*be(_w(n,o))}}},KV=(e,r)=>e===""?r:r.startsWith("[")?"".concat(e).concat(r):"".concat(e,".").concat(r),Nr=(e,r,t)=>{let n=new Set;for(let[o,i]of _w(e)){let a=r(i);if(n.has(a))return _e({kind:Go.DuplicateIdError,properties:{id:a,path:KV(t,o)}});n.add(a)}return Pe(!0)};var Ow=e=>e.floors==null?_e({kind:Go.FloorMissingError,properties:null}):Nr(e.floors.features,r=>r.properties.id,"floors");var Fw=x.Intersect([x.Object({id:x.Ref(mt),elevation:x.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:x.Optional(x.String({description:"The subtitle of the floor."})),maxHeight:x.Optional(x.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}))}),ni],{$id:"FloorProperties"}),kw=Rn(x.Union([x.Ref(pp),x.Ref(fp),x.Null()]),x.Ref(Fw),{$id:"FloorFeature"}),Bw=yo(x.Ref(kw),{$id:"FloorCollection"}),QV=x.Object({floors:x.Ref(Bw)}),Lw={name:"core:floors",intoBundle:function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},fromBundle:(e,r,t)=>{if(e==="floors.geojson")return{floors:t(r)}},integrityCheck:Ow,schema:QV,references:[Fw,kw,Bw]};p();p();var jr=e=>x.Unsafe(e);p();var xt=e=>Object.keys(e);p();p();var e$=e=>{var r,t;return new Map((t=(r=e.floors)==null?void 0:r.features.map(n=>[n.properties.id,n]))!=null?t:[])},ca=e=>{let r=e$(e);return n=>{let o=r.get(n);return o==null?_e({kind:Go.UnknownFloorError,properties:{floorId:n}}):Pe(o)}};var Rw=e=>{if(e.floors==null)return _e({kind:Go.FloorMissingError,properties:null});if(e.geometry==null)return _e({kind:Go.GeometryMissingError,properties:null});let r=Nr(e.geometry,n=>n.properties.id,"geometry");if(r.isErr())return r;let t=ca(e);for(let n of xt(e.geometry)){let o=t(n);if(o.isErr())return o}return Pe(!0)};var Nw=x.Intersect([x.Object({id:x.Ref(to)}),ni],{$id:"GeometryProperties"}),jw=Rn(x.Union([x.Ref(eo),x.Ref(Uy),x.Ref(Gy),x.Ref(zy),x.Ref(pp),x.Ref(fp)]),x.Ref(Nw),{$id:"GeometryFeature"}),Uw=yo(x.Ref(jw),{$id:"GeometryCollection"}),t$=x.Object({geometry:jr(x.Record(mt,x.Ref(Uw),{additionalProperties:!1}))},{$id:"GeometrySchema"}),r$=/^geometry\/(.*)\.geojson$/,Gw={name:"core:geometry",schema:t$,intoBundle:function*(e){if(e.geometry!=null)for(let r of xt(e.geometry))yield{path:"geometry/".concat(r,".geojson"),contents:e.geometry[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(r$))==null?void 0:o[1];if(n)return{geometry:{[n]:t(r)}}},references:[Nw,jw,Uw],integrityCheck:Rw};p();var Y3=x.Object({type:x.Literal("file"),name:x.String({description:"The name of the file."})},{$id:"ManifestFile"}),zw=x.Recursive(e=>x.Object({type:x.Literal("folder"),name:x.String({description:"The name of the folder."}),children:x.Array(x.Union([e,x.Ref(Y3)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),Vw=x.Object({name:x.String({description:"The name of the map."}),version:x.Literal("3.0.0",{description:"The version of the manifest."}),orgId:x.Optional(x.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:x.Optional(x.String({description:"The identifier of the map that this MVF is for."})),contents:x.Array(x.Union([x.Ref(zw),x.Ref(Y3)]),{minItems:1,description:"The contents of the MVF bundle."}),time:x.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:x.Optional(x.Unsafe(x.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:x.Optional(x.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:x.Optional(x.Ref(mt,{description:"The default floor ID of the map."})),language:x.Optional(x.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),$w=yo(Rn(eo,x.Ref(Vw)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),n$=x.Object({manifest:x.Ref($w)}),Hw={name:"core:manifest",intoBundle:function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},fromBundle:(e,r,t)=>{if(e==="manifest.geojson")return{manifest:t(r)}},schema:n$,references:[Y3,zw,Vw,$w]};p();p();p();p();var K3=class extends We{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'"));m(this,"schema");this.schema=t}};function o$(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new K3(e);return vc(t,r)}function S1(e,r){return!gt.IsString(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function vc(e,r){return e[oe]==="This"||e[oe]==="Ref"?o$(e,r):e}p();function i$(e,r,t){let n=e.get(r);if(n!==void 0)return n;let o=cs(r,t);return e.set(r,o),o}function C1(){let e=new WeakMap;return{HasTransform:(r,t)=>i$(e,r,t)}}function Or(e,r,t){try{return U.IsTransform(e)?e[gr].Decode(t):t}catch(n){throw new gc(e,r,t,n)}}function a$(e,r,t,n,o){return gt.IsArray(n)?Or(e,t,n.map((i,a)=>ps(e.items,r,"".concat(t,"/").concat(a),i,o))):Or(e,t,n)}function s$(e,r,t,n,o){if(!gt.IsObject(n)||Ln(n))return Or(e,t,n);let i=ll(e),a=i.map(f=>f[0]),u=_({},n);for(let[f,h]of i)f in u&&(u[f]=ps(h,r,"".concat(t,"/").concat(f),u[f],o));if(!U.IsTransform(e.unevaluatedProperties))return Or(e,t,u);let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=_({},u);for(let f of l)a.includes(f)||(d[f]=Or(c,"".concat(t,"/").concat(f),d[f]));return Or(e,t,d)}function u$(e,r,t,n,o){return Or(e,t,ps(e.not,r,t,n,o))}function l$(e,r,t,n,o){if(!gt.IsObject(n))return Or(e,t,n);let i=Sn(e),a=_({},n);for(let d of i)gt.HasPropertyKey(a,d)&&(gt.IsUndefined(a[d])&&(!U.IsUndefined(e.properties[d])||Gt.IsExactOptionalProperty(a,d))||(a[d]=ps(e.properties[d],r,"".concat(t,"/").concat(d),a[d],o)));if(!U.IsSchema(e.additionalProperties))return Or(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=_({},a);for(let d of u)i.includes(d)||(c[d]=Or(l,"".concat(t,"/").concat(d),c[d]));return Or(e,t,c)}function c$(e,r,t,n,o){if(!gt.IsObject(n))return Or(e,t,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=_({},n);for(let f of Object.getOwnPropertyNames(n))a.test(f)&&(u[f]=ps(e.patternProperties[i],r,"".concat(t,"/").concat(f),u[f],o));if(!U.IsSchema(e.additionalProperties))return Or(e,t,u);let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=_({},u);for(let f of l)a.test(f)||(d[f]=Or(c,"".concat(t,"/").concat(f),d[f]));return Or(e,t,d)}function d$(e,r,t,n,o){let i=vc(e,r);return Or(e,t,ps(i,r,t,n,o))}function p$(e,r,t,n,o){let i=vc(e,r);return Or(e,t,ps(i,r,t,n,o))}function f$(e,r,t,n,o){return gt.IsArray(n)&&gt.IsArray(e.items)?Or(e,t,e.items.map((i,a)=>ps(i,r,"".concat(t,"/").concat(a),n[a],o))):Or(e,t,n)}function m$(e,r,t,n,o){for(let i of e.anyOf){if(!Ri.Check(i,r,n))continue;let a=ps(i,r,t,n,o);return Or(e,t,a)}return Or(e,t,n)}function ps(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=S1(e,r),a=e;switch(e[oe]){case"Array":return a$(a,i,t,n,o);case"Intersect":return s$(a,i,t,n,o);case"Not":return u$(a,i,t,n,o);case"Object":return l$(a,i,t,n,o);case"Record":return c$(a,i,t,n,o);case"Ref":return d$(a,i,t,n,o);case"Symbol":return Or(a,t,n);case"This":return p$(a,i,t,n,o);case"Tuple":return f$(a,i,t,n,o);case"Union":return m$(a,i,t,n,o);default:return Or(a,t,n)}}function Zw(e,r,t){let n=C1();return ps(e,r,"",t,n)}p();function oo(e,r,t){try{return U.IsTransform(e)?e[gr].Encode(t):t}catch(n){throw new yc(e,r,t,n)}}function h$(e,r,t,n,o){let i=oo(e,t,n);return gt.IsArray(i)?i.map((a,u)=>fs(e.items,r,"".concat(t,"/").concat(u),a,o)):i}function g$(e,r,t,n,o){let i=oo(e,t,n);if(!gt.IsObject(n)||Ln(n))return i;let a=ll(e),u=a.map(h=>h[0]),l=_({},i);for(let[h,g]of a)h in l&&(l[h]=fs(g,r,"".concat(t,"/").concat(h),l[h],o));if(!U.IsTransform(e.unevaluatedProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.unevaluatedProperties,f=_({},l);for(let h of c)u.includes(h)||(f[h]=oo(d,"".concat(t,"/").concat(h),f[h]));return f}function y$(e,r,t,n){return oo(e.not,t,oo(e,t,n))}function b$(e,r,t,n,o){let i=oo(e,t,n);if(!gt.IsObject(i))return i;let a=Sn(e),u=_({},i);for(let f of a)gt.HasPropertyKey(u,f)&&(gt.IsUndefined(u[f])&&(!U.IsUndefined(e.properties[f])||Gt.IsExactOptionalProperty(u,f))||(u[f]=fs(e.properties[f],r,"".concat(t,"/").concat(f),u[f],o)));if(!U.IsSchema(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=_({},u);for(let f of l)a.includes(f)||(d[f]=oo(c,"".concat(t,"/").concat(f),d[f]));return d}function v$(e,r,t,n,o){let i=oo(e,t,n);if(!gt.IsObject(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),l=_({},i);for(let h of Object.getOwnPropertyNames(n))u.test(h)&&(l[h]=fs(e.patternProperties[a],r,"".concat(t,"/").concat(h),l[h],o));if(!U.IsSchema(e.additionalProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.additionalProperties,f=_({},l);for(let h of c)u.test(h)||(f[h]=oo(d,"".concat(t,"/").concat(h),f[h]));return f}function x$(e,r,t,n,o){let i=vc(e,r),a=fs(i,r,t,n,o);return oo(e,t,a)}function E$(e,r,t,n,o){let i=vc(e,r),a=fs(i,r,t,n,o);return oo(e,t,a)}function I$(e,r,t,n,o){let i=oo(e,t,n);return gt.IsArray(e.items)?e.items.map((a,u)=>fs(a,r,"".concat(t,"/").concat(u),i[u],o)):[]}function S$(e,r,t,n,o){for(let i of e.anyOf){if(!Ri.Check(i,r,n))continue;let a=fs(i,r,t,n,o);return oo(e,t,a)}for(let i of e.anyOf){let a=fs(i,r,t,n,o);if(Ri.Check(e,r,a))return oo(e,t,a)}return oo(e,t,n)}function fs(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=S1(e,r),a=e;switch(e[oe]){case"Array":return h$(a,i,t,n,o);case"Intersect":return g$(a,i,t,n,o);case"Not":return y$(a,i,t,n);case"Object":return b$(a,i,t,n,o);case"Record":return v$(a,i,t,n,o);case"Ref":return x$(a,i,t,n,o);case"This":return E$(a,i,t,n,o);case"Tuple":return I$(a,i,t,n,o);case"Union":return S$(a,i,t,n,o);default:return oo(a,t,n)}}function Ww(e,r,t){let n=C1();return fs(e,r,"",t,n)}p();var Q3=class{constructor(r,t,n,o){this.schema=r,this.references=t,this.checkFunc=n,this.code=o,this.hasTransform=cs(r,t)}Code(){return this.code}Errors(r){return is(this.schema,this.references,r)}Check(r){return this.checkFunc(r)}Decode(r){if(!this.checkFunc(r))throw new yp(this.schema,r,this.Errors(r).First());return this.hasTransform?bp(this.schema,this.references,r):r}Encode(r){let t=this.hasTransform?e1(this.schema,this.references,r):r;if(!this.checkFunc(t))throw new vp(this.schema,r,this.Errors(r).First());return t}},uu;(function(e){function r(i){return i===36}e.DollarSign=r;function t(i){return i===95}e.IsUnderscore=t;function n(i){return i>=65&&i<=90||i>=97&&i<=122}e.IsAlpha=n;function o(i){return i>=48&&i<=57}e.IsNumeric=o})(uu||(uu={}));var D1;(function(e){function r(i){return i.length===0?!1:uu.IsNumeric(i.charCodeAt(0))}function t(i){if(r(i))return!1;for(let a=0;a<i.length;a++){let u=i.charCodeAt(a);if(!(uu.IsAlpha(u)||uu.IsNumeric(u)||uu.DollarSign(u)||uu.IsUnderscore(u)))return!1}return!0}function n(i){return i.replace(/'/g,"\\'")}function o(i,a){return t(a)?"".concat(i,".").concat(a):"".concat(i,"['").concat(n(a),"']")}e.Encode=o})(D1||(D1={}));var eE;(function(e){function r(t){let n=[];for(let o=0;o<t.length;o++){let i=t.charCodeAt(o);uu.IsNumeric(i)||uu.IsAlpha(i)?n.push(t.charAt(o)):n.push("_".concat(i,"_"))}return n.join("").replace(/__/g,"_")}e.Encode=r})(eE||(eE={}));var tE;(function(e){function r(t){return t.replace(/'/g,"\\'")}e.Escape=r})(tE||(tE={}));var rE=class extends We{constructor(r){super("Unknown type"),this.schema=r}},T1=class extends We{constructor(r){super("Preflight validation check failed to guard for the given schema"),this.schema=r}},xc;(function(e){function r(a,u,l){return Gt.ExactOptionalPropertyTypes?"('".concat(u,"' in ").concat(a," ? ").concat(l," : true)"):"(".concat(D1.Encode(a,u)," !== undefined ? ").concat(l," : true)")}e.IsExactOptionalProperty=r;function t(a){return Gt.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}e.IsObjectLike=t;function n(a){return Gt.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}e.IsRecordLike=n;function o(a){return Gt.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}e.IsNumberLike=o;function i(a){return Gt.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}e.IsVoidLike=i})(xc||(xc={}));var w1;(function(e){function r(N){return N[oe]==="Any"||N[oe]==="Unknown"}function*t(N,xe,Z){yield"true"}function*n(N,xe,Z){yield"Array.isArray(".concat(Z,")");let[De,Ie]=[Oe("value","any"),Oe("acc","number")];ze(N.maxItems)&&(yield"".concat(Z,".length <= ").concat(N.maxItems)),ze(N.minItems)&&(yield"".concat(Z,".length >= ").concat(N.minItems));let ve=le(N.items,xe,"value");if(yield"".concat(Z,".every((").concat(De,") => ").concat(ve,")"),bt(N.contains)||ze(N.minContains)||ze(N.maxContains)){let Ne=bt(N.contains)?N.contains:$t(),Et=le(Ne,xe,"value"),zt=ze(N.minContains)?["(count >= ".concat(N.minContains,")")]:[],Bt=ze(N.maxContains)?["(count <= ".concat(N.maxContains,")")]:[],rr="const count = value.reduce((".concat(Ie,", ").concat(De,") => ").concat(Et," ? acc + 1 : acc, 0)"),Hr=["(count > 0)",...zt,...Bt].join(" && ");yield"((".concat(De,") => { ").concat(rr,"; return ").concat(Hr,"})(").concat(Z,")")}if(N.uniqueItems===!0){let Et="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(De,") => { ").concat(Et," )(").concat(Z,")")}}function*o(N,xe,Z){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(Z,")")}function*i(N,xe,Z){yield"(typeof ".concat(Z," === 'bigint')"),Bn(N.exclusiveMaximum)&&(yield"".concat(Z," < BigInt(").concat(N.exclusiveMaximum,")")),Bn(N.exclusiveMinimum)&&(yield"".concat(Z," > BigInt(").concat(N.exclusiveMinimum,")")),Bn(N.maximum)&&(yield"".concat(Z," <= BigInt(").concat(N.maximum,")")),Bn(N.minimum)&&(yield"".concat(Z," >= BigInt(").concat(N.minimum,")")),Bn(N.multipleOf)&&(yield"(".concat(Z," % BigInt(").concat(N.multipleOf,")) === 0"))}function*a(N,xe,Z){yield"(typeof ".concat(Z," === 'boolean')")}function*u(N,xe,Z){yield*be(se(N.returns,xe,"".concat(Z,".prototype")))}function*l(N,xe,Z){yield"(".concat(Z," instanceof Date) && Number.isFinite(").concat(Z,".getTime())"),ze(N.exclusiveMaximumTimestamp)&&(yield"".concat(Z,".getTime() < ").concat(N.exclusiveMaximumTimestamp)),ze(N.exclusiveMinimumTimestamp)&&(yield"".concat(Z,".getTime() > ").concat(N.exclusiveMinimumTimestamp)),ze(N.maximumTimestamp)&&(yield"".concat(Z,".getTime() <= ").concat(N.maximumTimestamp)),ze(N.minimumTimestamp)&&(yield"".concat(Z,".getTime() >= ").concat(N.minimumTimestamp)),ze(N.multipleOfTimestamp)&&(yield"(".concat(Z,".getTime() % ").concat(N.multipleOfTimestamp,") === 0"))}function*c(N,xe,Z){yield"(typeof ".concat(Z," === 'function')")}function*d(N,xe,Z){yield"Number.isInteger(".concat(Z,")"),ze(N.exclusiveMaximum)&&(yield"".concat(Z," < ").concat(N.exclusiveMaximum)),ze(N.exclusiveMinimum)&&(yield"".concat(Z," > ").concat(N.exclusiveMinimum)),ze(N.maximum)&&(yield"".concat(Z," <= ").concat(N.maximum)),ze(N.minimum)&&(yield"".concat(Z," >= ").concat(N.minimum)),ze(N.multipleOf)&&(yield"(".concat(Z," % ").concat(N.multipleOf,") === 0"))}function*f(N,xe,Z){let De=N.allOf.map(Ie=>le(Ie,xe,Z)).join(" && ");if(N.unevaluatedProperties===!1){let Ie=Fe("".concat(new RegExp(tu(N)),";")),ve="Object.getOwnPropertyNames(".concat(Z,").every(key => ").concat(Ie,".test(key))");yield"(".concat(De," && ").concat(ve,")")}else if(bt(N.unevaluatedProperties)){let Ie=Fe("".concat(new RegExp(tu(N)),";")),ve="Object.getOwnPropertyNames(".concat(Z,").every(key => ").concat(Ie,".test(key) || ").concat(le(N.unevaluatedProperties,xe,"".concat(Z,"[key]")),")");yield"(".concat(De," && ").concat(ve,")")}else yield"(".concat(De,")")}function*h(N,xe,Z){yield"(typeof value === 'object' && Symbol.iterator in ".concat(Z,")")}function*g(N,xe,Z){typeof N.const=="number"||typeof N.const=="boolean"?yield"(".concat(Z," === ").concat(N.const,")"):yield"(".concat(Z," === '").concat(tE.Escape(N.const),"')")}function*b(N,xe,Z){yield"false"}function*I(N,xe,Z){let De=le(N.not,xe,Z);yield"(!".concat(De,")")}function*v(N,xe,Z){yield"(".concat(Z," === null)")}function*E(N,xe,Z){yield xc.IsNumberLike(Z),ze(N.exclusiveMaximum)&&(yield"".concat(Z," < ").concat(N.exclusiveMaximum)),ze(N.exclusiveMinimum)&&(yield"".concat(Z," > ").concat(N.exclusiveMinimum)),ze(N.maximum)&&(yield"".concat(Z," <= ").concat(N.maximum)),ze(N.minimum)&&(yield"".concat(Z," >= ").concat(N.minimum)),ze(N.multipleOf)&&(yield"(".concat(Z," % ").concat(N.multipleOf,") === 0"))}function*T(N,xe,Z){yield xc.IsObjectLike(Z),ze(N.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(Z,").length >= ").concat(N.minProperties)),ze(N.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(Z,").length <= ").concat(N.maxProperties));let De=Object.getOwnPropertyNames(N.properties);for(let Ie of De){let ve=D1.Encode(Z,Ie),Ne=N.properties[Ie];if(N.required&&N.required.includes(Ie))yield*be(se(Ne,xe,ve)),(nu(Ne)||r(Ne))&&(yield"('".concat(Ie,"' in ").concat(Z,")"));else{let Et=le(Ne,xe,ve);yield xc.IsExactOptionalProperty(Z,Ie,Et)}}if(N.additionalProperties===!1)if(N.required&&N.required.length===De.length)yield"Object.getOwnPropertyNames(".concat(Z,").length === ").concat(De.length);else{let Ie="[".concat(De.map(ve=>"'".concat(ve,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(Z,").every(key => ").concat(Ie,".includes(key))")}if(typeof N.additionalProperties=="object"){let Ie=le(N.additionalProperties,xe,"".concat(Z,"[key]")),ve="[".concat(De.map(Ne=>"'".concat(Ne,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(Z,").every(key => ").concat(ve,".includes(key) || ").concat(Ie,"))")}}function*D(N,xe,Z){yield"(typeof value === 'object' && typeof ".concat(Z,".then === 'function')")}function*w(N,xe,Z){yield xc.IsRecordLike(Z),ze(N.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(Z,").length >= ").concat(N.minProperties)),ze(N.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(Z,").length <= ").concat(N.maxProperties));let[De,Ie]=Object.entries(N.patternProperties)[0],ve=Fe("".concat(new RegExp(De))),Ne=le(Ie,xe,"value"),Et=bt(N.additionalProperties)?le(N.additionalProperties,xe,Z):N.additionalProperties===!1?"false":"true",zt="(".concat(ve,".test(key) ? ").concat(Ne," : ").concat(Et,")");yield"(Object.entries(".concat(Z,").every(([key, value]) => ").concat(zt,"))")}function*B(N,xe,Z){let De=Tt(N,xe);if(pe.functions.has(N.$ref))return yield"".concat(ye(N.$ref),"(").concat(Z,")");yield*be(se(De,xe,Z))}function*X(N,xe,Z){let De=Fe("".concat(new RegExp(N.source,N.flags),";"));yield"(typeof ".concat(Z," === 'string')"),ze(N.maxLength)&&(yield"".concat(Z,".length <= ").concat(N.maxLength)),ze(N.minLength)&&(yield"".concat(Z,".length >= ").concat(N.minLength)),yield"".concat(De,".test(").concat(Z,")")}function*L(N,xe,Z){if(yield"(typeof ".concat(Z," === 'string')"),ze(N.maxLength)&&(yield"".concat(Z,".length <= ").concat(N.maxLength)),ze(N.minLength)&&(yield"".concat(Z,".length >= ").concat(N.minLength)),N.pattern!==void 0){let De=Fe("".concat(new RegExp(N.pattern),";"));yield"".concat(De,".test(").concat(Z,")")}N.format!==void 0&&(yield"format('".concat(N.format,"', ").concat(Z,")"))}function*P(N,xe,Z){yield"(typeof ".concat(Z," === 'symbol')")}function*R(N,xe,Z){yield"(typeof ".concat(Z," === 'string')");let De=Fe("".concat(new RegExp(N.pattern),";"));yield"".concat(De,".test(").concat(Z,")")}function*$(N,xe,Z){yield"".concat(ye(N.$ref),"(").concat(Z,")")}function*V(N,xe,Z){if(yield"Array.isArray(".concat(Z,")"),N.items===void 0)return yield"".concat(Z,".length === 0");yield"(".concat(Z,".length === ").concat(N.maxItems,")");for(let De=0;De<N.items.length;De++){let Ie=le(N.items[De],xe,"".concat(Z,"[").concat(De,"]"));yield"".concat(Ie)}}function*H(N,xe,Z){yield"".concat(Z," === undefined")}function*re(N,xe,Z){let De=N.anyOf.map(Ie=>le(Ie,xe,Z));yield"(".concat(De.join(" || "),")")}function*j(N,xe,Z){yield"".concat(Z," instanceof Uint8Array"),ze(N.maxByteLength)&&(yield"(".concat(Z,".length <= ").concat(N.maxByteLength,")")),ze(N.minByteLength)&&(yield"(".concat(Z,".length >= ").concat(N.minByteLength,")"))}function*me(N,xe,Z){yield"true"}function*z(N,xe,Z){yield xc.IsVoidLike(Z)}function*ue(N,xe,Z){let De=pe.instances.size;pe.instances.set(De,N),yield"kind('".concat(N[oe],"', ").concat(De,", ").concat(Z,")")}function*se(N,xe,Z,De=!0){let Ie=yt(N.$id)?[...xe,N]:xe,ve=N;if(De&&yt(N.$id)){let Ne=ye(N.$id);if(pe.functions.has(Ne))return yield"".concat(Ne,"(").concat(Z,")");{let Et=Ee(Ne,N,xe,"value",!1);return pe.functions.set(Ne,Et),yield"".concat(Ne,"(").concat(Z,")")}}switch(ve[oe]){case"Any":return yield*be(t(ve,Ie,Z));case"Array":return yield*be(n(ve,Ie,Z));case"AsyncIterator":return yield*be(o(ve,Ie,Z));case"BigInt":return yield*be(i(ve,Ie,Z));case"Boolean":return yield*be(a(ve,Ie,Z));case"Constructor":return yield*be(u(ve,Ie,Z));case"Date":return yield*be(l(ve,Ie,Z));case"Function":return yield*be(c(ve,Ie,Z));case"Integer":return yield*be(d(ve,Ie,Z));case"Intersect":return yield*be(f(ve,Ie,Z));case"Iterator":return yield*be(h(ve,Ie,Z));case"Literal":return yield*be(g(ve,Ie,Z));case"Never":return yield*be(b(ve,Ie,Z));case"Not":return yield*be(I(ve,Ie,Z));case"Null":return yield*be(v(ve,Ie,Z));case"Number":return yield*be(E(ve,Ie,Z));case"Object":return yield*be(T(ve,Ie,Z));case"Promise":return yield*be(D(ve,Ie,Z));case"Record":return yield*be(w(ve,Ie,Z));case"Ref":return yield*be(B(ve,Ie,Z));case"RegExp":return yield*be(X(ve,Ie,Z));case"String":return yield*be(L(ve,Ie,Z));case"Symbol":return yield*be(P(ve,Ie,Z));case"TemplateLiteral":return yield*be(R(ve,Ie,Z));case"This":return yield*be($(ve,Ie,Z));case"Tuple":return yield*be(V(ve,Ie,Z));case"Undefined":return yield*be(H(ve,Ie,Z));case"Union":return yield*be(re(ve,Ie,Z));case"Uint8Array":return yield*be(j(ve,Ie,Z));case"Unknown":return yield*be(me(ve,Ie,Z));case"Void":return yield*be(z(ve,Ie,Z));default:if(!cn.Has(ve[oe]))throw new rE(N);return yield*be(ue(ve,Ie,Z))}}let pe={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function le(N,xe,Z,De=!0){return"(".concat([...se(N,xe,Z,De)].join(" && "),")")}function ye(N){return"check_".concat(eE.Encode(N))}function Fe(N){let xe="local_".concat(pe.variables.size);return pe.variables.set(xe,"const ".concat(xe," = ").concat(N)),xe}function Ee(N,xe,Z,De,Ie=!0){let[ve,Ne]=["\n",rr=>"".padStart(rr," ")],Et=Oe("value","any"),zt=we("boolean"),Bt=[...se(xe,Z,De,Ie)].map(rr=>"".concat(Ne(4)).concat(rr)).join(" &&".concat(ve));return"function ".concat(N,"(").concat(Et,")").concat(zt," {").concat(ve).concat(Ne(2),"return (").concat(ve).concat(Bt).concat(ve).concat(Ne(2),")\n}")}function Oe(N,xe){let Z=pe.language==="typescript"?": ".concat(xe):"";return"".concat(N).concat(Z)}function we(N){return pe.language==="typescript"?": ".concat(N):""}function Le(N,xe,Z){let De=Ee("check",N,xe,"value"),Ie=Oe("value","any"),ve=we("boolean"),Ne=[...pe.functions.values()],Et=[...pe.variables.values()],zt=yt(N.$id)?"return function check(".concat(Ie,")").concat(ve," {\n return ").concat(ye(N.$id),"(value)\n}"):"return ".concat(De);return[...Et,...Ne,zt].join("\n")}function Qe(...N){let xe={language:"javascript"},[Z,De,Ie]=N.length===2&&et(N[1])?[N[0],N[1],xe]:N.length===2&&!et(N[1])?[N[0],[],N[1]]:N.length===3?[N[0],N[1],N[2]]:N.length===1?[N[0],[],xe]:[null,[],xe];if(pe.language=Ie.language,pe.variables.clear(),pe.functions.clear(),pe.instances.clear(),!bt(Z))throw new T1(Z);for(let ve of De)if(!bt(ve))throw new T1(ve);return Le(Z,De,Ie)}e.Code=Qe;function Ge(N,xe=[]){let Z=Qe(N,xe,{language:"javascript"}),De=globalThis.Function("kind","format","hash",Z),Ie=new Map(pe.instances);function ve(Bt,rr,Hr){if(!cn.Has(Bt)||!Ie.has(rr))return!1;let _n=cn.Get(Bt),On=Ie.get(rr);return _n(On,Hr)}function Ne(Bt,rr){return go.Has(Bt)?go.Get(Bt)(rr):!1}function Et(Bt){return pl(Bt)}let zt=De(ve,Ne,Et);return new Q3(N,xe,zt,Z)}e.Compile=Ge})(w1||(w1={}));p();p();p();var C$=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,D$=[0,31,28,31,30,31,30,31,31,30,31,30,31],T$=e=>e%4===0&&(e%100!==0||e%400===0),M1=e=>{let r=C$.exec(e);if(!r)return!1;let t=+r[1],n=+r[2],o=+r[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&T$(t)?29:D$[n])};p();var w$=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,A1=e=>{let r=w$.exec(e);if(!r)return!1;let t=+r[1],n=+r[2],o=+r[3],i=r[4],a=r[5]==="-"?-1:1,u=+(r[6]||0),l=+(r[7]||0);if(u>23||l>59||!i)return!1;if(t<=23&&n<=59&&o<60)return!0;let c=n-l*a,d=t-u*a-(c<0?1:0);return(d===23||d===-1)&&(c===59||c===-1)&&o<61};var M$=/t|\s/i,Xw=e=>{let r=e.split(M$);return r.length===2&&M1(r[0])&&A1(r[1])};p();var A$=/\/|:/,P$=/^(?:[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,qw=e=>A$.test(e)&&P$.test(e);var _$=[["date",M1],["time",A1],["date-time",Xw],["uri",qw]],Jw=()=>{for(let[e,r]of _$)try{Wy.Format(e,r)}catch(t){if(t instanceof uh)continue;throw t}};p();var nE=x.Record(x.String(),x.Unknown(),{$id:"Extra"}),da=x.Object({extra:x.Optional(x.Ref(nE))}),oE=[nE];p();p();p();p();p();p();var At=e=>Object.entries(e);var O$=e=>{var t;let r=new Map;for(let[n,o]of At((t=e.geometry)!=null?t:{}))r.set(n,new Map(o==null?void 0:o.features.map(i=>[i.properties.id,i])));return r},dn=e=>{let r=O$(e);return(n,o)=>{let i=r.get(n);if(i==null)return _e({kind:Go.UnknownFloorError,properties:{floorId:n}});let a=i.get(o);return a==null?_e({kind:Go.UnknownGeometryError,properties:{floorId:n,geometryId:o}}):Pe(a)}};p();var Ui=x.Object({geometryId:x.Ref(to)},{$id:"WithGeometryId"}),Pp=x.Object({geometryIds:x.Array(x.Ref(to))},{$id:"WithGeometryIds"}),iE=[Ui,Pp];p();p();p();var Yw=e=>e instanceof Error?e:new Error(String(e));var _p=e=>(...r)=>{try{return Pe(e(...r))}catch(t){return _e(Yw(t))}};var Kw=_p((e,r)=>{let t={};for(let n of r)for(let o of n.intoBundle(e))t[o.path]=Sp(JSON.stringify(o.contents));return t}),aE=async(e,r,t)=>Kw(e,r).andThenAsync(n=>new Promise(o=>{ww(n,ne(_({},t),{consume:!0}),(i,a)=>{o(i?_e(i):Pe(a))})})),F$=_p(Mw),sE=(e,r,t)=>Kw(e,r).andThen(n=>F$(n,t));p();p();function P1(e,r,t=[]){let n=_({},e);for(let[o,i]of Object.entries(r))if(i!==void 0)if(o in n){let a=o;if(Array.isArray(i)&&i.length>0){let u=k$(i[0],t);if(u){let l=n[a];if(!Array.isArray(l))throw new Error("Expected array at ".concat(o,", got ").concat(typeof l));let c=new Map(i.map(h=>[Qw(h,u),h])),f=l.map(h=>{let g=c.get(Qw(h,u));return g?P1(h,g,t):h});n[a]=f}else n[a]=i}else{let u=n[a];typeof u=="object"&&u!==null&&typeof i=="object"&&i!==null?Object.keys(i).length===0?n[a]=i:n[a]=P1(u,i,t):n[o]=i}}else n[o]=i;return n}function k$(e,r){function t(n){if(typeof n!="object"||n===null)return null;for(let o of r)if(o in n&&typeof n[o]<"u")return[o];if(Array.isArray(n))return null;for(let[o,i]of Object.entries(n)){let a=t(i);if(a)return[o,...a]}return null}return t(e)}function Qw(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}var B$=e=>e,L$=e=>JSON.parse(J3(e)),eM=(e,r)=>r.some(t=>t.fromBundle(e.name,new Uint8Array,B$)!==void 0),tM=_p((e,r)=>{let t={};for(let n of Object.keys(e)){let o=e[n];for(let i of r){let a=i.fromBundle(n,o,L$);if(a){t=P1(t,a,[]);break}}}return t}),uE=async(e,r)=>new Promise(t=>Aw(e,{filter:n=>eM(n,r)},(n,o)=>{t(n?_e(n):Pe(o))})).then(t=>t.andThen(n=>tM(n,r))),R$=_p(Pw),lE=(e,r)=>R$(e,{filter:t=>eM(t,r)}).andThen(t=>tM(t,r));p();var N$=e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string",j$=e=>{if(e.length<2)return!1;let r=e.filter(N$);if(r.length!==e.length)return!1;let t=r[0].$ref;return r.slice(1).every(n=>n.$ref===t)},_1=e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&j$(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,_1(t)])):Array.isArray(e)?e.map(_1):e;p();var O1=e=>typeof e=="object"&&e!=null&&"$ref"in e?ne(_({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,O1(t)])):Array.isArray(e)?e.map(O1):e;var Op;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(Op||(Op={}));var U$=e=>({next(){for(let t of e){let n=t.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),G$=(...e)=>{let r=new Map;for(let t of U$(e)){if(!t.$id)continue;let n=r.get(t.$id);if(n!=null&&n!==t)return _e({kind:Op.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:t});r.set(t.$id,t)}return Pe(r)},Dn,Fp,li,zn,cE=class cE{constructor(r,t,n,o){M(this,Dn);M(this,Fp);M(this,li,[]);M(this,zn);k(this,Dn,r),k(this,Fp,t),k(this,li,n),k(this,zn,o),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(r,t="CoreMVF",n=!1){let o=x.Composite(r.extensions.map(a=>a.schema),{$id:t});if(!U.IsSchema(o))return _e({kind:Op.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:o});let i=G$(T3.values(),w3.values(),C3.values(),oE.values(),dE.values(),iE.values(),r.extensions.flatMap(a=>{var u;return(u=a.references)!=null?u:[]}).values());if(!i.isOk())return i;try{Jw();let a=n?null:w1.Compile(o,[...i.value.values()]);return Pe(new cE(o,a,r.extensions,i.value))}catch(a){return a instanceof We?_e({kind:Op.TypeboxError,message:a.message,original:a}):_e({kind:Op.UnknownError,message:"An unknown error occurred while compiling the schema",original:a})}}is(r){var t,n;return(n=(t=s(this,Fp))==null?void 0:t.Check(r))!=null?n:Ri.Check(s(this,Dn),[...s(this,zn).values()],r)}parse(r){var t,n;return this.is(r)?Pe(r):_e((n=(t=s(this,Fp))==null?void 0:t.Errors(r))!=null?n:Ri.Errors(s(this,Dn),[...s(this,zn).values()],r))}decode(r){try{return Pe(Zw(s(this,Dn),[...s(this,zn).values()],r))}catch(t){return _e(t)}}encode(r){try{return Pe(Ww(s(this,Dn),[...s(this,zn).values()],r))}catch(t){return _e(t)}}verify(r){for(let t of s(this,li))if(t.integrityCheck){let n=t.integrityCheck(r);if(n.isErr())return _e(n.error)}return Pe(!0)}jsonSchema(){var n;let r=JSON.parse(JSON.stringify([s(this,Dn),...s(this,zn).values()])),t=_1(O1({$id:"#/definitions/".concat((n=s(this,Dn).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:r}));return JSON.stringify(t,null,2)}async compress(r){return this.encode(r).andThen(t=>this.parse(t)).andThenAsync(t=>aE(t,s(this,li))).then(t=>t.mapErr(n=>{var o;return yh((o=s(this,Dn).$id)!=null?o:"CoreMVF",n,[...s(this,zn).values()])}))}async compressUnsafe(r){return this.encode(r).andThenAsync(t=>aE(t,s(this,li))).then(t=>t.mapErr(n=>{var o;return yh((o=s(this,Dn).$id)!=null?o:"CoreMVF",n,[...s(this,zn).values()])}))}compressSync(r){return this.encode(r).andThen(t=>this.parse(t)).andThen(t=>sE(t,s(this,li))).mapErr(t=>{var n;return yh((n=s(this,Dn).$id)!=null?n:"CoreMVF",t,[...s(this,zn).values()])})}compressUnsafeSync(r){return this.encode(r).andThen(t=>sE(t,s(this,li))).mapErr(t=>{var n;return yh((n=s(this,Dn).$id)!=null?n:"CoreMVF",t,[...s(this,zn).values()])})}async decompress(r){return uE(r,s(this,li)).then(t=>t.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var o;return bh((o=s(this,Dn).$id)!=null?o:"CoreMVF",n,[...s(this,zn).values()])}))}async decompressUnsafe(r){return uE(r,s(this,li)).then(t=>t.andThen(n=>this.decode(n)).mapErr(n=>{var o;return bh((o=s(this,Dn).$id)!=null?o:"CoreMVF",n,[...s(this,zn).values()])}))}decompressSync(r){return lE(r,s(this,li)).andThen(t=>this.parse(t)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return bh((n=s(this,Dn).$id)!=null?n:"CoreMVF",t,[...s(this,zn).values()])})}decompressUnsafeSync(r){return lE(r,s(this,li)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return bh((n=s(this,Dn).$id)!=null?n:"CoreMVF",t,[...s(this,zn).values()])})}};Dn=new WeakMap,Fp=new WeakMap,li=new WeakMap,zn=new WeakMap;var F1=cE;var kp,k1=class{constructor(){M(this,kp,[]);this.extend=this.extend.bind(this)}extend(r){return s(this,kp).push(r),this}extendOptional(r){let t=ne(_({},r),{schema:x.Partial(r.schema)});return s(this,kp).push(t),this}build(r){return F1.create(this,void 0,r==null?void 0:r.cspSafe)}get extensions(){return s(this,kp)}};kp=new WeakMap;p();p();p();p();var Bp=x.Object({geometryId:x.Ref(to),floorId:x.Ref(mt)},{$id:"GeometryAnchor"}),z$=x.Object({geometryAnchor:x.Ref(Bp)}),vh=(e,r)=>x.Object({geometryAnchors:x.Array(x.Ref(Bp),e)},r),dE=[Bp];p();p();p();var rM=(e,r)=>x.Unsafe(x.Transform(x.String(r)).Decode(t=>e.includes(t)?t:"unknown").Encode(t=>t)),Vn=(e,r)=>{let t=rM(e,r),n=[...e,"unknown"],o=Object.freeze(Object.fromEntries([...e,"unknown"].map(a=>[a,a])));return{schema:t,values:n,record:o,is:a=>Object.hasOwn(o,a)}};var nM=()=>new k1().extend(Lw).extend(Gw).extend(Hw);p();var V$=e=>{if(e==="space"||e==="obstruction"||e==="entrance")return{}},$$=/\.json|\.geojson$/,B1=(e,r,t)=>{let n=e[r];if(typeof n!="object"||Object.keys(n).length===0)return V$(r);let o={};for(let[i,a]of Object.entries(n)){let u=i.replace($$,"");o[u]=JSON.parse(t(a))}return o},H$=["floorstack.json","styles.json","shapes.json","mapstack.json","floor.geojson","tileset.json","location.json","category.json","navigationFlags.json","annotation-symbols.json"],Z$=H$,W$=["annotation","textAreas","enterprise","floorImages","shapeInstances","modelInstances","window","area","facade"],X$=W$,L1=e=>{let r=new TextDecoder("utf-8"),t=r.decode.bind(r),n={"manifest.geojson":JSON.parse(t(e["manifest.geojson"])),"mapstack.geojson":JSON.parse(t(e["mapstack.geojson"])),"map.geojson":JSON.parse(t(e["map.geojson"])),"node.geojson":JSON.parse(t(e["node.geojson"])),"connection.json":JSON.parse(t(e["connection.json"])),space:B1(e,"space",t),obstruction:B1(e,"obstruction",t),entrance:B1(e,"entrance",t)};for(let o of Z$)e[o]&&(n[o]=JSON.parse(t(e[o])));for(let o of X$)e[o]&&(n[o]=B1(e,o,t));return n};p();p();p();p();p();var xh;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(xh||(xh={}));var oM=e=>{var o;if(e.annotations==null)return Pe(!0);let r=Nr(e.annotations,i=>i.id,"annotations");if(r.isErr())return r;let t=dn(e),n=new Set(xt((o=e.annotationSymbols)!=null?o:{}));for(let i of xt(e.annotations)){let a=e.annotations[i];if(a!=null)for(let u of a){if(!n.has(u.symbolKey))return _e({kind:xh.AnnotationUnknownSymbolError,properties:{annotationId:u.id,symbolKey:u.symbolKey}});let l=t(i,u.geometryId);if(l.isErr())return l;if(l.value.geometry.type!=="Point")return _e({kind:xh.AnnotationNonPointGeometryError,properties:{annotationId:u.id,floorId:i,geometryId:u.geometryId}})}}return Pe(!0)};var iM=Rr("a","AnnotationId"),pE=x.Intersect([Ui,x.Object({id:x.Ref(iM,{description:"The unique identifier for the annotation."}),externalId:x.Optional(x.String({description:"The external identifier for the annotation."})),symbolKey:x.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),aM=x.Object({url:x.String({format:"uri",description:"The URL for the symbol."}),name:x.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),q$=x.Object({annotations:jr(x.Record(mt,x.Array(x.Ref(pE)),{additionalProperties:!1})),annotationSymbols:jr(x.Record(x.Index(pE,["symbolKey"]),x.Ref(aM)))},{$id:"AnnotationsSchema"}),J$=/^annotations\/(.*)\.json$/,sM={name:"ext:mvf-annotations",schema:q$,intoBundle:function*(e){if(e.annotations!=null)for(let r of xt(e.annotations))yield{path:"annotations/".concat(r,".json"),contents:e.annotations[r]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},fromBundle:(e,r,t)=>{var o;if(e==="annotation-symbols.json")return{annotationSymbols:t(r)};let n=(o=e.match(J$))==null?void 0:o[1];if(n)return{annotations:{[n]:t(r)}}},references:[iM,pE,aM],integrityCheck:oM};p();p();p();var lu=Rr("lcat","LocationCategoryId"),fE=x.Intersect([x.Object({id:x.Ref(lu),parent:x.Optional(x.Ref(lu))}),mc(["name"]),da],{$id:"LocationCategory"}),uM=[lu,fE];p();p();var Ec;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Ec||(Ec={}));var lM=e=>{var o,i,a,u,l,c,d,f,h;if(e.locationCategories==null&&e.locations==null)return Pe(!0);if(e.locationCategories!=null){let g=Nr(e.locationCategories,b=>b.id,"locationCategories");if(g.isErr())return g}if(e.locations!=null){let g=Nr(e.locations,b=>b.id,"locations");if(g.isErr())return g}if(e.locationInstances!=null){let g=Nr(e.locationInstances,b=>b.id,"locationInstances");if(g.isErr())return g}let r=new Set((i=(o=e.locationCategories)==null?void 0:o.map(g=>g.id))!=null?i:[]);for(let g of(a=e.locationCategories)!=null?a:[])if(g.parent!=null&&!r.has(g.parent))return _e({kind:Ec.UnknownParentCategoryError,properties:{categoryId:g.id,parentCategoryId:g.parent}});let t=dn(e);for(let g of(u=e.locations)!=null?u:[]){for(let b of g.categories)if(!r.has(b))return _e({kind:Ec.UnknownCategoryError,properties:{locationId:g.id,categoryId:b}});for(let b of g.geometryAnchors){let I=t(b.floorId,b.geometryId);if(I.isErr())return I}}let n=new Set((c=(l=e.locations)==null?void 0:l.map(g=>g.id))!=null?c:[]);for(let g of(d=e.locationInstances)!=null?d:[]){if(!n.has(g.parentId))return _e({kind:Ec.UnknownParentLocationError,properties:{locationInstanceId:g.id,parentLocationId:g.parentId}});for(let b of(f=g.categories)!=null?f:[])if(!r.has(b))return _e({kind:Ec.UnknownCategoryError,properties:{locationId:g.id,categoryId:b}});for(let b of(h=g.geometryAnchors)!=null?h:[]){let I=t(b.floorId,b.geometryId);if(I.isErr())return I}}return Pe(!0)};p();var cu=Rr("loc","LocationId"),R1=Rr("loci","LocationInstanceId"),cM=x.Object({name:x.String(),url:x.String({format:"uri"})},{$id:"LocationSocial"}),dM=x.Object({url:x.String({format:"uri"})},{$id:"LocationImage"}),mE=x.Object({label:x.String(),url:x.String({format:"uri"})},{$id:"LocationLink"}),hE=x.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),pM=x.Union([x.Literal("Sunday"),x.Literal("Monday"),x.Literal("Tuesday"),x.Literal("Wednesday"),x.Literal("Thursday"),x.Literal("Friday"),x.Literal("Saturday")],{$id:"OpeningHoursDay"}),Y$="PublicHolidays",gE=x.Union([pM,x.Literal(Y$)],{$id:"OpeningHoursDayOrPublicHoliday"}),N1=x.Object({"@type":x.Optional(x.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:x.Optional(x.Ref(hE,{description:"The time the opening hours start"})),closes:x.Optional(x.Ref(hE,{description:"The time the opening hours end"})),dayOfWeek:x.Optional(x.Union([x.Ref(gE),x.Array(x.Ref(gE))],{description:"The days of the week the opening hours apply to"})),validFrom:x.Optional(x.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:x.Optional(x.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),j1=x.Intersect([x.Object({id:x.Ref(cu),categories:x.Array(x.Ref(lu)),logo:x.Optional(x.String({format:"uri"})),phone:x.Optional(x.String()),social:x.Array(x.Ref(cM)),images:x.Array(x.Ref(dM)),links:x.Array(x.Ref(mE)),website:x.Optional(x.Ref(mE)),openingHours:x.Optional(x.Array(x.Ref(N1)))}),mc(["name"]),vh(),da],{$id:"Location"}),yE=x.Intersect([x.Object({id:x.Ref(R1),parentId:x.Ref(cu)}),x.Partial(x.Omit(j1,["id","parentId","details"])),ni],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),U1=[cu,R1,cM,dM,mE,hE,pM,gE,N1,j1,yE];var K$=x.Object({locations:x.Array(x.Ref(j1)),locationCategories:x.Array(x.Ref(fE)),locationInstances:x.Optional(x.Array(x.Ref(yE)))},{$id:"LocationsExtensionSchema"}),fM="locations.json",mM="location-categories.json",hM="location-instances.json",gM={name:"ext:locations",schema:K$,intoBundle:function*(e){e.locations!=null&&(yield{path:fM,contents:e.locations}),e.locationCategories!=null&&(yield{path:mM,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:hM,contents:e.locationInstances})},fromBundle:(e,r,t)=>{if(e===fM)return{locations:t(r)};if(e===mM)return{locationCategories:t(r)};if(e===hM)return{locationInstances:t(r)}},references:[...uM,...U1],integrityCheck:lM};p();p();var pa;(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"})(pa||(pa={}));var yM=e=>{var h,g,b,I,v,E,T,D,w,B,X,L,P,R,$,V,H,re,j,me;if(e.cms==null)return Pe(!0);let r=e.cms,t=Nr(e.cms.categories,z=>z.id,"cms.categories");if(t.isErr())return t;let n=new Set((g=(h=e.locationCategories)==null?void 0:h.map(z=>z.id))!=null?g:[]);for(let z of(b=r.categories)!=null?b:[])if(!n.has(z.categoryId))return _e({kind:pa.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:z.id,locationCategoryId:z.categoryId}});let o=Nr(e.cms.locations,z=>z.id,"cms.locations");if(o.isErr())return o;let i=new Map((v=(I=e.locations)==null?void 0:I.map(z=>[z.id,z]))!=null?v:[]);for(let z of(E=r.locations)!=null?E:[]){if(!i.has(z.locationId))return _e({kind:pa.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:z.id,locationId:z.locationId}});for(let ue of(T=z.siblingGroups)!=null?T:[])for(let se of(D=ue.siblings)!=null?D:[])if(!i.has(se))return _e({kind:pa.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:z.id,siblingLocationId:se,label:ue.label}});if(z.primaryCategory!=null){let ue=i.get(z.locationId);if(ue!=null&&!ue.categories.includes(z.primaryCategory))return _e({kind:pa.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:z.id,locationId:z.locationId,primaryCategory:z.primaryCategory}})}}if(((w=r.venue)==null?void 0:w.topLocations)!=null){for(let z of r.venue.topLocations)if(!i.has(z))return _e({kind:pa.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:z}})}let a=new Set((X=(B=e.cms.locations)==null?void 0:B.map(z=>z.id))!=null?X:[]),u=Nr(e.cms.locationInstances,z=>z.id,"cms.locationInstances");if(u.isErr())return u;let l=new Set((P=(L=e.locationInstances)==null?void 0:L.map(z=>z.id))!=null?P:[]);for(let z of(R=r.locationInstances)!=null?R:[]){if(!a.has(z.parentId))return _e({kind:pa.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:z.id,enterpriseLocationId:z.parentId}});if(!l.has(z.locationInstanceId))return _e({kind:pa.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:z.id,locationInstanceId:z.locationInstanceId}});for(let ue of($=z.siblingGroups)!=null?$:[])for(let se of(V=ue.siblings)!=null?V:[])if(!i.has(se))return _e({kind:pa.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:z.id,siblingLocationId:se,label:ue.label}})}let c=ca(e),d=dn(e),f=Nr(e.cms.floorText,z=>z.properties.id,"cms.floorText");if(f.isErr())return f;for(let[z,ue]of At((H=r.floorText)!=null?H:{})){let se=c(z);if(se.isErr())return se;for(let pe of ue.features){if(!("geometryId"in pe.properties))continue;let le=d(z,pe.properties.geometryId);if(le.isErr())return le}}for(let[z,ue]of At((re=r.textures)!=null?re:{})){let se=c(z);if(se.isErr())return se;for(let pe of ue){let le=d(z,pe.geometryId);if(le.isErr())return le}}for(let[z,ue]of At((j=r.layers)!=null?j:{})){let se=c(z);if(se.isErr())return se;for(let pe of xt(ue!=null?ue:{})){let le=d(z,pe);if(le.isErr())return le}}for(let[z,ue]of At((me=r.textAreas)!=null?me:{})){let se=c(z);if(se.isErr())return se;for(let pe of ue.features)if("geometryId"in pe.properties){let le=d(z,pe.properties.geometryId);if(le.isErr())return le}}return Pe(!0)};p();p();var Eh=Rr("el","EnterpriseLocationId"),bE=Rr("ec","EnterpriseCategoryId"),vE=Rr("eli","EnterpriseLocationInstanceId"),xE=Rr("ev","EnterpriseVenueId"),EE=Rr("eft","EnterpriseFloorTextId"),bM=[Eh,bE,vE,xE,EE];var vM=x.Object({id:x.Ref(bE),categoryId:x.Ref(lu),color:x.Optional(x.String()),sortOrder:x.Number(),iconFromDefaultList:x.Optional(x.Union([x.String(),x.Null()])),picture:x.Optional(x.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),IE=x.Object({categories:x.Optional(x.Array(x.Ref(vM)))},{$id:"EnterpriseCategoriesSchema"}),xM=[vM,IE];p();var G1=Vn(["left","center","right"]),Q$=G1.schema,$xe=G1.values,Hxe=G1.record,Zxe=G1.is,SE=x.Object({id:x.Ref(EE),text:x.String(),visible:x.Boolean({default:!0}),fontSize:x.Number({default:12,exclusiveMinimum:0}),fontFamily:x.String({default:"Droid Sans"}),color:x.String({default:"black"}),rotation:x.Number({minimum:0,maximum:360}),align:Q$},{$id:"FloorTextCommonProperties"}),CE=x.Intersect([x.Ref(SE),Ui],{$id:"AnchoredFloorTextProperties"}),DE=x.Intersect([x.Ref(SE),x.Object({verticalOffset:x.Number()})],{$id:"FloatingFloorTextProperties"}),EM=x.Union([x.Ref(CE),x.Ref(DE)],{$id:"FloorTextProperties"}),IM=Rn(eo,x.Ref(EM),{$id:"FloorTextFeature"}),eH=Rn(eo,x.Ref(CE),{$id:"AnchoredFloorTextFeature"}),tH=Rn(eo,x.Ref(DE),{$id:"FloatingFloorTextFeature"}),SM=yo(x.Ref(IM),{$id:"EnterpriseFloorTextFeatureCollection"}),CM=x.Record(mt,x.Ref(SM),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),TE=x.Object({floorText:x.Optional(x.Ref(CM))},{$id:"EnterpriseFloorTextSchema"}),DM=[SE,CE,DE,EM,IM,eH,tH,SM,CM,TE];p();var TM=jr(x.Record(to,x.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),wM=jr(x.Record(mt,x.Ref(TM),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),wE=x.Object({layers:x.Optional(x.Ref(wM))},{$id:"EnterpriseLayersSchema"}),MM=[TM,wM,wE];p();p();p();var{schema:AM,values:n3e,record:o3e,is:i3e}=Vn(["reference-point","checkpoint","checkpoint-passport","parent"],{$id:"EnterpriseSiblingGroupType"}),z1=Vn(["closed-temporarily","new","pop-up","coming-soon","relocated"]),rH=z1.schema,a3e=z1.values,s3e=z1.record,u3e=z1.is,ME=x.Object({type:rH,start:x.Optional(x.String({format:"date",description:"The start date of the state"})),end:x.Optional(x.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),AE=x.Object({label:x.String(),siblings:x.Array(x.Ref(cu)),type:x.Optional(x.Ref(AM)),subtype:x.Optional(x.String())},{$id:"SiblingGroup"}),V1=x.Object({name:x.String(),code:x.String()},{$id:"Language"}),PM=[ME,AE,V1,AM];var $1=x.Object({id:x.Ref(Eh),locationId:x.Ref(cu),cmsId:x.String(),type:x.String(),sortOrder:x.Number(),tags:x.Optional(x.Array(x.String())),picture:x.Optional(x.String({format:"uri",description:"The picture of the location"})),states:x.Optional(x.Array(x.Ref(ME),{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:x.Optional(x.Array(x.Ref(AE))),gallery:x.Optional(x.Array(x.Object({caption:x.Optional(x.String()),image:x.String({format:"uri"}),embeddedUrl:x.Optional(x.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:x.Optional(x.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:x.Optional(x.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:x.Optional(x.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:x.Optional(x.Ref(lu)),headerImage:x.Optional(x.String({format:"uri",description:"The location's header image"}))},{$id:"EnterpriseLocation"}),PE=x.Object({locations:x.Optional(x.Array(x.Ref($1)))},{$id:"EnterpriseLocationsSchema"}),_M=[$1,PE];var OM=x.Intersect([x.Object({id:x.Ref(vE),parentId:x.Ref(Eh),locationInstanceId:x.Ref(R1)}),x.Partial(x.Omit($1,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),_E=x.Object({locationInstances:x.Optional(x.Array(x.Ref(OM)))},{$id:"EnterpriseLocationInstancesSchema"}),FM=[OM,_E];p();var H1=Vn(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),kM=H1.schema,w3e=H1.values,M3e=H1.record,A3e=H1.is,OE=x.Object({maxWidth:x.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:x.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:x.Ref(kM),rotation:x.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),BM=x.Intersect([x.Ref(OE),Ui],{$id:"EnterpriseAnchoredTextAreaProperties"}),LM=x.Intersect([x.Ref(OE),x.Object({verticalOffset:x.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),RM=x.Union([BM,LM],{$id:"EnterpriseTextAreaProperties"}),NM=Rn(x.Ref(eo),RM,{$id:"EnterpriseTextAreaFeature"}),jM=yo(x.Ref(NM),{$id:"EnterpriseTextAreaCollection"}),UM=x.Record(mt,x.Ref(jM),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),GM=x.Object({textAreas:x.Optional(x.Ref(UM))},{$id:"EnterpriseTextAreasSchema"}),zM=[kM,OE,BM,LM,RM,NM,jM,UM];p();var FE=x.Object({u:x.Number(),v:x.Number()},{$id:"EnterpriseTextureUV"}),Z1=Vn(["top","side"],{$id:"EnterpriseTextureFace"}),VM=Z1.schema,k3e=Z1.values,B3e=Z1.record,L3e=Z1.is,W1=Vn(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),$M=W1.schema,R3e=W1.values,N3e=W1.record,j3e=W1.is,HM=x.Tuple([cp,dp,cp,dp],{$id:"EnterpriseTextureBounds"}),ZM=x.Intersect([x.Object({repeat:x.Ref(FE),offset:x.Ref(FE),rotation:x.Number({minimum:0,maximum:360}),path:x.String({format:"uri"}),face:x.Ref(VM),surface:x.Ref($M),bounds:x.Ref(HM)},{$id:"EnterpriseTextureProperties"}),Ui],{$id:"EnterpriseTexture"}),WM=x.Array(x.Ref(ZM),{$id:"EnterpriseTextures"}),XM=x.Record(mt,x.Ref(WM),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),kE=x.Object({textures:x.Optional(x.Ref(XM))},{$id:"EnterpriseTexturesSchema"}),qM=[ZM,WM,kE,FE,VM,$M,HM,XM];p();var{schema:JM,values:W3e,record:YM,is:X3e}=Vn(["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"}),KM=x.Intersect([x.Object({id:x.Ref(xE),slug:x.String(),defaultLanguage:x.Ref(V1),languages:x.Array(x.Ref(V1)),countrycode:x.Optional(x.String()),logo:x.Optional(x.String({format:"uri"})),mappedinWebUrl:x.Optional(x.String({format:"uri"})),topLocations:x.Optional(x.Array(x.Ref(cu))),operationHours:x.Optional(x.Array(x.Ref(N1))),coverImage:x.Optional(x.String({format:"uri"})),type:x.Optional(x.Ref(JM))}),mc(["name"]),da],{$id:"EnterpriseVenue"}),BE=x.Object({venue:x.Optional(x.Ref(KM))},{$id:"EnterpriseVenueSchema"}),QM=[KM,BE,JM];var t7=x.Intersect([BE,PE,_E,IE,kE,TE,wE,GM],{$id:"CMSProperties"}),e7=x.Object({cms:x.Optional(x.Ref(t7))},{$id:"CMSExtensionSchema"}),nH=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,r7={name:"ext:cms",schema:e7,intoBundle:function*(e){var t,n,o,i,a,u;if(e.cms==null)return;let r=e.cms;for(let l of xt(r))switch(l){case"floorText":for(let c of xt((t=r.floorText)!=null?t:{}))yield{path:"cms/floorText/".concat(c,".geojson"),contents:((n=r.floorText)!=null?n:{})[c]};continue;case"textures":for(let c of xt((o=r.textures)!=null?o:{}))yield{path:"cms/textures/".concat(c,".json"),contents:((i=r.textures)!=null?i:{})[c]};continue;case"textAreas":for(let c of xt((a=r.textAreas)!=null?a:{}))yield{path:"cms/textAreas/".concat(c,".geojson"),contents:((u=r.textAreas)!=null?u:{})[c]};continue;default:yield{path:"cms/".concat(l,".json"),contents:r[l]};continue}},fromBundle:(e,r,t)=>{let n=e.match(nH);if(!n)return;let[,o,i]=n,a=t(r);switch(o){case"floorText":case"textures":case"textAreas":return{cms:{[o]:{[i]:a}}};default:return{cms:{[i]:a}}}},references:[t7,e7,...QM,..._M,...FM,...xM,...qM,...MM,...DM,...zM,...bM,...PM,...U1],integrityCheck:yM};p();p();p();p();var fa;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(fa||(fa={}));var n7=e=>{let{navigationFlags:r}=e;if(!r||Object.keys(r).length===0)return Pe(!0);let t=Object.entries(r).map(([i,a])=>_({key:i},a)).sort((i,a)=>i.index!==a.index?i.index-a.index:i.bit-a.bit),n=0,o=-1;for(let i of t){if(i.bit===o)return _e({kind:fa.NavigationFlagDuplicateBit,properties:{index:i.index,bit:i.bit,path:"navigationFlags.".concat(i.key)}});if(i.index!=n){if(o!=31)return _e({kind:fa.NavigationFlagMissingDeclaration,properties:{index:n,bit:o+1,path:"navigationFlags"}});if(i.index!=n+1||i.bit!=0)return _e({kind:fa.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=i.index,o=0}else{if(i.bit!==o+1)return _e({kind:fa.NavigationFlagMissingDeclaration,properties:{index:i.index,bit:o+1,path:"navigationFlags"}});o=i.bit}}return Pe(!0)};p();function ml(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}p();var o7=2**32-1,Ih=e=>{var o;let r=Object.keys((o=e.navigationFlags)!=null?o:{}).length;if(r===0)return{index:-1,flag:0};let t=Math.floor(r/32),n=r%32;return{index:t,flag:2**n-1}},Lp=(e,r,t)=>{if(r.index==-1&&e.length===0)return Pe(!0);let n=r.flag>0||r.index===-1?r.index+1:r.index;if(e.length!==n)return _e({kind:fa.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:t}});for(let o=0;o<e.length;o++){let i=e[o];if(o<r.index){if(i>o7)return _e({kind:fa.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:o7,path:t}});continue}else if(i>r.flag)return _e({kind:fa.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:r.flag,path:t}})}return Pe(!0)};var oH=x.Object({index:x.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:x.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),i7=x.Intersect([oH,ni],{$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.'}),LE={accessible:"accessible",outdoors:"outdoors",public:"public"},a7=x.Record(x.String(),i7,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),iH=x.Object({navigationFlags:x.Ref(a7)},{$id:"NavigationFlagsSchema"}),X1=x.Array(x.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),RE=x.Object({flags:x.Ref(X1)},{$id:"WithFlags"}),Ic=x.Intersect([Bp,RE],{$id:"FlaggedGeometryAnchor"}),aH=x.Object({geometryAnchor:Ic},{$id:"WithFlaggedGeometryAnchor"}),sH=x.Object({geometryAnchors:x.Array(Ic)},{$id:"WithFlaggedGeometryAnchors"}),s7={name:"ext:mvf-navigation-flags",schema:iH,intoBundle:function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},fromBundle:(e,r,t)=>e!=="navigationFlags.json"?void 0:{navigationFlags:t(r)},references:[i7,a7,X1,Ic,aH,sH],integrityCheck:n7};p();var u7=e=>{if(e.connections==null)return Pe(!0);let r=Nr(e.connections,o=>o.id,"connections");if(r.isErr())return r;let t=dn(e),n=Ih(e);for(let[o,i]of e.connections.entries()){for(let[a,u]of i.entrances.entries()){let l=t(u.floorId,u.geometryId);if(l.isErr())return l;let c=Lp(u.flags,n,"connections[".concat(o,"].entrances[").concat(a,"]"));if(c.isErr())return c}for(let[a,u]of i.exits.entries()){let l=t(u.floorId,u.geometryId);if(l.isErr())return l;let c=Lp(u.flags,n,"connections[".concat(o,"].exits[").concat(a,"]"));if(c.isErr())return c}}return Pe(!0)};var c7=Rr("c","ConnectionId"),{schema:uH,values:HEe,record:lH,is:ZEe}=Vn(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),d7=uH;var NE=lH;var p7=x.Intersect([x.Object({id:x.Ref(c7,{description:"The unique identifier for the connection."}),entrances:x.Array(x.Ref(Ic)),exits:x.Array(x.Ref(Ic)),entryCost:x.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:x.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:x.Ref(d7,{description:"The type of connection."})}),ni,da],{$id:"ConnectionsProperties"}),f7=x.Array(x.Ref(p7),{$id:"ConnectionsCollection"}),cH=x.Object({connections:x.Ref(f7)},{$id:"ConnectionsExtensionSchema"}),l7="connections.json",m7={name:"ext:connections",schema:cH,intoBundle:function*(e){e.connections!=null&&(yield{path:l7,contents:e.connections})},fromBundle:(e,r,t)=>{if(e===l7)return{connections:t(r)}},references:[p7,f7,d7,c7,Ic,X1],integrityCheck:u7};p();p();var h7=e=>{if(e.defaultStyle==null)return Pe(!0);let r=dn(e);for(let t of Object.values(e.defaultStyle))if(t!=null)for(let n of t.geometryAnchors){let o=r(n.floorId,n.geometryId);if(o.isErr())return o}return Pe(!0)};var g7=x.Intersect([vh(),da,x.Object({altitude:x.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:x.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:x.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:x.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:x.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:x.Optional(x.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),y7=x.Record(x.String(),x.Ref(g7),{$id:"DefaultStyleCollection",additionalProperties:!1}),dH=x.Object({defaultStyle:x.Ref(y7)},{$id:"DefaultStyleSchema"}),b7={name:"ext:mvf-default-style",schema:dH,intoBundle:function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},fromBundle:(e,r,t)=>{if(e==="default-style.json")return{defaultStyle:t(r)}},references:[g7,y7],integrityCheck:h7};p();p();p();p();var q1;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(q1||(q1={}));var v7=e=>{if(e.floorStacks==null)return Pe(!0);let r=Nr(e.floorStacks,n=>n.id,"floorStacks");if(r.isErr())return r;let t=ca(e);for(let n of e.floorStacks){for(let o of n.floors){let i=t(o);if(i.isErr())return i}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return _e({kind:q1.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return Pe(!0)};var Sh=Rr("fs","FloorStackId"),E7=x.Intersect([x.Object({id:x.Ref(Sh,{description:"The unique identifier for the floor stack."}),floors:x.Array(x.Ref(mt),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:x.Optional(x.Ref(mt,{description:"The default floor for the floor stack."}))}),ni],{$id:"FloorStacksProperties"}),I7=x.Array(x.Ref(E7),{$id:"FloorStackCollection"}),pH=x.Object({floorStacks:x.Ref(I7)},{$id:"FloorStackExtensionSchema"}),x7="floor-stacks.json",S7={name:"ext:floor-stacks",schema:pH,intoBundle:function*(e){e.floorStacks!=null&&(yield{path:x7,contents:e.floorStacks})},fromBundle:(e,r,t)=>{if(e===x7)return{floorStacks:t(r)}},references:[Sh,E7,I7],integrityCheck:v7};p();p();var Ch;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(Ch||(Ch={}));var C7=e=>{if(e.facade==null)return Pe(!0);if(e.floorStacks==null)return _e({kind:Ch.MissingFloorStackError,properties:null});let r=new Set(e.floorStacks.map(o=>o.id)),t=dn(e),n=ca(e);for(let[o,i]of At(e.facade)){if(i==null)continue;let a=n(o);if(a.isErr())return a;for(let u of i){let{floorStackId:l,geometryIds:c}=u;if(!r.has(l))return _e({kind:Ch.UnknownFloorStackError,properties:{floorStackId:l}});for(let d of c){let f=t(o,d);if(f.isErr())return f}}}return Pe(!0)};var D7=x.Intersect([x.Object({floorStackId:x.Ref(Sh)}),Pp],{$id:"Facade"}),fH=x.Object({facade:jr(x.Record(mt,x.Array(x.Ref(D7)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),mH=/^facade\/(.*)\.json$/,T7={name:"ext:facade",schema:fH,intoBundle:function*(e){if(e.facade!=null)for(let r of xt(e.facade))yield{path:"facade/".concat(r,".json"),contents:e.facade[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(mH))==null?void 0:o[1];if(n)return{facade:{[n]:t(r)}}},references:[Sh,D7],integrityCheck:C7};p();p();var w7=e=>{if(e.floorImages==null)return Pe(!0);let r=dn(e);for(let[t,n]of At(e.floorImages))if(n!=null)for(let o of n.features){if(!("geometryId"in o.properties))continue;let i=o.properties.geometryId,a=r(t,i);if(a.isErr())return a}return Pe(!0)};var jE=x.Object({path:x.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:x.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:x.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:x.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),M7=x.Intersect([x.Ref(jE),Ui],{$id:"AnchoredFloorImageProperties"}),A7=x.Intersect([x.Ref(jE),x.Object({verticalOffset:x.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),P7=x.Union([M7,A7],{$id:"FloorImageProperties"}),_7=Rn(x.Ref(eo),P7,{$id:"FloorImageFeature"}),O7=yo(x.Ref(_7),{$id:"FloorImageCollection"}),hH=x.Object({floorImages:jr(x.Record(mt,x.Ref(O7),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),gH=/^floorImages\/(.*)\.geojson$/,F7={name:"ext:floor-images",schema:hH,intoBundle:function*(e){if(e.floorImages!=null)for(let r of xt(e.floorImages))yield{path:"floorImages/".concat(r,".geojson"),contents:e.floorImages[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(gH))==null?void 0:o[1];if(n)return{floorImages:{[n]:t(r)}}},references:[jE,M7,A7,P7,_7,O7],integrityCheck:w7};p();p();var k7=e=>{if(e.kinds==null)return Pe(!0);let r=dn(e);for(let[t,n]of At(e.kinds))if(n!=null)for(let o of xt(n)){let i=r(t,o);if(i.isErr())return i}return Pe(!0)};var{values:oIe,schema:yH,record:iIe,is:aIe}=Vn(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),B7=yH;var L7=jr(x.Record(to,x.Ref(B7),{additionalProperties:!1,$id:"GeometryKinds"})),bH=x.Object({kinds:jr(x.Record(mt,x.Ref(L7),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),vH=/^kinds\/(.*)\.json$/,R7={name:"ext:kinds",schema:bH,intoBundle:function*(e){if(e.kinds!=null)for(let r of xt(e.kinds))yield{path:"kinds/".concat(r,".json"),contents:e.kinds[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(vH))==null?void 0:o[1];if(n)return{kinds:{[n]:t(r)}}},references:[B7,L7],integrityCheck:k7};p();p();p();var Dh;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(Dh||(Dh={}));var N7=e=>{if(e.nodes==null)return Pe(!0);let r=Nr(e.nodes,o=>o.properties.id,"nodes");if(r.isErr())return r;let t=dn(e),n=Ih(e);for(let[o,i]of At(e.nodes)){if(i==null)continue;let a=new Set(i.features.map(u=>u.properties.id));for(let[u,l]of i.features.entries()){for(let c of l.properties.geometryIds){let d=t(o,c);if(d.isErr())return d}for(let[c,d]of l.properties.neighbors.entries()){if(!a.has(d.id))return _e({kind:Dh.UnknownNeighbor,properties:{floorId:o,nodeId:l.properties.id,neighborId:d.id}});if(d.id===l.properties.id)return _e({kind:Dh.SelfReference,properties:{floorId:o,nodeId:l.properties.id}});let f=Lp(d.flags,n,'nodes["'.concat(o,'"].features[').concat(u,"].properties.neighbors[").concat(c,"]"));if(f.isErr())return f}}}return Pe(!0)};var UE=Rr("n","NodeId"),j7=x.Intersect([x.Object({id:x.Ref(UE,{description:"The unique identifier for the node."}),extraCost:x.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),RE],{$id:"NodeNeighbor"}),U7=x.Intersect([x.Object({id:x.Ref(UE,{description:"The unique identifier for the node."}),neighbors:x.Array(x.Ref(j7),{description:"The neighbors of the node."})}),Pp],{$id:"NodeProperties"}),G7=Rn(x.Ref(eo),U7,{$id:"NodeFeature"}),z7=yo(x.Ref(G7),{$id:"NodeCollection"}),xH=x.Object({nodes:jr(x.Record(mt,x.Ref(z7),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),EH=/^nodes\/(.*)\.(geo)?json$/,V7={name:"ext:nodes",schema:xH,intoBundle:function*(e){if(e.nodes!=null)for(let r of xt(e.nodes))yield{path:"nodes/".concat(r,".geojson"),contents:e.nodes[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(EH))==null?void 0:o[1];if(n)return{nodes:{[n]:t(r)}}},references:[UE,j7,U7,G7,z7],integrityCheck:N7};p();p();p();var J1;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(J1||(J1={}));var $7=e=>{if(e.outdoors==null)return Pe(!0);let r=ca(e);for(let t of e.outdoors.floors){let n=r(t);if(n.isErr())return n;if(e.floorStacks!=null){for(let o of e.floorStacks)if(o.floors.includes(t))return _e({kind:J1.FloorInFloorStackError,properties:{floorId:t,floorStackId:o.id}})}}return Pe(!0)};var Z7=x.Object({floors:x.Array(x.Ref(mt),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),IH=x.Object({outdoors:x.Ref(Z7)},{$id:"OutdoorsExtensionSchema"}),H7="outdoors.json",W7={name:"ext:outdoors",schema:IH,intoBundle:function*(e){e.outdoors!=null&&(yield{path:H7,contents:e.outdoors})},fromBundle:(e,r,t)=>{if(e===H7)return{outdoors:t(r)}},references:[Z7],integrityCheck:$7};p();p();p();var Y1;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(Y1||(Y1={}));var X7=e=>{if(e.tileset==null)return Pe(!0);let r=new Set;if(r.add(e.tileset.default.key),e.tileset.others)for(let t of e.tileset.others){if(r.has(t.key))return _e({kind:Y1.TilesetDuplicateKeyError,properties:{key:t.key}});r.add(t.key)}return Pe(!0)};var GE=x.Object({key:x.String({minLength:1,description:"Unique identifier for the tileset style."}),name:x.String({minLength:1,description:"Display name of the tileset style."}),url:x.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),q7=x.Object({default:x.Ref(GE,{description:"The default tileset style, which should be used."}),others:x.Optional(x.Array(x.Ref(GE,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),SH=x.Object({tileset:x.Ref(q7)},{$id:"TilesetExtensionSchema"}),J7={name:"ext:mvf-tileset",schema:SH,intoBundle:function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},fromBundle:(e,r,t)=>{if(e==="tileset.json")return{tileset:t(r)}},references:[GE,q7],integrityCheck:X7};p();var Y7=x.Object({},{$id:"WalkableProperties"}),K7=x.Object({},{$id:"NonWalkableProperties"}),Q7=jr(x.Record(to,x.Ref(Y7),{$id:"WalkableGeometries",additionalProperties:!1})),eA=jr(x.Record(to,x.Ref(K7),{$id:"NonWalkableGeometries",additionalProperties:!1})),CH=x.Object({walkable:jr(x.Record(mt,x.Ref(Q7),{additionalProperties:!1})),nonwalkable:jr(x.Record(mt,x.Ref(eA),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),DH=/^walkable\/(.*)\.json$/,TH=/^nonwalkable\/(.*)\.json$/,tA={name:"ext:mvf-traversability",schema:CH,intoBundle:function*(e){if(e.walkable!=null)for(let r of xt(e.walkable))yield{path:"walkable/".concat(r,".json"),contents:e.walkable[r]};if(e.nonwalkable!=null)for(let r of xt(e.nonwalkable))yield{path:"nonwalkable/".concat(r,".json"),contents:e.nonwalkable[r]}},fromBundle:(e,r,t)=>{var i,a;let n=(i=e.match(DH))==null?void 0:i[1];if(n!=null)return{walkable:{[n]:t(r)}};let o=(a=e.match(TH))==null?void 0:a[1];if(o!=null)return{nonwalkable:{[o]:t(r)}}},references:[Y7,K7,Q7,eA]};p();p();function rA(e){return e.replace(/^g_/,"s_")}function K1(e){return e.replace(/^g_/,"o_")}function wH(e){return e.replace(/^g_/,"w_")}function nA(e){return e.replace(/^loci_/,"eli_")}function Th(e){return e.replace(/^loc_/,"el_")}function Q1(e){return e.replace(/^lcat_/,"ec_")}function MH(e){return e.replace(/^g_/,"ar_")}function oA(e){return e.replace(/^n_/,"s_")}function AH(e,r,t){switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":{let n=[],o=0,i=e.geometry.type.replace("Multi","");for(let a of e.geometry.coordinates)n.push(ne(_({},e),{geometry:{type:i,coordinates:a},properties:ne(_({},e.properties),{id:"".concat(r,"-").concat(o++),kind:t})}));return n}default:return[ne(_({},e),{properties:ne(_({},e.properties),{id:r,kind:t})})]}}function Rp(e,r,t,n){let o=new Map;for(let{feature:i,floorId:a}of e){let u=i.properties.id,l=n.get(u);if(r.has(u)){let c=AH(i,t(u),l),d=c.map(h=>h.properties.id),f=d.map(h=>({geometryId:h,floorId:a}));o.set(u,{ids:d,features:c,anchors:f})}}return o}function iA(e){var c,d;let r={space:new Map,obstruction:new Map,area:new Map,window:new Map,object:new Map};if(!e.geometry)return r;let t=PH(e),n=At(e.geometry).flatMap(([f,h])=>{var g;return((g=h==null?void 0:h.features)!=null?g:[]).map(b=>({feature:b,floorId:f}))}).flat(),o=new Set(Object.values((c=e.walkable)!=null?c:{}).filter(f=>f!==void 0).flatMap(xt)),i=new Set(Object.values((d=e.nonwalkable)!=null?d:{}).filter(f=>f!==void 0).flatMap(xt)),a=new Set(Array.from(t.entries()).filter(([f,h])=>h==="area").map(([f])=>f)),u=new Set(Array.from(t.entries()).filter(([f,h])=>h==="object").map(([f])=>f)),l=new Set(Array.from(t.entries()).filter(([f,h])=>h==="window").map(([f])=>f));return o.size>0&&(r.space=Rp(n,o,rA,t)),i.size>0&&(r.obstruction=Rp(n,i,K1,t)),a.size>0&&(r.area=Rp(n,a,MH,t)),u.size>0&&(r.object=Rp(n,u,K1,t)),l.size>0&&(r.window=Rp(n,l,wH,t)),o.size===0&&i.size===0&&a.size===0&&(r.space=Rp(n,new Set(n.map(f=>f.feature.properties.id)),rA,t)),r}function PH(e){var t,n,o;let r=new Map(Object.values((t=e.kinds)!=null?t:{}).filter(i=>i!==void 0).flatMap(At));for(let i of(o=(n=e.connections)==null?void 0:n.filter(a=>a.type!=="door"))!=null?o:[]){for(let a of i.entrances)r.set(a.geometryId,"connection.".concat(i.type));for(let a of i.exits)r.set(a.geometryId,"connection.".concat(i.type))}return r}function aA(e){if(!e||e.length===0)return[];let r=Math.max(...e.map(t=>t.length));return e.reduce((t,n)=>t.map((o,i)=>{var a;return o|((a=n[i])!=null?a:0)}),Array(r).fill(0))}function sA(e){var l;let{nodesByGeometryId:r,incomingEdgesByNodeId:t,nodesById:n}=_H(e),o=iA(e),i=OH(e),a=(l=e.navigationFlags)!=null?l:{};return{geometryMaps:o,nodesByGeometryId:r,geometryFeatureById:i,navigationFlags:a,incomingEdgesByNodeId:t,nodesById:n}}function _H(e){var o,i,a;let r=new Map,t=new Map,n=new Map;for(let u of Object.values((o=e.nodes)!=null?o:{}))for(let l of(i=u==null?void 0:u.features)!=null?i:[]){if(n.set(l.properties.id,l),l.properties.geometryIds.length>0)for(let c of l.properties.geometryIds){let d=(a=r.get(c))!=null?a:[];d.push(l.properties.id),r.set(c,d)}if(l.properties.neighbors.length>0)for(let c of l.properties.neighbors){let d=t.get(c.id);d!=null?d.push(c):t.set(c.id,[c])}}return{nodesByGeometryId:r,incomingEdgesByNodeId:t,nodesById:n}}function OH(e){var t,n;let r=new Map;for(let o of Object.values((t=e.geometry)!=null?t:{}))for(let i of(n=o==null?void 0:o.features)!=null?n:[])r.set(i.properties.id,i);return r}p();function uA(e,r){if(!e.annotations||!e.annotationSymbols||!e.geometry)return{};let t={};for(let[n,o]of At(e.annotations)){if(!o||o.length===0||!e.geometry[n]||e.geometry[n].features.length===0)continue;let i=new Map(e.geometry[n].features.map(u=>[u.properties.id,u])),a={type:"FeatureCollection",features:[]};for(let u of o){let l=i.get(u.geometryId);if(!l||l.geometry.type!=="Point")continue;let c={id:u.id,externalId:u.externalId,symbolId:u.symbolKey};a.features.push({type:"Feature",geometry:l.geometry,properties:c})}t[n]=a}return{annotation:t}}p();function lA(e,{nodesByGeometryId:r}){var a,u,l,c,d,f,h;let t={"connection.json":[],entrance:{}},n=(a=e.navigationFlags)==null?void 0:a[LE.accessible],o=(u=e.navigationFlags)==null?void 0:u[LE.outdoors],i=new Map(Object.values((l=e.geometry)!=null?l:{}).flatMap(g=>{var b;return(b=g==null?void 0:g.features)!=null?b:[]}).map(g=>[g.properties.id,g]));for(let g of(c=e.connections)!=null?c:[]){if(zE(g,i)&&!FH(g)){let T=kH(g,i,r,o);for(let[D,w]of T)t.entrance[D]||(t.entrance[D]={type:"FeatureCollection",features:[]}),t.entrance[D].features.push(w);continue}let b=n!=null&&g.entrances.some(T=>ml(T,n))&&g.exits.some(T=>ml(T,n)),I=Array.from(new Set([...g.entrances.map(T=>r.get(T.geometryId)),...g.exits.map(T=>r.get(T.geometryId))].flat().filter(T=>T!=null))),v=aA([...g.entrances.map(T=>T.flags),...g.exits.map(T=>T.flags)]),E={id:g.id,externalId:(f=(d=g.details)==null?void 0:d.externalId)!=null?f:"",type:g.type,accessible:b,nodes:I,flags:v};(h=g.details)!=null&&h.name&&(E.details={name:g.details.name}),g.extra&&(E.extra=g.extra),t["connection.json"].push(E)}return t}function zE(e,r){return e.type==NE.door&&e.entrances.every(t=>{let n=r.get(t.geometryId);return(n==null?void 0:n.geometry.type)==="LineString"})}function FH(e){return e.entrances.length===0||e.exits.length===0?!1:new Set([...e.entrances.map(t=>t.floorId),...e.exits.map(t=>t.floorId)]).size>=2}function kH(e,r,t,n){var i,a;if(e.type!==NE.door)return[];let o=[];for(let u of e.entrances){let l=r.get(u.geometryId);if((l==null?void 0:l.geometry.type)==="LineString"){let c={type:"Feature",geometry:l.geometry,properties:{id:e.id,externalId:(a=(i=e.details)==null?void 0:i.externalId)!=null?a:"",isExterior:BH(e,n)}},d=e.details;d&&(c.properties.details={name:d.name,description:d.description},d.icon&&(c.properties.details.images=[{url:d.icon,altText:"".concat(d.name," icon")}]));let f=t.get(u.geometryId);f&&f.length>0&&(c.properties.node=f[0]),o.push([u.floorId,c])}}return o}function BH(e,r){return e.entrances.some(t=>ml(t,r))||e.exits.some(t=>ml(t,r))}p();function dA(e,{geometryMaps:r,nodesByGeometryId:t}){var D,w,B,X,L,P,R,$,V,H,re,j,me,z,ue,se,pe,le,ye,Fe,Ee,Oe,we,Le,Qe,Ge,N,xe,Z,De,Ie,ve,Ne,Et,zt,Bt,rr,Hr,_n,On,Fn,vr,sr,vn,Ko,Cr,Qr,Dr;let n={categories:[],locations:[],locationInstances:[],layers:[],venue:{slug:"",name:"",externalId:"",defaultLanguage:{name:"English",code:"en"},languages:[]}},o=(D=e.manifest)==null?void 0:D.features[0];o&&(n.venue.defaultFloor=o.properties.defaultFloor,n.venue.tzid=o.properties.tzid,n.venue.name=o.properties.name,n.venue.defaultLanguage={name:(w=o.properties.language)!=null?w:"English",code:(B=o.properties.language)!=null?B:"en"});let i=(X=e.cms)==null?void 0:X.venue;i&&(n.venue=ne(_({},n.venue),{slug:i.slug,name:(R=(P=(L=i.details)==null?void 0:L.name)!=null?P:n.venue.name)!=null?R:o.properties.name,externalId:(V=($=i.details)==null?void 0:$.externalId)!=null?V:"",defaultLanguage:i.defaultLanguage,languages:(H=i.languages)!=null?H:[],countrycode:i.countrycode,coverImage:i.coverImage,logo:i.logo,icon:(re=i.details)==null?void 0:re.icon,extra:i.extra,mappedinWebUrl:i.mappedinWebUrl,operationHours:i.operationHours,topLocations:i.topLocations,type:i.type&&i.type in YM?i.type:"unknown"}));let a=new Map,u=(j=e.locations)!=null?j:[],l=(z=(me=e.cms)==null?void 0:me.locations)!=null?z:[],c=(se=(ue=e.cms)==null?void 0:ue.categories)!=null?se:[],d=new Map((c!=null?c:[]).map(G=>[G.categoryId,G]));if(u.length>0){let G=new Map(l.map(S=>[S.locationId,S]));for(let S of u){let C=(pe=G.get(S.id))!=null?pe:{};if(S){let A=S.details,O={id:(C==null?void 0:C.cmsId)!==void 0?"el_".concat(C==null?void 0:C.cmsId):Th(S.id),name:A.name,externalId:(le=A.externalId)!=null?le:"",type:(ye=C.type)!=null?ye:"location",sortOrder:(Fe=C.sortOrder)!=null?Fe:0,amenity:C.amenity,description:A.description,extra:S.extra,links:S.links,operationHours:S.openingHours,gallery:C.gallery,logo:S.logo,shortName:A.shortName,picture:C.picture,showFloatingLabelWhenImagePresent:C.showFloatingLabelWhenImagePresent,showLogo:C.showLogo,siblingGroups:C.siblingGroups,states:C.states,tags:C.tags,spaces:[],nodes:[],polygons:[],headerImage:C.headerImage};if(S.phone&&(O.phone={number:S.phone}),C.primaryCategory){let Y=d.get(C.primaryCategory);Y&&(O.primaryCategory=Y.id)}let F=cA(S.social);S.website&&(F.website=S.website.url),O.social=F;for(let Y of S.geometryAnchors){let ee=r.space.get(Y.geometryId),de=r.obstruction.get(Y.geometryId),W=ee!=null?ee:de;if(W){let J=new Set(W.features.filter(fe=>fe.geometry.type==="Polygon").map(fe=>fe.properties.id));for(let fe of W.anchors)ee!=null&&W===ee&&O.spaces.push({floor:fe.floorId,id:fe.geometryId}),J.has(fe.geometryId)&&O.polygons.push({map:fe.floorId,id:fe.geometryId})}let ie=t.get(Y.geometryId);for(let J of ie!=null?ie:[])O.nodes.push({map:Y.floorId,id:J})}n.locations.push(O);for(let Y of S.categories)a.set(Y,[...(Ee=a.get(Y))!=null?Ee:[],S.id])}}}let f=(we=(Oe=e.cms)==null?void 0:Oe.locationInstances)!=null?we:[],h=e.locationInstances;if(h){let G=new Map(f.map(C=>[C.locationInstanceId,C])),S=[];for(let C of h){let A=(Le=G.get(C.id))!=null?Le:{};if(C){let O={id:nA(C.id),parent:(Qe=A.parentId)!=null?Qe:Th(C.parentId),name:(Ge=C.details)==null?void 0:Ge.name,externalId:(N=C.details)==null?void 0:N.externalId,type:A.type,sortOrder:A.sortOrder,amenity:A.amenity,description:(xe=C.details)==null?void 0:xe.description,extra:C.extra,links:C.links,operationHours:C.openingHours,gallery:A.gallery,picture:A.picture,showFloatingLabelWhenImagePresent:A.showFloatingLabelWhenImagePresent,showLogo:A.showLogo,siblingGroups:A.siblingGroups,states:A.states,tags:A.tags,logo:C.logo,shortName:(Z=C.details)==null?void 0:Z.shortName,headerImage:A.headerImage};C.phone&&(O.phone={number:C.phone});let F=cA((De=C.social)!=null?De:[]);if(C.website&&(F.website=C.website.url),Object.keys(F).length>0&&(O.social=F),(Ie=C.geometryAnchors)!=null&&Ie.length){let Y=C.geometryAnchors.flatMap(ee=>{var de,W;return(W=(de=r.space.get(ee.geometryId))==null?void 0:de.anchors)!=null?W:[]});Y.length>0&&(O.spaces=Y.map(ee=>({floor:ee.floorId,id:ee.geometryId})))}if(C.geometryAnchors){O.spaces=[],O.polygons=[],O.nodes=[];for(let Y of C.geometryAnchors){let ee=r.space.get(Y.geometryId);if(ee){let W=new Set(ee.features.filter(ie=>ie.geometry.type==="Polygon").map(ie=>ie.properties.id));for(let ie of ee.anchors)O.spaces.push({floor:ie.floorId,id:ie.geometryId}),W.has(ie.geometryId)&&O.polygons.push({map:ie.floorId,id:ie.geometryId})}let de=t.get(Y.geometryId);for(let W of de!=null?de:[])O.nodes.push({map:Y.floorId,id:W})}}S.push(O)}}S.length>0&&(n.locationInstances=S)}let g=e.locationCategories;if(g){let G=[],S=new Map(g.map(F=>[F.id,F])),C=new Map((c!=null?c:[]).map(F=>[F.categoryId,F])),A=new Map;for(let F of g){let Y=S.get(F.parent);if(Y){let ee=(ve=A.get(Y.id))!=null?ve:[];ee.push(F.id),A.set(Y.id,ee)}}for(let F of g){let Y=C.get(F.id);if(F){let ee=((Ne=A.get(F.id))!=null?Ne:[]).map(Q1),de={id:Q1(F.id),name:F.details.name,externalId:(Et=F.details.externalId)!=null?Et:"",sortOrder:(zt=Y==null?void 0:Y.sortOrder)!=null?zt:0,children:ee,locations:((Bt=a.get(F.id))!=null?Bt:[]).map(Th),icon:F.details.icon,picture:Y==null?void 0:Y.picture,color:Y==null?void 0:Y.color,extra:F.extra,iconFromDefaultList:Y==null?void 0:Y.iconFromDefaultList};G.push(de)}}n.categories=G;let O={};for(let F of u)O[Th(F.id)]=F.categories.map(Q1).filter(Y=>Y!==void 0);n.categoryPriorities=O}let b={};for(let[G,S]of Object.entries((rr=e.defaultStyle)!=null?rr:{}))if(S.buffer){let C=S.geometryAnchors.flatMap(A=>{var O,F;return(F=(O=r.space.get(A.geometryId))==null?void 0:O.anchors)!=null?F:[]});b[G]={edgeOffset:S.buffer,geometryAnchors:C}}Object.keys(b).length>0&&(n.enterpriseStyles=b);let I=new Map;for(let G of Object.values((_n=(Hr=e.cms)==null?void 0:Hr.layers)!=null?_n:{}))if(G)for(let[S,C]of At(G)){if(typeof C!="string")continue;let A=(On=I.get(C))!=null?On:{name:C,id:"ely_".concat(C),spaces:[]};A.spaces.push(...(vr=(Fn=r.space.get(S))==null?void 0:Fn.anchors.map(O=>({floorId:O.floorId,spaceId:O.geometryId})))!=null?vr:[]),I.set(C,A)}I.size>0&&(n.layers=Array.from(I.values()));let v=[];for(let G of Object.values((vn=(sr=e.cms)==null?void 0:sr.textures)!=null?vn:{}))for(let S of G){let C=(Ko=r.space.get(S.geometryId))==null?void 0:Ko.anchors;!C||C.length<1||S.face==="unknown"||S.surface==="unknown"||v.push({repeat:S.repeat,offset:S.offset,rotation:S.rotation,path:S.path,face:S.face,surface:S.surface,bounds:S.bounds,geometryAnchors:C})}v.length>0&&(n.textures=v);let E={};for(let[G,S]of Object.entries((Qr=(Cr=e.cms)==null?void 0:Cr.floorText)!=null?Qr:{})){let C={type:"FeatureCollection",features:[]};for(let A of S.features){if(A.properties.align==="unknown")continue;let O={align:A.properties.align,color:A.properties.color,fontFamily:A.properties.fontFamily,fontSize:A.properties.fontSize,rotation:A.properties.rotation,text:A.properties.text,visible:A.properties.visible};"geometryId"in A.properties?O.geometryId=A.properties.geometryId:O.verticalOffset=A.properties.verticalOffset,C.features.push({type:"Feature",geometry:A.geometry,properties:O})}C.features.length>0&&(E[G]=C)}Object.keys(E).length>0&&(n.floorText=E);let T={enterprise:n};if((Dr=e.cms)!=null&&Dr.textAreas){let G={};for(let[S,C]of At(e.cms.textAreas)){let A={type:"FeatureCollection",features:[]};for(let O of C.features){if(O.properties.align==="unknown")continue;let F={align:O.properties.align,maxWidth:O.properties.maxWidth,maxHeight:O.properties.maxHeight,rotation:O.properties.rotation};"geometryId"in O.properties?F.anchorId=O.properties.geometryId:F.verticalOffset=O.properties.verticalOffset;let Y={type:"Feature",geometry:O.geometry,properties:F};A.features.push(Y)}G[S]=A}T.textAreas=G}return T}var LH=["facebook","instagram","twitter"];function cA(e){let r={};for(let{name:t,url:n}of e){let o=t.toLowerCase();LH.includes(o)&&(r[o]=n)}return r}p();var RH=e=>"fc_".concat(e.slice(3));function pA(e,{geometryMaps:r}){var o;if(!e.facade)return{};let t={},n={};for(let[i,a]of At(e.facade))if(a)for(let u of Object.values(a)){let{floorStackId:l,geometryIds:c}=u,d=RH(l);(o=n[l])!=null||(n[l]={id:d,spaces:[]}),n[l].spaces.push(...c.map(f=>{var h,g;return{floorId:i,spaceId:(g=(h=r.space.get(f))==null?void 0:h.ids[0])!=null?g:""}}))}return Object.keys(n).length>0&&(t.facade=n),t}p();function fA(e,r={}){var o,i,a,u,l,c,d,f,h,g,b,I;let t={type:"FeatureCollection",features:[]},n=[];for(let v of e.floors.features)n.push({id:v.properties.id,externalId:(i=(o=v.properties.details)==null?void 0:o.externalId)!=null?i:"",elevation:v.properties.elevation,name:(u=(a=v.properties.details)==null?void 0:a.name)!=null?u:"",shortName:(c=(l=v.properties.details)==null?void 0:l.shortName)!=null?c:"",subtitle:v.properties.subtitle,maxHeight:v.properties.maxHeight}),t.features.push({type:"Feature",geometry:v.geometry,properties:{id:v.properties.id,externalId:(f=(d=v.properties.details)==null?void 0:d.externalId)!=null?f:"",elevation:v.properties.elevation,name:(g=(h=v.properties.details)==null?void 0:h.name)!=null?g:"",shortName:(I=(b=v.properties.details)==null?void 0:b.shortName)!=null?I:"",subtitle:v.properties.subtitle,maxHeight:v.properties.maxHeight}});return{"floor.geojson":t,"map.geojson":n}}p();function mA(e,{geometryMaps:r}){var o,i,u,l,c;let t={},n={};for(let[d,f]of At((o=e.floorImages)!=null?o:{})){let h={features:[],type:"FeatureCollection"};for(let g of(i=f==null?void 0:f.features)!=null?i:[])if("verticalOffset"in g.properties)h.features.push(g);else{let a=g.properties,{geometryId:b}=a,I=kn(a,["geometryId"]),v=(c=(u=r.space.get(b))==null?void 0:u.ids[0])!=null?c:(l=r.obstruction.get(b))==null?void 0:l.ids[0];if(!v)continue;let E={geometry:g.geometry,properties:ne(_({},I),{anchorId:v}),type:g.type};h.features.push(E)}n[d]=h}return Object.keys(n).length>0&&(t.floorImages=n),t}p();function hA(e,r={}){var o,i,a,u,l,c,d;let t=[];for(let f of(o=e==null?void 0:e.floorStacks)!=null?o:[]){let h={id:f.id,floors:f.floors,maps:f.floors,externalId:(a=(i=f.details)==null?void 0:i.externalId)!=null?a:"",name:(l=(u=f.details)==null?void 0:u.name)!=null?l:"",shortName:(d=(c=f.details)==null?void 0:c.shortName)!=null?d:"",type:"Building"};f.defaultFloor&&(h.defaultFloor=f.defaultFloor),t.push(h)}if(e.outdoors&&e.outdoors.floors.length>0){let f={id:"outdoors",floors:e.outdoors.floors,maps:e.outdoors.floors,type:"Outdoor",name:"Outdoors",externalId:"outdoors"};t.push(f)}return{"floorstack.json":t,"mapstack.geojson":t}}p();p();var vA=Kl(bA(),1),zH=e=>{let r=e.geometry.coordinates[0],t=0;for(let n=0;n<r.length-1;n++)t+=r[n][0]*r[n+1][1]-r[n+1][0]*r[n][1];return Math.abs(t/2)},VH=(e,r)=>{let[t,n]=e,o=r.geometry.coordinates[0],i=!1;for(let a=0,u=o.length-1;a<o.length;u=a++){let[l,c]=o[a],[d,f]=o[u];c>n!=f>n&&t<(d-l)*(n-c)/(f-c)+l&&(i=!i)}return i},$H=e=>{let r=e.geometry.coordinates[0],t=0,n=0;for(let o=0;o<r.length-1;o++)t+=r[o][0],n+=r[o][1];return{geometry:{coordinates:[t/(r.length-1),n/(r.length-1)]}}},HH=e=>{let r=zH(e),t=Number.isFinite(r)?Math.max(r,1):1;return Math.sqrt(t)*1e-6},tb=e=>{try{let t=$H(e).geometry.coordinates;if(!VH(t,e)){let o=(0,vA.default)(e.geometry.coordinates,HH(e));return Pe([o[0],o[1]])}return Pe(t)}catch(r){return _e(new Error("Unable to calculate center of polygon"))}};function ZE(e){var r;return((r=e==null?void 0:e.geometry)==null?void 0:r.type)==="Polygon"}function EA(e,{geometryMaps:r,nodesByGeometryId:t,nodesById:n}){var d,f,h,g,b,I,v,E,T,D;let o=qH(e.defaultStyle),i={},a={},u={},l={};for(let w of xt(e.geometry)){let B=e.geometry[w];if(!B)continue;let X=[],L=[],P=[],R=[];for(let $ of B.features){let V=$.properties.id,H=o.has(V),re=(d=t.get(V))!=null?d:[];for(let j of(h=(f=r.space.get(V))==null?void 0:f.features)!=null?h:[])X.push(xA(j,re));for(let j of(b=(g=r.obstruction.get(V))==null?void 0:g.features)!=null?b:[])if(L.push(ZH(j,H)),r.object.has(V)){let me=(I=t.get(V))!=null?I:[],z=me.map(ue=>n.get(ue)).filter(ue=>ue!=null);for(let ue of z){let se=xA({type:"Feature",geometry:ue.geometry,properties:{id:oA(ue.properties.id),kind:"desk-entrance",details:{externalId:K1(V)}}},me);X.push(se)}}for(let j of(E=(v=r.area.get(V))==null?void 0:v.features)!=null?E:[])P.push(WH(j,re));for(let j of(D=(T=r.window.get(V))==null?void 0:T.features)!=null?D:[])R.push(XH(j))}X.length>0&&(i[w]={type:"FeatureCollection",features:X.filter($=>$!==null)}),L.length>0&&(a[w]={type:"FeatureCollection",features:L.filter($=>$!==null)}),P.length>0&&(u[w]={type:"FeatureCollection",features:P.filter($=>$!==null)}),R.length>0&&(l[w]={type:"FeatureCollection",features:R.filter($=>$!==null)})}let c={space:i,obstruction:a};return Object.keys(u).length>0&&(c.area=u),Object.keys(l).length>0&&(c.window=l),c}function xA(e,r){var n,o;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":return null}let t={type:"Feature",geometry:e.geometry,properties:{destinationNodes:r,id:e.properties.id,externalId:(o=(n=e.properties.details)==null?void 0:n.externalId)!=null?o:"",kind:e.properties.kind}};return e.properties.details&&(t.properties.details={name:e.properties.details.name,description:e.properties.details.description,images:e.properties.details.icon?[{url:e.properties.details.icon,altText:e.properties.details.name?"".concat(e.properties.details.name," icon"):"icon"}]:void 0}),ZE(t)&&(t.properties.center=tb(t).unwrapOr(void 0)),t}function ZH(e,r){var o,i;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"Point":return null}let t=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:t.id,externalId:(i=(o=t.details)==null?void 0:o.externalId)!=null?i:"",entrances:[],kind:t.kind,footprintComponent:r}};return ZE(n)&&(n.properties.center=tb(n).unwrapOr(void 0)),t.details&&(n.properties.details={name:t.details.name,description:t.details.description,images:t.details.icon?[{url:t.details.icon,altText:t.details.name?"".concat(t.details.name," icon"):"icon"}]:void 0}),n}function WH(e,r){var o,i;if(e.geometry.type!=="Polygon")return null;let t=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:t.id,externalId:(i=(o=t.details)==null?void 0:o.externalId)!=null?i:"",destinationNodes:r}};return ZE(n)&&(n.properties.center=tb(n).unwrapOr(void 0)),t.details&&(n.properties.details={name:t.details.name,description:t.details.description,images:t.details.icon?[{url:t.details.icon,altText:t.details.name?"".concat(t.details.name," icon"):"icon"}]:void 0}),n}function XH(e){return e.geometry.type!=="LineString"?null:{type:"Feature",geometry:e.geometry,properties:{id:e.properties.id}}}function qH(e){var t,n;return new Set(((n=(t=e==null?void 0:e.ExteriorWalls)==null?void 0:t.geometryAnchors)!=null?n:[]).map(o=>o.geometryId))}p();function IA(e,{geometryMaps:r,geometryFeatureById:t}){var o,i,a,u,l,c,d,f,h,g,b,I,v;if(!e.locationCategories&&!e.locations)return{};let n={};if((o=e.locationCategories)!=null&&o.length){let E=[];for(let T of e.locationCategories){let D={id:T.id,name:T.details.name,icon:(i=T.details.icon)!=null?i:""};T.parent&&(D.parent=T.parent),E.push(D)}n["category.json"]=E}if((a=e.locations)!=null&&a.length){let E=JH(e,{geometryFeatureById:t}),T=[];for(let D of e.locations){let w={id:D.id,name:D.details.name,categories:D.categories,spaces:[],obstructions:[],areas:[],annotations:[],connections:[],entrances:[],links:D.links,openingHoursSpecification:(u=D.openingHours)!=null?u:[],pictures:D.images,social:D.social,description:D.details.description,externalId:D.details.externalId,icon:D.details.icon,logo:D.logo,phone:D.phone,website:D.website};T.push(w);for(let{geometryId:B,floorId:X}of D.geometryAnchors)w.spaces.push(...(c=(l=r.space.get(B))==null?void 0:l.ids.map(L=>({id:L,floor:X})))!=null?c:[]),w.obstructions.push(...(f=(d=r.obstruction.get(B))==null?void 0:d.ids.map(L=>({id:L,floor:X})))!=null?f:[]),w.areas.push(...(g=(h=r.area.get(B))==null?void 0:h.ids.map(L=>({id:L,floor:X})))!=null?g:[]),w.entrances.push(...(b=E.entrancesByGeometryId.get(B))!=null?b:[]),w.connections.push(...(I=E.connectionsByGeometryId.get(B))!=null?I:[]),w.annotations.push(...(v=E.annotationsByGeometryId.get(B))!=null?v:[])}n["location.json"]=T}return n}function JH(e,{geometryFeatureById:r}){var n,o,i;let t={annotationsByGeometryId:new Map,connectionsByGeometryId:new Map,entrancesByGeometryId:new Map};if(e.annotations)for(let[a,u]of At(e.annotations))for(let l of u!=null?u:[]){let c=l.geometryId,d=l.id,f=(n=t.annotationsByGeometryId.get(c))!=null?n:[];f.push({floor:a,id:d}),t.annotationsByGeometryId.set(c,f)}if(e.connections)for(let a of e.connections){let u=zE(a,r),l=Array.from(new Map([...a.entrances,...a.exits].map(c=>["".concat(c.geometryId,"_").concat(c.floorId),c])).values());for(let c of l){let d=c.geometryId;if(u){let f=(o=t.entrancesByGeometryId.get(d))!=null?o:[];f.push({floor:c.floorId,id:a.id}),t.entrancesByGeometryId.set(d,f)}else{let f=(i=t.connectionsByGeometryId.get(d))!=null?i:[];f.push(a.id),t.connectionsByGeometryId.set(d,f)}}}return t}p();function SA(e,r){let t={features:[],type:"FeatureCollection"},n={"manifest.geojson":t},o=e.manifest;if(o.features.length>0){let i=o.features[0],a=i.properties,u={type:"Feature",geometry:i.geometry,properties:{folder_struct:[],version:"2.0.0",time:a.time,name:a.name,naturalBearing:a.naturalBearing,tzid:a.tzid,map:a.mapId,org_id:a.orgId,language:a.language}};t.features.push(u)}return n}p();function CA(e,{geometryMaps:r,navigationFlags:t,incomingEdgesByNodeId:n}){var c,d,f,h,g,b;let o={"node.geojson":{type:"FeatureCollection",features:[]}},i=o["node.geojson"].features,a=YH(e),u=KH(e),l=QH(e,u,a);for(let[I,v]of At((c=e.nodes)!=null?c:{}))for(let E of(d=v==null?void 0:v.features)!=null?d:[]){let T=(f=r.space.get(E.properties.geometryIds[0]))==null?void 0:f.features[0],D=(T==null?void 0:T.geometry.type)==="Point"&&((h=T==null?void 0:T.properties.details)!=null&&h.externalId)?T.properties.details.externalId:"",w=(g=n.get(E.properties.id))!=null?g:[],B=Object.keys(t!=null?t:{}),X=[];for(let P of w)for(let R of B)ml(P,t[R])&&X.push(t[R]);let L={type:"Feature",geometry:E.geometry,properties:{id:E.properties.id,floor:I,space:E.properties.geometryIds.map(P=>{var R;return(R=r.space.get(P))==null?void 0:R.ids}).flat().filter(P=>P!==void 0),neighbors:[...E.properties.neighbors.map(P=>({id:P.id,weight:P.extraCost})),...(b=l.get(E.properties.id))!=null?b:[]],map:I,externalId:D,flags:X.length>0?eZ(X):void 0}};i.push(L)}return o}function YH(e){var t,n;let r=new Map;for(let o of(n=(t=e.floors)==null?void 0:t.features)!=null?n:[])r.set(o.properties.id,o.properties.elevation);return r}function KH(e){var t,n,o;let r=new Map;for(let i of Object.values((t=e.nodes)!=null?t:{}))for(let a of(n=i==null?void 0:i.features)!=null?n:[])if(a.properties.geometryIds.length!==0)for(let u of a.properties.geometryIds){let l=(o=r.get(u))!=null?o:[];l.includes(a.properties.id)||(l.push(a.properties.id),r.set(u,l))}return r}function QH(e,r,t){var o,i,a,u,l;let n=new Map;for(let c of(o=e.connections)!=null?o:[]){let d=c.exits.map(f=>{var h;return ne(_({},f),{nodes:(h=r.get(f.geometryId))!=null?h:[]})});for(let f of c.entrances){let h=(i=r.get(f.geometryId))!=null?i:[];for(let g of h)for(let b of d){let I=Math.abs(((a=t.get(f.floorId))!=null?a:0)-((u=t.get(b.floorId))!=null?u:0))*c.floorCostMultiplier,v=(l=n.get(g))!=null?l:[];v.push(...b.nodes.filter(E=>E!==g).map(E=>({id:E,weight:I+c.entryCost}))),n.set(g,v)}}}return n}function eZ(e){if(e==null||e.length===0)return;let r=new Array(Math.max(...e.map(t=>t.index))+1).fill(0);for(let t of e)r[t.index]|=1<<t.bit;return r}p();function tZ(e,r){var n;let t={};for(let o of e){let i=r.get(o);i&&((n=t[i])!=null||(t[i]=[]),t[i].push(o))}return t}function DA(e,{geometryMaps:r}){var a,u,l;if(!e.defaultStyle)return{};let t={},n={};t["styles.json"]=n;let o=[...Array.from(r.space.values()).map(c=>c.features),...Array.from(r.obstruction.values()).map(c=>c.features)],i=new Map(o.flatMap(c=>c.map(d=>[d.properties.id,d.geometry.type])));for(let[c,d]of At(e.defaultStyle)){let f=tZ(d.geometryAnchors.flatMap(h=>{var g,b,I,v;return[...(b=(g=r.space.get(h.geometryId))==null?void 0:g.ids)!=null?b:[],...(v=(I=r.obstruction.get(h.geometryId))==null?void 0:I.ids)!=null?v:[]]}),i);if(f.Point&&f.Point.length>0){let h={points:Array.from(f.Point.values()),showImage:((a=d.extra)==null?void 0:a.showImage)!==void 0?((u=d.extra)==null?void 0:u.showImage)===!0:d.opacity!==0};n["".concat(c,".Point")]=h}if(f.LineString&&f.LineString.length>0){let h={lineStrings:Array.from(f.LineString.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity,width:d.buffer};n["".concat(c,".LineString")]=h}if(f.Polygon&&f.Polygon.length>0){let h={polygons:Array.from(f.Polygon.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity};((l=d.extra)==null?void 0:l.showImage)!==void 0&&(h.showImage=d.extra.showImage===!0),n["".concat(c,".Polygon")]=h}}return t}var WE=nM().extendOptional(s7).extendOptional(V7).extendOptional(m7).extendOptional(R7).extendOptional(tA).extendOptional(b7).extendOptional(S7).extendOptional(W7).extendOptional(J7).extendOptional(F7).extendOptional(T7).extendOptional(sM).extendOptional(gM).extendOptional(r7).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");function XE(e){let r=sA(e),t=fA(e,r),n=EA(e,r),o=CA(e,r),i=lA(e,r),a=DA(e,r),u=hA(e,r),l=mA(e,r),c=pA(e,r),d=uA(e,r),f=IA(e,r),h=dA(e,r),g=SA(e,r);return _(_(_(_(_(_(_(_(_(_(_(_(_(_(_({},e.tileset?{"tileset.json":e.tileset}:{}),e.navigationFlags?{"navigationFlags.json":e.navigationFlags}:{}),e.annotationSymbols?{"annotation-symbols.json":e.annotationSymbols}:{}),t),n),o),i),a),u),l),c),d),f),h),g)}p();function Np(e){return e.endsWith("/")?e:"".concat(e,"/")}p();var jp="https://app.mappedin.com/",TA="https://auth.mappedin.com/",wA=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),rZ=Object.freeze(ne(_({},wA),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),nZ=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),oZ=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),iZ=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),aZ={eu:nZ,us:wA,"us-enterprise":rZ,"us-staging-enterprise":oZ,"us-staging-self-serve":iZ};function MA(e){return aZ[e]}p();p();var sZ=e=>{let r=Date.now();return e-r},rb=(e,r)=>sZ(e)<=r*60*1e3;var PA=10,_A=PA*60*1e3,AA="accessTokens";async function wh(e,r=!1){let t="".concat(e.key),n=Us.getInstance(),o=(n==null?void 0:n.loadSessionData(AA))||{},i=Math.floor(Date.now()/1e3);if(o[t]&&!rb(o[t].expiresTimestamp*1e3,PA))return o[t];let a=r?await uZ(e,i):await lZ(e,i),u=ne(_({},o),{[t]:a});return n==null||n.saveSessionData(AA,u),a}async function uZ(e,r){var i;let t;e.customAuthUri?t=e.customAuthUri:t="".concat((i=e.baseAuthUri)!=null?i:TA,"oauth2/token");let n;try{n=await ci()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"client_credentials",client_id:e.key,client_secret:e.secret})})}catch(a){let u=a instanceof Error?a.message:String(a);throw new Error("Failed to fetch enterprise access token from ".concat(t,": ").concat(u))}if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{accessToken:o.access_token,expiresTimestamp:r+o.expires_in}}async function lZ(e,r){let t;e.customAuthUri?t=e.customAuthUri:t="".concat(e.baseAuthUri?Np(e.baseAuthUri):jp,"api/v1/api-key/token");let n;try{n=await ci()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})})}catch(i){let a=i instanceof Error?i.message:String(i);throw new Error("Failed to fetch access token from ".concat(t,": ").concat(a))}if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{accessToken:o.access_token,expiresTimestamp:r+o.expires_in}}p();var FA=10,kA=FA*60*1e3,OA="miSasTokens";async function qE(e,r){let t="".concat(r,"__").concat(e.mapId),n=Us.getInstance(),o=(n==null?void 0:n.loadSessionData(OA))||{};if(o[t]&&!rb(o[t].expires,FA))return o[t];let i=await cZ(e,r),a=ne(_({},o),{[t]:{token:i.token,expires:new Date(i.expires).getTime()}});return n==null||n.saveSessionData(OA,a),i}async function cZ(e,r){let t="".concat(e.baseUri?Np(e.baseUri):jp,"api/v1/venue/").concat(e.mapId,"/sas-token"),n=await ci()(t,{method:"GET",headers:{Authorization:"Bearer ".concat(r)}});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{token:o.token,expires:new Date(o.expires).getTime()}}p();var di=Uint8Array,Sc=Uint16Array,BA=Uint32Array,LA=new di([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]),RA=new di([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]),dZ=new di([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),NA=function(e,r){for(var t=new Sc(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new BA(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)o[i]=i-t[n]<<5|n;return[t,o]},jA=NA(LA,2),UA=jA[0],pZ=jA[1];UA[28]=258,pZ[258]=28;var GA=NA(RA,0),fZ=GA[0],ECe=GA[1],QE=new Sc(32768);for(jt=0;jt<32768;++jt)du=(jt&43690)>>>1|(jt&21845)<<1,du=(du&52428)>>>2|(du&13107)<<2,du=(du&61680)>>>4|(du&3855)<<4,QE[jt]=((du&65280)>>>8|(du&255)<<8)>>>1;var du,jt,Mh=function(e,r,t){for(var n=e.length,o=0,i=new Sc(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new Sc(r);for(o=0;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var u;if(t){u=new Sc(1<<r);var l=15-r;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],d=r-e[o],f=a[e[o]-1]++<<d,h=f|(1<<d)-1;f<=h;++f)u[QE[f]>>>l]=c}else for(u=new Sc(n),o=0;o<n;++o)e[o]&&(u[o]=QE[a[e[o]-1]++]>>>15-e[o]);return u},Ah=new di(288);for(jt=0;jt<144;++jt)Ah[jt]=8;var jt;for(jt=144;jt<256;++jt)Ah[jt]=9;var jt;for(jt=256;jt<280;++jt)Ah[jt]=7;var jt;for(jt=280;jt<288;++jt)Ah[jt]=8;var jt,zA=new di(32);for(jt=0;jt<32;++jt)zA[jt]=5;var jt;var mZ=Mh(Ah,9,1);var hZ=Mh(zA,5,1),JE=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},ma=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},YE=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},gZ=function(e){return(e+7)/8|0},t2=function(e,r,t){(r==null||r<0)&&(r=0),(t==null||t>e.length)&&(t=e.length);var n=new(e.BYTES_PER_ELEMENT==2?Sc:e.BYTES_PER_ELEMENT==4?BA:di)(t-r);return n.set(e.subarray(r,t)),n};var yZ=["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"],ha=function(e,r,t){var n=new Error(r||yZ[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,ha),!t)throw n;return n},bZ=function(e,r,t){var n=e.length;if(!n||t&&t.f&&!t.l)return r||new di(0);var o=!r||t,i=!t||t.i;t||(t={}),r||(r=new di(n*3));var a=function(Le){var Qe=r.length;if(Le>Qe){var Ge=new di(Math.max(Qe*2,Le));Ge.set(r),r=Ge}},u=t.f||0,l=t.p||0,c=t.b||0,d=t.l,f=t.d,h=t.m,g=t.n,b=n*8;do{if(!d){u=ma(e,l,1);var I=ma(e,l+1,3);if(l+=3,I)if(I==1)d=mZ,f=hZ,h=9,g=5;else if(I==2){var D=ma(e,l,31)+257,w=ma(e,l+10,15)+4,B=D+ma(e,l+5,31)+1;l+=14;for(var X=new di(B),L=new di(19),P=0;P<w;++P)L[dZ[P]]=ma(e,l+P*3,7);l+=w*3;for(var R=JE(L),$=(1<<R)-1,V=Mh(L,R,1),P=0;P<B;){var H=V[ma(e,l,$)];l+=H&15;var v=H>>>4;if(v<16)X[P++]=v;else{var re=0,j=0;for(v==16?(j=3+ma(e,l,3),l+=2,re=X[P-1]):v==17?(j=3+ma(e,l,7),l+=3):v==18&&(j=11+ma(e,l,127),l+=7);j--;)X[P++]=re}}var me=X.subarray(0,D),z=X.subarray(D);h=JE(me),g=JE(z),d=Mh(me,h,1),f=Mh(z,g,1)}else ha(1);else{var v=gZ(l)+4,E=e[v-4]|e[v-3]<<8,T=v+E;if(T>n){i&&ha(0);break}o&&a(c+E),r.set(e.subarray(v,T),c),t.b=c+=E,t.p=l=T*8,t.f=u;continue}if(l>b){i&&ha(0);break}}o&&a(c+131072);for(var ue=(1<<h)-1,se=(1<<g)-1,pe=l;;pe=l){var re=d[YE(e,l)&ue],le=re>>>4;if(l+=re&15,l>b){i&&ha(0);break}if(re||ha(2),le<256)r[c++]=le;else if(le==256){pe=l,d=null;break}else{var ye=le-254;if(le>264){var P=le-257,Fe=LA[P];ye=ma(e,l,(1<<Fe)-1)+UA[P],l+=Fe}var Ee=f[YE(e,l)&se],Oe=Ee>>>4;Ee||ha(3),l+=Ee&15;var z=fZ[Oe];if(Oe>3){var Fe=RA[Oe];z+=YE(e,l)&(1<<Fe)-1,l+=Fe}if(l>b){i&&ha(0);break}o&&a(c+131072);for(var we=c+ye;c<we;c+=4)r[c]=r[c-z],r[c+1]=r[c+1-z],r[c+2]=r[c+2-z],r[c+3]=r[c+3-z];c=we}}t.l=d,t.p=pe,t.b=c,t.f=u,d&&(u=1,t.m=h,t.d=f,t.n=g)}while(!u);return c==r.length?r:t2(r,0,c)};var vZ=new di(0);var ms=function(e,r){return e[r]|e[r+1]<<8},ga=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},KE=function(e,r){return ga(e,r)+ga(e,r+4)*4294967296};function xZ(e,r){return bZ(e,r)}var e2=typeof TextDecoder<"u"&&new TextDecoder,EZ=0;try{e2.decode(vZ,{stream:!0}),EZ=1}catch(e){}var IZ=function(e){for(var r="",t=0;;){var n=e[t++],o=(n>127)+(n>223)+(n>239);if(t+o>e.length)return[r,t2(e,t-1)];o?o==3?(n=((n&15)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?r+=String.fromCharCode((n&31)<<6|e[t++]&63):r+=String.fromCharCode((n&15)<<12|(e[t++]&63)<<6|e[t++]&63):r+=String.fromCharCode(n)}};function SZ(e,r){if(r){for(var t="",n=0;n<e.length;n+=16384)t+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return t}else{if(e2)return e2.decode(e);var o=IZ(e),i=o[0],a=o[1];return a.length&&ha(8),i}}var CZ=function(e,r){return r+30+ms(e,r+26)+ms(e,r+28)},DZ=function(e,r,t){var n=ms(e,r+28),o=SZ(e.subarray(r+46,r+46+n),!(ms(e,r+8)&2048)),i=r+46+n,a=ga(e,r+20),u=t&&a==4294967295?TZ(e,i):[a,ga(e,r+24),ga(e,r+42)],l=u[0],c=u[1],d=u[2];return[ms(e,r+10),l,c,o,i+ms(e,r+30)+ms(e,r+32),d]},TZ=function(e,r){for(;ms(e,r)!=1;r+=4+ms(e,r+2));return[KE(e,r+12),KE(e,r+4),KE(e,r+20)]};function r2(e,r){for(var t={},n=e.length-22;ga(e,n)!=101010256;--n)(!n||e.length-n>65558)&&ha(13);var o=ms(e,n+8);if(!o)return{};var i=ga(e,n+16),a=i==4294967295||o==65535;if(a){var u=ga(e,n-12);a=ga(e,u)==101075792,a&&(o=ga(e,u+32),i=ga(e,u+48))}for(var l=r&&r.filter,c=0;c<o;++c){var d=DZ(e,i,a),f=d[0],h=d[1],g=d[2],b=d[3],I=d[4],v=d[5],E=CZ(e,v);i=I,(!l||l({name:b,size:h,originalSize:g,compression:f}))&&(f?f==8?t[b]=xZ(e.subarray(E,E+h),new di(g)):ha(14,"unknown compression type "+f):t[b]=t2(e,E,E+h))}return t}var VA=globalThis.fetch,HA,MZ=(HA=y==null?void 0:y.env)==null?void 0:HA.npm_package_version;function ci(){if(VA==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return VA}var n2={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function ZA(e){var t;let r=_(_({},n2),e);return r.headers=ne(_({},r.headers),{"mappedin-sdk-version":MZ}),r.things=[],"platformString"in e&&(r.headers=ne(_({},r.headers),{"mappedin-platform-version":e.platformString})),r.noAuth||(r.accessToken?r.authorization="Bearer ".concat(r.accessToken):r.clientId&&r.clientSecret&&(r.authorization="Basic ".concat(globalThis.btoa("".concat(r.clientId,":").concat(r.clientSecret))))),r.language=(t=r.language)==null?void 0:t.toLowerCase(),r}function AZ(e,r,t=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};t&&delete n.language;let{headers:o}=e;o["Content-Type"]=o["Content-Type"]||"text/json",e.accessToken?o.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(o["x-mappedin-key"]=btoa(e.clientId),o["x-mappedin-secret"]=btoa(e.clientSecret));let i={method:"GET",headers:o};return e.secure&&(r+="&withcdntoken"),{req:i,url:r}}async function PZ(e,r,t=!1){let n=AZ(e,r,t),o=await ci()(n.url,n.req);if(!o.ok)throw new Error("".concat(o.status," ").concat(o.statusText));return o.json()}var _Z=e=>{let r=e!=null&&typeof e=="object"&&"perspectives"in e&&e.perspectives!=null&&typeof e.perspectives=="object"?e.perspectives:null;if(r==null||Object.keys(r).length===0)return K.warn("No perspectives available in response!"),null;let t={};for(let[n,o]of Object.entries(r)){let i="url"in o&&typeof o.url=="string"?o.url:null,a="locale_packs"in o&&typeof o.locale_packs=="object"?o.locale_packs:null;if(i==null||a==null){K.warn("Perspective ".concat(n," is missing url or locale_packs!"));continue}t[n]={url:i,locale_packs:a}}return t};async function OZ(e,r="exports/mvf/1/bundle"){var c,d;let t=ZA(_(_({baseUri:"https://api-gateway.mappedin.com/"},n2),e)),n="".concat(t.baseUri+r,"?venue=").concat(t.venue,"&version=").concat((c=t.version)!=null?c:"2.0.0");t.headers["Content-Type"]="application/zip";let o=await PZ(t,n),i=o.url,a=o.locale_packs,u=(d=t.perspective)!=null?d:n2.perspective,l=_Z(o);if(u!=null&&u!==""&&l!=null){let f=l[u];f==null?K.warn("Perspective ".concat(u," not found in response! Loading default perspective instead.")):(K.log('Loading perspective "'.concat(u,'"')),i=f.url,a=f.locale_packs)}return{url:i,localePacks:a,updated_at:o.updated_at}}var Up=function(){let e;return()=>(e||(e=new TextDecoder),e)}();async function o2(e,{signal:r}){let t=await(await ci()(e,{signal:r})).arrayBuffer();return new Uint8Array(t)}async function Gp(e){let r=r2(e),t={};if(r["enterprise/"]!=null){t.enterprise={};let n=r["enterprise/locations.json"];n&&(t.enterprise.locations=JSON.parse(Up().decode(n)));let o=r["enterprise/locationInstances.json"];o&&(t.enterprise.locationInstances=JSON.parse(Up().decode(o)));let i=r["enterprise/categories.json"];i&&(t.enterprise.categories=JSON.parse(Up().decode(i)))}return r["floorstack.json"]&&(t["floorstack.json"]=JSON.parse(Up().decode(r["floorstack.json"]))),r["floor.geojson"]&&(t["floor.geojson"]=JSON.parse(Up().decode(r["floor.geojson"]))),r["manifest.json"]&&(t["manifest.geojson"]=JSON.parse(Up().decode(r["manifest.json"]))),t}async function WA(e,{signal:r}){try{let t=await(await ci()(e,{signal:r})).arrayBuffer();if(r.aborted)return;let n=new Uint8Array(t);return await Gp(n)}catch(t){let n=new Error("downloadLanguagePack failed");throw n.cause=t,n}}function FZ(e){let{mvfVersion:r,useDraftData:t}=e;if(r==="3.0.0")return t?"exports/mvf3-draft/1/bundle":"exports/mvf3/1/bundle";if(r==null||r==="2.0.0")return t?"exports/mvf2-draft/1/bundle":"exports/mvf2/1/bundle";if(r==="2.0.0-c")return t?"exports/mvf2c-draft/1/bundle":"exports/mvf2c/1/bundle";throw new Error("Unsupported MVF version: ".concat(r))}async function i2(e){return new Promise(async(r,t)=>{try{let n=FZ(e),{url:o,localePacks:i}=await OZ(e,n),a=await ci()(o).then(l=>l.arrayBuffer()),u=new Uint8Array(a);r({compressed:u,localePacks:i})}catch(n){t(n)}})}async function a2(e,r){return new Promise(async(t,n)=>{try{let{url:o}=await kZ(e,r),i=await ci()(o).then(u=>u.arrayBuffer()),a=new Uint8Array(i);t(a)}catch(o){n(o)}})}async function kZ(e,r){let t=new URL("".concat(e.baseUri?Np(e.baseUri):jp,"api/v1/venue/").concat(e.mapId,"/mvf"));e.viewId&&t.searchParams.set("configId",e.viewId),e.mvfVersion&&t.searchParams.set("version",e.mvfVersion);let n=await ci()(t.toString(),{headers:{Authorization:"Bearer ".concat(r)}});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}function XA(e){return L1(e)}function BZ(e){if(e==null||typeof e!="object")return!1;let r=["connection.json","manifest.geojson","floor.geojson"in e?"floor.geojson":"map.geojson","node.geojson","floorstack.json"in e?"floorstack.json":"mapstack.json"in e?"mapstack.json":"mapstack.geojson"];"styles.json"in e&&r.push("styles.json"),"shapes.json"in e&&r.push("shapes.json"),"navigationFlags.json"in e&&r.push("navigationFlags.json"),"annotation-symbols.json"in e&&r.push("annotation-symbols.json");for(let t of r)if(e[t]==null||e[t][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}async function s2(e){return new Promise(async(r,t)=>{try{if(e==null||typeof e!="object")throw new Error("Error parsing data! Unzipping failed.");if(e[Symbol.toStringTag]!=="Uint8Array")throw new Error("Unexpected file type! Unzipping failed.");let n=r2(e);if(!BZ(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={},i=Object.keys(n);for(let a of i){if(n[a].length===0)continue;let u=a.split("/");if(u.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(u.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(u.length===1){o[u[0]]=n[a];continue}if(u[0]==="image"){K.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[u[0]]==null&&(o[u[0]]={}),o[u[0]][u[1]]=n[a]}r(o)}catch(n){t(n)}})}function gl(){let e="us",r={};function t(){return LZ(MA(e),r)}return{updateByUserOption(n){var o,i;n.environment&&(e=n.environment),n.baseUri&&(r.baseUri=n.baseUri),n.baseAuthUri&&(r.baseAuthUri=n.baseAuthUri),(o=n.analytics)!=null&&o.baseUri&&(r.analyticsBaseUri=(i=n.analytics)==null?void 0:i.baseUri)},updateTileServerBaseUrl(n){r.tileServerUri=n},updateEnvironment(n){e=n},setEnterprise(n){(e==="us"||e==="us-enterprise")&&(e=n?"us-enterprise":"us")},getBaseUri(){return t().baseUri},getBaseAuthUri(){return t().baseAuthUri},getAnalyticsBaseUri(){return t().analyticsBaseUri},getTileServerUri(){return t().tileServerUri},reset(){e="us",r={}},__getState:t}}function LZ(e,r){return _(_({},e),r)}var nb=e=>{var t,n;let r=Object.values((n=(t=e["floorstack.json"])!=null?t:e["mapstack.json"])!=null?n:{});return r.length===1?[]:r.filter(o=>o.type!=="Outdoor").map(o=>o.id.replace("fs_","").replace("ms_",""))},$A=async e=>{let r=performance.now(),t,n=WE.decompressUnsafeSync(e);n.isOk()?t=n.unwrap():K.error("MVFv3 decompression failed!");let o;if(t)try{o=XE(t)}catch(i){K.error("MVFv3 to MVFv2 conversion failed!",i)}if(K.log("Parsed MVFv3 in ".concat(performance.now()-r,"ms")),!o)throw new Error("Failed to parse MVFv2 from MVFv3!");return{mvf2:o,mvf3:t}};async function ob(e,r="2.0.0"){switch(r){case"2.0.0":case"2.0.0-c":try{let t=performance.now(),n=await s2(e),o=L1(n);return K.log("Parsed MVFv2 in ".concat(performance.now()-t,"ms")),{mvf2:o}}catch(t){return K.error("MVFv2 parsing failed! Trying MVFv3."),$A(e)}case"3.0.0":return $A(e);default:throw new Error("Unsupported MVF version: ".concat(r))}}p();p();p();function Gi(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")}function pi(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")}function pu(e){return e.type==="Feature"?e.geometry:e}function qA(e,r){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function RZ(e,r,t){t===void 0&&(t={});for(var n=Gi(e),o=pi(r),i=0;i<o.length-1;i++){var a=!1;if(t.ignoreEndVertices&&(i===0&&(a="start"),i===o.length-2&&(a="end"),i===0&&i+1===o.length-1&&(a="both")),NZ(o[i],o[i+1],n,a,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function NZ(e,r,t,n,o){var i=t[0],a=t[1],u=e[0],l=e[1],c=r[0],d=r[1],f=t[0]-u,h=t[1]-l,g=c-u,b=d-l,I=f*b-h*g;if(o!==null){if(Math.abs(I)>o)return!1}else if(I!==0)return!1;if(n){if(n==="start")return Math.abs(g)>=Math.abs(b)?g>0?u<i&&i<=c:c<=i&&i<u:b>0?l<a&&a<=d:d<=a&&a<l;if(n==="end")return Math.abs(g)>=Math.abs(b)?g>0?u<=i&&i<c:c<i&&i<=u:b>0?l<=a&&a<d:d<a&&a<=l;if(n==="both")return Math.abs(g)>=Math.abs(b)?g>0?u<i&&i<c:c<i&&i<u:b>0?l<a&&a<d:d<a&&a<l}else return Math.abs(g)>=Math.abs(b)?g>0?u<=i&&i<=c:c<=i&&i<=u:b>0?l<=a&&a<=d:d<=a&&a<=l;return!1}var JA=RZ;p();function jZ(e,r){r===void 0&&(r={});var t=zs(e),n=(t[0]+t[2])/2,o=(t[1]+t[3])/2;return Xa([n,o],r.properties,r)}var zp=jZ;p();p();function UZ(e,r,t){t===void 0&&(t={});var n=Gi(e),o=Gi(r),i=Lo(o[1]-n[1]),a=Lo(o[0]-n[0]),u=Lo(n[1]),l=Lo(o[1]),c=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(u)*Math.cos(l);return tC(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),t.units)}var yl=UZ;function ib(e,r){return r===void 0&&(r={}),oC(e,function(t,n){var o=n.geometry.coordinates;return t+yl(o[0],o[1],r)},0)}p();p();p();function ab(e,r,t){if(t===void 0&&(t={}),t.final===!0)return GZ(e,r);var n=Gi(e),o=Gi(r),i=Lo(n[0]),a=Lo(o[0]),u=Lo(n[1]),l=Lo(o[1]),c=Math.sin(a-i)*Math.cos(l),d=Math.cos(u)*Math.sin(l)-Math.sin(u)*Math.cos(l)*Math.cos(a-i);return _m(Math.atan2(c,d))}function GZ(e,r){var t=ab(r,e);return t=(t+180)%360,t}p();function Cc(e,r,t,n){n===void 0&&(n={});var o=Gi(e),i=Lo(o[0]),a=Lo(o[1]),u=Lo(t),l=rC(r,n.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(u)),d=i+Math.atan2(Math.sin(u)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c)),f=_m(d),h=_m(c);return Xa([f,h],n.properties)}p();p();function zZ(e){if(!e)throw new Error("geojson is required");var r=[];return qa(e,function(t){VZ(t,r)}),nc(r)}function VZ(e,r){var t=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":t=pi(n);break;case"LineString":t=[pi(n)]}t.forEach(function(o){var i=$Z(o,e.properties);i.forEach(function(a){a.id=r.length,r.push(a)})})}}function $Z(e,r){var t=[];return e.reduce(function(n,o){var i=Gs([n,o],r);return i.bbox=HZ(n,o),t.push(i),o}),t}function HZ(e,r){var t=e[0],n=e[1],o=r[0],i=r[1],a=t<o?t:o,u=n<i?n:i,l=t>o?t:o,c=n>i?n:i;return[a,u,l,c]}var u2=zZ;var wP=Kl(DP(),1);function $W(e,r){var t={},n=[];if(e.type==="LineString"&&(e=cx(e)),r.type==="LineString"&&(r=cx(r)),e.type==="Feature"&&r.type==="Feature"&&e.geometry!==null&&r.geometry!==null&&e.geometry.type==="LineString"&&r.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&r.geometry.coordinates.length===2){var o=TP(e,r);return o&&n.push(o),nc(n)}var i=(0,wP.default)();return i.load(u2(r)),dx(u2(e),function(a){dx(i.search(a),function(u){var l=TP(a,u);if(l){var c=pi(l).join(",");t[c]||(t[c]=!0,n.push(l))}})}),nc(n)}function TP(e,r){var t=pi(e),n=pi(r);if(t.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 o=t[0][0],i=t[0][1],a=t[1][0],u=t[1][1],l=n[0][0],c=n[0][1],d=n[1][0],f=n[1][1],h=(f-c)*(a-o)-(d-l)*(u-i),g=(d-l)*(i-c)-(f-c)*(o-l),b=(a-o)*(i-c)-(u-i)*(o-l);if(h===0)return null;var I=g/h,v=b/h;if(I>=0&&I<=1&&v>=0&&v<=1){var E=o+I*(a-o),T=i+I*(u-i);return Xa([E,T])}return null}var $p=$W;function HW(e,r,t){t===void 0&&(t={});var n=Xa([1/0,1/0],{dist:1/0}),o=0;return qa(e,function(i){for(var a=pi(i),u=0;u<a.length-1;u++){var l=Xa(a[u]);l.properties.dist=yl(r,l,t);var c=Xa(a[u+1]);c.properties.dist=yl(r,c,t);var d=yl(l,c,t),f=Math.max(l.properties.dist,c.properties.dist),h=ab(l,c),g=Cc(r,f,h+90,t),b=Cc(r,f,h-90,t),I=$p(Gs([g.geometry.coordinates,b.geometry.coordinates]),Gs([l.geometry.coordinates,c.geometry.coordinates])),v=null;I.features.length>0&&(v=I.features[0],v.properties.dist=yl(r,v,t),v.properties.location=o+yl(l,v,t)),l.properties.dist<n.properties.dist&&(n=l,n.properties.index=u,n.properties.location=o),c.properties.dist<n.properties.dist&&(n=c,n.properties.index=u+1,n.properties.location=o+d),v&&v.properties.dist<n.properties.dist&&(n=v,n.properties.index=u),o+=d}}),n}var Oh=HW;function ZW(e,r,t){var n=pi(t);if(qA(t)!=="LineString")throw new Error("line must be a LineString");var o=Oh(t,e),i=Oh(t,r),a;o.properties.index<=i.properties.index?a=[o,i]:a=[i,o];for(var u=[a[0].geometry.coordinates],l=a[0].properties.index+1;l<a[1].properties.index+1;l++)u.push(n[l]);return u.push(a[1].geometry.coordinates),Gs(u,t.properties)}var D2=ZW;var WW=1e-7;function T2(e){return{type:"Point",coordinates:e}}function XW(e,r){let{coordinates:t}=r.geometry,{coordinates:n}=e.geometry,o=t.map(i=>Oh(e,T2(i)));return n.reduce((i,a)=>{let u=D2(T2(a),o[0],e),l=D2(T2(a),o[1],e),c=ib(u)<ib(l)?u:l;return c.properties=ne(_({},e.properties),{entrances:[]}),i.concat([c])},[])}function w2(e,r){return r.reduce((t,n)=>{let o={epsilon:WW},i=t.obstructions.findIndex(u=>JA(zp(n),u,o)),a=t.obstructions[i];if(a){let[u,l]=XW(a,n);t.entrances.push(n),t.obstructions.splice(i,1,u,l)}return t},{obstructions:[e],entrances:[]})}p();p();p();var mn=class{constructor(r){m(this,"id");this.id=r}};p();p();var fu,Hp=class Hp{constructor(r,t,n){m(this,"__type",Hp.__type);m(this,"id",Jt());m(this,"latitude");m(this,"longitude");m(this,"floorId");m(this,"verticalOffset");M(this,fu,{});var o;if(typeof r=="object")this.latitude=r.latitude,this.longitude=r.longitude,this.floorId=r.floorId,this.verticalOffset=(o=r.verticalOffset)!=null?o:0;else{if(t==null)throw new Error("Coordinate longitude is required.");this.latitude=r,this.longitude=t,this.floorId=n,this.verticalOffset=0}}static is(r){return r.__type===Hp.__type}get anchorTarget(){return this}get focusTarget(){return this}isEqual(r){return this.latitude===r.latitude&&this.longitude===r.longitude&&this.floorId===r.floorId}toJSON(){return{__type:Hp.__type,latitude:this.latitude,longitude:this.longitude,floorId:this.floorId,verticalOffset:this.verticalOffset}}get geoJSON(){if(s(this,fu).geoJSON!=null)return s(this,fu).geoJSON;let r=[this.longitude,this.latitude];return this.verticalOffset!==0&&r.push(this.verticalOffset),s(this,fu).geoJSON={type:"Feature",properties:null,geometry:{type:"Point",coordinates:r}},s(this,fu).geoJSON}toGeoJSON(){return this.geoJSON.geometry}destroy(){for(let r of globalThis.Object.keys(s(this,fu)))delete s(this,fu)[r]}};fu=new WeakMap,m(Hp,"__type","coordinate");var M2=Hp,je=M2;function A2(e){var o,i,a,u,l,c;let r=((i=(o=e.enterprise)==null?void 0:o.locations)==null?void 0:i.reduce((d,f)=>(d[f.id]=f,d),{}))||{};for(let d of((a=e.enterprise)==null?void 0:a.locationInstances)||[])r[d.id]=d;let t={};for(let d of e["floorstack.json"]||[])t[d.id]=d;let n={};for(let d of((u=e["floor.geojson"])==null?void 0:u.features)||[])d.properties&&d.properties.id&&(n[d.properties.id]=d.properties);return{type:"downloaded",data:e,optimized:{"enterprise-location":r,"enterprise-category":((c=(l=e.enterprise)==null?void 0:l.categories)==null?void 0:c.reduce((d,f)=>(d[f.id]=f,d),{}))||{},"floor-stack":t,floor:n}}}function MP(e){return/^https?:\/\/cdn\.mappedin\.com/.test(e)}function AP(e){let r=e.split("?")[1];return!!(r!=null&&r.includes("sv="))}function so(e,r){var n;let t=((n=e==null?void 0:e.properties)==null?void 0:n.id)||"unknown";if(e.geometry==null)return K.error('Cannot get the center coordinate for "'.concat(t,'" because it has no geometry.')),new je({latitude:0,longitude:0,floorId:r});try{if(e.geometry.type==="LineString"){let[[o,i],[a,u]]=e.geometry.coordinates,l=(o+a)/2,c=(i+u)/2;return new je({latitude:c,longitude:l,floorId:r})}else if(e.geometry.type==="Point"){let[o,i]=e.geometry.coordinates;return new je({latitude:i,longitude:o,floorId:r})}else if(e.geometry.type==="Polygon"){let o=e;if(o.properties.center!=null){let[i,a]=o.properties.center;return new je({latitude:a,longitude:i,floorId:r})}}}catch(o){}try{let[o,i]=zp(e).geometry.coordinates;return new je({latitude:i,longitude:o,floorId:r})}catch(o){return K.error('Failed to get center coordinate for "'.concat(t,'" ').concat(o instanceof Error?o.stack:"")),new je({latitude:0,longitude:0,floorId:r})}}function PP(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}function mb(e,r){var i;let t=(i=e.instanceLocationsByPolygonId)==null?void 0:i[r];if(t)return[t];let n=[],o=e.mvfLocationsByGeometryId[r];if(o)for(let a of o){let u=e.getById("enterprise-location",a.id);u&&n.push(u)}return n}var fi,Tn,Dc,mu,Zp=class Zp extends mn{constructor(t,n){super(n.mvfData.properties.id);m(this,"__type",Zp.__type);M(this,fi);M(this,Tn,{});M(this,Dc);M(this,mu);k(this,fi,t),k(this,Dc,n.floorId),k(this,mu,n.mvfData)}static is(t){return t.__type===Zp.__type}get locations(){return s(this,Tn).locations?s(this,Tn).locations:(s(this,Tn).locations=(s(this,fi).locationIdsByNodeId[this.id]||[]).map(t=>s(this,fi).getById("enterprise-location",t)).filter(Boolean),s(this,Tn).locations)}get space(){var t;return s(this,fi).getById("space",(t=s(this,fi).spaceIdsByNodeId[this.id])==null?void 0:t[0])}get object(){var t;return s(this,fi).getById("object",(t=s(this,fi).objectIdsByNodeId[this.id])==null?void 0:t[0])}get floor(){let t=s(this,fi).getById("floor",s(this,Dc));if(t==null)throw new Error("Floor ".concat(s(this,Dc)," not found!"));return t}get coordinate(){return s(this,Tn).coordinate==null&&(s(this,Tn).coordinate=so(s(this,mu),s(this,Dc))),s(this,Tn).coordinate}get externalId(){var t;return(t=s(this,mu).properties.externalId)!=null?t:""}get neighbors(){if(s(this,Tn).neighbors==null){let t=s(this,mu).properties.neighbors.map(n=>{let o=s(this,fi).getById("node",n.id);if(o==null)throw new Error("Node ".concat(n.id," not found!"));return o});s(this,Tn).neighbors=t}return s(this,Tn).neighbors}get navigationFlags(){if(s(this,Tn).navigationFlags==null){let t=[],n=s(this,mu).properties.flags;if(n!=null&&n.length>0)for(let[o,i]of Object.entries(s(this,fi).navigationFlags))n.length>i.index&&n[i.index]!=null&&PP({flags:n},i)&&t.push(o);s(this,Tn).navigationFlags=Object.freeze(t)}return s(this,Tn).navigationFlags}get geoJSON(){return ne(_({},s(this,mu)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:Zp.__type,id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(t=>t.id)}}destroy(){for(let t of Object.keys(s(this,Tn)))delete s(this,Tn)[t]}};fi=new WeakMap,Tn=new WeakMap,Dc=new WeakMap,mu=new WeakMap,m(Zp,"__type","node");var P2=Zp,Vo=P2;p();p();p();p();var Fh,hu,Wp=class Wp extends mn{constructor(t){super(String(Jt()));m(this,"__type",Wp.__type);M(this,Fh,{});M(this,hu);k(this,hu,t.mvfData)}static is(t){return t.__type===Wp.__type}get url(){return s(this,hu).url}get name(){if("displayName"in s(this,hu))return s(this,hu).displayName;if("label"in s(this,hu))return s(this,hu).label}toJSON(){return{__type:Wp.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,Fh)))delete s(this,Fh)[t]}};Fh=new WeakMap,hu=new WeakMap,m(Wp,"__type","hyperlink");var _2=Wp,Tc=_2;p();p();function kh(e){var r;return typeof e=="string"?e:(r=e==null?void 0:e.id)!=null?r:""}function _P(e){return Array.isArray(e)&&Number.isFinite(e[0])&&Number.isFinite(e[1])}var qW=/^https:\/\/cdn\.mappedin\.com\/category-symbols\/.+$/,JW=/^https:\/\/cdn-staging\.mappedin\.net\/category-symbols\/.+$/,YW=e=>qW.test(e)||JW.test(e),KW=/^https:\/\/cdn\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,QW=/^https:\/\/cdn-staging\.mappedin\.net\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,eX=e=>YW(e)?!1:KW.test(e)||QW.test(e),hb=e=>{var a;if(!eX(e))return null;let r="";e.startsWith("https://")?(r="https://",e=e.slice(8)):e.startsWith("http://")&&(r="http://",e=e.slice(7));let[t,n,o]=e.split("/"),i=(a=o.split(".").pop())!=null?a:"";return{origin:r+t,mapId:n,fileName:o,fileType:i}};function O2(e){return e.reduce((r,t,n)=>n===0?r:r+Er(e[n-1].toGeoJSON().coordinates,t.toGeoJSON().coordinates),0)}function wc(e){return e!=null&&typeof e=="object"&&"__type"in e&&e.__type!==null&&typeof e.__type=="string"}function F2(e){return e!=null&&typeof e=="object"&&"name"in e&&e.name!=null&&typeof e.name=="string"&&e.name!==""}function OP(e){return wc(e)&&F2(e)}var Bh,xl,Mc,Xp=class Xp extends mn{constructor(t){super(String(Jt()));m(this,"__type",Xp.__type);M(this,Bh,{});M(this,xl);M(this,Mc);k(this,xl,t.mvfData),k(this,Mc,t.mapData)}static is(t){return t.__type===Xp.__type}get url(){let t=s(this,xl).url;if(s(this,Mc).tokenManager==null)return t;let n=hb(s(this,xl).url);if(n==null)return t;let o=n.mapId;try{if(s(this,Mc).tokenManager.isEnterpriseMode())return t;let i=s(this,Mc).tokenManager.getSasToken(o).token;if(i==null||i==="")throw new Error("SAS token empty!");return"".concat(t,"?").concat(i)}catch(i){return n.fileType!=="svg"&&K.error("Error getting SAS token for image",{error:i,url:t}),t}}get name(){return s(this,xl).altText}get altText(){return s(this,xl).altText}toJSON(){return{__type:Xp.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,Bh)))delete s(this,Bh)[t]}};Bh=new WeakMap,xl=new WeakMap,Mc=new WeakMap,m(Xp,"__type","image");var k2=Xp,gs=k2;p();var Ac,ya=class{constructor(r,t){m(this,"id");M(this,Ac);this.id=r}get geoJSONBoundingBox(){return s(this,Ac)?s(this,Ac):"bbox"in this.geoJSON.geometry&&this.geoJSON.geometry.bbox?this.geoJSON.geometry.bbox:(k(this,Ac,zs(this.geoJSON)),s(this,Ac))}get geoJSON(){return{properties:null,type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}}}};Ac=new WeakMap;var qp,gu,yu,hn=class extends ya{constructor(t,n){super(n.properties.id,t);M(this,qp);M(this,gu);M(this,yu,{});k(this,qp,t),k(this,gu,n)}get externalId(){var t;return(t=s(this,gu).properties.externalId)!=null?t:""}get name(){var n,o,i,a;let t=(o=(n=s(this,gu).properties.details)==null?void 0:n.name)!=null?o:"";return t===""&&(t=(a=(i=this.locationProfiles.find(u=>u.name&&u.name.length>0))==null?void 0:i.name)!=null?a:""),t}get icon(){var t;return(t=this.locationProfiles.find(n=>n.icon!=null&&n.icon.url!=null&&n.icon.url.length>0))==null?void 0:t.icon}get description(){var n,o,i,a;let t=(o=(n=s(this,gu).properties.details)==null?void 0:n.description)!=null?o:"";return t===""&&(t=(a=(i=this.locationProfiles.find(u=>u.description&&u.description.length>0))==null?void 0:i.description)!=null?a:""),t}get images(){var n,o,i,a,u;if(s(this,yu).images!=null)return s(this,yu).images;let t=(i=(o=(n=s(this,gu).properties.details)==null?void 0:n.images)==null?void 0:o.map(l=>new gs({mvfData:l,mapData:s(this,qp)})))!=null?i:[];return(t==null||t.length===0)&&(t=(u=(a=this.locationProfiles.find(l=>l.images.length>0))==null?void 0:a.images)!=null?u:[]),s(this,yu).images=t,t}get links(){var n,o,i,a,u;if(s(this,yu).links!=null)return s(this,yu).links;let t=(i=(o=(n=s(this,gu).properties.details)==null?void 0:n.links)==null?void 0:o.map(l=>new Tc({mvfData:l})))!=null?i:[];return(t==null||t.length===0)&&(t=(u=(a=this.locationProfiles.find(l=>l.links.length>0))==null?void 0:a.links)!=null?u:[]),s(this,yu).links=t,t}get locationProfiles(){var t;return(t=s(this,qp).locationProfilesByAttachedFeatureId[this.id])!=null?t:[]}_serializeDetailedMapData(){return{externalId:this.externalId,name:this.name,description:this.description,images:this.images,links:this.links,locationProfiles:this.locationProfiles}}};qp=new WeakMap,gu=new WeakMap,yu=new WeakMap;var Lh,Pc,Yp,Kp,Jp=class Jp extends hn{constructor(t,n){super(t,n.mvfData);m(this,"__type",Jp.__type);M(this,Lh);M(this,Pc);M(this,Yp,{});M(this,Kp);k(this,Lh,t),k(this,Pc,n.floorId),k(this,Kp,n.mvfData)}static is(t){return t.__type===Jp.__type}get center(){return s(this,Yp).center==null&&(s(this,Yp).center=so(s(this,Kp),s(this,Pc))),s(this,Yp).center}get floor(){let t=s(this,Lh).getById("floor",s(this,Pc));if(t==null)throw new Error("Floor ".concat(s(this,Pc)," not found!"));return t}get geoJSON(){return ne(_({},s(this,Kp)),{properties:null})}get focusTarget(){return this}get anchorTarget(){return this.center}toJSON(){return{__type:Jp.__type,id:this.id,name:this.name,floor:this.floor.id}}destroy(){}};Lh=new WeakMap,Pc=new WeakMap,Yp=new WeakMap,Kp=new WeakMap,m(Jp,"__type","area");var B2=Jp,$o=B2;p();var _c,bu,Oc,Fc,Qp=class Qp extends hn{constructor(t,n){super(t,n.mvfData);m(this,"__type",Qp.__type);M(this,_c);M(this,bu);M(this,Oc);M(this,Fc);k(this,bu,{}),k(this,Fc,n.mvfData),k(this,_c,t),k(this,Oc,n.floorId)}static is(t){return t.__type===Qp.__type}get floor(){let t=s(this,_c).getById("floor",s(this,Oc));if(t==null)throw new Error("Floor ".concat(s(this,Oc)," not found!"));return t}get center(){return s(this,bu).center==null&&(s(this,bu).center=so(s(this,Fc),s(this,Oc))),s(this,bu).center}get isExterior(){var o;if(s(this,Fc).properties.isExterior)return!0;let t=s(this,_c).obstructionIdByEntranceId[this.id],n=s(this,_c).getMVFFeatureById("obstruction",t);return(o=n==null?void 0:n.properties.footprintComponent)!=null?o:!1}get geoJSON(){return ne(_({},s(this,Fc)),{properties:null})}get focusTarget(){return this.center}get anchorTarget(){return this.center}toJSON(){return{__type:Qp.__type,id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of Object.keys(s(this,bu)))delete s(this,bu)[t]}};_c=new WeakMap,bu=new WeakMap,Oc=new WeakMap,Fc=new WeakMap,m(Qp,"__type","door");var L2=Qp,$n=L2;p();var El,kc,Hn,Bc,ef=class ef extends hn{constructor(t,n){super(t,n.mvfData);m(this,"__type",ef.__type);M(this,El);M(this,kc);M(this,Hn,{});M(this,Bc);k(this,El,t),k(this,kc,n.floorId),k(this,Bc,n.mvfData)}static is(t){return t.__type===ef.__type}get type(){return rX(s(this,Bc).properties.kind)}get enterpriseLocations(){return s(this,Hn).enterpriseLocations!=null?s(this,Hn).enterpriseLocations:(s(this,Hn).enterpriseLocations=mb(s(this,El),this.id),s(this,Hn).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let t=s(this,El).getById("floor",s(this,kc));if(t==null)throw new Error("Floor ".concat(s(this,kc)," not found!"));return t}get doors(){var n,o;if(s(this,Hn).doors)return s(this,Hn).doors;s(this,Hn).doors=[];let t=(o=(n=s(this,El).entranceNodeIdsBySpaceId)==null?void 0:n[this.id])!=null?o:[];for(let i of t){let a=s(this,El).doorsByNodeId[i];a&&s(this,Hn).doors.push(a)}return s(this,Hn).doors}get center(){return s(this,Hn).center==null&&(s(this,Hn).center=so(s(this,Bc),s(this,kc))),s(this,Hn).center}get geoJSON(){return ne(_({},s(this,Bc)),{properties:null})}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get anchorTarget(){return this.center}toJSON(){return{__type:ef.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of Object.keys(s(this,Hn)))delete s(this,Hn)[t]}};El=new WeakMap,kc=new WeakMap,Hn=new WeakMap,Bc=new WeakMap,m(ef,"__type","space");var R2=ef,tX=["room","hallway","exterior","void","gate"];function rX(e){if(e==null||e==="default")return"room";let r=e.toLowerCase();return tX.includes(r)?r:"room"}var Fr=R2;p();var zi,Wt,Ho,rf,gb,tf=class tf extends ya{constructor(t,n){super(n.mvfData.properties.id,t);M(this,rf);m(this,"__type",tf.__type);M(this,zi);M(this,Wt,{});M(this,Ho);k(this,zi,t),k(this,Ho,n.mvfData)}static is(t){return t.__type===tf.__type}get focusTarget(){return this}get name(){var n;if(!("name"in s(this,Ho).properties))return(n=s(this,Ho).properties.externalId)!=null?n:"";let t=he(this,rf,gb).call(this,"name");return typeof t=="string"?t:""}get shortName(){var n;if(!("shortName"in s(this,Ho).properties))return(n=s(this,Ho).properties.externalId)!=null?n:"";let t=he(this,rf,gb).call(this,"shortName");return typeof t=="string"?t:""}get subtitle(){let t=he(this,rf,gb).call(this,"subtitle");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,Ho).properties.externalId)!=null?t:""}get elevation(){return s(this,Ho).properties.elevation}get maxHeight(){return s(this,Ho).properties.maxHeight}get spaces(){if(s(this,Wt).spaces==null){let t=s(this,zi).spaces.filter(n=>n.floor.id===this.id);s(this,Wt).spaces=t}return s(this,Wt).spaces}get geoJSON(){var t;return{type:"Feature",properties:null,geometry:(t=s(this,Ho).geometry)!=null?t:{type:"Polygon",coordinates:[]}}}get objects(){if(s(this,Wt).objects==null){let t=s(this,zi).objects.filter(n=>n.floor.id===this.id);s(this,Wt).objects=t}return s(this,Wt).objects}get connections(){if(s(this,Wt).connections==null){let t=s(this,zi).connections.filter(n=>n.floors.includes(this));s(this,Wt).connections=t}return s(this,Wt).connections}get doors(){if(s(this,Wt).doors==null){let t=s(this,zi).doors.filter(n=>n.floor.id===this.id);s(this,Wt).doors=t}return s(this,Wt).doors}get annotations(){if(s(this,Wt).annotations==null){let t=s(this,zi).annotations.filter(n=>n.floor.id===this.id);s(this,Wt).annotations=t}return s(this,Wt).annotations}get pois(){if(s(this,Wt).pois==null){let t=s(this,zi).pointsOfInterest.filter(n=>n.floor.id===this.id);s(this,Wt).pois=t}return s(this,Wt).pois}get floorStack(){if(s(this,Wt).floorStack==null){let t=s(this,zi).floorStacks.find(n=>n.floors.includes(this));s(this,Wt).floorStack=t}return s(this,Wt).floorStack}get center(){return s(this,Wt).center==null&&(s(this,Wt).center=so(s(this,Ho),this.id)),s(this,Wt).center}toJSON(){return{__type:tf.__type,id:this.id,name:this.name,shortName:this.shortName,subtitle:this.subtitle,elevation:this.elevation,maxHeight:this.maxHeight,spaces:this.spaces.map(t=>t.id),objects:this.objects.map(t=>t.id),connections:this.connections.map(t=>t.id),doors:this.doors.map(t=>t.id),annotations:this.annotations.map(t=>t.id),pois:this.pois.map(t=>t.id)}}destroy(){for(let t of globalThis.Object.keys(s(this,Wt)))delete s(this,Wt)[t]}};zi=new WeakMap,Wt=new WeakMap,Ho=new WeakMap,rf=new WeakSet,gb=function(t){let n=s(this,Ho).properties[t];return s(this,zi).getPropTranslation(this.__type,t,this.id,n)},m(tf,"__type","floor");var N2=tf,Zo=N2;p();p();p();function Il(e){let r;if(Fr.is(e)||$n.is(e)||uo.is(e)||$o.is(e)||qr.is(e))r=e.center;else if(vo.is(e)||mi.is(e))r=e.coordinate;else if(je.is(e))r=e;else if(Vo.is(e))r=e.coordinate;else if(Vi.is(e))r=e.coordinates[0];else if(vu.is(e))if(e.spaces.length>0)r=e.spaces[0].center;else return;else if(Zn.is(e))if(e.coordinates.length>0)r=e.coordinates[0];else return;else return;return r}p();p();var FP=3.333333333,Rh={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building-outline","building-top","building","building-wall","building-buffer"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!0,floorGap:"auto"},disableUpdateStateValidation:!1},ys="ExteriorWalls",Sl="Walls",kP=0,nf="InteriorDoors",of="ExteriorDoors",Ir="GeometryLayer",bs="LabelsLayer",ba="MarkersLayer",af="FootprintLayer",Lc="OcclusionLayer",Rc="AreasLayer",sf="ImagesLayer",Nc="FacadesLayer",vs="PathsLayer";var BP=["https://mappedin.auth0.com","https://mappedin-staging.auth0.com","https://staging.mappedin.com","https://mappedin-staging.auth0.com/userinfo","https://mappedin.com","https://mappedin.auth0.com/userinfo"],nX={orange:"#F26336",teal:"#057685",lightTeal:"#5DC7D0"};var oX=new Set(["outdoorView","bearing","pitch","zoomLevel","screenOffsets","debug","initialFloor","shadingAndOutlines","wallTopColor","style","multiFloorView","occlusion","imagePlacementOptions","flipImagesToFaceCamera","injectStyles","useStandaloneCamera","preloadFloors"]),iX=new Set(["style","enabled","layersHiddenByGeometry","lowDpi"]);function j2(e){var r,t;(r=e.outdoorView)!=null&&r.enabled&&!((t=e.outdoorView)!=null&&t.token)&&K.error("Enable outdoor view requires a token. Provide token in `options.outdoorView.token`")}function U2(e,r){var o,i,a,u,l,c,d;let t=((o=e==null?void 0:e.outdoorView)==null?void 0:o.token)||r.outdoorViewToken,n=ne(_(_({},Rh),e),{outdoorView:_({enabled:((i=e==null?void 0:e.outdoorView)==null?void 0:i.enabled)===void 0?!!t:(a=e==null?void 0:e.outdoorView)==null?void 0:a.enabled,layersHiddenByGeometry:(u=Rh.outdoorView)==null?void 0:u.layersHiddenByGeometry},e==null?void 0:e.outdoorView),bearing:(c=(l=e==null?void 0:e.bearing)!=null?l:r.naturalBearing)!=null?c:0,imagePlacementOptions:_(_({},Rh.imagePlacementOptions),e==null?void 0:e.imagePlacementOptions),multiFloorView:_(_({},Rh.multiFloorView),e==null?void 0:e.multiFloorView),disableUpdateStateValidation:(d=e==null?void 0:e.disableUpdateStateValidation)!=null?d:!1});return t&&n.outdoorView&&(n.outdoorView.token=t),n}function LP(e){let r={remove_watermark:!1};if(e)try{let t=Jg(e);Object.assign(r,t.capabilities)}catch(t){K.error("Error decoding capabilities from token",t)}return r}function RP(e){let r=Object.fromEntries(Object.entries(e).filter(([t])=>oX.has(t)));return r.outdoorView&&(r.outdoorView=Object.fromEntries(Object.entries(r.outdoorView).filter(([t])=>iX.has(t)))),r}var lf,va,Cl,uf=class uf extends hn{constructor(t,n){super(t,{type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:n.mvfData});m(this,"__type",uf.__type);M(this,lf);M(this,va);M(this,Cl);k(this,va,{}),k(this,lf,t),k(this,Cl,n.mvfData)}static is(t){return t.__type===uf.__type}get accessible(){var t;return(t=s(this,Cl).accessible)!=null?t:!1}get type(){var t;return(t=s(this,Cl).type)!=null?t:"unknown"}get extra(){return s(this,Cl).extra}get coordinates(){if(s(this,va).coordinates==null){s(this,va).coordinates=[];for(let t of this.nodes)s(this,va).coordinates.some(n=>n.isEqual(t.coordinate))||s(this,va).coordinates.push(t.coordinate)}return s(this,va).coordinates}get nodes(){return s(this,Cl).nodes.map(t=>s(this,lf).getById("node",t)).filter(Zd)}get floors(){return this.coordinates.map(t=>t.floorId?s(this,lf).getById("floor",t.floorId):void 0).filter(Zd)}get focusTarget(){return this.coordinates}toJSON(){return{__type:uf.__type,id:this.id,name:this.name,type:this.type,externalId:this.externalId,coordinates:this.coordinates.map(t=>t.toJSON()),floors:this.floors.map(t=>t.id),extra:this.extra}}destroy(){for(let t of Object.keys(s(this,va)))delete s(this,va)[t]}};lf=new WeakMap,va=new WeakMap,Cl=new WeakMap,m(uf,"__type","connection");var G2=uf,Zn=G2;p();var df,jc,$i,Uc,cf=class cf extends hn{constructor(t,n){super(t,n.mvfData);m(this,"__type",cf.__type);M(this,df);M(this,jc);M(this,$i,{});M(this,Uc);k(this,df,t),k(this,jc,n.floorId),k(this,Uc,n.mvfData)}static is(t){return t.__type===cf.__type}get type(){let t=s(this,Uc).properties.kind;return t==null&&(t="object"),t==="Desks"&&(t="desk"),t.toLowerCase()}get enterpriseLocations(){return s(this,$i).enterpriseLocations!=null?s(this,$i).enterpriseLocations:(s(this,$i).enterpriseLocations=mb(s(this,df),this.id),s(this,$i).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let t=s(this,df).getById("floor",s(this,jc));if(t==null)throw new Error("Floor ".concat(s(this,jc)," not found!"));return t}get center(){return s(this,$i).center==null&&(s(this,$i).center=so(s(this,Uc),s(this,jc))),s(this,$i).center}get geoJSON(){return ne(_({},s(this,Uc)),{properties:null})}get anchorTarget(){return this.center}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}toJSON(){return{__type:cf.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of globalThis.Object.keys(s(this,$i)))s(this,$i)[t]=null}};df=new WeakMap,jc=new WeakMap,$i=new WeakMap,Uc=new WeakMap,m(cf,"__type","object");var z2=cf,uo=z2;p();var Nh,Gc,Dl,ff,pf=class pf extends hn{constructor(t,n){super(t,n.mvfData);m(this,"__type",pf.__type);M(this,Nh);M(this,Gc);M(this,Dl,{});M(this,ff);k(this,Nh,t),k(this,ff,n.mvfData),k(this,Gc,n.floorId)}static is(t){return t.__type===pf.__type}get floor(){let t=s(this,Nh).getById("floor",s(this,Gc));if(t==null)throw new Error("Floor ".concat(s(this,Gc)," not found!"));return t}get coordinate(){return s(this,Dl).coordinate==null&&(s(this,Dl).coordinate=so(s(this,ff),s(this,Gc))),s(this,Dl).coordinate}get geoJSON(){return ne(_({},s(this,ff)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:pf.__type,id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let t in s(this,Dl))s(this,Dl)[t]=null}};Nh=new WeakMap,Gc=new WeakMap,Dl=new WeakMap,ff=new WeakMap,m(pf,"__type","point-of-interest");var V2=pf,vo=V2;p();var hf,zc,xa,Vc,$c,jh,H2,mf=class mf extends hn{constructor(t,n){var o;super(t,n.mvfData);M(this,jh);m(this,"__type",mf.__type);M(this,hf);M(this,zc);M(this,xa,{});M(this,Vc);M(this,$c);k(this,hf,t),k(this,zc,n.floorId),k(this,Vc,n.mvfData),k(this,$c,(o=n.symbol)!=null?o:{url:"",name:""})}static is(t){return t.__type===mf.__type}get group(){return he(this,jh,H2).call(this).group}get type(){return he(this,jh,H2).call(this).type}get coordinate(){return s(this,xa).coordinate==null&&(s(this,xa).coordinate=so(s(this,Vc),s(this,zc))),s(this,xa).coordinate}get floor(){let t=s(this,hf).getById("floor",s(this,zc));if(t==null)throw new Error("Floor ".concat(s(this,zc)," not found!"));return t}get name(){return super.name||s(this,$c).name||""}get icon(){return s(this,xa).icon==null&&(s(this,xa).icon=super.icon||new gs({mvfData:{url:s(this,$c).url,altText:s(this,$c).name},mapData:s(this,hf)})),s(this,xa).icon}get geoJSON(){return ne(_({},s(this,Vc)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:mf.__type,id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let t of Object.keys(s(this,xa)))delete s(this,xa)[t]}};hf=new WeakMap,zc=new WeakMap,xa=new WeakMap,Vc=new WeakMap,$c=new WeakMap,jh=new WeakSet,H2=function(){let[t,n]=s(this,Vc).properties.symbolId.split("--");return{group:t,type:n}},m(mf,"__type","annotation");var $2=mf,mi=$2;p();p();var jP=Kl(NP(),1);function aX(e,r,t){t===void 0&&(t={});var n=pu(e),o=pu(r),i=jP.default.union(n.coordinates,o.coordinates);return i.length===0?null:i.length===1?Nd(i[0],t.properties):Kg(i,t.properties)}var UP=aX;var Tl,lo,Ea,yf,Uh,q2,gf=class gf extends ya{constructor(t,n){super(n.mvfData.id,t);M(this,Uh);m(this,"__type",gf.__type);M(this,Tl);M(this,lo,{});M(this,Ea);M(this,yf);k(this,Tl,t),k(this,Ea,n.mvfData),k(this,yf,n.facadeId)}static is(t){return t.__type===gf.__type}get type(){return s(this,Ea).type}get name(){let t=he(this,Uh,q2).call(this,"name");return typeof t=="string"?t:""}get shortName(){let t=he(this,Uh,q2).call(this,"shortName");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,Ea).externalId)!=null?t:""}get floors(){var t,n;if(s(this,lo).floors==null){let o=((n=(t=s(this,Ea).floors)!=null?t:s(this,Ea).maps)!=null?n:[]).reduce((i,a)=>{let u=s(this,Tl).floorsById[a];return u&&i.push(u),i},[]);o.length===0&&K.error("Floor stack ".concat(this.id," has no floors")),s(this,lo).floors=o.sort((i,a)=>i.elevation-a.elevation)}return s(this,lo).floors}get defaultFloor(){if(s(this,lo).defaultFloor!=null)return s(this,lo).defaultFloor;let t=s(this,Ea).defaultFloor?s(this,Tl).getById("floor",s(this,Ea).defaultFloor):void 0;return s(this,lo).defaultFloor=t||this.floors.reduce((n,o)=>Math.abs(o.elevation)<Math.abs(n.elevation)?o:n),s(this,lo).defaultFloor}get facade(){return s(this,yf)?s(this,Tl).facadesById[s(this,yf)]:void 0}get geoJSON(){if(s(this,lo).geoJSON!=null)return s(this,lo).geoJSON;let t=null;for(let n of this.floors){let o=n.geoJSON;t==null?t=o:t=UP(t,o)}return s(this,lo).geoJSON=t!=null?t:{type:"Feature",properties:null,geometry:{type:"Polygon",coordinates:[]}},s(this,lo).geoJSON}toJSON(){return{__type:gf.__type,id:this.id,name:this.name,shortName:this.shortName,type:this.type,floors:this.floors.map(t=>t.id)}}destroy(){for(let t of globalThis.Object.keys(s(this,lo)))delete s(this,lo)[t]}};Tl=new WeakMap,lo=new WeakMap,Ea=new WeakMap,yf=new WeakMap,Uh=new WeakSet,q2=function(t){return s(this,Tl).getPropTranslation(this.__type,t,this.id,s(this,Ea)[t])},m(gf,"__type","floor-stack");var X2=gf,yb=X2;p();var vf,Hc,xf,xs,bf=class bf extends ya{constructor(t,n){super(n.mvfData.id,t);m(this,"__type",bf.__type);M(this,vf);M(this,Hc);M(this,xf);M(this,xs,{});k(this,vf,n.mvfData),k(this,Hc,t),k(this,xf,n.floorStackId)}static is(t){return t.__type===bf.__type}get floorStack(){return s(this,Hc).getById("floor-stack",s(this,xf))}get spaces(){if(!s(this,xs).spaces){s(this,xs).spaces=[];for(let t of s(this,vf).spaces){let n=s(this,Hc).getById("space",t.spaceId);n&&s(this,xs).spaces.push(n)}}return s(this,xs).spaces}get center(){if(!s(this,xs).center){let t={type:"FeatureCollection",features:[]};for(let o of this.spaces){let i=s(this,Hc).mvfSpacesById[o.id];i&&t.features.push(i)}if(t.features.length===0)throw new En("No geometry found for facade!");let n=zp(t);s(this,xs).center=new je({latitude:n.geometry.coordinates[1],longitude:n.geometry.coordinates[0],floorId:s(this,vf).spaces[0].floorId})}return s(this,xs).center}get focusTarget(){return this.spaces}get anchorTarget(){return this.center}toJSON(){return{id:this.id,__type:bf.__type,floorStackId:s(this,xf),floorStack:this.floorStack,spaces:this.spaces}}};vf=new WeakMap,Hc=new WeakMap,xf=new WeakMap,xs=new WeakMap,m(bf,"__type","facade");var J2=bf,qr=J2;p();var sX=new Set(["wall","area"]),uX=new Set(["void","desk-entrance"]),lX=e=>{var t;let r={};for(let n of(t=e==null?void 0:e.locations)!=null?t:[])r[n.id]=n;return{mvf3LocationsById:r}},cX=(e,r,t)=>{var c,d,f,h,g,b,I,v,E,T,D;let n={},o={},i={},a={},u={},l={};for(let w of r["location.json"]||[]){let B=new vu(e,{mvf2Data:w,mvf3Data:t[w.id]});if(n[w.id]=B,w.externalId&&(a[w.externalId]==null&&(a[w.externalId]=[]),a[w.externalId].push(B)),w.categories)for(let L of w.categories)u[L]==null&&(u[L]=[]),u[L].push(B);let X=[...(d=(c=w.obstructions)==null?void 0:c.map(L=>L.id))!=null?d:[],...(h=(f=w.spaces)==null?void 0:f.map(L=>L.id))!=null?h:[],...(b=(g=w.annotations)==null?void 0:g.map(L=>L.id))!=null?b:[],...(I=w.connections)!=null?I:[],...(E=(v=w.entrances)==null?void 0:v.map(L=>L.id))!=null?E:[],...(D=(T=w.areas)==null?void 0:T.map(L=>L.id))!=null?D:[]];for(let L of X)L&&(l[L]==null&&(l[L]=[]),l[L].push(B))}for(let w of r["category.json"]||[]){let B=new vb(e,{mvfData:w});o[w.id]=B,w.parent&&(i[w.parent]==null&&(i[w.parent]=[]),i[w.parent].push(B))}return{locationCategoriesByParentId:i,locationProfilesById:n,locationCategoriesById:o,locationProfilesByExternalId:a,locationProfilesByCategoryId:u,locationProfilesByAttachedFeatureId:l}},dX=(e,r)=>{let t={},n={},o={},i={},a={},u={},l={},c={},d={},f=globalThis.Object.keys(e.space);for(let h of f){let g=e.space[h];if(g!=null){for(let b of g.features)if(d[b.properties.id]=h,u[b.properties.id]=b,b.properties.kind==="desk-entrance"&&(a[b.properties.externalId]==null&&(a[b.properties.externalId]=[]),a[b.properties.externalId].push(...b.properties.destinationNodes)),!DX(b))if(b.properties.kind==="poi"||b.geometry.type==="Point"&&b.properties.kind==null){let I=new vo(r,{floorId:h,mvfData:b});o[b.properties.id]=I,c[h]||(c[h]=[]),c[h].push(b),b.properties.externalId&&(i[b.properties.externalId]==null&&(i[b.properties.externalId]=[]),i[b.properties.externalId].push(I))}else if(b.geometry.type==="Point")K.warn("Encountered a point space with an unknown kind!",b.properties.kind);else{let I=new Fr(r,{floorId:h,mvfData:b});t[b.properties.id]=I,b.properties.externalId&&(n[b.properties.externalId]==null&&(n[b.properties.externalId]=[]),n[b.properties.externalId].push(I)),l[h]||(l[h]=[]),l[h].push(b)}}}return{spacesById:t,spacesByExternalId:n,poisById:o,poisByExternalId:i,objectEntranceNodeIdsByObstructionId:a,mvfSpacesById:u,mvfSpacesByFloorId:l,mvfPoisByFloorId:c}},pX=(e,r)=>{var a,u;let t={},n={},o={},i={};for(let l of e["node.geojson"].features){o[l.properties.id]=l;let c=new Vo(r,{mvfData:l,floorId:(a=l.properties.floor)!=null?a:l.properties.map});t[l.properties.id]=c,l.properties.externalId&&(n[l.properties.externalId]==null&&(n[l.properties.externalId]=[]),n[l.properties.externalId].push(c));let d=(u=l.properties.floor)!=null?u:l.properties.map;i[d]||(i[d]=[]),i[d].push(l)}return{nodesById:t,nodesByExternalId:n,mvfNodesById:o,mvfNodesByFloorId:i}},fX=(e,r)=>{var u,l;let t={},n={},o={},i={},a=globalThis.Object.keys(e.obstruction);for(let c of a){let d=e.obstruction[c];if(d!=null)for(let f of d.features){o[f.properties.id]=f;for(let g of f.properties.entrances)i[g]=f.properties.id;if(sX.has((l=(u=f.properties.kind)==null?void 0:u.toLowerCase())!=null?l:""))continue;let h=new uo(r,{floorId:c,mvfData:f});t[f.properties.id]=h,f.properties.externalId&&(n[f.properties.externalId]==null&&(n[f.properties.externalId]=[]),n[f.properties.externalId].push(h))}}return{objectsById:t,objectsByExternalId:n,mvfObstructionById:o,obstructionIdByEntranceId:i}},mX=(e,r)=>{let t={},n={},o={};if("floor.geojson"in e&&e["floor.geojson"]!=null)for(let i of e["floor.geojson"].features){o[i.properties.id]=i.properties;let a=new Zo(r,{mvfData:i});t[i.properties.id]=a,i.properties.externalId&&(n[i.properties.externalId]==null&&(n[i.properties.externalId]=[]),n[i.properties.externalId].push(a))}else for(let i of e["map.geojson"]){o[i.id]=i;let a=new Zo(r,{mvfData:{properties:i}});t[i.id]=a}return{floorsById:t,floorsByExternalId:n,mvfFloorsById:o}},hX=(e,r)=>{var l;let t={},n={},o={},i={},a={},u=e["floorstack.json"]||e["mapstack.json"]||e["mapstack.geojson"];if(u!=null)for(let c of u){let d=(l=e.facade)==null?void 0:l[c.id],f=new yb(r,{mvfData:c,facadeId:d==null?void 0:d.id});if(t[c.id]=f,c.externalId&&(n[c.externalId]==null&&(n[c.externalId]=[]),n[c.externalId].push(f)),o[c.id]=c,d){let h=new qr(r,{mvfData:d,floorStackId:c.id});i[d.id]=h;for(let g of d.spaces)a[g.spaceId]=h}}return{floorStacksById:t,floorStacksByExternalId:n,mvfFloorStacksById:o,facadesById:i,facadesBySpaceId:a}},gX=(e,r)=>{let t={},n={},o=e["connection.json"].reduce((i,a)=>{if(a.nodes.forEach(l=>i[l]=a),n[a.id]=a,a.type==="door")return i;let u=new Zn(r,{mvfData:a});return t[a.id]=u,i},{});return{connectionsById:t,mvfConnectionsById:n,mvfConnectionsByNodeId:o}},yX=(e,r)=>{let t={},n={},o={},i={},a={},u=globalThis.Object.keys(e.entrance);for(let l of u){let c=e.entrance[l];if(c!=null)for(let d of c.features){i[d.properties.id]=d;let f=new $n(r,{floorId:l,mvfData:d});d.properties.node&&(o[d.properties.node]=f),t[d.properties.id]=f,d.properties.externalId&&(n[d.properties.externalId]==null&&(n[d.properties.externalId]=[]),n[d.properties.externalId].push(f)),a[l]||(a[l]=[]),a[l].push(d)}}return{doorsById:t,doorsByExternalId:n,doorsByNodeId:o,mvfEntrancesById:i,mvfEntrancesByFloorId:a}},bX=(e,r,t)=>{var n;if(e.textAreas!=null)for(let o in e.textAreas){let i=(n=e.textAreas[o])==null?void 0:n.features;if(i!=null){for(let a of i)if("anchorId"in a.properties){let u=a==null?void 0:a.properties,l=r[u.anchorId]||t[u.anchorId];if(l!=null&&u!=null){let c=l.properties;c.textArea=u,c.textArea&&(c.textArea.position=a.geometry.coordinates)}}}}},vX=(e,r,t)=>{var n;if(e.floorImages!=null)for(let o in e.floorImages){let i=(n=e.floorImages[o])==null?void 0:n.features;if(i!=null){for(let a of i)if("anchorId"in a.properties){let u=a==null?void 0:a.properties,l=r[u.anchorId]||t[u.anchorId];if(l!=null&&u!=null){let c=l.properties;c.image=u,c.image&&(c.image.position=a.geometry.coordinates)}}}}},xX=(e,r)=>{var n,o;if(((n=e.enterprise)==null?void 0:n.enterpriseStyles)==null)return;let t=(o=e.enterprise)==null?void 0:o.enterpriseStyles;for(let i in t){let a=t[i];a.geometryAnchors.forEach(u=>{let l=r[u.geometryId];if(l!=null){let c=l.properties;c.style={styleId:i,edgeOffset:a.edgeOffset}}})}},EX=(e,r,t)=>{if(!(e.enterprise==null||e.enterprise.textures==null))for(let n of e.enterprise.textures)for(let o of n.geometryAnchors){let i=r[o.geometryId]||t[o.geometryId];if(i!=null){let a=i.properties;a.textures==null&&(a.textures=[]),a.textures.push(n)}}},IX=(e,r)=>{let t={},n={},o={};if(e.annotation==null)return{annotationsById:t,mvfAnnotationsById:n,mvfAnnotationsByFloorId:o};let i=e["annotation-symbols.json"]||{},a=globalThis.Object.keys(e.annotation);for(let u of a){let l=e.annotation[u];if(l!=null)for(let c of l.features){n[c.properties.id]=c;let d=new mi(r,{floorId:u,mvfData:c,symbol:i[c.properties.symbolId]});t[c.properties.id]=d,o[u]||(o[u]=[]),o[u].push(c)}}return{annotationsById:t,mvfAnnotationsById:n,mvfAnnotationsByFloorId:o}},SX=(e,r)=>{let t={},n={},o={};if(e.area==null)return{areasById:t,areasByExternalId:n,mvfAreasById:o};let i=globalThis.Object.keys(e.area);for(let a of i){let u=e.area[a];if(u!=null)for(let l of u.features){o[l.properties.id]=l;let c=new $o(r,{floorId:a,mvfData:l});t[l.properties.id]=c,l.properties.externalId&&(n[l.properties.externalId]==null&&(n[l.properties.externalId]=[]),n[l.properties.externalId].push(c))}}return{areasById:t,areasByExternalId:n,mvfAreasById:o}},CX=(e,r)=>{var a;let t={},n={},o={},i={};for(let u in e){let l=e[u];if(l==null)continue;let c=(a=l.properties.destinationNodes)!=null?a:[];if(c.length<1)continue;let d=[];for(let f of c)r[f]!=null&&d.push(f),n[f]==null&&(n[f]=[]),n[f].push(l.properties.id),l.properties.kind==="desk-entrance"&&(o[f]==null&&(o[f]=[]),o[f].push(l.properties.externalId));d.length>0&&(t[u]=d),i[u]=c}return{entranceNodeIdsBySpaceId:t,spaceIdsByNodeId:n,objectIdsByNodeId:o,destinationNodesIdsBySpaceId:i}},GP=(e,r)=>{var T,D,w,B,X,L,P,R,$,V,H,re,j,me;let t={},n={},o={},i={},a=((D=(T=e.enterprise)==null?void 0:T.locations)!=null?D:[]).reduce((z,ue)=>(z[ue.id]=ue,z),{}),u={},l={},c={},d={},f={},h={},g=((w=e.enterprise)==null?void 0:w.venue)||{},b={},I={},v={};for(let z of(X=(B=e.enterprise)==null?void 0:B.categories)!=null?X:[]){let ue=new bb(r,{mvfData:z});u[z.id]=ue,z.externalId&&(l[z.externalId]==null&&(l[z.externalId]=[]),l[z.externalId].push(ue)),c[z.id]=z,z.locations.forEach(se=>{f[se]==null&&(f[se]=[]),f[se].push(z.id)})}let E={};for(let z of(P=(L=e.enterprise)==null?void 0:L.locationInstances)!=null?P:[]){let ue=a[z.parent],se=Object.keys(ue),pe={};for(let Fe of se)pe[Fe]=void 0;let le=_(ne(_({},pe),{polygons:[],nodes:[]}),z);E[le.parent]==null&&(E[le.parent]=[]);let ye=new Vi(r,{mvfData:le,categoryIds:(($=(R=e.enterprise)==null?void 0:R.categoryPriorities)==null?void 0:$[le.id])||f[le.id],parentId:z.parent});E[le.parent].push(ye);for(let Fe of(V=z.polygons)!=null?V:[])v[Fe.id]=ye;b[le.id]=z,I[le.id]=ye}for(let z of(re=(H=e.enterprise)==null?void 0:H.locations)!=null?re:[]){let ue=new Vi(r,{mvfData:z,categoryIds:((me=(j=e.enterprise)==null?void 0:j.categoryPriorities)==null?void 0:me[z.id])||f[z.id],locationInstances:E[z.id]});o[z.id]=ue,z.externalId&&(i[z.externalId]==null&&(i[z.externalId]=[]),i[z.externalId].push(ue)),z.nodes.forEach(se=>{h[se.id]==null&&(h[se.id]=[]),h[se.id].push(z.id)});for(let se of z.polygons)d[se.id]==null&&(d[se.id]=[]),d[se.id].push(z)}if(r.enterpriseMode===!0){for(let z in r.mvfConnectionsById){let ue={},se=r.mvfConnectionsById[z],pe={id:z,externalId:se.externalId,kind:"enterprise."+se.type,destinationNodes:[],flags:se.flags,type:se.type,nodes:se.nodes,accessible:se.accessible,extra:se.extra,details:se.details};for(let le of r.mvfConnectionsById[z].nodes){let ye=r.nodesById[le];ye!=null&&(ue[ye.floor.id]={type:"Feature",geometry:{type:"Point",coordinates:[ye.coordinate.longitude,ye.coordinate.latitude]},properties:pe})}Object.keys(ue).length>0&&(t[z]=new Zn(r,{mvfData:pe}),se.externalId&&(n[se.externalId]==null&&(n[se.externalId]=[]),n[se.externalId].push(t[z])))}r.connectionsById=t}return{connectionsByExternalId:n,locationIdsByNodeId:h,mvfLocationsByGeometryId:d,mvfLocationsById:a,mvfCategoriesById:c,locationsById:o,locationInstancesById:I,instanceLocationsByPolygonId:v,locationsByExternalId:i,mvfLocationInstancesById:b,categoriesById:u,categoriesByExternalId:l,venue:g}},zP=(e,r,t)=>{let{nodesById:n,nodesByExternalId:o,mvfNodesById:i,mvfNodesByFloorId:a}=pX(r,e),{connectionsById:u,mvfConnectionsById:l,mvfConnectionsByNodeId:c}=gX(r,e),{spacesById:d,spacesByExternalId:f,poisById:h,poisByExternalId:g,mvfSpacesById:b,objectEntranceNodeIdsByObstructionId:I,mvfSpacesByFloorId:v,mvfPoisByFloorId:E}=dX(r,e),{objectsById:T,objectsByExternalId:D,mvfObstructionById:w,obstructionIdByEntranceId:B}=fX(r,e),{floorsById:X,floorsByExternalId:L,mvfFloorsById:P}=mX(r,e),{floorStacksById:R,floorStacksByExternalId:$,mvfFloorStacksById:V,facadesById:H,facadesBySpaceId:re}=hX(r,e),{doorsById:j,doorsByExternalId:me,doorsByNodeId:z,mvfEntrancesById:ue,mvfEntrancesByFloorId:se}=yX(r,e),{annotationsById:pe,mvfAnnotationsById:le,mvfAnnotationsByFloorId:ye}=IX(r,e),{areasById:Fe,areasByExternalId:Ee,mvfAreasById:Oe}=SX(r,e);vX(r,b,w),bX(r,b,w),xX(r,b),EX(r,b,w);let{mvf3LocationsById:we}=lX(t),{locationCategoriesByParentId:Le,locationProfilesById:Qe,locationCategoriesById:Ge,locationProfilesByExternalId:N,locationProfilesByCategoryId:xe,locationProfilesByAttachedFeatureId:Z}=cX(e,r,we),{entranceNodeIdsBySpaceId:De,spaceIdsByNodeId:Ie,objectIdsByNodeId:ve,destinationNodesIdsBySpaceId:Ne}=CX(b,z);return{spacesById:d,spacesByExternalId:f,nodesById:n,nodesByExternalId:o,objectsById:T,objectsByExternalId:D,floorsById:X,floorsByExternalId:L,floorStacksById:R,floorStacksByExternalId:$,facadesById:H,facadesBySpaceId:re,connectionsById:u,doorsById:j,doorsByExternalId:me,doorsByNodeId:z,poisById:h,poisByExternalId:g,annotationsById:pe,areasById:Fe,areasByExternalId:Ee,objectEntranceNodeIdsByObstructionId:I,obstructionIdByEntranceId:B,locationProfilesById:Qe,locationCategoriesById:Ge,locationProfilesByExternalId:N,locationProfilesByCategoryId:xe,locationCategoriesByParentId:Le,mvfSpacesById:b,mvfNodesById:i,mvfObstructionById:w,mvfFloorsById:P,mvfFloorStacksById:V,mvfConnectionsById:l,mvfConnectionsByNodeId:c,mvfEntrancesById:ue,mvfAnnotationsById:le,mvfNodesByFloorId:a,mvfSpacesByFloorId:v,mvfPoisByFloorId:E,mvfAreasById:Oe,mvfEntrancesByFloorId:se,mvfAnnotationsByFloorId:ye,locationProfilesByAttachedFeatureId:Z,entranceNodeIdsBySpaceId:De,spaceIdsByNodeId:Ie,objectIdsByNodeId:ve,destinationNodesIdsBySpaceId:Ne,mvf3LocationsById:we}};function DX(e){var r,t;return!["Polygon","MultiPolygon"].includes(e.geometry.type)&&"kind"in e.properties&&e.properties.kind==null||((r=e.properties.kind)==null?void 0:r.includes("connection"))||uX.has((t=e.properties.kind)!=null?t:"")}p();var TX=new Set(["polygons"]),hi,Pt,gn,Gh,Ef=class Ef extends mn{constructor(t,n){super(n.mvfData.externalId);m(this,"__type",Ef.__type);m(this,"description");m(this,"name","");m(this,"amenity");m(this,"externalId","");m(this,"extra");m(this,"gallery");m(this,"instances");m(this,"logo");m(this,"operationHours");m(this,"phone");m(this,"picture");m(this,"shortName");m(this,"showFloatingLabelWhenImagePresent");m(this,"showLogo");m(this,"siblingGroups");m(this,"social");m(this,"sortOrder",-1);m(this,"states");m(this,"tags");m(this,"type","");m(this,"hidden",!1);m(this,"primaryCategory");M(this,hi);M(this,Pt,{});M(this,gn);M(this,Gh);k(this,hi,t),k(this,gn,n.mvfData),k(this,Gh,n.categoryIds||[]),this.instances=n.locationInstances||[];for(let o in n.mvfData)!TX.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{enumerable:!0,get(){if(n.parentId){let i=s(this,hi).locationsById[n.parentId];return s(this,gn)[o]!=null?s(this,hi).getPropTranslation(this.__type,o,s(this,gn).id,s(this,gn)[o]):s(this,hi).getPropTranslation(this.__type,o,s(this,gn).id,i[o])}return s(this,hi).getPropTranslation(this.__type,o,s(this,gn).id,s(this,gn)[o])}})}static is(t){return t.__type===Ef.__type}get focusTarget(){return this.spaces}get categories(){return s(this,Pt).categories?s(this,Pt).categories:(s(this,Pt).categories=(s(this,Gh).map(t=>s(this,hi).getById("enterprise-category",t))||[]).filter(Boolean),s(this,Pt).categories)}get coordinates(){if(s(this,Pt).coordinates)return s(this,Pt).coordinates;s(this,Pt).coordinates=[];for(let t=0;t<this.nodes.length;t++)s(this,Pt).coordinates.push(this.nodes[t].coordinate);return s(this,Pt).coordinates}get nodes(){if(s(this,Pt).nodes)return s(this,Pt).nodes;s(this,Pt).nodes=[];for(let t=0;t<s(this,gn).nodes.length;t++){let n=s(this,hi).getById("node",s(this,gn).nodes[t].id);n&&s(this,Pt).nodes.push(n)}return s(this,Pt).nodes}get points(){if(s(this,Pt).points)return s(this,Pt).points;s(this,Pt).points=[];for(let t=0;t<s(this,gn).spaces.length;t++){let n=s(this,hi).getById("point-of-interest",s(this,gn).spaces[t].id);n&&s(this,Pt).points.push(n)}return s(this,Pt).points}get spaces(){if(s(this,Pt).spaces)return s(this,Pt).spaces;s(this,Pt).spaces=[];let t=Array.isArray(s(this,gn).spaces)?s(this,gn).spaces:s(this,gn).polygons;for(let n=0;n<t.length;n++){let o=s(this,hi).getById("space",t[n].id);o&&s(this,Pt).spaces.push(o)}return s(this,Pt).spaces}get objects(){if(s(this,Pt).objects)return s(this,Pt).objects;s(this,Pt).objects=[];for(let t=0;t<s(this,gn).polygons.length;t++){let n=s(this,hi).getById("object",s(this,gn).polygons[t].id);n&&s(this,Pt).objects.push(n)}return s(this,Pt).objects}toJSON(){return{__type:Ef.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,Pt)))delete s(this,Pt)[t]}};hi=new WeakMap,Pt=new WeakMap,gn=new WeakMap,Gh=new WeakMap,m(Ef,"__type","enterprise-location");var Y2=Ef,Vi=Y2;p();var wX=new Set,Zc,xo,Es,If=class If extends mn{constructor(t,n){super(n.mvfData.externalId);m(this,"__type",If.__type);m(this,"name","");m(this,"color");m(this,"externalId","");m(this,"extra");m(this,"icon");m(this,"iconFromDefaultList");m(this,"sortOrder",-1);m(this,"picture");M(this,Zc);M(this,xo,{});M(this,Es);k(this,Zc,t),k(this,Es,n.mvfData);for(let o in n.mvfData)!wX.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{get(){return s(this,Zc).getPropTranslation(this.__type,o,s(this,Es).id,s(this,Es)[o])}})}static is(t){return t.__type===If.__type}get children(){if(s(this,xo).children)return s(this,xo).children;s(this,xo).children=[];for(let t=0;t<s(this,Es).children.length;t++){let n=s(this,Zc).getById("enterprise-category",s(this,Es).children[t]);n&&s(this,xo).children.push(n)}return s(this,xo).children}get locations(){if(s(this,xo).locations)return s(this,xo).locations;s(this,xo).locations=[];for(let t=0;t<s(this,Es).locations.length;t++){let n=s(this,Zc).getById("enterprise-location",s(this,Es).locations[t]);n&&s(this,xo).locations.push(n)}return s(this,xo).locations}toJSON(){return{__type:If.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,xo)))delete s(this,xo)[t]}};Zc=new WeakMap,xo=new WeakMap,Es=new WeakMap,m(If,"__type","enterprise-category");var K2=If,bb=K2;p();var MX=new Set,zh,Wc,Sf=class Sf extends mn{constructor(t,n){super(n.mvfData.externalId);m(this,"__type",Sf.__type);m(this,"countrycode");m(this,"coverImage");m(this,"externalId","");m(this,"defaultLanguage",{code:"en",name:"English"});m(this,"defaultFloor");m(this,"extra");m(this,"icon");m(this,"languages",[]);m(this,"links",[]);m(this,"logo");m(this,"mappedinWebUrl");m(this,"operationHours");m(this,"slug","");m(this,"topLocations");m(this,"tzid");M(this,zh,{});M(this,Wc);k(this,Wc,n.mvfData);for(let o in n.mvfData)!MX.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&(this[o]=n.mvfData[o])}static is(t){return t.__type===Sf.__type}get name(){var t;return(t=s(this,Wc).name)!=null?t:""}get defaultMap(){var t,n;return(n=(t=s(this,Wc).defaultMap)!=null?t:this.defaultFloor)!=null?n:""}get enterpriseType(){var t;return(t=s(this,Wc).type)!=null?t:void 0}toJSON(){return{__type:Sf.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,zh)))delete s(this,zh)[t]}};zh=new WeakMap,Wc=new WeakMap,m(Sf,"__type","enterprise-venue");var Q2=Sf,eI=Q2;p();p();function Vh(e,r,t=[]){let n=_({},e);for(let[o,i]of Object.entries(r))if(i!==void 0)if(o in n){let a=o;if(Array.isArray(i)&&i.length>0){let u=AX(i[0],t);if(u){let l=n[a];if(!Array.isArray(l))throw new Error("Expected array at ".concat(o,", got ").concat(typeof l));let c=new Map(i.map(h=>[VP(h,u),h])),f=l.map(h=>{let g=c.get(VP(h,u));return g?Vh(h,g,t):h});n[a]=f}else n[a]=i}else{let u=n[a];typeof u=="object"&&u!==null&&typeof i=="object"&&i!==null?Object.keys(i).length===0?n[a]=i:n[a]=Vh(u,i,t):n[o]=i}}else n[o]=i;return n}function AX(e,r){function t(n){if(typeof n!="object"||n===null)return null;for(let o of r)if(o in n&&typeof n[o]<"u")return[o];if(Array.isArray(n))return null;for(let[o,i]of Object.entries(n)){let a=t(i);if(a)return[o,...a]}return null}return t(e)}function VP(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}p();p();p();p();p();var $P=(i=>(i.Departure="Departure",i.TakeConnection="TakeConnection",i.ExitConnection="ExitConnection",i.Turn="Turn",i.Arrival="Arrival",i))($P||{}),tI=(a=>(a.Straight="Straight",a.Right="Right",a.SlightRight="SlightRight",a.Left="Left",a.SlightLeft="SlightLeft",a.Back="Back",a))(tI||{}),HP=(d=>(d.stairs="stairs",d.elevator="elevator",d.escalator="escalator",d.door="door",d.ramp="ramp",d.slide="slide",d.portal="portal",d.security="security",d.shuttle="shuttle",d.ladder="ladder",d))(HP||{}),xb=(t=>(t.Exterior="exterior-walls",t.Interior="interior-walls",t))(xb||{}),Eb=(t=>(t.Interior="interior-doors",t.Exterior="exterior-doors",t))(Eb||{});p();function rI(e,r,t,n,o){if(e===void 0)return!1;if(typeof e=="boolean")return e;let i=Er(n,o),a=Math.abs(t-r);return Z6(Math.atan2(a,i))>=e}function ZP(e){let{fromPosition:r,toPosition:t,junctionInset:n,fromAltitude:o,toAltitude:i}=e;if(n<=0)return null;let a=(r[1]+t[1])/2,{toCartesian:u,toGeographic:l}=Bd(a),c=u(r),d=u(t),f=d.x-c.x,h=d.y-c.y,g=i-o,b=Math.sqrt(f*f+h*h+g*g);if(b<=n*2)return null;let I=n/b,v={x:c.x+f*I,y:c.y+h*I},E=l(v.x,v.y),T=r[2]!==void 0?r[2]+g*I:void 0,D={x:d.x-f*I,y:d.y-h*I},w=l(D.x,D.y),B=t[2]!==void 0?t[2]-g*I:void 0;return{fromPosition:T!==void 0?[E.lon,E.lat,T]:[E.lon,E.lat],toPosition:B!==void 0?[w.lon,w.lat,B]:[w.lon,w.lat]}}function nI(e,r,t,n,o){let i=ZP({fromPosition:e,toPosition:r,junctionInset:t,fromAltitude:n,toAltitude:o});return i?(e[0]=i.fromPosition[0],e[1]=i.fromPosition[1],e[2]!==void 0&&i.fromPosition[2]!==void 0&&(e[2]=i.fromPosition[2]),r[0]=i.toPosition[0],r[1]=i.toPosition[1],r[2]!==void 0&&i.toPosition[2]!==void 0&&(r[2]=i.toPosition[2]),!0):!1}function Hi(e){return e.verticalOffset===0?[e.longitude,e.latitude]:[e.longitude,e.latitude,e.verticalOffset]}function _X(e){return new Map(e.map(r=>{let{properties:t}=r,{id:n}=t;return[n,r]}))}var oI=(e,r)=>{let t=_X(r),n={entrances:{type:"FeatureCollection",features:[]},walls:{type:"Feature",properties:{id:e[0].properties.id},geometry:{type:"MultiLineString",coordinates:[]}}};for(let o of e){let i=[o.geometry.coordinates],a=(o.properties.entrances||[]).reduce((u,l)=>(t.has(l)&&u.push(t.get(l)),u),[]);if(a.length){let{entrances:u,obstructions:l}=w2(o,a);i=l.map(c=>c.geometry.coordinates),n.entrances.features.push(...u)}n.walls.geometry.coordinates.push(...i)}return n};function WP(e,r){return((r-e+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}function XP(e,r){let t="Left";return e<=-Math.PI/4?t="Right":e<=-r?t="SlightRight":e<=r?t="Straight":e<=Math.PI/4?t="SlightLeft":t="Left",t}function qP(e){let r={};for(let t in e){let n=e[t];if(n!=null){if(n.id=t,"polygons"in n)for(let o of n.polygons)r[o]=n;else if("lineStrings"in n)for(let o of n.lineStrings)r[o]=n;else if("points"in n)for(let o of n.points)r[o]=n}}return r}function iI(e,r){return e.reduce((t,n)=>{let o=r[n.properties.id];if(o==null)return t;if("textures"in n.properties&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0){let i=ne(_({},o),{id:o.id+"-textures"});t.set(i,[n])}else t.has(o)||t.set(o,[]),t.get(o).push(n);return t},new Map)}function Cf(e,r={}){var o,i,a,u,l,c,d;let t=ne(_({},e),{flipImageToFaceCamera:(o=r==null?void 0:r.flipImagesToFaceCamera)!=null?o:!0}),n=(a=(i=r==null?void 0:r.style)==null?void 0:i.shading)!=null?a:r==null?void 0:r.shadingAndOutlines;if(n===!0?t.shading={start:.1,end:.15,intensity:.4}:typeof n=="object"&&(t.shading={start:n.start,end:n.end,intensity:n.intensity}),t.outline=(l=(u=r==null?void 0:r.style)==null?void 0:u.outlines)!=null?l:r==null?void 0:r.shadingAndOutlines,"lineStrings"in e){let f=(d=(c=r==null?void 0:r.style)==null?void 0:c.wallTopColor)!=null?d:r==null?void 0:r.wallTopColor;f!=null&&(t.topColor=f)}return t}var aI=(e,r)=>{var o;let n=((o=r.currentMap)==null?void 0:o.currentFloor).layers.get(Ir);switch(e){case"interior-walls":return n==null?void 0:n.layers.get(Sl);case"exterior-walls":return n==null?void 0:n.layers.get(ys);case"interior-doors":return n==null?void 0:n.layers.get(nf);case"exterior-doors":return n==null?void 0:n.layers.get(of);default:return typeof e=="string"?e:e==null?void 0:e.id}};function sI(e){return new Promise(r=>{e.onComplete(r),e.onStop(r)})}function JP(e){return e.bbox?e.bbox:zs(e)}function $h(e,r,t){return e.floorId&&r.has(e.floorId)?r.get(e.floorId):t}function Df(e){if(Fr.is(e)||uo.is(e))return e.id}function YP(e,r,t){var i,a;let n=e.coordinates.length===2&&e.coordinates[0].floorId!==e.coordinates[1].floorId,o=!0;if(n&&e.coordinates[0].floorId!=null&&e.coordinates[1].floorId!=null){let u=r==null?void 0:r.getById("floor",e.coordinates[0].floorId),l=r==null?void 0:r.getById("floor",e.coordinates[1].floorId);if(u&&l){let c=t.getState(u),d=t.getState(l);c!=null&&d!=null&&(o=c.visible&&d.visible&&c.altitude!==d.altitude)}}else{let u=e.coordinates[0].floorId!=null?r==null?void 0:r.getById("floor",e.coordinates[0].floorId):void 0;o=u&&(a=(i=t.getState(u))==null?void 0:i.visible)!=null?a:!0}return o}function KP(e,r){let t=e.properties.path.split("/"),n=t[t.length-1].split(".")[0],o=atob(n);return"img_"+Yg(o).toString()+"-"+r}function xu(e="auto",r){return e==="auto"?r?Math.round(r*FP):10:e}function QP(e,r="auto"){if(!e.length)return new Map;let t=e.sort((u,l)=>u.elevation-l.elevation),n=t.findIndex(u=>u.elevation>=0);n===-1&&(n=t.length);let o=0,i=new Map;for(let u=n;u<t.length;u+=1){let l=t[u],c=t[u+1],d=l.elevation,f=c?c.elevation:void 0,h=f!==void 0?Math.max(0,f-d-1):0,g=u===n?d:0,b=xu(r,l.maxHeight)*(1+h+g),I=o;i.set(l.elevation,{altitude:I,effectiveHeight:b}),o+=b}let a=u=>-u-1;o=0;for(let u=n-1;u>=0;u-=1){let l=t[u],c=t[u-1],d=a(l.elevation),f=c?a(c.elevation):void 0,h=f!==void 0?Math.max(0,f-d-1):0,g=u===n-1?d:0,b=xu(r,l.maxHeight)*(1+h+g),I=-(o+b);i.set(l.elevation,{altitude:I,effectiveHeight:b}),o+=b}return i}function Ib(e,r){let t=r(e.center);return{center:new je({latitude:t[1],longitude:t[0]}),radius:e.radius}}function e_(e){if(e.geometry.type==="Polygon")return{type:"Feature",geometry:{type:"Polygon",coordinates:[e.geometry.coordinates[0]]},properties:e.properties};let r=[];for(let t of e.geometry.coordinates)r.push([t[0]]);return{type:"Feature",geometry:{type:"MultiPolygon",coordinates:r},properties:e.properties}}var t_=Math.PI*.1,Eo,Wo,gi,Eu,Xc,wf,Zi,r_,Tf,n_,wl=class{constructor(r,t,n,o,i){M(this,Zi);m(this,"id");M(this,Eo,{});M(this,Wo);M(this,gi);m(this,"departure");m(this,"destination");M(this,Eu);M(this,Xc);M(this,wf);var a;this.id=(a=i==null?void 0:i.id)!=null?a:Jt(),k(this,Wo,t),k(this,gi,r.features),this.departure=n,this.destination=o}get path(){return s(this,gi).map(r=>s(this,Wo).getById("node",r.properties.id)).filter(Boolean)}get coordinates(){return s(this,Eo).coordinates?s(this,Eo).coordinates:(s(this,Eo).coordinates=s(this,gi).map(r=>new je(r.geometry.coordinates[1],r.geometry.coordinates[0],r.properties.groupBy)),s(this,Eo).coordinates)}get distance(){return s(this,Eo).distance?s(this,Eo).distance:(s(this,Eo).distance=s(this,gi).reduce((r,t)=>r+(t.properties.distance||0),0),s(this,Eo).distance)}get instructions(){if(s(this,gi).length<2)return[];if(s(this,Eo).instructions)return s(this,Eo).instructions;let r=[],t=0;for(let n=0;n<s(this,gi).length;n++){let o=s(this,gi)[n],i=s(this,gi)[n-1],a=s(this,gi)[n+1],u=new je(o.geometry.coordinates[1],o.geometry.coordinates[0],o.properties.groupBy),l=he(this,Zi,r_).call(this,{prevDirection:i,direction:o,nextDirection:a});t+=(i==null?void 0:i.properties.distance)||0;for(let c of l)c&&(r.push({action:c,distance:t,coordinate:u,node:s(this,Wo).getById("node",o.properties.id)}),t=0)}return s(this,Eo).instructions=r,s(this,Eo).instructions}toJSON(){return{id:this.id,directions:s(this,gi),__type:"directions",from:this.departure,to:this.destination,coordinates:this.coordinates,distance:this.distance,instructions:this.instructions}}};Eo=new WeakMap,Wo=new WeakMap,gi=new WeakMap,Eu=new WeakMap,Xc=new WeakMap,wf=new WeakMap,Zi=new WeakSet,r_=function(r){var b,I;let{prevDirection:t,direction:n,nextDirection:o}=r,i=t&&s(this,Wo).getById("floor",t.properties.groupBy),a=s(this,Wo).getById("floor",n.properties.groupBy),u=o&&s(this,Wo).getById("floor",o.properties.groupBy),l=[];t||l.push({type:"Departure"});let c=s(this,Wo).getMVFFeatureByNodeId("connection",n.properties.id),d=c?s(this,Wo).getById("connection",c.id):void 0,f=c&&c.nodes.length>1,h=s(this,Wo).enterpriseMode&&(!n.properties.destination||!(c!=null&&c.nodes.includes(n.properties.destination))||!(c!=null&&c.nodes.includes(n.properties.id)));if(c&&!(!f||h))if(!s(this,Eu)||s(this,Eu)==="exit")l.push(he(this,Zi,Tf).call(this,"TakeConnection",a,u,d,c)),k(this,Eu,"take"),k(this,Xc,d),k(this,wf,c);else{let v=s(this,Wo).getMVFFeatureByNodeId("connection",(b=t==null?void 0:t.properties.id)!=null?b:""),E=s(this,Wo).getById("connection",(I=v==null?void 0:v.id)!=null?I:"");l.push(he(this,Zi,Tf).call(this,"ExitConnection",a,i,E,v)),k(this,Eu,"exit"),k(this,Xc,d),k(this,wf,c)}else s(this,Eu)==="take"?(l.push(he(this,Zi,Tf).call(this,"ExitConnection",a,i,s(this,Xc),s(this,wf))),k(this,Eu,"exit"),k(this,Xc,d)):u&&(a==null?void 0:a.id)!==u.id?l.push(he(this,Zi,Tf).call(this,"TakeConnection",a,u,d)):i&&i.id!==(a==null?void 0:a.id)?l.push(he(this,Zi,Tf).call(this,"ExitConnection",a,i,d)):l.push(he(this,Zi,n_).call(this,t,n));return o||l.push({type:"Arrival"}),l},Tf=function(r,t,n,o,i){var c,d;let a="none",u=t?t.elevation:0;if(u!=null&&(n==null?void 0:n.elevation)!=null){let f=u-n.elevation;f>0?a="down":f<0&&(a="up")}let l=(d=(c=o==null?void 0:o.type)!=null?c:i==null?void 0:i.type)!=null?d:"stairs";return{type:r,fromFloor:t,toFloor:n,direction:a,connection:o,connectionType:l}},n_=function(r,t){let n=t.properties.edges;if(!n||n.filter(a=>a.destination.properties.id!==(r==null?void 0:r.properties.id)&&a.destination.properties.id!==t.properties.destination).length===0)return null;let i=r?-WP(r.properties.angle,t.properties.angle):0;return Math.abs(i)>=t_?{type:"Turn",bearing:XP(i,t_),referencePosition:"At"}:null};p();p();p();p();p();p();p();var Io=class{constructor({origin:r,destination:t,distance:n=0,angle:o=0,pathWeight:i=0,multiplicativeDistanceWeightScaling:a=!0}){m(this,"origin");m(this,"destination");m(this,"distance");m(this,"angle");m(this,"weight");if(this.origin=r,this.destination=t,this.distance=n,this.angle=o,this.weight=i||0,a?r.properties.floor===t.properties.floor&&(this.weight=(this.weight>=0?this.distance*this.weight:0)+this.distance):r.properties.map===t.properties.map&&(this.weight=this.weight>=0?this.distance+this.weight:0),isNaN(this.angle))throw new Error("Invalid angle: Expected a numeric value, but received NaN.")}};p();p();p();p();function Iu(e,r,t){if(t===void 0&&(t={}),!e)throw new Error("point is required");if(!r)throw new Error("polygon is required");var n=Gi(e),o=pu(r),i=o.type,a=r.bbox,u=o.coordinates;if(a&&OX(n,a)===!1)return!1;i==="Polygon"&&(u=[u]);for(var l=!1,c=0;c<u.length&&!l;c++)if(o_(n,u[c][0],t.ignoreBoundary)){for(var d=!1,f=1;f<u[c].length&&!d;)o_(n,u[c][f],!t.ignoreBoundary)&&(d=!0),f++;d||(l=!0)}return l}function o_(e,r,t){var n=!1;r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]&&(r=r.slice(0,r.length-1));for(var o=0,i=r.length-1;o<r.length;i=o++){var a=r[o][0],u=r[o][1],l=r[i][0],c=r[i][1],d=e[1]*(a-l)+u*(l-e[0])+c*(e[0]-a)===0&&(a-e[0])*(l-e[0])<=0&&(u-e[1])*(c-e[1])<=0;if(d)return!t;var f=u>e[1]!=c>e[1]&&e[0]<(l-a)*(e[1]-u)/(c-u)+a;f&&(n=!n)}return n}function OX(e,r){return r[0]<=e[0]&&r[1]<=e[1]&&r[2]>=e[0]&&r[3]>=e[1]}p();p();function Wn([e,r],[t,n]){let o=r-n,i=e-t;return(Math.atan2(i,o)+Math.PI*3)%(Math.PI*2)}p();p();function Sb(e,r,t,n){let[o,i]=e,[a,u]=r,[l,c]=t,[d,f]=n;if(i===u&&o===a||c===f&&l===d)return null;let h=(d-l)*(u-i)-(f-c)*(a-o);if(h===0)return null;let g=((f-c)*(o-l)-(d-l)*(i-c))/h,b=((u-i)*(o-l)-(a-o)*(i-c))/h;if(g<0||g>1||b<0||b>1)return null;let I=i+g*(u-i);return[o+g*(a-o),I]}p();function uI(e,r,t,n){let o=Cc(e,t/1e3,n),i=Cc(r,t/1e3,n);return[o.geometry.coordinates,i.geometry.coordinates]}p();function lI(e){let r=e*(180/Math.PI);return r=r%360,r>180?r-=360:r<-180&&(r+=360),Object.is(r,-0)?0:r}var i_=111e3;function Ia(e,r,t=[],n=0){let o=!0,i=e.geometry.coordinates,a=r.geometry.coordinates,u=lI(Wn(i,a)-Math.PI/2),l=lI(Wn(i,a)+Math.PI/2),c=n/i_,d=n/(i_*Math.cos(i[1]*Math.PI/180)),f=Math.min(i[1],a[1])-c,h=Math.max(i[1],a[1])+c,g=Math.min(i[0],a[0])-d,b=Math.max(i[0],a[0])+d;for(let I of t)if(!(Math.max(I[0][1],I[1][1])<f||Math.min(I[0][1],I[1][1])>h||Math.max(I[0][0],I[1][0])<g||Math.min(I[0][0],I[1][0])>b)){if(n>0){let v=uI(i,a,n,u),E=uI(i,a,n,l);if(Sb(v[0],v[1],I[0],I[1])||Sb(E[0],E[1],I[0],I[1]))return o=!1,!1}else if(Sb(i,a,I[0],I[1]))return o=!1,!1}return o}p();function a_(e,r=.5){let[t,n]=e,o=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,l=-(n.y-t.y),c=a,d=Math.sqrt(l*l+c*c),f=l/d,h=c/d,g={x:o+f*r,y:i+h*r},b={x:o-f*r,y:i-h*r};return[g,b]}var Hh=.4,qc,Xn,cI,s_,u_,l_,c_,d_,p_,Db,Cb=class{constructor({nodes:r,groupBy:t,multiplicativeDistanceWeightScaling:n}){M(this,Xn);m(this,"edges",{});m(this,"nodesById");m(this,"nodesByGroup",new Map);M(this,qc);m(this,"hasLineOfSight",(r,t,n=[],o=Hh)=>Ia({type:"Feature",properties:{id:"origin",neighbors:[]},geometry:{type:"Point",coordinates:r}},{type:"Feature",properties:{id:"destination",neighbors:[]},geometry:{type:"Point",coordinates:t}},n,o)===!0);M(this,Db,(r,t)=>{let n=0;for(let o of t)(!o[s(this,qc)]||o[s(this,qc)]===r.properties[s(this,qc)])&&Iu(r.geometry.coordinates,o.geometry.geometry)&&(n+=Math.max(0,o.cost));return n});k(this,qc,t);let{features:o}=r;this.nodesById=he(this,Xn,s_).call(this,o),he(this,Xn,u_).call(this),he(this,Xn,l_).call(this,o,t,{multiplicativeDistanceWeightScaling:n})}getShortestEuclideanDistance(r,t){return t.reduce((n,o)=>{let i=X6(r.geometry.coordinates,o.geometry.coordinates);return Math.min(n,i)},Number.MAX_VALUE)}dijkstraFindWithinTravelDistance(r,t,n,o,i,a){var g;let u=this.nodesById[r];if(!u)return[];let l=[],c={},d={},f=new Set,h=[];for(l.push({node:u,distance:0}),c[u.properties.id]=null,d[u.properties.id]=0;l.length>0;){l.sort((E,T)=>E.distance-T.distance);let b=l.shift();if(!b)break;let I=b.node,v=b.distance;if(!f.has(I.properties.id)){if(f.add(I.properties.id),h.length>=a)break;I.properties.id!=null&&n.includes((g=I.properties.id)==null?void 0:g.toString())&&(i?this.hasLineOfSight(u.geometry.coordinates,I.geometry.coordinates,o)&&h.push({feature:I,distance:v}):h.push({feature:I,distance:v}));for(let E of this.edges[I.properties.id]){let T=E.destination,D=v+E.distance,w=d[I.properties.id]+E.weight;D>t||f.has(T.properties.id)||d[T.properties.id]!==void 0&&w>=d[T.properties.id]||(d[T.properties.id]=w,c[T.properties.id]=E,l.push({node:T,distance:D}))}}}return h.sort((b,I)=>b.distance-I.distance)}aStar({originIds:r,destinationNodeIds:t,disabledConnectionNodeIds:n,zones:o,overrideEdgeWeights:i,disabledNodeIds:a}){var h;let u=he(this,Xn,cI).call(this,r),l=he(this,Xn,cI).call(this,t);if(u.length===0||l.length===0)return[];let{frontier:c,cameFrom:d,costSoFar:f}=he(this,Xn,c_).call(this,u,l);for(;c.length>0;){let g=c.shift();if(!g)break;if(he(this,Xn,d_).call(this,g.origin,l))return he(this,Xn,p_).call(this,d,g.origin.properties.id);for(let b of this.edges[g.origin.properties.id]){let I=(h=i==null?void 0:i.get(b))!=null?h:b.weight,v=b.destination.properties.map!==b.origin.properties.map,E=n==null?void 0:n.has(b.destination.properties.id);if(n!=null&&n.has(b.origin.properties.id)&&(v||E)||a!=null&&a.has(b.origin.properties.id))continue;let T=f[g.origin.properties.id]+I+s(this,Db).call(this,b.destination,o);if(T!==1/0&&(f[b.destination.properties.id]==null||T<f[b.destination.properties.id])){let D=T+this.getShortestEuclideanDistance(b.destination,l);f[b.destination.properties.id]=T,d[b.destination.properties.id]=b,c.push({origin:b.destination,priority:D})}}c.sort((b,I)=>b.priority-I.priority)}return[]}};qc=new WeakMap,Xn=new WeakSet,cI=function(r){return r.map(t=>this.nodesById[t]).filter(Boolean)},s_=function(r){return r.reduce((t,n)=>(t[n.properties.id]=n,t),{})},u_=function(){for(let r in this.nodesById)this.nodesById.hasOwnProperty(r)&&(this.nodesById[r].properties.neighbors=this.nodesById[r].properties.neighbors.filter(({id:t})=>!!this.nodesById[t]))},l_=function(r,t,n){r.forEach(o=>{let i=t==="default"?t:o.properties[t];this.nodesByGroup.has(i)||this.nodesByGroup.set(i,[]),this.nodesByGroup.get(i).push(o),this.edges[o.properties.id]=o.properties.neighbors.map(({id:a,weight:u})=>{let l=this.nodesById[a],c=Er(o.geometry.coordinates,l.geometry.coordinates),d=Wn(o.geometry.coordinates,l.geometry.coordinates);return new Io({origin:o,destination:l,pathWeight:u,distance:c,angle:d,multiplicativeDistanceWeightScaling:n==null?void 0:n.multiplicativeDistanceWeightScaling})})})},c_=function(r,t){let n=[],o={},i={};return r.forEach(a=>{let u=this.getShortestEuclideanDistance(a,t);n.push({origin:a,priority:u}),o[a.properties.id]=null,i[a.properties.id]=0}),n.sort((a,u)=>a.priority-u.priority),{frontier:n,cameFrom:o,costSoFar:i}},d_=function(r,t){return t.some(n=>n.properties.id===r.properties.id)},p_=function(r,t){let n=[],o=r[t];for(;o;)n.push(o),o=r[o.origin.properties.id];return n.reverse()},Db=new WeakMap;p();function FX(e,r,t,n){let o=t[e].origin,i=r===t.length?n:t[r].origin;return Er(o.geometry.coordinates,i.geometry.coordinates)}function f_(e,r,t,n=Hh){if(e.length<3)return e;let o=1e-4,i=e.length,a=new Set;for(let g=0;g<i;g++)e[g].origin.properties.preventSmoothing&&a.add(g);let u=e[i-1].destination,l=new Array(i+1).fill(null).map(()=>({cost:1/0,prev:-1}));l[0]={cost:0,prev:-1};for(let g=0;g<i;g++){let b=!0;if(l[g].cost!==1/0){for(let I=g+1;I<=i;I++){let v=I===i?u:e[I].origin;if(Er(e[g].origin.geometry.coordinates,v.geometry.coordinates)<.01)continue;let T=I===g+1&&I<i&&a.has(I),D=I===g+1&&a.has(g);if(!T&&!D&&!Ia(e[g].origin,v,r,n))continue;if(I>g+1){let P=!1,R=[g];for(let $=g+1;$<I;$++)if(a.has($)){P=!0,R.push($);break}if(P)continue}let w=FX(g,I,e,u),X=(I-g-1)*o,L=l[g].cost+w-X;L<l[I].cost&&(l[I]={cost:L,prev:g},b=!1)}b&&l[g+1].cost===1/0&&(l[g+1].cost=l[g].cost,l[g+1].prev=g)}}let c=[],d=[],f=i;for(;f!==-1;)c.unshift(f),f=l[f].prev===-1?f-1:l[f].prev,d.push(f);let h=[];for(let g=0;g<c.length-1;g++){let b=c[g],I=c[g+1],v=e[b].origin,E=I===i?u:e[I].origin;h.push(new Io({origin:v,destination:E,distance:Er(v.geometry.coordinates,E.geometry.coordinates),angle:Wn(v.geometry.coordinates,E.geometry.coordinates),multiplicativeDistanceWeightScaling:t}))}return h}p();var g_=Kl(dI());p();var m_=y6("Navigator");function wb(e,r,t){if(e==null||e[r]==null)return!1;let n=1<<t;return(e[r]&n)!==0}p();var kX=.5;function h_(e,r,t,n,o,i){var b,I;if(!((I=(b=e==null?void 0:e.geoJSON)==null?void 0:b.geometry)!=null&&I.coordinates))return null;let[a,u]=a_(n,kX),l=a,c=u;if(o){let v=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2));Math.sqrt(Math.pow(u.x-o.x,2)+Math.pow(u.y-o.y,2))<v&&(l=u,c=a)}let d=i(l.x,l.y),f=i(c.x,c.y),h={type:"Feature",geometry:{type:"Point",coordinates:[d.lon,d.lat]},properties:{id:"".concat(r,"_buffer_entry"),map:t,neighbors:[],preventSmoothing:!0}},g={type:"Feature",geometry:{type:"Point",coordinates:[f.lon,f.lat]},properties:{id:"".concat(r,"_buffer_exit"),map:t,neighbors:[],preventSmoothing:!0}};return{entryNode:h,exitNode:g,entryMeters:l,exitMeters:c}}function y_(e,r,t,n){var L;let o=[e[0].origin];for(let P=0;P<e.length;P++)o.push(e[P].destination);let i=new Map,a=new Map;for(let P=0;P<o.length;P++)i.set(o[P].properties.id,o[P]),a.set(P,o[P]);let u=o[0].geometry.coordinates[1],{toCartesian:l,toGeographic:c}=Bd(u),d=o.map((P,R)=>{let $={x:0,y:0,nodeId:P.properties.id,originalIndex:R};return l(P.geometry.coordinates,$),$}),f=new Set,h=new Map;for(let P=0;P<o.length;P++){let R=r(o[P].properties.id);R&&(f.add(P),h.set(P,R))}if(e.length<3&&f.size===0)return e;let g=e.length>=3?(0,g_.default)(d,.7,!1):d,b=new Set;for(let P=0;P<g.length;P++)b.add(g[P].originalIndex);let I=[];for(let P of f)b.has(P)||I.push(P);let v=g.slice(),E=.25;for(let P of I){let R=a.get(P);if(!R)continue;let $=-1;for(let V=0;V<v.length-1;V++)if(v[V].originalIndex<P&&v[V+1].originalIndex>P){$=V+1;break}if($!==-1){let V={x:0,y:0,nodeId:R.properties.id,originalIndex:P};l(R.geometry.coordinates,V);let H=js(V,v[$-1]),re=js(V,v[$]);H<E?v[$-1]=V:re<E?v[$]=V:v.splice($,0,V)}}let T=[],D={x:0,y:0},w={x:0,y:0},B=new Map;for(let P=0;P<v.length;P++)B.set(v[P].originalIndex,P);for(let P of f){let R=a.get(P);if(!R)continue;let $=h.get(P);if(!$)continue;let V=(L=B.get(P))!=null?L:-1;if(V!==-1){let H;V>0&&(H={x:v[V-1].x,y:v[V-1].y});let re=$.geoJSON.geometry.coordinates;l(re[0],D),l(re[1],w);let j=[D,w],me=R.properties.id,z=R.properties.map||"test-floor",ue=h_($,me,z,j,H,c);if(ue){let se={x:ue.entryMeters.x,y:ue.entryMeters.y,nodeId:ue.entryNode.properties.id,originalIndex:P-.5},pe={x:ue.exitMeters.x,y:ue.exitMeters.y,nodeId:ue.exitNode.properties.id,originalIndex:P+.5};i.set(ue.entryNode.properties.id,ue.entryNode),i.set(ue.exitNode.properties.id,ue.exitNode),T.push(se,pe)}}}if(v.push(...T),v.sort((P,R)=>P.originalIndex-R.originalIndex),n&&v.length>=3)for(let P=0;P<v.length-1;P++){let R=v[P];if(R.nodeId.endsWith("_buffer_exit")){let $=v[v.length-1];if(P<v.length-2){let V=!1;for(let H=P+1;H<v.length-1;H++)if(v[H].nodeId.endsWith("_buffer_entry")||v[H].nodeId.endsWith("_buffer_exit")){V=!0;break}if(!V){let H=i.get(R.nodeId),re=i.get($.nodeId);if(H&&re&&Ia(H,re,n,.1)){let j=v.length-P-2;v.splice(P+1,j)}}}}}if(n&&v.length>=3){let P=v[0],R=-1;for(let $=1;$<v.length;$++)if(v[$].nodeId.endsWith("_buffer_entry")){R=$;break}if(R>1){let $=!1;for(let V=1;V<R;V++)if(v[V].nodeId.endsWith("_buffer_entry")||v[V].nodeId.endsWith("_buffer_exit")){$=!0;break}if(!$){let V=v[R],H=i.get(P.nodeId),re=i.get(V.nodeId);if(H&&re&&Ia(H,re,n,.1)){let j=R-1;v.splice(1,j)}}}}let X=[];for(let P=0;P<v.length-1;P++){let R=v[P],$=v[P+1],V=i.get(R.nodeId),H=i.get($.nodeId);V&&H?X.push(new Io({origin:V,destination:H,distance:Er(V.geometry.coordinates,H.geometry.coordinates),angle:Wn(V.geometry.coordinates,H.geometry.coordinates),multiplicativeDistanceWeightScaling:t})):m_.warn("Origin or destination node not found for point ".concat(R.nodeId," or ").concat($.nodeId))}return X}function Sa(e,r){return new Io({origin:e,destination:r,distance:Er(e.geometry.coordinates,r.geometry.coordinates),angle:Wn(e.geometry.coordinates,r.geometry.coordinates)})}function b_(e,r,t,n=!0){if(e.length<3)return e;let o=new Set;for(let u=0;u<e.length;u++)if(e[u].origin.properties.preventSmoothing){if(o.add(u),n){for(let l=u-1;l>=0;l--)if(!e[l].origin.properties.preventSmoothing){o.add(l);break}}if(n){for(let l=u+1;l<e.length;l++)if(!e[l].origin.properties.preventSmoothing){o.add(l);break}}}if(e.length>0&&e[e.length-1].destination.properties.preventSmoothing&&(o.add(e.length-1),n)){for(let u=e.length-2;u>=0;u--)if(!e[u].origin.properties.preventSmoothing){o.add(u);break}}let i=[],a=0;for(let u=1;u<e.length;u++){let l=u===e.length-1,c=o.has(u),d=l?.05:.7,f=Ia(e[a].origin,e[u].origin,r,d),h=e[u].origin.properties.preventSmoothing,g=u-1;if(c){a!==u&&(f?(i.push(Sa(e[a].origin,e[u].origin)),a=u):(a!==g&&(i.push(Sa(e[a].origin,e[g].origin)),a=g),a!==u&&(i.push(Sa(e[a].origin,e[u].origin)),a=u))),l&&e[u].destination.properties.preventSmoothing&&i.push(Sa(e[u].origin,e[u].destination));continue}if(h)f?(i.push(Sa(e[a].origin,e[u].origin)),a=u):a!==g&&(i.push(Sa(e[a].origin,e[g].origin)),a=g),i.push(Sa(e[a].origin,e[u].origin)),a=u;else if(f)l&&(Ia(e[a].origin,e[u].destination,r,.7)?i.push(Sa(e[a].origin,e[u].destination)):(i.push(Sa(e[a].origin,e[u].origin)),i.push(Sa(e[u].origin,e[u].destination))),a=u);else{if(a===g)continue;i.push(Sa(e[a].origin,e[g].origin)),a=g}}if(!1){let u=i[i.length-1];window.__DEBUG_PATH.finalSteps.push({nodeId:u.destination.properties.id,coordinate:u.destination.geometry.coordinates,floorId:u.destination.properties.map})}return i}p();function v_(e,r,t=.2,n={},o){var u,l,c,d;if(e.length<3)return e;let i=[e[0]],a=1;for(let f=a+2;f<e.length;f++)if("outdoors"in n&&wb((d=(c=(l=(u=e[a])==null?void 0:u.origin)==null?void 0:l.properties)==null?void 0:c.flags)!=null?d:[],n.outdoors.index,n.outdoors.bit)||e[a].origin.properties.preventSmoothing||!Ia(e[a].origin,e[f].origin,r,t)){let h=f-1;i.push(new Io(ne(_({},e[a]),{destination:e[h].origin,distance:Er(e[a].origin.geometry.coordinates,e[h].origin.geometry.coordinates),angle:Wn(e[a].origin.geometry.coordinates,e[h].origin.geometry.coordinates)}))),a=h}return i.push(new Io(ne(_({},e[a]),{destination:e[e.length-1].origin,distance:Er(e[a].origin.geometry.coordinates,e[e.length-1].origin.geometry.coordinates),angle:Wn(e[a].origin.geometry.coordinates,e[e.length-1].origin.geometry.coordinates),multiplicativeDistanceWeightScaling:o})),e[e.length-1]),i}p();var x_=Kl(dI());function E_(e,r){let t=new Set;if(e.length<2)return t;let n=[e[0].origin];for(let b=0;b<e.length;b++)n.push(e[b].destination);let o=n[0].geometry.coordinates[1],{toCartesian:i}=Bd(o),a=r;if(!a)return t;let u=n.map((b,I)=>{let v={x:0,y:0,nodeId:b.properties.id,originalIndex:I};return i(b.geometry.coordinates,v),v}),l=new Set,c=new Set;for(let b=0;b<u.length;b++)a(u[b].nodeId)&&(l.add(b),c.add(u[b].nodeId));if(l.size===0)return t;let d=u.length>=3?(0,x_.default)(u,.7,!1):u,f=new Map;for(let b=0;b<d.length;b++)f.set(d[b].originalIndex,b);let h=new Set;for(let b of l){let I=f.get(b);if(I!==void 0){if(I>0){let v=d[I-1].nodeId;h.add(v)}if(I<d.length-1){let v=d[I+1].nodeId;h.add(v)}}else{let v,E;for(let T=0;T<d.length-1;T++){let D=d[T].originalIndex,w=d[T+1].originalIndex;if(D<b&&b<w){v=d[T].nodeId,E=d[T+1].nodeId;break}}v&&h.add(v),E&&h.add(E)}}let g=0;for(let b of e)h.has(b.origin.properties.id)&&(b.origin.properties.preventSmoothing||(b.origin.properties.preventSmoothing=!0,t.add(b.origin.properties.id))),h.has(b.destination.properties.id)&&(b.destination.properties.preventSmoothing||(b.destination.properties.preventSmoothing=!0,t.add(b.destination.properties.id))),g++;return t}var Mf=class{constructor({nodes:r,geojsonCollection:t,groupBy:n="default",multiplicativeDistanceWeightScaling:o,flagDeclarations:i,getDoorByNodeId:a}){m(this,"groupBy");m(this,"graph");m(this,"geometryEdgesByMapId",new Map);m(this,"flagDeclarations",{});m(this,"getDoorByNodeId");m(this,"disabledNodeIds");m(this,"generatePath",r=>{let{destination:t}=r[r.length-1],n={type:"FeatureCollection",features:[]};for(let i=0;i<r.length;i++){let{origin:a,destination:u}=r[i],l={id:a.properties.id,angle:r[i].angle,distance:r[i].distance,destination:u.properties.id,edges:this.graph.edges[a.properties.id]};this.groupBy!=="default"&&(l.groupBy=a.properties[this.groupBy]),n.features.push({type:"Feature",geometry:{type:"Point",coordinates:[a.geometry.coordinates[0],a.geometry.coordinates[1]]},properties:l})}let o={id:t.properties.id,edges:this.graph.edges[t.properties.id]};return this.groupBy!=="default"&&(o.groupBy=t.properties[this.groupBy]),n.features.push({type:"Feature",geometry:{type:"Point",coordinates:[t.geometry.coordinates[0],t.geometry.coordinates[1]]},properties:o}),n});m(this,"findNearestNodesOnGraph",(r,t,n,o,i=!1,a=1/0)=>{var u;return this.graph.dijkstraFindWithinTravelDistance(r,t,o,(u=this.geometryEdgesByMapId.get(n))!=null?u:[],i,a)});m(this,"hasLineOfSight",(r,t,n,o)=>this.graph.hasLineOfSight(r,t,this.geometryEdgesByMapId.get(n),o));m(this,"getDistance",(r,t)=>Er(r,t));m(this,"getAngle",(r,t)=>Wn(r,t));this.groupBy=n,this.graph=new Cb({nodes:r,groupBy:this.groupBy,multiplicativeDistanceWeightScaling:o});let u=(t==null?void 0:t.features)||[];this.flagDeclarations=i!=null?i:{},this.getDoorByNodeId=a,this.disabledNodeIds=this.getDisabledNodeIds(),u.forEach(l=>{let c=null;if(l.geometry.type==="LineString"?c=l.geometry.coordinates:l.geometry.type==="Polygon"&&(c=l.geometry.coordinates.flat()),c){let d=this.groupBy==="default"?this.groupBy:l.properties[this.groupBy];this.geometryEdgesByMapId.has(d)||this.geometryEdgesByMapId.set(d,[]),c.forEach((f,h)=>{this.geometryEdgesByMapId.get(d).push([f,c[h+1]||c[0]])})}})}getDisabledNodeIds(){let r=new Set;if(py.public in this.flagDeclarations)for(let t in this.graph.nodesById)wb(this.graph.nodesById[t].properties.flags,this.flagDeclarations[py.public].index,this.flagDeclarations[py.public].bit)||r.add(t);return r}getDirections({zones:r,originIds:t,from:n,to:o,destinationNodeIds:i,disabledConnectionNodeIds:a,simplify:u,multiplicativeDistanceWeightScaling:l,overrideEdgeWeights:c}){var g;let d=(g=u==null?void 0:u.enabled)!=null?g:!0,f=r!=null?r:[],h=this.graph.aStar({originIds:t,destinationNodeIds:i,zones:f,disabledConnectionNodeIds:new Set(a),overrideEdgeWeights:c,disabledNodeIds:this.disabledNodeIds});if(h.length===0)return{type:"FeatureCollection",features:[]};if((u==null?void 0:u.__EXPERIMENTAL_METHOD)!=="greedy-los"&&n&&o&&n.length>0&&o.length>0){let b=new Io({origin:n[0],destination:h[0].origin,distance:Er(n[0].geometry.coordinates,h[0].origin.geometry.coordinates),angle:Wn(n[0].geometry.coordinates,h[0].origin.geometry.coordinates),multiplicativeDistanceWeightScaling:l}),I=h.slice(),v=new Io({origin:h[h.length-1].destination,destination:o[0],distance:Er(h[h.length-1].destination.geometry.coordinates,o[0].geometry.coordinates),angle:Wn(h[h.length-1].destination.geometry.coordinates,o[0].geometry.coordinates),multiplicativeDistanceWeightScaling:l});I.unshift(b),I.push(v),h=I}return d&&(h=this.simplifyAllSteps(h,u,l)),this.generatePath(h)}simplifyAllSteps(r,t={enabled:!0,__EXPERIMENTAL_METHOD:"greedy-los"},n){var h,g,b,I;let o=[],i=[r[0]],a=(h=t.__EXPERIMENTAL_METHOD)!=null?h:"greedy-los",u=(g=t.radius)!=null?g:Hh,l=a==="dp-optimal"?this.simplifyStepsWithDPMethod.bind(this):a==="rdp"?this.simplifyStepsImprovedWithSimplifyBeforeLoSChecks.bind(this):this.simplifySteps.bind(this);for(let v=1;v<r.length;v++)if(this.groupBy!=="default"&&r[v].origin.properties[this.groupBy]!==r[v-1].origin.properties[this.groupBy]){let E=r[v-1].origin.properties[this.groupBy],T=(b=this.geometryEdgesByMapId.get(E))!=null?b:[];o.push(...l(i,T,u,n,t)),i=[r[v]]}else i.push(r[v]);let c=r[r.length-1],d=this.groupBy==="default"?this.groupBy:c.origin.properties[this.groupBy],f=(I=this.geometryEdgesByMapId.get(d))!=null?I:[];return o.push(...l(i,f,u,n,t)),o}simplifySteps(r,t,n,o,i){return v_(r,t,n,this.flagDeclarations,o)}simplifyStepsImprovedWithSimplifyBeforeLoSChecks(r,t,n,o,i){var l;if(r.length<3)return r;!1,r=y_(r,this.getDoorByNodeId,o,t);let a=(i==null?void 0:i.__EXPERIMENTAL_METHOD)==="rdp"&&(l=i.mustIncludeDoorBufferNodes)!=null?l:!0;return b_(r,t,o,a)}simplifyStepsWithDPMethod(r,t,n,o,i){var c;if(r.length<3)return r;let a=new Set;((i==null?void 0:i.__EXPERIMENTAL_METHOD)==="dp-optimal"&&(c=i.includeDoorBufferNodes)!=null?c:!1)&&(a=E_(r,this.getDoorByNodeId)),!1;let l=f_(r,t,o,n);if(!1){let d=l[l.length-1];window.__DEBUG_PATH.finalSteps.push({nodeId:d.destination.properties.id,coordinate:d.destination.geometry.coordinates,floorId:d.destination.properties.map})}for(let d of r)a.has(d.origin.properties.id)&&delete d.origin.properties.preventSmoothing,a.has(d.destination.properties.id)&&delete d.destination.properties.preventSmoothing;return l}};p();var BX={lineOfSight:!0,mode:"absolute-distance",maxResults:1};function I_(e){return ne(_({},BX),{lineOfSight:!e})}var cr=new WeakMap;function Mb(e,r,t){var a;let n=I_(t),o=r.Query.__LEGACY_NEAREST_SYNC(e,r.getByType("node"),n),i=(a=o==null?void 0:o[0])==null?void 0:a.feature.id;return i?[i]:[]}async function Ab(e,r,t){var a;let n=I_(t),o=await r.Query.nearest(e,r.getByType("node"),n),i=(a=o==null?void 0:o[0])==null?void 0:a.feature.id;return i?[i]:[]}function LX(e,r,t){let n=[];for(let o of e.navigationTarget){let i=Af(o,r,t);n.push(...i)}return n}async function RX(e,r,t){let n=[];for(let o of e.navigationTarget){let i=await Ml(o,r,t);n.push(...i)}return n}function S_(e,r){let t=r==null?void 0:r.getMVFFeatureById("entrance",e.id),n=t==null?void 0:t.properties.node;return n?[n]:[]}function C_(e,r){var n;let t=r==null?void 0:r.getMVFFeatureById("area",e.id);return(n=t==null?void 0:t.properties.destinationNodes)!=null?n:[]}function D_(e,r){var o,i;let t=r==null?void 0:r.getMVFFeatureById("space",e.id);if(t==null)return[];let n=(o=r.entranceNodeIdsBySpaceId)==null?void 0:o[e.id];return n&&n.length>0?n:(i=t.properties.destinationNodes)!=null?i:[]}function NX(e,r,t){let n=[];for(let o of e.coordinates){let i=Mb(o,r,t);i.length>0&&n.push(i[0])}return n}async function jX(e,r,t){let n=[];for(let o of e.coordinates){let i=await Ab(o,r,t);i.length>0&&n.push(i[0])}return n}function T_(e,r){var t;return(t=r==null?void 0:r.objectEntranceNodeIdsByObstructionId[e.id])!=null?t:[]}function w_(e,r){return e.spaces.flatMap(t=>{var n,o;return(o=(n=r==null?void 0:r.getMVFFeatureById("space",t.id))==null?void 0:n.properties.destinationNodes)!=null?o:[]}).filter(t=>typeof t=="string")}function M_(e){return e.nodes.map(r=>r.id)}function Af(e,r,t){if(cr.has(e))return cr.get(e);if(vu.is(e)){let n=LX(e,r,t);return cr.set(e,n),n}else if(mi.is(e)){let n=Mb(e,r,t);return cr.set(e,n),n}else if(je.is(e)){let n=Mb(e,r,t);return cr.set(e,n),n}else{if(vo.is(e))return Mb(e,r,t);if($n.is(e)){let n=S_(e,r);return cr.set(e,n),n}else if($o.is(e)){let n=C_(e,r);return cr.set(e,n),n}else if(Fr.is(e)){let n=D_(e,r);return cr.set(e,n),n}else if(Zn.is(e)){let n=NX(e,r,t);return cr.set(e,n),n}else if(uo.is(e)){let n=T_(e,r);return cr.set(e,n),n}else if(qr.is(e)){let n=w_(e,r);return cr.set(e,n),n}else if(Vi.is(e)){let n=M_(e);return cr.set(e,n),n}else if(Vo.is(e)){let n=[e.id];return cr.set(e,n),n}else return[]}}async function Ml(e,r,t){if(cr.has(e))return cr.get(e);if(vu.is(e)){let n=await RX(e,r,t);return cr.set(e,n),n}else if(mi.is(e)){let n=await Ab(e,r,t);return cr.set(e,n),n}else if(je.is(e)){let n=await Ab(e,r,t);return cr.set(e,n),n}else if(vo.is(e)){let n=await Ab(e,r,t);return cr.set(e,n),n}else if($n.is(e)){let n=S_(e,r);return cr.set(e,n),n}else if($o.is(e)){let n=C_(e,r);return cr.set(e,n),n}else if(Fr.is(e)){let n=D_(e,r);return cr.set(e,n),n}else if(Zn.is(e)){let n=await jX(e,r,t);return cr.set(e,n),n}else if(uo.is(e)){let n=T_(e,r);return cr.set(e,n),n}else{if(qr.is(e))return w_(e,r);if(Vi.is(e)){let n=M_(e);return cr.set(e,n),n}else if(Vo.is(e)){let n=[e.id];return cr.set(e,n),n}else return[]}}function A_(e,r,t){var i,a;let n=(i=e.features[0])==null?void 0:i.properties.id,o=r[0];if(r.length>1){for(let u of r)if(((a=t.get(u))!=null?a:[]).includes(n)){o=u;break}}return o}function P_(e,r,t){var i,a;let n=(i=e.features[e.features.length-1])==null?void 0:i.properties.id,o=r[0];if(r.length>1){for(let u of r)if(((a=t.get(u))!=null?a:[]).includes(n)){o=u;break}}return o}var Wh,Pb,Pf=class{constructor({nodes:r,geojsonCollection:t,connections:n,groupBy:o,multiplicativeDistanceWeightScaling:i,flagDeclarations:a,getDoorByNodeId:u}){m(this,"navigator");m(this,"connections");m(this,"getDirections",async(r,t,n,o)=>{let i=new Map,a=new Map;for(let d of r)i.set(d,await Ml(d,o,o.enterpriseMode));for(let d of t)a.set(d,await Ml(d,o,o.enterpriseMode));let{originIds:u,destinationNodeIds:l,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,Wh).call(this,r,t,u,l,n,o,c)});m(this,"getDirectionsSync",(r,t,n,o)=>{let i=new Map(r.map(d=>[d,Af(d,o,o.enterpriseMode)])),a=new Map(t.map(d=>[d,Af(d,o,o.enterpriseMode)])),{originIds:u,destinationNodeIds:l,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,Wh).call(this,r,t,u,l,n,o,c)});M(this,Wh,(r,t,n,o,i,a,u)=>{var E;let l=this.getDisabledConnectionNodeIds(i.accessible).filter(T=>!n.includes(T)&&!o.includes(T)),c=new Map,d=_({},i.connectionIdWeightMap);for(let T of i.excludedConnections)d[T.id]=1/0;for(let T in d){let D=a.getById("connection",T);D&&s(this,Pb).call(this,D,d[T],c)}let h=((E=i.smoothing.__EXPERIMENTAL_METHOD)!=null?E:"greedy-los")!=="greedy-los",g=this.navigator.getDirections({zones:i.zones.map(T=>{var D;return{geometry:T.geometry,cost:T.cost,map:(D=T.floor)==null?void 0:D.id}}),originIds:n,from:h?__(r):[],to:h?__(t):[],destinationNodeIds:o,disabledConnectionNodeIds:l,simplify:i.smoothing,overrideEdgeWeights:c,multiplicativeDistanceWeightScaling:!a.enterpriseMode});this.addCoordinateDirections(g,r,t);let b=A_(g,r,u),I=P_(g,t,u),v=new wl(g,a,b,I);if(!(v.distance===0&&new Set([...n,...o]).size===n.length+o.length))return v});m(this,"getDisabledConnectionNodeIds",r=>r===!1?[]:this.connections.reduce((t,n)=>n.accessible?t:t.concat(n.nodes),[]));M(this,Pb,(r,t,n)=>{if(r.nodes.length<2)return;let o=new Set(r.nodes.map(i=>i.id));for(let i of r.nodes){let a=this.navigator.graph.edges[i.id];if(a)for(let u of a)o.has(u.destination.properties.id)&&n.set(u,t)}});m(this,"addCoordinateDirections",(r,[t],[n])=>{if(r.features.length){if(je.is(t)){let o=this.createDirectionFeature(t,this.navigator.getAngle([t.longitude,t.latitude],r.features[0].geometry.coordinates),this.navigator.getDistance([t.longitude,t.latitude],r.features[0].geometry.coordinates));r.features.splice(0,0,o)}if(je.is(n)){let o=this.createDirectionFeature(n,0,0),i=r.features[r.features.length-1];i.properties.distance=this.navigator.getDistance(i.geometry.coordinates,[n.longitude,n.latitude]),i.properties.angle=this.navigator.getAngle(i.geometry.coordinates,[n.longitude,n.latitude]),r.features.push(o)}}});m(this,"createDirectionFeature",(r,t,n)=>({type:"Feature",geometry:{type:"Point",coordinates:[r.longitude,r.latitude]},properties:{groupBy:r.floorId,id:r.id,angle:t,distance:n,edges:[]}}));this.navigator=new Mf({nodes:r,geojsonCollection:this.createCollection(t),groupBy:o,multiplicativeDistanceWeightScaling:i,flagDeclarations:a,getDoorByNodeId:u}),this.connections=n}processTargets(r,t,n){let o=[],i=[],a=new Map,u=new Set,l=new Set;for(let[c,d]of r){let f=a.get(c);f||(f=[],a.set(c,f)),Fr.is(c)&&u.add(c.id);for(let h of d)f.push(h),o.push(h)}for(let[c,d]of t){let f=a.get(c);f||(f=[],a.set(c,f)),Fr.is(c)&&l.add(c.id);for(let h of d)f.push(h),i.push(h)}if(u.size===0&&l.size===0)return{originIds:o,destinationNodeIds:i,featureToNodeIdsMap:a};for(let c of o){let d=n.spaceIdsByNodeId[c]||[];for(let f of d)if(l.has(f)){i.push(c);break}}for(let c of i){let d=n.spaceIdsByNodeId[c]||[];for(let f of d)if(u.has(f)){o.push(c);break}}return{originIds:o,destinationNodeIds:i,featureToNodeIdsMap:a}}createCollection(r){return{type:"FeatureCollection",features:Object.entries(r).reduce((t,[n,o])=>t.concat(o.features.map(i=>(i.properties.map=n,i))),[])}}};Wh=new WeakMap,Pb=new WeakMap;function UX(e){if(je.is(e))return e.floorId;if(Fr.is(e)||$n.is(e)||vo.is(e)||mi.is(e)||uo.is(e)||$o.is(e)||Vo.is(e))return e.floor.id;if((Zn.is(e)||Vi.is(e))&&e.coordinates.length>0)return e.coordinates[0].floorId;if(qr.is(e)&&e.spaces.length>0)return e.spaces[0].floor.id}function __(e){return e.reduce((r,t)=>{let n=Il(t);if(!n)return r;let o=UX(t);return r.push({type:"Feature",geometry:{type:"Point",coordinates:[n.longitude,n.latitude]},properties:{id:t.id,neighbors:[],map:o}}),r},[])}p();p();p();p();p();p();function O_(e){let r=+this._x.call(null,e),t=+this._y.call(null,e);return F_(this.cover(r,t),r,t,e)}function F_(e,r,t,n){if(isNaN(r)||isNaN(t))return e;var o,i=e._root,a={data:n},u=e._x0,l=e._y0,c=e._x1,d=e._y1,f,h,g,b,I,v,E,T;if(!i)return e._root=a,e;for(;i.length;)if((I=r>=(f=(u+c)/2))?u=f:c=f,(v=t>=(h=(l+d)/2))?l=h:d=h,o=i,!(i=i[E=v<<1|I]))return o[E]=a,e;if(g=+e._x.call(null,i.data),b=+e._y.call(null,i.data),r===g&&t===b)return a.next=i,o?o[E]=a:e._root=a,e;do o=o?o[E]=new Array(4):e._root=new Array(4),(I=r>=(f=(u+c)/2))?u=f:c=f,(v=t>=(h=(l+d)/2))?l=h:d=h;while((E=v<<1|I)===(T=(b>=h)<<1|g>=f));return o[T]=i,o[E]=a,e}function k_(e){var r,t,n=e.length,o,i,a=new Array(n),u=new Array(n),l=1/0,c=1/0,d=-1/0,f=-1/0;for(t=0;t<n;++t)isNaN(o=+this._x.call(null,r=e[t]))||isNaN(i=+this._y.call(null,r))||(a[t]=o,u[t]=i,o<l&&(l=o),o>d&&(d=o),i<c&&(c=i),i>f&&(f=i));if(l>d||c>f)return this;for(this.cover(l,c).cover(d,f),t=0;t<n;++t)F_(this,a[t],u[t],e[t]);return this}p();function B_(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var t=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(t))o=(t=Math.floor(e))+1,i=(n=Math.floor(r))+1;else{for(var a=o-t||1,u=this._root,l,c;t>e||e>=o||n>r||r>=i;)switch(c=(r<n)<<1|e<t,l=new Array(4),l[c]=u,u=l,a*=2,c){case 0:o=t+a,i=n+a;break;case 1:t=o-a,i=n+a;break;case 2:o=t+a,n=i-a;break;case 3:t=o-a,n=i-a;break}this._root&&this._root.length&&(this._root=u)}return this._x0=t,this._y0=n,this._x1=o,this._y1=i,this}p();function L_(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}p();function R_(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}p();p();function wn(e,r,t,n,o){this.node=e,this.x0=r,this.y0=t,this.x1=n,this.y1=o}function N_(e,r,t){var n,o=this._x0,i=this._y0,a,u,l,c,d=this._x1,f=this._y1,h=[],g=this._root,b,I;for(g&&h.push(new wn(g,o,i,d,f)),t==null?t=1/0:(o=e-t,i=r-t,d=e+t,f=r+t,t*=t);b=h.pop();)if(!(!(g=b.node)||(a=b.x0)>d||(u=b.y0)>f||(l=b.x1)<o||(c=b.y1)<i))if(g.length){var v=(a+l)/2,E=(u+c)/2;h.push(new wn(g[3],v,E,l,c),new wn(g[2],a,E,v,c),new wn(g[1],v,u,l,E),new wn(g[0],a,u,v,E)),(I=(r>=E)<<1|e>=v)&&(b=h[h.length-1],h[h.length-1]=h[h.length-1-I],h[h.length-1-I]=b)}else{var T=e-+this._x.call(null,g.data),D=r-+this._y.call(null,g.data),w=T*T+D*D;if(w<t){var B=Math.sqrt(t=w);o=e-B,i=r-B,d=e+B,f=r+B,n=g.data}}return n}p();function j_(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var r,t=this._root,n,o,i,a=this._x0,u=this._y0,l=this._x1,c=this._y1,d,f,h,g,b,I,v,E;if(!t)return this;if(t.length)for(;;){if((b=d>=(h=(a+l)/2))?a=h:l=h,(I=f>=(g=(u+c)/2))?u=g:c=g,r=t,!(t=t[v=I<<1|b]))return this;if(!t.length)break;(r[v+1&3]||r[v+2&3]||r[v+3&3])&&(n=r,E=v)}for(;t.data!==e;)if(o=t,!(t=t.next))return this;return(i=t.next)&&delete t.next,o?(i?o.next=i:delete o.next,this):r?(i?r[v]=i:delete r[v],(t=r[0]||r[1]||r[2]||r[3])&&t===(r[3]||r[2]||r[1]||r[0])&&!t.length&&(n?n[E]=t:this._root=t),this):(this._root=i,this)}function U_(e){for(var r=0,t=e.length;r<t;++r)this.remove(e[r]);return this}p();function G_(){return this._root}p();function z_(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}p();function V_(e){var r=[],t,n=this._root,o,i,a,u,l;for(n&&r.push(new wn(n,this._x0,this._y0,this._x1,this._y1));t=r.pop();)if(!e(n=t.node,i=t.x0,a=t.y0,u=t.x1,l=t.y1)&&n.length){var c=(i+u)/2,d=(a+l)/2;(o=n[3])&&r.push(new wn(o,c,d,u,l)),(o=n[2])&&r.push(new wn(o,i,d,c,l)),(o=n[1])&&r.push(new wn(o,c,a,u,d)),(o=n[0])&&r.push(new wn(o,i,a,c,d))}return this}p();function $_(e){var r=[],t=[],n;for(this._root&&r.push(new wn(this._root,this._x0,this._y0,this._x1,this._y1));n=r.pop();){var o=n.node;if(o.length){var i,a=n.x0,u=n.y0,l=n.x1,c=n.y1,d=(a+l)/2,f=(u+c)/2;(i=o[0])&&r.push(new wn(i,a,u,d,f)),(i=o[1])&&r.push(new wn(i,d,u,l,f)),(i=o[2])&&r.push(new wn(i,a,f,d,c)),(i=o[3])&&r.push(new wn(i,d,f,l,c))}t.push(n)}for(;n=t.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}p();function H_(e){return e[0]}function Z_(e){return arguments.length?(this._x=e,this):this._x}p();function W_(e){return e[1]}function X_(e){return arguments.length?(this._y=e,this):this._y}function Xh(e,r,t){var n=new pI(r==null?H_:r,t==null?W_:t,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function pI(e,r,t,n,o,i){this._x=e,this._y=r,this._x0=t,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function q_(e){for(var r={data:e.data},t=r;e=e.next;)t=t.next={data:e.data};return r}var So=Xh.prototype=pI.prototype;So.copy=function(){var e=new pI(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,t,n;if(!r)return e;if(!r.length)return e._root=q_(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(n=r.source[o])&&(n.length?t.push({source:n,target:r.target[o]=new Array(4)}):r.target[o]=q_(n));return e};So.add=O_;So.addAll=k_;So.cover=B_;So.data=L_;So.extent=R_;So.find=N_;So.remove=j_;So.removeAll=U_;So.root=G_;So.size=z_;So.visit=V_;So.visitAfter=$_;So.x=Z_;So.y=X_;p();function fI(e,r,t,n=0,o=0,i=0,a=0){if(t===void 0){t=e.root();let l=e.extent();if(l&&([[n,o],[i,a]]=l,r(t,n,o,i,a)))return!0;if(!t)return!1}let u=[[n,o,(i+n)/2,(a+o)/2],[(i+n)/2,o,i,(a+o)/2],[n,(a+o)/2,(i+n)/2,a],[(i+n)/2,(a+o)/2,i,a]];for(let l=0;l<4;l++){let c=t[l];if(c){let[d,f,h,g]=u[l];r(c,d,f,h,g)||fI(e,r,c,d,f,h,g)}}return!1}var J_=1e3,GX=.1,zX=5,VX=1.5,Ca,qh,Ob,Y_,co,Jc,_b=class{constructor(r,t){M(this,Ob);M(this,Ca,{});M(this,qh,new Map);m(this,"getMaxSearchRadiusForFloorId",(r,t)=>{var i;let n=(i=s(this,qh).get(s(this,co).mapName))==null?void 0:i.get(t);if(n)return n;let o=this.getNodeTreeByTypeAndFloorId(r,s(this,co).mapName,t);if(typeof o.extent=="function")if(o.extent()){let[[a,u],[l,c]]=o.extent(),d=l-a,f=c-u;n=Math.max(d,f)}else n=J_;else n=J_;return s(this,qh).set(s(this,co).mapName,new Map([[t,n]])),n});M(this,co);M(this,Jc);k(this,co,r),k(this,Jc,t)}searchWithIncludedIds(r,t,n,o,i,a,u=!1,l=1/0){let c=this.getNodeTreeByTypeAndFloorId(t,n,o),d=new Set,f=[],h=zX,g=Math.max(a,this.getMaxSearchRadiusForFloorId(t,o));for(;f.length<l&&h<=g;){let b=he(this,Ob,Y_).call(this,r,c,i,h,a,d);b.sort((I,v)=>I.distance-v.distance);for(let I of b){if(f.length>=l)break;u?s(this,co).directions.navigator.hasLineOfSight(r,I.node.geometry.coordinates,o,GX)&&f.push(I):f.push(I)}h=h*VX}return f}getNodeTreeByTypeAndFloorId(r,t,n){var a,u;if(s(this,Ca)[r]||(s(this,Ca)[r]={}),(a=s(this,Ca)[r][t])!=null&&a[n])return s(this,Ca)[r][t][n];s(this,Ca)[r][t]||(s(this,Ca)[r][t]={}),s(this,Ca)[r][t][n]=Xh();let o=s(this,Ca)[r][t][n];o.x(l=>s(this,Jc).call(this,l.geometry.coordinates).x),o.y(l=>s(this,Jc).call(this,l.geometry.coordinates).y);let i=[];switch(r){case"space":i=s(this,co).mvfSpacesByFloorId[n].flatMap(f=>f.properties.destinationNodes).map(f=>{let h=s(this,co).mvfNodesById[f];return h?ne(_({},h),{properties:{id:h.properties.id,parentId:h.properties.space[0]}}):null});break;case"node":i=((u=s(this,co).mvfNodesByFloorId[n])==null?void 0:u.filter(f=>f.properties.neighbors.length>0))||[];break;case"point-of-interest":i=s(this,co).mvfPoisByFloorId[n]||[];break;case"door":i=s(this,co).mvfEntrancesByFloorId[n]||[];break;case"annotation":i=s(this,co).mvfAnnotationsByFloorId[n]||[];break;case"enterprise-location":let c=s(this,co).mvfNodesByFloorId[n]||[],d=s(this,co).locationIdsByNodeId;i=[];for(let f=0;f<c.length;f++){let h=c[f],g=d[h.properties.id];(g==null?void 0:g.length)>0&&i.push(ne(_({},h),{properties:{id:h.properties.id,parentId:g[0]}}))}break}return(i==null?void 0:i.length)>0&&o.addAll(i),o}};Ca=new WeakMap,qh=new WeakMap,Ob=new WeakSet,Y_=function(r,t,n,o,i,a){let{x:u,y:l}=s(this,Jc).call(this,r),c=u-o,d=u+o,f=l-o,h=l+o,g=[];return fI(t,(b,I,v,E,T)=>{let D=I>=d||v>=h||E<c||T<f;if("data"in b){let w=b.data,B=w.properties.parentId||w.properties.id;if(n.includes(B)&&!a.has(B)){a.add(B);let X=Er(r,w.geometry.coordinates);X<=i&&g.push({node:w,distance:X})}}return D}),g},co=new WeakMap,Jc=new WeakMap;import Yc from"zod";var _f=50,K_=111319.9,mI=1,hI=!1,Q_=Yc.object({limit:Yc.enum(["same-floor","same-elevation"]).optional(),mode:Yc.enum(["travel-distance","absolute-distance"]).optional(),lineOfSight:Yc.boolean().optional().or(Yc.literal("auto")),maxDistance:Yc.number().optional(),maxResults:Yc.number().optional()}),eO={lineOfSight:hI,mode:"travel-distance",maxDistance:_f,limit:"same-floor",maxResults:mI},Vr,Yh,Fb,Kh,gI,Of,kb,Bb,Jh=class{constructor(r){M(this,Kh);M(this,Vr);M(this,Yh);M(this,Fb,([r,t])=>{let[n,o]=[s(this,Vr).mapCenter.longitude,s(this,Vr).mapCenter.latitude],i=K_,a=K_*Math.cos(t*Math.PI/180),u=(r-n)*a,l=(t-o)*i;return{x:u,y:l}});m(this,"__LEGACY_NEAREST_SYNC",(r,t,n)=>{let o=_(_({},eO),n);try{Q_.parse(o)}catch(d){K.error(d);return}let i=Il(r);if(!i)return;let a=he(this,Kh,gI).call(this,i,o),u=[],l={},c=[];for(let d of t){let f=Af(d,s(this,Vr),s(this,Vr).enterpriseMode);if(f)for(let h of f)l[h]||(l[h]=[]),l[h].push(d),c.push(h)}return(n==null?void 0:n.mode)==="absolute-distance"?u=s(this,Of).call(this,i,a,t,o):u=s(this,Bb).call(this,r,a,c,l,o),u.sort((d,f)=>d.distance-f.distance)});M(this,Of,(r,t,n,o)=>{var u,l;let i=[],a=new Set(n.map(c=>c.__type));for(let c of t)for(let d of a){let f=s(this,Yh).searchWithIncludedIds([r.longitude,r.latitude],d,s(this,Vr).mapName,c,n.filter(h=>h.__type===d).map(h=>h.id),(u=o==null?void 0:o.maxDistance)!=null?u:_f,(o==null?void 0:o.lineOfSight)==="auto"?hI:o==null?void 0:o.lineOfSight,(l=o==null?void 0:o.maxResults)!=null?l:1);if(f)for(let h of f)i.push({distance:h.distance,feature:s(this,Vr).getById(d,h.node.properties.parentId)||s(this,Vr).getById(d,h.node.properties.id)})}return i});M(this,kb,async(r,t,n,o,i)=>{var u,l,c,d;let a=[];for(let f of t){let h,g=0;if(!Vo.is(r)){let b=s(this,Of).call(this,r.anchorTarget,[f],s(this,Vr).getByType("node").filter(I=>I.floor.id===f),{limit:"same-floor",lineOfSight:(u=i==null?void 0:i.lineOfSight)!=null?u:!0,mode:"absolute-distance",maxDistance:(l=i==null?void 0:i.maxDistance)!=null?l:_f,maxResults:1});b.length>0&&(h=b[0].feature,g=b[0].distance)}if(h){let b=new Set,I=s(this,Vr).directions.navigator.findNearestNodesOnGraph(h.id,((c=i==null?void 0:i.maxDistance)!=null?c:_f)-g,f,n,!1,(d=i==null?void 0:i.maxResults)!=null?d:mI);for(let v of I)for(let E of o[v.feature.properties.id])b.has(E.id)||(a.push({distance:v.distance+g,feature:E}),b.add(E.id))}}return a});M(this,Bb,(r,t,n,o,i)=>{var u,l,c,d,f;let a=[];for(let h of t){let g;if(Vo.is(r)||(g=(c=this.__LEGACY_NEAREST_SYNC(r,s(this,Vr).getByType("node"),{lineOfSight:(u=i==null?void 0:i.lineOfSight)!=null?u:!0,mode:"absolute-distance",maxDistance:(l=i==null?void 0:i.maxDistance)!=null?l:_f,maxResults:1}))==null?void 0:c[0].feature),g){let b=s(this,Vr).directions.navigator.findNearestNodesOnGraph(g.id,(d=i==null?void 0:i.maxDistance)!=null?d:_f,h,n,(i==null?void 0:i.lineOfSight)==="auto"?hI:i==null?void 0:i.lineOfSight,(f=i==null?void 0:i.maxResults)!=null?f:mI);for(let I of b)for(let v of o[I.feature.properties.id])a.push({distance:I.distance,feature:v})}}return a});k(this,Vr,r),k(this,Yh,new _b(s(this,Vr),s(this,Fb)))}async nearest(r,t,n){let o=_(_({},eO),n);try{Q_.parse(o)}catch(f){K.error(f);return}let i=Il(r);if(!i)return;let a=he(this,Kh,gI).call(this,i,o),u=[],l={},c=[],d=[];if((n==null?void 0:n.mode)==="absolute-distance")u=s(this,Of).call(this,i,a,t,o);else{for(let f of t)d.push(Ml(f,s(this,Vr),s(this,Vr).enterpriseMode).then(h=>{if(h)for(let g of h)l[g]||(l[g]=[]),l[g].push(f),c.push(g)}));await Promise.all(d),u=await s(this,kb).call(this,r,a,c,l,o)}return u.sort((f,h)=>f.distance-h.distance)}};Vr=new WeakMap,Yh=new WeakMap,Fb=new WeakMap,Kh=new WeakSet,gI=function(r,t){let n=r.floorId?[r.floorId]:[];if(r.floorId==null)for(let o of s(this,Vr).getByType("floor-stack")){let i=o.defaultFloor;i&&n.push(i.id)}else if((t==null?void 0:t.limit)==="same-elevation"){let o=s(this,Vr).floorsById[r.floorId];if(o){let i=o==null?void 0:o.elevation;i!=null&&(n=s(this,Vr).getByType("floor-stack").map(a=>{var u;return(u=a.floors.find(l=>l.elevation===i))==null?void 0:u.id}).filter(Boolean))}}return n},Of=new WeakMap,kb=new WeakMap,Bb=new WeakMap;p();p();var Qh,Lb=class{constructor(r){M(this,Qh);k(this,Qh,r||[])}get raw(){return s(this,Qh)}};Qh=new WeakMap;var Co,ke,dr,kf,Ff=class Ff extends mn{constructor(t,n){super(n.mvf2Data.id);m(this,"__type",Ff.__type);m(this,"id","loc_");m(this,"name","");m(this,"externalId");m(this,"description");m(this,"logo");m(this,"logoImage");m(this,"phone");m(this,"social",[]);m(this,"images",[]);m(this,"links",[]);m(this,"website");m(this,"icon");m(this,"extra");M(this,Co);M(this,ke,{});M(this,dr);M(this,kf);k(this,Co,t),k(this,dr,n.mvf2Data),k(this,kf,n.mvf3Data);for(let o in n.mvf2Data)o==="links"?this.links=n.mvf2Data.links.map(i=>new Tc({mvfData:i})):o==="pictures"?this.images=n.mvf2Data.pictures.map(i=>{var a;return i.url?new gs({mvfData:ne(_({},i),{url:(a=i.url)!=null?a:""}),mapData:s(this,Co)}):void 0}).filter(i=>i!=null):o==="website"?n.mvf2Data.website&&(this.website=new Tc({mvfData:n.mvf2Data.website})):o==="icon"?n.mvf2Data.icon&&(this.icon=new gs({mvfData:{url:n.mvf2Data.icon},mapData:s(this,Co)})):o==="logo"?n.mvf2Data.logo&&(this.logoImage=new gs({mvfData:{url:n.mvf2Data.logo},mapData:s(this,Co)}),Object.defineProperty(this,"logo",{get(){var i;return(i=this.logoImage)==null?void 0:i.url}})):Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return s(this,dr)[o]}});s(this,kf)&&(this.extra=s(this,kf).extra)}static is(t){return t.__type===Ff.__type}get spaces(){if(s(this,ke).spaces)return s(this,ke).spaces;if(s(this,dr).spaces==null)return s(this,ke).spaces=[],s(this,ke).spaces;s(this,ke).spaces=[];for(let t=0;t<s(this,dr).spaces.length;t++){let n=s(this,Co).getById("space",s(this,dr).spaces[t].id);n&&s(this,ke).spaces.push(n)}return s(this,ke).spaces}get points(){if(s(this,ke).points)return s(this,ke).points;if(s(this,dr).spaces==null)return s(this,ke).points=[],s(this,ke).points;s(this,ke).points=[];for(let t=0;t<s(this,dr).spaces.length;t++){let n=s(this,Co).getById("point-of-interest",s(this,dr).spaces[t].id);n&&s(this,ke).points.push(n)}return s(this,ke).points}get doors(){if(s(this,ke).doors)return s(this,ke).doors;if(s(this,dr).entrances==null)return s(this,ke).doors=[],s(this,ke).doors;s(this,ke).doors=[];for(let t=0;t<s(this,dr).entrances.length;t++){let n=s(this,Co).getById("door",s(this,dr).entrances[t].id);n&&s(this,ke).doors.push(n)}return s(this,ke).doors}get connections(){if(s(this,ke).connections)return s(this,ke).connections;if(s(this,dr).connections==null)return s(this,ke).connections=[],s(this,ke).connections;s(this,ke).connections=[];for(let t of s(this,dr).connections){let n=s(this,Co).getById("connection",t);n&&s(this,ke).connections.push(n)}return s(this,ke).connections}get annotations(){if(s(this,ke).annotations)return s(this,ke).annotations;if(s(this,dr).annotations==null)return s(this,ke).annotations=[],s(this,ke).annotations;s(this,ke).annotations=[];for(let t=0;t<s(this,dr).annotations.length;t++){let n=s(this,Co).getById("annotation",s(this,dr).annotations[t].id);n&&s(this,ke).annotations.push(n)}return s(this,ke).annotations}get categories(){return s(this,ke).categories?s(this,ke).categories:s(this,dr).categories==null?(s(this,ke).categories=[],s(this,ke).categories):(s(this,ke).categories=s(this,dr).categories.map(t=>s(this,Co).getById("location-category",t)).filter(t=>t!=null),s(this,ke).categories)}get mapObjects(){return s(this,ke).mapObjects?s(this,ke).mapObjects:s(this,dr).obstructions==null?(s(this,ke).mapObjects=[],s(this,ke).mapObjects):(s(this,ke).mapObjects=s(this,dr).obstructions.map(t=>s(this,Co).getById("object",t.id)).filter(t=>t!=null),s(this,ke).mapObjects)}get areas(){return s(this,ke).areas?s(this,ke).areas:s(this,dr).areas==null?(s(this,ke).areas=[],s(this,ke).areas):(s(this,ke).areas=s(this,dr).areas.map(t=>s(this,Co).getById("area",t.id)).filter(t=>t!=null),s(this,ke).areas)}get focusTarget(){if(s(this,ke).focusTarget)return s(this,ke).focusTarget;let t=[];for(let n of this.spaces)t.push(n);for(let n of this.connections)t.push(...n.coordinates);for(let n of this.doors)t.push(n.focusTarget);for(let n of this.mapObjects)t.push(n.focusTarget);for(let n of this.annotations)t.push(n.focusTarget);for(let n of this.points)t.push(n.focusTarget);for(let n of this.areas)t.push(n.focusTarget);return s(this,ke).focusTarget=t,t}get openingHours(){var t;return s(this,ke).openingHours?s(this,ke).openingHours:(s(this,ke).openingHours=new Lb((t=s(this,dr).openingHoursSpecification)!=null?t:[]),s(this,ke).openingHours)}get navigationTarget(){if(s(this,ke).navigationTarget)return s(this,ke).navigationTarget;let t=[];for(let n of this.spaces)t.push(n);for(let n of this.connections)t.push(...n.coordinates);for(let n of this.doors)t.push(n.focusTarget);for(let n of this.mapObjects)t.push(n.focusTarget);for(let n of this.annotations)t.push(n.focusTarget);for(let n of this.points)t.push(n.focusTarget);return s(this,ke).navigationTarget=t,t}toJSON(){return{__type:Ff.__type,id:this.id,name:this.name}}};Co=new WeakMap,ke=new WeakMap,dr=new WeakMap,kf=new WeakMap,m(Ff,"__type","location-profile");var yI=Ff,vu=yI;p();var Al,Xo,Kc,Bf=class Bf extends mn{constructor(t,n){super(n.mvfData.id);m(this,"__type",Bf.__type);m(this,"id","cat_");m(this,"name","");m(this,"icon","");M(this,Al);M(this,Xo,{});M(this,Kc);k(this,Al,t),k(this,Kc,n.mvfData);for(let o in n.mvfData)Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return s(this,Kc)[o]}})}static is(t){return t.__type===Bf.__type}get parent(){return s(this,Xo).parent?s(this,Xo).parent:(s(this,Xo).parent=s(this,Kc).parent?s(this,Al).getById("location-category",s(this,Kc).parent):void 0,s(this,Xo).parent)}get children(){return s(this,Xo).children?s(this,Xo).children:(s(this,Xo).children=s(this,Al).locationCategoriesByParentId[this.id]||[],s(this,Xo).children)}get locationProfiles(){if(s(this,Xo).locationProfiles)return s(this,Xo).locationProfiles;let t=[];for(let n of s(this,Al).locationProfilesByCategoryId[this.id]||[]){let o=s(this,Al).getById("location-profile",n.id);o&&t.push(o)}return s(this,Xo).locationProfiles=t,t}toJSON(){return{__type:Bf.__type,id:this.id,name:this.name}}};Al=new WeakMap,Xo=new WeakMap,Kc=new WeakMap,m(Bf,"__type","location-category");var bI=Bf,vb=bI;var vI=.75,He,e0,Lf,Rf,Qc=class extends Je{constructor(t,n){var a,u,l,c,d,f;super();m(this,"Analytics");M(this,He,{});m(this,"Query");m(this,"mvf");m(this,"outdoorViewToken");m(this,"objectEntranceNodeIdsByObstructionId");m(this,"obstructionIdByEntranceId");m(this,"venue");m(this,"tokenManager");m(this,"directions");m(this,"enterpriseMode",!1);m(this,"nodesById");m(this,"spacesById");m(this,"floorsById");m(this,"floorStacksById");m(this,"facadesById");m(this,"facadesBySpaceId");m(this,"connectionsById");m(this,"objectsById");m(this,"doorsById");m(this,"pointsOfInterestById");m(this,"annotationsById");m(this,"areasById");m(this,"locationProfilesById");m(this,"locationCategoriesById");m(this,"locationProfilesByExternalId");m(this,"locationProfilesByCategoryId");m(this,"locationCategoriesByParentId");m(this,"doorsByNodeId");m(this,"mvfAnnotationsById");m(this,"mvfConnectionsById");m(this,"mvfConnectionsByNodeId");m(this,"mvfEntrancesById");m(this,"mvfNodesById");m(this,"mvfObstructionById");m(this,"mvfSpacesById");m(this,"mvfFloorsById");m(this,"mvfFloorStacksById");m(this,"mvfAreasById");m(this,"spacesByExternalId");m(this,"nodesByExternalId");m(this,"objectsByExternalId");m(this,"poisByExternalId");m(this,"floorsByExternalId");m(this,"floorStacksByExternalId");m(this,"doorsByExternalId");m(this,"areasByExternalId");m(this,"locationProfilesByAttachedFeatureId",{});m(this,"entranceNodeIdsBySpaceId",{});m(this,"locationsById",{});m(this,"locationInstancesById",{});m(this,"instanceLocationsByPolygonId",{});m(this,"categoriesById",{});m(this,"mvfLocationsByGeometryId",{});m(this,"locationIdsByNodeId",{});m(this,"spaceIdsByNodeId",{});m(this,"objectIdsByNodeId",{});m(this,"connectionsByExternalId",{});m(this,"locationsByExternalId",{});m(this,"categoriesByExternalId",{});m(this,"destinationNodesIdsBySpaceId",{});m(this,"mvfNodesByFloorId");m(this,"mvfSpacesByFloorId");m(this,"mvfPoisByFloorId");m(this,"mvfEntrancesByFloorId");m(this,"mvfAnnotationsByFloorId");m(this,"localePacksUrls");m(this,"currentLanguage");m(this,"languagePacks",{});m(this,"tilesets",{});m(this,"navigationFlags");m(this,"binaryBundle");m(this,"envControl");m(this,"getMapDataOptions");M(this,e0);M(this,Lf,new je(0,0,"initializing"));m(this,"propTranslationCache",new Map);M(this,Rf);m(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(t,n,o)=>this.__LEGACY_GET_DIRECTIONS_SYNC(t,n,ne(_({},o),{multiDestination:!0})));m(this,"__LEGACY_GET_DIRECTIONS_SYNC",(t,n,o)=>{let{accessible:i=!1,multiDestination:a=!1}=o||{},u=tO(this.enterpriseMode,o),l=(o==null?void 0:o.zones)||[],c={accessible:i,zones:l,smoothing:u,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}};if(a&&Array.isArray(n)){let d=Array.isArray(t)?t:[t],f=[];for(let h of n){let g=Array.isArray(h)?h:[h],b=this.directions.getDirectionsSync(d,g,c,this);if(!b){K.error("getDirections failed due to missing directions for one of the segments");return}d=g,f.push(b)}return f}else{let d=Array.isArray(t)?t:[t],f=Array.isArray(n)?n:[n];if(Array.isArray(f[0])){K.error("getDirections does not support multi-destination without multisegment option");return}d[0].id&&f[0].id&&this.Analytics.sendGetDirectionsEvent(d[0].id,f[0].id,i);try{return this.directions.getDirectionsSync(d,f,c,this)}catch(h){K.error("Unable to get directions",h);return}}});m(this,"getDirections",async(t,n,o)=>{let{accessible:i=!1}=o||{},a=tO(this.enterpriseMode,o),u=(o==null?void 0:o.zones)||[],l={accessible:i,zones:u,smoothing:a,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}},c=Array.isArray(t)?t:[t],d=Array.isArray(n)?n:[n];if(Array.isArray(d[0])){K.error("getDirections does not support multi-destination without multisegment option");return}c[0].id&&d[0].id&&this.Analytics.sendGetDirectionsEvent(c[0].id,d[0].id,i);try{return this.directions.getDirections(c,d,l,this)}catch(f){K.error("Unable to get directions",f);return}});m(this,"getDirectionsMultiDestination",async(t,n,o)=>Promise.resolve(this.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(t,n,o)));m(this,"getDoorByNodeId",t=>this.doorsByNodeId[t]);m(this,"transformImageRequest",async t=>{var o;if(this.enterpriseMode||!this.getMapDataOptions)return{url:t};if(!MP(t))return{url:t};if(AP(t))return{url:t};let n=hb(t);if(!n)return{url:t};try{let i=await((o=this.tokenManager)==null?void 0:o.getSasTokensAsync()),a=i==null?void 0:i[n.mapId];if(a==null)throw new Error("SAS token not found");let[u]=t.split("?");return{url:"".concat(u,"?").concat(a.token)}}catch(i){return K.error("Failed to append SAS token to image request. Requests for private images may fail.",i),{url:t}}});let o=(a=n==null?void 0:n.env)!=null?a:gl();if(this.envControl=o,this.binaryBundle=n==null?void 0:n.binaryBundle,this.Analytics=new Wd,this.localePacksUrls=(u=n==null?void 0:n.localePacksUrls)!=null?u:{},this.mvf=t,this.outdoorViewToken=n==null?void 0:n.outdoorViewToken,this.getMapDataOptions=n==null?void 0:n.getMapDataOptions,k(this,e0,n==null?void 0:n.mvf3),((l=t["tileset.json"])==null?void 0:l.default)!=null&&(this.tilesets[t["tileset.json"].default.key]=t["tileset.json"].default,o.updateTileServerBaseUrl(t["tileset.json"].default.url),t["tileset.json"].others!=null))for(let h of t["tileset.json"].others)this.tilesets[h.key]=h;this.navigationFlags=(c=t["navigationFlags.json"])!=null?c:{},this.enterpriseMode=(d=n==null?void 0:n.enterprise)!=null?d:!1,this.tokenManager=n==null?void 0:n.tokenManager;let i=zP(this,t,n==null?void 0:n.mvf3);if(this.nodesById=i.nodesById,this.spacesById=i.spacesById,this.floorsById=i.floorsById,this.floorStacksById=i.floorStacksById,this.facadesById=i.facadesById,this.facadesBySpaceId=i.facadesBySpaceId,this.connectionsById=i.connectionsById,this.objectsById=i.objectsById,this.doorsById=i.doorsById,this.pointsOfInterestById=i.poisById,this.annotationsById=i.annotationsById,this.areasById=i.areasById,this.locationProfilesById=i.locationProfilesById,this.locationCategoriesById=i.locationCategoriesById,this.locationProfilesByCategoryId=i.locationProfilesByCategoryId,this.locationCategoriesByParentId=i.locationCategoriesByParentId,this.spacesByExternalId=i.spacesByExternalId,this.nodesByExternalId=i.nodesByExternalId,this.objectsByExternalId=i.objectsByExternalId,this.floorsByExternalId=i.floorsByExternalId,this.locationProfilesByExternalId=i.locationProfilesByExternalId,this.floorStacksByExternalId=i.floorStacksByExternalId,this.poisByExternalId=i.poisByExternalId,this.doorsByExternalId=i.doorsByExternalId,this.areasByExternalId=i.areasByExternalId,this.mvfAnnotationsById=i.mvfAnnotationsById,this.mvfConnectionsById=i.mvfConnectionsById,this.mvfConnectionsByNodeId=i.mvfConnectionsByNodeId,this.mvfEntrancesById=i.mvfEntrancesById,this.mvfNodesById=i.mvfNodesById,this.mvfObstructionById=i.mvfObstructionById,this.mvfSpacesById=i.mvfSpacesById,this.mvfFloorsById=i.mvfFloorsById,this.mvfFloorStacksById=i.mvfFloorStacksById,this.mvfNodesByFloorId=i.mvfNodesByFloorId,this.mvfSpacesByFloorId=i.mvfSpacesByFloorId,this.mvfPoisByFloorId=i.mvfPoisByFloorId,this.mvfEntrancesByFloorId=i.mvfEntrancesByFloorId,this.mvfAnnotationsByFloorId=i.mvfAnnotationsByFloorId,this.mvfAreasById=i.mvfAreasById,this.doorsByNodeId=i.doorsByNodeId,this.objectEntranceNodeIdsByObstructionId=i.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=i.obstructionIdByEntranceId,this.locationProfilesByAttachedFeatureId=i.locationProfilesByAttachedFeatureId,this.entranceNodeIdsBySpaceId=i.entranceNodeIdsBySpaceId,this.spaceIdsByNodeId=i.spaceIdsByNodeId,this.objectIdsByNodeId=i.objectIdsByNodeId,this.destinationNodesIdsBySpaceId=i.destinationNodesIdsBySpaceId,this.enterpriseMode||t0()){let h=GP(t,this);if(this.locationsById=h.locationsById,this.locationInstancesById=h.locationInstancesById,this.instanceLocationsByPolygonId=h.instanceLocationsByPolygonId,this.categoriesById=h.categoriesById,this.mvfLocationsByGeometryId=h.mvfLocationsByGeometryId,this.locationIdsByNodeId=h.locationIdsByNodeId,this.connectionsByExternalId=h.connectionsByExternalId,this.locationsByExternalId=h.locationsByExternalId,this.categoriesByExternalId=h.categoriesByExternalId,h.venue.name!=null){this.venue=new eI(this,{mvfData:h.venue});let g={};for(let b in h.mvfLocationsById)g[b]=h.mvfLocationsById[b];for(let b in h.mvfLocationInstancesById)g[b]=h.mvfLocationInstancesById[b];this.languagePacks[this.venue.defaultLanguage.code]={type:"initial",optimized:{"enterprise-location":g,"enterprise-category":h.mvfCategoriesById,"floor-stack":i.mvfFloorStacksById,floor:i.mvfFloorsById}},(f=n==null?void 0:n.languagePacks)==null||f.forEach(({language:b,localePack:I})=>{this.languagePacks[b.code]=A2(I)}),this.currentLanguage=this.venue.defaultLanguage}}this.directions=new Pf({nodes:t["node.geojson"],geojsonCollection:this.enterpriseMode&&t.enterprise?t.space:t.obstruction,connections:t["connection.json"],groupBy:"map",multiplicativeDistanceWeightScaling:!this.enterpriseMode,flagDeclarations:t["navigationFlags.json"],getDoorByNodeId:h=>{let g=this.doorsByNodeId[h];if(g!=null)return{geoJSON:g.geoJSON}}}),this.Query=new Jh(this)}getEnv(){let t=this;return{get baseUri(){return t.envControl.getBaseUri()},get baseAuthUri(){return t.envControl.getBaseAuthUri()},get analyticsBaseUri(){return t.envControl.getAnalyticsBaseUri()},get tileServerUri(){return t.envControl.getTileServerUri()}}}get mapName(){return this.mvf["manifest.geojson"].features[0].properties.name}get organizationId(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.org_id)!=null?t:""}get mapCenter(){return s(this,Lf).floorId==="initializing"&&k(this,Lf,new je(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])),s(this,Lf)}get naturalBearing(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.naturalBearing)!=null?t:0}get spaces(){return s(this,He).spaces==null&&(s(this,He).spaces=globalThis.Object.values(this.spacesById)),s(this,He).spaces}get objects(){return s(this,He).objects==null&&(s(this,He).objects=globalThis.Object.values(this.objectsById)),s(this,He).objects}get connections(){return s(this,He).connections==null&&(s(this,He).connections=globalThis.Object.values(this.connectionsById)),s(this,He).connections}get floors(){return s(this,He).floors==null&&(s(this,He).floors=globalThis.Object.values(this.floorsById)),s(this,He).floors}get floorStacks(){return s(this,He).floorStacks==null&&(s(this,He).floorStacks=globalThis.Object.values(this.floorStacksById)),s(this,He).floorStacks}get facades(){return s(this,He).facades==null&&(s(this,He).facades=globalThis.Object.values(this.facadesById)),s(this,He).facades}get doors(){return s(this,He).doors==null&&(s(this,He).doors=globalThis.Object.values(this.doorsById)),s(this,He).doors}get pointsOfInterest(){return s(this,He).pointsOfInterest==null&&(s(this,He).pointsOfInterest=globalThis.Object.values(this.pointsOfInterestById)),s(this,He).pointsOfInterest}get annotations(){return s(this,He).annotations==null&&(s(this,He).annotations=globalThis.Object.values(this.annotationsById)),s(this,He).annotations}get areas(){return s(this,He).areas==null&&(s(this,He).areas=globalThis.Object.values(this.areasById)),s(this,He).areas}get nodes(){return s(this,He).nodes==null&&(s(this,He).nodes=globalThis.Object.values(this.nodesById)),s(this,He).nodes}get locations(){return s(this,He).locations==null&&(s(this,He).locations=globalThis.Object.values(this.locationsById)),globalThis.Object.values(this.locationsById)}get categories(){return s(this,He).categories==null&&(s(this,He).categories=globalThis.Object.values(this.categoriesById)),globalThis.Object.values(this.categoriesById)}get locationProfiles(){return s(this,He).locationProfiles==null&&(s(this,He).locationProfiles=globalThis.Object.values(this.locationProfilesById)),s(this,He).locationProfiles}get locationCategories(){return s(this,He).locationCategories==null&&(s(this,He).locationCategories=globalThis.Object.values(this.locationCategoriesById)),s(this,He).locationCategories}get mvfFloors(){return s(this,He).mvfFloors==null&&(s(this,He).mvfFloors=globalThis.Object.values(this.mvfFloorsById)),s(this,He).mvfFloors}get mvfFloorStacks(){return s(this,He).mvfFloorStacks==null&&(s(this,He).mvfFloorStacks=globalThis.Object.values(this.mvfFloorStacksById)),s(this,He).mvfFloorStacks}getByType(t){switch(t){case"location-profile":return this.locationProfiles;case"location-category":return this.locationCategories;case"area":return this.areas;case"node":return this.nodes;case"space":return this.spaces;case"door":return this.doors;case"floor":return this.floors;case"floor-stack":return this.floorStacks;case"connection":return this.connections;case"object":return this.objects;case"point-of-interest":return this.pointsOfInterest;case"annotation":return this.annotations;case"enterprise-location":return this.locations;case"enterprise-category":return this.categories;case"enterprise-venue":return this.venue;case"facade":return this.facades;default:return[]}}getAllOfTypes(t,n){let o=t instanceof Set?t:new Set(t);return n!=null&&Array.isArray(n)?n.filter(i=>o.has(i.__type)):Array.from(o).flatMap(i=>this.getByType(i))}getById(t,n){let o={"location-profile":this.locationProfilesById,"location-category":this.locationCategoriesById,space:this.spacesById,floor:this.floorsById,"floor-stack":this.floorStacksById,facade:this.facadesById,node:this.nodesById,door:this.doorsById,connection:this.connectionsById,"mvf-connection":this.mvfConnectionsById,object:this.objectsById,"point-of-interest":this.pointsOfInterestById,annotation:this.annotationsById,area:this.areasById,"enterprise-location":u=>{var l;return(l=this.locationsById[u])!=null?l:this.locationInstancesById[u]},"enterprise-category":this.categoriesById},i=u=>{let l=o[u];if(l!=null)return typeof l=="function"?l(n):l[n]},a=()=>{for(let u of Object.keys(o)){let l=i(u);if(l!=null)return l}};return t==="unknown"?a():i(t)}getByExternalId(t,n){var o,i,a,u,l,c,d,f,h,g,b,I;switch(t){case"location-profile":return(o=this.locationProfilesByExternalId[n])!=null?o:[];case"location-category":return[];case"space":return(i=this.spacesByExternalId[n])!=null?i:[];case"floor":return(a=this.floorsByExternalId[n])!=null?a:[];case"floor-stack":return(u=this.floorStacksByExternalId[n])!=null?u:[];case"node":return(l=this.nodesByExternalId[n])!=null?l:[];case"door":return(c=this.doorsByExternalId[n])!=null?c:[];case"connection":return(d=this.connectionsByExternalId[n])!=null?d:[];case"object":return(f=this.objectsByExternalId[n])!=null?f:[];case"point-of-interest":return(h=this.poisByExternalId[n])!=null?h:[];case"area":return(g=this.areasByExternalId[n])!=null?g:[];case"enterprise-location":return(b=this.locationsByExternalId[n])!=null?b:[];case"enterprise-category":return(I=this.categoriesByExternalId[n])!=null?I:[];default:return[]}}getMapDataById(t){var n,o,i,a,u,l,c,d,f,h;return(h=(f=(d=(c=(l=(u=(a=(i=(o=(n=this.spacesById[t])!=null?n:this.floorsById[t])!=null?o:this.floorStacksById[t])!=null?i:this.facadesById[t])!=null?a:this.nodesById[t])!=null?u:this.doorsById[t])!=null?l:this.connectionsById[t])!=null?c:this.objectsById[t])!=null?d:this.pointsOfInterestById[t])!=null?f:this.annotationsById[t])!=null?h:this.areasById[t]}getMVFFeatureById(t,n){switch(t){case"space":return this.mvfSpacesById[n];case"node":return this.mvfNodesById[n];case"obstruction":return this.mvfObstructionById[n];case"floor":return this.mvfFloorsById[n];case"floor-stack":return this.mvfFloorStacksById[n];case"connection":return this.mvfConnectionsById[n];case"entrance":return this.mvfEntrancesById[n];case"annotation":return this.mvfAnnotationsById[n];case"area":return this.mvfAreasById[n];default:throw new Error("Unknown MVF feature type: ".concat(t))}}getMVFFeatureByNodeId(t,n){switch(t){case"connection":return this.mvfConnectionsByNodeId[n];default:throw new Error("Unsupported MVF feature type: ".concat(t))}}getMVFFeatureByType(t){switch(t){case"floor-stack":return this.mvfFloorStacks;case"floor":return this.mvfFloors;default:throw new Error("Unsupported MVF feature type: ".concat(t))}}getPropTranslation(t,n,o,i){var l,c;if(!this.currentLanguage)return i;let{code:a}=this.currentLanguage,u=(c=(l=this.languagePacks[a])==null?void 0:l.optimized)==null?void 0:c[t];if(u){let d=u[o];if(d!=null&&d[n]!==void 0){let f=d[n];if(f!=null&&typeof f=="object"){if(typeof i=="object"&&typeof f=="object"&&!Array.isArray(f)){let h=Yg(a+t+o+n.toString());if(this.propTranslationCache.has(h))return this.propTranslationCache.get(h);let g=Vh(i,f,["id"]);return this.propTranslationCache.set(h,g),g}return f}return f}}return i}findPreferredLanguage(t){if(!this.venue)return;let n=xI(this.venue,t);return(t==null?void 0:t.languageCode)!=null&&t.languageCode.toLowerCase()!==n.code.toLowerCase()&&K.warn('Language code "'.concat(t.languageCode,'" could not be found in the venue. Using "').concat(n.code,'" instead.')),n}async changeLanguage(t){var u;let n=t.toLowerCase();if(!n){K.error("Language code must be defined.");return}if(!this.currentLanguage||!this.venue){K.error("Changing the language is not supported for this map.");return}let o=this.currentLanguage.code,i=(u=this.venue)==null?void 0:u.languages.find(({code:l})=>l.toLowerCase()===n.toLowerCase());if(!i){K.warn('Language code "'.concat(n,'" could not be found in the venue.'));return}if(o===i.code)return;let a=this.languagePacks[i.code];if(!a){let l=this.localePacksUrls[i.code];if(!l){K.error('Locale pack URL not found for language code "'.concat(i.code,'".'));return}s(this,Rf)&&s(this,Rf).abort();let c=new AbortController;k(this,Rf,c);let d;try{d=await WA(l,{signal:c.signal})}catch(f){K.error('Failed to download language pack for language code "'.concat(i.code,'".'),f);return}if(!d||c.signal.aborted)return;a=A2(d),this.languagePacks[i.code]=a}this.Analytics.sendChangeLanguageEvent({fromLanguage:this.currentLanguage.code}),this.currentLanguage=i,this.publish("language-change",this.currentLanguage)}getDistance(t,n){let o=Il(t),i=Il(n);return Er([o.longitude,o.latitude],[i.longitude,i.latitude])}async toJSONBundle({downloadLanguagePacks:t=!0}={}){var o;let n=[];if(t&&this.enterpriseMode){let i=new AbortController;for(let a of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[a.code]){let u=await o2(this.localePacksUrls[a.code],{signal:i.signal}),l=await Gp(u);l&&n.push({language:{code:a.code,name:a.name},localePack:l})}}catch(u){K.warn("failed downloading language pack",u)}}return{type:"json",options:{enterprise:this.enterpriseMode,mvf3:s(this,e0)},languagePacks:n,main:this.mvf}}async toBinaryBundle({downloadLanguagePacks:t=!0}={}){var o;if(!this.binaryBundle){K.error("binary bundle not found");return}let n=[];if(t&&this.enterpriseMode){let i=new AbortController;for(let a of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[a.code]){let u=await o2(this.localePacksUrls[a.code],{signal:i.signal});u&&n.push({language:{code:a.code,name:a.name},localePack:u})}}catch(u){K.warn("failed downloading language pack",u)}}return{type:"binary",options:{enterprise:this.enterpriseMode},languagePacks:n,main:this.binaryBundle}}destroy(){for(let t of globalThis.Object.keys(s(this,He)))s(this,He)[t]=null;this.propTranslationCache.clear()}};He=new WeakMap,e0=new WeakMap,Lf=new WeakMap,Rf=new WeakMap;var tO=(e,r)=>{var l,c;let t=!e,n=r==null?void 0:r.smoothing,i=n!=null?typeof n=="object"?(l=n.enabled)!=null?l:t:n:t,a=typeof n=="object"?n.radius:void 0,u=typeof n=="object"&&(c=n.__EXPERIMENTAL_METHOD)!=null?c:"greedy-los";return u==="dp-optimal"?{enabled:i,radius:a!=null?a:vI,__EXPERIMENTAL_METHOD:"dp-optimal",includeDoorBufferNodes:typeof n=="object"&&n.__EXPERIMENTAL_METHOD==="dp-optimal"?n.__EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES:void 0}:u==="rdp"?{enabled:i,radius:a!=null?a:vI,__EXPERIMENTAL_METHOD:"rdp",mustIncludeDoorBufferNodes:typeof n=="object"&&n.__EXPERIMENTAL_METHOD==="rdp"?n.__EXPERIMENTAL_MUST_INCLUDE_DOOR_BUFFER_NODES:void 0}:{enabled:i,radius:a!=null?a:vI,__EXPERIMENTAL_METHOD:u}};p();p();p();globalThis.MappedinDebug||(globalThis.MappedinDebug={});globalThis.MappedinDebug.__idleCallbackInteractionState={isInteracting:!1,interactionCheckers:[],pendingCallbacks:[],registerInteractionChecker:function(e){this.interactionCheckers.push(e)},unregisterInteractionChecker:function(e){let r;for(let t=this.interactionCheckers.length-1;t>=0;t--)if(r=this.interactionCheckers[t],r===e){this.interactionCheckers.splice(t,1);break}},checkInteraction:function(){let e=!1;for(let r=0;r<this.interactionCheckers.length;r++)if(e=this.interactionCheckers[r](),e)return!0;return!1},addPendingCallback:function(e,r){this.pendingCallbacks.push({callback:e,timeoutId:r}),this.scheduleDeferredCheck()},scheduleDeferredCheck:function(){var e=this;this.checkTimeoutId||(this.checkTimeoutId=setTimeout(function r(){if(e.checkInteraction())e.checkTimeoutId=setTimeout(r,16);else{e.checkTimeoutId=null;var t=e.pendingCallbacks.slice();e.pendingCallbacks=[];let n;for(let o=0;o<t.length;o++)if(n=t[o],n&&n.callback)try{n.callback()}catch(i){}}},16))},removePendingCallback:function(e){let r;for(let t=this.pendingCallbacks.length-1;t>=0;t--)if(r=this.pendingCallbacks[t],r.timeoutId===e){this.pendingCallbacks.splice(t,1);break}}};globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var i,a;var r=performance.now(),t,n=!1,o=function(){if(!n){n=!0;try{e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(performance.now()-r))}})}catch(u){}}};return(a=(i=globalThis.MappedinDebug)==null?void 0:i.__idleCallbackInteractionState)!=null&&a.checkInteraction()?(t=Date.now()+Math.random(),globalThis.MappedinDebug.__idleCallbackInteractionState.addPendingCallback(o,t),t):(t=setTimeout(o,0),t)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){var r,t;clearTimeout(e),(t=(r=globalThis.MappedinDebug)==null?void 0:r.__idleCallbackInteractionState)==null||t.removePendingCallback(e)};p();p();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var rO="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=";p();p();var nO=!1;function oO(){nO=!0}function iO(){return nO}var Rb=class{constructor(r){m(this,"backgroundAlpha",1);m(this,"backgroundColor",new or);m(this,"width",0);m(this,"height",0);m(this,"options",{});m(this,"renderer");m(this,"enabledLayers",new Set([0,1]));m(this,"matricesUpdatedThisFrame",!1);m(this,"handleWebGLContextCreationError",r=>{var t,n;(n=(t=this.options).onWebGLContextCreationError)==null||n.call(t,r)});m(this,"handleWebGLContextLost",r=>{var t,n;(n=(t=this.options).onWebGLContextLost)==null||n.call(t,r)});m(this,"handleWebGLContextRestored",r=>{var t,n;(n=(t=this.options).onWebGLContextRestored)==null||n.call(t,r)});var t,n,o,i,a;try{this.options=r,iO()?(this.renderer={setSize:()=>{},state:{reset:()=>{}},properties:{get:()=>{}},getSize:()=>({width:window.innerWidth,height:innerHeight}),getDrawingBufferSize:()=>({width:window.innerWidth,height:innerHeight}),getClearAlpha:()=>1,getClearColor:()=>new or,autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),readRenderTargetPixelsAsync:()=>Promise.resolve([]),setRenderTarget:()=>{},setClearColor:()=>{},clear:()=>{},render:()=>{},clearStencil:()=>{},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 V6({canvas:r.canvas,alpha:r.alpha||!1,stencil:!0,antialias:typeof r.antialias=="boolean"?r.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new or((t=r.backgroundColor)!=null?t:"#ffffff"),this.backgroundAlpha=(n=r.backgroundAlpha)!=null?n:1}catch(u){K.error(u),r.onWebGLRendererError&&r.onWebGLRendererError(u)}(o=this.domElement())==null||o.addEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var r,t,n,o,i;this.renderer&&((t=(r=this.renderer).dispose)==null||t.call(r)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(o=this.domElement())==null||o.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(i=this.domElement())==null||i.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}startFrame(){this.matricesUpdatedThisFrame=!1}updateMatricesIfNeeded(r){this.matricesUpdatedThisFrame||(r.updateMatrixWorld(),this.matricesUpdatedThisFrame=!0)}renderScene(r,t){this.renderer&&(this.updateMatricesIfNeeded(r),this.renderer.render(r,t))}renderFullScene(r,t){if(this.renderer){this.renderer.state.reset(),this.updateMatricesIfNeeded(r),this.renderer.clearStencil(),this.renderer.setRenderTarget(null),t.layers.disableAll(),this.renderer.autoClear=!1,t.layers.enable(In.MASKS),this.renderer.render(r,t),t.layers.disableAll();for(let n of this.enabledLayers.values())t.layers.enable(n);this.renderer.render(r,t),this.renderer.clearDepth(),t.layers.disableAll(),t.layers.enable(In.ALWAYS_ON_TOP_PATHS),this.renderer.render(r,t),this.renderer.clearStencil(),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(r,t){y.env.NODE_ENV==="test"||!this.renderer||(this.width=r,this.height=t,this.renderer.setSize(r,t,!1))}setBackgroundColor(r,t){this.backgroundColor=r,this.backgroundAlpha=t}domElement(){var r;return(r=this.renderer)==null?void 0:r.domElement}};p();p();var aO='"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';p();p();p();p();p();function sO(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}p();function uO(e,r){let[t,n]=r;return t>=e.x&&t<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}p();function lO(e,r){let t=r.x,n=r.y,o=r.x+r.w,i=r.y+r.h,a=e.x,u=e.y,l=e.x+e.w,c=e.y+e.h;return t<l&&a<o&&n<c&&u<i}p();function Su(e,r){for(let t=0;t<r.length;t++)e.push(r[t])}p();var ot=class{constructor(r,t,n,o,i){m(this,"x");m(this,"y");m(this,"w");m(this,"h");m(this,"userData");this.userData=typeof i>"u"?null:i,this.x=r,this.y=t,this.w=n,this.h=o}contains(r){return r===this?!1:sO(this,r)}intersects(r){return lO(this,r)}intersectsPoint(r){return uO(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var Wi=class e{constructor(r,t){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=t,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:t,w:n,h:o}=this.boundary;this.topLeft=new e(new ot(r,t,n/2,o/2),this),this.topRight=new e(new ot(r+n/2,t,n/2,o/2),this),this.bottomLeft=new e(new ot(r,t+o/2,n/2,o/2),this),this.bottomRight=new e(new ot(r+n/2,t+o/2,n/2,o/2),this),this.divided=!0}queryRect(r){let t=[];if(this.boundary.intersects(r))t.push(...this.objects);else return[];return this.divided&&(Su(t,this.topLeft.queryRect(r)),Su(t,this.topRight.queryRect(r)),Su(t,this.bottomLeft.queryRect(r)),Su(t,this.bottomRight.queryRect(r))),t}queryPoint(r){let t=[];if(this.boundary.intersectsPoint(r))t.push(...this.objects);else return[];return this.divided&&(Su(t,this.topLeft.queryPoint(r)),Su(t,this.topRight.queryPoint(r)),Su(t,this.bottomLeft.queryPoint(r)),Su(t,this.bottomRight.queryPoint(r))),t}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(t=>t.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()}};p();var EI=9,Pl=200,Nb=10;function cO(e,r,t,n,o,i,a="-1"){var X,L;let u=1/0,l=1/0,c=-1/0,d=-1/0,f=new ot(-Nb,0,5,t),h=new ot(-Nb,0,r,5),g=new ot(r-5,0,r+Nb,t),b=new ot(0,t-5,r,t+Nb),I=HX(r,t,n,o,i),v=[f,h,g,b],E=new ot(-Pl,-Pl,r+Pl*2,t+Pl*2);for(let P of e){let R,$;for(let V=0;V<P.bboxes.length;V++){if(P.bboxes[V]==null||(R=P.bboxes[V].boundingBox,$=P.bboxes[V].index,P.lockedToStrategyIndex!==-1&&$!==P.lockedToStrategyIndex))continue;let[H,re,j,me]=R,[z,ue,se,pe]=[P.y-H,P.y+re,P.x-j,P.x+me],le=se,ye=z,Fe=pe-se,Ee=ue-z;u=Math.min(u,le)-Pl,l=Math.min(l,ye)-Pl,c=Math.max(c,le+Fe)+Pl,d=Math.max(d,ye+Ee)+Pl,P.bboxes[V].boundingRect=new ot(le,ye,Fe,Ee)}}let T=new Wi(new ot(u,l,c-u,d-l)),D={msgId:a,colliders:new Array(e.length),staticColliders:[],debug:[]},w=0;for(let P=0;P<e.length;P++){let R=e[P];((L=(X=R.bboxes)==null?void 0:X[0])==null?void 0:L.index)===EI&&(D.staticColliders.push(R.bboxes[0].boundingRect),T.insert(R.bboxes[0].boundingRect),w++)}e=e.slice(w,e.length);let B;for(let P=0;P<e.length;P++)if(B=e[P],D.colliders[P]=[-1,0],B.enabledAndVisible){let[R,$,V]=[1/0,-1,void 0];for(let{index:H,boundingRect:re}of B.bboxes){if(re==null)continue;let j=[];if(j=T.queryRect(re).filter(z=>re.intersects(z)),B.shouldCollideWithScreenEdges&&v.forEach(z=>{re.intersects(z)&&j.push(z)}),re.intersects(I)){D.colliders[P]=[-1,0,re];break}if(j.length<=R&&(V=re,$=H,R=j.length),j.length===0){T.insert(re),D.colliders[P]=[H,E.contains(re)?0:1,re];break}}B.rank===jd&&V!=null&&(T.insert(V),D.colliders[P]=[$,E.contains(V)?0:1,V])}else D.colliders[P]=[-1,0];return D}function HX(e,r,t,n,o){switch(o){case"top-left":return new ot(0,0,t,n);case"top-right":return new ot(e-t,0,t,n);case"bottom-left":return new ot(0,r-n,t,n);case"bottom-right":return new ot(e-t,r-n,t,n);case"center":return new ot((e-t)/2,(r-n)/2,t,n);case"top":return new ot((e-t)/2,0,t,n);case"bottom":return new ot((e-t)/2,r-n,t,n);case"left":return new ot(0,(r-n)/2,t,n);case"right":return new ot(e-t,(r-n)/2,t,n);default:return new ot(0,r-n,t,n)}}p();p();function dO(e){let r=e[0].map(t=>{let n=t[0].map(o=>({index:o[4],boundingBox:[o[0],o[1],o[2],o[3]]}));return{enabledAndVisible:t[1]===1,rank:t[2]===1?jd:0,x:t[3],y:t[4],shouldCollideWithScreenEdges:t[5]===1,bboxes:n,lockedToStrategyIndex:t[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:r,devicePixelRatio:e[1]}}var r0=class{constructor(){m(this,"onerror",()=>{});m(this,"onmessage",()=>{});m(this,"postMessage",r=>{let t=dO(r);this.onmessage({data:cO(t.colliders,t.totalWidth,t.totalHeight,t.watermarkWidth,t.watermarkHeight,t.watermarkPosition,t.msgId)})});m(this,"terminate",()=>{})}};var Nf=!1,ZX=150,jb=class extends Je{constructor(t,n,o=!0){super();m(this,"worker");m(this,"debugContext");m(this,"debugCanvas");m(this,"collidersDirty",!0);m(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);m(this,"visibleCollidersQTree",new Wi(new ot(0,0,0,0)));m(this,"interactiveCollidersQTree",new Wi(new ot(0,0,0,0)));m(this,"coreState");m(this,"postMessage");m(this,"showCollisionBoxes",()=>{Nf=!0,this.debugCanvas.style.display="block"});m(this,"hideCollisionBoxes",()=>{Nf=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"});m(this,"currentMsgId","");m(this,"working",!1);m(this,"_postMessage",()=>{this.worker.postMessage(this.packedMessage)});m(this,"componentArray",[]);m(this,"update",(t,n,o="bottom-left",i=!1,a=[])=>{let u=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let d;for(let f of this.coreState.geometry2DsInScene)d=f.components[0],this.componentArray.push(d);this.resize(t,n,o),this.collidersDirty=!1,u=!0}else u=this.componentArray.some(d=>d.collisionDirty===!0);u&&this.componentArray.sort((d,f)=>f.rank-d.rank);let l=0;for(let d of a)this.packedMessage[0][l]==null&&(this.packedMessage[0][l]=[]),this.packedMessage[0][l][0]==null&&(this.packedMessage[0][l][0]=[]),this.packedMessage[0][l][0]=[[d.h/2,d.h/2,d.w/2,d.w/2,EI]],this.packedMessage[0][l][1]=1,this.packedMessage[0][l][2]=1,this.packedMessage[0][l][3]=d.x,this.packedMessage[0][l][4]=d.y,this.packedMessage[0][l][5]=0,this.packedMessage[0][l][6]=-1,l++;let c=0;for(;l<this.componentArray.length+a.length;){if(this.packedMessage){let d=this.componentArray[c].toPackedMessage(i&&!u);this.packedMessage[0][l]==null&&(this.packedMessage[0][l]=[]),this.packedMessage[0][l][0]==null&&(this.packedMessage[0][l][0]=[]),this.packedMessage[0][l][0]=d.bboxes,this.packedMessage[0][l][1]=d.enabled&&this.componentArray[c].visible&&!this.componentArray[c].isOccluded?1:0,this.packedMessage[0][l][2]=d.rank===jd?1:0,this.packedMessage[0][l][3]=d.x,this.packedMessage[0][l][4]=d.y,this.packedMessage[0][l][5]=d.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][l][6]=d.lockedToStrategyIndex}l++,c++}this.working||this.postMessage()});m(this,"resolve",t=>{if(this.working=!1,this.collidersDirty||!t.data)return;let n=t.data.colliders,o=-1,i,a,u,l=new ot(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new Wi(l),this.interactiveCollidersQTree=new Wi(l),Nf)for(let c of t.data.staticColliders)this.visibleCollidersQTree.insert(new ot(c.x,c.y,c.w,c.h));for(let c=0;c<this.componentArray.length;c++){let d=this.componentArray[c];if(n[c]==null)continue;o=n[c][0],i=n[c][2];let f=d.offscreen,h=n[c][1]===1;d.offscreen=h,o!==-1&&i!=null?(u=new ot(i.x,i.y,i.w,i.h,{entityId:d.id}),this.visibleCollidersQTree.insert(u),a=this.coreState.geometry2DMap.get(d.id),(a==null?void 0:a.components[1])!=null&&this.interactiveCollidersQTree.insert(u),(d.canShow===!1||d.visibilityNeedsUpdate!==!1||f&&!h)&&"visibilityNeedsUpdate"in d&&(d.visibilityNeedsUpdate="show"),o!==-1&&o!==d.currentStrategyIndex&&(d.activeBoundingBox=u,d.onStrategySelected(o))):((d.canShow===!0||d.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in d&&(d.visibilityNeedsUpdate="hide"),o!==-1&&o!==d.currentStrategyIndex&&d.onStrategySelected(o))}Nf&&this.drawDebug(),this.publish("visibility-changed")});m(this,"drawDebug",()=>{Nf&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))});m(this,"destroy",()=>{this.worker.terminate()});this.worker=o===!1?new r0:ed!==""?new Worker(ed):new Worker(URL.createObjectURL(new Blob([aO],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new r0,this.worker.onmessage=i=>this.resolve(i)},this.coreState=n,this.debugCanvas=t,this.debugContext=t.getContext("2d"),this.worker.onmessage=i=>this.resolve(i),this.postMessage=Ld(this._postMessage,ZX),Nf?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(t,n,o){this.packedMessage[6]=o,this.packedMessage[5]=n,this.packedMessage[4]=t,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};p();p();p();p();var Ub=class{constructor(r){m(this,"type");m(this,"event");this.type=0,this.event=r}get timestamp(){return this.event.timeStamp}},Gb=class{constructor(){m(this,"taps",[])}add(r){this.lastPointerDown&&r.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(r)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var r;return this.isSingleTap&&((r=this.lastPointerDown)==null?void 0:r.type)===1}get isSingleTapWithOneFinger(){var r;return this.isSingleTap&&((r=this.lastPointerDown)==null?void 0:r.type)===0}get isDoubleTapWithOneFinger(){var r,t;return this.isDoubleTap&&((r=this.taps[0])==null?void 0:r.type)===0&&((t=this.taps[1])==null?void 0:t.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(r){this.taps=this.taps.filter(t=>r-t.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};p();function SI(e){let r=new Set;for(let t of e){let n=t.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!r.has(n.parent);)n=n.parent,n instanceof un&&n.type==="group-container"&&n.visible&&n.components[0]&&r.add(n)}return Array.from(r)}var n0=class extends Je{constructor(t,n,o,i,a){super();m(this,"raycaster",new Ku);m(this,"state",{hovered3DEntity:void 0,hovered2DEntities:new Set,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});m(this,"coreState");m(this,"camera");m(this,"worldPlane");m(this,"_quadtree",new Wi(new ot(0,0,0,0)));m(this,"_container");m(this,"lastPointerEvent");m(this,"cursor","grab");m(this,"touchesCount",0);m(this,"isUserMovingCamera");m(this,"hasTouched",!1);m(this,"onPointerMove",Ld(t=>{t&&(t.preventDefault(),this.updateInteractionStateIfPanning(t),(t.pointerType!=="touch"||t.pointerType===void 0&&this.hasTouched)&&this.handleHover(t),this.handleCursor())},y.env.NODE_ENV==="test"?0:16,{leading:!0}));m(this,"tapsControl",new Gb);m(this,"onPointerDown",t=>{t.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,{capture:!1,signal:this.signal}),this._container.addEventListener("pointercancel",this.onPointerUp,{capture:!1,signal:this.signal}),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:t.timeStamp,offsetX:t.offsetX,offsetY:t.offsetY},this.lastPointerEvent=t,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),t.pointerType==="touch"&&(this.tapsControl.add(new Ub(t)),this.touchesCount=Math.max(0,this.touchesCount+1)))});m(this,"clickTimeout");m(this,"onPointerUp",t=>{this.tapsControl.discardOutsideOfWaitWindow(t.timeStamp),this.lastPointerEvent=t,this.touchesCount=Math.max(0,this.touchesCount-1),this.touchesCount===0&&(this._container.removeEventListener("pointerup",this.onPointerUp,{capture:!1}),this._container.removeEventListener("pointercancel",this.onPointerUp,{capture:!1})),this.updateInteractionStateIfPanning(t);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)&&(t.pointerType==="touch"&&!this.isUserMovingCamera()?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",t),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(t),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",t),this.flush()):this.handleClick(t)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())});m(this,"dirty3D",!0);m(this,"cachedHitBoxes",{entities:[]});m(this,"ndcPoint",new St);m(this,"debugPanel");this.isUserMovingCamera=a,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=o,this._container=t,this.coreState=n,this.worldPlane=i,this._container.addEventListener("pointerdown",this.onPointerDown,{capture:!1,signal:this.signal}),this._container.addEventListener("pointermove",this.onPointerMove,{capture:!1,signal:this.signal}),this._container.classList.add("mappedin-interactive")}updateQuadtree(t){this._quadtree=t}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let t=this.state.hovered3DEntity.components[2];t&&(t.dirty=!0)}}getThreeDIntersectsFromXY(t){this.raycaster.setFromCamera(t,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(i=>{var a,u;return((a=i.object)==null?void 0:a.name)==="worldPlane"||((u=i.object)==null?void 0:u.visible)}),o=n.findIndex(i=>{var a;return((a=i.object)==null?void 0:a.name)==="worldPlane"});return o!==-1&&n.push(n.splice(o,1)[0]),n}getGroupContainerIntersectsFromXY(t){let n=this.getThreeDIntersectsFromXY(t),o;return n!=null&&n.length>0&&(o=SI(n)),o}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(t){let n=t||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserMovingCamera())return;let{entity3D:o,entity2D:i,position:a,groupContainers:u}=this.intersect(n);(this.detect3DEntityHover(o)||this.detect2DEntityHover(i)||this.detect3DContainerHover(u))&&(this.state.hovered3DEntity=o,this.state.lastHover=o,this.state.hovered2DEntities=new Set(i.map(l=>l.id)),this.state.hovered3DContainers=u,this.publish("hover",{entity2D:i,entity3D:this.state.hovered3DEntity,position:a,groupContainers:u})),this.handleCursor()}handleCursor(){var a;let t=!!(this.state.hovered3DEntity&&((a=this.state.hovered3DEntity)!=null&&a.components[2])||this.state.hovered2DEntities.size>0),n=!!this.state.interaction.mouseDownStart,o=this.state.interaction.isPanning,i=qX(t,o,n);this.cursor!==i&&(this.cursor=i,i==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(t){if(t.length!==this.state.hovered2DEntities.size)return!0;for(let n=0;n<t.length;n++)if(!this.state.hovered2DEntities.has(t[n].id))return!0;return!1}handleClick(t){let n=this.intersect(t);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:t.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let t;for(let n of this.coreState.geometry3DIdsInScene)t=this.coreState.geometry3DMap.get(n),((t==null?void 0:t.type)==="geometry"||(t==null?void 0:t.type)==="model"||(t==null?void 0:t.type)==="path"||(t==null?void 0:t.type)==="custom-geometry")&&t.components[0].mesh&&!this.cachedHitBoxes.entities.includes(t.components[0].mesh)&&this.cachedHitBoxes.entities.push(t.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(t){var T,D,w,B,X;let{offsetX:n,offsetY:o}=t,i=[n,o],u=this._quadtree.queryPoint(i).filter(L=>L.intersectsPoint(i));this.ndcPoint.x=n/this._container.clientWidth*2-1,this.ndcPoint.y=-(o/this._container.clientHeight)*2+1;let l=this.getThreeDIntersectsFromXY(this.ndcPoint),c=(T=l[0])==null?void 0:T.point,d=[],f=[],h=l.filter(L=>L.object.name!=="worldPlane");for(let L of h)L.object instanceof tt&&L.object.material.depthTest===!1?d.push(L):f.push(L);let g=(w=(D=d[0])!=null?D:f[0])!=null?w:void 0,b,I;if(g!=null){if(b=YX(g.object,this.coreState.geometry3DMap),!b){let L=(B=g==null?void 0:g.instanceId)!=null?B:g==null?void 0:g.batchId;b=L!=null&&(g!=null&&g.object.userData.entities)?this.coreState.geometry3DMap.get(g==null?void 0:g.object.userData.entities[L]):this.coreState.geometry3DMap.get(g==null?void 0:g.object.userData.entityId)}b!=null&&b.components[2]&&(I=b)}let v=SI(h),E=[];for(let L of u)if(((X=L==null?void 0:L.userData)==null?void 0:X.entityId)==="watermark")E.push({id:"watermark"});else{let P=this.coreState.geometry2DMap.get(L==null?void 0:L.userData.entityId);P&&E.push(P)}return KX(E),{entity2D:E,entity3D:I,position:c,groupContainers:v.length>0?v:void 0}}detect3DEntityHover(t){return this.state.lastHover!==t&&(this.state.lastHover&&mO(this.state.lastHover,!1,this.coreState),t&&mO(t,!0,this.coreState)),this.state.hovered3DEntity!==t}detect3DContainerHover(t){return!$6(this.state.hovered3DContainers,t)}updateInteractionStateIfPanning(t){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(t.offsetX-this.state.interaction.mouseDownStart.offsetX,2)+Math.pow(t.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,{capture:!1}),this._container.removeEventListener("pointermove",this.onPointerMove,{capture:!1}),this._container.removeEventListener("pointerup",this.onPointerUp,{capture:!1}),this._container.removeEventListener("pointercancel",this.onPointerUp,{capture:!1}),super.destroy()}enableDebug(){let t=document.createElement("div");t.style.position="absolute",t.style.top="0",t.style.right="0",t.style.backgroundColor="white",t.style.padding="10px",document.body.append(t),t.id="interaction-debug-panel",this.debugPanel=t,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 o,i,a;this.queueDebugMessage("CLICK \n3D: ".concat((o=n.entity3D)==null?void 0:o.id," \n2D: ").concat((i=n.entity2D)==null?void 0:i.map(u=>u.id).join(", ")," \nPos: ").concat((a=n.position)==null?void 0:a.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var o,i,a;this.queueDebugMessage("HOVER \n3D: ".concat((o=n.entity3D)==null?void 0:o.id," \n2D: ").concat((i=n.entity2D)==null?void 0:i.map(u=>u.id).join(", ")," \nPos: ").concat((a=n.position)==null?void 0:a.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(t,n){var i;let o=document.createElement("pre");o.style.maxWidth="300px",o.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",o.style.backgroundColor=n,o.textContent=t,(i=this.debugPanel)==null||i.prepend(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>{o.remove()},500)},2500)}getCursor(){return this.cursor}};function mO(e,r,t){var a;let n=e.components[2];n&&n.hover!==!0&&(n.hover=r?"user-interaction":!1,n.dirty=!0);let o=(a=e.components[0].textMesh)==null?void 0:a.userData.entityId;if(!o)return;let i=t.geometry3DMap.get(o);(i==null?void 0:i.type)==="text3d"&&(i.components[1].hoverByPolygon=r,i.components[1].dirty=!0)}function qX(e,r,t){return r?"grabbing":e?"pointer":t?"grabbing":"grab"}function JX(e){let r=e;for(;r!=null&&r.parent;){if(r instanceof Yu)return;if(r.userData.isSingleModel)return r;r=r.parent}}function YX(e,r){let t=JX(e);return t?r.get(t.userData.entityId):void 0}function KX(e){if(e.length<=1)return;let r=[],t=[];for(let o=0;o<e.length;o++){let i=e[o];i.type==="marker"?r.push(i):t.push(i)}if(r.length>1){let o,i;r.sort((a,u)=>{o=a.components[0],i=u.components[0];let l=o.projection.y,c=i.projection.y;return l!==c?c-l:o.markerContainer.compareDocumentPosition(i.markerContainer)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})}if(t.length>1){let o=[];for(let i=0;i<t.length;i++){let a=t[i],u=a.components[0];o.push({entity:a,y:u.projection.y,idx:i})}o.sort((i,a)=>i.y!==a.y?a.y-i.y:a.idx-i.idx);for(let i=0;i<o.length;i++)t[i]=o[i].entity}let n=0;for(let o=0;o<r.length;o++)e[n++]=r[o];for(let o=0;o<t.length;o++)e[n++]=t[o]}p();p();var td,_l,zb,Ol,hO,i0,Vb,gO,yO,a0,$b,s0,u0,Hb,o0=class{constructor(r){M(this,Ol);M(this,td,null);M(this,_l);m(this,"getCurrentSceneGLTF",async r=>{let t=_({onlyVisible:!0,binary:!0,light:!0,scale:1},r),n=await he(this,Ol,hO).call(this),o=s(this,zb).call(this,t),i=await n.parseAsync(o,{trs:!1,maxTextureSize:1/0,onlyVisible:t.onlyVisible,binary:t.binary,scale:t.scale}),a;if(i instanceof ArrayBuffer)a=new Blob([i],{type:"application/octet-stream"});else{let u=JSON.stringify(i,null,2);a=new Blob([u],{type:"text/plain"})}return a});M(this,zb,r=>{let{scale:t,light:n,onlyVisible:o}=r,i=new Yu,a=new Zr().setFromObject(s(this,_l).geometryScene);if(s(this,i0).call(this,s(this,_l).geometryScene,i,o),n){let u=new qg(16777215,.3*Math.PI);u.position.set(0,Math.max(a.max.x,a.max.y)*t*.5,a.max.y*t*4),u.lookAt(0,0,-1),u.target.position.set(0,0,-1),u.add(u.target),i.add(u)}return i});M(this,i0,(r,t,n)=>{r.material&&(r instanceof Hg?he(this,Ol,gO).call(this,r).forEach(o=>t.add(o)):r instanceof Za&&t.add(he(this,Ol,yO).call(this,r))),r.children.forEach(o=>{(!n||o.visible)&&s(this,i0).call(this,o,t,n)})});M(this,Vb,(r,t,n)=>{let o=new wm({color:new or(r),metalness:0});return o.opacity=t,o.transparent=n,o});M(this,a0,r=>{let{geometry:t,material:n,position:o,rotation:i,quaternion:a,scale:u}=r;if(!(t!=null&&t.isBufferGeometry))return r;let l=t.attributes.position,c=t.attributes.normal,d=t.attributes.uv;return s(this,$b).call(this,l,c),s(this,u0).call(this,o,u,i,a),d&&s(this,Hb).call(this,d),n!=null&&n.map&&t.type==="PlaneGeometry"&&(r.side=Qo),r});M(this,$b,(r,t)=>{let n=new Ce,o=new Ce;for(let i=0;i<r.count;i++)n.fromBufferAttribute(r,i),s(this,s0).call(this,n),r.setXYZ(i,n.x,n.y,n.z),t&&(o.fromBufferAttribute(t,i),s(this,s0).call(this,o),t.setXYZ(i,o.x,o.y,o.z))});M(this,s0,r=>{let t=r.y;r.y=r.z,r.z=-t});M(this,u0,(r,t,n,o)=>{let i=r.y;r.y=r.z,r.z=-i;let a=t.y;if(t.y=t.z,t.z=a,n instanceof Pd)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let u=o.y;o.set(o.x,o.z,-u,o.w)}});M(this,Hb,r=>{for(let t=0;t<r.count;t++){let n=r.getX(t),o=r.getY(t);r.setXY(t,n,o)}});k(this,_l,r)}destroy(){k(this,td,null)}};td=new WeakMap,_l=new WeakMap,zb=new WeakMap,Ol=new WeakSet,hO=async function(){if(!s(this,td)){let{GLTFExporter:r}=await import("./GLTFExporter-YBUTSNFK.js");k(this,td,new r)}return s(this,td)},i0=new WeakMap,Vb=new WeakMap,gO=function(r){var a,u;let t=[],o=((a=r.userData)!=null&&a.entities?Object.values((u=r.userData)==null?void 0:u.entities):[]).map(l=>s(this,_l).geometry3DMap.get(l)),i=new Map;return o.forEach(l=>{var g;if(!l||!(l instanceof Yt))return;let c=l.components[1],d=l.components[2];if(!c.visible||c instanceof Ya&&c.opacity===0||c instanceof km||c instanceof oy)return;let f=d!=null&&d.hover?c.hoverColor||s(this,_l).hoverColor:c.color,h="".concat(f,"-").concat(c.opacity,"-").concat(Number(c.visible));i.has(h)||i.set(h,[]),(g=i.get(h))==null||g.push(l)}),i.forEach((l,c)=>{let[d,f,h]=c.split("-"),g=l.reduce((E,T)=>{if(T.type==="custom-geometry")return E;let D=T.components[0];return"geometry"in D&&D.geometry instanceof Ju&&E.push(D.geometry),E},[]);if(g.length===0){K.error("No geometries found for batched mesh");return}let b=s(this,Vb).call(this,d,Number(f),r.material.transparent),I=Si(g,!0);if(!I){K.error("No merged geometry found for batched mesh");return}let v=new tt(I,b);v.position.copy(r.position),v.rotation.copy(r.rotation),v.scale.copy(r.scale),v.visible=!!h,s(this,u0).call(this,v.position,v.scale,v.rotation,v.quaternion),t.push(s(this,a0).call(this,v))}),t},yO=function(r){let t=r.geometry.clone(),n=r.material,o=new on({color:n.color,side:Qo});o.opacity=n.opacity,o.transparent=n.transparent;let i=new Za(t,o);return i.position.copy(r.position),i.rotation.copy(r.rotation),i.scale.copy(r.scale),i.visible=r.visible,s(this,a0).call(this,i)},a0=new WeakMap,$b=new WeakMap,s0=new WeakMap,u0=new WeakMap,Hb=new WeakMap;p();p();var QX="gray",eq=.1,l0=100,CI=new Ja.ClipperOffset;function tq(e,r){CI.Clear(),r/=2;let t=e.map(o=>({X:o.x*l0,Y:o.y*l0}));CI.AddPath(t,Ja.JoinType.jtMiter,Ja.EndType.etClosedPolygon);let n=new Ja.Paths;return CI.Execute(n,r*l0),n.length?n.map(i=>i.map(a=>({x:a.X/l0,y:a.Y/l0}))):[e]}function Wb(e,r,t){var g,b,I,v,E;let{color:n=QX,opacity:o=1,altitude:i=0,height:a=eq}=t||{};Array.isArray(o)&&(o=1);let u={min:{x:1/0,y:1/0,z:i},max:{x:-1/0,y:-1/0,z:a+i},center:{x:0,y:0,z:(a+i)/2}},c=e.geometry.coordinates[0].map(T=>{let D=r(T[1],T[0]);return u.min.x=Math.min(u.min.x,D.x),u.min.y=Math.min(u.min.y,D.y),u.max.x=Math.max(u.max.x,D.x),u.max.y=Math.max(u.max.y,D.y),D});((b=(g=e.properties)==null?void 0:g.style)==null?void 0:b.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((I=e.properties)==null?void 0:I.image)!=null?c=tq(c,((E=(v=e.properties)==null?void 0:v.style)==null?void 0:E.edgeOffset)||0):c=[c];let d=[];for(let T of c){let D=new Fd;D.moveTo(T[0].x,T[0].y),T.slice(1).forEach(L=>D.lineTo(L.x,L.y)),D.lineTo(T[0].x,T[0].y);let w=e.geometry.coordinates.slice(1);D.holes=w.map(L=>{let P=L.map($=>r($[1],$[0])),R=new Od;return R.moveTo(P[0].x,P[0].y),P.slice(1).forEach($=>R.lineTo($.x,$.y)),R.lineTo(P[0].x,P[0].y),R});let B=Fm(t==null?void 0:t.bevel,a),X=new kd(D,B);X.userData={style:{color:n,opacity:o},usedBevelSettings:B},d.push(X)}if(d.length===1)return d[0];let f=Si(d);d.forEach(T=>T.dispose());let h=Fm(t==null?void 0:t.bevel,a);return f.userData={style:{color:n,opacity:o},usedBevelSettings:h,_split:!0},f}p();var rq="gray",nq=.1;function Xb(e,r,t){let{color:n=rq,opacity:o=1,altitude:i=0,height:a=nq}=t||{};Array.isArray(o)&&(o=1);let u={min:{x:1/0,y:1/0,z:i},max:{x:-1/0,y:-1/0,z:a+i}},l=Fm(t==null?void 0:t.bevel,a),c=[];e.geometry.coordinates.forEach(f=>{let h=new Fd,g=f[0].map(v=>{let E=r(v[1],v[0]);return u.min.x=Math.min(u.min.x,E.x),u.min.y=Math.min(u.min.y,E.y),u.max.x=Math.max(u.max.x,E.x),u.max.y=Math.max(u.max.y,E.y),E});h.moveTo(g[0].x,g[0].y),g.slice(1).forEach(v=>h.lineTo(v.x,v.y)),h.lineTo(g[0].x,g[0].y);let b=f.slice(1);h.holes=b.map(v=>{let E=v.map(D=>r(D[1],D[0])),T=new Od;return T.moveTo(E[0].x,E[0].y),E.slice(1).forEach(D=>T.lineTo(D.x,D.y)),T.lineTo(E[0].x,E[0].y),T});let I=new kd(h,l);c.push(I)});let d=Si(c);return c.forEach(f=>f.dispose()),d.translate(0,0,i||0),d.userData={style:{color:n,opacity:o},usedBevelSettings:l},d}p();var Do=100,oq=.22,iq=.01;function bO(e,r,t={}){let{width:n=oq,height:o=iq,color:i="gray",opacity:a=1,altitude:u=0}=t,l={min:{x:1/0,y:1/0,z:u},max:{x:-1/0,y:-1/0,z:u+o}},c={bevelEnabled:!1,depth:o},d=new Ja.ClipperOffset,f=e.geometry.coordinates.map(I=>I.map(v=>r(v[1],v[0])));d.AddPaths(f.map(I=>I.map(v=>({X:v.x*Do,Y:v.y*Do}))),Ja.JoinType.jsMiter,Ja.EndType.etOpenRound);let h=new Ja.PolyTree;d.Execute(h,n/2*Do);let g=[];for(let I of h.m_AllPolys){let v=new Fd;if(I.IsHole())continue;l.min.x=Math.min(l.min.x,I.m_polygon[0].X),l.min.y=Math.min(l.min.y,I.m_polygon[0].Y),l.max.x=Math.max(l.max.x,I.m_polygon[0].X),l.max.y=Math.max(l.max.y,I.m_polygon[0].Y);let E=I.m_polygon;v.moveTo(E[0].X/Do,E[0].Y/Do),E.slice(1).forEach(T=>v.lineTo(T.X/Do,T.Y/Do)),v.lineTo(E[0].X/Do,E[0].Y/Do),v.holes=I.m_Childs.map(T=>{let D=new Od,w=T.m_polygon;return D.moveTo(w[0].X/Do,w[0].Y/Do),w.slice(1).forEach(B=>D.lineTo(B.X/Do,B.Y/Do)),D.lineTo(w[0].X/Do,w[0].Y/Do),D}),g.push(new kd(v,c))}let b=Si(g);return b.translate(0,0,u||0),b.userData={style:{color:i,opacity:a}},d.Clear(),b}p();p();import{z as qb}from"zod";var jf=qb.object({type:qb.enum(["Point"]),coordinates:qb.array(qb.number()).min(2).max(3)});import{z as ar}from"zod";var DI=ar.object({rotation:ar.array(ar.number()).length(3).optional(),altitude:ar.number().optional(),scale:ar.array(ar.number()).length(3).optional(),interactive:ar.boolean().optional(),verticalOffset:ar.number().optional(),id:ar.union([ar.number(),ar.string()]).optional()}),aq=ar.object({type:ar.enum(["Feature"]),geometry:jf,properties:DI}),sq=ar.object({type:ar.enum(["FeatureCollection"]),features:ar.array(aq)}),TI=ar.object({color:ar.string()}),uq=ar.object({url:ar.string(),color:ar.string().optional(),opacity:ar.number().optional(),material:ar.record(ar.string(),TI).optional()});function xO(e,r,t){ar.union([ar.number(),ar.string()]).parse(e),sq.parse(r),uq.parse(t)}var c0,d0,p0,Uf,Da,Fl=class{constructor(r){m(this,"mesh");m(this,"type","model");m(this,"positionDirty",!0);m(this,"outline");m(this,"geometry");m(this,"material");m(this,"feature");m(this,"instanceIndex",-1);M(this,c0,!0);m(this,"color",new or);m(this,"clippingPlane");m(this,"position",new Ce);M(this,d0,0);M(this,p0,1);M(this,Uf,In.GEOMETRY);M(this,Da,!1);this.feature=r}get visible(){var r,t;return(t=(r=this.mesh)==null?void 0:r.visible)!=null?t:s(this,c0)}set visible(r){k(this,c0,r),this.mesh&&(this.mesh.visible=r)}setOpacity(){}setColor(){}get modelScene(){var r;return this.clippingPlane?(r=this.mesh)==null?void 0:r.children.find(t=>t.name!=="hole-fill-mesh"):this.mesh}get altitude(){return s(this,d0)}set altitude(r){this.modelScene&&(this.modelScene.position.z=r,k(this,d0,r))}getRotation(){return this.modelScene?[this.modelScene.rotation.x,this.modelScene.rotation.y,this.modelScene.rotation.z]:void 0}setRotation(r){this.modelScene&&this.modelScene.rotation.set(It.degToRad(r[0]),It.degToRad(r[1]),It.degToRad(r[2]))}getScale(){return this.modelScene?[this.modelScene.scale.x,this.modelScene.scale.y,this.modelScene.scale.z]:void 0}setScale(r){var t;this.modelScene&&((t=this.modelScene)==null||t.scale.set(r[0],r[1],r[2]))}get opacity(){return s(this,p0)}set opacity(r){var t,n,o;if(this.mesh){if(this.mesh.children[0]instanceof Ha){for(let i of this.mesh.children)if(i instanceof Ha){((t=i.userData)==null?void 0:t.originalOpacity)===void 0&&(i.userData.originalOpacity=i.material.opacity);let a=rc(r,0,(n=i.userData)==null?void 0:n.originalOpacity,0,1);i.material.opacity=a,i.material.transparent=a<1,i.material.needsUpdate=!0}}else(o=this.mesh)==null||o.traverse(i=>{i instanceof tt&&i.material&&(Array.isArray(i.material)?i.material.forEach(a=>{vO(a,r)}):vO(i.material,r))});k(this,p0,r)}}get renderOrder(){return s(this,Uf)}set renderOrder(r){var t;if(!(!this.mesh||r===s(this,Uf)))if(k(this,Uf,r),this.mesh.children[0]instanceof Ha){this.mesh.renderOrder=r;for(let n of this.mesh.children)n instanceof Ha&&(n.material.depthWrite=!s(this,Da),n.material.depthTest=!s(this,Da),n.material.needsUpdate=!0)}else(t=this.mesh)==null||t.traverse(n=>{n instanceof tt&&n.material&&(n.renderOrder=r,Array.isArray(n.material)?n.material.forEach(o=>{o.depthWrite=!s(this,Da),o.depthTest=!s(this,Da),o.needsUpdate=!0}):(n.material.depthWrite=!s(this,Da),n.material.depthTest=!s(this,Da),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,Da)}set visibleThroughGeometry(r){k(this,Da,r)}};c0=new WeakMap,d0=new WeakMap,p0=new WeakMap,Uf=new WeakMap,Da=new WeakMap;function vO(e,r){e.opacity!==r&&(r===1?(e.opacity=1,e.transparent=!1):(e.opacity=r,e.transparent=!0),e.needsUpdate=!0)}p();function Jb(e){var u,l;let r=e.components[0],t=e.components[1];t.opacity!=null&&t.opacity!==r.opacity&&(r.opacity=t.opacity);let n=t.material,o=t.color;if(n||o){let c=lq(o,n);(u=r.mesh)==null||u.traverse(d=>{d instanceof tt&&d.material&&(Array.isArray(d.material)?d.material.forEach(f=>{c[f.name]?(f.color.set(c[f.name].color),f.vertexColors=!1):f.color.set(o)}):c[d.material.name]?(d.material.color.set(c[d.material.name].color),d.material.vertexColors=!1):d.material.color.set(o))})}let i=(l=r.feature.geometry.coordinates[2])!=null?l:0,a=t.verticalOffset+i;r.altitude!==a&&(r.altitude=a),t.visible!==r.visible&&(r.visible=t.visible),t.rotation&&r.setRotation(t.rotation),t.scale&&r.setScale(t.scale),t.visibleThroughGeometry!==r.visibleThroughGeometry&&(r.visibleThroughGeometry=t.visibleThroughGeometry)}function lq(e,r){let t={};if(r)for(let n in r)r[n].color&&(t[n]={color:r[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let o of n)t[o]||(t[o]={color:e})}return t}function EO(e,r){var a,u;let t=e.components[0],o=(a=e.components[1].verticalOffset)!=null?a:0,i=t.feature.geometry.coordinates.slice();i[2]=((u=i[2])!=null?u:0)+o,t.mesh?t.mesh.position.copy(r(i)):t.position.copy(r(i))}function Du(e){return e instanceof sn?e.material:null}function IO(e){return e.side===Sm?"back":e.side===Ql?"front":"double"}function SO(e,r){e.side=r==="back"?Sm:r==="front"?Ql:Qo}function cq(e){let r=e[1],t=e[6],{opacity:n}=r!=null?r:{},{texture:o,topTexture:i}=t!=null?t:{};return"".concat(n).concat((o==null?void 0:o.path)||"").concat((i==null?void 0:i.path)||"")}var Yb=class extends Je{constructor(t,n){super();m(this,"state");m(this,"convertTo3DMapPosition");m(this,"loader");m(this,"optimizePromise",[]);this.state=t,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:t}=await import("./GLTFLoader-HYRFLHS7.js");return this.loader=new t,this.loader}createEntityFromFeature(t,n,o){var d,f,h,g;let i=new sn(n),a=(d=n==null?void 0:n.properties)==null?void 0:d.bevel,u=o&&"bevel"in o?o.bevel:void 0,l;u?l=_(_({},a),u):a&&(l=a);let c=new Yt(i,new Ya(ne(_({},o),{url:(h=(f=n.properties)==null?void 0:f.image)==null?void 0:h.path,bevel:l})));return o!=null&&o.outline&&(c.components[3]=new OC(kC(o.color))),o!=null&&o.focusable&&(c.components[4]=new UC),((g=n.properties)==null?void 0:g.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?c.components[6]=new ic(n.properties.textures.find(b=>b.face==="side"),n.properties.textures.find(b=>b.face==="top")):(o!=null&&"texture"in o&&o.texture!=null||o!=null&&"topTexture"in o&&o.topTexture!=null)&&(c.components[6]=new ic(o.texture,o.topTexture)),c.id=t,c}createModelFromFeature(t,n,o){let i=new Fl(n),a=_({},o);n.properties.verticalOffset!=null&&(a.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(a.rotation=n.properties.rotation),n.properties.scale!=null&&(a.scale=n.properties.scale);let u=new oy(a),l=new Yt(i,u);return l.id=t,l}populateEntityMesh(t,n){let o=t.components[0];o.geometry=n,o.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},o.currentHeight=t.components[1].height,o.dirty=!1}async populateModelGroup(t,n,o){let i=new wr,a=new Pd,u=new Vg,l=new Ce,c=new tl,d=await this.getGLTFLoader(),f=new Promise(h=>{let g=b=>{"entities3D"in o.userData&&(o.userData.entities3D.size>1?b.scene.traverse(I=>{let v=I;if("isMesh"in v&&v.isMesh===!0){let E=new Ha(v.geometry,v.material,t.size);E.userData={entities:{}},c.add(E),o.add(c)}}):(b.scene.traverse(I=>{"isMesh"in I&&I.isMesh===!0&&(I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),I.updateMatrix())}),c.add(b.scene),o.add(c),c.userData.isSingleModel=!0,c.userData.entityId=t.values().next().value,c.userData.type="model")),h()};LC(n)?d.parse(RC(n),"",g):NC(n)?d.parse(jC(n),"",g):d.load(n,g)});return this.optimizePromise.push(f.then(()=>{var b,I,v,E,T,D,w,B,X,L,P,R;let h=0,g;for(let $ of t.values()){if(g=this.state.geometry3DMap.get($),!g||(g==null?void 0:g.type)!=="model")continue;let V=g.components[0],H=g.components[1],re=g.components[0].feature;V.mesh=c,V.instanceIndex=h,Jb(g),g.components[1].dirty=!1;let{x:j,y:me}=this.convertTo3DMapPosition(re.geometry.coordinates[1],re.geometry.coordinates[0],0);V.position.set(j,me,V.altitude),a.set(It.degToRad((I=(b=H.rotation)==null?void 0:b[0])!=null?I:$d[0]),It.degToRad((E=(v=H.rotation)==null?void 0:v[1])!=null?E:$d[1]),It.degToRad((D=(T=H.rotation)==null?void 0:T[2])!=null?D:$d[2])),l.set((B=(w=H.scale)==null?void 0:w[0])!=null?B:Vd[0],(L=(X=H.scale)==null?void 0:X[1])!=null?L:Vd[1],(R=(P=H.scale)==null?void 0:P[2])!=null?R:Vd[2]),u.setFromEuler(a),i.compose(V.position,u,l),c.children.forEach(z=>{!g||(g==null?void 0:g.type)!=="model"||!(z instanceof Ha)||(z.setMatrixAt(h,i),z.userData.entities[h]=g.id)}),V.mesh.userData.isSingleModel&&(V.mesh.matrix.copy(i),V.mesh.matrix.decompose(V.mesh.position,V.mesh.quaternion,V.mesh.scale)),h++}this.publish("model-loaded")})),c}populateEntityGroup(t){var u;let n,o,i,a;for(let l of t.values())a=this.state.geometry3DMap.get(l),a.components[0]instanceof sn&&(o=a.components[0].feature,i=a.components[1],o.geometry.type==="Polygon"?(n=Wb(o,this.convertTo3DMapPosition,i),(u=o.properties)!=null&&u.textures&&o.properties.textures.length>0&&BC(n,o.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(a,n)):o.geometry.type==="MultiPolygon"?(n=Xb(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="LineString"?(n=sD(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="MultiLineString"&&(n=bO(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)));return t}update(){var t;for(let n of this.state.geometryGroupIdsToLoad.values()){let o=this.state.geometry3DMap.get(n);if(o instanceof Ka&&o.userData.dirty){if(o.userData.modelURL)o.userData.modelURL&&(this.populateModelGroup(o.userData.entities3D,o.userData.modelURL,o),o.userData.dirty=!1);else try{this.populateEntityGroup(o.userData.entities3D)}catch(u){K.warn(u)}let i,a={};for(let u of o.userData.entities3D.values()){i=this.state.geometry3DMap.get(u);let l=i==null?void 0:i.components[0];if((i==null?void 0:i.type)==="geometry"){let c=cq(i.components);a[c]===void 0&&(a[c]={style:i.components[1],entities:[]}),a[c].entities.push(i)}else l&&"mesh"in l&&l.mesh&&((t=l.mesh)==null?void 0:t.parent)!==o&&o.add(l.mesh)}for(let u in a){let l=FC(a[u].entities,a[u].style);o.add(l)}for(let u of o.userData.entities3D.values())if(i=this.state.geometry3DMap.get(u),i!=null&&i.entities2D.size>0)for(let l of i.entities2D.values())l&&(i.attach(l),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),o.userData.dirty=!1}}return Promise.resolve()}};p();var Kb=class{constructor(r,t){m(this,"state");m(this,"dirty",!0);m(this,"domTree");this.state=r,this.domTree=t}update(){if(this.dirty){let r;for(let t of Array.from(this.domTree.children))if(r=this.state.geometry2DMap.get(t.userData.entityId),r){let n=r.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(t.userData.entityId))&&this.domTree.removeChild(t)}else this.domTree.removeChild(t);for(let t of this.state.geometry2DIdsInScene)if(r=this.state.geometry2DMap.get(t),r){let n=r.components[0];n instanceof $s&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:r.id},this.domTree.appendChild(n.markerContainer),n.updateDimensionsIfZeroWidthHeight())}this.dirty=!1}}};p();var Qb=class{constructor(r,t){m(this,"state");m(this,"project");this.state=r,this.project=t}update(){let r=0,t=0,n,o;for(let i of this.state.geometry2DsInScene){o=i.components[0];let a=i.attachedTo?this.state.geometry3DMap.get(i.attachedTo):void 0;if(a instanceof Yt)if(this.state.geometry3DsInScene.has(a)){n=a.components[1],o=i.components[0],(n.dirty||i.components[0].attachedDirty)&&(r=n.height,t=n.altitude,i.setAltitude(r+t));let u=n.visible;o.visible!==u&&(o.visible=u)}else o.visible===!0&&(o.visible=!1);this.project(i.components[0].projection,i.position),i.components[0].attachedDirty=!1}}};p();p();p();var dq=function(){let r,t;return n=>{if((!t||!t)&&(r=document.createElement("canvas"),r.width=500*n,r.height=500*n,r.style.width="500px",r.style.height="500px",t=r.getContext("2d")),!t)throw new Error("Could not get 2D context");return{measureCanvas:r,measureCanvasContext:t}}}(),CO=({text:e,size:r,maxWidth:t,pixelRatio:n,maxLines:o=2,lineHeight:i=1.2,options:a={strokeText:!0}})=>{let u="bold ".concat(r*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:l}=dq(n);l.font=u;let c=[],d=e.split(" "),f=0,h=0,g=0;for(;h<d.length;){let E=d[h];if(f===o&&f>0){c[f-1]+="...";break}if(c[f]==null&&(c[f]=E,h++),d.length===1){c[f]=E;break}if(d[h]==null)break;let{width:T}=l.measureText(c[f]+" "+d[h]);T<=t*n?(c[f]+=" "+d[h],h++):f++}c.forEach(E=>{let{width:T}=l.measureText(E);g=Math.max(T,g)});let b=r*n*i,I=c.length*b;return{maxWidth:g,maxHeight:I,lines:c.length,draw:(E,T,D)=>{c.length===1?(a.strokeText&&E.strokeText(c[0],T,D),E.fillText(c[0],T,D)):(a.strokeText&&(E.strokeText(c[0],T,D-b/2),E.strokeText(c[1],T,D+b/2)),E.fillText(c[0],T,D-b/2),E.fillText(c[1],T,D+b/2))}}};p();function DO(e){let r=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?r.src="data:image/svg+xml;base64,".concat(btoa(e)):r.src=e),r}p();var pq=(()=>{let e;return{getDeviceType(){if(e)return e;let{userAgent:r,platform:t,maxTouchPoints:n}=window.navigator,o=/(iphone|ipod|ipad)/i.test(r),i=t==="iPad"||t.indexOf("Mac")===0&&n>0&&!window.MSStream,a=/android/i.test(r);return e={isIpad:i,isMobile:a||o||i,isIOS:o,isAndroid:a,isSafari12:/Version\/12.+Safari/.test(r),isFirefox:/Firefox/.test(r),isWindows:/windows/i.test(r)},e},_reset(){e=void 0}}})(),TO=pq.getDeviceType,wO=(()=>{let e,r,t;function n(){if(r!==void 0)return r;e||(e=document.createElement("canvas"));let i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return r;try{let a=TO().isFirefox?null:i.getExtension("WEBGL_debug_renderer_info");return r=a?i.getParameter(a.UNMASKED_RENDERER_WEBGL):i.getParameter(i.RENDERER),r}catch(a){let u=new Error("Failed getting device info");throw u.name="FailedGettingDeviceInfo",u}}function o(){var a,u;if(!TO().isWindows)return!1;if(t!==void 0)return t;let i=(u=(a=fq())==null?void 0:a.toLowerCase())!=null?u:"";return t=i.includes("intel")&&(i.includes("uhd")||i.includes("iris")),t}return{getInfo:n,shouldDisableOffscreenCanvas:o,_setCanvas(i){e=i,r=void 0,t=void 0}}})(),fq=wO.getInfo,MO=wO.shouldDisableOffscreenCanvas;var e4=class extends Je{constructor(t,n,o){super();m(this,"dirty",!1);m(this,"state");m(this,"colliderContext");m(this,"colliderCanvas");m(this,"transformRequestFunc");m(this,"transformRequest",async t=>this.transformRequestFunc?await this.transformRequestFunc(t):{url:t});m(this,"pinCache",{});m(this,"imageCache",{});m(this,"imagePromiseCache",{});m(this,"imageDimensionsCache",{});m(this,"textCache",{});m(this,"update",t=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let o,i,a,u,l,c;for(let d of this.state.geometry2DsInScene)if((d==null?void 0:d.components[0])instanceof Vs&&!d.disposed){if(c=d.components[0],l=c.appearance.iconVisible,c.appearance.icon!=null&&l!=null){let h=typeof l=="boolean"?l:t>=l;h!==c.iconVisible&&(c.iconVisible=h,c.dirty=!0)}if((c.pinDirty||c.dirty||this.dirty)&&c.calculatePinSize(),c.offscreen||!c.visible)continue;if(i={active:c.appearance.pinColor,inactive:c.appearance.pinColorInactive},a={active:c.appearance.pinOutlineColor,inactive:c.appearance.pinOutlineColorInactive},u=Sx(c.pinSize),o="".concat(i.active,"-").concat(i.inactive,"-").concat(a.active,"-").concat(a.inactive,"-").concat(u,"-").concat(c.iconVisible),c.labelCacheId=o,(!this.pinCache[o]||this.dirty)&&(this.prepare(c,o,this.colliderContext),c.dirty=!0),(c.appearance.icon&&(!c.imageHash||c.pinDirty)||this.dirty)&&this.cacheImage(c),this.textCache[c.id]==null||c.textDirty||this.dirty){c.dirty=!0,this.textCache[c.id]={};let{textDrawFn:h,width:g,height:b}=this.processText(c.text,c.appearance.textSize,c.appearance.maxWidth,c.appearance.maxLines,c.appearance.lineHeight);["left","center","right"].forEach(I=>{this.textCache[c.id][I]=this.textToCanvas(h,c.appearance.textSize,I,g,b,c.appearance.textColor,c.appearance.textOutlineColor)}),c.dimensions={width:Math.ceil(g/n),height:Math.ceil(b/n)}}let f=1;if(c.appearance.iconScale)if(typeof c.appearance.iconScale=="number")f=c.appearance.iconScale;else{let{on:h,input:g,output:b,easing:I}=c.appearance.iconScale;h==="zoom-level"?f=Sx(Q6(t,g,b,I!=null?I:"linear")):K.warn("Unsupported interpolation property: ".concat(h))}c.recomputeCurrentStrategy(c.iconVisible?f:1),c.canShow&&(c.enabled||c.visibilityNeedsUpdate!==!1)&&this.draw(c,o,this.colliderContext),c.textDirty=!1,c.pinDirty=!1}this.dirty=!1});m(this,"processText",(t,n,o,i,a)=>{let u=this.state.pixelRatio,{draw:l,maxWidth:c,maxHeight:d}=CO({text:t,size:n,pixelRatio:u,maxWidth:o,maxLines:i,lineHeight:a});return{textDrawFn:l,width:c+2.5*u*2,height:d+2.5*u*2}});m(this,"textToCanvas",(t,n,o,i,a,u,l)=>{let c=this.state.pixelRatio,d,f=i,h=a;window.OffscreenCanvas!=null&&!MO()?d=new OffscreenCanvas(f,h):(d=document.createElement("canvas"),d.width=f,d.height=h,d.style.width=f+"px",d.style.height=h+"px");let g=d.getContext("2d",{willReadFrequently:!0});if(!g)return;let b=2.5*c;g.textAlign=o,g.font="bold ".concat(n*c,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),g.textBaseline="middle",g.lineJoin="miter",g.miterLimit=2,g.strokeStyle="white",g.lineWidth=b,g.fillStyle=u,g.strokeStyle=l;let I=o==="left"?b/2:o==="center"?f/2:f-b/2;return t(g,I,(h+b/2)/2),d});m(this,"cacheImage",t=>{if(!t.appearance.icon)return;let n=IC(t.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(o=>{this.transformRequest(t.appearance.icon).then(i=>{let a=DO(i.url);a.onload=()=>{this.imageCache[n]=a,this.publish("img:loaded"),o(a)}})})),t.imageHash!==n&&(t.imageHash=n,this.imagePromiseCache[n].then(()=>{t.dirty=!0}))});m(this,"createPinCanvas",(t,n,o,i,a=1)=>{let u,l=this.state.pixelRatio,c=t.totalPinSize*2*l*a;window.OffscreenCanvas!=null?u=new OffscreenCanvas(c,c):(u=document.createElement("canvas"),u.width=c,u.height=c,u.style.width=c/l+"px",u.style.height=c/l+"px");let d=u.getContext("2d");return d.shadowColor="rgba(0,0,0,0.3)",d.shadowOffsetY=2*l,d.shadowBlur=5*l,d.beginPath(),d.arc(c/2,c/2,(n/2+2.5*l/2)*a,0,2*Math.PI),d.fillStyle=o,d.fill(),d.beginPath(),d.arc(c/2,c/2,n/2*a,0,2*Math.PI),d.shadowColor="transparent",d.fillStyle=i,d.fill(),u});m(this,"prepare",(t,n,o)=>{let i=this.state.pixelRatio;o.lineWidth=4*i;let a=typeof t.appearance.iconScale=="number"?[t.appearance.iconScale]:t.appearance.iconScale==null?[]:t.appearance.iconScale.output,u=a.length>0?Math.max(...a):void 0,l=this.createPinCanvas(t,t.pinSize,t.appearance.pinOutlineColor,t.appearance.pinColor,u),c=this.createPinCanvas(t,3.5*i,t.appearance.pinOutlineColorInactive,t.appearance.pinColorInactive,u);this.pinCache[n]=[l,c]});this.state=t,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=o}draw(t,n,o){var d;if(!t.canShow||!t.visible)return;o.save(),o.globalAlpha=t.currentOpacity;let i=this.state.pixelRatio,a=t.projection.x*i,u=t.projection.y*i,l=t.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],c=t.style.pinVisibility===1?t.scaledPinSize*i:t.totalPinSize*i;if(t.style.pinVisibility!==0&&o.drawImage(l,a-c,u-c,c*2,c*2),t.appearance.icon&&t.iconVisible&&t.imageHash&&t.appearance.iconSize&&this.imageCache[t.imageHash]&&t.style.pinVisibility===1){let f=this.imageCache[t.imageHash],h=(t.scaledPinSize-t.scaledIconPadding)*i,g=t.appearance.iconFit,b=h,I=h,v="".concat(t.imageHash,"_").concat(g);if(this.imageDimensionsCache[v])b=this.imageDimensionsCache[v].width,I=this.imageDimensionsCache[v].height;else{let E=f.width*i,T=f.height*i;if(g==="contain"){let D=Math.sqrt(E**2+T**2),w=h/D;b=E*w,I=T*w}if(g==="cover"){let D=h/E,w=h/T,B=Math.max(D,w);b=E*B,I=T*B}}o.save(),o.beginPath(),o.arc(a,u,h/2,0,2*Math.PI),o.closePath(),((d=t==null?void 0:t.appearance)==null?void 0:d.iconOverflow)!=="visible"&&o.clip(),o.drawImage(f,a-b/2,u-I/2,b,I),o.restore()}t.style.textLabelVisible&&t.style.textAlign!=null&&t.style.left!=null&&t.style.top!=null&&o.drawImage(this.textCache[t.id][t.style.textAlign],a+t.style.left*i,u+t.style.top*i),o.restore()}};p();function bq(e,r){let t=e.components[2],n=e.components[1];return t!=null&&t.hover?[n.hoverColor||r,n.hoverColor||r]:[n.color,n.topColor||n.color]}var t4=class{constructor(r,t){m(this,"state");m(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=t,this.state=r}determineTextureVisiblity(r,t,n){let o=Du(r);((o==null?void 0:o.texture)!=null||(o==null?void 0:o.topTexture)!=null)&&(n!=null&&n.hover&&o.texturesVisible?o.hideTextures(r.instanceIndex):o.texturesVisible||o.showTextures(r.instanceIndex),t.texture==null&&o.removeSideTexture(r.instanceIndex),t.topTexture==null&&o.removeTopTexture(r.instanceIndex))}update(){var n,o,i,a,u,l,c,d,f,h,g,b,I,v,E,T,D,w,B,X,L;let r,t;for(let P of this.state.geometry3DsInScene)if((P.type==="geometry"||P.type==="custom-geometry")&&((n=P.components[1])!=null&&n.dirty||(o=P.components[2])!=null&&o.dirty)){let R=P.components[0],$=P.components[1];t=P.components[2];let V=bq(P,this.state.hoverColor);R.setColor(V[0],V[1]);let H=Du(R);if($.visible!==R.visible&&(R.visible=$.visible,R instanceof sn&&R.textMesh)){let j=this.state.geometry3DMap.get(R.textMesh.userData.entityId);(j==null?void 0:j.type)==="text3d"&&j.components[0].polygonEntityId!=null&&(j.components[0].visible=$.visible)}$.altitude!==R.altitude&&(R.altitude=$.altitude);let re=$.opacity*Gd(P);if(re!==R.opacity&&(R.opacity=re),$.renderOrder!==R.renderOrder&&(R.renderOrder=$.renderOrder),H&&$.side!==IO(H)&&SO(H,$.side),R instanceof sn&&$.shading!=null&&(((i=$.shading)==null?void 0:i.start)!==((a=Du(R))==null?void 0:a.getGradientShading().start)||((u=$.shading)==null?void 0:u.end)!==((l=Du(R))==null?void 0:l.getGradientShading().end)||((c=$.shading)==null?void 0:c.intensity)!==((d=Du(R))==null?void 0:d.getGradientShading().intensity))&&((E=Du(R))==null||E.setGradientShading((h=(f=$.shading)==null?void 0:f.start)!=null?h:0,(b=(g=$.shading)==null?void 0:g.end)!=null?b:0,(v=(I=$.shading)==null?void 0:I.intensity)!=null?v:0)),$.dirty=!1,R instanceof sn){let j=P.components[6];j instanceof ic&&this.determineTextureVisiblity(R,j,t)}P.components[2]&&(P.components[2].dirty=!1)}else if((P==null?void 0:P.type)==="model")P.components[1].dirty&&(Jb(P),P.components[1].dirty=!1),P.components[0].positionDirty&&(EO(P,this.convertTo3DMapPosition),P.components[0].positionDirty=!1);else if((P==null?void 0:P.type)==="image"&&((T=P.components[1])!=null&&T.dirty)){r=P.components[0];let R=P.components[1];R.visible!==r.visible&&(r.visible=R.visible),R.dirty=!1}else if((P==null?void 0:P.type)==="text3d"&&((D=P.components[1])!=null&&D.dirty)&&P.components[0].polygonEntityId!=null){r=P.components[0];let R=P.components[1];R.visible!=null&&R.visible!==r.visible&&(r.visible=R.visible);let{textMesh:$}=r;if($){Object.assign($,R.getState());let V=(w=R.hoverColor)!=null?w:this.state.text3dHoverColor;$.color=R.hoverByPolygon?V:(B=R.color)!=null?B:zd.color,$.outlineColor=R.hoverByPolygon?V:(X=R.outlineColor)!=null?X:zd.outlineColor,$.strokeColor=R.hoverByPolygon?V:(L=R.strokeColor)!=null?L:zd.strokeColor}R.dirty=!1}}};p();var r4=class extends Je{constructor(t){super();m(this,"state");m(this,"animating",new Map);m(this,"isAnimating",!1);m(this,"startTime",-1);m(this,"showDuration",300);m(this,"hideDuration",250);m(this,"update",()=>{var o;this.animating.clear();let t,n;for(let i of this.state.geometry2DIdsInScene)t=this.state.geometry2DMap.get(i),t&&(n=t.components[0],n instanceof Vs&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(o=n.appearance.opacity)!=null?o:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")});m(this,"playAnimations");this.state=t,this.playAnimations=this._playAnimations}_playAnimations(){let t=performance.now();for(let[n,[o,i]]of this.animating.entries()){let a=i===1?this.showDuration:this.hideDuration,u=(t-this.startTime)/a;n.currentOpacity=rc(u,0,1,o,i,i===0?J6:Y6),t-this.startTime>=a&&(i===1?n.canShow=!0:i===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};p();var n4=class extends Je{constructor(t,n,o,i,a,u,l){super();m(this,"state");m(this,"renderer");m(this,"mode");m(this,"scene");m(this,"cameraObject");m(this,"viewCamera");m(this,"systems");m(this,"needs2DRecompute",!1);m(this,"twoDdirty",!0);m(this,"threeDdirty",!0);m(this,"frameId",null);m(this,"twoDFrameId",null);m(this,"animationFrameId",null);m(this,"nextFrame",null);m(this,"updateEntitiesFrameId",null);m(this,"update",(t=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(t){this.renderer.startFrame();let o=this.commitRenderState();return this.paint(),o}else return this.frameId?Promise.resolve():new Promise((o,i)=>{this.frameId=requestAnimationFrame(()=>{var a,u;return((a=this.renderer)==null?void 0:a.renderer)==null?o():this.mode==="standalone"?(this.renderer.startFrame(),(u=this.commitRenderState())==null?void 0:u.then(()=>{this.paint(),o()}).catch(l=>{i(l)})):o()})})});m(this,"animate2D",()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})});m(this,"drawEntities2D",()=>{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())})});m(this,"updateEntities2D",()=>{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()})});m(this,"commitRenderState",()=>{try{let t=[];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(),vC(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(),bC(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.systems.shadowsSystem&&(this.systems.shadowsSystem.needsRender=!0),this.threeDdirty=!1);let n=this.systems.meshOptimizationSystem.update();n&&t.push(n),this.systems.shadowsSystem&&this.systems.shadowsSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.getPedestal()),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()),t.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 o=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,!o&&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(t)}catch(t){return Promise.reject(t)}});this.renderer=t,this.state=n,this.mode=o,this.scene=i,this.cameraObject=a,this.viewCamera=u,this.systems=l,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D,{signal:this.signal}),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D,{signal:this.signal}),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D,{signal:this.signal}),this.systems.cameraSystem.on("pan-start",()=>this.needs2DRecompute=!1,{signal:this.signal}),this.systems.cameraSystem.on("zoom-start",()=>this.needs2DRecompute=!1,{signal:this.signal}),this.systems.cameraSystem.on("zoom-end",()=>this.needs2DRecompute=!0,{signal:this.signal}),this.systems.cameraSystem.on("rotate-start",()=>this.needs2DRecompute=!1,{signal:this.signal}),this.systems.cameraSystem.on("rotate-end",()=>this.needs2DRecompute=!0,{signal:this.signal})}paint(){var t;(t=this.renderer)!=null&&t.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(),super.destroy()}};p();import{z as it}from"zod";var vq=it.object({interactive:it.boolean().optional(),id:it.string().optional(),width:it.union([it.number(),it.object({on:it.literal("zoom-level").optional(),input:it.array(it.number()).nonempty(),output:it.array(it.number()).nonempty(),easing:it.string().optional()})]).optional(),accentColor:it.string().optional(),displayArrowsOnPath:it.boolean().optional(),animateArrowsOnPath:it.boolean().optional(),visibleThroughGeometry:it.boolean().optional(),dashed:it.boolean().optional(),smoothingTension:it.number().optional(),smoothingCornerRadius:it.number().optional(),dashLength:it.number().optional(),dashGap:it.number().optional(),dashRelativeToWidth:it.boolean().optional(),dashSize:it.number().optional(),gapSize:it.number().optional(),dashAbsolute:it.boolean().optional(),dashMeters:it.number().optional(),gapMeters:it.number().optional(),__EXPERIMENTAL_GEOMETRY:it.enum(["tube","ribbon"]).optional(),__EXPERIMENTAL_ENDCAP_ENABLED:it.boolean().optional(),__EXPERIMENTAL_BILLBOARDING:it.boolean().optional(),__EXPERIMENTAL_BORDER:it.object({enabled:it.boolean(),color:it.string(),width:it.number().optional()}).optional()}),xq=it.object({type:it.enum(["Feature"]),geometry:jf,properties:it.object({parentId:it.any().optional()})});function AO(e,r){it.object({features:it.array(xq)}).parse(e),vq.parse(r)}var f0,kl=class{constructor(r,t){m(this,"type","path");m(this,"mesh",new tl);m(this,"material");m(this,"geometry");m(this,"outline");m(this,"feature");m(this,"options");m(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});m(this,"breakpoint",0);m(this,"altitudeBreakpoints");m(this,"accentColor","blue");m(this,"completeFraction",1);m(this,"altitudeAdjustment",1);m(this,"displayArrowsOnPath",!1);m(this,"animateArrowsOnPath",!1);m(this,"visibleThroughGeometry",!1);m(this,"highlightStartFraction",0);m(this,"highlightEndFraction",0);m(this,"highlightCompleteFraction",1);m(this,"highlightWidthMultiplier",1.1);m(this,"highlightColor","red");m(this,"xrayOpacity",.25);m(this,"dashed",!1);m(this,"smoothingTension",Ii.tension);m(this,"smoothingCornerRadius",Ii.cornerRadius);m(this,"dashLength",.1);m(this,"dashGap",.1);m(this,"dashRelativeToWidth",!1);m(this,"dashSize",3);m(this,"gapSize",2);m(this,"dashAbsolute",!1);m(this,"dashMeters",1);m(this,"gapMeters",.5);m(this,"__EXPERIMENTAL_GEOMETRY","tube");m(this,"__EXPERIMENTAL_ENDCAP_ENABLED",!1);m(this,"__EXPERIMENTAL_BILLBOARDING",!1);m(this,"__EXPERIMENTAL_BORDER");m(this,"isVertical",!1);m(this,"dirty",!0);m(this,"materialDirty",!0);m(this,"position",new Ce);M(this,f0,0);var n,o,i,a,u,l,c,d,f,h,g,b,I,v,E,T,D,w,B,X;this.feature=r,this.options=t||{},this.width=(n=t==null?void 0:t.width)!=null?n:this.width,this.accentColor=(o=t==null?void 0:t.accentColor)!=null?o:this.accentColor,this.displayArrowsOnPath=(i=t==null?void 0:t.displayArrowsOnPath)!=null?i:this.displayArrowsOnPath,this.animateArrowsOnPath=(a=t==null?void 0:t.animateArrowsOnPath)!=null?a:this.animateArrowsOnPath,this.visibleThroughGeometry=(u=t==null?void 0:t.visibleThroughGeometry)!=null?u:this.visibleThroughGeometry,this.dashed=(l=t==null?void 0:t.dashed)!=null?l:this.dashed,this.xrayOpacity=(c=t==null?void 0:t.xrayOpacity)!=null?c:this.xrayOpacity,this.smoothingTension=(d=t==null?void 0:t.smoothingTension)!=null?d:Ii.tension,this.smoothingCornerRadius=(f=t==null?void 0:t.smoothingCornerRadius)!=null?f:Ii.cornerRadius,this.dashLength=(h=t==null?void 0:t.dashLength)!=null?h:this.dashLength,this.dashGap=(g=t==null?void 0:t.dashGap)!=null?g:this.dashGap,this.dashRelativeToWidth=(b=t==null?void 0:t.dashRelativeToWidth)!=null?b:this.dashRelativeToWidth,this.dashSize=(I=t==null?void 0:t.dashSize)!=null?I:this.dashSize,this.gapSize=(v=t==null?void 0:t.gapSize)!=null?v:this.gapSize,this.dashAbsolute=(E=t==null?void 0:t.dashAbsolute)!=null?E:this.dashAbsolute,this.dashMeters=(T=t==null?void 0:t.dashMeters)!=null?T:this.dashMeters,this.gapMeters=(D=t==null?void 0:t.gapMeters)!=null?D:this.gapMeters,this.__EXPERIMENTAL_GEOMETRY=(w=t==null?void 0:t.__EXPERIMENTAL_GEOMETRY)!=null?w:"tube",this.__EXPERIMENTAL_ENDCAP_ENABLED=(B=t==null?void 0:t.__EXPERIMENTAL_ENDCAP_ENABLED)!=null?B:!1,this.__EXPERIMENTAL_BILLBOARDING=(X=t==null?void 0:t.__EXPERIMENTAL_BILLBOARDING)!=null?X:!1,this.__EXPERIMENTAL_BORDER=t==null?void 0:t.__EXPERIMENTAL_BORDER}setColor(){}setOpacity(){}set visible(r){this.mesh&&(this.mesh.visible=r)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,f0)}set altitude(r){this.mesh&&(this.mesh.position.z=r,k(this,f0,r))}set complete(r){this.material&&(this.material.uniforms.complete.value=r,this.material.needsUpdate=!0)}};f0=new WeakMap;p();p();p();var Xi=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut: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)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut: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)}}),Back:Object.freeze({In:function(e){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1},InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Xi.Bounce.Out(1-e)},Out: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},InOut:function(e){return e<.5?Xi.Bounce.In(e*2)*.5:Xi.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),m0=function(){return performance.now()},o4=function(){function e(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(t){return r._tweens[t]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=0,i=t;o<i.length;o++){var a=i[o];(r=a._group)===null||r===void 0||r.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var n=0,o=r;n<o.length;n++){var i=o[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,t){r===void 0&&(r=m0()),t===void 0&&(t=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var i=this._tweens[n[o]],a=!t;i&&i.update(r,a)===!1&&!t&&this.remove(i)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Gf={Linear:function(e,r){var t=e.length-1,n=t*r,o=Math.floor(n),i=Gf.Utils.Linear;return r<0?i(e[0],e[1],n):r>1?i(e[t],e[t-1],t-n):i(e[o],e[o+1>t?t:o+1],n-o)},Bezier:function(e,r){for(var t=0,n=e.length-1,o=Math.pow,i=Gf.Utils.Bernstein,a=0;a<=n;a++)t+=o(1-r,n-a)*o(r,a)*e[a]*i(n,a);return t},CatmullRom:function(e,r){var t=e.length-1,n=t*r,o=Math.floor(n),i=Gf.Utils.CatmullRom;return e[0]===e[t]?(r<0&&(o=Math.floor(n=t*(1+r))),i(e[(o-1+t)%t],e[o],e[(o+1)%t],e[(o+2)%t],n-o)):r<0?e[0]-(i(e[0],e[0],e[1],e[1],-n)-e[0]):r>1?e[t]-(i(e[t],e[t],e[t-1],e[t-1],n-t)-e[t]):i(e[o?o-1:0],e[o],e[t<o+1?t:o+1],e[t<o+2?t:o+2],n-o)},Utils:{Linear:function(e,r,t){return(r-e)*t+e},Bernstein:function(e,r){var t=Gf.Utils.Factorial;return t(e)/t(r)/t(e-r)},Factorial:function(){var e=[1];return function(r){var t=1;if(e[r])return e[r];for(var n=r;n>1;n--)t*=n;return e[r]=t,t}}(),CatmullRom:function(e,r,t,n,o){var i=(t-e)*.5,a=(n-r)*.5,u=o*o,l=o*u;return(2*r-2*t+i+a)*l+(-3*r+3*t-2*i-a)*u+i*o+r}}},PO=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),MI=new o4,Ta=function(){function e(r,t){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=Xi.Linear.None,this._interpolationFunction=Gf.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=PO.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof t=="object"?(this._group=t,t.add(this)):t===!0&&(this._group=MI,MI.add(this))}return 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(r,t){if(t===void 0&&(t=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=r,this._propertiesAreSetUp=!1,this._duration=t<0?0:t,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,t){if(r===void 0&&(r=m0()),t===void 0&&(t=!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=r,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var i in this._valuesEnd)o[i]=this._valuesEnd[i];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,t,n,o,i){for(var a in n){var u=r[a],l=Array.isArray(u),c=l?"array":typeof u,d=!l&&Array.isArray(n[a]);if(!(c==="undefined"||c==="function")){if(d){var f=n[a];if(f.length===0)continue;for(var h=[u],g=0,b=f.length;g<b;g+=1){var I=this._handleRelativeValue(u,f[g]);if(isNaN(I)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}h.push(I)}d&&(n[a]=h)}if((c==="object"||l)&&u&&!d){t[a]=l?[]:{};var v=u;for(var E in v)t[a][E]=v[E];o[a]=l?[]:{};var f=n[a];if(!this._isDynamic){var T={};for(var E in f)T[E]=f[E];n[a]=f=T}this._setupProperties(v,t[a],f,o[a],i)}else(typeof t[a]>"u"||i)&&(t[a]=u),l||(t[a]*=1),d?o[a]=n[a].slice().reverse():o[a]=t[a]||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(r){return r===void 0&&(r=m0()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=m0()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,t=this._chainedTweens.length;r<t;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=Xi.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=Gf.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,t){var n=this,o;if(r===void 0&&(r=m0()),t===void 0&&(t=e.autoStartOnUpdate),this._isPaused)return!0;var i;if(!this._goToEnd&&!this._isPlaying)if(t)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<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 a=r-this._startTime,u=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*u,c=function(){if(n._duration===0||a>l)return 1;var I=Math.trunc(a/u),v=a-I*u,E=Math.min(v/n._duration,1);return E===0&&a===n._duration?1:E},d=c(),f=this._easingFunction(d);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,d),this._duration===0||a>=this._duration)if(this._repeat>0){var h=Math.min(Math.trunc((a-this._duration)/u)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=h);for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=u*h,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,b=this._chainedTweens.length;g<b;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,t,n,o){for(var i in n)if(t[i]!==void 0){var a=t[i]||0,u=n[i],l=Array.isArray(r[i]),c=Array.isArray(u),d=!l&&c;d?r[i]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(r[i],a,u,o):(u=this._handleRelativeValue(a,u),typeof u=="number"&&(r[i]=a+(u-a)*o))}},e.prototype._handleRelativeValue=function(r,t){return typeof t!="string"?t:t.charAt(0)==="+"||t.charAt(0)==="-"?r+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(r){var t=this._valuesStartRepeat[r],n=this._valuesEnd[r];typeof n=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(n):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=t},e.autoStartOnUpdate=!1,e}();var R8e=PO.nextId,Is=MI,N8e=Is.getAll.bind(Is),j8e=Is.removeAll.bind(Is),U8e=Is.add.bind(Is),G8e=Is.remove.bind(Is),z8e=Is.update.bind(Is);p();function i4(e,r,t){return e.type==="portion"?{top:e.top*t,left:e.left*r,bottom:e.bottom*t,right:e.right*r,type:"pixel"}:e}p();p();p();var _O=(e,r)=>(r-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,OO=(e,r)=>new St(e.clientX-r.offsetLeft,e.clientY-r.offsetTop),AI=(e,r)=>Math.atan2(r.y-e.y,r.x-e.x),h0=(e,r)=>Math.sqrt((r.y-e.y)**2+(r.x-e.x)**2),PI=(e,r)=>new St((e.x+r.x)/2,(e.y+r.y)/2),_I=e=>{let r=0,{wheelDelta:t,detail:n}=e;return t!==void 0?r=t:n!==void 0&&(r=-n),r};var a4=class{constructor(r,t){m(this,"input1");m(this,"input2");m(this,"lastAngle");m(this,"lastDistance");m(this,"totalDistance");m(this,"first");m(this,"second");this.input1=r,this.input2=t,this.lastAngle=AI(r,t),this.lastDistance=h0(r,t),this.totalDistance=0,this.first=r,this.second=t}update(r,t){let n=h0(r,t);this.input1=r,this.input2=t;let o=AI(r,t);this.lastAngle=o,this.lastDistance=n,this.totalDistance+=(h0(this.first,r)+h0(this.second,t))/2,this.first=PI(this.first,r),this.second=PI(this.second,t)}};p();var g0=class{constructor(r,t,n){m(this,"touch");m(this,"camera");m(this,"cameraPlane");m(this,"viewCoordinate");m(this,"snapHolderMatrix");m(this,"snapCamera");m(this,"cameraPosition");m(this,"raycaster");m(this,"worldCoordinate");m(this,"snapshotted",!1);this.touch=r,this.camera=t,this.cameraPlane=n,this.viewCoordinate={x:r.x,y:r.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 r=new St(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Ku,this.raycaster.setFromCamera(r,this.snapCamera);let t=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=t&&t.length>0?t[0].point:null,this.snapshotted=!0}updateAnchorState(r,t){this.camera=r,this.snapCamera=r.clone(),this.snapHolderMatrix=r.matrixWorld.clone(),this.updateViewCoordinate(t),this.snapshotCameraState()}updateViewCoordinate(r){this.viewCoordinate={x:r.x,y:r.y}}reUnproject(){var n,o;let r=new St(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(r,this.snapCamera);let t=(o=this.raycaster)==null?void 0:o.intersectObject(this.cameraPlane,!0)[0];return t?t.point:void 0}};var qi={};qu(qi,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>Iq,CLIPPING_RADIUS:()=>y0,CONTROL_OPTIONS:()=>Eq,DEFAULT_ANIMATION_DURATION:()=>LI,DEFAULT_BEARING:()=>wq,DEFAULT_MAX_ZOOM_LEVEL:()=>Dq,DEFAULT_MIN_ZOOM_LEVEL:()=>NI,DEFAULT_PITCH:()=>Tq,DEFAULT_ZOOM_LEVEL:()=>Cq,EVENTS:()=>RI,MAPLIBRE_TILE_SIZE:()=>s4,MAX_LAT:()=>FI,MAX_MERCATOR_ZOOM_LEVEL:()=>l4,MIN_LAT:()=>OI,MIN_MERCATOR_ZOOM_LEVEL:()=>u4,ROOM_MERCATOR_ZOOM_LEVEL:()=>Sq,TWO_PI:()=>kI,WHEEL_ZOOM_MULTIPLIER:()=>BI,ZRANGE:()=>zf});p();var s4=512,OI=-85.051129,FI=85.051129,y0=1e4,Eq={chain:"chain",cancel:"cancel"},kI=Math.PI*2,zf=100,BI=1e4,u4=0,l4=24,Iq=17,Sq=20,LI=200,RI=["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"],Cq=18,NI=12,Dq=22,Tq=0,wq=0;var c4=!1,Mq=!1;var d4,rd=class extends Je{constructor(t,n,o,i,a){super();m(this,"dirty",!1);m(this,"zoomDirty",!1);m(this,"rotationDirty",!1);m(this,"panDirty",!1);m(this,"stateDirty",!1);M(this,d4,NI);m(this,"zoomSpeed",5);m(this,"rotateSpeed",100);m(this,"enabled",!0);m(this,"enableZoom",!0);m(this,"enablePan",!0);m(this,"enablePedestal",!1);m(this,"maxPedestal",1/0);m(this,"minPedestal",0);m(this,"enableRotate",!0);m(this,"minZoomAltitude",0);m(this,"maxZoomAltitude",1/0);m(this,"ignoreZoomLimits",!1);m(this,"zoomFactor",1);m(this,"panBounds",{min:new Ce(1/0,1/0),max:new Ce(-1/0,-1/0),center:new Ce(0,0,0),radius:1/0});m(this,"minTilt",0);m(this,"maxTilt",1.2);m(this,"MOUSE_BUTTONS",{ORBIT:jg.RIGHT,ZOOM:jg.MIDDLE,PAN:jg.LEFT});m(this,"camera");m(this,"scene");m(this,"renderer");m(this,"elevation");m(this,"orbit");m(this,"cameraPlane");m(this,"raycaster",new Ku);m(this,"rendererState");m(this,"options");m(this,"state",-1);m(this,"intersection");m(this,"viewState",null);m(this,"tweens",new Map);m(this,"clock",new U6(!0));m(this,"coords",{mouse:new St,rotateStart:new St,rotateEnd:new St,rotateDelta:new St,panStart:new Ce,panCameraStart:new Ce,panEnd:new Ce,panDelta:new Ce,initialShiftPos:new St,initialPedestal:0,floorAnchor:new Ce});m(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});m(this,"scrollTimer",null);m(this,"lastWheelTime",0);m(this,"resetZoom",!1);m(this,"zoomStart");m(this,"pedestalScaleFactor",1);m(this,"isUserZooming",!1);m(this,"stayInsideBounds",!0);m(this,"userInteracting",!1);m(this,"cameraMoving",!1);m(this,"lastCameraMoveTime",Date.now());m(this,"raycastToFloor",t=>{this.raycaster.setFromCamera(t,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new Ce});m(this,"isUserInteracting",()=>this.userInteracting);m(this,"getPosition",()=>new Ce(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));m(this,"getPedestal",()=>this.orbit.position.z);m(this,"pan",(t,n)=>{isNaN(t)||isNaN(n)||(this.setPosition(this.orbit.position.x+t,this.orbit.position.y+n),this.publish("position-updated"))});m(this,"postRender",()=>{(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"))});m(this,"isCameraMoving",()=>this.cameraMoving);m(this,"lastCameraStoppedMovingTime",()=>this.lastCameraMoveTime);m(this,"setPosition",(t,n)=>{t===void 0||n===void 0||isNaN(t)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(t,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)});m(this,"updateCameraPosition",(t,n)=>{let o=t-this.panBounds.center.x,i=n-this.panBounds.center.y,a=Math.sqrt(o*o+i*i);if(this.stayInsideBounds&&a>this.panBounds.radius){let u=Math.atan2(i,o),l={x:Math.cos(u)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(u)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=l.x,this.orbit.position.y=l.y}else this.orbit.position.x=t,this.orbit.position.y=n});m(this,"tilt",t=>{if(isNaN(t))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(t+this.getTilt(),this.maxTilt),this.minTilt):t+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});m(this,"zoomIn",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i/1.5},t,n,o)});m(this,"zoomOut",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i*1.5},t,n,o)});m(this,"getRotation",()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2));m(this,"cancelAnimation",()=>{let t=Array.from(this.tweens.keys());if(t.length<1)return;let n=t[t.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)});m(this,"animateCamera",(t,n,o,i,a,u)=>{let l=_({interruptible:!0},u),c={},d={},f=this.getPosition();if(t.position!=null&&(t.position.x!==void 0&&(c.x=f.x,d.x=t.position.x),t.position.y!==void 0&&(c.y=f.y,d.y=t.position.y),t.position.z!==void 0&&(c.z=f.z,d.z=t.position.z)),t.zoom!==void 0&&(c.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.zoom=t.zoom:d.zoom=Math.min(Math.max(t.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),t.rotation!==void 0){let{start:D,end:w}=W6(this.getRotation(),t.rotation);c.rotation=D,d.rotation=w}t.tilt!==void 0&&(c.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.tilt=t.tilt:d.tilt=Math.max(Math.min(t.tilt,this.maxTilt),this.minTilt));let h=c.zoom!==d.zoom,g=c.rotation!==d.rotation,b=c.tilt!==d.tilt,I=new Ta(c).to(d,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(I),this.publish("multi-end",{zooming:h,rotating:g,tilting:b}),i&&i()}).onStart(()=>{this.state!==7&&(this.state=7,I.state=7,this.publish("multi-start",{zooming:h,rotating:g,tilting:b})),this.publish("change")});this.rendererState.internalTweenGroup.add(I);let v=Array.from(this.tweens.entries()),E=v[v.length-1],T=!1;return E!=null&&(E[1].interruptible?(typeof E[1].cancelledCallback=="function"&&E[1].cancelledCallback(),this.completeTween(E[0])):(T=!0,E[0].chain(I))),this.tweens.set(I,{cancelledCallback:a,interruptible:l.interruptible}),o?I.easing(o):I.easing(Xi.Quadratic.In),!t.doNotAutoStart&&!T&&(I.start(),this.publish("change")),I.cameraAnimation=!0,I});m(this,"setMulti",(t,n,o,i,a=!0)=>{this.state===-1&&this.publish("multi-start");let u=!1;t!=null&&(t.x!==void 0&&!isNaN(t.x)&&t.y!==void 0&&!isNaN(t.y)&&(this.updateCameraPosition(t.x,t.y),u=!0),t.z!==void 0&&!isNaN(t.z)&&(this.setPedestal(t.z,!0,!1),u=!0)),u&&this.publish("position-updated");let l={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let c=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;c!==this.camera.position.z&&(l.zooming=!0,this.camera.position.z=c,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>y0&&(this.camera.near=n-y0,this.camera.far=n+y0):(this.camera.near=n/zf,this.camera.far=n*zf),this.camera.updateProjectionMatrix())}if(o!==void 0&&!isNaN(o)&&o!==this.getRotation()&&(l.rotating=!0,this.orbit.rotation.z=-o,this.publish("rotation-updated")),i!==void 0&&!isNaN(i)){let c=this.stayInsideBounds?Math.max(Math.min(i,this.maxTilt),this.minTilt):i;c!==this.elevation.rotation.x&&(l.tilting=!0,this.elevation.rotation.x=c,this.publish("tilt-updated"))}a&&this.publish("change"),this.state===-1&&this.publish("multi-end",l),this.stateDirty=!0});m(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);m(this,"getZoomScaledMax",()=>{let t=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,t)});m(this,"setRotation",(t,n)=>{if(isNaN(t))return;this.state===-1&&!n&&this.publish("rotate-start");let o=-(t%kI);o!==this.orbit.rotation.z&&(this.orbit.rotation.z=o,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)});m(this,"setZoomAltitude",t=>{if(isNaN(t))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(t,this.getZoomScaledMin()),this.getZoomScaledMax()):t;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/zf,this.camera.far=n*zf,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0});m(this,"setZoomLevel",t=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(t))});m(this,"getZoomAltitude",()=>this.camera.position.z);m(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));m(this,"setTilt",(t,n)=>{if(isNaN(t))return;this.state===-1&&!n&&this.publish("rotate-start");let o=this.stayInsideBounds?Math.max(Math.min(t,this.maxTilt),this.minTilt):t;o!==this.elevation.rotation.x&&(this.elevation.rotation.x=o,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)});m(this,"getTilt",()=>this.elevation.rotation.x);m(this,"setCameraPlaneElevation",t=>{this.cameraPlane.position.z=t});m(this,"zoom",t=>{if(isNaN(t))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-t;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});m(this,"getProjectionScaleFactor",(t,n,o)=>Ex(t,n,o));m(this,"update",()=>{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())});m(this,"setPedestal",(t,n=!1,o=!0)=>{typeof t=="number"&&!isNaN(t)&&(this.orbit.position.z=t,n&&(this.publishPedestalChangeEvent(t),this.publish("pedestal-change",{pedestal:t})),this.publish("change"),this.dirty=!0,o&&(this.stateDirty=!0))});m(this,"dispose",()=>{this.scene.remove(this.cameraPlane),this.destroy()});m(this,"createCameraPlane",()=>{let t=c4?2e3:1e10,n=c4?100:1,o=new Bo(t,t,n,n),i=new on({color:0,wireframe:c4,visible:c4}),a=new tt(o,i);return this.scene.add(a),a});m(this,"addEventListeners",()=>{let{domElement:t}=this.renderer;for(let n of RI)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));t.addEventListener("contextmenu",this.onContextMenu,{capture:!1,signal:this.signal}),t.addEventListener("mousedown",this.onMouseDown,{capture:!1,signal:this.signal}),t.addEventListener("wheel",this.onMouseWheel,{capture:!1,passive:!1,signal:this.signal}),t.addEventListener("touchstart",this.onTouchStart,{capture:!1,signal:this.signal}),t.addEventListener("touchend",this.onTouchEnd,{capture:!1,signal:this.signal}),t.addEventListener("touchmove",this.onTouchMove,{capture:!1,signal:this.signal})});m(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,{capture:!1,signal:this.signal}),window.addEventListener("mouseout",this.onMouseUp,{capture:!1,signal:this.signal})});m(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,{capture:!1,signal:this.signal})});m(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,{capture:!1})});m(this,"removeMouseUpEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,{capture:!1}),window.removeEventListener("mouseup",this.onMouseUp,{capture:!1}),window.removeEventListener("mouseout",this.onMouseUp,{capture:!1})});m(this,"onContextMenu",t=>{t.preventDefault()});m(this,"onMouseUp",()=>{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}});m(this,"onMouseMove",t=>{if(this.enabled!==!1)if(t.preventDefault(),this.mouseToScene(t),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(t)}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(t)});m(this,"onTouchStart",t=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(t),t.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(t),this.state=9):this.enablePan&&(this.handleTouchStartPan(t),this.state=6);break;case 2:this.touch.inputs=new a4(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});m(this,"onTouchMove",t=>{if(this.enabled!==!1)switch(this.touchToScene(t),t.touches.length){case 2:t.preventDefault(),t.stopPropagation();let n=_({},this.touch.inputs.first),o=_({},this.touch.inputs.second),i=new St(this.touch.touches[0].x,this.touch.touches[0].y),a=new St(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(t);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let u=n.y<i.y&&o.y<a.y,l=n.y>i.y&&o.y>a.y;this.enableRotate&&this.state!==4&&(l||u)?(this.handleTouchStartTilt(t),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(t.preventDefault(),t.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(t):this.enablePan&&this.state===6&&this.handleTouchMovePan(t);break;default:this.state=-1}});m(this,"onTouchEnd",t=>{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}t.touches.length?this.onTouchStart(t):this.state=-1}});m(this,"handleTouchMovePan",t=>{let n=Object.hasOwn(t,"x")?new St(t.x,t.y):this.touch.touches[0],o=this.raycastToFloor(n);this.coords.panEnd.set(o.x,o.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});m(this,"handleTouchStartDolly",()=>{let t=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 o=new St(this.touch.touches[0].x-t/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(o),this.orbit.updateMatrixWorld(),this.touch.anchor1=new g0(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new g0(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")});m(this,"handleMouseMovePan",()=>{let t=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(t.x,t.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});m(this,"handleTouchStartTilt",t=>{this.coords.rotateStart.set(t.touches[1].clientX,t.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});m(this,"handleTouchMovePedestal",t=>{this.handleMouseMovePedestal(t.touches[0])});m(this,"handleTouchMoveTilt",t=>{this.coords.rotateEnd.set(t.touches[1].clientX,t.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)});m(this,"handleTouchMoveDolly",()=>{let t=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:t.x,y:t.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let o=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);o&&this.setCameraFromTransformMatrix(o),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,t),this.touch.anchor2.updateAnchorState(this.camera,n)});m(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1});m(this,"handleTouchStartPan",t=>{let n=Object.hasOwn(t,"x")?new St(t.x,t.y):this.touch.touches[0],o=this.raycastToFloor(n);this.coords.panStart.set(o.x,o.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")});m(this,"handleTouchStartPedestal",t=>{this.handleMouseDownPedestal(t.touches[0])});m(this,"onMouseDown",t=>{if(this.enabled!==!1){if(this.mouseToScene(t),t.preventDefault(),this.state===3&&this.publish("zoom-end"),t.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(t),this.state=0}else t.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(t),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});m(this,"onMouseWheel",t=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(t.preventDefault(),t.stopPropagation(),this.mouseToScene(t),this.canScrollZoom(t)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(t)&&(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(t))});m(this,"handleMouseWheel",t=>{if(this.publish("zoom-start"),!this.canScrollZoom(t)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),o=n-_I(t)*n/BI*this.zoomSpeed;if(this.setZoomAltitude(o),this.enablePan){let i=o/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-i),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")});m(this,"setCameraFromTransformMatrix",t=>{this.orbit.updateMatrixWorld();let n=new Pd;n.setFromRotationMatrix(t,"ZYX");let o=(t.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),i=n.z,a=new Ce(0,0,1);a.applyEuler(n),a.setLength(o);let u=new Ce;u.setFromMatrixPosition(t),u.sub(a),this.enablePan&&this.setPosition(u.x,u.y),this.enableZoom&&this.setZoomAltitude(o),this.enableRotate&&this.setRotation(-i)});m(this,"makeTransformFromTouchAnchors",(t,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let o=this.camera.projectionMatrix.clone(),i=t.worldCoordinate,a=n.worldCoordinate,u=t.reUnproject(),l=n.reUnproject();if(!u||!l||!i||!a)return null;let c=t.viewCoordinate,d=n.viewCoordinate,f=a.x-i.x,h=a.y-i.y,g=Math.atan2(h,f),b=l.x-u.x,I=l.y-u.y,v=Math.atan2(I,b),E=_O(g,v),T=new wr;T.makeRotationZ(-E);let D=T.clone();D.multiply(t.snapHolderMatrix);let w=(G,S,C)=>G.elements[(S-1)*4+C-1],B=w(o,1,1)*w(D,1,1)-c.x*w(o,3,4)*w(D,3,1),X=w(o,1,1)*w(D,1,2)-c.x*w(o,3,4)*w(D,3,2),L=w(o,1,1)*w(D,1,3)-c.x*w(o,3,4)*w(D,3,3),P=i.x*B+i.y*X+i.z*L,R=w(o,2,2)*w(D,2,1)-c.y*w(o,3,4)*w(D,3,1),$=w(o,2,2)*w(D,2,2)-c.y*w(o,3,4)*w(D,3,2),V=w(o,2,2)*w(D,2,3)-c.y*w(o,3,4)*w(D,3,3),H=i.x*R+i.y*$+i.z*V,re=w(o,1,1)*w(D,1,1)-d.x*w(o,3,4)*w(D,3,1),j=w(o,1,1)*w(D,1,2)-d.x*w(o,3,4)*w(D,3,2),me=w(o,1,1)*w(D,1,3)-d.x*w(o,3,4)*w(D,3,3),z=a.x*re+a.y*j+a.z*me,ue=w(o,2,2)*w(D,2,1)-d.y*w(o,3,4)*w(D,3,1),se=w(o,2,2)*w(D,2,2)-d.y*w(o,3,4)*w(D,3,2),pe=w(o,2,2)*w(D,2,3)-d.y*w(o,3,4)*w(D,3,3),le=a.x*ue+a.y*se+a.z*pe,ye=Math.abs(re-B),Fe=Math.abs(j-X),Ee=Math.abs(me-L),Oe=Math.abs(re-R),we=Math.abs(j-$),Le=Math.abs(me-V),Qe=Math.abs(ue-B),Ge=Math.abs(se-X),N=Math.abs(pe-L),xe=Math.abs(ue-R),Z=Math.abs(se-$),De=Math.abs(pe-V),Ie=Math.min(ye+Fe+Ee,Oe+we+Le),ve=Math.min(Qe+Ge+N,xe+Z+De);Ie<ve&&(re=ue,j=se,me=pe,z=le);let Ne=R*L-B*V,Et=$*L-X*V,zt=H*L-P*V,Bt=re*V-R*me,rr=j*V-$*me,Hr=z*V-H*me,_n=(Hr*Et-zt*rr)/(Bt*Et-Ne*rr),On=(Hr*Ne-zt*Bt)/(rr*Ne-Et*Bt),Fn=$*B-X*R,vr=V*B-L*R,sr=H*B-P*R,vn=j*R-$*re,Ko=me*R-V*re,Qr=((z*R-H*re)*Fn-sr*vn)/(Ko*Fn-vr*vn),Dr=D.clone();return Dr.elements[12]=_n,Dr.elements[13]=On,Dr.elements[14]=Qr,Qr>0?Dr:null});m(this,"updateTouchOrigin",()=>{let t=this.renderer.domElement;this.touch.origin.offsetLeft=t.getBoundingClientRect().left,this.touch.origin.offsetTop=t.getBoundingClientRect().top});m(this,"touchToScene",t=>{this.touch.touches=[];for(let n=0,o=t.touches.length;n<o;n++){let i=t.touches[n],a=OO(i,this.touch.origin);this.touch.touches.push(new St(a.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(a.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]});m(this,"canScrollZoom",t=>{let n=_I(t),o=this.getZoomAltitude();return!(n<0&&o===this.getZoomScaledMax()||n>0&&o===this.getZoomScaledMin())});m(this,"mouseToScene",t=>{let n=this.getMousePos(t);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});m(this,"getMousePos",t=>({x:t.offsetX,y:t.offsetY}));m(this,"handleMouseDownRotate",t=>{this.coords.rotateStart.set(t.clientX,t.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});m(this,"handleMouseDownPan",()=>{let t=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(t.x,t.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")});m(this,"handleMouseDownPedestal",t=>{let n=new St(t.clientX,t.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=Ex(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});m(this,"handleMouseMovePedestal",t=>{let n={x:t.clientX,y:t.clientY},o=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(o<this.minPedestal?o=Math.max(o,this.minPedestal):o>this.maxPedestal&&(o=Math.min(o,this.maxPedestal))),o!==this.getPedestal()&&this.setPedestal(o,!0)});m(this,"handleMouseMoveRotate",t=>{this.coords.rotateEnd.set(t.clientX,t.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")});m(this,"publishUserZoomDebounced",el(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));m(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});m(this,"setCameraMoving",()=>{this.cameraMoving=!0});m(this,"unsetCameraMoving",()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()});m(this,"setUserInteracting",()=>{this.userInteracting=!0});m(this,"unsetUserInteracting",()=>{this.userInteracting=!1});m(this,"publishPedestalChangeEvent",t=>{this.publish("pedestal-change",{pedestal:t,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});m(this,"convertAltitudeToZoomLevel",t=>{let[,n]=this.center,o=this.computeMetersPerPixelFromAltitude(t),i=Math.cos(It.degToRad(n))*2*Math.PI*sx/o;return It.clamp(Math.log2(i/512),u4,l4)});m(this,"convertZoomLevelToAltitude",t=>this.computeMetersPerPixelFromZoomLevel(t)*this.options.canvasHeight/2/Math.tan(It.degToRad(this.camera.fov)/2));m(this,"completeTween",t=>{t.isPlaying()&&t.stop(),this.rendererState.internalTweenGroup.remove(t),this.tweens.delete(t)});m(this,"debugContainer",new Ei);this.camera=t,this.renderer=o,this.rendererState=i,this.scene=n,this.options=a,this.elevation=t.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=t.position.z,a.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(t){this.minZoomAltitude=this.convertZoomLevelToAltitude(t),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,d4)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(t){this.maxZoomAltitude=this.convertZoomLevelToAltitude(t),this.stateDirty=!0}get scrollPercent(){let t=this.minPedestal,n=this.maxPedestal,o=this.getPedestal();return o=Math.min(o,n),o=Math.max(o,t),(o-t)/(n-t)*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 i,a,u,l;let t=this.getPosition(),{lat:n,lon:o}=ty((a=(i=this.rendererState.center)==null?void 0:i[1])!=null?a:0,(l=(u=this.rendererState.center)==null?void 0:u[0])!=null?l:0,t.x,t.y);return[o,n]}setCenter(t,n){var a,u,l,c;let{x:o,y:i}=ry((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(c=(l=this.rendererState.center)==null?void 0:l[0])!=null?c:0,n,t);this.setPosition(o,i)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(t=>t.cameraAnimation)}getCameraFrameForCoordinates(t,n){var h,g;let o=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,i=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,a=this.options.canvasWidth,u=this.options.canvasHeight,l=this.getRotation(),c=this.getTilt(),d=this.getPosition();this.setRotation((h=n.rotation)!=null?h:l,!0),this.setTilt((g=n.tilt)!=null?g:c,!0);let f=FO(t,{canvasWidth:a,canvasHeight:u,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:o,maxZoom:i,position:d,camera:this.camera,orbit:this.orbit});return this.setRotation(l,!0),this.setTilt(c,!0),{center:f.position,zoomLevel:this.convertAltitudeToZoomLevel(f.zoom)}}focusOn(t,n){if(Mq){this.debugContainer&&an(this.debugContainer);let v=new Ns(4,4,4),E=new on({color:65280,depthTest:!1}),T=new Ha(v,E,t.length),D=new wr;t.forEach((w,B)=>{D.setPosition(w),T.setMatrixAt(B,D)}),T.instanceMatrix.needsUpdate=!0,this.debugContainer.add(T),this.scene.add(this.debugContainer)}let o=n.curve,i=n.callback,a=n.cancelledCallback,u=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,l=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,c=this.options.canvasWidth,d=this.options.canvasHeight,f;n.duration!==void 0?f=n.duration:y.env.TESTING==="true"?f=0:f=LI;let h=n.padding,g=this.getRotation(),b=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let I=FO(t,{canvasHeight:d,paddingOption:h,canvasWidth:c,minZoom:u,maxZoom:l,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(g),this.setTilt(b),this.animateCamera({position:I.position,tilt:n.tilt,rotation:n.rotation,zoom:I.zoom},f,o,i,a,n)}resize(t,n){this.options.canvasWidth=t,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(t){let[,n]=this.center,o=It.clamp(t,u4,l4),i=Math.pow(2,o),a=It.clamp(n,OI,FI),u=i*512;return Math.cos(It.degToRad(a))*Math.PI*2*sx/u}computeMetersPerPixelFromAltitude(t){return t*2*Math.tan(It.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};d4=new WeakMap,m(rd,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);function FO(e,{canvasWidth:r,orbit:t,paddingOption:n,verticalPadding:o=0,canvasHeight:i,minZoom:a,maxZoom:u,camera:l,position:c}){let d={zoom:a,position:c};if(e.length===0)return d;for(let Ne of rd.CAMERA_FRAME_PADDING_SIDES)typeof n[Ne]!="number"&&(n[Ne]=0);let f=i4(n,r,i);if(f.left+f.right>=r||f.top+f.bottom>=i)return d;t.updateMatrixWorld();let h=l.matrixWorldInverse,g=l.fov*(Math.PI/180)/2,b=g,v=Math.atan(Math.tan(g)*(r/i)),E=new Ce(1/0,1/0,1/0),T=new Ce(-1/0,-1/0,-1/0),D=new Zr,w=new Ce;for(let Ne=0,Et=e.length;Ne<Et;Ne++)w.copy(e[Ne]),D.expandByPoint(w),w.applyMatrix4(h),E.min(w),T.max(w),w.copy(e[Ne]),w.z-=o,w.applyMatrix4(h),E.min(w),T.max(w),w.copy(e[Ne]),w.z+=o,w.applyMatrix4(h),E.min(w),T.max(w);let B=T.x-E.x,X=T.y-E.y,L=r-f.left-f.right,P=i-f.top-f.bottom,R=(T.x+E.x)/2,$=(T.y+E.y)/2,V=B/L,H=X/P,re=a,j=u,me=re*Math.tan(v)*2,z=j*Math.tan(v)*2,ue=me/r,se=z/r,pe=Math.max(V,H);pe=It.clamp(pe,ue,se);let le=L*pe,ye=P*pe,Fe={min:{x:R-le/2-f.left*pe,y:$-ye/2-f.bottom*pe},max:{x:R+le/2+f.right*pe,y:$+ye/2+f.top*pe}},Ee=(Fe.min.x+Fe.max.x)/2,Oe=(Fe.min.y+Fe.max.y)/2,we=D.getCenter(new Ce),Le=Math.abs(Ee-Fe.min.x),Qe=Math.abs(Oe-Fe.min.y),Ge=Le/Math.tan(v),N=Qe/Math.tan(b),xe=new Ce;xe.set(Ee,Oe,T.z+Math.max(Ge,N)),xe.applyMatrix4(l.matrixWorld);let Z=new Ce;Z.set(Ee,Oe,T.z),Z.applyMatrix4(l.matrixWorld);let De=new Ce().subVectors(Z,xe),Ie=(we.z-xe.z)/De.z,ve=new Ce().copy(xe).add(De.clone().multiplyScalar(Ie));return Z.set(ve.x,ve.y,ve.z),xe.sub(Z),{position:ve,zoom:xe.length()}}p();var Aq=300,Pq=["running","paused"],b0,v0,p4=class{constructor(r){m(this,"state");M(this,b0,new Ce);M(this,v0,new Ce);this.state=r}update(r){let t;this.state.cameraObject.getWorldPosition(s(this,v0));for(let n of this.state.geometry2DsInScene)if(n&&(t=n.components[0],t&&"containerEl"in t&&t.markerContainer!=null)){t.visibilityNeedsUpdate!==!1&&(t.visibilityNeedsUpdate==="show"?t.canShow=!0:t.canShow=!1),t.offscreen&&(t.animation&&(t.animation.cancel(),t.animation=null),t.markerContainer.style.opacity="0");let o=t.animation!=null&&(t.animation.pending===!0||Pq.includes(t.animation.playState));if((t.canShow&&t.visible===!0||o)&&!t.offscreen)if(t.options.zIndex!=null)t.markerContainer.style.transform="translate3D(".concat(t.projection.x,"px, ").concat(t.projection.y,"px, ").concat(t.options.zIndex,"px)");else{n.object3d.getWorldPosition(s(this,b0));let i=s(this,v0).distanceTo(s(this,b0));t.markerContainer.style.transform="translate3D(".concat(t.projection.x,"px, ").concat(t.projection.y,"px, ").concat(-i,"px)")}if(t.canShow===!0&&t.visible===!0&&!t.offscreen?t.markerContainer.style.pointerEvents=r?"none":t.pointerEvents:t.markerContainer.style.pointerEvents="none",t.currentStrategyIndex===-1&&t.visible&&t.visibilityNeedsUpdate==="show")continue;t.visibilityNeedsUpdate!==!1&&!t.offscreen&&(t.visibilityNeedsUpdate==="show"&&(t.markerContainer.style.opacity="0"),t.animation&&t.animation.cancel(),t.animation=t.markerContainer.animate([{opacity:t.canShow&&t.visible?"1":"0"}],{duration:Aq,easing:"ease-in-out",fill:"forwards"}),t.visibilityNeedsUpdate=!1)}}};b0=new WeakMap,v0=new WeakMap;p();var f4=class extends Je{constructor(t,n){super();m(this,"state");m(this,"dirty",!0);m(this,"domTree");m(this,"observers",new Map);m(this,"updateDimensions",t=>{t.forEach(n=>{var a;let i=(a=n.target.parentElement)==null?void 0:a.getAttribute("data-marker-id");if(i){let u=this.state.geometry2DMap.get(i),l=u==null?void 0:u.components[0];u&&l instanceof $s&&(l.updateDimensions(n.contentRect.width,n.contentRect.height),l.collisionDirty=!0)}}),this.publish("dimensions-update")});this.state=t,this.domTree=n}setupObserver(){var o;if(this.observers){for(let i of this.observers.values())i.disconnect();this.observers.clear()}let t,n;for(let i of this.domTree.children){let a=i.getAttribute("data-marker-id");if(a!=null&&(t=this.state.geometry2DMap.get(a),n=t.components[0],(o=n.options)!=null&&o.dynamicResize)){let u=new ResizeObserver(this.updateDimensions);u.observe(n.containerEl),this.observers.set(i.userData.entityId,u)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let t of this.observers.values())t.disconnect();this.observers.clear()}};p();var _q=0,Oq=90,Fq=(y.env.NODE_ENV==="test",!1),Cs={linear:Xi.Linear.None,"ease-in":Xi.Quadratic.In,"ease-out":Xi.Quadratic.Out,"ease-in-out":Xi.Quadratic.InOut},kq=-50,Ue,Ye,Ss,x0,E0,UI,m4=class extends Je{constructor(t,n,o){super();M(this,E0);M(this,Ue);M(this,Ye);M(this,Ss);M(this,x0);k(this,Ue,t),k(this,Ye,n),k(this,Ss,o),s(this,Ue).map&&s(this,Ue).map.transform.setMinElevationForCurrentTile(kq),s(this,Ye).cameraSystem.on("pedestal-change",({pedestal:i})=>{s(this,Ye).cameraSystem.setCameraPlaneElevation(i)})}get center(){var t,n;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(n=(t=s(this,Ue).map).getCenter)==null?void 0:n.call(t).toArray():s(this,Ye).cameraSystem.center}setCenter(t){var n;if(s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map){(n=s(this,Ue).map)==null||n.setCenter(t),s(this,Ye).interactionSystem.handleHover();return}s(this,Ye).cameraSystem.setCenter(t[0],t[1]),s(this,Ye).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(t=s(this,Ue).map)==null?void 0:t.getZoom():s(this,Ye).cameraSystem.getZoomLevel()}setZoomLevel(t){var n;s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map&&((n=s(this,Ue).map)==null||n.setZoom(t)),s(this,Ye).cameraSystem.setZoomLevel(Wa(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,Ye).cameraSystem.isAnimating}cancelAnimation(){s(this,Ye).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,Ye).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,Ye).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,Ye).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,Ye).panBoundsSystem.dirty=!0,s(this,Ye).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,Ye).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,n=!1){var i;n&&this.setAutoMinZoomLevel(!1);let o=Wa(t,qi.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(qi.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,Ye).cameraSystem.setMinZoomLevel(o),this.zoomLevel<o&&this.setZoomLevel(o),(i=s(this,Ue).map)==null||i.setMinZoom(o)}setMaxZoomLevel(t){var o;let n=Wa(t,this.minZoomLevel,qi.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(qi.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,Ye).cameraSystem.setMaxZoomLevel(n),this.zoomLevel>n&&this.setZoomLevel(n),(o=s(this,Ue).map)==null||o.setMaxZoom(n)}get maxPitch(){var t,n;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(n=(t=s(this,Ue).map)==null?void 0:t.getMaxPitch)==null?void 0:n.call(t):It.radToDeg(s(this,Ye).cameraSystem.maxTilt)}get minPitch(){var t,n;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(n=(t=s(this,Ue).map)==null?void 0:t.getMinPitch)==null?void 0:n.call(t):It.radToDeg(s(this,Ye).cameraSystem.minTilt)}setMinPitch(t){var o;let n=Math.max(_q,t);(o=s(this,Ue).map)==null||o.setMinPitch(n),s(this,Ye).cameraSystem.minTilt=It.degToRad(n)}setMaxPitch(t){var o;let n=Math.min(Oq,t);(o=s(this,Ue).map)==null||o.setMaxPitch(n),s(this,Ye).cameraSystem.maxTilt=It.degToRad(n)}get bearing(){var t;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(t=s(this,Ue).map)==null?void 0:t.getBearing():It.radToDeg(s(this,Ye).cameraSystem.getRotation())}setBearing(t){var n;if(s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map){(n=s(this,Ue).map)==null||n.setBearing(t);return}s(this,Ye).cameraSystem.setRotation(It.degToRad(t))}get pitch(){var t;return s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(t=s(this,Ue).map)==null?void 0:t.getPitch():It.radToDeg(s(this,Ye).cameraSystem.getTilt())}setPitch(t){var n;if(s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map){(n=s(this,Ue).map)==null||n.setPitch(t);return}s(this,Ye).cameraSystem.setTilt(It.degToRad(Wa(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,Ye).cameraSystem.getPedestal()}setElevation(t){s(this,Ye).cameraSystem.setPedestal(t,!0)}animateElevation(t,n){return s(this,x0)&&s(this,x0).stop(),new Promise(o=>{var i;s(this,Ye).cameraSystem.animateCamera({position:{z:t}},(n==null?void 0:n.duration)||300,Cs[(n==null?void 0:n.easing)||"ease-in-out"],o,o,{interruptible:(i=n==null?void 0:n.interruptible)!=null?i:!0})})}get insetsPadding(){return s(this,Ss).insetsPadding}get panMode(){return s(this,Ye).cameraSystem.enablePan===!1&&s(this,Ye).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,Ye).cameraSystem.enablePan=!0,s(this,Ye).cameraSystem.enablePedestal=!1):(s(this,Ye).cameraSystem.enablePan=!1,s(this,Ye).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Ss).insetsPadding=Object.assign({},s(this,Ss).insetsPadding,t),this.publish("padding-change",{padding:s(this,Ss).insetsPadding})}animateTo(t){var u,l,c,d,f,h;if(s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map)return(h=s(this,Ue).map)==null||h.flyTo({center:(u=t.center)!=null?u:this.center,zoom:(l=t.zoomLevel)!=null?l:this.zoomLevel,bearing:(c=t.bearing)!=null?c:this.bearing,pitch:(d=t.pitch)!=null?d:this.pitch,duration:(f=t.duration)!=null?f:600}),Promise.resolve();let n=t.center?s(this,Ue).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0,o=t.zoomLevel!==void 0?s(this,Ye).cameraSystem.convertZoomLevelToAltitude(Wa(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?It.degToRad(t.bearing):void 0,a=t.pitch!==void 0?It.degToRad(Wa(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(g=>{var b;s(this,Ye).cameraSystem.animateCamera({position:n,zoom:o,rotation:i,tilt:a},t.duration||0,Cs[t.easing||"ease-in-out"],()=>{s(this,Ye).interactionSystem.handleHover(),g()},g,{interruptible:(b=t==null?void 0:t.interruptible)!=null?b:!0})})}getCameraFrameForCoordinates(t,n){let o=he(this,E0,UI).call(this,n||{},()=>Promise.resolve()),{pointCloud:i}=kO(t,s(this,Ue),s(this,Ss).geometry3DMap);if(i.length===0)return K.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};let{center:a,zoomLevel:u}=s(this,Ye).cameraSystem.getCameraFrameForCoordinates(i,o);return{center:s(this,Ue).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,n){var u,l,c,d;let{pointCloud:o,geoBounds:i,firstPosition:a}=kO(t,s(this,Ue),s(this,Ss).geometry3DMap);return o.length===0?(K.error("No valid coordinates found in targets:",t),Promise.resolve()):s(this,Ue).mode==="outdoors-overlay"&&s(this,Ue).map?(o.length===1&&a?(u=s(this,Ue).map)==null||u.flyTo({center:[a[0],a[1]],duration:(n==null?void 0:n.duration)||s(this,Ue).map.getBearing(),animate:!0,bearing:(n==null?void 0:n.bearing)===void 0?s(this,Ue).map.getBearing():n==null?void 0:n.bearing,pitch:(n==null?void 0:n.pitch)===void 0?s(this,Ue).map.getPitch():n==null?void 0:n.pitch,zoom:(n==null?void 0:n.maxZoomLevel)||s(this,Ue).map.getMaxZoom()}):(Fq&&Bq(s(this,Ue),i),(d=s(this,Ue).map)==null||d.fitBounds(i,{duration:(l=n==null?void 0:n.duration)!=null?l:qi.DEFAULT_ANIMATION_DURATION,bearing:(n==null?void 0:n.bearing)===void 0?s(this,Ue).map.getBearing():n==null?void 0:n.bearing,pitch:(n==null?void 0:n.pitch)===void 0?s(this,Ue).map.getPitch():n==null?void 0:n.pitch,maxZoom:(c=n==null?void 0:n.maxZoomLevel)!=null?c:s(this,Ue).map.getMaxZoom()})),s(this,Ye).interactionSystem.handleHover(),Promise.resolve()):new Promise(f=>{s(this,Ye).cameraSystem.focusOn(o,he(this,E0,UI).call(this,n||{},f))})}};Ue=new WeakMap,Ye=new WeakMap,Ss=new WeakMap,x0=new WeakMap,E0=new WeakSet,UI=function(t,n){var o;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,Ye).cameraSystem.convertZoomLevelToAltitude(Wa(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,Ye).cameraSystem.convertZoomLevelToAltitude(Wa(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({},ey,t==null?void 0:t.padding):this.insetsPadding,curve:Cs[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:It.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?It.degToRad(Wa(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:()=>{s(this,Ye).interactionSystem.handleHover(),n()},cancelledCallback:n,interruptible:(o=t==null?void 0:t.interruptible)!=null?o:!0,verticalPadding:t==null?void 0:t.verticalPadding}};function jI(e,r){e[0]=Math.min(e[0],r[0]),e[1]=Math.min(e[1],r[1]),e[2]=Math.max(e[2],r[0]),e[3]=Math.max(e[3],r[1])}function kO(e,r,t){var u;let n=[],o=[1/0,1/0,-1/0,-1/0],i=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:o,firstPosition:i};let a=r.getSystems().renderSystem;for(let l of e)if(typeof l=="string"){(a.threeDdirty||a.twoDdirty)&&r.renderSync();let c=t.get(l);if(!c){K.error("Entity not found with id:",l);continue}let d=new Zr;mC(r,"userData"in c&&(u=c.userData.entityId)!=null?u:c.id,n,d,c instanceof un?c.position.z:void 0);let f=r.convert3DMapPositionToCoordinate(d.min),h=r.convert3DMapPositionToCoordinate(d.max);jI(o,f),jI(o,h),i||(i=r.convert3DMapPositionToCoordinate(d.getCenter(new Ce)))}else n.push(r.convertTo3DMapPosition(l[1],l[0],l[2]||0)),jI(o,l),i||(i=l);return{pointCloud:n,geoBounds:o,firstPosition:i}}function Bq(e,r){var n,o,i,a;let t=[[r[0],r[1]],[r[0],r[3]],[r[2],r[3]],[r[2],r[1]],[r[0],r[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(o=e.map)!=null&&o.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(i=e.map)==null||i.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}}}),(a=e.map)==null||a.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}p();p();var BO="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}";p();var LO="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}";p();var RO=4.291666666666667,NO=15,jO=25,UO=43/60;p();var GO=["horizontal","icon"],Lq=new Map([[GO[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>'],[GO[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>']]),Rq=/<svg([^>]*)>/g;function zO(e,r,t,n){let o=Lq.get(e);return o?o.replace(Rq,'<svg$1 width="'.concat(t,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(r,';">')):""}p();var nd=class nd{constructor(){m(this,"loader");this.loader=new Xg}static getInstance(){return nd.instance||(nd.instance=new nd),nd.instance}getLoader(){return this.loader}load(r){return new Promise((t,n)=>{this.loader.load(r,t,void 0,n)})}};m(nd,"instance");var GI=nd,Bl=GI.getInstance();var VO=!1,tr,Tu,Vf,bn,To,od,wa,Ds,h4=class extends Je{constructor(t,n,o){super();M(this,tr,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")},interactive:!0,visible:!0});M(this,Tu);M(this,Vf);M(this,bn);M(this,To);M(this,od);M(this,wa,0);M(this,Ds,0);m(this,"dirty",!0);m(this,"getPositionAlignedCanvasCoordinates",(t,n)=>({"top-left":{x:0,y:0},"top-right":{x:t,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:t,y:n},center:{x:t/2,y:n/2},top:{x:t/2,y:0},bottom:{x:t/2,y:n},left:{x:0,y:n/2},right:{x:t,y:n/2}})[s(this,tr).position]);m(this,"getPositionAlignedPadding",()=>{var o,i,a,u;let t=s(this,tr).padding;if(typeof t=="number")return{"top-left":{x:t,y:t},"top-right":{x:-t,y:t},"bottom-left":{x:t,y:-t},"bottom-right":{x:-t,y:-t},center:{x:0,y:0},top:{x:0,y:t},bottom:{x:0,y:-t},left:{x:t,y:0},right:{x:-t,y:0}}[s(this,tr).position];let n={top:(o=t.top)!=null?o:0,right:(i=t.right)!=null?i:0,bottom:(a=t.bottom)!=null?a:0,left:(u=t.left)!=null?u:0};return{x:n.left-n.right,y:n.top-n.bottom}});o&&Object.entries(o).forEach(([i,a])=>{a!==void 0&&(s(this,tr)[i]=a)}),k(this,Vf,t),k(this,Tu,n)}get color(){return s(this,tr).color==="light"?"white":"#293136"}get iconName(){return s(this,tr).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,tr).iconOnly?NO:75}get defaultWidth(){return s(this,tr).iconOnly?jO:150}get aspectRatio(){return s(this,tr).iconOnly?UO:RO}get options(){return _({},s(this,tr))}set options(t){var n,o;k(this,tr,{padding:t.padding||s(this,tr).padding,position:t.position||s(this,tr).position,iconOnly:t.iconOnly||s(this,tr).iconOnly,color:t.color||s(this,tr).color,scale:t.scale||s(this,tr).scale,onClick:s(this,tr).onClick,interactive:(n=t.interactive)!=null?n:s(this,tr).interactive,visible:(o=t.visible)!=null?o:s(this,tr).visible})}get icon(){return zO(this.iconName,this.color,s(this,wa)*s(this,Tu).pixelRatio,s(this,Ds)*s(this,Tu).pixelRatio)}setSize(t,n){s(this,To)&&(s(this,To).uniforms.uSize.value.x=t,s(this,To).uniforms.uSize.value.y=n)}setXY(t,n){s(this,To)&&(s(this,To).uniforms.uSize.value.w=t,s(this,To).uniforms.uSize.value.z=n)}get width(){return s(this,wa)}get height(){return s(this,Ds)}getPositionAlignedOffset(t,n){return{"top-left":{x:0,y:0},"top-right":{x:-t,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-t,y:-n},center:{x:-(t/2),y:-(n/2)},top:{x:-(t/2),y:0},bottom:{x:-(t/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-t,y:-(n/2)}}[s(this,tr).position]}insertIntoQuadTree(t){s(this,od)!=null&&typeof s(this,tr).onClick=="function"&&s(this,tr).interactive&&t.insert(s(this,od))}resize(t,n){if(s(this,tr).visible!==!0)return;let o=this.getPositionAlignedCanvasCoordinates(t,n),i=this.getPositionAlignedPadding(),a=this.getPositionAlignedOffset(s(this,wa),s(this,Ds)),u=Math.min(t-s(this,wa),Math.max(0,o.x+i.x+a.x)),l=Math.min(n-s(this,Ds),Math.max(0,o.y+i.y+a.y));this.setSize(s(this,wa)/t,s(this,Ds)/n),this.setXY(u/t,l/n),k(this,od,new ot(u,l,s(this,wa),s(this,Ds),{entityId:"watermark"}))}update(){this.dirty&&(s(this,tr).visible===!0?(k(this,wa,Math.min(s(this,Tu).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,tr).scale))),k(this,Ds,s(this,wa)/this.aspectRatio),Bl.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),t=>{if(k(this,To,new $a({uniforms:{uTexture:{value:t},uSize:{value:new M6(0,0,0,0)},uOpacity:{value:.7}},vertexShader:BO,fragmentShader:LO,depthWrite:!1,depthTest:!1,defines:{debug:VO},wireframe:VO,transparent:!0,visible:!0})),s(this,bn))s(this,bn).visible=!0,s(this,bn).material=s(this,To),s(this,bn).material.needsUpdate=!0;else{let n=new Bo(2,2,1,1);k(this,bn,new tt(n,s(this,To))),s(this,bn).position.set(0,0,-1),s(this,bn).frustumCulled=!1,s(this,bn).renderOrder=999;let o=new Ns(1,1,1),i=new tt(o,new on({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));i.frustumCulled=!1,i.layers.set(1),s(this,bn).add(i),s(this,Vf).add(s(this,bn))}this.resize(s(this,Tu).canvasWidth,s(this,Tu).canvasHeight),this.publish("texture-loaded")})):s(this,bn)&&(s(this,bn).visible=!1),this.dirty=!1)}destroy(){s(this,bn)&&(s(this,Vf).remove(s(this,bn)),an(s(this,bn))),k(this,bn,void 0),s(this,To)&&s(this,To).dispose(),k(this,To,void 0),k(this,od,void 0)}};tr=new WeakMap,Tu=new WeakMap,Vf=new WeakMap,bn=new WeakMap,To=new WeakMap,od=new WeakMap,wa=new WeakMap,Ds=new WeakMap;p();var g4=100,Uq=!1,b4=class extends Je{constructor(t,n){super();m(this,"currentTotalBoundingBox");m(this,"state");m(this,"cameraSystem");m(this,"debugMesh",null);m(this,"dirty",!0);m(this,"autoMinZoomLevel",!0);this.state=t,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Zr,this.state.geometryScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new Ce(0,0,0),new Ce(g4*2,g4*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.geometryScene),this.currentTotalBoundingBox.expandByScalar(g4)));let t=new Zr().setFromObject(this.state.geometryScene);this.currentTotalBoundingBox.union(t);let n=t.getSize(new Ce),o=Math.max(n.x,n.y,n.z);for(let a of this.state.geometry2DMap.values())a.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(a.position),a.positionDirty=!1);let i=y4.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(o,g4)).getBoundingSphere(Gq).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new Ce),min:y4.min,max:y4.max,radius:i},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,Uq&&this.state.geometryScene.parent instanceof Yu){this.debugMesh&&(this.state.geometryScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new Ei,this.debugMesh.add(new tt(new Wg(this.cameraSystem.panBounds.radius),new on({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.geometryScene.parent.add(this.debugMesh);let a=new Ce;y4.getSize(a);let u=new Ns(a.x,a.y,a.z),l=new on({color:65280,wireframe:!0,transparent:!0,opacity:.5}),c=new tt(u,l);c.position.copy(this.currentTotalBoundingBox.getCenter(new Ce)),this.debugMesh.add(c)}}}},y4=new Zr,Gq=new A6;p();var zI="\xA9 Mappedin",zq="https://info.mappedin.com/feedback",$I=["top-left","top-right","bottom-left","bottom-right"],Vq=640,$q=()=>"<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>",VI={custom:[],position:"bottom-right",feedback:!0},$f,v4=class{constructor(r,t={}){m(this,"controlContainerEl");m(this,"controlPositions");m(this,"compact");M(this,$f);m(this,"attribContainerEl");m(this,"attribInnerEl");m(this,"attribButtonEl");m(this,"feedbackLinkEl");m(this,"attribHTML",zI);m(this,"customAttributions",[]);m(this,"toggleAttribution",r=>{this.attribContainerEl!=null&&(r.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",""))))});k(this,$f,!!t.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),r.appendChild(this.controlContainerEl),this.controlPositions=$I.reduce((n,o)=>{let i=document.createElement("div");return i.classList.add("mappedin-ctrl-".concat(o)),this.controlContainerEl.appendChild(i),n[o]=i,n},{})}addAttributionControl(r=VI){var o;let t=r.position&&$I.includes(r.position)?r.position:VI.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(t)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[t].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=$q(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,$f)?zI:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((o=r.feedback)!=null?o:VI.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=zq,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)),r.custom&&(this.customAttributions=r.custom),this.updateAttributionDisplay()}updateAttribution(r){if(!r.style||!this.attribInnerEl||!this.attribContainerEl)return;let t=s(this,$f)?[zI]:[],n=r.style.sourceCaches;for(let o in n){let i=n[o];if(i.used||i.usedForTerrain){let a=i.getSource();a.attribution&&t.indexOf(a.attribution)<0&&t.push(a.attribution)}}t=t.filter(o=>String(o).trim()),t=t.filter((o,i)=>{for(let a=i+1;a<t.length;a++)if(t[a].indexOf(o)>=0)return!1;return!0}),this.attribHTML=t.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let r=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=r)}resizeAttribution(r){this.attribContainerEl&&(r<=Vq||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(r){this.resizeAttribution(r)}updateData(r){this.updateAttribution(r)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};$f=new WeakMap;p();var I0,S0,Hf=class{constructor(r,t){m(this,"mesh");m(this,"type","custom-geometry");m(this,"dirty",!0);m(this,"feature");m(this,"builder");m(this,"outline");M(this,I0,1);m(this,"color",new or);M(this,S0,0);this.mesh=new tl,this.feature=r,this.builder=t}get visible(){return this.mesh.visible}set visible(r){this.mesh.visible=r}set opacity(r){k(this,I0,r)}get opacity(){return s(this,I0)}setColor(r){this.color.set(r)}get position(){var r;return(r=this.mesh)==null?void 0:r.position}get altitude(){return s(this,S0)}set altitude(r){this.mesh&&(this.mesh.position.z=r,k(this,S0,r))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(r){this.mesh&&(this.mesh.renderOrder=r)}};I0=new WeakMap,S0=new WeakMap;p();var x4=class{constructor(r,t){m(this,"state");m(this,"convertTo3DMapPosition");this.state=r,this.convertTo3DMapPosition=t}update(){let r,t;for(let n of this.state.geometry3DsInScene)(n==null?void 0:n.type)==="custom-geometry"&&(r=n.components[0],t=n.components[1],r.dirty&&t.visible!==!1&&(r.position.copy(this.convertTo3DMapPosition(r.feature.geometry.coordinates[1],r.feature.geometry.coordinates[0],t.altitude)),r.builder.setup(r.mesh),r.mesh.traverse(o=>{o.userData=ne(_({},o.userData),{entityId:n.id,type:"custom-geometry"})}),r.dirty=!1),t.visible!==!1&&r.builder.update(r.mesh))}};p();p();function E4(e){return e.children.some(r=>r.userData.isOutline)}function C0(e,r){var n;let t=e.userData.entities3D.values().next().value;return t?((n=r.geometry3DMap.get(t))==null?void 0:n.components[3])!==void 0:!1}function I4(e,r,t,n,o){let a=e.getAttribute("position").array,u=1/0,l=-1/0;for(let d=0;d<r.count;d++){let h=(r.start+d)*3,g=a[h+2];u=Math.min(u,g),l=Math.max(l,g)}let c=l-u;if(!o||o.thickness===0||c===0)for(let d=0;d<r.count;d++){let h=(r.start+d)*3,g=a[h+2];Math.abs(g-l)<1e-4?a[h+2]=Math.max(t+n,2e-4+n):a[h+2]=n}else{let d=o.thickness,f=u+d,h=u+d,g=l-d,b=l-d,I=n-d,v=n,E=n,T=n+t,D=n+t,w=n+t+d;for(let B=0;B<r.count;B++){let L=(r.start+B)*3,P=a[L+2],R;if(P<=f){let $=d>0?(P-u)/d:0;R=I+$*(v-I)}else if(P>=b){let $=d>0?(P-b)/d:0;R=D+$*(w-D)}else{let $=g-h,V=$>0?(P-h)/$:0;R=E+V*(T-E)}a[L+2]=R}}e.attributes.position.needsUpdate=!0}p();function HI(e){var c,d;let r=new Ju,t=(c=e.mesh)==null?void 0:c.geometry;if(!t||!((d=e.batchedProps)!=null&&d.range))return;let n=e.batchedProps.range,o=n.start,i=n.count,a=t.getAttribute("position");if(a){let f=new Float32Array(i*3);for(let h=0;h<i;h++){let g=o+h;f[h*3]=a.array[g*3],f[h*3+1]=a.array[g*3+1],f[h*3+2]=a.array[g*3+2]}r.setAttribute("position",new ko(f,3))}let u=t.getAttribute("normal");if(u){let f=new Float32Array(i*3);for(let h=0;h<i;h++){let g=o+h;f[h*3]=u.array[g*3],f[h*3+1]=u.array[g*3+1],f[h*3+2]=u.array[g*3+2]}r.setAttribute("normal",new ko(f,3))}let l=t.getAttribute("uv");if(l){let f=new Float32Array(i*2);for(let h=0;h<i;h++){let g=o+h;f[h*2]=l.array[g*2],f[h*2+1]=l.array[g*2+1]}r.setAttribute("uv",new ko(f,2))}if(t.index){let f=t.index,h=new Uint32Array(i);for(let g=0;g<i;g++)h[g]=f.array[o+g];r.setIndex(new ko(h,1))}return r}function $O(e,r,t){let n=HI(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,t),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let o=r.addGeometry(n);r.addInstance(o),r.setMatrixAt(o,t);let i=r.getGeometryIdAt(o),a=r.getGeometryRangeAt(i);return a&&e.batchedProps&&(e.batchedProps.range=a),n.dispose(),o}p();p();var HO="// 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}";p();var ZO="// 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 S4=class extends Zg{constructor(r){super(r),this.onBeforeCompile=t=>{t.vertexShader=HO,t.fragmentShader=ZO}}};p();var Ma,id,Ll,Rl,D0,ZI,ad=class{constructor(){M(this,D0);M(this,Ma,[]);M(this,id,!1);M(this,Ll);M(this,Rl)}get size(){return s(this,Ma).length}add(r){s(this,Ma).push(r),s(this,id)||he(this,D0,ZI).call(this)}onComplete(r){k(this,Ll,r)}clearOnComplete(){k(this,Ll,void 0)}clearAll(){k(this,Ma,[]),k(this,id,!1),k(this,Ll,void 0),s(this,Rl)!==void 0&&(cancelIdleCallback(s(this,Rl)),k(this,Rl,void 0))}};Ma=new WeakMap,id=new WeakMap,Ll=new WeakMap,Rl=new WeakMap,D0=new WeakSet,ZI=function(){k(this,id,!0),k(this,Rl,requestIdleCallback(r=>{let t=0;for(;s(this,Ma).length>0&&r.timeRemaining()>2;){let n=s(this,Ma).shift();n&&(n(),t++)}if(t===0&&s(this,Ma).length>0&&r.timeRemaining()<2){let n=s(this,Ma).shift();n&&n()}k(this,Rl,void 0),s(this,Ma).length>0?he(this,D0,ZI).call(this):(k(this,id,!1),s(this,Ll)&&s(this,Ll).call(this))},{timeout:3e3}))};var Wq=80,sd,Zf,D4,T4,C4=class extends Je{constructor(t){super();m(this,"rendererState");m(this,"outlineOpacitiesDirty",!0);m(this,"useIdleFramesOnly",!0);M(this,sd,!0);M(this,Zf,-1/0);m(this,"idleBuildQueue",new ad);m(this,"idleComputeBoundingSphereQueue",new ad);M(this,D4,new Map);M(this,T4,()=>{this.publish("needs-render")});this.rendererState=t,this.idleBuildQueue.onComplete(s(this,T4))}get geometries3DDirty(){return s(this,sd)}set geometries3DDirty(t){k(this,sd,t)}buildOutlines(t){var h;let n=[];for(let g of t.userData.entities3D.values()){let b=this.rendererState.geometry3DMap.get(g);if(b instanceof Yt&&b.type==="geometry"&&b.components[3]&&b.components[3].dirty===!0&&b.components[0].material!=null){let I=b.components[0].geometry,v=!1;I||(I=HI(b.components[0]),v=!0);let E=b.components[1];n.push([b.components[3],new B6(I,(h=E.bevel)!=null&&h.enabled?1:Wq)]),v&&(I==null||I.dispose(),I=void 0)}}if(n.length===0)return;let o=Si(n.map(g=>g[1]),!1);if(o==null)return;let i=o.getAttribute("position"),a=new Float32Array(i.count*4),u=new ko(a,4);o.setAttribute("color",u);let l=new Uint8Array(i.count);l.fill(0);let c=new ko(l,1,!1);o.setAttribute("visibility",c);let d=0;for(let g=0;g<n.length;g++){let[b,I]=n[g],v=I.getAttribute("position").count;b.edgeColors=u,b.edgeVisibility=c,b.geometry=o,b.ranges={count:v,start:d},d+=v,I.dispose()}let f=new Za(o,new S4({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:Ql}));f.userData.isOutline=!0,t.add(f)}update(t,n=!0){var i;if(this.geometries3DDirty){for(let a of this.rendererState.geometry3DsInScene)a.type==="geometry-group"&&C0(a,this.rendererState)&&!E4(a)&&a.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(a)):this.buildOutlines(a));k(this,sd,!1),this.outlineOpacitiesDirty=!0}for(let a of this.rendererState.geometry3DsInScene)if(a.type==="geometry"&&a.components[3]&&a.components[3].dirty===!0&&a.components[0].material!=null&&a.parentObject3D instanceof Ka){let u=a.components[3].geometry;if(!u)continue;let l=a.components[3];if(!l)continue;let c=l.enabled&&a.components[1].visible;if(l.visible!==c&&(l.visible=c),!l.visible)continue;let d=l.edgeColors;if(!d||!l.ranges)continue;let f=new or(l.color);for(let I=0;I<l.ranges.count;I++){let v=l.ranges.start+I;d.setXYZ(v,f.r,f.g,f.b)}let h=a.components[1].height,g=a.components[1].altitude,b=(i=a.components[1])==null?void 0:i.bevel;I4(u,l.ranges,h,g,b),u.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>u.computeBoundingSphere()),l.dirty=!1}let o=n?rc(t,16,19,0,1):s(this,Zf);if((o!==s(this,Zf)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DsInScene.size>0){for(let a of this.rendererState.geometry3DsInScene)if(a.type==="geometry"&&a.components[0]instanceof sn){let u=a.components[3];if(u&&u.edgeColors&&u.geometry&&u.visible){let l=Math.min(o,a.components[1].opacity*Gd(a));if(u.currentOpacity!==l){for(let c=0;c<u.ranges.count;c++){let d=u.ranges.start+c;u.edgeColors.setW(d,l)}u.geometry.attributes.color.needsUpdate=!0}}}}k(this,Zf,o),k(this,sd,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,D4).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};sd=new WeakMap,Zf=new WeakMap,D4=new WeakMap,T4=new WeakMap;p();p();import{z as yi}from"zod";var w4=class extends tt{constructor(){super(...arguments);m(this,"userData",{entityId:""})}},Xq=yi.object({flipImageToFaceCamera:yi.boolean().optional(),url:yi.string()}),qq=yi.object({type:yi.enum(["Feature"]),properties:yi.object({width:yi.number(),height:yi.number(),rotation:yi.number().min(0).max(360).optional(),verticalOffset:yi.number().optional()}),geometry:jf});function WO(e,r,t){yi.union([yi.number(),yi.string()]).parse(e),qq.parse(r),Xq.parse(t)}var M4=class{constructor(r){m(this,"mesh",new tl);m(this,"imageMesh");m(this,"outline");m(this,"type","image");m(this,"instanceIndex",-1);m(this,"geometry");m(this,"material");m(this,"feature");m(this,"position",new Ce);this.feature=r}get visible(){var r,t;return(t=(r=this.mesh)==null?void 0:r.visible)!=null?t:!1}set visible(r){this.mesh&&(this.mesh.visible=r)}};p();function WI(e,r){return{x:e.x*Math.cos(r)-e.y*Math.sin(r),y:e.x*Math.sin(r)+e.y*Math.cos(r)}}function Jq(e,r){return e.map(t=>WI(t,r))}function Yq(e){let r=1/0,t=1/0,n=-1/0,o=-1/0;for(let i of e)r=Math.min(r,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x),o=Math.max(o,i.y);return{minX:r,minY:t,maxX:n,maxY:o}}function Kq(e,r){let t=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let i=r[n].x,a=r[n].y,u=r[o].x,l=r[o].y;a>e.y!=l>e.y&&e.x<(u-i)*(e.y-a)/(l-a)+i&&(t=!t)}return t}function XO(e,r,t,n,o){for(let i=0;i<o;i++)for(let a=0;a<n;a++)if(e[t+i][r+a]!==1)return!1;return!0}function Qq(e,r,t){let n=e.maxX-e.minX,o=e.maxY-e.minY,i,a,u=_({},e);return n/o>r?(a=o/t,i=a*r,u.minX+=(n-i*t)/2):(i=n/t,a=i/r,u.minY+=(o-a*t)/2),{dx:i,dy:a,gridBounds:u}}function eJ(e,r,t,n,o){let i=Array(t).fill(0).map(()=>Array(t).fill(0));for(let a=0;a<t;a++)for(let u=0;u<t;u++){let l={x:r.minX+u*n,y:r.minY+a*o};Kq(l,e)&&(i[a][u]=1)}return i}function tJ(e,r){let t=Array(r).fill(0).map(()=>Array(r).fill(0));for(let n=0;n<r;n++)for(let o=0;o<r;o++)if(e[n][o]===1){let i=0;for(let a=1;a<=Math.min(r-o,r-n)&&XO(e,o,n,a,a);a++)i=a;t[n][o]=i}return t}function rJ(e,r,t,n,o,i){let a=0,u=0,l=0;for(let c=0;c<n;c++)for(let d=0;d<n;d++)if(e[c][d]===1){let f=Math.pow(r[c][d],2),h=t.minX+d*o,g=t.minY+c*i;a+=f,u+=h*f,l+=g*f}return{x:u/a,y:l/a}}function nJ(e,r,t,n,o,i,a){let u=-1/0,l=null,c=e.length,d=Math.sqrt(Math.pow(r.maxX-r.minX,2)+Math.pow(r.maxY-r.minY,2));for(let f=0;f<c;f++)for(let h=0;h<c;h++)if(e[f][h]===1)for(let g=1;g<=c-h;g++){let b=g;if(!(b>c-f)&&XO(e,h,f,g,b)){let I=g*b,v=r.minX+(h+g/2)*t,E=r.minY+(f+b/2)*n,T={x:v,y:E},w=Math.sqrt(Math.pow(T.x-o.x,2)+Math.pow(T.y-o.y,2))/d,B=I*(1-i)-w*i*I;B>u&&(u=B,l={center:T,width:g*t*a,height:g*n*a})}}return l}function XI(e,r,t,n={}){let{scaleFactor:o=.9,centerPriority:i=.5,resolution:a=100,minimumSizeRatio:u=.5}=n,l=H6(t),c=e.width/e.height,d=Jq(r,l),f=Yq(d),{dx:h,dy:g,gridBounds:b}=Qq(f,c,a),I=eJ(d,b,a,h,g),v=tJ(I,a),E=rJ(I,v,b,a,h,g),T=nJ(I,b,h,g,E,i,o);return!T||T.width<e.width*u||T.height<e.height*u?e:ne(_({},T),{center:WI(T.center,-l),rotation:t,polygonCenter:WI(E,-l)})}var T0=Math.PI*2,oJ=Math.PI/2,iJ=Math.PI*1.5,aJ=Qu(oJ,2),sJ=Qu(iJ,2),uJ=.01,qO=!1,A4=class extends Je{constructor(t,n,o,i=0,a=0,u={}){super();m(this,"rendererState");m(this,"convertTo3DMapPosition");m(this,"projectToScreen");m(this,"initialBearing",0);m(this,"naturalBearing",0);m(this,"imagePlacementOptions");m(this,"cameraFrustum",new _d);m(this,"imageLoadingCache",new Map);m(this,"currentImageScreenBBoxes",[]);m(this,"viewProjectionMatrix",new wr);this.rendererState=t,this.convertTo3DMapPosition=n,this.projectToScreen=o,this.initialBearing=i,this.naturalBearing=a,this.imagePlacementOptions=u}createImageMesh(t,n,o,i=0,a,u){var b,I,v;let l={width:o.width,height:o.height,center:this.convertTo3DMapPosition(a),rotation:(b=o.rotation)!=null?b:0},c=(I=this.imagePlacementOptions.mode)!=null?I:"default",d=(()=>{switch(c){case"fit-nearest-90":let E=(this.initialBearing-this.naturalBearing+360)%180;return E>=45&&E<=135?XI(l,u,l.rotation+90,this.imagePlacementOptions):l;case"fit-initial-bearing":return XI(l,u,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return l}})();if(qO&&d.polygonCenter){let E=new tt(new Wg(1),new Mm({color:65280}));E.position.set(d.polygonCenter.x,d.polygonCenter.y,i),this.rendererState.geometryScene.add(E)}let f=new Mm({transparent:!0,depthWrite:!1,side:Qo}),h=new Bo(d.width,d.height),g=new w4(h);if(g.visible=!1,g.renderOrder=In.IMAGE_MESH,(v=this.getOrDownloadImage(n))==null||v.then(E=>{f.map=E,f.needsUpdate=!0,f.map.colorSpace=Ug,g.visible=!0,this.publish("image-loaded")}),g.userData.entityId=t,g.material=f,qO){let E=new tt(new Bo(o.width,o.height),new Mm({color:"gray"}));g.add(E);let T=new z6;g.add(T),T.scale.set(10,10,10)}return g.position.set(d.center.x,d.center.y,i+uJ),g.rotation.z=(-It.degToRad(d.rotation)+T0)%T0,g}getOrDownloadImage(t){var n;if(this.imageLoadingCache.has(t))return(n=this.imageLoadingCache.get(t))==null?void 0:n.promise;{let o=new Promise(i=>{Bl.getLoader().load(t,a=>{let u=this.imageLoadingCache.get(t);u&&!u.loaded&&(u.loaded=!0),i(a)})});return this.imageLoadingCache.set(t,{loaded:!1,promise:o}),o}}flipIfNeeded(t,n){if(t.imageMesh==null)return;let o=-n,i=t.imageMesh.rotation.z,a=Qu((i-o+T0)%T0,2);a>aJ&&a<sJ&&(t.imageMesh.rotation.z=(i+Math.PI)%T0)}update(t){var i,a,u,l,c;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,o;for(let d of this.rendererState.geometry3DsInScene)if(d.type==="image"){if(n=d.components[0],o=d.components[1],o.url&&n.imageMesh==null){let f=this.convertTo3DMapPosition(n.feature.geometry.coordinates),h={x:f.x,y:f.y};n.imageMesh=this.createImageMesh(d.id,o.url,n.feature.properties,n.feature.properties.verticalOffset,n.feature.geometry.coordinates,[h]),n.mesh.add(n.imageMesh),n.position.copy(n.imageMesh.position)}n.imageMesh&&(o.flipImageToFaceCamera&&this.flipIfNeeded(n,t),n.imageMesh.material instanceof Mm&&o.dirty&&n.imageMesh.material.opacity!==o.opacity&&(n.imageMesh.material.opacity=o.opacity))}else if((d==null?void 0:d.type)==="geometry"){if(n=d.components[0],o=d.components[1],o.showImage&&((i=n.feature.properties)!=null&&i.image)&&n.imageMesh==null&&n.visible&&n.mesh!=null&&n.mesh.parent!=null&&((a=n.feature.properties)==null?void 0:a.image.position)!=null&&n.feature.geometry.coordinates!=null&&n.feature.geometry.coordinates.length>0){let f=n.feature.geometry.coordinates[0].map(g=>{let b=this.convertTo3DMapPosition(g);return{x:b.x,y:b.y}}),h=this.createImageMesh(d.id,(u=n.feature.properties)==null?void 0:u.image.path,(l=n.feature.properties)==null?void 0:l.image,o.height+o.altitude,(c=n.feature.properties)==null?void 0:c.image.position,f);n.mesh.parent.add(h),n.imageMesh=h}if(n.imageMesh){if(!n.visible)n.imageMesh.visible=!1;else if(o.showImage&&!n.imageMesh.visible)if(o.url){let f=this.imageLoadingCache.get(o.url);f&&f.loaded&&(n.imageMesh.visible=!0)}else n.imageMesh.visible=!0;else!o.showImage&&n.imageMesh.visible&&(n.imageMesh.visible=!1);o.flipImageToFaceCamera&&this.flipIfNeeded(n,t),o.enableImageCollisions===!0&&this.updateImageScreenBBoxes(n)}}}updateImageScreenBBoxes(t){if(t.imageMesh==null)return;let n=t.imageMesh.geometry.boundingBox;if(n!=null){let o=new Ce;if(t.imageMesh.getWorldPosition(o),!this.cameraFrustum.containsPoint(o))return;let i=new St;this.projectToScreen(i,o);let a=[new Ce(n.min.x,n.min.y,n.min.z),new Ce(n.max.x,n.min.y,n.min.z),new Ce(n.min.x,n.max.y,n.min.z),new Ce(n.max.x,n.max.y,n.min.z),new Ce(n.min.x,n.min.y,n.max.z),new Ce(n.max.x,n.min.y,n.max.z),new Ce(n.min.x,n.max.y,n.max.z),new Ce(n.max.x,n.max.y,n.max.z)],u=[];for(let g of a){let b=g.clone().applyMatrix4(t.imageMesh.matrixWorld),I=new St;this.projectToScreen(I,b),u.push(I)}let l=1/0,c=1/0,d=-1/0,f=-1/0;for(let g of u)l=Math.min(l,g.x),c=Math.min(c,g.y),d=Math.max(d,g.x),f=Math.max(f,g.y);let h=new ot(i.x,i.y,d-l,f-c);this.currentImageScreenBBoxes.push(h)}}};p();p();function qI(e){let r=1/0,t=1/0,n=-1/0,o=-1/0;for(let i of e)i.x<r&&(r=i.x),i.x>n&&(n=i.x),i.y<t&&(t=i.y),i.y>o&&(o=i.y);return{minX:r,minY:t,maxX:n,maxY:o}}function lJ(e,r){return!(e.maxX<r.minX||e.minX>r.maxX||e.maxY<r.minY||e.minY>r.maxY)}function cJ(e,r){if(!lJ(e,r))return 0;let t=Math.max(e.minX,r.minX),n=Math.min(e.maxX,r.maxX),o=Math.max(e.minY,r.minY),i=Math.min(e.maxY,r.maxY),a=n-t,u=i-o;return a*u}function JO(e,r){let t=cJ(e,r);if(t===0)return 0;let n=r.maxX-r.minX,o=r.maxY-r.minY,i=n*o;return i===0?0:t/i}p();function dJ(e){let r=0;for(let t=1;t<e.length;t++)(e[t].y<e[r].y||e[t].y===e[r].y&&e[t].x<e[r].x)&&(r=t);return r}function pJ(e,r){let t=[...e];return t.sort((n,o)=>{let i=n.point.x-r.x,a=n.point.y-r.y,u=o.point.x-r.x,l=o.point.y-r.y,c=i*l-a*u;if(c===0){let d=i*i+a*a,f=u*u+l*l;return d-f}return c>0?-1:1}),t}function fJ(e,r){let t=[r];for(let n=0;n<e.length;n++){for(;t.length>1;){let o=t[t.length-2].point,i=t[t.length-1].point,a=e[n].point,u=i.x-o.x,l=i.y-o.y,c=a.x-i.x,d=a.y-i.y;if(u*d-l*c<=0)t.pop();else break}t.push(e[n])}return t}function YO(e){if(e.length<3)return e.map((i,a)=>({point:i,index:a}));let r=dJ(e),t=e.map((i,a)=>({point:i,index:a})),n=t[r];t.splice(r,1);let o=pJ(t,n.point);return fJ(o,n)}function w0(e,r,t,n){if(e.length===0)return[];let o=[],i=e[e.length-1],a=r*i.x+t*i.y+n;for(let u=0;u<e.length;u++){let l=e[u],c=r*l.x+t*l.y+n;if(c>=0){if(a<0){let d=a/(a-c);o.push({x:i.x+d*(l.x-i.x),y:i.y+d*(l.y-i.y)})}o.push(l)}else if(a>=0){let d=a/(a-c);o.push({x:i.x+d*(l.x-i.x),y:i.y+d*(l.y-i.y)})}i=l,a=c}return o}p();function mJ(e,r){let t=document.createElement("div");return t.id="focus-bbox-".concat(e),t.style.position="absolute",t.style.pointerEvents="none",t.style.overflow="hidden",t.style.zIndex="1000",r.appendChild(t),t}function hJ(e,r){let t=r.maxX-r.minX,n=r.maxY-r.minY;e.style.left=r.minX+"px",e.style.top=r.minY+"px",e.style.width=t+"px",e.style.height=n+"px"}function gJ(e,r){r?(e.style.border="2px solid green",e.style.backgroundColor="rgba(0, 255, 0, 0.1)"):(e.style.border="2px solid red",e.style.backgroundColor="rgba(255, 0, 0, 0.1)")}function yJ(e){let r=e.querySelector(".entity-id-label");return r||(r=document.createElement("div"),r.className="entity-id-label",r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.padding="2px 4px",r.style.color="white",r.style.fontSize="10px",r.style.fontWeight="bold",r.style.fontFamily="monospace",r.style.zIndex="1001",e.appendChild(r)),r}function bJ(e){let r=e.querySelector(".score-label");return r||(r=document.createElement("div"),r.className="score-label",r.style.position="absolute",r.style.bottom="0",r.style.right="0",r.style.padding="2px 4px",r.style.color="white",r.style.fontSize="12px",r.style.fontWeight="bold",r.style.fontFamily="monospace",r.style.zIndex="1001",e.appendChild(r)),r}function vJ(e,r,t,n,o){n?e.style.backgroundColor="green":e.style.backgroundColor="red",e.textContent=t,o!==void 0?(r.style.backgroundColor=n?"green":"red",r.textContent=o.toFixed(3)):(r.style.backgroundColor=n?"green":"red",r.textContent="")}function KO(e,r){for(let[t,n]of e)r.has(t)||(n.remove(),e.delete(t))}function QO(e,r,t,n,o,i){var c;let a=t.get(e);a||(a=mJ(e,n),t.set(e,a)),hJ(a,(c=r.clippedScreenBBox)!=null?c:r.screenBBox),gJ(a,o);let u=yJ(a),l=bJ(a);return vJ(u,l,e,o,i),a}function eF(){let e=document.createElement("div");return Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",overflow:"hidden"}),document.body.append(e),e}function tF(e,r){let t=document.createElement("div");t.style.position="absolute",t.style.top=e.minY+"px",t.style.left=e.minX+"px",t.style.width=e.maxX-e.minX+"px",t.style.height=e.maxY-e.minY+"px",t.style.border="2px solid gray",t.style.backgroundColor="rgba(128, 128, 128, 0.1)",t.style.pointerEvents="none",r.append(t);let n=document.createElement("div");n.textContent="viewfinder",n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="2px 4px",n.style.backgroundColor="gray",n.style.color="white",n.style.fontSize="12px",n.style.fontWeight="bold",n.style.fontFamily="monospace",n.style.zIndex="1001",t.appendChild(n);let o=document.createElement("div");return o.textContent="",o.style.position="absolute",o.style.bottom="0",o.style.right="0",o.style.padding="2px 4px",o.style.backgroundColor="gray",o.style.color="white",o.style.fontSize="12px",o.style.fontWeight="bold",o.style.fontFamily="monospace",o.style.zIndex="1001",t.appendChild(o),{squareEl:t,labelEl:n,scoreLabelEl:o}}function rF(e,r){e.textContent=r}function nF(e,r){r!==void 0?e.textContent="Score: ".concat(r.toFixed(3)):e.textContent=""}p();function oF(e,r,t){if(!e.visible)return;let n=e;if(n.isMesh||n.isLine||n.isPoints){let o=n.geometry;if(o!=null&&o.isBufferGeometry){let i=o.attributes.position;if(i)for(let a=0;a<i.count;a++)t.fromBufferAttribute(i,a),t.applyMatrix4(e.matrixWorld),r.push(t.clone())}}for(let o of e.children)oF(o,r,t)}function iF(e,r){let t=[];return e instanceof Ei&&oF(e,t,r),t}var Wf=.001;function aF(e){if(e.length===0)return[];let r=[],t=e[e.length-1],n=t.w>Wf;for(let o=0;o<e.length;o++){let i=e[o],a=i.w>Wf;if(a){if(!n){let u=(Wf-t.w)/(i.w-t.w);r.push({x:t.x+u*(i.x-t.x),y:t.y+u*(i.y-t.y),z:t.z+u*(i.z-t.z),w:Wf})}r.push(i)}else if(n){let u=(Wf-t.w)/(i.w-t.w);r.push({x:t.x+u*(i.x-t.x),y:t.y+u*(i.y-t.y),z:t.z+u*(i.z-t.z),w:Wf})}t=i,n=a}return r}function sF(e,r,t){if(e.length===0)return[];let n=e;return n=w0(n,1,0,0),n=w0(n,-1,0,r),n=w0(n,0,1,0),n=w0(n,0,-1,t),n}p();var P4=class{constructor(){m(this,"bbox");m(this,"center");m(this,"el",null);m(this,"labelEl",null);m(this,"scoreLabelEl",null)}create(r,t,n,o,i){this.labelEl&&(this.labelEl.remove(),this.labelEl=null),this.scoreLabelEl&&(this.scoreLabelEl.remove(),this.scoreLabelEl=null),this.el&&(this.el.remove(),this.el=null);let a=i4(n,r,t),u=a.left,l=a.top,c=r-a.left-a.right,d=t-a.top-a.bottom,f=new St(u+c/2,l+d/2),g=c/2*(2-2/1.2)/2,b=Math.max(u,f.x-g),I=Math.min(r-a.right,f.x+g),v=Math.max(l,f.y-g),E=Math.min(t-a.bottom,f.y+g),T=(b+I)/2,D=(v+E)/2;if(this.bbox={minX:b,maxX:I,minY:v,maxY:E},this.center=new St(T,D),o&&i){let{squareEl:w,labelEl:B,scoreLabelEl:X}=tF(this.bbox,i);this.el=w,this.labelEl=B,this.scoreLabelEl=X}}updateLabel(r){this.labelEl&&rF(this.labelEl,r)}updateScore(r){this.scoreLabelEl&&nF(this.scoreLabelEl,r)}destroy(){this.labelEl&&(this.labelEl.remove(),this.labelEl=null),this.scoreLabelEl&&(this.scoreLabelEl.remove(),this.scoreLabelEl=null),this.el&&(this.el.remove(),this.el=null)}};var xJ=250,Nl,_4=class extends Je{constructor(t,n){super();m(this,"cameraDirty",!0);m(this,"focusablesDirty",!0);m(this,"state");m(this,"camera");m(this,"cameraFrustum",new _d);m(this,"viewProjectionMatrix",new wr);m(this,"tempScreenPos",new Ce);m(this,"debugEl",null);m(this,"collisions",new Map);m(this,"focusableEntities",new Map);m(this,"debug",!1);m(this,"debugBBoxElements",new Map);m(this,"viewfinder",new P4);m(this,"screenBoundsMap",new Map);m(this,"screenDiagonal",1);M(this,Nl);m(this,"update",(t=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!t&&(Date.now()-n>xJ||(s(this,Nl)&&cancelAnimationFrame(s(this,Nl)),k(this,Nl,requestAnimationFrame(()=>{this.updateRaf()}))))});this.state=t,this.camera=n,this.resize()}resize(){this.screenDiagonal=Math.sqrt(this.state.canvasWidth*this.state.canvasWidth+this.state.canvasHeight*this.state.canvasHeight),this.createViewfinder()}createViewfinder(){this.debugEl&&this.debugEl.remove();for(let t of this.debugBBoxElements.values())t.remove();this.debugBBoxElements.clear(),this.debug&&(this.debugEl=eF()),this.viewfinder.create(this.state.canvasWidth,this.state.canvasHeight,this.state.insetsPadding,this.debug,this.debugEl)}simplifyVertices(t){return t.length<3?t:YO(t).map(n=>t[n.index])}computeScreenSpaceBounds(t){let{vertices:n,boundingBox:o}=t;if(n==null||n.length<3||o==null||o.isEmpty()||!this.cameraFrustum.intersectsBox(o))return;let i=this.camera.projectionMatrix.elements,a=n.map(f=>({x:i[0]*f.x+i[4]*f.y+i[8]*f.z+i[12],y:i[1]*f.x+i[5]*f.y+i[9]*f.z+i[13],z:i[2]*f.x+i[6]*f.y+i[10]*f.z+i[14],w:i[3]*f.x+i[7]*f.y+i[11]*f.z+i[15]})),u=aF(a);if(u.length<3)return;let l=1/0,c=[];for(let f of u){let h=f.x/f.w,g=f.y/f.w;c.push({x:(h+1)/2*this.state.canvasWidth,y:(-g+1)/2*this.state.canvasHeight}),f.w<l&&(l=f.w)}let d=sF(c,this.state.canvasWidth,this.state.canvasHeight);if(!(d.length<=0))return{screenBBox:qI(c),clippedScreenBBox:this.debug?qI(d):void 0,closestZ:l}}updateFocusableEntities(){var n;this.focusableEntities.clear();let t;for(let o of this.state.geometry3DsInScene){if(o==null)continue;let i;if(o.type==="group-container"||o.type==="geometry-group")i=o.visible;else{let a=o.components[1];i=(n=a==null?void 0:a.visible)!=null?n:!0}if(i&&(t=o.type==="group-container"?o.components[1]:o.components[4],t!==void 0&&t.type==="focusable")){let a=String(o.type==="group-container"?o.userData.entityId:o.id);if(t.dirty===!0){let u=null;o instanceof Ei?u=o:"object3d"in o&&o.object3d instanceof Ei&&(u=o.object3d),u&&(t.vertices=this.simplifyVertices(iF(u,this.tempScreenPos)),t.boundingBox=new Zr().setFromObject(u),t.dirty=!1)}this.focusableEntities.set(a,t)}}this.focusablesDirty=!1}updateRaf(){if(this.focusableEntities.size===0){this.publish("geometry-in-focus",[]);return}this.cameraDirty&&this.compute()}updateDebugBBoxes(t,n){if(!(!this.debug||!this.debugEl)){KO(this.debugBBoxElements,t);for(let[o,i]of t){let a=n.has(o),u=this.collisions.get(o);QO(o,i,this.debugBBoxElements,this.debugEl,a,u)}}}compute(){if(this.collisions.clear(),this.screenBoundsMap.clear(),!this.viewfinder.center)return;this.viewProjectionMatrix.copy(this.camera.projectionMatrix),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let t=[];for(let[o,i]of this.focusableEntities){let a=this.computeScreenSpaceBounds(i);if(!a)continue;this.screenBoundsMap.set(o,a);let{screenBBox:u}=a,l=JO(u,this.viewfinder.bbox);if(l>0){t.push(o);let c=(u.minX+u.maxX)/2,d=(u.minY+u.maxY)/2,f=c-this.viewfinder.center.x,h=d-this.viewfinder.center.y,b=1/(1+Math.sqrt(f*f+h*h)/this.screenDiagonal),I=1/(1+Math.abs(a.closestZ)),v=b*.5+l*.35+I*.15;this.collisions.set(o,v)}}let n=Array.from(this.collisions,([o,i])=>({entityId:o,score:i})).sort((o,i)=>i.score-o.score).map(({entityId:o})=>o);if(this.debug){let o=n[0];this.viewfinder.updateLabel(o||"viewfinder");let i=o?this.collisions.get(o):void 0;this.viewfinder.updateScore(i);let a=new Set(t);this.updateDebugBBoxes(this.screenBoundsMap,a)}this.publish("geometry-in-focus",n),this.cameraDirty=!1}showDebug(){this.debug||(this.debug=!0,this.cameraDirty=!0,this.createViewfinder())}hideDebug(){this.debug&&(this.debug=!1,this.createViewfinder())}destroy(){s(this,Nl)&&cancelAnimationFrame(s(this,Nl)),this.debugEl&&this.debugEl.remove();for(let t of this.debugBBoxElements.values())t.remove();this.debugBBoxElements.clear(),this.collisions.clear(),this.focusableEntities.clear(),this.viewfinder.destroy()}};Nl=new WeakMap;p();p();p();p();function O4(e,r){r===void 0&&(r={});var t=pu(e);switch(!r.properties&&e.type==="Feature"&&(r.properties=e.properties),t.type){case"Polygon":return EJ(t,r);case"MultiPolygon":return IJ(t,r);default:throw new Error("invalid poly")}}function EJ(e,r){r===void 0&&(r={});var t=pu(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{};return uF(n,o)}function IJ(e,r){r===void 0&&(r={});var t=pu(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{},i=[];return n.forEach(function(a){i.push(uF(a,o))}),nc(i)}function uF(e,r){return e.length>1?eC(e,r):Gs(e[0],r)}function SJ(e,r){var t=!0;return qa(e,function(n){qa(r,function(o){if(t===!1)return!1;t=CJ(n.geometry,o.geometry)})}),t}function CJ(e,r){switch(e.type){case"Point":switch(r.type){case"Point":return!MJ(e.coordinates,r.coordinates);case"LineString":return!lF(r,e);case"Polygon":return!Iu(e,r)}break;case"LineString":switch(r.type){case"Point":return!lF(e,r);case"LineString":return!DJ(e,r);case"Polygon":return!cF(r,e)}break;case"Polygon":switch(r.type){case"Point":return!Iu(r,e);case"LineString":return!cF(e,r);case"Polygon":return!TJ(r,e)}}return!1}function lF(e,r){for(var t=0;t<e.coordinates.length-1;t++)if(wJ(e.coordinates[t],e.coordinates[t+1],r.coordinates))return!0;return!1}function DJ(e,r){var t=$p(e,r);return t.features.length>0}function cF(e,r){for(var t=0,n=r.coordinates;t<n.length;t++){var o=n[t];if(Iu(o,e))return!0}var i=$p(r,O4(e));return i.features.length>0}function TJ(e,r){for(var t=0,n=e.coordinates[0];t<n.length;t++){var o=n[t];if(Iu(o,r))return!0}for(var i=0,a=r.coordinates[0];i<a.length;i++){var u=a[i];if(Iu(u,e))return!0}var l=$p(O4(e),O4(r));return l.features.length>0}function wJ(e,r,t){var n=t[0]-e[0],o=t[1]-e[1],i=r[0]-e[0],a=r[1]-e[1],u=n*a-o*i;return u!==0?!1:Math.abs(i)>=Math.abs(a)?i>0?e[0]<=t[0]&&t[0]<=r[0]:r[0]<=t[0]&&t[0]<=e[0]:a>0?e[1]<=t[1]&&t[1]<=r[1]:r[1]<=t[1]&&t[1]<=e[1]}function MJ(e,r){return e[0]===r[0]&&e[1]===r[1]}var dF=SJ;function JI(e,r){var t=!1;return qa(e,function(n){qa(r,function(o){if(t===!0)return!0;t=!dF(n.geometry,o.geometry)})}),t}var AJ=5e3,YI="outdoor-system-debug-container",pF=!1,wu,Mn,M0,Xf,Mu,Ts,Ji,qf,A0,Jf,k4,B4,Aa,KI,P0,ud,fF,L4,R4,mF,hF,F4=class extends Je{constructor(t){super();M(this,Aa);M(this,wu,!0);M(this,Mn);m(this,"idleQueue",new ad);M(this,M0,"");M(this,Xf,new Set);M(this,Mu,new Set);M(this,Ts);M(this,Ji,null);M(this,qf,!1);M(this,A0,t=>{if(!s(this,Mn))throw new Error("Map not initialized");let o=[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]]].map(c=>s(this,Mn).project(c)),i=Math.max(...o.map(c=>c.x)),a=Math.min(...o.map(c=>c.x)),u=Math.max(...o.map(c=>c.y)),l=Math.min(...o.map(c=>c.y));return[new hx.default(a,l),new hx.default(i,u)]});M(this,Jf,(t,n)=>{if(!s(this,Mn))return;let o=s(this,Mn).on(t,n);o!=null&&o.unsubscribe&&this.onAbort(()=>o.unsubscribe())});M(this,k4,()=>{s(this,Ji)&&(clearTimeout(s(this,Ji)),k(this,Ji,null),k(this,wu,!1))});M(this,B4,()=>{s(this,Ji)&&(clearTimeout(s(this,Ji)),k(this,Ji,null)),k(this,Ji,setTimeout(()=>{s(this,k4).call(this)},AJ))});M(this,P0,async()=>{if(pF&&s(this,Ts)&&he(this,Aa,hF).call(this),!(!s(this,Mn)||!s(this,qf))&&s(this,wu)&&!(!s(this,Mu)||s(this,Mu).size===0)&&(s(this,Aa,fF)&&s(this,L4).call(this),s(this,Ts))){let t=new Set;this.idleQueue.onComplete(()=>{s(this,ud).length>0&&(s(this,Mu).forEach(n=>{var o;(o=s(this,Mn))==null||o.setFilter(n,["all",...s(this,ud)])}),k(this,wu,!1)),k(this,ud,[])});for(let n of s(this,Ts)){let o=zs(n),i=s(this,A0).call(this,o),a=s(this,Mn).queryRenderedFeatures(i,{layers:Array.from(s(this,Mu))});for(let u of a)u.id==null||t.has(u.id)||this.idleQueue.add(()=>{if(u.geometry!=null&&"coordinates"in u.geometry){let l;if(u.geometry.type==="Polygon"?l=Nd(u.geometry.coordinates):u.geometry.type==="MultiPolygon"&&(l=Kg(u.geometry.coordinates)),!l)return;JI(n,l)&&u.id!=null&&(t.add(u.id),s(this,ud).push(["!=",["id"],u.id]))}})}}});M(this,ud,[]);M(this,L4,()=>{this.idleQueue.clearAll()});M(this,R4,t=>{var n,o;if(s(this,Mn)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,Xf).size>0){let i=(o=(n=t==null?void 0:t.style)==null?void 0:n.stylesheet)==null?void 0:o.id;(!i||i!==s(this,M0))&&(k(this,M0,i),he(this,Aa,KI).call(this),k(this,wu,!0))}});t&&(k(this,Mn,t),s(this,Jf).call(this,"styledata",s(this,R4)),s(this,Jf).call(this,"render",s(this,P0)),k(this,qf,s(this,Mn).loaded()),s(this,Jf).call(this,"load",()=>{k(this,qf,!0)})),pF&&he(this,Aa,mF).call(this)}hideLayersIntersectingPolygons(t,n){s(this,Ji)&&clearTimeout(s(this,Ji)),s(this,B4).call(this),k(this,Ts,t.reduce((o,i)=>{if(i.geometry.type==="Polygon"){let a=Nd(i.geometry.coordinates);o.push(a)}else i.geometry.type==="MultiPolygon"&&o.push(...i.geometry.coordinates.map(a=>Nd(a)));return o},[]));for(let o of n)s(this,Xf).add(o);k(this,wu,!0),he(this,Aa,KI).call(this),s(this,P0).call(this)}destroy(){this.idleQueue.clearAll(),super.destroy()}};wu=new WeakMap,Mn=new WeakMap,M0=new WeakMap,Xf=new WeakMap,Mu=new WeakMap,Ts=new WeakMap,Ji=new WeakMap,qf=new WeakMap,A0=new WeakMap,Jf=new WeakMap,k4=new WeakMap,B4=new WeakMap,Aa=new WeakSet,KI=function(){if(k(this,Mu,new Set),s(this,Mn))for(let t of s(this,Xf))s(this,Mn).getLayer(t)&&s(this,Mu).add(t)},P0=new WeakMap,ud=new WeakMap,fF=function(){return this.idleQueue.size!==0},L4=new WeakMap,R4=new WeakMap,mF=function(){if(!document.getElementById(YI)&&s(this,Mn)){let t=document.createElement("div");t.id=YI,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,Mn).getContainer().appendChild(t)}},hF=function(){let t=document.getElementById(YI);if(!t||!s(this,Ts)||!s(this,Mn))return;let n=t.querySelectorAll('[id^="polygon-box-"]');for(let o=0;o<n.length;o++)n[o].remove();for(let o=0;o<s(this,Ts).length;o++){let i=s(this,Ts)[o],a=zs(i),u=s(this,A0).call(this,a),l=document.createElement("div");l.id="polygon-box-".concat(o),l.style.position="absolute",t.appendChild(l);let c=[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)];l.style.top=c[1]+"px",l.style.left=c[0]+"px",l.style.width=d[0]-c[0]+"px",l.style.height=d[1]-c[1]+"px",l.style.border="2px solid ".concat(s(this,wu)?"red":"blue")}};p();p();p();p();var N4=class extends Ju{constructor(t,n={}){var E;super();m(this,"tangentData");Object.defineProperty(this,"type",{value:"RibbonGeometry"});let o=(E=n.segments)!=null?E:64,i=new Ce,a=new Ce,u=new Ce(0,0,1),l=(o+1)*2,c=new Float32Array(l*3),d=new Float32Array(l*3),f=new Float32Array(l*2),h=new Float32Array(l),g=[];this.tangentData=new Float32Array((o+1)*3);let b=0,I=0,v=0;for(let T=0;T<=o;T++){let D=T/o;t.getPointAt(D,i),t.getTangentAt(D,a);let w=T*3;this.tangentData[w]=a.x,this.tangentData[w+1]=a.y,this.tangentData[w+2]=a.z,c[b++]=i.x,c[b++]=i.y,c[b++]=i.z,c[b++]=i.x,c[b++]=i.y,c[b++]=i.z,h[v++]=-1,h[v++]=1,f[I++]=0,f[I++]=D,f[I++]=1,f[I++]=D;let B=T*2*3;d[B]=u.x,d[B+1]=u.y,d[B+2]=u.z,d[B+3]=u.x,d[B+4]=u.y,d[B+5]=u.z}for(let T=0;T<o;T++){let D=T*2;g.push(D,D+2,D+1),g.push(D+1,D+2,D+3)}this.setIndex(g),this.setAttribute("position",new ec(c,3)),this.setAttribute("normal",new ec(d,3)),this.setAttribute("uv",new ec(f,2)),this.setAttribute("side",new ec(h,1))}};p();var j4="attribute float pathDistance;\nattribute vec3 pathNormal;\nattribute vec3 pathTangent;\nattribute float side;\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;\nuniform bool isRibbon;\nuniform bool billboarded;\nuniform float halfWidth;\nuniform mat4 cameraViewMatrix;\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\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 vec3 adjustedPosition = position;\n zoomLevel = clampRemap(cameraParameters.x, nearZoom, farZoom, 0.0, 1.0);\n\n // Only apply normal-based expansion for TubeGeometry\n // Ribbons have normal=(0,0,1) which would shift them up incorrectly\n if (!isRibbon) {\n float expansionFactor = (farRadius - nearRadius) * zoomLevel;\n adjustedPosition += normal * expansionFactor;\n }\n\n bool isHighlighted = fragPathDistance >= highlightStartFraction && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction);\n\n // For TubeGeometry: apply highlight width expansion using normal\n if (!isRibbon && isHighlighted) {\n adjustedPosition += normal * (highlightWidthMultiplier - 1.) / 2.;\n }\n\n // Unified ribbon width handling for both billboarded and non-billboarded\n if (isRibbon) {\n vec3 right;\n\n if (billboarded) {\n // Camera-facing: compute right from view direction\n vec3 viewDir = -vec3(cameraViewMatrix[0][2], cameraViewMatrix[1][2], cameraViewMatrix[2][2]);\n right = cross(pathTangent, viewDir);\n float rightLen = length(right);\n if (rightLen < 0.001) {\n right = cross(pathTangent, vec3(0.0, 0.0, 1.0));\n rightLen = length(right);\n if (rightLen < 0.001) {\n right = cross(pathTangent, vec3(0.0, 1.0, 0.0));\n rightLen = length(right);\n }\n }\n right = right / max(rightLen, 0.001);\n } else {\n // World-space: 90\xB0 CCW rotation of tangent in XY plane \u2192 perpendicular\n right = vec3(-pathTangent.y, pathTangent.x, 0.0);\n float rightLen = length(right);\n if (rightLen > 0.001) {\n right /= rightLen;\n } else {\n // Fallback for nearly vertical paths\n right = vec3(1.0, 0.0, 0.0);\n }\n }\n\n // Apply base half-width (geometry stores centerline only)\n adjustedPosition += right * halfWidth * side;\n\n // Shared: zoom-based expansion\n float expansionFactor = (farRadius - nearRadius) * zoomLevel;\n adjustedPosition += right * expansionFactor * side;\n\n // Shared: highlight width expansion (using right instead of normal)\n if (isHighlighted) {\n float highlightExpansion = halfWidth * (highlightWidthMultiplier - 1.0);\n adjustedPosition += right * highlightExpansion * side;\n }\n }\n\n // For TubeGeometry: flatten the bottom half of the tube\n if (!isRibbon && !pathIsVertical) {\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 // 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.\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 fragTopTextureU for arrow texture mapping\n if (isRibbon) {\n // For RibbonGeometry: uv.x is already 0-1 across ribbon width\n fragTopTextureU = uv.x;\n } else {\n // For TubeGeometry: compute texture coordinate to handle tube twisting\n // We want the arrow texture to always be on the top of the path\n vec3 bitangent = cross(normal, pathTangent);\n fragTopTextureU = -dot(bitangent, pathNormal) * 0.5 + 0.5;\n if (isHighlighted) {\n fragTopTextureU = -dot(bitangent, pathNormal * highlightWidthMultiplier) * 0.5 + 0.5;\n }\n }\n\n radius = mix(nearRadius, farRadius, zoomLevel);\n}\n";p();var QI="#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 float dashLength;\nuniform float dashGap;\nuniform bool dashRelativeToWidth;\nuniform float dashSize;\nuniform float gapSize;\nuniform bool dashAbsolute;\nuniform float dashMeters;\nuniform float gapMeters;\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// Border uniforms for ribbon geometry\nuniform bool borderEnabled;\nuniform vec3 borderColor;\nuniform float borderWidth;\nuniform bool isRibbon;\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 // Note: Using fragPathDistance (0-1 along path) for RibbonGeometry\n float v = (\n fragPathDistance * (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 // 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 // Apply border effect for ribbon geometry\n // fragTexcoord.x: 0\u21921 across ribbon width; edgeDist = distance to nearest edge\n if (borderEnabled && isRibbon) {\n float edgeDist = min(fragTexcoord.x, 1.0 - fragTexcoord.x);\n if (edgeDist < borderWidth) {\n finalColor = borderColor;\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 effectiveDashLength;\n float effectiveGapLength;\n\n if (dashAbsolute) {\n // Absolute mode: dashMeters/gapMeters are in meters\n // Convert to path-distance fraction using pathLength\n effectiveDashLength = dashMeters / pathLength;\n effectiveGapLength = gapMeters / pathLength;\n } else if (dashRelativeToWidth) {\n // Width-relative mode: dashSize/gapSize are multiples of path width\n // Convert to path-distance fraction using radius\n effectiveDashLength = (dashSize * radius * 2.0) / pathLength;\n effectiveGapLength = (gapSize * radius * 2.0) / pathLength;\n } else {\n // Length-fraction mode: use dashLength/dashGap directly as path fractions\n effectiveDashLength = dashLength;\n effectiveGapLength = dashGap;\n }\n\n float totalLength = effectiveDashLength + effectiveGapLength;\n float numSegments = ceil(1.0 / totalLength);\n float adjustedTotalLength = 1.0 / numSegments;\n float adjustedDashLength = adjustedTotalLength * (effectiveDashLength / totalLength);\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";p();var gF="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 yF="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==";p();var U4=new Ce,G4=new Ce,Yf=new Ce,bF=new Ce,jl=new Ce,_J=.5,OJ=2;function FJ(e,r,t){let n=e.x-r.x,o=e.y-r.y,i=e.z-r.z,a=t.x-r.x,u=t.y-r.y,l=t.z-r.z,c=n*a+o*u+i*l,d=Math.sqrt(n*n+o*o+i*i),f=Math.sqrt(a*a+u*u+l*l);if(d===0||f===0)return 0;let h=c/(d*f),g=Math.max(-1,Math.min(1,h));return Math.acos(g)}function xF(e,r=20){if(e.length<3||r<=0)return e;let t=r,n=r/2,o=[e[0]];for(let i=1;i<e.length-1;i++){let a=e[i],u=e[i-1],l=e[i+1],c=a.distanceTo(u),d=a.distanceTo(l);c>t&&(jl.subVectors(a,u).normalize(),Yf.set(a.x-jl.x*n,a.y-jl.y*n,a.z-jl.z*n),o.push(Yf.clone())),o.push(a),d>t&&(jl.subVectors(l,a).normalize(),Yf.set(a.x+jl.x*n,a.y+jl.y*n,a.z+jl.z*n),o.push(Yf.clone()))}return o.push(e[e.length-1]),o}var vF=.0025;function EF(e,r,t,n=Math.PI*2/3){if(e.length<3||r<=0||t<=0)return e;let o=[e[0]];for(let i=1;i<e.length-1;i++){let a=e[i-1],u=e[i],l=e[i+1],c=u.distanceToSquared(a),d=u.distanceToSquared(l);if(c<vF||d<vF){o.push(u);continue}if(FJ(a,u,l)<n){U4.subVectors(u,a).normalize(),G4.subVectors(l,u).normalize();let h=Math.sqrt(c),g=Math.sqrt(d),b=Math.max(_J,Math.min(OJ,r)),I=Math.min(b,h*.5),v=Math.min(b,g*.5);Yf.set(u.x-U4.x*I,u.y-U4.y*I,u.z-U4.z*I),bF.set(u.x+G4.x*v,u.y+G4.y*v,u.z+G4.z*v),o.push(Yf.clone(),bF.clone())}else o.push(u)}return o.push(e[e.length-1]),o}var ld=8,eS=Qo,kJ=new Xg;function IF(e,r,t){var C,A,O,F,Y,ee,de;let{breakpoint:n,width:o,accentColor:i,completeFraction:a,isVertical:u,visibleThroughGeometry:l,dashed:c,highlightCompleteFraction:d,highlightStartFraction:f,highlightEndFraction:h,highlightColor:g,highlightWidthMultiplier:b,xrayOpacity:I,__EXPERIMENTAL_BILLBOARDING:v}=r,{color:E}=t,T=!0,D=0,w=1/0,B=r.displayArrowsOnPath,X=!0,L=B,P=typeof o=="object"?Number(o.output[n])/2:o/2,R=typeof o=="object"?Number((C=o.output[n+1])!=null?C:o.output[n])/2:o/2,$=r.__EXPERIMENTAL_GEOMETRY==="ribbon",V=$&&v,H=((A=t.altitude)!=null?A:0)+BJ,re=0;e[0].z+=H;for(let W=1;W<e.length;++W){e[W].z+=H;let ie=e[W].x-e[W-1].x,J=e[W].z-e[W-1].z;if(u)re+=Math.sqrt(ie*ie+J*J);else{let fe=e[W].y-e[W-1].y;re+=Math.sqrt(ie*ie+fe*fe+J*J)}}let j=e,me=(O=r.smoothingCornerRadius)!=null?O:Ii.cornerRadius,z=(F=r.smoothingTension)!=null?F:Ii.tension,ue=me>0&&z>0;if(ue&&(j=xF(j),j=EF(j,me,z)),r.__EXPERIMENTAL_ENDCAP_ENABLED&&!u&&!$){let W=j[0],ie=j[j.length-1],J=ue?.01:-.01;j.push(ie.clone().setZ(ie.z+J)),j.unshift(W.clone().setZ(W.z+J))}let se=new w6;L&&(se=kJ.load(yF),se.colorSpace=Ug);let pe=new or(E),le=new or(i),ye=r.__EXPERIMENTAL_BORDER,Fe=(Y=ye==null?void 0:ye.enabled)!=null?Y:!1,Ee=(ye==null?void 0:ye.color)==="darken",Oe=(ee=ye==null?void 0:ye.width)!=null?ee:.1,we=Ee?pe.clone().multiplyScalar(.6):new or((de=ye==null?void 0:ye.color)!=null?de:"#000000"),Le={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new St(1,1)},cameraParameters:{type:"v2",value:new St(D,0)},complete:{type:"f",value:T?0:1},color:{type:"c",value:pe},pathLength:{type:"f",value:re},nearRadius:{type:"f",value:P},farRadius:{type:"f",value:R},nearZoom:{type:"f",value:D},farZoom:{type:"f",value:w},pulseColor:{type:"c",value:le},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:u},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:se},displayArrowsOnPath:{type:"b",value:B},showPulse:{type:"b",value:X},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:c},highlightCompleteFraction:{type:"f",value:d},highlightStartFraction:{type:"f",value:f},highlightEndFraction:{type:"f",value:h},highlightColor:{type:"c",value:new or(g)},highlightWidthMultiplier:{type:"f",value:b},dashLength:{type:"f",value:r.dashLength},dashGap:{type:"f",value:r.dashGap},dashRelativeToWidth:{type:"b",value:r.dashRelativeToWidth},dashSize:{type:"f",value:r.dashSize},gapSize:{type:"f",value:r.gapSize},dashAbsolute:{type:"b",value:r.dashAbsolute},dashMeters:{type:"f",value:r.dashMeters},gapMeters:{type:"f",value:r.gapMeters},isRibbon:{type:"b",value:$},billboarded:{type:"b",value:v},halfWidth:{type:"f",value:P},borderEnabled:{type:"b",value:Fe},borderColor:{type:"c",value:we},borderWidth:{type:"f",value:Oe},cameraViewMatrix:{type:"m4",value:new wr}};ue&&j.length>=2&&(j.unshift(j[0].clone()),j.push(j[j.length-1].clone()));let Qe=new k6(j);Qe.curveType="catmullrom",Qe.tension=ue?z:0;let Ge=LJ*j.length,N=$?new N4(Qe,{segments:Ge,billboarded:V}):new L6(Qe,Ge,P,ld,!1),xe=new Float32Array(N.attributes.position.count),Z=new ko(xe,1);if($)for(let W=0;W<=Ge;W++){let ie=W/Ge;Z.setX(W*2,ie),Z.setX(W*2+1,ie)}else for(let W=0;W<=Ge;W++){let ie=W/Ge;for(let J=0;J<=ld;J++)Z.setX(W*(ld+1)+J,ie)}N.setAttribute("pathDistance",Z);let De=new Float32Array(N.attributes.position.count*3),Ie=new ko(De,3),ve,Ne,Et,zt,Bt;if($){let W=N;for(let ie=0;ie<=Ge;ie++)Ne=ie*3,Et=W.tangentData[Ne],zt=W.tangentData[Ne+1],Bt=W.tangentData[Ne+2],Ie.setXYZ(ie*2,Et,zt,Bt),Ie.setXYZ(ie*2+1,Et,zt,Bt)}else{let W=N;for(let ie=0;ie<=Ge;ie++){ve=W.tangents[ie];for(let J=0;J<=ld;J++)Ie.setXYZ(ie*(ld+1)+J,ve.x,ve.y,ve.z)}}N.setAttribute("pathTangent",Ie);let rr=new Float32Array(N.attributes.position.count*3),Hr=new ko(rr,3),_n,On,Fn,vr=new Ce,sr=W=>{u?(_n=W.x*W.y,On=-1+W.y*W.y,Fn=W.z*W.y):(_n=-W.x*W.z,On=-W.y*W.z,Fn=1-W.z*W.z);let ie=Math.sqrt(_n*_n+On*On+Fn*Fn);return ie===0&&(ie=1),vr.set(_n/ie,On/ie,Fn/ie),vr},vn={x:0,y:0,z:0};if($){let W=N;for(let ie=0;ie<=Ge;ie++)Ne=ie*3,vn.x=W.tangentData[Ne],vn.y=W.tangentData[Ne+1],vn.z=W.tangentData[Ne+2],sr(vn),Hr.setXYZ(ie*2,vr.x,vr.y,vr.z),Hr.setXYZ(ie*2+1,vr.x,vr.y,vr.z)}else{let W=N;for(let ie=0;ie<=Ge;ie++){ve=W.tangents[ie],sr(ve);for(let J=0;J<=ld;J++)Hr.setXYZ(ie*(ld+1)+J,vr.x,vr.y,vr.z)}}N.setAttribute("pathNormal",Hr);let Ko=new $a({uniforms:Le,vertexShader:j4,fragmentShader:QI,side:eS});Ko.transparent=!0,Ko.alphaTest=.5,Le.resolution.value.x=1,Le.resolution.value.y=1,Le.vertexes.value=N.attributes.position.count,Le.arrowTexture.value.wrapS=Cm,Le.arrowTexture.value.wrapT=Cm,Le.arrowTexture.value.anisotropy=16;let Cr=new tt(N,Ko);Cr.name="path";let Qr=Cr.clone();Qr.name="xray";let Dr=ne(_({},Le),{opacityMultiplier:{type:"f",value:I},pathIsVertical:{type:"b",value:u}});Dr.complete.value=1,Qr.material=new $a({uniforms:Dr,vertexShader:j4,fragmentShader:QI,side:eS}),Qr.material.transparent=!0,Qr.material.alphaTest=.5,Qr.material.depthWrite=!1,Qr.material.depthTest=!1,Dr.resolution.value.x=1,Dr.resolution.value.y=1,Dr.vertexes.value=N.attributes.position.count,Dr.arrowTexture.value.wrapS=Cm,Dr.arrowTexture.value.wrapT=Cm,Dr.arrowTexture.value.anisotropy=16,Dr.complete.value=a,Cr.userData=Qr.userData=r.mesh.userData;let G=r.mesh;if(!l){let W=new $a({uniforms:Le,vertexShader:j4,fragmentShader:gF,side:eS}),ie=new tt(N,W);ie.name="stencil",ie.material.colorWrite=!1,ie.material.stencilWrite=!0,ie.material.stencilRef=1,ie.material.stencilFunc=Ad,ie.material.stencilZPass=Va,ie.material.stencilZFail=Va,ie.material.stencilFail=Va,ie.material.depthWrite=!1,ie.material.depthTest=!1,ie.userData=r.mesh.userData,G.add(ie),G.add(Qr),Qr.renderOrder=In.XRAY_PATH,Cr.renderOrder=In.STENCIL_PATH}if(G.add(Cr),u){let W=new Zr().setFromObject(Cr),ie=new Ce;W.getCenter(ie),G.children.forEach(J=>{J.geometry.center(),J.position.copy(ie)})}l&&(Cr.material.stencilWrite=!0,Cr.material.stencilRef=1,Cr.material.stencilFunc=Md,Cr.material.stencilZPass=za,Cr.material.stencilZFail=za,Cr.material.stencilFail=za,Cr.material.needsUpdate=!0,Cr.layers.disableAll(),Cr.layers.enable(In.ALWAYS_ON_TOP_PATHS)),N.computeBoundingBox();let S=new Ce;return N.boundingBox.getCenter(S),{mesh:G,material:Ko,center:S}}var BJ=.15,LJ=30;var RJ=.5,_0=class extends Je{constructor(t,n,o,i){super();m(this,"rendererState");m(this,"verticalDistanceDirty",!0);m(this,"convertTo3DMapPosition");m(this,"getParentContainer");m(this,"convertZoomLevelToAltitude");this.rendererState=t,this.convertTo3DMapPosition=n,this.getParentContainer=o,this.convertZoomLevelToAltitude=i}update(t,n,o){let i=!1;for(let a of this.rendererState.geometry3DsInScene)if(a&&a.type==="path"&&a.components[0].type==="path"){let u=a.components[0],l=a.components[1],c=u.isVertical&&this.verticalDistanceDirty;if(!(u instanceof kl))continue;let d=[];if(u.dirty||l.dirty||c){if(u.mesh.parent!=null)for(let f=u.mesh.children.length-1;f>=0;f--)an(u.mesh.children[0]);if(u.feature.features.length===2&&u.feature.features[0].properties.parentId&&u.feature.features[1].properties.parentId){let f=u.feature.features[0],h=u.feature.features[u.feature.features.length-1],g,b,I=f.geometry.coordinates[2]||0,v=h.geometry.coordinates[2]||0;f.properties.parentId&&(g=this.getParentContainer(f.properties.parentId,!0),g!=null&&g.altitude!=null&&(I+=g.altitude,u.isVertical=!0)),h.properties.parentId&&(b=this.getParentContainer(h.properties.parentId,!0),b!=null&&b.altitude!=null&&(v+=b.altitude,u.isVertical=!0));let E=this.convertTo3DMapPosition(f.geometry.coordinates[1],f.geometry.coordinates[0],I),T=this.convertTo3DMapPosition(h.geometry.coordinates[1],h.geometry.coordinates[0],v);Math.abs(E.z-T.z)>RJ&&g!=null&&g.visible&&b!=null&&b.visible&&(d=[E,T])}else{let f=u.feature.features;for(let h=0;h<f.length;h++)if(h===0||!DC(f[h].geometry.coordinates,f[h-1].geometry.coordinates)){let g=this.convertTo3DMapPosition(f[h].geometry.coordinates[1],f[h].geometry.coordinates[0],f[h].geometry.coordinates[2]||0);d.push(g)}}if(d.length>1){let{mesh:f,material:h,center:g}=IF(d,u,{color:l.color,altitude:l.altitude,isVertical:u.isVertical});u.mesh=f,u.material=h,u.position=g}u.dirty&&typeof u.width=="object"&&u.width.on==="zoom-level"&&(u.altitudeBreakpoints=u.width.input.map(f=>this.convertZoomLevelToAltitude(f))),u.dirty=!1}l.dirty&&(u.mesh.children.forEach(f=>{if(f.name==="stencil")return;f.material.uniforms.color.value.set(l.color),f.material.visible=l.visible,f.material.needsUpdate=!0;let h=u.__EXPERIMENTAL_BORDER;(h==null?void 0:h.color)==="darken"&&f.material.uniforms.borderColor.value.copy(f.material.uniforms.color.value).multiplyScalar(.6)}),u.mesh.position.z=l.altitude,l.dirty=!1),u.material&&(u.mesh.children.forEach(f=>{var g,b,I,v,E,T,D,w,B,X;let h=f.material.uniforms;if(f.name==="stencil"){u.materialDirty&&SF(u,f.material);return}if(u.materialDirty&&f.name==="xray"&&h.opacityMultiplier&&(h.opacityMultiplier.value=u.xrayOpacity),typeof u.width=="object"&&u.width.on==="zoom-level"){u.altitudeBreakpoints&&u.altitudeBreakpoints.length>2&&K.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 L=K6(o,(b=(g=u.altitudeBreakpoints)==null?void 0:g.slice(0,2))!=null?b:[t,n]);u.breakpoint=L,h.nearZoom.value=(v=(I=u.altitudeBreakpoints)==null?void 0:I[L])!=null?v:t,h.farZoom.value=(T=(E=u.altitudeBreakpoints)==null?void 0:E[L+1])!=null?T:n,h.nearRadius.value=Number(u.width.output[L])/2,h.farRadius.value=Number((D=u.width.output[L+1])!=null?D:u.width.output[L])/2,h.halfWidth.value=h.nearRadius.value}if(h.cameraParameters.value.x=o,h.cameraViewMatrix.value.copy(this.rendererState.cameraObject.matrixWorldInverse),u.materialDirty){h.displayArrowsOnPath.value=u.displayArrowsOnPath,h.pulseColor.value.set(u.accentColor),h.complete.value=u.completeFraction,SF(u,f.material),h.dashed.value=u.dashed,h.dashLength.value=u.dashLength,h.dashGap.value=u.dashGap,h.dashRelativeToWidth.value=u.dashRelativeToWidth,h.dashSize.value=u.dashSize,h.gapSize.value=u.gapSize,h.dashAbsolute.value=u.dashAbsolute,h.dashMeters.value=u.dashMeters,h.gapMeters.value=u.gapMeters;let L=u.__EXPERIMENTAL_BORDER;h.borderEnabled.value=(w=L==null?void 0:L.enabled)!=null?w:!1,h.borderWidth.value=(B=L==null?void 0:L.width)!=null?B:.1,(L==null?void 0:L.color)==="darken"?h.borderColor.value.copy(h.color.value).multiplyScalar(.6):h.borderColor.value.set((X=L==null?void 0:L.color)!=null?X:"#000000"),h.billboarded.value=u.__EXPERIMENTAL_BILLBOARDING,typeof u.width=="number"&&(h.nearZoom.value=t,h.farZoom.value=n,h.nearRadius.value=Number(u.width)/2,h.farRadius.value=Number(u.width)/2,h.halfWidth.value=h.nearRadius.value)}}),u.displayArrowsOnPath&&u.animateArrowsOnPath&&(u.mesh.children.forEach(f=>{f.name!=="stencil"&&(f.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,f.material.needsUpdate=!0)}),i=!0),u.materialDirty=!1)}this.verticalDistanceDirty=!1,i&&this.publish("animate:path")}};function SF(e,r){let t=r.uniforms;t.highlightCompleteFraction.value=e.highlightCompleteFraction,t.highlightStartFraction.value=e.highlightStartFraction,t.highlightEndFraction.value=e.highlightEndFraction,t.highlightWidthMultiplier.value=e.highlightWidthMultiplier,t.highlightColor.value.set(e.highlightColor)}p();var Jr,Kf,Au,V4,z4=class{constructor(r){m(this,"rendererState");m(this,"dirty",!1);M(this,Jr);M(this,Kf);M(this,Au);M(this,V4,new wr);this.rendererState=r}updateOne(r){if(r instanceof Yt&&r.components[0]instanceof sn&&r.components[1]instanceof Ya&&r.parentObject3D instanceof Ka&&(k(this,Jr,r.components[0]),k(this,Au,r.components[1]),!s(this,Jr).detached&&s(this,Jr).shouldDetach&&s(this,Jr).mesh!=null&&s(this,Jr).material!=null&&s(this,Jr).batchedProps!=null)){k(this,Kf,r.parentObject3D),s(this,Jr).visible=!1;let t=s(this,Au).color,n=s(this,Au).opacity*Gd(r),i=s(this,Jr).material.clone({color:t,side:Qo,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1}),a=new lD(1,s(this,Jr).batchedProps.positionCount,0,i),u=$O(s(this,Jr),a,s(this,V4));if(u==null)return;a.userData={entities:{0:r.id},detached:!0},s(this,Jr).instanceIndex=u,i.setColor(s(this,Jr).instanceIndex,new or(t),s(this,Au).topColor?new or(s(this,Au).topColor):new or(t)),s(this,Jr).mesh=a,s(this,Jr).material=i,s(this,Kf).add(a),s(this,Jr).shouldDetach=!1,s(this,Jr).detached=!0}}update(){if(!this.dirty)return;let r;for(let t of this.rendererState.geometry3DIdsInScene)r=this.rendererState.geometry3DMap.get(t),this.updateOne(r);this.dirty=!1,this.cleanup()}cleanup(){k(this,Jr,void 0),k(this,Kf,void 0),k(this,Au,void 0)}};Jr=new WeakMap,Kf=new WeakMap,Au=new WeakMap,V4=new WeakMap;p();p();function CF(e,r,t){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let o=r||1e-4,i=o/Math.max(t,1e-4);return I4(e.mesh.geometry,e.batchedProps.range,o,0),e.material&&(e.material.repeatYFactor=i),e.currentHeight=o,!0}return!1}function DF(e,r,t,n,o,i){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,t),t.decompose(n,o,i),n.z=r,t.compose(n,o,i),e.mesh.setMatrixAt(e.instanceIndex,t),e.altitude=r,!0):!1}var Pa,ws,H4,Z4,W4,X4,$4=class{constructor(r){m(this,"rendererState");m(this,"dirty",!1);M(this,Pa);M(this,ws);M(this,H4,new wr);M(this,Z4,new Ce);M(this,W4,new Vg);M(this,X4,new Ce);this.rendererState=r}updateOne(r){var t;if(r instanceof Yt&&r.type==="geometry"&&((t=r.components[1])!=null&&t.dirty)&&(k(this,Pa,r.components[0]),k(this,ws,r.components[1]),r.type==="geometry")){let n=!1;s(this,ws).height!==s(this,Pa).currentHeight&&(n=CF(s(this,Pa),s(this,ws).height,s(this,ws).initialHeight)),s(this,ws).altitude!==s(this,Pa).altitude&&(n=DF(s(this,Pa),s(this,ws).altitude,s(this,H4),s(this,Z4),s(this,W4),s(this,X4))),n&&s(this,Pa).mesh!=null&&s(this,Pa).mesh.computeBoundingSphere()}}update(){for(let r of this.rendererState.geometry3DsInScene)this.updateOne(r);this.cleanup()}cleanup(){k(this,Pa,void 0),k(this,ws,void 0)}};Pa=new WeakMap,ws=new WeakMap,H4=new WeakMap,Z4=new WeakMap,W4=new WeakMap,X4=new WeakMap;p();var NJ={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1,showGeometryInFocus:!1},q4=class{constructor(r){m(this,"state",NJ);m(this,"core");this.core=r}update(r){let t={};for(let[n,o]of Object.entries(r))n in this.state&&this.state[n]!==r[n]&&(this.state[n]=o,t[n]=o);this.handleUpdate(t)}handleUpdate(r){r.showPolygonLabelTextAreaMesh!=null&&(r.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),r.showEnvMap!=null&&(r.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),r.showCollisionBoxes!=null&&(r.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes()),r.showGeometryInFocus!=null&&(r.showGeometryInFocus?this.core.getSystems().geometryInFocusSystem.showDebug():this.core.getSystems().geometryInFocusSystem.hideDebug())}};p();var O0=9,jJ=!1,TF=.1;function UJ(e,r,t){for(let n=0;n<r;n++){let o=(t&16711680)>>16,i=(t&65280)>>8,a=t&255;e[n*3]=o/255,e[n*3+1]=i/255,e[n*3+2]=a/255}}var J4=class{constructor(r,t,n){m(this,"state");m(this,"renderer");m(this,"renderService");m(this,"pickingTexture");m(this,"pickingMaterial");m(this,"pixelBuffer");m(this,"width",0);m(this,"height",0);m(this,"scale",1/2);m(this,"color",1);m(this,"convertTo3DMapPosition");m(this,"destroyed",!1);m(this,"enabled",!1);m(this,"backgroundId",16777215);m(this,"resize",()=>{let r=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/r*this.scale),this.height=Math.floor(this.renderer.domElement.height/r*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new Tm(this.width,this.height,{format:S6,type:E6,internalFormat:"RGBA"})});m(this,"shouldShowByXY",(r,t,n)=>{if(this.pixelBuffer==null)return!1;let o=r+(this.height-t-1)*this.width,i=this.pixelBuffer[o*4],a=this.pixelBuffer[o*4+1],u=this.pixelBuffer[o*4+2],l=i<<16|a<<8|u;return l===n||l===this.backgroundId});m(this,"activeOccluders",new Set);m(this,"update",()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let r,t;for(let o of this.state.geometry3DsInScene)if((o==null?void 0:o.type)==="group-container"&&o.userData.occluderFeature!=null&&o.userData.occluderId!=null&&(this.activeOccluders.add(o.userData.occluderId),o.userData.occluderDirty)){if(r=o.userData.occluderFeature,r.geometry.type==="Polygon"&&r.geometry.coordinates.length>0){let i=Wb(r,this.convertTo3DMapPosition,{color:"white",height:TF});t=this.createOccluderMesh(i,o.userData.occluderId),o.add(t)}else if(r.geometry.type==="MultiPolygon"){let i=Xb(r,this.convertTo3DMapPosition,{color:"white",height:TF});t=this.createOccluderMesh(i,o.userData.occluderId),o==null||o.add(t)}o.userData.occluderDirty=!1}this.renderer.setRenderTarget(this.pickingTexture);let n=new or(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(O0),this.renderService.renderScene(this.state.geometryScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(O0),jJ?this.renderService.enabledLayers.add(O0):this.renderService.enabledLayers.delete(O0),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let o of this.state.geometry2DsInScene){let i=o==null?void 0:o.components[2];if(o&&(i==null?void 0:i.id)!=null&&this.activeOccluders.has(i.id)&&(i!=null&&i.enabled)){let a=o.components[0].projection,u=Math.floor(a.x*this.scale),l=Math.floor(a.y*this.scale),c=this.shouldShowByXY(u,l,i.id);o.components[0].isOccluded=!c}else o&&i&&!i.enabled&&(o.components[0].isOccluded=!1)}}).catch(o=>{this.destroyed||K.error(o)})});if(this.state=r,this.convertTo3DMapPosition=t,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new $a({glslVersion:T6,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(r,t){let n=r.attributes.position,o=new Float32Array(n.count*3);UJ(o,n.count,t),r.setAttribute("color",new ko(o,3))}createOccluderMesh(r,t){let n=new tt(r,this.pickingMaterial);return n.layers.set(O0),this.applyId(n.geometry,t),n.userData.occluderId=t,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var r;this.destroyed=!0,(r=this.pickingTexture)==null||r.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};p();var Y4=class{constructor(r){this.state=r;m(this,"dirty",!0)}update(){var r;if(this.dirty){for(let t of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(t);if(n instanceof Yt&&n.type==="geometry"&&((r=n.components[0])==null?void 0:r.geometry)!=null){let o=n.components[0];o.geometry&&(o.geometry.dispose(),o.geometry=void 0)}}this.dirty=!1}}};p();var K4=class extends Je{constructor(t){super();m(this,"dirty",!0);m(this,"state");m(this,"texturePromiseCache",new Map);this.state=t}async loadTexture(t){if(this.texturePromiseCache.has(t))return this.texturePromiseCache.get(t);let n=new Promise((o,i)=>{Bl.getLoader().load(t,o,void 0,i)});return this.texturePromiseCache.set(t,n),n}update(){for(let t of this.state.geometry3DsInScene){if(!(t instanceof Yt))continue;let n=t.components[6];if(!(n instanceof ic))continue;let o=t.components[0];if(!(o instanceof sn)||!n.dirty)continue;let i=Du(o);i!=null&&(n.texture!=null&&(n.texture.path===""?(i.texture=null,i.hideTextures(o.instanceIndex),n.dirty=!1):this.loadTexture(n.texture.path).then(a=>{a&&(n.textureInstance=a,i.texture=a,i.blendTexture=!0,i.showTextures(o.instanceIndex)),this.publish("texture-added")})),n.topTexture!=null&&(n.topTexture.path===""?(i.topTexture=null,i.hideTextures(o.instanceIndex),n.dirty=!1):this.loadTexture(n.topTexture.path).then(a=>{a&&(n.topTextureInstance=a,i.topTexture=a,i.blendTexture=!0,i.showTextures(o.instanceIndex)),this.publish("texture-added")})),n.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async t=>{(await t).dispose()}),this.texturePromiseCache.clear()}};p();var Q4=class{constructor(r){m(this,"currentOrder",In.ALWAYS_ON_TOP_MODELS);m(this,"assignedOrders",new WeakMap);m(this,"state");this.state=r}assignOrder(r){return this.assignedOrders.has(r)?this.assignedOrders.get(r):(this.currentOrder+=1,this.assignedOrders.set(r,this.currentOrder),this.currentOrder)}releaseOrder(r){return this.assignedOrders.delete(r),In.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(r){return this.assignedOrders.get(r)}update(){var n;let r,t;for(let o of this.state.geometry3DsInScene)if(o&&o.type==="model"&&(n=o.components[1])!=null&&n.dirty)if(r=o.components[1],t=o.components[0],r.visibleThroughGeometry===!0){let i=this.assignOrder(t);t.renderOrder!==i&&(t.renderOrder=i)}else t.renderOrder>In.GEOMETRY&&(t.renderOrder=this.releaseOrder(t))}};p();var ev=class{constructor(r){m(this,"state");this.state=r}applyMask(r,t,n){this.disableMask(r,t),n.mode==="mask"&&n.maskId!=null&&n.enabled?this.enableMaskProducer(r,t,n):n.mode==="masked-object"&&n.maskId!=null&&n.enabled&&this.enableMaskReciever(r,n)}update(){let r;for(let t of this.state.geometry3DsInScene)(t==null?void 0:t.type)==="geometry-group"&&(!C0(t,this.state)||E4(t)&&C0(t,this.state))&&(r=t.components[0],r!=null&&r.dirty&&t.userData&&(t.traverse(n=>{(n instanceof tt||n instanceof Za)&&n.material instanceof P6&&r!=null&&!n.userData.detached&&(this.disableMask(n.material,n),this.applyMask(n.material,n,r))}),r.dirty=!1))}enableMaskProducer(r,t,n){r.stencilWrite=!0,r.colorWrite=!1,r.stencilRef=n.maskId,r.stencilFunc=Ad,r.stencilZPass=Va,r.stencilZFail=za,r.stencilFail=za,r.needsUpdate=!0,r.depthWrite=!1,t.layers.disableAll(),t.layers.set(In.MASKS)}enableMaskReciever(r,t){r.stencilWrite=!0,r.stencilRef=t.maskId,r.stencilFunc=t.effect==="reveal"?D6:Md,r.stencilZPass=za,r.stencilZFail=za,r.stencilFail=za,r.needsUpdate=!0}disableMask(r,t){r.stencilWrite=!1,r.colorWrite=!0,r.needsUpdate=!0,t.layers.disableAll(),t.layers.set(In.GEOMETRY)}};p();var wF=1e4,tv=class{constructor(r){m(this,"rendererState");m(this,"dirty",!1);this.rendererState=r}update(){var n;let r,t;for(let o of this.rendererState.geometry3DsInScene)if(t=o.components[0],r=o.components[7],o.type==="model"&&r!=null&&(r.dirty&&t.mesh!=null&&(r==null?void 0:r.verticalOffset)!==1/0&&(r.plane==null&&(r.plane=new O6(new Ce(0,0,-1),r.verticalOffset),this.process(t,r)),r.plane.constant!==r.verticalOffset&&(r.plane.constant=r.verticalOffset),r.topColor!=null&&((n=r.holeFillMesh)==null?void 0:n.material)instanceof wm&&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 i=r.plane,a=r.holeFillMesh;i.coplanarPoint(a.position),a.lookAt(a.position.x-i.normal.x,a.position.y-i.normal.y,a.position.z-i.normal.z)}}process(r,t){var h;if(r.mesh==null)return;let n=r.mesh.parent,o=[];r.mesh.traverse(g=>{if(g instanceof tt){let b=g.geometry.clone();g.updateWorldMatrix(!0,!1),b.applyMatrix4(g.matrixWorld),o.push(b),b.computeVertexNormals(),g.material.clippingPlanes=[t.plane],g.material.transparent=!1}});let i=Si(o),a=new $g,u=new $g,l=this.createHoleFillGeometry(i,t.plane,1);l.name="hole-fill-group";let c=new wm({color:(h=t.topColor)!=null?h:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:Md,stencilFail:Va,stencilZFail:Va,stencilZPass:Va}),d=new Bo(wF,wF),f=new tt(d,c);f.name="hole-fill-mesh",t.holeFillMesh=f,f.renderOrder=1.1,u.add(l),u.add(r.mesh),a.add(u),a.add(f),n==null||n.add(a),r.mesh=a}createHoleFillGeometry(r,t,n=0){let o=new $g,i=new on;i.depthWrite=!1,i.depthTest=!1,i.colorWrite=!1,i.stencilWrite=!0,i.stencilFunc=Ad;let a=i.clone();a.side=Sm,a.clippingPlanes=[t],a.stencilFail=Gg,a.stencilZFail=Gg,a.stencilZPass=Gg;let u=new tt(r,a);u.renderOrder=n,o.add(u);let l=i.clone();l.side=Ql,l.clippingPlanes=[t],l.stencilFail=zg,l.stencilZFail=zg,l.stencilZPass=zg;let c=new tt(r,l);return c.renderOrder=n,o.add(c),o}};p();var rv=class{constructor(){m(this,"plugins",new Set)}registerPlugin(r){this.plugins.add(r)}unregisterPlugin(r){this.plugins.delete(r)}update(r){for(let t of this.plugins)t.update(r)}};p();var nv=class{constructor(r){m(this,"type","occlusion2d");m(this,"enabled",!0);m(this,"id");this.id=r}};p();p();p();var MF="varying vec4 vWorldPosition;\n\nvoid main() {\n vWorldPosition = modelMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n\n";p();var AF="uniform sampler2D shadowMap;\nuniform mat4 lightMatrix;\nuniform float shadowBias;\nuniform float shadowOpacity;\nuniform vec3 baseColor;\nuniform float shadowMapSize;\nuniform float pcfSpread;\nuniform int pcfSamples;\nuniform float depthRangeMax;\nuniform bool shadowEnabled;\nvarying vec4 vWorldPosition;\nfloat shadowThreshold = 0.05;\nfloat shadowStrengthMultiplier = 0.6;\n\n/**\n * Interleaved gradient noise for temporal/spatial dithering of shadow samples\n */\nfloat interleavedGradientNoise(vec2 position) {\n vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);\n return fract(magic.z * fract(dot(position, magic.xy)));\n}\n\n/**\n * Poisson disk sampling pattern for PCF soft shadows\n */\nconst vec2 poissonDisk[16] = vec2[](\n vec2(-0.94201624, -0.39906216),\n vec2(0.94558609, -0.76890725),\n vec2(-0.094184101, -0.92938870),\n vec2(0.34495938, 0.29387760),\n vec2(-0.91588581, 0.45771432),\n vec2(-0.81544232, -0.87912464),\n vec2(-0.38277543, 0.27676845),\n vec2(0.97484398, 0.75648379),\n vec2(0.44323325, -0.97511554),\n vec2(0.53742981, -0.47373420),\n vec2(-0.26496911, -0.41893023),\n vec2(0.79197514, 0.19090188),\n vec2(-0.24188840, 0.99706507),\n vec2(-0.81409955, 0.91437590),\n vec2(0.19984126, 0.78641367),\n vec2(0.14383161, -0.14100790)\n);\n\n/**\n * Sample shadow map using PCF with rotated Poisson disk\n */\nfloat sampleShadow(vec3 lightSpacePos) {\n vec2 texelSize = 1.0 / vec2(shadowMapSize, shadowMapSize);\n float shadow = 0.0;\n float currentDepth = lightSpacePos.z * depthRangeMax;\n \n // Rotate Poisson disk by noise to reduce banding\n float noise = interleavedGradientNoise(gl_FragCoord.xy) * 6.283185;\n float cosNoise = cos(noise);\n float sinNoise = sin(noise);\n mat2 rotation = mat2(cosNoise, -sinNoise, sinNoise, cosNoise);\n \n int sampleCount = min(pcfSamples, 16);\n int validSamples = 0;\n \n for (int i = 0; i < 16; i++) {\n if (i >= sampleCount) break;\n \n vec2 offset = rotation * poissonDisk[i] * texelSize * pcfSpread;\n vec2 uv = lightSpacePos.xy + offset;\n \n // Skip samples outside shadow map bounds\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n continue;\n }\n \n float sampledDepth = texture2D(shadowMap, uv).r;\n shadow += (currentDepth - shadowBias > sampledDepth) ? 1.0 : 0.0;\n validSamples++;\n }\n \n if (validSamples == 0) return 1.0;\n return 1.0 - (shadow / float(validSamples));\n}\n\nvoid main() {\n if (shadowEnabled) {\n // Transform world position to light space\n vec4 shadowCoord = lightMatrix * vWorldPosition;\n vec3 projCoords = shadowCoord.xyz / shadowCoord.w;\n \n // Check if fragment is within shadow map bounds\n bool inBounds = projCoords.x >= 0.0 && projCoords.x <= 1.0 && \n projCoords.y >= 0.0 && projCoords.y <= 1.0 && \n projCoords.z >= 0.0 && projCoords.z <= 1.0;\n \n if (inBounds) { \n float visibility = sampleShadow(projCoords);\n float shadowIntensity = 1.0 - visibility;\n \n if (shadowIntensity > shadowThreshold) {\n float shadowStrength = shadowIntensity * shadowOpacity * shadowStrengthMultiplier;\n gl_FragColor = vec4(baseColor, shadowStrength);\n }\n }\n }\n}\n\n";var ov=class extends $a{constructor(){super({vertexShader:MF,fragmentShader:AF,uniforms:{shadowMap:{value:null},lightMatrix:{value:new wr},shadowBias:{value:8e-5},shadowOpacity:{value:.25},baseColor:{value:new or(8421504)},shadowMapSize:{value:4096},pcfSpread:{value:3.5},pcfSamples:{value:4},depthRangeMax:{value:1},shadowEnabled:{value:!1}},transparent:!0,depthWrite:!1,side:Qo})}setShadowUniforms(r,t,n,o,i,a,u,l,c,d){this.uniforms.shadowMap.value=r,this.uniforms.lightMatrix.value.copy(t),this.uniforms.shadowBias.value=n,this.uniforms.shadowOpacity.value=o,this.uniforms.baseColor.value=i,this.uniforms.shadowMapSize.value=a,this.uniforms.pcfSpread.value=u,this.uniforms.pcfSamples.value=l,this.uniforms.depthRangeMax.value=c,this.uniforms.shadowEnabled.value=d}};var _a={enabled:!0,debug:!1,baseColor:"#a0a0a0",shadowOpacity:.25,pcfSamples:4,pcfSpread:3,shadowBias:.001,normalBias:.12,shadowMapSize:"auto",sunAzimuth:225,sunElevation:45},PF=1e4,zJ=-.05,VJ=999,$J=4096,HJ=2048,ZJ=20.5,WJ=19.5,_F=.1,XJ=400,qJ=-200,JJ=50,YJ=100,KJ=-50,QJ=40,Qf=15,Pu=22,eY=100,tY=5,rY=50,nY=50,oY=40,iY=5,aY=.5,tS=1,sY=5,An=256,uY=65535,lY=.5,iv=.1,cY=1e3,dY=16737792,pY=.2,OF=.2,fY=1001,mY=8900331,av=class{constructor(r,t,n,o){m(this,"state");m(this,"rendererService");m(this,"depthMaterial");m(this,"cameraOrbit");m(this,"lightCamera");m(this,"shadowRenderTarget");m(this,"lightMatrix",new wr);m(this,"currentSnapX",0);m(this,"currentSnapY",0);m(this,"shadowCenter",new Ce);m(this,"shadowPlane",null);m(this,"shadowPlaneMaterial",null);m(this,"shadowPlaneEnabled",!0);m(this,"lightCameraHelper",null);m(this,"debugEnabled",!1);m(this,"debugGrid",null);m(this,"debugCurrentCell",null);m(this,"debugCurrentCellMaterial",null);m(this,"debugCanvas",null);m(this,"debugCanvasCtx",null);m(this,"debugRenderTarget",null);m(this,"options");m(this,"internal");m(this,"shadowResolutionSizes",{high:$J,low:HJ});m(this,"shadowResolutionZoomThresholds",{high:ZJ,low:WJ});m(this,"debugPixelBuffer",null);m(this,"bias",new wr().set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1));m(this,"matrix",new wr);m(this,"transparentGeometryVisibilityStateMap",new Map);m(this,"lastZoomLevel",null);m(this,"lastCameraElevation",null);m(this,"needsRender",!0);m(this,"needsCompute",!0);var a,u,l,c,d,f,h,g,b,I,v;this.state=r,this.cameraOrbit=n,this.rendererService=t,this.options=Object.freeze({enabled:(a=o==null?void 0:o.enabled)!=null?a:_a.enabled,debug:(u=o==null?void 0:o.debug)!=null?u:_a.debug,baseColor:(l=o==null?void 0:o.baseColor)!=null?l:_a.baseColor,shadowOpacity:(c=o==null?void 0:o.shadowOpacity)!=null?c:_a.shadowOpacity,pcfSamples:(d=o==null?void 0:o.pcfSamples)!=null?d:_a.pcfSamples,pcfSpread:(f=o==null?void 0:o.pcfSpread)!=null?f:_a.pcfSpread,shadowBias:(h=o==null?void 0:o.shadowBias)!=null?h:_a.shadowBias,normalBias:(g=o==null?void 0:o.normalBias)!=null?g:_a.normalBias,shadowMapSize:(b=o==null?void 0:o.shadowMapSize)!=null?b:_a.shadowMapSize,sunAzimuth:(I=o==null?void 0:o.sunAzimuth)!=null?I:_a.sunAzimuth,sunElevation:(v=o==null?void 0:o.sunElevation)!=null?v:_a.sunElevation});let i=this.options.shadowMapSize==="auto"?this.shadowResolutionSizes.high:this.options.shadowMapSize;this.internal={baseColor:new or(this.options.baseColor),lightOrthoSize:JJ,sunDistance:YJ,groundZPosition:KJ,snapGridSize:QJ,currentShadowMapSize:i,currentShadowResolutionMode:(this.options.shadowMapSize==="auto",null),sunDirection:new Ce,sunAzimuth:this.options.sunAzimuth,sunElevation:this.options.sunElevation},this.updateSunDirection(),this.lightCamera=new N6(-this.internal.lightOrthoSize,this.internal.lightOrthoSize,this.internal.lightOrthoSize,-this.internal.lightOrthoSize,_F,XJ),this.lightCamera.position.copy(this.internal.sunDirection.clone().multiplyScalar(qJ)),this.lightCamera.lookAt(new Ce(0,0,0)),this.lightCamera.updateMatrixWorld(),this.lightCamera.updateProjectionMatrix(),this.shadowRenderTarget=this.createShadowRenderTarget(i),this.depthMaterial=new R6,this.depthMaterial.depthPacking=C6,this.depthMaterial.blending=v6,this.createShadowPlane(),this.options.debug&&this.setDebugEnabled(!0)}createShadowRenderTarget(r){let t=new Tm(r,r);return t.texture.minFilter=Dm,t.texture.magFilter=Dm,t.texture.generateMipmaps=!1,t.depthBuffer=!0,t.stencilBuffer=!1,t.depthTexture=new F6(r,r,I6),t}resizeShadowRenderTarget(r){this.shadowRenderTarget.setSize(r,r),this.shadowRenderTarget.depthTexture&&(this.shadowRenderTarget.depthTexture.image.width=r,this.shadowRenderTarget.depthTexture.image.height=r,this.shadowRenderTarget.depthTexture.needsUpdate=!0)}createShadowPlane(){let r=new Bo(PF,PF);r.rotateX(0),this.shadowPlaneMaterial=new ov,this.shadowPlane=new tt(r,this.shadowPlaneMaterial),this.shadowPlane.position.set(0,0,zJ),this.shadowPlane.renderOrder=VJ,this.shadowPlane.frustumCulled=!1,this.shadowPlane.name="ShadowPlane",this.shadowPlaneEnabled&&this.state.threeJSScene.add(this.shadowPlane)}setShadowPlaneEnabled(r){this.shadowPlaneEnabled!==r&&(this.shadowPlaneEnabled=r,this.shadowPlane&&(r?this.state.threeJSScene.add(this.shadowPlane):this.state.threeJSScene.remove(this.shadowPlane)))}isShadowPlaneEnabled(){return this.shadowPlaneEnabled}updateShadowPlanePosition(){this.shadowPlane&&(this.shadowPlane.position.x=this.shadowCenter.x,this.shadowPlane.position.y=this.shadowCenter.y)}setDebugEnabled(r){this.debugEnabled!==r&&(this.debugEnabled=r,r?this.createDebugHelpers():this.disposeDebugHelpers())}isDebugEnabled(){return this.debugEnabled}createDebugHelpers(){this.debugEnabled=!0,!this.lightCameraHelper&&this.lightCamera&&(this.lightCameraHelper=new G6(this.lightCamera),this.lightCameraHelper.name="ShadowLightCameraHelper",this.state.threeJSScene.add(this.lightCameraHelper)),this.createDebugGrid(),this.createDebugCurrentCell(),this.createDebugCanvas()}createDebugGrid(){if(this.debugGrid)return;let r=this.internal.snapGridSize,t=sY,n=r*t*2,o=[];for(let u=-t;u<=t;u++){let l=u*r;o.push(l,-n/2,iv),o.push(l,n/2,iv)}for(let u=-t;u<=t;u++){let l=u*r;o.push(-n/2,l,iv),o.push(n/2,l,iv)}let i=new Ju;i.setAttribute("position",new ec(o,3));let a=new Zg({color:uY,transparent:!0,opacity:lY,depthTest:!1});this.debugGrid=new Za(i,a),this.debugGrid.name="ShadowDebugGrid",this.debugGrid.renderOrder=cY,this.debugGrid.frustumCulled=!1,this.state.threeJSScene.add(this.debugGrid)}createDebugCurrentCell(){if(this.debugCurrentCell)return;let r=this.internal.snapGridSize,t=new Bo(r,r);this.debugCurrentCellMaterial=new on({color:dY,transparent:!0,opacity:pY,depthTest:!1,side:2}),this.debugCurrentCell=new tt(t,this.debugCurrentCellMaterial),this.debugCurrentCell.name="ShadowDebugCurrentCell",this.debugCurrentCell.renderOrder=fY,this.debugCurrentCell.frustumCulled=!1,this.debugCurrentCell.position.set(this.currentSnapX+r/2,this.currentSnapY+r/2,OF),this.state.threeJSScene.add(this.debugCurrentCell)}createDebugCanvas(){if(this.debugCanvas)return;this.debugCanvas=document.createElement("canvas"),this.debugCanvas.width=An,this.debugCanvas.height=An,this.debugCanvas.style.cssText="\n position: fixed;\n bottom: 16px;\n transform: rotate(270deg);\n left: 16px;\n width: ".concat(An,"px;\n height: ").concat(An,"px;\n border: 2px solid #00ffff;\n border-radius: 4px;\n background: #000;\n z-index: 9999;\n pointer-events: none;\n ");let r=document.createElement("div");r.textContent="Light Camera View",r.style.cssText="\n position: fixed;\n bottom: ".concat(An+20,"px;\n left: 16px;\n color: #00ffff;\n font-family: monospace;\n font-size: 12px;\n z-index: 9999;\n pointer-events: none;\n "),r.id="shadow-debug-label",document.body.appendChild(this.debugCanvas),document.body.appendChild(r),this.debugCanvasCtx=this.debugCanvas.getContext("2d"),this.debugRenderTarget=new Tm(An,An),this.debugRenderTarget.texture.minFilter=Dm,this.debugRenderTarget.texture.magFilter=Dm}updateDebugCanvas(){if(!this.debugCanvas||!this.debugCanvasCtx||!this.rendererService.renderer||!this.debugRenderTarget)return;let r=this.rendererService.renderer,t=An*An*4;(!this.debugPixelBuffer||this.debugPixelBuffer.length!==t)&&(this.debugPixelBuffer=new Uint8Array(t)),r.setRenderTarget(this.debugRenderTarget),r.setClearColor(mY,1),r.clear(),r.render(this.state.threeJSScene,this.lightCamera),r.setRenderTarget(null),r.readRenderTargetPixels(this.debugRenderTarget,0,0,An,An,this.debugPixelBuffer);let n=this.debugCanvasCtx.createImageData(An,An),o=n.data,i,a;for(let u=0;u<An;u++)for(let l=0;l<An;l++)i=((An-1-u)*An+l)*4,a=(u*An+l)*4,o[a]=this.debugPixelBuffer[i],o[a+1]=this.debugPixelBuffer[i+1],o[a+2]=this.debugPixelBuffer[i+2],o[a+3]=255;this.debugCanvasCtx.putImageData(n,0,0)}disposeDebugHelpers(){this.lightCameraHelper&&(this.state.threeJSScene.remove(this.lightCameraHelper),this.lightCameraHelper.dispose(),this.lightCameraHelper=null),this.debugGrid&&(this.state.threeJSScene.remove(this.debugGrid),this.debugGrid.geometry.dispose(),this.debugGrid.material.dispose(),this.debugGrid=null),this.debugCurrentCell&&(this.state.threeJSScene.remove(this.debugCurrentCell),this.debugCurrentCell.geometry.dispose(),this.debugCurrentCell=null),this.debugCurrentCellMaterial&&(this.debugCurrentCellMaterial.dispose(),this.debugCurrentCellMaterial=null),this.debugCanvas&&(this.debugCanvas.remove(),this.debugCanvas=null,this.debugCanvasCtx=null),this.debugPixelBuffer=null,this.debugRenderTarget&&(this.debugRenderTarget.dispose(),this.debugRenderTarget=null);let r=document.getElementById("shadow-debug-label");r&&r.remove()}updateDebugHelpers(){if(this.debugEnabled&&(this.lightCameraHelper&&this.lightCameraHelper.update(),this.debugGrid&&this.debugGrid.position.set(this.currentSnapX,this.currentSnapY,0),this.debugCurrentCell)){let r=this.internal.snapGridSize;this.debugCurrentCell.position.set(this.currentSnapX+r/2,this.currentSnapY+r/2,OF)}}updateSunDirection(){let r=this.internal.sunAzimuth*Math.PI/180,t=this.internal.sunElevation*Math.PI/180,n=Math.cos(t);this.internal.sunDirection.set(n*Math.sin(r),n*Math.cos(r),-Math.sin(t)),this.internal.sunDirection.normalize()}updateLightCamera(){this.lightCamera&&(this.lightCamera.left=-this.internal.lightOrthoSize,this.lightCamera.right=this.internal.lightOrthoSize,this.lightCamera.top=this.internal.lightOrthoSize,this.lightCamera.bottom=-this.internal.lightOrthoSize,this.lightCamera.updateProjectionMatrix())}updateLightMatrix(){this.lightCamera.position.copy(this.shadowCenter).add(this.internal.sunDirection.clone().multiplyScalar(-this.internal.sunDistance)),this.lightCamera.lookAt(this.shadowCenter),this.lightCamera.near=_F,this.lightCamera.far=this.internal.sunDistance*2,this.lightCamera.left=-this.internal.lightOrthoSize,this.lightCamera.right=this.internal.lightOrthoSize,this.lightCamera.top=this.internal.lightOrthoSize,this.lightCamera.bottom=-this.internal.lightOrthoSize,this.lightCamera.updateMatrixWorld(!0),this.lightCamera.updateProjectionMatrix(),this.matrix.identity(),this.matrix.multiplyMatrices(this.lightCamera.projectionMatrix,this.lightCamera.matrixWorldInverse),this.lightMatrix.multiplyMatrices(this.bias,this.matrix)}updateAutoSunDistance(r,t){let n=Math.max(Qf,Math.min(Pu,r)),o=(Pu-n)/(Pu-Qf),i=Math.max(t,eY*Math.pow(tY,o));Math.abs(this.internal.sunDistance-i)>tS&&(this.internal.sunDistance=i,this.updateSunDirection(),this.needsRender=!0)}updateAutoShadowResolution(r){if(this.options.shadowMapSize!=="auto")return;let t=this.internal.currentShadowResolutionMode;if(this.internal.currentShadowResolutionMode===null?r>=this.shadowResolutionZoomThresholds.high?t="high":t="low":this.internal.currentShadowResolutionMode==="low"?r>=this.shadowResolutionZoomThresholds.high&&(t="high"):this.internal.currentShadowResolutionMode==="high"&&r<=this.shadowResolutionZoomThresholds.low&&(t="low"),t!==this.internal.currentShadowResolutionMode&&t!==null){let n=this.shadowResolutionSizes[t];this.internal.currentShadowResolutionMode=t,this.internal.currentShadowMapSize=n,this.resizeShadowRenderTarget(n),this.needsRender=!0}}updateAutoLightSize(r,t){let n=Math.max(Qf,Math.min(Pu,r)),o=(Pu-n)/(Pu-Qf),i=Math.max(t,rY*Math.pow(nY,o));Math.abs(this.internal.lightOrthoSize-i)>tS&&(this.internal.lightOrthoSize=i,this.updateLightCamera(),this.needsRender=!0)}updateAutoSnapGridSize(r){let t=Math.max(Qf,Math.min(Pu,r)),n=(Pu-t)/(Pu-Qf),o=oY*Math.pow(iY,n);Math.abs(this.internal.snapGridSize-o)>tS&&(this.internal.snapGridSize=o,this.debugEnabled&&this.recreateDebugGrid())}recreateDebugGrid(){this.debugGrid&&(this.state.threeJSScene.remove(this.debugGrid),this.debugGrid.geometry.dispose(),this.debugGrid.material.dispose(),this.debugGrid=null),this.debugCurrentCell&&(this.state.threeJSScene.remove(this.debugCurrentCell),this.debugCurrentCell.geometry.dispose(),this.debugCurrentCell=null),this.createDebugGrid(),this.createDebugCurrentCell()}renderShadowMap(){var n,o,i,a;this.excludeNonShadowGeometry();let r=(o=(n=this.shadowPlane)==null?void 0:n.visible)!=null?o:!1;this.shadowPlane&&(this.shadowPlane.visible=!1);let t=this.state.threeJSScene.overrideMaterial;this.state.threeJSScene.overrideMaterial=this.depthMaterial,(i=this.rendererService.renderer)==null||i.setRenderTarget(this.shadowRenderTarget),this.rendererService.clear(),this.rendererService.renderScene(this.state.threeJSScene,this.lightCamera),(a=this.rendererService.renderer)==null||a.setRenderTarget(null),this.state.threeJSScene.overrideMaterial=t,this.debugEnabled&&this.updateDebugCanvas(),this.shadowPlane&&(this.shadowPlane.visible=r),this.revertExcludedNonShadowGeometry()}updateShadowUniforms(){var t;let r;for(let n of this.state.geometry3DsInScene)if(r=n.components[0],r!=null&&r.mesh&&((t=r==null?void 0:r.mesh)==null?void 0:t.material)instanceof ay){let o=r.mesh.material;o instanceof ay&&o.setShadowUniforms(this.shadowRenderTarget.depthTexture,this.lightMatrix,this.lightCamera.near,this.lightCamera.far,this.options.shadowBias,this.options.shadowOpacity,this.internal.baseColor,this.internal.currentShadowMapSize,this.options.pcfSpread,this.options.pcfSamples,this.internal.sunDirection,this.options.normalBias,this.state.depthRangeFor3D[1],this.options.enabled)}this.shadowPlaneMaterial&&this.shadowPlaneMaterial.setShadowUniforms(this.shadowRenderTarget.depthTexture,this.lightMatrix,this.options.shadowBias,this.options.shadowOpacity,this.internal.baseColor,this.internal.currentShadowMapSize,this.options.pcfSpread,this.options.pcfSamples,this.state.depthRangeFor3D[1],this.options.enabled)}zoomOrElevationChanged(r,t){if(this.lastZoomLevel===null||this.lastCameraElevation===null)return this.lastZoomLevel=r,this.lastCameraElevation=t,!0;let n=Math.abs(r-this.lastZoomLevel)>=aY,o=t!==this.lastCameraElevation;return n||o?(this.lastZoomLevel=r,this.lastCameraElevation=t,!0):!1}updateSnap(){let r=this.cameraOrbit.position.x||0,t=this.cameraOrbit.position.y||0,n=Math.floor(r/this.internal.snapGridSize)*this.internal.snapGridSize,o=Math.floor(t/this.internal.snapGridSize)*this.internal.snapGridSize;(n!==this.currentSnapX||o!==this.currentSnapY)&&(this.currentSnapX=n,this.currentSnapY=o,this.shadowCenter.set(n,o,this.internal.groundZPosition),this.needsRender=!0)}update(r,t){(this.needsCompute||this.zoomOrElevationChanged(r,t))&&(this.updateAutoShadowResolution(r),this.updateAutoLightSize(r,t),this.updateAutoSunDistance(r,t),this.updateAutoSnapGridSize(r)),this.updateSnap(),this.needsRender&&(this.updateLightMatrix(),this.renderShadowMap(),this.updateShadowPlanePosition(),this.updateShadowUniforms()),this.updateDebugHelpers(),this.needsRender=!1,this.needsCompute=!1}excludeNonShadowGeometry(){this.state.threeJSScene.traverse(r=>{r instanceof tt?r.material instanceof ay?r.material.opacity===0&&(this.transparentGeometryVisibilityStateMap.set(r,r.visible),r.visible=!1):(this.transparentGeometryVisibilityStateMap.set(r,r.visible),r.visible=!1):r instanceof Za&&(this.transparentGeometryVisibilityStateMap.set(r,r.visible),r.visible=!1)})}revertExcludedNonShadowGeometry(){for(let[r,t]of this.transparentGeometryVisibilityStateMap)r.visible=t;this.transparentGeometryVisibilityStateMap.clear()}destroy(){this.disposeDebugHelpers(),this.shadowPlane&&(this.state.threeJSScene.remove(this.shadowPlane),this.shadowPlane.geometry.dispose(),this.shadowPlane=null),this.shadowPlaneMaterial&&(this.shadowPlaneMaterial.dispose(),this.shadowPlaneMaterial=null),this.shadowRenderTarget&&(this.shadowRenderTarget.dispose(),this.shadowRenderTarget.depthTexture&&this.shadowRenderTarget.depthTexture.dispose()),this.depthMaterial&&this.depthMaterial.dispose(),this.transparentGeometryVisibilityStateMap.clear()}};var FF=new Ku;var{DEFAULT_PITCH:aS,DEFAULT_BEARING:sS,DEFAULT_ZOOM_LEVEL:uS,DEFAULT_MIN_ZOOM_LEVEL:hY,DEFAULT_MAX_ZOOM_LEVEL:gY}=qi,yY=It.radToDeg(.6435011087932844),Sr,kr,cd,em,tm,Ul,dd,pd,qn,nS,Q,Ut,Oa,Br,Yi,Yr,te,sv,bi,Ur,uv,fd,kF,BF,LF,_u,lv,F0,cv,dv,rm,nm,pv,k0,B0,L0,oS,md,R0,N0,Ou,Fu,iS,fv,pt,om,j0,rS=class extends Je{constructor(t,n={}){var g,b,I,v,E,T,D,w,B,X,L,P,R,$,V,H,re;super();M(this,qn);m(this,"options");m(this,"container");m(this,"Debug");M(this,Sr);M(this,kr);M(this,cd);M(this,em);M(this,tm);M(this,Ul);M(this,dd);M(this,pd);m(this,"rendererDomElement");M(this,Q,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,geometry3DsInScene:new Set,geometry2DsInScene:new Set,geometryScene:new un("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:ey,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new o4,externalTweenGroup:new o4,cameraObject:new ux,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1,directionalLight:new qg(16777215,.3*Math.PI),ambientLight:new j6(16777215,.741*Math.PI),renderer:void 0,threeJSScene:new Yu,depthRangeFor3D:[0,1]});m(this,"camera");M(this,Ut);M(this,Oa);M(this,Br);M(this,Yi);M(this,Yr);M(this,te,{});M(this,sv,window.matchMedia("screen and (min-resolution: 2dppx)"));m(this,"map");M(this,bi,()=>{var t,n;(t=this.signal)!=null&&t.aborted||!((n=s(this,te))!=null&&n.renderSystem)||(s(this,te).renderSystem.twoDdirty=!0)});M(this,Ur,()=>{var t,n;(t=this.signal)!=null&&t.aborted||!((n=s(this,te))!=null&&n.renderSystem)||(s(this,te).renderSystem.threeDdirty=!0)});M(this,uv,()=>{this.map&&(s(this,Q).depthRangeFor3D=this.map.painter.depthRangeFor3D)});M(this,fd,(t,n)=>{t.addEventListener("childadded",n),t.addEventListener("childremoved",n),this.onAbort(()=>{t.removeEventListener("childadded",n),t.removeEventListener("childremoved",n)})});M(this,_u,"standalone");M(this,lv,()=>{s(this,te).geometryDisposalSystem.dirty=!0,this.render()});M(this,F0,t=>Math.trunc(t*10)/10);M(this,cv,()=>{he(this,qn,nS).call(this,Ud()),s(this,te).twoDDrawSystem.dirty=!0,s(this,nm).call(this,void 0,void 0,!0)});M(this,dv,()=>{s(this,nm).call(this)});M(this,rm);M(this,nm,(t,n,o=!1)=>{let i=t!=null?t:this.rendererDomElement.clientWidth,a=n!=null?n:this.rendererDomElement.clientHeight;if((i===0||a===0)&&!o)return;s(this,Q).canvasWidth=i,s(this,Q).canvasHeight=a,he(this,qn,nS).call(this,Ud()),s(this,L0).call(this),he(this,qn,LF).call(this),s(this,te).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,te).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,te).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,te).htmlControlsSystem.resize(this.canvasWidth),s(this,te).geometryInFocusSystem.resize(),s(this,te).occlusion2DSystem.resize();let{top:u,left:l}=this.container.getBoundingClientRect();s(this,Q).containerOffset=[u,l],this.publish("resize"),this.render()});M(this,pv,()=>{this.renderSync()});M(this,k0,new Ce);m(this,"project",(t,n)=>{if(s(this,kr).position.z+this.camera.elevation>n.z){s(this,k0).copy(n);let o=s(this,k0).project(s(this,rm)),i=(o.x+1)/2*this.canvasWidth-0/2,a=(-o.y+1)/2*this.canvasHeight-0/2,u=s(this,F0).call(this,i),l=s(this,F0).call(this,a);t.x=u,t.y=l,t instanceof Ce&&(t.z=o.z)}else t.x=-1e3,t.y=-1e3,t instanceof Ce&&(t.z=1/0)});M(this,B0,(t,n)=>{s(this,Yr).setBufferSize(t,n),s(this,kr).aspect=t/n,s(this,kr).updateProjectionMatrix(),s(this,kr).updateMatrixWorld(!0),s(this,tm).x=t,s(this,tm).y=n});M(this,L0,()=>{var a;let t=s(this,Q).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,Q).canvasHeight=this.rendererDomElement.clientHeight,o=Math.floor(t*this.resolutionScale),i=Math.floor(n*this.resolutionScale);s(this,B0).call(this,o,i),(a=this.map)==null||a.resize(),s(this,Q).shouldMeasureCanvas=!1});m(this,"getParentContainer",(t,n=!0)=>{if(!t)return n?s(this,Q).geometryScene:void 0;if(typeof t=="string"||typeof t=="number"){let o=s(this,Q).geometry3DMap.get(t);return o instanceof un?o:(K.warn("Parent (".concat(typeof t=="object"?t.id:t,") is not a valid container, adding to scene")),n?s(this,Q).geometryScene:void 0)}else if(t.type==="group-container"){let o=s(this,Q).geometry3DMap.get(t.id);if(o instanceof un)return o}return n?s(this,Q).geometryScene:void 0});m(this,"showCollisionBoxes",()=>{s(this,te).collisionSystem.showCollisionBoxes(),this.render()});m(this,"hideCollisionBoxes",()=>{s(this,te).collisionSystem.hideCollisionBoxes(),this.render()});m(this,"projectScreenXYToCoordinate",(t,n,o=!1)=>{var f,h;let i=this.container.getBoundingClientRect(),a=(t-i.left)/s(this,Q).canvasWidth*2-1,u=-((n-i.top)/s(this,Q).canvasHeight)*2+1,l=new St(a,u),c,d;if(o)FF.setFromCamera(l,s(this,kr)),c=(f=FF.intersectObject(s(this,Ul),!1)[0])==null?void 0:f.point;else{let g=s(this,te).interactionSystem.getThreeDIntersectsFromXY(l);c=(h=g==null?void 0:g[0])==null?void 0:h.point,d=s(this,te).interactionSystem.getGroupContainerIntersectsFromXY(l)}if(c)return{coordinate:this.convert3DMapPositionToCoordinate(c),groupContainers:d}});m(this,"projectCoordinateToScreenXY",t=>{let n=this.convertTo3DMapPosition(t[1],t[0],t[2]||0),o=new St;return this.project(o,n),{x:o.x,y:o.y}});m(this,"convert3DMapPositionToCoordinate",t=>{var i,a,u,l;let{lat:n,lon:o}=ty((a=(i=s(this,Q).center)==null?void 0:i[1])!=null?a:0,(l=(u=s(this,Q).center)==null?void 0:u[0])!=null?l:0,t.x,t.y);return[o,n,t.z]});m(this,"setBackgroundColor",(t,n)=>{s(this,Yr).setBackgroundColor(t,n)});m(this,"getMetersPerPixel",()=>s(this,te).cameraSystem.getCurrentMetersPerPixel());m(this,"hideOutdoorLayersIntersectingPolygons",(t,n)=>{s(this,te).outdoorLayersSystem.hideLayersIntersectingPolygons(t,n),this.render()});M(this,md,new _d);M(this,R0,new wr);M(this,N0,t=>{var n;K.error("Render failed: ",t,(n=t.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:t})});m(this,"render",()=>{var t,n;if(!(((t=s(this,te))==null?void 0:t.renderSystem)==null||(n=this.signal)!=null&&n.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,te).renderSystem.update().catch(s(this,N0))});m(this,"renderSync",()=>{var t;return(t=this.signal)!=null&&t.aborted?Promise.resolve():s(this,te).renderSystem.update(!0).catch(s(this,N0))});M(this,Ou,el(()=>{this.publish("user-interaction-start",void 0)},0,!0));M(this,Fu,el(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));m(this,"on",(t,n,o)=>{let i=super.on(t,n,o);return["outdoor-view-loaded","outdoor-style-loaded"].includes(t)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(K.warn('"'.concat(t,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(t),i()),i});m(this,"off",(t,n)=>{super.off(t,n)});m(this,"getCursor",()=>s(this,te).interactionSystem.getCursor());M(this,fv,()=>{try{s(this,_u)!=="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,Yi)&&this.container.contains(s(this,Yi))&&this.container.removeChild(s(this,Yi)),s(this,Ut)&&this.container.contains(s(this,Ut))&&this.container.removeChild(s(this,Ut)))}catch(t){K.warn("Error during DOM cleanup, some elements may not have been removed:",t)}});M(this,pt,t=>(this.onAbort(()=>{t&&typeof t=="object"&&("destroy"in t&&typeof t.destroy=="function"?t.destroy():"dispose"in t&&typeof t.dispose=="function"&&t.dispose())}),t));m(this,"destroy",()=>{var t,n,o;!s(this,te)||(t=this.signal)!=null&&t.aborted||(super.destroy(),(n=globalThis.MappedinDebug)!=null&&n.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,te).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,te).cameraSystem.isCameraMoving)),this.remove("__scene"),s(this,Yr).destroy(),(o=s(this,Sr))==null||o.traverse(i=>{an(i),"dispose"in i&&typeof i.dispose=="function"&&i.dispose()}),k(this,Sr,void 0),k(this,te,void 0),s(this,fv).call(this),k(this,Yr,void 0))});M(this,om,new Ce);M(this,j0,new Ce);if(s(this,Q).useStandaloneCamera=(g=n.useStandaloneCamera)!=null?g:!1,s(this,Q).naturalBearing=(b=n.naturalBearing)!=null?b:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!t.clientWidth||!t.clientHeight)throw new Error("[MappedinJS] Container width and height must be greater than 0");(n.mode==="outdoors-interleaved"||n.mode==="outdoors-overlay")&&n.map&&(k(this,_u,n.mode),this.map=n.map),s(this,fd).call(this,s(this,Q).geometryScene,()=>{s(this,Ur).call(this),s(this,bi).call(this)}),s(this,Q).geometry3DMap.set(s(this,Q).geometryScene.userData.entityId,s(this,Q).geometryScene),n.center&&(s(this,Q).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=t,he(this,qn,kF).call(this),he(this,qn,BF).call(this),s(this,te).htmlControlsSystem=s(this,pt).call(this,new v4(this.container,{outdoorEnabled:!!this.map})),s(this,te).maskingSystem=s(this,pt).call(this,new ev(s(this,Q))),s(this,_u)!=="outdoors-overlay"&&s(this,te).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),k(this,Yr,new Rb({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(I=n.gl)==null?void 0:I.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:j=>{var me;(me=n.onWebGLContextRestored)==null||me.call(n,j),s(this,bi).call(this),s(this,Ur).call(this),this.render()},onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(v=n.backgroundAlpha)!=null?v:1})),s(this,Q).renderer=s(this,Yr).renderer,k(this,Sr,s(this,Q).threeJSScene),s(this,Sr).matrixWorldAutoUpdate=!1,s(this,_u)!=="standalone"&&s(this,Sr).add(TC()),s(this,Sr).add(s(this,Q).geometryScene);let o=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof o<"u"&&(o.dispatchEvent(new CustomEvent("observe",{detail:s(this,Sr)})),o.dispatchEvent(new CustomEvent("observe",{detail:s(this,Yr)}))),k(this,kr,new ux(yY,this.aspect,50,1e5)),s(this,Q).cameraObject=s(this,kr),k(this,em,new _6),s(this,kr).renderOrder=999;let i=new Ei;i.add(s(this,kr)),k(this,pd,new Ei),s(this,pd).add(i),s(this,Sr).add(s(this,pd)),s(this,kr).updateProjectionMatrix(),s(this,kr).updateMatrixWorld(!0),(E=n.__EXPERIMENTAL_shadows)!=null&&E.enabled&&(s(this,te).shadowsSystem=s(this,pt).call(this,new av(s(this,Q),s(this,Yr),s(this,pd),n.__EXPERIMENTAL_shadows)),this.map&&this.onMapLibreEvent("render",s(this,uv))),k(this,rm,this.mode==="standalone"?s(this,kr):s(this,em)),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:()=>0,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,Yr).domElement(),k(this,tm,new St);let a=new Bo(1e6,1e6),u=new on({color:0,visible:!1});k(this,Ul,new tt(a,u)),s(this,Ul).name="worldPlane",s(this,Sr).add(s(this,Ul)),(T=n.gl)!=null&&T.canvas||t.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,dv),{capture:!1,signal:this.signal}),s(this,sv).addEventListener("change",s(this,cv),{signal:this.signal}),typeof ResizeObserver=="function"&&((D=y.env)==null?void 0:D.NODE_ENV)!=="test"&&(k(this,dd,new ResizeObserver(Ld(j=>{s(this,nm).call(this,j[0].contentRect.width,j[0].contentRect.height)},50))),(w=s(this,dd))==null||w.observe(t),s(this,dd)&&this.onAbort(()=>{var j;return(j=s(this,dd))==null?void 0:j.disconnect()})),t.classList.add("mappedin-map"),this.rendererDomElement.style.width=(B=globalThis.MappedinDebug)!=null&&B.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(X=globalThis.MappedinDebug)!=null&&X.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,Q).canvasWidth=this.rendererDomElement.clientWidth,s(this,Q).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let l=this.canvasWidth,c=this.canvasHeight;s(this,te).watermarkSystem=s(this,pt).call(this,new h4(s(this,kr),s(this,Q),n==null?void 0:n.watermark)),s(this,te).watermarkSystem.on("texture-loaded",this.render),s(this,Q).shouldMeasureCanvas=!0,s(this,Q).pixelRatio=this.resolutionScale,s(this,B0).call(this,Math.floor(l*this.resolutionScale),Math.floor(c*this.resolutionScale)),s(this,Q).directionalLight.position.set(-150,-150,350),s(this,Sr).add(s(this,Q).directionalLight),s(this,Sr).add(s(this,Q).ambientLight),s(this,te).cameraSystem=s(this,pt).call(this,new rd(s(this,kr),s(this,Sr),s(this,Yr).renderer,s(this,Q),{mode:this.mode,canvasHeight:c,canvasWidth:l})),(L=globalThis.MappedinDebug)!=null&&L.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,te).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,te).cameraSystem.isCameraMoving)),s(this,te).cameraSystem.on("user-dolly-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-pan-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-rotate-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-zoom-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-tilt-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-pedestal-start",s(this,Ou),{signal:this.signal}),s(this,te).cameraSystem.on("user-dolly-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("user-pan-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("user-rotate-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("user-zoom-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("user-tilt-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("user-pedestal-end",s(this,Fu),{signal:this.signal}),s(this,te).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,te).geometryInFocusSystem&&(s(this,te).geometryInFocusSystem.cameraDirty=!0),this.render()}),s(this,te).pathSystem=s(this,pt).call(this,new _0(s(this,Q),this.convertTo3DMapPosition,this.getParentContainer,s(this,te).cameraSystem.convertZoomLevelToAltitude)),s(this,te).pathSystem.on("animate:path",this.render,{signal:this.signal}),s(this,te).panBoundsSystem=s(this,pt).call(this,new b4(s(this,Q),s(this,te).cameraSystem));let d=()=>{let{panBounds:j,fov:me,convertAltitudeToZoomLevel:z}=s(this,te).cameraSystem;if(s(this,te).panBoundsSystem.autoMinZoomLevel){if(j.radius<=0)return;let ue=Math.min(s(this,Q).canvasWidth/s(this,Q).canvasHeight,1),se=me*Math.PI/180*ue,pe=Math.tan(se/2),{radius:le,center:ye}=s(this,te).cameraSystem.panBounds,Fe=le/pe,Ee=this.getThreeCamera().getWorldPosition(new Ce),Oe=ye.distanceTo(Ee),we=Math.abs(Ee.z-ye.z),Le=Fe*we/Oe,Qe=z(Le);CC(Qe,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(Qe)}this.publish("pan-bounds-change",s(this,te).cameraSystem.panBounds)};s(this,te).panBoundsSystem.on("update",d,{signal:this.signal}),this.camera=new m4(this,s(this,te),s(this,Q));let f=()=>{s(this,te).geometryInFocusSystem&&s(this,te).geometryInFocusSystem.resize(),this.render()};this.camera.on("padding-change",f,{signal:this.signal}),this.camera.setZoomLevel((P=n.zoomLevel)!=null?P:uS),this.camera.setBearing((R=n.bearing)!=null?R:sS),this.camera.setPitch(($=n.pitch)!=null?$:aS),this.camera.setMaxZoomLevel(gY),this.camera.setMinZoomLevel(hY),s(this,te).domVisiblitySystem=s(this,pt).call(this,new Kb(s(this,Q),s(this,Yi))),s(this,te).domMutationSystem=s(this,pt).call(this,new f4(s(this,Q),s(this,Yi))),s(this,te).domMutationSystem.on("dimensions-update",()=>{s(this,te).collisionSystem.collidersDirty=!0,this.render()}),s(this,te).domDrawSystem=s(this,pt).call(this,new p4(s(this,Q))),s(this,te).collisionSystem=s(this,pt).call(this,new jb(s(this,Oa),s(this,Q),((V=n.useCollisionWorker)!=null?V:!0)&&((H=n.useWorkers)!=null?H:!0))),s(this,te).twoDDrawSystem=s(this,pt).call(this,new e4(s(this,Q),s(this,Br),n.transformImageRequest)),s(this,te).twoDDrawSystem.on("img:loaded",this.render),s(this,te).interactionSystem=s(this,pt).call(this,new n0(this.rendererDomElement,s(this,Q),s(this,kr),s(this,Ul),s(this,te).cameraSystem.isUserInteracting)),s(this,te).interactionSystem.on("doubletap-with-onefinger",j=>{var me;s(this,te).cameraSystem.enableZoom&&this.camera.animateTo({center:(me=this.projectScreenXYToCoordinate(j.clientX,j.clientY))==null?void 0:me.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:bx,easing:"ease-out"})}),s(this,te).interactionSystem.on("singletap-with-twofinger",()=>{s(this,te).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:bx,easing:"ease-out"})}),s(this,te).interactionSystem.on("hover",this.render),s(this,te).interactionSystem.on("click",j=>{var pe,le,ye,Fe,Ee,Oe,we,Le,Qe;if(j.entity2D.some(Ge=>Ge.id==="watermark")&&typeof s(this,te).watermarkSystem.options.onClick=="function"&&s(this,te).watermarkSystem.options.interactive){s(this,te).watermarkSystem.options.onClick();return}let z=j.entity3D?[(pe=j.entity3D)==null?void 0:pe.id]:[];(Fe=(ye=(le=j.entity3D)==null?void 0:le.parentObject3D)==null?void 0:ye.userData)!=null&&Fe.entityId&&z.push((we=(Oe=(Ee=j.entity3D)==null?void 0:Ee.parentObject3D)==null?void 0:Oe.userData)==null?void 0:we.entityId);let ue=[],se=[];for(let Ge of j.entity2D)Ge.components[0]instanceof $s?ue.push(Ge.id):Ge.components[0]instanceof Vs&&se.push(Ge.id);this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(j.position),geometry:z,paths:((Le=j.entity3D)==null?void 0:Le.components[0])instanceof kl?[j.entity3D.id]:[],markers:ue,models:((Qe=j.entity3D)==null?void 0:Qe.components[0])instanceof Fl?[j.entity3D.id]:[],labels:se,containers:Array.isArray(j.groupContainers)?j.groupContainers.map(Ge=>Ge.userData.entityId):[],pointerEvent:j.pointerEvent})}),s(this,te).interactionSystem.on("hover",j=>{var ue,se,pe;if(!j.position)return;let me=[],z=[];for(let le of j.entity2D)le.components[0]instanceof $s?me.push(le.id):le.components[0]instanceof Vs&&z.push(le.id);this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(j.position),geometry:j.entity3D?[(ue=j.entity3D)==null?void 0:ue.id]:[],paths:((se=j.entity3D)==null?void 0:se.components[0])instanceof kl?[j.entity3D.id]:[],markers:me,models:((pe=j.entity3D)==null?void 0:pe.components[0])instanceof Fl?[j.entity3D.id]:[],labels:z,containers:Array.isArray(j.groupContainers)?j.groupContainers.map(le=>le.userData.entityId):[]})}),s(this,te).geometryInFocusSystem=s(this,pt).call(this,new _4(s(this,Q),s(this,rm)));let h=j=>{this.publish("geometry-in-focus",j)};s(this,te).geometryInFocusSystem.on("geometry-in-focus",h,{signal:this.signal}),s(this,te).twoDVisiblitySystem=s(this,pt).call(this,new r4(s(this,Q))),s(this,te).drawSystem=s(this,pt).call(this,new t4(s(this,Q),this.convertTo3DMapPosition)),s(this,te).twoDProjectionSystem=s(this,pt).call(this,new Qb(s(this,Q),this.project)),s(this,te).exporterSystem=s(this,pt).call(this,new o0(s(this,Q))),s(this,te).meshOptimizationSystem=s(this,pt).call(this,new Yb(s(this,Q),this.convertTo3DMapPosition)),s(this,te).meshOptimizationSystem.on("model-loaded",this.render,{signal:this.signal}),s(this,te).meshOptimizationSystem.on("geometry-2d-added",this.render,{signal:this.signal}),s(this,te).meshOptimizationSystem.on("geometry-group-added",s(this,lv),{signal:this.signal}),s(this,te).meshDetachmentSystem=s(this,pt).call(this,new z4(s(this,Q))),s(this,te).meshModificationSystem=s(this,pt).call(this,new $4(s(this,Q))),s(this,te).geometryDisposalSystem=s(this,pt).call(this,new Y4(s(this,Q))),s(this,te).textureSystem=s(this,pt).call(this,new K4(s(this,Q))),s(this,te).textureSystem.on("texture-added",this.render,{signal:this.signal}),s(this,te).borderSystem=s(this,pt).call(this,new uD(s(this,Q),this.convertTo3DMapPosition)),s(this,te).clippingPlaneSystem=s(this,pt).call(this,new tv(s(this,Q))),s(this,te).renderOrderSystem=s(this,pt).call(this,new Q4(s(this,Q))),s(this,te).pluginSystem=s(this,pt).call(this,new rv),s(this,te).customGeometrySystem=s(this,pt).call(this,new x4(s(this,Q),this.convertTo3DMapPosition)),s(this,te).outlineInterpolationSystem=s(this,pt).call(this,new C4(s(this,Q))),s(this,te).outlineInterpolationSystem.on("needs-render",this.render,{signal:this.signal}),s(this,te).renderSystem=s(this,pt).call(this,new n4(s(this,Yr),s(this,Q),this.mode,s(this,Sr),s(this,kr),this.viewCamera,s(this,te))),s(this,te).imageSystem=s(this,pt).call(this,new A4(s(this,Q),this.convertTo3DMapPosition,this.project,n.bearing,n.naturalBearing,n.imagePlacementOptions)),s(this,te).text3DSystem=s(this,pt).call(this,new MC(s(this,Q),this.convertTo3DMapPosition,(re=n.useWorkers)!=null?re:!0)),s(this,te).text3DSystem.on("render",this.render,{signal:this.signal}),s(this,te).imageSystem.on("image-loaded",this.render,{signal:this.signal}),s(this,te).renderSystem.on("pre-render",()=>this.publish("pre-render"),{signal:this.signal}),s(this,te).renderSystem.on("post-render",()=>this.publish("post-render"),{signal:this.signal}),s(this,te).renderSystem.on("measure-canvas",s(this,L0),{signal:this.signal}),s(this,te).outdoorLayersSystem=s(this,pt).call(this,new F4(this.map)),s(this,te).occlusion2DSystem=s(this,pt).call(this,new J4(s(this,Q),this.convertTo3DMapPosition,s(this,Yr))),n.occlusionEnabled&&s(this,te).occlusion2DSystem.enable(),this.Debug=new q4(this),n.environment!==!1&&k(this,cd,he(this,qn,iS).call(this)),s(this,pv).call(this)}get viewCamera(){return s(this,em)}get canvasWidth(){return s(this,Q).canvasWidth}get canvasHeight(){return s(this,Q).canvasHeight}get resolutionScale(){var t,n;return(n=(t=this.map)==null?void 0:t._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:Ud()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,_u)}addGroupContainer(t,n,o){if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let i=new un(t);s(this,fd).call(this,i,()=>{s(this,Ur).call(this),s(this,bi).call(this)}),(n==null?void 0:n.visible)!==void 0&&(i.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&i.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&ei(i,n.interactive,s(this,Q)),(n==null?void 0:n.focusable)!==void 0&&ly(i,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(i.userData.preloadGeometry=n.preloadGeometry),s(this,Q).geometry3DMap.set(t,i);let a=this.getParentContainer(o);a instanceof un&&a.addEntity(i),s(this,Ur).call(this),this.render()}else K.error("Group container with ID '".concat(t,"' already exists. The group container cannot be added."));return{id:t,type:"group-container"}}addCustomGeometry(t,n,o,i,a){if(s(this,Q).geometry3DMap.has(t))K.error("Custom geometry with ID '".concat(t,"' already exists. The custom geometry cannot be added."));else{let u=new Hf(n,o),l=new Yt(u,new Ya(i));(i==null?void 0:i.interactive)!==void 0&&ei(l,i.interactive,s(this,Q)),l.id=t,u.mesh.userData={entityId:t,type:"custom-geometry"},s(this,Q).geometry3DMap.set(l.id,l);let c=this.getParentContainer(a);a&&c instanceof un?c.addEntity(l):s(this,Q).geometryScene.addEntity(l),s(this,Ur).call(this),this.render()}return{id:t,type:"custom-geometry"}}registerPlugin(t){s(this,te).pluginSystem.registerPlugin(t)}unregisterPlugin(t){s(this,te).pluginSystem.unregisterPlugin(t)}addGeometryGroup(t,n,o,i){var a,u,c;if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let d=new Ka(t);s(this,fd).call(this,d,()=>{s(this,Ur).call(this),s(this,bi).call(this)}),d.userData.dirty=!0,s(this,Q).geometry3DMap.set(t,d);let f=typeof o=="function"?o(n.features[0]):o;for(let g of n.features){if(g.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(g.geometry.type))continue;let b=(g==null?void 0:g.id)||((a=g==null?void 0:g.properties)==null?void 0:a.id)||Jt(),I={color:cy};if(typeof o=="function")I=(u=o(g))!=null?u:{color:cy};else{let l=o||{color:cy},{visible:E}=l;I=kn(l,["visible"])}let v=s(this,te).meshOptimizationSystem.createEntityFromFeature(b,g,_({outline:!0},I));s(this,Q).geometry3DMap.set(b,v),d.userData.entities3D.add(b),s(this,te).textureSystem.dirty=!0}(f==null?void 0:f.__EXPERIMENTAL_maskEnabled)===!0&&_x(d,{enabled:f.__EXPERIMENTAL_maskEnabled,maskId:f.__EXPERIMENTAL_maskId,effect:f.__EXPERIMENTAL_maskEffect,mode:f.__EXPERIMENTAL_maskMode}),d.setVisible((c=f==null?void 0:f.visible)!=null?c:!0);let h=this.getParentContainer(i);h instanceof un&&h.addEntity(d),s(this,Ur).call(this),this.render()}else K.error("Geometry group with ID '".concat(t,"' already exists. The geometry group cannot be added."));return s(this,te).outlineInterpolationSystem.geometries3DDirty=!0,{id:t,type:"geometry-group"}}addOccluder(t,n){let o=this.getParentContainer(n),i=s(this,te).occlusion2DSystem.reserveOccluderId();return o==null||o.addOccluderFeature(t,i),i}addImage(t,n,o,i){try{WO(t,n,o)}catch(a){K.error(a);return}if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let a=new M4(n),u=new Yt(a,new Ya(o));u.id=t||Jt(),a.mesh.userData={entityId:u.id,type:"path"},s(this,Q).geometry3DMap.set(u.id,u);let l=this.getParentContainer(i);l instanceof un&&l.addEntity(u),s(this,Ur).call(this),this.render()}else K.error("Image with ID '".concat(t,"' already exists. The image cannot be added."));return{id:t,type:"image"}}addModelGroup(t,n,o,{parent:i,onComplete:a}={}){var u,l;try{xO(t,n,o)}catch(c){K.error(c);return}if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let c=new Ka(t);s(this,fd).call(this,c,()=>{s(this,Ur).call(this),s(this,bi).call(this)}),s(this,Q).geometry3DMap.set(t,c),c.userData.dirty=!0,c.userData.modelURL=o.url;for(let f of n.features){let h=f.id||f.properties.id||Jt(),g=s(this,te).meshOptimizationSystem.createModelFromFeature(h,f,_({},o));(f.properties.interactive!==void 0||o.interactive!=null)&&ei(g,(u=f.properties.interactive)!=null?u:o.interactive,s(this,Q)),o.clippingPlaneZOffset!=null&&(g.components[7]=new GC,g.components[7].verticalOffset=o.clippingPlaneZOffset),g.parentId=c.userData.entityId,s(this,Q).geometry3DMap.set(h,g),c.userData.entities3D.add(h)}let d=this.getParentContainer(i);d instanceof un&&d.addEntity(c),s(this,Ur).call(this),(l=this.render())==null||l.then(a)}else K.error("Model group with ID '".concat(t,"' already exists. The model group cannot be added."));return{id:t,type:"geometry-group"}}addMarker2D(t,n,o,i){var u;let a=o==null?void 0:o.id;try{lC(t,n,o||{})}catch(l){K.error(l);return}if(a===void 0||!s(this,Q).geometry2DMap.has(a)&&!s(this,Q).geometry3DMap.has(a)){let l=he(this,qn,oS).call(this,t,new $s(n,o),o==null?void 0:o.occluderId,o==null?void 0:o.verticalOffset);l.id=a||String(l.id),a=l.id,(o==null?void 0:o.interactive)!=null&&o.interactive!=="pointer-events-auto"&&ei(l,o==null?void 0:o.interactive,s(this,Q)),(o==null?void 0:o.enabled)!=null&&sy(l,o.enabled),(o==null?void 0:o.occlude)!=null&&Mx(l,o.occlude);let c=typeof(o==null?void 0:o.attachTo)=="string"||typeof(o==null?void 0:o.attachTo)=="number"?s(this,Q).geometry3DMap.get(o.attachTo):void 0;c instanceof Yt&&c.attach(l),(u=this.getParentContainer(i))==null||u.addEntity(l),this.render()}else K.error("Marker2D with ID '".concat(a,"' already exists. The marker cannot be added."));return{id:a,type:"marker"}}addText3D(t,n,o,i){if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let a=new iy(ne(_({},n),{properties:ne(_({},n.properties),{id:t,content:n.properties.text})})),u=new Yt(a,new km(o==null?void 0:o.appearance));u.id=t,a.mesh.userData.entityId=t.toString(),a.mesh.userData.type="text3d",s(this,Q).geometry3DMap.set(t,u);let l=this.getParentContainer(i);l instanceof un&&l.addEntity(u),s(this,Ur).call(this),this.render()}else K.error("Text3D with ID '".concat(t,"' already exists. The text3d cannot be added."));return{id:t,type:"text3d"}}labelText3D(t,n,o={}){var c,d;try{if(!n||!t)throw new Error("content and meshGeometryId are required");_C.parse(o)}catch(f){K.error(f);return}let i=s(this,Q).geometry3DMap.get(t);if((i==null?void 0:i.type)!=="geometry"){K.error(".labelText3D failed: target incorrect");return}let a=i==null?void 0:i.components[0];if(!a.feature.properties.textArea)return;if(a.textEntityId){let f=s(this,Q).geometry3DMap.get(a.textEntityId);if((f==null?void 0:f.type)!=="text3d"){K.error(".labelText3D failed: existing text3d not found");return}return{id:f.id,type:f.type}}let u=new iy({type:"Feature",geometry:{coordinates:(c=a.feature.properties.textArea)==null?void 0:c.position,type:"Point"},properties:{textArea:a.feature.properties.textArea,content:n,id:Jt()}});u.polygonEntityId=t;let l=new Yt(u,new km(o==null?void 0:o.appearance));return a.textEntityId=l.id.toString(),u.mesh.userData.entityId=l.id.toString(),u.mesh.userData.type="text3d",s(this,Q).geometry3DMap.set(l.id.toString(),l),o.parentId&&((d=this.getParentContainer(o.parentId))==null||d.addEntity(l)),this.render(),{id:l.id,type:"text3d"}}addLabel2D(t,n,o,i){var u;let a=o==null?void 0:o.id;try{uC(t,n,o||{})}catch(l){K.error(l);return}if(a===void 0||!s(this,Q).geometry2DMap.has(a)&&!s(this,Q).geometry3DMap.has(a)){let l=he(this,qn,oS).call(this,t,new Vs(n,o||{},s(this,Q)),o==null?void 0:o.occluderId,o==null?void 0:o.verticalOffset);l.id=a||String(l.id),a=l.id,(o==null?void 0:o.interactive)!=null&&ei(l,o==null?void 0:o.interactive,s(this,Q)),(o==null?void 0:o.enabled)!=null&&sy(l,o.enabled),(o==null?void 0:o.occlude)!=null&&Mx(l,o.occlude);let c=typeof(o==null?void 0:o.attachTo)=="string"||typeof(o==null?void 0:o.attachTo)=="number"?s(this,Q).geometry3DMap.get(o.attachTo):void 0;c instanceof Yt&&c.attach(l),(u=this.getParentContainer(i))==null||u.addEntity(l),s(this,bi).call(this),this.render()}else K.error("Label2D with ID '".concat(a,"' already exists. The label cannot be added."));return{id:a,type:"label"}}addPath(t,n={},o){var l,c;try{AO(t,n||{})}catch(d){K.error(d);return}let i=new kl(t,rD(n)),a=new Yt(i,new Ya({color:(l=n==null?void 0:n.color)!=null?l:"#ff834c",altitude:(c=n==null?void 0:n.verticalOffset)!=null?c:.1}));a.id=(n==null?void 0:n.id)||Jt(),i.mesh.userData={entityId:a.id,type:"path"},s(this,Q).geometry3DMap.set(a.id,a),(n==null?void 0:n.interactive)!=null&&ei(a,n==null?void 0:n.interactive,s(this,Q));let u=this.getParentContainer(o);return u instanceof un&&u.addEntity(a),s(this,Ur).call(this),this.render(),{id:a.id,type:"path"}}updateWatermark(t){s(this,te).watermarkSystem.options=t,s(this,te).watermarkSystem.dirty=!0,s(this,te).collisionSystem.collidersDirty=!0,this.render()}remove(t){var o,i;let n;if(typeof t=="string"||typeof t=="number"?(n=s(this,Q).geometry2DMap.get(t),n==null&&(n=s(this,Q).geometry3DMap.get(t))):typeof t.id=="string"||typeof t.id=="number"?(n=s(this,Q).geometry2DMap.get(t.id),n==null&&(n=s(this,Q).geometry3DMap.get(t.id))):n=t,n!=null){if(n.type==="custom-geometry")s(this,Q).geometry3DMap.delete(n.id),n.object3d&&an(n.object3d);else if(n.type==="group-container"){s(this,Q).geometry3DMap.delete(n.userData.entityId);for(let a of n.childrenIds.values())this.remove(a),n.userData.entities2D.delete(a);an(n)}else if(n.type==="geometry-group"){s(this,Q).geometry3DMap.delete(n.userData.entityId);for(let a of n.userData.entities3D.values())this.remove(a),n.userData.entities3D.delete(a);an(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let a=n.components[0];if(n.entities2D.size>0){for(let l of n.entities2D.values())this.remove(l);n.removeAllEntities()}let u=(i=(o=n.parentObject3D)==null?void 0:o.userData.entityId)!=null?i:n.parentId;if(u){let l=s(this,Q).geometry3DMap.get(u);l instanceof Ka&&l.userData.entities3D.delete(n.id)}if(n.object3d&&an(n.object3d),n.type==="geometry"){let l=n.components[3];l&&(l.enabled=!1,l.dirty=!0)}"textMesh"in a&&a.textMesh!=null&&this.remove(a.textMesh.userData.entityId),s(this,Q).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let a=n.attachedTo;if(a){let u=s(this,Q).geometry3DMap.get(a);u instanceof Yt&&u.detach(n)}n.object3d&&an(n.object3d),n.type==="label"&&delete s(this,te).twoDDrawSystem.textCache[n.id],s(this,Q).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&an(n.object3d),s(this,Q).geometry3DMap.delete(n.id);else if(n.type==="text3d"){an(n.object3d);let{batchedText:a,textMesh:u,polygonEntityId:l}=n.components[0];if(u&&(a&&a.removeText(u),an(u)),l){s(this,te).text3DSystem.remove(l);let c=s(this,Q).geometry3DMap.get(l);(c==null?void 0:c.type)==="geometry"&&(c.components[0].textMesh=void 0,c.components[0].textEntityId=void 0)}s(this,Q).geometry3DMap.delete(n.id)}s(this,Ur).call(this),s(this,bi).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,Sr)}getThreeCamera(){return s(this,kr)}async setEnvironment(t){if(s(this,Sr))if(t==="basic"){s(this,cd)||k(this,cd,he(this,qn,iS).call(this));let n=await s(this,cd);s(this,Sr).environment=n}else s(this,Sr).environment=null}getEnvironment(){var t;return(t=s(this,Sr))!=null&&t.environment?"basic":!1}getCurrentSceneGLTF(t){return s(this,te).exporterSystem.getCurrentSceneGLTF(t)}getBoundingArea(t){(s(this,te).renderSystem.threeDdirty||s(this,te).renderSystem.twoDdirty)&&this.renderSync();let n=new Zr;if(t==null)n.setFromObject(s(this,Q).geometryScene);else{let o=oc(s(this,Q),t);if((o==null?void 0:o.type)==="geometry"&&(o==null?void 0:o.object3d)!=null){let i=o.components[0],a=i instanceof sn?i.geometry:void 0;i.mesh instanceof Hg&&a?(a.computeBoundingBox(),a.boundingBox&&n.union(a.boundingBox)):n.setFromObject(o.object3d)}else((o==null?void 0:o.type)==="geometry-group"||(o==null?void 0:o.type)==="group-container")&&(o==null?void 0:o.userData.entityId)!=null&&n.setFromObject(o)}if(tc(n))return fC(n).map(this.convert3DMapPositionToCoordinate)}hasState(t){return oc(s(this,Q),t)!=null}getState(t){var o,i,a,u,l,c,d,f,h,g,b,I,v,E,T,D,w,B,X,L,P,R,$,V;if(t==null)return{type:"map-view",hoverColor:s(this,Q).hoverColor,text3dHoverColor:s(this,Q).text3dHoverColor};let n=oc(s(this,Q),t);if((n==null?void 0:n.type)==="custom-geometry"){let H=n.components[0],re=n.components[1];return{id:n.id,type:"custom-geometry",visible:re.visible,altitude:re.altitude,parent:(o=n.parentObject3D)==null?void 0:o.userData.entityId,position:this.convert3DMapPositionToCoordinate(H.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let H=Array.from(n.userData.entities3D.values()),re=H==null?void 0:H[0],j=re?this.getState(re):{};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:(i=j==null?void 0:j.side)!=null?i:"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(me=>s(this,Q).geometry3DMap.get(me)).every(me=>me&&me.components[2]!=null),children:H,bevel:j==null?void 0:j.bevel,maskId:(a=n.components[0])==null?void 0:a.maskId,maskEnabled:(u=n.components[0])==null?void 0:u.enabled,maskEffect:(l=n.components[0])==null?void 0:l.effect,maskMode:(c=n.components[0])==null?void 0:c.mode}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(d=n.getWorldPosition(bY).z)!=null?d:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map(H=>this.getState(H)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let H=n.components[0],re=n.object3d.parent,j=re==null?void 0:re.userData.entityId;return{id:n.id,type:"label",text:H.text||"",parent:{id:j,type:re==null?void 0:re.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:H.enabled,visible:H.visible,initialRank:Om(H.initialRank),options:{rank:Om(H.rank),appearance:H.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,occlude:(h=(f=n.components[2])==null?void 0:f.enabled)!=null?h:!1}}}else if((n==null?void 0:n.type)==="marker"){let H=n.components[0],re=n.object3d.parent,j=re==null?void 0:re.userData.entityId;return{id:n.id,type:"marker",enabled:H.enabled,visible:H.visible,placement:H.options.placement,dynamicResize:H.options.dynamicResize,parent:{id:j,type:re==null?void 0:re.type},position:this.convert3DMapPositionToCoordinate(n.position),element:H.containerEl,initialRank:Om(H.initialRank),contentHTML:H.contentHtml,options:{rank:Om(H.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:H.options.lowPriorityPin,occlude:(b=(g=n.components[2])==null?void 0:g.enabled)!=null?b:!1,zIndex:H.options.zIndex}}}else if((n==null?void 0:n.type)==="geometry"){let{color:H,hoverColor:re,initialColor:j,initialTopColor:me,topColor:z,altitude:ue}=n.components[1],se=n.components[0],pe=n.components[4],le=n.components[1],ye=n.components[6],Fe=n.components[2],Ee=n.components[3],Oe=n.parentObject3D;return{id:n.id,type:"geometry",opacity:le.opacity,initialColor:j,color:H,focusable:pe!=null&&pe.vertices!=null&&pe.vertices.length>0,initialTopColor:me,topColor:z,side:le.side,hoverColor:re,hovered:!!(Fe!=null&&Fe.hover),height:le.height,visible:le.visible,outline:Ee==null?void 0:Ee.enabled,showImage:le.showImage,texture:(I=ye==null?void 0:ye.texture)==null?void 0:I.path,topTexture:(v=ye==null?void 0:ye.topTexture)==null?void 0:v.path,flipImageToFaceCamera:le.flipImageToFaceCamera,enableImageCollisions:le.enableImageCollisions,parent:{id:Oe==null?void 0:Oe.userData.entityId,type:Oe==null?void 0:Oe.type},altitude:ue,bevel:le.bevel,position:this.convert3DMapPositionToCoordinate(se.position),interactive:n.components[2]!=null,borderVisible:le.borderVisible,borderColor:le.borderColor,borderWidth:le.borderWidth}}else if((n==null?void 0:n.type)==="model"){let H=n.components[0],re=n.components[1],j=n.components[2];return{id:n.id,type:"model",position:H.mesh?this.convert3DMapPositionToCoordinate(H.mesh.position):this.convert3DMapPositionToCoordinate(H.position),interactive:j!=null,material:re.material,parent:(E=n.parentObject3D)!=null&&E.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:re.visible,verticalOffset:re.verticalOffset,color:re.color,opacity:re.opacity,rotation:(T=re.rotation)!=null?T:$d,scale:(D=re.scale)!=null?D:Vd}}else if((n==null?void 0:n.type)==="path"){let H=n.components[0],re=n.components[2],j=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(H.position),visible:j.visible,interactive:re!=null,completeFraction:H.completeFraction,color:j.color,accentColor:H.accentColor,width:H.width,animateArrowsOnPath:H.animateArrowsOnPath,displayArrowsOnPath:H.displayArrowsOnPath,verticalOffset:j.altitude,highlightCompleteFraction:H.highlightCompleteFraction,highlightStartFraction:H.highlightStartFraction,highlightEndFraction:H.highlightEndFraction,highlightColor:H.highlightColor,highlightWidthMultiplier:H.highlightWidthMultiplier,xrayOpacity:H.xrayOpacity,smoothingTension:H.smoothingTension,smoothingCornerRadius:H.smoothingCornerRadius,dashed:H.dashed,dashLength:H.dashLength,dashGap:H.dashGap,dashRelativeToWidth:H.dashRelativeToWidth,dashSize:H.dashSize,gapSize:H.gapSize,dashAbsolute:H.dashAbsolute,dashMeters:H.dashMeters,gapMeters:H.gapMeters,__EXPERIMENTAL_GEOMETRY:H.__EXPERIMENTAL_GEOMETRY,__EXPERIMENTAL_ENDCAP_ENABLED:H.__EXPERIMENTAL_ENDCAP_ENABLED,__EXPERIMENTAL_BILLBOARDING:H.__EXPERIMENTAL_BILLBOARDING,__EXPERIMENTAL_BORDER:H.__EXPERIMENTAL_BORDER}}else if((n==null?void 0:n.type)==="image"){let H=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate(H.position),visible:n.components[1].visible,verticalOffset:(w=H.feature.properties.verticalOffset)!=null?w:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(B=H.feature.properties.width)!=null?B:0,height:(X=H.feature.properties.height)!=null?X:0,rotation:(L=H.feature.properties.rotation)!=null?L:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof iy&&"textArea"in n.components[0].feature.properties){nD(n);let H=n.components[0],re=n.components[1],{textMesh:j}=H,me=(P=H.mesh)==null?void 0:P.parent;me instanceof un&&((R=me.children.find(se=>se.type==="batchedtext"))==null||R.getWorldPosition(s(this,j0))),s(this,om).set(0,0,0);let z=j?j.getWorldPosition(s(this,om)):s(this,om);return Object.assign({},zd,re.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(z.add(s(this,j0))),visible:($=H.visible)!=null?$:!1,content:(V=H.feature.properties.content)!=null?V:""})}else return}}getRenderedState(t){let n=typeof t=="string"||typeof t=="number"?t:t.id,o=oc(s(this,Q),n);if(o&&o.type==="label")return{textVisible:o.components[0].textVisible}}setState(t,n){var i,a;if(typeof t=="object"&&n==null){"hoverColor"in t&&(Pm(t.hoverColor)?s(this,Q).hoverColor=(i=t.hoverColor)!=null?i:s(this,Q).hoverColor:K.warn('Failed to update global hover color. Invalid color "'.concat(t.hoverColor,'".'))),"text3dHoverColor"in t&&(s(this,Q).text3dHoverColor=(a=t.text3dHoverColor)!=null?a:s(this,Q).text3dHoverColor);return}let o=oc(s(this,Q),t);if(o!=null){if(o.type==="custom-geometry"){let u=s(this,Q).geometry3DMap.get(o.id);if(u instanceof Yt&&u.components[0]instanceof Hf){let l=n;rl(o,s(this,Q),l.visible),Hd(o,s(this,Q),l.altitude),Tx(o,l.position,this.convertTo3DMapPosition),wx(o,this.getParentContainer(l.parent,!1)),ei(o,l.interactive,s(this,Q))&&s(this,Ur).call(this)}}else if(o.type==="path"){let u=n;ei(o,u.interactive,s(this,Q))&&s(this,Ur).call(this),Hd(o,s(this,Q),u.verticalOffset),tD(o,s(this,Q),u)}else if(o.type==="model"){let u=n;ei(o,u.interactive,s(this,Q))&&s(this,Ur).call(this),rl(o,s(this,Q),u.visible),iD(o,u),aD(o,u)}else if(o.type==="group-container"){let u=n;rl(o,s(this,Q),u.visible)&&(s(this,te).pathSystem.verticalDistanceDirty=!0,s(this,te).geometryInFocusSystem.focusablesDirty=!0),Hd(o,s(this,Q),u.altitude)&&(s(this,te).pathSystem.verticalDistanceDirty=!0),ei(o,u.interactive,s(this,Q))&&s(this,Ur).call(this),uy(o,s(this,Q),u.opacity)&&(s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),u.preloadGeometry&&o.userData.preloadGeometry!==!0&&(o.userData.preloadGeometry=!0,s(this,te).outlineInterpolationSystem.geometries3DDirty=!0),ly(o,u.focusable)&&(s(this,te).geometryInFocusSystem.focusablesDirty=!0)}else if(o.type==="geometry-group"){let u=n;rl(o,s(this,Q),u.visible),zC(o,s(this,Q),u),Ox(o,s(this,Q),u.outline),u.height!=null&&Dx(o,s(this,Q),u.height),Hd(o,s(this,Q),u.altitude),Px(o,s(this,Q),u)&&(s(this,te).textureSystem.dirty=!0),Px(o,s(this,Q),u),VC(o,s(this,Q),u.shading),uy(o,s(this,Q),u.opacity)&&(s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),ei(o,u.interactive,s(this,Q))&&(s(this,Ur).call(this),s(this,bi).call(this)),Fx(o,s(this,Q),u.side),_x(o,{maskId:u.maskId,enabled:u.maskEnabled,effect:u.maskEffect,mode:u.maskMode})}else if(o.type==="geometry"){if(o.components[0]instanceof sn){let u=n;rl(o,s(this,Q),u.visible),Ox(o,s(this,Q),u.outline),$C(o,u),ly(o,u.focusable)&&(s(this,te).geometryInFocusSystem.focusablesDirty=!0),QC(o,u.renderOrder)&&(s(this,te).meshDetachmentSystem.dirty=!0),KC(o,u.opacity)&&(s(this,te).meshDetachmentSystem.dirty=!0,s(this,te).interactionSystem.dirty3D=!0,s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),Ax(o,u.flipImageToFaceCamera),JC(o,u.enableImageCollisions),Hd(o,s(this,Q),u.altitude),u.height!=null&&Dx(o,s(this,Q),u.height),YC(o,u)&&(s(this,te).meshDetachmentSystem.dirty=!0,s(this,te).textureSystem.dirty=!0),HC(o,u),XC(o,u.hoverColor),ei(o,u.interactive,s(this,Q)),qC(o,u.hovered),Fx(o,s(this,Q),u.side),eD(o,u)}s(this,Ur).call(this)}else if(o.type==="label"||o.type==="marker"){let u=n;WC(o,u,s(this,Q)),ZC(o,u,s(this,Q))&&(s(this,bi).call(this),s(this,te).domMutationSystem.dirty=!0),Tx(o,u.position,this.convertTo3DMapPosition),wx(o,this.getParentContainer(u.parent,!1))&&(s(this,bi).call(this),s(this,te).panBoundsSystem.dirty=!0),sy(o,u.enabled),rl(o,s(this,Q),u.visible)}else if(o.type==="image"){let u=n;rl(o,s(this,Q),u.visible),uy(o,s(this,Q),u.opacity),Ax(o,u.flipImageToFaceCamera)}else if(o.type==="text3d"){let u=n;oD(o,s(this,Q),u)}this.render()}}convertTo3DMapPosition(t,n,o=0,i){var l,c,d,f,h;if(Array.isArray(t))return this.convertTo3DMapPosition(t[1],t[0],(l=t[2])!=null?l:o,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:a,y:u}=ry((d=(c=s(this,Q).center)==null?void 0:c[1])!=null?d:0,(h=(f=s(this,Q).center)==null?void 0:f[0])!=null?h:0,t,n);return i?(i.set(a,u,o),i):new Ce(a,u,o)}get backgroundColor(){return typeof s(this,Yr).backgroundColor=="string"?s(this,Yr).backgroundColor:"#".concat(s(this,Yr).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,Yr).backgroundAlpha}getThreeRenderer(){return s(this,Yr)}getCenter(t){let n=Array.isArray(t)?t:this.getBoundingArea(t);return n?SC(n):void 0}isInView(t){let n=oc(s(this,Q),t);if(s(this,R0).identity().multiply(s(this,kr).projectionMatrix).multiply(s(this,kr).matrixWorldInverse),s(this,md).setFromProjectionMatrix(s(this,R0)),n instanceof gx)return s(this,md).containsPoint(n.position);if(n instanceof Yt){let o=n==null?void 0:n.components[0];if(o instanceof Hf||o instanceof Fl)return s(this,md).containsPoint(this.convertTo3DMapPosition(o.feature.geometry.coordinates));if(o instanceof sn){let i=new Zr(this.convertTo3DMapPosition(o.featureBbox[1],o.featureBbox[0],0),this.convertTo3DMapPosition(o.featureBbox[3],o.featureBbox[2],0));return s(this,md).intersectsBox(i)}}return!1}queryGeometry2DInView(t){let{screenOffsets:n,fullyContains:o}=t!=null?t:{},[i,a,u,l]=wC(this.container,n),c=new ot(i,a,u,l);return s(this,te).collisionSystem.visibleCollidersQTree.queryRect(c).filter(g=>o?c.contains(g):c.intersects(g)).map(g=>s(this,Q).geometry2DMap.get(g.userData.entityId)).filter(g=>g!=null).filter(g=>g.components[0]instanceof Vs||g.components[0]instanceof $s).map(g=>g.id.toString())}onMapLibreEvent(t,n){if(!this.map){K.warn('Tried to add event listener "'.concat(t,'" but MapLibre map is not initialized.'));return}let o=this.map.on(t,n);o!=null&&o.unsubscribe&&this.onAbort(()=>o.unsubscribe())}offMapLibreEvent(t,n){this.map&&this.map.off(t,n)}getSystems(){return s(this,te)}getInternalState(){return s(this,Q)}getInternalTweenGroup(){return s(this,Q).internalTweenGroup}getExternalTweenGroup(){return s(this,Q).externalTweenGroup}computeMinZOffsetBetweenContainers(t,n,o){if(!t||!n)return-1;Rd(t,"group-container"),Rd(n,"group-container"),t.updateMatrixWorld(!0),n.updateMatrixWorld(!0);let i=ny(t,this.getThreeCamera()),a=n.clone(!0);yC(a,!0),a.updateMatrixWorld();let u=ny(a,this.getThreeCamera());if(!tc(i)||!tc(u))return-1;let l=0,c;o&&this.container.querySelectorAll(".debug-box").forEach(f=>f.remove());do{if(l>1e4)return-1;if(l+=20,a.setAltitude(l),u.makeEmpty(),ny(a,s(this,kr),u),c=i.intersectsBox(u),o){let d=Ix(i,"blue",this.container),f=Ix(u,c?"red":"green",this.container);d.classList.add("debug-box"),f.classList.add("debug-box")}}while(c);return l}};Sr=new WeakMap,kr=new WeakMap,cd=new WeakMap,em=new WeakMap,tm=new WeakMap,Ul=new WeakMap,dd=new WeakMap,pd=new WeakMap,qn=new WeakSet,nS=function(t){var n;s(this,_u)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(t)),s(this,Q).pixelRatio=this.resolutionScale},Q=new WeakMap,Ut=new WeakMap,Oa=new WeakMap,Br=new WeakMap,Yi=new WeakMap,Yr=new WeakMap,te=new WeakMap,sv=new WeakMap,bi=new WeakMap,Ur=new WeakMap,uv=new WeakMap,fd=new WeakMap,kF=function(){k(this,Ut,document.createElement("div")),s(this,Ut).classList.add("mappedin__smart-collision-engine__container"),k(this,Oa,document.createElement("canvas")),s(this,Oa).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Ut)),k(this,Br,document.createElement("canvas")),s(this,Br).classList.add("mappedin__smart-collision-engine__container"),s(this,Br).width=s(this,Ut).clientWidth*this.resolutionScale,s(this,Br).height=s(this,Ut).clientHeight*this.resolutionScale,s(this,Br).style.width=s(this,Ut).clientWidth+"px",s(this,Br).style.height=s(this,Ut).clientHeight+"px",s(this,Ut).appendChild(s(this,Oa)),s(this,Ut).appendChild(s(this,Br)),s(this,Oa).width=s(this,Ut).clientWidth,s(this,Oa).height=s(this,Ut).clientHeight,s(this,Br).width=s(this,Ut).clientWidth*this.resolutionScale,s(this,Br).height=s(this,Ut).clientHeight*this.resolutionScale,s(this,Br).style.width=s(this,Ut).clientWidth+"px",s(this,Br).style.height=s(this,Ut).clientHeight+"px"},BF=function(){k(this,Yi,document.createElement("div")),s(this,Yi).classList.add("mappedin-2d-entities"),Object.assign(s(this,Yi).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,Yi))},LF=function(){s(this,Br).width=s(this,Ut).clientWidth*this.resolutionScale,s(this,Br).height=s(this,Ut).clientHeight*this.resolutionScale,s(this,Br).style.width=s(this,Ut).clientWidth+"px",s(this,Br).style.height=s(this,Ut).clientHeight+"px",s(this,Oa).width=s(this,Ut).clientWidth,s(this,Oa).height=s(this,Ut).clientHeight,s(this,Br).width=s(this,Ut).clientWidth*this.resolutionScale,s(this,Br).height=s(this,Ut).clientHeight*this.resolutionScale,s(this,Br).style.width=s(this,Ut).clientWidth+"px",s(this,Br).style.height=s(this,Ut).clientHeight+"px",s(this,te).collisionSystem.collidersDirty=!0},_u=new WeakMap,lv=new WeakMap,F0=new WeakMap,cv=new WeakMap,dv=new WeakMap,rm=new WeakMap,nm=new WeakMap,pv=new WeakMap,k0=new WeakMap,B0=new WeakMap,L0=new WeakMap,oS=function(t,n,o,i){let a=new gx(n,this.convertTo3DMapPosition(t[1],t[0],t[2]||0),i);return a.components[2]=new nv(o!=null?o:s(this,te).occlusion2DSystem.backgroundId),s(this,Q).geometry2DMap.set(a.id,a),a},md=new WeakMap,R0=new WeakMap,N0=new WeakMap,Ou=new WeakMap,Fu=new WeakMap,iS=async function(){return Bl.load(rO).then(t=>{var n;return s(this,Sr)&&((n=s(this,Sr).environment)==null||n.dispose(),t.mapping=x6,s(this,Sr).environment=t,this.render()),t})},fv=new WeakMap,pt=new WeakMap,om=new WeakMap,j0=new WeakMap;var bY=new Ce,U0=rS;p();function vY(e,r){xY(e,r)(e.getScene(),r),EY(e,r),r.addFolder("Export").add({export:async()=>{let a=await e.getCurrentSceneGLTF({binary:!0}),u=new Blob([a],{type:"application/octet-stream"});var l=document.createElement("a");document.body.appendChild(l),l.style.display="none";let c=window.URL.createObjectURL(u);l.href=c,l.download="scene.glb",l.click(),window.URL.revokeObjectURL(c)}},"export");let o=r.addFolder("Camera"),i={get bearing(){return e.camera.bearing},set bearing(a){e.camera.setBearing(a)},get pitch(){return e.camera.pitch},set pitch(a){e.camera.setPitch(a)},get zoomLevel(){return e.camera.zoomLevel},set zoomLevel(a){e.camera.setZoomLevel(a)}};o.add(i,"bearing",-359,359,1),o.add(i,"pitch",e.camera.minPitch,e.camera.maxPitch,1),o.add(i,"zoomLevel",e.camera.minZoomLevel,e.camera.maxZoomLevel,.1)}function xY(e,r){let t=r;return function n(o,i){let a=i.addFolder("".concat([o.type]," ").concat(o.id.slice(0,16)));if(i.close(),o.type==="geometry"||o.type==="model"||o.type==="path"||o.type==="image"){let u={get height(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"?l.height:0},set height(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(o,{height:l})},set flipImageToFaceCamera(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="image"&&e.setState(o,{flipImageToFaceCamera:l})},get flipImageToFaceCamera(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="image"?l.flipImageToFaceCamera:!1},set visible(l){let c=e.getState(o.id);((c==null?void 0:c.type)==="geometry"||(c==null?void 0:c.type)==="path"||(c==null?void 0:c.type)==="image")&&e.setState(o,{visible:l})},get visible(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"||(l==null?void 0:l.type)==="path"||(l==null?void 0:l.type)==="image"?l.visible:!1},set outline(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(o,{outline:l})},get outline(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"?l.outline:!1},get opacity(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"?l.opacity:1},set opacity(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(c,{opacity:l})},get color(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"&&l.color?iC(l.color).toHexString():"#ffffff"},set color(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(c,{color:l})},set interactive(l){let c=e.getState(o.id);((c==null?void 0:c.type)==="geometry"||(c==null?void 0:c.type)==="model"||(c==null?void 0:c.type)==="path")&&(e.setState(o,{interactive:l}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry"||(l==null?void 0:l.type)==="model"||(l==null?void 0:l.type)==="path"?l.interactive:!1},get completeFraction(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="path"?l.completeFraction:1},set completeFraction(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="path"&&e.setState(c,{completeFraction:l})},focus:()=>{}};a.add(u,"focus").onChange(()=>{let l=e.getState(o.id);(l==null?void 0:l.type)==="model"||(l==null?void 0:l.type)==="path"||(l==null?void 0:l.type)==="image"?e.camera.focusOn([l.position]):(l==null?void 0:l.type)==="geometry"&&e.camera.focusOn(e.getBoundingArea(l))}),a.add(u,"visible"),o.type==="image"?a.add(u,"flipImageToFaceCamera"):(a.add(u,"interactive"),o.type==="path"&&a.add(u,"completeFraction",0,1,.1),o.type!=="model"&&(a.addColor(u,"color"),a.add(u,"outline"))),o.type==="geometry"&&(a.add(u,"height"),a.add(u,"opacity",0,1,.1))}else if(o.type==="marker"){let u={get interactive(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="marker"?(c=l.options)==null?void 0:c.interactive:!1},set interactive(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="marker"&&(e.setState(c,{options:{interactive:l}}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},focus:()=>{}};a.add(u,"focus").onChange(()=>{let l=e.getState(o.id);(l==null?void 0:l.type)==="marker"&&e.camera.focusOn([l.position])}),a.add(u,"interactive")}else if(o.type==="label"){let u={get interactive(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options)==null?void 0:c.interactive:!1},set interactive(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&(e.setState(c,{options:{interactive:l}}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get text(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?l.text:""},set text(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l})},get"Text Color"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.textColor:"#000000"},set"Text Color"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(o.id,{text:u.text,options:{appearance:{textColor:l}}})},get"Text Size"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.textSize:10},set"Text Size"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{textSize:l}}})},get"Icon Size"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.iconSize:10},set"Icon Size"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{iconSize:l}}})},get"Pin Color"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.pinColor:"#000000"},set"Pin Color"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{pinColor:l}}})},get"Pin Color Inactive"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.pinColorInactive:"#000000"},set"Pin Color Inactive"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{pinColorInactive:l}}})},get"Pin Outline Color"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.pinOutlineColor:"#000000"},set"Pin Outline Color"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{pinOutlineColor:l}}})},get"Pin Outline Color Inactive"(){var c;let l=e.getState(o.id);return(l==null?void 0:l.type)==="label"?(c=l.options.appearance)==null?void 0:c.pinOutlineColorInactive:"#000000"},set"Pin Outline Color Inactive"(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u.text,options:{appearance:{pinOutlineColorInactive:l}}})},focus:()=>{}};a.add(u,"focus").onChange(()=>{let l=e.getState(o.id);(l==null?void 0:l.type)==="label"&&e.camera.focusOn([l.position])}),a.add(u,"interactive"),a.add(u,"text"),a.add(u,"Text Size",10,50),a.add(u,"Icon Size",10,50),a.addColor(u,"Text Color"),a.addColor(u,"Active Background Color"),a.addColor(u,"Inactive Background Color"),a.addColor(u,"Active Foreground Color"),a.addColor(u,"Inactive Foreground Color")}else if(o.type==="geometry-group"){let u={get opacity(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"?l.opacity:1},set opacity(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{opacity:l})},set visible(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{visible:l})},get visible(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"?l.visible:!1},set outline(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{outline:l})},get outline(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"?l.outline:!1},set altitude(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{altitude:l})},get altitude(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"?l.altitude:0},set interactive(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&(e.setState(o,{interactive:l}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"?l.interactive:!1},get shadingStart(){var c,d;let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"&&(d=(c=l.shading)==null?void 0:c.start)!=null?d:0},set shadingStart(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{start:l}})},get shadingEnd(){var c,d;let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"&&(d=(c=l.shading)==null?void 0:c.end)!=null?d:0},set shadingEnd(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{end:l}})},get shadingIntensity(){var c,d;let l=e.getState(o.id);return(l==null?void 0:l.type)==="geometry-group"&&(d=(c=l.shading)==null?void 0:c.intensity)!=null?d:0},set shadingIntensity(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{intensity:l}})}};a.add(u,"visible"),a.add(u,"opacity",0,1,.1),a.add(u,"interactive"),a.add(u,"outline"),a.add(u,"altitude",0,100,1),a.add(u,"shadingStart",0,1,.1),a.add(u,"shadingEnd",0,1,.1),a.add(u,"shadingIntensity",0,1,.1)}else if(o.type==="group-container"){let u={set visible(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="group-container"&&e.setState(o,{visible:l})},get visible(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="group-container"?l.visible:!1},set interactive(l){let c=e.getState(o.id);(c==null?void 0:c.type)==="group-container"&&(e.setState(c,{interactive:l}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let l=e.getState(o.id);return(l==null?void 0:l.type)==="group-container"?l.interactive:!1}};a.add(u,"visible"),a.add(u,"interactive")}if(a.close(),o.children)for(let u of o.children.values())n(u,a)}}function EY(e,r){let t=r.addFolder("Watermark"),n={padding:16,iconOnly:!1,position:"bottom-left",color:"dark",scale:1};t.add(n,"padding",0,100,1),t.add(n,"scale",.5,1.5,.1),t.add(n,"color",["dark","light"]),t.add(n,"position",["top-left","top-right","bottom-left","bottom-right","center","top","bottom","left","right"]),t.add(n,"iconOnly"),t.onChange(()=>{e.updateWatermark(n)})}var lS="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",SY="https://auth.mappedin.com/oauth2/token";var mv="";function cS(e){mv=e,pC(e)}var ed="";function dS(e){ed=e}async function RF(e,r){var o,i,a,u,l,c,d,f,h;let t=(o=r==null?void 0:r.useWorkers)!=null?o:!0,n=ne(_({},r),{watermark:r==null?void 0:r.watermark,attribution:r==null?void 0:r.attribution,antialias:r==null?void 0:r.antialias,occlusionEnabled:r==null?void 0:r.occlusionEnabled,transformImageRequest:r==null?void 0:r.transformImageRequest,naturalBearing:(i=r==null?void 0:r.naturalBearing)!=null?i:0,imagePlacementOptions:r==null?void 0:r.imagePlacementOptions,onWebGLContextCreationError:r==null?void 0:r.onWebGLContextCreationError,onWebGLContextLost:r==null?void 0:r.onWebGLContextLost,onWebGLContextRestored:r==null?void 0:r.onWebGLContextRestored,onWebGLRendererError:r==null?void 0:r.onWebGLRendererError,useStandaloneCamera:(a=r==null?void 0:r.useStandaloneCamera)!=null?a:!1,useCollisionWorker:(u=r==null?void 0:r.useCollisionWorker)!=null?u:!0,useWorkers:t});if(t===!0&&((l=r==null?void 0:r.outdoorView)!=null&&l.enabled)){let g=r.outdoorView.headers;g==null&&(g=await EC(SY));let b=r.center||[0,0],I=null,v=null;try{I=new dC({container:e,style:r.outdoorView.style||lS,center:b,attributionControl:!1,zoom:(c=r.zoomLevel)!=null?c:uS,pitch:(d=r.pitch)!=null?d:aS,bearing:(f=r.bearing)!=null?f:sS,transformRequest:hC(g),trackResize:!1,pixelRatio:r.outdoorView.lowDpi?1:Ud(),canvasContextAttributes:{antialias:typeof r.antialias=="boolean"?r.antialias:!0,powerPreference:"high-performance"},interactive:!1,validateStyle:!1,centerClampedToGround:!1,boxZoom:!1,doubleClickZoom:!1,scrollZoom:!1,dragPan:!1,dragRotate:!1,keyboard:!1,touchZoomRotate:!1}),await gC(I,{timeout:1e4,styleUrl:((h=r.outdoorView)==null?void 0:h.style)||lS})}catch(T){if(v=T,K.warn("[MappedinJS] Outdoor view initialization failed: ".concat(v.message,". Falling back to indoor-only rendering.")),I){try{I.remove()}catch(D){}I=null}}if(!I||v){let T=new U0(e,n);return T.publish("outdoor-style-error",{error:v}),T}let E=null;try{let T=I.painter.context.gl;E=new U0(e,_({center:b,zoomLevel:I.getZoom(),pitch:I.getPitch(),bearing:I.getBearing(),gl:T,map:I,mode:"outdoors-interleaved"},n));let D={center:I.getCenter().toArray(),zoom:I.getZoom(),bearing:I.getBearing(),pitch:I.getPitch(),elevation:I.getCenterElevation()};I.setMinZoom(E.camera.minZoomLevel),I.setMaxZoom(E.camera.maxZoomLevel),I.setMaxPitch(E.camera.maxPitch),I.setMinPitch(E.camera.minPitch),E.on("camera-change",re=>{D.center=re.center,D.zoom=re.zoomLevel,D.bearing=re.bearing,D.pitch=re.pitch,D.elevation=re.elevation,I.jumpTo(D)});let w=cC.fromLngLat(b,0),B=xC(w,E.viewCamera,()=>{E==null||E.renderSync()}),X=async()=>{I&&(I.addLayer(B),E==null||E.renderSync())};E.onMapLibreEvent("style.load",X),X();let L=!1,P=!1,R=()=>{I&&(L||(E==null||E.publish("outdoor-view-loaded"),L=!0),P||(P=!0,E==null||E.publish("outdoor-style-loaded")))};E.onMapLibreEvent("idle",R);let $=re=>{re&&(re.sourceDataType==="metadata"||re.sourceDataType==="visibility"||re.dataType==="style"||re.type==="terrain")&&(E==null||E.getSystems().htmlControlsSystem.updateData(I))},V=re=>{I&&re&&re.dataType==="style"&&re.type==="styledata"&&(P=!1),$(re)};E.onMapLibreEvent("styledata",V),E.onMapLibreEvent("sourcedata",$),E.onMapLibreEvent("terrain",$);let H=re=>{var j;if(((j=re.error)==null?void 0:j.url)===lS){K.error('Failed to load outdoor view style, possibly due to invalid token "'.concat(g["x-mappedin-tiles-key"],'"'));return}K.warn(re)};return E.onMapLibreEvent("error",H),E}catch(T){if(E)try{E.destroy()}catch(w){}if(I)try{I.remove()}catch(w){}K.warn("Failed to initialize outdoor view, falling back to indoor-only rendering:",T);let D=new U0(e,n);return D.publish("outdoor-style-error",{error:T}),D}}else return new U0(e,n)}p();p();p();p();var G0=class G0{constructor(r,t,n){m(this,"id");m(this,"text");m(this,"target");m(this,"__type",G0.__type);this.id=r,this.text=t,this.target=n}static is(r){return r.__type===G0.__type}get focusTarget(){return this.target.anchorTarget}};m(G0,"__type","label");var ku=G0;p();var hd,im=class im{constructor(r,t,n){m(this,"id");M(this,hd);m(this,"__type",im.__type);m(this,"contentEl");this.id=r,this.contentEl=t,k(this,hd,n)}get target(){return s(this,hd)}get coordinate(){return s(this,hd).anchorTarget}toJSON(){return{id:this.id,__type:im.__type,target:this.target,coordinate:this.coordinate}}static is(r){return r.__type===im.__type}get focusTarget(){return this.target.anchorTarget}updateTarget(r){k(this,hd,r)}};hd=new WeakMap,m(im,"__type","marker");var Ms=im;p();var V0,$0,z0=class z0{constructor(r,t,n){M(this,V0);M(this,$0);m(this,"target");m(this,"__type",z0.__type);k(this,V0,r),k(this,$0,t),this.target=n}static is(r){return r.__type===z0.__type}get id(){return s(this,V0)}get url(){return s(this,$0)}};V0=new WeakMap,$0=new WeakMap,m(z0,"__type","image-3d");var gd=z0;p();var yd,am=class am{constructor(r,t,n){m(this,"id");m(this,"groupId");m(this,"__type",am.__type);M(this,yd);this.id=r,this.groupId=t,k(this,yd,n)}get target(){return s(this,yd)}static is(r){return r.__type===am.__type}updateTarget(r){k(this,yd,r)}toJSON(){return{id:this.id,__type:am.__type,groupId:this.groupId,target:s(this,yd)}}};yd=new WeakMap,m(am,"__type","model");var bd=am;p();var vd,H0=class H0{constructor(r,t){m(this,"id");m(this,"coordinates");M(this,vd);m(this,"__type",H0.__type);this.id=r,this.coordinates=t}static is(r){return r.__type===H0.__type}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return s(this,vd)?s(this,vd):(k(this,vd,O2(this.coordinates)),s(this,vd))}get focusTarget(){return this.coordinates}};vd=new WeakMap,m(H0,"__type","path-segment");var Gl=H0,xd,sm=class sm{constructor(r,t,n,o){m(this,"id");m(this,"animation");m(this,"coordinates");m(this,"segments");M(this,xd);m(this,"__type",sm.__type);this.id=r,this.animation=t,this.coordinates=n,this.segments=o.map(({id:i,coordinates:a})=>new Gl(i.toString(),a))}static is(r){return r.__type===sm.__type}get focusTarget(){return this.coordinates}get distance(){return s(this,xd)?s(this,xd):(k(this,xd,O2(this.coordinates)),s(this,xd))}toJSON(){return{__type:sm.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};xd=new WeakMap,m(sm,"__type","path");var Fa=sm;p();var CY=7,zl,Ed,Z0=class{constructor(r,t){M(this,zl);M(this,Ed);var n;k(this,zl,r),k(this,Ed,(n=t==null?void 0:t.precision)!=null?n:CY)}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let r=s(this,zl).center;if(s(this,Ed)===-1)return r;let t=Qu(r.latitude,s(this,Ed)),n=Qu(r.longitude,s(this,Ed));return new je({latitude:t,longitude:n,floorId:r.floorId,verticalOffset:r.verticalOffset})}get bearing(){return s(this,zl).bearing}get pitch(){return s(this,zl).pitch}get zoomLevel(){return Qu(s(this,zl).zoomLevel,5)}};zl=new WeakMap,Ed=new WeakMap;p();var W0=class W0{constructor(r){m(this,"id");m(this,"__type",W0.__type);this.id=r}static is(r){return r.__type===W0.__type}get focusTarget(){return this}};m(W0,"__type","shape");var Bu=W0;p();var X0=class X0{constructor(r,t){m(this,"id");m(this,"target");m(this,"__type",X0.__type);this.id=r,this.target=t}static is(r){return r.__type===X0.__type}};m(X0,"__type","text-3d");var Vl=X0;p();p();p();var DY=new Map([["search-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7C13 8.29583 12.5892 9.49572 11.8907 10.4765L15.4614 14.0472C15.6567 14.2425 15.6567 14.559 15.4614 14.7543L14.7543 15.4614C14.559 15.6567 14.2424 15.6567 14.0472 15.4614L10.4765 11.8907C9.49571 12.5892 8.29583 13 7 13C3.68629 13 1 10.3137 1 7ZM7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7C11 9.20914 9.20914 11 7 11Z"\n stroke="none"\n />\n </svg>'],["close-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M12.5963 1.98959C12.7916 1.79433 13.1082 1.79433 13.3034 1.98959L14.0105 2.6967C14.2058 2.89196 14.2058 3.20855 14.0105 3.40381L3.40392 14.0104C3.20866 14.2057 2.89208 14.2057 2.69682 14.0104L1.98971 13.3033C1.79445 13.108 1.79445 12.7915 1.98971 12.5962L12.5963 1.98959Z"\n stroke="none"\n />\n <path\n d="M1.98971 3.40381C1.79445 3.20855 1.79445 2.89196 1.98971 2.6967L2.69682 1.98959C2.89208 1.79433 3.20866 1.79433 3.40392 1.98959L14.0105 12.5962C14.2058 12.7915 14.2058 13.108 14.0105 13.3033L13.3034 14.0104C13.1082 14.2057 12.7916 14.2057 12.5963 14.0104L1.98971 3.40381Z"\n stroke="none"\n />\n </svg>'],["empty-64x40",'<svg viewBox="0 0 64 40">\n <g>\n <g clipPath="url(#clip0_499_175492)">\n <path\n d="M32 39.7032C49.6731 39.7032 64 36.5925 64 32.7552C64 28.9179 49.6731 25.8071 32 25.8071C14.3269 25.8071 0 28.9179 0 32.7552C0 36.5925 14.3269 39.7032 32 39.7032Z"\n stroke="none"\n fill="#F5F5F5"\n />\n <path\n d="M55 13.6653L44.854 2.24866C44.367 1.47048 43.656 1 42.907 1H21.093C20.344 1 19.633 1.47048 19.146 2.24767L9 13.6663V22.8367H55V13.6653Z"\n fill="none"\n />\n <path\n d="M41.613 16.8128C41.613 15.2197 42.607 13.9046 43.84 13.9036H55V31.9059C55 34.0132 53.68 35.7402 52.05 35.7402H11.95C10.32 35.7402 9 34.0122 9 31.9059V13.9036H20.16C21.393 13.9036 22.387 15.2167 22.387 16.8098V16.8317C22.387 18.4248 23.392 19.7111 24.624 19.7111H39.376C40.608 19.7111 41.613 18.4128 41.613 16.8198V16.8128Z"\n fill="#FAFAFA"\n />\n </g>\n <defs>\n <clipPath id="clip0_499_175492">\n <rect width="64" height="40" fill="white" />\n </clipPath>\n </defs>\n </g>\n </svg>'],["caret-12x12",'<svg viewBox="0 0 12 12">\n <path\n stroke="none"\n d="M8.38828 5.78337L3.92578 1.93493C3.75938 1.79196 3.51562 1.92087 3.51562 2.15173V9.84861C3.51562 10.0795 3.75938 10.2084 3.92578 10.0654L8.38828 6.21696C8.51602 6.10681 8.51602 5.89353 8.38828 5.78337Z"\n />\n </svg>'],["plus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5L1 8.5C1 8.77614 1.22386 9 1.5 9H7V14.5C7 14.7761 7.22386 15 7.5 15H8.5C8.77614 15 9 14.7761 9 14.5V9H14.5C14.7761 9 15 8.77614 15 8.5V7.5C15 7.22386 14.7761 7 14.5 7H9V1.5C9 1.22386 8.77614 1 8.5 1H7.5Z"\n stroke="none"\n />\n </svg>'],["recenter-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M0 2.5C0 2.22386 0.223858 2 0.5 2H1.5C1.77614 2 2 2.22386 2 2.5V13.5C2 13.7761 1.77614 14 1.5 14H0.5C0.223858 14 0 13.7761 0 13.5V2.5Z" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M4.5 4C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5ZM6 6V10H10V6H6Z"\n />\n <path d="M14.5 2C14.2239 2 14 2.22386 14 2.5V13.5C14 13.7761 14.2239 14 14.5 14H15.5C15.7761 14 16 13.7761 16 13.5V2.5C16 2.22386 15.7761 2 15.5 2H14.5Z" />\n </g>\n </svg>'],["minus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M1.5 9C1.22386 9 1 8.77614 1 8.5L1 7.5C1 7.22386 1.22386 7 1.5 7L14.5 7C14.7761 7 15 7.22386 15 7.5V8.5C15 8.77614 14.7761 9 14.5 9L1.5 9Z"\n stroke="none"\n />\n </svg>'],["logo-horizontal-206x48",'<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>'],["share-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M13 6C14.6569 6 16 4.65685 16 3C16 1.34315 14.6569 0 13 0C11.3431 0 10 1.34315 10 3C10 3.13463 10.0089 3.26719 10.0261 3.39712L6.82972 5.17286C6.10576 4.44825 5.10523 4 4 4C1.79086 4 0 5.79086 0 8C0 10.2091 1.79086 12 4 12C5.10523 12 6.10576 11.5518 6.82972 10.8271L10.0261 12.6029C10.0089 12.7328 10 12.8654 10 13C10 14.6569 11.3431 16 13 16C14.6569 16 16 14.6569 16 13C16 11.3431 14.6569 10 13 10C12.2011 10 11.4752 10.3123 10.9376 10.8214L7.84579 9.1037C7.94622 8.75313 8 8.38284 8 8C8 7.61716 7.94622 7.24687 7.84579 6.8963L10.9376 5.17864C11.4752 5.68775 12.2011 6 13 6ZM13 4C13.5523 4 14 3.55228 14 3C14 2.44772 13.5523 2 13 2C12.4477 2 12 2.44772 12 3C12 3.55228 12.4477 4 13 4ZM4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10ZM14 13C14 13.5523 13.5523 14 13 14C12.4477 14 12 13.5523 12 13C12 12.4477 12.4477 12 13 12C13.5523 12 14 12.4477 14 13Z"\n stroke="none"\n />\n </svg>'],["checkmark-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M15.387 3.31662C15.6008 3.49148 15.6323 3.80649 15.4574 4.02021L6.77402 14.6332C6.58509 14.8642 6.30292 14.9986 6.00457 15C5.70622 15.0013 5.42285 14.8694 5.23184 14.6402L0.551937 9.02429C0.375155 8.81215 0.403817 8.49687 0.615956 8.32009L1.38418 7.67991C1.59632 7.50312 1.9116 7.53179 2.08838 7.74392L5.99299 12.4295L13.9095 2.75374C14.0844 2.54002 14.3994 2.50852 14.6131 2.68338L15.387 3.31662Z"\n stroke="none"\n />\n </svg>'],["arrow-right-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.35355 1.64645C8.54881 1.45118 8.8654 1.45118 9.06066 1.64645L14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L9.06066 14.3536C8.8654 14.5488 8.54882 14.5488 8.35355 14.3536L7.64645 13.6464C7.45118 13.4512 7.45118 13.1346 7.64645 12.9393L11.5858 9H0.5C0.223858 9 0 8.77614 0 8.5V7.5C0 7.22386 0.223858 7 0.5 7H11.5858L7.64645 3.06066C7.45118 2.8654 7.45118 2.54882 7.64645 2.35355L8.35355 1.64645Z"\n stroke="none"\n />\n </svg>'],["arrow-up-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M1 11.5C1 11.2239 1.22386 11 1.5 11H6V13.5C6 13.7761 5.77614 14 5.5 14H1.5C1.22386 14 1 13.7761 1 13.5V11.5Z" />\n <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />\n <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />\n <path d="M10 2.5C10 2.22386 10.2239 2 10.5 2H14.5C14.7761 2 15 2.22386 15 2.5V4.5C15 4.77614 14.7761 5 14.5 5H10V2.5Z" />\n </g>\n </svg>'],["connection-stairs-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.25 12H2.5C2.225 12 2 11.7429 2 11.4286C2 11.1143 2.225 10.8571 2.5 10.8571H4.25V7.91429H6.5V4.94286H8.75V2H11.5C11.775 2 12 2.25714 12 2.57143C12 2.88571 11.775 3.14286 11.5 3.14286H9.75V6.08571H7.5V9.02857H5.25V12Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>'],["connection-escalator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3.63008 12H2C0.895431 12 0 12.8954 0 14C0 15.1046 0.89543 16 2 16H4.63008C4.86879 16 5.09962 15.9146 5.28087 15.7593L11.7191 10.2407C11.9004 10.0854 12.1312 10 12.3699 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11.3699C11.1312 6 10.9004 6.08539 10.7191 6.24074L4.28087 11.7593C4.09962 11.9146 3.86879 12 3.63008 12Z" />\n <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />\n <path d="M9 2C9 3.10457 8.10457 4 7 4C5.89543 4 5 3.10457 5 2C5 0.89543 5.89543 0 7 0C8.10457 0 9 0.89543 9 2Z" />\n </g>\n </svg>'],["connection-escalator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.26686 2.98522C5.26686 2.44335 5.71573 2 6.26436 2C6.81299 2 7.26187 2.44335 7.26187 2.98522C7.26187 3.5271 6.81299 3.97045 6.26436 3.97045C5.71573 3.97045 5.26686 3.50246 5.26686 2.98522Z"\n stroke="none"\n />\n <path\n d="M7.26188 5.48588V5.25125C7.26188 4.85716 6.91275 4.53696 6.48881 4.53696H6.03993C5.61599 4.53696 5.26687 4.88179 5.26687 5.25125V7.66458L4.3192 8.6995H3.67082C2.74813 8.6995 2 9.43842 2 10.3498C2 11.2611 2.74813 12 3.67082 12H4.61845C5.36658 12 6.11471 11.6798 6.61347 11.1133L9.6808 7.76354H10.3292C11.2519 7.76354 12 7.02463 12 6.11329C12 5.20196 11.2519 4.46305 10.3292 4.46305H9.38155C8.60848 4.46305 7.88529 4.78324 7.38653 5.34975L7.26188 5.48588ZM4.61846 11.0148H3.67083C3.29677 11.0148 2.99751 10.7192 2.99751 10.3498C2.99751 9.9803 3.29677 9.68473 3.67083 9.68473H4.61846C4.71821 9.68473 4.81796 9.63547 4.86784 9.56158L8.13467 5.99015C8.45886 5.64532 8.90774 5.44828 9.38155 5.44828H10.3292C10.7032 5.44828 11.0025 5.74384 11.0025 6.1133C11.0025 6.48276 10.7032 6.77833 10.3292 6.77833H9.38155C9.2818 6.77833 9.18205 6.82759 9.13218 6.87685L5.86534 10.4729C5.54115 10.8177 5.09228 11.0148 4.61846 11.0148Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3 5.5C3 6.32843 2.32843 7 1.5 7C0.671573 7 0 6.32843 0 5.5C0 4.67157 0.671573 4 1.5 4C2.32843 4 3 4.67157 3 5.5Z" />\n <path d="M3 10.5C3 11.3284 2.32843 12 1.5 12C0.671573 12 0 11.3284 0 10.5C0 9.67157 0.671573 9 1.5 9C2.32843 9 3 9.67157 3 10.5Z" />\n <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />\n <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />\n </g>\n </svg>'],["connection-elevator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M7.476 2H2.72693C1.77095 2 1 2.72464 1 3.62319V10.3768C1 11.2754 1.77095 12 2.72693 12H7.476C8.43198 12 9.20293 11.2754 9.20293 10.3768V3.62319C9.17209 2.72464 8.40114 2 7.476 2ZM7.476 3.15942C7.75354 3.15942 7.96941 3.36232 7.96941 3.62319V10.3768C7.96941 10.6377 7.75354 10.8406 7.476 10.8406H5.71824V3.15942H7.476ZM4.48472 3.15942V10.8406H2.72693C2.44939 10.8406 2.23352 10.6377 2.23352 10.3768V3.62319C2.23352 3.36232 2.44939 3.15942 2.72693 3.15942H4.48472Z"\n stroke="none"\n />\n <path\n d="M12.4643 6.19064H10.6638C10.4456 6.19064 10.2546 6.06243 10.1728 5.88294C10.0909 5.70346 10.1455 5.47269 10.2819 5.31884L11.1821 4.47269C11.4004 4.26756 11.755 4.26756 11.946 4.47269L12.8462 5.31884C13.0099 5.47269 13.0371 5.67781 12.9553 5.88294C12.8735 6.08807 12.6825 6.19064 12.4643 6.19064Z"\n stroke="none"\n />\n <path\n d="M11.564 9.65216C11.4276 9.65216 11.2912 9.60088 11.1821 9.49831L10.2819 8.65216C10.1182 8.49831 10.0909 8.29319 10.1728 8.08806C10.2546 7.90857 10.4456 7.78036 10.6638 7.78036H12.4643C12.6825 7.78036 12.8735 7.90857 12.9553 8.08806C13.0371 8.26754 12.9826 8.49831 12.8462 8.65216L11.9459 9.49831C11.8641 9.60088 11.7004 9.65216 11.564 9.65216Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>'],["new-tab-14x14",'<svg viewBox="0 0 14 14">\n <g stroke="none">\n <path d="M2.625 2.625H5.6875C5.92913 2.625 6.125 2.42912 6.125 2.1875V1.3125C6.125 1.07088 5.92913 0.875 5.6875 0.875H1.3125C1.07088 0.875 0.875 1.07088 0.875 1.3125V12.6875C0.875 12.9291 1.07088 13.125 1.3125 13.125H12.6875C12.9291 13.125 13.125 12.9291 13.125 12.6875V8.3125C13.125 8.07088 12.9291 7.875 12.6875 7.875H11.8125C11.5709 7.875 11.375 8.07088 11.375 8.3125V11.375H2.625V2.625Z" />\n <path d="M12.9063 0.875H8.40311C8.20822 0.875 8.11063 1.11062 8.24843 1.24843L9.88124 2.88124L5.8156 6.94688C5.64475 7.11774 5.64475 7.39475 5.8156 7.5656L6.43432 8.18432C6.60517 8.35517 6.88218 8.35517 7.05304 8.18432L11.1187 4.11868L12.7516 5.75157C12.8894 5.88938 13.125 5.79178 13.125 5.59689V1.09375C13.125 0.972938 13.0271 0.875 12.9063 0.875Z" />\n </g>\n </svg>'],["compress-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path\n id="Vector"\n d="M4.67773 10.7154H0.713449C0.556306 10.7154 0.427734 10.844 0.427734 11.0011V11.8583C0.427734 12.0154 0.556306 12.144 0.713449 12.144H3.82059V15.2868C3.82059 15.444 3.94916 15.5725 4.10631 15.5725H4.96345C5.12059 15.5725 5.24916 15.444 5.24916 15.2868V11.2868C5.24916 10.9708 4.99381 10.7154 4.67773 10.7154ZM4.96345 0.429688H4.10631C3.94916 0.429688 3.82059 0.558259 3.82059 0.715402V3.85826H0.713449C0.556306 3.85826 0.427734 3.98683 0.427734 4.14397V5.00112C0.427734 5.15826 0.556306 5.28683 0.713449 5.28683H4.67773C4.99381 5.28683 5.24916 5.03147 5.24916 4.7154V0.715402C5.24916 0.558259 5.12059 0.429688 4.96345 0.429688ZM15.2849 10.7154H11.3206C11.0045 10.7154 10.7492 10.9708 10.7492 11.2868V15.2868C10.7492 15.444 10.8777 15.5725 11.0349 15.5725H11.892C12.0492 15.5725 12.1777 15.444 12.1777 15.2868V12.144H15.2849C15.442 12.144 15.5706 12.0154 15.5706 11.8583V11.0011C15.5706 10.844 15.442 10.7154 15.2849 10.7154ZM15.2849 3.85826H12.1777V0.715402C12.1777 0.558259 12.0492 0.429688 11.892 0.429688H11.0349C10.8777 0.429688 10.7492 0.558259 10.7492 0.715402V4.7154C10.7492 5.03147 11.0045 5.28683 11.3206 5.28683H15.2849C15.442 5.28683 15.5706 5.15826 15.5706 5.00112V4.14397C15.5706 3.98683 15.442 3.85826 15.2849 3.85826Z"\n />\n </g>\n </svg>'],["washroom-14x14",'<svg viewBox="0 0 14 14" stroke="none">\n <path d="M4.55125 3.09062C4.55125 3.69326 4.07639 4.18176 3.49058 4.18176C2.90525 4.18176 2.43039 3.69326 2.43039 3.09062C2.43039 2.4885 2.90525 2 3.49058 2C4.07639 2 4.55125 2.4885 4.55125 3.09062Z" />\n <path d="M5.1193 5.48047C4.81653 4.83116 4.17252 4.41571 3.47822 4.41571C2.78392 4.41571 2.13986 4.83116 1.83714 5.48047L1.04175 7.22034C0.940664 7.441 1.02893 7.70073 1.24393 7.81791C1.47077 7.90871 1.72324 7.81791 1.82433 7.59725L2.49349 6.15554L2.21587 11.4407C2.20305 11.7263 2.41805 11.9734 2.69567 11.9993C2.97329 12.0124 3.21344 11.7913 3.23859 11.5057L3.4028 8.285H3.567L3.73121 11.5057C3.74403 11.7913 3.97086 11.9993 4.23616 11.9993H4.26131C4.53893 11.9861 4.75343 11.7395 4.74111 11.4407L4.46349 6.15554L5.13265 7.59725C5.20858 7.75298 5.35997 7.85697 5.52418 7.85697C5.5873 7.85697 5.65042 7.84379 5.71354 7.81792C5.92804 7.71393 6.0163 7.44153 5.91572 7.22035L5.1193 5.48047Z" />\n <path d="M12.9582 7.22034L12.1505 5.48047C11.8477 4.83116 11.2037 4.41571 10.5094 4.41571C9.81513 4.41571 9.17107 4.83116 8.86836 5.48047L8.06064 7.22034C7.95955 7.441 8.04782 7.70073 8.26282 7.81791C8.47732 7.9219 8.7298 7.8311 8.84371 7.60993L9.52519 6.12977L9.46207 7.2204L8.57842 8.92184C8.47733 9.11663 8.61638 9.36316 8.83089 9.36316H9.33584L9.22242 11.4668C9.2096 11.7397 9.41177 11.9862 9.68939 11.9994C9.95469 12.0126 10.1943 11.8046 10.2072 11.519L10.3581 9.33723H10.6737L10.7871 11.5058C10.7999 11.7787 11.0144 11.9862 11.2792 11.9862H11.3043C11.5696 11.973 11.7841 11.7396 11.7713 11.4535L11.6579 9.33718H12.1628C12.3773 9.33718 12.5287 9.09066 12.4153 8.89586L11.5317 7.19442L11.4685 6.1038L12.1757 7.5972C12.2516 7.75293 12.403 7.85692 12.5672 7.85692C12.6303 7.85692 12.6934 7.84373 12.7566 7.81786C12.9711 7.70068 13.0593 7.44102 12.9582 7.22034Z" />\n <path d="M11.5696 3.09062C11.5696 3.69326 11.0948 4.18176 10.5094 4.18176C9.92363 4.18176 9.44876 3.69326 9.44876 3.09062C9.44876 2.4885 9.92363 2 10.5094 2C11.0948 2 11.5696 2.4885 11.5696 3.09062Z" />\n <path d="M6.99996 2.00006C6.76031 2.00006 6.57095 2.19485 6.57095 2.44138V11.5575C6.57095 11.804 6.76031 11.9988 6.99996 11.9988C7.2396 11.9988 7.42896 11.804 7.42896 11.5575V2.44138C7.42896 2.19485 7.2396 2.00006 6.99996 2.00006Z" />\n </svg>'],["point-of-interest-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n // Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>'],["flag-20x20",'<svg viewBox="0 0 20 20" stroke="none">\n <path\n d="M16.9987 4.27111C16.936 5.06715 16.3836 5.93162 15.5238 6.57845C14.7549 7.15682 13.0885 8.04927 10.5434 7.55174C8.32167 7.1164 6.82156 8.02129 6.08085 10.2416L8.24615 17.3998C8.31833 17.6471 8.17711 17.9059 7.9292 17.9813C7.88527 17.9938 7.83976 18 7.79426 18C7.58634 18 7.40277 17.8647 7.34236 17.6673L5.1644 10.4686C5.13773 10.4173 5.12125 10.3613 5.11419 10.3038L3.41956 4.70042C3.38112 4.63512 3.35994 4.56127 3.3568 4.48587L3.02101 3.37886C2.98413 3.25992 2.9959 3.13165 3.05553 3.02203C3.11437 2.91242 3.21479 2.83079 3.33482 2.79504C3.45564 2.75928 3.5851 2.7725 3.69494 2.83235C3.80477 2.89144 3.88637 2.99172 3.92167 3.11143L3.9813 3.31355C4.38847 2.85956 4.90472 2.51439 5.48136 2.30915C6.97201 1.75566 8.95216 1.95467 10.6469 2.83156C11.6888 3.36951 14.3374 4.54493 16.3647 3.79553C16.5154 3.74111 16.684 3.76599 16.8127 3.86239C16.9406 3.95879 17.0105 4.11251 16.9987 4.27111Z"\n stroke="none"\n />\n </svg>'],["link-16x16",'<svg viewBox="0 0 16 16" stroke="none">\n <path\n d="M9.10678 11.2433C9.07993 11.2167 9.04367 11.2018 9.00589 11.2018C8.9681 11.2018 8.93184 11.2167 8.90499 11.2433L6.82999 13.3183C5.86928 14.279 4.24785 14.3808 3.18714 13.3183C2.12464 12.2558 2.22642 10.6362 3.18714 9.67546L5.26214 7.60046C5.31749 7.5451 5.31749 7.45403 5.26214 7.39868L4.55142 6.68796C4.52457 6.66138 4.48832 6.64646 4.45053 6.64646C4.41274 6.64646 4.37649 6.66138 4.34964 6.68796L2.27464 8.76296C0.763923 10.2737 0.763923 12.7183 2.27464 14.2272C3.78535 15.7362 6.22999 15.738 7.73892 14.2272L9.81392 12.1522C9.86928 12.0969 9.86928 12.0058 9.81392 11.9505L9.10678 11.2433ZM13.7246 2.77903C12.2139 1.26832 9.76928 1.26832 8.26035 2.77903L6.18357 4.85403C6.15698 4.88088 6.14207 4.91714 6.14207 4.95493C6.14207 4.99271 6.15698 5.02897 6.18357 5.05582L6.89249 5.76475C6.94785 5.8201 7.03892 5.8201 7.09428 5.76475L9.16928 3.68975C10.13 2.72903 11.7514 2.62725 12.8121 3.68975C13.8746 4.75225 13.7729 6.37189 12.8121 7.3326L10.7371 9.4076C10.7106 9.43445 10.6956 9.47071 10.6956 9.5085C10.6956 9.54628 10.7106 9.58254 10.7371 9.60939L11.4479 10.3201C11.5032 10.3755 11.5943 10.3755 11.6496 10.3201L13.7246 8.2451C15.2336 6.73439 15.2336 4.28975 13.7246 2.77903ZM9.75142 6.00939C9.72457 5.9828 9.68832 5.96789 9.65053 5.96789C9.61275 5.96789 9.57649 5.9828 9.54964 6.00939L5.50499 10.0522C5.47841 10.0791 5.46349 10.1154 5.46349 10.1531C5.46349 10.1909 5.47841 10.2272 5.50499 10.254L6.21214 10.9612C6.26749 11.0165 6.35857 11.0165 6.41392 10.9612L10.4568 6.91832C10.5121 6.86296 10.5121 6.77189 10.4568 6.71653L9.75142 6.00939Z"\n stroke="none"\n />\n </svg>']]),TY=/<svg([^>]*)>/g;function NF(e,r,t){let n=DY.get(e);return n?n.replace(TY,'<svg$1 style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):""}var wY=e=>'\n <div class="pin-shadow" style="background: '.concat(e,'"></div>\n <svg width="').concat(20*.9,'px" height="').concat(48*.9,'px" viewBox="0 0 20 48">\n <path\n d="M1.37965 29.3246C1.5778 31.2167 2.27661 33.0694 3.83078 33.775C4.0998 37.1861 4.7451 40.2227 5.65918 42.4784C6.14556 43.6787 6.72883 44.71 7.41453 45.4578C8.10027 46.2056 8.97065 46.7527 9.99989 46.7527C11.0292 46.7527 11.8995 46.2055 12.585 45.4576C13.2706 44.7098 13.8536 43.6785 14.3398 42.4783C15.2536 40.2226 15.8988 37.186 16.1688 33.7752C17.7232 33.0697 18.422 31.2169 18.6201 29.3247C18.8386 27.2385 18.5165 24.6502 17.6475 22.0285L17.6473 22.0278C16.9657 19.9761 16.0319 18.1622 14.9848 16.7474C17.0884 15.1587 18.4471 12.5964 18.4471 9.7152C18.4471 4.93539 14.6967 1 9.99966 1C5.30272 1 1.54993 4.93527 1.54993 9.7152C1.54993 12.5961 2.90839 15.1583 5.01167 16.747C3.9635 18.1625 3.03185 19.977 2.3522 22.0286C1.48319 24.6503 1.16118 27.2385 1.37965 29.3246Z"\n fill="').concat(e,'"\n stroke="white"\n strokeWidth="2"\n />\n </svg>\n '),MY=e=>'\n <div class="pin-shadow" style="background: '.concat(e,'"></div>\n <svg width="36" height="42" viewBox="-2 -2 40 46">\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="none"\n stroke="white"\n strokeWidth="4"\n />\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="').concat(e,'"\n />\n </svg>\n '),pS="#722ED1",fS="#1890FF",jF=({type:e="departure",color:r=fS})=>'<div class="dropped-pin-wrapper">\n '.concat(e==="departure"?wY(r):MY(r),"\n </div>"),AY=e=>{switch(e){case"default":return 28;case"selection":return 28;case"navigation":return 32}},UF=({type:e="stairs",color:r=pS,direction:t="up"})=>{let n=AY("default"),o=n/2+2,i=t&&t!=="none";return'<div class="mappedin-connection-marker">\n <div class="connection-circle"\n role="button"\n style="background:'.concat(r,"; width:").concat(n,"px; height:").concat(n,'px;"\n >\n ').concat(NF("connection-"+e+"-16x16","white",o)||"","\n </div>\n ").concat(i?'<div style="margin-left: -'.concat(n*.2,'px;">\n <div class="bouncey">\n <div class="connection-circle"\n role="button"\n style="width: ').concat(n,"px; height: ").concat(n,'px;">\n <div class="').concat(t==="up"?"":"arrow--down",'">\n <svg viewBox="0 0 16 16" style="fill: white; width: ').concat(o,"px; height: ").concat(o,'px">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>'):"","\n </div>")};p();var GF=63710088e-1,hv=new WeakMap,zF=async e=>new Promise(r=>setTimeout(r,e));function gv(e,r,t){let n=e.distance,o=OY(e,r,t);return o?(n-(o==null?void 0:o.distance))/n:0}function mS(e,r){if(e.coordinates.length===0)return[];if(hv.has(e)&&hv.get(e).has(r))return hv.get(e).get(r);let t=e.coordinates.map(n=>yv(n,r));return hv.set(e,new Map([[r,t]])),t}function yv(e,r){let t=r.latitude,n=r.longitude,o=e.latitude-t,i=e.longitude-n,a=Math.PI*GF/180,u=a*Math.cos(t*Math.PI/180),l=i*u,c=o*a;return{x:l,y:c}}function PY(e,r){if(e.length===0)return;let t,n=1/0;for(let o=0;o<e.length;o++){let i=e[o],a=mS(i,r);for(let u=0;u<a.length-1;u++){let l=a[u],c=a[u+1],d=bv(l,c,{x:0,y:0}),f=js({x:0,y:0},d);f<n&&(n=f,t=d)}}if(t)return _Y(t,r)}function bv(e,r,t){let n=r.x-e.x,o=r.y-e.y,i=t.x-e.x,a=t.y-e.y,u=n*n+o*o;if(u===0)return{x:e.x,y:e.y};let l=(i*n+a*o)/u,c=Math.max(0,Math.min(1,l));return{x:e.x+c*n,y:e.y+c*o}}function _Y(e,r){let n=Math.PI*GF/180,o=n*Math.cos(r.latitude*Math.PI/180),i=e.y/n,a=e.x/o,u=r.latitude+i,l=r.longitude+a;return new je({latitude:u,longitude:l,floorId:r.floorId,verticalOffset:r.verticalOffset})}function OY(e,r,t){let n=PY([e],r);if(!n)return;let o=mS(e,t),i=yv(n,t),a=-1,u=1/0;for(let c=0;c<o.length-1;c++){let d=o[c],f=o[c+1],h=bv(d,f,i),g=js(h,i);g<1&&g<u&&(u=g,a=c)}if(a===-1){let c=0,d=1/0;for(let f=0;f<o.length;f++){let h=o[f],g=js(h,i);g<d&&(d=g,c=f)}a=Math.max(0,c-1)}let l=[n];for(let c=a+1;c<e.coordinates.length;c++)l.push(e.coordinates[c]);return new Gl("".concat(e.id,"_remaining"),l)}function vv(e,r,t,n){var f;let o,i,a=1/0,u=1/0,l=yv(r,n),c=yv(t,n);for(let h of e)for(let g of h.segments){if(g.isConnectionSegment)continue;let b=(f=g.coordinates[0])==null?void 0:f.floorId,I=b===r.floorId,v=b===t.floorId;if(!I&&!v)continue;let E=mS(g,n);if(I){let T=1/0;for(let D=0;D<E.length-1;D++){let w=E[D],B=E[D+1],X=bv(w,B,l),L=js(X,l);L<T&&(T=L)}T<a&&(a=T,o=g)}if(v){let T=1/0;for(let D=0;D<E.length-1;D++){let w=E[D],B=E[D+1],X=bv(w,B,c),L=js(X,c);L<T&&(T=L)}T<u&&(u=T,i=g)}}if(!o||!i)return;let d=[];if(o.id===i.id)return d.push({segment:o,startHighlightFraction:gv(o,r,n),endHighlightFraction:gv(i,t,n)}),d;for(let h of e)for(let g of h.segments)g.id===o.id?d.push({segment:g,startHighlightFraction:gv(g,r,n),endHighlightFraction:1}):g.id===i.id?d.push({segment:g,startHighlightFraction:0,endHighlightFraction:gv(g,t,n)}):d.push({segment:g,startHighlightFraction:0,endHighlightFraction:1});return d}var VF=.01,$F=.02,HF={drawDuration:1e3,color:"#40A9FF",interactive:!1,accentColor:"blue",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},FY={drawDuration:1e3,color:"#B3DDFF",interactive:!1,accentColor:"#40A9FF",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},$l={setMapOnConnectionClick:!0,setMapToDeparture:!0,createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:HF,inactivePathOptions:FY,markerOptions:{departureColor:fS,destinationColor:pS},animatePathDrawing:!0};function ZF(e){let r=_({},e);return e.__EXPERIMENTAL__CONNECTION_COLOR!==void 0&&(r.color=e.__EXPERIMENTAL__CONNECTION_COLOR),e.__EXPERIMENTAL__CONNECTION_BILLBOARDING!==void 0&&(r.__EXPERIMENTAL_BILLBOARDING=e.__EXPERIMENTAL__CONNECTION_BILLBOARDING),e.__EXPERIMENTAL__CONNECTION_JUNCTION_INSET!==void 0&&(r.__EXPERIMENTAL_JUNCTION_INSET=e.__EXPERIMENTAL__CONNECTION_JUNCTION_INSET),e.__EXPERIMENTAL__CONNECTION_DASHED!==void 0&&(r.dashed=e.__EXPERIMENTAL__CONNECTION_DASHED),e.__EXPERIMENTAL__CONNECTION_GEOMETRY!==void 0&&(r.__EXPERIMENTAL_GEOMETRY=e.__EXPERIMENTAL__CONNECTION_GEOMETRY),r}var kY=ne(_({},$l),{connectionPathOptions:ZF(HF)}),Lu,As,_t,lt,Ru,Id,$r,qo,Ki,Hl,at,WF,XF,hS,gS,q0,qF,yS,J0,xv,um,bS,lm,Y0=class{constructor(r){M(this,at);M(this,Lu,new Map);M(this,As,new Map);M(this,_t);M(this,lt,kY);M(this,Ru);M(this,Id);M(this,$r,[]);M(this,qo);M(this,Ki,new Map);M(this,Hl,new Map);M(this,lm,r=>{var t;if((t=s(this,lt).createMarkers)!=null&&t.connection&&r.markers!=null&&r.markers.length>0){let{instruction:n}=s(this,Lu).get(r.markers[0].id);n!=null&&n.action.toFloor&&(s(this,lt).setMapOnConnectionClick&&s(this,_t).setFloor(n.action.toFloor.id,"navigation-connection-click"),s(this,_t).publish("navigation-connection-click",{instruction:n,fromFloor:n.action.fromFloor,toFloor:n.action.toFloor}))}});k(this,_t,r)}get isMultiFloor(){if(!s(this,$r).length)return!1;let r=new Set;for(let t of s(this,$r))for(let n of t.coordinates)if(n.floorId&&(r.add(n.floorId),r.size>1))return!0;return!1}getPathById(r){return s(this,_t).Paths.getById(r)}getMarkerById(r){return s(this,Lu).get(r)}get paths(){let r=new Set;return s(this,As).forEach(t=>r.add(t)),Array.from(r)}get activeDirections(){return s(this,Hl).get(s(this,qo))}get activePath(){if(s(this,qo))return s(this,As).get(s(this,qo).id)}get floorStacks(){let r=s(this,_t).getMapData();if(!s(this,$r).length||!r)return[];let t=new Set;for(let n of s(this,$r))for(let o of n.coordinates)if(o.floorId){let i=r.getById("floor",o.floorId);i&&t.add(i.floorStack)}return Array.from(t)}get floors(){let r=s(this,_t).getMapData();if(!s(this,$r).length||!r)return[];let t=new Set;for(let n of s(this,$r))for(let o of n.coordinates)if(o.floorId){let i=r.getById("floor",o.floorId);i&&t.add(i)}return Array.from(t)}setActivePathByIndex(r){let t=s(this,$r)[r];if(!s(this,$r).length){K.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,$r)[r]){K.warn("Direction #".concat(r," does not exist"));return}let n=s(this,Ki).get(t);if(!n){K.warn("The direction is not a part of muli-direcional path");return}he(this,at,xv).call(this,n)}setActivePath(r){if(!s(this,$r).length){K.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,Hl).get(r)){K.warn('Path "'.concat(r.id,'" is not a part of muli-direcional path'));return}he(this,at,xv).call(this,r)}setActivePathByDirections(r){if(!s(this,$r).length){K.warn("[setActivePathByDirections] Cannot set an active path before drawing. Call Navigation.draw() first.");return}let t=s(this,Ki).get(r);if(!t){let n=s(this,$r).find(o=>o.id===r.id);if(!n){K.warn("[setActivePathByDirections] Cannot find directions for id");return}t=s(this,Ki).get(n)}if(!t){K.warn("[setActivePathByDirections] Cannot find path for directions");return}he(this,at,xv).call(this,t)}clearHighlightedPathSection(){for(let r of this.paths)for(let t of r.segments)s(this,_t).updateState(t,{highlightCompleteFraction:0})}highlightPathSection(r,t,n){var d;let o=(d=n==null?void 0:n.animationDuration)!=null?d:1500,i=s(this,_t).getMapData().mapCenter,a=vv(this.paths,r,t,i);if(!a)return;this.clearHighlightedPathSection();let u=a.map(f=>{var h,g;return s(this,_t).updateState(f.segment,{highlightStartFraction:f.startHighlightFraction,highlightEndFraction:f.endHighlightFraction,highlightColor:(h=n==null?void 0:n.color)!=null?h:"red",highlightWidthMultiplier:(g=n==null?void 0:n.widthMultiplier)!=null?g:1}),new Ta({fraction:0}).to({fraction:1},o).onUpdate(b=>{s(this,_t).updateState(f.segment,{highlightCompleteFraction:b.fraction})})}),l=()=>{},c=new Promise(f=>{l=f});return u.length>0&&(u.forEach((f,h)=>{h<u.length-1&&f.chain(u[h+1]),s(this,_t).tweenGroup().add(u[h])}),u[0].start(),u[u.length-1].onComplete(()=>{s(this,_t).tweenGroup().remove(u[u.length-1]),l()})),{animation:c}}drawSync(r,t={}){var u,l,c;s(this,Id)&&this.clear(),k(this,Id,!0),he(this,at,yS).call(this,t);let n=Array.isArray(r)?r:[r],o=n[0],i=n[n.length-1],a=o.coordinates[0];k(this,$r,n),a.floorId&&s(this,lt).setMapToDeparture&&s(this,_t).setFloor(a.floorId),(u=s(this,lt).createMarkers)!=null&&u.departure&&he(this,at,um).call(this,"departure",o.instructions[0]);for(let d=0;d<n.length;d++){let f=n[d],h=d?_({},s(this,lt).inactivePathOptions):_({},s(this,lt).pathOptions);if(f.coordinates.length<2){K.warn("Directions must have at least 2 coordinates");return}let g=ne(_({},s(this,lt).connectionPathOptions),{animateDrawing:s(this,lt).animatePathDrawing,verticalOffset:he(this,at,q0).call(this,d===0?"active":"inactive")}),b=he(this,at,hS).call(this,f.coordinates,ne(_({},h),{animateDrawing:s(this,lt).animatePathDrawing,verticalOffset:he(this,at,q0).call(this,d===0?"active":"inactive")}),g);s(this,Ki).set(f,b),s(this,Hl).set(b,f),(l=s(this,lt).createMarkers)!=null&&l.connection&&he(this,at,bS).call(this,f.instructions,"connection"),d===0&&(k(this,qo,s(this,Ki).get(s(this,$r)[0])),s(this,_t).externalPubSub.on("click",s(this,lm)))}(c=s(this,lt).createMarkers)!=null&&c.destination&&he(this,at,um).call(this,"destination",i.instructions[i.instructions.length-1]),s(this,_t).mapObjects.forEach(d=>{d.processFloorChange(d.currentFloorId)}),he(this,at,J0).call(this)}async draw(r,t={}){s(this,Ru)&&this.clear(),he(this,at,yS).call(this,t);let n=Array.isArray(r)?r:[r],i=n[0].coordinates[0];return k(this,$r,n),i.floorId&&s(this,lt).setMapToDeparture&&s(this,_t).setFloor(i.floorId),he(this,at,qF).call(this,n)}clear(){s(this,Lu).forEach(r=>{r!=null&&r.marker&&s(this,_t).currentMap.Markers.remove(r.marker.id.toString())}),s(this,Lu).clear(),s(this,As).forEach(r=>{s(this,_t).currentMap.Paths.remove(r.segments.map(t=>t.id.toString()))}),s(this,As).clear(),s(this,Ru)&&(s(this,Ru).cancel(),k(this,Ru,void 0)),s(this,Id)&&k(this,Id,!1),k(this,$r,[]),s(this,Ki).clear(),s(this,Hl).clear(),k(this,qo,void 0),s(this,_t).externalPubSub.off("click",s(this,lm)),s(this,_t).mapObjects.forEach(r=>{r.processFloorChange(r.currentFloorId)}),he(this,at,J0).call(this)}};Lu=new WeakMap,As=new WeakMap,_t=new WeakMap,lt=new WeakMap,Ru=new WeakMap,Id=new WeakMap,$r=new WeakMap,qo=new WeakMap,Ki=new WeakMap,Hl=new WeakMap,at=new WeakSet,WF=function(r){return r!=null&&["TakeConnection","ExitConnection","TakeVortex","ExitVortex"].includes(r.type)},XF=function(){if(!s(this,qo))return;let r=s(this,As).get(s(this,qo).id);if(r){for(let t of s(this,As).values())if(t.id.includes("internal-"))if(t.id===s(this,qo).id)for(let n of r.segments)s(this,_t).updateState(n,{verticalOffset:$F});else s(this,_t).updateState(t,{verticalOffset:VF})}},hS=function(r,t,n){var u,l;let o=(l=(u=t.id)==null?void 0:u.toString())!=null?l:Jt(),i=s(this,_t).currentMap.Paths.add(r,t,n),a=new Fa(o,i.animation,r,i.paths);return s(this,As).set(o,a),a},gS=function(r,t,n=!1){let o=s(this,_t).currentMap.Markers.add(r.coordinate,t,{interactive:n,placement:"top",rank:"always-visible"}),i=s(this,_t).currentMap.Markers.getContentEl(o.id.toString());if(!i)throw new Error("marker component should exist");return new Ms(o.id.toString(),i,r.coordinate)},q0=function(r){var t,n,o,i;return r==="active"?$F+((n=(t=s(this,lt).pathOptions)==null?void 0:t.verticalOffset)!=null?n:0):VF+((i=(o=s(this,lt).inactivePathOptions)==null?void 0:o.verticalOffset)!=null?i:0)},qF=function(r){let t=r[0],n=r[r.length-1],o=!1;return k(this,Ru,{promise:new Promise(async i=>{var a,u,l;if(y.env.NODE_ENV!=="test"&&await zF(500),o||!r.length){i();return}(a=s(this,lt).createMarkers)!=null&&a.departure&&he(this,at,um).call(this,"departure",t.instructions[0]);for(let c=0;c<r.length;c++){let d=r[c],f=c===0?_({},s(this,lt).pathOptions):_({},s(this,lt).inactivePathOptions);if(d.coordinates.length<2){K.warn("Directions must have at least 2 coordinates"),i();return}let h=ne(_({},s(this,lt).connectionPathOptions),{animateDrawing:s(this,lt).animatePathDrawing,verticalOffset:he(this,at,q0).call(this,c===0?"active":"inactive")}),g=he(this,at,hS).call(this,d.coordinates,ne(_({},f),{animateDrawing:s(this,lt).animatePathDrawing,verticalOffset:he(this,at,q0).call(this,c===0?"active":"inactive")}),h);if(s(this,Ki).set(d,g),s(this,Hl).set(g,d),c===0&&(k(this,qo,s(this,Ki).get(s(this,$r)[0])),s(this,_t).externalPubSub.on("click",s(this,lm))),y.env.NODE_ENV!=="test"&&await g.animation,o){i();return}(u=s(this,lt).createMarkers)!=null&&u.connection&&he(this,at,bS).call(this,d.instructions,"connection")}if((l=s(this,lt).createMarkers)!=null&&l.destination&&he(this,at,um).call(this,"destination",n.instructions[n.instructions.length-1]),o){i();return}s(this,_t).mapObjects.forEach(c=>{c.processFloorChange(c.currentFloorId)}),he(this,at,J0).call(this),i()}),cancel:()=>{o=!0}}),s(this,Ru).promise},yS=function(r){var n,o,i;let t=_(_({},$l.pathOptions),r.pathOptions);k(this,lt,{setMapOnConnectionClick:(n=r.setMapOnConnectionClick)!=null?n:$l.setMapOnConnectionClick,setMapToDeparture:(o=r.setMapToDeparture)!=null?o:$l.setMapToDeparture,pathOptions:t,inactivePathOptions:_(_({},$l.inactivePathOptions),r.inactivePathOptions),connectionPathOptions:ZF(t),createMarkers:_(_({},$l.createMarkers),r.createMarkers),markerOptions:_(_({},$l.markerOptions),r.markerOptions),animatePathDrawing:(i=r.animatePathDrawing)!=null?i:$l.animatePathDrawing})},J0=function(){s(this,_t).publish("navigation-state-change",{isMultiFloor:this.isMultiFloor,floorStacks:this.floorStacks,floors:this.floors,activeDirections:this.activeDirections,activePath:this.activePath,paths:this.paths})},xv=function(r){k(this,qo,r),s(this,$r).forEach(t=>{let n=s(this,Ki).get(t);if(n){let o=n.id===s(this,qo).id?_({},s(this,lt).pathOptions):_({},s(this,lt).inactivePathOptions);s(this,_t).updateState(n,o)}}),s(this,_t).publish("navigation-active-path-change",{directions:this.activeDirections,path:this.activePath}),he(this,at,XF).call(this),he(this,at,J0).call(this)},um=function(r,t){var n,o,i,a,u;if(r==="connection"&&t){let l=t.action.type==="ExitConnection"?s(this,lt).markerOptions.departureColor:s(this,lt).markerOptions.destinationColor,c;typeof((n=s(this,lt).createMarkers)==null?void 0:n.connection)=="function"?(c=s(this,lt).createMarkers.connection(t),s(this,_t).updateState(c,{interactive:!0})):c=he(this,at,gS).call(this,t,UF({type:(i=(o=t.action.connection)==null?void 0:o.type)!=null?i:t.action.connectionType,color:l,direction:t.action.direction}),!0),s(this,Lu).set(c.id,{instruction:t,marker:c})}else{let l=r==="departure"?s(this,lt).markerOptions.departureColor:s(this,lt).markerOptions.destinationColor,c;typeof((a=s(this,lt).createMarkers)==null?void 0:a.departure)=="function"&&r==="departure"?c=s(this,lt).createMarkers.departure(t):typeof((u=s(this,lt).createMarkers)==null?void 0:u.destination)=="function"&&r==="destination"?c=s(this,lt).createMarkers.destination(t):c=he(this,at,gS).call(this,t,jF({type:r,color:l})),s(this,Lu).set(c.id,{instruction:t,marker:c})}},bS=function(r,t){r.filter(o=>he(this,at,WF).call(this,o.action)).forEach(o=>{he(this,at,um).call(this,t,o)})},lm=new WeakMap;p();var Ze,Q0,Nu,Ev,vS,K0=class{constructor(r){M(this,Nu);M(this,Ze);M(this,Q0);m(this,"interactions",{set:r=>{(r==null?void 0:r.pan)!=null&&(s(this,Ze).getSystems().cameraSystem.enablePan=r.pan),(r==null?void 0:r.zoom)!=null&&(s(this,Ze).getSystems().cameraSystem.enableZoom=r.zoom),(r==null?void 0:r.bearingAndPitch)!=null&&(s(this,Ze).getSystems().cameraSystem.enableRotate=r.bearingAndPitch)},enable:()=>{s(this,Ze).getSystems().cameraSystem.enablePan=!0,s(this,Ze).getSystems().cameraSystem.enableZoom=!0,s(this,Ze).getSystems().cameraSystem.enableRotate=!0},disable:()=>{s(this,Ze).getSystems().cameraSystem.enablePan=!1,s(this,Ze).getSystems().cameraSystem.enableZoom=!1,s(this,Ze).getSystems().cameraSystem.enableRotate=!1}});m(this,"setMinPitch",r=>{s(this,Ze).camera.setMinPitch(r)});m(this,"setMaxPitch",r=>{s(this,Ze).camera.setMaxPitch(r)});m(this,"setMinZoomLevel",r=>{s(this,Ze).camera.setMinZoomLevel(r,!0)});m(this,"setMaxZoomLevel",r=>{s(this,Ze).camera.setMaxZoomLevel(r)});k(this,Q0,r),k(this,Ze,r.core)}setScreenOffsets(r){s(this,Ze).camera.setInsetPadding(r)}get screenOffsets(){return s(this,Ze).camera.insetsPadding}get panMode(){return s(this,Ze).camera.panMode}setPanMode(r){if(r!=="default"&&r!=="elevation")throw new Error("Invalid pan mode");r!==this.panMode&&s(this,Ze).camera.setPanMode(r)}getFocusOnTransform(r,t){var o,i,a;let n=s(this,Ze).camera.getCameraFrameForCoordinates(he(this,Nu,vS).call(this,r),{pitch:t==null?void 0:t.pitch,bearing:t==null?void 0:t.bearing,padding:(t==null?void 0:t.screenOffsets)||this.screenOffsets,maxZoomLevel:t==null?void 0:t.maxZoomLevel,verticalPadding:(o=t==null?void 0:t.axisAlignedPadding)==null?void 0:o.vertical,minZoomLevel:t==null?void 0:t.minZoomLevel,duration:t==null?void 0:t.duration,easing:t==null?void 0:t.easing});return{center:new je(n.center[1],n.center[0]),zoomLevel:n.zoomLevel,bearing:(i=t==null?void 0:t.bearing)!=null?i:this.bearing,pitch:(a=t==null?void 0:t.pitch)!=null?a:this.pitch}}focusOn(r,t){var n;return s(this,Ze).camera.focusOn(he(this,Nu,vS).call(this,r),{pitch:t==null?void 0:t.pitch,bearing:t==null?void 0:t.bearing,padding:(t==null?void 0:t.screenOffsets)||this.screenOffsets,maxZoomLevel:t==null?void 0:t.maxZoomLevel,minZoomLevel:t==null?void 0:t.minZoomLevel,duration:t==null?void 0:t.duration,verticalPadding:(n=t==null?void 0:t.axisAlignedPadding)==null?void 0:n.vertical,easing:t==null?void 0:t.easing})}animateTo(r,t){var l;let{center:n,zoomLevel:o,bearing:i,pitch:a}=r,u=n!=null?n:this.center;return s(this,Ze).camera.animateTo({center:n!=null?[u.longitude,u.latitude,s(this,Ze).camera.elevation]:void 0,zoomLevel:o,bearing:i,pitch:a,duration:(l=t==null?void 0:t.duration)!=null?l:600,easing:t==null?void 0:t.easing})}set(r){let{center:t=this.center,zoomLevel:n=this.zoomLevel,bearing:o=this.bearing,pitch:i=this.pitch}=r,a=[t.longitude,t.latitude];s(this,Ze).camera.setCenter(a),s(this,Ze).camera.setZoomLevel(n),s(this,Ze).camera.setBearing(o),s(this,Ze).camera.setPitch(i)}get center(){let r=s(this,Ze).camera.center;return new je(r[1],r[0],void 0)}setAutoMinZoomLevel(r){s(this,Ze).camera.setAutoMinZoomLevel(r)}get autoMinZoomLevel(){return s(this,Ze).camera.autoMinZoomLevel}get zoomLevel(){return s(this,Ze).camera.zoomLevel}get pitch(){return s(this,Ze).camera.pitch}get minPitch(){return s(this,Ze).camera.minPitch}get maxPitch(){return s(this,Ze).camera.maxPitch}get bearing(){let r=s(this,Ze).camera.bearing;return(r<0?r+360:r)%360}get minZoomLevel(){return s(this,Ze).camera.minZoomLevel}get maxZoomLevel(){return s(this,Ze).camera.maxZoomLevel}setElevation(r){s(this,Ze).camera.setElevation(r)}get elevation(){return s(this,Ze).camera.elevation}animateElevation(r,t){return s(this,Ze).camera.animateElevation(r,t)}get bounds(){return Ib(s(this,Ze).getSystems().cameraSystem.panBounds,s(this,Ze).convert3DMapPositionToCoordinate)}get isAnimating(){return s(this,Ze).camera.isAnimating}cancelAnimation(){s(this,Ze).camera.cancelAnimation()}updateFacadesInView(){s(this,Ze).getSystems().geometryInFocusSystem.compute()}};Ze=new WeakMap,Q0=new WeakMap,Nu=new WeakSet,Ev=function(r){var n,o,i,a,u,l;let t=s(this,Ze).camera.elevation;return je.is(r)&&r.floorId!=null?(o=(n=s(this,Ze).getState(r.floorId))==null?void 0:n.altitude)!=null?o:t:Zo.is(r)?(a=(i=s(this,Ze).getState(r.id))==null?void 0:i.altitude)!=null?a:t:"floor"in r&&Zo.is(r.floor)&&(l=(u=s(this,Ze).getState(r.floor.id))==null?void 0:u.altitude)!=null?l:t},vS=function(r){var i;let t=[],o=(Array.isArray(r)?r:[r]).flatMap(a=>{var u;return(u=a==null?void 0:a.focusTarget)!=null?u:[a]});for(let a of o)if(a!=null)if(je.is(a)){let u=he(this,Nu,Ev).call(this,a);t.push([a.longitude,a.latitude,u])}else if((a==null?void 0:a.id)!=null){let u=he(this,Nu,Ev).call(this,a);if(Zo.is(a)&&((i=s(this,Q0).getMapDataInternal())!=null&&i.enterpriseMode)){t.push(a.id);continue}else if("geoJSON"in a&&a.geoJSON.geometry.coordinates.length>0){nC(a.geoJSON,c=>{t.push([c[0],c[1],u])});continue}let l=s(this,Ze).getBoundingArea(a.id);if(l)t.push(...l.map(c=>[c[0],c[1],u]));else if("geoJSONBoundingBox"in a){let c=he(this,Nu,Ev).call(this,a);if(a.geoJSONBoundingBox!=null){let d=[[a.geoJSONBoundingBox[0],a.geoJSONBoundingBox[1],c],[a.geoJSONBoundingBox[2],a.geoJSONBoundingBox[3],c]];t.push(...d)}}}else _P(a)&&t.push(a);return t};p();var cm,eg=class{constructor({currentMapGetter:r}){M(this,cm);k(this,cm,r)}get currentMap(){return s(this,cm).call(this)}async getCurrentSceneGLTF(r){let t=s(this,cm).call(this);return t?t==null?void 0:t.Exporter.getCurrentSceneGLTF(r):(K.error("There is no map to export. Please load a map first."),new Blob)}};cm=new WeakMap;p();var ka,rg,tg=class{constructor({currentMapGetter:r}){M(this,ka,new Map);M(this,rg);k(this,rg,r)}get currentMap(){return s(this,rg).call(this)}getAll(){return Array.from(s(this,ka).values()).map(r=>r.label)}getById(r){return s(this,ka).get(r)}add(r,t,n){let o=r.anchorTarget,i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Labels.add(o,t,ne(_({},n),{attachTo:Df(r),rank:(n==null?void 0:n.rank)==null||(n==null?void 0:n.rank)==="initial"?"medium":n.rank})),u=new ku(a.id.toString(),t,r);return s(this,ka).set(u.id,{label:u,entityId:u.id}),u}__EXPERIMENTAL__all(r){var n;let t=[];return(n=this.currentMap)==null||n.Labels.all({onCreate:(o,i,a)=>{let u=new ku(o.toString(),i,a);s(this,ka).set(u.id,{label:u,entityId:u.id}),t.push(u)},labelOptions:r}),t}remove(r){var n;let t=s(this,ka).get(r.id);t&&((n=this.currentMap)==null||n.Labels.remove(t),s(this,ka).delete(r.id.toString()))}removeAll(){let r=[];return s(this,ka).forEach(({label:t})=>{this.remove(t),r.push(t),s(this,ka).delete(t.id.toString())}),r}};ka=new WeakMap,rg=new WeakMap;p();p();var BY={color:"#ffffff",opacity:1},Iv={altitude:0,height:1,color:"#ffffff",opacity:1,width:.15},JF={opacity:.25,color:"#a7d1ec",height:.8,width:.05,altitude:.1,cap:"square",visible:!1},YF={color:"red",opacity:.2,height:Iv.height+.1,visible:!0,borderVisible:!1},KF=.5,Ba=class{constructor(r,t,n=new Map){m(this,"containerId");m(this,"layers");m(this,"renderer");this.containerId=t,this.layers=n,this.renderer=r}get visible(){return this.renderer.getState(this.containerId).visible}setVisible(r){this.renderer.setState(this.containerId,{visible:r})}},QF=0,Sd,ng=class{constructor(r,t,n,o,i,a,u,l){m(this,"id");m(this,"name");m(this,"elevation");m(this,"maxHeight");m(this,"containerId");m(this,"externalId");m(this,"metadata");m(this,"shortName");m(this,"subtitle");m(this,"occluderId");m(this,"loaded",!1);m(this,"styleMap",{});m(this,"obstructions");m(this,"entrances");m(this,"spaces");m(this,"floorImages");m(this,"floorText");m(this,"areas");m(this,"renderer");m(this,"mapObject");m(this,"options");m(this,"layers",new Map);m(this,"footprint");m(this,"floorStackId");m(this,"multiFloorView");m(this,"mapDataInternal");m(this,"facadesByStyleId",new Map);M(this,Sd);m(this,"load",(r=!1)=>{var u,l,c,d,f,h,g,b,I,v,E,T,D,w,B,X,L,P,R,$,V,H,re;if(this.loaded)return this;((u=this.footprint)==null?void 0:u.geometry)==null&&((l=this.obstructions)==null?void 0:l.features.length)===0&&((c=this.spaces)==null?void 0:c.features.length)===0&&K.warn("Floor ".concat(this.id," exists in the data but contains no geometry.")),this.loaded=!0;let t=this.renderer.addGroupContainer("".concat(bs,"-").concat(this.id),{},this.id);this.layers.set(bs,new Ba(this.renderer,t.id.toString()));let n=this.renderer.addGroupContainer("".concat(ba,"-").concat(this.id),{},this.id);this.layers.set(ba,new Ba(this.renderer,n.id.toString()));let o=this.renderer.addGroupContainer("".concat(Ir,"-").concat(this.id),{focusable:r},this.id);this.layers.set(Ir,new Ba(this.renderer,o.id.toString()));let i=this.renderer.addGroupContainer("".concat(vs,"-").concat(this.id),{},this.id);this.layers.set(vs,new Ba(this.renderer,i.id.toString()));let a=this.mapObject.getFloorStackAltitudeData(this.floorStackId);if(((d=this.footprint)==null?void 0:d.geometry)!=null&&((f=this.footprint)==null?void 0:f.geometry.coordinates.length)!==0){let j=Iv;if(this.obstructions!=null&&this.obstructions.features.length>0){let z=this.obstructions.features.filter(ue=>{var se;return ue.geometry.type==="LineString"&&((se=ue.properties.kind)==null?void 0:se.toLowerCase())==="wall"&&ue.properties.footprintComponent===!0});z!=null&&z.length>0&&(j=this.styleMap[(h=z[0].properties)==null?void 0:h.id])}let me=this.renderer.addGeometryGroup("Footprint-".concat(this.id),{features:[{geometry:this.footprint.geometry,properties:{id:"Footprint-Floor-".concat(this.id)}}]},ne(_({},j),{height:(I=(g=a.get(this.elevation))==null?void 0:g.effectiveHeight)!=null?I:xu((b=this.multiFloorView)==null?void 0:b.floorGap,this.maxHeight),altitude:0,outline:(E=(v=this.options.style)==null?void 0:v.outlines)!=null?E:!0,visible:!1,opacity:this.elevation<0?1:.4,side:this.elevation<0?"back":"front",color:this.elevation<0?"#F0EEE8":j.color,renderOrder:2}),this.id);this.layers.set(af,new Ba(this.renderer,me.id.toString()))}if(this.spaces!=null&&this.spaces.features.length>0){let j=[],me=new Map;this.spaces.features.filter(se=>{var pe;return se.geometry.type==="Polygon"&&((pe=se.properties.kind)==null?void 0:pe.toLowerCase())!=="void"}).forEach(se=>{var le;let pe=(le=this.mapDataInternal)==null?void 0:le.facadesBySpaceId[se.properties.id];if(pe){let ye=me.get(pe.id)||[];me.set(pe.id,[...ye,se])}else j.push(se)});let z=this.renderer.addGroupContainer("spaces-".concat(this.id),{},o),ue=this.renderer.addGeometryGroup("Spaces-".concat(this.id,"-0"),{features:j},se=>{var pe;return((pe=se==null?void 0:se.properties)==null?void 0:pe.id)!=null&&this.styleMap[se.properties.id]!=null?Cf(this.styleMap[se.properties.id],this.options):BY},z);if(this.layers.get(Ir).layers.set("Spaces",ue.id.toString()),me.size>0){let se=this.renderer.addGroupContainer("".concat(Nc,"-").concat(this.id),{},this.id);this.layers.set(Nc,new Ba(this.renderer,se.id.toString()));for(let[pe,le]of me){let ye=this.renderer.addGroupContainer(pe,{focusable:!0},se),Fe=this.renderer.addGroupContainer("".concat(pe,"-geometry"),{},ye),Ee=iI(le,this.styleMap),Oe=0;for(let[we,Le]of Ee){let Qe=this.renderer.addGeometryGroup("Facades-".concat(this.id,"-").concat(pe,"-").concat(Oe),{features:Le},ne(_({},Cf(we,this.options)),{renderOrder:3}),Fe);Oe++;let Ge=we.id||Qe.id.toString();this.layers.get(Nc).layers.set("".concat(pe,"-").concat(Ge),Qe.id.toString()),this.facadesByStyleId.has(Ge)?(T=this.facadesByStyleId.get(Ge))==null||T.push(pe):this.facadesByStyleId.set(Ge,[pe])}}}}if(this.obstructions!=null&&this.obstructions.features.length>0){let j=this.obstructions.features.filter(Ee=>Ee.geometry.type==="Polygon"&&(Ee.properties.kind==="object"||Ee.properties.kind==="unknown")),me=iI(j,this.styleMap),z=this.renderer.addGroupContainer("objects-".concat(this.id),{},o),ue=0;for(let[Ee,Oe]of me){let we=this.renderer.addGeometryGroup("Objects-".concat(this.id,"-").concat(ue),{features:Oe},Cf(Ee,this.options),z);ue++;let Le=z.id.toString();this.layers.get(Ir).layers.set(Ee.id||Le,we.id.toString())}let se=this.obstructions.features.filter(Ee=>{var Oe;return Ee.geometry.type==="LineString"&&((Oe=Ee.properties.kind)==null?void 0:Oe.toLowerCase())==="wall"&&Ee.properties.footprintComponent===!1}),pe=this.obstructions.features.filter(Ee=>{var Oe;return Ee.geometry.type==="LineString"&&((Oe=Ee.properties.kind)==null?void 0:Oe.toLowerCase())==="wall"&&Ee.properties.footprintComponent===!0}),le=this.entrances,ye=Iv,Fe=Iv;if(se!=null&&se.length>0){let Ee=this.styleMap[(D=se[0].properties)==null?void 0:D.id];Ee!=null&&(ye=_({},Ee)),Fe=ye;let{walls:Oe,entrances:we}=oI(se,(le==null?void 0:le.features)||[]),Le=Math.max(ye.height-.11,KF),Qe=ne(_({},JF),{height:Le}),Ge=this.renderer.addGeometryGroup("InteriorDoors-".concat(this.id),we,Qe,o);this.layers.get(Ir).layers.set(nf,Ge.id.toString());let N=this.renderer.addGeometryGroup("Walls-".concat(this.id),{features:[Oe]},Cf(ye,this.options),o);this.layers.get(Ir).layers.set(Sl,N.id.toString())}if(pe!=null&&pe.length>0){let Ee=this.styleMap[(w=pe[0].properties)==null?void 0:w.id];Ee!=null&&(Fe=ne(_({},Ee),{id:ys}));let{walls:Oe,entrances:we}=oI(pe,(le==null?void 0:le.features)||[]),Le=Math.max(Fe.height-.11,KF),Qe=ne(_({},JF),{height:Le}),Ge=this.renderer.addGeometryGroup("ExteriorDoors-".concat(this.id),we,Qe,o);this.layers.get(Ir).layers.set(of,Ge.id.toString());let N=this.renderer.addGeometryGroup("ExteriorWalls-".concat(this.id),{features:[Oe]},Cf(Fe,this.options),o);this.layers.get(Ir).layers.set(ys,N.id.toString())}}if(this.floorImages!=null){let j=this.renderer.addGroupContainer("images-".concat(this.id),{},this.id);for(let me of this.floorImages.features||[])if(!("anchorId"in me.properties||"anchorId"in me.properties&&((B=me.properties)==null?void 0:B.anchorId)==null)){let z=KP(me,QF);this.mapObject.api.Image3D.add(new je({latitude:me.geometry.coordinates[1],longitude:me.geometry.coordinates[0],floorId:this.id}),me.properties.path,_({id:z,flipImageToFaceCamera:(X=this.options.flipImagesToFaceCamera)!=null?X:!0},me.properties)),QF++}this.layers.set(sf,new Ba(this.renderer,j.id.toString()))}if(this.floorText!=null)for(let j of this.floorText.features||[]){let me=0;"geometryId"in j.properties?me=(P=(L=this.renderer.getState(j.properties.geometryId))==null?void 0:L.height)!=null?P:0:me=(R=j.properties.verticalOffset)!=null?R:0,this.renderer.addText3D(Jt(),ne(_({},j),{properties:ne(_({},j.properties),{verticalOffset:me})}),{appearance:{flipToFaceCamera:!1}},this.id)}if(this.areas!=null){let j=this.renderer.addGroupContainer("areas-".concat(this.id),{},this.id);this.layers.set(Rc,new Ba(this.renderer,j.id.toString()));let me=this.renderer.addGeometryGroup("Areas-".concat(this.id),{features:this.areas.features},{color:YF.color},j);for(let z of this.areas.features||[])this.renderer.setState(z.properties.id,ne(_({},YF),{visible:!1}));this.layers.get(Rc).layers.set(me.id.toString(),me.id.toString())}return($=this.multiFloorView)!=null&&$.enabled&&this.renderer.setState(this.id,{altitude:(re=(V=a.get(this.elevation))==null?void 0:V.altitude)!=null?re:this.elevation*xu((H=this.multiFloorView)==null?void 0:H.floorGap,this.maxHeight)}),this.renderer.render(),this});var d,f,h,g,b,I;this.mapObject=n,this.renderer=n.renderer,this.id=t.id,this.options=i;let c=this.renderer.addGroupContainer(this.id,{visible:!1,interactive:!0,preloadGeometry:(d=i.preloadFloors)==null?void 0:d.map(v=>v.id).includes(t.id)},r);if(this.containerId=c.id.toString(),this.externalId=t.externalId,this.metadata=t.metadata,this.shortName=t.shortName,this.subtitle=t.subtitle,this.name=t.name,this.maxHeight=t.maxHeight,this.elevation=t.elevation,a!=null&&u!=null){this.styleMap=u,this.spaces=a.space[this.id],this.entrances=a.entrance[this.id],this.areas=(f=a.area)==null?void 0:f[this.id],this.obstructions=a.obstruction[this.id],this.floorImages=(h=a.floorImages)==null?void 0:h[this.id],this.floorText=(b=(g=a.enterprise)==null?void 0:g.floorText)==null?void 0:b[this.id];let v=(I=a["floor.geojson"])==null?void 0:I.features.find(E=>E.properties.id===t.id);v&&v.geometry!=null&&v.geometry.coordinates.length>0&&(this.footprint=e_(v))}this.floorStackId=r,this.multiFloorView=o,this.mapDataInternal=l}get geoJSONBoundingBox(){if(s(this,Sd))return s(this,Sd);if(!this.footprint){K.warn("Attempting to get bounding box with no footprint for floor ".concat(this.id));return}return k(this,Sd,JP(this.footprint)),s(this,Sd)}addOccluder(){var n;if(((n=this.footprint)==null?void 0:n.geometry)==null)return;let r=this.renderer.addGroupContainer("".concat(Lc,"-").concat(this.id),{},this.id),t=new Ba(this.renderer,r.id.toString());this.layers.set(Lc,t),this.occluderId=this.renderer.addOccluder(this.footprint,t.containerId)}get hasFacadeGeometry(){return this.facadesByStyleId.size>0}get visible(){return this.renderer.getState(this.containerId).visible}setVisible(r){this.renderer.setState(this.containerId,{visible:r})}setBatchedTextVisible(r){let t=this.renderer.getInternalState().geometry3DMap.get(this.id);if(t&&t instanceof un){let n=this.renderer.getSystems().text3DSystem.batchedTextMap.get(t);n&&n.then(o=>{o.visible=r})}}};Sd=new WeakMap;p();var dm,og=class{constructor(r,t,n,o){m(this,"id");m(this,"externalId");m(this,"name");m(this,"type");m(this,"floorIds");m(this,"defaultFloorId");m(this,"floorObjects",[]);m(this,"floorObjectsByElevation",new Map);m(this,"metadata");m(this,"containerId");m(this,"facade");M(this,dm);var a;this.id=r.id,this.externalId=r.externalId,this.name=r.name,this.type=r.type,this.metadata=r.metadata,this.floorIds=(a=r.floors)!=null?a:r.maps,this.defaultFloorId=r.defaultFloor;let i=n.addGroupContainer(this.id,{visible:!0,interactive:!0},t);this.containerId=i.id.toString(),this.facade=o}get defaultFloor(){if(s(this,dm)==null){if(this.floorObjects.length===0)throw new En("No floors in floor stack (".concat(this.id,"). Could not get default floor."));let r;this.defaultFloorId&&(r=this.floorObjects.find(t=>t.id===this.defaultFloorId)),r||(r=this.floorObjects.reduce((t,n)=>Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)),k(this,dm,r)}return s(this,dm)}get isOutdoors(){var t;return((t=this.type)==null?void 0:t.toLowerCase())==="outdoor"?!0:this.facade!=null?!1:this.floorObjects.some(n=>n.hasFacadeGeometry)}addFloor(r){if(this.floorObjectsByElevation.has(r.elevation)){K.error("Floor with same elevation ".concat(r.elevation," already exists in Stack (").concat(this.id,"). Floor (").concat(r.id,") will not be added."));return}this.floorObjects.push(r),this.floorObjectsByElevation.set(r.elevation,r)}loadAllFloors(){for(let r of this.floorObjects)r.load(this.facade!=null),!this.isOutdoors&&!r.hasFacadeGeometry&&r.footprint!=null&&r.addOccluder()}};dm=new WeakMap;p();function xS(e,r,t="auto",n,o=new Map){var c,d;let i={outdoorOpacity:"initial",floorStates:[]},a=e.sort((f,h)=>f.elevation-h.elevation),u=e.some(f=>f.elevation===0),l=!0;for(let f of a){let h=(d=(c=o.get(f.elevation))==null?void 0:c.effectiveHeight)!=null?d:xu(t,f.maxHeight),g={floor:f,state:{type:"floor",visible:!1,geometry:{visible:!1},labels:{enabled:!1},markers:{enabled:!1},footprint:{visible:!1},occlusion:{enabled:!1},areas:{visible:!1},text3d:{visible:!1}}};i.floorStates.push(g),f.id===r.id?(g.state.visible=!0,g.state.geometry.visible=!0,g.state.labels.enabled=!0,g.state.markers.enabled=!0,g.state.occlusion.enabled=!0,g.state.areas.visible=!0,g.state.text3d.visible=!0,f.elevation<0&&(g.state.footprint.height=h,g.state.footprint.visible=!0,i.outdoorOpacity=.2)):n.includes(f.id)&&f.elevation<r.elevation?(g.state.visible=!0,g.state.geometry.visible=!0,g.state.markers.enabled=!0,g.state.occlusion.enabled=!0,g.state.footprint.visible=!0,g.state.footprint.height=h,f.elevation<0&&(i.outdoorOpacity=.2)):r.elevation>0&&f.elevation<r.elevation&&f.elevation>=0&&(g.state.visible=!0,g.state.footprint.visible=!0,g.state.footprint.height=h),!u&&f.elevation>0&&l&&r.elevation===f.elevation&&(l=!1,g.state.footprint.visible=!1)}return i}p();import ut from"zod";p();import{z as ek}from"zod";function tk(e){try{let r=e.shape;if("type"in r){let t=r.type;if(t instanceof ek.ZodOptional&&(t=t._def.innerType),"value"in t)return String(t.value);if(t instanceof ek.ZodDefault&&"value"in t._def.innerType)return String(t._def.innerType.value)}return"unknown"}catch(r){return"unknown"}}function rk(e){if(e.success)return{};let r={};for(let t of e.error.issues)if(t.path.length>0){let n=String(t.path[0]);r[n]||(r[n]=[]),r[n].push(t.message)}return r}function nk(e,r){let t=Object.entries(e);if(t.length>0){let n=t.map(([o,i])=>"".concat(o,": ").concat(i.join(", "))).join("; ");K.warn("".concat(t.length," invalid field(s) in ").concat(r!=null?r:"unknown"," state: [").concat(n,"]"))}}function Xt(e,r,t){if(t!=null&&t.disableValidation)return r;if(r==null||typeof r!="object")return{};let n=e.safeParse(r);if(n.success){let a={};for(let u of Object.keys(r))u in n.data&&(a[u]=r[u]);return a}let o=rk(n);t!=null&&t.warn&&nk(o,tk(e));let i={};for(let a of Object.keys(r))!(a in o)&&a in e.shape&&(i[a]=r[a]);return i}function Pn(e,r,t){if(t!=null&&t.disableValidation)return r;let n=e.safeParse(r);if(n.success)return n.data;if((t==null?void 0:t.warn)===!0){let o=rk(n);nk(o,tk(e))}return r}var ok="path",Ps={color:"#4b90e2",width:1,completeFraction:0,visible:!0,verticalOffset:.1,xrayOpacity:.25,__EXPERIMENTAL_SMOOTHING_TENSION:Ii.tension,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:Ii.cornerRadius,dashed:!1,__EXPERIMENTAL_ENDCAP_ENABLED:!0,__EXPERIMENTAL_BILLBOARDING:!1},ES=ut.object({type:ut.literal(ok).default(ok),color:ut.string().default(Ps.color),width:ut.union([ut.number(),ut.any()]),completeFraction:ut.number().default(Ps.completeFraction),visible:ut.boolean().default(Ps.visible),verticalOffset:ut.number().default(Ps.verticalOffset),highlightStartFraction:ut.number().default(0),highlightEndFraction:ut.number().default(0),highlightColor:ut.string().default("red"),highlightWidthMultiplier:ut.number().default(1.1),highlightCompleteFraction:ut.number().default(1),xrayOpacity:ut.number().min(0).max(1).default(Ps.xrayOpacity),__EXPERIMENTAL_SMOOTHING_TENSION:ut.number().default(Ps.__EXPERIMENTAL_SMOOTHING_TENSION),__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:ut.number().default(Ps.__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS),dashed:ut.boolean().default(Ps.dashed),__EXPERIMENTAL_DASH_OPTIONS:ut.discriminatedUnion("__EXPERIMENTAL_DASH_MODE",[ut.object({__EXPERIMENTAL_DASH_MODE:ut.literal("length-scaling"),__EXPERIMENTAL_DASH_LENGTH:ut.number().min(0).max(1).default(.1),__EXPERIMENTAL_DASH_GAP:ut.number().min(0).max(1).default(.1)}),ut.object({__EXPERIMENTAL_DASH_MODE:ut.literal("width-scaling"),__EXPERIMENTAL_DASH_SIZE:ut.number().min(0).default(3),__EXPERIMENTAL_GAP_SIZE:ut.number().min(0).default(2)}),ut.object({__EXPERIMENTAL_DASH_MODE:ut.literal("absolute"),__EXPERIMENTAL_DASH_METERS:ut.number().min(0).default(1),__EXPERIMENTAL_GAP_METERS:ut.number().min(0).default(.5)})]).optional(),__EXPERIMENTAL_GEOMETRY:ut.enum(["tube","ribbon"]).default("tube"),__EXPERIMENTAL_ENDCAP_ENABLED:ut.boolean().default(Ps.__EXPERIMENTAL_ENDCAP_ENABLED),__EXPERIMENTAL_BILLBOARDING:ut.boolean().default(Ps.__EXPERIMENTAL_BILLBOARDING),__EXPERIMENTAL_BORDER:ut.object({enabled:ut.boolean(),color:ut.custom(e=>typeof e=="string"),width:ut.number().optional()}).optional()}),IS=ES.partial(),kVe=ut.strictObject(ES.shape);function ik(e){let{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:u,highlightColor:l,highlightWidthMultiplier:c,highlightCompleteFraction:d,xrayOpacity:f,smoothingTension:h,smoothingCornerRadius:g,dashed:b,dashLength:I,dashGap:v,dashRelativeToWidth:E,dashSize:T,gapSize:D,dashAbsolute:w,dashMeters:B,gapMeters:X,__EXPERIMENTAL_GEOMETRY:L,__EXPERIMENTAL_ENDCAP_ENABLED:P,__EXPERIMENTAL_BILLBOARDING:R,__EXPERIMENTAL_BORDER:$}=e,V;return w?V={__EXPERIMENTAL_DASH_MODE:"absolute",__EXPERIMENTAL_DASH_METERS:B,__EXPERIMENTAL_GAP_METERS:X}:E?V={__EXPERIMENTAL_DASH_MODE:"width-scaling",__EXPERIMENTAL_DASH_SIZE:T,__EXPERIMENTAL_GAP_SIZE:D}:V={__EXPERIMENTAL_DASH_MODE:"length-scaling",__EXPERIMENTAL_DASH_LENGTH:I,__EXPERIMENTAL_DASH_GAP:v},Pn(ES,{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:u,highlightColor:l,highlightWidthMultiplier:c,highlightCompleteFraction:d,xrayOpacity:f,__EXPERIMENTAL_SMOOTHING_TENSION:h,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:g,dashed:b,__EXPERIMENTAL_DASH_OPTIONS:V,__EXPERIMENTAL_GEOMETRY:L,__EXPERIMENTAL_ENDCAP_ENABLED:P,__EXPERIMENTAL_BILLBOARDING:R,__EXPERIMENTAL_BORDER:$})}function pm(e){let r={};for(let t in e)if(t==="__EXPERIMENTAL_SMOOTHING_TENSION"){let n=e[t];n!==void 0&&(r.smoothingTension=n)}else if(t==="__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS"){let n=e[t];n!==void 0&&(r.smoothingCornerRadius=n)}else if(t==="__EXPERIMENTAL_DASH_OPTIONS"){let n=e[t];n&&(n.__EXPERIMENTAL_DASH_MODE==="length-scaling"?(r.dashRelativeToWidth=!1,r.dashAbsolute=!1,n.__EXPERIMENTAL_DASH_LENGTH!==void 0&&(r.dashLength=n.__EXPERIMENTAL_DASH_LENGTH),n.__EXPERIMENTAL_DASH_GAP!==void 0&&(r.dashGap=n.__EXPERIMENTAL_DASH_GAP)):n.__EXPERIMENTAL_DASH_MODE==="width-scaling"?(r.dashRelativeToWidth=!0,r.dashAbsolute=!1,n.__EXPERIMENTAL_DASH_SIZE!==void 0&&(r.dashSize=n.__EXPERIMENTAL_DASH_SIZE),n.__EXPERIMENTAL_GAP_SIZE!==void 0&&(r.gapSize=n.__EXPERIMENTAL_GAP_SIZE)):n.__EXPERIMENTAL_DASH_MODE==="absolute"&&(r.dashAbsolute=!0,r.dashRelativeToWidth=!1,n.__EXPERIMENTAL_DASH_METERS!==void 0&&(r.dashMeters=n.__EXPERIMENTAL_DASH_METERS),n.__EXPERIMENTAL_GAP_METERS!==void 0&&(r.gapMeters=n.__EXPERIMENTAL_GAP_METERS)))}else r[t]=e[t];return r}var Qi,ig=class extends Je{constructor(t,n,o,i){var c,d,f,h;super();m(this,"floorStacksById",new Map);m(this,"floorsById",new Map);m(this,"startingFloorId","");m(this,"currentFloorId","");m(this,"currentFloorStackId","");m(this,"outdoorFloorStacks",new Set);m(this,"id");m(this,"renderer");m(this,"api");m(this,"mvf");m(this,"options",{});m(this,"styleMap");m(this,"animations",new Map);m(this,"floorStackAltitudeMap",new Map);m(this,"Models",{add:(t,n,o)=>{let f=o,{floorId:i,scale:a}=f,u=kn(f,["floorId","scale"]),l=i?this.floorsById.get(i):void 0,c=_({},u);a!=null&&(c.scale=Array.isArray(o.scale)?o.scale:[o.scale,o.scale,o.scale]);let d=this.renderer.addModelGroup(t,{type:"FeatureCollection",features:n.map(h=>({type:"Feature",properties:{id:Jt(),rotation:o.rotation,scale:c.scale,interactive:o.interactive},geometry:{type:"Point",coordinates:Hi(h)}}))},c,{parent:l==null?void 0:l.id});if(d==null)throw new En("error creating model");return this.renderer.getState(d).children},remove:(t,n)=>{this.renderer.remove(t),this.renderer.getState(n).children.length===0&&this.renderer.remove(n)}});m(this,"Image3D",{add:(t,n,o)=>{var f;let d=o,{floorId:i,flipImageToFaceCamera:a}=d,u=kn(d,["floorId","flipImageToFaceCamera"]),l=i?this.floorsById.get(i):this.currentFloor,c={type:"Feature",properties:u,geometry:{type:"Point",coordinates:t}};return this.renderer.addImage((f=o.id)!=null?f:Jt(),c,{url:n,flipImageToFaceCamera:a!=null?a:!1},l.id)},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}});m(this,"Markers",{add:(t,n,o)=>{let i=$h(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),f=o,{attachTo:a}=f,u=kn(f,["attachTo"]),l=u;u.rank==="initial"&&(l.rank="medium");let c=i.layers.get(ba),d=this.renderer.addMarker2D(Hi(t),n,ne(_({},l),{occluderId:i==null?void 0:i.occluderId,attachTo:a}),c==null?void 0:c.containerId);if(!d)throw new En("Failed to create Marker");return d},remove:t=>{this.renderer.remove(t)},getContentEl:t=>{let n=this.renderer.getState(t);if((n==null?void 0:n.type)==="marker")return n.element},removeAll:()=>{},setPosition:(t,n,o)=>{var u;let i=this.renderer.getState(t),a=o?this.floorsById.get(o):this.currentFloor;if(!i){K.error('Failed to retrieve state for Marker with id "'.concat(t,'".'));return}if(i.type!=="marker"){K.error('Geometry with id "'.concat(t,'" is not of type "marker".'));return}this.renderer.setState(i,{position:n,parent:(u=a==null?void 0:a.layers.get(ba))==null?void 0:u.containerId})},animateTo:(t,n,o,i)=>{let a=this.renderer.getState(t),u=o?this.floorsById.get(o):this.currentFloor;if(!a)return K.error('Failed to retrieve state for Marker with id "'.concat(t,'".')),Promise.resolve();if(a.type!=="marker")return K.error('Geometry with id "'.concat(t,'" is not of type "marker".')),Promise.resolve();let l=_({duration:1e3,easing:"ease-in-out"},i);this.cancelAnimation(t);let c=new Ta({lon:a.position[0],lat:a.position[1]}).to({lon:n[0],lat:n[1]},l.duration).easing(Cs[l.easing]).onUpdate(({lon:d,lat:f})=>{var g;if(!this.renderer.getState(t))this.cancelAnimation(t);else{let b=(g=u==null?void 0:u.layers.get(ba))==null?void 0:g.containerId;b&&this.Markers.setPosition(t,[d,f],b)}}).start();return this.renderer.getInternalTweenGroup().add(c),this.renderer.render(),this.animations.set(t,c),sI(c).then(()=>{this.animations.delete(t)})}});m(this,"Exporter",{getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)});m(this,"Shapes",{add:(t,n,o)=>{let i=o!=null&&o.floorId?this.floorsById.get(o==null?void 0:o.floorId):this.currentFloor,a="shape-"+Jt();return this.renderer.addGeometryGroup(a,t,n,i.id),a},remove:t=>(this.renderer.remove(t.id),t.id)});m(this,"Text3D",{label:(t,n,o)=>{var a;if(!((a=this.api.getMapDataInternal())!=null&&a.enterpriseMode)){K.warn("Enterprise mode is not enabled, skipping label creation");return}let i=ak(this.renderer,t,n,o);if(i)return{textInfo:i,target:t}},labelAll:(t={})=>{var i;if(!((i=this.api.getMapDataInternal())!=null&&i.enterpriseMode))return K.warn("Enterprise mode is not enabled, skipping label creation"),[];let n=this.api.getMapData();if(!n)return[];let o=[];return n.getByType("space").forEach(a=>{var u,l;if(a.enterpriseLocations[0]){let c=ak(this.renderer,a,(l=(u=a.enterpriseLocations[0])==null?void 0:u.name)!=null?l:a.name,t);c&&o.push({textInfo:c,target:a})}}),o},remove:t=>{var n;if(!((n=this.api.getMapDataInternal())!=null&&n.enterpriseMode)){K.warn("Remove text label only works in enterprise mode");return}return this.renderer.remove(t),t}});m(this,"Labels",{all:({onCreate:t,labelOptions:n={}})=>{for(let o of Object.entries(this.mvf.space)){let[i,a]=o;a&&a.features.forEach(u=>{var I,v,E,T;let l=(I=this.api.getMapData())==null?void 0:I.getById("space",u.properties.id);if(!l)return;let c=(v=this.styleMap[u.properties.id])==null?void 0:v.showImage,d=(E=u.properties.details)==null?void 0:E.images,f=c&&((T=d==null?void 0:d[0])!=null&&T.url)?{icon:d[0].url}:{},h=_({icon:f.icon},n.appearance),b=(i?this.floorsById.get(i):this.currentFloor).layers.get(bs);if(u.properties.center&&l.name!==""){let D=this.renderer.addLabel2D(u.properties.center,l.name,ne(_({id:u.properties.id+"-label"},n),{appearance:h,rank:n.rank,attachTo:Df(l)}),Fr.is(l)?l.id:b==null?void 0:b.containerId);D&&t(D.id,l.name,l)}})}},add:(t,n,o={})=>{let d=o,{attachTo:i}=d,a=kn(d,["attachTo"]),u=$h(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),l=u.layers.get(bs),c=this.renderer.addLabel2D(Hi(t),n,ne(_({},a),{occluderId:u.occluderId,attachTo:i}),l==null?void 0:l.containerId);if(!c)throw new En("label creating failed");return c},remove:({entityId:t})=>{this.renderer.remove(t)},removeAll:()=>{}});m(this,"Paths",{add:(t,n,o)=>{var f;let i=n?pm(n):void 0,a=(f=n==null?void 0:n.animateDrawing)!=null?f:!0,u=[],l=t[0].floorId||"root",c=0;for(let h of t){let{floorId:g="root",latitude:b,longitude:I}=h;g!==l&&(c++,l=g),u[c]==null&&u.push({floorId:g,coordinates:[]});let v=g===h.floorId?h:new je({longitude:I,latitude:b,floorId:g});u[c].coordinates.push(v)}let d=u.reduce((h,{floorId:g,coordinates:b},I)=>{var T,D,w,B,X,L,P,R,$;if(I!==0){let V=u[I-1],H=V.coordinates[V.coordinates.length-1],re=b[0],j=Hi(H),me=Hi(re),z=this.floorsById.get(V.floorId),ue=this.floorsById.get(g),se=z==null?void 0:z.floorStackId,pe=ue==null?void 0:ue.floorStackId,le=se?this.floorStackAltitudeMap.get(se):void 0,ye=pe?this.floorStackAltitudeMap.get(pe):void 0,Fe=(w=(D=le==null?void 0:le.get((T=z==null?void 0:z.elevation)!=null?T:0))==null?void 0:D.altitude)!=null?w:0,Ee=(L=(X=ye==null?void 0:ye.get((B=ue==null?void 0:ue.elevation)!=null?B:0))==null?void 0:X.altitude)!=null?L:0,Oe=(P=o==null?void 0:o.__EXPERIMENTAL_JUNCTION_INSET)!=null?P:0;nI(j,me,Oe,Fe,Ee);let we=rI(o==null?void 0:o.__EXPERIMENTAL_BILLBOARDING,Fe,Ee,j,me),Le=o?ne(_({},o),{__EXPERIMENTAL_BILLBOARDING:we}):i,Qe=Le?pm(Le):i,Ge=this.renderer.addPath({type:"FeatureCollection",features:[{type:"Feature",properties:{parentId:V.floorId},geometry:{type:"Point",coordinates:j}},{type:"Feature",properties:{parentId:g},geometry:{type:"Point",coordinates:me}}]},Qe,this.id);Ge&&(a&&this.renderer.setState(Ge.id,{completeFraction:0}),h.push(ne(_({},Ge),{coordinates:[H,re]})))}if(b.length<2)return h;let v=($=(R=this.floorsById.get(g))==null?void 0:R.layers.get(vs))==null?void 0:$.containerId,E=this.renderer.addPath({type:"FeatureCollection",features:b.map(V=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:Hi(V)}}))},i,v!=null?v:g);return E&&(a&&this.renderer.setState(E.id,{completeFraction:0}),h.push(ne(_({},E),{coordinates:b}))),h},[]);if(a){let h=[],g=this.api.getMapData();return d.forEach(b=>{var v;let I=YP(b,g,this.api);h.push(new Ta({fraction:0}).to({fraction:1},I?(v=n==null?void 0:n.drawDuration)!=null?v:1500:0).onUpdate(E=>{this.renderer.setState(b.id,{completeFraction:E.fraction})}))}),h.forEach((b,I)=>{I<h.length-1&&b.chain(h[I+1]),this.renderer.getInternalTweenGroup().add(b)}),h[0].start(),this.renderer.render(),this.animations.set(d[0].id.toString(),h[0]),{paths:d,animation:sI(h[h.length-1]).then(()=>{this.animations.delete(d[0].id.toString())})}}else return{paths:d,animation:Promise.resolve()}},remove:t=>{t.forEach(n=>{this.cancelAnimation(n),this.renderer.remove(n)})}});M(this,Qi,{enabled:!1,floorGap:"auto",updateCameraElevationOnFloorChange:!0});this.renderer=i.core,this.api=i,this.id=t,this.renderer.addGroupContainer(t,{},"root"),this.options=o!=null?o:{},this.mvf=(c=n==null?void 0:n.mvf)!=null?c:{};let a=qP(this.mvf["styles.json"]||{});if(this.styleMap=a,k(this,Qi,_(_({},s(this,Qi)),o==null?void 0:o.multiFloorView)),!n){this.id!=="outdoors-container"&&K.warn("Map (".concat(this.id,") created with no data."));let g=new og({id:"default-stack",externalId:"default-stack",name:"Default Stack",maps:["default-floor"]},this.id,this.renderer);this.floorStacksById.set(g.id,g),this.currentFloorStackId=g.id;let b=new ng(g.id,{id:"default-floor",externalId:"default-floor",name:"Default Floor",elevation:0},this,s(this,Qi),o!=null?o:{});this.floorsById.set(b.id,b),g.addFloor(b),this.setFloor(b.id);return}let u=n.getMVFFeatureByType("floor-stack");if(u==null||u.length===0)throw new En("MVF does not contain any Floor Stacks.");for(let g of u){let b=new og(g,this.id,this.renderer,(d=this.mvf.facade)==null?void 0:d[g.id]);for(let I of b.floorIds){let v=n.getMVFFeatureById("floor",I);if(v!=null){let E=new ng(b.id,v,this,s(this,Qi),o!=null?o:{},this.mvf,a,n);this.floorsById.set(E.id,E),b.addFloor(E)}}if(b.floorObjects.length<1){K.warn("Floor stack ".concat(g.id," has no floors. It will not be loaded."));continue}this.floorStacksById.set(g.id,b),this.currentFloorStackId||(this.currentFloorStackId=g.id),this.floorStackAltitudeMap.set(g.id,QP(b.floorObjects,s(this,Qi).floorGap))}for(let[g]of Object.entries(n.facadesBySpaceId)){let b=n.getById("space",g);b&&(this.outdoorFloorStacks.add(b.floor.floorStack.id),(f=this.floorsById.get(b.floor.id))==null||f.setVisible(!0))}let l=(h=this.mvf.enterprise)==null?void 0:h.venue.defaultMap;if(o!=null&&o.initialFloor){let g=kh(o.initialFloor);g&&this.floorsById.has(g)?l=g:K.error("Invalid initial floor specified (".concat(o.initialFloor,"), using default behavior instead"))}l||(l=this.currentFloorStack.defaultFloor.id),this.startingFloorId=l}get currentFloorStack(){let t=this.floorStacksById.get(this.currentFloorStackId);if(!t)throw new En('Current floor stack with id "'.concat(this.currentFloorStackId,'" not found'));return t}setFloorStack(t,n){if(this.currentFloorStackId===t)return;let o=this.floorStacksById.get(t);if(o==null){K.error("Invalid floor stack passed to setFloorStack (".concat(t,"), the floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}if(o.floorObjects.length===0){K.error("Floor stack (".concat(t,") has no floors. The floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}this.setFloor(o.defaultFloor.id,n)}get currentFloor(){let t=this.floorsById.get(this.currentFloorId);if(!t)throw new En('Floor with id "'.concat(this.currentFloorId,'" not found'));return t}get floors(){return Array.from(this.floorsById.values())}processFloorChange(t){var i,a,u,l,c,d,f,h,g;if(this.api.manualFloorVisibility===!0)return;let n=(i=this.api.getMapDataInternal())==null?void 0:i.getById("floor",t),o=(a=this.api.getMapDataInternal())==null?void 0:a.getById("floor-stack",this.currentFloorStackId);if(n&&o)if(!((u=s(this,Qi))!=null&&u.enabled)||n.floorStack.id!==(o==null?void 0:o.id))for(let b of this.floorStacksById.values())b.floorObjects.forEach(I=>{I.id!==t&&I.setVisible(!1)});else{let b=xS(o.floors,n,s(this,Qi).floorGap,((c=(l=this.api.Navigation)==null?void 0:l.floors)==null?void 0:c.map(I=>I.id))||[],this.getFloorStackAltitudeData(o.id));if((f=(d=this.api)==null?void 0:d.Outdoor)==null||f.setOpacity(b.outdoorOpacity),b.floorStates.forEach(I=>{var v;if(I.floor){let E=(v=this.api.getMapData())==null?void 0:v.getById("floor",I.floor.id);E&&this.api.updateState(E,I.state)}}),s(this,Qi).updateCameraElevationOnFloorChange){let I=this.floorStackAltitudeMap.get(o.id);this.api.Camera.setElevation((g=(h=I.get(n.elevation))==null?void 0:h.altitude)!=null?g:n.elevation*xu(s(this,Qi).floorGap,n.maxHeight))}}}setFloor(t,n){if(this.currentFloorId===t)return;if(!this.floorsById.get(t)){K.error("Invalid floor passed to setFloor (".concat(t,"), the floor was not changed. Current floor is still ").concat(this.currentFloor.id));return}let i=this.currentFloorId;this.publish("floor-change-start",{previousFloorId:i,floorId:t,reason:n}),this.currentFloorStack&&this.processFloorChange(t),this.currentFloorId=t,this.currentFloorStackId=this.currentFloor.floorStackId,this.currentFloor.setVisible(!0),this.updateOutdoorPathLayerVisibility(),this.publish("floor-change",{reason:n,floorId:this.currentFloor.id,previousFloorId:i})}updateOutdoorPathLayerVisibility(){var n;let t=this.api.hidePathsNotOnCurrentFloor===!0&&!((n=this.options.multiFloorView)!=null&&n.enabled);for(let o of this.floorsById.values()){let i=this.floorStacksById.get(o.floorStackId);if(!(i!=null&&i.isOutdoors))continue;let a=o.layers.get(vs);if(!a)continue;let u=!t||o.id===this.currentFloor.id;a.setVisible(u)}}getFloorStackAltitudeData(t){return this.floorStackAltitudeMap.get(t)}cancelAnimation(t){let n=this.animations.get(t);n&&(n.stop(),this.animations.delete(t),this.renderer.getInternalTweenGroup().remove(n))}loadAllFloors(){var t;for(let n of this.floorStacksById.values()){n.loadAllFloors();let o=this.floorStackAltitudeMap.get(n.id);(t=n.facade)==null||t.spaces.forEach(i=>{let a=this.styleMap[i.spaceId];if(a&&a.altitude>=0){let u=o==null?void 0:o.get(a.altitude/2);u&&this.renderer.setState(i.spaceId,{altitude:u.altitude,height:u.effectiveHeight})}})}}};Qi=new WeakMap;function ak(e,r,t,n){return e.labelText3D(r.id,t!=null?t:r.name,ne(_({},n),{parentId:r.floor.id}))}p();var ea,sg,ag=class{constructor({currentMapGetter:r}){M(this,ea,new Map);M(this,sg);k(this,sg,r)}get currentMap(){return s(this,sg).call(this)}getAll(){return Array.from(s(this,ea).values()).map(({marker:r})=>r)}getById(r){return s(this,ea).get(r)}add(r,t,n){var c;let o=r.anchorTarget;if(!o)throw new Error("get coordinate failed");let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Markers.add(o,t,ne(_({},n),{rank:(n==null?void 0:n.rank)||"medium",dynamicResize:(c=n==null?void 0:n.dynamicResize)!=null?c:!0,attachTo:Df(r)}));if(a==null)throw new Error("error creating marker");let u=i.Markers.getContentEl(a.id.toString());if(!u)throw new Error("marker component should exist");let l=new Ms(a.id.toString(),u,r);return s(this,ea).set(l.id,{marker:l,entityId:a.id.toString()}),l}remove(r){var n;let t=s(this,ea).get(r.id);t&&((n=this.currentMap)==null||n.Markers.remove(t.entityId),s(this,ea).delete(r.id.toString()))}removeAll(){let r=[];return s(this,ea).forEach(({marker:t})=>{this.remove(t),r.push(t),s(this,ea).delete(t.id.toString())}),r}setPosition(r,t){var a;let n=t.anchorTarget;if(!n){K.error("Cannot determine coordinate from target.");return}let o=this.currentMap;if(!o){K.error("Cannot determine the current map.");return}let i=s(this,ea).get(r.id);if(!i){K.error('Cannot find the Marker with id "'.concat(r.id,'".'));return}o.Markers.setPosition(i.entityId,Hi(n),(a=n.floorId)!=null?a:o.currentFloorId),i.marker.updateTarget(t)}animateTo(r,t,n){var u;let o=t.anchorTarget;if(!o)return K.error("Cannot determine coordinate from target."),Promise.resolve();let i=this.currentMap;if(!i)return K.error("Cannot determine the current map."),Promise.resolve();let a=s(this,ea).get(r.id);return a?(a.marker.updateTarget(t),i.Markers.animateTo(a.entityId,Hi(o),(u=o.floorId)!=null?u:i.currentFloorId,n)):(K.error('Cannot find the Marker with id "'.concat(r.id,'".')),Promise.resolve())}};ea=new WeakMap,sg=new WeakMap;p();var ju,lg,ug=class{constructor({currentMapGetter:r}){M(this,ju,new Map);M(this,lg);k(this,lg,r)}get currentMap(){return s(this,lg).call(this)}getById(r){return s(this,ju).get(r)}add(r,t,n){var l;let o=r.anchorTarget;if(!o)throw new Error("Target does not implement IAnchorable.");let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Image3D.add(Hi(o),t,ne(_({},n),{floorId:o.floorId,verticalOffset:o.verticalOffset+((l=n.verticalOffset)!=null?l:0)}));if(!a)throw new Error("image component should exist");let u=new gd(a.id.toString(),t,r);return s(this,ju).set(u.id,{image:u,entityId:a.id.toString()}),u}remove(r){var n;let t=s(this,ju).get(r.id);t&&((n=this.currentMap)==null||n.Image3D.remove(t.entityId),s(this,ju).delete(r.id.toString()))}removeAll(){let r=[];return s(this,ju).forEach(({image:t})=>{this.remove(t),r.push(t),s(this,ju).delete(t.id.toString())}),r}};ju=new WeakMap,lg=new WeakMap;p();var _s,dg,cg=class{constructor({currentMapGetter:r}){M(this,_s,new Map);M(this,dg);k(this,dg,r)}get currentMap(){return s(this,dg).call(this)}getById(r){return s(this,_s).get(r)}add(r,t,n){let o=[r],i=o.reduce((l,c)=>{var f,h;if(!c)return K.error("Cannot determine coordinate from options."),l;let d=(f=$h(c,this.currentMap.floorsById,this.currentMap.floorsById.get("default-floor")))==null?void 0:f.id;return l.has(d)||l.set(d,[]),(h=l.get(d))==null||h.push(c),l},new Map);if(!o.length)throw new Error("targets should not be empty when adding a model");let a=this.currentMap;if(!a)throw new Error("currentMap should exist");let u=[];return i.forEach((l,c)=>{var h;let d=Jt();a.Models.add(d,l,ne(_({},n),{url:t,floorId:c,verticalOffset:l[0].verticalOffset+((h=n==null?void 0:n.verticalOffset)!=null?h:0)})).forEach(g=>{let b=new bd(g.toString(),d,l[0]);s(this,_s).set(b.id,{model:b,entityId:g.toString(),groupId:d}),u.push(b)})}),u[0]}remove(r){var n;let t=s(this,_s).get(r.id);t&&((n=this.currentMap)==null||n.Models.remove(t.entityId,t.groupId),s(this,_s).delete(r.id.toString()))}removeAll(){let r=[];return s(this,_s).forEach(({model:t})=>{var o;let n=s(this,_s).get(t.id);n&&(r.push(t),(o=this.currentMap)==null||o.Models.remove(n.entityId,n.groupId),s(this,_s).delete(t.id.toString()))}),r}};_s=new WeakMap,dg=new WeakMap;p();var La,fg,pg=class{constructor({currentMapGetter:r}){M(this,La,new Map);M(this,fg);k(this,fg,r)}get currentMap(){return s(this,fg).call(this)}getById(r){var t;return(t=s(this,La).get(r))==null?void 0:t.path}add(r,t){let n=this.currentMap;if(!n)throw new Error("currentMap should exist");let o=n.Paths.add(r,t),i=o.paths.map(u=>u.id.toString()),a=new Fa((t==null?void 0:t.id)||Jt(),o.animation,r,o.paths);for(let u of i)s(this,La).set(u,{path:a,entityIds:i});return s(this,La).set(a.id,{path:a,entityIds:i}),a}highlightPathSection(r,t,n,o){var f,h,g,b;let i=(h=(f=this.currentMap)==null?void 0:f.api.getMapData())==null?void 0:h.mapCenter;if(!i)return;let a=vv([r],t,n,i);if(!a)return;let u=(g=o==null?void 0:o.animationDuration)!=null?g:1500,l=()=>{},c=new Promise(I=>{l=I}),d=new Ta({fraction:0}).to({fraction:1},u).onUpdate(I=>{var v;for(let E of a)(v=this.currentMap)==null||v.api.updateState(E.segment,{highlightCompleteFraction:I.fraction})}).onStart(()=>{var I,v,E;for(let T of a)(E=this.currentMap)==null||E.api.updateState(T.segment,{highlightStartFraction:T.startHighlightFraction,highlightEndFraction:T.endHighlightFraction,highlightColor:(I=o==null?void 0:o.color)!=null?I:"red",highlightWidthMultiplier:(v=o==null?void 0:o.widthMultiplier)!=null?v:1})}).onComplete(()=>{var I;l(),(I=this.currentMap)==null||I.api.removeTween(d)});return(b=this.currentMap)==null||b.api.tweenGroup().add(d),d.start(),{animation:c}}clearHighlightedPathSection(r){var t;(t=this.currentMap)==null||t.api.updateState(r,{highlightCompleteFraction:0,highlightStartFraction:0,highlightEndFraction:0})}clearAllHighlightedPathSections(){for(let r of s(this,La).values())this.clearHighlightedPathSection(r.path)}remove(r){var n;let t=s(this,La).get(r.id);t&&((n=this.currentMap)==null||n.Paths.remove(t.entityIds),s(this,La).delete(r.id),t.entityIds.forEach(o=>s(this,La).delete(o)))}removeAll(){let r=[];return s(this,La).forEach(({path:t})=>{this.remove(t),r.push(t)}),r}};La=new WeakMap,fg=new WeakMap;p();var Uu,hg,mg=class{constructor({currentMapGetter:r}){M(this,Uu,new Map);M(this,hg);k(this,hg,r)}get currentMap(){return s(this,hg).call(this)}getById(r){return s(this,Uu).get(r)}add(r,t,n){let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let i=o.Shapes.add(r,t||{},{floorId:n==null?void 0:n.id}),a=new Bu(i);return s(this,Uu).set(a.id,a),a}remove(r){var n;s(this,Uu).get(r.id)&&((n=this.currentMap)==null||n.Shapes.remove(r),s(this,Uu).delete(r.id.toString()))}removeAll(){let r=[];return s(this,Uu).forEach(t=>{this.remove(t),r.push(t.id),s(this,Uu).delete(t.id.toString())}),r}};Uu=new WeakMap,hg=new WeakMap;p();var yg,gg=class{constructor({currentMapGetter:r}){M(this,yg);k(this,yg,r)}get currentMap(){return s(this,yg).call(this)}setFromStyleCollection(r){var t,n,o,i,a;for(let u in r)for(let l of((t=this.currentMap)==null?void 0:t.floors)||[]){if(r[u]==null||!l.layers.has(Ir))continue;let c=l.layers.get(Ir);for(let h of Object.values(r))if(h&&"polygons"in h&&"color"in h)for(let g of h.polygons)(n=this.currentMap)==null||n.renderer.setState(g,{color:h.color});if(c!=null&&c.layers.has(u)&&"color"in r[u]){let h=c.layers.get(u);h&&((o=this.currentMap)==null||o.renderer.setState(h,{color:r[u].color}))}if(c&&u===Sl&&!(ys in r)){let h=c.layers.get(ys);h&&"color"in r[u]&&((i=this.currentMap)==null||i.renderer.setState(h,{color:r[u].color}))}if(!l.layers.has(Nc))continue;let d=l.layers.get(Nc),f=l.facadesByStyleId.get(u);if(f&&f.length>0)for(let h of f){let g=d.layers.get("".concat(h,"-").concat(u));g&&"color"in r[u]&&((a=this.currentMap)==null||a.renderer.setState(g,{color:r[u].color}))}}}};yg=new WeakMap;p();var SS={opacity:1},po,bg,vg,Zl,Gu,Cd,CS,sk,fm=class{constructor(r,t){M(this,Cd);M(this,po);M(this,bg,[]);M(this,vg,{opacity:"initial"});M(this,Zl,{opacity:new Map});M(this,Gu,new Set);k(this,po,r),k(this,bg,t||[]);let n=s(this,po).map;n&&n.on("idle",()=>{s(this,Zl).opacity.size||he(this,Cd,CS).call(this,n)})}setStyle(r){var t,n;if(s(this,po).map){(t=s(this,po).map)==null||t.setStyle(r),s(this,Gu).size&&(s(this,Gu).clear(),this.hide()),he(this,Cd,sk).call(this),he(this,Cd,CS).call(this,s(this,po).map),this.setOpacity(s(this,vg).opacity),(n=s(this,po).map)==null||n.moveLayer(yx);for(let[o,i]of s(this,bg)||[])s(this,po).hideOutdoorLayersIntersectingPolygons(o,i)}}get map(){return s(this,po).map}get enabled(){return!!s(this,po).map}get visible(){return s(this,Gu).size===0}show(){let r=s(this,po).map;if(!r)return;let t=r.getStyle().layers;t&&(t.forEach(n=>{s(this,Gu).has(n.id)&&r.setLayoutProperty(n.id,"visibility","visible")}),s(this,Gu).clear())}hide(r=[]){let t=s(this,po).map;if(!t)return;let n=t.getStyle().layers;n&&n.forEach(o=>{let i=t.getLayoutProperty(o.id,"visibility");!r.includes(o.id)&&i!=="none"&&(t.setLayoutProperty(o.id,"visibility","none"),s(this,Gu).add(o.id))})}setOpacity(r,t=[]){var i,a,u;let n=s(this,po).map;if(!n)return;let o=(u=(a=(i=s(this,po).map)==null?void 0:i.getStyle)==null?void 0:a.call(i))==null?void 0:u.layers;o&&n.once("idle",()=>{o.forEach(l=>{let c=n.getLayoutProperty(l.id,"visibility");if(!t.includes(l.id)&&c!=="none")try{let d=s(this,Zl).opacity.get(l.id);d!==void 0&&(l.id==="background"||(l.type==="symbol"?(n.setPaintProperty(l.id,"icon-opacity",r==="initial"?d[0]:r),n.setPaintProperty(l.id,"text-opacity",r==="initial"?d[1]:r)):n.setPaintProperty(l.id,"".concat(l.type,"-opacity"),r==="initial"?d[0]:r)),s(this,vg).opacity=r)}catch(d){K.warn("Error setting opacity:",d)}})})}};po=new WeakMap,bg=new WeakMap,vg=new WeakMap,Zl=new WeakMap,Gu=new WeakMap,Cd=new WeakSet,CS=function(r){let t=r.getStyle().layers;t&&t.forEach(n=>{var i,a,u;r.getLayoutProperty(n.id,"visibility")!=="none"&&(n.id==="background"||(n.type==="symbol"?s(this,Zl).opacity.set(n.id,[(i=r.getPaintProperty(n.id,"icon-opacity"))!=null?i:SS.opacity,(a=r.getPaintProperty(n.id,"text-opacity"))!=null?a:SS.opacity]):s(this,Zl).opacity.set(n.id,[(u=r.getPaintProperty(n.id,"".concat(n.type,"-opacity")))!=null?u:SS.opacity,void 0])))})},sk=function(){Object.values(s(this,Zl)).forEach(r=>r.clear())};p();function LY(){Cx(!1)}var zu,Vu,Wl,xg=class{constructor({currentMapGetter:r}){M(this,zu);M(this,Vu,new Map);M(this,Wl,new Map);k(this,zu,r)}labelAll(r={}){var o,i;let t=[],n=new Set;return(i=(o=s(this,zu).call(this))==null?void 0:o.Text3D.labelAll(r))==null||i.forEach(({textInfo:a,target:u})=>{let l=a.id.toString(),c=s(this,Wl).get(l);if(c){n.has(l)||t.push(c.text3DView),n.add(l);return}n.add(l);let d=new Vl(l,u);s(this,Vu).set(d.id,{targetId:u.id,text3d:l,text3DView:d}),s(this,Wl).set(l,{text3DView:d}),t.push(d)}),t}label(r,t,n={}){var i;if(s(this,zu).call(this))if(Fr.is(r)){let a=(i=s(this,zu).call(this))==null?void 0:i.Text3D.label(r,t,n);if(!a)return;let u=a.textInfo.id.toString(),l=s(this,Wl).get(u);if(l)return l.text3DView;let c=new Vl(u,a.target);return s(this,Vu).set(c.id,{targetId:a.target.id,text3d:u,text3DView:c}),s(this,Wl).set(u,{text3DView:c}),c}else throw new Error("Non-space target is not supported")}remove(r){var o;let t=typeof r=="string"?r:r.id,n=s(this,Vu).get(t);n&&((o=s(this,zu).call(this))==null||o.Text3D.remove(n.text3d),s(this,Vu).delete(t),s(this,Wl).delete(n.text3d))}removeAll(){s(this,Vu).forEach(r=>{var t;(t=s(this,zu).call(this))==null||t.Text3D.remove(r.text3d)}),s(this,Vu).clear()}};zu=new WeakMap,Vu=new WeakMap,Wl=new WeakMap;p();p();import Ra from"zod";var uk="doors",DS=Ra.object({type:Ra.literal(uk).default(uk),color:Ra.string().default("#ffffff"),topColor:Ra.string().optional(),texture:Ra.object({url:Ra.string().optional()}).optional(),topTexture:Ra.object({url:Ra.string().optional()}).optional(),visible:Ra.boolean().default(!1),opacity:Ra.number().default(1)}),Sv=DS.partial(),H$e=Ra.strictObject(DS.shape);function lk(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,opacity:a}=e;return Pn(DS,{visible:i,color:r,topColor:t,opacity:a,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0})}function Cv(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.opacity!==void 0&&(t.opacity=e.opacity)),t}p();import{z as Eg}from"zod";var ck="facade",TS=Eg.object({type:Eg.literal(ck).default(ck),opacity:Eg.number().default(1),visible:Eg.boolean().default(!0)}),dk=TS.partial(),J$e=Eg.strictObject(TS.shape);function pk(e){return Pn(TS,{opacity:e.opacity,visible:e.visible})}p();import{z as Ke}from"zod";var Os="floor",fk="".concat(Os,".footprint"),mk="".concat(Os,".geometry"),hk="".concat(Os,".labels"),gk="".concat(Os,".markers"),yk="".concat(Os,".images"),bk="".concat(Os,".occlusion"),vk="".concat(Os,".paths"),xk="".concat(Os,".areas"),Dv=Ke.object({type:Ke.literal(fk).default(fk),altitude:Ke.number().default(0),visible:Ke.boolean().default(!1),height:Ke.number().default(0),opacity:Ke.number().default(1),side:Ke.enum(["double","front","back"]),color:Ke.string().default("#ffffff")}),Ek=Dv.partial(),Tv=Ke.object({type:Ke.literal(mk).default(mk),opacity:Ke.number().default(1),visible:Ke.boolean().default(!0)}),Ik=Tv.partial(),wv=Ke.object({type:Ke.literal(hk).default(hk),enabled:Ke.boolean().default(!0)}),Sk=wv.partial(),Mv=Ke.object({type:Ke.literal(gk).default(gk),enabled:Ke.boolean().default(!0)}),Ck=Mv.partial(),Av=Ke.object({type:Ke.literal(yk).default(yk),visible:Ke.boolean().default(!0)}),Dk=Av.partial(),Pv=Ke.object({type:Ke.literal(bk).default(bk),enabled:Ke.boolean().default(!0)}),Tk=Pv.partial(),_v=Ke.object({type:Ke.literal(vk).default(vk),visible:Ke.boolean().default(!0)}),wk=_v.partial(),Ov=Ke.object({type:Ke.literal(Os).default(Os),visible:Ke.boolean().default(!1),altitude:Ke.number().default(0)}),Fv=Ke.object({type:Ke.literal(xk).default(xk),visible:Ke.boolean().default(!0)}),Mk=Fv.partial(),kv=Ke.object({visible:Ke.boolean().default(!0)}),Ak=kv.partial(),RY=Ke.object(ne(_({},Ov.shape),{geometry:Tv,labels:wv,markers:Mv,images:Av,footprint:Dv,occlusion:Pv,paths:_v,areas:Fv,text3d:kv})),Pk=Ov.partial(),nHe=Ke.object(ne(_({},Ov.shape),{geometry:Tv.partial(),labels:wv.partial(),markers:Mv.partial(),images:Av.partial(),footprint:Dv.partial(),occlusion:Pv.partial(),paths:_v.partial(),areas:Fv.partial(),text3d:kv.partial()})).partial(),oHe=Ke.strictObject(ne(_({},Ov.shape),{geometry:Ke.strictObject(Tv.shape),labels:Ke.strictObject(wv.shape),markers:Ke.strictObject(Mv.shape),images:Ke.strictObject(Av.shape),footprint:Ke.strictObject(Dv.shape),occlusion:Ke.strictObject(Pv.shape),paths:Ke.strictObject(_v.shape),areas:Ke.strictObject(Fv.shape),text3d:Ke.strictObject(kv.shape)}));function _k(e,r,t){var D;if(!r){K.error("Floor is not defined. Cannot get floor state.");return}let n=r.layers.get(Ir),o=n?t==null?void 0:t.getState(n.containerId):void 0,i=r.layers.get(bs),a=r.layers.get(ba),u=r.layers.get(af),l=u?t==null?void 0:t.getState(u.containerId):void 0,c=r.layers.get(Lc),d=c?t==null?void 0:t.getState(c.containerId):void 0,f=r.layers.get(sf),h=f?t==null?void 0:t.getState(f.containerId):void 0,g=r.layers.get(vs),b=g?t==null?void 0:t.getState(g.containerId):void 0,I=r.layers.get(Rc),v=I?t==null?void 0:t.getState(I.containerId):void 0,E=t==null?void 0:t.getInternalState().geometry3DMap.get(r.id),T=!1;if((E==null?void 0:E.type)==="group-container"){let w=E?t==null?void 0:t.getSystems().text3DSystem.getBatchedText(E):void 0;T=(D=w==null?void 0:w.visible)!=null?D:!0}return Pn(RY,{geometry:{opacity:o==null?void 0:o.opacity,visible:o==null?void 0:o.visible},labels:{enabled:i==null?void 0:i.visible},markers:{enabled:a==null?void 0:a.visible},footprint:{altitude:l==null?void 0:l.altitude,visible:l==null?void 0:l.visible,height:l==null?void 0:l.height,opacity:l==null?void 0:l.opacity,side:l==null?void 0:l.side,color:l==null?void 0:l.color},images:{visible:h==null?void 0:h.visible},occlusion:{enabled:d==null?void 0:d.visible},paths:{visible:b==null?void 0:b.visible},areas:{visible:v==null?void 0:v.visible},text3d:{visible:T},visible:e.visible,altitude:e.altitude})}p();import{z as pr}from"zod";var Ok="geometry",wS=pr.object({type:pr.literal(Ok).default(Ok),visible:pr.boolean().default(!0),color:pr.union([pr.string(),pr.literal("initial")]).default("#ffffff"),topColor:pr.union([pr.string(),pr.literal("initial")]).optional(),hoverColor:pr.union([pr.string(),pr.literal("initial")]).optional(),interactive:pr.boolean().default(!1),opacity:pr.number().default(1),height:pr.number().default(0),altitude:pr.number().default(0),texture:pr.object({url:pr.string()}).optional(),topTexture:pr.object({url:pr.string()}).optional(),flipImageToFaceCamera:pr.boolean().default(!1),enableImageCollisions:pr.boolean().default(!1),borderVisible:pr.boolean().default(!1),borderColor:pr.string().optional(),borderWidth:pr.number().optional()}),MS=wS.partial(),cHe=pr.strictObject(wS.shape);function Fk(e){let{altitude:r,interactive:t,hoverColor:n,color:o,visible:i,opacity:a,height:u,texture:l,topTexture:c,flipImageToFaceCamera:d,enableImageCollisions:f,topColor:h,borderVisible:g,borderColor:b,borderWidth:I}=e;return Pn(wS,{interactive:t,hoverColor:n,color:o,visible:i,opacity:a,height:u,texture:l?{url:e.texture}:void 0,topTexture:c?{url:c}:void 0,flipImageToFaceCamera:d,enableImageCollisions:f,topColor:h,altitude:r,borderVisible:g,borderColor:b,borderWidth:I})}function kk(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.hoverColor!==void 0&&(t.hoverColor=e.hoverColor),e.interactive!==void 0&&(t.interactive=e.interactive),e.height!==void 0&&(t.height=e.height),e.opacity!==void 0&&(t.opacity=e.opacity),e.flipImageToFaceCamera!==void 0&&(t.flipImageToFaceCamera=e.flipImageToFaceCamera),e.enableImageCollisions!==void 0&&(t.enableImageCollisions=e.enableImageCollisions),e.altitude!==void 0&&(t.altitude=e.altitude),e.borderVisible!==void 0&&(t.borderVisible=e.borderVisible),e.borderColor!==void 0&&(t.borderColor=e.borderColor),e.borderWidth!==void 0&&(t.borderWidth=e.borderWidth)),t}p();import ta from"zod";var AS="label",NY=ta.object({type:ta.literal(AS).default(AS),text:ta.string(),rank:ta.custom(e=>Qg.safeParse(e).success||e==="initial"),appearance:ta.custom(e=>aC.safeParse(e).success),interactive:ta.boolean().default(!1),enabled:ta.boolean().default(!0),textPlacement:ta.union([ta.enum(px),ta.array(ta.enum(px))]).default(fx),occlude:ta.boolean().default(!0)}),Bk=NY.partial();function Lk(e){var o,i,a,u,l;let{text:r,enabled:t,options:n}=e;return{type:AS,text:r!=null?r:"",appearance:sC((o=n==null?void 0:n.appearance)!=null?o:{}),rank:(i=n==null?void 0:n.rank)!=null?i:"medium",enabled:t!=null?t:!0,interactive:(a=n==null?void 0:n.interactive)!=null?a:!1,textPlacement:(u=n==null?void 0:n.textPlacement)!=null?u:fx,occlude:(l=n==null?void 0:n.occlude)!=null?l:!0}}function Rk(e,r){let t={options:{}};if(!t.options)throw new Error("options should exist");return e.text&&(t.text=e.text),e.appearance&&(t.options.appearance=e.appearance),e.textPlacement&&(t.options.textPlacement=e.textPlacement),e.rank!=null&&(e.rank==="initial"?t.options.rank=r.initialRank||2:t.options.rank=e.rank),e.enabled!==void 0&&(t.enabled=e.enabled),e.interactive!==void 0&&(t.options.interactive=e.interactive),e.occlude!==void 0&&(t.options.occlude=e.occlude),e.enabled!==void 0&&(t.enabled=e.enabled),t}p();import Kr from"zod";var PS="marker",jY=Kr.object({type:Kr.literal(PS).default(PS),rank:Kr.custom(e=>Qg.safeParse(e).success||e==="initial"),placement:Kr.union([Kr.enum(mx),Kr.array(Kr.enum(mx))]).optional(),interactive:Kr.union([Kr.boolean(),Kr.literal("pointer-events-auto")]).default(!1),dynamicResize:Kr.boolean().default(!0),enabled:Kr.boolean().default(!0),zIndex:Kr.number().optional(),lowPriorityPin:Kr.object({enabled:Kr.boolean().optional(),size:Kr.number().positive().optional(),color:Kr.string().optional()}).optional(),element:Kr.custom(e=>e instanceof HTMLElement,{error:"Must be an HTMLElement instance"}),contentHTML:Kr.string(),occlude:Kr.boolean().default(!0)}),Nk=jY.omit({element:!0}).partial();function jk(e,r){var h,g,b,I,v;let t=r!=null&&r.target?r.target.anchorTarget:void 0,{enabled:n,placement:o,element:i,dynamicResize:a,contentHTML:u,options:l,position:c,parent:d}=e,f=typeof d=="object"?d.id:d;return t==null&&(t=new je({latitude:(h=c==null?void 0:c[1])!=null?h:0,longitude:(g=c==null?void 0:c[0])!=null?g:0,floorId:f==null?void 0:f.toString()})),{type:PS,rank:(b=l==null?void 0:l.rank)!=null?b:"medium",interactive:(I=l==null?void 0:l.interactive)!=null?I:!1,enabled:n!=null?n:!0,element:i,placement:o!=null?o:[],zIndex:l==null?void 0:l.zIndex,dynamicResize:a!=null?a:!0,lowPriorityPin:l==null?void 0:l.lowPriorityPin,contentHTML:u!=null?u:"",occlude:(v=l==null?void 0:l.occlude)!=null?v:!0}}function Uk(e,r){let t={};return t.options={},e.rank!=null&&(e.rank==="initial"?t.options.rank=r.initialRank||2:t.options.rank=e.rank),e.dynamicResize!=null&&(t.options.dynamicResize=e.dynamicResize),e.enabled!=null&&(t.enabled=e.enabled),e.interactive!=null&&(t.options.interactive=e.interactive),e.enabled!=null&&(t.enabled=e.enabled),e.contentHTML!=null&&(t.contentHTML=e.contentHTML),e.placement!=null&&(t.placement=e.placement),e.occlude!=null&&(t.options.occlude=e.occlude),e.zIndex!=null&&(t.options.zIndex=e.zIndex),t}p();import{z as wo}from"zod";var Gk="shape",_S=wo.object({type:wo.literal(Gk).default(Gk),visible:wo.boolean().default(!0),altitude:wo.number().default(0),color:wo.string().default("#ffffff"),height:wo.number().default(0),opacity:wo.number().default(1),interactive:wo.boolean().default(!1),bevel:wo.object({enabled:wo.boolean().optional(),thickness:wo.number().optional(),size:wo.number().optional(),offset:wo.number().optional(),segments:wo.number().optional()}).optional()}),OS=_S.partial(),wHe=wo.strictObject(_S.shape);function zk(e){let{altitude:r,visible:t,color:n,opacity:o,interactive:i,height:a,children:u,bevel:l}=e;if(u==null||u.length<1){K.error("Expected at least one child for Shape (".concat(e.id,"). Cannot get shape state."));return}return Pn(_S,{altitude:r,visible:t,color:n,height:a,opacity:o,interactive:i,bevel:l})}function Vk(e){let r=Xt(OS,e,{warn:!0}),t={};if(r.visible!==void 0&&(t.visible=r.visible),r.color!==void 0&&(t.color=r.color),r.opacity!==void 0&&(t.opacity=r.opacity),r.altitude!==void 0&&(t.altitude=r.altitude),r.height!==void 0&&(t.height=r.height),r.interactive!==void 0&&(t.interactive=r.interactive),r.bevel!==void 0){let n={enabled:r.bevel.enabled||!1,thickness:r.bevel.thickness,size:r.bevel.size,offset:r.bevel.offset,segments:r.bevel.segments};t.bevel=n}return t}p();import Bv from"zod";var $k="text3d",Hk=Bv.object({type:Bv.literal($k).default($k),position:Bv.custom(e=>e instanceof je,{error:"Must be a Coordinate instance"})}),Zk=AC.extend(_({},Hk.shape)),Wk=PC.extend(_({},Hk.shape)).partial(),kHe=Bv.strictObject(Zk.shape);function Xk(e){var T,D;let{position:r,visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:u,outlineOpacity:l,outlineBlur:c,outlineWidth:d,outlineOffsetX:f,outlineOffsetY:h,strokeWidth:g,strokeOpacity:b,strokeColor:I,fillOpacity:v,hoverColor:E}=e;return Pn(Zk,{position:new je({latitude:(T=r==null?void 0:r[1])!=null?T:0,longitude:(D=r==null?void 0:r[0])!=null?D:0}),visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:u,outlineOpacity:l,outlineBlur:c,outlineWidth:d,outlineOffsetX:f,outlineOffsetY:h,strokeWidth:g,strokeOpacity:b,strokeColor:I,fillOpacity:v,hoverColor:E})}p();import Jo from"zod";var qk="walls",FS=Jo.object({type:Jo.literal(qk).default(qk),color:Jo.string().default("#ffffff"),topColor:Jo.string().optional(),texture:Jo.object({url:Jo.string()}).or(Jo.undefined()),topTexture:Jo.object({url:Jo.string()}).or(Jo.undefined()),visible:Jo.boolean().default(!0),height:Jo.number().default(0),opacity:Jo.number().default(1)}),kS=FS.partial(),UHe=Jo.strictObject(FS.shape);function Jk(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,height:a,opacity:u}=e;return Pn(FS,{visible:i,color:r,topColor:t,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0,height:a,opacity:u})}function BS(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.height!==void 0&&(t.height=e.height),e.opacity!==void 0&&(t.opacity=e.opacity)),t}p();import{z as Fs}from"zod";var LS="image3d",UY=Fs.object({type:Fs.literal(LS).default(LS),visible:Fs.boolean().default(!0),opacity:Fs.number().min(0).max(1).default(1),position:Fs.custom(e=>e instanceof je,{error:"Must be a Coordinate instance"}),width:Fs.number().default(1),height:Fs.number().default(1),rotation:Fs.number().default(0),verticalOffset:Fs.number().default(0),flipImagesToFaceCamera:Fs.boolean().default(!1)}),Yk=UY.partial();function Kk(e){var t,n,o,i,a,u,l,c,d;let{position:r}=e;return{type:LS,visible:(t=e.visible)!=null?t:!0,opacity:(n=e.opacity)!=null?n:1,position:new je({latitude:(o=r==null?void 0:r[1])!=null?o:0,longitude:(i=r==null?void 0:r[0])!=null?i:0,verticalOffset:r==null?void 0:r[2]}),width:(a=e.width)!=null?a:1,height:(u=e.height)!=null?u:1,rotation:(l=e.rotation)!=null?l:0,verticalOffset:(c=e.verticalOffset)!=null?c:0,flipImagesToFaceCamera:(d=e.flipImageToFaceCamera)!=null?d:!1}}p();import{z as kt}from"zod";var Qk="model",RS=DI.extend({type:kt.literal(Qk).default(Qk),color:kt.string().optional(),position:kt.custom(e=>je.is(e),{error:"Expected a Coordinate"}),visible:kt.boolean().default(!0),rotation:kt.tuple([kt.number(),kt.number(),kt.number()]).default([0,0,0]),scale:kt.tuple([kt.number(),kt.number(),kt.number()]).default([1,1,1]),verticalOffset:kt.number().default(0),opacity:kt.number().default(1),material:kt.record(kt.string(),TI).optional(),interactive:kt.boolean().default(!1),clippingPlaneZOffset:kt.number().default(1/0),clippingPlaneTopColor:kt.string().default("#E67B5B"),clippingPlaneTopVisible:kt.boolean().default(!0)}),e8=RS.extend({scale:kt.union([kt.number(),kt.tuple([kt.number(),kt.number(),kt.number()])]),rotation:kt.union([kt.number(),kt.tuple([kt.number(),kt.number(),kt.number()])])}).partial(),YHe=kt.strictObject(RS.shape);function t8(e){var b,I,v;let{color:r,position:t,rotation:n,scale:o,visible:i,interactive:a,opacity:u,material:l,verticalOffset:c,parent:d,clippingPlaneZOffset:f,clippingPlaneTopVisible:h}=e,g=typeof d=="object"?(b=d==null?void 0:d.id)==null?void 0:b.toString():d==null?void 0:d.toString();return Pn(RS,{color:r,position:new je({latitude:(I=t==null?void 0:t[1])!=null?I:0,longitude:(v=t==null?void 0:t[0])!=null?v:0,verticalOffset:t==null?void 0:t[2],floorId:g}),rotation:n,scale:o,visible:i,interactive:a,opacity:u,material:l,verticalOffset:c,clippingPlaneZOffset:f,clippingPlaneTopVisible:h})}p();p();p();var hm=Kl(H8());hm.registerHelper({});hm.registerPartial({});var Z8=hm.template({compiler:[8,">= 4.3.0"],main:function(e,r,t,n,o){var i=e.lambda,a=e.escapeExpression,u=e.lookupProperty||function(l,c){if(Object.prototype.hasOwnProperty.call(l,c))return l[c]};return"<div class='mappedin-annotation-marker'>\n <div style='width: "+a(i(r!=null?u(r,"size"):r,r))+"px; height: "+a(i(r!=null?u(r,"size"):r,r))+"px'>\n <img src='"+a(i(r!=null?u(r,"icon"):r,r))+"' alt='"+a(i(r!=null?u(r,"name"):r,r))+"' width='"+a(i(r!=null?u(r,"size"):r,r))+"' height='"+a(i(r!=null?u(r,"size"):r,r))+"' />\n </div>\n</div>"},useData:!0});var yQ=30,W8=new Set(["annotation"]);function bQ(e){var r,t;return Z8({size:yQ,icon:(t=(r=e.icon)==null?void 0:r.url)!=null?t:"",name:e.name})}function vQ(e={}){return _({rank:"high",placement:["center"],interactive:!0},e)}function xQ(e,r){return r.Markers.add(e.coordinate,bQ(e),vQ())}function X8(e,r){let t=[];for(let n of r)wc(n)&&mi.is(n)&&n.icon!=null&&typeof n.icon.url=="string"&&n.icon.url.length>0&&t.push(xQ(n,e));return t}p();var q8=new Set(["space","object"]);function J8(e,r){r.forEach(t=>{OP(t)&&e.updateState(t,{interactive:!0})})}p();p();function Y8(e){return wc(e)?"anchorTarget"in e&&e.anchorTarget!=null:!1}p();p();var{entries:sB,setPrototypeOf:K8,isFrozen:EQ,getPrototypeOf:IQ,getOwnPropertyDescriptor:SQ}=Object,{freeze:Ao,seal:ra,create:uB}=Object,{apply:u6,construct:l6}=typeof Reflect<"u"&&Reflect;Ao||(Ao=function(r){return r});ra||(ra=function(r){return r});u6||(u6=function(r,t,n){return r.apply(t,n)});l6||(l6=function(r,t){return new r(...t)});var Qv=Po(Array.prototype.forEach),CQ=Po(Array.prototype.lastIndexOf),Q8=Po(Array.prototype.pop),Tg=Po(Array.prototype.push),DQ=Po(Array.prototype.splice),tx=Po(String.prototype.toLowerCase),n6=Po(String.prototype.toString),eB=Po(String.prototype.match),wg=Po(String.prototype.replace),TQ=Po(String.prototype.indexOf),wQ=Po(String.prototype.trim),ja=Po(Object.prototype.hasOwnProperty),Mo=Po(RegExp.prototype.test),Mg=MQ(TypeError);function Po(e){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u6(e,r,n)}}function MQ(e){return function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return l6(e,t)}}function ft(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tx;K8&&K8(e,null);let n=r.length;for(;n--;){let o=r[n];if(typeof o=="string"){let i=t(o);i!==o&&(EQ(r)||(r[n]=i),o=i)}e[o]=!0}return e}function AQ(e){for(let r=0;r<e.length;r++)ja(e,r)||(e[r]=null);return e}function Wu(e){let r=uB(null);for(let[t,n]of sB(e))ja(e,t)&&(Array.isArray(n)?r[t]=AQ(n):n&&typeof n=="object"&&n.constructor===Object?r[t]=Wu(n):r[t]=n);return r}function Ag(e,r){for(;e!==null;){let n=SQ(e,r);if(n){if(n.get)return Po(n.get);if(typeof n.value=="function")return Po(n.value)}e=IQ(e)}function t(){return null}return t}var tB=Ao(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),o6=Ao(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),i6=Ao(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),PQ=Ao(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),a6=Ao(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_Q=Ao(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rB=Ao(["#text"]),nB=Ao(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),s6=Ao(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),oB=Ao(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ex=Ao(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OQ=ra(/\{\{[\w\W]*|[\w\W]*\}\}/gm),FQ=ra(/<%[\w\W]*|[\w\W]*%>/gm),kQ=ra(/\$\{[\w\W]*/gm),BQ=ra(/^data-[\-\w.\u00B7-\uFFFF]+$/),LQ=ra(/^aria-[\-\w]+$/),lB=ra(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),RQ=ra(/^(?:\w+script|data):/i),NQ=ra(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cB=ra(/^html$/i),jQ=ra(/^[a-z][.\w]*(-[.\w]+)+$/i),iB=Object.freeze({__proto__:null,ARIA_ATTR:LQ,ATTR_WHITESPACE:NQ,CUSTOM_ELEMENT:jQ,DATA_ATTR:BQ,DOCTYPE_NAME:cB,ERB_EXPR:FQ,IS_ALLOWED_URI:lB,IS_SCRIPT_OR_DATA:RQ,MUSTACHE_EXPR:OQ,TMPLIT_EXPR:kQ}),Pg={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},UQ=function(){return typeof window>"u"?null:window},GQ=function(r,t){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));let i="dompurify"+(n?"#"+n:"");try{return r.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},aB=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dB(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UQ(),r=$e=>dB($e);if(r.version="3.2.6",r.removed=[],!e||!e.document||e.document.nodeType!==Pg.document||!e.Element)return r.isSupported=!1,r;let{document:t}=e,n=t,o=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:u,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:g}=e,b=l.prototype,I=Ag(b,"cloneNode"),v=Ag(b,"remove"),E=Ag(b,"nextSibling"),T=Ag(b,"childNodes"),D=Ag(b,"parentNode");if(typeof a=="function"){let $e=t.createElement("template");$e.content&&$e.content.ownerDocument&&(t=$e.content.ownerDocument)}let w,B="",{implementation:X,createNodeIterator:L,createDocumentFragment:P,getElementsByTagName:R}=t,{importNode:$}=n,V=aB();r.isSupported=typeof sB=="function"&&typeof D=="function"&&X&&X.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:H,ERB_EXPR:re,TMPLIT_EXPR:j,DATA_ATTR:me,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:pe}=iB,{IS_ALLOWED_URI:le}=iB,ye=null,Fe=ft({},[...tB,...o6,...i6,...a6,...rB]),Ee=null,Oe=ft({},[...nB,...s6,...oB,...ex]),we=Object.seal(uB(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Qe=null,Ge=!0,N=!0,xe=!1,Z=!0,De=!1,Ie=!0,ve=!1,Ne=!1,Et=!1,zt=!1,Bt=!1,rr=!1,Hr=!0,_n=!1,On="user-content-",Fn=!0,vr=!1,sr={},vn=null,Ko=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Cr=null,Qr=ft({},["audio","video","img","source","image","track"]),Dr=null,G=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),S="http://www.w3.org/1998/Math/MathML",C="http://www.w3.org/2000/svg",A="http://www.w3.org/1999/xhtml",O=A,F=!1,Y=null,ee=ft({},[S,C,A],n6),de=ft({},["mi","mo","mn","ms","mtext"]),W=ft({},["annotation-xml"]),ie=ft({},["title","style","font","a","script"]),J=null,fe=["application/xhtml+xml","text/html"],Te="text/html",Be=null,Ve=null,ht=t.createElement("form"),rt=function(q){return q instanceof RegExp||q instanceof Function},qt=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ve&&Ve===q)){if((!q||typeof q!="object")&&(q={}),q=Wu(q),J=fe.indexOf(q.PARSER_MEDIA_TYPE)===-1?Te:q.PARSER_MEDIA_TYPE,Be=J==="application/xhtml+xml"?n6:tx,ye=ja(q,"ALLOWED_TAGS")?ft({},q.ALLOWED_TAGS,Be):Fe,Ee=ja(q,"ALLOWED_ATTR")?ft({},q.ALLOWED_ATTR,Be):Oe,Y=ja(q,"ALLOWED_NAMESPACES")?ft({},q.ALLOWED_NAMESPACES,n6):ee,Dr=ja(q,"ADD_URI_SAFE_ATTR")?ft(Wu(G),q.ADD_URI_SAFE_ATTR,Be):G,Cr=ja(q,"ADD_DATA_URI_TAGS")?ft(Wu(Qr),q.ADD_DATA_URI_TAGS,Be):Qr,vn=ja(q,"FORBID_CONTENTS")?ft({},q.FORBID_CONTENTS,Be):Ko,Le=ja(q,"FORBID_TAGS")?ft({},q.FORBID_TAGS,Be):Wu({}),Qe=ja(q,"FORBID_ATTR")?ft({},q.FORBID_ATTR,Be):Wu({}),sr=ja(q,"USE_PROFILES")?q.USE_PROFILES:!1,Ge=q.ALLOW_ARIA_ATTR!==!1,N=q.ALLOW_DATA_ATTR!==!1,xe=q.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=q.SAFE_FOR_TEMPLATES||!1,Ie=q.SAFE_FOR_XML!==!1,ve=q.WHOLE_DOCUMENT||!1,zt=q.RETURN_DOM||!1,Bt=q.RETURN_DOM_FRAGMENT||!1,rr=q.RETURN_TRUSTED_TYPE||!1,Et=q.FORCE_BODY||!1,Hr=q.SANITIZE_DOM!==!1,_n=q.SANITIZE_NAMED_PROPS||!1,Fn=q.KEEP_CONTENT!==!1,vr=q.IN_PLACE||!1,le=q.ALLOWED_URI_REGEXP||lB,O=q.NAMESPACE||A,de=q.MATHML_TEXT_INTEGRATION_POINTS||de,W=q.HTML_INTEGRATION_POINTS||W,we=q.CUSTOM_ELEMENT_HANDLING||{},q.CUSTOM_ELEMENT_HANDLING&&rt(q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),q.CUSTOM_ELEMENT_HANDLING&&rt(q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(we.allowCustomizedBuiltInElements=q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(N=!1),Bt&&(zt=!0),sr&&(ye=ft({},rB),Ee=[],sr.html===!0&&(ft(ye,tB),ft(Ee,nB)),sr.svg===!0&&(ft(ye,o6),ft(Ee,s6),ft(Ee,ex)),sr.svgFilters===!0&&(ft(ye,i6),ft(Ee,s6),ft(Ee,ex)),sr.mathMl===!0&&(ft(ye,a6),ft(Ee,oB),ft(Ee,ex))),q.ADD_TAGS&&(ye===Fe&&(ye=Wu(ye)),ft(ye,q.ADD_TAGS,Be)),q.ADD_ATTR&&(Ee===Oe&&(Ee=Wu(Ee)),ft(Ee,q.ADD_ATTR,Be)),q.ADD_URI_SAFE_ATTR&&ft(Dr,q.ADD_URI_SAFE_ATTR,Be),q.FORBID_CONTENTS&&(vn===Ko&&(vn=Wu(vn)),ft(vn,q.FORBID_CONTENTS,Be)),Fn&&(ye["#text"]=!0),ve&&ft(ye,["html","head","body"]),ye.table&&(ft(ye,["tbody"]),delete Le.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=q.TRUSTED_TYPES_POLICY,B=w.createHTML("")}else w===void 0&&(w=GQ(g,o)),w!==null&&typeof B=="string"&&(B=w.createHTML(""));Ao&&Ao(q),Ve=q}},en=ft({},[...o6,...i6,...PQ]),Tr=ft({},[...a6,..._Q]),xn=function(q){let Se=D(q);(!Se||!Se.tagName)&&(Se={namespaceURI:O,tagName:"template"});let Re=tx(q.tagName),xr=tx(Se.tagName);return Y[q.namespaceURI]?q.namespaceURI===C?Se.namespaceURI===A?Re==="svg":Se.namespaceURI===S?Re==="svg"&&(xr==="annotation-xml"||de[xr]):!!en[Re]:q.namespaceURI===S?Se.namespaceURI===A?Re==="math":Se.namespaceURI===C?Re==="math"&&W[xr]:!!Tr[Re]:q.namespaceURI===A?Se.namespaceURI===C&&!W[xr]||Se.namespaceURI===S&&!de[xr]?!1:!Tr[Re]&&(ie[Re]||!en[Re]):!!(J==="application/xhtml+xml"&&Y[q.namespaceURI]):!1},nr=function(q){Tg(r.removed,{element:q});try{D(q).removeChild(q)}catch(Se){v(q)}},tn=function(q,Se){try{Tg(r.removed,{attribute:Se.getAttributeNode(q),from:Se})}catch(Re){Tg(r.removed,{attribute:null,from:Se})}if(Se.removeAttribute(q),q==="is")if(zt||Bt)try{nr(Se)}catch(Re){}else try{Se.setAttribute(q,"")}catch(Re){}},rn=function(q){let Se=null,Re=null;if(Et)q="<remove></remove>"+q;else{let nn=eB(q,/^[\r\n\t ]+/);Re=nn&&nn[0]}J==="application/xhtml+xml"&&O===A&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");let xr=w?w.createHTML(q):q;if(O===A)try{Se=new h().parseFromString(xr,J)}catch(nn){}if(!Se||!Se.documentElement){Se=X.createDocument(O,"template",null);try{Se.documentElement.innerHTML=F?B:xr}catch(nn){}}let Jn=Se.body||Se.documentElement;return q&&Re&&Jn.insertBefore(t.createTextNode(Re),Jn.childNodes[0]||null),O===A?R.call(Se,ve?"html":"body")[0]:ve?Se.documentElement:Jn},_o=function(q){return L.call(q.ownerDocument||q,q,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},fo=function(q){return q instanceof f&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof d)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},Oo=function(q){return typeof u=="function"&&q instanceof u};function Gr($e,q,Se){Qv($e,Re=>{Re.call(r,q,Se,Ve)})}let xi=function(q){let Se=null;if(Gr(V.beforeSanitizeElements,q,null),fo(q))return nr(q),!0;let Re=Be(q.nodeName);if(Gr(V.uponSanitizeElement,q,{tagName:Re,allowedTags:ye}),Ie&&q.hasChildNodes()&&!Oo(q.firstElementChild)&&Mo(/<[/\w!]/g,q.innerHTML)&&Mo(/<[/\w!]/g,q.textContent)||q.nodeType===Pg.progressingInstruction||Ie&&q.nodeType===Pg.comment&&Mo(/<[/\w]/g,q.data))return nr(q),!0;if(!ye[Re]||Le[Re]){if(!Le[Re]&&Lg(Re)&&(we.tagNameCheck instanceof RegExp&&Mo(we.tagNameCheck,Re)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Re)))return!1;if(Fn&&!vn[Re]){let xr=D(q)||q.parentNode,Jn=T(q)||q.childNodes;if(Jn&&xr){let nn=Jn.length;for(let Fo=nn-1;Fo>=0;--Fo){let Rs=I(Jn[Fo],!0);Rs.__removalCount=(q.__removalCount||0)+1,xr.insertBefore(Rs,E(q))}}}return nr(q),!0}return q instanceof l&&!xn(q)||(Re==="noscript"||Re==="noembed"||Re==="noframes")&&Mo(/<\/no(script|embed|frames)/i,q.innerHTML)?(nr(q),!0):(De&&q.nodeType===Pg.text&&(Se=q.textContent,Qv([H,re,j],xr=>{Se=wg(Se,xr," ")}),q.textContent!==Se&&(Tg(r.removed,{element:q.cloneNode()}),q.textContent=Se)),Gr(V.afterSanitizeElements,q,null),!1)},Xu=function(q,Se,Re){if(Hr&&(Se==="id"||Se==="name")&&(Re in t||Re in ht))return!1;if(!(N&&!Qe[Se]&&Mo(me,Se))){if(!(Ge&&Mo(z,Se))){if(!Ee[Se]||Qe[Se]){if(!(Lg(q)&&(we.tagNameCheck instanceof RegExp&&Mo(we.tagNameCheck,q)||we.tagNameCheck instanceof Function&&we.tagNameCheck(q))&&(we.attributeNameCheck instanceof RegExp&&Mo(we.attributeNameCheck,Se)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(Se))||Se==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&Mo(we.tagNameCheck,Re)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Re))))return!1}else if(!Dr[Se]){if(!Mo(le,wg(Re,se,""))){if(!((Se==="src"||Se==="xlink:href"||Se==="href")&&q!=="script"&&TQ(Re,"data:")===0&&Cr[q])){if(!(xe&&!Mo(ue,wg(Re,se,"")))){if(Re)return!1}}}}}}return!0},Lg=function(q){return q!=="annotation-xml"&&eB(q,pe)},Rg=function(q){Gr(V.beforeSanitizeAttributes,q,null);let{attributes:Se}=q;if(!Se||fo(q))return;let Re={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0},xr=Se.length;for(;xr--;){let Jn=Se[xr],{name:nn,namespaceURI:Fo,value:Rs}=Jn,Im=Be(nn),ax=Rs,Yn=nn==="value"?ax:wQ(ax);if(Re.attrName=Im,Re.attrValue=Yn,Re.keepAttr=!0,Re.forceKeepAttr=void 0,Gr(V.uponSanitizeAttribute,q,Re),Yn=Re.attrValue,_n&&(Im==="id"||Im==="name")&&(tn(nn,q),Yn=On+Yn),Ie&&Mo(/((--!?|])>)|<\/(style|title)/i,Yn)){tn(nn,q);continue}if(Re.forceKeepAttr)continue;if(!Re.keepAttr){tn(nn,q);continue}if(!Z&&Mo(/\/>/i,Yn)){tn(nn,q);continue}De&&Qv([H,re,j],h6=>{Yn=wg(Yn,h6," ")});let m6=Be(q.nodeName);if(!Xu(m6,Im,Yn)){tn(nn,q);continue}if(w&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Fo)switch(g.getAttributeType(m6,Im)){case"TrustedHTML":{Yn=w.createHTML(Yn);break}case"TrustedScriptURL":{Yn=w.createScriptURL(Yn);break}}if(Yn!==ax)try{Fo?q.setAttributeNS(Fo,nn,Yn):q.setAttribute(nn,Yn),fo(q)?nr(q):Q8(r.removed)}catch(h6){tn(nn,q)}}Gr(V.afterSanitizeAttributes,q,null)},ix=function $e(q){let Se=null,Re=_o(q);for(Gr(V.beforeSanitizeShadowDOM,q,null);Se=Re.nextNode();)Gr(V.uponSanitizeShadowNode,Se,null),xi(Se),Rg(Se),Se.content instanceof i&&$e(Se.content);Gr(V.afterSanitizeShadowDOM,q,null)};return r.sanitize=function($e){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=null,Re=null,xr=null,Jn=null;if(F=!$e,F&&($e="<!-->"),typeof $e!="string"&&!Oo($e))if(typeof $e.toString=="function"){if($e=$e.toString(),typeof $e!="string")throw Mg("dirty is not a string, aborting")}else throw Mg("toString is not a function");if(!r.isSupported)return $e;if(Ne||qt(q),r.removed=[],typeof $e=="string"&&(vr=!1),vr){if($e.nodeName){let Rs=Be($e.nodeName);if(!ye[Rs]||Le[Rs])throw Mg("root node is forbidden and cannot be sanitized in-place")}}else if($e instanceof u)Se=rn("<!---->"),Re=Se.ownerDocument.importNode($e,!0),Re.nodeType===Pg.element&&Re.nodeName==="BODY"||Re.nodeName==="HTML"?Se=Re:Se.appendChild(Re);else{if(!zt&&!De&&!ve&&$e.indexOf("<")===-1)return w&&rr?w.createHTML($e):$e;if(Se=rn($e),!Se)return zt?null:rr?B:""}Se&&Et&&nr(Se.firstChild);let nn=_o(vr?$e:Se);for(;xr=nn.nextNode();)xi(xr),Rg(xr),xr.content instanceof i&&ix(xr.content);if(vr)return $e;if(zt){if(Bt)for(Jn=P.call(Se.ownerDocument);Se.firstChild;)Jn.appendChild(Se.firstChild);else Jn=Se;return(Ee.shadowroot||Ee.shadowrootmode)&&(Jn=$.call(n,Jn,!0)),Jn}let Fo=ve?Se.outerHTML:Se.innerHTML;return ve&&ye["!doctype"]&&Se.ownerDocument&&Se.ownerDocument.doctype&&Se.ownerDocument.doctype.name&&Mo(cB,Se.ownerDocument.doctype.name)&&(Fo="<!DOCTYPE "+Se.ownerDocument.doctype.name+">\n"+Fo),De&&Qv([H,re,j],Rs=>{Fo=wg(Fo,Rs," ")}),w&&rr?w.createHTML(Fo):Fo},r.setConfig=function(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qt($e),Ne=!0},r.clearConfig=function(){Ve=null,Ne=!1},r.isValidAttribute=function($e,q,Se){Ve||qt({});let Re=Be($e),xr=Be(q);return Xu(Re,xr,Se)},r.addHook=function($e,q){typeof q=="function"&&Tg(V[$e],q)},r.removeHook=function($e,q){if(q!==void 0){let Se=CQ(V[$e],q);return Se===-1?void 0:DQ(V[$e],Se,1)[0]}return Q8(V[$e])},r.removeHooks=function($e){V[$e]=[]},r.removeAllHooks=function(){V=aB()},r}var pB=dB();var zQ={"connection-stairs-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>',"connection-elevator-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>',"point-of-interest-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>',"door-12x12":'<svg viewBox="0 0 13 12">\n <path\n stroke="none"\n d="M4.02533 0.662341H9.61421C9.95171 0.662341 10.2264 0.937033 10.2264 1.27453V10.726C10.2264 11.0639 9.95218 11.3382 9.61421 11.3382H4.02533C3.69721 11.3382 3.42674 11.078 3.41408 10.7504V1.24696C3.4272 0.919297 3.69721 0.659149 4.02533 0.659149V0.662341ZM5.96969 5.22798H6.64563V6.7725H5.96969V5.22798ZM4.94219 1.39218L7.31267 2.6541C7.43501 2.71973 7.50533 2.84488 7.50533 2.97473C7.50721 4.99181 7.50674 7.00877 7.50674 9.02585C7.50674 9.17679 7.41487 9.30663 7.28361 9.36195L4.94217 10.6084H9.49653V1.39227L4.94219 1.39218Z"\n />\n </svg>',"building-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n d="M11.2374 9.75H10.5V4.5C10.5 4.30109 10.421 4.11032 10.2804 3.96967C10.1397 3.82902 9.94894 3.75 9.75003 3.75H7.68753C7.6378 3.75 7.59011 3.76976 7.55495 3.80492C7.51978 3.84008 7.50003 3.88777 7.50003 3.9375V9.75H6.75003V1.51922C6.75127 1.4024 6.72592 1.28683 6.67589 1.18125C6.62587 1.07567 6.55248 0.982864 6.46128 0.909845C6.33697 0.812924 6.18528 0.757635 6.02776 0.751829C5.87024 0.746023 5.71489 0.789995 5.58378 0.877501L1.83378 3.375C1.73091 3.44364 1.6466 3.53664 1.58837 3.64574C1.53014 3.75484 1.4998 3.87665 1.50003 4.00031V9.75H0.762687C0.66578 9.74857 0.571927 9.78389 0.500006 9.84885C0.428085 9.91382 0.383432 10.0036 0.37503 10.1002C0.371625 10.1515 0.378802 10.2029 0.396116 10.2513C0.413431 10.2997 0.440513 10.344 0.47568 10.3815C0.510847 10.419 0.553349 10.4489 0.600545 10.4693C0.647741 10.4897 0.698623 10.5001 0.75003 10.5H11.25C11.3014 10.5001 11.3523 10.4897 11.3995 10.4693C11.4467 10.4489 11.4892 10.419 11.5244 10.3815C11.5595 10.344 11.5866 10.2997 11.6039 10.2513C11.6213 10.2029 11.6284 10.1515 11.625 10.1002C11.6166 10.0036 11.572 9.91382 11.5001 9.84885C11.4281 9.78389 11.3343 9.74857 11.2374 9.75ZM3.56253 8.625C3.56264 8.67641 3.55219 8.72729 3.53181 8.77449C3.51143 8.82168 3.48156 8.86418 3.44406 8.89935C3.40657 8.93452 3.36224 8.9616 3.31383 8.97892C3.26543 8.99623 3.21398 9.00341 3.16269 9C3.06605 8.99159 2.9762 8.94688 2.91122 8.87485C2.84624 8.80283 2.81098 8.70886 2.81253 8.61188V7.88766C2.81121 7.79078 2.84657 7.69699 2.91151 7.62509C2.97645 7.55319 3.06618 7.50851 3.16269 7.5C3.21398 7.4966 3.26543 7.50377 3.31383 7.52109C3.36224 7.5384 3.40657 7.56548 3.44406 7.60065C3.48156 7.63582 3.51143 7.67832 3.53181 7.72552C3.55219 7.77271 3.56264 7.82359 3.56253 7.875V8.625ZM3.56253 6C3.56264 6.05141 3.55219 6.10229 3.53181 6.14949C3.51143 6.19668 3.48156 6.23918 3.44406 6.27435C3.40657 6.30952 3.36224 6.3366 3.31383 6.35392C3.26543 6.37123 3.21398 6.37841 3.16269 6.375C3.06609 6.36649 2.9763 6.32174 2.91135 6.24974C2.84639 6.17774 2.81109 6.08383 2.81253 5.98688V5.26266C2.81121 5.16578 2.84657 5.07199 2.91151 5.00009C2.97645 4.92819 3.06618 4.88351 3.16269 4.875C3.21398 4.8716 3.26543 4.87877 3.31383 4.89609C3.36224 4.9134 3.40657 4.94048 3.44406 4.97565C3.48156 5.01082 3.51143 5.05332 3.53181 5.10052C3.55219 5.14771 3.56264 5.19859 3.56253 5.25V6ZM5.43753 8.625C5.43764 8.67641 5.42719 8.72729 5.40681 8.77449C5.38643 8.82168 5.35656 8.86418 5.31906 8.89935C5.28157 8.93452 5.23724 8.9616 5.18883 8.97892C5.14043 8.99623 5.08898 9.00341 5.03769 9C4.94122 8.9916 4.8515 8.94702 4.78654 8.8752C4.72159 8.80338 4.68622 8.70964 4.68753 8.61281V7.88766C4.68633 7.79086 4.72174 7.69718 4.78667 7.62539C4.8516 7.55359 4.94126 7.50897 5.03769 7.50047C5.08898 7.49706 5.14043 7.50424 5.18883 7.52156C5.23724 7.53887 5.28157 7.56595 5.31906 7.60112C5.35656 7.63629 5.38643 7.67879 5.40681 7.72598C5.42719 7.77318 5.43764 7.82406 5.43753 7.87547V8.625ZM5.43753 6C5.43764 6.05141 5.42719 6.10229 5.40681 6.14949C5.38643 6.19668 5.35656 6.23918 5.31906 6.27435C5.28157 6.30952 5.23724 6.3366 5.18883 6.35392C5.14043 6.37123 5.08898 6.37841 5.03769 6.375C4.94126 6.3665 4.8516 6.32188 4.78667 6.25008C4.72174 6.17829 4.68633 6.08461 4.68753 5.98781V5.26266C4.68633 5.16586 4.72174 5.07218 4.78667 5.00039C4.8516 4.92859 4.94126 4.88397 5.03769 4.87547C5.08898 4.87206 5.14043 4.87924 5.18883 4.89656C5.23724 4.91387 5.28157 4.94095 5.31906 4.97612C5.35656 5.01129 5.38643 5.05379 5.40681 5.10098C5.42719 5.14818 5.43764 5.19906 5.43753 5.25047V6Z"\n stroke="none"\n />\n </svg>',"ladder-12x12":'<svg viewBox="0 0 12 12">\n <g id="surface1">\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.34375 0.375 L 2.53125 0.375 L 2.625 11.53125 L 2.34375 11.625 L 2.25 0.46875 Z M 2.34375 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 9.46875 0.375 L 9.65625 0.375 L 9.75 11.53125 L 9.46875 11.625 L 9.375 0.46875 Z M 9.46875 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 2.25 L 2.25 1.875 L 9.75 1.875 L 9.75 2.25 Z M 2.25 2.25 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 4.875 L 2.25 4.5 L 9.75 4.5 L 9.75 4.875 Z M 2.25 4.875 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 7.5 L 2.25 7.125 L 9.75 7.125 L 9.75 7.5 Z M 2.25 7.5 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 10.125 L 2.25 9.75 L 9.75 9.75 L 9.75 10.125 Z M 2.25 10.125 "/>\n </g>\n </svg>'},VQ=/<svg([^>]*)>/g;function fB(e,r,t){let n=zQ[e];return n?n.replace(VQ,'<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):null}function $Q(e){return pB.sanitize(e,{USE_PROFILES:{svg:!0}})}function HQ(e,r){let o=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;return o==null||o.tagName==="parsererror"||o.tagName.toLowerCase()!=="svg"?(K.error("Failed to parse SVG",{svg:e,tagName:o==null?void 0:o.tagName}),e):(r!=null&&(o.setAttribute("color",r),o.querySelectorAll("*").forEach(u=>{(u.getAttribute("fill")!=null||u.tagName==="path")&&u.getAttribute("fill")!=="none"&&u.setAttribute("fill","currentColor"),u.getAttribute("stroke")!=null&&u.getAttribute("stroke")!=="none"&&u.setAttribute("stroke","currentColor")})),new XMLSerializer().serializeToString(o))}async function mB(e,r){let t="";try{if(e.trim()==="")throw new Error("URL is empty!");(r==null?void 0:r.style)==="fill"&&(e=e.replace(".svg","-fill.svg"));let n=await ci()(e),o=n.headers.get("content-type");if(o!=null&&o.includes("image/svg+xml")){let i=await n.text();return t=$Q(i),(r==null?void 0:r.color)!=null&&(t=HQ(t,r.color)),{icon:t,type:"svg"}}else{if(o!=null&&o.includes("image"))return{icon:e,type:"image"};throw new Error("Expected SVG or Image content, but received: ".concat(o))}}catch(n){return K.error("Failed to fetch icon from ".concat(e,"."),n),null}}p();function hB(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Restroom")))}function gB(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Parking")))}var bB=new Set(["connection","point-of-interest","space","object","door","facade"]),wd={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},gm={elevator:"connection-elevator-12x12",escalator:"connection-stairs-12x12",stairs:"connection-stairs-12x12",point:"point-of-interest-12x12",door:"door-12x12",building:"building-12x12",ladder:"ladder-12x12"};function ZQ(e){let r=null;if(Zn.is(e))switch(e.type){case"elevator":r=gm.elevator;break;case"ladder":r=gm.ladder;break;case"escalator":case"stairs":default:r=gm.stairs}else vo.is(e)?r=gm.point:$n.is(e)?r=gm.door:qr.is(e)&&(r=gm.building);return r!=null?fB(r,"#FFFFFF",12):null}function yB(e){return Zn.is(e)?wd.connection:qr.is(e)?wd.default:hB(e)?wd.washroom:gB(e)?wd.parking:vo.is(e)?wd.point:$n.is(e)?wd.door:wd.default}async function WQ(e,r){var o;let t=null,n="locationProfiles"in e?(o=e.locationProfiles.find(i=>i.icon!=null))==null?void 0:o.icon:null;if((n==null?void 0:n.url)!=null&&(t=await mB(n.url,{color:r.color,style:"fill"})),t==null){let i=ZQ(e);i!=null&&(t={icon:i,type:"svg"})}return t}function XQ(e){return Zn.is(e)||$n.is(e)?"low":vo.is(e)||qr.is(e)?"high":"medium"}async function qQ(e){let r={appearance:{color:yB(e),pinOutlineColor:yB(e),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:XQ(e),interactive:!0},t=await WQ(e,{color:"#FFFFFF"});return t!=null&&(r.appearance.icon=t.icon,t.type==="svg"?qr.is(e)&&(r.appearance.iconSize=30,r.appearance.iconPadding=10):t.type==="image"&&(r.appearance.iconSize=48,r.appearance.iconPadding=2,r.appearance.pinOutlineColor="#FFFFFF",r.rank="high")),r}async function vB(e,r){return(await Promise.all(r.map(async n=>{let o=[];if(!wc(n))return o;let i=await qQ(n);return Zn.is(n)?o=n.coordinates.map(a=>e.Labels.add(a,n.name,i)):qr.is(n)?n.spaces.length>0&&n.floorStack.name!=null&&n.floorStack.name!==""&&o.push(e.Labels.add(n.spaces[0],n.floorStack.name,i)):Y8(n)&&F2(n)&&o.push(e.Labels.add(n,n.name,i)),o}))).flat()}async function xB(e,r){let t=e.getMapDataInternal();if(!t)throw new Error("Map data not found");let n=t.getAllOfTypes(bB,r),o=t.getAllOfTypes(W8,r),i=t.getAllOfTypes(q8,r),[a,u]=await Promise.all([n.length>0?vB(e,n):[],o.length>0?X8(e,o):[],i.length>0?J8(e,i):[]]);return{labels:a,markers:u}}var rx=.05,Og,Fg,_g=class extends Je{constructor(t,n,o){super();m(this,"core");m(this,"mapObjects",[]);m(this,"id");m(this,"mapDataExternal",{});m(this,"mapsByFloorId",{});m(this,"mapData");m(this,"currentMap");m(this,"hiddenOutdoorGeometries",[]);m(this,"lastFacadeIntersected");M(this,Og,!1);M(this,Fg,!1);m(this,"mapView");m(this,"externalPubSub");m(this,"Camera");m(this,"Labels");m(this,"Text3D");m(this,"Markers");m(this,"Models");m(this,"Paths");m(this,"Exporter");m(this,"Navigation");m(this,"Outdoor");m(this,"Shapes");m(this,"Style");m(this,"Image3D");m(this,"update",()=>{this.core.render()});this.core=t,this.mapView=n,this.externalPubSub=o,this.Camera=new K0(this),this.id=this.core.addGroupContainer("root").id.toString();let i=new ig("outdoors-container",void 0,void 0,this);this.mapObjects.push(i),this.currentMap=i,this.core.on("pre-render",()=>{o.publish("pre-render")},{signal:this.signal}),this.core.on("post-render",()=>{o.publish("post-render")},{signal:this.signal}),this.core.on("resize",()=>{o.publish("resize")},{signal:this.signal}),this.core.on("render-error",({error:d})=>{o.publish("render-error",{error:new b6(d instanceof Error?d.message:"Unknown error")})},{signal:this.signal});let a=d=>{let f=d;d.startsWith("".concat(Ir,"-"))&&(f=d.slice(Ir.length+1));let h=this.getMapDataObject(f);switch(h==null?void 0:h.__type){case"facade":return h;case"floor":return h.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let f=new Set;for(let h of d){let g=a(h);g&&f.add(g)}o.publish("facades-in-view-change",{facades:Array.from(f)})},{signal:this.signal}),this.core.getSystems().renderSystem.on("camera-state-change",()=>{o.publish("state-change-internal",{Camera:this.getCameraState()})},{signal:this.signal});let u=new Z0(this.Camera,{precision:7});this.core.on("camera-change",()=>{o.publish("camera-change",u)},{signal:this.signal}),this.core.on("pan-bounds-change",d=>{o.publish("camera-bounds-change",Ib(d,this.core.convert3DMapPositionToCoordinate))},{signal:this.signal});let l=d=>f=>{let h=[],g=[],b=[],I=[];f.labels.forEach(L=>{let P=this.Labels.getById(L.toString());P&&h.push(P.label)}),f.markers.forEach(L=>{let P=this.Markers.getById(L.toString())||this.Navigation.getMarkerById(L.toString());P&&g.push(P.marker)}),f.models.forEach(L=>{let P=this.Models.getById(L.toString());P&&b.push(P.model)}),f.paths.forEach(L=>{let P=this.Paths.getById(L.toString());P&&I.push(P)});let v=f.geometry,E;v.length>0&&(E=v.map(L=>{var P;return(P=this.getMapDataInternal())==null?void 0:P.getById("space",L)}).filter(Boolean)[0],E||(E=v.map(L=>{var P;return(P=this.getMapDataInternal())==null?void 0:P.getById("object",L)}).filter(Boolean)[0]),E||(E=v.map(L=>{var P;return(P=this.getMapDataInternal())==null?void 0:P.getById("area",L)}).filter(Boolean)[0]),E||(E=v.map(L=>this.Shapes.getById(L)).filter(Boolean)[0]));let T=f.containers.reduce((L,P)=>{var $;let R=($=this.getMapDataInternal())==null?void 0:$.getById("floor",P);return R&&Zo.is(R)&&L.push(R),L},[]),D,w=0;if(T.length>0){D=T[0].id;let L=this.core.getState(D);w=f.coordinate[2]?f.coordinate[2]-L.altitude:w}let B;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(L=>{this.core.setState(L.id,{hovered:!1})}),E&&Fr.is(E)&&(B=v.map(L=>{var P;return(P=this.getMapDataInternal())==null?void 0:P.facadesBySpaceId[L]}).filter(Boolean)[0],B&&B.spaces.forEach(L=>{this.core.setState(L.id,{hovered:!0})})),this.lastFacadeIntersected=B;let X={coordinate:new je({latitude:f.coordinate[1],longitude:f.coordinate[0],floorId:D,verticalOffset:w}),spaces:E&&Fr.is(E)?[E]:[],objects:E&&uo.is(E)?[E]:[],areas:E&&$o.is(E)?[E]:[],shapes:E&&Bu.is(E)?[E]:[],markers:g,labels:h,models:b,paths:I,floors:T,facades:B?[B]:[]};"pointerEvent"in f&&(X.pointerEvent=f.pointerEvent),o.publish(d,X)};this.core.on("hover",l("hover"),{signal:this.signal}),this.core.on("click",l("click"),{signal:this.signal}),this.core.on("user-interaction-start",()=>{o.publish("user-interaction-start")},{signal:this.signal}),this.core.on("user-interaction-end",()=>{o.publish("user-interaction-end")},{signal:this.signal});let c={currentMapGetter:()=>this.currentMap};this.Markers=new ag(c),this.Models=new cg(c),this.Labels=new tg(c),this.Text3D=new xg(c),this.Exporter=new eg(c),this.Paths=new pg(c),this.Navigation=new Y0(this),this.on("navigation-state-change",d=>{this.externalPubSub.publish("state-change-internal",{Navigation:d})}),this.on("navigation-connection-click",d=>{this.externalPubSub.publish("navigation-connection-click",d)}),this.on("navigation-active-path-change",d=>{this.externalPubSub.publish("navigation-active-path-change",d)}),this.Outdoor=new fm(this.core,this.hiddenOutdoorGeometries),this.Outdoor.enabled&&(this.core.on("outdoor-view-loaded",()=>{o.publish("outdoor-view-loaded")},{signal:this.signal}),this.core.on("outdoor-style-loaded",()=>{o.publish("outdoor-style-loaded")},{signal:this.signal})),this.Image3D=new ug(c),this.Shapes=new mg(c),this.Style=new gg(c)}get manualFloorVisibility(){return s(this,Og)}set manualFloorVisibility(t){k(this,Og,t),this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:t})}get hidePathsNotOnCurrentFloor(){return s(this,Fg)}set hidePathsNotOnCurrentFloor(t){var n;k(this,Fg,t),(n=this.currentMap)==null||n.updateOutdoorPathLayerVisibility()}preloadFloors(t){t.forEach(n=>{n instanceof Zo&&this.core.setState(n.id,{preloadGeometry:!0})})}updateState(t,n){var a,u;if(n==null||typeof n!="object")return;let o=(u=(a=this.currentMap.options)==null?void 0:a.disableUpdateStateValidation)!=null?u:!1;if(t==="interior-walls"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(Ir);if(d){let f=d.layers.get(Sl);f&&this.core.hasState(f)&&this.core.setState(f,BS(Xt(kS,n,{warn:!0,disableValidation:o}),this.core.getState(f)))}});return}if(t==="exterior-walls"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(Ir);if(d){let f=d.layers.get(ys);f&&this.core.hasState(f)&&this.core.setState(f,BS(Xt(kS,n,{warn:!0,disableValidation:o}),this.core.getState(f)))}});return}if(t==="interior-doors"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(Ir);if(d){let f=d.layers.get(nf);f&&this.core.hasState(f)&&this.core.setState(f,Cv(Xt(Sv,n,{warn:!0,disableValidation:o}),this.core.getState(f)))}});return}if(t==="exterior-doors"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(Ir);if(d){let f=d.layers.get(of);f&&this.core.hasState(f)&&this.core.setState(f,Cv(Xt(Sv,n,{warn:!0,disableValidation:o}),this.core.getState(f)))}});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(i.__type!==Fa.__type&&!this.core.hasState(i.id)){K.warn('Failed to update state for "'.concat(i.id,'". No ').concat(i.__type," found with that ID."));return}if(ku.is(i))return this.core.setState(i.id,Rk(Xt(Bk,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(Ms.is(i))return this.core.setState(i.id,Uk(Xt(Nk,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(Fr.is(i)||uo.is(i)){let c=this.core.getState(i.id);c!=null&&this.core.setState(i.id,kk(Xt(MS,n,{warn:!0,disableValidation:o}),c))}if($o.is(i)&&this.core.setState(i.id,Xt(MS,n,{warn:!0,disableValidation:o})),gd.is(i)&&this.core.setState(i.id,Xt(Yk,n,{warn:!0,disableValidation:o})),$n.is(i)&&this.core.setState(i.id,Cv(Xt(Sv,n,{warn:!0,disableValidation:o}),this.core.getState(i.id))),Bu.is(i)&&this.core.setState(i.id,Vk(Xt(OS,n,{warn:!0,disableValidation:o}))),bd.is(i)){let l=Xt(e8,n,{warn:!0,disableValidation:o}),{position:c,scale:d,rotation:f}=l,g=kn(l,["position","scale","rotation"]);c&&(g.position=[c.longitude,c.latitude,c.verticalOffset]),d!=null&&(Array.isArray(d)?g.scale=d:g.scale=[d,d,d]),f!=null&&(Array.isArray(f)?g.rotation=f:g.rotation=[f,f,f]),c&&i.updateTarget(c),this.core.setState(i.id,g)}if(Zo.is(i)){let c=this.currentMap.floorsById.get(i.id);if(c==null)return;let d=Xt(Pk,n,{warn:!0,disableValidation:o});this.core.setState(i.id,d);let f=c.layers.get(Ir);f!=null&&"geometry"in n&&n.geometry&&this.core.setState(f.containerId,Xt(Ik,n.geometry,{warn:!0,disableValidation:o}));let h=c.layers.get(bs);if(h!=null&&"labels"in n&&n.labels){let D=Xt(Sk,n.labels,{warn:!0,disableValidation:o});"enabled"in D&&typeof D.enabled=="boolean"&&h.setVisible(D.enabled)}let g=c.layers.get(ba);if(g!=null&&"markers"in n&&n.markers){let D=Xt(Ck,n.markers,{warn:!0,disableValidation:o});"enabled"in D&&typeof D.enabled=="boolean"&&g.setVisible(D.enabled)}let b=c.layers.get(af);b!=null&&"footprint"in n&&n.footprint&&this.core.setState(b.containerId,Xt(Ek,n.footprint,{warn:!0,disableValidation:o}));let I=c.layers.get(Lc);if(I!=null&&"occlusion"in n&&n.occlusion){let D=Xt(Tk,n.occlusion,{warn:!0,disableValidation:o});"enabled"in D&&typeof D.enabled=="boolean"&&I.setVisible(D.enabled)}let v=c.layers.get(sf);if(v!=null&&"images"in n&&n.images){let D=Xt(Dk,n.images,{warn:!0,disableValidation:o});"visible"in D&&typeof D.visible=="boolean"&&v.setVisible(D.visible)}let E=c.layers.get(vs);if(E!=null&&"paths"in n&&n.paths!=null){let D=Xt(wk,n.paths,{warn:!0,disableValidation:o});D.visible!=null&&typeof D.visible=="boolean"&&E.setVisible(D.visible)}let T=c.layers.get(Rc);if(T!=null&&"areas"in n&&n.areas!=null){let D=Xt(Mk,n.areas,{warn:!0,disableValidation:o});D.visible!=null&&typeof D.visible=="boolean"&&T.setVisible(D.visible)}if("text3d"in n&&n.text3d!=null){let D=Xt(Ak,n.text3d,{warn:!0,disableValidation:o});D.visible!=null&&c.setBatchedTextVisible(D.visible)}}if(qr.is(i)){let c=this.core.getState(i.id);for(let d of c.children)d.type==="group-container"&&this.core.setState(d.id,Xt(dk,n,{warn:!0,disableValidation:o}))}if(Vl.is(i)&&this.core.setState(i.id,Xt(Wk,n,{warn:!0,disableValidation:o})),Fa.is(i)){let c=Xt(IS,n,{warn:!0,disableValidation:o}),d=pm(c);for(let f of i.segments)this.core.setState(f.id,d)}if(Gl.is(i)){let c=Xt(IS,n,{warn:!0,disableValidation:o}),d=pm(c);this.core.setState(i.id,d)}}}getMapDataObject(t){var n;return(n=this.getMapDataInternal())==null?void 0:n.getMapDataById(t)}getMapDataInternal(){if(this.mapData)return Gm(this.mapData)}getMapData(){return this.mapData}addMap(t,n){return new Promise(o=>{var f,h,g,b;let i;try{i=Gm(t)}catch(I){K.error("Error adding map",I),o(t);return}this.mapDataExternal[t.mapName]=t,this.mapData=t;let{mvf:a}=i,u=a["manifest.geojson"].features[0].geometry.coordinates;this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:new je(u[1],u[0])});let l=a["manifest.geojson"].features[0].properties.name,c=new ig("mapObject-".concat(l),i,n,this);this.currentMap=c,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId),this.core.renderSync();let d=(h=(f=n==null?void 0:n.outdoorView)==null?void 0:f.layersHiddenByGeometry)!=null?h:[];if(d.length>0){let I=[];for(let v of c.floorStacksById.values())v.isOutdoors===!1&&v.defaultFloor.footprint&&v.defaultFloor.footprint.geometry!=null&&((g=v.defaultFloor.footprint.geometry)==null?void 0:g.coordinates.length)>0&&I.push(v.defaultFloor.footprint);I.length>0&&(this.core.hideOutdoorLayersIntersectingPolygons(I,d),this.hiddenOutdoorGeometries.push([I,d]))}if(this.mapObjects.push(c),i.getMVFFeatureByType("floor").forEach(I=>{this.mapsByFloorId[I.id]=c}),c.on("floor-change-start",I=>{var v,E,T,D;this.externalPubSub.publish("floor-change-start",{reason:I.reason,floor:(E=(v=this.getMapDataInternal())==null?void 0:v.getById("floor",I.floorId))!=null?E:this.currentFloor,previousFloor:(D=(T=this.getMapDataInternal())==null?void 0:T.getById("floor",I.previousFloorId))!=null?D:this.currentFloor})},{signal:this.signal}),c.on("floor-change",I=>{var v,E;this.externalPubSub.publish("floor-change",{reason:I.reason,floor:this.currentFloor,previousFloor:(E=(v=this.getMapDataInternal())==null?void 0:v.getById("floor",I.previousFloorId))!=null?E:this.currentFloor}),this.externalPubSub.publish("state-change-internal",{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack})},{signal:this.signal}),(n==null?void 0:n.zoomLevel)!=null)this.core.camera.setZoomLevel(n.zoomLevel),o(t);else if(this.core.mode!=="outdoors-overlay"&&this.currentFloor){let I=(b=n==null?void 0:n.screenOffsets)!=null?b:{top:rx*this.core.canvasHeight,left:rx*this.core.canvasWidth,right:rx*this.core.canvasWidth,bottom:rx*this.core.canvasHeight};this.Camera.focusOn(this.currentFloor,{duration:kP,screenOffsets:I}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),o(t)})}else o(t)})}setFloor(t,n){return this.currentMap.setFloor(kh(t),n)}setFloorStack(t,n){return this.currentMap.setFloorStack(kh(t),n)}updateWatermark(t){this.core.updateWatermark(t)}get currentFloorStack(){var o;let t=this.currentMap.currentFloorStack.id;if(!t)throw new En("Missing currentFloorStack.");let n=(o=this.mapData)==null?void 0:o.getById("floor-stack",t);if(!n)throw new En("FloorStack was not found in map data.");return n}get currentFloor(){var o;let t=this.currentMap.currentFloor.id;if(!t)throw new En("Missing currentFloor object from GeoJsonApi");let n=(o=this.mapData)==null?void 0:o.getById("floor",t);if(!n)throw new En("Missing currentFloor");return n}getState(t){var i,a;typeof t=="object"&&Fa.is(t)&&K.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let n=aI(t,this),o=this.core.getState(n);if(o){if(["interior-walls","exterior-walls"].includes(t)&&o.type==="geometry-group")return Jk(o);if(["interior-doors","exterior-doors"].includes(t)&&o.type==="geometry-group")return lk(o);if(o.type==="geometry")return Fk(o);if(o.type==="label"&&o.options.appearance&&o.options.rank!==void 0&&o.options.interactive!==void 0)return Lk(o);if(o.type==="marker"&&((i=o.options)==null?void 0:i.rank)!==void 0&&o.options.interactive!==void 0)return jk(o,(a=this.Markers.getById(o.id.toString()))==null?void 0:a.marker);if(o.type==="model")return t8(o);if(o.type==="image")return Kk(o);if(o.type==="text3d")return Xk(o);if(o.type==="geometry-group"&&t&&typeof t!="string"&&Bu.is(t))return zk(o);if(o.type==="path")return ik(o);if(o.type==="group-container"&&typeof t!="string"&&Zo.is(t))return _k(o,this.currentMap.floorsById.get(t.id),this.core);if(o.type==="group-container"&&o.children.length>0&&typeof t!="string"&&qr.is(t)){let u=this.core.getState(o.children[0].id);return pk(u)}}}__EXPERIMENTAL__getRenderedState(t){let n=aI(t,this);if(n)return this.core.getRenderedState(n)}setHoverColor(t){this.core.setState({hoverColor:t})}getHoverColor(){let t=this.core.getState();return(t==null?void 0:t.type)==="map-view"?t.hoverColor:void 0}createCoordinateFromScreenCoordinate(t,n,o){var c;if(o!=null){let d=this.core.projectScreenXYToCoordinate(t,n,!0);return d?new je(d.coordinate[1],d.coordinate[0],o.id):void 0}let i=this.core.projectScreenXYToCoordinate(t,n);if(i==null||i.coordinate==null)return;let{coordinate:a,groupContainers:u}=i,l=(c=u==null?void 0:u.find(d=>{let f=d.userData.entityId.toString();return f.includes("f_")||f.includes("m_")}))==null?void 0:c.userData.entityId.toString();return new je(a[1],a[0],l)}getScreenCoordinateFromCoordinate(t){var o,i,a;let n=0;if(t.floorId!=null){let u=(o=this.mapData)==null?void 0:o.getById("floor",t.floorId);u!=null&&(n=(a=(i=this.getState(u))==null?void 0:i.altitude)!=null?a:0)}return this.core.projectCoordinateToScreenXY([t.longitude,t.latitude,n])}isInView(t){return this.core.isInView(typeof t=="string"?t:t.id)}getInView(t,n){let o=this.core.queryGeometry2DInView({screenOffsets:n==null?void 0:n.screenOffsets,fullyContains:n==null?void 0:n.fullyContains});if(o.length===0)return[];let i=[];switch(t){case ku.__type:i=o.map(a=>this.Labels.getById(a)).filter(a=>a!=null).map(a=>a.label);break;case Ms.__type:i=o.map(a=>this.Markers.getById(a)).filter(a=>a!=null).map(a=>a.marker)}return i}async __EXPERIMENTAL__auto(t){return await xB(this,t)}tween(t){let n=new Ta(t);return this.core.getExternalTweenGroup().add(n),this.core.render(),n}removeTween(t){this.core.getExternalTweenGroup().remove(t)}tweenGroup(){return this.core.getExternalTweenGroup()}get __core(){return this.core}getCameraState(){return this.core.camera.getState()}getNavigationState(){return{isMultiFloor:this.Navigation.isMultiFloor,floorStacks:this.Navigation.floorStacks,floors:this.Navigation.floors,activeDirections:this.Navigation.activeDirections,activePath:this.Navigation.activePath,paths:this.Navigation.paths}}getAllState(){return{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack,Camera:this.getCameraState(),Navigation:this.getNavigationState(),manualFloorVisibility:this.manualFloorVisibility}}publishAllState(){this.externalPubSub.publish("state-change-internal",this.getAllState())}clear(){this.Navigation.clear(),this.Shapes.removeAll(),this.Paths.removeAll(),this.Models.removeAll(),this.Markers.removeAll(),this.Image3D.removeAll(),this.Labels.removeAll()}destroy(){this.clear(),super.destroy(),this.core.destroy()}getOptimalVisualDistanceBetweenFloors(t,n=!1){let o=this.currentMap;if(!o){K.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(t.length<2){K.warn("Cannot compute optimal visual distance between floors. Must provide at least 2 floors.");return}let i=o.renderer.getInternalState().geometry3DMap.get(t[0].id),a=o.renderer.getInternalState().geometry3DMap.get(t[1].id);if(!i||!a){K.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}if(Rd(i,"group-container"),Rd(a,"group-container"),n){let l=new Zr;l.setFromObject(i);let c=new Zr;if(c.setFromObject(a),i.children.forEach(v=>{v instanceof tt&&v.userData.debugBox&&an(v)}),a.children.forEach(v=>{v instanceof tt&&v.userData.debugBox&&an(v)}),!tc(l)||!tc(c))return;let d=new Ns(l.max.x-l.min.x,l.max.y-l.min.y,l.max.z-l.min.z),f=new on({color:255,transparent:!0,opacity:.5}),h=new tt(d,f);h.position.set((l.min.x+l.max.x)/2,(l.min.y+l.max.y)/2,(l.min.z+l.max.z)/2),h.userData.debugBox=!0;let g=new Ns(c.max.x-c.min.x,c.max.y-c.min.y,c.max.z-c.min.z),b=new on({color:"cyan",transparent:!0,opacity:.5}),I=new tt(g,b);I.position.set((c.min.x+c.max.x)/2,(c.min.y+c.max.y)/2,(c.min.z+c.max.z)/2),I.userData.debugBox=!0,i.add(h),a.add(I)}let u=o.renderer.computeMinZOffsetBetweenContainers(i,a);if(u!==-1)return u}};Og=new WeakMap,Fg=new WeakMap;function JQ(e){if(e===""){dS(""),cS("");return}cS("".concat(e,"/").concat(xx)),dS("".concat(e,"/").concat(vx))}p();var nx=class{constructor(r){m(this,"state");m(this,"update");this.update=r.Debug.update.bind(r.Debug),this.state=r.Debug.state}};p();import Bs from"zod";var EB=Bs.strictObject({environment:Bs.union([Bs.literal("basic"),Bs.literal(!1)]).optional(),text3d:Bs.object({hoverColor:Bs.string().optional()}).optional(),geometry:Bs.object({hoverColor:Bs.string().optional()}).optional(),backgroundColor:Bs.string().optional(),backgroundAlpha:Bs.number().optional()});p();var c6=Kl(LB(),1);var YQ=(e,r)=>{let t={},n=(o,i,a)=>{for(let u in i){let l=o[u],c=i[u];typeof c=="object"&&!Array.isArray(c)&&c!==null&&typeof l=="object"&&!Array.isArray(l)&&l!==null?(a[u]={},n(l,c,a[u])):a[u]=l}};return n(e,r,t),t},IB=(e,r)=>{let t=YQ(e,r),n=(0,c6.default)({},t,r),o=(0,c6.default)({},t),i=(a,u,l,c=o)=>{for(let d in u){let f=a[d],h=u[d];if(typeof h=="number"&&typeof f=="number")c[d]=f+(h-f)*l;else if(typeof h=="string"&&typeof f=="string"){if(Pm(f)&&Pm(h)){let g=lx(f),b=lx(h);g&&b?c[d]=q6([g[0]+(b[0]-g[0])*l,g[1]+(b[1]-g[1])*l,g[2]+(b[2]-g[2])*l]):K.warn('Color "'.concat(d,'" could not be animated!'))}}else typeof h=="object"&&h!==null&&typeof f=="object"&&f!==null?i(f,h,l,c[d]):K.warn('Value "'.concat(d,'" could not be animated!'))}};return a=>(a=Math.min(Math.max(a,0),1),a===0?e:a===1?n:(i(t,r,a),o))};var Jl,Ae,Yo,kg=class{constructor(r){M(this,Jl);M(this,Ae);M(this,Yo);m(this,"Camera");m(this,"Labels");m(this,"Text3D");m(this,"Markers");m(this,"Image3D");m(this,"Models");m(this,"Paths");m(this,"Exporter");m(this,"Navigation");m(this,"Style");m(this,"Shapes");m(this,"Outdoor");m(this,"update",()=>{s(this,Ae).core.render()});m(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,Ae).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_SYNC(r,t,n))!=null?i:void 0});m(this,"getDirections",(r,t,n)=>{var o,i;return(i=(o=s(this,Ae).getMapData())==null?void 0:o.getDirections(r,t,n))!=null?i:Promise.resolve(void 0)});m(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,Ae).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n))!=null?i:void 0});m(this,"getDirectionsMultiDestination",(r,t,n)=>{var o,i;return(i=(o=s(this,Ae).getMapData())==null?void 0:o.getDirectionsMultiDestination(r,t,n))!=null?i:Promise.resolve(void 0)});m(this,"on",(r,t)=>{s(this,Jl).on(r,t)});m(this,"off",(r,t)=>{s(this,Jl).off(r,t)});m(this,"Debug");k(this,Jl,new Je),k(this,Yo,r);let t=new _g(r,this,s(this,Jl));k(this,Ae,t),this.Camera=s(this,Ae).Camera,this.Markers=s(this,Ae).Markers,this.Models=s(this,Ae).Models,this.Labels=s(this,Ae).Labels,this.Text3D=s(this,Ae).Text3D,this.Exporter=s(this,Ae).Exporter,this.Paths=s(this,Ae).Paths,this.Navigation=s(this,Ae).Navigation,this.Shapes=s(this,Ae).Shapes,this.Style=s(this,Ae).Style,this.Outdoor=s(this,Ae).Outdoor,this.Image3D=s(this,Ae).Image3D,s(this,Yo).container.dataset.version=y.env.npm_package_version,this.Debug=new nx(s(this,Ae).core)}updateState(r,t){return s(this,Ae).updateState(r,t)}animateState(r,t,n){var l;let o=s(this,Ae).getState(r);if(o==null)return K.warn("Cannot animate state of ".concat(r,".")),new Promise(d=>d({result:"completed"}));let i=IB(o,t),a=s(this,Ae).tween({percent:0}).to({percent:1},(l=n==null?void 0:n.duration)!=null?l:1e3).onUpdate(({percent:c})=>{s(this,Ae).updateState(r,i(c))});n!=null&&n.easing&&n.easing in Cs&&a.easing(Cs[n.easing]);let u=new Promise(c=>{a.onComplete(()=>{s(this,Ae).removeTween(a),c({result:"completed"})}).onStop(()=>{s(this,Ae).removeTween(a),c({result:"cancelled"})}),a.start()});return u.cancel=()=>{a.stop(),s(this,Ae).updateState(r,i(0))},u}updateGlobalState(r){var t,n,o,i;try{EB.parse(r)}catch(a){K.error("updateGlobalState",a);return}if(typeof r=="object"){let a={};if((t=r.text3d)!=null&&t.hoverColor&&(a.text3dHoverColor=r.text3d.hoverColor),(n=r.geometry)!=null&&n.hoverColor&&(a.hoverColor=r.geometry.hoverColor),r.backgroundColor||r.backgroundAlpha!==void 0){let u=(o=r.backgroundColor)!=null?o:s(this,Ae).core.backgroundColor,l=(i=r.backgroundAlpha)!=null?i:s(this,Ae).core.backgroundAlpha;s(this,Ae).core.setBackgroundColor(u,l)}r.environment!=null&&s(this,Ae).core.setEnvironment(r.environment),s(this,Ae).core.setState(a)}}get options(){return RP(s(this,Ae).currentMap.options)}getGlobalState(){let r=s(this,Ae).core.getState();return{backgroundColor:s(this,Ae).core.backgroundColor,backgroundAlpha:s(this,Ae).core.backgroundAlpha,environment:s(this,Ae).core.getEnvironment(),geometry:{hoverColor:r.hoverColor},text3d:{hoverColor:r.text3dHoverColor}}}getMapData(){if(s(this,Ae).mapData==null)throw new En("MapData not found.");return s(this,Ae).mapData}getDimensions(){return{width:s(this,Yo).canvasWidth,height:s(this,Yo).canvasHeight}}addMap(r,t){return s(this,Ae).addMap(r,t)}setFloor(r,t){return s(this,Ae).setFloor(r,t==null?void 0:t.context)}setFloorStack(r,t){return s(this,Ae).setFloorStack(r,t==null?void 0:t.context)}preloadFloors(r){s(this,Ae).preloadFloors(r)}tween(r){return s(this,Ae).tween(r)}removeTween(r){s(this,Ae).removeTween(r)}get tweenGroup(){return s(this,Ae).tweenGroup()}get currentFloorStack(){return s(this,Ae).currentFloorStack}get currentFloor(){return s(this,Ae).currentFloor}updateWatermark(r){s(this,Ae).updateWatermark(r)}getState(r){return s(this,Ae).getState(r)}__EXPERIMENTAL__getRenderedState(r){return s(this,Ae).__EXPERIMENTAL__getRenderedState(r)}setHoverColor(r){s(this,Ae).setHoverColor(r)}getHoverColor(){return s(this,Ae).getHoverColor()}convertAltitudeToMercatorZoomLevel(r){return s(this,Ae).core.getSystems().cameraSystem.convertAltitudeToZoomLevel(r)}convertMercatorZoomLevelToAltitude(r){return s(this,Ae).core.getSystems().cameraSystem.convertZoomLevelToAltitude(r)}isInView(r){return s(this,Ae).isInView(r)}getInView(r,t){return s(this,Ae).getInView(r,t)}getMetersPerPixel(){return s(this,Ae).core.getMetersPerPixel()}getDistance(r,t){var n;return(n=s(this,Ae).getMapData())==null?void 0:n.getDistance(r,t)}createCoordinate(r,t,n){return typeof r=="object"?new je(r):new je(r,t,n==null?void 0:n.id)}createCoordinateFromScreenCoordinate(r,t,n){return s(this,Ae).createCoordinateFromScreenCoordinate(r,t,n)}getScreenCoordinateFromCoordinate(r){return s(this,Ae).getScreenCoordinateFromCoordinate(r)}__EXPERIMENTAL__auto(r){return s(this,Ae).__EXPERIMENTAL__auto(r)}get __core(){if(y.env.INTERNAL==="true")return s(this,Ae).core;throw new Error("__core is not available.")}get container(){return s(this,Yo).container}publishAllState(){s(this,Ae).publishAllState()}clear(){s(this,Ae).clear()}destroy(){s(this,Jl).destroy(),s(this,Ae).destroy()}async enableDebug(r={}){let{Inspector:t}=await import("./inspector-Q5JSCRCC.js");await new t(this,s(this,Ae)).enable(r)}async takeScreenshot(r){var o;let t={withOutdoorContext:(o=r==null?void 0:r.withOutdoorContext)!=null?o:!1},n=s(this,Yo).rendererDomElement;if(t.withOutdoorContext){let i=s(this,Yo).map;if(!i)return await s(this,Yo).renderSync(),n.toDataURL("image/png");i.loaded()||await new Promise(c=>{i.once("idle",c)});let a=i.getCanvas(),u=document.createElement("canvas"),l=u.getContext("2d");if(u.width=n.width,u.height=n.height,!l)throw new Error("Failed to get 2D context for composite canvas");return l.drawImage(a,0,0,u.width,u.height),l.drawImage(n,0,0,u.width,u.height),u.toDataURL("image/png")}return await s(this,Yo).renderSync(),n.toDataURL("image/png")}get manualFloorVisibility(){return s(this,Ae).manualFloorVisibility}set manualFloorVisibility(r){s(this,Ae).manualFloorVisibility=r}getOptimalVisualDistanceBetweenFloors(r){return s(this,Ae).getOptimalVisualDistanceBetweenFloors(r)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return s(this,Ae).hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(r){s(this,Ae).hidePathsNotOnCurrentFloor=!!r}registerPlugin(r){s(this,Yo).registerPlugin(r)}unregisterPlugin(r){s(this,Yo).unregisterPlugin(r)}};Jl=new WeakMap,Ae=new WeakMap,Yo=new WeakMap;p();var KQ=1e3*60*60*2,Yl,bm,fr,Ls,Ua,na,Ga,vm,xm,Bg,br,SB,CB,ym,ox,d6,p6,f6,Em=class{constructor(r,t){M(this,br);M(this,Yl,new Je);M(this,bm);M(this,fr);M(this,Ls);M(this,Ua);M(this,na);M(this,Ga);M(this,vm);M(this,xm);M(this,Bg,()=>{"key"in s(this,fr)&&"secret"in s(this,fr)&&he(this,br,ym).call(this),he(this,br,ox).call(this)});m(this,"on",(r,t)=>s(this,Yl).on(r,t));m(this,"off",(r,t)=>s(this,Yl).off(r,t));k(this,bm,r),k(this,fr,t)}setMapIds(r){k(this,bm,r)}setEnterprise(r){s(this,fr).enterprise=r}async readySync(){var o;if((!("key"in s(this,fr))||!("secret"in s(this,fr)))&&!("accessToken"in s(this,fr))){K.error("No API keys or access token provided! Cannot preload tokens.");return}let r=[he(this,br,ym).call(this),null];s(this,fr).enterprise||(r[1]=this.getSasTokensAsync());let[t,n]=await Promise.all(r);he(this,br,f6).call(this),he(this,br,d6).call(this,t),n!=null&&he(this,br,p6).call(this,n),Am()&&((o=globalThis.addEventListener)==null||o.call(globalThis,"focus",s(this,Bg)))}async refreshing(){let r=[];return s(this,Ls)!=null&&r.push(s(this,Ls)),s(this,Ua)!=null&&r.push(s(this,Ua)),Promise.all(r)}getAccessTokenAsync(){return he(this,br,ym).call(this)}getSasTokensAsync(){return he(this,br,ox).call(this)}getAccessToken(){return s(this,na)==null?(K.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):s(this,na)}getSasToken(r){return this.isEnterpriseMode()?(K.error("SAS tokens are not available in the enterprise mode!"),{token:""}):s(this,Ga)==null?(K.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):r in s(this,Ga).tokens?s(this,Ga).tokens[r]:(K.error("SAS token for map ".concat(r," not found!")),{token:""})}isEnterpriseMode(){var r;return(r=s(this,fr).enterprise)!=null?r:!1}destroy(){he(this,br,f6).call(this),s(this,Yl).destroy(),Am()&&globalThis.removeEventListener("focus",s(this,Bg))}};Yl=new WeakMap,bm=new WeakMap,fr=new WeakMap,Ls=new WeakMap,Ua=new WeakMap,na=new WeakMap,Ga=new WeakMap,vm=new WeakMap,xm=new WeakMap,Bg=new WeakMap,br=new WeakSet,SB=function(r){var n;let t=r.token!==((n=s(this,na))==null?void 0:n.token);k(this,na,r),t&&s(this,Yl).publish("access-token-refreshed",{accessToken:r})},CB=function(r){var n;let t=JSON.stringify(r.tokens)!==JSON.stringify((n=s(this,Ga))==null?void 0:n.tokens);k(this,Ga,r),t&&s(this,Yl).publish("sas-tokens-refreshed",{sasTokens:r.tokens})},ym=async function(r=!1){var t;if("accessToken"in s(this,fr)&&typeof s(this,fr).accessToken=="string"){let n={token:s(this,fr).accessToken,expires:Date.now()+72e5};return k(this,na,n),n}if(!("key"in s(this,fr))||!("secret"in s(this,fr))||typeof s(this,fr).key!="string"||typeof s(this,fr).secret!="string")throw new Error("No API keys or access token provided!");return s(this,Ls)!=null?s(this,Ls):s(this,na)!=null&&s(this,na).expires!=null&&s(this,na).expires>Date.now()&&!r?s(this,na):(k(this,Ls,wh(ne(_({},s(this,fr)),{key:s(this,fr).key,secret:s(this,fr).secret}),(t=s(this,fr).enterprise)!=null?t:!1).then(n=>{let o={token:n.accessToken,expires:n.expiresTimestamp*1e3};return he(this,br,SB).call(this,o),o}).catch(n=>{throw n}).finally(()=>{k(this,Ls,void 0)})),s(this,Ls))},ox=async function(r=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:s(this,Ua)!=null?s(this,Ua):s(this,Ga)!=null&&s(this,Ga).expires>Date.now()&&!r?s(this,Ga):(k(this,Ua,new Promise((t,n)=>{he(this,br,ym).call(this).then(o=>{let i={},a=s(this,bm).map(u=>qE(ne(_({},s(this,fr)),{mapId:u}),o.token).then(l=>{i[u]={token:l.token,expires:l.expires}}).catch(l=>{K.error("Error getting SAS token for map ".concat(u,":"),l)}));Promise.all(a).then(()=>{let u={tokens:i,expires:Math.min(...Object.values(i).map(l=>{var c;return(c=l.expires)!=null?c:1/0}))};he(this,br,CB).call(this,u),t(u)})}).catch(o=>{n(o)})})),s(this,Ua).catch(t=>{throw t}).finally(()=>{k(this,Ua,void 0)}),s(this,Ua))},d6=function(r){if(!("key"in s(this,fr))||!("secret"in s(this,fr)))return;let t=r.expires!=null?r.expires-Date.now():KQ;isFinite(t)&&k(this,vm,setTimeout(()=>{he(this,br,ym).call(this,!0).then(n=>{he(this,br,d6).call(this,n)})},t-_A))},p6=function(r){let t=r.expires-Date.now();isFinite(t)&&k(this,xm,setTimeout(()=>{he(this,br,ox).call(this,!0).then(n=>{he(this,br,p6).call(this,n)})},t-kA))},f6=function(){s(this,vm)!=null&&clearTimeout(s(this,vm)),s(this,xm)!=null&&clearTimeout(s(this,xm))};p();var QQ=async(e,r)=>{var I,v,E,T,D,w,B,X,L;let t=(E="mvfVersion"in(r!=null?r:{})?r==null?void 0:r.mvfVersion:void 0)!=null?E:"options"in e&&"version"in((I=e.options)!=null?I:{})?(v=e.options)==null?void 0:v.version:void 0,n=ne(_({prefetchTokens:!0},r||{}),{mvfVersion:t}),o,i,a=gl();a.updateByUserOption(n);let u={};if("type"in e&&typeof e.type=="string"){if(u.enterprise=(T=e.options)==null?void 0:T.enterprise,e.type==="binary"&&e.main instanceof Uint8Array){let P=await ob(e.main,n.mvfVersion);o=P.mvf2,i=P.mvf3,u.languagePacks=[];for(let R of(D=e.languagePacks)!=null?D:[])R.localePack instanceof Uint8Array&&u.languagePacks.push({language:R.language,localePack:await Gp(R.localePack)})}else if(e.type==="json")o=e.main,i=(w=e.options)==null?void 0:w.mvf3,u.languagePacks=(B=e.languagePacks)!=null?B:[];else throw new Error("Invalid backup type");e.type==="binary"&&e.main instanceof Uint8Array&&(u.binaryBundle=e.main)}else o=e,u.enterprise=o.enterprise!=null;u.mvf3=i,a.setEnterprise((X=u.enterprise)!=null?X:!1);let l=nb(o),c=l.length>0?l:[n.mapId];n.baseAuthUri=a.getBaseAuthUri();let d=new Em(c,ne(_({},n),{enterprise:u.enterprise})),f;if("accessToken"in n&&n.accessToken)f=n.accessToken;else if("key"in n&&"secret"in n){let P;try{P=await d.getAccessTokenAsync()}catch(R){K.error("Failed getting token during hydrateMapData",R)}f=(P==null?void 0:P.token)||""}if(u.outdoorViewToken=f,u.env=a,u.getMapDataOptions=n,n.prefetchTokens)try{await d.readySync()}catch(P){K.error("Failed to ready token manager!",P)}t0()&&(u.enterprise&&K.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),n.mvfVersion!=="3.0.0"&&K.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let h=new Qc(o,u);f&&h.Analytics.init(ne(_({accessToken:f,mapId:n.mapId,key:"key"in n?n.key:void 0,secret:"secret"in n?n.secret:void 0},n.analytics),{baseUri:a.getAnalyticsBaseUri(),context:(L=n.analytics)==null?void 0:L.context}));let g=new Um(h),b=h.findPreferredLanguage({languageCode:n.language,fallbackToNavigatorLanguage:!1});if(b)try{await g.changeLanguage(b.code)}catch(P){}return typeof(r==null?void 0:r.onMVFParsed)=="function"&&r.onMVFParsed(o),g};p();var DB=(e,{id:r}={})=>{let t=Array.isArray(e)?e:[e];if(!t.every(i=>typeof i=="string"))return;let n=t.join(""),o=null;if(r){let i=document.getElementById(r);i instanceof HTMLStyleElement&&(o=i)}o==null&&(o=document.createElement("style")),r&&r!==""&&(o.id=r),o.textContent=n,document.head.appendChild(o)};var TB=":root {\n --pin-shadow-hover-scale: 0.9;\n --pin-shadow-width: 12px;\n --pin-shadow-height: 5px;\n --pin-shadow-opacity: 0.35;\n --pin-drop-animation-duration-ms: 250ms;\n}\n\n@keyframes drop-pin {\n 0% {\n transform: translateY(-200%);\n }\n\n 100% {\n transform: translateY(0);\n }\n}\n\n@keyframes pin-shadow {\n 0% {\n transform: scale(var(--pin-shadow-hover-scale));\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n.mappedin-dropped-pin-wrapper {\n position: relative;\n\n width: fit-content;\n height: fit-content;\n width: 36px;\n height: 42px;\n\n & svg {\n position: absolute;\n left: calc(50% - var(--pin-shadow-width));\n animation: drop-pin var(--pin-drop-animation-duration-ms) ease-in;\n }\n\n & > .pin-shadow {\n position: absolute;\n left: calc(50% - (var(--pin-shadow-width) / 2));\n bottom: 0;\n\n height: var(--pin-shadow-height);\n width: var(--pin-shadow-width);\n border-radius: 100%;\n\n opacity: var(--pin-shadow-opacity);\n\n animation: pin-shadow 250ms ease-in;\n }\n}\n\n@keyframes bounce {\n 0% {\n transform: translateY(-10px);\n opacity: 0;\n }\n 12.5% {\n transform: translateY(0);\n opacity: 1;\n }\n 25% {\n transform: translateY(0);\n }\n 37.5% {\n transform: translateY(-10px);\n }\n 50% {\n transform: translateY(0);\n }\n 62.5% {\n transform: translateY(-10px);\n }\n 75% {\n transform: translateY(0);\n }\n 87.5% {\n transform: translateY(-10px);\n }\n 100% {\n transform: translateY(0);\n }\n}\n\n.mappedin-connection-marker {\n position: relative;\n display: flex;\n\n .bouncey {\n animation: bounce 2.5s linear;\n }\n\n .arrow--down {\n transform: rotate(180deg);\n }\n\n .connection-circle {\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 2px solid white;\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);\n background: #595959;\n }\n}\n";var wB=".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 MB=".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 AB=".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 PB=".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 _B='.maplibregl-map {\n font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;\n overflow: hidden;\n position: relative;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n}\n\n.maplibregl-canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.maplibregl-map:fullscreen {\n width: 100%;\n height: 100%;\n}\n\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass {\n touch-action: none;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive,\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass {\n cursor: grab;\n user-select: none;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer {\n cursor: pointer;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive:active,\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active {\n cursor: grabbing;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas {\n touch-action: pan-x pan-y;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-drag-pan,\n.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas {\n touch-action: pinch-zoom;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas {\n touch-action: none;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,\n.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas {\n touch-action: pan-x pan-y;\n}\n\n.maplibregl-ctrl-top-left,\n.maplibregl-ctrl-top-right,\n.maplibregl-ctrl-bottom-left,\n.maplibregl-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n}\n\n.maplibregl-ctrl-top-left {\n top: 0;\n left: 0;\n}\n\n.maplibregl-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n.maplibregl-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.maplibregl-ctrl-bottom-right {\n right: 0;\n bottom: 0;\n}\n\n.maplibregl-ctrl {\n clear: both;\n pointer-events: auto;\n\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n transform: translate(0, 0);\n}\n\n.maplibregl-ctrl-top-left .maplibregl-ctrl {\n margin: 10px 0 0 10px;\n float: left;\n}\n\n.maplibregl-ctrl-top-right .maplibregl-ctrl {\n margin: 10px 10px 0 0;\n float: right;\n}\n\n.maplibregl-ctrl-bottom-left .maplibregl-ctrl {\n margin: 0 0 10px 10px;\n float: left;\n}\n\n.maplibregl-ctrl-bottom-right .maplibregl-ctrl {\n margin: 0 10px 10px 0;\n float: right;\n}\n\n.maplibregl-ctrl-group {\n border-radius: 4px;\n background: #fff;\n}\n\n.maplibregl-ctrl-group:not(:empty) {\n box-shadow: 0 0 0 2px rgb(0 0 0 / 10%);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl-group:not(:empty) {\n box-shadow: 0 0 0 2px ButtonText;\n }\n}\n\n.maplibregl-ctrl-group button {\n width: 29px;\n height: 29px;\n display: block;\n padding: 0;\n outline: none;\n border: 0;\n box-sizing: border-box;\n background-color: transparent;\n cursor: pointer;\n}\n\n.maplibregl-ctrl-group button + button {\n border-top: 1px solid #ddd;\n}\n\n.maplibregl-ctrl button .maplibregl-ctrl-icon {\n display: block;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl-icon {\n background-color: transparent;\n }\n\n .maplibregl-ctrl-group button + button {\n border-top: 1px solid ButtonText;\n }\n}\n\n/* https://bugzilla.mozilla.org/show_bug.cgi?id=140562 */\n.maplibregl-ctrl button::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.maplibregl-ctrl-attrib-button:focus,\n.maplibregl-ctrl-group button:focus {\n box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);\n}\n\n.maplibregl-ctrl button:disabled {\n cursor: not-allowed;\n}\n\n.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon {\n opacity: 0.25;\n}\n\n@media (hover: hover) {\n .maplibregl-ctrl button:not(:disabled):hover {\n background-color: rgb(0 0 0/5%);\n }\n}\n\n.maplibregl-ctrl button:not(:disabled):active {\n background-color: rgb(0 0 0/5%);\n}\n\n.maplibregl-ctrl-group button:focus:focus-visible {\n box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);\n}\n\n.maplibregl-ctrl-group button:focus:not(:focus-visible) {\n box-shadow: none;\n}\n\n.maplibregl-ctrl-group button:focus:first-child {\n border-radius: 4px 4px 0 0;\n}\n\n.maplibregl-ctrl-group button:focus:last-child {\n border-radius: 0 0 4px 4px;\n}\n\n.maplibregl-ctrl-group button:focus:only-child {\n border-radius: inherit;\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #333);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #333);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #fff);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #fff);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #000);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #000);\n }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #333);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg");\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #fff);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #fff);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #000);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #000);\n }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #333);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n @svg-load ctrl-compass-white url("svg/maplibregl-ctrl-compass.svg") {\n fill: #fff;\n #south { fill: #999; }\n }\n\n background-image: svg-inline(ctrl-compass-white);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #000);\n }\n}\n\n@svg-load ctrl-globe url("svg/maplibregl-ctrl-globe.svg") {\n stroke: #333;\n}\n\n@svg-load ctrl-globe-enabled url("svg/maplibregl-ctrl-globe.svg") {\n stroke: #33b5e5;\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-globe);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-globe-enabled);\n}\n\n@svg-load ctrl-terrain url("svg/maplibregl-ctrl-terrain.svg") {\n fill: #333;\n \n}\n\n@svg-load ctrl-terrain-enabled url("svg/maplibregl-ctrl-terrain.svg") {\n fill: #33b5e5;\n \n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-terrain);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-terrain-enabled);\n}\n\n@svg-load ctrl-geolocate url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #333;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-white url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #fff;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-black url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #000;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-disabled url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #aaa;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-disabled-white url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #999;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-disabled-black url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #666;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-active url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #33b5e5;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-active-error url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #e58978;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-background url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #33b5e5;\n #stroke { display: none; }\n #dot { display: none; }\n}\n\n@svg-load ctrl-geolocate-background-error url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #e54e33;\n #stroke { display: none; }\n #dot { display: none; }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active-error);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background-error);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon {\n animation: maplibregl-spin 2s infinite linear;\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-white);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled-white);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active-error);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background-error);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-black);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled-black);\n }\n}\n\n@keyframes maplibregl-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\na.maplibregl-ctrl-logo {\n width: 88px;\n height: 23px;\n margin: 0 0 -4px -4px;\n display: block;\n background-repeat: no-repeat;\n cursor: pointer;\n overflow: hidden;\n background-image: svg-load("svg/maplibregl-ctrl-logo.svg");\n}\n\na.maplibregl-ctrl-logo.maplibregl-compact {\n width: 14px;\n}\n\n@media (forced-colors: active) {\n a.maplibregl-ctrl-logo {\n @svg-load ctrl-logo-white url("svg/maplibregl-ctrl-logo.svg") {\n #outline { opacity: 1; }\n #fill { opacity: 1; }\n }\n\n background-color: transparent;\n background-image: svg-inline(ctrl-logo-white);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n a.maplibregl-ctrl-logo {\n @svg-load ctrl-logo-black url("svg/maplibregl-ctrl-logo.svg") {\n #outline { opacity: 1; fill: #fff; stroke: #fff; }\n #fill { opacity: 1; fill: #000; }\n }\n\n background-image: svg-inline(ctrl-logo-black);\n }\n}\n\n.maplibregl-ctrl.maplibregl-ctrl-attrib {\n padding: 0 5px;\n background-color: rgb(255 255 255 / 50%);\n margin: 0;\n}\n\n@media screen {\n .maplibregl-ctrl-attrib.maplibregl-compact {\n min-height: 20px;\n padding: 2px 24px 2px 0;\n margin: 10px;\n position: relative;\n background-color: #fff;\n color: #000;\n border-radius: 12px;\n box-sizing: content-box;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact-show {\n padding: 2px 28px 2px 8px;\n visibility: visible;\n }\n\n .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact-show,\n .maplibregl-ctrl-bottom-left > .maplibregl-ctrl-attrib.maplibregl-compact-show {\n padding: 2px 8px 2px 28px;\n border-radius: 12px;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {\n display: none;\n }\n\n .maplibregl-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");\n background-color: rgb(255 255 255 / 50%);\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n border-radius: 12px;\n outline: none;\n top: 0;\n right: 0;\n border: 0;\n }\n\n .maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n .maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n .maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button,\n .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button {\n left: 0;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,\n .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {\n display: block;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {\n background-color: rgb(0 0 0 / 5%);\n }\n\n .maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n bottom: 0;\n right: 0;\n }\n\n .maplibregl-ctrl-top-right > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n top: 0;\n right: 0;\n }\n\n .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n top: 0;\n left: 0;\n }\n\n .maplibregl-ctrl-bottom-left > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n bottom: 0;\n left: 0;\n }\n}\n\n@media screen and (forced-colors: active) {\n .maplibregl-ctrl-attrib.maplibregl-compact::after {\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg", fill=#fff);\n }\n}\n\n@media screen and (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl-attrib.maplibregl-compact::after {\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");\n }\n}\n\n.maplibregl-ctrl-attrib a {\n color: rgb(0 0 0 / 75%);\n text-decoration: none;\n}\n\n.maplibregl-ctrl-attrib a:hover {\n color: inherit;\n text-decoration: underline;\n}\n\n.maplibregl-attrib-empty {\n display: none;\n}\n\n.maplibregl-ctrl-scale {\n background-color: rgb(255 255 255 / 75%);\n font-size: 10px;\n border-width: medium 2px 2px;\n border-style: none solid solid;\n border-color: #333;\n padding: 0 5px;\n color: #333;\n box-sizing: border-box;\n}\n\n.maplibregl-popup {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n will-change: transform;\n pointer-events: none;\n}\n\n.maplibregl-popup-anchor-top,\n.maplibregl-popup-anchor-top-left,\n.maplibregl-popup-anchor-top-right {\n flex-direction: column;\n}\n\n.maplibregl-popup-anchor-bottom,\n.maplibregl-popup-anchor-bottom-left,\n.maplibregl-popup-anchor-bottom-right {\n flex-direction: column-reverse;\n}\n\n.maplibregl-popup-anchor-left {\n flex-direction: row;\n}\n\n.maplibregl-popup-anchor-right {\n flex-direction: row-reverse;\n}\n\n.maplibregl-popup-tip {\n width: 0;\n height: 0;\n border: 10px solid transparent;\n z-index: 1;\n}\n\n.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n align-self: center;\n border-top: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-top-left .maplibregl-popup-tip {\n align-self: flex-start;\n border-top: none;\n border-left: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {\n align-self: flex-end;\n border-top: none;\n border-right: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n align-self: center;\n border-bottom: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip {\n align-self: flex-start;\n border-bottom: none;\n border-left: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {\n align-self: flex-end;\n border-bottom: none;\n border-right: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-left .maplibregl-popup-tip {\n align-self: center;\n border-left: none;\n border-right-color: #fff;\n}\n\n.maplibregl-popup-anchor-right .maplibregl-popup-tip {\n align-self: center;\n border-right: none;\n border-left-color: #fff;\n}\n\n.maplibregl-popup-close-button {\n position: absolute;\n right: 0;\n top: 0;\n border: 0;\n border-radius: 0 3px 0 0;\n cursor: pointer;\n background-color: transparent;\n}\n\n.maplibregl-popup-close-button:hover {\n background-color: rgb(0 0 0 / 5%);\n}\n\n.maplibregl-popup-content {\n position: relative;\n background: #fff;\n border-radius: 3px;\n box-shadow: 0 1px 2px rgb(0 0 0 / 10%);\n padding: 15px 10px;\n pointer-events: auto;\n}\n\n.maplibregl-popup-anchor-top-left .maplibregl-popup-content {\n border-top-left-radius: 0;\n}\n\n.maplibregl-popup-anchor-top-right .maplibregl-popup-content {\n border-top-right-radius: 0;\n}\n\n.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content {\n border-bottom-left-radius: 0;\n}\n\n.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content {\n border-bottom-right-radius: 0;\n}\n\n.maplibregl-popup-track-pointer {\n display: none;\n}\n\n.maplibregl-popup-track-pointer * {\n pointer-events: none;\n user-select: none;\n}\n\n.maplibregl-map:hover .maplibregl-popup-track-pointer {\n display: flex;\n}\n\n.maplibregl-map:active .maplibregl-popup-track-pointer {\n display: none;\n}\n\n.maplibregl-marker {\n position: absolute;\n top: 0;\n left: 0;\n will-change: transform;\n transition: opacity 0.2s;\n}\n\n.maplibregl-user-location-dot {\n background-color: #1da1f2;\n width: 15px;\n height: 15px;\n border-radius: 50%;\n}\n\n.maplibregl-user-location-dot::before {\n background-color: #1da1f2;\n content: "";\n width: 15px;\n height: 15px;\n border-radius: 50%;\n position: absolute;\n animation: maplibregl-user-location-dot-pulse 2s infinite;\n}\n\n.maplibregl-user-location-dot::after {\n border-radius: 50%;\n border: 2px solid #fff;\n content: "";\n height: 19px;\n left: -2px;\n position: absolute;\n top: -2px;\n width: 19px;\n box-sizing: border-box;\n box-shadow: 0 0 3px rgb(0 0 0 / 35%);\n}\n\n@keyframes maplibregl-user-location-dot-pulse {\n 0% { transform: scale(1); opacity: 1; }\n 70% { transform: scale(3); opacity: 0; }\n 100% { transform: scale(1); opacity: 0; }\n}\n\n.maplibregl-user-location-dot-stale {\n background-color: #aaa;\n}\n\n.maplibregl-user-location-dot-stale::after {\n display: none;\n}\n\n.maplibregl-user-location-accuracy-circle {\n background-color: #1da1f233;\n width: 1px;\n height: 1px;\n border-radius: 100%;\n}\n\n.maplibregl-crosshair,\n.maplibregl-crosshair .maplibregl-interactive,\n.maplibregl-crosshair .maplibregl-interactive:active {\n cursor: crosshair;\n}\n\n.maplibregl-boxzoom {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n background: #fff;\n border: 2px dotted #202020;\n opacity: 0.5;\n}\n\n.maplibregl-cooperative-gesture-screen {\n background: rgba(0 0 0 / 40%);\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: white;\n padding: 1rem;\n font-size: 1.4em;\n line-height: 1.2;\n opacity: 0;\n pointer-events: none;\n transition: opacity 1s ease 1s;\n z-index: 99999;\n}\n\n.maplibregl-cooperative-gesture-screen.maplibregl-show {\n opacity: 1;\n transition: opacity 0.05s;\n}\n\n.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {\n display: none;\n}\n\n@media (hover: none), (pointer: coarse) {\n .maplibregl-cooperative-gesture-screen .maplibregl-desktop-message {\n display: none;\n }\n\n .maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {\n display: block;\n }\n}\n\n.maplibregl-pseudo-fullscreen {\n position: fixed !important;\n width: 100% !important;\n height: 100% !important;\n top: 0 !important;\n left: 0 !important;\n z-index: 99999;\n}\n';var OB=".mappedin-annotation-marker {\n --mappedin-annotation-border-radius: 5px;\n --mappedin-annotation-border-width: 2px;\n --mappedin-annotation-background-color: #ffffff;\n --mappedin-annotation-scale: 0.7;\n\n position: relative;\n box-sizing: border-box;\n border-radius: var(--mappedin-annotation-border-radius);\n border: var(--mappedin-annotation-border-width) solid var(--mappedin-annotation-background-color);\n\n transform: scale(var(--mappedin-annotation-scale)) translateY(0rem);\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.25);\n\n img {\n position: absolute;\n image-rendering: crisp-edges;\n top: 0px;\n\n object-fit: contain;\n border-radius: calc(var(--mappedin-annotation-border-radius) - var(--mappedin-annotation-border-width));\n }\n}\n";p();function see(e){var r,t;if(!(!e.languages||!Am()||!((t=(r=globalThis.navigator)==null?void 0:r.languages)!=null&&t.length)))for(let n=0;n<globalThis.navigator.languages.length;n++){let o=e.languages.find(i=>i.code.toLowerCase()===globalThis.navigator.languages[n].toLowerCase());if(o)return{code:o.code,name:o.name}}}function xI(e,r){var a,u,l;let t=(a=r==null?void 0:r.languageCode)!=null?a:"",n=(u=r==null?void 0:r.fallbackToNavigatorLanguage)!=null?u:!0,o=(l=e==null?void 0:e.languages)==null?void 0:l.find(c=>c.code.toLowerCase()===t.toLowerCase()),i;if(o)i=o;else if(n==null||n)try{let c=see(e);c&&(i=c)}catch(c){K.error("fallbackToNavigatorLanguage is set, however, there was an error getting the navigator language",c)}return i!=null?i:e.defaultLanguage}var uee=[TB,wB,MB,AB,PB,_B,OB],FB;function jqe(e){FB=e}var Uqe=async(e,r)=>{let t,n=gl();r&&n.updateByUserOption(r);try{r&&(t=(await wh(ne(_({},r),{baseAuthUri:n.getBaseAuthUri()}))).accessToken)}catch(a){K.warn("Getting access token failed. Outdoor map disabled.",a)}let o=new Qc(e,{outdoorViewToken:t,languagePacks:r==null?void 0:r.languagePacks,env:n});return new Um(o)},kB=!1;function Gqe(e){kB=e}var BB=!1;function zqe(e){BB=e}function t0(){return BB}var lee=async e=>{var E,T;let r=kB,t,n=gl();n.updateByUserOption(e);let o=ne(_({prefetchTokens:!0},e),{fallbackToNavigatorLanguage:(E=e.fallbackToNavigatorLanguage)!=null?E:!0}),i=new Em([o.mapId],o);if("accessToken"in o&&o.accessToken){t=o.accessToken;let{aud:D,sub:w}=Jg(t);(BP.some(B=>D.includes(B))||w&&w.startsWith("client"))&&(r=!0,n.setEnterprise(r),i.setEnterprise(r))}else if("key"in o&&"secret"in o){if(o.key.startsWith("mipk_"))throw new Error("Partner API keys detected! \n\nPartner API keys should not be passed directly to the SDK. See https://developer.mappedin.com/docs/rest-apis/partner for more details.");o.key.startsWith("mik_")||(r=!0,n.setEnterprise(r),i.setEnterprise(r)),o.baseAuthUri=n.getBaseAuthUri();let D;try{D=await i.getAccessTokenAsync(),t=D==null?void 0:D.token}catch(w){throw K.warn("Get access token failed",w.message),new Error("Get access token failed: "+w.message)}}else throw new Error("Missing key or secret.");o.layoutId!=null&&(r?o.layoutId!=="draft"&&K.warn('Invalid layoutId! Use "draft" to load draft data or leave unspecified to load live data.'):K.warn("layoutId is currently unsupported!")),o.baseUri=n.getBaseUri();let a=performance.now(),u,l;if(r){let D=ne(_({},o),{venue:o.mapId,clientId:o.key,clientSecret:o.secret,version:"1.0.0",perspective:o.viewId,useDraftData:o.layoutId==="draft"}),w=await i2(D);u=w.compressed,l=w.localePacks}else u=await a2(o,t);let c=performance.now(),{mvf2:d,mvf3:f}=await ob(u,o.mvfVersion),h=performance.now();typeof e.onMVFParsed=="function"&&e.onMVFParsed(d);let g=nb(d);if(g.length>0?i.setMapIds(g):i.setMapIds([o.mapId]),o.prefetchTokens)try{await i.readySync()}catch(D){K.error("Failed to ready token manager!",D)}t0()&&(r&&K.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),o.mvfVersion!=="3.0.0"&&K.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let b=new Qc(d,{env:n,outdoorViewToken:t,tokenManager:i,enterprise:r,localePacksUrls:l,binaryBundle:u,getMapDataOptions:o,mvf3:f}),I=new Um(b,{search:e.search});b.Analytics.init(ne(_({accessToken:t,mapId:o.mapId,key:"key"in o?o.key:void 0,secret:"secret"in o?o.secret:void 0},o.analytics),{baseUri:n.getAnalyticsBaseUri(),context:(T=o.analytics)==null?void 0:T.context})),b.Analytics.sendGetMapDataEvent({parseDuration:h-c,downloadDuration:c-a,viewId:o.viewId});let v=b.findPreferredLanguage({languageCode:o.language,fallbackToNavigatorLanguage:o.fallbackToNavigatorLanguage});if(v)try{await I.changeLanguage(v.code)}catch(D){}return I},Vqe=lee,cee=async()=>{if(ed===""||mv==="")return!1;let e=[fetch(ed,{mode:"same-origin"}),fetch(mv,{mode:"same-origin"})],[r,t]=[{ok:!1},{ok:!1}];try{[r,t]=await Promise.all(e)}catch(n){}return{collision:r.ok,maplibre:t.ok}},dee=async(e,r,t)=>{var h,g,b,I,v,E,T,D,w,B,X,L,P,R,$,V;let n=performance.now(),o=U2(t,r);o&&j2(o),((h=o.injectStyles)==null||h)&&DB(uee,{id:"mappedin__styles"});let i=LP((g=r.outdoorViewToken)!=null?g:""),a=Gm(r);(b=o.outdoorView)!=null&&b.style&&a.envControl.updateTileServerBaseUrl((I=o.outdoorView)==null?void 0:I.style);let u=!1,l=!1,c=await cee();c&&(c.collision||(u=!0),c.maplibre||(l=!0));let d=await RF(e,{center:[r.mapCenter.longitude,r.mapCenter.latitude],bearing:o.bearing,pitch:o.pitch,zoomLevel:o.zoomLevel,backgroundAlpha:(v=o.style)==null?void 0:v.backgroundAlpha,backgroundColor:(E=o.style)==null?void 0:E.backgroundColor,outdoorView:!l&&((T=o.outdoorView)!=null&&T.token)?{headers:{"x-mappedin-tiles-key":(D=o.outdoorView)==null?void 0:D.token},style:r.getEnv().tileServerUri,enabled:!!((w=o.outdoorView)!=null&&w.enabled),lowDpi:(B=o.outdoorView)==null?void 0:B.lowDpi}:void 0,watermark:ne(_({},o.watermark),{visible:(L=(X=o.watermark)==null?void 0:X.visible)!=null?L:!a.enterpriseMode&&!i.remove_watermark,onClick:FB||void 0}),attribution:o.attribution,antialias:typeof o.antialiasing=="boolean"?o.antialiasing:!!((P=o.antialiasing)!=null&&P.enabled),accessToken:r.outdoorViewToken,occlusionEnabled:!0,transformImageRequest:a.enterpriseMode?void 0:a.transformImageRequest,naturalBearing:r.naturalBearing,imagePlacementOptions:o.imagePlacementOptions,onWebGLContextCreationError:o.onWebGLContextCreationError,onWebGLContextLost:o.onWebGLContextLost,onWebGLContextRestored:o.onWebGLContextRestored,onWebGLRendererError:o.onWebGLRendererError,useStandaloneCamera:(R=o.useStandaloneCamera)!=null?R:!1,useWorkers:!(($=o.disableWorkers)!=null&&$),useCollisionWorker:!u,disableUpdateStateValidation:(V=o.disableUpdateStateValidation)!=null?V:!1,__EXPERIMENTAL_shadows:o.__EXPERIMENTAL_shadows}),f=new kg(d);return await f.addMap(r,o),a.Analytics.sendMapViewLoadedEvent({firstRenderDuration:performance.now()-n,dimension:f.getDimensions(),collisionWorkerDisabled:u,outdoorsWorkerDisabled:l}),f},$qe=()=>y.env.npm_package_version,Hqe=dee;export{je as a,Vo as b,Tc as c,gs as d,hn as e,$o as f,$n as g,Fr as h,Zo as i,nX as j,Zn as k,uo as l,vo as m,mi as n,yb as o,qr as p,Vi as q,bb as r,eI as s,XA as t,s2 as u,ob as v,$P as w,tI as x,HP as y,xb as z,Eb as A,wl as B,vu as C,vb as D,oO as E,Cs as F,vY as G,xS as H,LY as I,AS as J,PS as K,JQ as L,kg as M,QQ as N,xI as O,jqe as P,Uqe as Q,Gqe as R,zqe as S,t0 as T,lee as U,Vqe as V,cee as W,dee as X,$qe as Y,Hqe as Z};