@mappedin/mappedin-js 6.14.0 → 6.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/{GLTFExporter-MKHVFHNL.js → GLTFExporter-T4HNKLW3.js} +1 -1
- package/lib/esm/{GLTFLoader-MM6H3G4F.js → GLTFLoader-X5U6TBQB.js} +1 -1
- package/lib/esm/{chunk-AQLMGHNL.js → chunk-2ZRUONOD.js} +1 -1
- package/lib/esm/{chunk-RZSMQRYO.js → chunk-7LMDPH6B.js} +1 -1
- package/lib/esm/chunk-RUZQ2KUL.js +1 -0
- package/lib/esm/{chunk-4ZVAGB65.js → chunk-W3AKKIQV.js} +1 -1
- package/lib/esm/index.d.ts +246 -36
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-JJQSMSQO.js → inspector-A7WF4M5K.js} +1 -1
- package/lib/esm/{internal-2OZQQN5W.js → internal-UAV7IGIX.js} +1 -1
- package/lib/esm/{text3d-GFX4JNU4.js → text3d-EFUP5FMA.js} +1 -1
- package/lib/esm/workers/collision-worker.csp.js +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-22QW4H7K.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as u1,$a as nE,$b as Mh,A as mu,Aa as Q3,Ab as $5,B as JD,Ba as Ui,Bb as V5,C as Eh,Ca as eE,Cb as jc,D as V3,Da as tE,Db as v1,E as KD,Ea as d1,Eb as hi,F as QD,Fa as p1,Fb as H5,G as e5,Ga as f1,Gb as Z5,H as Lc,Ha as g5,Hb as W5,I as t5,Ia as y5,Ib as sE,J as r5,Ja as Nc,Jb as X5,K as n5,Ka as b5,Kb as uE,L as H3,La as Mp,Lb as lE,M as ys,Ma as v5,Mb as x1,N as _l,Nb as Y5,O as hu,Oa as x5,Ob as q5,P as Rc,Pa as m1,Pb as cE,Q as o5,Qa as E5,Qb as J5,R as Dp,Ra as I5,Rb as K5,S as i5,Sa as S5,Sb as dE,T as a5,Ta as C5,Tb as Q5,U as Ih,Ua as D5,Ub as Bl,V as Xo,Va as rE,Vb as E1,W as s5,Wa as T5,Wb as pE,X as Z3,Xa as M5,Xb as eT,Y as bs,Ya as wp,Yb as tT,Z as u5,Za as w5,Zb as fE,_ as gu,_a as h1,_b as rT,aa as Tp,ab as A5,ac as mE,b as yD,ba as Sh,bb as oE,bc as I1,ca as l5,cb as g1,cc as nT,d as V,da as W3,db as Dh,dc as hE,e as Kr,ea as X3,eb as xu,ec as oT,f as bD,fa as c5,fb as y1,fc as iT,g as G3,ga as d5,gb as Ol,gc as aT,h as gs,ha as p5,hb as Fl,hc as sT,i as ZD,ia as yu,ib as P5,ic as uT,j as s1,ja as yR,jb as iE,jc as lT,k as WD,ka as Y3,kc as cT,l as XD,la as f5,lb as _5,lc as dT,m as Al,ma as bu,mb as O5,mc as vs,n as YD,na as l1,nb as F5,nc as pT,o as du,oa as m5,ob as b1,oc as Qr,p as xh,pa as h5,pb as B5,pc as fT,q as qD,qa as q3,qb as Th,qc as S1,r as Dr,ra as J3,rb as k5,rc as xs,s as pu,sa as mi,sb as L5,sc as mT,t as Ip,ta as Jt,tb as aE,tc as dn,u as Pl,ua as c1,ub as R5,uc as Qn,v as Sp,va as Ch,vb as N5,vc as Tr,w as Cp,wa as K3,wb as j5,x as ht,xa as cn,xb as U5,y as fu,ya as Yo,yb as G5,z as Xe,za as vu,zb as z5}from"./chunk-2ZRUONOD.js";import{a as Gi}from"./chunk-W3AKKIQV.js";import{$ as Ni,A as DD,Ba as bp,C as Bc,E as Dn,F as Ri,G as Qy,Ga as BD,H as e1,Ha as kD,I as TD,Ia as LD,J as su,Ja as RD,K as hp,Ka as vp,La as ND,M as MD,Ma as xp,N as ft,Na as Ep,O as ct,Oa as xo,Pa as o1,Qa as jD,Ra as vh,S as wD,T as AD,Ta as Ml,U as bh,Ua as UD,V as gp,W as Ie,X as Nr,Y as PD,Z as qt,_ as uu,a as f,aa as mt,b as x,ba as _D,bb as i1,c as Jy,ca as kn,d as Ky,da as Wo,e as vD,ea as kc,eb as $3,f as hs,fa as Tl,fb as a1,g as xD,ga as rt,gb as GD,h as ED,ha as lu,i as gh,ja as ji,ka as OD,kb as zD,la as z3,ma as t1,mb as wl,na as cu,o as yh,ob as $D,pb as VD,r as ID,rb as HD,s as SD,u as CD,va as rr,wa as FD,xa as yp,ya as r1,za as n1}from"./chunk-7LMDPH6B.js";import{a as k,b as oe,c as qy,d as Zr,f as Bt,g as Cl,h as Dl,i as h,j as s,k as w,l as O,m as se,n as gD,o as Ee}from"./chunk-5W2UDR4H.js";var S_=Bt((D2,T2)=>{f();(function(e,r){typeof D2=="object"&&typeof T2<"u"?T2.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self,e.TinyQueue=r())})(D2,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],p=c+1;if(p<this.length&&a(i[p],d)<0&&(c=p,d=i[p]),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 D_=Bt((GDe,M2)=>{"use strict";f();var f4=S_();f4.default&&(f4=f4.default);M2.exports=C_;M2.exports.default=C_;function C_(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,p=Math.min(c,d),m=p/2;if(p===0){var g=[n,o];return g.distance=0,g}for(var y=new f4(void 0,xX),E=n;E<i;E+=p)for(var b=o;b<a;b+=p)y.push(new Wl(E+m,b+m,m,e));var v=IX(e),D=new Wl(n+c/2,o+d/2,0,e);D.d>v.d&&(v=D);for(var M=y.length;y.length;){var T=y.pop();T.d>v.d&&(v=T,t&&console.log("found best %d after %d probes",Math.round(1e4*T.d)/1e4,M)),!(T.max-v.d<=r)&&(m=T.h/2,y.push(new Wl(T.x-m,T.y-m,m,e)),y.push(new Wl(T.x+m,T.y-m,m,e)),y.push(new Wl(T.x-m,T.y+m,m,e)),y.push(new Wl(T.x+m,T.y+m,m,e)),M+=4)}t&&(console.log("num probes: "+M),console.log("best distance: "+v.d));var B=[v.x,v.y];return B.distance=v.d,B}function xX(e,r){return r.max-e.max}function Wl(e,r,t,n){this.x=e,this.y=r,this.h=t,this.d=EX(e,r,n),this.max=this.d+this.h*Math.SQRT2}function EX(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],p=a[c];d[1]>r!=p[1]>r&&e<(p[0]-d[0])*(r-d[1])/(p[1]-d[1])+d[0]&&(n=!n),o=Math.min(o,SX(e,r,d,p))}return o===0?0:(n?1:-1)*Math.sqrt(o)}function IX(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 Wl(o[0][0],o[0][1],0,e):new Wl(t/r,n/r,0,e)}function SX(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 oO=Bt((H2,Z2)=>{f();(function(e,r){typeof H2=="object"&&typeof Z2<"u"?Z2.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self).RBush=r()})(H2,function(){"use strict";function e(b,v,D,M,T){(function B(G,_,F,A,j){for(;A>F;){if(A-F>600){var N=A-F+1,Z=_-F+1,ie=Math.log(N),de=.5*Math.exp(2*ie/3),J=.5*Math.sqrt(ie*de*(N-de)/N)*(Z-N/2<0?-1:1),z=Math.max(F,Math.floor(_-Z*de/N+J)),X=Math.min(A,Math.floor(_+(N-Z)*de/N+J));B(G,_,z,X,j)}var W=G[_],ee=F,ce=A;for(r(G,F,_),j(G[A],W)>0&&r(G,F,A);ee<ce;){for(r(G,ee,ce),ee++,ce--;j(G[ee],W)<0;)ee++;for(;j(G[ce],W)>0;)ce--}j(G[F],W)===0?r(G,F,ce):r(G,++ce,A),ce<=_&&(F=ce+1),_<=ce&&(A=ce-1)}})(b,v,D||0,M||b.length-1,T||t)}function r(b,v,D){var M=b[v];b[v]=b[D],b[D]=M}function t(b,v){return b<v?-1:b>v?1:0}var n=function(b){b===void 0&&(b=9),this._maxEntries=Math.max(4,b),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(b,v,D){if(!D)return v.indexOf(b);for(var M=0;M<v.length;M++)if(D(b,v[M]))return M;return-1}function i(b,v){a(b,0,b.children.length,v,b)}function a(b,v,D,M,T){T||(T=y(null)),T.minX=1/0,T.minY=1/0,T.maxX=-1/0,T.maxY=-1/0;for(var B=v;B<D;B++){var G=b.children[B];u(T,b.leaf?M(G):G)}return T}function u(b,v){return b.minX=Math.min(b.minX,v.minX),b.minY=Math.min(b.minY,v.minY),b.maxX=Math.max(b.maxX,v.maxX),b.maxY=Math.max(b.maxY,v.maxY),b}function l(b,v){return b.minX-v.minX}function c(b,v){return b.minY-v.minY}function d(b){return(b.maxX-b.minX)*(b.maxY-b.minY)}function p(b){return b.maxX-b.minX+(b.maxY-b.minY)}function m(b,v){return b.minX<=v.minX&&b.minY<=v.minY&&v.maxX<=b.maxX&&v.maxY<=b.maxY}function g(b,v){return v.minX<=b.maxX&&v.minY<=b.maxY&&v.maxX>=b.minX&&v.maxY>=b.minY}function y(b){return{children:b,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function E(b,v,D,M,T){for(var B=[v,D];B.length;)if(!((D=B.pop())-(v=B.pop())<=M)){var G=v+Math.ceil((D-v)/M/2)*M;e(b,G,v,D,T),B.push(v,G,G,D)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(b){var v=this.data,D=[];if(!g(b,v))return D;for(var M=this.toBBox,T=[];v;){for(var B=0;B<v.children.length;B++){var G=v.children[B],_=v.leaf?M(G):G;g(b,_)&&(v.leaf?D.push(G):m(b,_)?this._all(G,D):T.push(G))}v=T.pop()}return D},n.prototype.collides=function(b){var v=this.data;if(!g(b,v))return!1;for(var D=[];v;){for(var M=0;M<v.children.length;M++){var T=v.children[M],B=v.leaf?this.toBBox(T):T;if(g(b,B)){if(v.leaf||m(b,B))return!0;D.push(T)}}v=D.pop()}return!1},n.prototype.load=function(b){if(!b||!b.length)return this;if(b.length<this._minEntries){for(var v=0;v<b.length;v++)this.insert(b[v]);return this}var D=this._build(b.slice(),0,b.length-1,0);if(this.data.children.length)if(this.data.height===D.height)this._splitRoot(this.data,D);else{if(this.data.height<D.height){var M=this.data;this.data=D,D=M}this._insert(D,this.data.height-D.height-1,!0)}else this.data=D;return this},n.prototype.insert=function(b){return b&&this._insert(b,this.data.height-1),this},n.prototype.clear=function(){return this.data=y([]),this},n.prototype.remove=function(b,v){if(!b)return this;for(var D,M,T,B=this.data,G=this.toBBox(b),_=[],F=[];B||_.length;){if(B||(B=_.pop(),M=_[_.length-1],D=F.pop(),T=!0),B.leaf){var A=o(b,B.children,v);if(A!==-1)return B.children.splice(A,1),_.push(B),this._condense(_),this}T||B.leaf||!m(B,G)?M?(D++,B=M.children[D],T=!1):B=null:(_.push(B),F.push(D),D=0,M=B,B=B.children[0])}return this},n.prototype.toBBox=function(b){return b},n.prototype.compareMinX=function(b,v){return b.minX-v.minX},n.prototype.compareMinY=function(b,v){return b.minY-v.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(b){return this.data=b,this},n.prototype._all=function(b,v){for(var D=[];b;)b.leaf?v.push.apply(v,b.children):D.push.apply(D,b.children),b=D.pop();return v},n.prototype._build=function(b,v,D,M){var T,B=D-v+1,G=this._maxEntries;if(B<=G)return i(T=y(b.slice(v,D+1)),this.toBBox),T;M||(M=Math.ceil(Math.log(B)/Math.log(G)),G=Math.ceil(B/Math.pow(G,M-1))),(T=y([])).leaf=!1,T.height=M;var _=Math.ceil(B/G),F=_*Math.ceil(Math.sqrt(G));E(b,v,D,F,this.compareMinX);for(var A=v;A<=D;A+=F){var j=Math.min(A+F-1,D);E(b,A,j,_,this.compareMinY);for(var N=A;N<=j;N+=_){var Z=Math.min(N+_-1,j);T.children.push(this._build(b,N,Z,M-1))}}return i(T,this.toBBox),T},n.prototype._chooseSubtree=function(b,v,D,M){for(;M.push(v),!v.leaf&&M.length-1!==D;){for(var T=1/0,B=1/0,G=void 0,_=0;_<v.children.length;_++){var F=v.children[_],A=d(F),j=(N=b,Z=F,(Math.max(Z.maxX,N.maxX)-Math.min(Z.minX,N.minX))*(Math.max(Z.maxY,N.maxY)-Math.min(Z.minY,N.minY))-A);j<B?(B=j,T=A<T?A:T,G=F):j===B&&A<T&&(T=A,G=F)}v=G||v.children[0]}var N,Z;return v},n.prototype._insert=function(b,v,D){var M=D?b:this.toBBox(b),T=[],B=this._chooseSubtree(M,this.data,v,T);for(B.children.push(b),u(B,M);v>=0&&T[v].children.length>this._maxEntries;)this._split(T,v),v--;this._adjustParentBBoxes(M,T,v)},n.prototype._split=function(b,v){var D=b[v],M=D.children.length,T=this._minEntries;this._chooseSplitAxis(D,T,M);var B=this._chooseSplitIndex(D,T,M),G=y(D.children.splice(B,D.children.length-B));G.height=D.height,G.leaf=D.leaf,i(D,this.toBBox),i(G,this.toBBox),v?b[v-1].children.push(G):this._splitRoot(D,G)},n.prototype._splitRoot=function(b,v){this.data=y([b,v]),this.data.height=b.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(b,v,D){for(var M,T,B,G,_,F,A,j=1/0,N=1/0,Z=v;Z<=D-v;Z++){var ie=a(b,0,Z,this.toBBox),de=a(b,Z,D,this.toBBox),J=(T=ie,B=de,G=void 0,_=void 0,F=void 0,A=void 0,G=Math.max(T.minX,B.minX),_=Math.max(T.minY,B.minY),F=Math.min(T.maxX,B.maxX),A=Math.min(T.maxY,B.maxY),Math.max(0,F-G)*Math.max(0,A-_)),z=d(ie)+d(de);J<j?(j=J,M=Z,N=z<N?z:N):J===j&&z<N&&(N=z,M=Z)}return M||D-v},n.prototype._chooseSplitAxis=function(b,v,D){var M=b.leaf?this.compareMinX:l,T=b.leaf?this.compareMinY:c;this._allDistMargin(b,v,D,M)<this._allDistMargin(b,v,D,T)&&b.children.sort(M)},n.prototype._allDistMargin=function(b,v,D,M){b.children.sort(M);for(var T=this.toBBox,B=a(b,0,v,T),G=a(b,D-v,D,T),_=p(B)+p(G),F=v;F<D-v;F++){var A=b.children[F];u(B,b.leaf?T(A):A),_+=p(B)}for(var j=D-v-1;j>=v;j--){var N=b.children[j];u(G,b.leaf?T(N):N),_+=p(G)}return _},n.prototype._adjustParentBBoxes=function(b,v,D){for(var M=D;M>=0;M--)u(v[M],b)},n.prototype._condense=function(b){for(var v=b.length-1,D=void 0;v>=0;v--)b[v].children.length===0?v>0?(D=b[v-1].children).splice(D.indexOf(b[v]),1):this.clear():i(b[v],this.toBBox)},n})});var J2=Bt(Je=>{"use strict";f();Object.defineProperty(Je,"__esModule",{value:!0});Je.earthRadius=63710088e-1;Je.factors={centimeters:Je.earthRadius*100,centimetres:Je.earthRadius*100,degrees:Je.earthRadius/111325,feet:Je.earthRadius*3.28084,inches:Je.earthRadius*39.37,kilometers:Je.earthRadius/1e3,kilometres:Je.earthRadius/1e3,meters:Je.earthRadius,metres:Je.earthRadius,miles:Je.earthRadius/1609.344,millimeters:Je.earthRadius*1e3,millimetres:Je.earthRadius*1e3,nauticalmiles:Je.earthRadius/1852,radians:1,yards:Je.earthRadius*1.0936};Je.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/Je.earthRadius,yards:1.0936133};Je.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 ql(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}Je.feature=ql;function wY(e,r,t){switch(t===void 0&&(t={}),e){case"Point":return W2(r).geometry;case"LineString":return Y2(r).geometry;case"Polygon":return X2(r).geometry;case"MultiPoint":return aO(r).geometry;case"MultiLineString":return iO(r).geometry;case"MultiPolygon":return sO(r).geometry;default:throw new Error(e+" is invalid")}}Je.geometry=wY;function W2(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(!x4(e[0])||!x4(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return ql(n,r,t)}Je.point=W2;function AY(e,r,t){return t===void 0&&(t={}),E4(e.map(function(n){return W2(n,r)}),t)}Je.points=AY;function X2(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 ql(u,r,t)}Je.polygon=X2;function PY(e,r,t){return t===void 0&&(t={}),E4(e.map(function(n){return X2(n,r)}),t)}Je.polygons=PY;function Y2(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 ql(n,r,t)}Je.lineString=Y2;function _Y(e,r,t){return t===void 0&&(t={}),E4(e.map(function(n){return Y2(n,r)}),t)}Je.lineStrings=_Y;function E4(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}Je.featureCollection=E4;function iO(e,r,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:e};return ql(n,r,t)}Je.multiLineString=iO;function aO(e,r,t){t===void 0&&(t={});var n={type:"MultiPoint",coordinates:e};return ql(n,r,t)}Je.multiPoint=aO;function sO(e,r,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:e};return ql(n,r,t)}Je.multiPolygon=sO;function OY(e,r,t){t===void 0&&(t={});var n={type:"GeometryCollection",geometries:e};return ql(n,r,t)}Je.geometryCollection=OY;function FY(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}Je.round=FY;function uO(e,r){r===void 0&&(r="kilometers");var t=Je.factors[r];if(!t)throw new Error(r+" units is invalid");return e*t}Je.radiansToLength=uO;function q2(e,r){r===void 0&&(r="kilometers");var t=Je.factors[r];if(!t)throw new Error(r+" units is invalid");return e/t}Je.lengthToRadians=q2;function BY(e,r){return lO(q2(e,r))}Je.lengthToDegrees=BY;function kY(e){var r=e%360;return r<0&&(r+=360),r}Je.bearingToAzimuth=kY;function lO(e){var r=e%(2*Math.PI);return r*180/Math.PI}Je.radiansToDegrees=lO;function LY(e){var r=e%360;return r*Math.PI/180}Je.degreesToRadians=LY;function RY(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 uO(q2(e,r),t)}Je.convertLength=RY;function NY(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=Je.areaFactors[r];if(!n)throw new Error("invalid original units");var o=Je.areaFactors[t];if(!o)throw new Error("invalid final units");return e/n*o}Je.convertArea=NY;function x4(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}Je.isNumber=x4;function jY(e){return!!e&&e.constructor===Object}Je.isObject=jY;function UY(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(!x4(r))throw new Error("bbox must only contain numbers")})}Je.validateBBox=UY;function GY(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")}Je.validateId=GY});var mO=Bt(hn=>{"use strict";f();Object.defineProperty(hn,"__esModule",{value:!0});var so=J2();function S0(e,r,t){if(e!==null)for(var n,o,i,a,u,l,c,d=0,p=0,m,g=e.type,y=g==="FeatureCollection",E=g==="Feature",b=y?e.features.length:1,v=0;v<b;v++){c=y?e.features[v].geometry:E?e.geometry:e,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1;for(var D=0;D<u;D++){var M=0,T=0;if(a=m?c.geometries[D]: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,p,v,M,T)===!1)return!1;p++,M++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(r(l[n],p,v,M,T)===!1)return!1;p++,B==="MultiPoint"&&M++}B==="LineString"&&M++;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],p,v,M,T)===!1)return!1;p++}B==="MultiLineString"&&M++,B==="Polygon"&&T++}B==="Polygon"&&M++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(T=0,o=0;o<l[n].length;o++){for(i=0;i<l[n][o].length-d;i++){if(r(l[n][o][i],p,v,M,T)===!1)return!1;p++}T++}M++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(S0(a.geometries[n],r,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function zY(e,r,t,n){var o=t;return S0(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 cO(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 $Y(e,r,t){var n=t;return cO(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function dO(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 VY(e,r,t){var n=t;return dO(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function HY(e){var r=[];return S0(e,function(t){r.push(t)}),r}function K2(e,r){var t,n,o,i,a,u,l,c,d,p,m=0,g=e.type==="FeatureCollection",y=e.type==="Feature",E=g?e.features.length:1;for(t=0;t<E;t++){for(u=g?e.features[t].geometry:y?e.geometry:e,c=g?e.features[t].properties:y?e.properties:{},d=g?e.features[t].bbox:y?e.bbox:void 0,p=g?e.features[t].id:y?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,m,c,d,p)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(r(i,m,c,d,p)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(r(i.geometries[n],m,c,d,p)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}m++}}function ZY(e,r,t){var n=t;return K2(e,function(o,i,a,u,l){i===0&&t===void 0?n=o:n=r(n,o,i,a,u,l)}),n}function I4(e,r){K2(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(so.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],p={type:l,coordinates:d};if(r(so.feature(p,o),n,c)===!1)return!1}})}function WY(e,r,t){var n=t;return I4(e,function(o,i,a){i===0&&a===0&&t===void 0?n=o:n=r(n,o,i,a)}),n}function pO(e,r){I4(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(S0(t,function(p,m,g,y,E){if(u===void 0||n>l||y>c||E>d){u=p,l=n,c=y,d=E,i=0;return}var b=so.lineString([u,p],t.properties);if(r(b,n,o,E,i)===!1)return!1;i++,u=p})===!1)return!1}}})}function XY(e,r,t){var n=t,o=!1;return pO(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 fO(e,r){if(!e)throw new Error("geojson is required");I4(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(so.lineString(a[u],t.properties),n,o,u)===!1)return!1;break}}})}function YY(e,r,t){var n=t;return fO(e,function(o,i,a,u){i===0&&t===void 0?n=o:n=r(n,o,i,a,u)}),n}function qY(e,r){if(r=r||{},!so.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),so.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),so.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),so.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),so.lineString([l[n][o][i],l[n][o][i+1]],a,r)}throw new Error("geojson is invalid")}function JY(e,r){if(r=r||{},!so.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 so.point(l,a,r);case"MultiPoint":return n<0&&(n=l.length+n),so.point(l[n],a,r);case"LineString":return i<0&&(i=l.length+i),so.point(l[i],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),so.point(l[o][i],a,r);case"MultiLineString":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),so.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),so.point(l[n][o][i],a,r)}throw new Error("geojson is invalid")}hn.coordAll=HY;hn.coordEach=S0;hn.coordReduce=zY;hn.featureEach=dO;hn.featureReduce=VY;hn.findPoint=JY;hn.findSegment=qY;hn.flattenEach=I4;hn.flattenReduce=WY;hn.geomEach=K2;hn.geomReduce=ZY;hn.lineEach=fO;hn.lineReduce=YY;hn.propEach=cO;hn.propReduce=$Y;hn.segmentEach=pO;hn.segmentReduce=XY});var xO=Bt(jt=>{"use strict";f();Object.defineProperty(jt,"__esModule",{value:!0});var ti=63710088e-1,eS={centimeters:ti*100,centimetres:ti*100,degrees:360/(2*Math.PI),feet:ti*3.28084,inches:ti*39.37,kilometers:ti/1e3,kilometres:ti/1e3,meters:ti,metres:ti,miles:ti/1609.344,millimeters:ti*1e3,millimetres:ti*1e3,nauticalmiles:ti/1852,radians:1,yards:ti*1.0936},Q2={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 Jl(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 KY(e,r,t={}){switch(e){case"Point":return tS(r).geometry;case"LineString":return nS(r).geometry;case"Polygon":return rS(r).geometry;case"MultiPoint":return gO(r).geometry;case"MultiLineString":return hO(r).geometry;case"MultiPolygon":return yO(r).geometry;default:throw new Error(e+" is invalid")}}function tS(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(!S4(e[0])||!S4(e[1]))throw new Error("coordinates must contain numbers");return Jl({type:"Point",coordinates:e},r,t)}function QY(e,r,t={}){return C4(e.map(n=>tS(n,r)),t)}function rS(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 Jl({type:"Polygon",coordinates:e},r,t)}function eq(e,r,t={}){return C4(e.map(n=>rS(n,r)),t)}function nS(e,r,t={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return Jl({type:"LineString",coordinates:e},r,t)}function tq(e,r,t={}){return C4(e.map(n=>nS(n,r)),t)}function C4(e,r={}){let t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}function hO(e,r,t={}){return Jl({type:"MultiLineString",coordinates:e},r,t)}function gO(e,r,t={}){return Jl({type:"MultiPoint",coordinates:e},r,t)}function yO(e,r,t={}){return Jl({type:"MultiPolygon",coordinates:e},r,t)}function rq(e,r,t={}){return Jl({type:"GeometryCollection",geometries:e},r,t)}function nq(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 bO(e,r="kilometers"){let t=eS[r];if(!t)throw new Error(r+" units is invalid");return e*t}function oS(e,r="kilometers"){let t=eS[r];if(!t)throw new Error(r+" units is invalid");return e/t}function oq(e,r){return vO(oS(e,r))}function iq(e){let r=e%360;return r<0&&(r+=360),r}function aq(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function vO(e){return e%(2*Math.PI)*180/Math.PI}function sq(e){return e%360*Math.PI/180}function uq(e,r="kilometers",t="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return bO(oS(e,r),t)}function lq(e,r="meters",t="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=Q2[r];if(!n)throw new Error("invalid original units");let o=Q2[t];if(!o)throw new Error("invalid final units");return e/n*o}function S4(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function cq(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function dq(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(!S4(r))throw new Error("bbox must only contain numbers")})}function pq(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")}jt.areaFactors=Q2;jt.azimuthToBearing=aq;jt.bearingToAzimuth=iq;jt.convertArea=lq;jt.convertLength=uq;jt.degreesToRadians=sq;jt.earthRadius=ti;jt.factors=eS;jt.feature=Jl;jt.featureCollection=C4;jt.geometry=KY;jt.geometryCollection=rq;jt.isNumber=S4;jt.isObject=cq;jt.lengthToDegrees=oq;jt.lengthToRadians=oS;jt.lineString=nS;jt.lineStrings=tq;jt.multiLineString=hO;jt.multiPoint=gO;jt.multiPolygon=yO;jt.point=tS;jt.points=QY;jt.polygon=rS;jt.polygons=eq;jt.radiansToDegrees=vO;jt.radiansToLength=bO;jt.round=nq;jt.validateBBox=dq;jt.validateId=pq});var DO=Bt(gn=>{"use strict";f();Object.defineProperty(gn,"__esModule",{value:!0});var uo=xO();function C0(e,r,t){if(e!==null)for(var n,o,i,a,u,l,c,d=0,p=0,m,g=e.type,y=g==="FeatureCollection",E=g==="Feature",b=y?e.features.length:1,v=0;v<b;v++){c=y?e.features[v].geometry:E?e.geometry:e,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1;for(var D=0;D<u;D++){var M=0,T=0;if(a=m?c.geometries[D]: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,p,v,M,T)===!1)return!1;p++,M++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(r(l[n],p,v,M,T)===!1)return!1;p++,B==="MultiPoint"&&M++}B==="LineString"&&M++;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],p,v,M,T)===!1)return!1;p++}B==="MultiLineString"&&M++,B==="Polygon"&&T++}B==="Polygon"&&M++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(T=0,o=0;o<l[n].length;o++){for(i=0;i<l[n][o].length-d;i++){if(r(l[n][o][i],p,v,M,T)===!1)return!1;p++}T++}M++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(C0(a.geometries[n],r,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function fq(e,r,t,n){var o=t;return C0(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 EO(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 mq(e,r,t){var n=t;return EO(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function IO(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 hq(e,r,t){var n=t;return IO(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function gq(e){var r=[];return C0(e,function(t){r.push(t)}),r}function iS(e,r){var t,n,o,i,a,u,l,c,d,p,m=0,g=e.type==="FeatureCollection",y=e.type==="Feature",E=g?e.features.length:1;for(t=0;t<E;t++){for(u=g?e.features[t].geometry:y?e.geometry:e,c=g?e.features[t].properties:y?e.properties:{},d=g?e.features[t].bbox:y?e.bbox:void 0,p=g?e.features[t].id:y?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,m,c,d,p)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(r(i,m,c,d,p)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(r(i.geometries[n],m,c,d,p)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}m++}}function yq(e,r,t){var n=t;return iS(e,function(o,i,a,u,l){i===0&&t===void 0?n=o:n=r(n,o,i,a,u,l)}),n}function D4(e,r){iS(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(uo.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],p={type:l,coordinates:d};if(r(uo.feature.call(void 0,p,o),n,c)===!1)return!1}})}function bq(e,r,t){var n=t;return D4(e,function(o,i,a){i===0&&a===0&&t===void 0?n=o:n=r(n,o,i,a)}),n}function SO(e,r){D4(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(C0(t,function(p,m,g,y,E){if(u===void 0||n>l||y>c||E>d){u=p,l=n,c=y,d=E,i=0;return}var b=uo.lineString.call(void 0,[u,p],t.properties);if(r(b,n,o,E,i)===!1)return!1;i++,u=p})===!1)return!1}}})}function vq(e,r,t){var n=t,o=!1;return SO(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 CO(e,r){if(!e)throw new Error("geojson is required");D4(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(uo.lineString.call(void 0,a[u],t.properties),n,o,u)===!1)return!1;break}}})}function xq(e,r,t){var n=t;return CO(e,function(o,i,a,u){i===0&&t===void 0?n=o:n=r(n,o,i,a,u)}),n}function Eq(e,r){if(r=r||{},!uo.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),uo.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),uo.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),uo.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),uo.lineString.call(void 0,[l[n][o][i],l[n][o][i+1]],a,r)}throw new Error("geojson is invalid")}function Iq(e,r){if(r=r||{},!uo.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 uo.point.call(void 0,l,a,r);case"MultiPoint":return n<0&&(n=l.length+n),uo.point.call(void 0,l[n],a,r);case"LineString":return i<0&&(i=l.length+i),uo.point.call(void 0,l[i],a,r);case"Polygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),uo.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),uo.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),uo.point.call(void 0,l[n][o][i],a,r)}throw new Error("geojson is invalid")}gn.coordAll=gq;gn.coordEach=C0;gn.coordReduce=fq;gn.featureEach=IO;gn.featureReduce=hq;gn.findPoint=Iq;gn.findSegment=Eq;gn.flattenEach=D4;gn.flattenReduce=bq;gn.geomEach=iS;gn.geomReduce=yq;gn.lineEach=CO;gn.lineReduce=xq;gn.propEach=EO;gn.propReduce=mq;gn.segmentEach=SO;gn.segmentReduce=vq});var MO=Bt(T4=>{"use strict";f();Object.defineProperty(T4,"__esModule",{value:!0});var Sq=DO();function TO(e,r={}){if(e.bbox!=null&&r.recompute!==!0)return e.bbox;let t=[1/0,1/0,-1/0,-1/0];return Sq.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 Cq=TO;T4.bbox=TO;T4.default=Cq});var OO=Bt((AMe,aS)=>{f();var Rs=oO(),AO=J2(),PO=mO(),Mf=MO().default,Dq=PO.featureEach,MMe=PO.coordEach,wMe=AO.polygon,wO=AO.featureCollection;function _O(e){var r=new Rs(e);return r.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:Mf(t),Rs.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:Mf(o),n.push(o)}):Dq(t,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:Mf(o),n.push(o)}),Rs.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:Mf(t),Rs.prototype.remove.call(this,t,n)},r.clear=function(){return Rs.prototype.clear.call(this)},r.search=function(t){var n=Rs.prototype.search.call(this,this.toBBox(t));return wO(n)},r.collides=function(t){return Rs.prototype.collides.call(this,this.toBBox(t))},r.all=function(){var t=Rs.prototype.all.call(this);return wO(t)},r.toJSON=function(){return Rs.prototype.toJSON.call(this)},r.fromJSON=function(t){return Rs.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=Mf(t);else if(t.type==="FeatureCollection")n=Mf(t);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},r}aS.exports=_O;aS.exports.default=_O});var PS=Bt((wS,AS)=>{f();(function(e,r){typeof wS=="object"&&typeof AS<"u"?AS.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self,e.polygonClipping=r())})(wS,(function(){"use strict";function e(H,S){var C={label:0,sent:function(){if(R[0]&1)throw R[1];return R[1]},trys:[],ops:[]},P,L,R,K;return K={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function re(ae){return function(Te){return fe([ae,Te])}}function fe(ae){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,L&&(R=ae[0]&2?L.return:ae[0]?L.throw||((R=L.return)&&R.call(L),0):L.next)&&!(R=R.call(L,ae[1])).done)return R;switch(L=0,R&&(ae=[ae[0]&2,R.value]),ae[0]){case 0:case 1:R=ae;break;case 4:return C.label++,{value:ae[1],done:!1};case 5:C.label++,L=ae[1],ae=[0];continue;case 7:ae=C.ops.pop(),C.trys.pop();continue;default:if(R=C.trys,!(R=R.length>0&&R[R.length-1])&&(ae[0]===6||ae[0]===2)){C=0;continue}if(ae[0]===3&&(!R||ae[1]>R[0]&&ae[1]<R[3])){C.label=ae[1];break}if(ae[0]===6&&C.label<R[1]){C.label=R[1],R=ae;break}if(R&&C.label<R[2]){C.label=R[2],C.ops.push(ae);break}R[2]&&C.ops.pop(),C.trys.pop();continue}ae=S.call(H,C)}catch(Te){ae=[6,Te],L=0}finally{P=R=0}if(ae[0]&5)throw ae[1];return{value:ae[0]?ae[1]:void 0,done:!0}}}var r=(function(){function H(S,C){this.next=null,this.key=S,this.data=C,this.left=null,this.right=null}return H})();function t(H,S){return H>S?1:H<S?-1:0}function n(H,S,C){for(var P=new r(null,null),L=P,R=P;;){var K=C(H,S.key);if(K<0){if(S.left===null)break;if(C(H,S.left.key)<0){var re=S.left;if(S.left=re.right,re.right=S,S=re,S.left===null)break}R.left=S,R=S,S=S.left}else if(K>0){if(S.right===null)break;if(C(H,S.right.key)>0){var re=S.right;if(S.right=re.left,re.left=S,S=re,S.right===null)break}L.right=S,L=S,S=S.right}else break}return L.right=S.left,R.left=S.right,S.left=P.right,S.right=P.left,S}function o(H,S,C,P){var L=new r(H,S);if(C===null)return L.left=L.right=null,L;C=n(H,C,P);var R=P(H,C.key);return R<0?(L.left=C.left,L.right=C,C.left=null):R>=0&&(L.right=C.right,L.left=C,C.right=null),L}function i(H,S,C){var P=null,L=null;if(S){S=n(H,S,C);var R=C(S.key,H);R===0?(P=S.left,L=S.right):R<0?(L=S.right,S.right=null,P=S):(P=S.left,S.left=null,L=S)}return{left:P,right:L}}function a(H,S,C){return S===null?H:(H===null||(S=n(H.key,S,C),S.left=H),S)}function u(H,S,C,P,L){if(H){P(""+S+(C?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+L(H)+"\n");var R=S+(C?" ":"\u2502 ");H.left&&u(H.left,R,!1,P,L),H.right&&u(H.right,R,!0,P,L)}}var l=(function(){function H(S){S===void 0&&(S=t),this._root=null,this._size=0,this._comparator=S}return H.prototype.insert=function(S,C){return this._size++,this._root=o(S,C,this._root,this._comparator)},H.prototype.add=function(S,C){var P=new r(S,C);this._root===null&&(P.left=P.right=null,this._size++,this._root=P);var L=this._comparator,R=n(S,this._root,L),K=L(S,R.key);return K===0?this._root=R:(K<0?(P.left=R.left,P.right=R,R.left=null):K>0&&(P.right=R.right,P.left=R,R.right=null),this._size++,this._root=P),this._root},H.prototype.remove=function(S){this._root=this._remove(S,this._root,this._comparator)},H.prototype._remove=function(S,C,P){var L;if(C===null)return null;C=n(S,C,P);var R=P(S,C.key);return R===0?(C.left===null?L=C.right:(L=n(S,C.left,P),L.right=C.right),this._size--,L):C},H.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},H.prototype.findStatic=function(S){for(var C=this._root,P=this._comparator;C;){var L=P(S,C.key);if(L===0)return C;L<0?C=C.left:C=C.right}return null},H.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},H.prototype.contains=function(S){for(var C=this._root,P=this._comparator;C;){var L=P(S,C.key);if(L===0)return!0;L<0?C=C.left:C=C.right}return!1},H.prototype.forEach=function(S,C){for(var P=this._root,L=[],R=!1;!R;)P!==null?(L.push(P),P=P.left):L.length!==0?(P=L.pop(),S.call(C,P),P=P.right):R=!0;return this},H.prototype.range=function(S,C,P,L){for(var R=[],K=this._comparator,re=this._root,fe;R.length!==0||re;)if(re)R.push(re),re=re.left;else{if(re=R.pop(),fe=K(re.key,C),fe>0)break;if(K(re.key,S)>=0&&P.call(L,re))return this;re=re.right}return this},H.prototype.keys=function(){var S=[];return this.forEach(function(C){var P=C.key;return S.push(P)}),S},H.prototype.values=function(){var S=[];return this.forEach(function(C){var P=C.data;return S.push(P)}),S},H.prototype.min=function(){return this._root?this.minNode(this._root).key:null},H.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},H.prototype.minNode=function(S){if(S===void 0&&(S=this._root),S)for(;S.left;)S=S.left;return S},H.prototype.maxNode=function(S){if(S===void 0&&(S=this._root),S)for(;S.right;)S=S.right;return S},H.prototype.at=function(S){for(var C=this._root,P=!1,L=0,R=[];!P;)if(C)R.push(C),C=C.left;else if(R.length>0){if(C=R.pop(),L===S)return C;L++,C=C.right}else P=!0;return null},H.prototype.next=function(S){var C=this._root,P=null;if(S.right){for(P=S.right;P.left;)P=P.left;return P}for(var L=this._comparator;C;){var R=L(S.key,C.key);if(R===0)break;R<0?(P=C,C=C.left):C=C.right}return P},H.prototype.prev=function(S){var C=this._root,P=null;if(S.left!==null){for(P=S.left;P.right;)P=P.right;return P}for(var L=this._comparator;C;){var R=L(S.key,C.key);if(R===0)break;R<0?C=C.left:(P=C,C=C.right)}return P},H.prototype.clear=function(){return this._root=null,this._size=0,this},H.prototype.toList=function(){return p(this._root)},H.prototype.load=function(S,C,P){C===void 0&&(C=[]),P===void 0&&(P=!1);var L=S.length,R=this._comparator;if(P&&y(S,C,0,L-1,R),this._root===null)this._root=c(S,C,0,L),this._size=L;else{var K=g(this.toList(),d(S,C),R);L=this._size+L,this._root=m({head:K},0,L)}return this},H.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(H.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(H.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),H.prototype.toString=function(S){S===void 0&&(S=function(P){return String(P.key)});var C=[];return u(this._root,"",!0,function(P){return C.push(P)},S),C.join("")},H.prototype.update=function(S,C,P){var L=this._comparator,R=i(S,this._root,L),K=R.left,re=R.right;L(S,C)<0?re=o(C,P,re,L):K=o(C,P,K,L),this._root=a(K,re,L)},H.prototype.split=function(S){return i(S,this._root,this._comparator)},H.prototype[Symbol.iterator]=function(){var S,C,P;return e(this,function(L){switch(L.label){case 0:S=this._root,C=[],P=!1,L.label=1;case 1:return P?[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 L.sent(),S=S.right,[3,5];case 4:P=!0,L.label=5;case 5:return[3,1];case 6:return[2]}})},H})();function c(H,S,C,P){var L=P-C;if(L>0){var R=C+Math.floor(L/2),K=H[R],re=S[R],fe=new r(K,re);return fe.left=c(H,S,C,R),fe.right=c(H,S,R+1,P),fe}return null}function d(H,S){for(var C=new r(null,null),P=C,L=0;L<H.length;L++)P=P.next=new r(H[L],S[L]);return P.next=null,C.next}function p(H){for(var S=H,C=[],P=!1,L=new r(null,null),R=L;!P;)S?(C.push(S),S=S.left):C.length>0?(S=R=R.next=C.pop(),S=S.right):P=!0;return R.next=null,L.next}function m(H,S,C){var P=C-S;if(P>0){var L=S+Math.floor(P/2),R=m(H,S,L),K=H.head;return K.left=R,H.head=H.head.next,K.right=m(H,L+1,C),K}return null}function g(H,S,C){for(var P=new r(null,null),L=P,R=H,K=S;R!==null&&K!==null;)C(R.key,K.key)<0?(L.next=R,R=R.next):(L.next=K,K=K.next),L=L.next;return R!==null?L.next=R:K!==null&&(L.next=K),P.next}function y(H,S,C,P,L){if(!(C>=P)){for(var R=H[C+P>>1],K=C-1,re=P+1;;){do K++;while(L(H[K],R)<0);do re--;while(L(H[re],R)>0);if(K>=re)break;var fe=H[K];H[K]=H[re],H[re]=fe,fe=S[K],S[K]=S[re],S[re]=fe}y(H,S,C,re,L),y(H,S,re+1,P,L)}}let E=(H,S)=>H.ll.x<=S.x&&S.x<=H.ur.x&&H.ll.y<=S.y&&S.y<=H.ur.y,b=(H,S)=>{if(S.ur.x<H.ll.x||H.ur.x<S.ll.x||S.ur.y<H.ll.y||H.ur.y<S.ll.y)return null;let C=H.ll.x<S.ll.x?S.ll.x:H.ll.x,P=H.ur.x<S.ur.x?H.ur.x:S.ur.x,L=H.ll.y<S.ll.y?S.ll.y:H.ll.y,R=H.ur.y<S.ur.y?H.ur.y:S.ur.y;return{ll:{x:C,y:L},ur:{x:P,y:R}}},v=Number.EPSILON;v===void 0&&(v=Math.pow(2,-52));let D=v*v,M=(H,S)=>{if(-v<H&&H<v&&-v<S&&S<v)return 0;let C=H-S;return C*C<D*H*S?0:H<S?-1:1};class T{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),P=this.tree.prev(C);if(P!==null&&M(C.key,P.key)===0)return this.tree.remove(S),P.key;let L=this.tree.next(C);return L!==null&&M(C.key,L.key)===0?(this.tree.remove(S),L.key):S}}let G=new T,_=11102230246251565e-32,F=134217729,A=(3+8*_)*_;function j(H,S,C,P,L){let R,K,re,fe,ae=S[0],Te=P[0],ne=0,me=0;Te>ae==Te>-ae?(R=ae,ae=S[++ne]):(R=Te,Te=P[++me]);let Ae=0;if(ne<H&&me<C)for(Te>ae==Te>-ae?(K=ae+R,re=R-(K-ae),ae=S[++ne]):(K=Te+R,re=R-(K-Te),Te=P[++me]),R=K,re!==0&&(L[Ae++]=re);ne<H&&me<C;)Te>ae==Te>-ae?(K=R+ae,fe=K-R,re=R-(K-fe)+(ae-fe),ae=S[++ne]):(K=R+Te,fe=K-R,re=R-(K-fe)+(Te-fe),Te=P[++me]),R=K,re!==0&&(L[Ae++]=re);for(;ne<H;)K=R+ae,fe=K-R,re=R-(K-fe)+(ae-fe),ae=S[++ne],R=K,re!==0&&(L[Ae++]=re);for(;me<C;)K=R+Te,fe=K-R,re=R-(K-fe)+(Te-fe),Te=P[++me],R=K,re!==0&&(L[Ae++]=re);return(R!==0||Ae===0)&&(L[Ae++]=R),Ae}function N(H,S){let C=S[0];for(let P=1;P<H;P++)C+=S[P];return C}function Z(H){return new Float64Array(H)}let ie=(3+16*_)*_,de=(2+12*_)*_,J=(9+64*_)*_*_,z=Z(4),X=Z(8),W=Z(12),ee=Z(16),ce=Z(4);function ye(H,S,C,P,L,R,K){let re,fe,ae,Te,ne,me,Ae,je,he,Se,Fe,Ft,Vr,vr,Jr,Yt,sn,un,Vo=H-L,vo=C-L,Ho=S-R,Hr=P-R;vr=Vo*Hr,me=F*Vo,Ae=me-(me-Vo),je=Vo-Ae,me=F*Hr,he=me-(me-Hr),Se=Hr-he,Jr=je*Se-(vr-Ae*he-je*he-Ae*Se),Yt=Ho*vo,me=F*Ho,Ae=me-(me-Ho),je=Ho-Ae,me=F*vo,he=me-(me-vo),Se=vo-he,sn=je*Se-(Yt-Ae*he-je*he-Ae*Se),Fe=Jr-sn,ne=Jr-Fe,z[0]=Jr-(Fe+ne)+(ne-sn),Ft=vr+Fe,ne=Ft-vr,Vr=vr-(Ft-ne)+(Fe-ne),Fe=Vr-Yt,ne=Vr-Fe,z[1]=Vr-(Fe+ne)+(ne-Yt),un=Ft+Fe,ne=un-Ft,z[2]=Ft-(un-ne)+(Fe-ne),z[3]=un;let Li=N(4,z),Sl=de*K;if(Li>=Sl||-Li>=Sl||(ne=H-Vo,re=H-(Vo+ne)+(ne-L),ne=C-vo,ae=C-(vo+ne)+(ne-L),ne=S-Ho,fe=S-(Ho+ne)+(ne-R),ne=P-Hr,Te=P-(Hr+ne)+(ne-R),re===0&&fe===0&&ae===0&&Te===0)||(Sl=J*K+A*Math.abs(Li),Li+=Vo*Te+Hr*re-(Ho*ae+vo*fe),Li>=Sl||-Li>=Sl))return Li;vr=re*Hr,me=F*re,Ae=me-(me-re),je=re-Ae,me=F*Hr,he=me-(me-Hr),Se=Hr-he,Jr=je*Se-(vr-Ae*he-je*he-Ae*Se),Yt=fe*vo,me=F*fe,Ae=me-(me-fe),je=fe-Ae,me=F*vo,he=me-(me-vo),Se=vo-he,sn=je*Se-(Yt-Ae*he-je*he-Ae*Se),Fe=Jr-sn,ne=Jr-Fe,ce[0]=Jr-(Fe+ne)+(ne-sn),Ft=vr+Fe,ne=Ft-vr,Vr=vr-(Ft-ne)+(Fe-ne),Fe=Vr-Yt,ne=Vr-Fe,ce[1]=Vr-(Fe+ne)+(ne-Yt),un=Ft+Fe,ne=un-Ft,ce[2]=Ft-(un-ne)+(Fe-ne),ce[3]=un;let Xy=j(4,z,4,ce,X);vr=Vo*Te,me=F*Vo,Ae=me-(me-Vo),je=Vo-Ae,me=F*Te,he=me-(me-Te),Se=Te-he,Jr=je*Se-(vr-Ae*he-je*he-Ae*Se),Yt=Ho*ae,me=F*Ho,Ae=me-(me-Ho),je=Ho-Ae,me=F*ae,he=me-(me-ae),Se=ae-he,sn=je*Se-(Yt-Ae*he-je*he-Ae*Se),Fe=Jr-sn,ne=Jr-Fe,ce[0]=Jr-(Fe+ne)+(ne-sn),Ft=vr+Fe,ne=Ft-vr,Vr=vr-(Ft-ne)+(Fe-ne),Fe=Vr-Yt,ne=Vr-Fe,ce[1]=Vr-(Fe+ne)+(ne-Yt),un=Ft+Fe,ne=un-Ft,ce[2]=Ft-(un-ne)+(Fe-ne),ce[3]=un;let Yy=j(Xy,X,4,ce,W);vr=re*Te,me=F*re,Ae=me-(me-re),je=re-Ae,me=F*Te,he=me-(me-Te),Se=Te-he,Jr=je*Se-(vr-Ae*he-je*he-Ae*Se),Yt=fe*ae,me=F*fe,Ae=me-(me-fe),je=fe-Ae,me=F*ae,he=me-(me-ae),Se=ae-he,sn=je*Se-(Yt-Ae*he-je*he-Ae*Se),Fe=Jr-sn,ne=Jr-Fe,ce[0]=Jr-(Fe+ne)+(ne-sn),Ft=vr+Fe,ne=Ft-vr,Vr=vr-(Ft-ne)+(Fe-ne),Fe=Vr-Yt,ne=Vr-Fe,ce[1]=Vr-(Fe+ne)+(ne-Yt),un=Ft+Fe,ne=un-Ft,ce[2]=Ft-(un-ne)+(Fe-ne),ce[3]=un;let j3=j(Yy,W,4,ce,ee);return ee[j3-1]}function Ce(H,S,C,P,L,R){let K=(S-R)*(C-L),re=(H-L)*(P-R),fe=K-re,ae=Math.abs(K+re);return Math.abs(fe)>=ie*ae?fe:-ye(H,S,C,P,L,R,ae)}let Pe=(H,S)=>H.x*S.y-H.y*S.x,Le=(H,S)=>H.x*S.x+H.y*S.y,be=(H,S,C)=>{let P=Ce(H.x,H.y,S.x,S.y,C.x,C.y);return P>0?-1:P<0?1:0},He=H=>Math.sqrt(Le(H,H)),tt=(H,S,C)=>{let P={x:S.x-H.x,y:S.y-H.y},L={x:C.x-H.x,y:C.y-H.y};return Pe(L,P)/He(L)/He(P)},lt=(H,S,C)=>{let P={x:S.x-H.x,y:S.y-H.y},L={x:C.x-H.x,y:C.y-H.y};return Le(L,P)/He(L)/He(P)},U=(H,S,C)=>S.y===0?null:{x:H.x+S.x/S.y*(C-H.y),y:C},ve=(H,S,C)=>S.x===0?null:{x:C,y:H.y+S.y/S.x*(C-H.x)},Y=(H,S,C,P)=>{if(S.x===0)return ve(C,P,H.x);if(P.x===0)return ve(H,S,C.x);if(S.y===0)return U(C,P,H.y);if(P.y===0)return U(H,S,C.y);let L=Pe(S,P);if(L==0)return null;let R={x:C.x-H.x,y:C.y-H.y},K=Pe(R,S)/L,re=Pe(R,P)/L,fe=H.x+re*S.x,ae=C.x+K*P.x,Te=H.y+re*S.y,ne=C.y+K*P.y,me=(fe+ae)/2,Ae=(Te+ne)/2;return{x:me,y:Ae}};class we{static compare(S,C){let P=we.comparePoints(S.point,C.point);return P!==0?P:(S.point!==C.point&&S.link(C),S.isLeft!==C.isLeft?S.isLeft?1:-1:xe.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 P=0,L=C.length;P<L;P++){let R=C[P];this.point.events.push(R),R.point=this.point}this.checkForConsuming()}checkForConsuming(){let S=this.point.events.length;for(let C=0;C<S;C++){let P=this.point.events[C];if(P.segment.consumedBy===void 0)for(let L=C+1;L<S;L++){let R=this.point.events[L];R.consumedBy===void 0&&P.otherSE.point.events===R.otherSE.point.events&&P.segment.consume(R.segment)}}}getAvailableLinkedEvents(){let S=[];for(let C=0,P=this.point.events.length;C<P;C++){let L=this.point.events[C];L!==this&&!L.segment.ringOut&&L.segment.isInResult()&&S.push(L)}return S}getLeftmostComparator(S){let C=new Map,P=L=>{let R=L.otherSE;C.set(L,{sine:tt(this.point,S.point,R.point),cosine:lt(this.point,S.point,R.point)})};return(L,R)=>{C.has(L)||P(L),C.has(R)||P(R);let{sine:K,cosine:re}=C.get(L),{sine:fe,cosine:ae}=C.get(R);return K>=0&&fe>=0?re<ae?1:re>ae?-1:0:K<0&&fe<0?re<ae?-1:re>ae?1:0:fe<K?-1:fe>K?1:0}}}let De=0;class xe{static compare(S,C){let P=S.leftSE.point.x,L=C.leftSE.point.x,R=S.rightSE.point.x,K=C.rightSE.point.x;if(K<P)return 1;if(R<L)return-1;let re=S.leftSE.point.y,fe=C.leftSE.point.y,ae=S.rightSE.point.y,Te=C.rightSE.point.y;if(P<L){if(fe<re&&fe<ae)return 1;if(fe>re&&fe>ae)return-1;let ne=S.comparePoint(C.leftSE.point);if(ne<0)return 1;if(ne>0)return-1;let me=C.comparePoint(S.rightSE.point);return me!==0?me:-1}if(P>L){if(re<fe&&re<Te)return-1;if(re>fe&&re>Te)return 1;let ne=C.comparePoint(S.leftSE.point);if(ne!==0)return ne;let me=S.comparePoint(C.rightSE.point);return me<0?1:me>0?-1:1}if(re<fe)return-1;if(re>fe)return 1;if(R<K){let ne=C.comparePoint(S.rightSE.point);if(ne!==0)return ne}if(R>K){let ne=S.comparePoint(C.rightSE.point);if(ne<0)return 1;if(ne>0)return-1}if(R!==K){let ne=ae-re,me=R-P,Ae=Te-fe,je=K-L;if(ne>me&&Ae<je)return 1;if(ne<me&&Ae>je)return-1}return R>K?1:R<K||ae<Te?-1:ae>Te?1:S.id<C.id?-1:S.id>C.id?1:0}constructor(S,C,P,L){this.id=++De,this.leftSE=S,S.segment=this,S.otherSE=C,this.rightSE=C,C.segment=this,C.otherSE=S,this.rings=P,this.windings=L}static fromRing(S,C,P){let L,R,K,re=we.comparePoints(S,C);if(re<0)L=S,R=C,K=1;else if(re>0)L=C,R=S,K=-1;else throw new Error("Tried to create degenerate segment at [".concat(S.x,", ").concat(S.y,"]"));let fe=new we(L,!0),ae=new we(R,!1);return new xe(fe,ae,[P],[K])}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,P=this.rightSE.point,L=this.vector();if(C.x===P.x)return S.x===C.x?0:S.x<C.x?1:-1;let R=(S.y-C.y)/L.y,K=C.x+R*L.x;if(S.x===K)return 0;let re=(S.x-C.x)/L.x,fe=C.y+re*L.y;return S.y===fe?0:S.y<fe?-1:1}getIntersection(S){let C=this.bbox(),P=S.bbox(),L=b(C,P);if(L===null)return null;let R=this.leftSE.point,K=this.rightSE.point,re=S.leftSE.point,fe=S.rightSE.point,ae=E(C,re)&&this.comparePoint(re)===0,Te=E(P,R)&&S.comparePoint(R)===0,ne=E(C,fe)&&this.comparePoint(fe)===0,me=E(P,K)&&S.comparePoint(K)===0;if(Te&&ae)return me&&!ne?K:!me&&ne?fe:null;if(Te)return ne&&R.x===fe.x&&R.y===fe.y?null:R;if(ae)return me&&K.x===re.x&&K.y===re.y?null:re;if(me&&ne)return null;if(me)return K;if(ne)return fe;let Ae=Y(R,this.vector(),re,S.vector());return Ae===null||!E(L,Ae)?null:G.round(Ae.x,Ae.y)}split(S){let C=[],P=S.events!==void 0,L=new we(S,!0),R=new we(S,!1),K=this.rightSE;this.replaceRightSE(R),C.push(R),C.push(L);let re=new xe(L,K,this.rings.slice(),this.windings.slice());return we.comparePoints(re.leftSE.point,re.rightSE.point)>0&&re.swapEvents(),we.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),P&&(L.checkForConsuming(),R.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,P=this.windings.length;C<P;C++)this.windings[C]*=-1}consume(S){let C=this,P=S;for(;C.consumedBy;)C=C.consumedBy;for(;P.consumedBy;)P=P.consumedBy;let L=xe.compare(C,P);if(L!==0){if(L>0){let R=C;C=P,P=R}if(C.prev===P){let R=C;C=P,P=R}for(let R=0,K=P.rings.length;R<K;R++){let re=P.rings[R],fe=P.windings[R],ae=C.rings.indexOf(re);ae===-1?(C.rings.push(re),C.windings.push(fe)):C.windings[ae]+=fe}P.rings=null,P.windings=null,P.consumedBy=C,P.leftSE.consumedBy=C.leftSE,P.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,P=this._afterState.windings,L=this._afterState.multiPolys;for(let re=0,fe=this.rings.length;re<fe;re++){let ae=this.rings[re],Te=this.windings[re],ne=C.indexOf(ae);ne===-1?(C.push(ae),P.push(Te)):P[ne]+=Te}let R=[],K=[];for(let re=0,fe=C.length;re<fe;re++){if(P[re]===0)continue;let ae=C[re],Te=ae.poly;if(K.indexOf(Te)===-1)if(ae.isExterior)R.push(Te);else{K.indexOf(Te)===-1&&K.push(Te);let ne=R.indexOf(ae.poly);ne!==-1&&R.splice(ne,1)}}for(let re=0,fe=R.length;re<fe;re++){let ae=R[re].multiPoly;L.indexOf(ae)===-1&&L.push(ae)}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(yr.type){case"union":{let P=S.length===0,L=C.length===0;this._isInResult=P!==L;break}case"intersection":{let P,L;S.length<C.length?(P=S.length,L=C.length):(P=C.length,L=S.length),this._isInResult=L===yr.numMultiPolys&&P<L;break}case"xor":{let P=Math.abs(S.length-C.length);this._isInResult=P%2===1;break}case"difference":{let P=L=>L.length===1&&L[0].isSubject;this._isInResult=P(S)!==P(C);break}default:throw new Error("Unrecognized operation type found ".concat(yr.type))}return this._isInResult}}class Ne{constructor(S,C,P){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=P,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 L=G.round(S[0][0],S[0][1]);this.bbox={ll:{x:L.x,y:L.y},ur:{x:L.x,y:L.y}};let R=L;for(let K=1,re=S.length;K<re;K++){if(typeof S[K][0]!="number"||typeof S[K][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let fe=G.round(S[K][0],S[K][1]);fe.x===R.x&&fe.y===R.y||(this.segments.push(xe.fromRing(R,fe,this)),fe.x<this.bbox.ll.x&&(this.bbox.ll.x=fe.x),fe.y<this.bbox.ll.y&&(this.bbox.ll.y=fe.y),fe.x>this.bbox.ur.x&&(this.bbox.ur.x=fe.x),fe.y>this.bbox.ur.y&&(this.bbox.ur.y=fe.y),R=fe)}(L.x!==R.x||L.y!==R.y)&&this.segments.push(xe.fromRing(R,L,this))}getSweepEvents(){let S=[];for(let C=0,P=this.segments.length;C<P;C++){let L=this.segments[C];S.push(L.leftSE),S.push(L.rightSE)}return S}}class Rt{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 P=1,L=S.length;P<L;P++){let R=new Ne(S[P],this,!1);R.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=R.bbox.ll.x),R.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=R.bbox.ll.y),R.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=R.bbox.ur.x),R.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=R.bbox.ur.y),this.interiorRings.push(R)}this.multiPoly=C}getSweepEvents(){let S=this.exteriorRing.getSweepEvents();for(let C=0,P=this.interiorRings.length;C<P;C++){let L=this.interiorRings[C].getSweepEvents();for(let R=0,K=L.length;R<K;R++)S.push(L[R])}return S}}class Ht{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(P){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let P=0,L=S.length;P<L;P++){let R=new Rt(S[P],this);R.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=R.bbox.ll.x),R.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=R.bbox.ll.y),R.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=R.bbox.ur.x),R.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=R.bbox.ur.y),this.polys.push(R)}this.isSubject=C}getSweepEvents(){let S=[];for(let C=0,P=this.polys.length;C<P;C++){let L=this.polys[C].getSweepEvents();for(let R=0,K=L.length;R<K;R++)S.push(L[R])}return S}}class Zt{static factory(S){let C=[];for(let P=0,L=S.length;P<L;P++){let R=S[P];if(!R.isInResult()||R.ringOut)continue;let K=null,re=R.leftSE,fe=R.rightSE,ae=[re],Te=re.point,ne=[];for(;K=re,re=fe,ae.push(re),re.point!==Te;)for(;;){let me=re.getAvailableLinkedEvents();if(me.length===0){let he=ae[0].point,Se=ae[ae.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(he.x,",")+" ".concat(he.y,"]. Last matching segment found ends at")+" [".concat(Se.x,", ").concat(Se.y,"]."))}if(me.length===1){fe=me[0].otherSE;break}let Ae=null;for(let he=0,Se=ne.length;he<Se;he++)if(ne[he].point===re.point){Ae=he;break}if(Ae!==null){let he=ne.splice(Ae)[0],Se=ae.splice(he.index);Se.unshift(Se[0].otherSE),C.push(new Zt(Se.reverse()));continue}ne.push({index:ae.length,point:re.point});let je=re.getLeftmostComparator(K);fe=me.sort(je)[0].otherSE;break}C.push(new Zt(ae))}return C}constructor(S){this.events=S;for(let C=0,P=S.length;C<P;C++)S[C].segment.ringOut=this;this.poly=null}getGeom(){let S=this.events[0].point,C=[S];for(let ae=1,Te=this.events.length-1;ae<Te;ae++){let ne=this.events[ae].point,me=this.events[ae+1].point;be(ne,S,me)!==0&&(C.push(ne),S=ne)}if(C.length===1)return null;let P=C[0],L=C[1];be(P,S,L)===0&&C.shift(),C.push(C[0]);let R=this.isExteriorRing()?1:-1,K=this.isExteriorRing()?0:C.length-1,re=this.isExteriorRing()?C.length:-1,fe=[];for(let ae=K;ae!=re;ae+=R)fe.push([C[ae].x,C[ae].y]);return fe}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 L=1,R=this.events.length;L<R;L++){let K=this.events[L];we.compare(S,K)>0&&(S=K)}let C=S.segment.prevInResult(),P=C?C.prevInResult():null;for(;;){if(!C)return null;if(!P)return C.ringOut;if(P.ringOut!==C.ringOut)return P.ringOut.enclosingRing()!==C.ringOut?C.ringOut:C.ringOut.enclosingRing();C=P.prevInResult(),P=C?C.prevInResult():null}}}class Wt{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,P=this.interiorRings.length;C<P;C++){let L=this.interiorRings[C].getGeom();L!==null&&S.push(L)}return S}}class Rr{constructor(S){this.rings=S,this.polys=this._composePolys(S)}getGeom(){let S=[];for(let C=0,P=this.polys.length;C<P;C++){let L=this.polys[C].getGeom();L!==null&&S.push(L)}return S}_composePolys(S){let C=[];for(let P=0,L=S.length;P<L;P++){let R=S[P];if(!R.poly)if(R.isExteriorRing())C.push(new Wt(R));else{let K=R.enclosingRing();K.poly||C.push(new Wt(K)),K.poly.addInterior(R)}}return C}}class qr{constructor(S){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe.compare;this.queue=S,this.tree=new l(C),this.segments=[]}process(S){let C=S.segment,P=[];if(S.consumedBy)return S.isLeft?this.queue.remove(S.otherSE):this.tree.remove(C),P;let L=S.isLeft?this.tree.add(C):this.tree.find(C);if(!L)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 R=L,K=L,re,fe;for(;re===void 0;)R=this.tree.prev(R),R===null?re=null:R.key.consumedBy===void 0&&(re=R.key);for(;fe===void 0;)K=this.tree.next(K),K===null?fe=null:K.key.consumedBy===void 0&&(fe=K.key);if(S.isLeft){let ae=null;if(re){let ne=re.getIntersection(C);if(ne!==null&&(C.isAnEndpoint(ne)||(ae=ne),!re.isAnEndpoint(ne))){let me=this._splitSafely(re,ne);for(let Ae=0,je=me.length;Ae<je;Ae++)P.push(me[Ae])}}let Te=null;if(fe){let ne=fe.getIntersection(C);if(ne!==null&&(C.isAnEndpoint(ne)||(Te=ne),!fe.isAnEndpoint(ne))){let me=this._splitSafely(fe,ne);for(let Ae=0,je=me.length;Ae<je;Ae++)P.push(me[Ae])}}if(ae!==null||Te!==null){let ne=null;ae===null?ne=Te:Te===null?ne=ae:ne=we.comparePoints(ae,Te)<=0?ae:Te,this.queue.remove(C.rightSE),P.push(C.rightSE);let me=C.split(ne);for(let Ae=0,je=me.length;Ae<je;Ae++)P.push(me[Ae])}P.length>0?(this.tree.remove(C),P.push(S)):(this.segments.push(C),C.prev=re)}else{if(re&&fe){let ae=re.getIntersection(fe);if(ae!==null){if(!re.isAnEndpoint(ae)){let Te=this._splitSafely(re,ae);for(let ne=0,me=Te.length;ne<me;ne++)P.push(Te[ne])}if(!fe.isAnEndpoint(ae)){let Te=this._splitSafely(fe,ae);for(let ne=0,me=Te.length;ne<me;ne++)P.push(Te[ne])}}}this.tree.remove(C)}return P}_splitSafely(S,C){this.tree.remove(S);let P=S.rightSE;this.queue.remove(P);let L=S.split(C);return L.push(P),S.consumedBy===void 0&&this.tree.add(S),L}}let go=typeof x<"u"&&x.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,yo=typeof x<"u"&&x.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class qn{run(S,C,P){yr.type=S,G.reset();let L=[new Ht(C,!0)];for(let ne=0,me=P.length;ne<me;ne++)L.push(new Ht(P[ne],!1));if(yr.numMultiPolys=L.length,yr.type==="difference"){let ne=L[0],me=1;for(;me<L.length;)b(L[me].bbox,ne.bbox)!==null?me++:L.splice(me,1)}if(yr.type==="intersection")for(let ne=0,me=L.length;ne<me;ne++){let Ae=L[ne];for(let je=ne+1,he=L.length;je<he;je++)if(b(Ae.bbox,L[je].bbox)===null)return[]}let R=new l(we.compare);for(let ne=0,me=L.length;ne<me;ne++){let Ae=L[ne].getSweepEvents();for(let je=0,he=Ae.length;je<he;je++)if(R.insert(Ae[je]),R.size>go)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let K=new qr(R),re=R.size,fe=R.pop();for(;fe;){let ne=fe.key;if(R.size===re){let Ae=ne.segment;throw new Error("Unable to pop() ".concat(ne.isLeft?"left":"right"," SweepEvent ")+"[".concat(ne.point.x,", ").concat(ne.point.y,"] from segment #").concat(Ae.id," ")+"[".concat(Ae.leftSE.point.x,", ").concat(Ae.leftSE.point.y,"] -> ")+"[".concat(Ae.rightSE.point.x,", ").concat(Ae.rightSE.point.y,"] from queue."))}if(R.size>go)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(K.segments.length>yo)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let me=K.process(ne);for(let Ae=0,je=me.length;Ae<je;Ae++){let he=me[Ae];he.consumedBy===void 0&&R.insert(he)}re=R.size,fe=R.pop()}G.reset();let ae=Zt.factory(K.segments);return new Rr(ae).getGeom()}}let yr=new qn;var br={union:function(H){for(var S=arguments.length,C=new Array(S>1?S-1:0),P=1;P<S;P++)C[P-1]=arguments[P];return yr.run("union",H,C)},intersection:function(H){for(var S=arguments.length,C=new Array(S>1?S-1:0),P=1;P<S;P++)C[P-1]=arguments[P];return yr.run("intersection",H,C)},xor:function(H){for(var S=arguments.length,C=new Array(S>1?S-1:0),P=1;P<S;P++)C[P-1]=arguments[P];return yr.run("xor",H,C)},difference:function(H){for(var S=arguments.length,C=new Array(S>1?S-1:0),P=1;P<S;P++)C[P-1]=arguments[P];return yr.run("difference",H,C)}};return br}))});var qS=Bt((k_e,G4)=>{f();(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,p=l.x-c,m=l.y-d;if(p!==0||m!==0){var g=((a.x-c)*p+(a.y-d)*m)/(p*p+m*m);g>1?(c=l.x,d=l.y):g>0&&(c+=p*g,d+=m*g)}return p=a.x-c,m=a.y-d,p*p+m*m}function t(a,u){for(var l=a[0],c=[l],d,p=1,m=a.length;p<m;p++)d=a[p],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 p=c,m,g=u+1;g<l;g++){var y=r(a[g],a[u],a[l]);y>p&&(m=g,p=y)}p>c&&(m-u>1&&n(a,u,m,c,d),d.push(a[m]),l-m>1&&n(a,m,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 G4<"u"?(G4.exports=i,G4.exports.default=i):typeof self<"u"?self.simplify=i:window.simplify=i})()});var ds=Bt(ki=>{"use strict";f();ki.__esModule=!0;ki.extend=R9;ki.indexOf=Wee;ki.escapeExpression=Xee;ki.isEmpty=Yee;ki.createFrame=qee;ki.blockParams=Jee;ki.appendContextPath=Kee;var $ee={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},Vee=/[&<>"'`=]/g,Hee=/[&<>"'`=]/;function Zee(e){return $ee[e]}function R9(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 L6=Object.prototype.toString;ki.toString=L6;var k6=function(r){return typeof r=="function"};k6(/x/)&&(ki.isFunction=k6=function(e){return typeof e=="function"&&L6.call(e)==="[object Function]"});ki.isFunction=k6;var N9=Array.isArray||function(e){return e&&typeof e=="object"?L6.call(e)==="[object Array]":!1};ki.isArray=N9;function Wee(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function Xee(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return Hee.test(e)?e.replace(Vee,Zee):e}function Yee(e){return!e&&e!==0?!0:!!(N9(e)&&e.length===0)}function qee(e){var r=R9({},e);return r._parent=e,r}function Jee(e,r){return e.path=r,e}function Kee(e,r){return(e?e+".":"")+r}});var Pc=Bt((g3,j9)=>{"use strict";f();g3.__esModule=!0;var R6=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function N6(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<R6.length;l++)this[R6[l]]=u[R6[l]];Error.captureStackTrace&&Error.captureStackTrace(this,N6);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){}}N6.prototype=new Error;g3.default=N6;j9.exports=g3.default});var G9=Bt((y3,U9)=>{"use strict";f();y3.__esModule=!0;var j6=ds();y3.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(j6.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=j6.createFrame(t.data);i.contextPath=j6.appendContextPath(t.data.contextPath,t.name),t={data:i}}return o(r,t)})};U9.exports=y3.default});var $9=Bt((b3,z9)=>{"use strict";f();b3.__esModule=!0;function Qee(e){return e&&e.__esModule?e:{default:e}}var By=ds(),ete=Pc(),tte=Qee(ete);b3.default=function(e){e.registerHelper("each",function(r,t){if(!t)throw new tte.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=By.appendContextPath(t.data.contextPath,t.ids[0])+"."),By.isFunction(r)&&(r=r.call(this)),t.data&&(u=By.createFrame(t.data));function c(y,E,b){u&&(u.key=y,u.index=E,u.first=E===0,u.last=!!b,l&&(u.contextPath=l+y)),a=a+n(r[y],{data:u,blockParams:By.blockParams([r[y],y],[l+y,null])})}if(r&&typeof r=="object")if(By.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 p=[],m=r[Symbol.iterator](),g=m.next();!g.done;g=m.next())p.push(g.value);r=p;for(var d=r.length;i<d;i++)c(i,i,i===r.length-1)}else(function(){var y=void 0;Object.keys(r).forEach(function(E){y!==void 0&&c(y,i-1),y=E,i++}),y!==void 0&&c(y,i-1,!0)})();return i===0&&(a=o(this)),a})};z9.exports=b3.default});var H9=Bt((v3,V9)=>{"use strict";f();v3.__esModule=!0;function rte(e){return e&&e.__esModule?e:{default:e}}var nte=Pc(),ote=rte(nte);v3.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new ote.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};V9.exports=v3.default});var Y9=Bt((x3,X9)=>{"use strict";f();x3.__esModule=!0;function ite(e){return e&&e.__esModule?e:{default:e}}var Z9=ds(),ate=Pc(),W9=ite(ate);x3.default=function(e){e.registerHelper("if",function(r,t){if(arguments.length!=2)throw new W9.default("#if requires exactly one argument");return Z9.isFunction(r)&&(r=r.call(this)),!t.hash.includeZero&&!r||Z9.isEmpty(r)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(r,t){if(arguments.length!=2)throw new W9.default("#unless requires exactly one argument");return e.helpers.if.call(this,r,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};X9.exports=x3.default});var J9=Bt((E3,q9)=>{"use strict";f();E3.__esModule=!0;E3.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)})};q9.exports=E3.default});var Q9=Bt((I3,K9)=>{"use strict";f();I3.__esModule=!0;I3.default=function(e){e.registerHelper("lookup",function(r,t,n){return r&&n.lookupProperty(r,t)})};K9.exports=I3.default});var tL=Bt((S3,eL)=>{"use strict";f();S3.__esModule=!0;function ste(e){return e&&e.__esModule?e:{default:e}}var ky=ds(),ute=Pc(),lte=ste(ute);S3.default=function(e){e.registerHelper("with",function(r,t){if(arguments.length!=2)throw new lte.default("#with requires exactly one argument");ky.isFunction(r)&&(r=r.call(this));var n=t.fn;if(ky.isEmpty(r))return t.inverse(this);var o=t.data;return t.data&&t.ids&&(o=ky.createFrame(t.data),o.contextPath=ky.appendContextPath(t.data.contextPath,t.ids[0])),n(r,{data:o,blockParams:ky.blockParams([r],[o&&o.contextPath])})})};eL.exports=S3.default});var U6=Bt(C3=>{"use strict";f();C3.__esModule=!0;C3.registerDefaultHelpers=Cte;C3.moveHelperToHooks=Dte;function pp(e){return e&&e.__esModule?e:{default:e}}var cte=G9(),dte=pp(cte),pte=$9(),fte=pp(pte),mte=H9(),hte=pp(mte),gte=Y9(),yte=pp(gte),bte=J9(),vte=pp(bte),xte=Q9(),Ete=pp(xte),Ite=tL(),Ste=pp(Ite);function Cte(e){dte.default(e),fte.default(e),hte.default(e),yte.default(e),vte.default(e),Ete.default(e),Ste.default(e)}function Dte(e,r,t){e.helpers[r]&&(e.hooks[r]=e.helpers[r],t||delete e.helpers[r])}});var nL=Bt((D3,rL)=>{"use strict";f();D3.__esModule=!0;var Tte=ds();D3.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=Tte.extend({},l,t.partials);var c=r(a,u);return n.partials=l,c}),t.partials[o.args[0]]=o.fn,i})};rL.exports=D3.default});var oL=Bt(G6=>{"use strict";f();G6.__esModule=!0;G6.registerDefaultDecorators=Pte;function Mte(e){return e&&e.__esModule?e:{default:e}}var wte=nL(),Ate=Mte(wte);function Pte(e){Ate.default(e)}});var z6=Bt((T3,iL)=>{"use strict";f();T3.__esModule=!0;var _te=ds(),sh={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(r){if(typeof r=="string"){var t=_te.indexOf(sh.methodMap,r.toLowerCase());t>=0?r=t:r=parseInt(r,10)}return r},log:function(r){if(r=sh.lookupLevel(r),typeof console<"u"&&sh.lookupLevel(sh.level)<=r){var t=sh.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)}}};T3.default=sh;iL.exports=T3.default});var aL=Bt($6=>{"use strict";f();$6.__esModule=!0;$6.createNewLookupObject=Fte;var Ote=ds();function Fte(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return Ote.extend.apply(void 0,[Object.create(null)].concat(r))}});var V6=Bt(Ly=>{"use strict";f();Ly.__esModule=!0;Ly.createProtoAccessControl=Rte;Ly.resultIsAllowed=Nte;Ly.resetLoggedProperties=Ute;function Bte(e){return e&&e.__esModule?e:{default:e}}var sL=aL(),kte=z6(),Lte=Bte(kte),M3=Object.create(null);function Rte(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:sL.createNewLookupObject(t,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:sL.createNewLookupObject(r,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function Nte(e,r,t){return uL(typeof e=="function"?r.methods:r.properties,t)}function uL(e,r){return e.whitelist[r]!==void 0?e.whitelist[r]===!0:e.defaultValue!==void 0?e.defaultValue:(jte(r),!1)}function jte(e){M3[e]!==!0&&(M3[e]=!0,Lte.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 Ute(){Object.keys(M3).forEach(function(e){delete M3[e]})}});var X6=Bt(nu=>{"use strict";f();nu.__esModule=!0;nu.HandlebarsEnvironment=W6;function lL(e){return e&&e.__esModule?e:{default:e}}var fp=ds(),Gte=Pc(),H6=lL(Gte),zte=U6(),$te=oL(),Vte=z6(),w3=lL(Vte),Hte=V6(),Zte="4.7.8";nu.VERSION=Zte;var Wte=8;nu.COMPILER_REVISION=Wte;var Xte=7;nu.LAST_COMPATIBLE_COMPILER_REVISION=Xte;var Yte={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"};nu.REVISION_CHANGES=Yte;var Z6="[object Object]";function W6(e,r,t){this.helpers=e||{},this.partials=r||{},this.decorators=t||{},zte.registerDefaultHelpers(this),$te.registerDefaultDecorators(this)}W6.prototype={constructor:W6,logger:w3.default,log:w3.default.log,registerHelper:function(r,t){if(fp.toString.call(r)===Z6){if(t)throw new H6.default("Arg not supported with multiple helpers");fp.extend(this.helpers,r)}else this.helpers[r]=t},unregisterHelper:function(r){delete this.helpers[r]},registerPartial:function(r,t){if(fp.toString.call(r)===Z6)fp.extend(this.partials,r);else{if(typeof t>"u")throw new H6.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(fp.toString.call(r)===Z6){if(t)throw new H6.default("Arg not supported with multiple decorators");fp.extend(this.decorators,r)}else this.decorators[r]=t},unregisterDecorator:function(r){delete this.decorators[r]},resetLoggedPropertyAccesses:function(){Hte.resetLoggedProperties()}};var qte=w3.default.log;nu.log=qte;nu.createFrame=fp.createFrame;nu.logger=w3.default});var dL=Bt((A3,cL)=>{"use strict";f();A3.__esModule=!0;function Y6(e){this.string=e}Y6.prototype.toString=Y6.prototype.toHTML=function(){return""+this.string};A3.default=Y6;cL.exports=A3.default});var pL=Bt(q6=>{"use strict";f();q6.__esModule=!0;q6.wrapHelper=Jte;function Jte(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 yL=Bt(_c=>{"use strict";f();_c.__esModule=!0;_c.checkRevision=nre;_c.template=ore;_c.wrapProgram=P3;_c.resolvePartial=ire;_c.invokePartial=are;_c.noop=hL;function Kte(e){return e&&e.__esModule?e:{default:e}}function Qte(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 ere=ds(),bl=Qte(ere),tre=Pc(),vl=Kte(tre),xl=X6(),fL=U6(),rre=pL(),mL=V6();function nre(e){var r=e&&e[0]||1,t=xl.COMPILER_REVISION;if(!(r>=xl.LAST_COMPATIBLE_COMPILER_REVISION&&r<=xl.COMPILER_REVISION))if(r<xl.LAST_COMPATIBLE_COMPILER_REVISION){var n=xl.REVISION_CHANGES[t],o=xl.REVISION_CHANGES[r];throw new vl.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 vl.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 ore(e,r){if(!r)throw new vl.default("No environment passed to template");if(!e||!e.main)throw new vl.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=bl.extend({},u,l.hash),l.ids&&(l.ids[0]=!0)),a=r.VM.resolvePartial.call(this,a,u,l);var c=bl.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 p=d.split("\n"),m=0,g=p.length;m<g&&!(!p[m]&&m+1===g);m++)p[m]=l.indent+p[m];d=p.join("\n")}return d}else throw new vl.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 vl.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)||mL.resultIsAllowed(c,o.protoAccessControl,l))return c},lookup:function(u,l){for(var c=u.length,d=0;d<c;d++){var p=u[d]&&o.lookupProperty(u[d],l);if(p!=null)return u[d][l]}},lambda:function(u,l){return typeof u=="function"?u.call(l):u},escapeExpression:bl.escapeExpression,invokePartial:n,fn:function(u){var l=e[u];return l.decorator=e[u+"_d"],l},programs:[],program:function(u,l,c,d,p){var m=this.programs[u],g=this.fn(u);return l||p||d||c?m=P3(this,u,g,l,c,d,p):m||(m=this.programs[u]=P3(this,u,g)),m},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=bl.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=sre(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 p(m){return""+e.main(o,m,o.helpers,o.partials,l,d,c)}return p=gL(e.main,p,o,u.depths||[],l,d),p(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=bl.extend({},r.helpers,a.helpers);ure(u,o),o.helpers=u,e.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,r.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=bl.extend({},r.decorators,a.decorators)),o.hooks={},o.protoAccessControl=mL.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||t;fL.moveHelperToHooks(o,"helperMissing",l),fL.moveHelperToHooks(o,"blockHelperMissing",l)}},i._child=function(a,u,l,c){if(e.useBlockParams&&!l)throw new vl.default("must pass block params");if(e.useDepths&&!c)throw new vl.default("must pass parent depths");return P3(o,a,e[a],u,0,l,c)},i}function P3(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=gL(t,u,e,a,n,i),u.program=r,u.depth=a?a.length:0,u.blockParams=o||0,u}function ire(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 are(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!==hL&&(function(){t.data=xl.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=xl.createFrame(l.data),l.data["partial-block"]=n,i(u,l)},i.partials&&(t.partials=bl.extend({},t.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new vl.default("The partial "+t.name+" could not be found");if(e instanceof Function)return e(r,t)}function hL(){return""}function sre(e,r){return(!r||!("root"in r))&&(r=r?xl.createFrame(r):{},r.root=e),r}function gL(e,r,t,n,o,i){if(e.decorator){var a={};r=e.decorator(r,a,t,n&&n[0],o,i,n),bl.extend(r,a)}return r}function ure(e,r){Object.keys(e).forEach(function(t){var n=e[t];e[t]=lre(n,r)})}function lre(e,r){var t=r.lookupProperty;return rre.wrapHelper(e,function(n){return bl.extend({lookupProperty:t},n)})}});var vL=Bt((_3,bL)=>{"use strict";f();_3.__esModule=!0;_3.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}};bL.exports=_3.default});var CL=Bt((O3,SL)=>{"use strict";f();O3.__esModule=!0;function K6(e){return e&&e.__esModule?e:{default:e}}function Q6(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 cre=X6(),xL=Q6(cre),dre=dL(),pre=K6(dre),fre=Pc(),mre=K6(fre),hre=ds(),J6=Q6(hre),gre=yL(),EL=Q6(gre),yre=vL(),bre=K6(yre);function IL(){var e=new xL.HandlebarsEnvironment;return J6.extend(e,xL),e.SafeString=pre.default,e.Exception=mre.default,e.Utils=J6,e.escapeExpression=J6.escapeExpression,e.VM=EL,e.template=function(r){return EL.template(r,e)},e}var Ry=IL();Ry.create=IL;bre.default(Ry);Ry.default=Ry;O3.default=Ry;SL.exports=O3.default});var TL=Bt((MKe,DL)=>{f();DL.exports=CL().default});f();f();f();f();f();f();var Ap=e=>e!=null;var bR=(function(){let r=globalThis.fetch;return{fetch(...t){if(!Ap(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}}})(),hT=bR.fetch;var xT=["websdk","web","webv2","kiosk","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke","reactsdk","minimap"],gT=xT[0],ET="https://api-gateway.mappedin.com/track-analytics/a/",IT="deny-watchposition",ST="load-mapview",CT="load-mapdata",DT="change-language",TT="query-directions";var Es,zi,Eu,yE,C1,Pp=class{constructor(){w(this,Eu);w(this,Es,Object.freeze({}));w(this,zi);h(this,"oneTimeEventsSent",new Set);h(this,"sendGetDirectionsEvent",Pl((r,t,n)=>{let o={start:r,end:t,type:"location_to_location"};return n!==void 0&&(o.accessible=n),this.sendAnalyticEvent(TT,o)},2500));O(this,zi,se(this,Eu,C1).call(this,s(this,Es)))}init(r){this.reset(),this.updateStateWithOptions(r)}reset(){O(this,Es,{}),O(this,zi,se(this,Eu,C1).call(this,{})),this.oneTimeEventsSent.clear()}updateStateWithOptions(r){return O(this,Es,Object.freeze(Object.assign({},s(this,Es),r))),O(this,zi,se(this,Eu,C1).call(this,r)),se(this,Eu,yE).call(this,s(this,zi)),s(this,zi)}updateState(r){let t=k({},r);t.mapId&&(t.analyticsBaseUrl=gE(oe(k({},s(this,zi)),{mapId:t.mapId}))),t.context&&(t.context=vT(t.context)),t.baseUri&&(t.analyticsBaseUrl=gE({baseUri:t.baseUri,mapId:s(this,zi).mapId})),Object.assign(s(this,zi),t),this.handleStateUpdate(r),se(this,Eu,yE).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,zi)}getContext(){return this.getState().context||s(this,Es).context||gT}getSessionId(){return this.getState().sessionId||s(this,Es).sessionId||bT()}getDeviceId(){return this.getState().deviceId||s(this,Es).deviceId||yT()}sendAnalyticEvent(r,t={}){let n=this.getState(),o=vR(n.analyticsBaseUrl,r),i={"mi-context":this.getContext(),"mi-session":this.getSessionId(),"mi-device":this.getDeviceId()};if(n.logEvents&&V.log("Analytics.track",o,i),!n.sendEvents)return Promise.resolve();if(!this.authReady)return V.warn("Auth needs to be ready to send analytics.");let a=oe(k({},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)),hT(o,{method:"POST",mode:"cors",headers:i,body:JSON.stringify(a)})}capture(r,t){if(ER.includes(r))return V.warn("".concat(r," event is sent internally.")),Promise.resolve();let n=xR.includes(r)?r.slice(1):r;return this.sendAnalyticEvent(n,t)}sendGetMapDataEvent(r){return this.sendAnalyticEvent(CT,r)}sendChangeLanguageEvent(r){return this.sendAnalyticEvent(DT,r)}sendWatchPositionDenied(){return this.sendAnalyticEvent(IT)}sendMapViewLoadedEvent({firstRenderDuration:r,dimension:t,collisionWorkerDisabled:n,outdoorsWorkerDisabled:o}){return this.sendAnalyticEvent(ST,{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)}};Es=new WeakMap,zi=new WeakMap,Eu=new WeakSet,yE=function(r){r.sessionId&&mu.getInstance().saveSessionData("id",r.sessionId),r.deviceId&&mu.getInstance().saveLocalData("deviceId",r.deviceId)},C1=function(r){var n,o,i,a;let t=(n=r.baseUri)!=null?n:ET;return{baseUri:t,analyticsBaseUrl:gE(oe(k({},r),{baseUri:t})),version:r.version||((o=x==null?void 0:x.env)==null?void 0:o.npm_package_version)||"v6",deviceId:r.deviceId||yT(),accessToken:r.accessToken,mapId:r.mapId,sessionId:r.sessionId||bT(),platformString:r.platformString||"",context:vT(r.context)||gT,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 gE({mapId:e,baseUri:r=ET}){return"".concat(r).concat(e,"/")}function yT(){return mu.getInstance().loadLocalData("deviceId")}function bT(){return mu.getInstance().loadSessionData("id")}function vR(e,r){return e+r}function vT(e){return xT.find(r=>r===e)}var xR=["$select-location","$select-category","$query-suggest","$query-search"],ER=[ST,CT,TT,IT,DT],Ine=new Pp,$i,wh=class{constructor(r){w(this,$i);h(this,"capture");h(this,"updateState");O(this,$i,r),this.capture=s(this,$i).capture.bind(s(this,$i)),this.updateState=s(this,$i).updateState.bind(s(this,$i))}getState(){let o=s(this,$i).getState(),{sessionId:r,deviceId:t}=o;return Zr(o,["sessionId","deviceId"])}getContext(){return s(this,$i).getContext()}getSessionId(){return s(this,$i).getSessionId()}getDeviceId(){return s(this,$i).getDeviceId()}};$i=new WeakMap;f();f();var Ph,_h,Oh,Ah=class{constructor(r,t,{enabled:n=!1}={}){w(this,Ph);h(this,"searchInstance");w(this,_h);w(this,Oh);h(this,"enabled",!1);O(this,Ph,r),O(this,_h,t),O(this,Oh,()=>{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 V.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(r,t)}catch(n){return V.error("Search.query failed due to",n),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(r,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return V.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(r,t)}catch(n){return V.error("Search.suggest failed due to",n),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-UAV7IGIX.js").then(({InternalSearch:r})=>new r(s(this,Ph)))),s(this,_h).on("language-change",s(this,Oh)),await this.searchInstance)}};Ph=new WeakMap,_h=new WeakMap,Oh=new WeakMap;var MT={"enterprise-location":"location-profile","enterprise-category":"location-category"},wT={"location-profile":"enterprise-location","location-category":"enterprise-category"},AT=new WeakMap,Uc,cr,bE=class{constructor(r,{search:t}={}){w(this,Uc);w(this,cr);h(this,"Analytics");h(this,"Search");h(this,"Query");h(this,"internal");h(this,"on",(r,t)=>{s(this,Uc).on(r,t)});h(this,"off",(r,t)=>{s(this,Uc).off(r,t)});h(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>s(this,cr).__LEGACY_GET_DIRECTIONS_SYNC(r,t,n));h(this,"getDirections",(r,t,n)=>s(this,cr).getDirections(r,t,n));h(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>s(this,cr).__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n));h(this,"getDirectionsMultiDestination",(r,t,n)=>s(this,cr).getDirectionsMultiDestination(r,t,n));O(this,Uc,new Xe),O(this,cr,r),AT.set(this,r),this.Analytics=new wh(r.Analytics),this.Query=r.Query,this.internal=r,this.Search=new Ah(this,r,{enabled:t==null?void 0:t.enabled}),s(this,cr).on("language-change",n=>{s(this,Uc).publish("language-change",n)})}getEnv(){return s(this,cr).getEnv()}getAccessToken(){var r;return(r=s(this,cr).tokenManager)==null?void 0:r.getAccessToken().token}get mapName(){return s(this,cr).mapName}get mapId(){var r;return(r=s(this,cr).getMapDataOptions)==null?void 0:r.mapId}get isEnterpriseMode(){return s(this,cr).enterpriseMode}get mapCenter(){return s(this,cr).mapCenter}get organizationId(){return s(this,cr).organizationId}get outdoorViewToken(){return s(this,cr).outdoorViewToken}getByType(r){let t=s(this,cr).getByType(r);if(Array.isArray(t)&&t.length===0){let n=this.isEnterpriseMode;!n&&r in MT?V.warn("MappedinSDK: getByType('".concat(r,"') returned 0 results. ")+"This is a Maker map (API key starts with 'mik_'). "+"Use '".concat(MT[r],"' instead. ")+"See https://developer.mappedin.com/web-sdk/getting-started"):n&&r in wT&&V.warn("MappedinSDK: getByType('".concat(r,"') returned 0 results. ")+"This is an Enterprise map. "+"Use '".concat(wT[r],"' instead. ")+"See https://developer.mappedin.com/web-sdk/getting-started")}return t}getById(r,t){return s(this,cr).getById(r,t)}getByExternalId(r,t){return s(this,cr).getByExternalId(r,t)}getGeoJSON(r){return r.geoJSON}async changeLanguage(r){return s(this,cr).changeLanguage(r)}get currentLanguage(){return s(this,cr).currentLanguage}get naturalBearing(){var r;return(r=s(this,cr).naturalBearing)!=null?r:0}getDistance(r,t){return s(this,cr).getDistance(r,t)}toBinaryBundle({downloadLanguagePacks:r=!0}={}){return s(this,cr).toBinaryBundle({downloadLanguagePacks:r})}toJSONBundle({downloadLanguagePacks:r=!0}={}){return s(this,cr).toJSONBundle({downloadLanguagePacks:r})}};Uc=new WeakMap,cr=new WeakMap;var Fh=bE;function Bh(e){let r=AT.get(e);if(!r)throw new Error("MapDataInternal not found");return r}f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();var D1={accessible:"accessible",outdoors:"outdoors",public:"public"};f();f();f();f();f();f();var xt={};Cl(xt,{HasPropertyKey:()=>IR,IsArray:()=>eo,IsAsyncIterator:()=>vE,IsBigInt:()=>kh,IsBoolean:()=>kl,IsDate:()=>Gc,IsFunction:()=>xE,IsIterator:()=>EE,IsNull:()=>IE,IsNumber:()=>Ca,IsObject:()=>nr,IsRegExp:()=>Lh,IsString:()=>dr,IsSymbol:()=>SE,IsUint8Array:()=>Iu,IsUndefined:()=>_r});f();function IR(e,r){return r in e}function vE(e){return nr(e)&&!eo(e)&&!Iu(e)&&Symbol.asyncIterator in e}function eo(e){return Array.isArray(e)}function kh(e){return typeof e=="bigint"}function kl(e){return typeof e=="boolean"}function Gc(e){return e instanceof globalThis.Date}function xE(e){return typeof e=="function"}function EE(e){return nr(e)&&!eo(e)&&!Iu(e)&&Symbol.iterator in e}function IE(e){return e===null}function Ca(e){return typeof e=="number"}function nr(e){return typeof e=="object"&&e!==null}function Lh(e){return e instanceof globalThis.RegExp}function dr(e){return typeof e=="string"}function SE(e){return typeof e=="symbol"}function Iu(e){return e instanceof globalThis.Uint8Array}function _r(e){return e===void 0}function SR(e){return e.map(r=>T1(r))}function CR(e){return new Date(e.getTime())}function DR(e){return new Uint8Array(e)}function TR(e){return new RegExp(e.source,e.flags)}function MR(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=T1(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=T1(e[t]);return r}function T1(e){return eo(e)?SR(e):Gc(e)?CR(e):Iu(e)?DR(e):Lh(e)?TR(e):nr(e)?MR(e):e}function xr(e){return T1(e)}function PT(e){return e.map(r=>Rh(r))}function Rh(e,r){return r===void 0?xr(e):xr(k(k({},r),e))}f();f();f();function M1(e){return nt(e)&&Symbol.asyncIterator in e}function w1(e){return nt(e)&&Symbol.iterator in e}function CE(e){return nt(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function A1(e){return e instanceof Promise}function Eo(e){return e instanceof Date&&Number.isFinite(e.getTime())}function _T(e){return e instanceof globalThis.Map}function OT(e){return e instanceof globalThis.Set}function Vi(e){return ArrayBuffer.isView(e)}function _p(e){return e instanceof globalThis.Uint8Array}function Ke(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 Or(e){return e===void 0}function Su(e){return e===null}function Is(e){return typeof e=="boolean"}function Ve(e){return typeof e=="number"}function P1(e){return Number.isInteger(e)}function Ln(e){return typeof e=="bigint"}function Et(e){return typeof e=="string"}function Ll(e){return typeof e=="function"}function Cu(e){return typeof e=="symbol"}function Rn(e){return Ln(e)||Is(e)||Su(e)||Ve(e)||Et(e)||Cu(e)||Or(e)}var Xt;(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?Ve(a):Number.isFinite(a)}e.IsNumberLike=o;function i(a){let u=Or(a);return e.AllowNullVoid?u||a===null:u}e.IsVoidLike=i})(Xt||(Xt={}));f();function wR(e){return globalThis.Object.freeze(e).map(r=>Nh(r))}function AR(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=Nh(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=Nh(e[t]);return globalThis.Object.freeze(r)}function Nh(e){return eo(e)?wR(e):Gc(e)?e:Iu(e)?e:Lh(e)?e:nr(e)?AR(e):e}function ge(e,r){let t=r!==void 0?k(k({},r),e):e;switch(Xt.InstanceMode){case"freeze":return Nh(t);case"clone":return xr(t);default:return t}}f();var qe=class extends Error{constructor(r){super(r)}};f();f();f();var Er=Symbol.for("TypeBox.Transform"),Du=Symbol.for("TypeBox.Readonly"),Io=Symbol.for("TypeBox.Optional"),Hi=Symbol.for("TypeBox.Hint"),ue=Symbol.for("TypeBox.Kind");function FT(e){return nr(e)&&e[Du]==="Readonly"}function Ss(e){return nr(e)&&e[Io]==="Optional"}function DE(e){return Dt(e,"Any")}function Tu(e){return Dt(e,"Array")}function jh(e){return Dt(e,"AsyncIterator")}function TE(e){return Dt(e,"BigInt")}function ME(e){return Dt(e,"Boolean")}function Uh(e){return Dt(e,"Constructor")}function PR(e){return Dt(e,"Date")}function Gh(e){return Dt(e,"Function")}function zc(e){return Dt(e,"Integer")}function Wr(e){return Dt(e,"Intersect")}function zh(e){return Dt(e,"Iterator")}function Dt(e,r){return nr(e)&&ue in e&&e[ue]===r}function Mu(e){return Dt(e,"Literal")}function gi(e){return Dt(e,"MappedKey")}function Ir(e){return Dt(e,"MappedResult")}function Rl(e){return Dt(e,"Never")}function _R(e){return Dt(e,"Not")}function OR(e){return Dt(e,"Null")}function $c(e){return Dt(e,"Number")}function pn(e){return Dt(e,"Object")}function Vc(e){return Dt(e,"Promise")}function wE(e){return Dt(e,"Record")}function AE(e){return Dt(e,"Ref")}function PE(e){return Dt(e,"RegExp")}function $h(e){return Dt(e,"String")}function FR(e){return Dt(e,"Symbol")}function yi(e){return Dt(e,"TemplateLiteral")}function BR(e){return Dt(e,"This")}function Op(e){return nr(e)&&Er in e}function Da(e){return Dt(e,"Tuple")}function kR(e){return Dt(e,"Undefined")}function kt(e){return Dt(e,"Union")}function LR(e){return Dt(e,"Uint8Array")}function RR(e){return Dt(e,"Unknown")}function NR(e){return Dt(e,"Unsafe")}function jR(e){return Dt(e,"Void")}function Nl(e){return nr(e)&&ue in e&&dr(e[ue])}function Ta(e){return DE(e)||Tu(e)||ME(e)||TE(e)||jh(e)||Uh(e)||PR(e)||Gh(e)||zc(e)||Wr(e)||zh(e)||Mu(e)||gi(e)||Ir(e)||Rl(e)||_R(e)||OR(e)||$c(e)||pn(e)||Vc(e)||wE(e)||AE(e)||PE(e)||$h(e)||FR(e)||yi(e)||BR(e)||Da(e)||kR(e)||kt(e)||LR(e)||RR(e)||NR(e)||jR(e)||Nl(e)}var $={};Cl($,{IsAny:()=>RT,IsArray:()=>NT,IsAsyncIterator:()=>jT,IsBigInt:()=>UT,IsBoolean:()=>GT,IsConstructor:()=>zT,IsDate:()=>$T,IsFunction:()=>VT,IsInteger:()=>HT,IsIntersect:()=>ZT,IsIterator:()=>WT,IsKind:()=>yM,IsKindOf:()=>St,IsLiteral:()=>Hh,IsLiteralBoolean:()=>HR,IsLiteralNumber:()=>YT,IsLiteralString:()=>XT,IsLiteralValue:()=>qT,IsMappedKey:()=>JT,IsMappedResult:()=>KT,IsNever:()=>QT,IsNot:()=>eM,IsNull:()=>tM,IsNumber:()=>rM,IsObject:()=>nM,IsOptional:()=>VR,IsPromise:()=>oM,IsProperties:()=>BE,IsReadonly:()=>$R,IsRecord:()=>iM,IsRecursive:()=>ZR,IsRef:()=>aM,IsRegExp:()=>sM,IsSchema:()=>It,IsString:()=>uM,IsSymbol:()=>lM,IsTemplateLiteral:()=>cM,IsThis:()=>dM,IsTransform:()=>pr,IsTuple:()=>pM,IsUint8Array:()=>fM,IsUndefined:()=>Fp,IsUnion:()=>kE,IsUnionLiteral:()=>WR,IsUnknown:()=>mM,IsUnsafe:()=>hM,IsVoid:()=>gM,TypeGuardUnknownTypeError:()=>_E});f();var _E=class extends qe{},UR=["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 BT(e){try{return new RegExp(e),!0}catch(r){return!1}}function OE(e){if(!dr(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 kT(e){return FE(e)||It(e)}function Vh(e){return _r(e)||kh(e)}function ur(e){return _r(e)||Ca(e)}function FE(e){return _r(e)||kl(e)}function Kt(e){return _r(e)||dr(e)}function GR(e){return _r(e)||dr(e)&&OE(e)&&BT(e)}function zR(e){return _r(e)||dr(e)&&OE(e)}function LT(e){return _r(e)||It(e)}function $R(e){return nr(e)&&e[Du]==="Readonly"}function VR(e){return nr(e)&&e[Io]==="Optional"}function RT(e){return St(e,"Any")&&Kt(e.$id)}function NT(e){return St(e,"Array")&&e.type==="array"&&Kt(e.$id)&&It(e.items)&&ur(e.minItems)&&ur(e.maxItems)&&FE(e.uniqueItems)&<(e.contains)&&ur(e.minContains)&&ur(e.maxContains)}function jT(e){return St(e,"AsyncIterator")&&e.type==="AsyncIterator"&&Kt(e.$id)&&It(e.items)}function UT(e){return St(e,"BigInt")&&e.type==="bigint"&&Kt(e.$id)&&Vh(e.exclusiveMaximum)&&Vh(e.exclusiveMinimum)&&Vh(e.maximum)&&Vh(e.minimum)&&Vh(e.multipleOf)}function GT(e){return St(e,"Boolean")&&e.type==="boolean"&&Kt(e.$id)}function zT(e){return St(e,"Constructor")&&e.type==="Constructor"&&Kt(e.$id)&&eo(e.parameters)&&e.parameters.every(r=>It(r))&&It(e.returns)}function $T(e){return St(e,"Date")&&e.type==="Date"&&Kt(e.$id)&&ur(e.exclusiveMaximumTimestamp)&&ur(e.exclusiveMinimumTimestamp)&&ur(e.maximumTimestamp)&&ur(e.minimumTimestamp)&&ur(e.multipleOfTimestamp)}function VT(e){return St(e,"Function")&&e.type==="Function"&&Kt(e.$id)&&eo(e.parameters)&&e.parameters.every(r=>It(r))&&It(e.returns)}function HT(e){return St(e,"Integer")&&e.type==="integer"&&Kt(e.$id)&&ur(e.exclusiveMaximum)&&ur(e.exclusiveMinimum)&&ur(e.maximum)&&ur(e.minimum)&&ur(e.multipleOf)}function BE(e){return nr(e)&&Object.entries(e).every(([r,t])=>OE(r)&&It(t))}function ZT(e){return St(e,"Intersect")&&!(dr(e.type)&&e.type!=="object")&&eo(e.allOf)&&e.allOf.every(r=>It(r)&&!pr(r))&&Kt(e.type)&&(FE(e.unevaluatedProperties)||LT(e.unevaluatedProperties))&&Kt(e.$id)}function WT(e){return St(e,"Iterator")&&e.type==="Iterator"&&Kt(e.$id)&&It(e.items)}function St(e,r){return nr(e)&&ue in e&&e[ue]===r}function XT(e){return Hh(e)&&dr(e.const)}function YT(e){return Hh(e)&&Ca(e.const)}function HR(e){return Hh(e)&&kl(e.const)}function Hh(e){return St(e,"Literal")&&Kt(e.$id)&&qT(e.const)}function qT(e){return kl(e)||Ca(e)||dr(e)}function JT(e){return St(e,"MappedKey")&&eo(e.keys)&&e.keys.every(r=>Ca(r)||dr(r))}function KT(e){return St(e,"MappedResult")&&BE(e.properties)}function QT(e){return St(e,"Never")&&nr(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function eM(e){return St(e,"Not")&&It(e.not)}function tM(e){return St(e,"Null")&&e.type==="null"&&Kt(e.$id)}function rM(e){return St(e,"Number")&&e.type==="number"&&Kt(e.$id)&&ur(e.exclusiveMaximum)&&ur(e.exclusiveMinimum)&&ur(e.maximum)&&ur(e.minimum)&&ur(e.multipleOf)}function nM(e){return St(e,"Object")&&e.type==="object"&&Kt(e.$id)&&BE(e.properties)&&kT(e.additionalProperties)&&ur(e.minProperties)&&ur(e.maxProperties)}function oM(e){return St(e,"Promise")&&e.type==="Promise"&&Kt(e.$id)&&It(e.item)}function iM(e){return St(e,"Record")&&e.type==="object"&&Kt(e.$id)&&kT(e.additionalProperties)&&nr(e.patternProperties)&&(r=>{let t=Object.getOwnPropertyNames(r.patternProperties);return t.length===1&&BT(t[0])&&nr(r.patternProperties)&&It(r.patternProperties[t[0]])})(e)}function ZR(e){return nr(e)&&Hi in e&&e[Hi]==="Recursive"}function aM(e){return St(e,"Ref")&&Kt(e.$id)&&dr(e.$ref)}function sM(e){return St(e,"RegExp")&&Kt(e.$id)&&dr(e.source)&&dr(e.flags)&&ur(e.maxLength)&&ur(e.minLength)}function uM(e){return St(e,"String")&&e.type==="string"&&Kt(e.$id)&&ur(e.minLength)&&ur(e.maxLength)&&GR(e.pattern)&&zR(e.format)}function lM(e){return St(e,"Symbol")&&e.type==="symbol"&&Kt(e.$id)}function cM(e){return St(e,"TemplateLiteral")&&e.type==="string"&&dr(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function dM(e){return St(e,"This")&&Kt(e.$id)&&dr(e.$ref)}function pr(e){return nr(e)&&Er in e}function pM(e){return St(e,"Tuple")&&e.type==="array"&&Kt(e.$id)&&Ca(e.minItems)&&Ca(e.maxItems)&&e.minItems===e.maxItems&&(_r(e.items)&&_r(e.additionalItems)&&e.minItems===0||eo(e.items)&&e.items.every(r=>It(r)))}function Fp(e){return St(e,"Undefined")&&e.type==="undefined"&&Kt(e.$id)}function WR(e){return kE(e)&&e.anyOf.every(r=>XT(r)||YT(r))}function kE(e){return St(e,"Union")&&Kt(e.$id)&&nr(e)&&eo(e.anyOf)&&e.anyOf.every(r=>It(r))}function fM(e){return St(e,"Uint8Array")&&e.type==="Uint8Array"&&Kt(e.$id)&&ur(e.minByteLength)&&ur(e.maxByteLength)}function mM(e){return St(e,"Unknown")&&Kt(e.$id)}function hM(e){return St(e,"Unsafe")}function gM(e){return St(e,"Void")&&e.type==="void"&&Kt(e.$id)}function yM(e){return nr(e)&&ue in e&&dr(e[ue])&&!UR.includes(e[ue])}function It(e){return nr(e)&&(RT(e)||NT(e)||GT(e)||UT(e)||jT(e)||zT(e)||$T(e)||VT(e)||HT(e)||ZT(e)||WT(e)||Hh(e)||JT(e)||KT(e)||QT(e)||eM(e)||tM(e)||rM(e)||nM(e)||oM(e)||iM(e)||aM(e)||sM(e)||uM(e)||lM(e)||cM(e)||dM(e)||pM(e)||Fp(e)||kE(e)||fM(e)||mM(e)||hM(e)||gM(e)||yM(e))}f();var LE="(true|false)",Zh="(0|[1-9][0-9]*)",RE="(.*)",XR="(?!.*)",iie="^".concat(LE,"$"),wu="^".concat(Zh,"$"),Au="^".concat(RE,"$"),bM="^".concat(XR,"$");f();var So={};Cl(So,{Clear:()=>qR,Delete:()=>JR,Entries:()=>YR,Get:()=>eN,Has:()=>KR,Set:()=>QR});f();var Bp=new Map;function YR(){return new Map(Bp)}function qR(){return Bp.clear()}function JR(e){return Bp.delete(e)}function KR(e){return Bp.has(e)}function QR(e,r){Bp.set(e,r)}function eN(e){return Bp.get(e)}var fn={};Cl(fn,{Clear:()=>rN,Delete:()=>nN,Entries:()=>tN,Get:()=>aN,Has:()=>oN,Set:()=>iN});f();var kp=new Map;function tN(){return new Map(kp)}function rN(){return kp.clear()}function nN(e){return kp.delete(e)}function oN(e){return kp.has(e)}function iN(e,r){kp.set(e,r)}function aN(e){return kp.get(e)}f();function vM(e,r){return e.includes(r)}function xM(e){return[...new Set(e)]}function sN(e,r){return e.filter(t=>r.includes(t))}function uN(e,r){return e.reduce((t,n)=>sN(t,n),r)}function EM(e){return e.length===1?e[0]:e.length>1?uN(e.slice(1),e[0]):[]}function IM(e){let r=[];for(let t of e)r.push(...t);return r}f();function jl(e){return ge({[ue]:"Any"},e)}f();function _1(e,r){return ge({[ue]:"Array",type:"array",items:e},r)}f();function O1(e,r){return ge({[ue]:"AsyncIterator",type:"AsyncIterator",items:e},r)}f();f();f();function lN(e,r){let o=e,{[r]:t}=o;return Zr(o,[qy(r)])}function jr(e,r){return r.reduce((t,n)=>lN(t,n),e)}f();function Qt(e){return ge({[ue]:"Never",not:{}},e)}f();f();function Tt(e){return ge({[ue]:"MappedResult",properties:e})}f();f();function F1(e,r,t){return ge({[ue]:"Constructor",type:"Constructor",parameters:e,returns:r},t)}f();function Ul(e,r,t){return ge({[ue]:"Function",type:"Function",parameters:e,returns:r},t)}f();f();f();f();function Wh(e,r){return ge({[ue]:"Union",anyOf:e},r)}function cN(e){return e.some(r=>Ss(r))}function SM(e){return e.map(r=>Ss(r)?dN(r):r)}function dN(e){return jr(e,[Io])}function pN(e,r){return cN(e)?qo(Wh(SM(e),r)):Wh(SM(e),r)}function Cs(e,r){return e.length===0?Qt(r):e.length===1?ge(e[0],r):pN(e,r)}f();function er(e,r){return e.length===0?Qt(r):e.length===1?ge(e[0],r):Wh(e,r)}f();f();f();var B1=class extends qe{};function fN(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function NE(e,r,t){return e[r]===t&&e.charCodeAt(r-1)!==92}function Pu(e,r){return NE(e,r,"(")}function Xh(e,r){return NE(e,r,")")}function CM(e,r){return NE(e,r,"|")}function mN(e){if(!(Pu(e,0)&&Xh(e,e.length-1)))return!1;let r=0;for(let t=0;t<e.length;t++)if(Pu(e,t)&&(r+=1),Xh(e,t)&&(r-=1),r===0&&t!==e.length-1)return!1;return!0}function hN(e){return e.slice(1,e.length-1)}function gN(e){let r=0;for(let t=0;t<e.length;t++)if(Pu(e,t)&&(r+=1),Xh(e,t)&&(r-=1),CM(e,t)&&r===0)return!0;return!1}function yN(e){for(let r=0;r<e.length;r++)if(Pu(e,r))return!0;return!1}function bN(e){let[r,t]=[0,0],n=[];for(let i=0;i<e.length;i++)if(Pu(e,i)&&(r+=1),Xh(e,i)&&(r-=1),CM(e,i)&&r===0){let a=e.slice(t,i);a.length>0&&n.push(Lp(a)),t=i+1}let o=e.slice(t);return o.length>0&&n.push(Lp(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}function vN(e){function r(o,i){if(!Pu(o,i))throw new B1("TemplateLiteralParser: Index must point to open parens");let a=0;for(let u=i;u<o.length;u++)if(Pu(o,u)&&(a+=1),Xh(o,u)&&(a-=1),a===0)return[i,u];throw new B1("TemplateLiteralParser: Unclosed group parens in expression")}function t(o,i){for(let a=i;a<o.length;a++)if(Pu(o,a))return[i,a];return[i,o.length]}let n=[];for(let o=0;o<e.length;o++)if(Pu(e,o)){let[i,a]=r(e,o),u=e.slice(i,a+1);n.push(Lp(u)),o=a}else{let[i,a]=t(e,o),u=e.slice(i,a);u.length>0&&n.push(Lp(u)),o=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}function Lp(e){return mN(e)?Lp(hN(e)):gN(e)?bN(e):yN(e)?vN(e):{type:"const",const:fN(e)}}function Rp(e){return Lp(e.slice(1,e.length-1))}var jE=class extends qe{};function xN(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 EN(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 IN(e){return e.type==="const"&&e.const===".*"}function Hc(e){return xN(e)||IN(e)?!1:EN(e)?!0:e.type==="and"?e.expr.every(r=>Hc(r)):e.type==="or"?e.expr.every(r=>Hc(r)):e.type==="const"?!0:(()=>{throw new jE("Unknown expression type")})()}function k1(e){let r=Rp(e.pattern);return Hc(r)}f();var UE=class extends qe{};function*DM(e){if(e.length===1)return yield*Ee(e[0]);for(let r of e[0])for(let t of DM(e.slice(1)))yield"".concat(r).concat(t)}function*SN(e){return yield*Ee(DM(e.expr.map(r=>[...Yh(r)])))}function*CN(e){for(let r of e.expr)yield*Ee(Yh(r))}function*DN(e){return yield e.const}function*Yh(e){return e.type==="and"?yield*Ee(SN(e)):e.type==="or"?yield*Ee(CN(e)):e.type==="const"?yield*Ee(DN(e)):(()=>{throw new UE("Unknown expression")})()}function Np(e){let r=Rp(e.pattern);return Hc(r)?[...Yh(r)]:[]}f();f();function Nt(e,r){return ge({[ue]:"Literal",const:e,type:typeof e},r)}f();function L1(e){return ge({[ue]:"Boolean",type:"boolean"},e)}f();function jp(e){return ge({[ue]:"BigInt",type:"bigint"},e)}f();function Ds(e){return ge({[ue]:"Number",type:"number"},e)}f();function Zi(e){return ge({[ue]:"String",type:"string"},e)}function*TN(e){let r=e.trim().replace(/"|'/g,"");return r==="boolean"?yield L1():r==="number"?yield Ds():r==="bigint"?yield jp():r==="string"?yield Zi():yield(()=>{let t=r.split("|").map(n=>Nt(n.trim()));return t.length===0?Qt():t.length===1?t[0]:Cs(t)})()}function*MN(e){if(e[1]!=="{"){let r=Nt("$"),t=GE(e.slice(1));return yield*Ee([r,...t])}for(let r=2;r<e.length;r++)if(e[r]==="}"){let t=TN(e.slice(2,r)),n=GE(e.slice(r+1));return yield*Ee([...t,...n])}yield Nt(e)}function*GE(e){for(let r=0;r<e.length;r++)if(e[r]==="$"){let t=Nt(e.slice(0,r)),n=MN(e.slice(r));return yield*Ee([t,...n])}yield Nt(e)}function TM(e){return[...GE(e)]}f();var zE=class extends qe{};function wN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function MM(e,r){return yi(e)?e.pattern.slice(1,e.pattern.length-1):kt(e)?"(".concat(e.anyOf.map(t=>MM(t,r)).join("|"),")"):$c(e)?"".concat(r).concat(Zh):zc(e)?"".concat(r).concat(Zh):TE(e)?"".concat(r).concat(Zh):$h(e)?"".concat(r).concat(RE):Mu(e)?"".concat(r).concat(wN(e.const.toString())):ME(e)?"".concat(r).concat(LE):(()=>{throw new zE("Unexpected Kind '".concat(e[ue],"'"))})()}function $E(e){return"^".concat(e.map(r=>MM(r,"")).join(""),"$")}f();function Zc(e){let t=Np(e).map(n=>Nt(n));return Cs(t)}f();function R1(e,r){let t=dr(e)?$E(TM(e)):$E(e);return ge({[ue]:"TemplateLiteral",type:"string",pattern:t},r)}function AN(e){return Np(e).map(t=>t.toString())}function PN(e){let r=[];for(let t of e)r.push(...Jo(t));return r}function _N(e){return[e.toString()]}function Jo(e){return[...new Set(yi(e)?AN(e):kt(e)?PN(e.anyOf):Mu(e)?_N(e.const):$c(e)?["[number]"]:zc(e)?["[number]"]:[])]}f();function ON(e,r,t){let n={};for(let o of Object.getOwnPropertyNames(r))n[o]=Up(e,Jo(r[o]),t);return n}function FN(e,r,t){return ON(e,r.properties,t)}function wM(e,r,t){let n=FN(e,r,t);return Tt(n)}function PM(e,r){return e.map(t=>_M(t,r))}function BN(e){return e.filter(r=>!Rl(r))}function kN(e,r){return N1(BN(PM(e,r)))}function LN(e){return e.some(r=>Rl(r))?[]:e}function RN(e,r){return Cs(LN(PM(e,r)))}function NN(e,r){return r in e?e[r]:r==="[number]"?Cs(e):Qt()}function jN(e,r){return r==="[number]"?e:Qt()}function UN(e,r){return r in e?e[r]:Qt()}function _M(e,r){var t;return Wr(e)?kN(e.allOf,r):kt(e)?RN(e.anyOf,r):Da(e)?NN((t=e.items)!=null?t:[],r):Tu(e)?jN(e.items,r):pn(e)?UN(e.properties,r):Qt()}function qh(e,r){return r.map(t=>_M(e,t))}function AM(e,r){return Cs(qh(e,r))}function Up(e,r,t){return Ir(r)?wM(e,r,t):gi(r)?OM(e,r,t):ge(Ta(r)?AM(e,Jo(r)):AM(e,r),t)}function GN(e,r,t){return{[r]:Up(e,[r],xr(t))}}function zN(e,r,t){return r.reduce((n,o)=>k(k({},n),GN(e,o,t)),{})}function $N(e,r,t){return zN(e,r.keys,t)}function OM(e,r,t){let n=$N(e,r,t);return Tt(n)}f();function j1(e,r){return ge({[ue]:"Iterator",type:"Iterator",items:e},r)}f();function VN(e){let r=[];for(let t in e)Ss(e[t])||r.push(t);return r}function HN(e,r){let t=VN(e),n=t.length>0?{[ue]:"Object",type:"object",properties:e,required:t}:{[ue]:"Object",type:"object",properties:e};return ge(n,r)}var or=HN;f();function U1(e,r){return ge({[ue]:"Promise",type:"Promise",item:e},r)}f();f();function ZN(e){return ge(jr(e,[Du]))}function WN(e){return ge(oe(k({},e),{[Du]:"Readonly"}))}function XN(e,r){return r===!1?ZN(e):WN(e)}function Wi(e,r){let t=r!=null?r:!0;return Ir(e)?FM(e,t):XN(e,t)}function YN(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Wi(e[n],r);return t}function qN(e,r){return YN(e.properties,r)}function FM(e,r){let t=qN(e,r);return Tt(t)}f();function Ts(e,r){return ge(e.length>0?{[ue]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[ue]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},r)}function BM(e,r){return e in r?Xi(e,r[e]):Tt(r)}function JN(e){return{[e]:Nt(e)}}function KN(e){let r={};for(let t of e)r[t]=Nt(t);return r}function QN(e,r){return vM(r,e)?JN(e):KN(r)}function ej(e,r){let t=QN(e,r);return BM(e,t)}function Jh(e,r){return r.map(t=>Xi(e,t))}function tj(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(r))t[n]=Xi(e,r[n]);return t}function Xi(e,r){var n;let t=k({},r);return Ss(r)?qo(Xi(e,jr(r,[Io]))):FT(r)?Wi(Xi(e,jr(r,[Du]))):Ir(r)?BM(e,r.properties):gi(r)?ej(e,r.keys):Uh(r)?F1(Jh(e,r.parameters),Xi(e,r.returns),t):Gh(r)?Ul(Jh(e,r.parameters),Xi(e,r.returns),t):jh(r)?O1(Xi(e,r.items),t):zh(r)?j1(Xi(e,r.items),t):Wr(r)?Ko(Jh(e,r.allOf),t):kt(r)?er(Jh(e,r.anyOf),t):Da(r)?Ts(Jh(e,(n=r.items)!=null?n:[]),t):pn(r)?or(tj(e,r.properties),t):Tu(r)?_1(Xi(e,r.items),t):Vc(r)?U1(Xi(e,r.item),t):r}function rj(e,r){let t={};for(let n of e)t[n]=Xi(n,r);return t}function kM(e,r,t){let n=Ta(e)?Jo(e):e,o=r({[ue]:"MappedKey",keys:n}),i=rj(n,o);return or(i,t)}f();function nj(e){return ge(jr(e,[Io]))}function oj(e){return ge(oe(k({},e),{[Io]:"Optional"}))}function ij(e,r){return r===!1?nj(e):oj(e)}function qo(e,r){let t=r!=null?r:!0;return Ir(e)?LM(e,t):ij(e,t)}function aj(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=qo(e[n],r);return t}function sj(e,r){return aj(e.properties,r)}function LM(e,r){let t=sj(e,r);return Tt(t)}f();function Kh(e,r={}){let t=e.every(o=>pn(o)),n=Ta(r.unevaluatedProperties)?{unevaluatedProperties:r.unevaluatedProperties}:{};return ge(r.unevaluatedProperties===!1||Ta(r.unevaluatedProperties)||t?oe(k({},n),{[ue]:"Intersect",type:"object",allOf:e}):oe(k({},n),{[ue]:"Intersect",allOf:e}),r)}function uj(e){return e.every(r=>Ss(r))}function lj(e){return jr(e,[Io])}function RM(e){return e.map(r=>Ss(r)?lj(r):r)}function cj(e,r){return uj(e)?qo(Kh(RM(e),r)):Kh(RM(e),r)}function N1(e,r={}){if(e.length===0)return Qt(r);if(e.length===1)return ge(e[0],r);if(e.some(t=>Op(t)))throw new Error("Cannot intersect transform types");return cj(e,r)}f();function Ko(e,r){if(e.length===0)return Qt(r);if(e.length===1)return ge(e[0],r);if(e.some(t=>Op(t)))throw new Error("Cannot intersect transform types");return Kh(e,r)}function NM(e){return e.map(r=>VE(r))}function dj(e){return Ko(NM(e))}function pj(e){return er(NM(e))}function fj(e){return VE(e)}function VE(e){return Wr(e)?dj(e.allOf):kt(e)?pj(e.anyOf):Vc(e)?fj(e.item):e}function jM(e,r){return ge(VE(e),r)}f();f();f();f();function UM(e){let r=[];for(let t of e)r.push(Tn(t));return r}function mj(e){let r=UM(e);return IM(r)}function hj(e){let r=UM(e);return EM(r)}function gj(e){return e.map((r,t)=>t.toString())}function yj(e){return["[number]"]}function bj(e){return globalThis.Object.getOwnPropertyNames(e)}function vj(e){return HE?globalThis.Object.getOwnPropertyNames(e).map(t=>t[0]==="^"&&t[t.length-1]==="$"?t.slice(1,t.length-1):t):[]}function Tn(e){var r;return Wr(e)?mj(e.allOf):kt(e)?hj(e.anyOf):Da(e)?gj((r=e.items)!=null?r:[]):Tu(e)?yj(e.items):pn(e)?bj(e.properties):wE(e)?vj(e.patternProperties):[]}var HE=!1;function _u(e){HE=!0;let r=Tn(e);HE=!1;let t=r.map(n=>"(".concat(n,")"));return"^(".concat(t.join("|"),")$")}function xj(e){return e.map(r=>r==="[number]"?Ds():Nt(r))}function G1(e,r){if(Ir(e))return GM(e,r);{let t=Tn(e),n=xj(t),o=Cs(n);return ge(o,r)}}function Ej(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=G1(e[n],xr(r));return t}function Ij(e,r){return Ej(e.properties,r)}function GM(e,r){let t=Ij(e,r);return Tt(t)}f();function Gl(e){let r=Tn(e),t=qh(e,r);return r.map((n,o)=>[r[o],t[o]])}function Sj(e){let r=[];for(let t of e)r.push(...Tn(t));return xM(r)}function Cj(e){return e.filter(r=>!Rl(r))}function Dj(e,r){let t=[];for(let n of e)t.push(...qh(n,[r]));return Cj(t)}function Tj(e,r){let t={};for(let n of r)t[n]=N1(Dj(e,n));return t}function zM(e,r){let t=Sj(e),n=Tj(e,t);return or(n,r)}f();f();function z1(e){return ge({[ue]:"Date",type:"Date"},e)}f();function $1(e){return ge({[ue]:"Null",type:"null"},e)}f();function V1(e){return ge({[ue]:"Symbol",type:"symbol"},e)}f();function H1(e){return ge({[ue]:"Undefined",type:"undefined"},e)}f();function Z1(e){return ge({[ue]:"Uint8Array",type:"Uint8Array"},e)}f();function Ou(e){return ge({[ue]:"Unknown"},e)}function Mj(e){return e.map(r=>ZE(r,!1))}function wj(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Wi(ZE(e[t],!1));return r}function W1(e,r){return r===!0?e:Wi(e)}function ZE(e,r){return vE(e)?W1(jl(),r):EE(e)?W1(jl(),r):eo(e)?Wi(Ts(Mj(e))):Iu(e)?Z1():Gc(e)?z1():nr(e)?W1(or(wj(e)),r):xE(e)?W1(Ul([],Ou()),r):_r(e)?H1():IE(e)?$1():SE(e)?V1():kh(e)?jp():Ca(e)?Nt(e):kl(e)?Nt(e):dr(e)?Nt(e):or({})}function $M(e,r){return ge(ZE(e,!0),r)}f();function VM(e,r){return Ts(e.parameters,r)}f();function Qh(e,r){return e.map(t=>Ma(t,r))}function Aj(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ma(e[n],r);return t}function Pj(e,r){return e.parameters=Qh(e.parameters,r),e.returns=Ma(e.returns,r),e}function _j(e,r){return e.parameters=Qh(e.parameters,r),e.returns=Ma(e.returns,r),e}function Oj(e,r){return e.allOf=Qh(e.allOf,r),e}function Fj(e,r){return e.anyOf=Qh(e.anyOf,r),e}function Bj(e,r){return _r(e.items)||(e.items=Qh(e.items,r)),e}function kj(e,r){return e.items=Ma(e.items,r),e}function Lj(e,r){return e.properties=Aj(e.properties,r),e}function Rj(e,r){return e.item=Ma(e.item,r),e}function Nj(e,r){return e.items=Ma(e.items,r),e}function jj(e,r){return e.items=Ma(e.items,r),e}function Uj(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=jr(t,["$id"]);return Ma(n,r)}function Gj(e,r){return Uh(e)?Pj(e,r):Gh(e)?_j(e,r):Wr(e)?Oj(e,r):kt(e)?Fj(e,r):Da(e)?Bj(e,r):Tu(e)?kj(e,r):pn(e)?Lj(e,r):Vc(e)?Rj(e,r):jh(e)?Nj(e,r):zh(e)?jj(e,r):AE(e)?Uj(e,r):e}function Ma(e,r){return Gj(Rh(e),PT(r))}f();function HM(e,r){if(_r(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=>Nt(i));return er(o,oe(k({},r),{[Hi]:"Enum"}))}f();f();f();var XE=class extends qe{},pe;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(pe||(pe={}));function Yi(e){return e===pe.False?e:pe.True}function Gp(e){throw new XE(e)}function en(e){return $.IsNever(e)||$.IsIntersect(e)||$.IsUnion(e)||$.IsUnknown(e)||$.IsAny(e)}function tn(e,r){return $.IsNever(r)?KM(e,r):$.IsIntersect(r)?X1(e,r):$.IsUnion(r)?KE(e,r):$.IsUnknown(r)?rw(e,r):$.IsAny(r)?JE(e,r):Gp("StructuralRight")}function JE(e,r){return pe.True}function zj(e,r){return $.IsIntersect(r)?X1(e,r):$.IsUnion(r)&&r.anyOf.some(t=>$.IsAny(t)||$.IsUnknown(t))?pe.True:$.IsUnion(r)?pe.Union:$.IsUnknown(r)||$.IsAny(r)?pe.True:pe.Union}function $j(e,r){return $.IsUnknown(e)?pe.False:$.IsAny(e)?pe.Union:$.IsNever(e)?pe.True:pe.False}function Vj(e,r){return $.IsObject(r)&&Y1(r)?pe.True:en(r)?tn(e,r):$.IsArray(r)?Yi(tr(e.items,r.items)):pe.False}function Hj(e,r){return en(r)?tn(e,r):$.IsAsyncIterator(r)?Yi(tr(e.items,r.items)):pe.False}function Zj(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsBigInt(r)?pe.True:pe.False}function qM(e,r){return $.IsLiteralBoolean(e)||$.IsBoolean(e)?pe.True:pe.False}function Wj(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsBoolean(r)?pe.True:pe.False}function Xj(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsConstructor(r)?e.parameters.length>r.parameters.length?pe.False:e.parameters.every((t,n)=>Yi(tr(r.parameters[n],t))===pe.True)?Yi(tr(e.returns,r.returns)):pe.False:pe.False}function Yj(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsDate(r)?pe.True:pe.False}function qj(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsFunction(r)?e.parameters.length>r.parameters.length?pe.False:e.parameters.every((t,n)=>Yi(tr(r.parameters[n],t))===pe.True)?Yi(tr(e.returns,r.returns)):pe.False:pe.False}function JM(e,r){return $.IsLiteral(e)&&xt.IsNumber(e.const)||$.IsNumber(e)||$.IsInteger(e)?pe.True:pe.False}function Jj(e,r){return $.IsInteger(r)||$.IsNumber(r)?pe.True:en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):pe.False}function X1(e,r){return r.allOf.every(t=>tr(e,t)===pe.True)?pe.True:pe.False}function Kj(e,r){return e.allOf.some(t=>tr(t,r)===pe.True)?pe.True:pe.False}function Qj(e,r){return en(r)?tn(e,r):$.IsIterator(r)?Yi(tr(e.items,r.items)):pe.False}function eU(e,r){return $.IsLiteral(r)&&r.const===e.const?pe.True:en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsString(r)?tw(e,r):$.IsNumber(r)?QM(e,r):$.IsInteger(r)?JM(e,r):$.IsBoolean(r)?qM(e,r):pe.False}function KM(e,r){return pe.False}function tU(e,r){return pe.True}function ZM(e){let[r,t]=[e,0];for(;$.IsNot(r);)r=r.not,t+=1;return t%2===0?r:Ou()}function rU(e,r){return $.IsNot(e)?tr(ZM(e),r):$.IsNot(r)?tr(e,ZM(r)):Gp("Invalid fallthrough for Not")}function nU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsNull(r)?pe.True:pe.False}function QM(e,r){return $.IsLiteralNumber(e)||$.IsNumber(e)||$.IsInteger(e)?pe.True:pe.False}function oU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsInteger(r)||$.IsNumber(r)?pe.True:pe.False}function Qo(e,r){return Object.getOwnPropertyNames(e.properties).length===r}function WM(e){return Y1(e)}function XM(e){return Qo(e,0)||Qo(e,1)&&"description"in e.properties&&$.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&($.IsString(e.properties.description.anyOf[0])&&$.IsUndefined(e.properties.description.anyOf[1])||$.IsString(e.properties.description.anyOf[1])&&$.IsUndefined(e.properties.description.anyOf[0]))}function WE(e){return Qo(e,0)}function YM(e){return Qo(e,0)}function iU(e){return Qo(e,0)}function aU(e){return Qo(e,0)}function sU(e){return Y1(e)}function uU(e){let r=Ds();return Qo(e,0)||Qo(e,1)&&"length"in e.properties&&Yi(tr(e.properties.length,r))===pe.True}function lU(e){return Qo(e,0)}function Y1(e){let r=Ds();return Qo(e,0)||Qo(e,1)&&"length"in e.properties&&Yi(tr(e.properties.length,r))===pe.True}function cU(e){let r=Ul([jl()],jl());return Qo(e,0)||Qo(e,1)&&"then"in e.properties&&Yi(tr(e.properties.then,r))===pe.True}function ew(e,r){return tr(e,r)===pe.False||$.IsOptional(e)&&!$.IsOptional(r)?pe.False:pe.True}function to(e,r){return $.IsUnknown(e)?pe.False:$.IsAny(e)?pe.Union:$.IsNever(e)||$.IsLiteralString(e)&&WM(r)||$.IsLiteralNumber(e)&&WE(r)||$.IsLiteralBoolean(e)&&YM(r)||$.IsSymbol(e)&&XM(r)||$.IsBigInt(e)&&iU(r)||$.IsString(e)&&WM(r)||$.IsSymbol(e)&&XM(r)||$.IsNumber(e)&&WE(r)||$.IsInteger(e)&&WE(r)||$.IsBoolean(e)&&YM(r)||$.IsUint8Array(e)&&sU(r)||$.IsDate(e)&&aU(r)||$.IsConstructor(e)&&lU(r)||$.IsFunction(e)&&uU(r)?pe.True:$.IsRecord(e)&&$.IsString(YE(e))?r[Hi]==="Record"?pe.True:pe.False:$.IsRecord(e)&&$.IsNumber(YE(e))?Qo(r,0)?pe.True:pe.False:pe.False}function dU(e,r){return en(r)?tn(e,r):$.IsRecord(r)?qi(e,r):$.IsObject(r)?(()=>{for(let t of Object.getOwnPropertyNames(r.properties)){if(!(t in e.properties)&&!$.IsOptional(r.properties[t]))return pe.False;if($.IsOptional(r.properties[t]))return pe.True;if(ew(e.properties[t],r.properties[t])===pe.False)return pe.False}return pe.True})():pe.False}function pU(e,r){return en(r)?tn(e,r):$.IsObject(r)&&cU(r)?pe.True:$.IsPromise(r)?Yi(tr(e.item,r.item)):pe.False}function YE(e){return wu in e.patternProperties?Ds():Au in e.patternProperties?Zi():Gp("Unknown record key pattern")}function qE(e){return wu in e.patternProperties?e.patternProperties[wu]:Au in e.patternProperties?e.patternProperties[Au]:Gp("Unable to get record value schema")}function qi(e,r){let[t,n]=[YE(r),qE(r)];return $.IsLiteralString(e)&&$.IsNumber(t)&&Yi(tr(e,n))===pe.True?pe.True:$.IsUint8Array(e)&&$.IsNumber(t)||$.IsString(e)&&$.IsNumber(t)||$.IsArray(e)&&$.IsNumber(t)?tr(e,n):$.IsObject(e)?(()=>{for(let o of Object.getOwnPropertyNames(e.properties))if(ew(n,e.properties[o])===pe.False)return pe.False;return pe.True})():pe.False}function fU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?tr(qE(e),qE(r)):pe.False}function mU(e,r){let t=$.IsRegExp(e)?Zi():e,n=$.IsRegExp(r)?Zi():r;return tr(t,n)}function tw(e,r){return $.IsLiteral(e)&&xt.IsString(e.const)||$.IsString(e)?pe.True:pe.False}function hU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsString(r)?pe.True:pe.False}function gU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsSymbol(r)?pe.True:pe.False}function yU(e,r){return $.IsTemplateLiteral(e)?tr(Zc(e),r):$.IsTemplateLiteral(r)?tr(e,Zc(r)):Gp("Invalid fallthrough for TemplateLiteral")}function bU(e,r){return $.IsArray(r)&&e.items!==void 0&&e.items.every(t=>tr(t,r.items)===pe.True)}function vU(e,r){return $.IsNever(e)?pe.True:$.IsUnknown(e)?pe.False:$.IsAny(e)?pe.Union:pe.False}function xU(e,r){return en(r)?tn(e,r):$.IsObject(r)&&Y1(r)||$.IsArray(r)&&bU(e,r)?pe.True:$.IsTuple(r)?xt.IsUndefined(e.items)&&!xt.IsUndefined(r.items)||!xt.IsUndefined(e.items)&&xt.IsUndefined(r.items)?pe.False:xt.IsUndefined(e.items)&&!xt.IsUndefined(r.items)||e.items.every((t,n)=>tr(t,r.items[n])===pe.True)?pe.True:pe.False:pe.False}function EU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsUint8Array(r)?pe.True:pe.False}function IU(e,r){return en(r)?tn(e,r):$.IsObject(r)?to(e,r):$.IsRecord(r)?qi(e,r):$.IsVoid(r)?DU(e,r):$.IsUndefined(r)?pe.True:pe.False}function KE(e,r){return r.anyOf.some(t=>tr(e,t)===pe.True)?pe.True:pe.False}function SU(e,r){return e.anyOf.every(t=>tr(t,r)===pe.True)?pe.True:pe.False}function rw(e,r){return pe.True}function CU(e,r){return $.IsNever(r)?KM(e,r):$.IsIntersect(r)?X1(e,r):$.IsUnion(r)?KE(e,r):$.IsAny(r)?JE(e,r):$.IsString(r)?tw(e,r):$.IsNumber(r)?QM(e,r):$.IsInteger(r)?JM(e,r):$.IsBoolean(r)?qM(e,r):$.IsArray(r)?$j(e,r):$.IsTuple(r)?vU(e,r):$.IsObject(r)?to(e,r):$.IsUnknown(r)?pe.True:pe.False}function DU(e,r){return $.IsUndefined(e)||$.IsUndefined(e)?pe.True:pe.False}function TU(e,r){return $.IsIntersect(r)?X1(e,r):$.IsUnion(r)?KE(e,r):$.IsUnknown(r)?rw(e,r):$.IsAny(r)?JE(e,r):$.IsObject(r)?to(e,r):$.IsVoid(r)?pe.True:pe.False}function tr(e,r){return $.IsTemplateLiteral(e)||$.IsTemplateLiteral(r)?yU(e,r):$.IsRegExp(e)||$.IsRegExp(r)?mU(e,r):$.IsNot(e)||$.IsNot(r)?rU(e,r):$.IsAny(e)?zj(e,r):$.IsArray(e)?Vj(e,r):$.IsBigInt(e)?Zj(e,r):$.IsBoolean(e)?Wj(e,r):$.IsAsyncIterator(e)?Hj(e,r):$.IsConstructor(e)?Xj(e,r):$.IsDate(e)?Yj(e,r):$.IsFunction(e)?qj(e,r):$.IsInteger(e)?Jj(e,r):$.IsIntersect(e)?Kj(e,r):$.IsIterator(e)?Qj(e,r):$.IsLiteral(e)?eU(e,r):$.IsNever(e)?tU(e,r):$.IsNull(e)?nU(e,r):$.IsNumber(e)?oU(e,r):$.IsObject(e)?dU(e,r):$.IsRecord(e)?fU(e,r):$.IsString(e)?hU(e,r):$.IsSymbol(e)?gU(e,r):$.IsTuple(e)?xU(e,r):$.IsPromise(e)?pU(e,r):$.IsUint8Array(e)?EU(e,r):$.IsUndefined(e)?IU(e,r):$.IsUnion(e)?SU(e,r):$.IsUnknown(e)?CU(e,r):$.IsVoid(e)?TU(e,r):Gp("Unknown left type operand '".concat(e[ue],"'"))}function zl(e,r){return tr(e,r)}f();f();f();function MU(e,r,t,n,o){let i={};for(let a of globalThis.Object.getOwnPropertyNames(e))i[a]=zp(e[a],r,t,n,xr(o));return i}function wU(e,r,t,n,o){return MU(e.properties,r,t,n,o)}function nw(e,r,t,n,o){let i=wU(e,r,t,n,o);return Tt(i)}function AU(e,r,t,n){let o=zl(e,r);return o===pe.Union?er([t,n]):o===pe.True?t:n}function zp(e,r,t,n,o){return Ir(e)?nw(e,r,t,n,o):gi(e)?ge(ow(e,r,t,n,o)):ge(AU(e,r,t,n),o)}function PU(e,r,t,n,o){return{[e]:zp(Nt(e),r,t,n,xr(o))}}function _U(e,r,t,n,o){return e.reduce((i,a)=>k(k({},i),PU(a,r,t,n,o)),{})}function OU(e,r,t,n,o){return _U(e.keys,r,t,n,o)}function ow(e,r,t,n,o){let i=OU(e,r,t,n,o);return Tt(i)}f();function FU(e){return e.allOf.every(r=>Fu(r))}function BU(e){return e.anyOf.some(r=>Fu(r))}function kU(e){return!Fu(e.not)}function Fu(e){return e[ue]==="Intersect"?FU(e):e[ue]==="Union"?BU(e):e[ue]==="Not"?kU(e):e[ue]==="Undefined"}f();function iw(e,r){return $p(Zc(e),r)}function LU(e,r){let t=e.filter(n=>zl(n,r)===pe.False);return t.length===1?t[0]:er(t)}function $p(e,r,t={}){return yi(e)?ge(iw(e,r),t):Ir(e)?ge(aw(e,r),t):ge(kt(e)?LU(e.anyOf,r):zl(e,r)!==pe.False?Qt():e,t)}function RU(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=$p(e[n],r);return t}function NU(e,r){return RU(e.properties,r)}function aw(e,r){let t=NU(e,r);return Tt(t)}f();f();f();function sw(e,r){return Vp(Zc(e),r)}function jU(e,r){let t=e.filter(n=>zl(n,r)!==pe.False);return t.length===1?t[0]:er(t)}function Vp(e,r,t){return yi(e)?ge(sw(e,r),t):Ir(e)?ge(uw(e,r),t):ge(kt(e)?jU(e.anyOf,r):zl(e,r)!==pe.False?e:Qt(),t)}function UU(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Vp(e[n],r);return t}function GU(e,r){return UU(e.properties,r)}function uw(e,r){let t=GU(e,r);return Tt(t)}f();function lw(e,r){return ge(e.returns,r)}f();function cw(e){return ge({[ue]:"Integer",type:"integer"},e)}f();f();f();function zU(e,r,t){return{[e]:wa(Nt(e),r,xr(t))}}function $U(e,r,t){return e.reduce((o,i)=>k(k({},o),zU(i,r,t)),{})}function VU(e,r,t){return $U(e.keys,r,t)}function dw(e,r,t){let n=VU(e,r,t);return Tt(n)}function HU(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toLowerCase(),t].join("")}function ZU(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toUpperCase(),t].join("")}function WU(e){return e.toUpperCase()}function XU(e){return e.toLowerCase()}function YU(e,r,t){let n=Rp(e.pattern);if(!Hc(n))return oe(k({},e),{pattern:pw(e.pattern,r)});let a=[...Yh(n)].map(c=>Nt(c)),u=fw(a,r),l=er(u);return R1([l],t)}function pw(e,r){return typeof e=="string"?r==="Uncapitalize"?HU(e):r==="Capitalize"?ZU(e):r==="Uppercase"?WU(e):r==="Lowercase"?XU(e):e:e.toString()}function fw(e,r){return e.map(t=>wa(t,r))}function wa(e,r,t={}){return gi(e)?dw(e,r,t):yi(e)?YU(e,r,t):kt(e)?er(fw(e.anyOf,r),t):Mu(e)?Nt(pw(e.const,r),t):ge(e,t)}function mw(e,r={}){return wa(e,"Capitalize",r)}f();function hw(e,r={}){return wa(e,"Lowercase",r)}f();function gw(e,r={}){return wa(e,"Uncapitalize",r)}f();function yw(e,r={}){return wa(e,"Uppercase",r)}f();function bw(e,r){return ge({[ue]:"Not",not:e},r)}f();f();f();function qU(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=Hp(e[o],r,xr(t));return n}function JU(e,r,t){return qU(e.properties,r,t)}function vw(e,r,t){let n=JU(e,r,t);return Tt(n)}function KU(e,r){return e.map(t=>QE(t,r))}function QU(e,r){return e.map(t=>QE(t,r))}function eG(e,r){let o=e,{[r]:t}=o;return Zr(o,[qy(r)])}function tG(e,r){return r.reduce((t,n)=>eG(t,n),e)}function rG(e,r){let t=jr(e,[Er,"$id","required","properties"]),n=tG(e.properties,r);return or(n,t)}function QE(e,r){return Wr(e)?Ko(KU(e.allOf,r)):kt(e)?er(QU(e.anyOf,r)):pn(e)?rG(e,r):or({})}function Hp(e,r,t){if(gi(r))return xw(e,r,t);if(Ir(e))return vw(e,r,t);let n=Ta(r)?Jo(r):r;return ge(k(k({},QE(e,n)),t))}function nG(e,r,t){return{[r]:Hp(e,[r],xr(t))}}function oG(e,r,t){return r.reduce((n,o)=>k(k({},n),nG(e,o,t)),{})}function iG(e,r,t){return oG(e,r.keys,t)}function xw(e,r,t){let n=iG(e,r,t);return Tt(n)}f();function Ew(e,r){return Ts(e.parameters,r)}f();f();function Iw(e){return e.map(r=>Sw(r))}function aG(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=qo(e[t]);return r}function sG(e){let r=jr(e,[Er,"$id","required","properties"]),t=aG(e.properties);return or(t,r)}function Sw(e){return Wr(e)?Ko(Iw(e.allOf)):kt(e)?er(Iw(e.anyOf)):pn(e)?sG(e):or({})}function q1(e,r){return Ir(e)?Cw(e,r):ge(k(k({},Sw(e)),r))}function uG(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=q1(e[n],xr(r));return t}function lG(e,r){return uG(e.properties,r)}function Cw(e,r){let t=lG(e,r);return Tt(t)}f();f();f();function cG(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=Zp(e[o],r,xr(t));return n}function dG(e,r,t){return cG(e.properties,r,t)}function Dw(e,r,t){let n=dG(e,r,t);return Tt(n)}function pG(e,r){return e.map(t=>eI(t,r))}function fG(e,r){return e.map(t=>eI(t,r))}function mG(e,r){let t={};for(let n of r)n in e&&(t[n]=e[n]);return t}function hG(e,r){let t=jr(e,[Er,"$id","required","properties"]),n=mG(e.properties,r);return or(n,t)}function eI(e,r){return Wr(e)?Ko(pG(e.allOf,r)):kt(e)?er(fG(e.anyOf,r)):pn(e)?hG(e,r):or({})}function Zp(e,r,t){if(gi(r))return Tw(e,r,t);if(Ir(e))return Dw(e,r,t);let n=Ta(r)?Jo(r):r;return ge(k(k({},eI(e,n)),t))}function gG(e,r,t){return{[r]:Zp(e,[r],xr(t))}}function yG(e,r,t){return r.reduce((n,o)=>k(k({},n),gG(e,o,t)),{})}function bG(e,r,t){return yG(e,r.keys,t)}function Tw(e,r,t){let n=bG(e,r,t);return Tt(n)}f();function Mw(e){return Wi(qo(e))}f();function Wc(e,r,t){return ge({[ue]:"Record",type:"object",patternProperties:{[e]:r}},t)}function tI(e,r,t){let n={};for(let o of e)n[o]=r;return or(n,oe(k({},t),{[Hi]:"Record"}))}function vG(e,r,t){return k1(e)?tI(Jo(e),r,t):Wc(e.pattern,r,t)}function xG(e,r,t){return tI(Jo(er(e)),r,t)}function EG(e,r,t){return tI([e.toString()],r,t)}function IG(e,r,t){return Wc(e.source,r,t)}function SG(e,r,t){let n=_r(e.pattern)?Au:e.pattern;return Wc(n,r,t)}function CG(e,r,t){return Wc(Au,r,t)}function DG(e,r,t){return Wc(bM,r,t)}function TG(e,r,t){return Wc(wu,r,t)}function MG(e,r,t){return Wc(wu,r,t)}function ww(e,r,t={}){return kt(e)?xG(e.anyOf,r,t):yi(e)?vG(e,r,t):Mu(e)?EG(e.const,r,t):zc(e)?TG(e,r,t):$c(e)?MG(e,r,t):PE(e)?IG(e,r,t):$h(e)?SG(e,r,t):DE(e)?CG(e,r,t):Rl(e)?DG(e,r,t):Qt(t)}f();var wG=0;function Aw(e,r={}){_r(r.$id)&&(r.$id="T".concat(wG++));let t=Rh(e({[ue]:"This",$ref:"".concat(r.$id)}));return t.$id=r.$id,ge(k({[Hi]:"Recursive"},t),r)}f();function Pw(e,r){if(dr(e))return ge({[ue]:"Ref",$ref:e},r);if(_r(e.$id))throw new Error("Reference target type must specify an $id");return ge({[ue]:"Ref",$ref:e.$id},r)}f();function _w(e,r){let t=dr(e)?new globalThis.RegExp(e):e;return ge({[ue]:"RegExp",type:"RegExp",source:t.source,flags:t.flags},r)}f();f();function Ow(e){return e.map(r=>Fw(r))}function AG(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=jr(e[t],[Io]);return r}function PG(e){let r=jr(e,[Er,"$id","required","properties"]),t=AG(e.properties);return or(t,r)}function Fw(e){return Wr(e)?Ko(Ow(e.allOf)):kt(e)?er(Ow(e.anyOf)):pn(e)?PG(e):or({})}function J1(e,r){return Ir(e)?Bw(e,r):ge(k(k({},Fw(e)),r))}function _G(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=J1(e[n],r);return t}function OG(e,r){return _G(e.properties,r)}function Bw(e,r){let t=OG(e,r);return Tt(t)}f();function FG(e){var r;return Wr(e)?e.allOf:kt(e)?e.anyOf:Da(e)?(r=e.items)!=null?r:[]:[]}function kw(e){return FG(e)}f();function Lw(e,r){return ge(e.returns,r)}f();function Rw(e){return JSON.parse(JSON.stringify(e))}f();var rI=class{constructor(r){this.schema=r}Decode(r){return new nI(this.schema,r)}},nI=class{constructor(r,t){this.schema=r,this.decode=t}EncodeTransform(r,t){let i={Encode:a=>t[Er].Encode(r(a)),Decode:a=>this.decode(t[Er].Decode(a))};return oe(k({},t),{[Er]:i})}EncodeSchema(r,t){let n={Decode:this.decode,Encode:r};return oe(k({},t),{[Er]:n})}Encode(r){return Op(this.schema)?this.EncodeTransform(r,this.schema):this.EncodeSchema(r,this.schema)}};function Nw(e){return new rI(e)}f();function K1(e={}){var r;return ge({[ue]:(r=e[ue])!=null?r:"Unsafe"},e)}f();function jw(e){return ge({[ue]:"Void",type:"void"},e)}f();var oI={};Cl(oI,{Any:()=>jl,Array:()=>_1,AsyncIterator:()=>O1,Awaited:()=>jM,BigInt:()=>jp,Boolean:()=>L1,Capitalize:()=>mw,Composite:()=>zM,Const:()=>$M,Constructor:()=>F1,ConstructorParameters:()=>VM,Date:()=>z1,Deref:()=>Ma,Enum:()=>HM,Exclude:()=>$p,Extends:()=>zp,Extract:()=>Vp,Function:()=>Ul,Index:()=>Up,InstanceType:()=>lw,Integer:()=>cw,Intersect:()=>Ko,Iterator:()=>j1,KeyOf:()=>G1,Literal:()=>Nt,Lowercase:()=>hw,Mapped:()=>kM,Never:()=>Qt,Not:()=>bw,Null:()=>$1,Number:()=>Ds,Object:()=>or,Omit:()=>Hp,Optional:()=>qo,Parameters:()=>Ew,Partial:()=>q1,Pick:()=>Zp,Promise:()=>U1,Readonly:()=>Wi,ReadonlyOptional:()=>Mw,Record:()=>ww,Recursive:()=>Aw,Ref:()=>Pw,RegExp:()=>_w,Required:()=>J1,Rest:()=>kw,ReturnType:()=>Lw,Strict:()=>Rw,String:()=>Zi,Symbol:()=>V1,TemplateLiteral:()=>R1,Transform:()=>Nw,Tuple:()=>Ts,Uint8Array:()=>Z1,Uncapitalize:()=>gw,Undefined:()=>H1,Union:()=>er,Unknown:()=>Ou,Unsafe:()=>K1,Uppercase:()=>yw,Void:()=>jw});f();var I=oI;f();var e0=I.Object({externalId:I.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:I.String({description:"The name of the entity."}),shortName:I.String({description:"A short name for the entity."}),description:I.String({description:"A description of the entity."}),icon:I.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),iI=I.Partial(e0,{$id:"Details",description:"Additional information about a given entity."}),Co=I.Object({details:I.Optional(I.Ref(iI))},{$id:"WithDetails"}),Xc=e=>{let r=[...e].sort(),t=I.Pick(e0,e),n=I.Omit(e0,e);return I.Object({details:I.Intersect([t,I.Partial(n)])},{$id:"WithRequiredDetails_".concat(r.join("_"))})},aI=[e0,iI];f();var Wp=I.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Xp=I.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Yc=I.Tuple([I.Ref(Wp),I.Ref(Xp)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),ro=I.Object({type:I.Literal("Point"),coordinates:I.Ref(Yc)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),Q1=I.Object({type:I.Literal("MultiPoint"),coordinates:I.Array(I.Ref(Yc))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),eb=I.Object({type:I.Literal("LineString"),coordinates:I.Array(I.Ref(Yc),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),tb=I.Object({type:I.Literal("MultiLineString"),coordinates:I.Array(I.Array(I.Ref(Yc),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),Uw=I.Array(I.Ref(Yc),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),sI=I.Array(I.Ref(Uw),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Yp=I.Object({type:I.Literal("Polygon"),coordinates:I.Ref(sI)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),qp=I.Object({type:I.Literal("MultiPolygon"),coordinates:I.Array(I.Ref(sI))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Nn=(e,r,t)=>I.Object({type:I.Literal("Feature"),geometry:e,properties:r},t),Do=(e,r,t)=>I.Object({type:I.Literal("FeatureCollection"),features:I.Array(e,t)},r),uI=[Wp,Xp,Yc,ro,Q1,eb,tb,Uw,sI,Yp,qp];f();var Ur=(e,r)=>I.Unsafe(I.String({$id:r,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),no=Ur("g","GeometryId"),vt=Ur("f","FloorId"),lI=[no,vt];f();f();f();var rb=class{constructor(r){h(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}}},nb=class{constructor(r){h(this,"_tag","Some");h(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 Gw(r(this.value))}mapAsync(r){return r(this.value).then(t=>Gw(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:$l()}or(r){return this}orElse(r){return this}xor(r){return r.isSome()?$l():this}toString(){return"Some(".concat(this.value,")")}okOr(r){return Be(this.value)}okOrElse(r){return Be(this.value)}iter(){return new rb(this.value)}[Symbol.iterator](){return this.iter()}zip(r){return r.isSome()?Jp([this.value,r.value]):$l()}zipWith(r,t){return r.isSome()?Jp(t(this.value,r.value)):$l()}get[Symbol.toStringTag](){return"Some"}},ob=class{constructor(){h(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 Re(r)}okOrElse(r){return Re(r())}iter(){return new rb(null)}[Symbol.iterator](){return this.iter()}zip(r){return this}zipWith(r,t){return this}get[Symbol.toStringTag](){return"None"}},Jp=e=>new nb(e),$l=()=>new ob,Gw=e=>e instanceof nb||e instanceof ob?e:e==null?$l():Jp(e);var ib=class{constructor(r){h(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}}},cI=class{constructor(r){h(this,"_tag","Ok");h(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 Jp(this.value)}err(){return $l()}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 Be(r(this.value))}async mapAsync(r){return r(this.value).then(Be)}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 ib(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"}},dI=class e{constructor(r){h(this,"_tag","Err");h(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 $l()}err(){return Jp(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 ib(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"}},Be=e=>new cI(e),Re=e=>new dI(e);f();var ei;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(ei||(ei={}));f();f();f();f();var pI=class extends qe{constructor(r){super("Duplicate type kind '".concat(r,"' detected"))}},t0=class extends qe{constructor(r){super("Duplicate string format '".concat(r,"' detected"))}},ab;(function(e){function r(n,o){if(fn.Has(n))throw new pI(n);return fn.Set(n,o),(i={})=>K1(oe(k({},i),{[ue]:n}))}e.Type=r;function t(n,o){if(So.Has(n))throw new t0(n);return So.Set(n,o),n}e.Format=t})(ab||(ab={}));f();function BG(e){switch(e.errorType){case le.ArrayContains:return"Expected array to contain at least one matching value";case le.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case le.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case le.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case le.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case le.ArrayUniqueItems:return"Expected array elements to be unique";case le.Array:return"Expected array";case le.AsyncIterator:return"Expected AsyncIterator";case le.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case le.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case le.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case le.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case le.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case le.BigInt:return"Expected bigint";case le.Boolean:return"Expected boolean";case le.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case le.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case le.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case le.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case le.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case le.Date:return"Expected Date";case le.Function:return"Expected function";case le.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case le.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case le.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case le.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case le.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case le.Integer:return"Expected integer";case le.IntersectUnevaluatedProperties:return"Unexpected property";case le.Intersect:return"Expected all values to match";case le.Iterator:return"Expected Iterator";case le.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case le.Never:return"Never";case le.Not:return"Value should not match";case le.Null:return"Expected null";case le.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case le.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case le.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case le.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case le.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case le.Number:return"Expected number";case le.Object:return"Expected object";case le.ObjectAdditionalProperties:return"Unexpected property";case le.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case le.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case le.ObjectRequiredProperty:return"Expected required property";case le.Promise:return"Expected Promise";case le.RegExp:return"Expected string to match regular expression";case le.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case le.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case le.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case le.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case le.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case le.String:return"Expected string";case le.Symbol:return"Expected symbol";case le.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case le.Tuple:return"Expected tuple";case le.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case le.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case le.Uint8Array:return"Expected Uint8Array";case le.Undefined:return"Expected undefined";case le.Union:return"Expected union value";case le.Void:return"Expected void";case le.Kind:return"Expected kind '".concat(e.schema[ue],"'");default:return"Unknown error type"}}var kG=BG;function zw(){return kG}f();var fI=class extends qe{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'")),this.schema=r}};function LG(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new fI(e);return Mt(t,r)}function Ji(e,r){return!Et(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function Mt(e,r){return e[ue]==="This"||e[ue]==="Ref"?LG(e,r):e}f();var mI=class extends qe{constructor(r){super("Unable to hash value"),this.value=r}},bi;(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"})(bi||(bi={}));var Kp=BigInt("14695981039346656037"),[RG,NG]=[BigInt("1099511628211"),BigInt("18446744073709551616")],jG=Array.from({length:256}).map((e,r)=>BigInt(r)),$w=new Float64Array(1),Vw=new DataView($w.buffer),Hw=new Uint8Array($w.buffer);function*UG(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 GG(e){oo(bi.Array);for(let r of e)Qp(r)}function zG(e){oo(bi.Boolean),oo(e?1:0)}function $G(e){oo(bi.BigInt),Vw.setBigInt64(0,e);for(let r of Hw)oo(r)}function VG(e){oo(bi.Date),Qp(e.getTime())}function HG(e){oo(bi.Null)}function ZG(e){oo(bi.Number),Vw.setFloat64(0,e);for(let r of Hw)oo(r)}function WG(e){oo(bi.Object);for(let r of globalThis.Object.getOwnPropertyNames(e).sort())Qp(r),Qp(e[r])}function XG(e){oo(bi.String);for(let r=0;r<e.length;r++)for(let t of UG(e.charCodeAt(r)))oo(t)}function YG(e){oo(bi.Symbol),Qp(e.description)}function qG(e){oo(bi.Uint8Array);for(let r=0;r<e.length;r++)oo(e[r])}function JG(e){return oo(bi.Undefined)}function Qp(e){if(et(e))return GG(e);if(Is(e))return zG(e);if(Ln(e))return $G(e);if(Eo(e))return VG(e);if(Su(e))return HG(e);if(Ve(e))return ZG(e);if(nt(e))return WG(e);if(Et(e))return XG(e);if(Cu(e))return YG(e);if(_p(e))return qG(e);if(Or(e))return JG(e);throw new mI(e)}function oo(e){Kp=Kp^jG[e],Kp=Kp*RG%NG}function Vl(e){return Kp=BigInt("14695981039346656037"),Qp(e),Kp}f();var hI=class extends qe{constructor(r){super("Unknown type"),this.schema=r}};function KG(e){return e[ue]==="Any"||e[ue]==="Unknown"}function gt(e){return e!==void 0}function QG(e,r,t){return!0}function ez(e,r,t){if(!et(t)||gt(e.minItems)&&!(t.length>=e.minItems)||gt(e.maxItems)&&!(t.length<=e.maxItems)||!t.every(i=>jn(e.items,r,i))||e.uniqueItems===!0&&!(function(){let i=new Set;for(let a of t){let u=Vl(a);if(i.has(u))return!1;i.add(u)}return!0})())return!1;if(!(gt(e.contains)||Ve(e.minContains)||Ve(e.maxContains)))return!0;let n=gt(e.contains)?e.contains:Qt(),o=t.reduce((i,a)=>jn(n,r,a)?i+1:i,0);return!(o===0||Ve(e.minContains)&&o<e.minContains||Ve(e.maxContains)&&o>e.maxContains)}function tz(e,r,t){return M1(t)}function rz(e,r,t){return!(!Ln(t)||gt(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||gt(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||gt(e.maximum)&&!(t<=e.maximum)||gt(e.minimum)&&!(t>=e.minimum)||gt(e.multipleOf)&&t%e.multipleOf!==BigInt(0))}function nz(e,r,t){return Is(t)}function oz(e,r,t){return jn(e.returns,r,t.prototype)}function iz(e,r,t){return!(!Eo(t)||gt(e.exclusiveMaximumTimestamp)&&!(t.getTime()<e.exclusiveMaximumTimestamp)||gt(e.exclusiveMinimumTimestamp)&&!(t.getTime()>e.exclusiveMinimumTimestamp)||gt(e.maximumTimestamp)&&!(t.getTime()<=e.maximumTimestamp)||gt(e.minimumTimestamp)&&!(t.getTime()>=e.minimumTimestamp)||gt(e.multipleOfTimestamp)&&t.getTime()%e.multipleOfTimestamp!==0)}function az(e,r,t){return Ll(t)}function sz(e,r,t){return!(!P1(t)||gt(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||gt(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||gt(e.maximum)&&!(t<=e.maximum)||gt(e.minimum)&&!(t>=e.minimum)||gt(e.multipleOf)&&t%e.multipleOf!==0)}function uz(e,r,t){let n=e.allOf.every(o=>jn(o,r,t));if(e.unevaluatedProperties===!1){let o=new RegExp(_u(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a));return n&&i}else if(It(e.unevaluatedProperties)){let o=new RegExp(_u(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a)||jn(e.unevaluatedProperties,r,t[a]));return n&&i}else return n}function lz(e,r,t){return w1(t)}function cz(e,r,t){return t===e.const}function dz(e,r,t){return!1}function pz(e,r,t){return!jn(e.not,r,t)}function fz(e,r,t){return Su(t)}function mz(e,r,t){return!(!Xt.IsNumberLike(t)||gt(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||gt(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||gt(e.minimum)&&!(t>=e.minimum)||gt(e.maximum)&&!(t<=e.maximum)||gt(e.multipleOf)&&t%e.multipleOf!==0)}function hz(e,r,t){if(!Xt.IsObjectLike(t)||gt(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||gt(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(!jn(i,r,t[o])||(Fu(i)||KG(i))&&!(o in t))return!1}else if(Xt.IsExactOptionalProperty(t,o)&&!jn(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)||jn(e.additionalProperties,r,t[i])):!0}function gz(e,r,t){return A1(t)}function yz(e,r,t){if(!Xt.IsRecordLike(t)||gt(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||gt(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)?jn(o,r,d):!0),u=typeof e.additionalProperties=="object"?Object.entries(t).every(([c,d])=>i.test(c)?!0:jn(e.additionalProperties,r,d)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(t).every(c=>i.test(c)):!0;return a&&u&&l}function bz(e,r,t){return jn(Mt(e,r),r,t)}function vz(e,r,t){let n=new RegExp(e.source,e.flags);return gt(e.minLength)&&!(t.length>=e.minLength)||gt(e.maxLength)&&!(t.length<=e.maxLength)?!1:n.test(t)}function xz(e,r,t){return!Et(t)||gt(e.minLength)&&!(t.length>=e.minLength)||gt(e.maxLength)&&!(t.length<=e.maxLength)||gt(e.pattern)&&!new RegExp(e.pattern).test(t)?!1:gt(e.format)?So.Has(e.format)?So.Get(e.format)(t):!1:!0}function Ez(e,r,t){return Cu(t)}function Iz(e,r,t){return Et(t)&&new RegExp(e.pattern).test(t)}function Sz(e,r,t){return jn(Mt(e,r),r,t)}function Cz(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(!jn(e.items[n],r,t[n]))return!1;return!0}function Dz(e,r,t){return Or(t)}function Tz(e,r,t){return e.anyOf.some(n=>jn(n,r,t))}function Mz(e,r,t){return!(!_p(t)||gt(e.maxByteLength)&&!(t.length<=e.maxByteLength)||gt(e.minByteLength)&&!(t.length>=e.minByteLength))}function wz(e,r,t){return!0}function Az(e,r,t){return Xt.IsVoidLike(t)}function Pz(e,r,t){return fn.Has(e[ue])?fn.Get(e[ue])(e,t):!1}function jn(e,r,t){let n=gt(e.$id)?[...r,e]:r,o=e;switch(o[ue]){case"Any":return QG(o,n,t);case"Array":return ez(o,n,t);case"AsyncIterator":return tz(o,n,t);case"BigInt":return rz(o,n,t);case"Boolean":return nz(o,n,t);case"Constructor":return oz(o,n,t);case"Date":return iz(o,n,t);case"Function":return az(o,n,t);case"Integer":return sz(o,n,t);case"Intersect":return uz(o,n,t);case"Iterator":return lz(o,n,t);case"Literal":return cz(o,n,t);case"Never":return dz(o,n,t);case"Not":return pz(o,n,t);case"Null":return fz(o,n,t);case"Number":return mz(o,n,t);case"Object":return hz(o,n,t);case"Promise":return gz(o,n,t);case"Record":return yz(o,n,t);case"Ref":return bz(o,n,t);case"RegExp":return vz(o,n,t);case"String":return xz(o,n,t);case"Symbol":return Ez(o,n,t);case"TemplateLiteral":return Iz(o,n,t);case"This":return Sz(o,n,t);case"Tuple":return Cz(o,n,t);case"Undefined":return Dz(o,n,t);case"Union":return Tz(o,n,t);case"Uint8Array":return Mz(o,n,t);case"Unknown":return wz(o,n,t);case"Void":return Az(o,n,t);default:if(!fn.Has(o[ue]))throw new hI(o);return Pz(o,n,t)}}function dt(...e){return e.length===3?jn(e[0],e[1],e[2]):jn(e[0],[],e[1])}var le;(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"})(le||(le={}));var gI=class extends qe{constructor(r){super("Unknown type"),this.schema=r}};function Bu(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function yt(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 _e(e,r,t,n,o=[]){return{type:e,schema:r,path:t,value:n,message:zw()({errorType:e,path:t,schema:r,value:n,errors:o}),errors:o}}function*_z(e,r,t,n){}function*Oz(e,r,t,n){if(!et(n))return yield _e(le.Array,e,t,n);yt(e.minItems)&&!(n.length>=e.minItems)&&(yield _e(le.ArrayMinItems,e,t,n)),yt(e.maxItems)&&!(n.length<=e.maxItems)&&(yield _e(le.ArrayMaxItems,e,t,n));for(let a=0;a<n.length;a++)yield*Ee(Un(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=Vl(u);if(a.has(l))return!1;a.add(l)}return!0})()&&(yield _e(le.ArrayUniqueItems,e,t,n)),!(yt(e.contains)||yt(e.minContains)||yt(e.maxContains)))return;let o=yt(e.contains)?e.contains:Qt(),i=n.reduce((a,u,l)=>Un(o,r,"".concat(t).concat(l),u).next().done===!0?a+1:a,0);i===0&&(yield _e(le.ArrayContains,e,t,n)),Ve(e.minContains)&&i<e.minContains&&(yield _e(le.ArrayMinContains,e,t,n)),Ve(e.maxContains)&&i>e.maxContains&&(yield _e(le.ArrayMaxContains,e,t,n))}function*Fz(e,r,t,n){M1(n)||(yield _e(le.AsyncIterator,e,t,n))}function*Bz(e,r,t,n){if(!Ln(n))return yield _e(le.BigInt,e,t,n);yt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _e(le.BigIntExclusiveMaximum,e,t,n)),yt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _e(le.BigIntExclusiveMinimum,e,t,n)),yt(e.maximum)&&!(n<=e.maximum)&&(yield _e(le.BigIntMaximum,e,t,n)),yt(e.minimum)&&!(n>=e.minimum)&&(yield _e(le.BigIntMinimum,e,t,n)),yt(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield _e(le.BigIntMultipleOf,e,t,n))}function*kz(e,r,t,n){Is(n)||(yield _e(le.Boolean,e,t,n))}function*Lz(e,r,t,n){yield*Ee(Un(e.returns,r,t,n.prototype))}function*Rz(e,r,t,n){if(!Eo(n))return yield _e(le.Date,e,t,n);yt(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield _e(le.DateExclusiveMaximumTimestamp,e,t,n)),yt(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield _e(le.DateExclusiveMinimumTimestamp,e,t,n)),yt(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield _e(le.DateMaximumTimestamp,e,t,n)),yt(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield _e(le.DateMinimumTimestamp,e,t,n)),yt(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield _e(le.DateMultipleOfTimestamp,e,t,n))}function*Nz(e,r,t,n){Ll(n)||(yield _e(le.Function,e,t,n))}function*jz(e,r,t,n){if(!P1(n))return yield _e(le.Integer,e,t,n);yt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _e(le.IntegerExclusiveMaximum,e,t,n)),yt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _e(le.IntegerExclusiveMinimum,e,t,n)),yt(e.maximum)&&!(n<=e.maximum)&&(yield _e(le.IntegerMaximum,e,t,n)),yt(e.minimum)&&!(n>=e.minimum)&&(yield _e(le.IntegerMinimum,e,t,n)),yt(e.multipleOf)&&n%e.multipleOf!==0&&(yield _e(le.IntegerMultipleOf,e,t,n))}function*Uz(e,r,t,n){let o=!1;for(let i of e.allOf)for(let a of Un(i,r,t,n))o=!0,yield a;if(o)return yield _e(le.Intersect,e,t,n);if(e.unevaluatedProperties===!1){let i=new RegExp(_u(e));for(let a of Object.getOwnPropertyNames(n))i.test(a)||(yield _e(le.IntersectUnevaluatedProperties,e,"".concat(t,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let i=new RegExp(_u(e));for(let a of Object.getOwnPropertyNames(n))if(!i.test(a)){let u=Un(e.unevaluatedProperties,r,"".concat(t,"/").concat(a),n[a]).next();u.done||(yield u.value)}}}function*Gz(e,r,t,n){w1(n)||(yield _e(le.Iterator,e,t,n))}function*zz(e,r,t,n){n!==e.const&&(yield _e(le.Literal,e,t,n))}function*$z(e,r,t,n){yield _e(le.Never,e,t,n)}function*Vz(e,r,t,n){Un(e.not,r,t,n).next().done===!0&&(yield _e(le.Not,e,t,n))}function*Hz(e,r,t,n){Su(n)||(yield _e(le.Null,e,t,n))}function*Zz(e,r,t,n){if(!Xt.IsNumberLike(n))return yield _e(le.Number,e,t,n);yt(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _e(le.NumberExclusiveMaximum,e,t,n)),yt(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _e(le.NumberExclusiveMinimum,e,t,n)),yt(e.maximum)&&!(n<=e.maximum)&&(yield _e(le.NumberMaximum,e,t,n)),yt(e.minimum)&&!(n>=e.minimum)&&(yield _e(le.NumberMinimum,e,t,n)),yt(e.multipleOf)&&n%e.multipleOf!==0&&(yield _e(le.NumberMultipleOf,e,t,n))}function*Wz(e,r,t,n){if(!Xt.IsObjectLike(n))return yield _e(le.Object,e,t,n);yt(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _e(le.ObjectMinProperties,e,t,n)),yt(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _e(le.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 _e(le.ObjectRequiredProperty,e.properties[u],"".concat(t,"/").concat(Bu(u)),void 0));if(e.additionalProperties===!1)for(let u of a)i.includes(u)||(yield _e(le.ObjectAdditionalProperties,e,"".concat(t,"/").concat(Bu(u)),n[u]));if(typeof e.additionalProperties=="object")for(let u of a)i.includes(u)||(yield*Ee(Un(e.additionalProperties,r,"".concat(t,"/").concat(Bu(u)),n[u])));for(let u of i){let l=e.properties[u];e.required&&e.required.includes(u)?(yield*Ee(Un(l,r,"".concat(t,"/").concat(Bu(u)),n[u])),Fu(e)&&!(u in n)&&(yield _e(le.ObjectRequiredProperty,l,"".concat(t,"/").concat(Bu(u)),void 0))):Xt.IsExactOptionalProperty(n,u)&&(yield*Ee(Un(l,r,"".concat(t,"/").concat(Bu(u)),n[u])))}}function*Xz(e,r,t,n){A1(n)||(yield _e(le.Promise,e,t,n))}function*Yz(e,r,t,n){if(!Xt.IsRecordLike(n))return yield _e(le.Object,e,t,n);yt(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _e(le.ObjectMinProperties,e,t,n)),yt(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _e(le.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*Ee(Un(i,r,"".concat(t,"/").concat(Bu(u)),l)));if(typeof e.additionalProperties=="object")for(let[u,l]of Object.entries(n))a.test(u)||(yield*Ee(Un(e.additionalProperties,r,"".concat(t,"/").concat(Bu(u)),l)));if(e.additionalProperties===!1){for(let[u,l]of Object.entries(n))if(!a.test(u))return yield _e(le.ObjectAdditionalProperties,e,"".concat(t,"/").concat(Bu(u)),l)}}function*qz(e,r,t,n){yield*Ee(Un(Mt(e,r),r,t,n))}function*Jz(e,r,t,n){if(!Et(n))return yield _e(le.String,e,t,n);if(yt(e.minLength)&&!(n.length>=e.minLength)&&(yield _e(le.StringMinLength,e,t,n)),yt(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _e(le.StringMaxLength,e,t,n)),!new RegExp(e.source,e.flags).test(n))return yield _e(le.RegExp,e,t,n)}function*Kz(e,r,t,n){if(!Et(n))return yield _e(le.String,e,t,n);yt(e.minLength)&&!(n.length>=e.minLength)&&(yield _e(le.StringMinLength,e,t,n)),yt(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _e(le.StringMaxLength,e,t,n)),Et(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield _e(le.StringPattern,e,t,n))),Et(e.format)&&(So.Has(e.format)?So.Get(e.format)(n)||(yield _e(le.StringFormat,e,t,n)):yield _e(le.StringFormatUnknown,e,t,n))}function*Qz(e,r,t,n){Cu(n)||(yield _e(le.Symbol,e,t,n))}function*e$(e,r,t,n){if(!Et(n))return yield _e(le.String,e,t,n);new RegExp(e.pattern).test(n)||(yield _e(le.StringPattern,e,t,n))}function*t$(e,r,t,n){yield*Ee(Un(Mt(e,r),r,t,n))}function*r$(e,r,t,n){if(!et(n))return yield _e(le.Tuple,e,t,n);if(e.items===void 0&&n.length!==0)return yield _e(le.TupleLength,e,t,n);if(n.length!==e.maxItems)return yield _e(le.TupleLength,e,t,n);if(e.items)for(let o=0;o<e.items.length;o++)yield*Ee(Un(e.items[o],r,"".concat(t,"/").concat(o),n[o]))}function*n$(e,r,t,n){Or(n)||(yield _e(le.Undefined,e,t,n))}function*o$(e,r,t,n){if(dt(e,r,n))return;let o=e.anyOf.map(i=>new Ki(Un(i,r,t,n)));yield _e(le.Union,e,t,n,o)}function*i$(e,r,t,n){if(!_p(n))return yield _e(le.Uint8Array,e,t,n);yt(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield _e(le.Uint8ArrayMaxByteLength,e,t,n)),yt(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield _e(le.Uint8ArrayMinByteLength,e,t,n))}function*a$(e,r,t,n){}function*s$(e,r,t,n){Xt.IsVoidLike(n)||(yield _e(le.Void,e,t,n))}function*u$(e,r,t,n){fn.Get(e[ue])(e,n)||(yield _e(le.Kind,e,t,n))}function*Un(e,r,t,n){let o=yt(e.$id)?[...r,e]:r,i=e;switch(i[ue]){case"Any":return yield*Ee(_z(i,o,t,n));case"Array":return yield*Ee(Oz(i,o,t,n));case"AsyncIterator":return yield*Ee(Fz(i,o,t,n));case"BigInt":return yield*Ee(Bz(i,o,t,n));case"Boolean":return yield*Ee(kz(i,o,t,n));case"Constructor":return yield*Ee(Lz(i,o,t,n));case"Date":return yield*Ee(Rz(i,o,t,n));case"Function":return yield*Ee(Nz(i,o,t,n));case"Integer":return yield*Ee(jz(i,o,t,n));case"Intersect":return yield*Ee(Uz(i,o,t,n));case"Iterator":return yield*Ee(Gz(i,o,t,n));case"Literal":return yield*Ee(zz(i,o,t,n));case"Never":return yield*Ee($z(i,o,t,n));case"Not":return yield*Ee(Vz(i,o,t,n));case"Null":return yield*Ee(Hz(i,o,t,n));case"Number":return yield*Ee(Zz(i,o,t,n));case"Object":return yield*Ee(Wz(i,o,t,n));case"Promise":return yield*Ee(Xz(i,o,t,n));case"Record":return yield*Ee(Yz(i,o,t,n));case"Ref":return yield*Ee(qz(i,o,t,n));case"RegExp":return yield*Ee(Jz(i,o,t,n));case"String":return yield*Ee(Kz(i,o,t,n));case"Symbol":return yield*Ee(Qz(i,o,t,n));case"TemplateLiteral":return yield*Ee(e$(i,o,t,n));case"This":return yield*Ee(t$(i,o,t,n));case"Tuple":return yield*Ee(r$(i,o,t,n));case"Undefined":return yield*Ee(n$(i,o,t,n));case"Union":return yield*Ee(o$(i,o,t,n));case"Uint8Array":return yield*Ee(i$(i,o,t,n));case"Unknown":return yield*Ee(a$(i,o,t,n));case"Void":return yield*Ee(s$(i,o,t,n));default:if(!fn.Has(i[ue]))throw new gI(e);return yield*Ee(u$(i,o,t,n))}}function Ms(...e){let r=e.length===3?Un(e[0],e[1],"",e[2]):Un(e[0],[],"",e[1]);return new Ki(r)}f();f();var l$=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},Ww=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)},yI,sb,Xw,bI=class extends qe{constructor(r){let t=r.First();super(t===void 0?"Invalid Value":t.message),yI.add(this),sb.set(this,void 0),l$(this,sb,r,"f"),this.error=t}Errors(){return new Ki(Ww(this,yI,"m",Xw).call(this))}};sb=new WeakMap,yI=new WeakSet,Xw=function*(){this.error&&(yield this.error),yield*Ee(Ww(this,sb,"f"))};function Zw(e,r,t){if(!dt(e,r,t))throw new bI(Ms(e,r,t))}function ub(...e){return e.length===3?Zw(e[0],e[1],e[2]):Zw(e[0],[],e[1])}f();f();f();function c$(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 d$(e){return e.map(r=>wt(r))}function p$(e){return e.slice()}function f$(e){return new Map(wt([...e.entries()]))}function m$(e){return new Set(wt([...e.entries()]))}function h$(e){return new Date(e.toISOString())}function wt(e){if(et(e))return d$(e);if(Eo(e))return h$(e);if(Vi(e))return p$(e);if(_T(e))return f$(e);if(OT(e))return m$(e);if(nt(e))return c$(e);if(Rn(e))return e;throw new Error("ValueClone: Unable to clone value")}var vi=class extends qe{constructor(r,t){super(t),this.schema=r}};function At(e){return Ll(e)?e():wt(e)}function g$(e,r){return Ke(e,"default")?At(e.default):{}}function y$(e,r){if(e.uniqueItems===!0&&!Ke(e,"default"))throw new vi(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!Ke(e,"default"))throw new vi(e,"Array with the contains constraint requires a default value");return"default"in e?At(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(t=>xi(e.items,r)):[]}function b$(e,r){return Ke(e,"default")?At(e.default):(function(){return gD(this,null,function*(){})})()}function v$(e,r){return Ke(e,"default")?At(e.default):BigInt(0)}function x$(e,r){return Ke(e,"default")?At(e.default):!1}function E$(e,r){if(Ke(e,"default"))return At(e.default);{let t=xi(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 I$(e,r){return Ke(e,"default")?At(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}function S$(e,r){return Ke(e,"default")?At(e.default):()=>xi(e.returns,r)}function C$(e,r){return Ke(e,"default")?At(e.default):e.minimum!==void 0?e.minimum:0}function D$(e,r){if(Ke(e,"default"))return At(e.default);{let t=e.allOf.reduce((n,o)=>{let i=xi(o,r);return typeof i=="object"?k(k({},n),i):i},{});if(!dt(e,r,t))throw new vi(e,"Intersect produced invalid value. Consider using a default value.");return t}}function T$(e,r){return Ke(e,"default")?At(e.default):(function*(){})()}function M$(e,r){return Ke(e,"default")?At(e.default):e.const}function w$(e,r){if(Ke(e,"default"))return At(e.default);throw new vi(e,"Never types cannot be created. Consider using a default value.")}function A$(e,r){if(Ke(e,"default"))return At(e.default);throw new vi(e,"Not types must have a default value")}function P$(e,r){return Ke(e,"default")?At(e.default):null}function _$(e,r){return Ke(e,"default")?At(e.default):e.minimum!==void 0?e.minimum:0}function O$(e,r){if(Ke(e,"default"))return At(e.default);{let t=new Set(e.required),n={};for(let[o,i]of Object.entries(e.properties))t.has(o)&&(n[o]=xi(i,r));return n}}function F$(e,r){return Ke(e,"default")?At(e.default):Promise.resolve(xi(e.item,r))}function B$(e,r){let[t,n]=Object.entries(e.patternProperties)[0];if(Ke(e,"default"))return At(e.default);if(t===Au||t===wu)return{};{let o=t.slice(1,t.length-1).split("|"),i={};for(let a of o)i[a]=xi(n,r);return i}}function k$(e,r){return Ke(e,"default")?At(e.default):xi(Mt(e,r),r)}function L$(e,r){if(Ke(e,"default"))return At(e.default);throw new vi(e,"RegExp types cannot be created. Consider using a default value.")}function R$(e,r){if(e.pattern!==void 0){if(Ke(e,"default"))return At(e.default);throw new vi(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(Ke(e,"default"))return At(e.default);throw new vi(e,"String types with formats must specify a default value")}else return Ke(e,"default")?At(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}function N$(e,r){return Ke(e,"default")?At(e.default):"value"in e?Symbol.for(e.value):Symbol()}function j$(e,r){if(Ke(e,"default"))return At(e.default);if(!k1(e))throw new vi(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Np(e)[0]}function U$(e,r){if(Yw++>X$)throw new vi(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return Ke(e,"default")?At(e.default):xi(Mt(e,r),r)}function G$(e,r){return Ke(e,"default")?At(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((t,n)=>xi(e.items[n],r))}function z$(e,r){if(Ke(e,"default"))return At(e.default)}function $$(e,r){if(Ke(e,"default"))return At(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return xi(e.anyOf[0],r)}function V$(e,r){return Ke(e,"default")?At(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}function H$(e,r){return Ke(e,"default")?At(e.default):{}}function Z$(e,r){if(Ke(e,"default"))return At(e.default)}function W$(e,r){if(Ke(e,"default"))return At(e.default);throw new Error("User defined types must specify a default value")}function xi(e,r){let t=Ji(e,r),n=e;switch(n[ue]){case"Any":return g$(n,t);case"Array":return y$(n,t);case"AsyncIterator":return b$(n,t);case"BigInt":return v$(n,t);case"Boolean":return x$(n,t);case"Constructor":return E$(n,t);case"Date":return I$(n,t);case"Function":return S$(n,t);case"Integer":return C$(n,t);case"Intersect":return D$(n,t);case"Iterator":return T$(n,t);case"Literal":return M$(n,t);case"Never":return w$(n,t);case"Not":return A$(n,t);case"Null":return P$(n,t);case"Number":return _$(n,t);case"Object":return O$(n,t);case"Promise":return F$(n,t);case"Record":return B$(n,t);case"Ref":return k$(n,t);case"RegExp":return L$(n,t);case"String":return R$(n,t);case"Symbol":return N$(n,t);case"TemplateLiteral":return j$(n,t);case"This":return U$(n,t);case"Tuple":return G$(n,t);case"Undefined":return z$(n,t);case"Union":return $$(n,t);case"Uint8Array":return V$(n,t);case"Unknown":return H$(n,t);case"Void":return Z$(n,t);default:if(!fn.Has(n[ue]))throw new vi(n,"Unknown type");return W$(n,t)}}var X$=512,Yw=0;function Qi(...e){return Yw=0,e.length===2?xi(e[0],e[1]):xi(e[0],[])}var lb=class extends qe{constructor(r,t){super(t),this.schema=r}};function Y$(e,r,t){if(e[ue]==="Object"&&typeof t=="object"&&!Su(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 p=d[ue]==="Literal"&&d.const===t[c]?u:0,m=dt(d,r,t[c])?a:0,g=o.includes(c)?a:0;return l+(p+m+g)},0)}else return dt(e,r,t)?1:0}function q$(e,r,t){let n=e.anyOf.map(a=>Mt(a,r)),[o,i]=[n[0],0];for(let a of n){let u=Y$(a,r,t);u>i&&(o=a,i=u)}return o}function J$(e,r,t){if("default"in e)return typeof t=="function"?e.default:wt(e.default);{let n=q$(e,r,t);return vI(n,r,t)}}function K$(e,r,t){return dt(e,r,t)?wt(t):Qi(e,r)}function Q$(e,r,t){return dt(e,r,t)?t:Qi(e,r)}function eV(e,r,t){if(dt(e,r,t))return wt(t);let n=et(t)?wt(t):Qi(e,r),o=Ve(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(Ve(e.maxItems)&&o.length>e.maxItems?o.slice(0,e.maxItems):o).map(l=>ws(e.items,r,l));if(e.uniqueItems!==!0)return a;let u=[...new Set(a)];if(!dt(e,r,u))throw new lb(e,"Array cast produced invalid data due to uniqueItems constraint");return u}function tV(e,r,t){if(dt(e,r,t))return Qi(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]=ws(a,r,t.prototype[i]));return o}function rV(e,r,t){let n=Qi(e,r),o=nt(n)&&nt(t)?k(k({},n),t):t;return dt(e,r,o)?o:Qi(e,r)}function nV(e,r,t){throw new lb(e,"Never types cannot be cast")}function oV(e,r,t){if(dt(e,r,t))return t;if(t===null||typeof t!="object")return Qi(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]=ws(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]=ws(e.additionalProperties,r,t[a]))}return o}function iV(e,r,t){if(dt(e,r,t))return wt(t);if(t===null||typeof t!="object"||Array.isArray(t)||t instanceof Date)return Qi(e,r);let n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n],i={};for(let[a,u]of Object.entries(t))i[a]=ws(o,r,u);return i}function aV(e,r,t){return ws(Mt(e,r),r,t)}function sV(e,r,t){return ws(Mt(e,r),r,t)}function uV(e,r,t){return dt(e,r,t)?wt(t):et(t)?e.items===void 0?[]:e.items.map((n,o)=>ws(n,r,t[o])):Qi(e,r)}function lV(e,r,t){return dt(e,r,t)?wt(t):J$(e,r,t)}function ws(e,r,t){let n=Et(e.$id)?[...r,e]:r,o=e;switch(e[ue]){case"Array":return eV(o,n,t);case"Constructor":return tV(o,n,t);case"Intersect":return rV(o,n,t);case"Never":return nV(o,n,t);case"Object":return oV(o,n,t);case"Record":return iV(o,n,t);case"Ref":return aV(o,n,t);case"This":return sV(o,n,t);case"Tuple":return uV(o,n,t);case"Union":return lV(o,n,t);case"Date":case"Symbol":case"Uint8Array":return K$(e,r,t);default:return Q$(o,n,t)}}function vI(...e){return e.length===3?ws(e[0],e[1],e[2]):ws(e[0],[],e[1])}f();function cV(e){return Nl(e)&&e[ue]!=="Unsafe"}function dV(e,r,t){return et(t)?t.map(n=>Ei(e.items,r,n)):t}function pV(e,r,t){let n=e.unevaluatedProperties,i=e.allOf.map(u=>Ei(u,r,wt(t))).reduce((u,l)=>nt(l)?k(k({},u),l):l,{});if(!nt(t)||!nt(i)||!Nl(n))return i;let a=Tn(e);for(let u of Object.getOwnPropertyNames(t))a.includes(u)||dt(n,r,t[u])&&(i[u]=Ei(n,r,t[u]));return i}function fV(e,r,t){if(!nt(t)||et(t))return t;let n=e.additionalProperties;for(let o of Object.getOwnPropertyNames(t)){if(Ke(e.properties,o)){t[o]=Ei(e.properties[o],r,t[o]);continue}if(Nl(n)&&dt(n,r,t[o])){t[o]=Ei(n,r,t[o]);continue}delete t[o]}return t}function mV(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]=Ei(a,r,t[l]);continue}if(Nl(n)&&dt(n,r,t[l])){t[l]=Ei(n,r,t[l]);continue}delete t[l]}return t}function hV(e,r,t){return Ei(Mt(e,r),r,t)}function gV(e,r,t){return Ei(Mt(e,r),r,t)}function yV(e,r,t){if(!et(t))return t;if(Or(e.items))return[];let n=Math.min(t.length,e.items.length);for(let o=0;o<n;o++)t[o]=Ei(e.items[o],r,t[o]);return t.length>n?t.slice(0,n):t}function bV(e,r,t){for(let n of e.anyOf)if(cV(n)&&dt(n,r,t))return Ei(n,r,t);return t}function Ei(e,r,t){let n=Et(e.$id)?[...r,e]:r,o=e;switch(o[ue]){case"Array":return dV(o,n,t);case"Intersect":return pV(o,n,t);case"Object":return fV(o,n,t);case"Record":return mV(o,n,t);case"Ref":return hV(o,n,t);case"This":return gV(o,n,t);case"Tuple":return yV(o,n,t);case"Union":return bV(o,n,t);default:return t}}function cb(...e){return e.length===3?Ei(e[0],e[1],e[2]):Ei(e[0],[],e[1])}f();function db(e){return Et(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}function vV(e){return Ln(e)||Is(e)||Ve(e)}function r0(e){return e===!0||Ve(e)&&e===1||Ln(e)&&e===BigInt("1")||Et(e)&&(e.toLowerCase()==="true"||e==="1")}function n0(e){return e===!1||Ve(e)&&(e===0||Object.is(e,-0))||Ln(e)&&e===BigInt("0")||Et(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}function xV(e){return Et(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}function EV(e){return Et(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}function IV(e){return Et(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 SV(e){return Et(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 CV(e){return Et(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}function DV(e,r){let t=Jw(e);return t===r?t:e}function TV(e,r){let t=Kw(e);return t===r?t:e}function MV(e,r){let t=qw(e);return t===r?t:e}function wV(e,r){return Et(e.const)?DV(r,e.const):Ve(e.const)?TV(r,e.const):Is(e.const)?MV(r,e.const):r}function qw(e){return r0(e)?!0:n0(e)?!1:e}function AV(e){let r=t=>t.split(".")[0];return db(e)?BigInt(r(e)):Ve(e)?BigInt(Math.trunc(e)):n0(e)?BigInt(0):r0(e)?BigInt(1):e}function Jw(e){return vV(e)?e.toString():Cu(e)&&e.description!==void 0?e.description.toString():e}function Kw(e){return db(e)?parseFloat(e):r0(e)?1:n0(e)?0:e}function PV(e){return db(e)?parseInt(e):Ve(e)?e|0:r0(e)?1:n0(e)?0:e}function _V(e){return Et(e)&&e.toLowerCase()==="null"?null:e}function OV(e){return Et(e)&&e==="undefined"?void 0:e}function FV(e){return Eo(e)?e:Ve(e)?new Date(e):r0(e)?new Date(1):n0(e)?new Date(0):db(e)?new Date(parseInt(e)):EV(e)?new Date("1970-01-01T".concat(e,".000Z")):xV(e)?new Date("1970-01-01T".concat(e)):SV(e)?new Date("".concat(e,".000Z")):IV(e)?new Date(e):CV(e)?new Date("".concat(e,"T00:00:00.000Z")):e}function BV(e,r,t){return(et(t)?t:[t]).map(o=>As(e.items,r,o))}function kV(e,r,t){return AV(t)}function LV(e,r,t){return qw(t)}function RV(e,r,t){return FV(t)}function NV(e,r,t){return PV(t)}function jV(e,r,t){return e.allOf.reduce((n,o)=>As(o,r,n),t)}function UV(e,r,t){return wV(e,t)}function GV(e,r,t){return _V(t)}function zV(e,r,t){return Kw(t)}function $V(e,r,t){if(!nt(t))return t;for(let n of Object.getOwnPropertyNames(e.properties))Ke(t,n)&&(t[n]=As(e.properties[n],r,t[n]));return t}function VV(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]=As(i,r,u);return t}function HV(e,r,t){return As(Mt(e,r),r,t)}function ZV(e,r,t){return Jw(t)}function WV(e,r,t){return Et(t)||Ve(t)?Symbol(t):t}function XV(e,r,t){return As(Mt(e,r),r,t)}function YV(e,r,t){return et(t)&&!Or(e.items)?t.map((o,i)=>i<e.items.length?As(e.items[i],r,o):o):t}function qV(e,r,t){return OV(t)}function JV(e,r,t){for(let n of e.anyOf){let o=As(n,r,wt(t));if(dt(n,r,o))return o}return t}function As(e,r,t){let n=Ji(e,r),o=e;switch(e[ue]){case"Array":return BV(o,n,t);case"BigInt":return kV(o,n,t);case"Boolean":return LV(o,n,t);case"Date":return RV(o,n,t);case"Integer":return NV(o,n,t);case"Intersect":return jV(o,n,t);case"Literal":return UV(o,n,t);case"Null":return GV(o,n,t);case"Number":return zV(o,n,t);case"Object":return $V(o,n,t);case"Record":return VV(o,n,t);case"Ref":return HV(o,n,t);case"String":return ZV(o,n,t);case"Symbol":return WV(o,n,t);case"This":return XV(o,n,t);case"Tuple":return YV(o,n,t);case"Undefined":return qV(o,n,t);case"Union":return JV(o,n,t);default:return t}}function pb(...e){return e.length===3?As(e[0],e[1],e[2]):As(e[0],[],e[1])}f();f();var ef=class extends qe{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}},qc=class extends qe{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 Fr(e,r,t){try{return pr(e)?e[Er].Decode(t):t}catch(n){throw new qc(e,r,t,n)}}function KV(e,r,t,n){return et(n)?Fr(e,t,n.map((o,i)=>Ps(e.items,r,"".concat(t,"/").concat(i),o))):Fr(e,t,n)}function QV(e,r,t,n){if(!nt(n)||Rn(n))return Fr(e,t,n);let o=Gl(e),i=o.map(d=>d[0]),a=k({},n);for(let[d,p]of o)d in a&&(a[d]=Ps(p,r,"".concat(t,"/").concat(d),a[d]));if(!pr(e.unevaluatedProperties))return Fr(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,c=k({},a);for(let d of u)i.includes(d)||(c[d]=Fr(l,"".concat(t,"/").concat(d),c[d]));return Fr(e,t,c)}function eH(e,r,t,n){return Fr(e,t,Ps(e.not,r,t,n))}function tH(e,r,t,n){if(!nt(n))return Fr(e,t,n);let o=Tn(e),i=k({},n);for(let c of o)Ke(i,c)&&(Or(i[c])&&(!Fp(e.properties[c])||Xt.IsExactOptionalProperty(i,c))||(i[c]=Ps(e.properties[c],r,"".concat(t,"/").concat(c),i[c])));if(!It(e.additionalProperties))return Fr(e,t,i);let a=Object.getOwnPropertyNames(i),u=e.additionalProperties,l=k({},i);for(let c of a)o.includes(c)||(l[c]=Fr(u,"".concat(t,"/").concat(c),l[c]));return Fr(e,t,l)}function rH(e,r,t,n){if(!nt(n))return Fr(e,t,n);let o=Object.getOwnPropertyNames(e.patternProperties)[0],i=new RegExp(o),a=k({},n);for(let d of Object.getOwnPropertyNames(n))i.test(d)&&(a[d]=Ps(e.patternProperties[o],r,"".concat(t,"/").concat(d),a[d]));if(!It(e.additionalProperties))return Fr(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=k({},a);for(let d of u)i.test(d)||(c[d]=Fr(l,"".concat(t,"/").concat(d),c[d]));return Fr(e,t,c)}function nH(e,r,t,n){let o=Mt(e,r);return Fr(e,t,Ps(o,r,t,n))}function oH(e,r,t,n){let o=Mt(e,r);return Fr(e,t,Ps(o,r,t,n))}function iH(e,r,t,n){return et(n)&&et(e.items)?Fr(e,t,e.items.map((o,i)=>Ps(o,r,"".concat(t,"/").concat(i),n[i]))):Fr(e,t,n)}function aH(e,r,t,n){for(let o of e.anyOf){if(!dt(o,r,n))continue;let i=Ps(o,r,t,n);return Fr(e,t,i)}return Fr(e,t,n)}function Ps(e,r,t,n){let o=Ji(e,r),i=e;switch(e[ue]){case"Array":return KV(i,o,t,n);case"Intersect":return QV(i,o,t,n);case"Not":return eH(i,o,t,n);case"Object":return tH(i,o,t,n);case"Record":return rH(i,o,t,n);case"Ref":return nH(i,o,t,n);case"Symbol":return Fr(i,t,n);case"This":return oH(i,o,t,n);case"Tuple":return iH(i,o,t,n);case"Union":return aH(i,o,t,n);default:return Fr(i,t,n)}}function tf(e,r,t){return Ps(e,r,"",t)}f();var rf=class extends qe{constructor(r,t,n){super("The encoded value does not match the expected schema"),this.schema=r,this.value=t,this.error=n}},Jc=class extends qe{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 io(e,r,t){try{return pr(e)?e[Er].Encode(t):t}catch(n){throw new Jc(e,r,t,n)}}function sH(e,r,t,n){let o=io(e,t,n);return et(o)?o.map((i,a)=>_s(e.items,r,"".concat(t,"/").concat(a),i)):o}function uH(e,r,t,n){let o=io(e,t,n);if(!nt(n)||Rn(n))return o;let i=Gl(e),a=i.map(p=>p[0]),u=k({},o);for(let[p,m]of i)p in u&&(u[p]=_s(m,r,"".concat(t,"/").concat(p),u[p]));if(!pr(e.unevaluatedProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=k({},u);for(let p of l)a.includes(p)||(d[p]=io(c,"".concat(t,"/").concat(p),d[p]));return d}function lH(e,r,t,n){return io(e.not,t,io(e,t,n))}function cH(e,r,t,n){let o=io(e,t,n);if(!nt(o))return o;let i=Tn(e),a=k({},o);for(let d of i)Ke(a,d)&&(Or(a[d])&&(!Fp(e.properties[d])||Xt.IsExactOptionalProperty(a,d))||(a[d]=_s(e.properties[d],r,"".concat(t,"/").concat(d),a[d])));if(!It(e.additionalProperties))return a;let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=k({},a);for(let d of u)i.includes(d)||(c[d]=io(l,"".concat(t,"/").concat(d),c[d]));return c}function dH(e,r,t,n){let o=io(e,t,n);if(!nt(n))return o;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=k({},o);for(let p of Object.getOwnPropertyNames(n))a.test(p)&&(u[p]=_s(e.patternProperties[i],r,"".concat(t,"/").concat(p),u[p]));if(!It(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=k({},u);for(let p of l)a.test(p)||(d[p]=io(c,"".concat(t,"/").concat(p),d[p]));return d}function pH(e,r,t,n){let o=Mt(e,r),i=_s(o,r,t,n);return io(e,t,i)}function fH(e,r,t,n){let o=Mt(e,r),i=_s(o,r,t,n);return io(e,t,i)}function mH(e,r,t,n){let o=io(e,t,n);return et(e.items)?e.items.map((i,a)=>_s(i,r,"".concat(t,"/").concat(a),o[a])):[]}function hH(e,r,t,n){for(let o of e.anyOf){if(!dt(o,r,n))continue;let i=_s(o,r,t,n);return io(e,t,i)}for(let o of e.anyOf){let i=_s(o,r,t,n);if(dt(e,r,i))return io(e,t,i)}return io(e,t,n)}function _s(e,r,t,n){let o=Ji(e,r),i=e;switch(e[ue]){case"Array":return sH(i,o,t,n);case"Intersect":return uH(i,o,t,n);case"Not":return lH(i,o,t,n);case"Object":return cH(i,o,t,n);case"Record":return dH(i,o,t,n);case"Ref":return pH(i,o,t,n);case"This":return fH(i,o,t,n);case"Tuple":return mH(i,o,t,n);case"Union":return hH(i,o,t,n);default:return io(i,t,n)}}function fb(e,r,t){return _s(e,r,"",t)}f();function gH(e,r){return pr(e)||Mn(e.items,r)}function yH(e,r){return pr(e)||Mn(e.items,r)}function bH(e,r){return pr(e)||Mn(e.returns,r)||e.parameters.some(t=>Mn(t,r))}function vH(e,r){return pr(e)||Mn(e.returns,r)||e.parameters.some(t=>Mn(t,r))}function xH(e,r){return pr(e)||pr(e.unevaluatedProperties)||e.allOf.some(t=>Mn(t,r))}function EH(e,r){return pr(e)||Mn(e.items,r)}function IH(e,r){return pr(e)||Mn(e.not,r)}function SH(e,r){return pr(e)||Object.values(e.properties).some(t=>Mn(t,r))||It(e.additionalProperties)&&Mn(e.additionalProperties,r)}function CH(e,r){return pr(e)||Mn(e.item,r)}function DH(e,r){let t=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[t];return pr(e)||Mn(n,r)||It(e.additionalProperties)&&pr(e.additionalProperties)}function TH(e,r){return pr(e)?!0:Mn(Mt(e,r),r)}function MH(e,r){return pr(e)?!0:Mn(Mt(e,r),r)}function wH(e,r){return pr(e)||!Or(e.items)&&e.items.some(t=>Mn(t,r))}function AH(e,r){return pr(e)||e.anyOf.some(t=>Mn(t,r))}function Mn(e,r){let t=Ji(e,r),n=e;if(e.$id&&xI.has(e.$id))return!1;switch(e.$id&&xI.add(e.$id),e[ue]){case"Array":return gH(n,t);case"AsyncIterator":return yH(n,t);case"Constructor":return bH(n,t);case"Function":return vH(n,t);case"Intersect":return xH(n,t);case"Iterator":return EH(n,t);case"Not":return IH(n,t);case"Object":return SH(n,t);case"Promise":return CH(n,t);case"Record":return DH(n,t);case"Ref":return TH(n,t);case"This":return MH(n,t);case"Tuple":return wH(n,t);case"Union":return AH(n,t);default:return pr(e)}}var xI=new Set;function Os(e,r){return xI.clear(),Mn(e,r)}function Qw(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!dt(r,t,n))throw new ef(r,n,Ms(r,t,n).First());return Os(r,t)?tf(r,t,n):n}f();function ku(e,r){let t=Ke(e,"default")?e.default:void 0,n=Ll(t)?t():wt(t);return Or(r)?n:nt(r)&&nt(n)?Object.assign(n,r):r}function EI(e){return Nl(e)&&"default"in e}function PH(e,r,t){let n=ku(e,t);if(!et(n))return n;for(let o=0;o<n.length;o++)n[o]=Ii(e.items,r,n[o]);return n}function _H(e,r,t){return Eo(t)?t:ku(e,t)}function OH(e,r,t){let n=ku(e,t);return e.allOf.reduce((o,i)=>{let a=Ii(i,r,n);return nt(a)?k(k({},o),a):a},{})}function FH(e,r,t){let n=ku(e,t);if(!nt(n))return n;let o=Object.getOwnPropertyNames(e.properties);for(let i of o){let a=Ii(e.properties[i],r,n[i]);Or(a)||(n[i]=Ii(e.properties[i],r,n[i]))}if(!EI(e.additionalProperties))return n;for(let i of Object.getOwnPropertyNames(n))o.includes(i)||(n[i]=Ii(e.additionalProperties,r,n[i]));return n}function BH(e,r,t){let n=ku(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)&&EI(a)&&(n[l]=Ii(a,r,n[l]));if(!EI(o))return n;for(let l of Object.getOwnPropertyNames(n))u.test(l)||(n[l]=Ii(o,r,n[l]));return n}function kH(e,r,t){return Ii(Mt(e,r),r,ku(e,t))}function LH(e,r,t){return Ii(Mt(e,r),r,t)}function RH(e,r,t){let n=ku(e,t);if(!et(n)||Or(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]=Ii(o[a],r,n[a]));return n}function NH(e,r,t){let n=ku(e,t);for(let o of e.anyOf){let i=Ii(o,r,wt(n));if(dt(o,r,i))return i}return n}function Ii(e,r,t){let n=Ji(e,r),o=e;switch(o[ue]){case"Array":return PH(o,n,t);case"Date":return _H(o,n,t);case"Intersect":return OH(o,n,t);case"Object":return FH(o,n,t);case"Record":return BH(o,n,t);case"Ref":return kH(o,n,t);case"This":return LH(o,n,t);case"Tuple":return RH(o,n,t);case"Union":return NH(o,n,t);default:return ku(o,t)}}function mb(...e){return e.length===3?Ii(e[0],e[1],e[2]):Ii(e[0],[],e[1])}f();f();var ea={};Cl(ea,{Delete:()=>UH,Format:()=>o0,Get:()=>zH,Has:()=>GH,Set:()=>jH,ValuePointerRootDeleteError:()=>gb,ValuePointerRootSetError:()=>hb});f();var hb=class extends qe{constructor(r,t,n){super("Cannot set root value"),this.value=r,this.path=t,this.update=n}},gb=class extends qe{constructor(r,t){super("Cannot delete root value"),this.value=r,this.path=t}};function e7(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function*o0(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 e7(e.slice(r,t))),r=n+1):t=n;yield e7(e.slice(r))}function jH(e,r,t){if(r==="")throw new hb(e,r,t);let[n,o,i]=[null,e,""];for(let a of o0(r))o[a]===void 0&&(o[a]={}),n=o,o=o[a],i=a;n[i]=t}function UH(e,r){if(r==="")throw new gb(e,r);let[t,n,o]=[null,e,""];for(let i of o0(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 GH(e,r){if(r==="")return!0;let[t,n,o]=[null,e,""];for(let i of o0(r)){if(n[i]===void 0)return!1;t=n,n=n[i],o=i}return Object.getOwnPropertyNames(t).includes(o)}function zH(e,r){if(r==="")return e;let t=e;for(let n of o0(r)){if(t[n]===void 0)return;t=t[n]}return t}f();function $H(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=>Kc(e[o],r[o]))}function VH(e,r){return Eo(r)&&e.getTime()===r.getTime()}function HH(e,r){return!et(r)||e.length!==r.length?!1:e.every((t,n)=>Kc(t,r[n]))}function ZH(e,r){return!Vi(r)||e.length!==r.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(r).constructor.name?!1:e.every((t,n)=>Kc(t,r[n]))}function WH(e,r){return e===r}function Kc(e,r){if(Eo(e))return VH(e,r);if(Vi(e))return ZH(e,r);if(et(e))return HH(e,r);if(nt(e))return $H(e,r);if(Rn(e))return WH(e,r);throw new Error("ValueEquals: Unable to compare value")}var XH=or({type:Nt("insert"),path:Zi(),value:Ou()}),YH=or({type:Nt("update"),path:Zi(),value:Ou()}),qH=or({type:Nt("delete"),path:Zi()}),r7=er([XH,YH,qH]),yb=class extends qe{constructor(r,t){super(t),this.value=r}};function bb(e,r){return{type:"update",path:e,value:r}}function n7(e,r){return{type:"insert",path:e,value:r}}function o7(e){return{type:"delete",path:e}}function t7(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new yb(e,"Cannot diff objects with symbols")}function*JH(e,r,t){if(t7(r),t7(t),!CE(t))return yield bb(e,t);let n=globalThis.Object.getOwnPropertyNames(r),o=globalThis.Object.getOwnPropertyNames(t);for(let i of o)Ke(r,i)||(yield n7("".concat(e,"/").concat(i),t[i]));for(let i of n)Ke(t,i)&&(Kc(r,t)||(yield*Ee(vb("".concat(e,"/").concat(i),r[i],t[i]))));for(let i of n)Ke(t,i)||(yield o7("".concat(e,"/").concat(i)))}function*KH(e,r,t){if(!et(t))return yield bb(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*Ee(vb("".concat(e,"/").concat(n),r[n],t[n]));for(let n=0;n<t.length;n++)n<r.length||(yield n7("".concat(e,"/").concat(n),t[n]));for(let n=r.length-1;n>=0;n--)n<t.length||(yield o7("".concat(e,"/").concat(n)))}function*QH(e,r,t){if(!Vi(t)||r.length!==t.length||globalThis.Object.getPrototypeOf(r).constructor.name!==globalThis.Object.getPrototypeOf(t).constructor.name)return yield bb(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*Ee(vb("".concat(e,"/").concat(n),r[n],t[n]))}function*eZ(e,r,t){r!==t&&(yield bb(e,t))}function*vb(e,r,t){if(CE(r))return yield*Ee(JH(e,r,t));if(et(r))return yield*Ee(KH(e,r,t));if(Vi(r))return yield*Ee(QH(e,r,t));if(Rn(r))return yield*Ee(eZ(e,r,t));throw new yb(r,"Unable to diff value")}function i7(e,r){return[...vb("",e,r)]}function tZ(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}function rZ(e){return e.length===0}function a7(e,r){if(tZ(r))return wt(r[0].value);if(rZ(r))return wt(e);let t=wt(e);for(let n of r)switch(n.type){case"insert":{ea.Set(t,n.path,n.value);break}case"update":{ea.Set(t,n.path,n.value);break}case"delete":{ea.Delete(t,n.path);break}}return t}f();function s7(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],o=Os(r,t)?fb(r,t,n):n;if(!dt(r,t,o))throw new rf(r,o,Ms(r,t,o).First());return o}f();var xb=class extends qe{constructor(r){super(r)}};function nZ(e,r,t,n){if(!nt(t))ea.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)II(e,"".concat(r,"/").concat(a),t[a],n[a])}}function oZ(e,r,t,n){if(!et(t))ea.Set(e,r,wt(n));else{for(let o=0;o<n.length;o++)II(e,"".concat(r,"/").concat(o),t[o],n[o]);t.splice(n.length)}}function iZ(e,r,t,n){if(Vi(t)&&t.length===n.length)for(let o=0;o<t.length;o++)t[o]=n[o];else ea.Set(e,r,wt(n))}function aZ(e,r,t,n){t!==n&&ea.Set(e,r,n)}function II(e,r,t,n){if(et(n))return oZ(e,r,t,n);if(Vi(n))return iZ(e,r,t,n);if(nt(n))return nZ(e,r,t,n);if(Rn(n))return aZ(e,r,t,n)}function u7(e){return Vi(e)||Rn(e)}function sZ(e,r){return nt(e)&&et(r)||et(e)&&nt(r)}function l7(e,r){if(u7(e)||u7(r))throw new xb("Only object and array types can be mutated at the root level");if(sZ(e,r))throw new xb("Cannot assign due type mismatch of assignable values");II(e,"",e,r)}f();var uZ=[(e,r,t)=>wt(t),(e,r,t)=>mb(e,r,t),(e,r,t)=>cb(e,r,t),(e,r,t)=>pb(e,r,t),(e,r,t)=>(ub(e,r,t),t),(e,r,t)=>Os(e,r)?tf(e,r,t):t];function c7(e,r,t){return uZ.reduce((n,o)=>o(e,r,n),t)}function d7(...e){return e.length===3?c7(e[0],e[1],e[2]):c7(e[0],[],e[1])}f();var ta={};Cl(ta,{Assert:()=>ub,Cast:()=>vI,Check:()=>dt,Clean:()=>cb,Clone:()=>wt,Convert:()=>pb,Create:()=>Qi,Decode:()=>Qw,Default:()=>mb,Diff:()=>i7,Edit:()=>r7,Encode:()=>s7,Equal:()=>Kc,Errors:()=>Ms,Hash:()=>Vl,Mutate:()=>l7,Parse:()=>d7,Patch:()=>a7,ValueErrorIterator:()=>Ki});f();f();var p7={},lZ=(function(e,r,t,n,o){var i=new Worker(p7[r]||(p7[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}),ir=Uint8Array,To=Uint16Array,u0=Int32Array,uf=new ir([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]),lf=new ir([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]),i0=new ir([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h7=function(e,r){for(var t=new To(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new u0(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}},g7=h7(uf,2),wI=g7.b,Db=g7.r;wI[28]=258,Db[258]=28;var y7=h7(lf,0),b7=y7.b,CI=y7.r,a0=new To(32768);for(Gt=0;Gt<32768;++Gt)Lu=(Gt&43690)>>1|(Gt&21845)<<1,Lu=(Lu&52428)>>2|(Lu&13107)<<2,Lu=(Lu&61680)>>4|(Lu&3855)<<4,a0[Gt]=((Lu&65280)>>8|(Lu&255)<<8)>>1;var Lu,Gt,na=(function(e,r,t){for(var n=e.length,o=0,i=new To(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new To(r);for(o=1;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var u;if(t){u=new To(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],p=a[e[o]-1]++<<d,m=p|(1<<d)-1;p<=m;++p)u[a0[p]>>l]=c}else for(u=new To(n),o=0;o<n;++o)e[o]&&(u[o]=a0[a[e[o]-1]++]>>15-e[o]);return u}),Ru=new ir(288);for(Gt=0;Gt<144;++Gt)Ru[Gt]=8;var Gt;for(Gt=144;Gt<256;++Gt)Ru[Gt]=9;var Gt;for(Gt=256;Gt<280;++Gt)Ru[Gt]=7;var Gt;for(Gt=280;Gt<288;++Gt)Ru[Gt]=8;var Gt,af=new ir(32);for(Gt=0;Gt<32;++Gt)af[Gt]=5;var Gt,v7=na(Ru,9,0),x7=na(Ru,9,1),E7=na(af,5,0),I7=na(af,5,1),Ib=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},ra=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},Sb=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},l0=function(e){return(e+7)/8|0},Hl=function(e,r,t){return(r==null||r<0)&&(r=0),(t==null||t>e.length)&&(t=e.length),new ir(e.subarray(r,t))},Ab={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},S7=["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"],Br=function(e,r,t){var n=new Error(r||S7[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Br),!t)throw n;return n},C7=function(e,r,t,n){var o=e.length,i=n?n.length:0;if(!o||r.f&&!r.l)return t||new ir(0);var a=!t,u=a||r.i!=2,l=r.i;a&&(t=new ir(o*3));var c=function(Y){var we=t.length;if(Y>we){var De=new ir(Math.max(we*2,Y));De.set(t),t=De}},d=r.f||0,p=r.p||0,m=r.b||0,g=r.l,y=r.d,E=r.m,b=r.n,v=o*8;do{if(!g){d=ra(e,p,1);var D=ra(e,p+1,3);if(p+=3,D)if(D==1)g=x7,y=I7,E=9,b=5;else if(D==2){var G=ra(e,p,31)+257,_=ra(e,p+10,15)+4,F=G+ra(e,p+5,31)+1;p+=14;for(var A=new ir(F),j=new ir(19),N=0;N<_;++N)j[i0[N]]=ra(e,p+N*3,7);p+=_*3;for(var Z=Ib(j),ie=(1<<Z)-1,de=na(j,Z,1),N=0;N<F;){var J=de[ra(e,p,ie)];p+=J&15;var M=J>>4;if(M<16)A[N++]=M;else{var z=0,X=0;for(M==16?(X=3+ra(e,p,3),p+=2,z=A[N-1]):M==17?(X=3+ra(e,p,7),p+=3):M==18&&(X=11+ra(e,p,127),p+=7);X--;)A[N++]=z}}var W=A.subarray(0,G),ee=A.subarray(G);E=Ib(W),b=Ib(ee),g=na(W,E,1),y=na(ee,b,1)}else Br(1);else{var M=l0(p)+4,T=e[M-4]|e[M-3]<<8,B=M+T;if(B>o){l&&Br(0);break}u&&c(m+T),t.set(e.subarray(M,B),m),r.b=m+=T,r.p=p=B*8,r.f=d;continue}if(p>v){l&&Br(0);break}}u&&c(m+131072);for(var ce=(1<<E)-1,ye=(1<<b)-1,Ce=p;;Ce=p){var z=g[Sb(e,p)&ce],Pe=z>>4;if(p+=z&15,p>v){l&&Br(0);break}if(z||Br(2),Pe<256)t[m++]=Pe;else if(Pe==256){Ce=p,g=null;break}else{var Le=Pe-254;if(Pe>264){var N=Pe-257,be=uf[N];Le=ra(e,p,(1<<be)-1)+wI[N],p+=be}var He=y[Sb(e,p)&ye],tt=He>>4;He||Br(3),p+=He&15;var ee=b7[tt];if(tt>3){var be=lf[tt];ee+=Sb(e,p)&(1<<be)-1,p+=be}if(p>v){l&&Br(0);break}u&&c(m+131072);var lt=m+Le;if(m<ee){var U=i-ee,ve=Math.min(ee,lt);for(U+m<0&&Br(3);m<ve;++m)t[m]=n[U+m]}for(;m<lt;++m)t[m]=t[m-ee]}}r.l=g,r.p=Ce,r.b=m,r.f=d,g&&(d=1,r.m=E,r.d=y,r.n=b)}while(!d);return m!=t.length&&a?Hl(t,0,m):t.subarray(0,m)},Fs=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},nf=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},Cb=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:PI,l:0};if(o==1){var a=new ir(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(B,G){return B.f-G.f}),t.push({s:-1,f:25001});var u=t[0],l=t[1],c=0,d=1,p=2;for(t[0]={s:-1,f:u.f+l.f,l:u,r:l};d!=o-1;)u=t[t[c].f<t[p].f?c++:p++],l=t[c!=d&&t[c].f<t[p].f?c++:p++],t[d++]={s:-1,f:u.f+l.f,l:u,r:l};for(var m=i[0].s,n=1;n<o;++n)i[n].s>m&&(m=i[n].s);var g=new To(m+1),y=Tb(t[d-1],g,0);if(y>r){var n=0,E=0,b=y-r,v=1<<b;for(i.sort(function(G,_){return g[_.s]-g[G.s]||G.f-_.f});n<o;++n){var D=i[n].s;if(g[D]>r)E+=v-(1<<y-g[D]),g[D]=r;else break}for(E>>=b;E>0;){var M=i[n].s;g[M]<r?E-=1<<r-g[M]++-1:++n}for(;n>=0&&E;--n){var T=i[n].s;g[T]==r&&(--g[T],++E)}y=r}return{t:new ir(g),l:y}},Tb=function(e,r,t){return e.s==-1?Math.max(Tb(e.l,r,t+1),Tb(e.r,r,t+1)):r[e.s]=t},DI=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new To(++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}},of=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},AI=function(e,r,t){var n=t.length,o=l0(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},TI=function(e,r,t,n,o,i,a,u,l,c,d){Fs(r,d++,t),++o[256];for(var p=Cb(o,15),m=p.t,g=p.l,y=Cb(i,15),E=y.t,b=y.l,v=DI(m),D=v.c,M=v.n,T=DI(E),B=T.c,G=T.n,_=new To(19),F=0;F<D.length;++F)++_[D[F]&31];for(var F=0;F<B.length;++F)++_[B[F]&31];for(var A=Cb(_,7),j=A.t,N=A.l,Z=19;Z>4&&!j[i0[Z-1]];--Z);var ie=c+5<<3,de=of(o,Ru)+of(i,af)+a,J=of(o,m)+of(i,E)+a+14+3*Z+of(_,j)+2*_[16]+3*_[17]+7*_[18];if(l>=0&&ie<=de&&ie<=J)return AI(r,d,e.subarray(l,l+c));var z,X,W,ee;if(Fs(r,d,1+(J<de)),d+=2,J<de){z=na(m,g,0),X=m,W=na(E,b,0),ee=E;var ce=na(j,N,0);Fs(r,d,M-257),Fs(r,d+5,G-1),Fs(r,d+10,Z-4),d+=14;for(var F=0;F<Z;++F)Fs(r,d+3*F,j[i0[F]]);d+=3*Z;for(var ye=[D,B],Ce=0;Ce<2;++Ce)for(var Pe=ye[Ce],F=0;F<Pe.length;++F){var Le=Pe[F]&31;Fs(r,d,ce[Le]),d+=j[Le],Le>15&&(Fs(r,d,Pe[F]>>5&127),d+=Pe[F]>>12)}}else z=v7,X=Ru,W=E7,ee=af;for(var F=0;F<u;++F){var be=n[F];if(be>255){var Le=be>>18&31;nf(r,d,z[Le+257]),d+=X[Le+257],Le>7&&(Fs(r,d,be>>23&31),d+=uf[Le]);var He=be&31;nf(r,d,W[He]),d+=ee[He],He>3&&(nf(r,d,be>>5&8191),d+=lf[He])}else nf(r,d,z[be]),d+=X[be]}return nf(r,d,z[256]),d+X[256]},D7=new u0([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),PI=new ir(0),T7=function(e,r,t,n,o,i){var a=i.z||e.length,u=new ir(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 p=D7[r-1],m=p>>13,g=p&8191,y=(1<<t)-1,E=i.p||new To(32768),b=i.h||new To(y+1),v=Math.ceil(t/3),D=2*v,M=function(xe){return(e[xe]^e[xe+1]<<v^e[xe+2]<<D)&y},T=new u0(25e3),B=new To(288),G=new To(32),_=0,F=0,A=i.i||0,j=0,N=i.w||0,Z=0;A+2<a;++A){var ie=M(A),de=A&32767,J=b[ie];if(E[de]=J,b[ie]=de,N<=A){var z=a-A;if((_>7e3||j>24576)&&(z>423||!c)){d=TI(e,l,0,T,B,G,F,j,Z,A-Z,d),j=_=F=0,Z=A;for(var X=0;X<286;++X)B[X]=0;for(var X=0;X<30;++X)G[X]=0}var W=2,ee=0,ce=g,ye=de-J&32767;if(z>2&&ie==M(A-ye))for(var Ce=Math.min(m,z)-1,Pe=Math.min(32767,A),Le=Math.min(258,z);ye<=Pe&&--ce&&de!=J;){if(e[A+W]==e[A+W-ye]){for(var be=0;be<Le&&e[A+be]==e[A+be-ye];++be);if(be>W){if(W=be,ee=ye,be>Ce)break;for(var He=Math.min(ye,be-2),tt=0,X=0;X<He;++X){var lt=A-ye+X&32767,U=E[lt],ve=lt-U&32767;ve>tt&&(tt=ve,J=lt)}}}de=J,J=E[de],ye+=de-J&32767}if(ee){T[j++]=268435456|Db[W]<<18|CI[ee];var Y=Db[W]&31,we=CI[ee]&31;F+=uf[Y]+lf[we],++B[257+Y],++G[we],N=A+W,++_}else T[j++]=e[A],++B[e[A]]}}for(A=Math.max(A,N);A<a;++A)T[j++]=e[A],++B[e[A]];d=TI(e,l,c,T,B,G,F,j,Z,A-Z,d),c||(i.r=d&7|l[d/8|0]<<3,d-=7,i.h=b,i.p=E,i.i=A,i.w=N)}else{for(var A=i.w||0;A<a+c;A+=65535){var De=A+65535;De>=a&&(l[d/8|0]=c,De=a),d=AI(l,d+1,e.subarray(A,De))}i.i=a}return Hl(u,0,n+l0(d)+o)},cZ=(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})(),M7=function(){var e=-1;return{p:function(r){for(var t=e,n=0;n<r.length;++n)t=cZ[t&255^r[n]]^t>>>8;e=t},d:function(){return~e}}};var w7=function(e,r,t,n,o){if(!o&&(o={l:1},r.dictionary)){var i=r.dictionary.subarray(-32768),a=new ir(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length}return T7(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)},Pb=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},f7=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 p in u.prototype)r+=";"+l+".prototype."+p+"="+u.prototype[p].toString()}else r+=c}else t[l]=u}return r},Eb=[],dZ=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},pZ=function(e,r,t,n){if(!Eb[t]){for(var o="",i={},a=e.length-1,u=0;u<a;++u)o=f7(e[u],o,i);Eb[t]={c:f7(e[a],o,i),e:i}}var l=Pb({},Eb[t].e);return lZ(Eb[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,l,dZ(l),n)},fZ=function(){return[ir,To,u0,uf,lf,i0,wI,b7,x7,I7,a0,S7,na,Ib,ra,Sb,l0,Hl,Br,C7,Fb,_b,A7]},mZ=function(){return[ir,To,u0,uf,lf,i0,Db,CI,v7,Ru,E7,af,a0,D7,PI,na,Fs,nf,Cb,Tb,DI,of,AI,TI,l0,Hl,T7,w7,Ob,_b]};var _b=function(e){return postMessage(e,[e.buffer])},A7=function(e){return e&&{out:e.size&&new ir(e.size),dictionary:e.dictionary}},P7=function(e,r,t,n,o,i){var a=pZ(t,n,o,function(u,l){a.terminate(),i(u,l)});return a.postMessage([e,r],r.consume?[e.buffer]:[]),function(){a.terminate()}};var Aa=function(e,r){return e[r]|e[r+1]<<8},zn=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},SI=function(e,r){return zn(e,r)+zn(e,r+4)*4294967296},Gn=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8};function hZ(e,r,t){return t||(t=r,r={}),typeof t!="function"&&Br(7),P7(e,r,[mZ],function(n){return _b(Ob(n.data[0],n.data[1]))},0,t)}function Ob(e,r){return w7(e,r||{},0,0)}function gZ(e,r,t){return t||(t=r,r={}),typeof t!="function"&&Br(7),P7(e,r,[fZ],function(n){return _b(Fb(n.data[0],A7(n.data[1])))},1,t)}function Fb(e,r){return C7(e,{i:2},r&&r.out,r&&r.dictionary)}var _I=function(e,r,t,n){for(var o in e){var i=e[o],a=r+o,u=n;Array.isArray(i)&&(u=Pb(n,i[1]),i=i[0]),i instanceof ir?t[a]=[i,u]:(t[a+="/"]=[new ir(0),u],_I(i,a,t,n))}},m7=typeof TextEncoder<"u"&&new TextEncoder,MI=typeof TextDecoder<"u"&&new TextDecoder,yZ=0;try{MI.decode(PI,{stream:!0}),yZ=1}catch(e){}var bZ=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:Hl(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 sf(e,r){if(r){for(var t=new ir(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}if(m7)return m7.encode(e);for(var o=e.length,i=new ir(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 ir(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 Hl(i,0,a)}function OI(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(MI)return MI.decode(e);var o=bZ(e),i=o.s,t=o.r;return t.length&&Br(8),i}}var _7=function(e,r){return r+30+Aa(e,r+26)+Aa(e,r+28)},O7=function(e,r,t){var n=Aa(e,r+28),o=OI(e.subarray(r+46,r+46+n),!(Aa(e,r+8)&2048)),i=r+46+n,a=zn(e,r+20),u=t&&a==4294967295?vZ(e,i):[a,zn(e,r+24),zn(e,r+42)],l=u[0],c=u[1],d=u[2];return[Aa(e,r+10),l,c,o,i+Aa(e,r+30)+Aa(e,r+32),d]},vZ=function(e,r){for(;Aa(e,r)!=1;r+=4+Aa(e,r+2));return[SI(e,r+12),SI(e,r+4),SI(e,r+20)]},s0=function(e){var r=0;if(e)for(var t in e){var n=e[t].length;n>65535&&Br(9),r+=n+4}return r},Mb=function(e,r,t,n,o,i,a,u){var l=n.length,c=t.extra,d=u&&u.length,p=s0(c);Gn(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 m=new Date(t.mtime==null?Date.now():t.mtime),g=m.getFullYear()-1980;if((g<0||g>119)&&Br(10),Gn(e,r,g<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),r+=4,i!=-1&&(Gn(e,r,t.crc),Gn(e,r+4,i<0?-i-2:i),Gn(e,r+8,t.size)),Gn(e,r+12,l),Gn(e,r+14,p),r+=16,a!=null&&(Gn(e,r,d),Gn(e,r+6,t.attrs),Gn(e,r+10,a),r+=14),e.set(n,r),r+=l,p)for(var y in c){var E=c[y],b=E.length;Gn(e,r,+y),Gn(e,r+2,b),e.set(E,r+4),r+=4+b}return d&&(e.set(u,r),r+=d),r},F7=function(e,r,t,n,o){Gn(e,r,101010256),Gn(e,r+8,t),Gn(e,r+10,t),Gn(e,r+12,n),Gn(e,r+16,o)};function B7(e,r,t){t||(t=r,r={}),typeof t!="function"&&Br(7);var n={};_I(e,"",n,r);var o=Object.keys(n),i=o.length,a=0,u=0,l=i,c=new Array(i),d=[],p=function(){for(var b=0;b<d.length;++b)d[b]()},m=function(b,v){wb(function(){t(b,v)})};wb(function(){m=t});var g=function(){var b=new ir(u+22),v=a,D=u-a;u=0;for(var M=0;M<l;++M){var T=c[M];try{var B=T.c.length;Mb(b,u,T,T.f,T.u,B);var G=30+T.f.length+s0(T.extra),_=u+G;b.set(T.c,_),Mb(b,a,T,T.f,T.u,B,u,T.m),a+=16+G+(T.m?T.m.length:0),u=_+B}catch(F){return m(F,null)}}F7(b,a,c.length,D,v),m(null,b)};i||g();for(var y=function(b){var v=o[b],D=n[v],M=D[0],T=D[1],B=M7(),G=M.length;B.p(M);var _=sf(v),F=_.length,A=T.comment,j=A&&sf(A),N=j&&j.length,Z=s0(T.extra),ie=T.level==0?0:8,de=function(J,z){if(J)p(),m(J,null);else{var X=z.length;c[b]=Pb(T,{size:G,crc:B.d(),c:z,f:_,m:j,u:F!=v.length||j&&A.length!=N,compression:ie}),a+=30+F+Z+X,u+=76+2*(F+Z)+(N||0)+X,--i||g()}};if(F>65535&&de(Br(11,0,1),null),!ie)de(null,M);else if(G<16e4)try{de(null,Ob(M,T))}catch(J){de(J,null)}else d.push(hZ(M,T,de))},E=0;E<l;++E)y(E);return p}function k7(e,r){r||(r={});var t={},n=[];_I(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,p=sf(a),m=p.length,g=c.comment,y=g&&sf(g),E=y&&y.length,b=s0(c.extra);m>65535&&Br(11);var v=d?Ob(l,c):l,D=v.length,M=M7();M.p(l),n.push(Pb(c,{size:l.length,crc:M.d(),c:v,f:p,m:y,u:m!=a.length||y&&g.length!=E,o,compression:d})),o+=30+m+b+D,i+=76+2*(m+b)+(E||0)+D}for(var T=new ir(i+22),B=o,G=i-o,_=0;_<n.length;++_){var p=n[_];Mb(T,p.o,p,p.f,p.u,p.c.length);var F=30+p.f.length+s0(p.extra);T.set(p.c,p.o+F),Mb(T,o,p,p.f,p.u,p.c.length,p.o,p.m),o+=16+F+(p.m?p.m.length:0)}return F7(T,o,n.length,G,B),T}var wb=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function L7(e,r,t){t||(t=r,r={}),typeof t!="function"&&Br(7);var n=[],o=function(){for(var b=0;b<n.length;++b)n[b]()},i={},a=function(b,v){wb(function(){t(b,v)})};wb(function(){a=t});for(var u=e.length-22;zn(e,u)!=101010256;--u)if(!u||e.length-u>65558)return a(Br(13,0,1),null),o;var l=Aa(e,u+8);if(l){var c=l,d=zn(e,u+16),p=d==4294967295||c==65535;if(p){var m=zn(e,u-12);p=zn(e,m)==101075792,p&&(c=l=zn(e,m+32),d=zn(e,m+48))}for(var g=r&&r.filter,y=function(b){var v=O7(e,d,p),D=v[0],M=v[1],T=v[2],B=v[3],G=v[4],_=v[5],F=_7(e,_);d=G;var A=function(N,Z){N?(o(),a(N,null)):(Z&&(i[B]=Z),--l||a(null,i))};if(!g||g({name:B,size:M,originalSize:T,compression:D}))if(!D)A(null,Hl(e,F,F+M));else if(D==8){var j=e.subarray(F,F+M);if(T<524288||M>.8*T)try{A(null,Fb(j,{out:new ir(T)}))}catch(N){A(N,null)}else n.push(gZ(j,{size:T},A))}else A(Br(14,"unknown compression type "+D,1),null);else A(null,null)},E=0;E<c;++E)y(E)}else a(null,{});return o}function R7(e,r){for(var t={},n=e.length-22;zn(e,n)!=101010256;--n)(!n||e.length-n>65558)&&Br(13);var o=Aa(e,n+8);if(!o)return{};var i=zn(e,n+16),a=i==4294967295||o==65535;if(a){var u=zn(e,n-12);a=zn(e,u)==101075792,a&&(o=zn(e,u+32),i=zn(e,u+48))}for(var l=r&&r.filter,c=0;c<o;++c){var d=O7(e,i,a),p=d[0],m=d[1],g=d[2],y=d[3],E=d[4],b=d[5],v=_7(e,b);i=E,(!l||l({name:y,size:m,originalSize:g,compression:p}))&&(p?p==8?t[y]=Fb(e.subarray(v,v+m),{out:new ir(g)}):Br(14,"unknown compression type "+p):t[y]=Hl(e,v,v+m))}return t}f();var xZ=e=>{if(e!=null)return e.trim()===""?void 0:e},EZ=e=>e!=null,Bb=(e,r,t=0)=>{var n;if($.IsNull(e))return"null";if($.IsUndefined(e))return"undefined";if($.IsString(e))return"<string>";if($.IsNumber(e))return"<number>";if($.IsBoolean(e))return"<boolean>";if($.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if($.IsRef(e)){let o=r.find(i=>i.$id===e.$ref);return o==null?e.$ref:Bb(o,r,t)}if($.IsArray(e))return"".concat(Bb(e.items,r,t+1),"[]");if($.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let i="".concat(e.anyOf.map(a=>Bb(a,r,t+1)).filter(EZ).join(" | "));return t>0?"(".concat(i,")"):i}return(n=e.$id)!=null?n:""},IZ=(e,r,t)=>{var i;let n=r.message;$.IsUnion(r.schema)&&(n="Expected one of: ".concat(Bb(r.schema,t)));let o="#/definitions/".concat(e).concat((i=xZ(r.path))!=null?i:"");return"".concat(o,": ").concat(n)},kb=(e,r,t)=>{let n=r.First();if(n!=null)return IZ(e,n,t)};var cf;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(cf||(cf={}));var df=class extends Error{constructor(t,n){super(n);h(this,"name");h(this,"kind");this.name="CompressError",this.kind=t}},SZ=e=>new df(cf.Archive,e.message),CZ=e=>{let r=Object.values(Ab);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},DZ=(e,r,t)=>{var n;return new df(cf.Validate,(n=kb(e,r,t))!=null?n:"Unknown validate error")},TZ=e=>new df(cf.Encode,e.message),MZ=e=>new df(cf.Unknown,e instanceof Error?e.message:String(e)),c0=(e,r,t)=>r instanceof Jc?TZ(r):r instanceof Ki?DZ(e,r,t):CZ(r)?SZ(r):MZ(r);f();var pf;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(pf||(pf={}));var ff=class extends Error{constructor(t,n){super(n);h(this,"name");h(this,"kind");this.name="DecompressError",this.kind=t}},wZ=e=>new ff(pf.Unarchive,e.message),AZ=e=>{let r=Object.values(Ab);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},PZ=(e,r,t)=>{var n;return new ff(pf.Validate,(n=kb(e,r,t))!=null?n:"Unknown validate error")},_Z=e=>new ff(pf.Decode,e.message),OZ=e=>new ff(pf.Unknown,e instanceof Error?e.message:String(e)),d0=(e,r,t)=>r instanceof qc?_Z(r):r instanceof Ki?PZ(e,r,t):AZ(r)?wZ(r):OZ(r);var N7=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*Ee(N7(n,o))}}},FZ=(e,r)=>e===""?r:r.startsWith("[")?"".concat(e).concat(r):"".concat(e,".").concat(r),Gr=(e,r,t)=>{let n=new Set;for(let[o,i]of N7(e)){let a=r(i);if(n.has(a))return Re({kind:ei.DuplicateIdError,properties:{id:a,path:FZ(t,o)}});n.add(a)}return Be(!0)};var j7=e=>e.floors==null?Re({kind:ei.FloorMissingError,properties:null}):Gr(e.floors.features,r=>r.properties.id,"floors");var U7=I.Intersect([I.Object({id:I.Ref(vt),elevation:I.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:I.Optional(I.String({description:"The subtitle of the floor."})),maxHeight:I.Optional(I.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}))}),Co],{$id:"FloorProperties"}),G7=Nn(I.Union([I.Ref(Yp),I.Ref(qp),I.Null()]),I.Ref(U7),{$id:"FloorFeature"}),z7=Do(I.Ref(G7),{$id:"FloorCollection"}),BZ=I.Object({floors:I.Ref(z7)}),$7={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:j7,schema:BZ,references:[U7,G7,z7]};f();f();var zr=e=>I.Unsafe(e);f();var Ct=e=>Object.keys(e);f();f();var kZ=e=>{var r,t;return new Map((t=(r=e.floors)==null?void 0:r.features.map(n=>[n.properties.id,n]))!=null?t:[])},Pa=e=>{let r=kZ(e);return n=>{let o=r.get(n);return o==null?Re({kind:ei.UnknownFloorError,properties:{floorId:n}}):Be(o)}};var V7=e=>{if(e.floors==null)return Re({kind:ei.FloorMissingError,properties:null});if(e.geometry==null)return Re({kind:ei.GeometryMissingError,properties:null});let r=Gr(e.geometry,n=>n.properties.id,"geometry");if(r.isErr())return r;let t=Pa(e);for(let n of Ct(e.geometry)){let o=t(n);if(o.isErr())return o}return Be(!0)};var H7=I.Intersect([I.Object({id:I.Ref(no)}),Co],{$id:"GeometryProperties"}),Z7=Nn(I.Union([I.Ref(ro),I.Ref(Q1),I.Ref(eb),I.Ref(tb),I.Ref(Yp),I.Ref(qp)]),I.Ref(H7),{$id:"GeometryFeature"}),W7=Do(I.Ref(Z7),{$id:"GeometryCollection"}),LZ=I.Object({geometry:zr(I.Record(vt,I.Ref(W7),{additionalProperties:!1}))},{$id:"GeometrySchema"}),RZ=/^geometry\/(.*)\.geojson$/,X7={name:"core:geometry",schema:LZ,intoBundle:function*(e){if(e.geometry!=null)for(let r of Ct(e.geometry))yield{path:"geometry/".concat(r,".geojson"),contents:e.geometry[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(RZ))==null?void 0:o[1];if(n)return{geometry:{[n]:t(r)}}},references:[H7,Z7,W7],integrityCheck:V7};f();var FI=I.Object({type:I.Literal("file"),name:I.String({description:"The name of the file."})},{$id:"ManifestFile"}),Y7=I.Recursive(e=>I.Object({type:I.Literal("folder"),name:I.String({description:"The name of the folder."}),children:I.Array(I.Union([e,I.Ref(FI)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),NZ=I.Object({name:I.String({description:"The name of the map.",deprecated:!0}),version:I.Literal("3.0.0",{description:"The version of the manifest."}),orgId:I.Optional(I.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:I.Optional(I.String({description:"The identifier of the map that this MVF is for."})),contents:I.Array(I.Union([I.Ref(Y7),I.Ref(FI)]),{minItems:1,description:"The contents of the MVF bundle."}),time:I.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:I.Optional(I.Unsafe(I.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:I.Optional(I.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:I.Optional(I.Ref(vt,{description:"The default floor ID of the map."})),language:I.Optional(I.String({description:"The language code of the map."}))}),q7=I.Intersect([NZ,Co],{$id:"ManifestProperties"}),J7=Do(Nn(ro,I.Ref(q7)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),jZ=I.Object({manifest:I.Ref(J7)}),K7={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:jZ,references:[FI,Y7,q7,J7]};f();f();f();f();var BI=class extends qe{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'"));h(this,"schema");this.schema=t}};function UZ(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new BI(e);return Qc(t,r)}function Lb(e,r){return!xt.IsString(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function Qc(e,r){return e[ue]==="This"||e[ue]==="Ref"?UZ(e,r):e}f();function GZ(e,r,t){let n=e.get(r);if(n!==void 0)return n;let o=Os(r,t);return e.set(r,o),o}function Rb(){let e=new WeakMap;return{HasTransform:(r,t)=>GZ(e,r,t)}}function kr(e,r,t){try{return $.IsTransform(e)?e[Er].Decode(t):t}catch(n){throw new qc(e,r,t,n)}}function zZ(e,r,t,n,o){return xt.IsArray(n)?kr(e,t,n.map((i,a)=>Bs(e.items,r,"".concat(t,"/").concat(a),i,o))):kr(e,t,n)}function $Z(e,r,t,n,o){if(!xt.IsObject(n)||Rn(n))return kr(e,t,n);let i=Gl(e),a=i.map(p=>p[0]),u=k({},n);for(let[p,m]of i)p in u&&(u[p]=Bs(m,r,"".concat(t,"/").concat(p),u[p],o));if(!$.IsTransform(e.unevaluatedProperties))return kr(e,t,u);let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=k({},u);for(let p of l)a.includes(p)||(d[p]=kr(c,"".concat(t,"/").concat(p),d[p]));return kr(e,t,d)}function VZ(e,r,t,n,o){return kr(e,t,Bs(e.not,r,t,n,o))}function HZ(e,r,t,n,o){if(!xt.IsObject(n))return kr(e,t,n);let i=Tn(e),a=k({},n);for(let d of i)xt.HasPropertyKey(a,d)&&(xt.IsUndefined(a[d])&&(!$.IsUndefined(e.properties[d])||Xt.IsExactOptionalProperty(a,d))||(a[d]=Bs(e.properties[d],r,"".concat(t,"/").concat(d),a[d],o)));if(!$.IsSchema(e.additionalProperties))return kr(e,t,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=k({},a);for(let d of u)i.includes(d)||(c[d]=kr(l,"".concat(t,"/").concat(d),c[d]));return kr(e,t,c)}function ZZ(e,r,t,n,o){if(!xt.IsObject(n))return kr(e,t,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=k({},n);for(let p of Object.getOwnPropertyNames(n))a.test(p)&&(u[p]=Bs(e.patternProperties[i],r,"".concat(t,"/").concat(p),u[p],o));if(!$.IsSchema(e.additionalProperties))return kr(e,t,u);let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=k({},u);for(let p of l)a.test(p)||(d[p]=kr(c,"".concat(t,"/").concat(p),d[p]));return kr(e,t,d)}function WZ(e,r,t,n,o){let i=Qc(e,r);return kr(e,t,Bs(i,r,t,n,o))}function XZ(e,r,t,n,o){let i=Qc(e,r);return kr(e,t,Bs(i,r,t,n,o))}function YZ(e,r,t,n,o){return xt.IsArray(n)&&xt.IsArray(e.items)?kr(e,t,e.items.map((i,a)=>Bs(i,r,"".concat(t,"/").concat(a),n[a],o))):kr(e,t,n)}function qZ(e,r,t,n,o){for(let i of e.anyOf){if(!ta.Check(i,r,n))continue;let a=Bs(i,r,t,n,o);return kr(e,t,a)}return kr(e,t,n)}function Bs(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=Lb(e,r),a=e;switch(e[ue]){case"Array":return zZ(a,i,t,n,o);case"Intersect":return $Z(a,i,t,n,o);case"Not":return VZ(a,i,t,n,o);case"Object":return HZ(a,i,t,n,o);case"Record":return ZZ(a,i,t,n,o);case"Ref":return WZ(a,i,t,n,o);case"Symbol":return kr(a,t,n);case"This":return XZ(a,i,t,n,o);case"Tuple":return YZ(a,i,t,n,o);case"Union":return qZ(a,i,t,n,o);default:return kr(a,t,n)}}function Q7(e,r,t){let n=Rb();return Bs(e,r,"",t,n)}f();function ao(e,r,t){try{return $.IsTransform(e)?e[Er].Encode(t):t}catch(n){throw new Jc(e,r,t,n)}}function JZ(e,r,t,n,o){let i=ao(e,t,n);return xt.IsArray(i)?i.map((a,u)=>ks(e.items,r,"".concat(t,"/").concat(u),a,o)):i}function KZ(e,r,t,n,o){let i=ao(e,t,n);if(!xt.IsObject(n)||Rn(n))return i;let a=Gl(e),u=a.map(m=>m[0]),l=k({},i);for(let[m,g]of a)m in l&&(l[m]=ks(g,r,"".concat(t,"/").concat(m),l[m],o));if(!$.IsTransform(e.unevaluatedProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.unevaluatedProperties,p=k({},l);for(let m of c)u.includes(m)||(p[m]=ao(d,"".concat(t,"/").concat(m),p[m]));return p}function QZ(e,r,t,n){return ao(e.not,t,ao(e,t,n))}function eW(e,r,t,n,o){let i=ao(e,t,n);if(!xt.IsObject(i))return i;let a=Tn(e),u=k({},i);for(let p of a)xt.HasPropertyKey(u,p)&&(xt.IsUndefined(u[p])&&(!$.IsUndefined(e.properties[p])||Xt.IsExactOptionalProperty(u,p))||(u[p]=ks(e.properties[p],r,"".concat(t,"/").concat(p),u[p],o)));if(!$.IsSchema(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=k({},u);for(let p of l)a.includes(p)||(d[p]=ao(c,"".concat(t,"/").concat(p),d[p]));return d}function tW(e,r,t,n,o){let i=ao(e,t,n);if(!xt.IsObject(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),l=k({},i);for(let m of Object.getOwnPropertyNames(n))u.test(m)&&(l[m]=ks(e.patternProperties[a],r,"".concat(t,"/").concat(m),l[m],o));if(!$.IsSchema(e.additionalProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.additionalProperties,p=k({},l);for(let m of c)u.test(m)||(p[m]=ao(d,"".concat(t,"/").concat(m),p[m]));return p}function rW(e,r,t,n,o){let i=Qc(e,r),a=ks(i,r,t,n,o);return ao(e,t,a)}function nW(e,r,t,n,o){let i=Qc(e,r),a=ks(i,r,t,n,o);return ao(e,t,a)}function oW(e,r,t,n,o){let i=ao(e,t,n);return xt.IsArray(e.items)?e.items.map((a,u)=>ks(a,r,"".concat(t,"/").concat(u),i[u],o)):[]}function iW(e,r,t,n,o){for(let i of e.anyOf){if(!ta.Check(i,r,n))continue;let a=ks(i,r,t,n,o);return ao(e,t,a)}for(let i of e.anyOf){let a=ks(i,r,t,n,o);if(ta.Check(e,r,a))return ao(e,t,a)}return ao(e,t,n)}function ks(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=Lb(e,r),a=e;switch(e[ue]){case"Array":return JZ(a,i,t,n,o);case"Intersect":return KZ(a,i,t,n,o);case"Not":return QZ(a,i,t,n);case"Object":return eW(a,i,t,n,o);case"Record":return tW(a,i,t,n,o);case"Ref":return rW(a,i,t,n,o);case"This":return nW(a,i,t,n,o);case"Tuple":return oW(a,i,t,n,o);case"Union":return iW(a,i,t,n,o);default:return ao(a,t,n)}}function eA(e,r,t){let n=Rb();return ks(e,r,"",t,n)}f();var kI=class{constructor(r,t,n,o){this.schema=r,this.references=t,this.checkFunc=n,this.code=o,this.hasTransform=Os(r,t)}Code(){return this.code}Errors(r){return Ms(this.schema,this.references,r)}Check(r){return this.checkFunc(r)}Decode(r){if(!this.checkFunc(r))throw new ef(this.schema,r,this.Errors(r).First());return this.hasTransform?tf(this.schema,this.references,r):r}Encode(r){let t=this.hasTransform?fb(this.schema,this.references,r):r;if(!this.checkFunc(t))throw new rf(this.schema,r,this.Errors(r).First());return t}},Nu;(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})(Nu||(Nu={}));var Nb;(function(e){function r(i){return i.length===0?!1:Nu.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(!(Nu.IsAlpha(u)||Nu.IsNumeric(u)||Nu.DollarSign(u)||Nu.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})(Nb||(Nb={}));var LI;(function(e){function r(t){let n=[];for(let o=0;o<t.length;o++){let i=t.charCodeAt(o);Nu.IsNumeric(i)||Nu.IsAlpha(i)?n.push(t.charAt(o)):n.push("_".concat(i,"_"))}return n.join("").replace(/__/g,"_")}e.Encode=r})(LI||(LI={}));var RI;(function(e){function r(t){return t.replace(/'/g,"\\'")}e.Escape=r})(RI||(RI={}));var NI=class extends qe{constructor(r){super("Unknown type"),this.schema=r}},jb=class extends qe{constructor(r){super("Preflight validation check failed to guard for the given schema"),this.schema=r}},ed;(function(e){function r(a,u,l){return Xt.ExactOptionalPropertyTypes?"('".concat(u,"' in ").concat(a," ? ").concat(l," : true)"):"(".concat(Nb.Encode(a,u)," !== undefined ? ").concat(l," : true)")}e.IsExactOptionalProperty=r;function t(a){return Xt.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 Xt.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 Xt.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}e.IsNumberLike=o;function i(a){return Xt.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}e.IsVoidLike=i})(ed||(ed={}));var Ub;(function(e){function r(U){return U[ue]==="Any"||U[ue]==="Unknown"}function*t(U,ve,Y){yield"true"}function*n(U,ve,Y){yield"Array.isArray(".concat(Y,")");let[we,De]=[Le("value","any"),Le("acc","number")];Ve(U.maxItems)&&(yield"".concat(Y,".length <= ").concat(U.maxItems)),Ve(U.minItems)&&(yield"".concat(Y,".length >= ").concat(U.minItems));let xe=ce(U.items,ve,"value");if(yield"".concat(Y,".every((").concat(we,") => ").concat(xe,")"),It(U.contains)||Ve(U.minContains)||Ve(U.maxContains)){let Ne=It(U.contains)?U.contains:Qt(),Rt=ce(Ne,ve,"value"),Ht=Ve(U.minContains)?["(count >= ".concat(U.minContains,")")]:[],Zt=Ve(U.maxContains)?["(count <= ".concat(U.maxContains,")")]:[],Wt="const count = value.reduce((".concat(De,", ").concat(we,") => ").concat(Rt," ? acc + 1 : acc, 0)"),Rr=["(count > 0)",...Ht,...Zt].join(" && ");yield"((".concat(we,") => { ").concat(Wt,"; return ").concat(Rr,"})(").concat(Y,")")}if(U.uniqueItems===!0){let Rt="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(we,") => { ").concat(Rt," )(").concat(Y,")")}}function*o(U,ve,Y){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(Y,")")}function*i(U,ve,Y){yield"(typeof ".concat(Y," === 'bigint')"),Ln(U.exclusiveMaximum)&&(yield"".concat(Y," < BigInt(").concat(U.exclusiveMaximum,")")),Ln(U.exclusiveMinimum)&&(yield"".concat(Y," > BigInt(").concat(U.exclusiveMinimum,")")),Ln(U.maximum)&&(yield"".concat(Y," <= BigInt(").concat(U.maximum,")")),Ln(U.minimum)&&(yield"".concat(Y," >= BigInt(").concat(U.minimum,")")),Ln(U.multipleOf)&&(yield"(".concat(Y," % BigInt(").concat(U.multipleOf,")) === 0"))}function*a(U,ve,Y){yield"(typeof ".concat(Y," === 'boolean')")}function*u(U,ve,Y){yield*Ee(W(U.returns,ve,"".concat(Y,".prototype")))}function*l(U,ve,Y){yield"(".concat(Y," instanceof Date) && Number.isFinite(").concat(Y,".getTime())"),Ve(U.exclusiveMaximumTimestamp)&&(yield"".concat(Y,".getTime() < ").concat(U.exclusiveMaximumTimestamp)),Ve(U.exclusiveMinimumTimestamp)&&(yield"".concat(Y,".getTime() > ").concat(U.exclusiveMinimumTimestamp)),Ve(U.maximumTimestamp)&&(yield"".concat(Y,".getTime() <= ").concat(U.maximumTimestamp)),Ve(U.minimumTimestamp)&&(yield"".concat(Y,".getTime() >= ").concat(U.minimumTimestamp)),Ve(U.multipleOfTimestamp)&&(yield"(".concat(Y,".getTime() % ").concat(U.multipleOfTimestamp,") === 0"))}function*c(U,ve,Y){yield"(typeof ".concat(Y," === 'function')")}function*d(U,ve,Y){yield"Number.isInteger(".concat(Y,")"),Ve(U.exclusiveMaximum)&&(yield"".concat(Y," < ").concat(U.exclusiveMaximum)),Ve(U.exclusiveMinimum)&&(yield"".concat(Y," > ").concat(U.exclusiveMinimum)),Ve(U.maximum)&&(yield"".concat(Y," <= ").concat(U.maximum)),Ve(U.minimum)&&(yield"".concat(Y," >= ").concat(U.minimum)),Ve(U.multipleOf)&&(yield"(".concat(Y," % ").concat(U.multipleOf,") === 0"))}function*p(U,ve,Y){let we=U.allOf.map(De=>ce(De,ve,Y)).join(" && ");if(U.unevaluatedProperties===!1){let De=Ce("".concat(new RegExp(_u(U)),";")),xe="Object.getOwnPropertyNames(".concat(Y,").every(key => ").concat(De,".test(key))");yield"(".concat(we," && ").concat(xe,")")}else if(It(U.unevaluatedProperties)){let De=Ce("".concat(new RegExp(_u(U)),";")),xe="Object.getOwnPropertyNames(".concat(Y,").every(key => ").concat(De,".test(key) || ").concat(ce(U.unevaluatedProperties,ve,"".concat(Y,"[key]")),")");yield"(".concat(we," && ").concat(xe,")")}else yield"(".concat(we,")")}function*m(U,ve,Y){yield"(typeof value === 'object' && Symbol.iterator in ".concat(Y,")")}function*g(U,ve,Y){typeof U.const=="number"||typeof U.const=="boolean"?yield"(".concat(Y," === ").concat(U.const,")"):yield"(".concat(Y," === '").concat(RI.Escape(U.const),"')")}function*y(U,ve,Y){yield"false"}function*E(U,ve,Y){let we=ce(U.not,ve,Y);yield"(!".concat(we,")")}function*b(U,ve,Y){yield"(".concat(Y," === null)")}function*v(U,ve,Y){yield ed.IsNumberLike(Y),Ve(U.exclusiveMaximum)&&(yield"".concat(Y," < ").concat(U.exclusiveMaximum)),Ve(U.exclusiveMinimum)&&(yield"".concat(Y," > ").concat(U.exclusiveMinimum)),Ve(U.maximum)&&(yield"".concat(Y," <= ").concat(U.maximum)),Ve(U.minimum)&&(yield"".concat(Y," >= ").concat(U.minimum)),Ve(U.multipleOf)&&(yield"(".concat(Y," % ").concat(U.multipleOf,") === 0"))}function*D(U,ve,Y){yield ed.IsObjectLike(Y),Ve(U.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(Y,").length >= ").concat(U.minProperties)),Ve(U.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(Y,").length <= ").concat(U.maxProperties));let we=Object.getOwnPropertyNames(U.properties);for(let De of we){let xe=Nb.Encode(Y,De),Ne=U.properties[De];if(U.required&&U.required.includes(De))yield*Ee(W(Ne,ve,xe)),(Fu(Ne)||r(Ne))&&(yield"('".concat(De,"' in ").concat(Y,")"));else{let Rt=ce(Ne,ve,xe);yield ed.IsExactOptionalProperty(Y,De,Rt)}}if(U.additionalProperties===!1)if(U.required&&U.required.length===we.length)yield"Object.getOwnPropertyNames(".concat(Y,").length === ").concat(we.length);else{let De="[".concat(we.map(xe=>"'".concat(xe,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(Y,").every(key => ").concat(De,".includes(key))")}if(typeof U.additionalProperties=="object"){let De=ce(U.additionalProperties,ve,"".concat(Y,"[key]")),xe="[".concat(we.map(Ne=>"'".concat(Ne,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(Y,").every(key => ").concat(xe,".includes(key) || ").concat(De,"))")}}function*M(U,ve,Y){yield"(typeof value === 'object' && typeof ".concat(Y,".then === 'function')")}function*T(U,ve,Y){yield ed.IsRecordLike(Y),Ve(U.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(Y,").length >= ").concat(U.minProperties)),Ve(U.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(Y,").length <= ").concat(U.maxProperties));let[we,De]=Object.entries(U.patternProperties)[0],xe=Ce("".concat(new RegExp(we))),Ne=ce(De,ve,"value"),Rt=It(U.additionalProperties)?ce(U.additionalProperties,ve,Y):U.additionalProperties===!1?"false":"true",Ht="(".concat(xe,".test(key) ? ").concat(Ne," : ").concat(Rt,")");yield"(Object.entries(".concat(Y,").every(([key, value]) => ").concat(Ht,"))")}function*B(U,ve,Y){let we=Mt(U,ve);if(ee.functions.has(U.$ref))return yield"".concat(ye(U.$ref),"(").concat(Y,")");yield*Ee(W(we,ve,Y))}function*G(U,ve,Y){let we=Ce("".concat(new RegExp(U.source,U.flags),";"));yield"(typeof ".concat(Y," === 'string')"),Ve(U.maxLength)&&(yield"".concat(Y,".length <= ").concat(U.maxLength)),Ve(U.minLength)&&(yield"".concat(Y,".length >= ").concat(U.minLength)),yield"".concat(we,".test(").concat(Y,")")}function*_(U,ve,Y){if(yield"(typeof ".concat(Y," === 'string')"),Ve(U.maxLength)&&(yield"".concat(Y,".length <= ").concat(U.maxLength)),Ve(U.minLength)&&(yield"".concat(Y,".length >= ").concat(U.minLength)),U.pattern!==void 0){let we=Ce("".concat(new RegExp(U.pattern),";"));yield"".concat(we,".test(").concat(Y,")")}U.format!==void 0&&(yield"format('".concat(U.format,"', ").concat(Y,")"))}function*F(U,ve,Y){yield"(typeof ".concat(Y," === 'symbol')")}function*A(U,ve,Y){yield"(typeof ".concat(Y," === 'string')");let we=Ce("".concat(new RegExp(U.pattern),";"));yield"".concat(we,".test(").concat(Y,")")}function*j(U,ve,Y){yield"".concat(ye(U.$ref),"(").concat(Y,")")}function*N(U,ve,Y){if(yield"Array.isArray(".concat(Y,")"),U.items===void 0)return yield"".concat(Y,".length === 0");yield"(".concat(Y,".length === ").concat(U.maxItems,")");for(let we=0;we<U.items.length;we++){let De=ce(U.items[we],ve,"".concat(Y,"[").concat(we,"]"));yield"".concat(De)}}function*Z(U,ve,Y){yield"".concat(Y," === undefined")}function*ie(U,ve,Y){let we=U.anyOf.map(De=>ce(De,ve,Y));yield"(".concat(we.join(" || "),")")}function*de(U,ve,Y){yield"".concat(Y," instanceof Uint8Array"),Ve(U.maxByteLength)&&(yield"(".concat(Y,".length <= ").concat(U.maxByteLength,")")),Ve(U.minByteLength)&&(yield"(".concat(Y,".length >= ").concat(U.minByteLength,")"))}function*J(U,ve,Y){yield"true"}function*z(U,ve,Y){yield ed.IsVoidLike(Y)}function*X(U,ve,Y){let we=ee.instances.size;ee.instances.set(we,U),yield"kind('".concat(U[ue],"', ").concat(we,", ").concat(Y,")")}function*W(U,ve,Y,we=!0){let De=Et(U.$id)?[...ve,U]:ve,xe=U;if(we&&Et(U.$id)){let Ne=ye(U.$id);if(ee.functions.has(Ne))return yield"".concat(Ne,"(").concat(Y,")");{let Rt=Pe(Ne,U,ve,"value",!1);return ee.functions.set(Ne,Rt),yield"".concat(Ne,"(").concat(Y,")")}}switch(xe[ue]){case"Any":return yield*Ee(t(xe,De,Y));case"Array":return yield*Ee(n(xe,De,Y));case"AsyncIterator":return yield*Ee(o(xe,De,Y));case"BigInt":return yield*Ee(i(xe,De,Y));case"Boolean":return yield*Ee(a(xe,De,Y));case"Constructor":return yield*Ee(u(xe,De,Y));case"Date":return yield*Ee(l(xe,De,Y));case"Function":return yield*Ee(c(xe,De,Y));case"Integer":return yield*Ee(d(xe,De,Y));case"Intersect":return yield*Ee(p(xe,De,Y));case"Iterator":return yield*Ee(m(xe,De,Y));case"Literal":return yield*Ee(g(xe,De,Y));case"Never":return yield*Ee(y(xe,De,Y));case"Not":return yield*Ee(E(xe,De,Y));case"Null":return yield*Ee(b(xe,De,Y));case"Number":return yield*Ee(v(xe,De,Y));case"Object":return yield*Ee(D(xe,De,Y));case"Promise":return yield*Ee(M(xe,De,Y));case"Record":return yield*Ee(T(xe,De,Y));case"Ref":return yield*Ee(B(xe,De,Y));case"RegExp":return yield*Ee(G(xe,De,Y));case"String":return yield*Ee(_(xe,De,Y));case"Symbol":return yield*Ee(F(xe,De,Y));case"TemplateLiteral":return yield*Ee(A(xe,De,Y));case"This":return yield*Ee(j(xe,De,Y));case"Tuple":return yield*Ee(N(xe,De,Y));case"Undefined":return yield*Ee(Z(xe,De,Y));case"Union":return yield*Ee(ie(xe,De,Y));case"Uint8Array":return yield*Ee(de(xe,De,Y));case"Unknown":return yield*Ee(J(xe,De,Y));case"Void":return yield*Ee(z(xe,De,Y));default:if(!fn.Has(xe[ue]))throw new NI(U);return yield*Ee(X(xe,De,Y))}}let ee={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function ce(U,ve,Y,we=!0){return"(".concat([...W(U,ve,Y,we)].join(" && "),")")}function ye(U){return"check_".concat(LI.Encode(U))}function Ce(U){let ve="local_".concat(ee.variables.size);return ee.variables.set(ve,"const ".concat(ve," = ").concat(U)),ve}function Pe(U,ve,Y,we,De=!0){let[xe,Ne]=["\n",Wt=>"".padStart(Wt," ")],Rt=Le("value","any"),Ht=be("boolean"),Zt=[...W(ve,Y,we,De)].map(Wt=>"".concat(Ne(4)).concat(Wt)).join(" &&".concat(xe));return"function ".concat(U,"(").concat(Rt,")").concat(Ht," {").concat(xe).concat(Ne(2),"return (").concat(xe).concat(Zt).concat(xe).concat(Ne(2),")\n}")}function Le(U,ve){let Y=ee.language==="typescript"?": ".concat(ve):"";return"".concat(U).concat(Y)}function be(U){return ee.language==="typescript"?": ".concat(U):""}function He(U,ve,Y){let we=Pe("check",U,ve,"value"),De=Le("value","any"),xe=be("boolean"),Ne=[...ee.functions.values()],Rt=[...ee.variables.values()],Ht=Et(U.$id)?"return function check(".concat(De,")").concat(xe," {\n return ").concat(ye(U.$id),"(value)\n}"):"return ".concat(we);return[...Rt,...Ne,Ht].join("\n")}function tt(...U){let ve={language:"javascript"},[Y,we,De]=U.length===2&&et(U[1])?[U[0],U[1],ve]:U.length===2&&!et(U[1])?[U[0],[],U[1]]:U.length===3?[U[0],U[1],U[2]]:U.length===1?[U[0],[],ve]:[null,[],ve];if(ee.language=De.language,ee.variables.clear(),ee.functions.clear(),ee.instances.clear(),!It(Y))throw new jb(Y);for(let xe of we)if(!It(xe))throw new jb(xe);return He(Y,we,De)}e.Code=tt;function lt(U,ve=[]){let Y=tt(U,ve,{language:"javascript"}),we=globalThis.Function("kind","format","hash",Y),De=new Map(ee.instances);function xe(Zt,Wt,Rr){if(!fn.Has(Zt)||!De.has(Wt))return!1;let qr=fn.Get(Zt),go=De.get(Wt);return qr(go,Rr)}function Ne(Zt,Wt){return So.Has(Zt)?So.Get(Zt)(Wt):!1}function Rt(Zt){return Vl(Zt)}let Ht=we(xe,Ne,Rt);return new kI(U,ve,Ht,Y)}e.Compile=lt})(Ub||(Ub={}));f();f();f();var aW=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,sW=[0,31,28,31,30,31,30,31,31,30,31,30,31],uW=e=>e%4===0&&(e%100!==0||e%400===0),Gb=e=>{let r=aW.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&&uW(t)?29:sW[n])};f();var lW=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,zb=e=>{let r=lW.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 cW=/t|\s/i,tA=e=>{let r=e.split(cW);return r.length===2&&Gb(r[0])&&zb(r[1])};f();var dW=/\/|:/,pW=/^(?:[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,rA=e=>dW.test(e)&&pW.test(e);var fW=[["date",Gb],["time",zb],["date-time",tA],["uri",rA]],nA=()=>{for(let[e,r]of fW)try{ab.Format(e,r)}catch(t){if(t instanceof t0)continue;throw t}};f();var jI=I.Record(I.String(),I.Unknown(),{$id:"Extra"}),_a=I.Object({extra:I.Optional(I.Ref(jI))}),UI=[jI];f();f();f();f();f();f();var Pt=e=>Object.entries(e);var mW=e=>{var t;let r=new Map;for(let[n,o]of Pt((t=e.geometry)!=null?t:{}))r.set(n,new Map(o==null?void 0:o.features.map(i=>[i.properties.id,i])));return r},mn=e=>{let r=mW(e);return(n,o)=>{let i=r.get(n);if(i==null)return Re({kind:ei.UnknownFloorError,properties:{floorId:n}});let a=i.get(o);return a==null?Re({kind:ei.UnknownGeometryError,properties:{floorId:n,geometryId:o}}):Be(a)}};f();var oa=I.Object({geometryId:I.Ref(no)},{$id:"WithGeometryId"}),mf=I.Object({geometryIds:I.Array(I.Ref(no))},{$id:"WithGeometryIds"}),GI=[oa,mf];f();f();f();var oA=e=>e instanceof Error?e:new Error(String(e));var hf=e=>(...r)=>{try{return Be(e(...r))}catch(t){return Re(oA(t))}};var iA=hf((e,r)=>{let t={};for(let n of r)for(let o of n.intoBundle(e))t[o.path]=sf(JSON.stringify(o.contents));return t}),zI=async(e,r,t)=>iA(e,r).andThenAsync(n=>new Promise(o=>{B7(n,oe(k({},t),{consume:!0}),(i,a)=>{o(i?Re(i):Be(a))})})),hW=hf(k7),$I=(e,r,t)=>iA(e,r).andThen(n=>hW(n,t));f();f();function $b(e,r,t=[]){let n=k({},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=gW(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(m=>[aA(m,u),m])),p=l.map(m=>{let g=c.get(aA(m,u));return g?$b(m,g,t):m});n[a]=p}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]=$b(u,i,t):n[o]=i}}else n[o]=i;return n}function gW(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 aA(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}var yW=e=>e,bW=e=>JSON.parse(OI(e)),sA=(e,r)=>r.some(t=>t.fromBundle(e.name,new Uint8Array,yW)!==void 0),uA=hf((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,bW);if(a){t=$b(t,a,[]);break}}}return t}),VI=async(e,r)=>new Promise(t=>L7(e,{filter:n=>sA(n,r)},(n,o)=>{t(n?Re(n):Be(o))})).then(t=>t.andThen(n=>uA(n,r))),vW=hf(R7),HI=(e,r)=>vW(e,{filter:t=>sA(t,r)}).andThen(t=>uA(t,r));f();var xW=e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string",EW=e=>{if(e.length<2)return!1;let r=e.filter(xW);if(r.length!==e.length)return!1;let t=r[0].$ref;return r.slice(1).every(n=>n.$ref===t)},Vb=e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&EW(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,Vb(t)])):Array.isArray(e)?e.map(Vb):e;f();var Hb=e=>typeof e=="object"&&e!=null&&"$ref"in e?oe(k({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,Hb(t)])):Array.isArray(e)?e.map(Hb):e;var gf;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(gf||(gf={}));var IW=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}}),SW=(...e)=>{let r=new Map;for(let t of IW(e)){if(!t.$id)continue;let n=r.get(t.$id);if(n!=null&&n!==t)return Re({kind:gf.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 Be(r)},wn,yf,Si,$n,ZI=class ZI{constructor(r,t,n,o){w(this,wn);w(this,yf);w(this,Si,[]);w(this,$n);O(this,wn,r),O(this,yf,t),O(this,Si,n),O(this,$n,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=I.Composite(r.extensions.map(a=>a.schema),{$id:t});if(!$.IsSchema(o))return Re({kind:gf.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:o});let i=SW(uI.values(),lI.values(),aI.values(),UI.values(),WI.values(),GI.values(),r.extensions.flatMap(a=>{var u;return(u=a.references)!=null?u:[]}).values());if(!i.isOk())return i;try{nA();let a=n?null:Ub.Compile(o,[...i.value.values()]);return Be(new ZI(o,a,r.extensions,i.value))}catch(a){return a instanceof qe?Re({kind:gf.TypeboxError,message:a.message,original:a}):Re({kind:gf.UnknownError,message:"An unknown error occurred while compiling the schema",original:a})}}is(r){var t,n;return(n=(t=s(this,yf))==null?void 0:t.Check(r))!=null?n:ta.Check(s(this,wn),[...s(this,$n).values()],r)}parse(r){var t,n;return this.is(r)?Be(r):Re((n=(t=s(this,yf))==null?void 0:t.Errors(r))!=null?n:ta.Errors(s(this,wn),[...s(this,$n).values()],r))}decode(r){try{return Be(Q7(s(this,wn),[...s(this,$n).values()],r))}catch(t){return Re(t)}}encode(r){try{return Be(eA(s(this,wn),[...s(this,$n).values()],r))}catch(t){return Re(t)}}verify(r){for(let t of s(this,Si))if(t.integrityCheck){let n=t.integrityCheck(r);if(n.isErr())return Re(n.error)}return Be(!0)}jsonSchema(){var n;let r=JSON.parse(JSON.stringify([s(this,wn),...s(this,$n).values()])),t=Vb(Hb({$id:"#/definitions/".concat((n=s(this,wn).$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=>zI(t,s(this,Si))).then(t=>t.mapErr(n=>{var o;return c0((o=s(this,wn).$id)!=null?o:"CoreMVF",n,[...s(this,$n).values()])}))}async compressUnsafe(r){return this.encode(r).andThenAsync(t=>zI(t,s(this,Si))).then(t=>t.mapErr(n=>{var o;return c0((o=s(this,wn).$id)!=null?o:"CoreMVF",n,[...s(this,$n).values()])}))}compressSync(r){return this.encode(r).andThen(t=>this.parse(t)).andThen(t=>$I(t,s(this,Si))).mapErr(t=>{var n;return c0((n=s(this,wn).$id)!=null?n:"CoreMVF",t,[...s(this,$n).values()])})}compressUnsafeSync(r){return this.encode(r).andThen(t=>$I(t,s(this,Si))).mapErr(t=>{var n;return c0((n=s(this,wn).$id)!=null?n:"CoreMVF",t,[...s(this,$n).values()])})}async decompress(r){return VI(r,s(this,Si)).then(t=>t.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var o;return d0((o=s(this,wn).$id)!=null?o:"CoreMVF",n,[...s(this,$n).values()])}))}async decompressUnsafe(r){return VI(r,s(this,Si)).then(t=>t.andThen(n=>this.decode(n)).mapErr(n=>{var o;return d0((o=s(this,wn).$id)!=null?o:"CoreMVF",n,[...s(this,$n).values()])}))}decompressSync(r){return HI(r,s(this,Si)).andThen(t=>this.parse(t)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return d0((n=s(this,wn).$id)!=null?n:"CoreMVF",t,[...s(this,$n).values()])})}decompressUnsafeSync(r){return HI(r,s(this,Si)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return d0((n=s(this,wn).$id)!=null?n:"CoreMVF",t,[...s(this,$n).values()])})}};wn=new WeakMap,yf=new WeakMap,Si=new WeakMap,$n=new WeakMap;var Zb=ZI;var bf,Wb=class{constructor(){w(this,bf,[]);this.extend=this.extend.bind(this)}extend(r){return s(this,bf).push(r),this}extendOptional(r){let t=oe(k({},r),{schema:I.Partial(r.schema)});return s(this,bf).push(t),this}build(r){return Zb.create(this,void 0,r==null?void 0:r.cspSafe)}get extensions(){return s(this,bf)}};bf=new WeakMap;f();f();f();f();var vf=I.Object({geometryId:I.Ref(no),floorId:I.Ref(vt)},{$id:"GeometryAnchor"}),CW=I.Object({geometryAnchor:I.Ref(vf)}),p0=(e,r)=>I.Object({geometryAnchors:I.Array(I.Ref(vf),e)},r),WI=[vf];f();f();f();var lA=(e,r)=>I.Unsafe(I.Transform(I.String(r)).Decode(t=>e.includes(t)?t:"unknown").Encode(t=>t)),Vn=(e,r)=>{let t=lA(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 cA=()=>new Wb().extend($7).extend(X7).extend(K7);f();var DW=e=>{if(e==="space"||e==="obstruction"||e==="entrance")return{}},TW=/\.json|\.geojson$/,Xb=(e,r,t)=>{let n=e[r];if(typeof n!="object"||Object.keys(n).length===0)return DW(r);let o={};for(let[i,a]of Object.entries(n)){let u=i.replace(TW,"");o[u]=JSON.parse(t(a))}return o},MW=["floorstack.json","styles.json","shapes.json","mapstack.json","floor.geojson","tileset.json","location.json","category.json","navigationFlags.json","annotation-symbols.json"],wW=MW,AW=["annotation","textAreas","enterprise","floorImages","shapeInstances","modelInstances","window","area","facade"],PW=AW,Yb=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:Xb(e,"space",t),obstruction:Xb(e,"obstruction",t),entrance:Xb(e,"entrance",t)};for(let o of wW)e[o]&&(n[o]=JSON.parse(t(e[o])));for(let o of PW)e[o]&&(n[o]=Xb(e,o,t));return n};f();f();f();f();f();var f0;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(f0||(f0={}));var dA=e=>{var o;if(e.annotations==null)return Be(!0);let r=Gr(e.annotations,i=>i.id,"annotations");if(r.isErr())return r;let t=mn(e),n=new Set(Ct((o=e.annotationSymbols)!=null?o:{}));for(let i of Ct(e.annotations)){let a=e.annotations[i];if(a!=null)for(let u of a){if(!n.has(u.symbolKey))return Re({kind:f0.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 Re({kind:f0.AnnotationNonPointGeometryError,properties:{annotationId:u.id,floorId:i,geometryId:u.geometryId}})}}return Be(!0)};var pA=Ur("a","AnnotationId"),XI=I.Intersect([oa,I.Object({id:I.Ref(pA,{description:"The unique identifier for the annotation."}),externalId:I.Optional(I.String({description:"The external identifier for the annotation."})),symbolKey:I.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),fA=I.Object({url:I.String({format:"uri",description:"The URL for the symbol."}),name:I.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),_W=I.Object({annotations:zr(I.Record(vt,I.Array(I.Ref(XI)),{additionalProperties:!1})),annotationSymbols:zr(I.Record(I.Index(XI,["symbolKey"]),I.Ref(fA)))},{$id:"AnnotationsSchema"}),OW=/^annotations\/(.*)\.json$/,mA={name:"ext:mvf-annotations",schema:_W,intoBundle:function*(e){if(e.annotations!=null)for(let r of Ct(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(OW))==null?void 0:o[1];if(n)return{annotations:{[n]:t(r)}}},references:[pA,XI,fA],integrityCheck:dA};f();f();f();var ju=Ur("lcat","LocationCategoryId"),YI=I.Intersect([I.Object({id:I.Ref(ju),parent:I.Optional(I.Ref(ju))}),Xc(["name"]),_a],{$id:"LocationCategory"}),hA=[ju,YI];f();f();var td;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(td||(td={}));var gA=e=>{var o,i,a,u,l,c,d,p,m;if(e.locationCategories==null&&e.locations==null)return Be(!0);if(e.locationCategories!=null){let g=Gr(e.locationCategories,y=>y.id,"locationCategories");if(g.isErr())return g}if(e.locations!=null){let g=Gr(e.locations,y=>y.id,"locations");if(g.isErr())return g}if(e.locationInstances!=null){let g=Gr(e.locationInstances,y=>y.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 Re({kind:td.UnknownParentCategoryError,properties:{categoryId:g.id,parentCategoryId:g.parent}});let t=mn(e);for(let g of(u=e.locations)!=null?u:[]){for(let y of g.categories)if(!r.has(y))return Re({kind:td.UnknownCategoryError,properties:{locationId:g.id,categoryId:y}});for(let y of g.geometryAnchors){let E=t(y.floorId,y.geometryId);if(E.isErr())return E}}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 Re({kind:td.UnknownParentLocationError,properties:{locationInstanceId:g.id,parentLocationId:g.parentId}});for(let y of(p=g.categories)!=null?p:[])if(!r.has(y))return Re({kind:td.UnknownCategoryError,properties:{locationId:g.id,categoryId:y}});for(let y of(m=g.geometryAnchors)!=null?m:[]){let E=t(y.floorId,y.geometryId);if(E.isErr())return E}}return Be(!0)};f();var Uu=Ur("loc","LocationId"),qb=Ur("loci","LocationInstanceId"),yA=I.Object({name:I.String(),url:I.String({format:"uri"})},{$id:"LocationSocial"}),bA=I.Object({url:I.String({format:"uri"})},{$id:"LocationImage"}),qI=I.Object({label:I.String(),url:I.String({format:"uri"})},{$id:"LocationLink"}),JI=I.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),vA=I.Union([I.Literal("Sunday"),I.Literal("Monday"),I.Literal("Tuesday"),I.Literal("Wednesday"),I.Literal("Thursday"),I.Literal("Friday"),I.Literal("Saturday")],{$id:"OpeningHoursDay"}),FW="PublicHolidays",KI=I.Union([vA,I.Literal(FW)],{$id:"OpeningHoursDayOrPublicHoliday"}),Jb=I.Object({"@type":I.Optional(I.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:I.Optional(I.Ref(JI,{description:"The time the opening hours start"})),closes:I.Optional(I.Ref(JI,{description:"The time the opening hours end"})),dayOfWeek:I.Optional(I.Union([I.Ref(KI),I.Array(I.Ref(KI))],{description:"The days of the week the opening hours apply to"})),validFrom:I.Optional(I.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:I.Optional(I.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),Kb=I.Intersect([I.Object({id:I.Ref(Uu),categories:I.Array(I.Ref(ju)),logo:I.Optional(I.String({format:"uri"})),phone:I.Optional(I.String()),social:I.Array(I.Ref(yA)),images:I.Array(I.Ref(bA)),links:I.Array(I.Ref(qI)),website:I.Optional(I.Ref(qI)),openingHours:I.Optional(I.Array(I.Ref(Jb))),searchTags:I.Optional(I.Array(I.String({minLength:1})))}),Xc(["name"]),p0(),_a],{$id:"Location"}),QI=I.Intersect([I.Object({id:I.Ref(qb),parentId:I.Ref(Uu)}),I.Partial(I.Omit(Kb,["id","parentId","details"])),Co],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),Qb=[Uu,qb,yA,bA,qI,JI,vA,KI,Jb,Kb,QI];var BW=I.Object({locations:I.Array(I.Ref(Kb)),locationCategories:I.Array(I.Ref(YI)),locationInstances:I.Optional(I.Array(I.Ref(QI)))},{$id:"LocationsExtensionSchema"}),xA="locations.json",EA="location-categories.json",IA="location-instances.json",SA={name:"ext:locations",schema:BW,intoBundle:function*(e){e.locations!=null&&(yield{path:xA,contents:e.locations}),e.locationCategories!=null&&(yield{path:EA,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:IA,contents:e.locationInstances})},fromBundle:(e,r,t)=>{if(e===xA)return{locations:t(r)};if(e===EA)return{locationCategories:t(r)};if(e===IA)return{locationInstances:t(r)}},references:[...hA,...Qb],integrityCheck:gA};f();f();var Oa;(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"})(Oa||(Oa={}));var CA=e=>{var m,g,y,E,b,v,D,M,T,B,G,_,F,A,j,N,Z,ie,de,J;if(e.cms==null)return Be(!0);let r=e.cms,t=Gr(e.cms.categories,z=>z.id,"cms.categories");if(t.isErr())return t;let n=new Set((g=(m=e.locationCategories)==null?void 0:m.map(z=>z.id))!=null?g:[]);for(let z of(y=r.categories)!=null?y:[])if(!n.has(z.categoryId))return Re({kind:Oa.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:z.id,locationCategoryId:z.categoryId}});let o=Gr(e.cms.locations,z=>z.id,"cms.locations");if(o.isErr())return o;let i=new Map((b=(E=e.locations)==null?void 0:E.map(z=>[z.id,z]))!=null?b:[]);for(let z of(v=r.locations)!=null?v:[]){if(!i.has(z.locationId))return Re({kind:Oa.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:z.id,locationId:z.locationId}});for(let X of(D=z.siblingGroups)!=null?D:[])for(let W of(M=X.siblings)!=null?M:[])if(!i.has(W))return Re({kind:Oa.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:z.id,siblingLocationId:W,label:X.label}});if(z.primaryCategory!=null){let X=i.get(z.locationId);if(X!=null&&!X.categories.includes(z.primaryCategory))return Re({kind:Oa.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:z.id,locationId:z.locationId,primaryCategory:z.primaryCategory}})}}if(((T=r.venue)==null?void 0:T.topLocations)!=null){for(let z of r.venue.topLocations)if(!i.has(z))return Re({kind:Oa.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:z}})}let a=new Set((G=(B=e.cms.locations)==null?void 0:B.map(z=>z.id))!=null?G:[]),u=Gr(e.cms.locationInstances,z=>z.id,"cms.locationInstances");if(u.isErr())return u;let l=new Set((F=(_=e.locationInstances)==null?void 0:_.map(z=>z.id))!=null?F:[]);for(let z of(A=r.locationInstances)!=null?A:[]){if(!a.has(z.parentId))return Re({kind:Oa.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:z.id,enterpriseLocationId:z.parentId}});if(!l.has(z.locationInstanceId))return Re({kind:Oa.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:z.id,locationInstanceId:z.locationInstanceId}});for(let X of(j=z.siblingGroups)!=null?j:[])for(let W of(N=X.siblings)!=null?N:[])if(!i.has(W))return Re({kind:Oa.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:z.id,siblingLocationId:W,label:X.label}})}let c=Pa(e),d=mn(e),p=Gr(e.cms.floorText,z=>z.properties.id,"cms.floorText");if(p.isErr())return p;for(let[z,X]of Pt((Z=r.floorText)!=null?Z:{})){let W=c(z);if(W.isErr())return W;for(let ee of X.features){if(!("geometryId"in ee.properties))continue;let ce=d(z,ee.properties.geometryId);if(ce.isErr())return ce}}for(let[z,X]of Pt((ie=r.textures)!=null?ie:{})){let W=c(z);if(W.isErr())return W;for(let ee of X){let ce=d(z,ee.geometryId);if(ce.isErr())return ce}}for(let[z,X]of Pt((de=r.layers)!=null?de:{})){let W=c(z);if(W.isErr())return W;for(let ee of Ct(X!=null?X:{})){let ce=d(z,ee);if(ce.isErr())return ce}}for(let[z,X]of Pt((J=r.textAreas)!=null?J:{})){let W=c(z);if(W.isErr())return W;for(let ee of X.features)if("geometryId"in ee.properties){let ce=d(z,ee.properties.geometryId);if(ce.isErr())return ce}}return Be(!0)};f();f();var m0=Ur("el","EnterpriseLocationId"),e2=Ur("ec","EnterpriseCategoryId"),t2=Ur("eli","EnterpriseLocationInstanceId"),r2=Ur("ev","EnterpriseVenueId"),n2=Ur("eft","EnterpriseFloorTextId"),DA=[m0,e2,t2,r2,n2];var TA=I.Object({id:I.Ref(e2),categoryId:I.Ref(ju),color:I.Optional(I.String()),sortOrder:I.Number(),iconFromDefaultList:I.Optional(I.Union([I.String(),I.Null()])),picture:I.Optional(I.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),o2=I.Object({categories:I.Optional(I.Array(I.Ref(TA)))},{$id:"EnterpriseCategoriesSchema"}),MA=[TA,o2];f();var e4=Vn(["left","center","right"]),kW=e4.schema,YIe=e4.values,qIe=e4.record,JIe=e4.is,i2=I.Object({id:I.Ref(n2),text:I.String(),visible:I.Boolean({default:!0}),fontSize:I.Number({default:12,exclusiveMinimum:0}),fontFamily:I.String({default:"Droid Sans"}),color:I.String({default:"black"}),rotation:I.Number({minimum:0,maximum:360}),align:kW},{$id:"FloorTextCommonProperties"}),a2=I.Intersect([I.Ref(i2),oa],{$id:"AnchoredFloorTextProperties"}),s2=I.Intersect([I.Ref(i2),I.Object({verticalOffset:I.Number()})],{$id:"FloatingFloorTextProperties"}),wA=I.Union([I.Ref(a2),I.Ref(s2)],{$id:"FloorTextProperties"}),AA=Nn(ro,I.Ref(wA),{$id:"FloorTextFeature"}),LW=Nn(ro,I.Ref(a2),{$id:"AnchoredFloorTextFeature"}),RW=Nn(ro,I.Ref(s2),{$id:"FloatingFloorTextFeature"}),PA=Do(I.Ref(AA),{$id:"EnterpriseFloorTextFeatureCollection"}),_A=I.Record(vt,I.Ref(PA),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),u2=I.Object({floorText:I.Optional(I.Ref(_A))},{$id:"EnterpriseFloorTextSchema"}),OA=[i2,a2,s2,wA,AA,LW,RW,PA,_A,u2];f();var FA=zr(I.Record(no,I.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),BA=zr(I.Record(vt,I.Ref(FA),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),l2=I.Object({layers:I.Optional(I.Ref(BA))},{$id:"EnterpriseLayersSchema"}),kA=[FA,BA,l2];f();f();f();var{schema:LA,values:u2e,record:l2e,is:c2e}=Vn(["reference-point","checkpoint","checkpoint-passport","parent"],{$id:"EnterpriseSiblingGroupType"}),t4=Vn(["closed-temporarily","new","pop-up","coming-soon","relocated"]),NW=t4.schema,d2e=t4.values,p2e=t4.record,f2e=t4.is,c2=I.Object({type:NW,start:I.Optional(I.String({format:"date",description:"The start date of the state"})),end:I.Optional(I.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),d2=I.Object({label:I.String(),siblings:I.Array(I.Ref(Uu)),type:I.Optional(I.Ref(LA)),subtype:I.Optional(I.String())},{$id:"SiblingGroup"}),r4=I.Object({name:I.String(),code:I.String()},{$id:"Language"}),RA=[c2,d2,r4,LA];var n4=I.Object({id:I.Ref(m0),locationId:I.Ref(Uu),cmsId:I.String(),type:I.String(),sortOrder:I.Number(),tags:I.Optional(I.Array(I.String())),picture:I.Optional(I.String({format:"uri",description:"The picture of the location"})),states:I.Optional(I.Array(I.Ref(c2),{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:I.Optional(I.Array(I.Ref(d2))),gallery:I.Optional(I.Array(I.Object({caption:I.Optional(I.String()),image:I.String({format:"uri"}),embeddedUrl:I.Optional(I.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:I.Optional(I.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:I.Optional(I.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:I.Optional(I.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:I.Optional(I.Ref(ju)),headerImage:I.Optional(I.String({format:"uri",description:"The location's header image"}))},{$id:"EnterpriseLocation"}),p2=I.Object({locations:I.Optional(I.Array(I.Ref(n4)))},{$id:"EnterpriseLocationsSchema"}),NA=[n4,p2];var jA=I.Intersect([I.Object({id:I.Ref(t2),parentId:I.Ref(m0),locationInstanceId:I.Ref(qb)}),I.Partial(I.Omit(n4,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),f2=I.Object({locationInstances:I.Optional(I.Array(I.Ref(jA)))},{$id:"EnterpriseLocationInstancesSchema"}),UA=[jA,f2];f();var o4=Vn(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),GA=o4.schema,O2e=o4.values,F2e=o4.record,B2e=o4.is,m2=I.Object({maxWidth:I.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:I.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:I.Ref(GA),rotation:I.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),zA=I.Intersect([I.Ref(m2),oa],{$id:"EnterpriseAnchoredTextAreaProperties"}),$A=I.Intersect([I.Ref(m2),I.Object({verticalOffset:I.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),VA=I.Union([zA,$A],{$id:"EnterpriseTextAreaProperties"}),HA=Nn(I.Ref(ro),VA,{$id:"EnterpriseTextAreaFeature"}),ZA=Do(I.Ref(HA),{$id:"EnterpriseTextAreaCollection"}),WA=I.Record(vt,I.Ref(ZA),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),XA=I.Object({textAreas:I.Optional(I.Ref(WA))},{$id:"EnterpriseTextAreasSchema"}),YA=[GA,m2,zA,$A,VA,HA,ZA,WA];f();var h2=I.Object({u:I.Number(),v:I.Number()},{$id:"EnterpriseTextureUV"}),i4=Vn(["top","side"],{$id:"EnterpriseTextureFace"}),qA=i4.schema,j2e=i4.values,U2e=i4.record,G2e=i4.is,a4=Vn(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),JA=a4.schema,z2e=a4.values,$2e=a4.record,V2e=a4.is,KA=I.Tuple([Wp,Xp,Wp,Xp],{$id:"EnterpriseTextureBounds"}),QA=I.Intersect([I.Object({repeat:I.Ref(h2),offset:I.Ref(h2),rotation:I.Number({minimum:0,maximum:360}),path:I.String({format:"uri"}),face:I.Ref(qA),surface:I.Ref(JA),bounds:I.Ref(KA)},{$id:"EnterpriseTextureProperties"}),oa],{$id:"EnterpriseTexture"}),eP=I.Array(I.Ref(QA),{$id:"EnterpriseTextures"}),tP=I.Record(vt,I.Ref(eP),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),g2=I.Object({textures:I.Optional(I.Ref(tP))},{$id:"EnterpriseTexturesSchema"}),rP=[QA,eP,g2,h2,qA,JA,KA,tP];f();var{schema:nP,values:K2e,record:oP,is:Q2e}=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"}),iP=I.Intersect([I.Object({id:I.Ref(r2),slug:I.String(),defaultLanguage:I.Ref(r4),languages:I.Array(I.Ref(r4)),countrycode:I.Optional(I.String()),logo:I.Optional(I.String({format:"uri"})),mappedinWebUrl:I.Optional(I.String({format:"uri"})),topLocations:I.Optional(I.Array(I.Ref(Uu))),operationHours:I.Optional(I.Array(I.Ref(Jb))),coverImage:I.Optional(I.String({format:"uri"})),type:I.Optional(I.Ref(nP)),propertyImage:I.Optional(I.String({format:"uri"}))}),Xc(["name"]),_a],{$id:"EnterpriseVenue"}),y2=I.Object({venue:I.Optional(I.Ref(iP))},{$id:"EnterpriseVenueSchema"}),aP=[iP,y2,nP];var uP=I.Intersect([y2,p2,f2,o2,g2,u2,l2,XA],{$id:"CMSProperties"}),sP=I.Object({cms:I.Optional(I.Ref(uP))},{$id:"CMSExtensionSchema"}),jW=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,lP={name:"ext:cms",schema:sP,intoBundle:function*(e){var t,n,o,i,a,u;if(e.cms==null)return;let r=e.cms;for(let l of Ct(r))switch(l){case"floorText":for(let c of Ct((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 Ct((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 Ct((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(jW);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:[uP,sP,...aP,...NA,...UA,...MA,...rP,...kA,...OA,...YA,...DA,...RA,...Qb],integrityCheck:CA};f();f();f();f();var Fa;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Fa||(Fa={}));var cP=e=>{let{navigationFlags:r}=e;if(!r||Object.keys(r).length===0)return Be(!0);let t=Object.entries(r).map(([i,a])=>k({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 Re({kind:Fa.NavigationFlagDuplicateBit,properties:{index:i.index,bit:i.bit,path:"navigationFlags.".concat(i.key)}});if(i.index!=n){if(o!=31)return Re({kind:Fa.NavigationFlagMissingDeclaration,properties:{index:n,bit:o+1,path:"navigationFlags"}});if(i.index!=n+1||i.bit!=0)return Re({kind:Fa.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=i.index,o=0}else{if(i.bit!==o+1)return Re({kind:Fa.NavigationFlagMissingDeclaration,properties:{index:i.index,bit:o+1,path:"navigationFlags"}});o=i.bit}}return Be(!0)};f();function Zl(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}f();var dP=2**32-1,h0=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}},xf=(e,r,t)=>{if(r.index==-1&&e.length===0)return Be(!0);let n=r.flag>0||r.index===-1?r.index+1:r.index;if(e.length!==n)return Re({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>dP)return Re({kind:Fa.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:dP,path:t}});continue}else if(i>r.flag)return Re({kind:Fa.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:r.flag,path:t}})}return Be(!0)};var UW=I.Object({index:I.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:I.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),pP=I.Intersect([UW,Co],{$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.'}),b2={accessible:"accessible",outdoors:"outdoors",public:"public"},fP=I.Record(I.String(),pP,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),GW=I.Object({navigationFlags:I.Ref(fP)},{$id:"NavigationFlagsSchema"}),s4=I.Array(I.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),v2=I.Object({flags:I.Ref(s4)},{$id:"WithFlags"}),rd=I.Intersect([vf,v2],{$id:"FlaggedGeometryAnchor"}),zW=I.Object({geometryAnchor:rd},{$id:"WithFlaggedGeometryAnchor"}),$W=I.Object({geometryAnchors:I.Array(rd)},{$id:"WithFlaggedGeometryAnchors"}),mP={name:"ext:mvf-navigation-flags",schema:GW,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:[pP,fP,s4,rd,zW,$W],integrityCheck:cP};f();var hP=e=>{if(e.connections==null)return Be(!0);let r=Gr(e.connections,o=>o.id,"connections");if(r.isErr())return r;let t=mn(e),n=h0(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=xf(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=xf(u.flags,n,"connections[".concat(o,"].exits[").concat(a,"]"));if(c.isErr())return c}}return Be(!0)};var yP=Ur("c","ConnectionId"),{schema:VW,values:qSe,record:HW,is:JSe}=Vn(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),bP=VW;var x2=HW;var vP=I.Intersect([I.Object({id:I.Ref(yP,{description:"The unique identifier for the connection."}),entrances:I.Array(I.Ref(rd)),exits:I.Array(I.Ref(rd)),entryCost:I.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:I.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:I.Ref(bP,{description:"The type of connection."})}),Co,_a],{$id:"ConnectionsProperties"}),xP=I.Array(I.Ref(vP),{$id:"ConnectionsCollection"}),ZW=I.Object({connections:I.Ref(xP)},{$id:"ConnectionsExtensionSchema"}),gP="connections.json",EP={name:"ext:connections",schema:ZW,intoBundle:function*(e){e.connections!=null&&(yield{path:gP,contents:e.connections})},fromBundle:(e,r,t)=>{if(e===gP)return{connections:t(r)}},references:[vP,xP,bP,yP,rd,s4],integrityCheck:hP};f();f();var IP=e=>{if(e.defaultStyle==null)return Be(!0);let r=mn(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 Be(!0)};var SP=I.Intersect([p0(),_a,I.Object({altitude:I.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:I.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:I.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:I.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:I.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:I.Optional(I.Boolean({description:"Whether or not the objects with this style should be hidden."})),topColor:I.Optional(I.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Optional color for the top face of extruded geometry. If not specified, falls back to color."}))})],{$id:"DefaultStyle"}),CP=I.Record(I.String(),I.Ref(SP),{$id:"DefaultStyleCollection",additionalProperties:!1}),WW=I.Object({defaultStyle:I.Ref(CP)},{$id:"DefaultStyleSchema"}),DP={name:"ext:mvf-default-style",schema:WW,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:[SP,CP],integrityCheck:IP};f();f();f();f();var u4;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(u4||(u4={}));var TP=e=>{if(e.floorStacks==null)return Be(!0);let r=Gr(e.floorStacks,n=>n.id,"floorStacks");if(r.isErr())return r;let t=Pa(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 Re({kind:u4.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return Be(!0)};var g0=Ur("fs","FloorStackId"),wP=I.Intersect([I.Object({id:I.Ref(g0,{description:"The unique identifier for the floor stack."}),floors:I.Array(I.Ref(vt),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:I.Optional(I.Ref(vt,{description:"The default floor for the floor stack."}))}),Co],{$id:"FloorStacksProperties"}),AP=I.Array(I.Ref(wP),{$id:"FloorStackCollection"}),XW=I.Object({floorStacks:I.Ref(AP)},{$id:"FloorStackExtensionSchema"}),MP="floor-stacks.json",PP={name:"ext:floor-stacks",schema:XW,intoBundle:function*(e){e.floorStacks!=null&&(yield{path:MP,contents:e.floorStacks})},fromBundle:(e,r,t)=>{if(e===MP)return{floorStacks:t(r)}},references:[g0,wP,AP],integrityCheck:TP};f();f();var y0;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(y0||(y0={}));var _P=e=>{if(e.facade==null)return Be(!0);if(e.floorStacks==null)return Re({kind:y0.MissingFloorStackError,properties:null});let r=new Set(e.floorStacks.map(o=>o.id)),t=mn(e),n=Pa(e);for(let[o,i]of Pt(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 Re({kind:y0.UnknownFloorStackError,properties:{floorStackId:l}});for(let d of c){let p=t(o,d);if(p.isErr())return p}}}return Be(!0)};var OP=I.Intersect([I.Object({floorStackId:I.Ref(g0)}),mf],{$id:"Facade"}),YW=I.Object({facade:zr(I.Record(vt,I.Array(I.Ref(OP)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),qW=/^facade\/(.*)\.json$/,FP={name:"ext:facade",schema:YW,intoBundle:function*(e){if(e.facade!=null)for(let r of Ct(e.facade))yield{path:"facade/".concat(r,".json"),contents:e.facade[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(qW))==null?void 0:o[1];if(n)return{facade:{[n]:t(r)}}},references:[g0,OP],integrityCheck:_P};f();f();var BP=e=>{if(e.floorImages==null)return Be(!0);let r=mn(e);for(let[t,n]of Pt(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 Be(!0)};var E2=I.Object({path:I.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:I.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:I.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:I.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),kP=I.Intersect([I.Ref(E2),oa],{$id:"AnchoredFloorImageProperties"}),LP=I.Intersect([I.Ref(E2),I.Object({verticalOffset:I.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),RP=I.Union([kP,LP],{$id:"FloorImageProperties"}),NP=Nn(I.Ref(ro),RP,{$id:"FloorImageFeature"}),jP=Do(I.Ref(NP),{$id:"FloorImageCollection"}),JW=I.Object({floorImages:zr(I.Record(vt,I.Ref(jP),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),KW=/^floorImages\/(.*)\.geojson$/,UP={name:"ext:floor-images",schema:JW,intoBundle:function*(e){if(e.floorImages!=null)for(let r of Ct(e.floorImages))yield{path:"floorImages/".concat(r,".geojson"),contents:e.floorImages[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(KW))==null?void 0:o[1];if(n)return{floorImages:{[n]:t(r)}}},references:[E2,kP,LP,RP,NP,jP],integrityCheck:BP};f();f();var GP=e=>{if(e.kinds==null)return Be(!0);let r=mn(e);for(let[t,n]of Pt(e.kinds))if(n!=null)for(let o of Ct(n)){let i=r(t,o);if(i.isErr())return i}return Be(!0)};var{values:l6e,schema:QW,record:c6e,is:d6e}=Vn(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),zP=QW;var $P=zr(I.Record(no,I.Ref(zP),{additionalProperties:!1,$id:"GeometryKinds"})),eX=I.Object({kinds:zr(I.Record(vt,I.Ref($P),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),tX=/^kinds\/(.*)\.json$/,VP={name:"ext:kinds",schema:eX,intoBundle:function*(e){if(e.kinds!=null)for(let r of Ct(e.kinds))yield{path:"kinds/".concat(r,".json"),contents:e.kinds[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(tX))==null?void 0:o[1];if(n)return{kinds:{[n]:t(r)}}},references:[zP,$P],integrityCheck:GP};f();f();f();var b0;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(b0||(b0={}));var HP=e=>{if(e.nodes==null)return Be(!0);let r=Gr(e.nodes,o=>o.properties.id,"nodes");if(r.isErr())return r;let t=mn(e),n=h0(e);for(let[o,i]of Pt(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 Re({kind:b0.UnknownNeighbor,properties:{floorId:o,nodeId:l.properties.id,neighborId:d.id}});if(d.id===l.properties.id)return Re({kind:b0.SelfReference,properties:{floorId:o,nodeId:l.properties.id}});let p=xf(d.flags,n,'nodes["'.concat(o,'"].features[').concat(u,"].properties.neighbors[").concat(c,"]"));if(p.isErr())return p}}}return Be(!0)};var I2=Ur("n","NodeId"),ZP=I.Intersect([I.Object({id:I.Ref(I2,{description:"The unique identifier for the node."}),extraCost:I.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),v2],{$id:"NodeNeighbor"}),WP=I.Intersect([I.Object({id:I.Ref(I2,{description:"The unique identifier for the node."}),neighbors:I.Array(I.Ref(ZP),{description:"The neighbors of the node."})}),mf],{$id:"NodeProperties"}),XP=Nn(I.Ref(ro),WP,{$id:"NodeFeature"}),YP=Do(I.Ref(XP),{$id:"NodeCollection"}),rX=I.Object({nodes:zr(I.Record(vt,I.Ref(YP),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),nX=/^nodes\/(.*)\.(geo)?json$/,qP={name:"ext:nodes",schema:rX,intoBundle:function*(e){if(e.nodes!=null)for(let r of Ct(e.nodes))yield{path:"nodes/".concat(r,".geojson"),contents:e.nodes[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(nX))==null?void 0:o[1];if(n)return{nodes:{[n]:t(r)}}},references:[I2,ZP,WP,XP,YP],integrityCheck:HP};f();f();f();var l4;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(l4||(l4={}));var JP=e=>{if(e.outdoors==null)return Be(!0);let r=Pa(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 Re({kind:l4.FloorInFloorStackError,properties:{floorId:t,floorStackId:o.id}})}}return Be(!0)};var QP=I.Object({floors:I.Array(I.Ref(vt),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),oX=I.Object({outdoors:I.Ref(QP)},{$id:"OutdoorsExtensionSchema"}),KP="outdoors.json",e_={name:"ext:outdoors",schema:oX,intoBundle:function*(e){e.outdoors!=null&&(yield{path:KP,contents:e.outdoors})},fromBundle:(e,r,t)=>{if(e===KP)return{outdoors:t(r)}},references:[QP],integrityCheck:JP};f();f();f();var c4;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(c4||(c4={}));var t_=e=>{if(e.tileset==null)return Be(!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 Re({kind:c4.TilesetDuplicateKeyError,properties:{key:t.key}});r.add(t.key)}return Be(!0)};var S2=I.Object({key:I.String({minLength:1,description:"Unique identifier for the tileset style."}),name:I.String({minLength:1,description:"Display name of the tileset style."}),url:I.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),r_=I.Object({default:I.Ref(S2,{description:"The default tileset style, which should be used."}),others:I.Optional(I.Array(I.Ref(S2,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),iX=I.Object({tileset:I.Ref(r_)},{$id:"TilesetExtensionSchema"}),n_={name:"ext:mvf-tileset",schema:iX,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:[S2,r_],integrityCheck:t_};f();var o_=I.Object({},{$id:"WalkableProperties"}),i_=I.Object({},{$id:"NonWalkableProperties"}),a_=zr(I.Record(no,I.Ref(o_),{$id:"WalkableGeometries",additionalProperties:!1})),s_=zr(I.Record(no,I.Ref(i_),{$id:"NonWalkableGeometries",additionalProperties:!1})),aX=I.Object({walkable:zr(I.Record(vt,I.Ref(a_),{additionalProperties:!1})),nonwalkable:zr(I.Record(vt,I.Ref(s_),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),sX=/^walkable\/(.*)\.json$/,uX=/^nonwalkable\/(.*)\.json$/,u_={name:"ext:mvf-traversability",schema:aX,intoBundle:function*(e){if(e.walkable!=null)for(let r of Ct(e.walkable))yield{path:"walkable/".concat(r,".json"),contents:e.walkable[r]};if(e.nonwalkable!=null)for(let r of Ct(e.nonwalkable))yield{path:"nonwalkable/".concat(r,".json"),contents:e.nonwalkable[r]}},fromBundle:(e,r,t)=>{var i,a;let n=(i=e.match(sX))==null?void 0:i[1];if(n!=null)return{walkable:{[n]:t(r)}};let o=(a=e.match(uX))==null?void 0:a[1];if(o!=null)return{nonwalkable:{[o]:t(r)}}},references:[o_,i_,a_,s_]};f();f();function l_(e){return e.replace(/^g_/,"s_")}function d4(e){return e.replace(/^g_/,"o_")}function lX(e){return e.replace(/^g_/,"w_")}function c_(e){return e.replace(/^loci_/,"eli_")}function v0(e){return e.replace(/^loc_/,"el_")}function p4(e){return e.replace(/^lcat_/,"ec_")}function cX(e){return e.replace(/^g_/,"ar_")}function d_(e){return e.replace(/^n_/,"s_")}function dX(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(oe(k({},e),{geometry:{type:i,coordinates:a},properties:oe(k({},e.properties),{id:"".concat(r,"-").concat(o++),kind:t})}));return n}default:return[oe(k({},e),{properties:oe(k({},e.properties),{id:r,kind:t})})]}}function Ef(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=dX(i,t(u),l),d=c.map(m=>m.properties.id),p=d.map(m=>({geometryId:m,floorId:a}));o.set(u,{ids:d,features:c,anchors:p})}}return o}function p_(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=pX(e),n=Pt(e.geometry).flatMap(([p,m])=>{var g;return((g=m==null?void 0:m.features)!=null?g:[]).map(y=>({feature:y,floorId:p}))}).flat(),o=new Set(Object.values((c=e.walkable)!=null?c:{}).filter(p=>p!==void 0).flatMap(Ct)),i=new Set(Object.values((d=e.nonwalkable)!=null?d:{}).filter(p=>p!==void 0).flatMap(Ct)),a=new Set(Array.from(t.entries()).filter(([p,m])=>m==="area").map(([p])=>p)),u=new Set(Array.from(t.entries()).filter(([p,m])=>m==="object").map(([p])=>p)),l=new Set(Array.from(t.entries()).filter(([p,m])=>m==="window").map(([p])=>p));return o.size>0&&(r.space=Ef(n,o,l_,t)),i.size>0&&(r.obstruction=Ef(n,i,d4,t)),a.size>0&&(r.area=Ef(n,a,cX,t)),u.size>0&&(r.object=Ef(n,u,d4,t)),l.size>0&&(r.window=Ef(n,l,lX,t)),o.size===0&&i.size===0&&a.size===0&&(r.space=Ef(n,new Set(n.map(p=>p.feature.properties.id)),l_,t)),r}function pX(e){var t,n,o;let r=new Map(Object.values((t=e.kinds)!=null?t:{}).filter(i=>i!==void 0).flatMap(Pt));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 f_(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 m_(e){var l;let{nodesByGeometryId:r,incomingEdgesByNodeId:t,nodesById:n}=fX(e),o=p_(e),i=mX(e),a=(l=e.navigationFlags)!=null?l:{};return{geometryMaps:o,nodesByGeometryId:r,geometryFeatureById:i,navigationFlags:a,incomingEdgesByNodeId:t,nodesById:n}}function fX(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 mX(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}f();function h_(e,r){if(!e.annotations||!e.annotationSymbols||!e.geometry)return{};let t={};for(let[n,o]of Pt(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}}f();function g_(e,{nodesByGeometryId:r}){var a,u,l,c,d,p,m;let t={"connection.json":[],entrance:{}},n=(a=e.navigationFlags)==null?void 0:a[b2.accessible],o=(u=e.navigationFlags)==null?void 0:u[b2.outdoors],i=new Map(Object.values((l=e.geometry)!=null?l:{}).flatMap(g=>{var y;return(y=g==null?void 0:g.features)!=null?y:[]}).map(g=>[g.properties.id,g]));for(let g of(c=e.connections)!=null?c:[]){if(C2(g,i)&&!hX(g)){let D=gX(g,i,r,o);for(let[M,T]of D)t.entrance[M]||(t.entrance[M]={type:"FeatureCollection",features:[]}),t.entrance[M].features.push(T);continue}let y=n!=null&&g.entrances.some(D=>Zl(D,n))&&g.exits.some(D=>Zl(D,n)),E=Array.from(new Set([...g.entrances.map(D=>r.get(D.geometryId)),...g.exits.map(D=>r.get(D.geometryId))].flat().filter(D=>D!=null))),b=f_([...g.entrances.map(D=>D.flags),...g.exits.map(D=>D.flags)]),v={id:g.id,externalId:(p=(d=g.details)==null?void 0:d.externalId)!=null?p:"",type:g.type,accessible:y,nodes:E,flags:b};(m=g.details)!=null&&m.name&&(v.details={name:g.details.name}),g.extra&&(v.extra=g.extra),t["connection.json"].push(v)}return t}function C2(e,r){return e.type==x2.door&&e.entrances.every(t=>{let n=r.get(t.geometryId);return(n==null?void 0:n.geometry.type)==="LineString"})}function hX(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 gX(e,r,t,n){var i,a;if(e.type!==x2.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:yX(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 p=t.get(u.geometryId);p&&p.length>0&&(c.properties.node=p[0]),o.push([u.floorId,c])}}return o}function yX(e,r){return e.entrances.some(t=>Zl(t,r))||e.exits.some(t=>Zl(t,r))}f();function b_(e,{geometryMaps:r,nodesByGeometryId:t}){var M,T,B,G,_,F,A,j,N,Z,ie,de,J,z,X,W,ee,ce,ye,Ce,Pe,Le,be,He,tt,lt,U,ve,Y,we,De,xe,Ne,Rt,Ht,Zt,Wt,Rr,qr,go,yo,qn,yr,Cn,$o,fi,bo,br;let n={categories:[],locations:[],locationInstances:[],layers:[],venue:{slug:"",name:"",externalId:"",defaultLanguage:{name:"English",code:"en"},languages:[]}},o=(M=e.manifest)==null?void 0:M.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:(T=o.properties.language)!=null?T:"English",code:(B=o.properties.language)!=null?B:"en"});let i=(G=e.cms)==null?void 0:G.venue;i&&(n.venue=oe(k({},n.venue),{slug:i.slug,name:(A=(F=(_=i.details)==null?void 0:_.name)!=null?F:n.venue.name)!=null?A:o.properties.name,externalId:(N=(j=i.details)==null?void 0:j.externalId)!=null?N:"",defaultLanguage:i.defaultLanguage,languages:(Z=i.languages)!=null?Z:[],countrycode:i.countrycode,coverImage:i.coverImage,logo:i.logo,icon:(ie=i.details)==null?void 0:ie.icon,extra:i.extra,mappedinWebUrl:i.mappedinWebUrl,operationHours:i.operationHours,topLocations:i.topLocations,type:i.type&&i.type in oP?i.type:"unknown",propertyImage:i.propertyImage}));let a=new Map,u=(de=e.locations)!=null?de:[],l=(z=(J=e.cms)==null?void 0:J.locations)!=null?z:[],c=(W=(X=e.cms)==null?void 0:X.categories)!=null?W:[],d=new Map((c!=null?c:[]).map(H=>[H.categoryId,H]));if(u.length>0){let H=new Map(l.map(S=>[S.locationId,S]));for(let S of u){let C=(ee=H.get(S.id))!=null?ee:{};if(S){let P=S.details,L={id:(C==null?void 0:C.cmsId)!==void 0?"el_".concat(C==null?void 0:C.cmsId):v0(S.id),name:P.name,externalId:(ce=P.externalId)!=null?ce:"",type:(ye=C.type)!=null?ye:"location",sortOrder:(Ce=C.sortOrder)!=null?Ce:0,amenity:C.amenity,description:P.description,extra:S.extra,links:S.links,operationHours:S.openingHours,gallery:C.gallery,logo:S.logo,shortName:P.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&&(L.phone={number:S.phone}),C.primaryCategory){let K=d.get(C.primaryCategory);K&&(L.primaryCategory=K.id)}let R=y_(S.social);S.website&&(R.website=S.website.url),L.social=R;for(let K of S.geometryAnchors){let re=r.space.get(K.geometryId),fe=r.obstruction.get(K.geometryId),ae=re!=null?re:fe;if(ae){let ne=new Set(ae.features.filter(me=>me.geometry.type==="Polygon").map(me=>me.properties.id));for(let me of ae.anchors)re!=null&&ae===re&&L.spaces.push({floor:me.floorId,id:me.geometryId}),ne.has(me.geometryId)&&L.polygons.push({map:me.floorId,id:me.geometryId})}let Te=t.get(K.geometryId);for(let ne of Te!=null?Te:[])L.nodes.push({map:K.floorId,id:ne})}n.locations.push(L);for(let K of S.categories)a.set(K,[...(Pe=a.get(K))!=null?Pe:[],S.id])}}}let p=(be=(Le=e.cms)==null?void 0:Le.locationInstances)!=null?be:[],m=e.locationInstances;if(m){let H=new Map(p.map(C=>[C.locationInstanceId,C])),S=[];for(let C of m){let P=(He=H.get(C.id))!=null?He:{};if(C){let L={id:c_(C.id),parent:(tt=P.parentId)!=null?tt:v0(C.parentId),name:(lt=C.details)==null?void 0:lt.name,externalId:(U=C.details)==null?void 0:U.externalId,type:P.type,sortOrder:P.sortOrder,amenity:P.amenity,description:(ve=C.details)==null?void 0:ve.description,extra:C.extra,links:C.links,operationHours:C.openingHours,gallery:P.gallery,picture:P.picture,showFloatingLabelWhenImagePresent:P.showFloatingLabelWhenImagePresent,showLogo:P.showLogo,siblingGroups:P.siblingGroups,states:P.states,tags:P.tags,logo:C.logo,shortName:(Y=C.details)==null?void 0:Y.shortName,headerImage:P.headerImage};C.phone&&(L.phone={number:C.phone});let R=y_((we=C.social)!=null?we:[]);if(C.website&&(R.website=C.website.url),Object.keys(R).length>0&&(L.social=R),(De=C.geometryAnchors)!=null&&De.length){let K=C.geometryAnchors.flatMap(re=>{var fe,ae;return(ae=(fe=r.space.get(re.geometryId))==null?void 0:fe.anchors)!=null?ae:[]});K.length>0&&(L.spaces=K.map(re=>({floor:re.floorId,id:re.geometryId})))}if(C.geometryAnchors){L.spaces=[],L.polygons=[],L.nodes=[];for(let K of C.geometryAnchors){let re=r.space.get(K.geometryId);if(re){let ae=new Set(re.features.filter(Te=>Te.geometry.type==="Polygon").map(Te=>Te.properties.id));for(let Te of re.anchors)L.spaces.push({floor:Te.floorId,id:Te.geometryId}),ae.has(Te.geometryId)&&L.polygons.push({map:Te.floorId,id:Te.geometryId})}let fe=t.get(K.geometryId);for(let ae of fe!=null?fe:[])L.nodes.push({map:K.floorId,id:ae})}}S.push(L)}}S.length>0&&(n.locationInstances=S)}let g=e.locationCategories;if(g){let H=[],S=new Map(g.map(R=>[R.id,R])),C=new Map((c!=null?c:[]).map(R=>[R.categoryId,R])),P=new Map;for(let R of g){let K=S.get(R.parent);if(K){let re=(xe=P.get(K.id))!=null?xe:[];re.push(R.id),P.set(K.id,re)}}for(let R of g){let K=C.get(R.id);if(R){let re=((Ne=P.get(R.id))!=null?Ne:[]).map(p4),fe={id:p4(R.id),name:R.details.name,externalId:(Rt=R.details.externalId)!=null?Rt:"",sortOrder:(Ht=K==null?void 0:K.sortOrder)!=null?Ht:0,children:re,locations:((Zt=a.get(R.id))!=null?Zt:[]).map(v0),icon:R.details.icon,picture:K==null?void 0:K.picture,color:K==null?void 0:K.color,extra:R.extra,iconFromDefaultList:K==null?void 0:K.iconFromDefaultList};H.push(fe)}}n.categories=H;let L={};for(let R of u)L[v0(R.id)]=R.categories.map(p4).filter(K=>K!==void 0);n.categoryPriorities=L}let y={};for(let[H,S]of Object.entries((Wt=e.defaultStyle)!=null?Wt:{}))if(S.buffer){let C=S.geometryAnchors.flatMap(P=>{var L,R;return(R=(L=r.space.get(P.geometryId))==null?void 0:L.anchors)!=null?R:[]});y[H]={edgeOffset:S.buffer,geometryAnchors:C}}Object.keys(y).length>0&&(n.enterpriseStyles=y);let E=new Map;for(let H of Object.values((qr=(Rr=e.cms)==null?void 0:Rr.layers)!=null?qr:{}))if(H)for(let[S,C]of Pt(H)){if(typeof C!="string")continue;let P=(go=E.get(C))!=null?go:{name:C,id:"ely_".concat(C),spaces:[]};P.spaces.push(...(qn=(yo=r.space.get(S))==null?void 0:yo.anchors.map(L=>({floorId:L.floorId,spaceId:L.geometryId})))!=null?qn:[]),E.set(C,P)}E.size>0&&(n.layers=Array.from(E.values()));let b=[];for(let H of Object.values((Cn=(yr=e.cms)==null?void 0:yr.textures)!=null?Cn:{}))for(let S of H){let C=($o=r.space.get(S.geometryId))==null?void 0:$o.anchors;!C||C.length<1||S.face==="unknown"||S.surface==="unknown"||b.push({repeat:S.repeat,offset:S.offset,rotation:S.rotation,path:S.path,face:S.face,surface:S.surface,bounds:S.bounds,geometryAnchors:C})}b.length>0&&(n.textures=b);let v={};for(let[H,S]of Object.entries((bo=(fi=e.cms)==null?void 0:fi.floorText)!=null?bo:{})){let C={type:"FeatureCollection",features:[]};for(let P of S.features){if(P.properties.align==="unknown")continue;let L={align:P.properties.align,color:P.properties.color,fontFamily:P.properties.fontFamily,fontSize:P.properties.fontSize,rotation:P.properties.rotation,text:P.properties.text,visible:P.properties.visible};"geometryId"in P.properties?L.geometryId=P.properties.geometryId:L.verticalOffset=P.properties.verticalOffset,C.features.push({type:"Feature",geometry:P.geometry,properties:L})}C.features.length>0&&(v[H]=C)}Object.keys(v).length>0&&(n.floorText=v);let D={enterprise:n};if((br=e.cms)!=null&&br.textAreas){let H={};for(let[S,C]of Pt(e.cms.textAreas)){let P={type:"FeatureCollection",features:[]};for(let L of C.features){if(L.properties.align==="unknown")continue;let R={align:L.properties.align,maxWidth:L.properties.maxWidth,maxHeight:L.properties.maxHeight,rotation:L.properties.rotation};"geometryId"in L.properties?R.anchorId=L.properties.geometryId:R.verticalOffset=L.properties.verticalOffset;let K={type:"Feature",geometry:L.geometry,properties:R};P.features.push(K)}H[S]=P}D.textAreas=H}return D}var bX=["facebook","instagram","twitter"];function y_(e){let r={};for(let{name:t,url:n}of e){let o=t.toLowerCase();bX.includes(o)&&(r[o]=n)}return r}f();var vX=e=>"fc_".concat(e.slice(3));function v_(e,{geometryMaps:r}){var o;if(!e.facade)return{};let t={},n={};for(let[i,a]of Pt(e.facade))if(a)for(let u of Object.values(a)){let{floorStackId:l,geometryIds:c}=u,d=vX(l);(o=n[l])!=null||(n[l]={id:d,spaces:[]}),n[l].spaces.push(...c.map(p=>{var m,g;return{floorId:i,spaceId:(g=(m=r.space.get(p))==null?void 0:m.ids[0])!=null?g:""}}))}return Object.keys(n).length>0&&(t.facade=n),t}f();function x_(e,r={}){var o,i,a,u,l,c,d,p,m,g,y,E;let t={type:"FeatureCollection",features:[]},n=[];for(let b of e.floors.features)n.push({id:b.properties.id,externalId:(i=(o=b.properties.details)==null?void 0:o.externalId)!=null?i:"",elevation:b.properties.elevation,name:(u=(a=b.properties.details)==null?void 0:a.name)!=null?u:"",shortName:(c=(l=b.properties.details)==null?void 0:l.shortName)!=null?c:"",subtitle:b.properties.subtitle,maxHeight:b.properties.maxHeight}),t.features.push({type:"Feature",geometry:b.geometry,properties:{id:b.properties.id,externalId:(p=(d=b.properties.details)==null?void 0:d.externalId)!=null?p:"",elevation:b.properties.elevation,name:(g=(m=b.properties.details)==null?void 0:m.name)!=null?g:"",shortName:(E=(y=b.properties.details)==null?void 0:y.shortName)!=null?E:"",subtitle:b.properties.subtitle,maxHeight:b.properties.maxHeight}});return{"floor.geojson":t,"map.geojson":n}}f();function E_(e,{geometryMaps:r}){var o,i,u,l,c;let t={},n={};for(let[d,p]of Pt((o=e.floorImages)!=null?o:{})){let m={features:[],type:"FeatureCollection"};for(let g of(i=p==null?void 0:p.features)!=null?i:[])if("verticalOffset"in g.properties)m.features.push(g);else{let a=g.properties,{geometryId:y}=a,E=Zr(a,["geometryId"]),b=(c=(u=r.space.get(y))==null?void 0:u.ids[0])!=null?c:(l=r.obstruction.get(y))==null?void 0:l.ids[0];if(!b)continue;let v={geometry:g.geometry,properties:oe(k({},E),{anchorId:b}),type:g.type};m.features.push(v)}n[d]=m}return Object.keys(n).length>0&&(t.floorImages=n),t}f();function I_(e,r={}){var o,i,a,u,l,c,d;let t=[];for(let p of(o=e==null?void 0:e.floorStacks)!=null?o:[]){let m={id:p.id,floors:p.floors,maps:p.floors,externalId:(a=(i=p.details)==null?void 0:i.externalId)!=null?a:"",name:(l=(u=p.details)==null?void 0:u.name)!=null?l:"",shortName:(d=(c=p.details)==null?void 0:c.shortName)!=null?d:"",type:"Building"};p.defaultFloor&&(m.defaultFloor=p.defaultFloor),t.push(m)}if(e.outdoors&&e.outdoors.floors.length>0){let p={id:"outdoors",floors:e.outdoors.floors,maps:e.outdoors.floors,type:"Outdoor",name:"Outdoors",externalId:"outdoors"};t.push(p)}return{"floorstack.json":t,"mapstack.geojson":t}}f();f();var T_=Dl(D_(),1),CX=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)},DX=(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,p]=o[u];c>n!=p>n&&t<(d-l)*(n-c)/(p-c)+l&&(i=!i)}return i},TX=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)]}}},MX=e=>{let r=CX(e),t=Number.isFinite(r)?Math.max(r,1):1;return Math.sqrt(t)*1e-6},m4=e=>{try{let t=TX(e).geometry.coordinates;if(!DX(t,e)){let o=(0,T_.default)(e.geometry.coordinates,MX(e));return Be([o[0],o[1]])}return Be(t)}catch(r){return Re(new Error("Unable to calculate center of polygon"))}};function w2(e){var r;return((r=e==null?void 0:e.geometry)==null?void 0:r.type)==="Polygon"}function w_(e,{geometryMaps:r,nodesByGeometryId:t,nodesById:n}){var d,p,m,g,y,E,b,v,D,M;let o=_X(e.defaultStyle),i={},a={},u={},l={};for(let T of Ct(e.geometry)){let B=e.geometry[T];if(!B)continue;let G=[],_=[],F=[],A=[];for(let j of B.features){let N=j.properties.id,Z=o.has(N),ie=(d=t.get(N))!=null?d:[];for(let de of(m=(p=r.space.get(N))==null?void 0:p.features)!=null?m:[])G.push(M_(de,ie));for(let de of(y=(g=r.obstruction.get(N))==null?void 0:g.features)!=null?y:[])if(_.push(wX(de,Z)),r.object.has(N)){let J=(E=t.get(N))!=null?E:[],z=J.map(X=>n.get(X)).filter(X=>X!=null);for(let X of z){let W=M_({type:"Feature",geometry:X.geometry,properties:{id:d_(X.properties.id),kind:"desk-entrance",details:{externalId:d4(N)}}},J);G.push(W)}}for(let de of(v=(b=r.area.get(N))==null?void 0:b.features)!=null?v:[])F.push(AX(de,ie));for(let de of(M=(D=r.window.get(N))==null?void 0:D.features)!=null?M:[])A.push(PX(de))}G.length>0&&(i[T]={type:"FeatureCollection",features:G.filter(j=>j!==null)}),_.length>0&&(a[T]={type:"FeatureCollection",features:_.filter(j=>j!==null)}),F.length>0&&(u[T]={type:"FeatureCollection",features:F.filter(j=>j!==null)}),A.length>0&&(l[T]={type:"FeatureCollection",features:A.filter(j=>j!==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 M_(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}),w2(t)&&(t.properties.center=m4(t).unwrapOr(void 0)),t}function wX(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 w2(n)&&(n.properties.center=m4(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 AX(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 w2(n)&&(n.properties.center=m4(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 PX(e){return e.geometry.type!=="LineString"?null:{type:"Feature",geometry:e.geometry,properties:{id:e.properties.id}}}function _X(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))}f();function A_(e,{geometryMaps:r,geometryFeatureById:t}){var o,i,a,u,l,c,d,p,m,g,y,E,b;if(!e.locationCategories&&!e.locations)return{};let n={};if((o=e.locationCategories)!=null&&o.length){let v=[];for(let D of e.locationCategories){let M={id:D.id,name:D.details.name,icon:(i=D.details.icon)!=null?i:""};D.parent&&(M.parent=D.parent),v.push(M)}n["category.json"]=v}if((a=e.locations)!=null&&a.length){let v=OX(e,{geometryFeatureById:t}),D=[];for(let M of e.locations){let T={id:M.id,name:M.details.name,categories:M.categories,spaces:[],obstructions:[],areas:[],annotations:[],connections:[],entrances:[],links:M.links,openingHoursSpecification:(u=M.openingHours)!=null?u:[],pictures:M.images,social:M.social,description:M.details.description,externalId:M.details.externalId,icon:M.details.icon,logo:M.logo,phone:M.phone,website:M.website,searchTags:M.searchTags};D.push(T);for(let{geometryId:B,floorId:G}of M.geometryAnchors)T.spaces.push(...(c=(l=r.space.get(B))==null?void 0:l.ids.map(_=>({id:_,floor:G})))!=null?c:[]),T.obstructions.push(...(p=(d=r.obstruction.get(B))==null?void 0:d.ids.map(_=>({id:_,floor:G})))!=null?p:[]),T.areas.push(...(g=(m=r.area.get(B))==null?void 0:m.ids.map(_=>({id:_,floor:G})))!=null?g:[]),T.entrances.push(...(y=v.entrancesByGeometryId.get(B))!=null?y:[]),T.connections.push(...(E=v.connectionsByGeometryId.get(B))!=null?E:[]),T.annotations.push(...(b=v.annotationsByGeometryId.get(B))!=null?b:[])}n["location.json"]=D}return n}function OX(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 Pt(e.annotations))for(let l of u!=null?u:[]){let c=l.geometryId,d=l.id,p=(n=t.annotationsByGeometryId.get(c))!=null?n:[];p.push({floor:a,id:d}),t.annotationsByGeometryId.set(c,p)}if(e.connections)for(let a of e.connections){let u=C2(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 p=(o=t.entrancesByGeometryId.get(d))!=null?o:[];p.push({floor:c.floorId,id:a.id}),t.entrancesByGeometryId.set(d,p)}else{let p=(i=t.connectionsByGeometryId.get(d))!=null?i:[];p.push(a.id),t.connectionsByGeometryId.set(d,p)}}}return t}f();function P_(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=a.details!=null?k({},a.details.externalId!=null&&{externalId:a.details.externalId}):void 0,l={type:"Feature",geometry:i.geometry,properties:k({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},u!=null&&Object.keys(u).length>0&&{details:u})};t.features.push(l)}return n}f();function __(e,{geometryMaps:r,navigationFlags:t,incomingEdgesByNodeId:n}){var c,d,p,m,g,y;let o={"node.geojson":{type:"FeatureCollection",features:[]}},i=o["node.geojson"].features,a=FX(e),u=BX(e),l=kX(e,u,a);for(let[E,b]of Pt((c=e.nodes)!=null?c:{}))for(let v of(d=b==null?void 0:b.features)!=null?d:[]){let D=(p=r.space.get(v.properties.geometryIds[0]))==null?void 0:p.features[0],M=(D==null?void 0:D.geometry.type)==="Point"&&((m=D==null?void 0:D.properties.details)!=null&&m.externalId)?D.properties.details.externalId:"",T=(g=n.get(v.properties.id))!=null?g:[],B=Object.keys(t!=null?t:{}),G=[];for(let F of T)for(let A of B)Zl(F,t[A])&&G.push(t[A]);let _={type:"Feature",geometry:v.geometry,properties:{id:v.properties.id,floor:E,space:v.properties.geometryIds.map(F=>{var A;return(A=r.space.get(F))==null?void 0:A.ids}).flat().filter(F=>F!==void 0),neighbors:[...v.properties.neighbors.map(F=>({id:F.id,weight:F.extraCost})),...(y=l.get(v.properties.id))!=null?y:[]],map:E,externalId:M,flags:G.length>0?LX(G):void 0}};i.push(_)}return o}function FX(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 BX(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 kX(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(p=>{var m;return oe(k({},p),{nodes:(m=r.get(p.geometryId))!=null?m:[]})});for(let p of c.entrances){let m=(i=r.get(p.geometryId))!=null?i:[];for(let g of m)for(let y of d){let E=Math.abs(((a=t.get(p.floorId))!=null?a:0)-((u=t.get(y.floorId))!=null?u:0))*c.floorCostMultiplier,b=(l=n.get(g))!=null?l:[];b.push(...y.nodes.filter(v=>v!==g).map(v=>({id:v,weight:E+c.entryCost}))),n.set(g,b)}}}return n}function LX(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}f();function RX(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 O_(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 Pt(e.defaultStyle)){let p=RX(d.geometryAnchors.flatMap(m=>{var g,y,E,b;return[...(y=(g=r.space.get(m.geometryId))==null?void 0:g.ids)!=null?y:[],...(b=(E=r.obstruction.get(m.geometryId))==null?void 0:E.ids)!=null?b:[]]}),i);if(p.Point&&p.Point.length>0){let m={points:Array.from(p.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")]=m}if(p.LineString&&p.LineString.length>0){let m={lineStrings:Array.from(p.LineString.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity,width:d.buffer};d.topColor!==void 0&&(m.topColor=d.topColor),n["".concat(c,".LineString")]=m}if(p.Polygon&&p.Polygon.length>0){let m={polygons:Array.from(p.Polygon.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity};((l=d.extra)==null?void 0:l.showImage)!==void 0&&(m.showImage=d.extra.showImage===!0),d.topColor!==void 0&&(m.topColor=d.topColor),n["".concat(c,".Polygon")]=m}}return t}var A2=cA().extendOptional(mP).extendOptional(qP).extendOptional(EP).extendOptional(VP).extendOptional(u_).extendOptional(DP).extendOptional(PP).extendOptional(e_).extendOptional(n_).extendOptional(UP).extendOptional(FP).extendOptional(mA).extendOptional(SA).extendOptional(lP).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");function P2(e){let r=m_(e),t=x_(e,r),n=w_(e,r),o=__(e,r),i=g_(e,r),a=O_(e,r),u=I_(e,r),l=E_(e,r),c=v_(e,r),d=h_(e,r),p=A_(e,r),m=b_(e,r),g=P_(e,r);return k(k(k(k(k(k(k(k(k(k(k(k(k(k(k({},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),p),m),g)}f();function If(e){return e.endsWith("/")?e:"".concat(e,"/")}f();var Sf="https://app.mappedin.com/",F_="https://auth.mappedin.com/",B_=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"}),NX=Object.freeze(oe(k({},B_),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),jX=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"}),UX=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"}),GX=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"}),zX={eu:jX,us:B_,"us-enterprise":NX,"us-staging-enterprise":UX,"us-staging-self-serve":GX};function k_(e){return zX[e]}f();f();var $X=e=>{let r=Date.now();return e-r},h4=(e,r)=>$X(e)<=r*60*1e3;var R_=10,N_=R_*60*1e3,L_="accessTokens";async function x0(e,r=!1){let t="".concat(e.key),n=mu.getInstance(),o=(n==null?void 0:n.loadSessionData(L_))||{},i=Math.floor(Date.now()/1e3);if(o[t]&&!h4(o[t].expiresTimestamp*1e3,R_))return o[t];let a=r?await VX(e,i):await HX(e,i),u=oe(k({},o),{[t]:a});return n==null||n.saveSessionData(L_,u),a}async function VX(e,r){var i;let t;e.customAuthUri?t=e.customAuthUri:t="".concat((i=e.baseAuthUri)!=null?i:F_,"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 HX(e,r){let t;e.customAuthUri?t=e.customAuthUri:t="".concat(e.baseAuthUri?If(e.baseAuthUri):Sf,"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}}f();var U_=10,G_=U_*60*1e3,j_="miSasTokens";async function _2(e,r){let t="".concat(r,"__").concat(e.mapId),n=mu.getInstance(),o=(n==null?void 0:n.loadSessionData(j_))||{};if(o[t]&&!h4(o[t].expires,U_))return o[t];let i=await ZX(e,r),a=oe(k({},o),{[t]:{token:i.token,expires:new Date(i.expires).getTime()}});return n==null||n.saveSessionData(j_,a),i}async function ZX(e,r){let t="".concat(e.baseUri?If(e.baseUri):Sf,"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()}}f();var Di=Uint8Array,nd=Uint16Array,z_=Uint32Array,$_=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]),V_=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]),WX=new Di([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),H_=function(e,r){for(var t=new nd(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new z_(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]},Z_=H_($_,2),W_=Z_[0],XX=Z_[1];W_[28]=258,XX[258]=28;var X_=H_(V_,0),YX=X_[0],MTe=X_[1],k2=new nd(32768);for(zt=0;zt<32768;++zt)Gu=(zt&43690)>>>1|(zt&21845)<<1,Gu=(Gu&52428)>>>2|(Gu&13107)<<2,Gu=(Gu&61680)>>>4|(Gu&3855)<<4,k2[zt]=((Gu&65280)>>>8|(Gu&255)<<8)>>>1;var Gu,zt,E0=(function(e,r,t){for(var n=e.length,o=0,i=new nd(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new nd(r);for(o=0;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var u;if(t){u=new nd(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],p=a[e[o]-1]++<<d,m=p|(1<<d)-1;p<=m;++p)u[k2[p]>>>l]=c}else for(u=new nd(n),o=0;o<n;++o)e[o]&&(u[o]=k2[a[e[o]-1]++]>>>15-e[o]);return u}),I0=new Di(288);for(zt=0;zt<144;++zt)I0[zt]=8;var zt;for(zt=144;zt<256;++zt)I0[zt]=9;var zt;for(zt=256;zt<280;++zt)I0[zt]=7;var zt;for(zt=280;zt<288;++zt)I0[zt]=8;var zt,Y_=new Di(32);for(zt=0;zt<32;++zt)Y_[zt]=5;var zt;var qX=E0(I0,9,1);var JX=E0(Y_,5,1),O2=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Ba=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},F2=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},KX=function(e){return(e+7)/8|0},R2=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?nd:e.BYTES_PER_ELEMENT==4?z_:Di)(t-r);return n.set(e.subarray(r,t)),n};var QX=["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"],ka=function(e,r,t){var n=new Error(r||QX[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,ka),!t)throw n;return n},eY=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(He){var tt=r.length;if(He>tt){var lt=new Di(Math.max(tt*2,He));lt.set(r),r=lt}},u=t.f||0,l=t.p||0,c=t.b||0,d=t.l,p=t.d,m=t.m,g=t.n,y=n*8;do{if(!d){u=Ba(e,l,1);var E=Ba(e,l+1,3);if(l+=3,E)if(E==1)d=qX,p=JX,m=9,g=5;else if(E==2){var M=Ba(e,l,31)+257,T=Ba(e,l+10,15)+4,B=M+Ba(e,l+5,31)+1;l+=14;for(var G=new Di(B),_=new Di(19),F=0;F<T;++F)_[WX[F]]=Ba(e,l+F*3,7);l+=T*3;for(var A=O2(_),j=(1<<A)-1,N=E0(_,A,1),F=0;F<B;){var Z=N[Ba(e,l,j)];l+=Z&15;var b=Z>>>4;if(b<16)G[F++]=b;else{var ie=0,de=0;for(b==16?(de=3+Ba(e,l,3),l+=2,ie=G[F-1]):b==17?(de=3+Ba(e,l,7),l+=3):b==18&&(de=11+Ba(e,l,127),l+=7);de--;)G[F++]=ie}}var J=G.subarray(0,M),z=G.subarray(M);m=O2(J),g=O2(z),d=E0(J,m,1),p=E0(z,g,1)}else ka(1);else{var b=KX(l)+4,v=e[b-4]|e[b-3]<<8,D=b+v;if(D>n){i&&ka(0);break}o&&a(c+v),r.set(e.subarray(b,D),c),t.b=c+=v,t.p=l=D*8,t.f=u;continue}if(l>y){i&&ka(0);break}}o&&a(c+131072);for(var X=(1<<m)-1,W=(1<<g)-1,ee=l;;ee=l){var ie=d[F2(e,l)&X],ce=ie>>>4;if(l+=ie&15,l>y){i&&ka(0);break}if(ie||ka(2),ce<256)r[c++]=ce;else if(ce==256){ee=l,d=null;break}else{var ye=ce-254;if(ce>264){var F=ce-257,Ce=$_[F];ye=Ba(e,l,(1<<Ce)-1)+W_[F],l+=Ce}var Pe=p[F2(e,l)&W],Le=Pe>>>4;Pe||ka(3),l+=Pe&15;var z=YX[Le];if(Le>3){var Ce=V_[Le];z+=F2(e,l)&(1<<Ce)-1,l+=Ce}if(l>y){i&&ka(0);break}o&&a(c+131072);for(var be=c+ye;c<be;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=be}}t.l=d,t.p=ee,t.b=c,t.f=u,d&&(u=1,t.m=m,t.d=p,t.n=g)}while(!u);return c==r.length?r:R2(r,0,c)};var tY=new Di(0);var Ls=function(e,r){return e[r]|e[r+1]<<8},La=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},B2=function(e,r){return La(e,r)+La(e,r+4)*4294967296};function rY(e,r){return eY(e,r)}var L2=typeof TextDecoder<"u"&&new TextDecoder,nY=0;try{L2.decode(tY,{stream:!0}),nY=1}catch(e){}var oY=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,R2(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 iY(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(L2)return L2.decode(e);var o=oY(e),i=o[0],a=o[1];return a.length&&ka(8),i}}var aY=function(e,r){return r+30+Ls(e,r+26)+Ls(e,r+28)},sY=function(e,r,t){var n=Ls(e,r+28),o=iY(e.subarray(r+46,r+46+n),!(Ls(e,r+8)&2048)),i=r+46+n,a=La(e,r+20),u=t&&a==4294967295?uY(e,i):[a,La(e,r+24),La(e,r+42)],l=u[0],c=u[1],d=u[2];return[Ls(e,r+10),l,c,o,i+Ls(e,r+30)+Ls(e,r+32),d]},uY=function(e,r){for(;Ls(e,r)!=1;r+=4+Ls(e,r+2));return[B2(e,r+12),B2(e,r+4),B2(e,r+20)]};function N2(e,r){for(var t={},n=e.length-22;La(e,n)!=101010256;--n)(!n||e.length-n>65558)&&ka(13);var o=Ls(e,n+8);if(!o)return{};var i=La(e,n+16),a=i==4294967295||o==65535;if(a){var u=La(e,n-12);a=La(e,u)==101075792,a&&(o=La(e,u+32),i=La(e,u+48))}for(var l=r&&r.filter,c=0;c<o;++c){var d=sY(e,i,a),p=d[0],m=d[1],g=d[2],y=d[3],E=d[4],b=d[5],v=aY(e,b);i=E,(!l||l({name:y,size:m,originalSize:g,compression:p}))&&(p?p==8?t[y]=rY(e.subarray(v,v+m),new Di(g)):ka(14,"unknown compression type "+p):t[y]=R2(e,v,v+m))}return t}var q_=globalThis.fetch,K_,cY=(K_=x==null?void 0:x.env)==null?void 0:K_.npm_package_version;function Ci(){if(q_==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return q_}var j2={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function Q_(e){var t;let r=k(k({},j2),e);return r.headers=oe(k({},r.headers),{"mappedin-sdk-version":cY}),r.things=[],"platformString"in e&&(r.headers=oe(k({},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 dY(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 pY(e,r,t=!1){let n=dY(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 fY=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 V.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){V.warn("Perspective ".concat(n," is missing url or locale_packs!"));continue}t[n]={url:i,locale_packs:a}}return t};async function mY(e,r="exports/mvf/1/bundle"){var c,d;let t=Q_(k(k({baseUri:"https://api-gateway.mappedin.com/"},j2),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 pY(t,n),i=o.url,a=o.locale_packs,u=(d=t.perspective)!=null?d:j2.perspective,l=fY(o);if(u!=null&&u!==""&&l!=null){let p=l[u];p==null?V.warn("Perspective ".concat(u," not found in response! Loading default perspective instead.")):(V.log('Loading perspective "'.concat(u,'"')),i=p.url,a=p.locale_packs)}return{url:i,localePacks:a,updated_at:o.updated_at}}var Cf=(function(){let e;return()=>(e||(e=new TextDecoder),e)})();async function U2(e,{signal:r}){let t=await(await Ci()(e,{signal:r})).arrayBuffer();return new Uint8Array(t)}async function Df(e){let r=N2(e),t={};if(r["enterprise/"]!=null){t.enterprise={};let n=r["enterprise/locations.json"];n&&(t.enterprise.locations=JSON.parse(Cf().decode(n)));let o=r["enterprise/locationInstances.json"];o&&(t.enterprise.locationInstances=JSON.parse(Cf().decode(o)));let i=r["enterprise/categories.json"];i&&(t.enterprise.categories=JSON.parse(Cf().decode(i)))}return r["floorstack.json"]&&(t["floorstack.json"]=JSON.parse(Cf().decode(r["floorstack.json"]))),r["floor.geojson"]&&(t["floor.geojson"]=JSON.parse(Cf().decode(r["floor.geojson"]))),r["manifest.json"]&&(t["manifest.geojson"]=JSON.parse(Cf().decode(r["manifest.json"]))),t}async function eO(e,{signal:r}){try{let t=await(await Ci()(e,{signal:r})).arrayBuffer();if(r.aborted)return;let n=new Uint8Array(t);return await Df(n)}catch(t){let n=new Error("downloadLanguagePack failed");throw n.cause=t,n}}function hY(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 G2(e){return new Promise(async(r,t)=>{try{let n=hY(e),{url:o,localePacks:i}=await mY(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 z2(e,r){return new Promise(async(t,n)=>{try{let{url:o}=await gY(e,r),i=await Ci()(o).then(u=>u.arrayBuffer()),a=new Uint8Array(i);t(a)}catch(o){n(o)}})}async function gY(e,r){let t=new URL("".concat(e.baseUri?If(e.baseUri):Sf,"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 tO(e){return Yb(e)}function yY(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 $2(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=N2(e);if(!yY(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"){V.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 Xl(){let e="us",r={};function t(){return bY(k_(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 bY(e,r){return k(k({},e),r)}var g4=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_",""))},J_=async e=>{let r=performance.now(),t,n=A2.decompressUnsafeSync(e);n.isOk()?t=n.unwrap():V.error("MVFv3 decompression failed!");let o;if(t)try{o=P2(t)}catch(i){V.error("MVFv3 to MVFv2 conversion failed!",i)}if(V.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 y4(e,r="2.0.0"){switch(r){case"2.0.0":case"2.0.0-c":try{let t=performance.now(),n=await $2(e),o=Yb(n);return V.log("Parsed MVFv2 in ".concat(performance.now()-t,"ms")),{mvf2:o}}catch(t){return V.error("MVFv2 parsing failed! Trying MVFv3."),J_(e)}case"3.0.0":return J_(e);default:throw new Error("Unsupported MVF version: ".concat(r))}}f();f();f();function ia(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 Ti(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 aa(e){return e.type==="Feature"?e.geometry:e}function rO(e,r){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function vY(e,r,t){t===void 0&&(t={});for(var n=ia(e),o=Ti(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")),xY(o[i],o[i+1],n,a,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function xY(e,r,t,n,o){var i=t[0],a=t[1],u=e[0],l=e[1],c=r[0],d=r[1],p=t[0]-u,m=t[1]-l,g=c-u,y=d-l,E=p*y-m*g;if(o!==null){if(Math.abs(E)>o)return!1}else if(E!==0)return!1;if(n){if(n==="start")return Math.abs(g)>=Math.abs(y)?g>0?u<i&&i<=c:c<=i&&i<u:y>0?l<a&&a<=d:d<=a&&a<l;if(n==="end")return Math.abs(g)>=Math.abs(y)?g>0?u<=i&&i<c:c<i&&i<=u:y>0?l<=a&&a<d:d<a&&a<=l;if(n==="both")return Math.abs(g)>=Math.abs(y)?g>0?u<i&&i<c:c<i&&i<u:y>0?l<a&&a<d:d<a&&a<l}else return Math.abs(g)>=Math.abs(y)?g>0?u<=i&&i<=c:c<=i&&i<=u:y>0?l<=a&&a<=d:d<=a&&a<=l;return!1}var nO=vY;f();function EY(e,r){r===void 0&&(r={});var t=gu(e),n=(t[0]+t[2])/2,o=(t[1]+t[3])/2;return ys([n,o],r.properties,r)}var Tf=EY;f();f();function IY(e,r,t){t===void 0&&(t={});var n=ia(e),o=ia(r),i=Xo(o[1]-n[1]),a=Xo(o[0]-n[0]),u=Xo(n[1]),l=Xo(o[1]),c=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(u)*Math.cos(l);return i5(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),t.units)}var Yl=IY;function b4(e,r){return r===void 0&&(r={}),u5(e,function(t,n){var o=n.geometry.coordinates;return t+Yl(o[0],o[1],r)},0)}f();f();f();function v4(e,r,t){if(t===void 0&&(t={}),t.final===!0)return SY(e,r);var n=ia(e),o=ia(r),i=Xo(n[0]),a=Xo(o[0]),u=Xo(n[1]),l=Xo(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 Ih(Math.atan2(c,d))}function SY(e,r){var t=v4(r,e);return t=(t+180)%360,t}f();function od(e,r,t,n){n===void 0&&(n={});var o=ia(e),i=Xo(o[0]),a=Xo(o[1]),u=Xo(t),l=a5(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)),p=Ih(d),m=Ih(c);return ys([p,m],n.properties)}f();f();function CY(e){if(!e)throw new Error("geojson is required");var r=[];return bs(e,function(t){DY(t,r)}),Rc(r)}function DY(e,r){var t=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":t=Ti(n);break;case"LineString":t=[Ti(n)]}t.forEach(function(o){var i=TY(o,e.properties);i.forEach(function(a){a.id=r.length,r.push(a)})})}}function TY(e,r){var t=[];return e.reduce(function(n,o){var i=hu([n,o],r);return i.bbox=MY(n,o),t.push(i),o}),t}function MY(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 V2=CY;var BO=Dl(OO(),1);function Tq(e,r){var t={},n=[];if(e.type==="LineString"&&(e=H3(e)),r.type==="LineString"&&(r=H3(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=FO(e,r);return o&&n.push(o),Rc(n)}var i=(0,BO.default)();return i.load(V2(r)),Z3(V2(e),function(a){Z3(i.search(a),function(u){var l=FO(a,u);if(l){var c=Ti(l).join(",");t[c]||(t[c]=!0,n.push(l))}})}),Rc(n)}function FO(e,r){var t=Ti(e),n=Ti(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],p=n[1][1],m=(p-c)*(a-o)-(d-l)*(u-i),g=(d-l)*(i-c)-(p-c)*(o-l),y=(a-o)*(i-c)-(u-i)*(o-l);if(m===0)return null;var E=g/m,b=y/m;if(E>=0&&E<=1&&b>=0&&b<=1){var v=o+E*(a-o),D=i+E*(u-i);return ys([v,D])}return null}var wf=Tq;function Mq(e,r,t){t===void 0&&(t={});var n=ys([1/0,1/0],{dist:1/0}),o=0;return bs(e,function(i){for(var a=Ti(i),u=0;u<a.length-1;u++){var l=ys(a[u]);l.properties.dist=Yl(r,l,t);var c=ys(a[u+1]);c.properties.dist=Yl(r,c,t);var d=Yl(l,c,t),p=Math.max(l.properties.dist,c.properties.dist),m=v4(l,c),g=od(r,p,m+90,t),y=od(r,p,m-90,t),E=wf(hu([g.geometry.coordinates,y.geometry.coordinates]),hu([l.geometry.coordinates,c.geometry.coordinates])),b=null;E.features.length>0&&(b=E.features[0],b.properties.dist=Yl(r,b,t),b.properties.location=o+Yl(l,b,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),b&&b.properties.dist<n.properties.dist&&(n=b,n.properties.index=u),o+=d}}),n}var D0=Mq;function wq(e,r,t){var n=Ti(t);if(rO(t)!=="LineString")throw new Error("line must be a LineString");var o=D0(t,e),i=D0(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),hu(u,t.properties)}var sS=wq;var Aq=1e-7;function uS(e){return{type:"Point",coordinates:e}}function Pq(e,r){let{coordinates:t}=r.geometry,{coordinates:n}=e.geometry,o=t.map(i=>D0(e,uS(i)));return n.reduce((i,a)=>{let u=sS(uS(a),o[0],e),l=sS(uS(a),o[1],e),c=b4(u)<b4(l)?u:l;return c.properties=oe(k({},e.properties),{entrances:[]}),i.concat([c])},[])}function lS(e,r){return r.reduce((t,n)=>{let o={epsilon:Aq},i=t.obstructions.findIndex(u=>nO(Tf(n),u,o)),a=t.obstructions[i];if(a){let[u,l]=Pq(a,n);t.entrances.push(n),t.obstructions.splice(i,1,u,l)}return t},{obstructions:[e],entrances:[]})}f();f();f();var yn=class{constructor(r){h(this,"id");this.id=r}};f();f();var zu,Af=class Af{constructor(r,t,n){h(this,"__type",Af.__type);h(this,"id",ht());h(this,"latitude");h(this,"longitude");h(this,"floorId");h(this,"verticalOffset");w(this,zu,{});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===Af.__type}get anchorTarget(){return this}get focusTarget(){return this}get navigationTarget(){return this}isEqual(r){return this.latitude===r.latitude&&this.longitude===r.longitude&&this.floorId===r.floorId}toJSON(){return{__type:Af.__type,latitude:this.latitude,longitude:this.longitude,floorId:this.floorId,verticalOffset:this.verticalOffset}}get geoJSON(){if(s(this,zu).geoJSON!=null)return s(this,zu).geoJSON;let r=[this.longitude,this.latitude];return this.verticalOffset!==0&&r.push(this.verticalOffset),s(this,zu).geoJSON={type:"Feature",properties:null,geometry:{type:"Point",coordinates:r}},s(this,zu).geoJSON}toGeoJSON(){return this.geoJSON.geometry}destroy(){for(let r of globalThis.Object.keys(s(this,zu)))delete s(this,zu)[r]}};zu=new WeakMap,h(Af,"__type","coordinate");var cS=Af,ke=cS;function dS(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,p)=>(d[p.id]=p,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,p)=>(d[p.id]=p,d),{}))||{},"floor-stack":t,floor:n}}}var _q=/^https?:\/\/cdn(-staging)?\.mappedin\.com(\/|$)/;function kO(e){return _q.test(e)}function LO(e){let r=e.split("?")[1];return!!(r!=null&&r.includes("sv="))}function lo(e,r){var n;let t=((n=e==null?void 0:e.properties)==null?void 0:n.id)||"unknown";if(e.geometry==null)return V.error('Cannot get the center coordinate for "'.concat(t,'" because it has no geometry.')),new ke({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 ke({latitude:c,longitude:l,floorId:r})}else if(e.geometry.type==="Point"){let[o,i]=e.geometry.coordinates;return new ke({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 ke({latitude:a,longitude:i,floorId:r})}}}catch(o){}try{let[o,i]=Tf(e).geometry.coordinates;return new ke({latitude:i,longitude:o,floorId:r})}catch(o){return V.error('Failed to get center coordinate for "'.concat(t,'" ').concat(o instanceof Error?o.stack:"")),new ke({latitude:0,longitude:0,floorId:r})}}function RO(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}function M4(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 Mi,An,id,$u,Pf=class Pf extends yn{constructor(t,n){super(n.mvfData.properties.id);h(this,"__type",Pf.__type);w(this,Mi);w(this,An,{});w(this,id);w(this,$u);O(this,Mi,t),O(this,id,n.floorId),O(this,$u,n.mvfData)}static is(t){return t.__type===Pf.__type}get locations(){return s(this,An).locations?s(this,An).locations:(s(this,An).locations=(s(this,Mi).locationIdsByNodeId[this.id]||[]).map(t=>s(this,Mi).getById("enterprise-location",t)).filter(Boolean),s(this,An).locations)}get space(){var t;return s(this,Mi).getById("space",(t=s(this,Mi).spaceIdsByNodeId[this.id])==null?void 0:t[0])}get object(){var t;return s(this,Mi).getById("object",(t=s(this,Mi).objectIdsByNodeId[this.id])==null?void 0:t[0])}get floor(){let t=s(this,Mi).getById("floor",s(this,id));if(t==null)throw new Error("Floor ".concat(s(this,id)," not found!"));return t}get coordinate(){return s(this,An).coordinate==null&&(s(this,An).coordinate=lo(s(this,$u),s(this,id))),s(this,An).coordinate}get externalId(){var t;return(t=s(this,$u).properties.externalId)!=null?t:""}get neighbors(){if(s(this,An).neighbors==null){let t=s(this,$u).properties.neighbors.map(n=>{let o=s(this,Mi).getById("node",n.id);if(o==null)throw new Error("Node ".concat(n.id," not found!"));return o});s(this,An).neighbors=t}return s(this,An).neighbors}get navigationFlags(){if(s(this,An).navigationFlags==null){let t=[],n=s(this,$u).properties.flags;if(n!=null&&n.length>0)for(let[o,i]of Object.entries(s(this,Mi).navigationFlags))n.length>i.index&&n[i.index]!=null&&RO({flags:n},i)&&t.push(o);s(this,An).navigationFlags=Object.freeze(t)}return s(this,An).navigationFlags}get geoJSON(){return oe(k({},s(this,$u)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}get navigationTarget(){return this}toJSON(){return{__type:Pf.__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,An)))delete s(this,An)[t]}};Mi=new WeakMap,An=new WeakMap,id=new WeakMap,$u=new WeakMap,h(Pf,"__type","node");var pS=Pf,sa=pS;f();f();f();f();var T0,Vu,_f=class _f extends yn{constructor(t){super(String(ht()));h(this,"__type",_f.__type);w(this,T0,{});w(this,Vu);O(this,Vu,t.mvfData)}static is(t){return t.__type===_f.__type}get url(){return s(this,Vu).url}get name(){if("displayName"in s(this,Vu))return s(this,Vu).displayName;if("label"in s(this,Vu))return s(this,Vu).label}toJSON(){return{__type:_f.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,T0)))delete s(this,T0)[t]}};T0=new WeakMap,Vu=new WeakMap,h(_f,"__type","hyperlink");var fS=_f,ad=fS;f();f();function M0(e){var r;return typeof e=="string"?e:(r=e==null?void 0:e.id)!=null?r:""}function NO(e){return Array.isArray(e)&&Number.isFinite(e[0])&&Number.isFinite(e[1])}var Oq=/^https:\/\/cdn\.mappedin\.com\/category-symbols\/.+$/,Fq=/^https:\/\/cdn-staging\.mappedin\.net\/category-symbols\/.+$/,Bq=e=>Oq.test(e)||Fq.test(e),kq=/^https:\/\/cdn\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,Lq=/^https:\/\/cdn-staging\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,Rq=e=>Bq(e)?!1:kq.test(e)||Lq.test(e),Of=e=>{var a;if(!Rq(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 mS(e){return e.reduce((r,t,n)=>n===0?r:r+Dr(e[n-1].toGeoJSON().coordinates,t.toGeoJSON().coordinates),0)}function Hu(e){return e!=null&&typeof e=="object"&&"__type"in e&&e.__type!==null&&typeof e.__type=="string"}function hS(e){return e!=null&&typeof e=="object"&&"name"in e&&e.name!=null&&typeof e.name=="string"&&e.name!==""}function jO(e){return Hu(e)&&hS(e)}var w0,Kl,sd,Ff=class Ff extends yn{constructor(t){super(String(ht()));h(this,"__type",Ff.__type);w(this,w0,{});w(this,Kl);w(this,sd);O(this,Kl,t.mvfData),O(this,sd,t.mapData)}static is(t){return t.__type===Ff.__type}get url(){let t=s(this,Kl).url;if(s(this,sd).tokenManager==null)return t;let n=Of(s(this,Kl).url);if(n==null)return t;let o=n.mapId;try{if(s(this,sd).tokenManager.isEnterpriseMode())return t;let i=s(this,sd).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"&&V.error("Error getting SAS token for image",{error:i,url:t}),t}}get name(){return s(this,Kl).altText}get altText(){return s(this,Kl).altText}toJSON(){return{__type:Ff.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,w0)))delete s(this,w0)[t]}};w0=new WeakMap,Kl=new WeakMap,sd=new WeakMap,h(Ff,"__type","image");var gS=Ff,Ns=gS;f();var ud,Ra=class{constructor(r,t){h(this,"id");w(this,ud);this.id=r}get geoJSONBoundingBox(){return s(this,ud)?s(this,ud):"bbox"in this.geoJSON.geometry&&this.geoJSON.geometry.bbox?this.geoJSON.geometry.bbox:(O(this,ud,gu(this.geoJSON)),s(this,ud))}get geoJSON(){return{properties:null,type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}}}};ud=new WeakMap;var Bf,Zu,Wu,bn=class extends Ra{constructor(t,n){super(n.properties.id,t);w(this,Bf);w(this,Zu);w(this,Wu,{});O(this,Bf,t),O(this,Zu,n)}get externalId(){var t;return(t=s(this,Zu).properties.externalId)!=null?t:""}get name(){var n,o,i,a;let t=(o=(n=s(this,Zu).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,Zu).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,Wu).images!=null)return s(this,Wu).images;let t=(i=(o=(n=s(this,Zu).properties.details)==null?void 0:n.images)==null?void 0:o.map(l=>new Ns({mvfData:l,mapData:s(this,Bf)})))!=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,Wu).images=t,t}get links(){var n,o,i,a,u;if(s(this,Wu).links!=null)return s(this,Wu).links;let t=(i=(o=(n=s(this,Zu).properties.details)==null?void 0:n.links)==null?void 0:o.map(l=>new ad({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,Wu).links=t,t}get locationProfiles(){var t;return(t=s(this,Bf).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}}};Bf=new WeakMap,Zu=new WeakMap,Wu=new WeakMap;f();var P0,Na,ld,A0=class A0{constructor(r,t,n,o){w(this,P0);w(this,Na);w(this,ld);h(this,"target");h(this,"__type",A0.__type);O(this,P0,r),O(this,Na,t),this.target=n,O(this,ld,o)}static is(r){return r.__type===A0.__type}get id(){return s(this,P0)}get url(){if(s(this,ld)==null)return s(this,Na);let r=Of(s(this,Na));if(r==null)return s(this,Na);let t=r.mapId;try{if(s(this,ld).isEnterpriseMode())return s(this,Na);let n=s(this,ld).getSasToken(t).token;if(n==null||n==="")throw new Error("SAS token empty!");return"".concat(s(this,Na),"?").concat(n)}catch(n){return r.fileType!=="svg"&&V.error("Error getting SAS token for image",{error:n,url:s(this,Na)}),s(this,Na)}}};P0=new WeakMap,Na=new WeakMap,ld=new WeakMap,h(A0,"__type","image-3d");var wi=A0;f();f();function Ql(e){let r;if(ke.is(e))r=e;else if(ri.is(e))r=e.coordinates[0];else if(Xu.is(e))if(e.spaces.length>0)r=e.spaces[0].center;else return;else if(Hn.is(e))if(e.coordinates.length>0)r=e.coordinates[0];else return;else if("center"in e&&ke.is(e.center))r=e.center;else if("coordinate"in e&&ke.is(e.coordinate))r=e.coordinate;else return;return r}f();f();var _0={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",footprintColor:"#ffffff"},disableUpdateStateValidation:!1},js="ExteriorWalls",ec="Walls",UO=0,kf="InteriorDoors",Lf="ExteriorDoors",Mr="GeometryLayer",Us="LabelsLayer",ja="MarkersLayer",O0="FootprintLayer",cd="OcclusionLayer",dd="AreasLayer",Rf="ImagesLayer",pd="FacadesLayer",Gs="PathsLayer",Ua="ModelsLayer";var GO=["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"],Nq={orange:"#F26336",teal:"#057685",lightTeal:"#5DC7D0"};var jq=new Set(["outdoorView","bearing","pitch","zoomLevel","screenOffsets","debug","initialFloor","shadingAndOutlines","wallTopColor","style","multiFloorView","occlusion","imagePlacementOptions","flipImagesToFaceCamera","injectStyles","useStandaloneCamera","preloadFloors"]),Uq=new Set(["style","enabled","layersHiddenByGeometry","lowDpi"]);function yS(e){var r,t;(r=e.outdoorView)!=null&&r.enabled&&!((t=e.outdoorView)!=null&&t.token)&&V.error("Enable outdoor view requires a token. Provide token in `options.outdoorView.token`")}function bS(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=oe(k(k({},_0),e),{outdoorView:k({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=_0.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:k(k({},_0.imagePlacementOptions),e==null?void 0:e.imagePlacementOptions),multiFloorView:k(k({},_0.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 zO(e){let r={remove_watermark:!1};if(e)try{let t=s1(e);Object.assign(r,t.capabilities)}catch(t){V.error("Error decoding capabilities from token",t)}return r}function $O(e){let r=Object.fromEntries(Object.entries(e).filter(([t])=>jq.has(t)));return r.outdoorView&&(r.outdoorView=Object.fromEntries(Object.entries(r.outdoorView).filter(([t])=>Uq.has(t)))),r}var fd,md,Yu,hd,w4,VO,Nf=class Nf extends bn{constructor(t,n){super(t,n.mvfData);w(this,w4);h(this,"__type",Nf.__type);w(this,fd);w(this,md);w(this,Yu,{});w(this,hd);O(this,fd,t),O(this,md,n.floorId),O(this,hd,n.mvfData)}static is(t){return t.__type===Nf.__type}get center(){return s(this,Yu).center==null&&(s(this,Yu).center=lo(s(this,hd),s(this,md))),s(this,Yu).center}get floor(){let t=s(this,fd).getById("floor",s(this,md));if(t==null)throw new Error("Floor ".concat(s(this,md)," not found!"));return t}get images3D(){var o;let t=(o=s(this,fd).floorImagesByAnchorId.get(this.id))!=null?o:[],n=se(this,w4,VO).call(this);return n?[...t,n]:t}get geoJSON(){return oe(k({},s(this,hd)),{properties:null})}get focusTarget(){return this}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:Nf.__type,id:this.id,name:this.name,floor:this.floor.id}}destroy(){}};fd=new WeakMap,md=new WeakMap,Yu=new WeakMap,hd=new WeakMap,w4=new WeakSet,VO=function(){let t=s(this,hd).properties;if(t.image!=null)return s(this,Yu).polygonImage==null&&(s(this,Yu).polygonImage=new wi("".concat(this.id,"-polygon-image-").concat(ht()),t.image.path,this,s(this,fd).tokenManager)),s(this,Yu).polygonImage},h(Nf,"__type","area");var vS=Nf,ua=vS;f();var gd,qu,yd,tc,jf=class jf extends bn{constructor(t,n){super(t,n.mvfData);h(this,"__type",jf.__type);w(this,gd);w(this,qu);w(this,yd);w(this,tc);O(this,qu,{}),O(this,tc,n.mvfData),O(this,gd,t),O(this,yd,n.floorId)}static is(t){return t.__type===jf.__type}get floor(){let t=s(this,gd).getById("floor",s(this,yd));if(t==null)throw new Error("Floor ".concat(s(this,yd)," not found!"));return t}get center(){return s(this,qu).center==null&&(s(this,qu).center=lo(s(this,tc),s(this,yd))),s(this,qu).center}get isExterior(){var o;if(s(this,tc).properties.isExterior!==void 0)return s(this,tc).properties.isExterior;let t=s(this,gd).obstructionIdByEntranceId[this.id],n=s(this,gd).getMVFFeatureById("obstruction",t);return(o=n==null?void 0:n.properties.footprintComponent)!=null?o:!1}get geoJSON(){return oe(k({},s(this,tc)),{properties:null})}get focusTarget(){return this.center}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:jf.__type,id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of Object.keys(s(this,qu)))delete s(this,qu)[t]}};gd=new WeakMap,qu=new WeakMap,yd=new WeakMap,tc=new WeakMap,h(jf,"__type","door");var xS=jf,Mo=xS;f();var zs,bd,rn,rc,A4,HO,Uf=class Uf extends bn{constructor(t,n){super(t,n.mvfData);w(this,A4);h(this,"__type",Uf.__type);w(this,zs);w(this,bd);w(this,rn,{});w(this,rc);O(this,zs,t),O(this,bd,n.floorId),O(this,rc,n.mvfData)}static is(t){return t.__type===Uf.__type}get type(){return zq(s(this,rc).properties.kind)}get enterpriseLocations(){return s(this,rn).enterpriseLocations!=null?s(this,rn).enterpriseLocations:(s(this,rn).enterpriseLocations=M4(s(this,zs),this.id),s(this,rn).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let t=s(this,zs).getById("floor",s(this,bd));if(t==null)throw new Error("Floor ".concat(s(this,bd)," not found!"));return t}get doors(){var n,o;if(s(this,rn).doors)return s(this,rn).doors;s(this,rn).doors=[];let t=(o=(n=s(this,zs).entranceNodeIdsBySpaceId)==null?void 0:n[this.id])!=null?o:[];for(let i of t){let a=s(this,zs).doorsByNodeId[i];a&&s(this,rn).doors.push(a)}return s(this,rn).doors}get images3D(){var o;let t=(o=s(this,zs).floorImagesByAnchorId.get(this.id))!=null?o:[],n=se(this,A4,HO).call(this);return n?[...t,n]:t}get center(){return s(this,rn).center==null&&(s(this,rn).center=lo(s(this,rc),s(this,bd))),s(this,rn).center}get geoJSON(){return oe(k({},s(this,rc)),{properties:null})}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:Uf.__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,rn)))delete s(this,rn)[t]}};zs=new WeakMap,bd=new WeakMap,rn=new WeakMap,rc=new WeakMap,A4=new WeakSet,HO=function(){let t=s(this,rc).properties;if(t.image!=null)return s(this,rn).polygonImage==null&&(s(this,rn).polygonImage=new wi("".concat(this.id,"-polygon-image-").concat(ht()),t.image.path,this,s(this,zs).tokenManager)),s(this,rn).polygonImage},h(Uf,"__type","space");var ES=Uf,Gq=["room","hallway","exterior","void","gate","otb"];function zq(e){if(e==null||e==="default")return"room";let r=e.toLowerCase();return Gq.includes(r)?r:"room"}var Lr=ES;f();var la,Ut,ni,zf,P4,Gf=class Gf extends Ra{constructor(t,n){super(n.mvfData.properties.id,t);w(this,zf);h(this,"__type",Gf.__type);w(this,la);w(this,Ut,{});w(this,ni);O(this,la,t),O(this,ni,n.mvfData)}static is(t){return t.__type===Gf.__type}get focusTarget(){return this}get name(){var n;if(!("name"in s(this,ni).properties))return(n=s(this,ni).properties.externalId)!=null?n:"";let t=se(this,zf,P4).call(this,"name");return typeof t=="string"?t:""}get shortName(){var n;if(!("shortName"in s(this,ni).properties))return(n=s(this,ni).properties.externalId)!=null?n:"";let t=se(this,zf,P4).call(this,"shortName");return typeof t=="string"?t:""}get subtitle(){let t=se(this,zf,P4).call(this,"subtitle");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,ni).properties.externalId)!=null?t:""}get elevation(){return s(this,ni).properties.elevation}get maxHeight(){return s(this,ni).properties.maxHeight}get spaces(){if(s(this,Ut).spaces==null){let t=s(this,la).spaces.filter(n=>n.floor.id===this.id);s(this,Ut).spaces=t}return s(this,Ut).spaces}get spacesOpenToBelow(){if(s(this,Ut).spacesOpenToBelow==null){let t=[];for(let n of this.spaces)(n.type==="void"||n.type==="otb")&&t.push(n);s(this,Ut).spacesOpenToBelow=t}return s(this,Ut).spacesOpenToBelow}get geoJSON(){var t;return{type:"Feature",properties:null,geometry:(t=s(this,ni).geometry)!=null?t:{type:"Polygon",coordinates:[]}}}get objects(){if(s(this,Ut).objects==null){let t=s(this,la).objects.filter(n=>n.floor.id===this.id);s(this,Ut).objects=t}return s(this,Ut).objects}get connections(){if(s(this,Ut).connections==null){let t=s(this,la).connections.filter(n=>n.floors.includes(this));s(this,Ut).connections=t}return s(this,Ut).connections}get doors(){if(s(this,Ut).doors==null){let t=s(this,la).doors.filter(n=>n.floor.id===this.id);s(this,Ut).doors=t}return s(this,Ut).doors}get annotations(){if(s(this,Ut).annotations==null){let t=s(this,la).annotations.filter(n=>n.floor.id===this.id);s(this,Ut).annotations=t}return s(this,Ut).annotations}get pois(){if(s(this,Ut).pois==null){let t=s(this,la).pointsOfInterest.filter(n=>n.floor.id===this.id);s(this,Ut).pois=t}return s(this,Ut).pois}get floorStack(){if(s(this,Ut).floorStack==null){let t=s(this,la).floorStacks.find(n=>n.floors.includes(this));s(this,Ut).floorStack=t}return s(this,Ut).floorStack}get center(){return s(this,Ut).center==null&&(s(this,Ut).center=lo(s(this,ni),this.id)),s(this,Ut).center}toJSON(){return{__type:Gf.__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,Ut)))delete s(this,Ut)[t]}};la=new WeakMap,Ut=new WeakMap,ni=new WeakMap,zf=new WeakSet,P4=function(t){let n=s(this,ni).properties[t];return s(this,la).getPropTranslation(this.__type,t,this.id,n)},h(Gf,"__type","floor");var IS=Gf,oi=IS;f();var Vf,Ga,nc,$f=class $f extends bn{constructor(t,n){super(t,{type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:n.mvfData});h(this,"__type",$f.__type);w(this,Vf);w(this,Ga);w(this,nc);O(this,Ga,{}),O(this,Vf,t),O(this,nc,n.mvfData)}static is(t){return t.__type===$f.__type}get accessible(){var t;return(t=s(this,nc).accessible)!=null?t:!1}get type(){var t;return(t=s(this,nc).type)!=null?t:"unknown"}get extra(){return s(this,nc).extra}get coordinates(){if(s(this,Ga).coordinates==null){s(this,Ga).coordinates=[];for(let t of this.nodes)s(this,Ga).coordinates.some(n=>n.isEqual(t.coordinate))||s(this,Ga).coordinates.push(t.coordinate)}return s(this,Ga).coordinates}get nodes(){return s(this,nc).nodes.map(t=>s(this,Vf).getById("node",t)).filter(Ap)}get floors(){return this.coordinates.map(t=>t.floorId?s(this,Vf).getById("floor",t.floorId):void 0).filter(Ap)}get focusTarget(){return this.coordinates}get navigationTarget(){return this.coordinates}toJSON(){return{__type:$f.__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,Ga)))delete s(this,Ga)[t]}};Vf=new WeakMap,Ga=new WeakMap,nc=new WeakMap,h($f,"__type","connection");var SS=$f,Hn=SS;f();var oc,vd,wo,ic,_4,ZO,Hf=class Hf extends bn{constructor(t,n){super(t,n.mvfData);w(this,_4);h(this,"__type",Hf.__type);w(this,oc);w(this,vd);w(this,wo,{});w(this,ic);O(this,oc,t),O(this,vd,n.floorId),O(this,ic,n.mvfData)}static is(t){return t.__type===Hf.__type}get type(){let t=s(this,ic).properties.kind;return t==null&&(t="object"),t==="Desks"&&(t="desk"),t.toLowerCase()}get enterpriseLocations(){return s(this,wo).enterpriseLocations!=null?s(this,wo).enterpriseLocations:(s(this,wo).enterpriseLocations=M4(s(this,oc),this.id),s(this,wo).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let t=s(this,oc).getById("floor",s(this,vd));if(t==null)throw new Error("Floor ".concat(s(this,vd)," not found!"));return t}get center(){return s(this,wo).center==null&&(s(this,wo).center=lo(s(this,ic),s(this,vd))),s(this,wo).center}get images3D(){var o;let t=(o=s(this,oc).floorImagesByAnchorId.get(this.id))!=null?o:[],n=se(this,_4,ZO).call(this);return n?[...t,n]:t}get geoJSON(){return oe(k({},s(this,ic)),{properties:null})}get anchorTarget(){return this.center}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get navigationTarget(){return this}toJSON(){return{__type:Hf.__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,wo)))s(this,wo)[t]=null}};oc=new WeakMap,vd=new WeakMap,wo=new WeakMap,ic=new WeakMap,_4=new WeakSet,ZO=function(){let t=s(this,ic).properties;if(t.image!=null)return s(this,wo).polygonImage==null&&(s(this,wo).polygonImage=new wi("".concat(this.id,"-polygon-image-").concat(ht()),t.image.path,this,s(this,oc).tokenManager)),s(this,wo).polygonImage},h(Hf,"__type","object");var CS=Hf,ii=CS;f();var Wf,xd,ac,Xf,Zf=class Zf extends bn{constructor(t,n){super(t,n.mvfData);h(this,"__type",Zf.__type);w(this,Wf);w(this,xd);w(this,ac,{});w(this,Xf);O(this,Wf,t),O(this,Xf,n.mvfData),O(this,xd,n.floorId)}static is(t){return t.__type===Zf.__type}get navigationTarget(){return this.coordinate}get floor(){let t=s(this,Wf).getById("floor",s(this,xd));if(t==null)throw new Error("Floor ".concat(s(this,xd)," not found!"));return t}get coordinate(){return s(this,ac).coordinate==null&&(s(this,ac).coordinate=lo(s(this,Xf),s(this,xd))),s(this,ac).coordinate}get geoJSON(){return oe(k({},s(this,Xf)),{properties:null})}get images3D(){var t;return(t=s(this,Wf).floorImagesByAnchorId.get(this.id))!=null?t:[]}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:Zf.__type,id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let t in s(this,ac))s(this,ac)[t]=null}};Wf=new WeakMap,xd=new WeakMap,ac=new WeakMap,Xf=new WeakMap,h(Zf,"__type","point-of-interest");var DS=Zf,Ai=DS;f();var qf,Ed,za,Id,Sd,F0,MS,Yf=class Yf extends bn{constructor(t,n){var o;super(t,n.mvfData);w(this,F0);h(this,"__type",Yf.__type);w(this,qf);w(this,Ed);w(this,za,{});w(this,Id);w(this,Sd);O(this,qf,t),O(this,Ed,n.floorId),O(this,Id,n.mvfData),O(this,Sd,(o=n.symbol)!=null?o:{url:"",name:""})}static is(t){return t.__type===Yf.__type}get group(){return se(this,F0,MS).call(this).group}get type(){return se(this,F0,MS).call(this).type}get coordinate(){return s(this,za).coordinate==null&&(s(this,za).coordinate=lo(s(this,Id),s(this,Ed))),s(this,za).coordinate}get floor(){let t=s(this,qf).getById("floor",s(this,Ed));if(t==null)throw new Error("Floor ".concat(s(this,Ed)," not found!"));return t}get name(){return super.name||s(this,Sd).name||""}get icon(){return s(this,za).icon==null&&(s(this,za).icon=super.icon||new Ns({mvfData:{url:s(this,Sd).url,altText:s(this,Sd).name},mapData:s(this,qf)})),s(this,za).icon}get geoJSON(){return oe(k({},s(this,Id)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}get navigationTarget(){return this.coordinate}toJSON(){return{__type:Yf.__type,id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let t of Object.keys(s(this,za)))delete s(this,za)[t]}};qf=new WeakMap,Ed=new WeakMap,za=new WeakMap,Id=new WeakMap,Sd=new WeakMap,F0=new WeakSet,MS=function(){let[t,n]=s(this,Id).properties.symbolId.split("--");return{group:t,type:n}},h(Yf,"__type","annotation");var TS=Yf,$a=TS;f();f();var WO=Dl(PS(),1);function $q(e,r,t){t===void 0&&(t={});var n=aa(e),o=aa(r),i=WO.default.union(n.coordinates,o.coordinates);return i.length===0?null:i.length===1?_l(i[0],t.properties):Dp(i,t.properties)}var XO=$q;var sc,co,Va,Kf,B0,OS,Jf=class Jf extends Ra{constructor(t,n){super(n.mvfData.id,t);w(this,B0);h(this,"__type",Jf.__type);w(this,sc);w(this,co,{});w(this,Va);w(this,Kf);O(this,sc,t),O(this,Va,n.mvfData),O(this,Kf,n.facadeId)}static is(t){return t.__type===Jf.__type}get type(){return s(this,Va).type}get name(){let t=se(this,B0,OS).call(this,"name");return typeof t=="string"?t:""}get shortName(){let t=se(this,B0,OS).call(this,"shortName");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,Va).externalId)!=null?t:""}get floors(){var t,n;if(s(this,co).floors==null){let o=((n=(t=s(this,Va).floors)!=null?t:s(this,Va).maps)!=null?n:[]).reduce((i,a)=>{let u=s(this,sc).floorsById[a];return u&&i.push(u),i},[]);o.length===0&&V.error("Floor stack ".concat(this.id," has no floors")),s(this,co).floors=o.sort((i,a)=>i.elevation-a.elevation)}return s(this,co).floors}get defaultFloor(){if(s(this,co).defaultFloor!=null)return s(this,co).defaultFloor;let t=s(this,Va).defaultFloor?s(this,sc).getById("floor",s(this,Va).defaultFloor):void 0;return s(this,co).defaultFloor=t||this.floors.reduce((n,o)=>Math.abs(o.elevation)<Math.abs(n.elevation)?o:n),s(this,co).defaultFloor}get facade(){return s(this,Kf)?s(this,sc).facadesById[s(this,Kf)]:void 0}get geoJSON(){if(s(this,co).geoJSON!=null)return s(this,co).geoJSON;let t=null;for(let n of this.floors){let o=n.geoJSON;t==null?t=o:t=XO(t,o)}return s(this,co).geoJSON=t!=null?t:{type:"Feature",properties:null,geometry:{type:"Polygon",coordinates:[]}},s(this,co).geoJSON}toJSON(){return{__type:Jf.__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,co)))delete s(this,co)[t]}};sc=new WeakMap,co=new WeakMap,Va=new WeakMap,Kf=new WeakMap,B0=new WeakSet,OS=function(t){return s(this,sc).getPropTranslation(this.__type,t,this.id,s(this,Va)[t])},h(Jf,"__type","floor-stack");var _S=Jf,O4=_S;f();var em,Cd,tm,$s,Qf=class Qf extends Ra{constructor(t,n){super(n.mvfData.id,t);h(this,"__type",Qf.__type);w(this,em);w(this,Cd);w(this,tm);w(this,$s,{});O(this,em,n.mvfData),O(this,Cd,t),O(this,tm,n.floorStackId)}static is(t){return t.__type===Qf.__type}get floorStack(){return s(this,Cd).getById("floor-stack",s(this,tm))}get spaces(){if(!s(this,$s).spaces){s(this,$s).spaces=[];for(let t of s(this,em).spaces){let n=s(this,Cd).getById("space",t.spaceId);n&&s(this,$s).spaces.push(n)}}return s(this,$s).spaces}get center(){if(!s(this,$s).center){let t={type:"FeatureCollection",features:[]};for(let o of this.spaces){let i=s(this,Cd).mvfSpacesById[o.id];i&&t.features.push(i)}if(t.features.length===0)throw new Kr("No geometry found for facade!");let n=Tf(t);s(this,$s).center=new ke({latitude:n.geometry.coordinates[1],longitude:n.geometry.coordinates[0],floorId:s(this,em).spaces[0].floorId})}return s(this,$s).center}get focusTarget(){return this.spaces}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{id:this.id,__type:Qf.__type,floorStackId:s(this,tm),floorStack:this.floorStack,spaces:this.spaces}}};em=new WeakMap,Cd=new WeakMap,tm=new WeakMap,$s=new WeakMap,h(Qf,"__type","facade");var FS=Qf,Pn=FS;f();var Vq=new Set(["wall","area"]),Hq=new Set(["desk-entrance"]),Zq=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}},Wq=(e,r,t)=>{var c,d,p,m,g,y,E,b,v,D,M;let n={},o={},i={},a={},u={},l={};for(let T of r["location.json"]||[]){let B=new Xu(e,{mvf2Data:T,mvf3Data:t[T.id]});if(n[T.id]=B,T.externalId&&(a[T.externalId]==null&&(a[T.externalId]=[]),a[T.externalId].push(B)),T.categories)for(let _ of T.categories)u[_]==null&&(u[_]=[]),u[_].push(B);let G=[...(d=(c=T.obstructions)==null?void 0:c.map(_=>_.id))!=null?d:[],...(m=(p=T.spaces)==null?void 0:p.map(_=>_.id))!=null?m:[],...(y=(g=T.annotations)==null?void 0:g.map(_=>_.id))!=null?y:[],...(E=T.connections)!=null?E:[],...(v=(b=T.entrances)==null?void 0:b.map(_=>_.id))!=null?v:[],...(M=(D=T.areas)==null?void 0:D.map(_=>_.id))!=null?M:[]];for(let _ of G)_&&(l[_]==null&&(l[_]=[]),l[_].push(B))}for(let T of r["category.json"]||[]){let B=new B4(e,{mvfData:T});o[T.id]=B,T.parent&&(i[T.parent]==null&&(i[T.parent]=[]),i[T.parent].push(B))}return{locationCategoriesByParentId:i,locationProfilesById:n,locationCategoriesById:o,locationProfilesByExternalId:a,locationProfilesByCategoryId:u,locationProfilesByAttachedFeatureId:l}},Xq=(e,r)=>{let t={},n={},o={},i={},a={},u={},l={},c={},d={},p=globalThis.Object.keys(e.space);for(let m of p){let g=e.space[m];if(g!=null){for(let y of g.features)if(d[y.properties.id]=m,u[y.properties.id]=y,y.properties.kind==="desk-entrance"&&(a[y.properties.externalId]==null&&(a[y.properties.externalId]=[]),a[y.properties.externalId].push(...y.properties.destinationNodes)),!uJ(y))if(y.properties.kind==="poi"||y.geometry.type==="Point"&&y.properties.kind==null){let E=new Ai(r,{floorId:m,mvfData:y});o[y.properties.id]=E,c[m]||(c[m]=[]),c[m].push(y),y.properties.externalId&&(i[y.properties.externalId]==null&&(i[y.properties.externalId]=[]),i[y.properties.externalId].push(E))}else if(y.geometry.type==="Point")V.warn("Encountered a point space with an unknown kind!",y.properties.kind);else{let E=new Lr(r,{floorId:m,mvfData:y});t[y.properties.id]=E,y.properties.externalId&&(n[y.properties.externalId]==null&&(n[y.properties.externalId]=[]),n[y.properties.externalId].push(E)),l[m]||(l[m]=[]),l[m].push(y)}}}return{spacesById:t,spacesByExternalId:n,poisById:o,poisByExternalId:i,objectEntranceNodeIdsByObstructionId:a,mvfSpacesById:u,mvfSpacesByFloorId:l,mvfPoisByFloorId:c}},Yq=(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 sa(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}},qq=(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 p of d.features){o[p.properties.id]=p;for(let g of p.properties.entrances)i[g]=p.properties.id;if(Vq.has((l=(u=p.properties.kind)==null?void 0:u.toLowerCase())!=null?l:""))continue;let m=new ii(r,{floorId:c,mvfData:p});t[p.properties.id]=m,p.properties.externalId&&(n[p.properties.externalId]==null&&(n[p.properties.externalId]=[]),n[p.properties.externalId].push(m))}}return{objectsById:t,objectsByExternalId:n,mvfObstructionById:o,obstructionIdByEntranceId:i}},Jq=(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 oi(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 oi(r,{mvfData:{properties:i}});t[i.id]=a}return{floorsById:t,floorsByExternalId:n,mvfFloorsById:o}},Kq=(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],p=new O4(r,{mvfData:c,facadeId:d==null?void 0:d.id});if(t[c.id]=p,c.externalId&&(n[c.externalId]==null&&(n[c.externalId]=[]),n[c.externalId].push(p)),o[c.id]=c,d){let m=new Pn(r,{mvfData:d,floorStackId:c.id});i[d.id]=m;for(let g of d.spaces)a[g.spaceId]=m}}return{floorStacksById:t,floorStacksByExternalId:n,mvfFloorStacksById:o,facadesById:i,facadesBySpaceId:a}},Qq=(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 Hn(r,{mvfData:a});return t[a.id]=u,i},{});return{connectionsById:t,mvfConnectionsById:n,mvfConnectionsByNodeId:o}},eJ=(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 p=new Mo(r,{floorId:l,mvfData:d});d.properties.node&&(o[d.properties.node]=p),t[d.properties.id]=p,d.properties.externalId&&(n[d.properties.externalId]==null&&(n[d.properties.externalId]=[]),n[d.properties.externalId].push(p)),a[l]||(a[l]=[]),a[l].push(d)}}return{doorsById:t,doorsByExternalId:n,doorsByNodeId:o,mvfEntrancesById:i,mvfEntrancesByFloorId:a}},tJ=(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)}}}}},rJ=(e,r,t,n)=>{var o;if(e.floorImages!=null)for(let i in e.floorImages){let a=(o=e.floorImages[i])==null?void 0:o.features;if(a!=null){for(let u of a)if("anchorId"in u.properties){let l=u==null?void 0:u.properties,c=r[l.anchorId]||t[l.anchorId]||n[l.anchorId];if(c!=null&&l!=null){let d=c.properties;d.image=l,d.image&&(d.image.position=u.geometry.coordinates)}}}}},nJ=(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}}})}},oJ=(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)}}},iJ=(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 $a(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}},aJ=(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 ua(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}},sJ=(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 p of c)r[p]!=null&&d.push(p),n[p]==null&&(n[p]=[]),n[p].push(l.properties.id),l.properties.kind==="desk-entrance"&&(o[p]==null&&(o[p]=[]),o[p].push(l.properties.externalId));d.length>0&&(t[u]=d),i[u]=c}return{entranceNodeIdsBySpaceId:t,spaceIdsByNodeId:n,objectIdsByNodeId:o,destinationNodesIdsBySpaceId:i}},YO=(e,r)=>{var D,M,T,B,G,_,F,A,j,N,Z,ie,de,J;let t={},n={},o={},i={},a=((M=(D=e.enterprise)==null?void 0:D.locations)!=null?M:[]).reduce((z,X)=>(z[X.id]=X,z),{}),u={},l={},c={},d={},p={},m={},g=((T=e.enterprise)==null?void 0:T.venue)||{},y={},E={},b={};for(let z of(G=(B=e.enterprise)==null?void 0:B.categories)!=null?G:[]){let X=new F4(r,{mvfData:z});u[z.id]=X,z.externalId&&(l[z.externalId]==null&&(l[z.externalId]=[]),l[z.externalId].push(X)),c[z.id]=z,z.locations.forEach(W=>{p[W]==null&&(p[W]=[]),p[W].push(z.id)})}let v={};for(let z of(F=(_=e.enterprise)==null?void 0:_.locationInstances)!=null?F:[]){let X=a[z.parent],W=Object.keys(X),ee={};for(let Ce of W)ee[Ce]=void 0;let ce=k(oe(k({},ee),{polygons:[],nodes:[]}),z);v[ce.parent]==null&&(v[ce.parent]=[]);let ye=new ri(r,{mvfData:ce,categoryIds:((j=(A=e.enterprise)==null?void 0:A.categoryPriorities)==null?void 0:j[ce.id])||p[ce.id],parentId:z.parent});v[ce.parent].push(ye);for(let Ce of(N=z.polygons)!=null?N:[])b[Ce.id]=ye;y[ce.id]=z,E[ce.id]=ye,z.externalId&&(i[z.externalId]==null&&(i[z.externalId]=[]),i[z.externalId].push(ye))}for(let z of(ie=(Z=e.enterprise)==null?void 0:Z.locations)!=null?ie:[]){let X=new ri(r,{mvfData:z,categoryIds:((J=(de=e.enterprise)==null?void 0:de.categoryPriorities)==null?void 0:J[z.id])||p[z.id],locationInstances:v[z.id]});o[z.id]=X,z.externalId&&(i[z.externalId]==null&&(i[z.externalId]=[]),i[z.externalId].push(X)),z.nodes.forEach(W=>{m[W.id]==null&&(m[W.id]=[]),m[W.id].push(z.id)});for(let W of z.polygons)d[W.id]==null&&(d[W.id]=[]),d[W.id].push(z)}if(r.enterpriseMode===!0){for(let z in r.mvfConnectionsById){let X={},W=r.mvfConnectionsById[z],ee={id:z,externalId:W.externalId,kind:"enterprise."+W.type,destinationNodes:[],flags:W.flags,type:W.type,nodes:W.nodes,accessible:W.accessible,extra:W.extra,details:W.details};for(let ce of r.mvfConnectionsById[z].nodes){let ye=r.nodesById[ce];ye!=null&&(X[ye.floor.id]={type:"Feature",geometry:{type:"Point",coordinates:[ye.coordinate.longitude,ye.coordinate.latitude]},properties:ee})}Object.keys(X).length>0&&(t[z]=new Hn(r,{mvfData:ee}),W.externalId&&(n[W.externalId]==null&&(n[W.externalId]=[]),n[W.externalId].push(t[z])))}r.connectionsById=t}return{connectionsByExternalId:n,locationIdsByNodeId:m,mvfLocationsByGeometryId:d,mvfLocationsById:a,mvfCategoriesById:c,locationsById:o,locationInstancesById:E,instanceLocationsByPolygonId:b,locationsByExternalId:i,mvfLocationInstancesById:y,categoriesById:u,categoriesByExternalId:l,venue:g}},qO=(e,r,t)=>{let{nodesById:n,nodesByExternalId:o,mvfNodesById:i,mvfNodesByFloorId:a}=Yq(r,e),{connectionsById:u,mvfConnectionsById:l,mvfConnectionsByNodeId:c}=Qq(r,e),{spacesById:d,spacesByExternalId:p,poisById:m,poisByExternalId:g,mvfSpacesById:y,objectEntranceNodeIdsByObstructionId:E,mvfSpacesByFloorId:b,mvfPoisByFloorId:v}=Xq(r,e),{objectsById:D,objectsByExternalId:M,mvfObstructionById:T,obstructionIdByEntranceId:B}=qq(r,e),{floorsById:G,floorsByExternalId:_,mvfFloorsById:F}=Jq(r,e),{floorStacksById:A,floorStacksByExternalId:j,mvfFloorStacksById:N,facadesById:Z,facadesBySpaceId:ie}=Kq(r,e),{doorsById:de,doorsByExternalId:J,doorsByNodeId:z,mvfEntrancesById:X,mvfEntrancesByFloorId:W}=eJ(r,e),{annotationsById:ee,mvfAnnotationsById:ce,mvfAnnotationsByFloorId:ye}=iJ(r,e),{areasById:Ce,areasByExternalId:Pe,mvfAreasById:Le}=aJ(r,e);rJ(r,y,T,Le),tJ(r,y,T),nJ(r,y),oJ(r,y,T);let{mvf3LocationsById:be}=Zq(t),{locationCategoriesByParentId:He,locationProfilesById:tt,locationCategoriesById:lt,locationProfilesByExternalId:U,locationProfilesByCategoryId:ve,locationProfilesByAttachedFeatureId:Y}=Wq(e,r,be),{entranceNodeIdsBySpaceId:we,spaceIdsByNodeId:De,objectIdsByNodeId:xe,destinationNodesIdsBySpaceId:Ne}=sJ(y,z);return{spacesById:d,spacesByExternalId:p,nodesById:n,nodesByExternalId:o,objectsById:D,objectsByExternalId:M,floorsById:G,floorsByExternalId:_,floorStacksById:A,floorStacksByExternalId:j,facadesById:Z,facadesBySpaceId:ie,connectionsById:u,doorsById:de,doorsByExternalId:J,doorsByNodeId:z,poisById:m,poisByExternalId:g,annotationsById:ee,areasById:Ce,areasByExternalId:Pe,objectEntranceNodeIdsByObstructionId:E,obstructionIdByEntranceId:B,locationProfilesById:tt,locationCategoriesById:lt,locationProfilesByExternalId:U,locationProfilesByCategoryId:ve,locationCategoriesByParentId:He,mvfSpacesById:y,mvfNodesById:i,mvfObstructionById:T,mvfFloorsById:F,mvfFloorStacksById:N,mvfConnectionsById:l,mvfConnectionsByNodeId:c,mvfEntrancesById:X,mvfAnnotationsById:ce,mvfNodesByFloorId:a,mvfSpacesByFloorId:b,mvfPoisByFloorId:v,mvfAreasById:Le,mvfEntrancesByFloorId:W,mvfAnnotationsByFloorId:ye,locationProfilesByAttachedFeatureId:Y,entranceNodeIdsBySpaceId:we,spaceIdsByNodeId:De,objectIdsByNodeId:xe,destinationNodesIdsBySpaceId:Ne,mvf3LocationsById:be}};function uJ(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"))||Hq.has((t=e.properties.kind)!=null?t:"")}f();var lJ=new Set(["polygons"]),Pi,_t,vn,k0,rm=class rm extends yn{constructor(t,n){super(n.mvfData.externalId);h(this,"__type",rm.__type);h(this,"description");h(this,"name","");h(this,"amenity");h(this,"externalId","");h(this,"extra");h(this,"gallery");h(this,"instances");h(this,"logo");h(this,"operationHours");h(this,"phone");h(this,"picture");h(this,"shortName");h(this,"showFloatingLabelWhenImagePresent");h(this,"showLogo");h(this,"siblingGroups");h(this,"social");h(this,"sortOrder",-1);h(this,"states");h(this,"tags");h(this,"type","");h(this,"hidden",!1);h(this,"primaryCategory");w(this,Pi);w(this,_t,{});w(this,vn);w(this,k0);O(this,Pi,t),O(this,vn,n.mvfData),O(this,k0,n.categoryIds||[]),this.instances=n.locationInstances||[];for(let o in n.mvfData)!lJ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{enumerable:!0,get(){if(n.parentId){let i=s(this,Pi).locationsById[n.parentId];return s(this,vn)[o]!=null?s(this,Pi).getPropTranslation(this.__type,o,s(this,vn).id,s(this,vn)[o]):s(this,Pi).getPropTranslation(this.__type,o,s(this,vn).id,i[o])}return s(this,Pi).getPropTranslation(this.__type,o,s(this,vn).id,s(this,vn)[o])}})}static is(t){return t.__type===rm.__type}get focusTarget(){return this.spaces.length>0?this.spaces:this.coordinates}get navigationTarget(){return this.spaces}get categories(){return s(this,_t).categories?s(this,_t).categories:(s(this,_t).categories=(s(this,k0).map(t=>s(this,Pi).getById("enterprise-category",t))||[]).filter(Boolean),s(this,_t).categories)}get coordinates(){if(s(this,_t).coordinates)return s(this,_t).coordinates;s(this,_t).coordinates=[];for(let t=0;t<this.nodes.length;t++)s(this,_t).coordinates.push(this.nodes[t].coordinate);return s(this,_t).coordinates}get nodes(){if(s(this,_t).nodes)return s(this,_t).nodes;s(this,_t).nodes=[];for(let t=0;t<s(this,vn).nodes.length;t++){let n=s(this,Pi).getById("node",s(this,vn).nodes[t].id);n&&s(this,_t).nodes.push(n)}return s(this,_t).nodes}get points(){if(s(this,_t).points)return s(this,_t).points;s(this,_t).points=[];for(let t=0;t<s(this,vn).spaces.length;t++){let n=s(this,Pi).getById("point-of-interest",s(this,vn).spaces[t].id);n&&s(this,_t).points.push(n)}return s(this,_t).points}get spaces(){if(s(this,_t).spaces)return s(this,_t).spaces;s(this,_t).spaces=[];let t=Array.isArray(s(this,vn).spaces)?s(this,vn).spaces:s(this,vn).polygons;for(let n=0;n<t.length;n++){let o=s(this,Pi).getById("space",t[n].id);o&&s(this,_t).spaces.push(o)}return s(this,_t).spaces}get objects(){if(s(this,_t).objects)return s(this,_t).objects;s(this,_t).objects=[];for(let t=0;t<s(this,vn).polygons.length;t++){let n=s(this,Pi).getById("object",s(this,vn).polygons[t].id);n&&s(this,_t).objects.push(n)}return s(this,_t).objects}toJSON(){return{__type:rm.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,_t)))delete s(this,_t)[t]}};Pi=new WeakMap,_t=new WeakMap,vn=new WeakMap,k0=new WeakMap,h(rm,"__type","enterprise-location");var BS=rm,ri=BS;f();var cJ=new Set,Dd,Ao,Vs,nm=class nm extends yn{constructor(t,n){super(n.mvfData.externalId);h(this,"__type",nm.__type);h(this,"name","");h(this,"color");h(this,"externalId","");h(this,"extra");h(this,"icon");h(this,"iconFromDefaultList");h(this,"sortOrder",-1);h(this,"picture");w(this,Dd);w(this,Ao,{});w(this,Vs);O(this,Dd,t),O(this,Vs,n.mvfData);for(let o in n.mvfData)!cJ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{get(){return s(this,Dd).getPropTranslation(this.__type,o,s(this,Vs).id,s(this,Vs)[o])}})}static is(t){return t.__type===nm.__type}get children(){if(s(this,Ao).children)return s(this,Ao).children;s(this,Ao).children=[];for(let t=0;t<s(this,Vs).children.length;t++){let n=s(this,Dd).getById("enterprise-category",s(this,Vs).children[t]);n&&s(this,Ao).children.push(n)}return s(this,Ao).children}get locations(){if(s(this,Ao).locations)return s(this,Ao).locations;s(this,Ao).locations=[];for(let t=0;t<s(this,Vs).locations.length;t++){let n=s(this,Dd).getById("enterprise-location",s(this,Vs).locations[t]);n&&s(this,Ao).locations.push(n)}return s(this,Ao).locations}toJSON(){return{__type:nm.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,Ao)))delete s(this,Ao)[t]}};Dd=new WeakMap,Ao=new WeakMap,Vs=new WeakMap,h(nm,"__type","enterprise-category");var kS=nm,F4=kS;f();var dJ=new Set,L0,Td,om=class om extends yn{constructor(t,n){super(n.mvfData.externalId);h(this,"__type",om.__type);h(this,"countrycode");h(this,"coverImage");h(this,"externalId","");h(this,"defaultLanguage",{code:"en",name:"English"});h(this,"defaultFloor");h(this,"extra");h(this,"icon");h(this,"languages",[]);h(this,"links",[]);h(this,"logo");h(this,"mappedinWebUrl");h(this,"operationHours");h(this,"slug","");h(this,"topLocations");h(this,"tzid");w(this,L0,{});w(this,Td);O(this,Td,n.mvfData);for(let o in n.mvfData)!dJ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&(this[o]=n.mvfData[o])}static is(t){return t.__type===om.__type}get name(){var t;return(t=s(this,Td).name)!=null?t:""}get defaultMap(){var t,n;return(n=(t=s(this,Td).defaultMap)!=null?t:this.defaultFloor)!=null?n:""}get enterpriseType(){var t;return(t=s(this,Td).type)!=null?t:void 0}toJSON(){return{__type:om.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,L0)))delete s(this,L0)[t]}};L0=new WeakMap,Td=new WeakMap,h(om,"__type","enterprise-venue");var LS=om,RS=LS;f();f();function R0(e,r,t=[]){let n=k({},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=pJ(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(m=>[JO(m,u),m])),p=l.map(m=>{let g=c.get(JO(m,u));return g?R0(m,g,t):m});n[a]=p}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]=R0(u,i,t):n[o]=i}}else n[o]=i;return n}function pJ(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 JO(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}f();f();f();f();f();var KO=(i=>(i.Departure="Departure",i.TakeConnection="TakeConnection",i.ExitConnection="ExitConnection",i.Turn="Turn",i.Arrival="Arrival",i))(KO||{}),NS=(a=>(a.Straight="Straight",a.Right="Right",a.SlightRight="SlightRight",a.Left="Left",a.SlightLeft="SlightLeft",a.Back="Back",a))(NS||{}),QO=(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))(QO||{}),k4=(t=>(t.Exterior="exterior-walls",t.Interior="interior-walls",t))(k4||{}),L4=(t=>(t.Interior="interior-doors",t.Exterior="exterior-doors",t))(L4||{});f();function jS(e,r,t,n,o){if(e===void 0)return!1;if(typeof e=="boolean")return e;let i=Dr(n,o),a=Math.abs(t-r);return XD(Math.atan2(a,i))>=e}function eF(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}=Ip(a),c=u(r),d=u(t),p=d.x-c.x,m=d.y-c.y,g=i-o,y=Math.sqrt(p*p+m*m+g*g);if(y<=n*2)return null;let E=n/y,b={x:c.x+p*E,y:c.y+m*E},v=l(b.x,b.y),D=r[2]!==void 0?r[2]+g*E:void 0,M={x:d.x-p*E,y:d.y-m*E},T=l(M.x,M.y),B=t[2]!==void 0?t[2]-g*E:void 0;return{fromPosition:D!==void 0?[v.lon,v.lat,D]:[v.lon,v.lat],toPosition:B!==void 0?[T.lon,T.lat,B]:[T.lon,T.lat]}}function US(e,r,t,n,o){let i=eF({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 _i(e){return e.verticalOffset===0?[e.longitude,e.latitude]:[e.longitude,e.latitude,e.verticalOffset]}function hJ(e){return new Map(e.map(r=>{let{properties:t}=r,{id:n}=t;return[n,r]}))}var $S=(e,r)=>{let t=hJ(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}=lS(o,a);i=l.map(c=>c.geometry.coordinates),n.entrances.features.push(...u)}n.walls.geometry.coordinates.push(...i)}return n};function rF(e,r){return((r-e+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}function nF(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 oF(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 VS(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=oe(k({},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 im(e,r={}){var i,a,u,l,c,d,p;let t=oe(k({},e),{flipImageToFaceCamera:(i=r==null?void 0:r.flipImagesToFaceCamera)!=null?i:!0}),n=(u=(a=r==null?void 0:r.style)==null?void 0:a.shading)!=null?u:r==null?void 0:r.shadingAndOutlines;n===!0?t.shading={start:.1,end:.15,intensity:.4}:typeof n=="object"&&(t.shading={start:n.start,end:n.end,intensity:n.intensity});let o=(c=(l=r==null?void 0:r.style)==null?void 0:l.outlines)!=null?c:r==null?void 0:r.shadingAndOutlines;if(t.outline=typeof o=="object"?!0:o,"lineStrings"in e){let m=(p=(d=r==null?void 0:r.style)==null?void 0:d.wallTopColor)!=null?p:r==null?void 0:r.wallTopColor;m!=null&&(t.topColor=m)}return t}var HS=(e,r)=>{var o;let n=((o=r.currentMap)==null?void 0:o.currentFloor).layers.get(Mr);switch(e){case"interior-walls":return n==null?void 0:n.layers.get(ec);case"exterior-walls":return n==null?void 0:n.layers.get(js);case"interior-doors":return n==null?void 0:n.layers.get(kf);case"exterior-doors":return n==null?void 0:n.layers.get(Lf);default:return typeof e=="string"?e:e==null?void 0:e.id}};function ZS(e){return new Promise(r=>{e.onComplete(r),e.onStop(r)})}function iF(e){return e.bbox?e.bbox:gu(e)}function am(e,r,t){return e.floorId&&r.has(e.floorId)?r.get(e.floorId):t}function sm(e){if(Lr.is(e)||ii.is(e))return e.id}function aF(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 sF(e,r){let t=e.properties.path.split("/"),n=t[t.length-1].split(".")[0],o=atob(n);return"img_"+fu(o).toString()+"-"+r}function GS(e="auto",r,t=1,n){return e!=="auto"?e*t:r!=null?r*t:n!=null?n*t:3*t}function tF(e,r,t,n){if(e.maxHeight!=null&&e.maxHeight>0)return GS(r,e.maxHeight,t,n);let o=GS(r,void 0,t,n);if(r==="auto"&&"geometryMaxHeight"in e){let i=e.geometryMaxHeight;if(i!=null&&i>0){let a=Math.ceil(i*1.1);if(a>o)return a}}return o}function uF(e,r="auto",t=1,n,o){if(!e.length)return new Map;let i=e.sort((d,p)=>d.elevation-p.elevation),a=i.findIndex(d=>d.elevation>=0);a===-1&&(a=i.length);let u=0,l=new Map,c=-1;for(let d=a;d<i.length;d+=1){let p=i[d],m=tF(p,r,t,n);if(!o){let g=p.elevation-c-1;g>0&&(u+=g*m)}l.set(p.elevation,{altitude:u,visualHeight:m}),u+=m,c=p.elevation}u=0;for(let d=a-1;d>=0;d-=1){let p=i[d],m=tF(p,r,t,n),g=-(u+m);l.set(p.elevation,{altitude:g,visualHeight:m}),u+=m}return l}function lF(e,r,t="auto",n=1,o){var c,d;let i=[...e].sort((p,m)=>p.elevation-m.elevation),a=i.findIndex(p=>p.elevation>=0);if(a===-1)return[];let u=[],l=-1;for(let p=a;p<i.length;p+=1){let m=i[p],g=m.elevation-l-1;if(g>0){let y=r.get(m.elevation),E=(c=y==null?void 0:y.visualHeight)!=null?c:GS(t,void 0,n,o),b=g*E,v=(d=y==null?void 0:y.altitude)!=null?d:0;u.push({altitude:v-b,height:b,floorAboveElevation:m.elevation,missingCount:g})}l=m.elevation}return u}function R4(e,r){let t=r(e.center);return{center:new ke({latitude:t[1],longitude:t[0]}),radius:e.radius}}function cF(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 dF=Math.PI*.1,Po,ai,Oi,Ju,Md,lm,ca,pF,um,fF,uc=class{constructor(r,t,n,o,i){w(this,ca);h(this,"id");w(this,Po,{});w(this,ai);w(this,Oi);h(this,"departure");h(this,"destination");w(this,Ju);w(this,Md);w(this,lm);var a;this.id=(a=i==null?void 0:i.id)!=null?a:ht(),O(this,ai,t),O(this,Oi,r.features),this.departure=n,this.destination=o}get path(){return s(this,Oi).map(r=>s(this,ai).getById("node",r.properties.id)).filter(Boolean)}get coordinates(){return s(this,Po).coordinates?s(this,Po).coordinates:(s(this,Po).coordinates=s(this,Oi).map(r=>new ke(r.geometry.coordinates[1],r.geometry.coordinates[0],r.properties.groupBy)),s(this,Po).coordinates)}get distance(){return s(this,Po).distance?s(this,Po).distance:(s(this,Po).distance=s(this,Oi).reduce((r,t)=>r+(t.properties.distance||0),0),s(this,Po).distance)}get instructions(){if(s(this,Oi).length<2)return[];if(s(this,Po).instructions)return s(this,Po).instructions;let r=[],t=0;for(let n=0;n<s(this,Oi).length;n++){let o=s(this,Oi)[n],i=s(this,Oi)[n-1],a=s(this,Oi)[n+1],u=new ke(o.geometry.coordinates[1],o.geometry.coordinates[0],o.properties.groupBy),l=se(this,ca,pF).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,ai).getById("node",o.properties.id)}),t=0)}return s(this,Po).instructions=r,s(this,Po).instructions}toJSON(){return{id:this.id,directions:s(this,Oi),__type:"directions",from:this.departure,to:this.destination,coordinates:this.coordinates,distance:this.distance,instructions:this.instructions}}};Po=new WeakMap,ai=new WeakMap,Oi=new WeakMap,Ju=new WeakMap,Md=new WeakMap,lm=new WeakMap,ca=new WeakSet,pF=function(r){var y,E;let{prevDirection:t,direction:n,nextDirection:o}=r,i=t&&s(this,ai).getById("floor",t.properties.groupBy),a=s(this,ai).getById("floor",n.properties.groupBy),u=o&&s(this,ai).getById("floor",o.properties.groupBy),l=[];t||l.push({type:"Departure"});let c=s(this,ai).getMVFFeatureByNodeId("connection",n.properties.id),d=c?s(this,ai).getById("connection",c.id):void 0,p=c&&c.nodes.length>1,m=s(this,ai).enterpriseMode&&(!n.properties.destination||!(c!=null&&c.nodes.includes(n.properties.destination))||!(c!=null&&c.nodes.includes(n.properties.id)));if(c&&!(!p||m))if(!s(this,Ju)||s(this,Ju)==="exit")l.push(se(this,ca,um).call(this,"TakeConnection",a,u,d,c)),O(this,Ju,"take"),O(this,Md,d),O(this,lm,c);else{let b=s(this,ai).getMVFFeatureByNodeId("connection",(y=t==null?void 0:t.properties.id)!=null?y:""),v=s(this,ai).getById("connection",(E=b==null?void 0:b.id)!=null?E:"");l.push(se(this,ca,um).call(this,"ExitConnection",a,i,v,b)),O(this,Ju,"exit"),O(this,Md,d),O(this,lm,c)}else s(this,Ju)==="take"?(l.push(se(this,ca,um).call(this,"ExitConnection",a,i,s(this,Md),s(this,lm))),O(this,Ju,"exit"),O(this,Md,d)):u&&(a==null?void 0:a.id)!==u.id?l.push(se(this,ca,um).call(this,"TakeConnection",a,u,d)):i&&i.id!==(a==null?void 0:a.id)?l.push(se(this,ca,um).call(this,"ExitConnection",a,i,d)):l.push(se(this,ca,fF).call(this,t,n));return o||l.push({type:"Arrival"}),l},um=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 p=u-n.elevation;p>0?a="down":p<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}},fF=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?-rF(r.properties.angle,t.properties.angle):0;return Math.abs(i)>=dF?{type:"Turn",bearing:nF(i,dF),referencePosition:"At"}:null};f();f();f();f();f();f();f();var _o=class{constructor({origin:r,destination:t,distance:n=0,angle:o=0,pathWeight:i=0,multiplicativeDistanceWeightScaling:a=!0}){h(this,"origin");h(this,"destination");h(this,"distance");h(this,"angle");h(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.")}};f();f();f();f();function Ha(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=ia(e),o=aa(r),i=o.type,a=r.bbox,u=o.coordinates;if(a&&gJ(n,a)===!1)return!1;i==="Polygon"&&(u=[u]);for(var l=!1,c=0;c<u.length&&!l;c++)if(mF(n,u[c][0],t.ignoreBoundary)){for(var d=!1,p=1;p<u[c].length&&!d;)mF(n,u[c][p],!t.ignoreBoundary)&&(d=!0),p++;d||(l=!0)}return l}function mF(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 p=u>e[1]!=c>e[1]&&e[0]<(l-a)*(e[1]-u)/(c-u)+a;p&&(n=!n)}return n}function gJ(e,r){return r[0]<=e[0]&&r[1]<=e[1]&&r[2]>=e[0]&&r[3]>=e[1]}f();f();function Zn([e,r],[t,n]){let o=r-n,i=e-t;return(Math.atan2(i,o)+Math.PI*3)%(Math.PI*2)}f();f();function N4(e,r,t,n){let[o,i]=e,[a,u]=r,[l,c]=t,[d,p]=n;if(i===u&&o===a||c===p&&l===d)return null;let m=(d-l)*(u-i)-(p-c)*(a-o);if(m===0)return null;let g=((p-c)*(o-l)-(d-l)*(i-c))/m,y=((u-i)*(o-l)-(a-o)*(i-c))/m;if(g<0||g>1||y<0||y>1)return null;let E=i+g*(u-i);return[o+g*(a-o),E]}f();function WS(e,r,t,n){let o=od(e,t/1e3,n),i=od(r,t/1e3,n);return[o.geometry.coordinates,i.geometry.coordinates]}f();function XS(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 hF=111e3;function Za(e,r,t=[],n=0){let o=!0,i=e.geometry.coordinates,a=r.geometry.coordinates,u=XS(Zn(i,a)-Math.PI/2),l=XS(Zn(i,a)+Math.PI/2),c=n/hF,d=n/(hF*Math.cos(i[1]*Math.PI/180)),p=Math.min(i[1],a[1])-c,m=Math.max(i[1],a[1])+c,g=Math.min(i[0],a[0])-d,y=Math.max(i[0],a[0])+d;for(let E of t)if(!(Math.max(E[0][1],E[1][1])<p||Math.min(E[0][1],E[1][1])>m||Math.max(E[0][0],E[1][0])<g||Math.min(E[0][0],E[1][0])>y)){if(n>0){let b=WS(i,a,n,u),v=WS(i,a,n,l);if(N4(b[0],b[1],E[0],E[1])||N4(v[0],v[1],E[0],E[1]))return o=!1,!1}else if(N4(i,a,E[0],E[1]))return o=!1,!1}return o}f();function gF(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),p=l/d,m=c/d,g={x:o+p*r,y:i+m*r},y={x:o-p*r,y:i-m*r};return[g,y]}var N0=.4,wd,Wn,YS,yF,bF,vF,xF,EF,IF,U4,j4=class{constructor({nodes:r,groupBy:t,multiplicativeDistanceWeightScaling:n}){w(this,Wn);h(this,"edges",{});h(this,"nodesById");h(this,"nodesByGroup",new Map);w(this,wd);h(this,"hasLineOfSight",(r,t,n=[],o=N0)=>Za({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);w(this,U4,(r,t)=>{let n=0;for(let o of t)(!o[s(this,wd)]||o[s(this,wd)]===r.properties[s(this,wd)])&&Ha(r.geometry.coordinates,o.geometry.geometry)&&(n+=Math.max(0,o.cost));return n});O(this,wd,t);let{features:o}=r;this.nodesById=se(this,Wn,yF).call(this,o),se(this,Wn,bF).call(this),se(this,Wn,vF).call(this,o,t,{multiplicativeDistanceWeightScaling:n})}getShortestEuclideanDistance(r,t){return t.reduce((n,o)=>{let i=qD(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={},p=new Set,m=[];for(l.push({node:u,distance:0}),c[u.properties.id]=null,d[u.properties.id]=0;l.length>0;){l.sort((v,D)=>v.distance-D.distance);let y=l.shift();if(!y)break;let E=y.node,b=y.distance;if(!p.has(E.properties.id)){if(p.add(E.properties.id),m.length>=a)break;E.properties.id!=null&&n.includes((g=E.properties.id)==null?void 0:g.toString())&&(i?this.hasLineOfSight(u.geometry.coordinates,E.geometry.coordinates,o)&&m.push({feature:E,distance:b}):m.push({feature:E,distance:b}));for(let v of this.edges[E.properties.id]){let D=v.destination,M=b+v.distance,T=d[E.properties.id]+v.weight;M>t||p.has(D.properties.id)||d[D.properties.id]!==void 0&&T>=d[D.properties.id]||(d[D.properties.id]=T,c[D.properties.id]=v,l.push({node:D,distance:M}))}}}return m.sort((y,E)=>y.distance-E.distance)}aStar({originIds:r,destinationNodeIds:t,disabledConnectionNodeIds:n,zones:o,overrideEdgeWeights:i,disabledNodeIds:a}){var m;let u=se(this,Wn,YS).call(this,r),l=se(this,Wn,YS).call(this,t);if(u.length===0||l.length===0)return[];let{frontier:c,cameFrom:d,costSoFar:p}=se(this,Wn,xF).call(this,u,l);for(;c.length>0;){let g=c.shift();if(!g)break;if(se(this,Wn,EF).call(this,g.origin,l))return se(this,Wn,IF).call(this,d,g.origin.properties.id);for(let y of this.edges[g.origin.properties.id]){let E=(m=i==null?void 0:i.get(y))!=null?m:y.weight,b=y.destination.properties.map!==y.origin.properties.map,v=n==null?void 0:n.has(y.destination.properties.id);if(n!=null&&n.has(y.origin.properties.id)&&(b||v)||a!=null&&a.has(y.origin.properties.id))continue;let D=p[g.origin.properties.id]+E+s(this,U4).call(this,y.destination,o);if(D!==1/0&&(p[y.destination.properties.id]==null||D<p[y.destination.properties.id])){let M=D+this.getShortestEuclideanDistance(y.destination,l);p[y.destination.properties.id]=D,d[y.destination.properties.id]=y,c.push({origin:y.destination,priority:M})}}c.sort((y,E)=>y.priority-E.priority)}return[]}};wd=new WeakMap,Wn=new WeakSet,YS=function(r){return r.map(t=>this.nodesById[t]).filter(Boolean)},yF=function(r){return r.reduce((t,n)=>(t[n.properties.id]=n,t),{})},bF=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]))},vF=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=Dr(o.geometry.coordinates,l.geometry.coordinates),d=Zn(o.geometry.coordinates,l.geometry.coordinates);return new _o({origin:o,destination:l,pathWeight:u,distance:c,angle:d,multiplicativeDistanceWeightScaling:n==null?void 0:n.multiplicativeDistanceWeightScaling})})})},xF=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}},EF=function(r,t){return t.some(n=>n.properties.id===r.properties.id)},IF=function(r,t){let n=[],o=r[t];for(;o;)n.push(o),o=r[o.origin.properties.id];return n.reverse()},U4=new WeakMap;f();function yJ(e,r,t,n){let o=t[e].origin,i=r===t.length?n:t[r].origin;return Dr(o.geometry.coordinates,i.geometry.coordinates)}function SF(e,r,t,n=N0){if(e.length<3)return e;let o=1e-4,i=e.length,a=new Set;for(let m=0;m<i;m++)e[m].origin.properties.preventSmoothing&&a.add(m);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 m=0;m<i;m++){let g=!0;if(l[m].cost!==1/0){for(let y=m+1;y<=i;y++){let E=y===i?u:e[y].origin;if(Dr(e[m].origin.geometry.coordinates,E.geometry.coordinates)<.01)continue;let v=y===m+1&&y<i&&a.has(y),D=y===m+1&&a.has(m);if(!v&&!D&&!Za(e[m].origin,E,r,n))continue;if(y>m+1){let _=!1;for(let F=m+1;F<y;F++)if(a.has(F)){_=!0;break}if(_)continue}let M=yJ(m,y,e,u),B=(y-m-1)*o,G=l[m].cost+M-B;G<l[y].cost&&(l[y]={cost:G,prev:m},g=!1)}g&&l[m+1].cost===1/0&&(l[m+1].cost=l[m].cost,l[m+1].prev=m)}}let c=[],d=i;for(;d!==-1;)c.unshift(d),d=l[d].prev===-1?d-1:l[d].prev;let p=[];for(let m=0;m<c.length-1;m++){let g=c[m],y=c[m+1],E=e[g].origin,b=y===i?u:e[y].origin;p.push(new _o({origin:E,destination:b,distance:Dr(E.geometry.coordinates,b.geometry.coordinates),angle:Zn(E.geometry.coordinates,b.geometry.coordinates),multiplicativeDistanceWeightScaling:t}))}return p}f();var TF=Dl(qS());f();var CF=yD("Navigator");function z4(e,r,t){if(e==null||e[r]==null)return!1;let n=1<<t;return(e[r]&n)!==0}f();var bJ=.5;function DF(e,r,t,n,o,i){var y,E;if(!((E=(y=e==null?void 0:e.geoJSON)==null?void 0:y.geometry)!=null&&E.coordinates))return null;let[a,u]=gF(n,bJ),l=a,c=u;if(o){let b=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))<b&&(l=u,c=a)}let d=i(l.x,l.y),p=i(c.x,c.y),m={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:[p.lon,p.lat]},properties:{id:"".concat(r,"_buffer_exit"),map:t,neighbors:[],preventSmoothing:!0}};return{entryNode:m,exitNode:g,entryMeters:l,exitMeters:c}}function Ku(e){var r;return(r=e.properties.floor)!=null?r:e.properties.map}function MF(e,r,t,n){var F;let o=[e[0].origin];for(let A=0;A<e.length;A++)o.push(e[A].destination);let i=new Map,a=new Map;for(let A=0;A<o.length;A++)i.set(o[A].properties.id,o[A]),a.set(A,o[A]);let u=o[0].geometry.coordinates[1],{toCartesian:l,toGeographic:c}=Ip(u),d=o.map((A,j)=>{let N={x:0,y:0,nodeId:A.properties.id,originalIndex:j};return l(A.geometry.coordinates,N),N}),p=new Set,m=new Map,g=new Set;for(let A=0;A<o.length;A++){let j=r(o[A].properties.id);if(j&&(p.add(A),m.set(A,j)),A<o.length-1){let N=Ku(o[A]),Z=Ku(o[A+1]);N!==Z&&(g.add(A),g.add(A+1),A>0&&g.add(A-1))}}if(e.length<3&&p.size===0)return e;let y=e.length>=3?(0,TF.default)(d,.7,!1):d,E=new Set;for(let A=0;A<y.length;A++)E.add(y[A].originalIndex);let b=[];for(let A of p)E.has(A)||b.push(A);let v=y.slice(),D=.25;for(let A of g){if(E.has(A))continue;let j=a.get(A);if(!j)continue;let N=-1;for(let Z=0;Z<v.length-1;Z++)if(v[Z].originalIndex<A&&v[Z+1].originalIndex>A){N=Z+1;break}if(N!==-1){let Z={x:0,y:0,nodeId:j.properties.id,originalIndex:A};l(j.geometry.coordinates,Z),v.splice(N,0,Z)}}for(let A of b){let j=a.get(A);if(!j)continue;let N=-1;for(let Z=0;Z<v.length-1;Z++)if(v[Z].originalIndex<A&&v[Z+1].originalIndex>A){N=Z+1;break}if(N!==-1){let Z={x:0,y:0,nodeId:j.properties.id,originalIndex:A};l(j.geometry.coordinates,Z);let ie=pu(Z,v[N-1]),de=pu(Z,v[N]);ie<D?v[N-1]=Z:de<D?v[N]=Z:v.splice(N,0,Z)}}let M=[],T={x:0,y:0},B={x:0,y:0},G=new Map;for(let A=0;A<v.length;A++)G.set(v[A].originalIndex,A);for(let A of p){let j=a.get(A);if(!j)continue;let N=m.get(A);if(!N)continue;let Z=(F=G.get(A))!=null?F:-1;if(Z!==-1){let ie;Z>0&&(ie={x:v[Z-1].x,y:v[Z-1].y});let de=N.geoJSON.geometry.coordinates;l(de[0],T),l(de[1],B);let J=[T,B],z=j.properties.id,X=Ku(j)||"test-floor",W=DF(N,z,X,J,ie,c);if(W){let ee={x:W.entryMeters.x,y:W.entryMeters.y,nodeId:W.entryNode.properties.id,originalIndex:A-.5},ce={x:W.exitMeters.x,y:W.exitMeters.y,nodeId:W.exitNode.properties.id,originalIndex:A+.5};i.set(W.entryNode.properties.id,W.entryNode),i.set(W.exitNode.properties.id,W.exitNode),M.push(ee,ce)}}}if(v.push(...M),v.sort((A,j)=>A.originalIndex-j.originalIndex),n&&v.length>=3)for(let A=0;A<v.length-1;A++){let j=v[A];if(j.nodeId.endsWith("_buffer_exit")){let N=v[v.length-1];if(A<v.length-2){let Z=!1;for(let ie=A+1;ie<v.length-1;ie++)if(v[ie].nodeId.endsWith("_buffer_entry")||v[ie].nodeId.endsWith("_buffer_exit")){Z=!0;break}if(!Z){let ie=i.get(j.nodeId),de=i.get(N.nodeId);if(ie&&de){if(Ku(ie)!==Ku(de))continue;if(Za(ie,de,n,.1)){let J=v.length-A-2;v.splice(A+1,J)}}}}}}if(n&&v.length>=3){let A=v[0],j=-1;for(let N=1;N<v.length;N++)if(v[N].nodeId.endsWith("_buffer_entry")){j=N;break}if(j>1){let N=!1;for(let Z=1;Z<j;Z++)if(v[Z].nodeId.endsWith("_buffer_entry")||v[Z].nodeId.endsWith("_buffer_exit")){N=!0;break}if(!N){let Z=v[j],ie=i.get(A.nodeId),de=i.get(Z.nodeId);if(ie&&de&&Ku(ie)===Ku(de)){if(Za(ie,de,n,.1)){let J=j-1;v.splice(1,J)}}}}}let _=[];for(let A=0;A<v.length-1;A++){let j=v[A],N=v[A+1],Z=i.get(j.nodeId),ie=i.get(N.nodeId);Z&&ie?_.push(new _o({origin:Z,destination:ie,distance:Dr(Z.geometry.coordinates,ie.geometry.coordinates),angle:Zn(Z.geometry.coordinates,ie.geometry.coordinates),multiplicativeDistanceWeightScaling:t})):CF.warn("Origin or destination node not found for point ".concat(j.nodeId," or ").concat(N.nodeId))}return _}function po(e,r){return new _o({origin:e,destination:r,distance:Dr(e.geometry.coordinates,r.geometry.coordinates),angle:Zn(e.geometry.coordinates,r.geometry.coordinates)})}function wF(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,p=Za(e[a].origin,e[u].origin,r,d),m=e[u].origin.properties.preventSmoothing,g=u-1;if(c){a!==u&&(p?(i.push(po(e[a].origin,e[u].origin)),a=u):(a!==g&&(i.push(po(e[a].origin,e[g].origin)),a=g),a!==u&&(i.push(po(e[a].origin,e[u].origin)),a=u))),l&&i.push(po(e[u].origin,e[u].destination));continue}if(m)p?(i.push(po(e[a].origin,e[u].origin)),a=u):a!==g&&(i.push(po(e[a].origin,e[g].origin)),a=g),i.push(po(e[a].origin,e[u].origin)),a=u,l&&i.push(po(e[u].origin,e[u].destination));else if(p)l&&(Za(e[a].origin,e[u].destination,r,.7)?i.push(po(e[a].origin,e[u].destination)):(i.push(po(e[a].origin,e[u].origin)),i.push(po(e[u].origin,e[u].destination))),a=u);else{if(a===g){l&&(i.push(po(e[a].origin,e[u].origin)),i.push(po(e[u].origin,e[u].destination)));continue}i.push(po(e[a].origin,e[g].origin)),a=g,l&&(i.push(po(e[a].origin,e[u].origin)),i.push(po(e[u].origin,e[u].destination)))}}if(!1){let u=i[i.length-1];window.__DEBUG_PATH.finalSteps.push({nodeId:u.destination.properties.id,coordinate:u.destination.geometry.coordinates,floorId:Ku(u.destination)})}return i}f();function AF(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 p=a+2;p<e.length;p++)if("outdoors"in n&&z4((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||!Za(e[a].origin,e[p].origin,r,t)){let m=p-1;i.push(new _o(oe(k({},e[a]),{destination:e[m].origin,distance:Dr(e[a].origin.geometry.coordinates,e[m].origin.geometry.coordinates),angle:Zn(e[a].origin.geometry.coordinates,e[m].origin.geometry.coordinates)}))),a=m}return i.push(new _o(oe(k({},e[a]),{destination:e[e.length-1].origin,distance:Dr(e[a].origin.geometry.coordinates,e[e.length-1].origin.geometry.coordinates),angle:Zn(e[a].origin.geometry.coordinates,e[e.length-1].origin.geometry.coordinates),multiplicativeDistanceWeightScaling:o})),e[e.length-1]),i}f();var PF=Dl(qS());function _F(e,r){let t=new Set;if(e.length<2)return t;let n=[e[0].origin];for(let y=0;y<e.length;y++)n.push(e[y].destination);let o=n[0].geometry.coordinates[1],{toCartesian:i}=Ip(o),a=r;if(!a)return t;let u=n.map((y,E)=>{let b={x:0,y:0,nodeId:y.properties.id,originalIndex:E};return i(y.geometry.coordinates,b),b}),l=new Set,c=new Set;for(let y=0;y<u.length;y++)a(u[y].nodeId)&&(l.add(y),c.add(u[y].nodeId));if(l.size===0)return t;let d=u.length>=3?(0,PF.default)(u,.7,!1):u,p=new Map;for(let y=0;y<d.length;y++)p.set(d[y].originalIndex,y);let m=new Set;for(let y of l){let E=p.get(y);if(E!==void 0){if(E>0){let b=d[E-1].nodeId;m.add(b)}if(E<d.length-1){let b=d[E+1].nodeId;m.add(b)}}else{let b,v;for(let D=0;D<d.length-1;D++){let M=d[D].originalIndex,T=d[D+1].originalIndex;if(M<y&&y<T){b=d[D].nodeId,v=d[D+1].nodeId;break}}b&&m.add(b),v&&m.add(v)}}let g=0;for(let y of e)m.has(y.origin.properties.id)&&(y.origin.properties.preventSmoothing||(y.origin.properties.preventSmoothing=!0,t.add(y.origin.properties.id))),m.has(y.destination.properties.id)&&(y.destination.properties.preventSmoothing||(y.destination.properties.preventSmoothing=!0,t.add(y.destination.properties.id))),g++;return t}var cm=class{constructor({nodes:r,geojsonCollection:t,groupBy:n="default",multiplicativeDistanceWeightScaling:o,flagDeclarations:i,getDoorByNodeId:a}){h(this,"groupBy");h(this,"graph");h(this,"geometryEdgesByMapId",new Map);h(this,"flagDeclarations",{});h(this,"getDoorByNodeId");h(this,"disabledNodeIds");h(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});h(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)});h(this,"hasLineOfSight",(r,t,n,o)=>this.graph.hasLineOfSight(r,t,this.geometryEdgesByMapId.get(n),o));h(this,"getDistance",(r,t)=>Dr(r,t));h(this,"getAngle",(r,t)=>Zn(r,t));this.groupBy=n,this.graph=new j4({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((p,m)=>{this.geometryEdgesByMapId.get(d).push([p,c[m+1]||c[0]])})}})}getDisabledNodeIds(){let r=new Set;if(D1.public in this.flagDeclarations)for(let t in this.graph.nodesById)z4(this.graph.nodesById[t].properties.flags,this.flagDeclarations[D1.public].index,this.flagDeclarations[D1.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,p=r!=null?r:[],m=this.graph.aStar({originIds:t,destinationNodeIds:i,zones:p,disabledConnectionNodeIds:new Set(a),overrideEdgeWeights:c,disabledNodeIds:this.disabledNodeIds});if(m.length===0)return{type:"FeatureCollection",features:[]};if((u==null?void 0:u.__EXPERIMENTAL_METHOD)!=="greedy-los"&&n&&o&&n.length===1&&o.length===1){let y=new _o({origin:n[0],destination:m[0].origin,distance:Dr(n[0].geometry.coordinates,m[0].origin.geometry.coordinates),angle:Zn(n[0].geometry.coordinates,m[0].origin.geometry.coordinates),multiplicativeDistanceWeightScaling:l}),E=m.slice(),b=new _o({origin:m[m.length-1].destination,destination:o[0],distance:Dr(m[m.length-1].destination.geometry.coordinates,o[0].geometry.coordinates),angle:Zn(m[m.length-1].destination.geometry.coordinates,o[0].geometry.coordinates),multiplicativeDistanceWeightScaling:l});E.unshift(y),E.push(b),m=E}return d&&(m=this.simplifyAllSteps(m,u,l)),this.generatePath(m)}simplifyAllSteps(r,t={enabled:!0,__EXPERIMENTAL_METHOD:"greedy-los"},n){var m,g,y,E;let o=[],i=[r[0]],a=(m=t.__EXPERIMENTAL_METHOD)!=null?m:"greedy-los",u=(g=t.radius)!=null?g:N0,l=a==="dp-optimal"?this.simplifyStepsWithDPMethod.bind(this):a==="rdp"?this.simplifyStepsImprovedWithSimplifyBeforeLoSChecks.bind(this):this.simplifySteps.bind(this);for(let b=1;b<r.length;b++)if(this.groupBy!=="default"&&r[b].origin.properties[this.groupBy]!==r[b-1].origin.properties[this.groupBy]){let v=r[b-1].origin.properties[this.groupBy],D=(y=this.geometryEdgesByMapId.get(v))!=null?y:[];o.push(...l(i,D,u,n,t)),i=[r[b]]}else i.push(r[b]);let c=r[r.length-1],d=this.groupBy==="default"?this.groupBy:c.origin.properties[this.groupBy],p=(E=this.geometryEdgesByMapId.get(d))!=null?E:[];return o.push(...l(i,p,u,n,t)),o}simplifySteps(r,t,n,o,i){return AF(r,t,n,this.flagDeclarations,o)}simplifyStepsImprovedWithSimplifyBeforeLoSChecks(r,t,n,o,i){var l;if(r.length<3)return r;!1,r=MF(r,this.getDoorByNodeId,o,t);let a=(i==null?void 0:i.__EXPERIMENTAL_METHOD)==="rdp"&&(l=i.mustIncludeDoorBufferNodes)!=null?l:!0;return wF(r,t,o,a)}simplifyStepsWithDPMethod(r,t,n,o,i){var d;if(r.length<3)return r;let a=new Set;((i==null?void 0:i.__EXPERIMENTAL_METHOD)==="dp-optimal"&&(d=i.includeDoorBufferNodes)!=null?d:!1)&&(a=_F(r,this.getDoorByNodeId));for(let p=0;p<r.length-1;p++){let m=r[p].origin.properties.floor,g=r[p+1].origin.properties.floor;m!==g&&(r[p].origin.properties.preventSmoothing||(r[p].origin.properties.preventSmoothing=!0,a.add(r[p].origin.properties.id)),r[p+1].origin.properties.preventSmoothing||(r[p+1].origin.properties.preventSmoothing=!0,a.add(r[p+1].origin.properties.id)))}let l=r[r.length-1];l.origin.properties.floor!==l.destination.properties.floor&&(l.origin.properties.preventSmoothing||(l.origin.properties.preventSmoothing=!0,a.add(l.origin.properties.id))),!1;let c=SF(r,t,o,n);if(!1){let p=c[c.length-1];window.__DEBUG_PATH.finalSteps.push({nodeId:p.destination.properties.id,coordinate:p.destination.geometry.coordinates,floorId:p.destination.properties.map})}for(let p of r)a.has(p.origin.properties.id)&&delete p.origin.properties.preventSmoothing,a.has(p.destination.properties.id)&&delete p.destination.properties.preventSmoothing;return c}};f();f();function OF(e){return Hu(e)?"navigationTarget"in e&&e.navigationTarget!=null:!1}var vJ={lineOfSight:!0,mode:"absolute-distance",maxResults:1};function FF(e){return oe(k({},vJ),{lineOfSight:!e})}var fr=new WeakMap;function $4(e,r,t){var a;let n=FF(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 V4(e,r,t){var a;let n=FF(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 xJ(e,r,t){let n=[];for(let o of e.navigationTarget){let i=dm(o,r,t);n.push(...i)}return n}async function EJ(e,r,t){let n=[];for(let o of e.navigationTarget){let i=await lc(o,r,t);n.push(...i)}return n}function BF(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 kF(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 LF(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 IJ(e,r,t){let n=[];for(let o of e.coordinates){let i=$4(o,r,t);i.length>0&&n.push(i[0])}return n}async function SJ(e,r,t){let n=[];for(let o of e.coordinates){let i=await V4(o,r,t);i.length>0&&n.push(i[0])}return n}function RF(e,r){var t;return(t=r==null?void 0:r.objectEntranceNodeIdsByObstructionId[e.id])!=null?t:[]}function NF(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 jF(e){return e.nodes.map(r=>r.id)}function dm(e,r,t){if(fr.has(e))return fr.get(e);if(Xu.is(e)){let n=xJ(e,r,t);return fr.set(e,n),n}else if($a.is(e)){let n=$4(e,r,t);return fr.set(e,n),n}else if(ke.is(e)){let n=$4(e,r,t);return fr.set(e,n),n}else{if(Ai.is(e))return $4(e,r,t);if(Mo.is(e)){let n=BF(e,r);return fr.set(e,n),n}else if(ua.is(e)){let n=kF(e,r);return fr.set(e,n),n}else if(Lr.is(e)){let n=LF(e,r);return fr.set(e,n),n}else if(Hn.is(e)){let n=IJ(e,r,t);return fr.set(e,n),n}else if(ii.is(e)){let n=RF(e,r);return fr.set(e,n),n}else if(Pn.is(e)){let n=NF(e,r);return fr.set(e,n),n}else if(ri.is(e)){let n=jF(e);return fr.set(e,n),n}else if(sa.is(e)){let n=[e.id];return fr.set(e,n),n}else return[]}}async function lc(e,r,t){if(fr.has(e))return fr.get(e);if(Xu.is(e)){let n=await EJ(e,r,t);return fr.set(e,n),n}else if($a.is(e)){let n=await V4(e,r,t);return fr.set(e,n),n}else if(ke.is(e)){let n=await V4(e,r,t);return fr.set(e,n),n}else if(Ai.is(e)){let n=await V4(e,r,t);return fr.set(e,n),n}else if(Mo.is(e)){let n=BF(e,r);return fr.set(e,n),n}else if(ua.is(e)){let n=kF(e,r);return fr.set(e,n),n}else if(Lr.is(e)){let n=LF(e,r);return fr.set(e,n),n}else if(Hn.is(e)){let n=await SJ(e,r,t);return fr.set(e,n),n}else if(ii.is(e)){let n=RF(e,r);return fr.set(e,n),n}else{if(Pn.is(e))return NF(e,r);if(ri.is(e)){let n=jF(e);return fr.set(e,n),n}else if(sa.is(e)){let n=[e.id];return fr.set(e,n),n}else return[]}}function UF(e,r){if(!e.instances||e.instances.length===0)return e;for(let t of e.instances)if(t.nodes.map(o=>o.id).includes(r))return t;return e}function GF(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 ri.is(o)&&(o=UF(o,n)),o}function zF(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 ri.is(o)&&(o=UF(o,n)),o}function JS(e){if(ke.is(e))return e;if(!(!OF(e)||Array.isArray(e.navigationTarget)||!ke.is(e.navigationTarget)))return e.navigationTarget}var U0,H4,pm=class{constructor({nodes:r,geojsonCollection:t,connections:n,groupBy:o,multiplicativeDistanceWeightScaling:i,flagDeclarations:a,getDoorByNodeId:u}){h(this,"navigator");h(this,"connections");h(this,"getDirections",async(r,t,n,o)=>{let i=new Map,a=new Map;for(let d of r)i.set(d,await lc(d,o,o.enterpriseMode));for(let d of t)a.set(d,await lc(d,o,o.enterpriseMode));let{originIds:u,destinationNodeIds:l,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,U0).call(this,r,t,u,l,n,o,c)});h(this,"getDirectionsSync",(r,t,n,o)=>{let i=new Map(r.map(d=>[d,dm(d,o,o.enterpriseMode)])),a=new Map(t.map(d=>[d,dm(d,o,o.enterpriseMode)])),{originIds:u,destinationNodeIds:l,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,U0).call(this,r,t,u,l,n,o,c)});w(this,U0,(r,t,n,o,i,a,u)=>{var v;let l=this.getDisabledConnectionNodeIds(i.accessible).filter(D=>!n.includes(D)&&!o.includes(D)),c=new Map,d=k({},i.connectionIdWeightMap);for(let D of i.excludedConnections)d[D.id]=1/0;for(let D in d){let M=a.getById("connection",D);M&&s(this,H4).call(this,M,d[D],c)}let m=((v=i.smoothing.__EXPERIMENTAL_METHOD)!=null?v:"greedy-los")!=="greedy-los",g=this.navigator.getDirections({zones:i.zones.map(D=>{var M;return{geometry:D.geometry,cost:D.cost,map:(M=D.floor)==null?void 0:M.id}}),originIds:n,from:m?$F(r):[],to:m?$F(t):[],destinationNodeIds:o,disabledConnectionNodeIds:l,simplify:i.smoothing,overrideEdgeWeights:c,multiplicativeDistanceWeightScaling:!a.enterpriseMode});this.addCoordinateDirections(g,r,t);let y=GF(g,r,u),E=zF(g,t,u),b=new uc(g,a,y,E);if(!(b.distance===0&&new Set([...n,...o]).size===n.length+o.length))return b});h(this,"getDisabledConnectionNodeIds",r=>r===!1?[]:this.connections.reduce((t,n)=>n.accessible?t:t.concat(n.nodes),[]));w(this,H4,(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)}});h(this,"addCoordinateDirections",(r,[t],[n])=>{if(!r.features.length)return;let o=JS(t);if(o){let a=this.createDirectionFeature(o,this.navigator.getAngle([o.longitude,o.latitude],r.features[0].geometry.coordinates),this.navigator.getDistance([o.longitude,o.latitude],r.features[0].geometry.coordinates));r.features.splice(0,0,a)}let i=JS(n);if(i){let a=this.createDirectionFeature(i,0,0),u=r.features[r.features.length-1];u.properties.distance=this.navigator.getDistance(u.geometry.coordinates,[i.longitude,i.latitude]),u.properties.angle=this.navigator.getAngle(u.geometry.coordinates,[i.longitude,i.latitude]),r.features.push(a)}});h(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 cm({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 p=a.get(c);p||(p=[],a.set(c,p)),Lr.is(c)&&u.add(c.id);for(let m of d)p.push(m),o.push(m)}for(let[c,d]of t){let p=a.get(c);p||(p=[],a.set(c,p)),Lr.is(c)&&l.add(c.id);for(let m of d)p.push(m),i.push(m)}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 p of d)if(l.has(p)){i.push(c);break}}for(let c of i){let d=n.spaceIdsByNodeId[c]||[];for(let p of d)if(u.has(p)){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))),[])}}};U0=new WeakMap,H4=new WeakMap;function CJ(e){if(ke.is(e))return e.floorId;if(Lr.is(e)||Mo.is(e)||Ai.is(e)||$a.is(e)||ii.is(e)||ua.is(e)||sa.is(e))return e.floor.id;if((Hn.is(e)||ri.is(e))&&e.coordinates.length>0)return e.coordinates[0].floorId;if(Pn.is(e)&&e.spaces.length>0)return e.spaces[0].floor.id}function $F(e){return e.reduce((r,t)=>{let n=Ql(t);if(!n)return r;let o=CJ(t);return r.push({type:"Feature",geometry:{type:"Point",coordinates:[n.longitude,n.latitude]},properties:{id:t.id,neighbors:[],map:o}}),r},[])}f();f();f();import Ad from"zod";var fm=50,KS=1,QS=!1,VF=Ad.object({limit:Ad.enum(["same-floor","same-elevation","all-floors"]).optional(),mode:Ad.enum(["travel-distance","absolute-distance"]).optional(),lineOfSight:Ad.boolean().optional().or(Ad.literal("auto")),maxDistance:Ad.number().optional(),maxResults:Ad.number().optional()}),HF={lineOfSight:QS,mode:"travel-distance",maxDistance:fm,limit:"same-floor",maxResults:KS},xn,z0,$0,eC,mm,Z4,W4,G0=class{constructor(r,t){w(this,$0);w(this,xn);w(this,z0);h(this,"__LEGACY_NEAREST_SYNC",(r,t,n)=>{let o=k(k({},HF),n);try{VF.parse(o)}catch(d){V.error(d);return}let i=Ql(r);if(!i)return;let a=se(this,$0,eC).call(this,i,o),u=[],l={},c=[];for(let d of t){let p=dm(d,s(this,xn),s(this,xn).enterpriseMode);if(p)for(let m of p)l[m]||(l[m]=[]),l[m].push(d),c.push(m)}return(n==null?void 0:n.mode)==="absolute-distance"?u=s(this,mm).call(this,i,a,t,o):u=s(this,W4).call(this,r,a,c,l,o),u.sort((d,p)=>d.distance-p.distance)});w(this,mm,(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 p=s(this,z0).searchWithIncludedIds([r.longitude,r.latitude],d,s(this,xn).mapName,c,n.filter(m=>m.__type===d).map(m=>m.id),(u=o==null?void 0:o.maxDistance)!=null?u:fm,(o==null?void 0:o.lineOfSight)==="auto"?QS:o==null?void 0:o.lineOfSight,(l=o==null?void 0:o.maxResults)!=null?l:1);if(p)for(let m of p)i.push({distance:m.distance,feature:s(this,xn).getById(d,m.node.properties.parentId)||s(this,xn).getById(d,m.node.properties.id)})}return i});w(this,Z4,async(r,t,n,o,i)=>{var u,l,c,d;let a=[];for(let p of t){let m,g=0;if(!sa.is(r)){let y=s(this,mm).call(this,r.anchorTarget,[p],s(this,xn).getByType("node").filter(E=>E.floor.id===p),{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:fm,maxResults:1});y.length>0&&(m=y[0].feature,g=y[0].distance)}if(m){let y=new Set,E=s(this,xn).directions.navigator.findNearestNodesOnGraph(m.id,((c=i==null?void 0:i.maxDistance)!=null?c:fm)-g,p,n,!1,(d=i==null?void 0:i.maxResults)!=null?d:KS);for(let b of E)for(let v of o[b.feature.properties.id])y.has(v.id)||(a.push({distance:b.distance+g,feature:v}),y.add(v.id))}}return a});w(this,W4,(r,t,n,o,i)=>{var u,l,c,d,p;let a=[];for(let m of t){let g;if(sa.is(r)||(g=(c=this.__LEGACY_NEAREST_SYNC(r,s(this,xn).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:fm,maxResults:1}))==null?void 0:c[0].feature),g){let y=s(this,xn).directions.navigator.findNearestNodesOnGraph(g.id,(d=i==null?void 0:i.maxDistance)!=null?d:fm,m,n,(i==null?void 0:i.lineOfSight)==="auto"?QS:i==null?void 0:i.lineOfSight,(p=i==null?void 0:i.maxResults)!=null?p:KS);for(let E of y)for(let b of o[E.feature.properties.id])a.push({distance:E.distance,feature:b})}}return a});O(this,xn,r),O(this,z0,t)}async nearest(r,t,n){let o=k(k({},HF),n);try{VF.parse(o)}catch(p){V.error(p);return}let i=Ql(r);if(!i)return;let a=se(this,$0,eC).call(this,i,o),u=[],l={},c=[],d=[];if((n==null?void 0:n.mode)==="absolute-distance")u=s(this,mm).call(this,i,a,t,o);else{for(let p of t)d.push(lc(p,s(this,xn),s(this,xn).enterpriseMode).then(m=>{if(m)for(let g of m)l[g]||(l[g]=[]),l[g].push(p),c.push(g)}));await Promise.all(d),u=await s(this,Z4).call(this,r,a,c,l,o)}return u.sort((p,m)=>p.distance-m.distance)}};xn=new WeakMap,z0=new WeakMap,$0=new WeakSet,eC=function(r,t){let n=r.floorId?[r.floorId]:[];if((t==null?void 0:t.limit)==="all-floors")n=s(this,xn).getByType("floor").map(o=>o.id);else if(r.floorId==null)for(let o of s(this,xn).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,xn).floorsById[r.floorId];if(o){let i=o==null?void 0:o.elevation;i!=null&&(n=s(this,xn).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},mm=new WeakMap,Z4=new WeakMap,W4=new WeakMap;f();var hm,Y4,ZF,X4=class{constructor(r){w(this,Y4);w(this,hm);O(this,hm,r)}at(r){let t=[],n=[r.longitude,r.latitude],o=r.floorId?[r.floorId]:s(this,hm).getAllFloorIds();for(let i of o){let a=s(this,hm).searchAtCoordinate(r,i);for(let u of a)se(this,Y4,ZF).call(this,n,u)&&t.push(u)}return t}};hm=new WeakMap,Y4=new WeakSet,ZF=function(r,t){let n=t.geoJSON;if(!n||!n.geometry)return!1;let o=n.geometry.type;return o==="Point"?r[0]===n.geometry.coordinates[0]&&r[1]===n.geometry.coordinates[1]:o!=="Polygon"&&o!=="MultiPolygon"?!1:Ha(r,n)};f();f();f();f();function WF(e){let r=+this._x.call(null,e),t=+this._y.call(null,e);return XF(this.cover(r,t),r,t,e)}function XF(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,p,m,g,y,E,b,v,D;if(!i)return e._root=a,e;for(;i.length;)if((E=r>=(p=(u+c)/2))?u=p:c=p,(b=t>=(m=(l+d)/2))?l=m:d=m,o=i,!(i=i[v=b<<1|E]))return o[v]=a,e;if(g=+e._x.call(null,i.data),y=+e._y.call(null,i.data),r===g&&t===y)return a.next=i,o?o[v]=a:e._root=a,e;do o=o?o[v]=new Array(4):e._root=new Array(4),(E=r>=(p=(u+c)/2))?u=p:c=p,(b=t>=(m=(l+d)/2))?l=m:d=m;while((v=b<<1|E)===(D=(y>=m)<<1|g>=p));return o[D]=i,o[v]=a,e}function YF(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,p=-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>p&&(p=i));if(l>d||c>p)return this;for(this.cover(l,c).cover(d,p),t=0;t<n;++t)XF(this,a[t],u[t],e[t]);return this}f();function qF(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}f();function JF(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}f();function KF(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]]}f();f();function _n(e,r,t,n,o){this.node=e,this.x0=r,this.y0=t,this.x1=n,this.y1=o}function QF(e,r,t){var n,o=this._x0,i=this._y0,a,u,l,c,d=this._x1,p=this._y1,m=[],g=this._root,y,E;for(g&&m.push(new _n(g,o,i,d,p)),t==null?t=1/0:(o=e-t,i=r-t,d=e+t,p=r+t,t*=t);y=m.pop();)if(!(!(g=y.node)||(a=y.x0)>d||(u=y.y0)>p||(l=y.x1)<o||(c=y.y1)<i))if(g.length){var b=(a+l)/2,v=(u+c)/2;m.push(new _n(g[3],b,v,l,c),new _n(g[2],a,v,b,c),new _n(g[1],b,u,l,v),new _n(g[0],a,u,b,v)),(E=(r>=v)<<1|e>=b)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-E],m[m.length-1-E]=y)}else{var D=e-+this._x.call(null,g.data),M=r-+this._y.call(null,g.data),T=D*D+M*M;if(T<t){var B=Math.sqrt(t=T);o=e-B,i=r-B,d=e+B,p=r+B,n=g.data}}return n}f();function e8(e){if(isNaN(d=+this._x.call(null,e))||isNaN(p=+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,p,m,g,y,E,b,v;if(!t)return this;if(t.length)for(;;){if((y=d>=(m=(a+l)/2))?a=m:l=m,(E=p>=(g=(u+c)/2))?u=g:c=g,r=t,!(t=t[b=E<<1|y]))return this;if(!t.length)break;(r[b+1&3]||r[b+2&3]||r[b+3&3])&&(n=r,v=b)}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[b]=i:delete r[b],(t=r[0]||r[1]||r[2]||r[3])&&t===(r[3]||r[2]||r[1]||r[0])&&!t.length&&(n?n[v]=t:this._root=t),this):(this._root=i,this)}function t8(e){for(var r=0,t=e.length;r<t;++r)this.remove(e[r]);return this}f();function r8(){return this._root}f();function n8(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}f();function o8(e){var r=[],t,n=this._root,o,i,a,u,l;for(n&&r.push(new _n(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 _n(o,c,d,u,l)),(o=n[2])&&r.push(new _n(o,i,d,c,l)),(o=n[1])&&r.push(new _n(o,c,a,u,d)),(o=n[0])&&r.push(new _n(o,i,a,c,d))}return this}f();function i8(e){var r=[],t=[],n;for(this._root&&r.push(new _n(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,p=(u+c)/2;(i=o[0])&&r.push(new _n(i,a,u,d,p)),(i=o[1])&&r.push(new _n(i,d,u,l,p)),(i=o[2])&&r.push(new _n(i,a,p,d,c)),(i=o[3])&&r.push(new _n(i,d,p,l,c))}t.push(n)}for(;n=t.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}f();function a8(e){return e[0]}function s8(e){return arguments.length?(this._x=e,this):this._x}f();function u8(e){return e[1]}function l8(e){return arguments.length?(this._y=e,this):this._y}function V0(e,r,t){var n=new tC(r==null?a8:r,t==null?u8:t,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function tC(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 c8(e){for(var r={data:e.data},t=r;e=e.next;)t=t.next={data:e.data};return r}var Oo=V0.prototype=tC.prototype;Oo.copy=function(){var e=new tC(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=c8(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]=c8(n));return e};Oo.add=WF;Oo.addAll=YF;Oo.cover=qF;Oo.data=JF;Oo.extent=KF;Oo.find=QF;Oo.remove=e8;Oo.removeAll=t8;Oo.root=r8;Oo.size=n8;Oo.visit=o8;Oo.visitAfter=i8;Oo.x=s8;Oo.y=l8;f();function rC(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,p,m,g]=u[l];r(c,d,p,m,g)||rC(e,r,c,d,p,m,g)}}return!1}var d8=1e3,DJ=.1,TJ=5,MJ=1.5,Wa,H0,J4,p8,fo,Pd,q4=class{constructor(r,t){w(this,J4);w(this,Wa,{});w(this,H0,new Map);h(this,"getMaxSearchRadiusForFloorId",(r,t)=>{var i;let n=(i=s(this,H0).get(s(this,fo).mapName))==null?void 0:i.get(t);if(n)return n;let o=this.getNodeTreeByTypeAndFloorId(r,s(this,fo).mapName,t);if(typeof o.extent=="function")if(o.extent()){let[[a,u],[l,c]]=o.extent(),d=l-a,p=c-u;n=Math.max(d,p)}else n=d8;else n=d8;return s(this,H0).set(s(this,fo).mapName,new Map([[t,n]])),n});w(this,fo);w(this,Pd);O(this,fo,r),O(this,Pd,t)}searchWithIncludedIds(r,t,n,o,i,a,u=!1,l=1/0){let c=this.getNodeTreeByTypeAndFloorId(t,n,o),d=new Set,p=[],m=TJ,g=Math.max(a,this.getMaxSearchRadiusForFloorId(t,o));for(;p.length<l&&m<=g;){let y=se(this,J4,p8).call(this,r,c,i,m,a,d);y.sort((E,b)=>E.distance-b.distance);for(let E of y){if(p.length>=l)break;u?s(this,fo).directions.navigator.hasLineOfSight(r,E.node.geometry.coordinates,o,DJ)&&p.push(E):p.push(E)}m=m*MJ}return p}getNodeTreeByTypeAndFloorId(r,t,n){var a,u;if(s(this,Wa)[r]||(s(this,Wa)[r]={}),(a=s(this,Wa)[r][t])!=null&&a[n])return s(this,Wa)[r][t][n];s(this,Wa)[r][t]||(s(this,Wa)[r][t]={}),s(this,Wa)[r][t][n]=V0();let o=s(this,Wa)[r][t][n];o.x(l=>{let c=l.geometry.coordinates;return s(this,Pd).call(this,c[0],c[1]).x}),o.y(l=>{let c=l.geometry.coordinates;return s(this,Pd).call(this,c[0],c[1]).y});let i=[];switch(r){case"space":i=s(this,fo).mvfSpacesByFloorId[n].flatMap(p=>p.properties.destinationNodes).map(p=>{let m=s(this,fo).mvfNodesById[p];return m?oe(k({},m),{properties:{id:m.properties.id,parentId:m.properties.space[0]}}):null});break;case"node":i=((u=s(this,fo).mvfNodesByFloorId[n])==null?void 0:u.filter(p=>p.properties.neighbors.length>0))||[];break;case"point-of-interest":i=s(this,fo).mvfPoisByFloorId[n]||[];break;case"door":i=s(this,fo).mvfEntrancesByFloorId[n]||[];break;case"annotation":i=s(this,fo).mvfAnnotationsByFloorId[n]||[];break;case"enterprise-location":let c=s(this,fo).mvfNodesByFloorId[n]||[],d=s(this,fo).locationIdsByNodeId;i=[];for(let p=0;p<c.length;p++){let m=c[p],g=d[m.properties.id];(g==null?void 0:g.length)>0&&i.push(oe(k({},m),{properties:{id:m.properties.id,parentId:g[0]}}))}break}return(i==null?void 0:i.length)>0&&o.addAll(i),o}};Wa=new WeakMap,H0=new WeakMap,J4=new WeakSet,p8=function(r,t,n,o,i,a){let{x:u,y:l}=s(this,Pd).call(this,r[0],r[1]),c=u-o,d=u+o,p=l-o,m=l+o,g=[];return rC(t,(y,E,b,v,D)=>{let M=E>=d||b>=m||v<c||D<p;if("data"in y){let T=y.data,B=T.properties.parentId||T.properties.id;if(n.includes(B)&&!a.has(B)){a.add(B);let G=Dr(r,T.geometry.coordinates);G<=i&&g.push({node:T,distance:G})}}return M}),g},fo=new WeakMap,Pd=new WeakMap;f();f();f();f();function K4(e,r,t=0,n=e.length-1,o=wJ){for(;n>t;){if(n-t>600){let l=n-t+1,c=r-t+1,d=Math.log(l),p=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*p*(l-p)/l)*(c-l/2<0?-1:1),g=Math.max(t,Math.floor(r-c*p/l+m)),y=Math.min(n,Math.floor(r+(l-c)*p/l+m));K4(e,r,g,y,o)}let i=e[r],a=t,u=n;for(Z0(e,t,r),o(e[n],i)>0&&Z0(e,t,n);a<u;){for(Z0(e,a,u),a++,u--;o(e[a],i)<0;)a++;for(;o(e[u],i)>0;)u--}o(e[t],i)===0?Z0(e,t,u):(u++,Z0(e,u,n)),u<=r&&(t=u+1),r<=u&&(n=u-1)}}function Z0(e,r,t){let n=e[r];e[r]=e[t],e[t]=n}function wJ(e,r){return e<r?-1:e>r?1:0}var Y0=class{constructor(r=9){this._maxEntries=Math.max(4,r),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(r){let t=this.data,n=[];if(!ev(r,t))return n;let o=this.toBBox,i=[];for(;t;){for(let a=0;a<t.children.length;a++){let u=t.children[a],l=t.leaf?o(u):u;ev(r,l)&&(t.leaf?n.push(u):oC(r,l)?this._all(u,n):i.push(u))}t=i.pop()}return n}collides(r){let t=this.data;if(!ev(r,t))return!1;let n=[];for(;t;){for(let o=0;o<t.children.length;o++){let i=t.children[o],a=t.leaf?this.toBBox(i):i;if(ev(r,a)){if(t.leaf||oC(r,a))return!0;n.push(i)}}t=n.pop()}return!1}load(r){if(!(r&&r.length))return this;if(r.length<this._minEntries){for(let n=0;n<r.length;n++)this.insert(r[n]);return this}let t=this._build(r.slice(),0,r.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){let n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(r){return r&&this._insert(r,this.data.height-1),this}clear(){return this.data=ym([]),this}remove(r,t){if(!r)return this;let n=this.data,o=this.toBBox(r),i=[],a=[],u,l,c;for(;n||i.length;){if(n||(n=i.pop(),l=i[i.length-1],u=a.pop(),c=!0),n.leaf){let d=AJ(r,n.children,t);if(d!==-1)return n.children.splice(d,1),i.push(n),this._condense(i),this}!c&&!n.leaf&&oC(n,o)?(i.push(n),a.push(u),u=0,l=n,n=n.children[0]):l?(u++,n=l.children[u],c=!1):n=null}return this}toBBox(r){return r}compareMinX(r,t){return r.minX-t.minX}compareMinY(r,t){return r.minY-t.minY}toJSON(){return this.data}fromJSON(r){return this.data=r,this}_all(r,t){let n=[];for(;r;)r.leaf?t.push(...r.children):n.push(...r.children),r=n.pop();return t}_build(r,t,n,o){let i=n-t+1,a=this._maxEntries,u;if(i<=a)return u=ym(r.slice(t,n+1)),gm(u,this.toBBox),u;o||(o=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,o-1))),u=ym([]),u.leaf=!1,u.height=o;let l=Math.ceil(i/a),c=l*Math.ceil(Math.sqrt(a));f8(r,t,n,c,this.compareMinX);for(let d=t;d<=n;d+=c){let p=Math.min(d+c-1,n);f8(r,d,p,l,this.compareMinY);for(let m=d;m<=p;m+=l){let g=Math.min(m+l-1,p);u.children.push(this._build(r,m,g,o-1))}}return gm(u,this.toBBox),u}_chooseSubtree(r,t,n,o){for(;o.push(t),!(t.leaf||o.length-1===n);){let i=1/0,a=1/0,u;for(let l=0;l<t.children.length;l++){let c=t.children[l],d=nC(c),p=OJ(r,c)-d;p<a?(a=p,i=d<i?d:i,u=c):p===a&&d<i&&(i=d,u=c)}t=u||t.children[0]}return t}_insert(r,t,n){let o=n?r:this.toBBox(r),i=[],a=this._chooseSubtree(o,this.data,t,i);for(a.children.push(r),X0(a,o);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(o,i,t)}_split(r,t){let n=r[t],o=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,o);let a=this._chooseSplitIndex(n,i,o),u=ym(n.children.splice(a,n.children.length-a));u.height=n.height,u.leaf=n.leaf,gm(n,this.toBBox),gm(u,this.toBBox),t?r[t-1].children.push(u):this._splitRoot(n,u)}_splitRoot(r,t){this.data=ym([r,t]),this.data.height=r.height+1,this.data.leaf=!1,gm(this.data,this.toBBox)}_chooseSplitIndex(r,t,n){let o,i=1/0,a=1/0;for(let u=t;u<=n-t;u++){let l=W0(r,0,u,this.toBBox),c=W0(r,u,n,this.toBBox),d=FJ(l,c),p=nC(l)+nC(c);d<i?(i=d,o=u,a=p<a?p:a):d===i&&p<a&&(a=p,o=u)}return o||n-t}_chooseSplitAxis(r,t,n){let o=r.leaf?this.compareMinX:PJ,i=r.leaf?this.compareMinY:_J,a=this._allDistMargin(r,t,n,o),u=this._allDistMargin(r,t,n,i);a<u&&r.children.sort(o)}_allDistMargin(r,t,n,o){r.children.sort(o);let i=this.toBBox,a=W0(r,0,t,i),u=W0(r,n-t,n,i),l=Q4(a)+Q4(u);for(let c=t;c<n-t;c++){let d=r.children[c];X0(a,r.leaf?i(d):d),l+=Q4(a)}for(let c=n-t-1;c>=t;c--){let d=r.children[c];X0(u,r.leaf?i(d):d),l+=Q4(u)}return l}_adjustParentBBoxes(r,t,n){for(let o=n;o>=0;o--)X0(t[o],r)}_condense(r){for(let t=r.length-1,n;t>=0;t--)r[t].children.length===0?t>0?(n=r[t-1].children,n.splice(n.indexOf(r[t]),1)):this.clear():gm(r[t],this.toBBox)}};function AJ(e,r,t){if(!t)return r.indexOf(e);for(let n=0;n<r.length;n++)if(t(e,r[n]))return n;return-1}function gm(e,r){W0(e,0,e.children.length,r,e)}function W0(e,r,t,n,o){o||(o=ym(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i=r;i<t;i++){let a=e.children[i];X0(o,e.leaf?n(a):a)}return o}function X0(e,r){return e.minX=Math.min(e.minX,r.minX),e.minY=Math.min(e.minY,r.minY),e.maxX=Math.max(e.maxX,r.maxX),e.maxY=Math.max(e.maxY,r.maxY),e}function PJ(e,r){return e.minX-r.minX}function _J(e,r){return e.minY-r.minY}function nC(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function Q4(e){return e.maxX-e.minX+(e.maxY-e.minY)}function OJ(e,r){return(Math.max(r.maxX,e.maxX)-Math.min(r.minX,e.minX))*(Math.max(r.maxY,e.maxY)-Math.min(r.minY,e.minY))}function FJ(e,r){let t=Math.max(e.minX,r.minX),n=Math.max(e.minY,r.minY),o=Math.min(e.maxX,r.maxX),i=Math.min(e.maxY,r.maxY);return Math.max(0,o-t)*Math.max(0,i-n)}function oC(e,r){return e.minX<=r.minX&&e.minY<=r.minY&&r.maxX<=e.maxX&&r.maxY<=e.maxY}function ev(e,r){return r.minX<=e.maxX&&r.minY<=e.maxY&&r.maxX>=e.minX&&r.maxY>=e.minY}function ym(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f8(e,r,t,n,o){let i=[r,t];for(;i.length;){if(t=i.pop(),r=i.pop(),t-r<=n)continue;let a=r+Math.ceil((t-r)/n/2)*n;K4(e,a,r,t,o),i.push(r,a,a,t)}}var cc,tv=class extends Y0{constructor(t){super();w(this,cc);h(this,"toBBox",t=>{var p,m,g,y;let n=t.geoJSONBoundingBox;n==null&&V.warn('Item "'.concat(t.id,'" has no geoJSONBoundingBox; falling back to zero-size bbox at origin.'));let o=n!=null&&n.length===6,i=(p=n==null?void 0:n[0])!=null?p:0,a=(m=n==null?void 0:n[1])!=null?m:0,u=(g=o?n==null?void 0:n[3]:n==null?void 0:n[2])!=null?g:0,l=(y=o?n==null?void 0:n[4]:n==null?void 0:n[3])!=null?y:0,c=s(this,cc).call(this,i,a),d=s(this,cc).call(this,u,l);return{minX:c.x,minY:c.y,maxX:d.x,maxY:d.y}});h(this,"compareMinX",(t,n)=>{let o=this.toBBox(t),i=this.toBBox(n);return o.minX-i.minX});h(this,"compareMinY",(t,n)=>{let o=this.toBBox(t),i=this.toBBox(n);return o.minY-i.minY});O(this,cc,t)}search(t,n,o,i){if(typeof t=="object")return super.search(t);let a=s(this,cc).call(this,t,n),u=s(this,cc).call(this,o,i);return super.search({minX:a.x,minY:a.y,maxX:u.x,maxY:u.y})}searchCoordinate(t){return this.search(t.longitude,t.latitude,t.longitude,t.latitude)}};cc=new WeakMap;var _d,q0,J0,rv=class{constructor(r,t){w(this,_d);w(this,q0);w(this,J0,new Map);O(this,_d,r),O(this,q0,t)}getTreeByFloorId(r){let t=s(this,J0).get(r);if(t)return t;let n=new tv(s(this,q0)),o=s(this,_d).floorsById[r];if(o){let i=[o,...o.spaces,...o.objects];for(let a of s(this,_d).areas)a.floor.id===r&&i.push(a);n.load(i)}return s(this,J0).set(r,n),n}searchAtCoordinate(r,t){return this.getTreeByFloorId(t).searchCoordinate(r)}getAllFloorIds(){return s(this,_d).floors.map(r=>r.id)}};_d=new WeakMap,q0=new WeakMap,J0=new WeakMap;f();function m8(e,r){let t=111319.9*Math.cos(r*Math.PI/180);return(n,o)=>({x:(n-e)*t,y:(o-r)*111319.9})}var bm,Q0,eg,tg,K0=class{constructor(r){w(this,bm);w(this,Q0);w(this,eg);w(this,tg);h(this,"__LEGACY_NEAREST_SYNC",(r,t,n)=>s(this,bm).__LEGACY_NEAREST_SYNC(r,t,n));let t=m8(r.mapCenter.longitude,r.mapCenter.latitude);O(this,eg,new q4(r,t)),O(this,tg,new rv(r,t)),O(this,bm,new G0(r,s(this,eg))),O(this,Q0,new X4(s(this,tg)))}async nearest(r,t,n){return s(this,bm).nearest(r,t,n)}async at(r){return s(this,Q0).at(r)}};bm=new WeakMap,Q0=new WeakMap,eg=new WeakMap,tg=new WeakMap;f();f();var rg,nv=class{constructor(r){w(this,rg);O(this,rg,r||[])}get raw(){return s(this,rg)}};rg=new WeakMap;var Fo,Ue,mr,xm,vm=class vm extends yn{constructor(t,n){super(n.mvf2Data.id);h(this,"__type",vm.__type);h(this,"id","loc_");h(this,"name","");h(this,"externalId");h(this,"description");h(this,"logo");h(this,"logoImage");h(this,"phone");h(this,"social",[]);h(this,"images",[]);h(this,"links",[]);h(this,"website");h(this,"icon");h(this,"extra");h(this,"searchTags");w(this,Fo);w(this,Ue,{});w(this,mr);w(this,xm);O(this,Fo,t),O(this,mr,n.mvf2Data),O(this,xm,n.mvf3Data);for(let o in n.mvf2Data)o==="links"?this.links=n.mvf2Data.links.map(i=>new ad({mvfData:i})):o==="pictures"?this.images=n.mvf2Data.pictures.map(i=>{var a;return i.url?new Ns({mvfData:oe(k({},i),{url:(a=i.url)!=null?a:""}),mapData:s(this,Fo)}):void 0}).filter(i=>i!=null):o==="website"?n.mvf2Data.website&&(this.website=new ad({mvfData:n.mvf2Data.website})):o==="icon"?n.mvf2Data.icon&&(this.icon=new Ns({mvfData:{url:n.mvf2Data.icon},mapData:s(this,Fo)})):o==="logo"?n.mvf2Data.logo&&(this.logoImage=new Ns({mvfData:{url:n.mvf2Data.logo},mapData:s(this,Fo)}),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,mr)[o]}});s(this,xm)&&(this.extra=s(this,xm).extra)}static is(t){return t.__type===vm.__type}get spaces(){if(s(this,Ue).spaces)return s(this,Ue).spaces;if(s(this,mr).spaces==null)return s(this,Ue).spaces=[],s(this,Ue).spaces;s(this,Ue).spaces=[];for(let t=0;t<s(this,mr).spaces.length;t++){let n=s(this,Fo).getById("space",s(this,mr).spaces[t].id);n&&s(this,Ue).spaces.push(n)}return s(this,Ue).spaces}get points(){if(s(this,Ue).points)return s(this,Ue).points;if(s(this,mr).spaces==null)return s(this,Ue).points=[],s(this,Ue).points;s(this,Ue).points=[];for(let t=0;t<s(this,mr).spaces.length;t++){let n=s(this,Fo).getById("point-of-interest",s(this,mr).spaces[t].id);n&&s(this,Ue).points.push(n)}return s(this,Ue).points}get doors(){if(s(this,Ue).doors)return s(this,Ue).doors;if(s(this,mr).entrances==null)return s(this,Ue).doors=[],s(this,Ue).doors;s(this,Ue).doors=[];for(let t=0;t<s(this,mr).entrances.length;t++){let n=s(this,Fo).getById("door",s(this,mr).entrances[t].id);n&&s(this,Ue).doors.push(n)}return s(this,Ue).doors}get connections(){if(s(this,Ue).connections)return s(this,Ue).connections;if(s(this,mr).connections==null)return s(this,Ue).connections=[],s(this,Ue).connections;s(this,Ue).connections=[];for(let t of s(this,mr).connections){let n=s(this,Fo).getById("connection",t);n&&s(this,Ue).connections.push(n)}return s(this,Ue).connections}get annotations(){if(s(this,Ue).annotations)return s(this,Ue).annotations;if(s(this,mr).annotations==null)return s(this,Ue).annotations=[],s(this,Ue).annotations;s(this,Ue).annotations=[];for(let t=0;t<s(this,mr).annotations.length;t++){let n=s(this,Fo).getById("annotation",s(this,mr).annotations[t].id);n&&s(this,Ue).annotations.push(n)}return s(this,Ue).annotations}get categories(){return s(this,Ue).categories?s(this,Ue).categories:s(this,mr).categories==null?(s(this,Ue).categories=[],s(this,Ue).categories):(s(this,Ue).categories=s(this,mr).categories.map(t=>s(this,Fo).getById("location-category",t)).filter(t=>t!=null),s(this,Ue).categories)}get mapObjects(){return s(this,Ue).mapObjects?s(this,Ue).mapObjects:s(this,mr).obstructions==null?(s(this,Ue).mapObjects=[],s(this,Ue).mapObjects):(s(this,Ue).mapObjects=s(this,mr).obstructions.map(t=>s(this,Fo).getById("object",t.id)).filter(t=>t!=null),s(this,Ue).mapObjects)}get areas(){return s(this,Ue).areas?s(this,Ue).areas:s(this,mr).areas==null?(s(this,Ue).areas=[],s(this,Ue).areas):(s(this,Ue).areas=s(this,mr).areas.map(t=>s(this,Fo).getById("area",t.id)).filter(t=>t!=null),s(this,Ue).areas)}get focusTarget(){if(s(this,Ue).focusTarget)return s(this,Ue).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,Ue).focusTarget=t,t}get openingHours(){var t;return s(this,Ue).openingHours?s(this,Ue).openingHours:(s(this,Ue).openingHours=new nv((t=s(this,mr).openingHoursSpecification)!=null?t:[]),s(this,Ue).openingHours)}get navigationTarget(){if(s(this,Ue).navigationTarget)return s(this,Ue).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,Ue).navigationTarget=t,t}toJSON(){return{__type:vm.__type,id:this.id,name:this.name}}};Fo=new WeakMap,Ue=new WeakMap,mr=new WeakMap,xm=new WeakMap,h(vm,"__type","location-profile");var iC=vm,Xu=iC;f();var dc,si,Od,Em=class Em extends yn{constructor(t,n){super(n.mvfData.id);h(this,"__type",Em.__type);h(this,"id","cat_");h(this,"name","");h(this,"icon","");w(this,dc);w(this,si,{});w(this,Od);O(this,dc,t),O(this,Od,n.mvfData);for(let o in n.mvfData)Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return s(this,Od)[o]}})}static is(t){return t.__type===Em.__type}get parent(){return s(this,si).parent?s(this,si).parent:(s(this,si).parent=s(this,Od).parent?s(this,dc).getById("location-category",s(this,Od).parent):void 0,s(this,si).parent)}get children(){return s(this,si).children?s(this,si).children:(s(this,si).children=s(this,dc).locationCategoriesByParentId[this.id]||[],s(this,si).children)}get locationProfiles(){if(s(this,si).locationProfiles)return s(this,si).locationProfiles;let t=[];for(let n of s(this,dc).locationProfilesByCategoryId[this.id]||[]){let o=s(this,dc).getById("location-profile",n.id);o&&t.push(o)}return s(this,si).locationProfiles=t,t}toJSON(){return{__type:Em.__type,id:this.id,name:this.name}}};dc=new WeakMap,si=new WeakMap,Od=new WeakMap,h(Em,"__type","location-category");var aC=Em,B4=aC;var sC=.75;function BJ(e){let r=[];if(e.geometry.type==="Polygon")for(let t=1;t<e.geometry.coordinates.length;t++)r.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e.geometry.coordinates[t]]},properties:oe(k({},e.properties),{id:ht()})});else if(e.geometry.type==="MultiPolygon")for(let t of e.geometry.coordinates)for(let n=1;n<t.length;n++)r.push({type:"Feature",geometry:{type:"Polygon",coordinates:[t[n]]},properties:oe(k({},e.properties),{id:ht()})});return r}function kJ(e){var n,o;let r={},t=(o=(n=e["floor.geojson"])==null?void 0:n.features)!=null?o:[];for(let i of t){let a=i.properties.id;if(!a)continue;let u=[];if(i.geometry!=null&&i.geometry.coordinates.length>0){let l=BJ(i);for(let c of l)u.push(c)}r[a]={voids:{type:"FeatureCollection",features:u}}}return r}var We,ng,Im,Sm,Fd=class extends Xe{constructor(t,n){var a,u,l,c,d,p;super();h(this,"Analytics");w(this,We,{});h(this,"Query");h(this,"mvf");h(this,"outdoorViewToken");h(this,"objectEntranceNodeIdsByObstructionId");h(this,"obstructionIdByEntranceId");h(this,"venue");h(this,"tokenManager");h(this,"directions");h(this,"enterpriseMode",!1);h(this,"nodesById");h(this,"spacesById");h(this,"floorsById");h(this,"floorStacksById");h(this,"facadesById");h(this,"facadesBySpaceId");h(this,"connectionsById");h(this,"objectsById");h(this,"doorsById");h(this,"pointsOfInterestById");h(this,"annotationsById");h(this,"areasById");h(this,"locationProfilesById");h(this,"locationCategoriesById");h(this,"locationProfilesByExternalId");h(this,"locationProfilesByCategoryId");h(this,"locationCategoriesByParentId");h(this,"doorsByNodeId");h(this,"mvfAnnotationsById");h(this,"mvfConnectionsById");h(this,"mvfConnectionsByNodeId");h(this,"mvfEntrancesById");h(this,"mvfNodesById");h(this,"mvfObstructionById");h(this,"mvfSpacesById");h(this,"mvfFloorsById");h(this,"mvfFloorStacksById");h(this,"mvfAreasById");h(this,"spacesByExternalId");h(this,"nodesByExternalId");h(this,"objectsByExternalId");h(this,"poisByExternalId");h(this,"floorsByExternalId");h(this,"floorStacksByExternalId");h(this,"doorsByExternalId");h(this,"areasByExternalId");h(this,"locationProfilesByAttachedFeatureId",{});h(this,"entranceNodeIdsBySpaceId",{});h(this,"locationsById",{});h(this,"locationInstancesById",{});h(this,"instanceLocationsByPolygonId",{});h(this,"categoriesById",{});h(this,"mvfLocationsByGeometryId",{});h(this,"locationIdsByNodeId",{});h(this,"spaceIdsByNodeId",{});h(this,"objectIdsByNodeId",{});h(this,"connectionsByExternalId",{});h(this,"locationsByExternalId",{});h(this,"categoriesByExternalId",{});h(this,"destinationNodesIdsBySpaceId",{});h(this,"mvfNodesByFloorId");h(this,"mvfSpacesByFloorId");h(this,"mvfPoisByFloorId");h(this,"mvfEntrancesByFloorId");h(this,"mvfAnnotationsByFloorId");h(this,"voidsByFloorId",{});h(this,"floorImagesByAnchorId",new Map);h(this,"localePacksUrls");h(this,"currentLanguage");h(this,"languagePacks",{});h(this,"tilesets",{});h(this,"navigationFlags");h(this,"binaryBundle");h(this,"envControl");h(this,"getMapDataOptions");w(this,ng);w(this,Im,new ke(0,0,"initializing"));h(this,"propTranslationCache",new Map);w(this,Sm);h(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(t,n,o)=>this.__LEGACY_GET_DIRECTIONS_SYNC(t,n,oe(k({},o),{multiDestination:!0})));h(this,"__LEGACY_GET_DIRECTIONS_SYNC",(t,n,o)=>{let{accessible:i=!1,multiDestination:a=!1}=o||{},u=h8(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],p=[];for(let m of n){let g=Array.isArray(m)?m:[m],y=this.directions.getDirectionsSync(d,g,c,this);if(!y){V.error("getDirections failed due to missing directions for one of the segments");return}d=g,p.push(y)}return p}else{let d=Array.isArray(t)?t:[t],p=Array.isArray(n)?n:[n];if(Array.isArray(p[0])){V.error("getDirections does not support multi-destination without multisegment option");return}d[0].id&&p[0].id&&this.Analytics.sendGetDirectionsEvent(d[0].id,p[0].id,i);try{return this.directions.getDirectionsSync(d,p,c,this)}catch(m){V.error("Unable to get directions",m);return}}});h(this,"getDirections",async(t,n,o)=>{let{accessible:i=!1}=o||{},a=h8(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])){V.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(p){V.error("Unable to get directions",p);return}});h(this,"getDirectionsMultiDestination",async(t,n,o)=>Promise.resolve(this.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(t,n,o)));h(this,"getDoorByNodeId",t=>this.doorsByNodeId[t]);h(this,"transformImageRequest",async t=>{var o,i;if(this.enterpriseMode||!this.getMapDataOptions)return{url:t};if(!kO(t))return{url:t};if(LO(t))return{url:t};let n=Of(t);if(!n)return{url:t};try{let a=await((o=this.tokenManager)==null?void 0:o.getSasTokensAsync()),u=(i=a==null?void 0:a.tokens)==null?void 0:i[n.mapId];if(u==null)throw new Error("SAS token not found");let[l]=t.split("?");return{url:"".concat(l,"?").concat(u.token)}}catch(a){return V.error("Failed to append SAS token to image request. Requests for private images may fail.",a),{url:t}}});let o=(a=n==null?void 0:n.env)!=null?a:Xl();if(this.envControl=o,this.binaryBundle=n==null?void 0:n.binaryBundle,this.Analytics=new Pp,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,O(this,ng,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 m of t["tileset.json"].others)this.tilesets[m.key]=m;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=qO(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.voidsByFloorId=kJ(t),this.enterpriseMode||og()){let m=YO(t,this);if(this.locationsById=m.locationsById,this.locationInstancesById=m.locationInstancesById,this.instanceLocationsByPolygonId=m.instanceLocationsByPolygonId,this.categoriesById=m.categoriesById,this.mvfLocationsByGeometryId=m.mvfLocationsByGeometryId,this.locationIdsByNodeId=m.locationIdsByNodeId,this.connectionsByExternalId=m.connectionsByExternalId,this.locationsByExternalId=m.locationsByExternalId,this.categoriesByExternalId=m.categoriesByExternalId,m.venue.name!=null){this.venue=new RS(this,{mvfData:m.venue});let g={};for(let y in m.mvfLocationsById)g[y]=m.mvfLocationsById[y];for(let y in m.mvfLocationInstancesById)g[y]=m.mvfLocationInstancesById[y];this.languagePacks[this.venue.defaultLanguage.code]={type:"initial",optimized:{"enterprise-location":g,"enterprise-category":m.mvfCategoriesById,"floor-stack":i.mvfFloorStacksById,floor:i.mvfFloorsById}},(p=n==null?void 0:n.languagePacks)==null||p.forEach(({language:y,localePack:E})=>{this.languagePacks[y.code]=dS(E)}),this.currentLanguage=this.venue.defaultLanguage}}this.directions=new pm({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:(m=>{let g=this.doorsByNodeId[m];if(g!=null)return{geoJSON:g.geoJSON}})}),this.Query=new K0(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,Im).floorId==="initializing"&&O(this,Im,new ke(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])),s(this,Im)}get naturalBearing(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.naturalBearing)!=null?t:0}get spaces(){return s(this,We).spaces==null&&(s(this,We).spaces=globalThis.Object.values(this.spacesById)),s(this,We).spaces}get objects(){return s(this,We).objects==null&&(s(this,We).objects=globalThis.Object.values(this.objectsById)),s(this,We).objects}get connections(){return s(this,We).connections==null&&(s(this,We).connections=globalThis.Object.values(this.connectionsById)),s(this,We).connections}get floors(){return s(this,We).floors==null&&(s(this,We).floors=globalThis.Object.values(this.floorsById)),s(this,We).floors}get floorStacks(){return s(this,We).floorStacks==null&&(s(this,We).floorStacks=globalThis.Object.values(this.floorStacksById)),s(this,We).floorStacks}get facades(){return s(this,We).facades==null&&(s(this,We).facades=globalThis.Object.values(this.facadesById)),s(this,We).facades}get doors(){return s(this,We).doors==null&&(s(this,We).doors=globalThis.Object.values(this.doorsById)),s(this,We).doors}get pointsOfInterest(){return s(this,We).pointsOfInterest==null&&(s(this,We).pointsOfInterest=globalThis.Object.values(this.pointsOfInterestById)),s(this,We).pointsOfInterest}get annotations(){return s(this,We).annotations==null&&(s(this,We).annotations=globalThis.Object.values(this.annotationsById)),s(this,We).annotations}get areas(){return s(this,We).areas==null&&(s(this,We).areas=globalThis.Object.values(this.areasById)),s(this,We).areas}get nodes(){return s(this,We).nodes==null&&(s(this,We).nodes=globalThis.Object.values(this.nodesById)),s(this,We).nodes}get locations(){return s(this,We).locations==null&&(s(this,We).locations=globalThis.Object.values(this.locationsById)),globalThis.Object.values(this.locationsById)}get categories(){return s(this,We).categories==null&&(s(this,We).categories=globalThis.Object.values(this.categoriesById)),globalThis.Object.values(this.categoriesById)}get locationProfiles(){return s(this,We).locationProfiles==null&&(s(this,We).locationProfiles=globalThis.Object.values(this.locationProfilesById)),s(this,We).locationProfiles}get locationCategories(){return s(this,We).locationCategories==null&&(s(this,We).locationCategories=globalThis.Object.values(this.locationCategoriesById)),s(this,We).locationCategories}get mvfFloors(){return s(this,We).mvfFloors==null&&(s(this,We).mvfFloors=globalThis.Object.values(this.mvfFloorsById)),s(this,We).mvfFloors}get mvfFloorStacks(){return s(this,We).mvfFloorStacks==null&&(s(this,We).mvfFloorStacks=globalThis.Object.values(this.mvfFloorStacksById)),s(this,We).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,p,m,g,y,E;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(p=this.objectsByExternalId[n])!=null?p:[];case"point-of-interest":return(m=this.poisByExternalId[n])!=null?m:[];case"area":return(g=this.areasByExternalId[n])!=null?g:[];case"enterprise-location":return(y=this.locationsByExternalId[n])!=null?y:[];case"enterprise-category":return(E=this.categoriesByExternalId[n])!=null?E:[];default:return[]}}getMapDataById(t){var n,o,i,a,u,l,c,d,p,m;return(m=(p=(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?p:this.annotationsById[t])!=null?m: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 p=d[n];if(p!=null&&typeof p=="object"){if(typeof i=="object"&&typeof p=="object"&&!Array.isArray(p)){let m=fu(a+t+o+n.toString());if(this.propTranslationCache.has(m))return this.propTranslationCache.get(m);let g=R0(i,p,["id"]);return this.propTranslationCache.set(m,g),g}return p}return p}}return i}findPreferredLanguage(t){if(!this.venue)return;let n=uC(this.venue,t);return(t==null?void 0:t.languageCode)!=null&&t.languageCode.toLowerCase()!==n.code.toLowerCase()&&V.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){V.error("Language code must be defined.");return}if(!this.currentLanguage||!this.venue){V.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){V.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){V.error('Locale pack URL not found for language code "'.concat(i.code,'".'));return}s(this,Sm)&&s(this,Sm).abort();let c=new AbortController;O(this,Sm,c);let d;try{d=await eO(l,{signal:c.signal})}catch(p){V.error('Failed to download language pack for language code "'.concat(i.code,'".'),p);return}if(!d||c.signal.aborted)return;a=dS(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=Ql(t),i=Ql(n);return Dr([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 U2(this.localePacksUrls[a.code],{signal:i.signal}),l=await Df(u);l&&n.push({language:{code:a.code,name:a.name},localePack:l})}}catch(u){V.warn("failed downloading language pack",u)}}return{type:"json",options:{enterprise:this.enterpriseMode,mvf3:s(this,ng)},languagePacks:n,main:this.mvf}}async toBinaryBundle({downloadLanguagePacks:t=!0}={}){var o;if(!this.binaryBundle){V.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 U2(this.localePacksUrls[a.code],{signal:i.signal});u&&n.push({language:{code:a.code,name:a.name},localePack:u})}}catch(u){V.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,We)))s(this,We)[t]=null;this.propTranslationCache.clear()}};We=new WeakMap,ng=new WeakMap,Im=new WeakMap,Sm=new WeakMap;var h8=(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:sC,__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:sC,__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:sC,__EXPERIMENTAL_METHOD:u}};f();f();f();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)};f();f();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var g8="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=";f();f();var y8=!1;function b8(){y8=!0}function v8(){return y8}var ov=class{constructor(r){h(this,"backgroundAlpha",1);h(this,"backgroundColor",new mt);h(this,"width",0);h(this,"height",0);h(this,"options",{});h(this,"renderer");h(this,"enabledLayers",new Set([0,1]));h(this,"matricesUpdatedThisFrame",!1);h(this,"handleWebGLContextCreationError",r=>{var t,n;(n=(t=this.options).onWebGLContextCreationError)==null||n.call(t,r)});h(this,"handleWebGLContextLost",r=>{var t,n;(n=(t=this.options).onWebGLContextLost)==null||n.call(t,r)});h(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,v8()?(this.renderer={setSize:()=>{},state:{reset:()=>{}},properties:{get:()=>{}},getSize:()=>({width:window.innerWidth,height:innerHeight}),getDrawingBufferSize:()=>({width:window.innerWidth,height:innerHeight}),getClearAlpha:()=>1,getClearColor:()=>new mt,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 HD({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 mt((t=r.backgroundColor)!=null?t:"#ffffff"),this.backgroundAlpha=(n=r.backgroundAlpha)!=null?n:1}catch(u){V.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),this.renderer.autoClear=!1,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(cn.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){x.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}};f();f();var x8='"use strict";(()=>{var Yu=Object.defineProperty,qd=Object.defineProperties;var Yd=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var Qu=Object.prototype.hasOwnProperty,Hu=Object.prototype.propertyIsEnumerable;var Wn=(e,r,n)=>r in e?Yu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,f=(e,r)=>{for(var n in r||(r={}))Qu.call(r,n)&&Wn(e,n,r[n]);if(tr)for(var n of tr(r))Hu.call(r,n)&&Wn(e,n,r[n]);return e},I=(e,r)=>qd(e,Yd(r));var el=(e,r)=>{var n={};for(var i in e)Qu.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&tr)for(var i of tr(e))r.indexOf(i)<0&&Hu.call(e,i)&&(n[i]=e[i]);return n};var $e=(e,r)=>{for(var n in r)Yu(e,n,{get:r[n],enumerable:!0})};var X=(e,r,n)=>Wn(e,typeof r!="symbol"?r+"":r,n);function tl(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 rl(e,r){let[n,i]=r;return n>=e.x&&n<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}function nl(e,r){let n=r.x,i=r.y,t=r.x+r.w,o=r.y+r.h,c=e.x,l=e.y,d=e.x+e.w,s=e.y+e.h;return n<d&&c<t&&i<s&&l<o}function he(e,r){for(let n=0;n<r.length;n++)e.push(r[n])}var F=class{constructor(r,n,i,t,o){X(this,"x");X(this,"y");X(this,"w");X(this,"h");X(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:tl(this,r)}intersects(r){return nl(this,r)}intersectsPoint(r){return rl(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var kt=class e{constructor(r,n){X(this,"topLeft");X(this,"topRight");X(this,"bottomLeft");X(this,"bottomRight");X(this,"divided",!1);X(this,"boundary");X(this,"capacity",16);X(this,"objects",[]);X(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 F(r,n,i/2,t/2),this),this.topRight=new e(new F(r+i/2,n,i/2,t/2),this),this.bottomLeft=new e(new F(r,n+t/2,i/2,t/2),this),this.bottomRight=new e(new F(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&&(he(n,this.topLeft.queryRect(r)),he(n,this.topRight.queryRect(r)),he(n,this.bottomLeft.queryRect(r)),he(n,this.bottomRight.queryRect(r))),n}queryPoint(r){let n=[];if(this.boundary.intersectsPoint(r))n.push(...this.objects);else return[];return this.divided&&(he(n,this.topLeft.queryPoint(r)),he(n,this.topRight.queryPoint(r)),he(n,this.bottomLeft.queryPoint(r)),he(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 yt={};$e(yt,{$brand:()=>rr,$input:()=>ga,$output:()=>fa,NEVER:()=>Xn,TimePrecision:()=>_a,ZodAny:()=>lu,ZodArray:()=>pu,ZodBase64:()=>Un,ZodBase64URL:()=>On,ZodBigInt:()=>_t,ZodBigIntFormat:()=>Tn,ZodBoolean:()=>ht,ZodCIDRv4:()=>jn,ZodCIDRv6:()=>Pn,ZodCUID:()=>bn,ZodCUID2:()=>xn,ZodCatch:()=>Nu,ZodCodec:()=>Jn,ZodCustom:()=>er,ZodCustomStringFormat:()=>vt,ZodDate:()=>Xt,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>gu,ZodE164:()=>Dn,ZodEmail:()=>hn,ZodEmoji:()=>_n,ZodEnum:()=>ft,ZodError:()=>Sf,ZodExactOptional:()=>Su,ZodFile:()=>zu,ZodFirstPartyTypeKind:()=>Gu,ZodFunction:()=>Mu,ZodGUID:()=>Mt,ZodIPv4:()=>Sn,ZodIPv6:()=>wn,ZodISODate:()=>mn,ZodISODateTime:()=>dn,ZodISODuration:()=>fn,ZodISOTime:()=>pn,ZodIntersection:()=>vu,ZodIssueCode:()=>jf,ZodJWT:()=>Zn,ZodKSUID:()=>In,ZodLazy:()=>Fu,ZodLiteral:()=>ku,ZodMAC:()=>ru,ZodMap:()=>bu,ZodNaN:()=>Au,ZodNanoID:()=>yn,ZodNever:()=>du,ZodNonOptional:()=>Cn,ZodNull:()=>cu,ZodNullable:()=>ju,ZodNumber:()=>$t,ZodNumberFormat:()=>Ve,ZodObject:()=>Yt,ZodOptional:()=>Ln,ZodPipe:()=>Fn,ZodPrefault:()=>Ou,ZodPromise:()=>Vu,ZodReadonly:()=>Ru,ZodRealError:()=>re,ZodRecord:()=>Ht,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>R,ZodSuccess:()=>Tu,ZodSymbol:()=>ou,ZodTemplateLiteral:()=>Cu,ZodTransform:()=>Iu,ZodTuple:()=>hu,ZodType:()=>U,ZodULID:()=>kn,ZodURL:()=>Wt,ZodUUID:()=>ve,ZodUndefined:()=>au,ZodUnion:()=>Qt,ZodUnknown:()=>su,ZodVoid:()=>mu,ZodXID:()=>zn,ZodXor:()=>fu,_ZodString:()=>$n,_default:()=>Uu,_function:()=>Ed,any:()=>fd,array:()=>qt,base64:()=>Ys,base64url:()=>Qs,bigint:()=>ld,boolean:()=>iu,catch:()=>Eu,check:()=>Ad,cidrv4:()=>Xs,cidrv6:()=>qs,clone:()=>Y,codec:()=>Zd,coerce:()=>Vn,config:()=>B,core:()=>ge,cuid:()=>Fs,cuid2:()=>Js,custom:()=>Rd,date:()=>vd,decode:()=>Xc,decodeAsync:()=>Yc,describe:()=>Ld,discriminatedUnion:()=>xd,e164:()=>Hs,email:()=>Os,emoji:()=>Ls,encode:()=>Wc,encodeAsync:()=>qc,endsWith:()=>ot,enum:()=>An,exactOptional:()=>wu,file:()=>Pd,flattenError:()=>Dt,float32:()=>od,float64:()=>ad,formatError:()=>Zt,fromJSONSchema:()=>Kd,function:()=>Ed,getErrorMap:()=>Uf,globalRegistry:()=>W,gt:()=>pe,gte:()=>Q,guid:()=>Ds,hash:()=>id,hex:()=>nd,hostname:()=>rd,httpUrl:()=>Rs,includes:()=>nt,instanceof:()=>Fd,int:()=>vn,int32:()=>cd,int64:()=>sd,intersection:()=>$u,ipv4:()=>Ks,ipv6:()=>Ws,iso:()=>Fe,json:()=>Vd,jwt:()=>ed,keyof:()=>$d,ksuid:()=>Bs,lazy:()=>Ju,length:()=>Ce,literal:()=>jd,locales:()=>Ae,looseObject:()=>yd,looseRecord:()=>zd,lowercase:()=>tt,lt:()=>me,lte:()=>oe,mac:()=>Gs,map:()=>Id,maxLength:()=>Le,maxSize:()=>Pe,meta:()=>Cd,mime:()=>at,minLength:()=>ye,minSize:()=>fe,multipleOf:()=>je,nan:()=>Dd,nanoid:()=>Cs,nativeEnum:()=>wd,negative:()=>en,never:()=>Nn,nonnegative:()=>rn,nonoptional:()=>Zu,nonpositive:()=>tn,normalize:()=>ct,null:()=>uu,nullable:()=>Kt,nullish:()=>Ud,number:()=>nu,object:()=>hd,optional:()=>Bt,overwrite:()=>de,parse:()=>Mc,parseAsync:()=>Bc,partialRecord:()=>kd,pipe:()=>Gt,positive:()=>Hr,prefault:()=>Du,preprocess:()=>Md,prettifyError:()=>ci,promise:()=>Nd,property:()=>nn,readonly:()=>Lu,record:()=>yu,refine:()=>Bu,regex:()=>et,regexes:()=>ie,registry:()=>Dr,safeDecode:()=>Hc,safeDecodeAsync:()=>tu,safeEncode:()=>Qc,safeEncodeAsync:()=>eu,safeParse:()=>Kc,safeParseAsync:()=>Gc,set:()=>Sd,setErrorMap:()=>Pf,size:()=>Re,slugify:()=>dt,startsWith:()=>it,strictObject:()=>_d,string:()=>gn,stringFormat:()=>td,stringbool:()=>Jd,success:()=>Od,superRefine:()=>Ku,symbol:()=>md,templateLiteral:()=>Td,toJSONSchema:()=>un,toLowerCase:()=>lt,toUpperCase:()=>st,transform:()=>Rn,treeifyError:()=>ai,trim:()=>ut,tuple:()=>_u,uint32:()=>ud,uint64:()=>dd,ulid:()=>Vs,undefined:()=>pd,union:()=>En,unknown:()=>Je,uppercase:()=>rt,url:()=>As,util:()=>b,uuid:()=>Zs,uuidv4:()=>Ts,uuidv6:()=>Ns,uuidv7:()=>Es,void:()=>gd,xid:()=>Ms,xor:()=>bd});var ge={};$e(ge,{$ZodAny:()=>Eo,$ZodArray:()=>Fo,$ZodAsyncError:()=>se,$ZodBase64:()=>So,$ZodBase64URL:()=>wo,$ZodBigInt:()=>Ir,$ZodBigIntFormat:()=>Do,$ZodBoolean:()=>At,$ZodCIDRv4:()=>ko,$ZodCIDRv6:()=>zo,$ZodCUID:()=>so,$ZodCUID2:()=>mo,$ZodCatch:()=>oa,$ZodCheck:()=>L,$ZodCheckBigIntFormat:()=>Ci,$ZodCheckEndsWith:()=>Qi,$ZodCheckGreaterThan:()=>hr,$ZodCheckIncludes:()=>qi,$ZodCheckLengthEquals:()=>Ki,$ZodCheckLessThan:()=>$r,$ZodCheckLowerCase:()=>Wi,$ZodCheckMaxLength:()=>Mi,$ZodCheckMaxSize:()=>Fi,$ZodCheckMimeType:()=>eo,$ZodCheckMinLength:()=>Bi,$ZodCheckMinSize:()=>Ji,$ZodCheckMultipleOf:()=>Ri,$ZodCheckNumberFormat:()=>Li,$ZodCheckOverwrite:()=>to,$ZodCheckProperty:()=>Hi,$ZodCheckRegex:()=>Gi,$ZodCheckSizeEquals:()=>Vi,$ZodCheckStartsWith:()=>Yi,$ZodCheckStringFormat:()=>Qe,$ZodCheckUpperCase:()=>Xi,$ZodCodec:()=>Lt,$ZodCustom:()=>pa,$ZodCustomStringFormat:()=>Uo,$ZodDate:()=>Co,$ZodDefault:()=>ta,$ZodDiscriminatedUnion:()=>Mo,$ZodE164:()=>jo,$ZodEmail:()=>ao,$ZodEmoji:()=>uo,$ZodEncodeError:()=>ke,$ZodEnum:()=>Xo,$ZodError:()=>Ot,$ZodExactOptional:()=>Ho,$ZodFile:()=>Yo,$ZodFunction:()=>sa,$ZodGUID:()=>io,$ZodIPv4:()=>yo,$ZodIPv6:()=>bo,$ZodISODate:()=>$o,$ZodISODateTime:()=>vo,$ZodISODuration:()=>_o,$ZodISOTime:()=>ho,$ZodIntersection:()=>Bo,$ZodJWT:()=>Po,$ZodKSUID:()=>go,$ZodLazy:()=>ma,$ZodLiteral:()=>qo,$ZodMAC:()=>xo,$ZodMap:()=>Go,$ZodNaN:()=>aa,$ZodNanoID:()=>lo,$ZodNever:()=>Ro,$ZodNonOptional:()=>na,$ZodNull:()=>No,$ZodNullable:()=>ea,$ZodNumber:()=>zr,$ZodNumberFormat:()=>Oo,$ZodObject:()=>Ul,$ZodObjectJIT:()=>Jo,$ZodOptional:()=>wr,$ZodPipe:()=>ca,$ZodPrefault:()=>ra,$ZodPromise:()=>da,$ZodReadonly:()=>ua,$ZodRealError:()=>te,$ZodRecord:()=>Ko,$ZodRegistry:()=>Or,$ZodSet:()=>Wo,$ZodString:()=>Ee,$ZodStringFormat:()=>A,$ZodSuccess:()=>ia,$ZodSymbol:()=>Zo,$ZodTemplateLiteral:()=>la,$ZodTransform:()=>Qo,$ZodTuple:()=>Sr,$ZodType:()=>P,$ZodULID:()=>po,$ZodURL:()=>co,$ZodUUID:()=>oo,$ZodUndefined:()=>To,$ZodUnion:()=>Rt,$ZodUnknown:()=>Ao,$ZodVoid:()=>Lo,$ZodXID:()=>fo,$ZodXor:()=>Vo,$brand:()=>rr,$constructor:()=>g,$input:()=>ga,$output:()=>fa,Doc:()=>Et,JSONSchema:()=>Lc,JSONSchemaGenerator:()=>ln,NEVER:()=>Xn,TimePrecision:()=>_a,_any:()=>Ca,_array:()=>Ga,_base64:()=>Xr,_base64url:()=>qr,_bigint:()=>Za,_boolean:()=>Oa,_catch:()=>hf,_check:()=>Ps,_cidrv4:()=>Gr,_cidrv6:()=>Wr,_coercedBigint:()=>Ta,_coercedBoolean:()=>Da,_coercedDate:()=>Ba,_coercedNumber:()=>Ia,_coercedString:()=>$a,_cuid:()=>Cr,_cuid2:()=>Fr,_custom:()=>Xa,_date:()=>Ma,_decode:()=>ur,_decodeAsync:()=>sr,_default:()=>gf,_discriminatedUnion:()=>rf,_e164:()=>Yr,_email:()=>Zr,_emoji:()=>Rr,_encode:()=>cr,_encodeAsync:()=>lr,_endsWith:()=>ot,_enum:()=>lf,_file:()=>Wa,_float32:()=>wa,_float64:()=>ja,_gt:()=>pe,_gte:()=>Q,_guid:()=>Ft,_includes:()=>nt,_int:()=>Sa,_int32:()=>Pa,_int64:()=>Na,_intersection:()=>nf,_ipv4:()=>Br,_ipv6:()=>Kr,_isoDate:()=>ba,_isoDateTime:()=>ya,_isoDuration:()=>ka,_isoTime:()=>xa,_jwt:()=>Qr,_ksuid:()=>Mr,_lazy:()=>xf,_length:()=>Ce,_literal:()=>df,_lowercase:()=>tt,_lt:()=>me,_lte:()=>oe,_mac:()=>ha,_map:()=>cf,_max:()=>oe,_maxLength:()=>Le,_maxSize:()=>Pe,_mime:()=>at,_min:()=>Q,_minLength:()=>ye,_minSize:()=>fe,_multipleOf:()=>je,_nan:()=>Ka,_nanoid:()=>Lr,_nativeEnum:()=>sf,_negative:()=>en,_never:()=>Ja,_nonnegative:()=>rn,_nonoptional:()=>vf,_nonpositive:()=>tn,_normalize:()=>ct,_null:()=>La,_nullable:()=>ff,_number:()=>za,_optional:()=>pf,_overwrite:()=>de,_parse:()=>We,_parseAsync:()=>Xe,_pipe:()=>_f,_positive:()=>Hr,_promise:()=>kf,_property:()=>nn,_readonly:()=>yf,_record:()=>af,_refine:()=>qa,_regex:()=>et,_safeDecode:()=>mr,_safeDecodeAsync:()=>fr,_safeEncode:()=>dr,_safeEncodeAsync:()=>pr,_safeParse:()=>qe,_safeParseAsync:()=>Ye,_set:()=>uf,_size:()=>Re,_slugify:()=>dt,_startsWith:()=>it,_string:()=>va,_stringFormat:()=>mt,_stringbool:()=>ec,_success:()=>$f,_superRefine:()=>Ya,_symbol:()=>Aa,_templateLiteral:()=>bf,_toLowerCase:()=>lt,_toUpperCase:()=>st,_transform:()=>mf,_trim:()=>ut,_tuple:()=>of,_uint32:()=>Ua,_uint64:()=>Ea,_ulid:()=>Jr,_undefined:()=>Ra,_union:()=>ef,_unknown:()=>Fa,_uppercase:()=>rt,_url:()=>Jt,_uuid:()=>Tr,_uuidv4:()=>Nr,_uuidv6:()=>Er,_uuidv7:()=>Ar,_void:()=>Va,_xid:()=>Vr,_xor:()=>tf,clone:()=>Y,config:()=>B,createStandardJSONSchemaMethod:()=>pt,createToJSONSchemaMethod:()=>tc,decode:()=>Im,decodeAsync:()=>wm,describe:()=>Qa,encode:()=>zm,encodeAsync:()=>Sm,extractDefs:()=>Oe,finalize:()=>De,flattenError:()=>Dt,formatError:()=>Zt,globalConfig:()=>zt,globalRegistry:()=>W,initializeContext:()=>Ue,isValidBase64:()=>Io,isValidBase64URL:()=>Sl,isValidJWT:()=>wl,locales:()=>Ae,meta:()=>Ha,parse:()=>or,parseAsync:()=>ar,prettifyError:()=>ci,process:()=>N,regexes:()=>ie,registry:()=>Dr,safeDecode:()=>Pm,safeDecodeAsync:()=>Om,safeEncode:()=>jm,safeEncodeAsync:()=>Um,safeParse:()=>ui,safeParseAsync:()=>li,toDotPath:()=>ul,toJSONSchema:()=>un,treeifyError:()=>ai,util:()=>b,version:()=>ro});var Xn=Object.freeze({status:"aborted"});function g(e,r,n){var l;function i(d,s){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:s,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),r(d,s);let m=c.prototype,a=Object.keys(m);for(let u=0;u<a.length;u++){let p=a[u];p in d||(d[p]=m[p].bind(d))}}let t=(l=n==null?void 0:n.Parent)!=null?l:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function c(d){var a;var s;let m=n!=null&&n.Parent?new o:this;i(m,d),(a=(s=m._zod).deferred)!=null||(s.deferred=[]);for(let u of m._zod.deferred)u();return m}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>{var s,m;return n!=null&&n.Parent&&d instanceof n.Parent?!0:(m=(s=d==null?void 0:d._zod)==null?void 0:s.traits)==null?void 0:m.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}var rr=Symbol("zod_brand"),se=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ke=class extends Error{constructor(r){super("Encountered unidirectional transform during encode: ".concat(r)),this.name="ZodEncodeError"}},zt={};function B(e){return e&&Object.assign(zt,e),zt}var b={};$e(b,{BIGINT_FORMAT_RANGES:()=>oi,Class:()=>Yn,NUMBER_FORMAT_RANGES:()=>ii,aborted:()=>we,allowsEval:()=>ei,assert:()=>rm,assertEqual:()=>Qd,assertIs:()=>em,assertNever:()=>tm,assertNotEqual:()=>Hd,assignProp:()=>Ie,base64ToUint8Array:()=>ol,base64urlToUint8Array:()=>_m,cached:()=>Ke,captureStackTrace:()=>ir,cleanEnum:()=>hm,cleanRegex:()=>wt,clone:()=>Y,cloneDef:()=>im,createTransparentProxy:()=>sm,defineLazy:()=>O,esc:()=>nr,escapeRegex:()=>ue,extend:()=>pm,finalizeIssue:()=>ee,floatSafeRemainder:()=>Qn,getElementAtPath:()=>om,getEnumValues:()=>St,getLengthableOrigin:()=>Ut,getParsedType:()=>lm,getSizableOrigin:()=>Pt,hexToUint8Array:()=>bm,isObject:()=>Te,isPlainObject:()=>Se,issue:()=>Ge,joinValues:()=>v,jsonStringifyReplacer:()=>Be,merge:()=>gm,mergeDefs:()=>_e,normalizeParams:()=>x,nullish:()=>ze,numKeys:()=>um,objectClone:()=>nm,omit:()=>mm,optionalKeys:()=>ni,parsedType:()=>y,partial:()=>vm,pick:()=>dm,prefixIssues:()=>ne,primitiveTypes:()=>ri,promiseAllObject:()=>am,propertyKeyTypes:()=>jt,randomString:()=>cm,required:()=>$m,safeExtend:()=>fm,shallowClone:()=>ti,slugify:()=>Hn,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>al,uint8ArrayToBase64url:()=>ym,uint8ArrayToHex:()=>xm,unwrapMessage:()=>It});function Qd(e){return e}function Hd(e){return e}function em(e){}function tm(e){throw new Error("Unexpected value in exhaustive check")}function rm(e){}function St(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 v(e,r="|"){return e.map(n=>_(n)).join(r)}function Be(e,r){return typeof r=="bigint"?r.toString():r}function Ke(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ze(e){return e==null}function wt(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Qn(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 d=i.match(/\\d?e-(\\d?)/);d!=null&&d[1]&&(t=Number.parseInt(d[1]))}let o=n>t?n:t,c=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(r.toFixed(o).replace(".",""));return c%l/10**o}var il=Symbol("evaluating");function O(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==il)return i===void 0&&(i=il,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function nm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ie(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _e(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function im(e){return _e(e._zod.def)}function om(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function am(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 cm(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function nr(e){return JSON.stringify(e)}function Hn(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,"").replace(/[\\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ei=Ke(()=>{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 Se(e){if(Te(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let n=r.prototype;return!(Te(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ti(e){return Se(e)?f({},e):Array.isArray(e)?[...e]:e}function um(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var lm=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))}},jt=new Set(["string","number","symbol"]),ri=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ue(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function Y(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 x(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"?I(f({},r),{error:()=>r.error}):r}function sm(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 _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?\'"\'.concat(e,\'"\'):"".concat(e)}function ni(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var ii={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]},oi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function dm(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=_e(e._zod.def,{get shape(){let c={};for(let l in r){if(!(l in n.shape))throw new Error(\'Unrecognized key: "\'.concat(l,\'"\'));r[l]&&(c[l]=n.shape[l])}return Ie(this,"shape",c),c},checks:[]});return Y(e,o)}function mm(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=_e(e._zod.def,{get shape(){let c=f({},e._zod.def.shape);for(let l in r){if(!(l in n.shape))throw new Error(\'Unrecognized key: "\'.concat(l,\'"\'));r[l]&&delete c[l]}return Ie(this,"shape",c),c},checks:[]});return Y(e,o)}function pm(e,r){if(!Se(r))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let c in r)if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=_e(e._zod.def,{get shape(){let o=f(f({},e._zod.def.shape),r);return Ie(this,"shape",o),o}});return Y(e,t)}function fm(e,r){if(!Se(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=_e(e._zod.def,{get shape(){let i=f(f({},e._zod.def.shape),r);return Ie(this,"shape",i),i}});return Y(e,n)}function gm(e,r){let n=_e(e._zod.def,{get shape(){let i=f(f({},e._zod.def.shape),r._zod.def.shape);return Ie(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return Y(e,n)}function vm(e,r,n){let t=r._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let c=_e(r._zod.def,{get shape(){let l=r._zod.def.shape,d=f({},l);if(n)for(let s in n){if(!(s in l))throw new Error(\'Unrecognized key: "\'.concat(s,\'"\'));n[s]&&(d[s]=e?new e({type:"optional",innerType:l[s]}):l[s])}else for(let s in l)d[s]=e?new e({type:"optional",innerType:l[s]}):l[s];return Ie(this,"shape",d),d},checks:[]});return Y(r,c)}function $m(e,r,n){let i=_e(r._zod.def,{get shape(){let t=r._zod.def.shape,o=f({},t);if(n)for(let c in n){if(!(c in o))throw new Error(\'Unrecognized key: "\'.concat(c,\'"\'));n[c]&&(o[c]=new e({type:"nonoptional",innerType:t[c]}))}else for(let c in t)o[c]=new e({type:"nonoptional",innerType:t[c]});return Ie(this,"shape",o),o}});return Y(r,i)}function we(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 ne(e,r){return r.map(n=>{var t;var i;return(t=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function It(e){return typeof e=="string"?e:e==null?void 0:e.message}function ee(e,r,n){var t,o,c,l,d,s,m,a,u,p,$;let i=I(f({},e),{path:(t=e.path)!=null?t:[]});if(!e.message){let h=($=(p=(a=(s=It((l=(c=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:c.error)==null?void 0:l.call(c,e)))!=null?s:It((d=r==null?void 0:r.error)==null?void 0:d.call(r,e)))!=null?a:It((m=n.customError)==null?void 0:m.call(n,e)))!=null?p:It((u=n.localeError)==null?void 0:u.call(n,e)))!=null?$:"Invalid input";i.message=h}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function Pt(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ut(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function y(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function Ge(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:f({},r)}function hm(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function ol(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 al(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function _m(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return ol(r+n)}function ym(e){return al(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function bm(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 xm(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}var Yn=class{constructor(...r){}};var cl=(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,Be,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ot=g("$ZodError",cl),te=g("$ZodError",cl,{Parent:Error});function Dt(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 Zt(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(c=>i({issues:c}));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 c=n,l=0;for(;l<o.path.length;){let d=o.path[l];l===o.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(r(o))):c[d]=c[d]||{_errors:[]},c=c[d],l++}}};return i(e),n}function ai(e,r=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var d,s,m,a;var c,l;for(let u of t.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(p=>i({issues:p},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let p=[...o,...u.path];if(p.length===0){n.errors.push(r(u));continue}let $=n,h=0;for(;h<p.length;){let w=p[h],D=h===p.length-1;typeof w=="string"?((d=$.properties)!=null||($.properties={}),(s=(c=$.properties)[w])!=null||(c[w]={errors:[]}),$=$.properties[w]):((m=$.items)!=null||($.items=[]),(a=(l=$.items)[w])!=null||(l[w]={errors:[]}),$=$.items[w]),D&&$.errors.push(r(u)),h++}}};return i(e),n}function ul(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 ci(e){var i;let r=[],n=[...e.issues].sort((t,o)=>{var c,l;return((c=t.path)!=null?c:[]).length-((l=o.path)!=null?l:[]).length});for(let t of n)r.push("\\u2716 ".concat(t.message)),(i=t.path)!=null&&i.length&&r.push(" \\u2192 at ".concat(ul(t.path)));return r.join("\\n")}var We=e=>(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!1}):{async:!1},c=r._zod.run({value:n,issues:[]},o);if(c instanceof Promise)throw new se;if(c.issues.length){let d=new((l=t==null?void 0:t.Err)!=null?l:e)(c.issues.map(s=>ee(s,o,B())));throw ir(d,t==null?void 0:t.callee),d}return c.value},or=We(te),Xe=e=>async(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!0}):{async:!0},c=r._zod.run({value:n,issues:[]},o);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new((l=t==null?void 0:t.Err)!=null?l:e)(c.issues.map(s=>ee(s,o,B())));throw ir(d,t==null?void 0:t.callee),d}return c.value},ar=Xe(te),qe=e=>(r,n,i)=>{let t=i?I(f({},i),{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new se;return o.issues.length?{success:!1,error:new(e!=null?e:Ot)(o.issues.map(c=>ee(c,t,B())))}:{success:!0,data:o.value}},ui=qe(te),Ye=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(c=>ee(c,t,B())))}:{success:!0,data:o.value}},li=Ye(te),cr=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return We(e)(r,n,t)},zm=cr(te),ur=e=>(r,n,i)=>We(e)(r,n,i),Im=ur(te),lr=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Xe(e)(r,n,t)},Sm=lr(te),sr=e=>async(r,n,i)=>Xe(e)(r,n,i),wm=sr(te),dr=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return qe(e)(r,n,t)},jm=dr(te),mr=e=>(r,n,i)=>qe(e)(r,n,i),Pm=mr(te),pr=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ye(e)(r,n,t)},Um=pr(te),fr=e=>async(r,n,i)=>Ye(e)(r,n,i),Om=fr(te);var ie={};$e(ie,{base64:()=>Ii,base64url:()=>gr,bigint:()=>Oi,boolean:()=>Zi,browserEmail:()=>Lm,cidrv4:()=>ki,cidrv6:()=>zi,cuid:()=>si,cuid2:()=>di,date:()=>wi,datetime:()=>Pi,domain:()=>Jm,duration:()=>vi,e164:()=>Si,email:()=>hi,emoji:()=>_i,extendedDuration:()=>Dm,guid:()=>$i,hex:()=>Vm,hostname:()=>Fm,html5Email:()=>Em,idnEmail:()=>Rm,integer:()=>Di,ipv4:()=>yi,ipv6:()=>bi,ksuid:()=>fi,lowercase:()=>Ei,mac:()=>xi,md5_base64:()=>Bm,md5_base64url:()=>Km,md5_hex:()=>Mm,nanoid:()=>gi,null:()=>Ti,number:()=>vr,rfc5322Email:()=>Am,sha1_base64:()=>Wm,sha1_base64url:()=>Xm,sha1_hex:()=>Gm,sha256_base64:()=>Ym,sha256_base64url:()=>Qm,sha256_hex:()=>qm,sha384_base64:()=>ep,sha384_base64url:()=>tp,sha384_hex:()=>Hm,sha512_base64:()=>np,sha512_base64url:()=>ip,sha512_hex:()=>rp,string:()=>Ui,time:()=>ji,ulid:()=>mi,undefined:()=>Ni,unicodeEmail:()=>ll,uppercase:()=>Ai,uuid:()=>Ne,uuid4:()=>Zm,uuid6:()=>Tm,uuid7:()=>Nm,xid:()=>pi});var si=/^[cC][^\\s-]{8,}$/,di=/^[0-9a-z]+$/,mi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pi=/^[0-9a-vA-V]{20}$/,fi=/^[A-Za-z0-9]{27}$/,gi=/^[a-zA-Z0-9_-]{21}$/,vi=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Dm=/^[-+]?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)?)??$/,$i=/^([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})$/,Ne=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)$/,Zm=Ne(4),Tm=Ne(6),Nm=Ne(7),hi=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,Em=/^[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])?)*$/,Am=/^(([^<>()\\[\\]\\\\.,;:\\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,}))$/,ll=new RegExp(\'^[^\\\\s@"]{1,64}@[^\\\\s@]{1,255}$\',"u"),Rm=ll,Lm=/^[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])?)*$/,Cm="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$";function _i(){return new RegExp(Cm,"u")}var yi=/^(?:(?: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])$/,bi=/^(([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}|:))$/,xi=e=>{let r=ue(e!=null?e:":");return new RegExp("^(?:[0-9A-F]{2}".concat(r,"){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}").concat(r,"){5}[0-9a-f]{2}$"))},ki=/^((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])$/,zi=/^(([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])$/,Ii=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,gr=/^[A-Za-z0-9_-]*$/,Fm=/^(?=.{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])?)*\\.?$/,Jm=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,Si=/^\\+[1-9]\\d{6,14}$/,sl="(?:(?:\\\\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])))",wi=new RegExp("^".concat(sl,"$"));function dl(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 ji(e){return new RegExp("^".concat(dl(e),"$"))}function Pi(e){let r=dl({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(sl,"T(?:").concat(i,")$"))}var Ui=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,"$"))},Oi=/^-?\\d+n?$/,Di=/^-?\\d+$/,vr=/^-?\\d+(?:\\.\\d+)?$/,Zi=/^(?:true|false)$/i,Ti=/^null$/i;var Ni=/^undefined$/i;var Ei=/^[^A-Z]*$/,Ai=/^[^a-z]*$/,Vm=/^[0-9a-fA-F]*$/;function Tt(e,r){return new RegExp("^[A-Za-z0-9+/]{".concat(e,"}").concat(r,"$"))}function Nt(e){return new RegExp("^[A-Za-z0-9_-]{".concat(e,"}$"))}var Mm=/^[0-9a-fA-F]{32}$/,Bm=Tt(22,"=="),Km=Nt(22),Gm=/^[0-9a-fA-F]{40}$/,Wm=Tt(27,"="),Xm=Nt(27),qm=/^[0-9a-fA-F]{64}$/,Ym=Tt(43,"="),Qm=Nt(43),Hm=/^[0-9a-fA-F]{96}$/,ep=Tt(64,""),tp=Nt(64),rp=/^[0-9a-fA-F]{128}$/,np=Tt(86,"=="),ip=Nt(86);var L=g("$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=[])}),pl={number:"number",bigint:"bigint",object:"date"},$r=g("$ZodCheckLessThan",(e,r)=>{L.init(e,r);let n=pl[typeof r.value];e._zod.onattach.push(i=>{var c;let t=i._zod.bag,o=(c=r.inclusive?t.maximum:t.exclusiveMaximum)!=null?c: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:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),hr=g("$ZodCheckGreaterThan",(e,r)=>{L.init(e,r);let n=pl[typeof r.value];e._zod.onattach.push(i=>{var c;let t=i._zod.bag,o=(c=r.inclusive?t.minimum:t.exclusiveMinimum)!=null?c: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:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Ri=g("$ZodCheckMultipleOf",(e,r)=>{L.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):Qn(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})}}),Li=g("$ZodCheckNumberFormat",(e,r)=>{var c;L.init(e,r),r.format=r.format||"float64";let n=(c=r.format)==null?void 0:c.includes("int"),i=n?"int":"number",[t,o]=ii[r.format];e._zod.onattach.push(l=>{let d=l._zod.bag;d.format=r.format,d.minimum=t,d.maximum=o,n&&(d.pattern=Di)}),e._zod.check=l=>{let d=l.value;if(n){if(!Number.isInteger(d)){l.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?l.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):l.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}d<t&&l.issues.push({origin:"number",input:d,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),d>o&&l.issues.push({origin:"number",input:d,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!r.abort})}}),Ci=g("$ZodCheckBigIntFormat",(e,r)=>{L.init(e,r);let[n,i]=oi[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,inclusive:!0,inst:e,continue:!r.abort})}}),Fi=g("$ZodCheckMaxSize",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var c;let o=(c=t._zod.bag.maximum)!=null?c: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:Pt(o),code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Ji=g("$ZodCheckMinSize",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var c;let o=(c=t._zod.bag.minimum)!=null?c: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:Pt(o),code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Vi=g("$ZodCheckSizeEquals",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(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,c=o.size;if(c===r.size)return;let l=c>r.size;t.issues.push(I(f({origin:Pt(o)},l?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Mi=g("$ZodCheckMaxLength",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var c;let o=(c=t._zod.bag.maximum)!=null?c:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;if(o.length<=r.maximum)return;let l=Ut(o);t.issues.push({origin:l,code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Bi=g("$ZodCheckMinLength",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var c;let o=(c=t._zod.bag.minimum)!=null?c:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;if(o.length>=r.minimum)return;let l=Ut(o);t.issues.push({origin:l,code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Ki=g("$ZodCheckLengthEquals",(e,r)=>{var i;var n;L.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!ze(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,c=o.length;if(c===r.length)return;let l=Ut(o),d=c>r.length;t.issues.push(I(f({origin:l},d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Qe=g("$ZodCheckStringFormat",(e,r)=>{var t,o;var n,i;L.init(e,r),e._zod.onattach.push(c=>{var d;let l=c._zod.bag;l.format=r.format,r.pattern&&((d=l.patterns)!=null||(l.patterns=new Set),l.patterns.add(r.pattern))}),r.pattern?(t=(n=e._zod).check)!=null||(n.check=c=>{r.pattern.lastIndex=0,!r.pattern.test(c.value)&&c.issues.push(I(f({origin:"string",code:"invalid_format",format:r.format,input:c.value},r.pattern?{pattern:r.pattern.toString()}:{}),{inst:e,continue:!r.abort}))}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),Gi=g("$ZodCheckRegex",(e,r)=>{Qe.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})}}),Wi=g("$ZodCheckLowerCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Ei),Qe.init(e,r)}),Xi=g("$ZodCheckUpperCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Ai),Qe.init(e,r)}),qi=g("$ZodCheckIncludes",(e,r)=>{L.init(e,r);let n=ue(r.includes),i=new RegExp(typeof r.position=="number"?"^.{".concat(r.position,"}").concat(n):n);r.pattern=i,e._zod.onattach.push(t=>{var c;let o=t._zod.bag;(c=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})}}),Yi=g("$ZodCheckStartsWith",(e,r)=>{var i;L.init(e,r);let n=new RegExp("^".concat(ue(r.prefix),".*"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var c;let o=t._zod.bag;(c=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})}}),Qi=g("$ZodCheckEndsWith",(e,r)=>{var i;L.init(e,r);let n=new RegExp(".*".concat(ue(r.suffix),"$"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var c;let o=t._zod.bag;(c=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 ml(e,r,n){e.issues.length&&r.issues.push(...ne(n,e.issues))}var Hi=g("$ZodCheckProperty",(e,r)=>{L.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=>ml(t,n,r.property));ml(i,n,r.property)}}),eo=g("$ZodCheckMimeType",(e,r)=>{L.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})}}),to=g("$ZodCheckOverwrite",(e,r)=>{L.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var Et=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(c=>c),t=Math.min(...i.map(c=>c.length-c.trimStart().length)),o=i.map(c=>c.slice(t)).map(c=>" ".repeat(this.indent*2)+c);for(let c of o)this.content.push(c)}compile(){var o;let r=Function,n=this==null?void 0:this.args,t=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(c=>" ".concat(c))];return new r(...n,t.join("\\n"))}};var ro={major:4,minor:3,patch:6};var P=g("$ZodType",(e,r)=>{var t,o,c;var n;e!=null||(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=ro;let i=[...(t=e._zod.def.checks)!=null?t:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let l of i)for(let d of l._zod.onattach)d(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(c=e._zod.deferred)==null||c.push(()=>{e._zod.run=e._zod.parse});else{let l=(s,m,a)=>{let u=we(s),p;for(let $ of m){if($._zod.def.when){if(!$._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,w=$._zod.check(s);if(w instanceof Promise&&(a==null?void 0:a.async)===!1)throw new se;if(p||w instanceof Promise)p=(p!=null?p:Promise.resolve()).then(async()=>{await w,s.issues.length!==h&&(u||(u=we(s,h)))});else{if(s.issues.length===h)continue;u||(u=we(s,h))}}return p?p.then(()=>s):s},d=(s,m,a)=>{if(we(s))return s.aborted=!0,s;let u=l(m,i,a);if(u instanceof Promise){if(a.async===!1)throw new se;return u.then(p=>e._zod.parse(p,a))}return e._zod.parse(u,a)};e._zod.run=(s,m)=>{if(m.skipChecks)return e._zod.parse(s,m);if(m.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},I(f({},m),{skipChecks:!0}));return u instanceof Promise?u.then(p=>d(p,s,m)):d(u,s,m)}let a=e._zod.parse(s,m);if(a instanceof Promise){if(m.async===!1)throw new se;return a.then(u=>l(u,i,m))}return l(a,i,m)}}O(e,"~standard",()=>({validate:l=>{var d;try{let s=ui(e,l);return s.success?{value:s.data}:{issues:(d=s.error)==null?void 0:d.issues}}catch(s){return li(e,l).then(m=>{var a;return m.success?{value:m.data}:{issues:(a=m.error)==null?void 0:a.issues}})}},vendor:"zod",version:1}))}),Ee=g("$ZodString",(e,r)=>{var n,i,t;P.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:Ui(e._zod.bag),e._zod.parse=(o,c)=>{if(r.coerce)try{o.value=String(o.value)}catch(l){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),A=g("$ZodStringFormat",(e,r)=>{Qe.init(e,r),Ee.init(e,r)}),io=g("$ZodGUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=$i),A.init(e,r)}),oo=g("$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=Ne(o))}else(i=r.pattern)!=null||(r.pattern=Ne());A.init(e,r)}),ao=g("$ZodEmail",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=hi),A.init(e,r)}),co=g("$ZodURL",(e,r)=>{A.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:r.hostname.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})}}}),uo=g("$ZodEmoji",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=_i()),A.init(e,r)}),lo=g("$ZodNanoID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=gi),A.init(e,r)}),so=g("$ZodCUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=si),A.init(e,r)}),mo=g("$ZodCUID2",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=di),A.init(e,r)}),po=g("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=mi),A.init(e,r)}),fo=g("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=pi),A.init(e,r)}),go=g("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=fi),A.init(e,r)}),vo=g("$ZodISODateTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Pi(r)),A.init(e,r)}),$o=g("$ZodISODate",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=wi),A.init(e,r)}),ho=g("$ZodISOTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ji(r)),A.init(e,r)}),_o=g("$ZodISODuration",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=vi),A.init(e,r)}),yo=g("$ZodIPv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=yi),A.init(e,r),e._zod.bag.format="ipv4"}),bo=g("$ZodIPv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=bi),A.init(e,r),e._zod.bag.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})}}}),xo=g("$ZodMAC",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=xi(r.delimiter)),A.init(e,r),e._zod.bag.format="mac"}),ko=g("$ZodCIDRv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ki),A.init(e,r)}),zo=g("$ZodCIDRv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=zi),A.init(e,r),e._zod.check=i=>{let t=i.value.split("/");try{if(t.length!==2)throw new Error;let[o,c]=t;if(!c)throw new Error;let l=Number(c);if("".concat(l)!==c)throw new Error;if(l<0||l>128)throw new Error;new URL("http://[".concat(o,"]"))}catch(o){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function Io(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(r){return!1}}var So=g("$ZodBase64",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Ii),A.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Io(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function Sl(e){if(!gr.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return Io(n)}var wo=g("$ZodBase64URL",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=gr),A.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{Sl(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),jo=g("$ZodE164",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Si),A.init(e,r)});function wl(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 Po=g("$ZodJWT",(e,r)=>{A.init(e,r),e._zod.check=n=>{wl(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Uo=g("$ZodCustomStringFormat",(e,r)=>{A.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})}}),zr=g("$ZodNumber",(e,r)=>{var n;P.init(e,r),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:vr,e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=Number(i.value)}catch(l){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push(f({expected:"number",code:"invalid_type",input:o,inst:e},c?{received:c}:{})),i}}),Oo=g("$ZodNumberFormat",(e,r)=>{Li.init(e,r),zr.init(e,r)}),At=g("$ZodBoolean",(e,r)=>{P.init(e,r),e._zod.pattern=Zi,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}}),Ir=g("$ZodBigInt",(e,r)=>{P.init(e,r),e._zod.pattern=Oi,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}}),Do=g("$ZodBigIntFormat",(e,r)=>{Ci.init(e,r),Ir.init(e,r)}),Zo=g("$ZodSymbol",(e,r)=>{P.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}}),To=g("$ZodUndefined",(e,r)=>{P.init(e,r),e._zod.pattern=Ni,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}}),No=g("$ZodNull",(e,r)=>{P.init(e,r),e._zod.pattern=Ti,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}}),Eo=g("$ZodAny",(e,r)=>{P.init(e,r),e._zod.parse=n=>n}),Ao=g("$ZodUnknown",(e,r)=>{P.init(e,r),e._zod.parse=n=>n}),Ro=g("$ZodNever",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Lo=g("$ZodVoid",(e,r)=>{P.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}}),Co=g("$ZodDate",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(l){}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push(I(f({expected:"date",code:"invalid_type",input:t},o?{received:"Invalid Date"}:{}),{inst:e})),n}});function gl(e,r,n){e.issues.length&&r.issues.push(...ne(n,e.issues)),r.value[n]=e.value}var Fo=g("$ZodArray",(e,r)=>{P.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 c=0;c<t.length;c++){let l=t[c],d=r.element._zod.run({value:l,issues:[]},i);d instanceof Promise?o.push(d.then(s=>gl(s,n,c))):gl(d,n,c)}return o.length?Promise.all(o).then(()=>n):n}});function kr(e,r,n,i,t){if(e.issues.length){if(t&&!(n in i))return;r.issues.push(...ne(n,e.issues))}e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function jl(e){var i,t,o,c;let r=Object.keys(e.shape);for(let l of r)if(!((c=(o=(t=(i=e.shape)==null?void 0:i[l])==null?void 0:t._zod)==null?void 0:o.traits)!=null&&c.has("$ZodType")))throw new Error(\'Invalid element at key "\'.concat(l,\'": expected a Zod schema\'));let n=ni(e.shape);return I(f({},e),{keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)})}function Pl(e,r,n,i,t,o){let c=[],l=t.keySet,d=t.catchall._zod,s=d.def.type,m=d.optout==="optional";for(let a in r){if(l.has(a))continue;if(s==="never"){c.push(a);continue}let u=d.run({value:r[a],issues:[]},i);u instanceof Promise?e.push(u.then(p=>kr(p,n,a,r,m))):kr(u,n,a,r,m)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:r,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Ul=g("$ZodObject",(e,r)=>{P.init(e,r);let n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){let l=r.shape;Object.defineProperty(r,"shape",{get:()=>{let d=f({},l);return Object.defineProperty(r,"shape",{value:d}),d}})}let i=Ke(()=>jl(r));O(e._zod,"propValues",()=>{var s;let l=r.shape,d={};for(let m in l){let a=l[m]._zod;if(a.values){(s=d[m])!=null||(d[m]=new Set);for(let u of a.values)d[m].add(u)}}return d});let t=Te,o=r.catchall,c;e._zod.parse=(l,d)=>{c!=null||(c=i.value);let s=l.value;if(!t(s))return l.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),l;l.value={};let m=[],a=c.shape;for(let u of c.keys){let p=a[u],$=p._zod.optout==="optional",h=p._zod.run({value:s[u],issues:[]},d);h instanceof Promise?m.push(h.then(w=>kr(w,l,u,s,$))):kr(h,l,u,s,$)}return o?Pl(m,s,l,d,i.value,e):m.length?Promise.all(m).then(()=>l):l}}),Jo=g("$ZodObjectJIT",(e,r)=>{Ul.init(e,r);let n=e._zod.parse,i=Ke(()=>jl(r)),t=u=>{var J;let p=new Et(["shape","payload","ctx"]),$=i.value,h=S=>{let j=nr(S);return"shape[".concat(j,"]._zod.run({ value: input[").concat(j,"], issues: [] }, ctx)")};p.write("const input = payload.value;");let w=Object.create(null),D=0;for(let S of $.keys)w[S]="key_".concat(D++);p.write("const newResult = {};");for(let S of $.keys){let j=w[S],E=nr(S),M=u[S],Me=((J=M==null?void 0:M._zod)==null?void 0:J.optout)==="optional";p.write("const ".concat(j," = ").concat(h(S),";")),Me?p.write("\\n if (".concat(j,".issues.length) {\\n if (").concat(E," in input) {\\n payload.issues = payload.issues.concat(").concat(j,".issues.map(iss => ({\\n ...iss,\\n path: iss.path ? [").concat(E,", ...iss.path] : [").concat(E,"]\\n })));\\n }\\n }\\n \\n if (").concat(j,".value === undefined) {\\n if (").concat(E," in input) {\\n newResult[").concat(E,"] = undefined;\\n }\\n } else {\\n newResult[").concat(E,"] = ").concat(j,".value;\\n }\\n \\n ")):p.write("\\n if (".concat(j,".issues.length) {\\n payload.issues = payload.issues.concat(").concat(j,".issues.map(iss => ({\\n ...iss,\\n path: iss.path ? [").concat(E,", ...iss.path] : [").concat(E,"]\\n })));\\n }\\n \\n if (").concat(j,".value === undefined) {\\n if (").concat(E," in input) {\\n newResult[").concat(E,"] = undefined;\\n }\\n } else {\\n newResult[").concat(E,"] = ").concat(j,".value;\\n }\\n \\n "))}p.write("payload.value = newResult;"),p.write("return payload;");let T=p.compile();return(S,j)=>T(u,S,j)},o,c=Te,l=!zt.jitless,s=l&&ei.value,m=r.catchall,a;e._zod.parse=(u,p)=>{a!=null||(a=i.value);let $=u.value;return c($)?l&&s&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(o||(o=t(r.shape)),u=o(u,p),m?Pl([],$,u,p,a,e):u):n(u,p):(u.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),u)}});function vl(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=>!we(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(c=>ee(c,i,B())))}),r)}var Rt=g("$ZodUnion",(e,r)=>{P.init(e,r),O(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),O(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),O(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),O(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=>wt(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 c=!1,l=[];for(let d of r.options){let s=d._zod.run({value:t.value,issues:[]},o);if(s instanceof Promise)l.push(s),c=!0;else{if(s.issues.length===0)return s;l.push(s)}}return c?Promise.all(l).then(d=>vl(d,t,e,o)):vl(l,t,e,o)}});function $l(e,r,n,i){let t=e.filter(o=>o.issues.length===0);return t.length===1?(r.value=t[0].value,r):(t.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(c=>ee(c,i,B())))}):r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1}),r)}var Vo=g("$ZodXor",(e,r)=>{Rt.init(e,r),r.inclusive=!1;let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,o)=>{if(n)return i(t,o);let c=!1,l=[];for(let d of r.options){let s=d._zod.run({value:t.value,issues:[]},o);s instanceof Promise?(l.push(s),c=!0):l.push(s)}return c?Promise.all(l).then(d=>$l(d,t,e,o)):$l(l,t,e,o)}}),Mo=g("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,Rt.init(e,r);let n=e._zod.parse;O(e._zod,"propValues",()=>{let t={};for(let o of r.options){let c=o._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(o),\'"\'));for(let[l,d]of Object.entries(c)){t[l]||(t[l]=new Set);for(let s of d)t[l].add(s)}}return t});let i=Ke(()=>{var c;let t=r.options,o=new Map;for(let l of t){let d=(c=l._zod.propValues)==null?void 0:c[r.discriminator];if(!d||d.size===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(l),\'"\'));for(let s of d){if(o.has(s))throw new Error(\'Duplicate discriminator value "\'.concat(String(s),\'"\'));o.set(s,l)}}return o});e._zod.parse=(t,o)=>{let c=t.value;if(!Te(c))return t.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),t;let l=i.value.get(c==null?void 0:c[r.discriminator]);return l?l._zod.run(t,o):r.unionFallback?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:c,path:[r.discriminator],inst:e}),t)}}),Bo=g("$ZodIntersection",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),c=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||c instanceof Promise?Promise.all([o,c]).then(([d,s])=>hl(n,d,s)):hl(n,o,c)}});function no(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(Se(e)&&Se(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t=f(f({},e),r);for(let o of i){let c=no(e[o],r[o]);if(!c.valid)return{valid:!1,mergeErrorPath:[o,...c.mergeErrorPath]};t[o]=c.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],c=no(t,o);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function hl(e,r,n){let i=new Map,t;for(let l of r.issues)if(l.code==="unrecognized_keys"){t!=null||(t=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of n.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let o=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&t&&e.issues.push(I(f({},t),{keys:o})),we(e))return e;let c=no(r.value,n.value);if(!c.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(c.mergeErrorPath)));return e.value=c.data,e}var Sr=g("$ZodTuple",(e,r)=>{P.init(e,r);let n=r.items;e._zod.parse=(i,t)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let c=[],l=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=l===-1?0:n.length-l;if(!r.rest){let m=o.length>n.length,a=o.length<d-1;if(m||a)return i.issues.push(I(f({},m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length}),{input:o,inst:e,origin:"array"})),i}let s=-1;for(let m of n){if(s++,s>=o.length&&s>=d)continue;let a=m._zod.run({value:o[s],issues:[]},t);a instanceof Promise?c.push(a.then(u=>_r(u,i,s))):_r(a,i,s)}if(r.rest){let m=o.slice(n.length);for(let a of m){s++;let u=r.rest._zod.run({value:a,issues:[]},t);u instanceof Promise?c.push(u.then(p=>_r(p,i,s))):_r(u,i,s)}}return c.length?Promise.all(c).then(()=>i):i}});function _r(e,r,n){e.issues.length&&r.issues.push(...ne(n,e.issues)),r.value[n]=e.value}var Ko=g("$ZodRecord",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Se(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[],c=r.keyType._zod.values;if(c){n.value={};let l=new Set;for(let s of c)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){l.add(typeof s=="number"?s.toString():s);let m=r.valueType._zod.run({value:t[s],issues:[]},i);m instanceof Promise?o.push(m.then(a=>{a.issues.length&&n.issues.push(...ne(s,a.issues)),n.value[s]=a.value})):(m.issues.length&&n.issues.push(...ne(s,m.issues)),n.value[s]=m.value)}let d;for(let s in t)l.has(s)||(d=d!=null?d:[],d.push(s));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:d})}else{n.value={};for(let l of Reflect.ownKeys(t)){if(l==="__proto__")continue;let d=r.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&vr.test(l)&&d.issues.length){let a=r.keyType._zod.run({value:Number(l),issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");a.issues.length===0&&(d=a)}if(d.issues.length){r.mode==="loose"?n.value[l]=t[l]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(a=>ee(a,i,B())),input:l,path:[l],inst:e});continue}let m=r.valueType._zod.run({value:t[l],issues:[]},i);m instanceof Promise?o.push(m.then(a=>{a.issues.length&&n.issues.push(...ne(l,a.issues)),n.value[d.value]=a.value})):(m.issues.length&&n.issues.push(...ne(l,m.issues)),n.value[d.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Go=g("$ZodMap",(e,r)=>{P.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[c,l]of t){let d=r.keyType._zod.run({value:c,issues:[]},i),s=r.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||s instanceof Promise?o.push(Promise.all([d,s]).then(([m,a])=>{_l(m,a,n,c,t,e,i)})):_l(d,s,n,c,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function _l(e,r,n,i,t,o,c){e.issues.length&&(jt.has(typeof i)?n.issues.push(...ne(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:e.issues.map(l=>ee(l,c,B()))})),r.issues.length&&(jt.has(typeof i)?n.issues.push(...ne(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(l=>ee(l,c,B()))})),n.value.set(e.value,r.value)}var Wo=g("$ZodSet",(e,r)=>{P.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 c of t){let l=r.valueType._zod.run({value:c,issues:[]},i);l instanceof Promise?o.push(l.then(d=>yl(d,n))):yl(l,n)}return o.length?Promise.all(o).then(()=>n):n}});function yl(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Xo=g("$ZodEnum",(e,r)=>{P.init(e,r);let n=St(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp("^(".concat(n.filter(t=>jt.has(typeof t)).map(t=>typeof t=="string"?ue(t):t.toString()).join("|"),")$")),e._zod.parse=(t,o)=>{let c=t.value;return i.has(c)||t.issues.push({code:"invalid_value",values:n,input:c,inst:e}),t}}),qo=g("$ZodLiteral",(e,r)=>{if(P.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp("^(".concat(r.values.map(i=>typeof i=="string"?ue(i):i?ue(i.toString()):String(i)).join("|"),")$")),e._zod.parse=(i,t)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),i}}),Yo=g("$ZodFile",(e,r)=>{P.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}}),Qo=g("$ZodTransform",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ke(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(c=>(n.value=c,n));if(t instanceof Promise)throw new se;return n.value=t,n}});function bl(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var wr=g("$ZodOptional",(e,r)=>{P.init(e,r),e._zod.optin="optional",e._zod.optout="optional",O(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),O(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(wt(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=>bl(o,n.value)):bl(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Ho=g("$ZodExactOptional",(e,r)=>{wr.init(e,r),O(e._zod,"values",()=>r.innerType._zod.values),O(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),ea=g("$ZodNullable",(e,r)=>{P.init(e,r),O(e._zod,"optin",()=>r.innerType._zod.optin),O(e._zod,"optout",()=>r.innerType._zod.optout),O(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(wt(n.source),"|null)$")):void 0}),O(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)}),ta=g("$ZodDefault",(e,r)=>{P.init(e,r),e._zod.optin="optional",O(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=>xl(o,r)):xl(t,r)}});function xl(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var ra=g("$ZodPrefault",(e,r)=>{P.init(e,r),e._zod.optin="optional",O(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))}),na=g("$ZodNonOptional",(e,r)=>{P.init(e,r),O(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=>kl(o,e)):kl(t,e)}});function kl(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 ia=g("$ZodSuccess",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ke("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)}}),oa=g("$ZodCatch",(e,r)=>{P.init(e,r),O(e._zod,"optin",()=>r.innerType._zod.optin),O(e._zod,"optout",()=>r.innerType._zod.optout),O(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(I(f({},n),{error:{issues:o.issues.map(c=>ee(c,i,B()))},input:n.value})),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue(I(f({},n),{error:{issues:t.issues.map(o=>ee(o,i,B()))},input:n.value})),n.issues=[]),n)}}),aa=g("$ZodNaN",(e,r)=>{P.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)}),ca=g("$ZodPipe",(e,r)=>{P.init(e,r),O(e._zod,"values",()=>r.in._zod.values),O(e._zod,"optin",()=>r.in._zod.optin),O(e._zod,"optout",()=>r.out._zod.optout),O(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(c=>yr(c,r.in,i)):yr(o,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>yr(o,r.out,i)):yr(t,r.out,i)}});function yr(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var Lt=g("$ZodCodec",(e,r)=>{P.init(e,r),O(e._zod,"values",()=>r.in._zod.values),O(e._zod,"optin",()=>r.in._zod.optin),O(e._zod,"optout",()=>r.out._zod.optout),O(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(c=>br(c,r,i)):br(o,r,i)}else{let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(c=>br(c,r,i)):br(o,r,i)}}});function br(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=>xr(e,o,r.out,n)):xr(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(o=>xr(e,o,r.in,n)):xr(e,t,r.in,n)}}function xr(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var ua=g("$ZodReadonly",(e,r)=>{P.init(e,r),O(e._zod,"propValues",()=>r.innerType._zod.propValues),O(e._zod,"values",()=>r.innerType._zod.values),O(e._zod,"optin",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),O(e._zod,"optout",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.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(zl):zl(t)}});function zl(e){return e.value=Object.freeze(e.value),e}var la=g("$ZodTemplateLiteral",(e,r)=>{P.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,c=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,c))}else if(i===null||ri.has(typeof i))n.push(ue("".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:"string",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)}}),sa=g("$ZodFunction",(e,r)=>(P.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?or(e._def.input,i):i,o=Reflect.apply(n,this,t);return e._def.output?or(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 ar(e._def.input,i):i,o=await Reflect.apply(n,this,t);return e._def.output?await ar(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 Sr({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)),da=g("$ZodPromise",(e,r)=>{P.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),ma=g("$ZodLazy",(e,r)=>{P.init(e,r),O(e._zod,"innerType",()=>r.getter()),O(e._zod,"pattern",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.pattern}),O(e._zod,"propValues",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.propValues}),O(e._zod,"optin",()=>{var n,i,t;return(t=(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optin)!=null?t:void 0}),O(e._zod,"optout",()=>{var n,i,t;return(t=(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optout)!=null?t:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),pa=g("$ZodCustom",(e,r)=>{L.init(e,r),P.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=>Il(o,n,i,e));Il(t,n,i,e)}});function Il(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(Ge(o))}}var Ae={};$e(Ae,{ar:()=>Ol,az:()=>Dl,be:()=>Tl,bg:()=>Nl,ca:()=>El,cs:()=>Al,da:()=>Rl,de:()=>Ll,en:()=>jr,eo:()=>Cl,es:()=>Fl,fa:()=>Jl,fi:()=>Vl,fr:()=>Ml,frCA:()=>Bl,he:()=>Kl,hu:()=>Gl,hy:()=>Xl,id:()=>ql,is:()=>Yl,it:()=>Ql,ja:()=>Hl,ka:()=>es,kh:()=>ts,km:()=>Pr,ko:()=>rs,lt:()=>is,mk:()=>os,ms:()=>as,nl:()=>cs,no:()=>us,ota:()=>ls,pl:()=>ds,ps:()=>ss,pt:()=>ms,ru:()=>fs,sl:()=>gs,sv:()=>vs,ta:()=>$s,th:()=>hs,tr:()=>_s,ua:()=>ys,uk:()=>Ur,ur:()=>bs,uz:()=>xs,vi:()=>ks,yo:()=>Ss,zhCN:()=>zs,zhTW:()=>Is});var ap=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected,"\\u060C \\u0648\\u0644\\u0643\\u0646 \\u062A\\u0645 \\u0625\\u062F\\u062E\\u0627\\u0644 ").concat(p):"\\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(a,"\\u060C \\u0648\\u0644\\u0643\\u0646 \\u062A\\u0645 \\u0625\\u062F\\u062E\\u0627\\u0644 ").concat(p)}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(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?" \\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((l=t.origin)!=null?l:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\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(u.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((m=n[a.format])!=null?m: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(v(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 Ol(){return{localeError:ap()}}var cp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n instanceof ".concat(t.expected,", daxil olan ").concat(p):"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(a,", daxil olan ").concat(p)}case"invalid_value":return t.values.length===1?"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(_(t.values[0])):"Yanl\\u0131\\u015F se\\xE7im: a\\u015Fa\\u011F\\u0131dak\\u0131lardan biri olmal\\u0131d\\u0131r: ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((l=t.origin)!=null?l:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Dl(){return{localeError:cp()}}function Zl(e,r,n,i){let t=Math.abs(e),o=t%10,c=t%100;return c>=11&&c<=19?i:o===1?r:o>=2&&o<=4?n:i}var up=()=>{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={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"},i={nan:"NaN",number:"\\u043B\\u0456\\u043A",array:"\\u043C\\u0430\\u0441\\u0456\\u045E"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F instanceof ".concat(t.expected,", \\u0430\\u0442\\u0440\\u044B\\u043C\\u0430\\u043D\\u0430 ").concat(u):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F ".concat(m,", \\u0430\\u0442\\u0440\\u044B\\u043C\\u0430\\u043D\\u0430 ").concat(u)}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(_(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(v(t.values,"|"));case"too_big":{let m=t.inclusive?"<=":"<",a=r(t.origin);if(a){let u=Number(t.maximum),p=Zl(u,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((l=t.origin)!=null?l:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(m).concat(t.maximum.toString()," ").concat(p)}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((d=t.origin)!=null?d:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?">=":">",a=r(t.origin);if(a){let u=Number(t.minimum),p=Zl(u,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(m).concat(t.minimum.toString()," ").concat(p)}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(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.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(m.prefix,\'"\'):m.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(m.suffix,\'"\'):m.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(m.includes,\'"\'):m.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(m.pattern):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B ".concat((s=n[m.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(v(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 Tl(){return{localeError:up()}}var lp=()=>{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(t){var o;return(o=e[t])!=null?o: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"},i={nan:"NaN",number:"\\u0447\\u0438\\u0441\\u043B\\u043E",array:"\\u043C\\u0430\\u0441\\u0438\\u0432"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D instanceof ".concat(t.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D ").concat(p):"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(a,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D ").concat(p)}case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(_(t.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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((l=t.origin)!=null?l:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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((s=t.origin)!=null?s:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin);return u?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(t.origin," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(a).concat(t.minimum.toString()," ").concat(u.unit):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(t.origin," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;if(a.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(a.prefix,\'"\');if(a.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(a.suffix,\'"\');if(a.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(a.includes,\'"\');if(a.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(a.pattern);let u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D";return a.format==="emoji"&&(u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),a.format==="datetime"&&(u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),a.format==="date"&&(u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),a.format==="time"&&(u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),a.format==="duration"&&(u="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),"".concat(u," ").concat((m=n[a.format])!=null?m:t.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(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0437\\u043F\\u043E\\u0437\\u043D\\u0430\\u0442".concat(t.keys.length>1?"\\u0438":""," \\u043A\\u043B\\u044E\\u0447").concat(t.keys.length>1?"\\u043E\\u0432\\u0435":"",": ").concat(v(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(t.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(t.origin);default:return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434"}}};function Nl(){return{localeError:lp()}}var sp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Tipus inv\\xE0lid: s\'esperava instanceof ".concat(t.expected,", s\'ha rebut ").concat(p):"Tipus inv\\xE0lid: s\'esperava ".concat(a,", s\'ha rebut ").concat(p)}case"invalid_value":return t.values.length===1?"Valor inv\\xE0lid: s\'esperava ".concat(_(t.values[0])):"Opci\\xF3 inv\\xE0lida: s\'esperava una de ".concat(v(t.values," o "));case"too_big":{let a=t.inclusive?"com a m\\xE0xim":"menys de",u=r(t.origin);return u?"Massa gran: s\'esperava que ".concat((l=t.origin)!=null?l:"el valor"," contingu\\xE9s ").concat(a," ").concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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",u=r(t.origin);return u?"Massa petit: s\'esperava que ".concat(t.origin," contingu\\xE9s ").concat(a," ").concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 El(){return{localeError:sp()}}var dp=()=>{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={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"},i={nan:"NaN",number:"\\u010D\\xEDslo",string:"\\u0159et\\u011Bzec",function:"funkce",array:"pole"};return t=>{var o,c,l,d,s,m,a,u,p;switch(t.code){case"invalid_type":{let $=(o=i[t.expected])!=null?o:t.expected,h=y(t.input),w=(c=i[h])!=null?c:h;return/^[A-Z]/.test(t.expected)?"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no instanceof ".concat(t.expected,", obdr\\u017Eeno ").concat(w):"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat($,", obdr\\u017Eeno ").concat(w)}case"invalid_value":return t.values.length===1?"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(_(t.values[0])):"Neplatn\\xE1 mo\\u017Enost: o\\u010Dek\\xE1v\\xE1na jedna z hodnot ".concat(v(t.values,"|"));case"too_big":{let $=t.inclusive?"<=":"<",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((l=t.origin)!=null?l:"hodnota"," mus\\xED m\\xEDt ").concat($).concat(t.maximum.toString()," ").concat((d=h.unit)!=null?d:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((s=t.origin)!=null?s:"hodnota"," mus\\xED b\\xFDt ").concat($).concat(t.maximum.toString())}case"too_small":{let $=t.inclusive?">=":">",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((m=t.origin)!=null?m:"hodnota"," mus\\xED m\\xEDt ").concat($).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((u=t.origin)!=null?u:"hodnota"," mus\\xED b\\xFDt ").concat($).concat(t.minimum.toString())}case"invalid_format":{let $=t;return $.format==="starts_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED za\\u010D\\xEDnat na "\'.concat($.prefix,\'"\'):$.format==="ends_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED kon\\u010Dit na "\'.concat($.suffix,\'"\'):$.format==="includes"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED obsahovat "\'.concat($.includes,\'"\'):$.format==="regex"?"Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED odpov\\xEDdat vzoru ".concat($.pattern):"Neplatn\\xFD form\\xE1t ".concat((p=n[$.format])!=null?p: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(v(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 Al(){return{localeError:dp()}}var mp=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){var o;return(o=e[t])!=null?o:null}let n={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"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\\xE6t",file:"fil"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Ugyldigt input: forventede instanceof ".concat(t.expected,", fik ").concat(p):"Ugyldigt input: forventede ".concat(a,", fik ").concat(p)}case"invalid_value":return t.values.length===1?"Ugyldig v\\xE6rdi: forventede ".concat(_(t.values[0])):"Ugyldigt valg: forventede en af f\\xF8lgende ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin),p=(l=i[t.origin])!=null?l:t.origin;return u?"For stor: forventede ".concat(p!=null?p:"value"," ").concat(u.verb," ").concat(a," ").concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"elementer"):"For stor: forventede ".concat(p!=null?p:"value"," havde ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin),p=(s=i[t.origin])!=null?s:t.origin;return u?"For lille: forventede ".concat(p," ").concat(u.verb," ").concat(a," ").concat(t.minimum.toString()," ").concat(u.unit):"For lille: forventede ".concat(p," havde ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;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((m=n[a.format])!=null?m:t.format)}case"not_multiple_of":return"Ugyldigt tal: skal v\\xE6re deleligt med ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ukendte n\\xF8gler":"Ukendt n\\xF8gle",": ").concat(v(t.keys,", "));case"invalid_key":return"Ugyldig n\\xF8gle i ".concat(t.origin);case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return"Ugyldig v\\xE6rdi i ".concat(t.origin);default:return"Ugyldigt input"}}};function Rl(){return{localeError:mp()}}var pp=()=>{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={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Ung\\xFCltige Eingabe: erwartet instanceof ".concat(t.expected,", erhalten ").concat(p):"Ung\\xFCltige Eingabe: erwartet ".concat(a,", erhalten ").concat(p)}case"invalid_value":return t.values.length===1?"Ung\\xFCltige Eingabe: erwartet ".concat(_(t.values[0])):"Ung\\xFCltige Option: erwartet eine von ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Zu gro\\xDF: erwartet, dass ".concat((l=t.origin)!=null?l:"Wert"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Ll(){return{localeError:pp()}}var fp=()=>{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"},map:{unit:"entries",verb:"to have"}};function r(t){var o;return(o=e[t])!=null?o: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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return"Invalid input: expected ".concat(a,", received ").concat(p)}case"invalid_value":return t.values.length===1?"Invalid input: expected ".concat(_(t.values[0])):"Invalid option: expected one of ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Too big: expected ".concat((l=t.origin)!=null?l:"value"," to have ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"elements"):"Too big: expected ".concat((s=t.origin)!=null?s:"value"," to be ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin);return u?"Too small: expected ".concat(t.origin," to have ").concat(a).concat(t.minimum.toString()," ").concat(u.unit):"Too small: expected ".concat(t.origin," to be ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Invalid string: must start with "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Invalid string: must end with "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Invalid string: must include "\'.concat(a.includes,\'"\'):a.format==="regex"?"Invalid string: must match pattern ".concat(a.pattern):"Invalid ".concat((m=n[a.format])!=null?m:t.format)}case"not_multiple_of":return"Invalid number: must be a multiple of ".concat(t.divisor);case"unrecognized_keys":return"Unrecognized key".concat(t.keys.length>1?"s":"",": ").concat(v(t.keys,", "));case"invalid_key":return"Invalid key in ".concat(t.origin);case"invalid_union":return"Invalid input";case"invalid_element":return"Invalid value in ".concat(t.origin);default:return"Invalid input"}}};function jr(){return{localeError:fp()}}var gp=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){var o;return(o=e[t])!=null?o: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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Nevalida enigo: atendi\\u011Dis instanceof ".concat(t.expected,", ricevi\\u011Dis ").concat(p):"Nevalida enigo: atendi\\u011Dis ".concat(a,", ricevi\\u011Dis ").concat(p)}case"invalid_value":return t.values.length===1?"Nevalida enigo: atendi\\u011Dis ".concat(_(t.values[0])):"Nevalida opcio: atendi\\u011Dis unu el ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Tro granda: atendi\\u011Dis ke ".concat((l=t.origin)!=null?l:"valoro"," havu ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"elementojn"):"Tro granda: atendi\\u011Dis ke ".concat((s=t.origin)!=null?s:"valoro"," havu ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin);return u?"Tro malgranda: atendi\\u011Dis ke ".concat(t.origin," havu ").concat(a).concat(t.minimum.toString()," ").concat(u.unit):"Tro malgranda: atendi\\u011Dis ke ".concat(t.origin," estu ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Nevalida karaktraro: devas komenci\\u011Di per "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Nevalida karaktraro: devas fini\\u011Di per "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Nevalida karaktraro: devas inkluzivi "\'.concat(a.includes,\'"\'):a.format==="regex"?"Nevalida karaktraro: devas kongrui kun la modelo ".concat(a.pattern):"Nevalida ".concat((m=n[a.format])!=null?m:t.format)}case"not_multiple_of":return"Nevalida nombro: devas esti oblo de ".concat(t.divisor);case"unrecognized_keys":return"Nekonata".concat(t.keys.length>1?"j":""," \\u015Dlosilo").concat(t.keys.length>1?"j":"",": ").concat(v(t.keys,", "));case"invalid_key":return"Nevalida \\u015Dlosilo en ".concat(t.origin);case"invalid_union":return"Nevalida enigo";case"invalid_element":return"Nevalida valoro en ".concat(t.origin);default:return"Nevalida enigo"}}};function Cl(){return{localeError:gp()}}var vp=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){var o;return(o=e[t])!=null?o:null}let n={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"},i={nan:"NaN",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"};return t=>{var o,c,l,d,s,m,a,u;switch(t.code){case"invalid_type":{let p=(o=i[t.expected])!=null?o:t.expected,$=y(t.input),h=(c=i[$])!=null?c:$;return/^[A-Z]/.test(t.expected)?"Entrada inv\\xE1lida: se esperaba instanceof ".concat(t.expected,", recibido ").concat(h):"Entrada inv\\xE1lida: se esperaba ".concat(p,", recibido ").concat(h)}case"invalid_value":return t.values.length===1?"Entrada inv\\xE1lida: se esperaba ".concat(_(t.values[0])):"Opci\\xF3n inv\\xE1lida: se esperaba una de ".concat(v(t.values,"|"));case"too_big":{let p=t.inclusive?"<=":"<",$=r(t.origin),h=(l=i[t.origin])!=null?l:t.origin;return $?"Demasiado grande: se esperaba que ".concat(h!=null?h:"valor"," tuviera ").concat(p).concat(t.maximum.toString()," ").concat((d=$.unit)!=null?d:"elementos"):"Demasiado grande: se esperaba que ".concat(h!=null?h:"valor"," fuera ").concat(p).concat(t.maximum.toString())}case"too_small":{let p=t.inclusive?">=":">",$=r(t.origin),h=(s=i[t.origin])!=null?s:t.origin;return $?"Demasiado peque\\xF1o: se esperaba que ".concat(h," tuviera ").concat(p).concat(t.minimum.toString()," ").concat($.unit):"Demasiado peque\\xF1o: se esperaba que ".concat(h," fuera ").concat(p).concat(t.minimum.toString())}case"invalid_format":{let p=t;return p.format==="starts_with"?\'Cadena inv\\xE1lida: debe comenzar con "\'.concat(p.prefix,\'"\'):p.format==="ends_with"?\'Cadena inv\\xE1lida: debe terminar en "\'.concat(p.suffix,\'"\'):p.format==="includes"?\'Cadena inv\\xE1lida: debe incluir "\'.concat(p.includes,\'"\'):p.format==="regex"?"Cadena inv\\xE1lida: debe coincidir con el patr\\xF3n ".concat(p.pattern):"Inv\\xE1lido ".concat((m=n[p.format])!=null?m:t.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: debe ser m\\xFAltiplo de ".concat(t.divisor);case"unrecognized_keys":return"Llave".concat(t.keys.length>1?"s":""," desconocida").concat(t.keys.length>1?"s":"",": ").concat(v(t.keys,", "));case"invalid_key":return"Llave inv\\xE1lida en ".concat((a=i[t.origin])!=null?a:t.origin);case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido en ".concat((u=i[t.origin])!=null?u:t.origin);default:return"Entrada inv\\xE1lida"}}};function Fl(){return{localeError:vp()}}var $p=()=>{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={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"},i={nan:"NaN",number:"\\u0639\\u062F\\u062F",array:"\\u0622\\u0631\\u0627\\u06CC\\u0647"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A instanceof ".concat(t.expected," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F\\u060C ").concat(p," \\u062F\\u0631\\u06CC\\u0627\\u0641\\u062A \\u0634\\u062F"):"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(a," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F\\u060C ").concat(p," \\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(_(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(v(t.values,"|")," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F");case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((l=t.origin)!=null?l:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Jl(){return{localeError:$p()}}var hp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l;switch(t.code){case"invalid_type":{let d=(o=i[t.expected])!=null?o:t.expected,s=y(t.input),m=(c=i[s])!=null?c:s;return/^[A-Z]/.test(t.expected)?"Virheellinen tyyppi: odotettiin instanceof ".concat(t.expected,", oli ").concat(m):"Virheellinen tyyppi: odotettiin ".concat(d,", oli ").concat(m)}case"invalid_value":return t.values.length===1?"Virheellinen sy\\xF6te: t\\xE4ytyy olla ".concat(_(t.values[0])):"Virheellinen valinta: t\\xE4ytyy olla yksi seuraavista: ".concat(v(t.values,"|"));case"too_big":{let d=t.inclusive?"<=":"<",s=r(t.origin);return s?"Liian suuri: ".concat(s.subject," t\\xE4ytyy olla ").concat(d).concat(t.maximum.toString()," ").concat(s.unit).trim():"Liian suuri: arvon t\\xE4ytyy olla ".concat(d).concat(t.maximum.toString())}case"too_small":{let d=t.inclusive?">=":">",s=r(t.origin);return s?"Liian pieni: ".concat(s.subject," t\\xE4ytyy olla ").concat(d).concat(t.minimum.toString()," ").concat(s.unit).trim():"Liian pieni: arvon t\\xE4ytyy olla ".concat(d).concat(t.minimum.toString())}case"invalid_format":{let d=t;return d.format==="starts_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy alkaa "\'.concat(d.prefix,\'"\'):d.format==="ends_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy loppua "\'.concat(d.suffix,\'"\'):d.format==="includes"?\'Virheellinen sy\\xF6te: t\\xE4ytyy sis\\xE4lt\\xE4\\xE4 "\'.concat(d.includes,\'"\'):d.format==="regex"?"Virheellinen sy\\xF6te: t\\xE4ytyy vastata s\\xE4\\xE4nn\\xF6llist\\xE4 lauseketta ".concat(d.pattern):"Virheellinen ".concat((l=n[d.format])!=null?l: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(v(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 Vl(){return{localeError:hp()}}var _p=()=>{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={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"},i={nan:"NaN",number:"nombre",array:"tableau"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Entr\\xE9e invalide : instanceof ".concat(t.expected," attendu, ").concat(p," re\\xE7u"):"Entr\\xE9e invalide : ".concat(a," attendu, ").concat(p," re\\xE7u")}case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : ".concat(_(t.values[0])," attendu"):"Option invalide : une valeur parmi ".concat(v(t.values,"|")," attendue");case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Trop grand : ".concat((l=t.origin)!=null?l:"valeur"," doit ").concat(u.verb," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"Trop petit : ".concat(t.origin," doit ").concat(u.verb," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Ml(){return{localeError:_p()}}var yp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"Entr\\xE9e invalide : attendu instanceof ".concat(t.expected,", re\\xE7u ").concat(u):"Entr\\xE9e invalide : attendu ".concat(m,", re\\xE7u ").concat(u)}case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : attendu ".concat(_(t.values[0])):"Option invalide : attendu l\'une des valeurs suivantes ".concat(v(t.values,"|"));case"too_big":{let m=t.inclusive?"\\u2264":"<",a=r(t.origin);return a?"Trop grand : attendu que ".concat((l=t.origin)!=null?l:"la valeur"," ait ").concat(m).concat(t.maximum.toString()," ").concat(a.unit):"Trop grand : attendu que ".concat((d=t.origin)!=null?d:"la valeur"," soit ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?"\\u2265":">",a=r(t.origin);return a?"Trop petit : attendu que ".concat(t.origin," ait ").concat(m).concat(t.minimum.toString()," ").concat(a.unit):"Trop petit : attendu que ".concat(t.origin," soit ").concat(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(m.prefix,\'"\'):m.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(m.suffix,\'"\'):m.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(m.includes,\'"\'):m.format==="regex"?"Cha\\xEEne invalide : doit correspondre au motif ".concat(m.pattern):"".concat((s=n[m.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(v(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 Bl(){return{localeError:yp()}}var bp=()=>{let e={string:{label:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA",gender:"f"},number:{label:"\\u05DE\\u05E1\\u05E4\\u05E8",gender:"m"},boolean:{label:"\\u05E2\\u05E8\\u05DA \\u05D1\\u05D5\\u05DC\\u05D9\\u05D0\\u05E0\\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA",gender:"m"},array:{label:"\\u05DE\\u05E2\\u05E8\\u05DA",gender:"m"},object:{label:"\\u05D0\\u05D5\\u05D1\\u05D9\\u05D9\\u05E7\\u05D8",gender:"m"},null:{label:"\\u05E2\\u05E8\\u05DA \\u05E8\\u05D9\\u05E7 (null)",gender:"m"},undefined:{label:"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05DE\\u05D5\\u05D2\\u05D3\\u05E8 (undefined)",gender:"m"},symbol:{label:"\\u05E1\\u05D9\\u05DE\\u05D1\\u05D5\\u05DC (Symbol)",gender:"m"},function:{label:"\\u05E4\\u05D5\\u05E0\\u05E7\\u05E6\\u05D9\\u05D4",gender:"f"},map:{label:"\\u05DE\\u05E4\\u05D4 (Map)",gender:"f"},set:{label:"\\u05E7\\u05D1\\u05D5\\u05E6\\u05D4 (Set)",gender:"f"},file:{label:"\\u05E7\\u05D5\\u05D1\\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05D9\\u05D3\\u05D5\\u05E2",gender:"m"},value:{label:"\\u05E2\\u05E8\\u05DA",gender:"m"}},r={string:{unit:"\\u05EA\\u05D5\\u05D5\\u05D9\\u05DD",shortLabel:"\\u05E7\\u05E6\\u05E8",longLabel:"\\u05D0\\u05E8\\u05D5\\u05DA"},file:{unit:"\\u05D1\\u05D9\\u05D9\\u05D8\\u05D9\\u05DD",shortLabel:"\\u05E7\\u05D8\\u05DF",longLabel:"\\u05D2\\u05D3\\u05D5\\u05DC"},array:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",shortLabel:"\\u05E7\\u05D8\\u05DF",longLabel:"\\u05D2\\u05D3\\u05D5\\u05DC"},set:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",shortLabel:"\\u05E7\\u05D8\\u05DF",longLabel:"\\u05D2\\u05D3\\u05D5\\u05DC"},number:{unit:"",shortLabel:"\\u05E7\\u05D8\\u05DF",longLabel:"\\u05D2\\u05D3\\u05D5\\u05DC"}},n=s=>s?e[s]:void 0,i=s=>{let m=n(s);return m?m.label:s!=null?s:e.unknown.label},t=s=>"\\u05D4".concat(i(s)),o=s=>{var u;let m=n(s);return((u=m==null?void 0:m.gender)!=null?u:"m")==="f"?"\\u05E6\\u05E8\\u05D9\\u05DB\\u05D4 \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA":"\\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA"},c=s=>{var m;return s&&(m=r[s])!=null?m:null},l={regex:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"},email:{label:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05D0\\u05D9\\u05DE\\u05D9\\u05D9\\u05DC",gender:"f"},url:{label:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05E8\\u05E9\\u05EA",gender:"f"},emoji:{label:"\\u05D0\\u05D9\\u05DE\\u05D5\\u05D2\'\\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA \\u05D5\\u05D6\\u05DE\\u05DF ISO",gender:"m"},date:{label:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA ISO",gender:"m"},time:{label:"\\u05D6\\u05DE\\u05DF ISO",gender:"m"},duration:{label:"\\u05DE\\u05E9\\u05DA \\u05D6\\u05DE\\u05DF ISO",gender:"m"},ipv4:{label:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv4",gender:"f"},ipv6:{label:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv6",gender:"f"},cidrv4:{label:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv4",gender:"m"},cidrv6:{label:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv6",gender:"m"},base64:{label:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64",gender:"f"},base64url:{label:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64 \\u05DC\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA \\u05E8\\u05E9\\u05EA",gender:"f"},json_string:{label:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA JSON",gender:"f"},e164:{label:"\\u05DE\\u05E1\\u05E4\\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"},includes:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"},lowercase:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"},starts_with:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"},uppercase:{label:"\\u05E7\\u05DC\\u05D8",gender:"m"}},d={nan:"NaN"};return s=>{var m,a,u,p,$,h,w,D,T,J,S,j,E,M,Me,ae,bt,xt,C,ce,be;switch(s.code){case"invalid_type":{let k=s.expected,Z=(m=d[k!=null?k:""])!=null?m:i(k),K=y(s.input),V=(p=(u=d[K])!=null?u:(a=e[K])==null?void 0:a.label)!=null?p:K;return/^[A-Z]/.test(s.expected)?"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA instanceof ".concat(s.expected,", \\u05D4\\u05EA\\u05E7\\u05D1\\u05DC ").concat(V):"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ".concat(Z,", \\u05D4\\u05EA\\u05E7\\u05D1\\u05DC ").concat(V)}case"invalid_value":{if(s.values.length===1)return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D4\\u05E2\\u05E8\\u05DA \\u05D7\\u05D9\\u05D9\\u05D1 \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ".concat(_(s.values[0]));let k=s.values.map(V=>_(V));if(s.values.length===2)return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D4\\u05D0\\u05E4\\u05E9\\u05E8\\u05D5\\u05D9\\u05D5\\u05EA \\u05D4\\u05DE\\u05EA\\u05D0\\u05D9\\u05DE\\u05D5\\u05EA \\u05D4\\u05DF ".concat(k[0]," \\u05D0\\u05D5 ").concat(k[1]);let Z=k[k.length-1],K=k.slice(0,-1).join(", ");return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D4\\u05D0\\u05E4\\u05E9\\u05E8\\u05D5\\u05D9\\u05D5\\u05EA \\u05D4\\u05DE\\u05EA\\u05D0\\u05D9\\u05DE\\u05D5\\u05EA \\u05D4\\u05DF ".concat(K," \\u05D0\\u05D5 ").concat(Z)}case"too_big":{let k=c(s.origin),Z=t(($=s.origin)!=null?$:"value");if(s.origin==="string")return"".concat((h=k==null?void 0:k.longLabel)!=null?h:"\\u05D0\\u05E8\\u05D5\\u05DA"," \\u05DE\\u05D3\\u05D9: ").concat(Z," \\u05E6\\u05E8\\u05D9\\u05DB\\u05D4 \\u05DC\\u05D4\\u05DB\\u05D9\\u05DC ").concat(s.maximum.toString()," ").concat((w=k==null?void 0:k.unit)!=null?w:""," ").concat(s.inclusive?"\\u05D0\\u05D5 \\u05E4\\u05D7\\u05D5\\u05EA":"\\u05DC\\u05DB\\u05DC \\u05D4\\u05D9\\u05D5\\u05EA\\u05E8").trim();if(s.origin==="number"){let G=s.inclusive?"\\u05E7\\u05D8\\u05DF \\u05D0\\u05D5 \\u05E9\\u05D5\\u05D5\\u05D4 \\u05DC-".concat(s.maximum):"\\u05E7\\u05D8\\u05DF \\u05DE-".concat(s.maximum);return"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat(Z," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(G)}if(s.origin==="array"||s.origin==="set"){let G=s.origin==="set"?"\\u05E6\\u05E8\\u05D9\\u05DB\\u05D4":"\\u05E6\\u05E8\\u05D9\\u05DA",Ze=s.inclusive?"".concat(s.maximum," ").concat((D=k==null?void 0:k.unit)!=null?D:""," \\u05D0\\u05D5 \\u05E4\\u05D7\\u05D5\\u05EA"):"\\u05E4\\u05D7\\u05D5\\u05EA \\u05DE-".concat(s.maximum," ").concat((T=k==null?void 0:k.unit)!=null?T:"");return"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat(Z," ").concat(G," \\u05DC\\u05D4\\u05DB\\u05D9\\u05DC ").concat(Ze).trim()}let K=s.inclusive?"<=":"<",V=o((J=s.origin)!=null?J:"value");return k!=null&&k.unit?"".concat(k.longLabel," \\u05DE\\u05D3\\u05D9: ").concat(Z," ").concat(V," ").concat(K).concat(s.maximum.toString()," ").concat(k.unit):"".concat((S=k==null?void 0:k.longLabel)!=null?S:"\\u05D2\\u05D3\\u05D5\\u05DC"," \\u05DE\\u05D3\\u05D9: ").concat(Z," ").concat(V," ").concat(K).concat(s.maximum.toString())}case"too_small":{let k=c(s.origin),Z=t((j=s.origin)!=null?j:"value");if(s.origin==="string")return"".concat((E=k==null?void 0:k.shortLabel)!=null?E:"\\u05E7\\u05E6\\u05E8"," \\u05DE\\u05D3\\u05D9: ").concat(Z," \\u05E6\\u05E8\\u05D9\\u05DB\\u05D4 \\u05DC\\u05D4\\u05DB\\u05D9\\u05DC ").concat(s.minimum.toString()," ").concat((M=k==null?void 0:k.unit)!=null?M:""," ").concat(s.inclusive?"\\u05D0\\u05D5 \\u05D9\\u05D5\\u05EA\\u05E8":"\\u05DC\\u05E4\\u05D7\\u05D5\\u05EA").trim();if(s.origin==="number"){let G=s.inclusive?"\\u05D2\\u05D3\\u05D5\\u05DC \\u05D0\\u05D5 \\u05E9\\u05D5\\u05D5\\u05D4 \\u05DC-".concat(s.minimum):"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE-".concat(s.minimum);return"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(Z," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(G)}if(s.origin==="array"||s.origin==="set"){let G=s.origin==="set"?"\\u05E6\\u05E8\\u05D9\\u05DB\\u05D4":"\\u05E6\\u05E8\\u05D9\\u05DA";if(s.minimum===1&&s.inclusive){let xe=(s.origin==="set","\\u05DC\\u05E4\\u05D7\\u05D5\\u05EA \\u05E4\\u05E8\\u05D9\\u05D8 \\u05D0\\u05D7\\u05D3");return"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(Z," ").concat(G," \\u05DC\\u05D4\\u05DB\\u05D9\\u05DC ").concat(xe)}let Ze=s.inclusive?"".concat(s.minimum," ").concat((Me=k==null?void 0:k.unit)!=null?Me:""," \\u05D0\\u05D5 \\u05D9\\u05D5\\u05EA\\u05E8"):"\\u05D9\\u05D5\\u05EA\\u05E8 \\u05DE-".concat(s.minimum," ").concat((ae=k==null?void 0:k.unit)!=null?ae:"");return"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(Z," ").concat(G," \\u05DC\\u05D4\\u05DB\\u05D9\\u05DC ").concat(Ze).trim()}let K=s.inclusive?">=":">",V=o((bt=s.origin)!=null?bt:"value");return k!=null&&k.unit?"".concat(k.shortLabel," \\u05DE\\u05D3\\u05D9: ").concat(Z," ").concat(V," ").concat(K).concat(s.minimum.toString()," ").concat(k.unit):"".concat((xt=k==null?void 0:k.shortLabel)!=null?xt:"\\u05E7\\u05D8\\u05DF"," \\u05DE\\u05D3\\u05D9: ").concat(Z," ").concat(V," ").concat(K).concat(s.minimum.toString())}case"invalid_format":{let k=s;if(k.format==="starts_with")return\'\\u05D4\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D7\\u05D9\\u05DC \\u05D1 "\'.concat(k.prefix,\'"\');if(k.format==="ends_with")return\'\\u05D4\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05E1\\u05EA\\u05D9\\u05D9\\u05DD \\u05D1 "\'.concat(k.suffix,\'"\');if(k.format==="includes")return\'\\u05D4\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05DB\\u05DC\\u05D5\\u05DC "\'.concat(k.includes,\'"\');if(k.format==="regex")return"\\u05D4\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D0\\u05D9\\u05DD \\u05DC\\u05EA\\u05D1\\u05E0\\u05D9\\u05EA ".concat(k.pattern);let Z=l[k.format],K=(C=Z==null?void 0:Z.label)!=null?C:k.format,G=((ce=Z==null?void 0:Z.gender)!=null?ce:"m")==="f"?"\\u05EA\\u05E7\\u05D9\\u05E0\\u05D4":"\\u05EA\\u05E7\\u05D9\\u05DF";return"".concat(K," \\u05DC\\u05D0 ").concat(G)}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(s.divisor);case"unrecognized_keys":return"\\u05DE\\u05E4\\u05EA\\u05D7".concat(s.keys.length>1?"\\u05D5\\u05EA":""," \\u05DC\\u05D0 \\u05DE\\u05D6\\u05D5\\u05D4").concat(s.keys.length>1?"\\u05D9\\u05DD":"\\u05D4",": ").concat(v(s.keys,", "));case"invalid_key":return"\\u05E9\\u05D3\\u05D4 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1\\u05D0\\u05D5\\u05D1\\u05D9\\u05D9\\u05E7\\u05D8";case"invalid_union":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF";case"invalid_element":{let k=t((be=s.origin)!=null?be:"array");return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(k)}default:return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF"}}};function Kl(){return{localeError:bp()}}var xp=()=>{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={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"},i={nan:"NaN",number:"sz\\xE1m",array:"t\\xF6mb"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k instanceof ".concat(t.expected,", a kapott \\xE9rt\\xE9k ").concat(p):"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(a,", a kapott \\xE9rt\\xE9k ").concat(p)}case"invalid_value":return t.values.length===1?"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(_(t.values[0])):"\\xC9rv\\xE9nytelen opci\\xF3: valamelyik \\xE9rt\\xE9k v\\xE1rt ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"T\\xFAl nagy: ".concat((l=t.origin)!=null?l:"\\xE9rt\\xE9k"," m\\xE9rete t\\xFAl nagy ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," m\\xE9rete t\\xFAl kicsi ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Gl(){return{localeError:xp()}}function Wl(e,r,n){return Math.abs(e)===1?r:n}function He(e){if(!e)return"";let r=["\\u0561","\\u0565","\\u0568","\\u056B","\\u0578","\\u0578\\u0582","\\u0585"],n=e[e.length-1];return e+(r.includes(n)?"\\u0576":"\\u0568")}var kp=()=>{let e={string:{unit:{one:"\\u0576\\u0577\\u0561\\u0576",many:"\\u0576\\u0577\\u0561\\u0576\\u0576\\u0565\\u0580"},verb:"\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561\\u056C"},file:{unit:{one:"\\u0562\\u0561\\u0575\\u0569",many:"\\u0562\\u0561\\u0575\\u0569\\u0565\\u0580"},verb:"\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561\\u056C"},array:{unit:{one:"\\u057F\\u0561\\u0580\\u0580",many:"\\u057F\\u0561\\u0580\\u0580\\u0565\\u0580"},verb:"\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561\\u056C"},set:{unit:{one:"\\u057F\\u0561\\u0580\\u0580",many:"\\u057F\\u0561\\u0580\\u0580\\u0565\\u0580"},verb:"\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561\\u056C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n={regex:"\\u0574\\u0578\\u0582\\u057F\\u0584",email:"\\u0567\\u056C. \\u0570\\u0561\\u057D\\u0581\\u0565",url:"URL",emoji:"\\u0567\\u0574\\u0578\\u057B\\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0561\\u0574\\u057D\\u0561\\u0569\\u056B\\u057E \\u0587 \\u056A\\u0561\\u0574",date:"ISO \\u0561\\u0574\\u057D\\u0561\\u0569\\u056B\\u057E",time:"ISO \\u056A\\u0561\\u0574",duration:"ISO \\u057F\\u0587\\u0578\\u0572\\u0578\\u0582\\u0569\\u0575\\u0578\\u0582\\u0576",ipv4:"IPv4 \\u0570\\u0561\\u057D\\u0581\\u0565",ipv6:"IPv6 \\u0570\\u0561\\u057D\\u0581\\u0565",cidrv4:"IPv4 \\u0574\\u056B\\u057B\\u0561\\u056F\\u0561\\u0575\\u0584",cidrv6:"IPv6 \\u0574\\u056B\\u057B\\u0561\\u056F\\u0561\\u0575\\u0584",base64:"base64 \\u0571\\u0587\\u0561\\u0579\\u0561\\u0583\\u0578\\u057E \\u057F\\u0578\\u0572",base64url:"base64url \\u0571\\u0587\\u0561\\u0579\\u0561\\u0583\\u0578\\u057E \\u057F\\u0578\\u0572",json_string:"JSON \\u057F\\u0578\\u0572",e164:"E.164 \\u0570\\u0561\\u0574\\u0561\\u0580",jwt:"JWT",template_literal:"\\u0574\\u0578\\u0582\\u057F\\u0584"},i={nan:"NaN",number:"\\u0569\\u056B\\u057E",array:"\\u0566\\u0561\\u0576\\u0563\\u057E\\u0561\\u056E"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"\\u054D\\u056D\\u0561\\u056C \\u0574\\u0578\\u0582\\u057F\\u0584\\u0561\\u0563\\u0580\\u0578\\u0582\\u0574\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567\\u0580 instanceof ".concat(t.expected,", \\u057D\\u057F\\u0561\\u0581\\u057E\\u0565\\u056C \\u0567 ").concat(u):"\\u054D\\u056D\\u0561\\u056C \\u0574\\u0578\\u0582\\u057F\\u0584\\u0561\\u0563\\u0580\\u0578\\u0582\\u0574\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567\\u0580 ".concat(m,", \\u057D\\u057F\\u0561\\u0581\\u057E\\u0565\\u056C \\u0567 ").concat(u)}case"invalid_value":return t.values.length===1?"\\u054D\\u056D\\u0561\\u056C \\u0574\\u0578\\u0582\\u057F\\u0584\\u0561\\u0563\\u0580\\u0578\\u0582\\u0574\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567\\u0580 ".concat(_(t.values[1])):"\\u054D\\u056D\\u0561\\u056C \\u057F\\u0561\\u0580\\u0562\\u0565\\u0580\\u0561\\u056F\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567\\u0580 \\u0570\\u0565\\u057F\\u0587\\u0575\\u0561\\u056C\\u0576\\u0565\\u0580\\u056B\\u0581 \\u0574\\u0565\\u056F\\u0568\\u055D ".concat(v(t.values,"|"));case"too_big":{let m=t.inclusive?"<=":"<",a=r(t.origin);if(a){let u=Number(t.maximum),p=Wl(u,a.unit.one,a.unit.many);return"\\u0549\\u0561\\u0583\\u0561\\u0566\\u0561\\u0576\\u0581 \\u0574\\u0565\\u056E \\u0561\\u0580\\u056A\\u0565\\u0584\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567, \\u0578\\u0580 ".concat(He((l=t.origin)!=null?l:"\\u0561\\u0580\\u056A\\u0565\\u0584")," \\u056F\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561 ").concat(m).concat(t.maximum.toString()," ").concat(p)}return"\\u0549\\u0561\\u0583\\u0561\\u0566\\u0561\\u0576\\u0581 \\u0574\\u0565\\u056E \\u0561\\u0580\\u056A\\u0565\\u0584\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567, \\u0578\\u0580 ".concat(He((d=t.origin)!=null?d:"\\u0561\\u0580\\u056A\\u0565\\u0584")," \\u056C\\u056B\\u0576\\u056B ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?">=":">",a=r(t.origin);if(a){let u=Number(t.minimum),p=Wl(u,a.unit.one,a.unit.many);return"\\u0549\\u0561\\u0583\\u0561\\u0566\\u0561\\u0576\\u0581 \\u0583\\u0578\\u0584\\u0580 \\u0561\\u0580\\u056A\\u0565\\u0584\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567, \\u0578\\u0580 ".concat(He(t.origin)," \\u056F\\u0578\\u0582\\u0576\\u0565\\u0576\\u0561 ").concat(m).concat(t.minimum.toString()," ").concat(p)}return"\\u0549\\u0561\\u0583\\u0561\\u0566\\u0561\\u0576\\u0581 \\u0583\\u0578\\u0584\\u0580 \\u0561\\u0580\\u056A\\u0565\\u0584\\u2024 \\u057D\\u057A\\u0561\\u057D\\u057E\\u0578\\u0582\\u0574 \\u0567, \\u0578\\u0580 ".concat(He(t.origin)," \\u056C\\u056B\\u0576\\u056B ").concat(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.format==="starts_with"?\'\\u054D\\u056D\\u0561\\u056C \\u057F\\u0578\\u0572\\u2024 \\u057A\\u0565\\u057F\\u0584 \\u0567 \\u057D\\u056F\\u057D\\u057E\\u056B "\'.concat(m.prefix,\'"-\\u0578\\u057E\'):m.format==="ends_with"?\'\\u054D\\u056D\\u0561\\u056C \\u057F\\u0578\\u0572\\u2024 \\u057A\\u0565\\u057F\\u0584 \\u0567 \\u0561\\u057E\\u0561\\u0580\\u057F\\u057E\\u056B "\'.concat(m.suffix,\'"-\\u0578\\u057E\'):m.format==="includes"?\'\\u054D\\u056D\\u0561\\u056C \\u057F\\u0578\\u0572\\u2024 \\u057A\\u0565\\u057F\\u0584 \\u0567 \\u057A\\u0561\\u0580\\u0578\\u0582\\u0576\\u0561\\u056F\\u056B "\'.concat(m.includes,\'"\'):m.format==="regex"?"\\u054D\\u056D\\u0561\\u056C \\u057F\\u0578\\u0572\\u2024 \\u057A\\u0565\\u057F\\u0584 \\u0567 \\u0570\\u0561\\u0574\\u0561\\u057A\\u0561\\u057F\\u0561\\u057D\\u056D\\u0561\\u0576\\u056B ".concat(m.pattern," \\u0571\\u0587\\u0561\\u0579\\u0561\\u0583\\u056B\\u0576"):"\\u054D\\u056D\\u0561\\u056C ".concat((s=n[m.format])!=null?s:t.format)}case"not_multiple_of":return"\\u054D\\u056D\\u0561\\u056C \\u0569\\u056B\\u057E\\u2024 \\u057A\\u0565\\u057F\\u0584 \\u0567 \\u0562\\u0561\\u0566\\u0574\\u0561\\u057A\\u0561\\u057F\\u056B\\u056F \\u056C\\u056B\\u0576\\u056B ".concat(t.divisor,"-\\u056B");case"unrecognized_keys":return"\\u0549\\u0573\\u0561\\u0576\\u0561\\u0579\\u057E\\u0561\\u056E \\u0562\\u0561\\u0576\\u0561\\u056C\\u056B".concat(t.keys.length>1?"\\u0576\\u0565\\u0580":"",". ").concat(v(t.keys,", "));case"invalid_key":return"\\u054D\\u056D\\u0561\\u056C \\u0562\\u0561\\u0576\\u0561\\u056C\\u056B ".concat(He(t.origin),"-\\u0578\\u0582\\u0574");case"invalid_union":return"\\u054D\\u056D\\u0561\\u056C \\u0574\\u0578\\u0582\\u057F\\u0584\\u0561\\u0563\\u0580\\u0578\\u0582\\u0574";case"invalid_element":return"\\u054D\\u056D\\u0561\\u056C \\u0561\\u0580\\u056A\\u0565\\u0584 ".concat(He(t.origin),"-\\u0578\\u0582\\u0574");default:return"\\u054D\\u056D\\u0561\\u056C \\u0574\\u0578\\u0582\\u057F\\u0584\\u0561\\u0563\\u0580\\u0578\\u0582\\u0574"}}};function Xl(){return{localeError:kp()}}var zp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Input tidak valid: diharapkan instanceof ".concat(t.expected,", diterima ").concat(p):"Input tidak valid: diharapkan ".concat(a,", diterima ").concat(p)}case"invalid_value":return t.values.length===1?"Input tidak valid: diharapkan ".concat(_(t.values[0])):"Pilihan tidak valid: diharapkan salah satu dari ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Terlalu besar: diharapkan ".concat((l=t.origin)!=null?l:"value"," memiliki ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Terlalu kecil: diharapkan ".concat(t.origin," memiliki ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 ql(){return{localeError:zp()}}var Ip=()=>{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(t){var o;return(o=e[t])!=null?o: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"},i={nan:"NaN",number:"n\\xFAmer",array:"fylki"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(p," \\xFEar sem \\xE1 a\\xF0 vera instanceof ").concat(t.expected):"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(p," \\xFEar sem \\xE1 a\\xF0 vera ").concat(a)}case"invalid_value":return t.values.length===1?"Rangt gildi: gert r\\xE1\\xF0 fyrir ".concat(_(t.values[0])):"\\xD3gilt val: m\\xE1 vera eitt af eftirfarandi ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((l=t.origin)!=null?l:"gildi"," hafi ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"hluti"):"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((s=t.origin)!=null?s:"gildi"," s\\xE9 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin);return u?"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(t.origin," hafi ").concat(a).concat(t.minimum.toString()," ").concat(u.unit):"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(t.origin," s\\xE9 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 byrja \\xE1 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 enda \\xE1 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 innihalda "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\xD3gildur strengur: ver\\xF0ur a\\xF0 fylgja mynstri ".concat(a.pattern):"Rangt ".concat((m=n[a.format])!=null?m:t.format)}case"not_multiple_of":return"R\\xF6ng tala: ver\\xF0ur a\\xF0 vera margfeldi af ".concat(t.divisor);case"unrecognized_keys":return"\\xD3\\xFEekkt ".concat(t.keys.length>1?"ir lyklar":"ur lykill",": ").concat(v(t.keys,", "));case"invalid_key":return"Rangur lykill \\xED ".concat(t.origin);case"invalid_union":return"Rangt gildi";case"invalid_element":return"Rangt gildi \\xED ".concat(t.origin);default:return"Rangt gildi"}}};function Yl(){return{localeError:Ip()}}var Sp=()=>{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={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"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Input non valido: atteso instanceof ".concat(t.expected,", ricevuto ").concat(p):"Input non valido: atteso ".concat(a,", ricevuto ").concat(p)}case"invalid_value":return t.values.length===1?"Input non valido: atteso ".concat(_(t.values[0])):"Opzione non valida: atteso uno tra ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Troppo grande: ".concat((l=t.origin)!=null?l:"valore"," deve avere ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Troppo piccolo: ".concat(t.origin," deve avere ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Ql(){return{localeError:Sp()}}var wp=()=>{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={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"},i={nan:"NaN",number:"\\u6570\\u5024",array:"\\u914D\\u5217"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u7121\\u52B9\\u306A\\u5165\\u529B: instanceof ".concat(t.expected,"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F\\u304C\\u3001").concat(p,"\\u304C\\u5165\\u529B\\u3055\\u308C\\u307E\\u3057\\u305F"):"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(a,"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F\\u304C\\u3001").concat(p,"\\u304C\\u5165\\u529B\\u3055\\u308C\\u307E\\u3057\\u305F")}case"invalid_value":return t.values.length===1?"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(_(t.values[0]),"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F"):"\\u7121\\u52B9\\u306A\\u9078\\u629E: ".concat(v(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",u=r(t.origin);return u?"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((l=t.origin)!=null?l:"\\u5024","\\u306F").concat(t.maximum.toString()).concat((d=u.unit)!=null?d:"\\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",u=r(t.origin);return u?"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(u.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((m=n[a.format])!=null?m: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(v(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 Hl(){return{localeError:wp()}}var jp=()=>{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(t){var o;return(o=e[t])!=null?o: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"},i={nan:"NaN",number:"\\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8",string:"\\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",boolean:"\\u10D1\\u10E3\\u10DA\\u10D4\\u10D0\\u10DC\\u10D8",function:"\\u10E4\\u10E3\\u10DC\\u10E5\\u10EA\\u10D8\\u10D0",array:"\\u10DB\\u10D0\\u10E1\\u10D8\\u10D5\\u10D8"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected,", \\u10DB\\u10D8\\u10E6\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 ").concat(u):"\\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(m,", \\u10DB\\u10D8\\u10E6\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 ").concat(u)}case"invalid_value":return t.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(_(t.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(v(t.values,"|"),"-\\u10D3\\u10D0\\u10DC");case"too_big":{let m=t.inclusive?"<=":"<",a=r(t.origin);return a?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((l=t.origin)!=null?l:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," ").concat(a.verb," ").concat(m).concat(t.maximum.toString()," ").concat(a.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((d=t.origin)!=null?d:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?">=":">",a=r(t.origin);return a?"\\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(t.origin," ").concat(a.verb," ").concat(m).concat(t.minimum.toString()," ").concat(a.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(t.origin," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.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(m.prefix,\'"-\\u10D8\\u10D7\'):m.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(m.suffix,\'"-\\u10D8\\u10D7\'):m.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(m.includes,\'"-\\u10E1\'):m.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(m.pattern):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 ".concat((s=n[m.format])!=null?s:t.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(t.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(t.keys.length>1?"\\u10D4\\u10D1\\u10D8":"\\u10D8",": ").concat(v(t.keys,", "));case"invalid_key":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1\\u10D8 ".concat(t.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(t.origin,"-\\u10E8\\u10D8");default:return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"}}};function es(){return{localeError:jp()}}var Pp=()=>{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={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"},i={nan:"NaN",number:"\\u179B\\u17C1\\u1781",array:"\\u17A2\\u17B6\\u179A\\u17C1 (Array)",null:"\\u1782\\u17D2\\u1798\\u17B6\\u1793\\u178F\\u1798\\u17D2\\u179B\\u17C3 (null)"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected," \\u1794\\u17C9\\u17BB\\u1793\\u17D2\\u178F\\u17C2\\u1791\\u1791\\u17BD\\u179B\\u1794\\u17B6\\u1793 ").concat(p):"\\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(a," \\u1794\\u17C9\\u17BB\\u1793\\u17D2\\u178F\\u17C2\\u1791\\u1791\\u17BD\\u179B\\u1794\\u17B6\\u1793 ").concat(p)}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(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((l=t.origin)!=null?l:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\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(u.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((m=n[a.format])!=null?m: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(v(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 Pr(){return{localeError:Pp()}}function ts(){return Pr()}var Up=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m,a,u,p;switch(t.code){case"invalid_type":{let $=(o=i[t.expected])!=null?o:t.expected,h=y(t.input),w=(c=i[h])!=null?c:h;return/^[A-Z]/.test(t.expected)?"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uC608\\uC0C1 \\uD0C0\\uC785\\uC740 instanceof ".concat(t.expected,", \\uBC1B\\uC740 \\uD0C0\\uC785\\uC740 ").concat(w,"\\uC785\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uC608\\uC0C1 \\uD0C0\\uC785\\uC740 ".concat($,", \\uBC1B\\uC740 \\uD0C0\\uC785\\uC740 ").concat(w,"\\uC785\\uB2C8\\uB2E4")}case"invalid_value":return t.values.length===1?"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uAC12\\uC740 ".concat(_(t.values[0])," \\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C \\uC635\\uC158: ".concat(v(t.values,"\\uB610\\uB294 ")," \\uC911 \\uD558\\uB098\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"too_big":{let $=t.inclusive?"\\uC774\\uD558":"\\uBBF8\\uB9CC",h=$==="\\uBBF8\\uB9CC"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",w=r(t.origin),D=(l=w==null?void 0:w.unit)!=null?l:"\\uC694\\uC18C";return w?"".concat((d=t.origin)!=null?d:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()).concat(D," ").concat($).concat(h):"".concat((s=t.origin)!=null?s:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()," ").concat($).concat(h)}case"too_small":{let $=t.inclusive?"\\uC774\\uC0C1":"\\uCD08\\uACFC",h=$==="\\uC774\\uC0C1"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",w=r(t.origin),D=(m=w==null?void 0:w.unit)!=null?m:"\\uC694\\uC18C";return w?"".concat((a=t.origin)!=null?a:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()).concat(D," ").concat($).concat(h):"".concat((u=t.origin)!=null?u:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()," ").concat($).concat(h)}case"invalid_format":{let $=t;return $.format==="starts_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat($.prefix,\'"(\\uC73C)\\uB85C \\uC2DC\\uC791\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):$.format==="ends_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat($.suffix,\'"(\\uC73C)\\uB85C \\uB05D\\uB098\\uC57C \\uD569\\uB2C8\\uB2E4\'):$.format==="includes"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat($.includes,\'"\\uC744(\\uB97C) \\uD3EC\\uD568\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):$.format==="regex"?"\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: \\uC815\\uADDC\\uC2DD ".concat($.pattern," \\uD328\\uD134\\uACFC \\uC77C\\uCE58\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C ".concat((p=n[$.format])!=null?p: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(v(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 rs(){return{localeError:Up()}}var Ct=e=>e.charAt(0).toUpperCase()+e.slice(1);function ns(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 Op=()=>{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(t,o,c,l){var s;let d=(s=e[t])!=null?s:null;return d===null?d:{unit:d.unit[o],verb:d.verb[l][c?"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"},i={nan:"NaN",number:"skai\\u010Dius",bigint:"sveikasis skai\\u010Dius",string:"eilut\\u0117",boolean:"login\\u0117 reik\\u0161m\\u0117",undefined:"neapibr\\u0117\\u017Eta reik\\u0161m\\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\\u0117 reik\\u0161m\\u0117"};return t=>{var o,c,l,d,s,m,a,u,p,$,h,w,D,T,J;switch(t.code){case"invalid_type":{let S=(o=i[t.expected])!=null?o:t.expected,j=y(t.input),E=(c=i[j])!=null?c:j;return/^[A-Z]/.test(t.expected)?"Gautas tipas ".concat(E,", o tik\\u0117tasi - instanceof ").concat(t.expected):"Gautas tipas ".concat(E,", o tik\\u0117tasi - ").concat(S)}case"invalid_value":return t.values.length===1?"Privalo b\\u016Bti ".concat(_(t.values[0])):"Privalo b\\u016Bti vienas i\\u0161 ".concat(v(t.values,"|")," pasirinkim\\u0173");case"too_big":{let S=(l=i[t.origin])!=null?l:t.origin,j=r(t.origin,ns(Number(t.maximum)),(d=t.inclusive)!=null?d:!1,"smaller");if(j!=null&&j.verb)return"".concat(Ct((s=S!=null?S:t.origin)!=null?s:"reik\\u0161m\\u0117")," ").concat(j.verb," ").concat(t.maximum.toString()," ").concat((m=j.unit)!=null?m:"element\\u0173");let E=t.inclusive?"ne didesnis kaip":"ma\\u017Eesnis kaip";return"".concat(Ct((a=S!=null?S:t.origin)!=null?a:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(E," ").concat(t.maximum.toString()," ").concat(j==null?void 0:j.unit)}case"too_small":{let S=(u=i[t.origin])!=null?u:t.origin,j=r(t.origin,ns(Number(t.minimum)),(p=t.inclusive)!=null?p:!1,"bigger");if(j!=null&&j.verb)return"".concat(Ct(($=S!=null?S:t.origin)!=null?$:"reik\\u0161m\\u0117")," ").concat(j.verb," ").concat(t.minimum.toString()," ").concat((h=j.unit)!=null?h:"element\\u0173");let E=t.inclusive?"ne ma\\u017Eesnis kaip":"didesnis kaip";return"".concat(Ct((w=S!=null?S:t.origin)!=null?w:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(E," ").concat(t.minimum.toString()," ").concat(j==null?void 0:j.unit)}case"invalid_format":{let S=t;return S.format==="starts_with"?\'Eilut\\u0117 privalo prasid\\u0117ti "\'.concat(S.prefix,\'"\'):S.format==="ends_with"?\'Eilut\\u0117 privalo pasibaigti "\'.concat(S.suffix,\'"\'):S.format==="includes"?\'Eilut\\u0117 privalo \\u012Ftraukti "\'.concat(S.includes,\'"\'):S.format==="regex"?"Eilut\\u0117 privalo atitikti ".concat(S.pattern):"Neteisingas ".concat((D=n[S.format])!=null?D:t.format)}case"not_multiple_of":return"Skai\\u010Dius privalo b\\u016Bti ".concat(t.divisor," kartotinis.");case"unrecognized_keys":return"Neatpa\\u017Eint".concat(t.keys.length>1?"i":"as"," rakt").concat(t.keys.length>1?"ai":"as",": ").concat(v(t.keys,", "));case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \\u012Fvestis";case"invalid_element":{let S=(T=i[t.origin])!=null?T:t.origin;return"".concat(Ct((J=S!=null?S:t.origin)!=null?J:"reik\\u0161m\\u0117")," turi klaiding\\u0105 \\u012Fvest\\u012F")}default:return"Klaidinga \\u012Fvestis"}}};function is(){return{localeError:Op()}}var Dp=()=>{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={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"},i={nan:"NaN",number:"\\u0431\\u0440\\u043E\\u0458",array:"\\u043D\\u0438\\u0437\\u0430"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 instanceof ".concat(t.expected,", \\u043F\\u0440\\u0438\\u043C\\u0435\\u043D\\u043E ").concat(p):"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(a,", \\u043F\\u0440\\u0438\\u043C\\u0435\\u043D\\u043E ").concat(p)}case"invalid_value":return t.values.length===1?"Invalid input: expected ".concat(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((l=t.origin)!=null?l:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\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(u.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((m=n[a.format])!=null?m: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(v(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 os(){return{localeError:Dp()}}var Zp=()=>{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={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"},i={nan:"NaN",number:"nombor"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Input tidak sah: dijangka instanceof ".concat(t.expected,", diterima ").concat(p):"Input tidak sah: dijangka ".concat(a,", diterima ").concat(p)}case"invalid_value":return t.values.length===1?"Input tidak sah: dijangka ".concat(_(t.values[0])):"Pilihan tidak sah: dijangka salah satu daripada ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Terlalu besar: dijangka ".concat((l=t.origin)!=null?l:"nilai"," ").concat(u.verb," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Terlalu kecil: dijangka ".concat(t.origin," ").concat(u.verb," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 as(){return{localeError:Zp()}}var Tp=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){var o;return(o=e[t])!=null?o:null}let n={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"},i={nan:"NaN",number:"getal"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Ongeldige invoer: verwacht instanceof ".concat(t.expected,", ontving ").concat(p):"Ongeldige invoer: verwacht ".concat(a,", ontving ").concat(p)}case"invalid_value":return t.values.length===1?"Ongeldige invoer: verwacht ".concat(_(t.values[0])):"Ongeldige optie: verwacht \\xE9\\xE9n van ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin),p=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return u?"Te ".concat(p,": verwacht dat ").concat((l=t.origin)!=null?l:"waarde"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"elementen"," ").concat(u.verb):"Te ".concat(p,": verwacht dat ").concat((s=t.origin)!=null?s:"waarde"," ").concat(a).concat(t.maximum.toString()," is")}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin),p=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return u?"Te ".concat(p,": verwacht dat ").concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(u.unit," ").concat(u.verb):"Te ".concat(p,": 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((m=n[a.format])!=null?m: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(v(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 cs(){return{localeError:Tp()}}var Np=()=>{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={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"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Ugyldig input: forventet instanceof ".concat(t.expected,", fikk ").concat(p):"Ugyldig input: forventet ".concat(a,", fikk ").concat(p)}case"invalid_value":return t.values.length===1?"Ugyldig verdi: forventet ".concat(_(t.values[0])):"Ugyldig valg: forventet en av ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"For stor(t): forventet ".concat((l=t.origin)!=null?l:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 us(){return{localeError:Np()}}var Ep=()=>{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={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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"F\\xE2sit giren: umulan instanceof ".concat(t.expected,", al\\u0131nan ").concat(p):"F\\xE2sit giren: umulan ".concat(a,", al\\u0131nan ").concat(p)}case"invalid_value":return t.values.length===1?"F\\xE2sit giren: umulan ".concat(_(t.values[0])):"F\\xE2sit tercih: m\\xFBteberler ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Fazla b\\xFCy\\xFCk: ".concat((l=t.origin)!=null?l:"value",", ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 ls(){return{localeError:Ep()}}var Ap=()=>{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={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"},i={nan:"NaN",number:"\\u0639\\u062F\\u062F",array:"\\u0627\\u0631\\u06D0"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F instanceof ".concat(t.expected," \\u0648\\u0627\\u06CC, \\u0645\\u06AB\\u0631 ").concat(p," \\u062A\\u0631\\u0644\\u0627\\u0633\\u0647 \\u0634\\u0648"):"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(a," \\u0648\\u0627\\u06CC, \\u0645\\u06AB\\u0631 ").concat(p," \\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(_(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(v(t.values,"|")," \\u0685\\u062E\\u0647 \\u0648\\u0627\\u06CC");case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((l=t.origin)!=null?l:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 ss(){return{localeError:Ap()}}var Rp=()=>{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={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"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{var o,c,l,d,s,m,a,u,p;switch(t.code){case"invalid_type":{let $=(o=i[t.expected])!=null?o:t.expected,h=y(t.input),w=(c=i[h])!=null?c:h;return/^[A-Z]/.test(t.expected)?"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano instanceof ".concat(t.expected,", otrzymano ").concat(w):"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat($,", otrzymano ").concat(w)}case"invalid_value":return t.values.length===1?"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(_(t.values[0])):"Nieprawid\\u0142owa opcja: oczekiwano jednej z warto\\u015Bci ".concat(v(t.values,"|"));case"too_big":{let $=t.inclusive?"<=":"<",h=r(t.origin);return h?"Za du\\u017Ca warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((l=t.origin)!=null?l:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat($).concat(t.maximum.toString()," ").concat((d=h.unit)!=null?d:"element\\xF3w"):"Zbyt du\\u017C(y/a/e): oczekiwano, \\u017Ce ".concat((s=t.origin)!=null?s:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat($).concat(t.maximum.toString())}case"too_small":{let $=t.inclusive?">=":">",h=r(t.origin);return h?"Za ma\\u0142a warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((m=t.origin)!=null?m:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat($).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"element\\xF3w"):"Zbyt ma\\u0142(y/a/e): oczekiwano, \\u017Ce ".concat((u=t.origin)!=null?u:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat($).concat(t.minimum.toString())}case"invalid_format":{let $=t;return $.format==="starts_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zaczyna\\u0107 si\\u0119 od "\'.concat($.prefix,\'"\'):$.format==="ends_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi ko\\u0144czy\\u0107 si\\u0119 na "\'.concat($.suffix,\'"\'):$.format==="includes"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zawiera\\u0107 "\'.concat($.includes,\'"\'):$.format==="regex"?"Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi odpowiada\\u0107 wzorcowi ".concat($.pattern):"Nieprawid\\u0142ow(y/a/e) ".concat((p=n[$.format])!=null?p: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(v(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 ds(){return{localeError:Rp()}}var Lp=()=>{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={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"},i={nan:"NaN",number:"n\\xFAmero",null:"nulo"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Tipo inv\\xE1lido: esperado instanceof ".concat(t.expected,", recebido ").concat(p):"Tipo inv\\xE1lido: esperado ".concat(a,", recebido ").concat(p)}case"invalid_value":return t.values.length===1?"Entrada inv\\xE1lida: esperado ".concat(_(t.values[0])):"Op\\xE7\\xE3o inv\\xE1lida: esperada uma das ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Muito grande: esperado que ".concat((l=t.origin)!=null?l:"valor"," tivesse ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Muito pequeno: esperado que ".concat(t.origin," tivesse ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 ms(){return{localeError:Lp()}}function ps(e,r,n,i){let t=Math.abs(e),o=t%10,c=t%100;return c>=11&&c<=19?i:o===1?r:o>=2&&o<=4?n:i}var Cp=()=>{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={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"},i={nan:"NaN",number:"\\u0447\\u0438\\u0441\\u043B\\u043E",array:"\\u043C\\u0430\\u0441\\u0441\\u0438\\u0432"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C instanceof ".concat(t.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E ").concat(u):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(m,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E ").concat(u)}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(_(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(v(t.values,"|"));case"too_big":{let m=t.inclusive?"<=":"<",a=r(t.origin);if(a){let u=Number(t.maximum),p=ps(u,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((l=t.origin)!=null?l:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(m).concat(t.maximum.toString()," ").concat(p)}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((d=t.origin)!=null?d:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?">=":">",a=r(t.origin);if(a){let u=Number(t.minimum),p=ps(u,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(m).concat(t.minimum.toString()," ").concat(p)}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(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.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(m.prefix,\'"\'):m.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(m.suffix,\'"\'):m.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(m.includes,\'"\'):m.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(m.pattern):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 ".concat((s=n[m.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(v(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 fs(){return{localeError:Cp()}}var Fp=()=>{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={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"},i={nan:"NaN",number:"\\u0161tevilo",array:"tabela"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Neveljaven vnos: pri\\u010Dakovano instanceof ".concat(t.expected,", prejeto ").concat(p):"Neveljaven vnos: pri\\u010Dakovano ".concat(a,", prejeto ").concat(p)}case"invalid_value":return t.values.length===1?"Neveljaven vnos: pri\\u010Dakovano ".concat(_(t.values[0])):"Neveljavna mo\\u017Enost: pri\\u010Dakovano eno izmed ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Preveliko: pri\\u010Dakovano, da bo ".concat((l=t.origin)!=null?l:"vrednost"," imelo ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," imelo ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 gs(){return{localeError:Fp()}}var Jp=()=>{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={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"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{var o,c,l,d,s,m,a,u,p,$;switch(t.code){case"invalid_type":{let h=(o=i[t.expected])!=null?o:t.expected,w=y(t.input),D=(c=i[w])!=null?c:w;return/^[A-Z]/.test(t.expected)?"Ogiltig inmatning: f\\xF6rv\\xE4ntat instanceof ".concat(t.expected,", fick ").concat(D):"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(h,", fick ").concat(D)}case"invalid_value":return t.values.length===1?"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(_(t.values[0])):"Ogiltigt val: f\\xF6rv\\xE4ntade en av ".concat(v(t.values,"|"));case"too_big":{let h=t.inclusive?"<=":"<",w=r(t.origin);return w?"F\\xF6r stor(t): f\\xF6rv\\xE4ntade ".concat((l=t.origin)!=null?l:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString()," ").concat((d=w.unit)!=null?d:"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?">=":">",w=r(t.origin);return w?"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((m=t.origin)!=null?m:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString()," ").concat(w.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((u=n[h.format])!=null?u: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(v(t.keys,", "));case"invalid_key":return"Ogiltig nyckel i ".concat((p=t.origin)!=null?p:"v\\xE4rdet");case"invalid_union":return"Ogiltig input";case"invalid_element":return"Ogiltigt v\\xE4rde i ".concat(($=t.origin)!=null?$:"v\\xE4rdet");default:return"Ogiltig input"}}};function vs(){return{localeError:Jp()}}var Vp=()=>{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={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"},i={nan:"NaN",number:"\\u0B8E\\u0BA3\\u0BCD",array:"\\u0B85\\u0BA3\\u0BBF",null:"\\u0BB5\\u0BC6\\u0BB1\\u0BC1\\u0BAE\\u0BC8"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected,", \\u0BAA\\u0BC6\\u0BB1\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ").concat(p):"\\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(a,", \\u0BAA\\u0BC6\\u0BB1\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ").concat(p)}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(_(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(v(t.values,"|")," \\u0B87\\u0BB2\\u0BCD \\u0B92\\u0BA9\\u0BCD\\u0BB1\\u0BC1");case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((l=t.origin)!=null?l:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\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(u.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((m=n[a.format])!=null?m: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(v(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 $s(){return{localeError:Vp()}}var Mp=()=>{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={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"},i={nan:"NaN",number:"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02",array:"\\u0E2D\\u0E32\\u0E23\\u0E4C\\u0E40\\u0E23\\u0E22\\u0E4C (Array)",null:"\\u0E44\\u0E21\\u0E48\\u0E21\\u0E35\\u0E04\\u0E48\\u0E32 (null)"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected," \\u0E41\\u0E15\\u0E48\\u0E44\\u0E14\\u0E49\\u0E23\\u0E31\\u0E1A ").concat(p):"\\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(a," \\u0E41\\u0E15\\u0E48\\u0E44\\u0E14\\u0E49\\u0E23\\u0E31\\u0E1A ").concat(p)}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(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"\\u0E44\\u0E21\\u0E48\\u0E40\\u0E01\\u0E34\\u0E19":"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32",u=r(t.origin);return u?"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((l=t.origin)!=null?l:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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",u=r(t.origin);return u?"\\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(u.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((m=n[a.format])!=null?m: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(v(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 hs(){return{localeError:Mp()}}var Bp=()=>{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(t){var o;return(o=e[t])!=null?o: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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"Ge\\xE7ersiz de\\u011Fer: beklenen instanceof ".concat(t.expected,", al\\u0131nan ").concat(p):"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(a,", al\\u0131nan ").concat(p)}case"invalid_value":return t.values.length===1?"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(_(t.values[0])):"Ge\\xE7ersiz se\\xE7enek: a\\u015Fa\\u011F\\u0131dakilerden biri olmal\\u0131: ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((l=t.origin)!=null?l:"de\\u011Fer"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\xF6\\u011Fe"):"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((s=t.origin)!=null?s:"de\\u011Fer"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",u=r(t.origin);return u?"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(u.unit):"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ge\\xE7ersiz metin: "\'.concat(a.prefix,\'" ile ba\\u015Flamal\\u0131\'):a.format==="ends_with"?\'Ge\\xE7ersiz metin: "\'.concat(a.suffix,\'" ile bitmeli\'):a.format==="includes"?\'Ge\\xE7ersiz metin: "\'.concat(a.includes,\'" i\\xE7ermeli\'):a.format==="regex"?"Ge\\xE7ersiz metin: ".concat(a.pattern," desenine uymal\\u0131"):"Ge\\xE7ersiz ".concat((m=n[a.format])!=null?m:t.format)}case"not_multiple_of":return"Ge\\xE7ersiz say\\u0131: ".concat(t.divisor," ile tam b\\xF6l\\xFCnebilmeli");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar".concat(t.keys.length>1?"lar":"",": ").concat(v(t.keys,", "));case"invalid_key":return"".concat(t.origin," i\\xE7inde ge\\xE7ersiz anahtar");case"invalid_union":return"Ge\\xE7ersiz de\\u011Fer";case"invalid_element":return"".concat(t.origin," i\\xE7inde ge\\xE7ersiz de\\u011Fer");default:return"Ge\\xE7ersiz de\\u011Fer"}}};function _s(){return{localeError:Bp()}}var Kp=()=>{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={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"},i={nan:"NaN",number:"\\u0447\\u0438\\u0441\\u043B\\u043E",array:"\\u043C\\u0430\\u0441\\u0438\\u0432"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\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 instanceof ".concat(t.expected,", \\u043E\\u0442\\u0440\\u0438\\u043C\\u0430\\u043D\\u043E ").concat(p):"\\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(a,", \\u043E\\u0442\\u0440\\u0438\\u043C\\u0430\\u043D\\u043E ").concat(p)}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(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((l=t.origin)!=null?l:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," ").concat(u.verb," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\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(u.verb," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Ur(){return{localeError:Kp()}}function ys(){return Ur()}var Gp=()=>{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={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"},i={nan:"NaN",number:"\\u0646\\u0645\\u0628\\u0631",array:"\\u0622\\u0631\\u06D2",null:"\\u0646\\u0644"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: instanceof ".concat(t.expected," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627\\u060C ").concat(p," \\u0645\\u0648\\u0635\\u0648\\u0644 \\u06C1\\u0648\\u0627"):"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(a," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627\\u060C ").concat(p," \\u0645\\u0648\\u0635\\u0648\\u0644 \\u06C1\\u0648\\u0627")}case"invalid_value":return t.values.length===1?"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(_(t.values[0])," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627"):"\\u063A\\u0644\\u0637 \\u0622\\u067E\\u0634\\u0646: ".concat(v(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?"<=":"<",u=r(t.origin);return u?"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((l=t.origin)!=null?l:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u06D2 ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u06D2 ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 bs(){return{localeError:Gp()}}var Wp=()=>{let e={string:{unit:"belgi",verb:"bo\\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\\u2018lishi kerak"},array:{unit:"element",verb:"bo\\u2018lishi kerak"},set:{unit:"element",verb:"bo\\u2018lishi kerak"}};function r(t){var o;return(o=e[t])!=null?o:null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{var o,c,l,d,s;switch(t.code){case"invalid_type":{let m=(o=i[t.expected])!=null?o:t.expected,a=y(t.input),u=(c=i[a])!=null?c:a;return/^[A-Z]/.test(t.expected)?"Noto\\u2018g\\u2018ri kirish: kutilgan instanceof ".concat(t.expected,", qabul qilingan ").concat(u):"Noto\\u2018g\\u2018ri kirish: kutilgan ".concat(m,", qabul qilingan ").concat(u)}case"invalid_value":return t.values.length===1?"Noto\\u2018g\\u2018ri kirish: kutilgan ".concat(_(t.values[0])):"Noto\\u2018g\\u2018ri variant: quyidagilardan biri kutilgan ".concat(v(t.values,"|"));case"too_big":{let m=t.inclusive?"<=":"<",a=r(t.origin);return a?"Juda katta: kutilgan ".concat((l=t.origin)!=null?l:"qiymat"," ").concat(m).concat(t.maximum.toString()," ").concat(a.unit," ").concat(a.verb):"Juda katta: kutilgan ".concat((d=t.origin)!=null?d:"qiymat"," ").concat(m).concat(t.maximum.toString())}case"too_small":{let m=t.inclusive?">=":">",a=r(t.origin);return a?"Juda kichik: kutilgan ".concat(t.origin," ").concat(m).concat(t.minimum.toString()," ").concat(a.unit," ").concat(a.verb):"Juda kichik: kutilgan ".concat(t.origin," ").concat(m).concat(t.minimum.toString())}case"invalid_format":{let m=t;return m.format==="starts_with"?\'Noto\\u2018g\\u2018ri satr: "\'.concat(m.prefix,\'" bilan boshlanishi kerak\'):m.format==="ends_with"?\'Noto\\u2018g\\u2018ri satr: "\'.concat(m.suffix,\'" bilan tugashi kerak\'):m.format==="includes"?\'Noto\\u2018g\\u2018ri satr: "\'.concat(m.includes,\'" ni o\\u2018z ichiga olishi kerak\'):m.format==="regex"?"Noto\\u2018g\\u2018ri satr: ".concat(m.pattern," shabloniga mos kelishi kerak"):"Noto\\u2018g\\u2018ri ".concat((s=n[m.format])!=null?s:t.format)}case"not_multiple_of":return"Noto\\u2018g\\u2018ri raqam: ".concat(t.divisor," ning karralisi bo\\u2018lishi kerak");case"unrecognized_keys":return"Noma\\u2019lum kalit".concat(t.keys.length>1?"lar":"",": ").concat(v(t.keys,", "));case"invalid_key":return"".concat(t.origin," dagi kalit noto\\u2018g\\u2018ri");case"invalid_union":return"Noto\\u2018g\\u2018ri kirish";case"invalid_element":return"".concat(t.origin," da noto\\u2018g\\u2018ri qiymat");default:return"Noto\\u2018g\\u2018ri kirish"}}};function xs(){return{localeError:Wp()}}var Xp=()=>{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={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"},i={nan:"NaN",number:"s\\u1ED1",array:"m\\u1EA3ng"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i instanceof ".concat(t.expected,", nh\\u1EADn \\u0111\\u01B0\\u1EE3c ").concat(p):"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(a,", nh\\u1EADn \\u0111\\u01B0\\u1EE3c ").concat(p)}case"invalid_value":return t.values.length===1?"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(_(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(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((l=t.origin)!=null?l:"gi\\xE1 tr\\u1ECB"," ").concat(u.verb," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"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?">=":">",u=r(t.origin);return u?"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(u.verb," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 ks(){return{localeError:Xp()}}var qp=()=>{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={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"},i={nan:"NaN",number:"\\u6570\\u5B57",array:"\\u6570\\u7EC4",null:"\\u7A7A\\u503C(null)"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B instanceof ".concat(t.expected,"\\uFF0C\\u5B9E\\u9645\\u63A5\\u6536 ").concat(p):"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(a,"\\uFF0C\\u5B9E\\u9645\\u63A5\\u6536 ").concat(p)}case"invalid_value":return t.values.length===1?"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(_(t.values[0])):"\\u65E0\\u6548\\u9009\\u9879\\uFF1A\\u671F\\u671B\\u4EE5\\u4E0B\\u4E4B\\u4E00 ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((l=t.origin)!=null?l:"\\u503C"," ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 zs(){return{localeError:qp()}}var Yp=()=>{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={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"},i={nan:"NaN"};return t=>{var o,c,l,d,s,m;switch(t.code){case"invalid_type":{let a=(o=i[t.expected])!=null?o:t.expected,u=y(t.input),p=(c=i[u])!=null?c:u;return/^[A-Z]/.test(t.expected)?"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA instanceof ".concat(t.expected,"\\uFF0C\\u4F46\\u6536\\u5230 ").concat(p):"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(a,"\\uFF0C\\u4F46\\u6536\\u5230 ").concat(p)}case"invalid_value":return t.values.length===1?"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(_(t.values[0])):"\\u7121\\u6548\\u7684\\u9078\\u9805\\uFF1A\\u9810\\u671F\\u70BA\\u4EE5\\u4E0B\\u5176\\u4E2D\\u4E4B\\u4E00 ".concat(v(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",u=r(t.origin);return u?"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((l=t.origin)!=null?l:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString()," ").concat((d=u.unit)!=null?d:"\\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?">=":">",u=r(t.origin);return u?"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString()," ").concat(u.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((m=n[a.format])!=null?m: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(v(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 Is(){return{localeError:Yp()}}var Qp=()=>{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={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"},i={nan:"NaN",number:"n\\u1ECD\\u0301mb\\xE0",array:"akop\\u1ECD"};return t=>{var o,c,l,d;switch(t.code){case"invalid_type":{let s=(o=i[t.expected])!=null?o:t.expected,m=y(t.input),a=(c=i[m])!=null?c:m;return/^[A-Z]/.test(t.expected)?"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi instanceof ".concat(t.expected,", \\xE0m\\u1ECD\\u0300 a r\\xED ").concat(a):"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(s,", \\xE0m\\u1ECD\\u0300 a r\\xED ").concat(a)}case"invalid_value":return t.values.length===1?"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(_(t.values[0])):"\\xC0\\u1E63\\xE0y\\xE0n a\\u1E63\\xEC\\u1E63e: yan \\u1ECD\\u0300kan l\\xE1ra ".concat(v(t.values,"|"));case"too_big":{let s=t.inclusive?"<=":"<",m=r(t.origin);return m?"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat((l=t.origin)!=null?l:"iye"," ").concat(m.verb," ").concat(s).concat(t.maximum," ").concat(m.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?">=":">",m=r(t.origin);return m?"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat(t.origin," ").concat(m.verb," ").concat(s).concat(t.minimum," ").concat(m.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((d=n[s.format])!=null?d: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(v(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 Ss(){return{localeError:Qp()}}var ws,fa=Symbol("ZodOutput"),ga=Symbol("ZodInput"),Or=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),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=f({},(i=this.get(n))!=null?i:{});delete t.id;let o=f(f({},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 Dr(){return new Or}var js;(js=(ws=globalThis).__zod_globalRegistry)!=null||(ws.__zod_globalRegistry=Dr());var W=globalThis.__zod_globalRegistry;function va(e,r){return new e(f({type:"string"},x(r)))}function $a(e,r){return new e(f({type:"string",coerce:!0},x(r)))}function Zr(e,r){return new e(f({type:"string",format:"email",check:"string_format",abort:!1},x(r)))}function Ft(e,r){return new e(f({type:"string",format:"guid",check:"string_format",abort:!1},x(r)))}function Tr(e,r){return new e(f({type:"string",format:"uuid",check:"string_format",abort:!1},x(r)))}function Nr(e,r){return new e(f({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},x(r)))}function Er(e,r){return new e(f({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},x(r)))}function Ar(e,r){return new e(f({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},x(r)))}function Jt(e,r){return new e(f({type:"string",format:"url",check:"string_format",abort:!1},x(r)))}function Rr(e,r){return new e(f({type:"string",format:"emoji",check:"string_format",abort:!1},x(r)))}function Lr(e,r){return new e(f({type:"string",format:"nanoid",check:"string_format",abort:!1},x(r)))}function Cr(e,r){return new e(f({type:"string",format:"cuid",check:"string_format",abort:!1},x(r)))}function Fr(e,r){return new e(f({type:"string",format:"cuid2",check:"string_format",abort:!1},x(r)))}function Jr(e,r){return new e(f({type:"string",format:"ulid",check:"string_format",abort:!1},x(r)))}function Vr(e,r){return new e(f({type:"string",format:"xid",check:"string_format",abort:!1},x(r)))}function Mr(e,r){return new e(f({type:"string",format:"ksuid",check:"string_format",abort:!1},x(r)))}function Br(e,r){return new e(f({type:"string",format:"ipv4",check:"string_format",abort:!1},x(r)))}function Kr(e,r){return new e(f({type:"string",format:"ipv6",check:"string_format",abort:!1},x(r)))}function ha(e,r){return new e(f({type:"string",format:"mac",check:"string_format",abort:!1},x(r)))}function Gr(e,r){return new e(f({type:"string",format:"cidrv4",check:"string_format",abort:!1},x(r)))}function Wr(e,r){return new e(f({type:"string",format:"cidrv6",check:"string_format",abort:!1},x(r)))}function Xr(e,r){return new e(f({type:"string",format:"base64",check:"string_format",abort:!1},x(r)))}function qr(e,r){return new e(f({type:"string",format:"base64url",check:"string_format",abort:!1},x(r)))}function Yr(e,r){return new e(f({type:"string",format:"e164",check:"string_format",abort:!1},x(r)))}function Qr(e,r){return new e(f({type:"string",format:"jwt",check:"string_format",abort:!1},x(r)))}var _a={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ya(e,r){return new e(f({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},x(r)))}function ba(e,r){return new e(f({type:"string",format:"date",check:"string_format"},x(r)))}function xa(e,r){return new e(f({type:"string",format:"time",check:"string_format",precision:null},x(r)))}function ka(e,r){return new e(f({type:"string",format:"duration",check:"string_format"},x(r)))}function za(e,r){return new e(f({type:"number",checks:[]},x(r)))}function Ia(e,r){return new e(f({type:"number",coerce:!0,checks:[]},x(r)))}function Sa(e,r){return new e(f({type:"number",check:"number_format",abort:!1,format:"safeint"},x(r)))}function wa(e,r){return new e(f({type:"number",check:"number_format",abort:!1,format:"float32"},x(r)))}function ja(e,r){return new e(f({type:"number",check:"number_format",abort:!1,format:"float64"},x(r)))}function Pa(e,r){return new e(f({type:"number",check:"number_format",abort:!1,format:"int32"},x(r)))}function Ua(e,r){return new e(f({type:"number",check:"number_format",abort:!1,format:"uint32"},x(r)))}function Oa(e,r){return new e(f({type:"boolean"},x(r)))}function Da(e,r){return new e(f({type:"boolean",coerce:!0},x(r)))}function Za(e,r){return new e(f({type:"bigint"},x(r)))}function Ta(e,r){return new e(f({type:"bigint",coerce:!0},x(r)))}function Na(e,r){return new e(f({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},x(r)))}function Ea(e,r){return new e(f({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},x(r)))}function Aa(e,r){return new e(f({type:"symbol"},x(r)))}function Ra(e,r){return new e(f({type:"undefined"},x(r)))}function La(e,r){return new e(f({type:"null"},x(r)))}function Ca(e){return new e({type:"any"})}function Fa(e){return new e({type:"unknown"})}function Ja(e,r){return new e(f({type:"never"},x(r)))}function Va(e,r){return new e(f({type:"void"},x(r)))}function Ma(e,r){return new e(f({type:"date"},x(r)))}function Ba(e,r){return new e(f({type:"date",coerce:!0},x(r)))}function Ka(e,r){return new e(f({type:"nan"},x(r)))}function me(e,r){return new $r(I(f({check:"less_than"},x(r)),{value:e,inclusive:!1}))}function oe(e,r){return new $r(I(f({check:"less_than"},x(r)),{value:e,inclusive:!0}))}function pe(e,r){return new hr(I(f({check:"greater_than"},x(r)),{value:e,inclusive:!1}))}function Q(e,r){return new hr(I(f({check:"greater_than"},x(r)),{value:e,inclusive:!0}))}function Hr(e){return pe(0,e)}function en(e){return me(0,e)}function tn(e){return oe(0,e)}function rn(e){return Q(0,e)}function je(e,r){return new Ri(I(f({check:"multiple_of"},x(r)),{value:e}))}function Pe(e,r){return new Fi(I(f({check:"max_size"},x(r)),{maximum:e}))}function fe(e,r){return new Ji(I(f({check:"min_size"},x(r)),{minimum:e}))}function Re(e,r){return new Vi(I(f({check:"size_equals"},x(r)),{size:e}))}function Le(e,r){return new Mi(I(f({check:"max_length"},x(r)),{maximum:e}))}function ye(e,r){return new Bi(I(f({check:"min_length"},x(r)),{minimum:e}))}function Ce(e,r){return new Ki(I(f({check:"length_equals"},x(r)),{length:e}))}function et(e,r){return new Gi(I(f({check:"string_format",format:"regex"},x(r)),{pattern:e}))}function tt(e){return new Wi(f({check:"string_format",format:"lowercase"},x(e)))}function rt(e){return new Xi(f({check:"string_format",format:"uppercase"},x(e)))}function nt(e,r){return new qi(I(f({check:"string_format",format:"includes"},x(r)),{includes:e}))}function it(e,r){return new Yi(I(f({check:"string_format",format:"starts_with"},x(r)),{prefix:e}))}function ot(e,r){return new Qi(I(f({check:"string_format",format:"ends_with"},x(r)),{suffix:e}))}function nn(e,r,n){return new Hi(f({check:"property",property:e,schema:r},x(n)))}function at(e,r){return new eo(f({check:"mime_type",mime:e},x(r)))}function de(e){return new to({check:"overwrite",tx:e})}function ct(e){return de(r=>r.normalize(e))}function ut(){return de(e=>e.trim())}function lt(){return de(e=>e.toLowerCase())}function st(){return de(e=>e.toUpperCase())}function dt(){return de(e=>Hn(e))}function Ga(e,r,n){return new e(f({type:"array",element:r},x(n)))}function ef(e,r,n){return new e(f({type:"union",options:r},x(n)))}function tf(e,r,n){return new e(f({type:"union",options:r,inclusive:!1},x(n)))}function rf(e,r,n,i){return new e(f({type:"union",options:n,discriminator:r},x(i)))}function nf(e,r,n){return new e({type:"intersection",left:r,right:n})}function of(e,r,n,i){let t=n instanceof P,o=t?i:n,c=t?n:null;return new e(f({type:"tuple",items:r,rest:c},x(o)))}function af(e,r,n,i){return new e(f({type:"record",keyType:r,valueType:n},x(i)))}function cf(e,r,n,i){return new e(f({type:"map",keyType:r,valueType:n},x(i)))}function uf(e,r,n){return new e(f({type:"set",valueType:r},x(n)))}function lf(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e(f({type:"enum",entries:i},x(n)))}function sf(e,r,n){return new e(f({type:"enum",entries:r},x(n)))}function df(e,r,n){return new e(f({type:"literal",values:Array.isArray(r)?r:[r]},x(n)))}function Wa(e,r){return new e(f({type:"file"},x(r)))}function mf(e,r){return new e({type:"transform",transform:r})}function pf(e,r){return new e({type:"optional",innerType:r})}function ff(e,r){return new e({type:"nullable",innerType:r})}function gf(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():ti(n)}})}function vf(e,r,n){return new e(f({type:"nonoptional",innerType:r},x(n)))}function $f(e,r){return new e({type:"success",innerType:r})}function hf(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function _f(e,r,n){return new e({type:"pipe",in:r,out:n})}function yf(e,r){return new e({type:"readonly",innerType:r})}function bf(e,r,n){return new e(f({type:"template_literal",parts:r},x(n)))}function xf(e,r){return new e({type:"lazy",getter:r})}function kf(e,r){return new e({type:"promise",innerType:r})}function Xa(e,r,n){var o;let i=x(n);return(o=i.abort)!=null||(i.abort=!0),new e(f({type:"custom",check:"custom",fn:r},i))}function qa(e,r,n){return new e(f({type:"custom",check:"custom",fn:r},x(n)))}function Ya(e){let r=Ps(n=>(n.addIssue=i=>{var t,o,c,l;if(typeof i=="string")n.issues.push(Ge(i,n.value,r._zod.def));else{let d=i;d.fatal&&(d.continue=!1),(t=d.code)!=null||(d.code="custom"),(o=d.input)!=null||(d.input=n.value),(c=d.inst)!=null||(d.inst=r),(l=d.continue)!=null||(d.continue=!r._zod.def.abort),n.issues.push(Ge(d))}},e(n.value,n)));return r}function Ps(e,r){let n=new L(f({check:"custom"},x(r)));return n._zod.check=e,n}function Qa(e){let r=new L({check:"describe"});return r._zod.onattach=[n=>{var t;let i=(t=W.get(n))!=null?t:{};W.add(n,I(f({},i),{description:e}))}],r._zod.check=()=>{},r}function Ha(e){let r=new L({check:"meta"});return r._zod.onattach=[n=>{var t;let i=(t=W.get(n))!=null?t:{};W.add(n,f(f({},i),e))}],r._zod.check=()=>{},r}function ec(e,r){var p,$,h,w,D;let n=x(r),i=(p=n.truthy)!=null?p:["true","1","yes","on","y","enabled"],t=($=n.falsy)!=null?$:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(T=>typeof T=="string"?T.toLowerCase():T),t=t.map(T=>typeof T=="string"?T.toLowerCase():T));let o=new Set(i),c=new Set(t),l=(h=e.Codec)!=null?h:Lt,d=(w=e.Boolean)!=null?w:At,s=(D=e.String)!=null?D:Ee,m=new s({type:"string",error:n.error}),a=new d({type:"boolean",error:n.error}),u=new l({type:"pipe",in:m,out:a,transform:((T,J)=>{let S=T;return n.case!=="sensitive"&&(S=S.toLowerCase()),o.has(S)?!0:c.has(S)?!1:(J.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...c],input:J.value,inst:u,continue:!1}),{})}),reverseTransform:((T,J)=>T===!0?i[0]||"true":t[0]||"false"),error:n.error});return u}function mt(e,r,n,i={}){let t=x(i),o=f(I(f({},x(i)),{check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:l=>n.test(l)}),t);return n instanceof RegExp&&(o.pattern=n),new e(o)}function Ue(e){var n,i,t,o,c,l,d,s,m;let r=(n=e==null?void 0:e.target)!=null?n:"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:(i=e.processors)!=null?i:{},metadataRegistry:(t=e==null?void 0:e.metadata)!=null?t:W,target:r,unrepresentable:(o=e==null?void 0:e.unrepresentable)!=null?o:"throw",override:(c=e==null?void 0:e.override)!=null?c:(()=>{}),io:(l=e==null?void 0:e.io)!=null?l:"output",counter:0,seen:new Map,cycles:(d=e==null?void 0:e.cycles)!=null?d:"ref",reused:(s=e==null?void 0:e.reused)!=null?s:"inline",external:(m=e==null?void 0:e.external)!=null?m:void 0}}function N(e,r,n={path:[],schemaPath:[]}){var m,a,u;var i;let t=e._zod.def,o=r.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let c={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,c);let l=(a=(m=e._zod).toJSONSchema)==null?void 0:a.call(m);if(l)c.schema=l;else{let p=I(f({},n),{schemaPath:[...n.schemaPath,e],path:n.path});if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,c.schema,p);else{let h=c.schema,w=r.processors[t.type];if(!w)throw new Error("[toJSONSchema]: Non-representable type encountered: ".concat(t.type));w(e,r,h,p)}let $=e._zod.parent;$&&(c.ref||(c.ref=$),N($,r,p),r.seen.get($).isParent=!0)}let d=r.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),r.io==="input"&&H(e)&&(delete c.schema.examples,delete c.schema.default),r.io==="input"&&c.schema._prefault&&((u=(i=c.schema).default)!=null||(i.default=c.schema._prefault)),delete c.schema._prefault,r.seen.get(e).schema}function Oe(e,r){var c,l,d,s;let n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let m of e.seen.entries()){let a=(c=e.metadataRegistry.get(m[0]))==null?void 0:c.id;if(a){let u=i.get(a);if(u&&u!==m[0])throw new Error(\'Duplicate schema id "\'.concat(a,\'" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.\'));i.set(a,m[0])}}let t=m=>{var h,w,D,T,J;let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let S=(h=e.external.registry.get(m[0]))==null?void 0:h.id,j=(w=e.external.uri)!=null?w:(M=>M);if(S)return{ref:j(S)};let E=(T=(D=m[1].defId)!=null?D:m[1].schema.id)!=null?T:"schema".concat(e.counter++);return m[1].defId=E,{defId:E,ref:"".concat(j("__shared"),"#/").concat(a,"/").concat(E)}}if(m[1]===n)return{ref:"#"};let p="".concat("#","/").concat(a,"/"),$=(J=m[1].schema.id)!=null?J:"__schema".concat(e.counter++);return{defId:$,ref:p+$}},o=m=>{if(m[1].schema.$ref)return;let a=m[1],{ref:u,defId:p}=t(m);a.def=f({},a.schema),p&&(a.defId=p);let $=a.schema;for(let h in $)delete $[h];$.$ref=u};if(e.cycles==="throw")for(let m of e.seen.entries()){let a=m[1];if(a.cycle)throw new Error("Cycle detected: "+"#/".concat((l=a.cycle)==null?void 0:l.join("/"),"/<root>")+\'\\n\\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.\')}for(let m of e.seen.entries()){let a=m[1];if(r===m[0]){o(m);continue}if(e.external){let p=(d=e.external.registry.get(m[0]))==null?void 0:d.id;if(r!==m[0]&&p){o(m);continue}}if((s=e.metadataRegistry.get(m[0]))==null?void 0:s.id){o(m);continue}if(a.cycle){o(m);continue}if(a.count>1&&e.reused==="ref"){o(m);continue}}}function De(e,r){var c,l,d,s,m;let n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a=>{var D,T,J;let u=e.seen.get(a);if(u.ref===null)return;let p=(D=u.def)!=null?D:u.schema,$=f({},p),h=u.ref;if(u.ref=null,h){i(h);let S=e.seen.get(h),j=S.schema;if(j.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=(T=p.allOf)!=null?T:[],p.allOf.push(j)):Object.assign(p,j),Object.assign(p,$),a._zod.parent===h)for(let M in p)M==="$ref"||M==="allOf"||M in $||delete p[M];if(j.$ref&&S.def)for(let M in p)M==="$ref"||M==="allOf"||M in S.def&&JSON.stringify(p[M])===JSON.stringify(S.def[M])&&delete p[M]}let w=a._zod.parent;if(w&&w!==h){i(w);let S=e.seen.get(w);if(S!=null&&S.schema.$ref&&(p.$ref=S.schema.$ref,S.def))for(let j in p)j==="$ref"||j==="allOf"||j in S.def&&JSON.stringify(p[j])===JSON.stringify(S.def[j])&&delete p[j]}e.override({zodSchema:a,jsonSchema:p,path:(J=u.path)!=null?J:[]})};for(let a of[...e.seen.entries()].reverse())i(a[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){let a=(l=e.external.registry.get(r))==null?void 0:l.id;if(!a)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(a)}Object.assign(t,(d=n.def)!=null?d:n.schema);let o=(m=(s=e.external)==null?void 0:s.defs)!=null?m:{};for(let a of e.seen.entries()){let u=a[1];u.def&&u.defId&&(o[u.defId]=u.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?t.$defs=o:t.definitions=o);try{let a=JSON.parse(JSON.stringify(t));return Object.defineProperty(a,"~standard",{value:I(f({},r["~standard"]),{jsonSchema:{input:pt(r,"input",e.processors),output:pt(r,"output",e.processors)}}),enumerable:!1,writable:!1}),a}catch(a){throw new Error("Error converting schema to JSON.")}}function H(e,r){let n=r!=null?r:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return H(i.element,n);if(i.type==="set")return H(i.valueType,n);if(i.type==="lazy")return H(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return H(i.innerType,n);if(i.type==="intersection")return H(i.left,n)||H(i.right,n);if(i.type==="record"||i.type==="map")return H(i.keyType,n)||H(i.valueType,n);if(i.type==="pipe")return H(i.in,n)||H(i.out,n);if(i.type==="object"){for(let t in i.shape)if(H(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(H(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(H(t,n))return!0;return!!(i.rest&&H(i.rest,n))}return!1}var tc=(e,r={})=>n=>{let i=Ue(I(f({},n),{processors:r}));return N(e,i),Oe(i,e),De(i,e)},pt=(e,r,n={})=>i=>{let{libraryOptions:t,target:o}=i!=null?i:{},c=Ue(I(f({},t!=null?t:{}),{target:o,io:r,processors:n}));return N(e,c),Oe(c,e),De(c,e)};var zf={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rc=(e,r,n,i)=>{var m;let t=n;t.type="string";let{minimum:o,maximum:c,format:l,patterns:d,contentEncoding:s}=e._zod.bag;if(typeof o=="number"&&(t.minLength=o),typeof c=="number"&&(t.maxLength=c),l&&(t.format=(m=zf[l])!=null?m:l,t.format===""&&delete t.format,l==="time"&&delete t.format),s&&(t.contentEncoding=s),d&&d.size>0){let a=[...d];a.length===1?t.pattern=a[0].source:a.length>1&&(t.allOf=[...a.map(u=>I(f({},r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{}),{pattern:u.source}))])}},nc=(e,r,n,i)=>{let t=n,{minimum:o,maximum:c,format:l,multipleOf:d,exclusiveMaximum:s,exclusiveMinimum:m}=e._zod.bag;typeof l=="string"&&l.includes("int")?t.type="integer":t.type="number",typeof m=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.minimum=m,t.exclusiveMinimum=!0):t.exclusiveMinimum=m),typeof o=="number"&&(t.minimum=o,typeof m=="number"&&r.target!=="draft-04"&&(m>=o?delete t.minimum:delete t.exclusiveMinimum)),typeof s=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.maximum=s,t.exclusiveMaximum=!0):t.exclusiveMaximum=s),typeof c=="number"&&(t.maximum=c,typeof s=="number"&&r.target!=="draft-04"&&(s<=c?delete t.maximum:delete t.exclusiveMaximum)),typeof d=="number"&&(t.multipleOf=d)},ic=(e,r,n,i)=>{n.type="boolean"},oc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},ac=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},cc=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},uc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},lc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},sc=(e,r,n,i)=>{n.not={}},dc=(e,r,n,i)=>{},mc=(e,r,n,i)=>{},pc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},fc=(e,r,n,i)=>{let t=e._zod.def,o=St(t.entries);o.every(c=>typeof c=="number")&&(n.type="number"),o.every(c=>typeof c=="string")&&(n.type="string"),n.enum=o},gc=(e,r,n,i)=>{let t=e._zod.def,o=[];for(let c of t.values)if(c===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(c))}else o.push(c);if(o.length!==0)if(o.length===1){let c=o[0];n.type=c===null?"null":typeof c,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[c]:n.const=c}else o.every(c=>typeof c=="number")&&(n.type="number"),o.every(c=>typeof c=="string")&&(n.type="string"),o.every(c=>typeof c=="boolean")&&(n.type="boolean"),o.every(c=>c===null)&&(n.type="null"),n.enum=o},vc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},$c=(e,r,n,i)=>{let t=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=o.source},hc=(e,r,n,i)=>{let t=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:l,mime:d}=e._zod.bag;c!==void 0&&(o.minLength=c),l!==void 0&&(o.maxLength=l),d?d.length===1?(o.contentMediaType=d[0],Object.assign(t,o)):(Object.assign(t,o),t.anyOf=d.map(s=>({contentMediaType:s}))):Object.assign(t,o)},_c=(e,r,n,i)=>{n.type="boolean"},yc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},xc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},zc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Ic=(e,r,n,i)=>{let t=n,o=e._zod.def,{minimum:c,maximum:l}=e._zod.bag;typeof c=="number"&&(t.minItems=c),typeof l=="number"&&(t.maxItems=l),t.type="array",t.items=N(o.element,r,I(f({},i),{path:[...i.path,"items"]}))},Sc=(e,r,n,i)=>{var s;let t=n,o=e._zod.def;t.type="object",t.properties={};let c=o.shape;for(let m in c)t.properties[m]=N(c[m],r,I(f({},i),{path:[...i.path,"properties",m]}));let l=new Set(Object.keys(c)),d=new Set([...l].filter(m=>{let a=o.shape[m]._zod;return r.io==="input"?a.optin===void 0:a.optout===void 0}));d.size>0&&(t.required=Array.from(d)),((s=o.catchall)==null?void 0:s._zod.def.type)==="never"?t.additionalProperties=!1:o.catchall?o.catchall&&(t.additionalProperties=N(o.catchall,r,I(f({},i),{path:[...i.path,"additionalProperties"]}))):r.io==="output"&&(t.additionalProperties=!1)},an=(e,r,n,i)=>{let t=e._zod.def,o=t.inclusive===!1,c=t.options.map((l,d)=>N(l,r,I(f({},i),{path:[...i.path,o?"oneOf":"anyOf",d]})));o?n.oneOf=c:n.anyOf=c},wc=(e,r,n,i)=>{let t=e._zod.def,o=N(t.left,r,I(f({},i),{path:[...i.path,"allOf",0]})),c=N(t.right,r,I(f({},i),{path:[...i.path,"allOf",1]})),l=s=>"allOf"in s&&Object.keys(s).length===1,d=[...l(o)?o.allOf:[o],...l(c)?c.allOf:[c]];n.allOf=d},jc=(e,r,n,i)=>{let t=n,o=e._zod.def;t.type="array";let c=r.target==="draft-2020-12"?"prefixItems":"items",l=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",d=o.items.map((u,p)=>N(u,r,I(f({},i),{path:[...i.path,c,p]}))),s=o.rest?N(o.rest,r,I(f({},i),{path:[...i.path,l,...r.target==="openapi-3.0"?[o.items.length]:[]]})):null;r.target==="draft-2020-12"?(t.prefixItems=d,s&&(t.items=s)):r.target==="openapi-3.0"?(t.items={anyOf:d},s&&t.items.anyOf.push(s),t.minItems=d.length,s||(t.maxItems=d.length)):(t.items=d,s&&(t.additionalItems=s));let{minimum:m,maximum:a}=e._zod.bag;typeof m=="number"&&(t.minItems=m),typeof a=="number"&&(t.maxItems=a)},Pc=(e,r,n,i)=>{let t=n,o=e._zod.def;t.type="object";let c=o.keyType,l=c._zod.bag,d=l==null?void 0:l.patterns;if(o.mode==="loose"&&d&&d.size>0){let m=N(o.valueType,r,I(f({},i),{path:[...i.path,"patternProperties","*"]}));t.patternProperties={};for(let a of d)t.patternProperties[a.source]=m}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=N(o.keyType,r,I(f({},i),{path:[...i.path,"propertyNames"]}))),t.additionalProperties=N(o.valueType,r,I(f({},i),{path:[...i.path,"additionalProperties"]}));let s=c._zod.values;if(s){let m=[...s].filter(a=>typeof a=="string"||typeof a=="number");m.length>0&&(t.required=m)}},Uc=(e,r,n,i)=>{let t=e._zod.def,o=N(t.innerType,r,i),c=r.seen.get(e);r.target==="openapi-3.0"?(c.ref=t.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Oc=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},Dc=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Zc=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Tc=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType;let c;try{c=t.catchValue(void 0)}catch(l){throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},Nc=(e,r,n,i)=>{let t=e._zod.def,o=r.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;N(o,r,i);let c=r.seen.get(e);c.ref=o},Ec=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,n.readOnly=!0},Ac=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},cn=(e,r,n,i)=>{let t=e._zod.def;N(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},Rc=(e,r,n,i)=>{let t=e._zod.innerType;N(t,r,i);let o=r.seen.get(e);o.ref=t},on={string:rc,number:nc,boolean:ic,bigint:oc,symbol:ac,null:cc,undefined:uc,void:lc,never:sc,any:dc,unknown:mc,date:pc,enum:fc,literal:gc,nan:vc,template_literal:$c,file:hc,success:_c,custom:yc,function:bc,transform:xc,map:kc,set:zc,array:Ic,object:Sc,union:an,intersection:wc,tuple:jc,record:Pc,nullable:Uc,nonoptional:Oc,default:Dc,prefault:Zc,catch:Tc,pipe:Nc,readonly:Ec,promise:Ac,optional:cn,lazy:Rc};function un(e,r){if("_idmap"in e){let i=e,t=Ue(I(f({},r),{processors:on})),o={};for(let d of i._idmap.entries()){let[s,m]=d;N(m,t)}let c={},l={registry:i,uri:r==null?void 0:r.uri,defs:o};t.external=l;for(let d of i._idmap.entries()){let[s,m]=d;Oe(t,m),c[s]=De(t,m)}if(Object.keys(o).length>0){let d=t.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[d]:o}}return{schemas:c}}let n=Ue(I(f({},r),{processors:on}));return N(e,n),Oe(n,e),De(n,e)}var ln=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){var i;let n=(i=r==null?void 0:r.target)!=null?i:"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Ue(f(f(f(f({processors:on,target:n},(r==null?void 0:r.metadata)&&{metadata:r.metadata}),(r==null?void 0:r.unrepresentable)&&{unrepresentable:r.unrepresentable}),(r==null?void 0:r.override)&&{override:r.override}),(r==null?void 0:r.io)&&{io:r.io}))}process(r,n={path:[],schemaPath:[]}){return N(r,this.ctx,n)}emit(r,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Oe(this.ctx,r);let c=De(this.ctx,r),{"~standard":t}=c;return el(c,["~standard"])}};var Lc={};var Vt={};$e(Vt,{ZodAny:()=>lu,ZodArray:()=>pu,ZodBase64:()=>Un,ZodBase64URL:()=>On,ZodBigInt:()=>_t,ZodBigIntFormat:()=>Tn,ZodBoolean:()=>ht,ZodCIDRv4:()=>jn,ZodCIDRv6:()=>Pn,ZodCUID:()=>bn,ZodCUID2:()=>xn,ZodCatch:()=>Nu,ZodCodec:()=>Jn,ZodCustom:()=>er,ZodCustomStringFormat:()=>vt,ZodDate:()=>Xt,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>gu,ZodE164:()=>Dn,ZodEmail:()=>hn,ZodEmoji:()=>_n,ZodEnum:()=>ft,ZodExactOptional:()=>Su,ZodFile:()=>zu,ZodFunction:()=>Mu,ZodGUID:()=>Mt,ZodIPv4:()=>Sn,ZodIPv6:()=>wn,ZodIntersection:()=>vu,ZodJWT:()=>Zn,ZodKSUID:()=>In,ZodLazy:()=>Fu,ZodLiteral:()=>ku,ZodMAC:()=>ru,ZodMap:()=>bu,ZodNaN:()=>Au,ZodNanoID:()=>yn,ZodNever:()=>du,ZodNonOptional:()=>Cn,ZodNull:()=>cu,ZodNullable:()=>ju,ZodNumber:()=>$t,ZodNumberFormat:()=>Ve,ZodObject:()=>Yt,ZodOptional:()=>Ln,ZodPipe:()=>Fn,ZodPrefault:()=>Ou,ZodPromise:()=>Vu,ZodReadonly:()=>Ru,ZodRecord:()=>Ht,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>R,ZodSuccess:()=>Tu,ZodSymbol:()=>ou,ZodTemplateLiteral:()=>Cu,ZodTransform:()=>Iu,ZodTuple:()=>hu,ZodType:()=>U,ZodULID:()=>kn,ZodURL:()=>Wt,ZodUUID:()=>ve,ZodUndefined:()=>au,ZodUnion:()=>Qt,ZodUnknown:()=>su,ZodVoid:()=>mu,ZodXID:()=>zn,ZodXor:()=>fu,_ZodString:()=>$n,_default:()=>Uu,_function:()=>Ed,any:()=>fd,array:()=>qt,base64:()=>Ys,base64url:()=>Qs,bigint:()=>ld,boolean:()=>iu,catch:()=>Eu,check:()=>Ad,cidrv4:()=>Xs,cidrv6:()=>qs,codec:()=>Zd,cuid:()=>Fs,cuid2:()=>Js,custom:()=>Rd,date:()=>vd,describe:()=>Ld,discriminatedUnion:()=>xd,e164:()=>Hs,email:()=>Os,emoji:()=>Ls,enum:()=>An,exactOptional:()=>wu,file:()=>Pd,float32:()=>od,float64:()=>ad,function:()=>Ed,guid:()=>Ds,hash:()=>id,hex:()=>nd,hostname:()=>rd,httpUrl:()=>Rs,instanceof:()=>Fd,int:()=>vn,int32:()=>cd,int64:()=>sd,intersection:()=>$u,ipv4:()=>Ks,ipv6:()=>Ws,json:()=>Vd,jwt:()=>ed,keyof:()=>$d,ksuid:()=>Bs,lazy:()=>Ju,literal:()=>jd,looseObject:()=>yd,looseRecord:()=>zd,mac:()=>Gs,map:()=>Id,meta:()=>Cd,nan:()=>Dd,nanoid:()=>Cs,nativeEnum:()=>wd,never:()=>Nn,nonoptional:()=>Zu,null:()=>uu,nullable:()=>Kt,nullish:()=>Ud,number:()=>nu,object:()=>hd,optional:()=>Bt,partialRecord:()=>kd,pipe:()=>Gt,prefault:()=>Du,preprocess:()=>Md,promise:()=>Nd,readonly:()=>Lu,record:()=>yu,refine:()=>Bu,set:()=>Sd,strictObject:()=>_d,string:()=>gn,stringFormat:()=>td,stringbool:()=>Jd,success:()=>Od,superRefine:()=>Ku,symbol:()=>md,templateLiteral:()=>Td,transform:()=>Rn,tuple:()=>_u,uint32:()=>ud,uint64:()=>dd,ulid:()=>Vs,undefined:()=>pd,union:()=>En,unknown:()=>Je,url:()=>As,uuid:()=>Zs,uuidv4:()=>Ts,uuidv6:()=>Ns,uuidv7:()=>Es,void:()=>gd,xid:()=>Ms,xor:()=>bd});var sn={};$e(sn,{endsWith:()=>ot,gt:()=>pe,gte:()=>Q,includes:()=>nt,length:()=>Ce,lowercase:()=>tt,lt:()=>me,lte:()=>oe,maxLength:()=>Le,maxSize:()=>Pe,mime:()=>at,minLength:()=>ye,minSize:()=>fe,multipleOf:()=>je,negative:()=>en,nonnegative:()=>rn,nonpositive:()=>tn,normalize:()=>ct,overwrite:()=>de,positive:()=>Hr,property:()=>nn,regex:()=>et,size:()=>Re,slugify:()=>dt,startsWith:()=>it,toLowerCase:()=>lt,toUpperCase:()=>st,trim:()=>ut,uppercase:()=>rt});var Fe={};$e(Fe,{ZodISODate:()=>mn,ZodISODateTime:()=>dn,ZodISODuration:()=>fn,ZodISOTime:()=>pn,date:()=>Fc,datetime:()=>Cc,duration:()=>Vc,time:()=>Jc});var dn=g("ZodISODateTime",(e,r)=>{vo.init(e,r),R.init(e,r)});function Cc(e){return ya(dn,e)}var mn=g("ZodISODate",(e,r)=>{$o.init(e,r),R.init(e,r)});function Fc(e){return ba(mn,e)}var pn=g("ZodISOTime",(e,r)=>{ho.init(e,r),R.init(e,r)});function Jc(e){return xa(pn,e)}var fn=g("ZodISODuration",(e,r)=>{_o.init(e,r),R.init(e,r)});function Vc(e){return ka(fn,e)}var Us=(e,r)=>{Ot.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Zt(e,n)},flatten:{value:n=>Dt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Be,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Be,2)}},isEmpty:{get(){return e.issues.length===0}}})},Sf=g("ZodError",Us),re=g("ZodError",Us,{Parent:Error});var Mc=We(re),Bc=Xe(re),Kc=qe(re),Gc=Ye(re),Wc=cr(re),Xc=ur(re),qc=lr(re),Yc=sr(re),Qc=dr(re),Hc=mr(re),eu=pr(re),tu=fr(re);var U=g("ZodType",(e,r)=>(P.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:pt(e,"input"),output:pt(e,"output")}}),e.toJSONSchema=tc(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>{var i;return e.clone(b.mergeDefs(r,{checks:[...(i=r.checks)!=null?i:[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},e.with=e.check,e.clone=(n,i)=>Y(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Mc(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Kc(e,n,i),e.parseAsync=async(n,i)=>Bc(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Gc(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Wc(e,n,i),e.decode=(n,i)=>Xc(e,n,i),e.encodeAsync=async(n,i)=>qc(e,n,i),e.decodeAsync=async(n,i)=>Yc(e,n,i),e.safeEncode=(n,i)=>Qc(e,n,i),e.safeDecode=(n,i)=>Hc(e,n,i),e.safeEncodeAsync=async(n,i)=>eu(e,n,i),e.safeDecodeAsync=async(n,i)=>tu(e,n,i),e.refine=(n,i)=>e.check(Bu(n,i)),e.superRefine=n=>e.check(Ku(n)),e.overwrite=n=>e.check(de(n)),e.optional=()=>Bt(e),e.exactOptional=()=>wu(e),e.nullable=()=>Kt(e),e.nullish=()=>Bt(Kt(e)),e.nonoptional=n=>Zu(e,n),e.array=()=>qt(e),e.or=n=>En([e,n]),e.and=n=>$u(e,n),e.transform=n=>Gt(e,Rn(n)),e.default=n=>Uu(e,n),e.prefault=n=>Du(e,n),e.catch=n=>Eu(e,n),e.pipe=n=>Gt(e,n),e.readonly=()=>Lu(e),e.describe=n=>{let i=e.clone();return W.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=W.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return W.get(e);let i=e.clone();return W.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),$n=g("_ZodString",(e,r)=>{var i,t,o;Ee.init(e,r),U.init(e,r),e._zod.processJSONSchema=(c,l,d)=>rc(e,c,l,d);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=(...c)=>e.check(et(...c)),e.includes=(...c)=>e.check(nt(...c)),e.startsWith=(...c)=>e.check(it(...c)),e.endsWith=(...c)=>e.check(ot(...c)),e.min=(...c)=>e.check(ye(...c)),e.max=(...c)=>e.check(Le(...c)),e.length=(...c)=>e.check(Ce(...c)),e.nonempty=(...c)=>e.check(ye(1,...c)),e.lowercase=c=>e.check(tt(c)),e.uppercase=c=>e.check(rt(c)),e.trim=()=>e.check(ut()),e.normalize=(...c)=>e.check(ct(...c)),e.toLowerCase=()=>e.check(lt()),e.toUpperCase=()=>e.check(st()),e.slugify=()=>e.check(dt())}),gt=g("ZodString",(e,r)=>{Ee.init(e,r),$n.init(e,r),e.email=n=>e.check(Zr(hn,n)),e.url=n=>e.check(Jt(Wt,n)),e.jwt=n=>e.check(Qr(Zn,n)),e.emoji=n=>e.check(Rr(_n,n)),e.guid=n=>e.check(Ft(Mt,n)),e.uuid=n=>e.check(Tr(ve,n)),e.uuidv4=n=>e.check(Nr(ve,n)),e.uuidv6=n=>e.check(Er(ve,n)),e.uuidv7=n=>e.check(Ar(ve,n)),e.nanoid=n=>e.check(Lr(yn,n)),e.guid=n=>e.check(Ft(Mt,n)),e.cuid=n=>e.check(Cr(bn,n)),e.cuid2=n=>e.check(Fr(xn,n)),e.ulid=n=>e.check(Jr(kn,n)),e.base64=n=>e.check(Xr(Un,n)),e.base64url=n=>e.check(qr(On,n)),e.xid=n=>e.check(Vr(zn,n)),e.ksuid=n=>e.check(Mr(In,n)),e.ipv4=n=>e.check(Br(Sn,n)),e.ipv6=n=>e.check(Kr(wn,n)),e.cidrv4=n=>e.check(Gr(jn,n)),e.cidrv6=n=>e.check(Wr(Pn,n)),e.e164=n=>e.check(Yr(Dn,n)),e.datetime=n=>e.check(Cc(n)),e.date=n=>e.check(Fc(n)),e.time=n=>e.check(Jc(n)),e.duration=n=>e.check(Vc(n))});function gn(e){return va(gt,e)}var R=g("ZodStringFormat",(e,r)=>{A.init(e,r),$n.init(e,r)}),hn=g("ZodEmail",(e,r)=>{ao.init(e,r),R.init(e,r)});function Os(e){return Zr(hn,e)}var Mt=g("ZodGUID",(e,r)=>{io.init(e,r),R.init(e,r)});function Ds(e){return Ft(Mt,e)}var ve=g("ZodUUID",(e,r)=>{oo.init(e,r),R.init(e,r)});function Zs(e){return Tr(ve,e)}function Ts(e){return Nr(ve,e)}function Ns(e){return Er(ve,e)}function Es(e){return Ar(ve,e)}var Wt=g("ZodURL",(e,r)=>{co.init(e,r),R.init(e,r)});function As(e){return Jt(Wt,e)}function Rs(e){return Jt(Wt,f({protocol:/^https?$/,hostname:ie.domain},b.normalizeParams(e)))}var _n=g("ZodEmoji",(e,r)=>{uo.init(e,r),R.init(e,r)});function Ls(e){return Rr(_n,e)}var yn=g("ZodNanoID",(e,r)=>{lo.init(e,r),R.init(e,r)});function Cs(e){return Lr(yn,e)}var bn=g("ZodCUID",(e,r)=>{so.init(e,r),R.init(e,r)});function Fs(e){return Cr(bn,e)}var xn=g("ZodCUID2",(e,r)=>{mo.init(e,r),R.init(e,r)});function Js(e){return Fr(xn,e)}var kn=g("ZodULID",(e,r)=>{po.init(e,r),R.init(e,r)});function Vs(e){return Jr(kn,e)}var zn=g("ZodXID",(e,r)=>{fo.init(e,r),R.init(e,r)});function Ms(e){return Vr(zn,e)}var In=g("ZodKSUID",(e,r)=>{go.init(e,r),R.init(e,r)});function Bs(e){return Mr(In,e)}var Sn=g("ZodIPv4",(e,r)=>{yo.init(e,r),R.init(e,r)});function Ks(e){return Br(Sn,e)}var ru=g("ZodMAC",(e,r)=>{xo.init(e,r),R.init(e,r)});function Gs(e){return ha(ru,e)}var wn=g("ZodIPv6",(e,r)=>{bo.init(e,r),R.init(e,r)});function Ws(e){return Kr(wn,e)}var jn=g("ZodCIDRv4",(e,r)=>{ko.init(e,r),R.init(e,r)});function Xs(e){return Gr(jn,e)}var Pn=g("ZodCIDRv6",(e,r)=>{zo.init(e,r),R.init(e,r)});function qs(e){return Wr(Pn,e)}var Un=g("ZodBase64",(e,r)=>{So.init(e,r),R.init(e,r)});function Ys(e){return Xr(Un,e)}var On=g("ZodBase64URL",(e,r)=>{wo.init(e,r),R.init(e,r)});function Qs(e){return qr(On,e)}var Dn=g("ZodE164",(e,r)=>{jo.init(e,r),R.init(e,r)});function Hs(e){return Yr(Dn,e)}var Zn=g("ZodJWT",(e,r)=>{Po.init(e,r),R.init(e,r)});function ed(e){return Qr(Zn,e)}var vt=g("ZodCustomStringFormat",(e,r)=>{Uo.init(e,r),R.init(e,r)});function td(e,r,n={}){return mt(vt,e,r,n)}function rd(e){return mt(vt,"hostname",ie.hostname,e)}function nd(e){return mt(vt,"hex",ie.hex,e)}function id(e,r){var o;let n=(o=r==null?void 0:r.enc)!=null?o:"hex",i="".concat(e,"_").concat(n),t=ie[i];if(!t)throw new Error("Unrecognized hash format: ".concat(i));return mt(vt,i,t,r)}var $t=g("ZodNumber",(e,r)=>{var i,t,o,c,l,d,s,m,a;zr.init(e,r),U.init(e,r),e._zod.processJSONSchema=(u,p,$)=>nc(e,u,p,$),e.gt=(u,p)=>e.check(pe(u,p)),e.gte=(u,p)=>e.check(Q(u,p)),e.min=(u,p)=>e.check(Q(u,p)),e.lt=(u,p)=>e.check(me(u,p)),e.lte=(u,p)=>e.check(oe(u,p)),e.max=(u,p)=>e.check(oe(u,p)),e.int=u=>e.check(vn(u)),e.safe=u=>e.check(vn(u)),e.positive=u=>e.check(pe(0,u)),e.nonnegative=u=>e.check(Q(0,u)),e.negative=u=>e.check(me(0,u)),e.nonpositive=u=>e.check(oe(0,u)),e.multipleOf=(u,p)=>e.check(je(u,p)),e.step=(u,p)=>e.check(je(u,p)),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=(d=Math.min((c=n.maximum)!=null?c:Number.POSITIVE_INFINITY,(l=n.exclusiveMaximum)!=null?l:Number.POSITIVE_INFINITY))!=null?d:null,e.isInt=((s=n.format)!=null?s:"").includes("int")||Number.isSafeInteger((m=n.multipleOf)!=null?m:.5),e.isFinite=!0,e.format=(a=n.format)!=null?a:null});function nu(e){return za($t,e)}var Ve=g("ZodNumberFormat",(e,r)=>{Oo.init(e,r),$t.init(e,r)});function vn(e){return Sa(Ve,e)}function od(e){return wa(Ve,e)}function ad(e){return ja(Ve,e)}function cd(e){return Pa(Ve,e)}function ud(e){return Ua(Ve,e)}var ht=g("ZodBoolean",(e,r)=>{At.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ic(e,n,i,t)});function iu(e){return Oa(ht,e)}var _t=g("ZodBigInt",(e,r)=>{var i,t,o;Ir.init(e,r),U.init(e,r),e._zod.processJSONSchema=(c,l,d)=>oc(e,c,l,d),e.gte=(c,l)=>e.check(Q(c,l)),e.min=(c,l)=>e.check(Q(c,l)),e.gt=(c,l)=>e.check(pe(c,l)),e.gte=(c,l)=>e.check(Q(c,l)),e.min=(c,l)=>e.check(Q(c,l)),e.lt=(c,l)=>e.check(me(c,l)),e.lte=(c,l)=>e.check(oe(c,l)),e.max=(c,l)=>e.check(oe(c,l)),e.positive=c=>e.check(pe(BigInt(0),c)),e.negative=c=>e.check(me(BigInt(0),c)),e.nonpositive=c=>e.check(oe(BigInt(0),c)),e.nonnegative=c=>e.check(Q(BigInt(0),c)),e.multipleOf=(c,l)=>e.check(je(c,l));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(t=n.maximum)!=null?t:null,e.format=(o=n.format)!=null?o:null});function ld(e){return Za(_t,e)}var Tn=g("ZodBigIntFormat",(e,r)=>{Do.init(e,r),_t.init(e,r)});function sd(e){return Na(Tn,e)}function dd(e){return Ea(Tn,e)}var ou=g("ZodSymbol",(e,r)=>{Zo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ac(e,n,i,t)});function md(e){return Aa(ou,e)}var au=g("ZodUndefined",(e,r)=>{To.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>uc(e,n,i,t)});function pd(e){return Ra(au,e)}var cu=g("ZodNull",(e,r)=>{No.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cc(e,n,i,t)});function uu(e){return La(cu,e)}var lu=g("ZodAny",(e,r)=>{Eo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>dc(e,n,i,t)});function fd(){return Ca(lu)}var su=g("ZodUnknown",(e,r)=>{Ao.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>mc(e,n,i,t)});function Je(){return Fa(su)}var du=g("ZodNever",(e,r)=>{Ro.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>sc(e,n,i,t)});function Nn(e){return Ja(du,e)}var mu=g("ZodVoid",(e,r)=>{Lo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>lc(e,n,i,t)});function gd(e){return Va(mu,e)}var Xt=g("ZodDate",(e,r)=>{Co.init(e,r),U.init(e,r),e._zod.processJSONSchema=(i,t,o)=>pc(e,i,t,o),e.min=(i,t)=>e.check(Q(i,t)),e.max=(i,t)=>e.check(oe(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 vd(e){return Ma(Xt,e)}var pu=g("ZodArray",(e,r)=>{Fo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Ic(e,n,i,t),e.element=r.element,e.min=(n,i)=>e.check(ye(n,i)),e.nonempty=n=>e.check(ye(1,n)),e.max=(n,i)=>e.check(Le(n,i)),e.length=(n,i)=>e.check(Ce(n,i)),e.unwrap=()=>e.element});function qt(e,r){return Ga(pu,e,r)}function $d(e){let r=e._zod.def.shape;return An(Object.keys(r))}var Yt=g("ZodObject",(e,r)=>{Jo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Sc(e,n,i,t),b.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>An(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(I(f({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(I(f({},e._zod.def),{catchall:Je()})),e.loose=()=>e.clone(I(f({},e._zod.def),{catchall:Je()})),e.strict=()=>e.clone(I(f({},e._zod.def),{catchall:Nn()})),e.strip=()=>e.clone(I(f({},e._zod.def),{catchall:void 0})),e.extend=n=>b.extend(e,n),e.safeExtend=n=>b.safeExtend(e,n),e.merge=n=>b.merge(e,n),e.pick=n=>b.pick(e,n),e.omit=n=>b.omit(e,n),e.partial=(...n)=>b.partial(Ln,e,n[0]),e.required=(...n)=>b.required(Cn,e,n[0])});function hd(e,r){let n=f({type:"object",shape:e!=null?e:{}},b.normalizeParams(r));return new Yt(n)}function _d(e,r){return new Yt(f({type:"object",shape:e,catchall:Nn()},b.normalizeParams(r)))}function yd(e,r){return new Yt(f({type:"object",shape:e,catchall:Je()},b.normalizeParams(r)))}var Qt=g("ZodUnion",(e,r)=>{Rt.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>an(e,n,i,t),e.options=r.options});function En(e,r){return new Qt(f({type:"union",options:e},b.normalizeParams(r)))}var fu=g("ZodXor",(e,r)=>{Qt.init(e,r),Vo.init(e,r),e._zod.processJSONSchema=(n,i,t)=>an(e,n,i,t),e.options=r.options});function bd(e,r){return new fu(f({type:"union",options:e,inclusive:!1},b.normalizeParams(r)))}var gu=g("ZodDiscriminatedUnion",(e,r)=>{Qt.init(e,r),Mo.init(e,r)});function xd(e,r,n){return new gu(f({type:"union",options:r,discriminator:e},b.normalizeParams(n)))}var vu=g("ZodIntersection",(e,r)=>{Bo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>wc(e,n,i,t)});function $u(e,r){return new vu({type:"intersection",left:e,right:r})}var hu=g("ZodTuple",(e,r)=>{Sr.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jc(e,n,i,t),e.rest=n=>e.clone(I(f({},e._zod.def),{rest:n}))});function _u(e,r,n){let i=r instanceof P,t=i?n:r,o=i?r:null;return new hu(f({type:"tuple",items:e,rest:o},b.normalizeParams(t)))}var Ht=g("ZodRecord",(e,r)=>{Ko.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Pc(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function yu(e,r,n){return new Ht(f({type:"record",keyType:e,valueType:r},b.normalizeParams(n)))}function kd(e,r,n){let i=Y(e);return i._zod.values=void 0,new Ht(f({type:"record",keyType:i,valueType:r},b.normalizeParams(n)))}function zd(e,r,n){return new Ht(f({type:"record",keyType:e,valueType:r,mode:"loose"},b.normalizeParams(n)))}var bu=g("ZodMap",(e,r)=>{Go.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>kc(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...n)=>e.check(fe(...n)),e.nonempty=n=>e.check(fe(1,n)),e.max=(...n)=>e.check(Pe(...n)),e.size=(...n)=>e.check(Re(...n))});function Id(e,r,n){return new bu(f({type:"map",keyType:e,valueType:r},b.normalizeParams(n)))}var xu=g("ZodSet",(e,r)=>{Wo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>zc(e,n,i,t),e.min=(...n)=>e.check(fe(...n)),e.nonempty=n=>e.check(fe(1,n)),e.max=(...n)=>e.check(Pe(...n)),e.size=(...n)=>e.check(Re(...n))});function Sd(e,r){return new xu(f({type:"set",valueType:e},b.normalizeParams(r)))}var ft=g("ZodEnum",(e,r)=>{Xo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(i,t,o)=>fc(e,i,t,o),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 c of i)if(n.has(c))o[c]=r.entries[c];else throw new Error("Key ".concat(c," not found in enum"));return new ft(I(f(I(f({},r),{checks:[]}),b.normalizeParams(t)),{entries:o}))},e.exclude=(i,t)=>{let o=f({},r.entries);for(let c of i)if(n.has(c))delete o[c];else throw new Error("Key ".concat(c," not found in enum"));return new ft(I(f(I(f({},r),{checks:[]}),b.normalizeParams(t)),{entries:o}))}});function An(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ft(f({type:"enum",entries:n},b.normalizeParams(r)))}function wd(e,r){return new ft(f({type:"enum",entries:e},b.normalizeParams(r)))}var ku=g("ZodLiteral",(e,r)=>{qo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>gc(e,n,i,t),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 jd(e,r){return new ku(f({type:"literal",values:Array.isArray(e)?e:[e]},b.normalizeParams(r)))}var zu=g("ZodFile",(e,r)=>{Yo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>hc(e,n,i,t),e.min=(n,i)=>e.check(fe(n,i)),e.max=(n,i)=>e.check(Pe(n,i)),e.mime=(n,i)=>e.check(at(Array.isArray(n)?n:[n],i))});function Pd(e){return Wa(zu,e)}var Iu=g("ZodTransform",(e,r)=>{Qo.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>xc(e,n,i,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ke(e.constructor.name);n.addIssue=o=>{var c,l,d;if(typeof o=="string")n.issues.push(b.issue(o,n.value,r));else{let s=o;s.fatal&&(s.continue=!1),(c=s.code)!=null||(s.code="custom"),(l=s.input)!=null||(s.input=n.value),(d=s.inst)!=null||(s.inst=e),n.issues.push(b.issue(s))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n)):(n.value=t,n)}});function Rn(e){return new Iu({type:"transform",transform:e})}var Ln=g("ZodOptional",(e,r)=>{wr.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cn(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Bt(e){return new Ln({type:"optional",innerType:e})}var Su=g("ZodExactOptional",(e,r)=>{Ho.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cn(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new Su({type:"optional",innerType:e})}var ju=g("ZodNullable",(e,r)=>{ea.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Uc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Kt(e){return new ju({type:"nullable",innerType:e})}function Ud(e){return Bt(Kt(e))}var Pu=g("ZodDefault",(e,r)=>{ta.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Dc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Uu(e,r){return new Pu({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():b.shallowClone(r)}})}var Ou=g("ZodPrefault",(e,r)=>{ra.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Zc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Du(e,r){return new Ou({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():b.shallowClone(r)}})}var Cn=g("ZodNonOptional",(e,r)=>{na.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Oc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Zu(e,r){return new Cn(f({type:"nonoptional",innerType:e},b.normalizeParams(r)))}var Tu=g("ZodSuccess",(e,r)=>{ia.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>_c(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Od(e){return new Tu({type:"success",innerType:e})}var Nu=g("ZodCatch",(e,r)=>{oa.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Tc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Eu(e,r){return new Nu({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var Au=g("ZodNaN",(e,r)=>{aa.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>vc(e,n,i,t)});function Dd(e){return Ka(Au,e)}var Fn=g("ZodPipe",(e,r)=>{ca.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Nc(e,n,i,t),e.in=r.in,e.out=r.out});function Gt(e,r){return new Fn({type:"pipe",in:e,out:r})}var Jn=g("ZodCodec",(e,r)=>{Fn.init(e,r),Lt.init(e,r)});function Zd(e,r,n){return new Jn({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var Ru=g("ZodReadonly",(e,r)=>{ua.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Ec(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Lu(e){return new Ru({type:"readonly",innerType:e})}var Cu=g("ZodTemplateLiteral",(e,r)=>{la.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>$c(e,n,i,t)});function Td(e,r){return new Cu(f({type:"template_literal",parts:e},b.normalizeParams(r)))}var Fu=g("ZodLazy",(e,r)=>{ma.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Rc(e,n,i,t),e.unwrap=()=>e._zod.def.getter()});function Ju(e){return new Fu({type:"lazy",getter:e})}var Vu=g("ZodPromise",(e,r)=>{da.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Ac(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Nd(e){return new Vu({type:"promise",innerType:e})}var Mu=g("ZodFunction",(e,r)=>{sa.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>bc(e,n,i,t)});function Ed(e){var r,n;return new Mu({type:"function",input:Array.isArray(e==null?void 0:e.input)?_u(e==null?void 0:e.input):(r=e==null?void 0:e.input)!=null?r:qt(Je()),output:(n=e==null?void 0:e.output)!=null?n:Je()})}var er=g("ZodCustom",(e,r)=>{pa.init(e,r),U.init(e,r),e._zod.processJSONSchema=(n,i,t)=>yc(e,n,i,t)});function Ad(e){let r=new L({check:"custom"});return r._zod.check=e,r}function Rd(e,r){return Xa(er,e!=null?e:(()=>!0),r)}function Bu(e,r={}){return qa(er,e,r)}function Ku(e){return Ya(e)}var Ld=Qa,Cd=Ha;function Fd(e,r={}){let n=new er(f({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0},b.normalizeParams(r)));return n._zod.bag.Class=e,n._zod.check=i=>{var t;i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...(t=n._zod.def.path)!=null?t:[]]})},n}var Jd=(...e)=>ec({Codec:Jn,Boolean:ht,String:gt},...e);function Vd(e){let r=Ju(()=>En([gn(e),nu(),iu(),uu(),qt(r),yu(gn(),r)]));return r}function Md(e,r){return Gt(Rn(e),r)}var jf={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 Pf(e){B({customError:e})}function Uf(){return B().customError}var Gu;Gu||(Gu={});var z=I(f(f({},Vt),sn),{iso:Fe}),Of=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Df(e,r){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":r!=null?r:"draft-2020-12"}function Zf(e,r){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let i=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!r.defs[t])throw new Error("Reference not found: ".concat(e));return r.defs[t]}throw new Error("Reference not found: ".concat(e))}function Bd(e,r){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return z.lazy(()=>{if(!r.refs.has(t))throw new Error("Circular reference not resolved: ".concat(t));return r.refs.get(t)});r.processing.add(t);let o=Zf(t,r),c=q(o,r);return r.refs.set(t,c),r.processing.delete(t),c}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return z.null();if(t.length===0)return z.never();if(t.length===1)return z.literal(t[0]);if(t.every(c=>typeof c=="string"))return z.enum(t);let o=t.map(c=>z.literal(c));return o.length<2?o[0]:z.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map(o=>{let c=I(f({},e),{type:o});return Bd(c,r)});return t.length===0?z.never():t.length===1?t[0]:z.union(t)}if(!n)return z.any();let i;switch(n){case"string":{let t=z.string();if(e.format){let o=e.format;o==="email"?t=t.check(z.email()):o==="uri"||o==="uri-reference"?t=t.check(z.url()):o==="uuid"||o==="guid"?t=t.check(z.uuid()):o==="date-time"?t=t.check(z.iso.datetime()):o==="date"?t=t.check(z.iso.date()):o==="time"?t=t.check(z.iso.time()):o==="duration"?t=t.check(z.iso.duration()):o==="ipv4"?t=t.check(z.ipv4()):o==="ipv6"?t=t.check(z.ipv6()):o==="mac"?t=t.check(z.mac()):o==="cidr"?t=t.check(z.cidrv4()):o==="cidr-v6"?t=t.check(z.cidrv6()):o==="base64"?t=t.check(z.base64()):o==="base64url"?t=t.check(z.base64url()):o==="e164"?t=t.check(z.e164()):o==="jwt"?t=t.check(z.jwt()):o==="emoji"?t=t.check(z.emoji()):o==="nanoid"?t=t.check(z.nanoid()):o==="cuid"?t=t.check(z.cuid()):o==="cuid2"?t=t.check(z.cuid2()):o==="ulid"?t=t.check(z.ulid()):o==="xid"?t=t.check(z.xid()):o==="ksuid"&&(t=t.check(z.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?z.number().int():z.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":{i=z.boolean();break}case"null":{i=z.null();break}case"object":{let t={},o=e.properties||{},c=new Set(e.required||[]);for(let[d,s]of Object.entries(o)){let m=q(s,r);t[d]=c.has(d)?m:m.optional()}if(e.propertyNames){let d=q(e.propertyNames,r),s=e.additionalProperties&&typeof e.additionalProperties=="object"?q(e.additionalProperties,r):z.any();if(Object.keys(t).length===0){i=z.record(d,s);break}let m=z.object(t).passthrough(),a=z.looseRecord(d,s);i=z.intersection(m,a);break}if(e.patternProperties){let d=e.patternProperties,s=Object.keys(d),m=[];for(let u of s){let p=q(d[u],r),$=z.string().regex(new RegExp(u));m.push(z.looseRecord($,p))}let a=[];if(Object.keys(t).length>0&&a.push(z.object(t).passthrough()),a.push(...m),a.length===0)i=z.object({}).passthrough();else if(a.length===1)i=a[0];else{let u=z.intersection(a[0],a[1]);for(let p=2;p<a.length;p++)u=z.intersection(u,a[p]);i=u}break}let l=z.object(t);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall(q(e.additionalProperties,r)):i=l.passthrough();break}case"array":{let t=e.prefixItems,o=e.items;if(t&&Array.isArray(t)){let c=t.map(d=>q(d,r)),l=o&&typeof o=="object"&&!Array.isArray(o)?q(o,r):void 0;l?i=z.tuple(c).rest(l):i=z.tuple(c),typeof e.minItems=="number"&&(i=i.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(z.maxLength(e.maxItems)))}else if(Array.isArray(o)){let c=o.map(d=>q(d,r)),l=e.additionalItems&&typeof e.additionalItems=="object"?q(e.additionalItems,r):void 0;l?i=z.tuple(c).rest(l):i=z.tuple(c),typeof e.minItems=="number"&&(i=i.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(z.maxLength(e.maxItems)))}else if(o!==void 0){let c=q(o,r),l=z.array(c);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=z.array(z.any());break}default:throw new Error("Unsupported type: ".concat(n))}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function q(e,r){if(typeof e=="boolean")return e?z.any():z.never();let n=Bd(e,r),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(s=>q(s,r)),d=z.union(l);n=i?z.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(s=>q(s,r)),d=z.xor(l);n=i?z.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:z.any();else{let l=i?n:q(e.allOf[0],r),d=i?0:1;for(let s=d;s<e.allOf.length;s++)l=z.intersection(l,q(e.allOf[s],r));n=l}e.nullable===!0&&r.version==="openapi-3.0"&&(n=z.nullable(n)),e.readOnly===!0&&(n=z.readonly(n));let t={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of o)l in e&&(t[l]=e[l]);let c=["contentEncoding","contentMediaType","contentSchema"];for(let l of c)l in e&&(t[l]=e[l]);for(let l of Object.keys(e))Of.has(l)||(t[l]=e[l]);return Object.keys(t).length>0&&r.registry.add(n,t),n}function Kd(e,r){var o;if(typeof e=="boolean")return e?z.any():z.never();let n=Df(e,r==null?void 0:r.defaultTarget),i=e.$defs||e.definitions||{},t={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(o=r==null?void 0:r.registry)!=null?o:W};return q(e,t)}var Vn={};$e(Vn,{bigint:()=>Af,boolean:()=>Ef,date:()=>Rf,number:()=>Nf,string:()=>Tf});function Tf(e){return $a(gt,e)}function Nf(e){return Ia($t,e)}function Ef(e){return Da(ht,e)}function Af(e){return Ta(_t,e)}function Rf(e){return Ba(Xt,e)}B(jr());var sh=yt.union([yt.enum(["low","medium","high","always-visible"]),yt.number()]);var Mn=5;var Lf=9,le=200,Bn=10;function Gd(e,r,n,i,t,o,c="-1"){var bt,xt;let l=1/0,d=1/0,s=-1/0,m=-1/0,a=new F(-Bn,0,5,n),u=new F(-Bn,0,r,5),p=new F(r-5,0,r+Bn,n),$=new F(0,n-5,r,n+Bn),h=Cf(r,n,i,t,o),w=[a,u,p,$],D=new F(-le,-le,r+le*2,n+le*2);for(let C of e){let ce,be;for(let k=0;k<C.bboxes.length;k++){if(C.bboxes[k]==null||(ce=C.bboxes[k].boundingBox,be=C.bboxes[k].index,C.lockedToStrategyIndex!==-1&&be!==C.lockedToStrategyIndex))continue;let[Z,K,V,G]=ce,[Ze,xe,Wu,Xd]=[C.y-Z,C.y+K,C.x-V,C.x+G],Kn=Wu,Gn=Ze,Xu=Xd-Wu,qu=xe-Ze;l=Math.min(l,Kn)-le,d=Math.min(d,Gn)-le,s=Math.max(s,Kn+Xu)+le,m=Math.max(m,Gn+qu)+le,C.bboxes[k].boundingRect=new F(Kn,Gn,Xu,qu)}}let T=new kt(new F(l,d,s-l,m-d)),J={msgId:c,colliders:new Array(e.length),staticColliders:[],debug:[]},S=0;for(let C=0;C<e.length;C++){let ce=e[C];((xt=(bt=ce.bboxes)==null?void 0:bt[0])==null?void 0:xt.index)===Lf&&(J.staticColliders.push(ce.bboxes[0].boundingRect),T.insert(ce.bboxes[0].boundingRect),S++)}e=e.slice(S,e.length);let j=-le,E=r+le,M=-le,Me=n+le,ae;for(let C=0;C<e.length;C++){ae=e[C];let ce=ae.x<j||ae.x>E||ae.y<M||ae.y>Me?1:0;if(J.colliders[C]=[-1,ce],ae.enabledAndVisible){let[be,k,Z]=[1/0,-1,void 0];for(let{index:K,boundingRect:V}of ae.bboxes){if(V==null)continue;let G=[];if(G=T.queryRect(V).filter(xe=>V.intersects(xe)),ae.shouldCollideWithScreenEdges&&w.forEach(xe=>{V.intersects(xe)&&G.push(xe)}),V.intersects(h)){J.colliders[C]=[-1,ce,V];break}if(G.length<be&&(Z=V,k=K,be=G.length),G.length===0){T.insert(V),J.colliders[C]=[K,D.contains(V)?0:1,V];break}}ae.rank===Mn&&Z!=null&&(T.insert(Z),J.colliders[C]=[k,D.contains(Z)?0:1,Z])}}return J}function Cf(e,r,n,i,t){switch(t){case"top-left":return new F(0,0,n,i);case"top-right":return new F(e-n,0,n,i);case"bottom-left":return new F(0,r-i,n,i);case"bottom-right":return new F(e-n,r-i,n,i);case"center":return new F((e-n)/2,(r-i)/2,n,i);case"top":return new F((e-n)/2,0,n,i);case"bottom":return new F((e-n)/2,r-i,n,i);case"left":return new F(0,(r-i)/2,n,i);case"right":return new F(e-n,(r-i)/2,n,i);default:return new F(0,r-i,n,i)}}function Wd(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?Mn: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=Wd(e.data);self.postMessage(Gd(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId))};})();\n';f();f();f();f();f();function E8(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}f();function I8(e,r){let[t,n]=r;return t>=e.x&&t<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}f();function S8(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}f();function Qu(e,r){for(let t=0;t<r.length;t++)e.push(r[t])}f();var st=class{constructor(r,t,n,o,i){h(this,"x");h(this,"y");h(this,"w");h(this,"h");h(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:E8(this,r)}intersects(r){return S8(this,r)}intersectsPoint(r){return I8(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var da=class e{constructor(r,t){h(this,"topLeft");h(this,"topRight");h(this,"bottomLeft");h(this,"bottomRight");h(this,"divided",!1);h(this,"boundary");h(this,"capacity",16);h(this,"objects",[]);h(this,"parent");this.parent=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 st(r,t,n/2,o/2),this),this.topRight=new e(new st(r+n/2,t,n/2,o/2),this),this.bottomLeft=new e(new st(r,t+o/2,n/2,o/2),this),this.bottomRight=new e(new st(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&&(Qu(t,this.topLeft.queryRect(r)),Qu(t,this.topRight.queryRect(r)),Qu(t,this.bottomLeft.queryRect(r)),Qu(t,this.bottomRight.queryRect(r))),t}queryPoint(r){let t=[];if(this.boundary.intersectsPoint(r))t.push(...this.objects);else return[];return this.divided&&(Qu(t,this.topLeft.queryPoint(r)),Qu(t,this.topRight.queryPoint(r)),Qu(t,this.bottomLeft.queryPoint(r)),Qu(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()}};f();var lC=9,pa=200,iv=10;function C8(e,r,t,n,o,i,a="-1"){var j,N;let u=1/0,l=1/0,c=-1/0,d=-1/0,p=new st(-iv,0,5,t),m=new st(-iv,0,r,5),g=new st(r-5,0,r+iv,t),y=new st(0,t-5,r,t+iv),E=RJ(r,t,n,o,i),b=[p,m,g,y],v=new st(-pa,-pa,r+pa*2,t+pa*2);for(let Z of e){let ie,de;for(let J=0;J<Z.bboxes.length;J++){if(Z.bboxes[J]==null||(ie=Z.bboxes[J].boundingBox,de=Z.bboxes[J].index,Z.lockedToStrategyIndex!==-1&&de!==Z.lockedToStrategyIndex))continue;let[z,X,W,ee]=ie,[ce,ye,Ce,Pe]=[Z.y-z,Z.y+X,Z.x-W,Z.x+ee],Le=Ce,be=ce,He=Pe-Ce,tt=ye-ce;u=Math.min(u,Le)-pa,l=Math.min(l,be)-pa,c=Math.max(c,Le+He)+pa,d=Math.max(d,be+tt)+pa,Z.bboxes[J].boundingRect=new st(Le,be,He,tt)}}let D=new da(new st(u,l,c-u,d-l)),M={msgId:a,colliders:new Array(e.length),staticColliders:[],debug:[]},T=0;for(let Z=0;Z<e.length;Z++){let ie=e[Z];((N=(j=ie.bboxes)==null?void 0:j[0])==null?void 0:N.index)===lC&&(M.staticColliders.push(ie.bboxes[0].boundingRect),D.insert(ie.bboxes[0].boundingRect),T++)}e=e.slice(T,e.length);let B=-pa,G=r+pa,_=-pa,F=t+pa,A;for(let Z=0;Z<e.length;Z++){A=e[Z];let ie=A.x<B||A.x>G||A.y<_||A.y>F?1:0;if(M.colliders[Z]=[-1,ie],A.enabledAndVisible){let[de,J,z]=[1/0,-1,void 0];for(let{index:X,boundingRect:W}of A.bboxes){if(W==null)continue;let ee=[];if(ee=D.queryRect(W).filter(ye=>W.intersects(ye)),A.shouldCollideWithScreenEdges&&b.forEach(ye=>{W.intersects(ye)&&ee.push(ye)}),W.intersects(E)){M.colliders[Z]=[-1,ie,W];break}if(ee.length<de&&(z=W,J=X,de=ee.length),ee.length===0){D.insert(W),M.colliders[Z]=[X,v.contains(W)?0:1,W];break}}A.rank===Tp&&z!=null&&(D.insert(z),M.colliders[Z]=[J,v.contains(z)?0:1,z])}}return M}function RJ(e,r,t,n,o){switch(o){case"top-left":return new st(0,0,t,n);case"top-right":return new st(e-t,0,t,n);case"bottom-left":return new st(0,r-n,t,n);case"bottom-right":return new st(e-t,r-n,t,n);case"center":return new st((e-t)/2,(r-n)/2,t,n);case"top":return new st((e-t)/2,0,t,n);case"bottom":return new st((e-t)/2,r-n,t,n);case"left":return new st(0,(r-n)/2,t,n);case"right":return new st(e-t,(r-n)/2,t,n);default:return new st(0,r-n,t,n)}}f();f();function D8(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?Tp: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 ig=class{constructor(){h(this,"onerror",()=>{});h(this,"onmessage",()=>{});h(this,"postMessage",r=>{let t=D8(r);this.onmessage({data:C8(t.colliders,t.totalWidth,t.totalHeight,t.watermarkWidth,t.watermarkHeight,t.watermarkPosition,t.msgId)})});h(this,"terminate",()=>{})}};var Cm=!1,NJ=150,av=class extends Xe{constructor(t,n,o=!0){super();h(this,"worker");h(this,"debugContext");h(this,"debugCanvas");h(this,"collidersDirty",!0);h(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);h(this,"visibleCollidersQTree",new da(new st(0,0,0,0)));h(this,"interactiveCollidersQTree",new da(new st(0,0,0,0)));h(this,"coreState");h(this,"postMessage");h(this,"showCollisionBoxes",()=>{Cm=!0,this.debugCanvas.style.display="block"});h(this,"hideCollisionBoxes",()=>{Cm=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"});h(this,"currentMsgId","");h(this,"working",!1);h(this,"_postMessage",()=>{this.worker.postMessage(this.packedMessage)});h(this,"componentArray",[]);h(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 p of this.coreState.geometry2DsInScene)d=p.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,p)=>p.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,lC]],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],p=d.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]=p.bboxes,this.packedMessage[0][l][1]=p.enabled&&d.visible&&!d.isOccluded?1:0,this.packedMessage[0][l][2]=p.rank===Tp?1:0,this.packedMessage[0][l][3]=p.x,this.packedMessage[0][l][4]=p.y,this.packedMessage[0][l][5]=p.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][l][6]=p.lockedToStrategyIndex}l++,c++}this.working||this.postMessage()});h(this,"resolve",t=>{if(this.working=!1,this.collidersDirty||!t.data)return;let n=t.data.colliders,o=-1,i,a,u,l=new st(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new da(l),this.interactiveCollidersQTree=new da(l),Cm)for(let c of t.data.staticColliders)this.visibleCollidersQTree.insert(new st(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 p=d.offscreen,m=n[c][1]===1;d.offscreen=m,o!==-1&&i!=null?(u=new st(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||p&&!m)&&"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))}Cm&&this.drawDebug(),this.publish("visibility-changed")});h(this,"drawDebug",()=>{Cm&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))});h(this,"destroy",()=>{this.worker.terminate()});this.worker=o===!1?new ig:Bd!==""?new Worker(Bd):new Worker(URL.createObjectURL(new Blob([x8],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new ig,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=Sp(this._postMessage,NJ),Cm?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}};f();f();f();f();var sv=class{constructor(r){h(this,"type");h(this,"event");this.type=0,this.event=r}get timestamp(){return this.event.timeStamp}},uv=class{constructor(){h(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()}};f();function dC(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 Tr&&n.type==="group-container"&&n.visible&&n.components[0]&&r.add(n)}return Array.from(r)}var ag=class extends Xe{constructor(t,n,o,i,a){super();h(this,"raycaster",new wl);h(this,"state",{hovered3DEntity:void 0,hovered2DEntities:new Set,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});h(this,"coreState");h(this,"camera");h(this,"worldPlane");h(this,"_quadtree",new da(new st(0,0,0,0)));h(this,"_container");h(this,"lastPointerEvent");h(this,"cursor","grab");h(this,"touchesCount",0);h(this,"isUserMovingCamera");h(this,"hasTouched",!1);h(this,"onPointerMove",Sp(t=>{t&&(t.preventDefault(),this.updateInteractionStateIfPanning(t),(t.pointerType!=="touch"||t.pointerType===void 0&&this.hasTouched)&&this.handleHover(t),this.handleCursor())},x.env.NODE_ENV==="test"?0:16,{leading:!0}));h(this,"tapsControl",new uv);h(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 sv(t)),this.touchesCount=Math.max(0,this.touchesCount+1)))});h(this,"clickTimeout");h(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())});h(this,"dirty3D",!0);h(this,"cachedHitBoxes",{entities:[]});h(this,"ndcPoint",new ct);h(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(cn.GEOMETRY);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=dC(n)),o}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(t){let n=t||this.lastPointerEvent;if((n==null?void 0:n.pointerType)==="touch"||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=GJ(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 D,M,T,B,G,_,F;let{offsetX:n,offsetY:o}=t,i=[n,o],u=this._quadtree.queryPoint(i).filter(A=>A.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=(D=l[0])==null?void 0:D.point,d=[],p=[],m=[];for(let A of l){if(["worldPlane","hole-fill-mesh"].includes(A.object.name)||!(A.object instanceof rt)||((M=A.object.material)==null?void 0:M.colorWrite)===!1)continue;let j=(T=A.object.userData)==null?void 0:T.entityId;if(j){let N=this.coreState.geometry3DMap.get(j),Z=N==null?void 0:N.components[7];if((Z==null?void 0:Z.verticalOffset)!=null&&A.point.z>Z.verticalOffset)continue}m.push(A),A.object.material.depthTest===!1?d.push(A):p.push(A)}let g=(G=(B=d[0])!=null?B:p[0])!=null?G:void 0,y,E;if(g!=null){let A=(_=g==null?void 0:g.instanceId)!=null?_:g==null?void 0:g.batchId;y=A!=null&&(g!=null&&g.object.userData.entities)?this.coreState.geometry3DMap.get(g==null?void 0:g.object.userData.entities[A]):this.coreState.geometry3DMap.get(g==null?void 0:g.object.userData.entityId),y!=null&&y.components[2]&&(E=y)}let b=dC(m),v=[];for(let A of u)if(((F=A==null?void 0:A.userData)==null?void 0:F.entityId)==="watermark")v.push({id:"watermark"});else{let j=this.coreState.geometry2DMap.get(A==null?void 0:A.userData.entityId);j&&v.push(j)}return zJ(v),{entity2D:v,entity3D:E,position:c,groupContainers:b.length>0?b:void 0}}detect3DEntityHover(t){return this.state.lastHover!==t&&(this.state.lastHover&&w8(this.state.lastHover,!1,this.coreState),t&&w8(t,!0,this.coreState)),this.state.hovered3DEntity!==t}detect3DContainerHover(t){return!ZD(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 w8(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 GJ(e,r,t){return r?"grabbing":e?"pointer":t?"grabbing":"grab"}function zJ(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]}f();f();f();var A8=new qt;function sg(e,r=!0){var d,p;let t=new Tl,n=(d=e.mesh)==null?void 0:d.geometry;if(!n||!((p=e.batchedProps)!=null&&p.range))return;let o=e.batchedProps.range,i=o.start,a=o.count,u=n.getAttribute("position");if(u){let m=new Float32Array(a*3);for(let g=0;g<a;g++){let y=i+g;m[g*3]=u.array[y*3],m[g*3+1]=u.array[y*3+1],m[g*3+2]=u.array[y*3+2]}t.setAttribute("position",new Wo(m,3))}let l=n.getAttribute("normal");if(l){let m=new Float32Array(a*3);for(let g=0;g<a;g++){let y=i+g;m[g*3]=l.array[y*3],m[g*3+1]=l.array[y*3+1],m[g*3+2]=l.array[y*3+2]}t.setAttribute("normal",new Wo(m,3))}let c=n.getAttribute("uv");if(c){let m=new Float32Array(a*2);for(let g=0;g<a;g++){let y=i+g;m[g*2]=c.array[y*2],m[g*2+1]=c.array[y*2+1]}t.setAttribute("uv",new Wo(m,2))}if(n.index){let m=n.index,g=new Uint32Array(a);for(let y=0;y<a;y++)g[y]=m.array[i+y];t.setIndex(new Wo(g,1))}if(r&&e.instanceIndex!==-1&&e.mesh)try{e.mesh.getMatrixAt(e.instanceIndex,A8),t.applyMatrix4(A8)}catch(m){V.error(m)}return t}function P8(e,r,t){let n=sg(e,!1);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}function _8(e,r){if(r===0)return;let t=e.getAttribute("position");for(let n=0;n<t.count;n++)t.setZ(n,t.getZ(n)+r);t.needsUpdate=!0}var kd,pc,lv,Dm,O8,lg,cv,F8,dv,pv,cg,dg,fv,ug=class{constructor(r){w(this,Dm);w(this,kd,null);w(this,pc);h(this,"getCurrentSceneGLTF",async r=>{let t=k({onlyVisible:!0,binary:!0,light:!0,scale:1},r),n=await se(this,Dm,O8).call(this),o=s(this,lv).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});w(this,lv,r=>{let{scale:t,light:n,onlyVisible:o}=r,i=new cu,a=new Nr().setFromObject(s(this,pc).geometryScene);if(s(this,lg).call(this,s(this,pc).geometryScene,i,o),n){let u=new a1(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});w(this,lg,(r,t,n)=>{r.material&&r instanceof r1&&se(this,Dm,F8).call(this,r).forEach(o=>t.add(o)),r.children.forEach(o=>{(!n||o.visible)&&s(this,lg).call(this,o,t,n)})});w(this,cv,(r,t,n)=>{let o=new vh({color:new mt(r),metalness:0});return o.opacity=t,o.transparent=n,o});w(this,dv,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,pv).call(this,l,c),s(this,dg).call(this,o,u,i,a),d&&s(this,fv).call(this,d),n!=null&&n.map&&t.type==="PlaneGeometry"&&(r.side=hs),r});w(this,pv,(r,t)=>{let n=new Ie,o=new Ie;for(let i=0;i<r.count;i++)n.fromBufferAttribute(r,i),s(this,cg).call(this,n),r.setXYZ(i,n.x,n.y,n.z),t&&(o.fromBufferAttribute(t,i),s(this,cg).call(this,o),t.setXYZ(i,o.x,o.y,o.z))});w(this,cg,r=>{let t=r.y;r.y=r.z,r.z=-t});w(this,dg,(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 uu)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)}});w(this,fv,r=>{for(let t=0;t<r.count;t++){let n=r.getX(t),o=r.getY(t);r.setXY(t,n,o)}});O(this,pc,r)}destroy(){O(this,kd,null)}};kd=new WeakMap,pc=new WeakMap,lv=new WeakMap,Dm=new WeakSet,O8=async function(){if(!s(this,kd)){let{GLTFExporter:r}=await import("./GLTFExporter-T4HNKLW3.js");O(this,kd,new r)}return s(this,kd)},lg=new WeakMap,cv=new WeakMap,F8=function(r){var u,l;let t=[],o=((u=r.userData)!=null&&u.entities?Object.values((l=r.userData)==null?void 0:l.entities):[]).map(c=>s(this,pc).geometry3DMap.get(c)),i=new Map;r.updateWorldMatrix(!0,!1);let a=new Ie;return r.getWorldPosition(a),o.forEach(c=>{var y;if(!c||!(c instanceof Jt))return;let d=c.components[1],p=c.components[2];if(!d.visible||d instanceof xs&&d.opacity===0||d instanceof Dh||d instanceof y1)return;let m=p!=null&&p.hover?d.hoverColor||s(this,pc).hoverColor:d.color,g="".concat(m,"-").concat(d.opacity,"-").concat(Number(d.visible));i.has(g)||i.set(g,[]),(y=i.get(g))==null||y.push(c)}),i.forEach((c,d)=>{let[p,m,g]=d.split("-"),y=c.reduce((D,M)=>{if(M.type==="custom-geometry")return D;let T=M.components[0];if("geometry"in T&&T.geometry instanceof Tl){let B=T.geometry.clone();_8(B,a.z),D.push(B)}else if(T instanceof dn&&T.batchedProps){let B=sg(T);B&&(_8(B,a.z),D.push(B))}return D},[]);if(y.length===0){V.error("No geometries found for batched mesh");return}let E=s(this,cv).call(this,p,Number(m),r.material.transparent),b=Gi(y,!0);if(!b){V.error("No merged geometry found for batched mesh");return}let v=new rt(b,E);v.position.copy(r.position),v.rotation.copy(r.rotation),v.scale.copy(r.scale),v.visible=!!g,s(this,dg).call(this,v.position,v.scale,v.rotation,v.quaternion),t.push(s(this,dv).call(this,v))}),t},dv=new WeakMap,pv=new WeakMap,cg=new WeakMap,dg=new WeakMap,fv=new WeakMap;f();f();var $J="gray",VJ=.1,pg=100,pC=new vs.ClipperOffset;function HJ(e,r){pC.Clear(),r/=2;let t=e.map(o=>({X:o.x*pg,Y:o.y*pg}));pC.AddPath(t,vs.JoinType.jtMiter,vs.EndType.etClosedPolygon);let n=new vs.Paths;return pC.Execute(n,r*pg),n.length?n.map(i=>i.map(a=>({x:a.X/pg,y:a.Y/pg}))):[e]}function hv(e,r,t){var g,y,E,b,v;let{color:n=$J,opacity:o=1,altitude:i=0,height:a=VJ}=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(D=>{let M=r(D[1],D[0]);return u.min.x=Math.min(u.min.x,M.x),u.min.y=Math.min(u.min.y,M.y),u.max.x=Math.max(u.max.x,M.x),u.max.y=Math.max(u.max.y,M.y),M});((y=(g=e.properties)==null?void 0:g.style)==null?void 0:y.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((E=e.properties)==null?void 0:E.image)!=null?c=HJ(c,((v=(b=e.properties)==null?void 0:b.style)==null?void 0:v.edgeOffset)||0):c=[c];let d=[];for(let D of c){let M=new xp;M.moveTo(D[0].x,D[0].y),D.slice(1).forEach(_=>M.lineTo(_.x,_.y)),M.lineTo(D[0].x,D[0].y);let T=e.geometry.coordinates.slice(1);M.holes=T.map(_=>{let F=_.map(j=>r(j[1],j[0])),A=new vp;return A.moveTo(F[0].x,F[0].y),F.slice(1).forEach(j=>A.lineTo(j.x,j.y)),A.lineTo(F[0].x,F[0].y),A});let B=Ch(t==null?void 0:t.bevel,a),G=new Ep(M,B);G.userData={style:{color:n,opacity:o},usedBevelSettings:B},d.push(G)}if(d.length===1)return d[0];let p=Gi(d);d.forEach(D=>D.dispose());let m=Ch(t==null?void 0:t.bevel,a);return p.userData={style:{color:n,opacity:o},usedBevelSettings:m,_split:!0},p}f();var ZJ="gray",WJ=.1;function gv(e,r,t){let{color:n=ZJ,opacity:o=1,altitude:i=0,height:a=WJ}=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=Ch(t==null?void 0:t.bevel,a),c=[];e.geometry.coordinates.forEach(p=>{let m=new xp,g=p[0].map(b=>{let v=r(b[1],b[0]);return u.min.x=Math.min(u.min.x,v.x),u.min.y=Math.min(u.min.y,v.y),u.max.x=Math.max(u.max.x,v.x),u.max.y=Math.max(u.max.y,v.y),v});m.moveTo(g[0].x,g[0].y),g.slice(1).forEach(b=>m.lineTo(b.x,b.y)),m.lineTo(g[0].x,g[0].y);let y=p.slice(1);m.holes=y.map(b=>{let v=b.map(M=>r(M[1],M[0])),D=new vp;return D.moveTo(v[0].x,v[0].y),v.slice(1).forEach(M=>D.lineTo(M.x,M.y)),D.lineTo(v[0].x,v[0].y),D});let E=new Ep(m,l);c.push(E)});let d=Gi(c);return c.forEach(p=>p.dispose()),d.userData={style:{color:n,opacity:o},usedBevelSettings:l},d}f();var Bo=100,XJ=.22,YJ=.01;function B8(e,r,t={}){let{width:n=XJ,height:o=YJ,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 vs.ClipperOffset,p=e.geometry.coordinates.map(E=>E.map(b=>r(b[1],b[0])));d.AddPaths(p.map(E=>E.map(b=>({X:b.x*Bo,Y:b.y*Bo}))),vs.JoinType.jsMiter,vs.EndType.etOpenRound);let m=new vs.PolyTree;d.Execute(m,n/2*Bo);let g=[];for(let E of m.m_AllPolys){let b=new xp;if(E.IsHole())continue;l.min.x=Math.min(l.min.x,E.m_polygon[0].X),l.min.y=Math.min(l.min.y,E.m_polygon[0].Y),l.max.x=Math.max(l.max.x,E.m_polygon[0].X),l.max.y=Math.max(l.max.y,E.m_polygon[0].Y);let v=E.m_polygon;b.moveTo(v[0].X/Bo,v[0].Y/Bo),v.slice(1).forEach(D=>b.lineTo(D.X/Bo,D.Y/Bo)),b.lineTo(v[0].X/Bo,v[0].Y/Bo),b.holes=E.m_Childs.map(D=>{let M=new vp,T=D.m_polygon;return M.moveTo(T[0].X/Bo,T[0].Y/Bo),T.slice(1).forEach(B=>M.lineTo(B.X/Bo,B.Y/Bo)),M.lineTo(T[0].X/Bo,T[0].Y/Bo),M}),g.push(new Ep(b,c))}let y=Gi(g);return y.translate(0,0,u||0),y.userData={style:{color:i,opacity:a}},d.Clear(),y}function qJ(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 yv=class extends Xe{constructor(t,n){super();h(this,"state");h(this,"convertTo3DMapPosition");this.state=t,this.convertTo3DMapPosition=n}createEntityFromFeature(t,n,o){var d,p,m,g,y;let i=new dn(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=k(k({},a),u):a&&(l=a);let c=new Jt(i,new xs(oe(k({},o),{url:(m=(p=n.properties)==null?void 0:p.image)==null?void 0:m.path,bevel:l})));if(o!=null&&o.outline){let E=(g=this.state.outlinesOptions)==null?void 0:g.darkenFactor;c.components[3]=new B5(N5(o.color,E))}return o!=null&&o.focusable&&(c.components[4]=new V5),((y=n.properties)==null?void 0:y.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?c.components[6]=new jc(n.properties.textures.find(E=>E.face==="side"),n.properties.textures.find(E=>E.face==="top")):(o!=null&&"texture"in o&&o.texture!=null||o!=null&&"topTexture"in o&&o.topTexture!=null)&&(c.components[6]=new jc(o.texture,o.topTexture)),c.id=t,c}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}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 dn&&(o=a.components[0].feature,i=a.components[1],o.geometry.type==="Polygon"?(n=hv(o,this.convertTo3DMapPosition,i),(u=o.properties)!=null&&u.textures&&o.properties.textures.length>0&&j5(n,o.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(a,n)):o.geometry.type==="MultiPolygon"?(n=gv(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="LineString"?(n=pT(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="MultiLineString"&&(n=B8(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 Qn&&o.userData.dirty&&!o.userData.modelURL){try{this.populateEntityGroup(o.userData.entities3D)}catch(u){V.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=qJ(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=R5(a[u].entities,a[u].style);l.layers.enable(Yo.SHOULD_CAST_SHADOWS),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,o.userData.localCenter=void 0}}return Promise.resolve()}};f();var bv=class{constructor(r,t){h(this,"state");h(this,"dirty",!0);h(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 bu&&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}}};f();var vv=class{constructor(r,t){h(this,"state");h(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 Jt)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}}};f();f();f();var JJ=(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}}})(),k8=({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}=JJ(n);l.font=u;let c=[],d=e.split(" "),p=0,m=0,g=0;for(;m<d.length;){let v=d[m];if(p===o&&p>0){c[p-1]+="...";break}if(c[p]==null&&(c[p]=v,m++),d.length===1){c[p]=v;break}if(d[m]==null)break;let{width:D}=l.measureText(c[p]+" "+d[m]);D<=t*n?(c[p]+=" "+d[m],m++):p++}c.forEach(v=>{let{width:D}=l.measureText(v);g=Math.max(D,g)});let y=r*n*i,E=c.length*y;return{maxWidth:g,maxHeight:E,lines:c.length,draw:(v,D,M)=>{c.length===1?(a.strokeText&&v.strokeText(c[0],D,M),v.fillText(c[0],D,M)):(a.strokeText&&(v.strokeText(c[0],D,M-y/2),v.strokeText(c[1],D,M+y/2)),v.fillText(c[0],D,M-y/2),v.fillText(c[1],D,M+y/2))}}};f();function L8(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}f();var KJ=(()=>{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}}})(),R8=KJ.getDeviceType,N8=(()=>{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=R8().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(!R8().isWindows)return!1;if(t!==void 0)return t;let i=(u=(a=QJ())==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}}})(),QJ=N8.getInfo,xv=N8.shouldDisableOffscreenCanvas;var Ev=class extends Xe{constructor(t,n,o){super();h(this,"dirty",!1);h(this,"state");h(this,"colliderContext");h(this,"colliderCanvas");h(this,"transformRequestFunc");h(this,"transformRequest",async t=>this.transformRequestFunc?await this.transformRequestFunc(t):{url:t});h(this,"pinCache",{});h(this,"imageCache",{});h(this,"imagePromiseCache",{});h(this,"imageDimensionsCache",{});h(this,"textCache",{});h(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 yu&&!d.disposed){if(c=d.components[0],l=c.appearance.iconVisible,c.appearance.icon!=null&&l!=null){let m=typeof l=="boolean"?l:t>=l;m!==c.iconVisible&&(c.iconVisible=m,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=oE(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:m,width:g,height:y}=this.processText(c.text,c.appearance.textSize,c.appearance.maxWidth,c.appearance.maxLines,c.appearance.lineHeight);["left","center","right"].forEach(E=>{this.textCache[c.id][E]=this.textToCanvas(m,c.appearance.textSize,E,g,y,c.appearance.textColor,c.appearance.textOutlineColor)}),c.dimensions={width:Math.ceil(g/n),height:Math.ceil(y/n)}}let p=1;if(c.appearance.iconScale)if(typeof c.appearance.iconScale=="number")p=c.appearance.iconScale;else{let{on:m,input:g,output:y,easing:E}=c.appearance.iconScale;m==="zoom-level"?p=oE(r5(t,g,y,E!=null?E:"linear")):V.warn("Unsupported interpolation property: ".concat(m))}c.recomputeCurrentStrategy(c.iconVisible?p:1),c.canShow&&(c.enabled||c.visibilityNeedsUpdate!==!1)&&this.draw(c,o,this.colliderContext),c.textDirty=!1,c.pinDirty=!1}this.dirty=!1});h(this,"processText",(t,n,o,i,a)=>{let u=this.state.pixelRatio,{draw:l,maxWidth:c,maxHeight:d}=k8({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}});h(this,"textToCanvas",(t,n,o,i,a,u,l)=>{let c=this.state.pixelRatio,d,p=i,m=a;window.OffscreenCanvas!=null&&!xv()?d=new OffscreenCanvas(p,m):(d=document.createElement("canvas"),d.width=p,d.height=m,d.style.width=p+"px",d.style.height=m+"px");let g=d.getContext("2d",{willReadFrequently:!0});if(!g)return;let y=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=y,g.fillStyle=u,g.strokeStyle=l;let E=o==="left"?y/2:o==="center"?p/2:p-y/2;return t(g,E,(m+y/2)/2),d});h(this,"cacheImage",t=>{if(!t.appearance.icon)return;let n=D5(t.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(o=>{this.transformRequest(t.appearance.icon).then(i=>{let a=L8(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}))});h(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});h(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 p=this.imageCache[t.imageHash],m=(t.scaledPinSize-t.scaledIconPadding)*i,g=t.appearance.iconFit,y=m,E=m,b="".concat(t.imageHash,"_").concat(g);if(this.imageDimensionsCache[b])y=this.imageDimensionsCache[b].width,E=this.imageDimensionsCache[b].height;else{let v=p.width*i,D=p.height*i;if(g==="contain"){let M=Math.sqrt(v**2+D**2),T=m/M;y=v*T,E=D*T}if(g==="cover"){let M=m/v,T=m/D,B=Math.max(M,T);y=v*B,E=D*B}}o.save(),o.beginPath(),o.arc(a,u,m/2,0,2*Math.PI),o.closePath(),((d=t==null?void 0:t.appearance)==null?void 0:d.iconOverflow)!=="visible"&&o.clip(),o.drawImage(p,a-y/2,u-E/2,y,E),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()}};f();var Iv=new Nr,j8=new Ie;function oK(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 Sv=class{constructor(r,t,n){h(this,"state");h(this,"transparencyChanged",!1);h(this,"convertTo3DMapPosition");h(this,"convert3DMapPositionToCoordinate");h(this,"endFrame",()=>{this.transparencyChanged=!1});this.convertTo3DMapPosition=t,this.convert3DMapPositionToCoordinate=n,this.state=r}determineTextureVisiblity(r,t,n){let o=Th(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,p,m,g,y,E,b,v,D,M,T,B,G;let r,t;for(let _ of this.state.geometry3DsInScene)if((_.type==="geometry"||_.type==="custom-geometry")&&((n=_.components[1])!=null&&n.dirty||(o=_.components[2])!=null&&o.dirty)){let F=_.components[0],A=_.components[1];t=_.components[2];let j=oK(_,this.state.hoverColor);F.setColor(j[0],j[1]);let N=Th(F);if(A.visible!==F.visible&&(F.visible=A.visible,F instanceof dn&&F.textMesh)){let ie=this.state.geometry3DMap.get(F.textMesh.userData.entityId);(ie==null?void 0:ie.type)==="text3d"&&ie.components[0].polygonEntityId!=null&&(ie.components[0].visible=A.visible)}A.altitude!==F.altitude&&(F.altitude=A.altitude);let Z=A.opacity*wp(_);if(N&&F.mesh&&F.type==="geometry"&&Z!==F.opacity){if(N.opacity=Z,N.transparent=Z<1,F.imageMesh){let ie=Array.isArray(F.imageMesh.material)?F.imageMesh.material:[F.imageMesh.material];for(let de of ie)de.opacity=Z}Z===0?(F.mesh.layers.disable(Yo.SHOULD_CAST_SHADOWS),this.transparencyChanged=!0):F.opacity===0&&Z!==0&&(F.mesh.layers.enable(Yo.SHOULD_CAST_SHADOWS),this.transparencyChanged=!0),F.opacity=Z}if(A.renderOrder!==F.renderOrder&&(F.renderOrder=A.renderOrder),N&&L5(N,A.side,Z),N&&(A.overlayColor!==void 0&&!JD(A.overlayColor,N.getOverlay().color)||A.overlayStrength!==N.getOverlay().strength)&&N.setOverlay(A.overlayColor,A.overlayStrength),F instanceof dn&&A.shading!=null&&(((i=A.shading)==null?void 0:i.start)!==(N==null?void 0:N.getGradientShading().start)||((a=A.shading)==null?void 0:a.end)!==(N==null?void 0:N.getGradientShading().end)||((u=A.shading)==null?void 0:u.intensity)!==(N==null?void 0:N.getGradientShading().intensity))&&(N==null||N.setGradientShading((c=(l=A.shading)==null?void 0:l.start)!=null?c:0,(p=(d=A.shading)==null?void 0:d.end)!=null?p:0,(g=(m=A.shading)==null?void 0:m.intensity)!=null?g:0)),A.dirty=!1,F instanceof dn){let ie=_.components[6];ie instanceof jc&&this.determineTextureVisiblity(F,ie,t)}_.components[2]&&(_.components[2].dirty=!1)}else if((_==null?void 0:_.type)==="image"&&((y=_.components[1])!=null&&y.dirty)){r=_.components[0];let F=_.components[1];F.visible!==r.visible&&(r.visible=F.visible),F.dirty=!1}else if((_==null?void 0:_.type)==="text3d"&&((E=_.components[1])!=null&&E.dirty)){r=_.components[0];let F=_.components[1],A=r.polygonEntityId!=null;F.visible!=null&&F.visible!==r.visible&&(r.visible=F.visible);let{textMesh:j}=r;if(j)if(Object.assign(j,F.getState()),A){let N=(b=F.hoverColor)!=null?b:this.state.text3dHoverColor;j.color=F.hoverByPolygon?N:(v=F.color)!=null?v:xu.color,j.outlineColor=F.hoverByPolygon?N:(D=F.outlineColor)!=null?D:xu.outlineColor,j.strokeColor=F.hoverByPolygon?N:(M=F.strokeColor)!=null?M:xu.strokeColor}else j.color=(T=F.color)!=null?T:xu.color,j.outlineColor=(B=F.outlineColor)!=null?B:xu.outlineColor,j.strokeColor=(G=F.strokeColor)!=null?G:xu.strokeColor;F.dirty=!1}else if((_==null?void 0:_.type)==="geometry-group"&&(_==null?void 0:_.userData.dirty)===!1&&(_!=null&&_.userData.positionDirty)){let F=_;if(F.userData.localCenter||(Iv.makeEmpty(),Iv.setFromObject(F),du(Iv)&&(Iv.getCenter(j8),F.userData.localCenter=j8.clone())),!F.userData.centroid&&F.userData.localCenter){let A=this.convert3DMapPositionToCoordinate(F.userData.localCenter);F.userData.centroid=[A[0],A[1]]}if(F.userData.centroid&&F.userData.localCenter){let A=this.convertTo3DMapPosition(F.userData.centroid);F.position.x+=A.x-F.userData.localCenter.x,F.position.y+=A.y-F.userData.localCenter.y,F.userData.localCenter.set(A.x,A.y,F.userData.localCenter.z),F.userData.positionDirty=!1}}}};f();var Cv=class extends Xe{constructor(t){super();h(this,"state");h(this,"animating",new Map);h(this,"isAnimating",!1);h(this,"startTime",-1);h(this,"showDuration",300);h(this,"hideDuration",250);h(this,"update",()=>{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 yu&&(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")});h(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=Lc(u,0,1,o,i,i===0?QD:e5),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")}};f();var Dv=class extends Xe{constructor(t,n,o,i,a,u,l){super();h(this,"state");h(this,"renderer");h(this,"mode");h(this,"scene");h(this,"cameraObject");h(this,"viewCamera");h(this,"systems");h(this,"needs2DRecompute",!1);h(this,"twoDdirty",!0);h(this,"threeDdirty",!0);h(this,"frameId",null);h(this,"twoDFrameId",null);h(this,"animationFrameId",null);h(this,"nextFrame",null);h(this,"updateEntitiesFrameId",null);h(this,"update",(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()})})});h(this,"animate2D",()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})});h(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())})});h(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()})});h(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(),S5(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.twoDdirty=!1),this.threeDdirty&&(this.state.geometry3DIdsInScene.clear(),this.state.geometry3DsInScene.clear(),this.state.geometryGroupIdsToLoad.clear(),I5(this.state.geometryScene,this.state.geometry3DMap,this.state.geometry3DIdsInScene,this.state.geometry3DsInScene,this.state.geometryGroupIdsToLoad),this.systems.interactionSystem.dirty3D=!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);let o=this.systems.modelSystem.update();o&&t.push(o),this.systems.borderSystem.update(),this.systems.meshDetachmentSystem.update(),this.systems.meshModificationSystem.update(),this.systems.renderOrderSystem.update(),this.systems.clippingPlaneSystem.update(),this.systems.imageSystem.update(this.systems.cameraSystem.getRotation(),this.systems.cameraSystem.isCameraMoving(),this.systems.cameraSystem.lastCameraStoppedMovingTime()),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 i=this.needs2DRecompute;return this.nextFrame=requestAnimationFrame(()=>{this.nextFrame=null,this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height,this.systems.watermarkSystem.options.position,!i&&this.systems.cameraSystem.isCameraMoving(),this.systems.imageSystem.currentImageScreenBBoxes)}),this.systems.textureSystem.update(),this.systems.pluginSystem.update(this.state),this.systems.drawSystem.update(),this.systems.geometryDisposalSystem.update(),this.systems.maskingSystem.update(),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1,this.systems.cameraSystem.rotationDirty=!1,this.systems.shadowsSystem&&((this.systems.modelSystem.transparencyChanged||this.systems.drawSystem.transparencyChanged)&&(this.systems.shadowsSystem.needsRender=!0),this.systems.shadowsSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.getPedestal())),this.systems.modelSystem.endFrame(),this.systems.drawSystem.endFrame(),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 n;if(!((n=this.renderer)!=null&&n.renderer))return;this.mode==="standalone"&&this.renderer.clear();let t=!this.state.useStandaloneCamera&&this.mode!=="standalone";t&&(this.viewCamera.matrixWorld.copy(this.cameraObject.matrixWorld),this.viewCamera.matrixWorldInverse.copy(this.cameraObject.matrixWorldInverse),this.viewCamera.projectionMatrix.multiply(this.cameraObject.matrixWorld)),this.renderer.renderFullScene(this.scene,t?this.viewCamera:this.cameraObject),t&&(this.viewCamera.projectionMatrix.multiply(this.cameraObject.matrixWorldInverse),this.viewCamera.matrixWorldInverse.identity())}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()}};f();import{z as ot}from"zod";f();import{z as Tv}from"zod";var Tm=Tv.object({type:Tv.enum(["Point"]),coordinates:Tv.array(Tv.number()).min(2).max(3)});var iK=ot.object({interactive:ot.boolean().optional(),id:ot.string().optional(),width:ot.union([ot.number(),ot.object({on:ot.literal("zoom-level").optional(),input:ot.array(ot.number()).nonempty(),output:ot.array(ot.number()).nonempty(),easing:ot.string().optional()})]).optional(),accentColor:ot.string().optional(),displayArrowsOnPath:ot.boolean().optional(),animateArrowsOnPath:ot.boolean().optional(),visibleThroughGeometry:ot.boolean().optional(),dashed:ot.boolean().optional(),smoothingTension:ot.number().optional(),smoothingCornerRadius:ot.number().optional(),dashLength:ot.number().optional(),dashGap:ot.number().optional(),dashRelativeToWidth:ot.boolean().optional(),dashSize:ot.number().optional(),gapSize:ot.number().optional(),dashAbsolute:ot.boolean().optional(),dashMeters:ot.number().optional(),gapMeters:ot.number().optional(),__EXPERIMENTAL_GEOMETRY:ot.enum(["tube","ribbon"]).optional(),__EXPERIMENTAL_ENDCAP_EXTENSION:ot.tuple([ot.number(),ot.number()]).optional(),__EXPERIMENTAL_BILLBOARDING:ot.boolean().optional(),__EXPERIMENTAL_BORDER:ot.object({enabled:ot.boolean(),color:ot.string(),width:ot.number().optional()}).optional(),__EXPERIMENTAL_PREVENT_SELF_OVERLAP:ot.boolean().optional()}),aK=ot.object({type:ot.enum(["Feature"]),geometry:Tm,properties:ot.object({parentId:ot.any().optional()})});function U8(e,r){ot.object({features:ot.array(aK)}).parse(e),iK.parse(r)}var fg,fc=class{constructor(r,t){h(this,"type","path");h(this,"mesh",new mi);h(this,"material");h(this,"geometry");h(this,"outline");h(this,"feature");h(this,"options");h(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});h(this,"breakpoint",0);h(this,"altitudeBreakpoints");h(this,"accentColor","blue");h(this,"completeFraction",1);h(this,"altitudeAdjustment",1);h(this,"displayArrowsOnPath",!1);h(this,"animateArrowsOnPath",!1);h(this,"visibleThroughGeometry",!1);h(this,"highlightStartFraction",0);h(this,"highlightEndFraction",0);h(this,"highlightCompleteFraction",1);h(this,"highlightWidthMultiplier",1.1);h(this,"highlightColor","red");h(this,"xrayOpacity",.25);h(this,"dashed",!1);h(this,"smoothingTension",Ui.tension);h(this,"smoothingCornerRadius",Ui.cornerRadius);h(this,"dashLength",.1);h(this,"dashGap",.1);h(this,"dashRelativeToWidth",!1);h(this,"dashSize",3);h(this,"gapSize",2);h(this,"dashAbsolute",!1);h(this,"dashMeters",1);h(this,"gapMeters",.5);h(this,"__EXPERIMENTAL_GEOMETRY","tube");h(this,"__EXPERIMENTAL_ENDCAP_EXTENSION",[.5,.5]);h(this,"__EXPERIMENTAL_BILLBOARDING",!1);h(this,"__EXPERIMENTAL_BORDER");h(this,"__EXPERIMENTAL_PREVENT_SELF_OVERLAP",!1);h(this,"isVertical",!1);h(this,"dirty",!0);h(this,"materialDirty",!0);h(this,"position",new Ie);w(this,fg,0);var n,o,i,a,u,l,c,d,p,m,g,y,E,b,v,D,M,T,B,G,_;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:Ui.tension,this.smoothingCornerRadius=(p=t==null?void 0:t.smoothingCornerRadius)!=null?p:Ui.cornerRadius,this.dashLength=(m=t==null?void 0:t.dashLength)!=null?m:this.dashLength,this.dashGap=(g=t==null?void 0:t.dashGap)!=null?g:this.dashGap,this.dashRelativeToWidth=(y=t==null?void 0:t.dashRelativeToWidth)!=null?y:this.dashRelativeToWidth,this.dashSize=(E=t==null?void 0:t.dashSize)!=null?E:this.dashSize,this.gapSize=(b=t==null?void 0:t.gapSize)!=null?b:this.gapSize,this.dashAbsolute=(v=t==null?void 0:t.dashAbsolute)!=null?v:this.dashAbsolute,this.dashMeters=(D=t==null?void 0:t.dashMeters)!=null?D:this.dashMeters,this.gapMeters=(M=t==null?void 0:t.gapMeters)!=null?M:this.gapMeters,this.__EXPERIMENTAL_GEOMETRY=(T=t==null?void 0:t.__EXPERIMENTAL_GEOMETRY)!=null?T:"tube",this.__EXPERIMENTAL_ENDCAP_EXTENSION=(B=t==null?void 0:t.__EXPERIMENTAL_ENDCAP_EXTENSION)!=null?B:[.5,.5],this.__EXPERIMENTAL_BILLBOARDING=(G=t==null?void 0:t.__EXPERIMENTAL_BILLBOARDING)!=null?G:!1,this.__EXPERIMENTAL_BORDER=t==null?void 0:t.__EXPERIMENTAL_BORDER,this.__EXPERIMENTAL_PREVENT_SELF_OVERLAP=(_=t==null?void 0:t.__EXPERIMENTAL_PREVENT_SELF_OVERLAP)!=null?_:!1}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,fg)}set altitude(r){this.mesh&&(this.mesh.position.z=r,O(this,fg,r))}set complete(r){this.material&&(this.material.uniforms.complete.value=r,this.material.needsUpdate=!0)}};fg=new WeakMap;f();f();f();var fa=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-fa.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?fa.Bounce.In(e*2)*.5:fa.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}}}}),mg=function(){return performance.now()},Mv=(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=mg()),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})(),Mm={Linear:function(e,r){var t=e.length-1,n=t*r,o=Math.floor(n),i=Mm.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=Mm.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=Mm.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=Mm.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}}},G8=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),mC=new Mv,Xa=(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=fa.Linear.None,this._interpolationFunction=Mm.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=G8.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=mC,mC.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=mg()),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 p=n[a];if(p.length===0)continue;for(var m=[u],g=0,y=p.length;g<y;g+=1){var E=this._handleRelativeValue(u,p[g]);if(isNaN(E)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(E)}d&&(n[a]=m)}if((c==="object"||l)&&u&&!d){t[a]=l?[]:{};var b=u;for(var v in b)t[a][v]=b[v];o[a]=l?[]:{};var p=n[a];if(!this._isDynamic){var D={};for(var v in p)D[v]=p[v];n[a]=p=D}this._setupProperties(b,t[a],p,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=mg()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=mg()),!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=fa.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=Mm.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=mg()),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 E=Math.trunc(a/u),b=a-E*u,v=Math.min(b/n._duration,1);return v===0&&a===n._duration?1:v},d=c(),p=this._easingFunction(d);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,p),this._onUpdateCallback&&this._onUpdateCallback(this._object,d),this._duration===0||a>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((a-this._duration)/u)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);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*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,y=this._chainedTweens.length;g<y;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 kRe=G8.nextId,Hs=mC,LRe=Hs.getAll.bind(Hs),RRe=Hs.removeAll.bind(Hs),NRe=Hs.add.bind(Hs),jRe=Hs.remove.bind(Hs),URe=Hs.update.bind(Hs);f();function wm(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}f();f();f();var z8=(e,r)=>(r-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,$8=(e,r)=>new ct(e.clientX-r.offsetLeft,e.clientY-r.offsetTop),hC=(e,r)=>Math.atan2(r.y-e.y,r.x-e.x),hg=(e,r)=>Math.sqrt((r.y-e.y)**2+(r.x-e.x)**2),gC=(e,r)=>new ct((e.x+r.x)/2,(e.y+r.y)/2),yC=e=>{let r=0,{wheelDelta:t,detail:n}=e;return t!==void 0?r=t:n!==void 0&&(r=-n),r};var wv=class{constructor(r,t){h(this,"input1");h(this,"input2");h(this,"lastAngle");h(this,"lastDistance");h(this,"totalDistance");h(this,"first");h(this,"second");this.input1=r,this.input2=t,this.lastAngle=hC(r,t),this.lastDistance=hg(r,t),this.totalDistance=0,this.first=r,this.second=t}update(r,t){let n=hg(r,t);this.input1=r,this.input2=t;let o=hC(r,t);this.lastAngle=o,this.lastDistance=n,this.totalDistance+=(hg(this.first,r)+hg(this.second,t))/2,this.first=gC(this.first,r),this.second=gC(this.second,t)}};f();var gg=class{constructor(r,t,n){h(this,"touch");h(this,"camera");h(this,"cameraPlane");h(this,"viewCoordinate");h(this,"snapHolderMatrix");h(this,"snapCamera");h(this,"cameraPosition");h(this,"raycaster");h(this,"worldCoordinate");h(this,"snapshotted",!1);this.touch=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 ct(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new wl,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 ct(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 ma={};Cl(ma,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>uK,CLIPPING_RADIUS:()=>yg,CONTROL_OPTIONS:()=>sK,DEFAULT_ANIMATION_DURATION:()=>IC,DEFAULT_BEARING:()=>fK,DEFAULT_MAX_ZOOM_LEVEL:()=>dK,DEFAULT_MIN_ZOOM_LEVEL:()=>CC,DEFAULT_PITCH:()=>pK,DEFAULT_ZOOM_LEVEL:()=>cK,EVENTS:()=>SC,MAPLIBRE_TILE_SIZE:()=>Av,MAX_LAT:()=>vC,MAX_MERCATOR_ZOOM_LEVEL:()=>_v,MIN_LAT:()=>bC,MIN_MERCATOR_ZOOM_LEVEL:()=>Pv,ROOM_MERCATOR_ZOOM_LEVEL:()=>lK,TWO_PI:()=>xC,WHEEL_ZOOM_MULTIPLIER:()=>EC,ZRANGE:()=>Am});f();var Av=512,bC=-85.051129,vC=85.051129,yg=1e4,sK={chain:"chain",cancel:"cancel"},xC=Math.PI*2,Am=100,EC=1e4,Pv=0,_v=24,uK=17,lK=20,IC=200,SC=["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"],cK=18,CC=12,dK=22,pK=0,fK=0;var Ov=!1,mK=!1;var Fv,Ld=class extends Xe{constructor(t,n,o,i,a){super();h(this,"dirty",!1);h(this,"zoomDirty",!1);h(this,"rotationDirty",!1);h(this,"panDirty",!1);h(this,"stateDirty",!1);w(this,Fv,CC);h(this,"zoomSpeed",5);h(this,"rotateSpeed",100);h(this,"enabled",!0);h(this,"enableZoom",!0);h(this,"enablePan",!0);h(this,"enablePedestal",!1);h(this,"maxPedestal",1/0);h(this,"minPedestal",0);h(this,"enableRotate",!0);h(this,"minZoomAltitude",0);h(this,"maxZoomAltitude",1/0);h(this,"ignoreZoomLimits",!1);h(this,"zoomFactor",1);h(this,"panBounds",{min:new Ie(1/0,1/0),max:new Ie(-1/0,-1/0),center:new Ie(0,0,0),radius:1/0});h(this,"minTilt",0);h(this,"maxTilt",1.2);h(this,"MOUSE_BUTTONS",{ORBIT:Jy.RIGHT,ZOOM:Jy.MIDDLE,PAN:Jy.LEFT});h(this,"camera");h(this,"scene");h(this,"renderer");h(this,"elevation");h(this,"orbit");h(this,"cameraPlane");h(this,"raycaster",new wl);h(this,"rendererState");h(this,"options");h(this,"state",-1);h(this,"intersection");h(this,"viewState",null);h(this,"tweens",new Map);h(this,"clock",new zD(!0));h(this,"coords",{mouse:new ct,rotateStart:new ct,rotateEnd:new ct,rotateDelta:new ct,panStart:new Ie,panCameraStart:new Ie,panEnd:new Ie,panDelta:new Ie,initialShiftPos:new ct,initialPedestal:0,floorAnchor:new Ie});h(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});h(this,"scrollTimer",null);h(this,"lastWheelTime",0);h(this,"resetZoom",!1);h(this,"zoomStart");h(this,"pedestalScaleFactor",1);h(this,"isUserZooming",!1);h(this,"stayInsideBounds",!0);h(this,"userInteracting",!1);h(this,"cameraMoving",!1);h(this,"lastCameraMoveTime",Date.now());h(this,"raycastToFloor",t=>{this.raycaster.setFromCamera(t,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new Ie});h(this,"isUserInteracting",()=>this.userInteracting);h(this,"getPosition",()=>new Ie(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));h(this,"getPedestal",()=>this.orbit.position.z);h(this,"pan",(t,n)=>{isNaN(t)||isNaN(n)||(this.setPosition(this.orbit.position.x+t,this.orbit.position.y+n),this.publish("position-updated"))});h(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"))});h(this,"isCameraMoving",()=>this.cameraMoving);h(this,"lastCameraStoppedMovingTime",()=>this.lastCameraMoveTime);h(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)});h(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});h(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});h(this,"zoomIn",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i/1.5},t,n,o)});h(this,"zoomOut",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i*1.5},t,n,o)});h(this,"getRotation",()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2));h(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),this.state===7&&(this.state=-1)});h(this,"animateCamera",(t,n,o,i,a,u)=>{let l=k({interruptible:!0},u),c={},d={},p=this.getPosition();if(t.position!=null&&(t.position.x!==void 0&&(c.x=p.x,d.x=t.position.x),t.position.y!==void 0&&(c.y=p.y,d.y=t.position.y),t.position.z!==void 0&&(c.z=p.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:M,end:T}=YD(this.getRotation(),t.rotation);c.rotation=M,d.rotation=T}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 m=c.zoom!==d.zoom,g=c.rotation!==d.rotation,y=c.tilt!==d.tilt,E=new Xa(c).to(d,x.env.TESTING?0:n).onUpdate(M=>{this.setMulti({x:M.x,y:M.y,z:M.z},M.zoom,M.rotation,M.tilt)}).onComplete(()=>{this.completeTween(E),this.publish("multi-end",{zooming:m,rotating:g,tilting:y}),i&&i()}).onStart(()=>{this.state!==7&&(this.state=7,E.state=7,this.publish("multi-start",{zooming:m,rotating:g,tilting:y})),this.publish("change")});this.rendererState.internalTweenGroup.add(E);let b=Array.from(this.tweens.entries()),v=b[b.length-1],D=!1;return v!=null&&(v[1].interruptible?(typeof v[1].cancelledCallback=="function"&&v[1].cancelledCallback(),this.completeTween(v[0])):(D=!0,v[0].chain(E))),this.tweens.set(E,{cancelledCallback:a,interruptible:l.interruptible}),o?E.easing(o):E.easing(fa.Quadratic.In),!t.doNotAutoStart&&!D&&(E.start(),this.publish("change")),E.cameraAnimation=!0,E});h(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>yg&&(this.camera.near=n-yg,this.camera.far=n+yg):(this.camera.near=n/Am,this.camera.far=n*Am),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});h(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);h(this,"getZoomScaledMax",()=>{let t=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,t)});h(this,"setRotation",(t,n)=>{if(isNaN(t))return;this.state===-1&&!n&&this.publish("rotate-start");let o=-(t%xC);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)});h(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/Am,this.camera.far=n*Am,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0});h(this,"setZoomLevel",t=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(t))});h(this,"getZoomAltitude",()=>this.camera.position.z);h(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));h(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)});h(this,"getTilt",()=>this.elevation.rotation.x);h(this,"setCameraPlaneElevation",t=>{this.cameraPlane.position.z=t});h(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});h(this,"getProjectionScaleFactor",(t,n,o)=>rE(t,n,o));h(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())});h(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))});h(this,"dispose",()=>{this.scene.remove(this.cameraPlane),this.destroy()});h(this,"createCameraPlane",()=>{let t=Ov?2e3:1e10,n=Ov?100:1,o=new xo(t,t,n,n),i=new kn({color:0,wireframe:Ov,visible:Ov}),a=new rt(o,i);return this.scene.add(a),a});h(this,"addEventListeners",()=>{let{domElement:t}=this.renderer;for(let n of SC)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})});h(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,{capture:!1,signal:this.signal}),window.addEventListener("mouseout",this.onMouseUp,{capture:!1,signal:this.signal})});h(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,{capture:!1,signal:this.signal})});h(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,{capture:!1})});h(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})});h(this,"onContextMenu",t=>{t.preventDefault()});h(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}});h(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)});h(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 wv(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});h(this,"onTouchMove",t=>{if(this.enabled!==!1)switch(this.touchToScene(t),t.touches.length){case 2:t.preventDefault(),t.stopPropagation();let n=k({},this.touch.inputs.first),o=k({},this.touch.inputs.second),i=new ct(this.touch.touches[0].x,this.touch.touches[0].y),a=new ct(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}});h(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}});h(this,"handleTouchMovePan",t=>{let n=Object.hasOwn(t,"x")?new ct(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});h(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 ct(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 gg(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new gg(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")});h(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});h(this,"handleTouchStartTilt",t=>{this.coords.rotateStart.set(t.touches[1].clientX,t.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});h(this,"handleTouchMovePedestal",t=>{this.handleMouseMovePedestal(t.touches[0])});h(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)});h(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)});h(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1});h(this,"handleTouchStartPan",t=>{let n=Object.hasOwn(t,"x")?new ct(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")});h(this,"handleTouchStartPedestal",t=>{this.handleMouseDownPedestal(t.touches[0])});h(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||t.button===this.MOUSE_BUTTONS.ZOOM)&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(t),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});h(this,"onMouseWheel",t=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3&&this.state!==7||(this.state===7&&this.cancelAnimation(),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))});h(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-yC(t)*n/EC*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")});h(this,"setCameraFromTransformMatrix",t=>{this.orbit.updateMatrixWorld();let n=new uu;n.setFromRotationMatrix(t,"ZYX");let o=(t.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),i=n.z,a=new Ie(0,0,1);a.applyEuler(n),a.setLength(o);let u=new Ie;u.setFromMatrixPosition(t),u.sub(a),this.enablePan&&this.setPosition(u.x,u.y),this.enableZoom&&this.setZoomAltitude(o),this.enableRotate&&this.setRotation(-i)});h(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,p=a.x-i.x,m=a.y-i.y,g=Math.atan2(m,p),y=l.x-u.x,E=l.y-u.y,b=Math.atan2(E,y),v=z8(g,b),D=new qt;D.makeRotationZ(-v);let M=D.clone();M.multiply(t.snapHolderMatrix);let T=(H,S,C)=>H.elements[(S-1)*4+C-1],B=T(o,1,1)*T(M,1,1)-c.x*T(o,3,4)*T(M,3,1),G=T(o,1,1)*T(M,1,2)-c.x*T(o,3,4)*T(M,3,2),_=T(o,1,1)*T(M,1,3)-c.x*T(o,3,4)*T(M,3,3),F=i.x*B+i.y*G+i.z*_,A=T(o,2,2)*T(M,2,1)-c.y*T(o,3,4)*T(M,3,1),j=T(o,2,2)*T(M,2,2)-c.y*T(o,3,4)*T(M,3,2),N=T(o,2,2)*T(M,2,3)-c.y*T(o,3,4)*T(M,3,3),Z=i.x*A+i.y*j+i.z*N,ie=T(o,1,1)*T(M,1,1)-d.x*T(o,3,4)*T(M,3,1),de=T(o,1,1)*T(M,1,2)-d.x*T(o,3,4)*T(M,3,2),J=T(o,1,1)*T(M,1,3)-d.x*T(o,3,4)*T(M,3,3),z=a.x*ie+a.y*de+a.z*J,X=T(o,2,2)*T(M,2,1)-d.y*T(o,3,4)*T(M,3,1),W=T(o,2,2)*T(M,2,2)-d.y*T(o,3,4)*T(M,3,2),ee=T(o,2,2)*T(M,2,3)-d.y*T(o,3,4)*T(M,3,3),ce=a.x*X+a.y*W+a.z*ee,ye=Math.abs(ie-B),Ce=Math.abs(de-G),Pe=Math.abs(J-_),Le=Math.abs(ie-A),be=Math.abs(de-j),He=Math.abs(J-N),tt=Math.abs(X-B),lt=Math.abs(W-G),U=Math.abs(ee-_),ve=Math.abs(X-A),Y=Math.abs(W-j),we=Math.abs(ee-N),De=Math.min(ye+Ce+Pe,Le+be+He),xe=Math.min(tt+lt+U,ve+Y+we);De<xe&&(ie=X,de=W,J=ee,z=ce);let Ne=A*_-B*N,Rt=j*_-G*N,Ht=Z*_-F*N,Zt=ie*N-A*J,Wt=de*N-j*J,Rr=z*N-Z*J,qr=(Rr*Rt-Ht*Wt)/(Zt*Rt-Ne*Wt),go=(Rr*Ne-Ht*Zt)/(Wt*Ne-Rt*Zt),yo=j*B-G*A,qn=N*B-_*A,yr=Z*B-F*A,Cn=de*A-j*ie,$o=J*A-N*ie,bo=((z*A-Z*ie)*yo-yr*Cn)/($o*yo-qn*Cn),br=M.clone();return br.elements[12]=qr,br.elements[13]=go,br.elements[14]=bo,bo>0?br:null});h(this,"updateTouchOrigin",()=>{let t=this.renderer.domElement;this.touch.origin.offsetLeft=t.getBoundingClientRect().left,this.touch.origin.offsetTop=t.getBoundingClientRect().top});h(this,"touchToScene",t=>{this.touch.touches=[];for(let n=0,o=t.touches.length;n<o;n++){let i=t.touches[n],a=$8(i,this.touch.origin);this.touch.touches.push(new ct(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]});h(this,"canScrollZoom",t=>{let n=yC(t),o=this.getZoomAltitude();return!(n<0&&o===this.getZoomScaledMax()||n>0&&o===this.getZoomScaledMin())});h(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});h(this,"getMousePos",t=>({x:t.offsetX,y:t.offsetY}));h(this,"handleMouseDownRotate",t=>{this.coords.rotateStart.set(t.clientX,t.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});h(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")});h(this,"handleMouseDownPedestal",t=>{let n=new ct(t.clientX,t.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=rE(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});h(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)});h(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")});h(this,"publishUserZoomDebounced",Pl(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));h(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});h(this,"setCameraMoving",()=>{this.cameraMoving=!0});h(this,"unsetCameraMoving",()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()});h(this,"setUserInteracting",()=>{this.userInteracting=!0});h(this,"unsetUserInteracting",()=>{this.userInteracting=!1});h(this,"publishPedestalChangeEvent",t=>{this.publish("pedestal-change",{pedestal:t,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});h(this,"convertAltitudeToZoomLevel",t=>{let[,n]=this.center,o=this.computeMetersPerPixelFromAltitude(t),i=Math.cos(ft.degToRad(n))*2*Math.PI*G3/o;return ft.clamp(Math.log2(i/512),Pv,_v)});h(this,"convertZoomLevelToAltitude",t=>this.computeMetersPerPixelFromZoomLevel(t)*this.options.canvasHeight/2/Math.tan(ft.degToRad(this.camera.fov)/2));h(this,"completeTween",t=>{t.isPlaying()&&t.stop(),this.rendererState.internalTweenGroup.remove(t),this.tweens.delete(t)});h(this,"debugContainer",new Ni);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,Fv)}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}=p1((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}=f1((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 m,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((m=n.rotation)!=null?m:l,!0),this.setTilt((g=n.tilt)!=null?g:c,!0);let p=DC(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:p.position,zoomLevel:this.convertAltitudeToZoomLevel(p.zoom)}}focusOn(t,n){if(mK){this.debugContainer&&Qr(this.debugContainer);let b=new lu(4,4,4),v=new kn({color:65280,depthTest:!1}),D=new rr(b,v,t.length),M=new qt;t.forEach((T,B)=>{M.setPosition(T),D.setMatrixAt(B,M)}),D.instanceMatrix.needsUpdate=!0,this.debugContainer.add(D),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,p;n.duration!==void 0?p=n.duration:x.env.TESTING==="true"?p=0:p=IC;let m=n.padding,g=this.getRotation(),y=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let E=DC(t,{canvasHeight:d,paddingOption:m,canvasWidth:c,minZoom:u,maxZoom:l,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(g),this.setTilt(y),this.animateCamera({position:E.position,tilt:n.tilt,rotation:n.rotation,zoom:E.zoom},p,o,i,a,n)}resize(t,n){this.options.canvasWidth=t,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(t){let[,n]=this.center,o=ft.clamp(t,Pv,_v),i=Math.pow(2,o),a=ft.clamp(n,bC,vC),u=i*512;return Math.cos(ft.degToRad(a))*Math.PI*2*G3/u}computeMetersPerPixelFromAltitude(t){return t*2*Math.tan(ft.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};Fv=new WeakMap,h(Ld,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);function DC(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 Ld.CAMERA_FRAME_PADDING_SIDES)typeof n[Ne]!="number"&&(n[Ne]=0);let p=wm(n,r,i);if(p.left+p.right>=r||p.top+p.bottom>=i)return d;t.updateMatrixWorld();let m=l.matrixWorldInverse,g=l.fov*(Math.PI/180)/2,y=g,b=Math.atan(Math.tan(g)*(r/i)),v=new Ie(1/0,1/0,1/0),D=new Ie(-1/0,-1/0,-1/0),M=new Nr,T=new Ie;for(let Ne=0,Rt=e.length;Ne<Rt;Ne++)T.copy(e[Ne]),M.expandByPoint(T),T.applyMatrix4(m),v.min(T),D.max(T),T.copy(e[Ne]),T.z-=o,T.applyMatrix4(m),v.min(T),D.max(T),T.copy(e[Ne]),T.z+=o,T.applyMatrix4(m),v.min(T),D.max(T);let B=D.x-v.x,G=D.y-v.y,_=r-p.left-p.right,F=i-p.top-p.bottom,A=(D.x+v.x)/2,j=(D.y+v.y)/2,N=B/_,Z=G/F,ie=a,de=u,J=ie*Math.tan(b)*2,z=de*Math.tan(b)*2,X=J/r,W=z/r,ee=Math.max(N,Z);ee=ft.clamp(ee,X,W);let ce=_*ee,ye=F*ee,Ce={min:{x:A-ce/2-p.left*ee,y:j-ye/2-p.bottom*ee},max:{x:A+ce/2+p.right*ee,y:j+ye/2+p.top*ee}},Pe=(Ce.min.x+Ce.max.x)/2,Le=(Ce.min.y+Ce.max.y)/2,be=M.getCenter(new Ie),He=Math.abs(Pe-Ce.min.x),tt=Math.abs(Le-Ce.min.y),lt=He/Math.tan(b),U=tt/Math.tan(y),ve=new Ie;ve.set(Pe,Le,D.z+Math.max(lt,U)),ve.applyMatrix4(l.matrixWorld);let Y=new Ie;Y.set(Pe,Le,D.z),Y.applyMatrix4(l.matrixWorld);let we=new Ie().subVectors(Y,ve),De=(be.z-ve.z)/we.z,xe=new Ie().copy(ve).add(we.clone().multiplyScalar(De));return Y.set(xe.x,xe.y,xe.z),ve.sub(Y),{position:xe,zoom:ve.length()}}f();var hK=300,gK=["running","paused"],bg,vg,Bv=class{constructor(r){h(this,"state");w(this,bg,new Ie);w(this,vg,new Ie);this.state=r}update(r){let t;this.state.cameraObject.getWorldPosition(s(this,vg));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||gK.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,bg));let i=s(this,vg).distanceTo(s(this,bg));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:hK,easing:"ease-in-out",fill:"forwards"}),t.visibilityNeedsUpdate=!1)}}};bg=new WeakMap,vg=new WeakMap;f();import{z as lr}from"zod";var TC=lr.object({rotation:lr.array(lr.number()).length(3).optional(),altitude:lr.number().optional(),scale:lr.array(lr.number()).length(3).optional(),interactive:lr.boolean().optional(),verticalOffset:lr.number().optional(),id:lr.union([lr.number(),lr.string()]).optional()}),yK=lr.object({type:lr.enum(["Feature"]),geometry:Tm,properties:TC}),bK=lr.object({type:lr.enum(["FeatureCollection"]),features:lr.array(yK)}),MC=lr.object({color:lr.string()}),vK=lr.object({url:lr.string(),color:lr.string().optional(),opacity:lr.number().optional(),material:lr.record(lr.string(),MC).optional()});function V8(e,r,t){lr.union([lr.number(),lr.string()]).parse(e),bK.parse(r),vK.parse(t)}var xg,Eg,Ig,Sg,Cg,mc=class{constructor(r){h(this,"mesh");h(this,"type","model");h(this,"positionDirty",!0);h(this,"outline");h(this,"geometry");h(this,"material");h(this,"feature");h(this,"instanceIndex",-1);h(this,"instancingDisabled",!1);w(this,xg,!0);h(this,"color",new mt);h(this,"clippingPlane");h(this,"position",new Ie);w(this,Eg,0);w(this,Ig,1);w(this,Sg,cn.GEOMETRY);w(this,Cg,!1);this.feature=r}get visible(){return s(this,xg)}set visible(r){O(this,xg,r)}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,Eg)}set altitude(r){O(this,Eg,r)}get opacity(){return s(this,Ig)}set opacity(r){O(this,Ig,r)}get renderOrder(){return s(this,Sg)}set renderOrder(r){O(this,Sg,r)}get visibleThroughGeometry(){return s(this,Cg)}set visibleThroughGeometry(r){O(this,Cg,r)}};xg=new WeakMap,Eg=new WeakMap,Ig=new WeakMap,Sg=new WeakMap,Cg=new WeakMap;f();var kv=class extends Xe{constructor(t,n){super();h(this,"state");h(this,"dirty",!0);h(this,"domTree");h(this,"observers",new Map);h(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 bu&&(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()}};f();f();var Rd={container:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:"9998"},focusOnBox:{position:"absolute",border:"2px solid orange",backgroundColor:"transparent",pointerEvents:"none"},getFocusOnTransformBox:{position:"absolute",border:"2px dashed cyan",backgroundColor:"rgba(0, 255, 255, 0.1)",pointerEvents:"none"},animateToBox:{position:"absolute",width:"12px",height:"12px",border:"2px solid lime",backgroundColor:"rgba(0, 255, 0, 0.3)",borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},label:{position:"absolute",fontSize:"10px",fontFamily:"monospace",color:"white",backgroundColor:"rgba(0, 0, 0, 0.7)",padding:"2px 4px",borderRadius:"2px",whiteSpace:"nowrap"}},wC={container:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:"9999"},top:{position:"absolute",top:"0",left:"0",right:"0",backgroundColor:"rgba(255, 0, 0, 0.2)",borderBottom:"2px dashed rgba(255, 0, 0, 0.6)"},bottom:{position:"absolute",bottom:"0",left:"0",right:"0",backgroundColor:"rgba(0, 255, 0, 0.2)",borderTop:"2px dashed rgba(0, 255, 0, 0.6)"},left:{position:"absolute",top:"0",bottom:"0",left:"0",backgroundColor:"rgba(0, 0, 255, 0.2)",borderRight:"2px dashed rgba(0, 0, 255, 0.6)"},right:{position:"absolute",top:"0",bottom:"0",right:"0",backgroundColor:"rgba(255, 255, 0, 0.2)",borderLeft:"2px dashed rgba(255, 255, 0, 0.6)"},label:{position:"absolute",fontSize:"10px",fontFamily:"monospace",color:"white",backgroundColor:"rgba(0, 0, 0, 0.7)",padding:"2px 4px",borderRadius:"2px"}},Ya,Pm,qa,ui,En,In,Xn,Nd,jd,_m,Ud,Gd,ko,li,hc,zd,ar,H8,Z8,W8,X8,Dg,Y8,q8,Lv,Tg,Rv=class{constructor(r,t){w(this,ar);w(this,Ya);w(this,Pm);w(this,qa,!1);w(this,ui,null);w(this,En,null);w(this,In,null);w(this,Xn,null);w(this,Nd,null);w(this,jd,null);w(this,_m,null);w(this,Ud,null);w(this,Gd,!1);w(this,ko,null);w(this,li,null);w(this,hc,null);w(this,zd,null);O(this,Ya,r),O(this,Pm,t)}showCameraTargets(){s(this,qa)||(O(this,qa,!0),se(this,ar,H8).call(this),se(this,ar,W8).call(this))}hideCameraTargets(){s(this,qa)&&(O(this,qa,!1),se(this,ar,X8).call(this),se(this,ar,Z8).call(this))}setFocusOnPointCloud(r){s(this,qa)&&(O(this,Nd,r.map(t=>t.clone())),se(this,ar,Dg).call(this))}setGetFocusOnTransformPointCloud(r){s(this,qa)&&(O(this,jd,r.map(t=>t.clone())),se(this,ar,Dg).call(this))}setAnimateToPosition(r){s(this,qa)&&(O(this,_m,r.clone()),se(this,ar,Dg).call(this))}showScreenOffsets(){s(this,Gd)||(O(this,Gd,!0),se(this,ar,Y8).call(this))}hideScreenOffsets(){s(this,Gd)&&(O(this,Gd,!1),se(this,ar,q8).call(this))}destroy(){this.hideCameraTargets(),this.hideScreenOffsets()}};Ya=new WeakMap,Pm=new WeakMap,qa=new WeakMap,ui=new WeakMap,En=new WeakMap,In=new WeakMap,Xn=new WeakMap,Nd=new WeakMap,jd=new WeakMap,_m=new WeakMap,Ud=new WeakMap,Gd=new WeakMap,ko=new WeakMap,li=new WeakMap,hc=new WeakMap,zd=new WeakMap,ar=new WeakSet,H8=function(){let r=s(this,Ya).container;if(!r)return;O(this,ui,document.createElement("div")),s(this,ui).dataset.debugCameraTargets="true",Object.assign(s(this,ui).style,Rd.container),O(this,En,document.createElement("div")),s(this,En).dataset.debugType="focusOn",Object.assign(s(this,En).style,Rd.focusOnBox),s(this,En).style.display="none";let t=document.createElement("span");Object.assign(t.style,Rd.label),t.style.top="-20px",t.style.left="0",t.style.color="orange",t.textContent="focusOn",s(this,En).appendChild(t),O(this,In,document.createElement("div")),s(this,In).dataset.debugType="getFocusOnTransform",Object.assign(s(this,In).style,Rd.getFocusOnTransformBox),s(this,In).style.display="none";let n=document.createElement("span");Object.assign(n.style,Rd.label),n.style.top="-20px",n.style.left="0",n.style.color="cyan",n.textContent="getFocusOnTransform",s(this,In).appendChild(n),O(this,Xn,document.createElement("div")),s(this,Xn).dataset.debugType="animateTo",Object.assign(s(this,Xn).style,Rd.animateToBox),s(this,Xn).style.display="none";let o=document.createElement("span");Object.assign(o.style,Rd.label),o.style.top="-20px",o.style.left="50%",o.style.transform="translateX(-50%)",o.style.color="lime",o.textContent="animateTo",s(this,Xn).appendChild(o),s(this,ui).appendChild(s(this,En)),s(this,ui).appendChild(s(this,In)),s(this,ui).appendChild(s(this,Xn)),r.appendChild(s(this,ui))},Z8=function(){s(this,ui)&&(s(this,ui).remove(),O(this,ui,null)),O(this,En,null),O(this,In,null),O(this,Xn,null)},W8=function(){O(this,Ud,s(this,Ya).on("post-render",()=>{se(this,ar,Dg).call(this)}))},X8=function(){s(this,Ud)!==null&&(s(this,Ud).call(this),O(this,Ud,null))},Dg=function(){if(!s(this,qa)||!s(this,ui))return;let r=new ct;if(s(this,En)&&s(this,Nd)&&s(this,Nd).length>0){let t=1/0,n=1/0,o=-1/0,i=-1/0;for(let a of s(this,Nd))s(this,Ya).project(r,a),r.x!==-1e3&&(t=Math.min(t,r.x),n=Math.min(n,r.y),o=Math.max(o,r.x),i=Math.max(i,r.y));t!==1/0?(s(this,En).style.display="block",s(this,En).style.left="".concat(t,"px"),s(this,En).style.top="".concat(n,"px"),s(this,En).style.width="".concat(o-t,"px"),s(this,En).style.height="".concat(i-n,"px")):s(this,En).style.display="none"}else s(this,En)&&(s(this,En).style.display="none");if(s(this,In)&&s(this,jd)&&s(this,jd).length>0){let t=1/0,n=1/0,o=-1/0,i=-1/0;for(let a of s(this,jd))s(this,Ya).project(r,a),r.x!==-1e3&&(t=Math.min(t,r.x),n=Math.min(n,r.y),o=Math.max(o,r.x),i=Math.max(i,r.y));t!==1/0?(s(this,In).style.display="block",s(this,In).style.left="".concat(t,"px"),s(this,In).style.top="".concat(n,"px"),s(this,In).style.width="".concat(o-t,"px"),s(this,In).style.height="".concat(i-n,"px")):s(this,In).style.display="none"}else s(this,In)&&(s(this,In).style.display="none");s(this,Xn)&&s(this,_m)?(s(this,Ya).project(r,s(this,_m)),r.x!==-1e3?(s(this,Xn).style.display="block",s(this,Xn).style.left="".concat(r.x,"px"),s(this,Xn).style.top="".concat(r.y,"px")):s(this,Xn).style.display="none"):s(this,Xn)&&(s(this,Xn).style.display="none")},Y8=function(){let r=s(this,Ya).container;if(!r)return;O(this,ko,document.createElement("div")),s(this,ko).dataset.debugScreenOffsets="true",Object.assign(s(this,ko).style,wC.container);let t=n=>{let o=document.createElement("div");o.dataset.debugOffset=n,Object.assign(o.style,wC[n]);let i=document.createElement("span");switch(Object.assign(i.style,wC.label),i.dataset.debugLabel=n,n){case"top":i.style.bottom="4px",i.style.left="50%",i.style.transform="translateX(-50%)";break;case"bottom":i.style.top="4px",i.style.left="50%",i.style.transform="translateX(-50%)";break;case"left":i.style.right="4px",i.style.top="50%",i.style.transform="translateY(-50%)";break;case"right":i.style.left="4px",i.style.top="50%",i.style.transform="translateY(-50%)";break}return o.appendChild(i),o};O(this,li,{top:t("top"),bottom:t("bottom"),left:t("left"),right:t("right")}),s(this,ko).appendChild(s(this,li).top),s(this,ko).appendChild(s(this,li).bottom),s(this,ko).appendChild(s(this,li).left),s(this,ko).appendChild(s(this,li).right),r.appendChild(s(this,ko)),se(this,ar,Lv).call(this),O(this,zd,s(this,Pm).on("padding-change",()=>{se(this,ar,Lv).call(this)})),O(this,hc,new ResizeObserver(()=>{se(this,ar,Lv).call(this)})),s(this,hc).observe(r)},q8=function(){s(this,zd)&&(s(this,zd).call(this),O(this,zd,null)),s(this,hc)&&(s(this,hc).disconnect(),O(this,hc,null)),s(this,ko)&&(s(this,ko).remove(),O(this,ko,null)),O(this,li,null)},Lv=function(){if(!s(this,li)||!s(this,ko))return;let r=s(this,Pm).insetsPadding,t=s(this,Ya).container,n=t.clientWidth,o=t.clientHeight,i=wm(r,n,o),a=s(this,li).top,u=a.querySelector("[data-debug-label]");i.top>0?(a.style.height="".concat(i.top,"px"),a.style.display="block",u&&(u.textContent="top: ".concat(se(this,ar,Tg).call(this,r.top,r.type)))):a.style.display="none";let l=s(this,li).bottom,c=l.querySelector("[data-debug-label]");i.bottom>0?(l.style.height="".concat(i.bottom,"px"),l.style.display="block",c&&(c.textContent="bottom: ".concat(se(this,ar,Tg).call(this,r.bottom,r.type)))):l.style.display="none";let d=s(this,li).left,p=d.querySelector("[data-debug-label]");i.left>0?(d.style.height="",d.style.top="".concat(i.top,"px"),d.style.bottom="".concat(i.bottom,"px"),d.style.width="".concat(i.left,"px"),d.style.display="block",p&&(p.textContent="left: ".concat(se(this,ar,Tg).call(this,r.left,r.type)))):d.style.display="none";let m=s(this,li).right,g=m.querySelector("[data-debug-label]");i.right>0?(m.style.height="",m.style.top="".concat(i.top,"px"),m.style.bottom="".concat(i.bottom,"px"),m.style.width="".concat(i.right,"px"),m.style.display="block",g&&(g.textContent="right: ".concat(se(this,ar,Tg).call(this,r.right,r.type)))):m.style.display="none"},Tg=function(r,t){return t==="portion"?"".concat((r*100).toFixed(1),"%"):"".concat(r,"px")};var xK=0,EK=90,IK=(x.env.NODE_ENV==="test",!1),Ws={linear:fa.Linear.None,"ease-in":fa.Quadratic.In,"ease-out":fa.Quadratic.Out,"ease-in-out":fa.Quadratic.InOut},SK=-50,ze,Qe,Zs,ha,Mg,wg,PC,Nv=class extends Xe{constructor(t,n,o){super();w(this,wg);w(this,ze);w(this,Qe);w(this,Zs);w(this,ha);w(this,Mg);O(this,ze,t),O(this,Qe,n),O(this,Zs,o),O(this,ha,new Rv(t,this)),s(this,ze).map&&s(this,ze).map.transform.setMinElevationForCurrentTile(SK),s(this,Qe).cameraSystem.on("pedestal-change",({pedestal:i})=>{var a;s(this,Qe).cameraSystem.setCameraPlaneElevation(i),s(this,ze).mode==="outdoors-overlay"&&typeof((a=s(this,ze).map)==null?void 0:a.setCenterElevation)=="function"&&s(this,ze).map.setCenterElevation(s(this,Qe).cameraSystem.getPedestal())})}get center(){var t,n;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(n=(t=s(this,ze).map).getCenter)==null?void 0:n.call(t).toArray():s(this,Qe).cameraSystem.center}setCenter(t){var n;if(s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map){(n=s(this,ze).map)==null||n.setCenter(t),s(this,Qe).interactionSystem.handleHover();return}s(this,Qe).cameraSystem.setCenter(t[0],t[1]),s(this,Qe).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(t=s(this,ze).map)==null?void 0:t.getZoom():s(this,Qe).cameraSystem.getZoomLevel()}setZoomLevel(t){var n;s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map&&((n=s(this,ze).map)==null||n.setZoom(t)),s(this,Qe).cameraSystem.setZoomLevel(gs(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,Qe).cameraSystem.isAnimating}cancelAnimation(){s(this,Qe).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,Qe).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,Qe).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,Qe).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,Qe).panBoundsSystem.dirty=!0,s(this,Qe).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,Qe).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,n=!1){var i;n&&this.setAutoMinZoomLevel(!1);let o=gs(t,ma.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(ma.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,Qe).cameraSystem.setMinZoomLevel(o),this.zoomLevel<o&&this.setZoomLevel(o),(i=s(this,ze).map)==null||i.setMinZoom(o)}setMaxZoomLevel(t){var o;let n=gs(t,this.minZoomLevel,ma.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(ma.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,Qe).cameraSystem.setMaxZoomLevel(n),this.zoomLevel>n&&this.setZoomLevel(n),(o=s(this,ze).map)==null||o.setMaxZoom(n)}get maxPitch(){var t,n;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(n=(t=s(this,ze).map)==null?void 0:t.getMaxPitch)==null?void 0:n.call(t):ft.radToDeg(s(this,Qe).cameraSystem.maxTilt)}get minPitch(){var t,n;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(n=(t=s(this,ze).map)==null?void 0:t.getMinPitch)==null?void 0:n.call(t):ft.radToDeg(s(this,Qe).cameraSystem.minTilt)}setMinPitch(t){var o;let n=Math.max(xK,t);(o=s(this,ze).map)==null||o.setMinPitch(n),s(this,Qe).cameraSystem.minTilt=ft.degToRad(n)}setMaxPitch(t){var o;let n=Math.min(EK,t);(o=s(this,ze).map)==null||o.setMaxPitch(n),s(this,Qe).cameraSystem.maxTilt=ft.degToRad(n)}get bearing(){var t;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(t=s(this,ze).map)==null?void 0:t.getBearing():ft.radToDeg(s(this,Qe).cameraSystem.getRotation())}setBearing(t){var n;if(s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map){(n=s(this,ze).map)==null||n.setBearing(t);return}s(this,Qe).cameraSystem.setRotation(ft.degToRad(t))}get pitch(){var t;return s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(t=s(this,ze).map)==null?void 0:t.getPitch():ft.radToDeg(s(this,Qe).cameraSystem.getTilt())}setPitch(t){var n;if(s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map){(n=s(this,ze).map)==null||n.setPitch(t);return}s(this,Qe).cameraSystem.setTilt(ft.degToRad(gs(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,Qe).cameraSystem.getPedestal()}setElevation(t){s(this,Qe).cameraSystem.setPedestal(t,!0)}animateElevation(t,n){return s(this,Mg)&&s(this,Mg).stop(),new Promise(o=>{var i;s(this,Qe).cameraSystem.animateCamera({position:{z:t}},(n==null?void 0:n.duration)||300,Ws[(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,Zs).insetsPadding}get panMode(){return s(this,Qe).cameraSystem.enablePan===!1&&s(this,Qe).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,Qe).cameraSystem.enablePan=!0,s(this,Qe).cameraSystem.enablePedestal=!1):(s(this,Qe).cameraSystem.enablePan=!1,s(this,Qe).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Zs).insetsPadding=Object.assign({},s(this,Zs).insetsPadding,t),this.publish("padding-change",{padding:s(this,Zs).insetsPadding})}animateTo(t){var u,l,c,d,p,m;let n=t.center?s(this,ze).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0;if(n&&s(this,ha).setAnimateToPosition(n),s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map)return(m=s(this,ze).map)==null||m.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:(p=t.duration)!=null?p:600}),Promise.resolve();let o=t.zoomLevel!==void 0?s(this,Qe).cameraSystem.convertZoomLevelToAltitude(gs(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?ft.degToRad(t.bearing):void 0,a=t.pitch!==void 0?ft.degToRad(gs(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 y;s(this,Qe).cameraSystem.animateCamera({position:n,zoom:o,rotation:i,tilt:a},t.duration||0,Ws[t.easing||"ease-in-out"],()=>{s(this,Qe).interactionSystem.handleHover(),g()},g,{interruptible:(y=t==null?void 0:t.interruptible)!=null?y:!0})})}getCameraFrameForCoordinates(t,n){let o=se(this,wg,PC).call(this,n||{},()=>Promise.resolve()),{pointCloud:i}=J8(t,s(this,ze),s(this,Zs).geometry3DMap);if(i.length===0)return V.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};s(this,ha).setGetFocusOnTransformPointCloud(i);let{center:a,zoomLevel:u}=s(this,Qe).cameraSystem.getCameraFrameForCoordinates(i,o);return{center:s(this,ze).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,n){var u,l,c,d;let{pointCloud:o,geoBounds:i,firstPosition:a}=J8(t,s(this,ze),s(this,Zs).geometry3DMap);return o.length===0?(V.error("No valid coordinates found in targets:",t),Promise.resolve()):(s(this,ha).setFocusOnPointCloud(o),s(this,ze).mode==="outdoors-overlay"&&s(this,ze).map?(o.length===1&&a?(u=s(this,ze).map)==null||u.flyTo({center:[a[0],a[1]],duration:(n==null?void 0:n.duration)||s(this,ze).map.getBearing(),animate:!0,bearing:(n==null?void 0:n.bearing)===void 0?s(this,ze).map.getBearing():n==null?void 0:n.bearing,pitch:(n==null?void 0:n.pitch)===void 0?s(this,ze).map.getPitch():n==null?void 0:n.pitch,zoom:(n==null?void 0:n.maxZoomLevel)||s(this,ze).map.getMaxZoom()}):(IK&&CK(s(this,ze),i),(d=s(this,ze).map)==null||d.fitBounds(i,{duration:(l=n==null?void 0:n.duration)!=null?l:ma.DEFAULT_ANIMATION_DURATION,bearing:(n==null?void 0:n.bearing)===void 0?s(this,ze).map.getBearing():n==null?void 0:n.bearing,pitch:(n==null?void 0:n.pitch)===void 0?s(this,ze).map.getPitch():n==null?void 0:n.pitch,maxZoom:(c=n==null?void 0:n.maxZoomLevel)!=null?c:s(this,ze).map.getMaxZoom()})),s(this,Qe).interactionSystem.handleHover(),Promise.resolve()):new Promise(p=>{s(this,Qe).cameraSystem.focusOn(o,se(this,wg,PC).call(this,n||{},p))}))}showCameraTargetsDebug(){s(this,ha).showCameraTargets()}hideCameraTargetsDebug(){s(this,ha).hideCameraTargets()}showScreenOffsetsDebug(){s(this,ha).showScreenOffsets()}hideScreenOffsetsDebug(){s(this,ha).hideScreenOffsets()}destroy(){s(this,ha).destroy(),super.destroy()}};ze=new WeakMap,Qe=new WeakMap,Zs=new WeakMap,ha=new WeakMap,Mg=new WeakMap,wg=new WeakSet,PC=function(t,n){var o;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,Qe).cameraSystem.convertZoomLevelToAltitude(gs(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,Qe).cameraSystem.convertZoomLevelToAltitude(gs(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({},c1,t==null?void 0:t.padding):this.insetsPadding,curve:Ws[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:ft.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?ft.degToRad(gs(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,Qe).interactionSystem.handleHover(),n()},cancelledCallback:n,interruptible:(o=t==null?void 0:t.interruptible)!=null?o:!0,verticalPadding:t==null?void 0:t.verticalPadding}};function AC(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 J8(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){V.error("Entity not found with id:",l);continue}let d=new Nr;b5(r,"userData"in c&&(u=c.userData.entityId)!=null?u:c.id,n,d,c instanceof Tr?c.position.z:void 0);let p=r.convert3DMapPositionToCoordinate(d.min),m=r.convert3DMapPositionToCoordinate(d.max);AC(o,p),AC(o,m),i||(i=r.convert3DMapPositionToCoordinate(d.getCenter(new Ie)))}else n.push(r.convertTo3DMapPosition(l[1],l[0],l[2]||0)),AC(o,l),i||(i=l);return{pointCloud:n,geoBounds:o,firstPosition:i}}function CK(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}})}f();f();var K8="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}";f();var Q8="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}";f();var eB=4.291666666666667,tB=15,rB=25,nB=43/60;f();var oB=["horizontal","icon"],DK=new Map([[oB[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>'],[oB[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>']]),TK=/<svg([^>]*)>/g;function iB(e,r,t,n){let o=DK.get(e);return o?o.replace(TK,'<svg$1 width="'.concat(t,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(r,';">')):""}f();var $d=class $d{constructor(){h(this,"loader");this.loader=new i1}static getInstance(){return $d.instance||($d.instance=new $d),$d.instance}getLoader(){return this.loader}load(r){return new Promise((t,n)=>{this.loader.load(r,t,void 0,n)})}};h($d,"instance");var _C=$d,gc=_C.getInstance();var aB=!1,sr,tl,Om,Sn,Lo,Vd,Ja,Xs,jv=class extends Xe{constructor(t,n,o){super();w(this,sr,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")},interactive:!0,visible:!0});w(this,tl);w(this,Om);w(this,Sn);w(this,Lo);w(this,Vd);w(this,Ja,0);w(this,Xs,0);h(this,"dirty",!0);h(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,sr).position]);h(this,"getPositionAlignedPadding",()=>{var o,i,a,u;let t=s(this,sr).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,sr).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,sr)[i]=a)}),O(this,Om,t),O(this,tl,n)}get color(){return s(this,sr).color==="light"?"white":"#293136"}get iconName(){return s(this,sr).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,sr).iconOnly?tB:75}get defaultWidth(){return s(this,sr).iconOnly?rB:150}get aspectRatio(){return s(this,sr).iconOnly?nB:eB}get options(){return k({},s(this,sr))}set options(t){var n,o;O(this,sr,{padding:t.padding||s(this,sr).padding,position:t.position||s(this,sr).position,iconOnly:t.iconOnly||s(this,sr).iconOnly,color:t.color||s(this,sr).color,scale:t.scale||s(this,sr).scale,onClick:s(this,sr).onClick,interactive:(n=t.interactive)!=null?n:s(this,sr).interactive,visible:(o=t.visible)!=null?o:s(this,sr).visible})}get icon(){return iB(this.iconName,this.color,s(this,Ja)*s(this,tl).pixelRatio,s(this,Xs)*s(this,tl).pixelRatio)}setSize(t,n){s(this,Lo)&&(s(this,Lo).uniforms.uSize.value.x=t,s(this,Lo).uniforms.uSize.value.y=n)}setXY(t,n){s(this,Lo)&&(s(this,Lo).uniforms.uSize.value.w=t,s(this,Lo).uniforms.uSize.value.z=n)}get width(){return s(this,Ja)}get height(){return s(this,Xs)}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,sr).position]}insertIntoQuadTree(t){s(this,Vd)!=null&&typeof s(this,sr).onClick=="function"&&s(this,sr).interactive&&t.insert(s(this,Vd))}resize(t,n){if(s(this,sr).visible!==!0)return;let o=this.getPositionAlignedCanvasCoordinates(t,n),i=this.getPositionAlignedPadding(),a=this.getPositionAlignedOffset(s(this,Ja),s(this,Xs)),u=Math.min(t-s(this,Ja),Math.max(0,o.x+i.x+a.x)),l=Math.min(n-s(this,Xs),Math.max(0,o.y+i.y+a.y));this.setSize(s(this,Ja)/t,s(this,Xs)/n),this.setXY(u/t,l/n),O(this,Vd,new st(u,l,s(this,Ja),s(this,Xs),{entityId:"watermark"}))}update(){this.dirty&&(s(this,sr).visible===!0?(O(this,Ja,Math.min(s(this,tl).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,sr).scale))),O(this,Xs,s(this,Ja)/this.aspectRatio),gc.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),t=>{if(O(this,Lo,new ji({uniforms:{uTexture:{value:t},uSize:{value:new AD(0,0,0,0)},uOpacity:{value:.7}},vertexShader:K8,fragmentShader:Q8,depthWrite:!1,depthTest:!1,defines:{debug:aB},wireframe:aB,transparent:!0,visible:!0})),s(this,Sn))s(this,Sn).visible=!0,s(this,Sn).material=s(this,Lo),s(this,Sn).material.needsUpdate=!0;else{let n=new xo(2,2,1,1);O(this,Sn,new rt(n,s(this,Lo))),s(this,Sn).position.set(0,0,-1),s(this,Sn).frustumCulled=!1,s(this,Sn).renderOrder=999;let o=new lu(1,1,1),i=new rt(o,new kn({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));i.frustumCulled=!1,i.layers.set(1),s(this,Sn).add(i),s(this,Om).add(s(this,Sn))}this.resize(s(this,tl).canvasWidth,s(this,tl).canvasHeight),this.publish("texture-loaded")})):s(this,Sn)&&(s(this,Sn).visible=!1),this.dirty=!1)}destroy(){s(this,Sn)&&(s(this,Om).remove(s(this,Sn)),Qr(s(this,Sn))),O(this,Sn,void 0),s(this,Lo)&&s(this,Lo).dispose(),O(this,Lo,void 0),O(this,Vd,void 0)}};sr=new WeakMap,tl=new WeakMap,Om=new WeakMap,Sn=new WeakMap,Lo=new WeakMap,Vd=new WeakMap,Ja=new WeakMap,Xs=new WeakMap;f();var Uv=100,AK=!1,zv=class extends Xe{constructor(t,n){super();h(this,"currentTotalBoundingBox");h(this,"state");h(this,"cameraSystem");h(this,"debugMesh",null);h(this,"dirty",!0);h(this,"autoMinZoomLevel",!0);this.state=t,this.cameraSystem=n}expandBoundsIfOutside(t){if(this.currentTotalBoundingBox==null){this.dirty=!0;return}this.currentTotalBoundingBox.containsPoint(t)||(this.dirty=!0)}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Nr,this.state.geometryScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new Ie(0,0,0),new Ie(Uv*2,Uv*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.geometryScene),this.currentTotalBoundingBox.expandByScalar(Uv)));let t=new Nr().setFromObject(this.state.geometryScene);this.currentTotalBoundingBox.union(t);let n=t.getSize(new Ie),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=Gv.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(o,Uv)).getBoundingSphere(PK).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new Ie),min:Gv.min,max:Gv.max,radius:i},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,AK&&this.state.geometryScene.parent instanceof cu){this.debugMesh&&(this.state.geometryScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new Ni,this.debugMesh.add(new rt(new o1(this.cameraSystem.panBounds.radius),new kn({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.geometryScene.parent.add(this.debugMesh);let a=new Ie;Gv.getSize(a);let u=new lu(a.x,a.y,a.z),l=new kn({color:65280,wireframe:!0,transparent:!0,opacity:.5}),c=new rt(u,l);c.position.copy(this.currentTotalBoundingBox.getCenter(new Ie)),this.debugMesh.add(c)}}}},Gv=new Nr,PK=new PD;f();var OC="\xA9 Mappedin",_K="https://info.mappedin.com/feedback",BC=["top-left","top-right","bottom-left","bottom-right"],OK=640,FK=()=>"<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>",FC={custom:[],position:"bottom-right",feedback:!0},Fm,$v=class{constructor(r,t={}){h(this,"controlContainerEl");h(this,"controlPositions");h(this,"compact");w(this,Fm);h(this,"attribContainerEl");h(this,"attribInnerEl");h(this,"attribButtonEl");h(this,"feedbackLinkEl");h(this,"attribHTML",OC);h(this,"customAttributions",[]);h(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",""))))});O(this,Fm,!!t.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),r.appendChild(this.controlContainerEl),this.controlPositions=BC.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=FC){var o;let t=r.position&&BC.includes(r.position)?r.position:FC.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=FK(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,Fm)?OC:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((o=r.feedback)!=null?o:FC.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=_K,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,Fm)?[OC]:[],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<=OK||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}};Fm=new WeakMap;f();var Ag,Pg,Bm=class{constructor(r,t){h(this,"mesh");h(this,"type","custom-geometry");h(this,"dirty",!0);h(this,"feature");h(this,"builder");h(this,"outline");w(this,Ag,1);h(this,"color",new mt);w(this,Pg,0);this.mesh=new mi,this.feature=r,this.builder=t}get visible(){return this.mesh.visible}set visible(r){this.mesh.visible=r}set opacity(r){O(this,Ag,r)}get opacity(){return s(this,Ag)}setColor(r){this.color.set(r)}get position(){var r;return(r=this.mesh)==null?void 0:r.position}get altitude(){return s(this,Pg)}set altitude(r){this.mesh&&(this.mesh.position.z=r,O(this,Pg,r))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(r){this.mesh&&(this.mesh.renderOrder=r)}};Ag=new WeakMap,Pg=new WeakMap;f();var Vv=class{constructor(r,t){h(this,"state");h(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=oe(k({},o.userData),{entityId:n.id,type:"custom-geometry"})}),r.dirty=!1),t.visible!==!1&&r.builder.update(r.mesh))}};f();f();function Hv(e){return e.children.some(r=>r.userData.isOutline)}function _g(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 sB(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 m=(r.start+d)*3,g=a[m+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 m=(r.start+d)*3,g=a[m+2];Math.abs(g-l)<1e-4?a[m+2]=Math.max(t+n,2e-4+n):a[m+2]=n}else{let d=o.thickness,p=u+d,m=u+d,g=l-d,y=l-d,E=n-d,b=n,v=n,D=n+t,M=n+t,T=n+t+d;for(let B=0;B<r.count;B++){let _=(r.start+B)*3,F=a[_+2],A;if(F<=p){let j=d>0?(F-u)/d:0;A=E+j*(b-E)}else if(F>=y){let j=d>0?(F-y)/d:0;A=M+j*(T-M)}else{let j=g-m,N=j>0?(F-m)/j:0;A=v+N*(D-v)}a[_+2]=A}}e.attributes.position.needsUpdate=!0}f();f();var uB="// 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}";f();var lB="// 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 Zv=class extends n1{constructor(r){super(r),this.onBeforeCompile=t=>{t.vertexShader=uB,t.fragmentShader=lB}}};f();var Ka,Hd,yc,bc,Og,kC,Zd=class{constructor(){w(this,Og);w(this,Ka,[]);w(this,Hd,!1);w(this,yc);w(this,bc)}get size(){return s(this,Ka).length}add(r){s(this,Ka).push(r),s(this,Hd)||se(this,Og,kC).call(this)}onComplete(r){O(this,yc,r)}clearOnComplete(){O(this,yc,void 0)}clearAll(){O(this,Ka,[]),O(this,Hd,!1),O(this,yc,void 0),s(this,bc)!==void 0&&(cancelIdleCallback(s(this,bc)),O(this,bc,void 0))}};Ka=new WeakMap,Hd=new WeakMap,yc=new WeakMap,bc=new WeakMap,Og=new WeakSet,kC=function(){O(this,Hd,!0),O(this,bc,requestIdleCallback(r=>{let t=0;for(;s(this,Ka).length>0&&r.timeRemaining()>2;){let n=s(this,Ka).shift();n&&(n(),t++)}if(t===0&&s(this,Ka).length>0&&r.timeRemaining()<2){let n=s(this,Ka).shift();n&&n()}O(this,bc,void 0),s(this,Ka).length>0?se(this,Og,kC).call(this):(O(this,Hd,!1),s(this,yc)&&s(this,yc).call(this))},{timeout:3e3}))};var RK=80,Wd,km,Xv,Yv,Wv=class extends Xe{constructor(t,n){var o;super();h(this,"rendererState");h(this,"maxOpacity");h(this,"outlineOpacitiesDirty",!0);h(this,"useIdleFramesOnly",!0);w(this,Wd,!0);w(this,km,-1/0);h(this,"idleBuildQueue",new Zd);h(this,"idleComputeBoundingSphereQueue",new Zd);w(this,Xv,new Map);w(this,Yv,()=>{this.publish("needs-render")});this.rendererState=t,this.maxOpacity=(o=n==null?void 0:n.maxOpacity)!=null?o:1,this.idleBuildQueue.onComplete(s(this,Yv))}get geometries3DDirty(){return s(this,Wd)}set geometries3DDirty(t){O(this,Wd,t)}buildOutlines(t){var m;let n=[];for(let g of t.userData.entities3D.values()){let y=this.rendererState.geometry3DMap.get(g);if(y instanceof Jt&&y.type==="geometry"&&y.components[3]&&y.components[3].dirty===!0&&y.components[0].material!=null){let E=y.components[0].geometry,b=!1;E||(E=sg(y.components[0]),b=!0);let v=y.components[1];n.push([y.components[3],new ND(E,(m=v.bevel)!=null&&m.enabled?1:RK)]),b&&(E==null||E.dispose(),E=void 0)}}if(n.length===0)return;let o=Gi(n.map(g=>g[1]),!1);if(o==null)return;let i=o.getAttribute("position"),a=new Float32Array(i.count*4),u=new Wo(a,4);o.setAttribute("color",u);let l=new Uint8Array(i.count);l.fill(0);let c=new Wo(l,1,!1);o.setAttribute("visibility",c);let d=0;for(let g=0;g<n.length;g++){let[y,E]=n[g],b=E.getAttribute("position").count;y.edgeColors=u,y.edgeVisibility=c,y.geometry=o,y.ranges={count:b,start:d},d+=b,E.dispose()}let p=new bp(o,new Zv({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:Ky}));p.userData.isOutline=!0,t.add(p)}update(t,n=!0){var i;if(this.geometries3DDirty){for(let a of this.rendererState.geometry3DsInScene)a.type==="geometry-group"&&_g(a,this.rendererState)&&!Hv(a)&&a.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(a)):this.buildOutlines(a));O(this,Wd,!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 Qn){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 p=new mt(l.color);for(let E=0;E<l.ranges.count;E++){let b=l.ranges.start+E;d.setXYZ(b,p.r,p.g,p.b)}let m=a.components[1].height,g=a.components[1].altitude,y=(i=a.components[1])==null?void 0:i.bevel;sB(u,l.ranges,m,g,y),u.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>u.computeBoundingSphere()),l.dirty=!1}let o=n?Lc(t,16,19,0,this.maxOpacity):s(this,km);if((o!==s(this,km)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DsInScene.size>0){for(let a of this.rendererState.geometry3DsInScene)if(a.type==="geometry"&&a.components[0]instanceof dn){let u=a.components[3];if(u&&u.edgeColors&&u.geometry&&u.visible){let l=Math.min(o,a.components[1].opacity*wp(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}}}}O(this,km,o),O(this,Wd,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,Xv).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};Wd=new WeakMap,km=new WeakMap,Xv=new WeakMap,Yv=new WeakMap;f();f();import{z as ci}from"zod";var qv=class extends rt{constructor(){super(...arguments);h(this,"userData",{entityId:""})}},NK=ci.object({flipImageToFaceCamera:ci.boolean().optional(),url:ci.string(),maxImageSize:ci.number().positive().optional()}),jK=ci.object({type:ci.enum(["Feature"]),properties:ci.object({width:ci.number(),height:ci.number(),rotation:ci.number().min(0).max(360).optional(),verticalOffset:ci.number().optional()}),geometry:Tm});function cB(e,r,t){ci.union([ci.number(),ci.string()]).parse(e),jK.parse(r),NK.parse(t)}var Jv=class{constructor(r){h(this,"mesh",new mi);h(this,"imageMesh");h(this,"outline");h(this,"type","image");h(this,"instanceIndex",-1);h(this,"geometry");h(this,"material");h(this,"feature");h(this,"position",new Ie);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)}};f();function LC(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 UK(e,r){return e.map(t=>LC(t,r))}function GK(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 zK(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 dB(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 $K(e,r,t){let n=e.maxX-e.minX,o=e.maxY-e.minY,i,a,u=k({},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 VK(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};zK(l,e)&&(i[a][u]=1)}return i}function HK(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)&&dB(e,o,n,a,a);a++)i=a;t[n][o]=i}return t}function ZK(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 p=Math.pow(r[c][d],2),m=t.minX+d*o,g=t.minY+c*i;a+=p,u+=m*p,l+=g*p}return{x:u/a,y:l/a}}function WK(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 p=0;p<c;p++)for(let m=0;m<c;m++)if(e[p][m]===1)for(let g=1;g<=c-m;g++){let y=g;if(!(y>c-p)&&dB(e,m,p,g,y)){let E=g*y,b=r.minX+(m+g/2)*t,v=r.minY+(p+y/2)*n,D={x:b,y:v},T=Math.sqrt(Math.pow(D.x-o.x,2)+Math.pow(D.y-o.y,2))/d,B=E*(1-i)-T*i*E;B>u&&(u=B,l={center:D,width:g*t*a,height:g*n*a})}}return l}function RC(e,r,t,n={}){let{scaleFactor:o=.9,centerPriority:i=.5,resolution:a=100,minimumSizeRatio:u=.5}=n,l=WD(t),c=e.width/e.height,d=UK(r,l),p=GK(d),{dx:m,dy:g,gridBounds:y}=$K(p,c,a),E=VK(d,y,a,m,g),b=HK(E,a),v=ZK(E,b,y,a,m,g),D=WK(E,y,m,g,v,i,o);return!D||D.width<e.width*u||D.height<e.height*u?e:oe(k({},D),{center:LC(D.center,-l),rotation:t,polygonCenter:LC(v,-l)})}f();var Ro={HIGH:1,MEDIUM:.5,LOW:.25,VERY_LOW:.125},Qa={[Ro.HIGH]:2048,[Ro.MEDIUM]:1024,[Ro.LOW]:512,[Ro.VERY_LOW]:256},pB={[Qa[Ro.HIGH]]:65280,[Qa[Ro.MEDIUM]]:16776960,[Qa[Ro.LOW]]:16753920,[Qa[Ro.VERY_LOW]]:16711680},Kv={HIGH:50,MEDIUM:100,LOW:250},fB="https://resize-worker.mappedin.com",mB=["cdn.mappedin.com","cdn.eu.mappedin.com"],NC=["resize-worker.mappedin.com","resize-worker-staging.mappedin.net"],jC=.01,Qv=1024;f();function Fg(e){try{let t=new URL(e).hostname;return mB.includes(t)||NC.includes(t)}catch(r){return!1}}function XK(e){try{let r=new URL(e);return NC.includes(r.hostname)}catch(r){return!1}}function hB(e,r){return XK(e)?e.replace(/\/resize:fit:\d+:\d+:(\d+)\//,"/resize:fit:".concat(r,":").concat(r,":$1/")):"".concat(fB,"/resize:fit:").concat(r,":").concat(r,":0/plain/").concat(e)}function Bg(e){return e<=Kv.HIGH?Qa[Ro.HIGH]:e<=Kv.MEDIUM?Qa[Ro.MEDIUM]:e<=Kv.LOW?Qa[Ro.LOW]:Qa[Ro.VERY_LOW]}function kg(e,r){return Fg(e)?e:"".concat(e,"|").concat(r!=null?r:Qv)}function ex(e,r){e.color=new mt(16777215),e.emissive=new mt(pB[r]),e.emissiveIntensity=.5,e.needsUpdate=!0}function tx(e){e.color=new mt(16777215),e.emissive=new mt(0),e.emissiveIntensity=0,e.needsUpdate=!0}var Lg=Math.PI*2,YK=Math.PI/2,qK=Math.PI*1.5,JK=Al(YK,2),KK=Al(qK,2),rx=class extends Xe{constructor(t,n,o,i=0,a=0,u={},l){super();h(this,"rendererState");h(this,"convertTo3DMapPosition");h(this,"projectToScreen");h(this,"initialBearing",0);h(this,"naturalBearing",0);h(this,"imagePlacementOptions");h(this,"cameraFrustum",new yp);h(this,"transformImageRequest");h(this,"cameraWorldPosition",new Ie);h(this,"debug",{lod:!1,imageContainers:!1});h(this,"cache",new Map);h(this,"currentImageScreenBBoxes",[]);h(this,"viewProjectionMatrix",new qt);h(this,"lastLODUpdateTime",-1);this.rendererState=t,this.convertTo3DMapPosition=n,this.projectToScreen=o,this.initialBearing=i,this.naturalBearing=a,this.imagePlacementOptions=u,this.transformImageRequest=l}get debugLOD(){return this.debug.lod}set debugLOD(t){let n=this.debug.lod!==t;this.debug.lod=t,n&&(t?this.applyDebugLODColors():this.resetDebugLODColors())}createImageMesh(t,n,o,i=0,a,u,l=Qv){var B,G,_,F;let c={width:o.width,height:o.height,center:this.convertTo3DMapPosition(a),rotation:(B=o.rotation)!=null?B:0},d=(G=this.imagePlacementOptions.mode)!=null?G:"default",p=(()=>{switch(d){case"fit-nearest-90":let A=(this.initialBearing-this.naturalBearing+360)%180;return A>=45&&A<=135?RC(c,u,c.rotation+90,this.imagePlacementOptions):c;case"fit-initial-bearing":return RC(c,u,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return c}})();if(this.debug.imageContainers&&p.polygonCenter){let A=new rt(new o1(1),new Ml({color:65280}));A.position.set(p.polygonCenter.x,p.polygonCenter.y,i),this.rendererState.geometryScene.add(A)}let m=new Ml({transparent:!0,depthWrite:!1,side:hs}),g=new xo(p.width,p.height),y=new qv(g);y.visible=!1,y.renderOrder=cn.IMAGE_MESH;let E=Fg(n),b=i+jC,v=this.rendererState.cameraObject.position.z,D=Math.abs(v-b),M=E?Bg(D):l,T=kg(n,l);if(this.cache.has(T)||this.cache.set(T,{lod:M,texture:null,pendingFetch:null,pendingFetchLOD:null,isResizable:E}),(F=(_=this.getOrDownloadImage(T,n,M))==null?void 0:_.then(A=>{m.map=A,m.needsUpdate=!0,m.map.colorSpace=Bc,y.visible=!0,this.publish("image-loaded")}))==null||F.catch(A=>{V.error("Failed to load image in createImageMesh",{cacheKey:T,url:n,error:A})}),y.userData.entityId=t,y.material=m,this.debug.imageContainers){let A=new rt(new xo(o.width,o.height),new Ml({color:"gray"}));y.add(A);let j=new VD;y.add(j),j.scale.set(10,10,10)}return y.position.set(p.center.x,p.center.y,i+jC),y.rotation.z=(-ft.degToRad(p.rotation)+Lg)%Lg,y}getOrDownloadImage(t,n,o=Qa[Ro.VERY_LOW]){let i=this.cache.get(t);if(!i){V.error("Cache entry must exist before calling getOrDownloadImage",{cacheKey:t,url:n});return}if(i.texture&&i.lod===o)return Promise.resolve(i.texture);if(i.pendingFetch&&i.pendingFetchLOD===o)return i.pendingFetch;if(i.pendingFetch&&i.pendingFetchLOD!==o)return;if(!i.isResizable&&i.texture)return Promise.resolve(i.texture);let a=i.texture;i.texture=null;let u=i.isResizable?hB(n,o):n,l=d=>new Promise((p,m)=>{gc.getLoader().load(d,g=>{try{i.isResizable?(g.colorSpace=Bc,i.texture=g):i.texture=this.createCappedTexture(g,o),i.lod=o,i.pendingFetch=null,i.pendingFetchLOD=null,a==null||a.dispose(),p(i.texture)}catch(y){V.error("Failed to process image texture",{url:n,error:y}),i.pendingFetch=null,i.pendingFetchLOD=null,a==null||a.dispose(),m(y)}},void 0,g=>{V.error("Failed to load image",{url:n,error:g}),i.pendingFetch=null,i.pendingFetchLOD=null,a==null||a.dispose(),m(g)})}),c=this.transformImageRequest?this.transformImageRequest(u).then(d=>l(d.url)):l(u);return i.pendingFetch=c,i.pendingFetchLOD=o,c}createCappedTexture(t,n){let o=t.image,i=o instanceof HTMLImageElement?o.naturalWidth:o.width,a=o instanceof HTMLImageElement?o.naturalHeight:o.height,u=Math.max(i,a);if(u<=n)return t.colorSpace=Bc,t;t.dispose();let l=n/u,c=Math.max(1,Math.floor(i*l)),d=Math.max(1,Math.floor(a*l)),p;typeof window<"u"&&window.OffscreenCanvas!=null&&!xv()?p=new OffscreenCanvas(c,d):(p=document.createElement("canvas"),p.width=c,p.height=d);let m=p.getContext("2d");if(!m)throw new Error("Failed to get 2D context for texture capping");m.drawImage(o,0,0,c,d);let g=new BD(p);return g.colorSpace=Bc,g.needsUpdate=!0,g}updateLODIfNeeded(t,n,o,i){var m,g;let a=kg(t,i),u=this.cache.get(a);if(!(u!=null&&u.isResizable))return;let l=Math.abs(this.cameraWorldPosition.z-o.z),c=Bg(l);this.debug.lod&&ex(n.material,c);let d=n.material,p=d.map!==u.texture;u.lod===c&&!p&&!u.pendingFetch||(g=(m=this.getOrDownloadImage(a,t,c))==null?void 0:m.then(y=>{d.map!==y&&(d.map=y,d.needsUpdate=!0,this.publish("image-loaded"))}))==null||g.catch(y=>{V.error("Failed to load image in updateLODIfNeeded",{cacheKey:a,url:t,error:y})})}applyDebugLODColors(){var t,n,o,i;this.rendererState.cameraObject.getWorldPosition(this.cameraWorldPosition);for(let a of this.rendererState.geometry3DsInScene)if(a.type==="image"){let u=a.components[0],l=a.components[1];if(((t=u==null?void 0:u.imageMesh)==null?void 0:t.material)instanceof Ml){let c=l==null?void 0:l.url;if(c&&Fg(c)){let d=Math.abs(this.cameraWorldPosition.z-u.imageMesh.position.z),p=Bg(d);ex(u.imageMesh.material,p)}else tx(u.imageMesh.material)}}else if(a.type==="geometry"){let u=a.components[0];if(((n=u==null?void 0:u.imageMesh)==null?void 0:n.material)instanceof Ml){let l=(i=(o=u.feature.properties)==null?void 0:o.image)==null?void 0:i.path;if(l&&Fg(l)){let c=Math.abs(this.cameraWorldPosition.z-u.imageMesh.position.z),d=Bg(c);ex(u.imageMesh.material,d)}else tx(u.imageMesh.material)}}}resetDebugLODColors(){var t;for(let n of this.rendererState.geometry3DsInScene){let o;n.type==="image"?o=n.components[0]:n.type==="geometry"&&(o=n.components[0]),((t=o==null?void 0:o.imageMesh)==null?void 0:t.material)instanceof Ml&&tx(o.imageMesh.material)}}flipIfNeeded(t,n){if(t.imageMesh==null)return;let o=-n,i=t.imageMesh.rotation.z,a=Al((i-o+Lg)%Lg,2);if(a>JK&&a<KK){let u=t.imageMesh.matrixWorldAutoUpdate===!1;u&&m1(t.imageMesh),t.imageMesh.rotation.z=(i+Math.PI)%Lg,t.imageMesh.updateMatrixWorld(),u&&E5(t.imageMesh)}}update(t,n,o){var l,c,d,p,m,g,y;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix),this.rendererState.cameraObject.getWorldPosition(this.cameraWorldPosition);let i=!n&&o!==this.lastLODUpdateTime;i&&(this.lastLODUpdateTime=o);let a,u;for(let E of this.rendererState.geometry3DsInScene)if(E.type==="image"){if(a=E.components[0],u=E.components[1],u.url&&a.imageMesh==null){let b=this.convertTo3DMapPosition(a.feature.geometry.coordinates),v={x:b.x,y:b.y};a.imageMesh=this.createImageMesh(E.id,u.url,a.feature.properties,a.feature.properties.verticalOffset,a.feature.geometry.coordinates,[v],u.maxImageSize),a.mesh.add(a.imageMesh),a.position.copy(a.imageMesh.position)}if(a.imageMesh){if(i&&u.url&&this.updateLODIfNeeded(u.url,a.imageMesh,a.position,u.maxImageSize),u.url&&!a.imageMesh.visible){let b=kg(u.url,u.maxImageSize),v=this.cache.get(b);if(v!=null&&v.texture){let D=a.imageMesh.material;D.map!==v.texture&&(D.map=v.texture,D.needsUpdate=!0),a.imageMesh.visible=!0}}u.flipImageToFaceCamera&&this.flipIfNeeded(a,t),a.imageMesh.material instanceof Ml&&u.dirty&&a.imageMesh.material.opacity!==u.opacity&&(a.imageMesh.material.opacity=u.opacity)}}else if((E==null?void 0:E.type)==="geometry"){if(a=E.components[0],u=E.components[1],u.showImage&&((l=a.feature.properties)!=null&&l.image)&&a.imageMesh==null&&a.visible&&a.mesh!=null&&a.mesh.parent!=null&&((c=a.feature.properties)==null?void 0:c.image.position)!=null&&a.feature.geometry.coordinates!=null&&a.feature.geometry.coordinates.length>0){let b=a.feature.geometry.coordinates[0].map(D=>{let M=this.convertTo3DMapPosition(D);return{x:M.x,y:M.y}}),v=this.createImageMesh(E.id,(d=a.feature.properties)==null?void 0:d.image.path,(p=a.feature.properties)==null?void 0:p.image,u.height+u.altitude,(m=a.feature.properties)==null?void 0:m.image.position,b,u.maxImageSize);a.mesh.parent.add(v),a.imageMesh=v}if(a.imageMesh){let b=(y=(g=a.feature.properties)==null?void 0:g.image)==null?void 0:y.path;if(i&&b&&this.updateLODIfNeeded(b,a.imageMesh,a.imageMesh.position,u.maxImageSize),!a.visible)a.imageMesh.visible=!1;else if(u.showImage&&!a.imageMesh.visible)if(b){let v=kg(b,u.maxImageSize),D=this.cache.get(v);if(D!=null&&D.texture){let M=a.imageMesh.material;M.map!==D.texture&&(M.map=D.texture,M.needsUpdate=!0),a.imageMesh.visible=!0}}else a.imageMesh.visible=!0;else!u.showImage&&a.imageMesh.visible&&(a.imageMesh.visible=!1);u.flipImageToFaceCamera&&this.flipIfNeeded(a,t),u.enableImageCollisions===!0&&this.updateImageScreenBBoxes(a)}}}destroy(){var t;for(let n of this.cache.values())(t=n.texture)==null||t.dispose();this.cache.clear(),super.destroy()}updateImageScreenBBoxes(t){if(t.imageMesh==null)return;let n=t.imageMesh.geometry.boundingBox;if(n==null&&(t.imageMesh.geometry.computeBoundingBox(),n=t.imageMesh.geometry.boundingBox),n){let o=new Ie;if(t.imageMesh.getWorldPosition(o),!this.cameraFrustum.containsPoint(o))return;let i=new ct;this.projectToScreen(i,o);let a=[new Ie(n.min.x,n.min.y,n.min.z),new Ie(n.max.x,n.min.y,n.min.z),new Ie(n.min.x,n.max.y,n.min.z),new Ie(n.max.x,n.max.y,n.min.z),new Ie(n.min.x,n.min.y,n.max.z),new Ie(n.max.x,n.min.y,n.max.z),new Ie(n.min.x,n.max.y,n.max.z),new Ie(n.max.x,n.max.y,n.max.z)],u=[];for(let g of a){let y=g.clone().applyMatrix4(t.imageMesh.matrixWorld),E=new ct;this.projectToScreen(E,y),u.push(E)}let l=1/0,c=1/0,d=-1/0,p=-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),p=Math.max(p,g.y);let m=new st(i.x,i.y,d-l,p-c);this.currentImageScreenBBoxes.push(m)}else V.warn("Bounding box for imageMesh does not exist.")}};f();f();function UC(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 QK(e,r){return!(e.maxX<r.minX||e.minX>r.maxX||e.maxY<r.minY||e.minY>r.maxY)}function eQ(e,r){if(!QK(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 gB(e,r){let t=eQ(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}f();function tQ(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 rQ(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,p=u*u+l*l;return d-p}return c>0?-1:1}),t}function nQ(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 yB(e){if(e.length<3)return e.map((i,a)=>({point:i,index:a}));let r=tQ(e),t=e.map((i,a)=>({point:i,index:a})),n=t[r];t.splice(r,1);let o=rQ(t,n.point);return nQ(o,n)}function Rg(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}f();function oQ(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 iQ(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 aQ(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 sQ(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 uQ(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 lQ(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 bB(e,r){for(let[t,n]of e)r.has(t)||(n.remove(),e.delete(t))}function vB(e,r,t,n,o,i){var c;let a=t.get(e);a||(a=oQ(e,n),t.set(e,a)),iQ(a,(c=r.clippedScreenBBox)!=null?c:r.screenBBox),aQ(a,o);let u=sQ(a),l=uQ(a);return lQ(u,l,e,o,i),a}function xB(){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 EB(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 IB(e,r){e.textContent=r}function SB(e,r){r!==void 0?e.textContent="Score: ".concat(r.toFixed(3)):e.textContent=""}f();function CB(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)CB(o,r,t)}function DB(e,r){let t=[];return e instanceof Ni&&CB(e,t,r),t}var Lm=.001;function TB(e){if(e.length===0)return[];let r=[],t=e[e.length-1],n=t.w>Lm;for(let o=0;o<e.length;o++){let i=e[o],a=i.w>Lm;if(a){if(!n){let u=(Lm-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:Lm})}r.push(i)}else if(n){let u=(Lm-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:Lm})}t=i,n=a}return r}function MB(e,r,t){if(e.length===0)return[];let n=e;return n=Rg(n,1,0,0),n=Rg(n,-1,0,r),n=Rg(n,0,1,0),n=Rg(n,0,-1,t),n}f();var nx=class{constructor(){h(this,"bbox");h(this,"center");h(this,"el",null);h(this,"labelEl",null);h(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=wm(n,r,t),u=a.left,l=a.top,c=r-a.left-a.right,d=t-a.top-a.bottom,p=new ct(u+c/2,l+d/2),g=c/2*(2-2/1.2)/2,y=Math.max(u,p.x-g),E=Math.min(r-a.right,p.x+g),b=Math.max(l,p.y-g),v=Math.min(t-a.bottom,p.y+g),D=(y+E)/2,M=(b+v)/2;if(this.bbox={minX:y,maxX:E,minY:b,maxY:v},this.center=new ct(D,M),o&&i){let{squareEl:T,labelEl:B,scoreLabelEl:G}=EB(this.bbox,i);this.el=T,this.labelEl=B,this.scoreLabelEl=G}}updateLabel(r){this.labelEl&&IB(this.labelEl,r)}updateScore(r){this.scoreLabelEl&&SB(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 cQ=250,vc,ox=class extends Xe{constructor(t,n){super();h(this,"cameraDirty",!0);h(this,"focusablesDirty",!0);h(this,"state");h(this,"camera");h(this,"cameraFrustum",new yp);h(this,"viewProjectionMatrix",new qt);h(this,"tempScreenPos",new Ie);h(this,"debugEl",null);h(this,"collisions",new Map);h(this,"focusableEntities",new Map);h(this,"debug",!1);h(this,"debugBBoxElements",new Map);h(this,"viewfinder",new nx);h(this,"screenBoundsMap",new Map);h(this,"screenDiagonal",1);w(this,vc);h(this,"update",(t=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!t&&(Date.now()-n>cQ||(s(this,vc)&&cancelAnimationFrame(s(this,vc)),O(this,vc,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=xB()),this.viewfinder.create(this.state.canvasWidth,this.state.canvasHeight,this.state.insetsPadding,this.debug,this.debugEl)}simplifyVertices(t){return t.length<3?t:yB(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(p=>({x:i[0]*p.x+i[4]*p.y+i[8]*p.z+i[12],y:i[1]*p.x+i[5]*p.y+i[9]*p.z+i[13],z:i[2]*p.x+i[6]*p.y+i[10]*p.z+i[14],w:i[3]*p.x+i[7]*p.y+i[11]*p.z+i[15]})),u=TB(a);if(u.length<3)return;let l=1/0,c=[];for(let p of u){let m=p.x/p.w,g=p.y/p.w;c.push({x:(m+1)/2*this.state.canvasWidth,y:(-g+1)/2*this.state.canvasHeight}),p.w<l&&(l=p.w)}let d=MB(c,this.state.canvasWidth,this.state.canvasHeight);if(!(d.length<=0))return{screenBBox:UC(c),clippedScreenBBox:this.debug?UC(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 Ni?u=o:"object3d"in o&&o.object3d instanceof Ni&&(u=o.object3d),u&&(t.vertices=this.simplifyVertices(DB(u,this.tempScreenPos)),t.boundingBox=new Nr().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)){bB(this.debugBBoxElements,t);for(let[o,i]of t){let a=n.has(o),u=this.collisions.get(o);vB(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=gB(u,this.viewfinder.bbox);if(l>0){t.push(o);let c=(u.minX+u.maxX)/2,d=(u.minY+u.maxY)/2,p=c-this.viewfinder.center.x,m=d-this.viewfinder.center.y,y=1/(1+Math.sqrt(p*p+m*m)/this.screenDiagonal),E=1/(1+Math.abs(a.closestZ)),b=y*.5+l*.35+E*.15;this.collisions.set(o,b)}}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,vc)&&cancelAnimationFrame(s(this,vc)),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()}};vc=new WeakMap;f();f();f();f();function ix(e,r){r===void 0&&(r={});var t=aa(e);switch(!r.properties&&e.type==="Feature"&&(r.properties=e.properties),t.type){case"Polygon":return dQ(t,r);case"MultiPolygon":return pQ(t,r);default:throw new Error("invalid poly")}}function dQ(e,r){r===void 0&&(r={});var t=aa(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{};return wB(n,o)}function pQ(e,r){r===void 0&&(r={});var t=aa(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{},i=[];return n.forEach(function(a){i.push(wB(a,o))}),Rc(i)}function wB(e,r){return e.length>1?o5(e,r):hu(e[0],r)}function fQ(e,r){var t=!0;return bs(e,function(n){bs(r,function(o){if(t===!1)return!1;t=mQ(n.geometry,o.geometry)})}),t}function mQ(e,r){switch(e.type){case"Point":switch(r.type){case"Point":return!bQ(e.coordinates,r.coordinates);case"LineString":return!AB(r,e);case"Polygon":return!Ha(e,r)}break;case"LineString":switch(r.type){case"Point":return!AB(e,r);case"LineString":return!hQ(e,r);case"Polygon":return!PB(r,e)}break;case"Polygon":switch(r.type){case"Point":return!Ha(r,e);case"LineString":return!PB(e,r);case"Polygon":return!gQ(r,e)}}return!1}function AB(e,r){for(var t=0;t<e.coordinates.length-1;t++)if(yQ(e.coordinates[t],e.coordinates[t+1],r.coordinates))return!0;return!1}function hQ(e,r){var t=wf(e,r);return t.features.length>0}function PB(e,r){for(var t=0,n=r.coordinates;t<n.length;t++){var o=n[t];if(Ha(o,e))return!0}var i=wf(r,ix(e));return i.features.length>0}function gQ(e,r){for(var t=0,n=e.coordinates[0];t<n.length;t++){var o=n[t];if(Ha(o,r))return!0}for(var i=0,a=r.coordinates[0];i<a.length;i++){var u=a[i];if(Ha(u,e))return!0}var l=wf(ix(e),ix(r));return l.features.length>0}function yQ(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 bQ(e,r){return e[0]===r[0]&&e[1]===r[1]}var _B=fQ;function GC(e,r){var t=!1;return bs(e,function(n){bs(r,function(o){if(t===!0)return!0;t=!_B(n.geometry,o.geometry)})}),t}var vQ=5e3,zC="outdoor-system-debug-container",OB=!1,rl,On,Ng,Rm,nl,Ys,ga,Nm,jg,jm,sx,ux,es,$C,Ug,Xd,FB,lx,cx,BB,kB,ax=class extends Xe{constructor(t){super();w(this,es);w(this,rl,!0);w(this,On);h(this,"idleQueue",new Zd);w(this,Ng,"");w(this,Rm,new Set);w(this,nl,new Set);w(this,Ys);w(this,ga,null);w(this,Nm,!1);w(this,jg,t=>{if(!s(this,On))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,On).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 q3(a,l),new q3(i,u)]});w(this,jm,(t,n)=>{if(!s(this,On))return;let o=s(this,On).on(t,n);o!=null&&o.unsubscribe&&this.onAbort(()=>o.unsubscribe())});w(this,sx,()=>{s(this,ga)&&(clearTimeout(s(this,ga)),O(this,ga,null),O(this,rl,!1))});w(this,ux,()=>{s(this,ga)&&(clearTimeout(s(this,ga)),O(this,ga,null)),O(this,ga,setTimeout(()=>{s(this,sx).call(this)},vQ))});w(this,Ug,async()=>{if(OB&&s(this,Ys)&&se(this,es,kB).call(this),!(!s(this,On)||!s(this,Nm))&&s(this,rl)&&!(!s(this,nl)||s(this,nl).size===0)&&(s(this,es,FB)&&s(this,lx).call(this),s(this,Ys))){let t=new Set;this.idleQueue.onComplete(()=>{s(this,Xd).length>0&&(s(this,nl).forEach(n=>{var o;(o=s(this,On))==null||o.setFilter(n,["all",...s(this,Xd)])}),O(this,rl,!1)),O(this,Xd,[])});for(let n of s(this,Ys)){let o=gu(n),i=s(this,jg).call(this,o),a=s(this,On).queryRenderedFeatures(i,{layers:Array.from(s(this,nl))});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=_l(u.geometry.coordinates):u.geometry.type==="MultiPolygon"&&(l=Dp(u.geometry.coordinates)),!l)return;GC(n,l)&&u.id!=null&&(t.add(u.id),s(this,Xd).push(["!=",["id"],u.id]))}})}}});w(this,Xd,[]);w(this,lx,()=>{this.idleQueue.clearAll()});w(this,cx,t=>{var n,o;if(s(this,On)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,Rm).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,Ng))&&(O(this,Ng,i),se(this,es,$C).call(this),O(this,rl,!0))}});t&&(O(this,On,t),s(this,jm).call(this,"styledata",s(this,cx)),s(this,jm).call(this,"render",s(this,Ug)),O(this,Nm,s(this,On).loaded()),s(this,jm).call(this,"load",()=>{O(this,Nm,!0)})),OB&&se(this,es,BB).call(this)}hideLayersIntersectingPolygons(t,n){s(this,ga)&&clearTimeout(s(this,ga)),s(this,ux).call(this),O(this,Ys,t.reduce((o,i)=>{if(i.geometry.type==="Polygon"){let a=_l(i.geometry.coordinates);o.push(a)}else i.geometry.type==="MultiPolygon"&&o.push(...i.geometry.coordinates.map(a=>_l(a)));return o},[]));for(let o of n)s(this,Rm).add(o);O(this,rl,!0),se(this,es,$C).call(this),s(this,Ug).call(this)}destroy(){this.idleQueue.clearAll(),super.destroy()}};rl=new WeakMap,On=new WeakMap,Ng=new WeakMap,Rm=new WeakMap,nl=new WeakMap,Ys=new WeakMap,ga=new WeakMap,Nm=new WeakMap,jg=new WeakMap,jm=new WeakMap,sx=new WeakMap,ux=new WeakMap,es=new WeakSet,$C=function(){if(O(this,nl,new Set),s(this,On))for(let t of s(this,Rm))s(this,On).getLayer(t)&&s(this,nl).add(t)},Ug=new WeakMap,Xd=new WeakMap,FB=function(){return this.idleQueue.size!==0},lx=new WeakMap,cx=new WeakMap,BB=function(){if(!document.getElementById(zC)&&s(this,On)){let t=document.createElement("div");t.id=zC,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,On).getContainer().appendChild(t)}},kB=function(){let t=document.getElementById(zC);if(!t||!s(this,Ys)||!s(this,On))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,Ys).length;o++){let i=s(this,Ys)[o],a=gu(i),u=s(this,jg).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,rl)?"red":"blue")}};f();f();f();f();var dx=class extends Tl{constructor(t,n={}){var v;super();h(this,"tangentData");h(this,"parameters");Object.defineProperty(this,"type",{value:"RibbonGeometry"}),this.parameters={path:t};let o=(v=n.segments)!=null?v:64,i=new Ie,a=new Ie,u=new Ie(0,0,1),l=(o+1)*2,c=new Float32Array(l*3),d=new Float32Array(l*3),p=new Float32Array(l*2),m=new Float32Array(l),g=[];this.tangentData=new Float32Array((o+1)*3);let y=0,E=0,b=0;for(let D=0;D<=o;D++){let M=D/o;t.getPointAt(M,i),t.getTangentAt(M,a);let T=D*3;this.tangentData[T]=a.x,this.tangentData[T+1]=a.y,this.tangentData[T+2]=a.z,c[y++]=i.x,c[y++]=i.y,c[y++]=i.z,c[y++]=i.x,c[y++]=i.y,c[y++]=i.z,m[b++]=-1,m[b++]=1,p[E++]=0,p[E++]=M,p[E++]=1,p[E++]=M;let B=D*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 D=0;D<o;D++){let M=D*2;g.push(M,M+2,M+1),g.push(M+1,M+2,M+3)}this.setIndex(g),this.setAttribute("position",new kc(c,3)),this.setAttribute("normal",new kc(d,3)),this.setAttribute("uv",new kc(p,2)),this.setAttribute("side",new kc(m,1))}};f();var px=class extends LD{constructor(t,n,o=!1){super();h(this,"innerCurve");h(this,"tStart");h(this,"tEnd");this.innerCurve=t,o&&n>=4?(this.tStart=1/(n-1),this.tEnd=(n-2)/(n-1)):(this.tStart=0,this.tEnd=1)}get points(){return this.innerCurve.points}get tension(){return this.innerCurve.tension}get isTrimmed(){return this.tStart!==0||this.tEnd!==1}getPoint(t,n=new Ie){let o=this.tStart+t*(this.tEnd-this.tStart);return this.innerCurve.getPoint(o,n)}};f();var fx="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 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 * nearRadius * 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 = nearRadius * (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";f();var VC="#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 borderUseDarken;\nuniform bool isRibbon;\n\n// Endcap uniforms for ribbon geometry\n// x = start cap enabled (>0), y = end cap enabled (>0)\nuniform vec2 endcapEnabled;\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\n // Apply rounded endcaps for ribbon geometry using SDF\n // endcapEnabled.x = start cap (>0 enabled), endcapEnabled.y = end cap (>0 enabled)\n // Creates semicircular caps at start and/or end; disabled caps are square\n float startCapOn = step(0.5, endcapEnabled.x);\n float endCapOn = step(0.5, endcapEnabled.y);\n if ((startCapOn > 0.5 || endCapOn > 0.5) && isRibbon) {\n float endcapRadius = radius / pathLength;\n float xDist = abs(fragTexcoord.x - 0.5);\n float scaledXSq = xDist * xDist * 4.0;\n\n // Start cap: only apply SDF when enabled\n float startT = clamp(1.0 - fragPathDistance / endcapRadius, 0.0, 1.0);\n float startSDF = startT * startT + scaledXSq - 1.0;\n float inStartCap = step(fragPathDistance, endcapRadius);\n float outsideStart = inStartCap * step(0.0, startSDF) * startCapOn;\n\n // End cap: only apply SDF when enabled\n float endCapPos = min(completeLocation, 1.0);\n float endCapStart = endCapPos - endcapRadius;\n float endT = clamp(1.0 - (endCapPos - fragPathDistance) / endcapRadius, 0.0, 1.0);\n float endSDF = endT * endT + scaledXSq - 1.0;\n float inEndCap = step(endCapStart, fragPathDistance);\n float outsideEnd = inEndCap * step(0.0, endSDF) * endCapOn;\n\n // Discard if outside semicircle in enabled cap region\n if (max(outsideStart, outsideEnd) > 0.5) 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\n // For endcaps, compute radial distance from semicircle edge instead\n float endcapRadius = radius / pathLength;\n float endCapPos = min(completeLocation, 1.0);\n float endCapStart = endCapPos - endcapRadius;\n\n // Check each cap region independently\n bool inStartRegion = fragPathDistance <= endcapRadius && startCapOn > 0.5;\n bool inEndRegion = fragPathDistance > endCapStart && endCapOn > 0.5;\n\n if (inStartRegion || inEndRegion) {\n float xDist = abs(fragTexcoord.x - 0.5);\n float scaledXSq = xDist * xDist * 4.0;\n\n if (inStartRegion) {\n float startT = 1.0 - fragPathDistance / endcapRadius;\n float r = sqrt(startT * startT + scaledXSq);\n edgeDist = 0.5 * (1.0 - r);\n } else {\n float endT = 1.0 - (endCapPos - fragPathDistance) / endcapRadius;\n float r = sqrt(endT * endT + scaledXSq);\n edgeDist = 0.5 * (1.0 - r);\n }\n }\n\n if (edgeDist < borderWidth) {\n finalColor = borderUseDarken ? finalColor * 0.6 : 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";f();var LB="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 RB="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==";f();var mx=new Ie,hx=new Ie,Um=new Ie,NB=new Ie,xc=new Ie,EQ=.5,IQ=2;function SQ(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),p=Math.sqrt(a*a+u*u+l*l);if(d===0||p===0)return 0;let m=c/(d*p),g=Math.max(-1,Math.min(1,m));return Math.acos(g)}function UB(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&&(xc.subVectors(a,u).normalize(),Um.set(a.x-xc.x*n,a.y-xc.y*n,a.z-xc.z*n),o.push(Um.clone())),o.push(a),d>t&&(xc.subVectors(l,a).normalize(),Um.set(a.x+xc.x*n,a.y+xc.y*n,a.z+xc.z*n),o.push(Um.clone()))}return o.push(e[e.length-1]),o}var jB=.0025;function GB(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<jB||d<jB){o.push(u);continue}if(SQ(a,u,l)<n){mx.subVectors(u,a).normalize(),hx.subVectors(l,u).normalize();let m=Math.sqrt(c),g=Math.sqrt(d),y=Math.max(EQ,Math.min(IQ,r)),E=Math.min(y,m*.5),b=Math.min(y,g*.5);Um.set(u.x-mx.x*E,u.y-mx.y*E,u.z-mx.z*E),NB.set(u.x+hx.x*b,u.y+hx.y*b,u.z+hx.z*b),o.push(Um.clone(),NB.clone())}else o.push(u)}return o.push(e[e.length-1]),o}var Yd=8,HC=hs,CQ=new i1,gx=new Ie;function ZC(e,r){e.stencilWrite=r,r&&(e.stencilRef=vu.PATH,e.stencilFunc=su,e.stencilZPass=Ri,e.stencilZFail=Dn,e.stencilFail=Dn)}function $B(e,r,t){var fe,ae,Te,ne,me,Ae,je;if(e.length<2){let he=new mi;return he.userData={entityId:"",type:"path"},{mesh:he,material:null,center:new Ie}}let{breakpoint:n,width:o,accentColor:i,completeFraction:a,isVertical:u,visibleThroughGeometry:l,dashed:c,highlightCompleteFraction:d,highlightStartFraction:p,highlightEndFraction:m,highlightColor:g,highlightWidthMultiplier:y,xrayOpacity:E,__EXPERIMENTAL_BILLBOARDING:b,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:v}=r,{color:D}=t,M=!0,T=0,B=1/0,G=r.displayArrowsOnPath,_=!0,F=G,A=typeof o=="object"?Number(o.output[n])/2:o/2,j=typeof o=="object"?Number((fe=o.output[n+1])!=null?fe:o.output[n])/2:o/2,N=r.__EXPERIMENTAL_GEOMETRY==="ribbon",Z=N&&b,ie=((ae=t.altitude)!=null?ae:0)+DQ,de=0;e[0].z+=ie;for(let he=1;he<e.length;++he){e[he].z+=ie;let Se=e[he].x-e[he-1].x,Fe=e[he].z-e[he-1].z;if(u)de+=Math.sqrt(Se*Se+Fe*Fe);else{let Ft=e[he].y-e[he-1].y;de+=Math.sqrt(Se*Se+Ft*Ft+Fe*Fe)}}let J=e,z=(Te=r.smoothingCornerRadius)!=null?Te:Ui.cornerRadius,X=(ne=r.smoothingTension)!=null?ne:Ui.tension,W=z>0&&X>0;W&&(J=UB(J),J=GB(J,z,X));let[ee,ce]=r.__EXPERIMENTAL_ENDCAP_EXTENSION;if((ee>0||ce>0)&&!u&&!N){let he=J[0],Se=J[J.length-1],Fe=W?.01:-.01;J.push(Se.clone().setZ(Se.z+Fe)),J.unshift(he.clone().setZ(he.z+Fe))}if(N&&!u&&J.length>=2){if(ee>0){let he=J[0],Se=J[1];gx.subVectors(Se,he).normalize();let Fe=he.clone().addScaledVector(gx,-ee);J.unshift(Fe)}if(ce>0){let he=J[J.length-1],Se=J[J.length-2];gx.subVectors(he,Se).normalize();let Fe=he.clone().addScaledVector(gx,ce);J.push(Fe)}}let Ce=new wD;F&&(Ce=CQ.load(RB),Ce.colorSpace=Bc);let Pe=new mt(D),Le=new mt(i),be=r.__EXPERIMENTAL_BORDER,He=(me=be==null?void 0:be.enabled)!=null?me:!1,tt=(be==null?void 0:be.color)==="darken",lt=(Ae=be==null?void 0:be.width)!=null?Ae:.1,U=tt?Pe.clone().multiplyScalar(.6):new mt((je=be==null?void 0:be.color)!=null?je:"#000000"),ve={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new ct(1,1)},cameraParameters:{type:"v2",value:new ct(T,0)},complete:{type:"f",value:M?0:1},color:{type:"c",value:Pe},pathLength:{type:"f",value:de},nearRadius:{type:"f",value:A},farRadius:{type:"f",value:j},nearZoom:{type:"f",value:T},farZoom:{type:"f",value:B},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:Ce},displayArrowsOnPath:{type:"b",value:G},showPulse:{type:"b",value:_},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:c},highlightCompleteFraction:{type:"f",value:d},highlightStartFraction:{type:"f",value:p},highlightEndFraction:{type:"f",value:m},highlightColor:{type:"c",value:new mt(g)},highlightWidthMultiplier:{type:"f",value:y},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:N},billboarded:{type:"b",value:b},borderEnabled:{type:"b",value:He},borderColor:{type:"c",value:U},borderWidth:{type:"f",value:lt},borderUseDarken:{type:"b",value:tt},endcapEnabled:{type:"v2",value:new ct(N&&ee>0?1:0,N&&ce>0?1:0)},cameraViewMatrix:{type:"m4",value:new qt}};if(W&&J.length>=2){let he=J[0],Se=J[1],Fe=J[J.length-1],Ft=J[J.length-2],Vr=he.clone().sub(Se).normalize(),vr=he.clone().add(Vr.multiplyScalar(zB));J.unshift(vr);let Jr=Fe.clone().sub(Ft).normalize(),Yt=Fe.clone().add(Jr.multiplyScalar(zB));J.push(Yt)}let Y=new RD(J);Y.curveType="catmullrom",Y.tension=W?X:0;let we=N&&W,De=new px(Y,J.length,we),xe=TQ*J.length,Ne=N?new dx(De,{segments:xe,billboarded:Z}):new jD(De,xe,A,Yd,!1),Rt=new Float32Array(Ne.attributes.position.count),Ht=new Wo(Rt,1);if(N)for(let he=0;he<=xe;he++){let Se=he/xe;Ht.setX(he*2,Se),Ht.setX(he*2+1,Se)}else for(let he=0;he<=xe;he++){let Se=he/xe;for(let Fe=0;Fe<=Yd;Fe++)Ht.setX(he*(Yd+1)+Fe,Se)}Ne.setAttribute("pathDistance",Ht);let Zt=new Float32Array(Ne.attributes.position.count*3),Wt=new Wo(Zt,3),Rr,qr,go,yo,qn;if(N){let he=Ne;for(let Se=0;Se<=xe;Se++)qr=Se*3,go=he.tangentData[qr],yo=he.tangentData[qr+1],qn=he.tangentData[qr+2],Wt.setXYZ(Se*2,go,yo,qn),Wt.setXYZ(Se*2+1,go,yo,qn)}else{let he=Ne;for(let Se=0;Se<=xe;Se++){Rr=he.tangents[Se];for(let Fe=0;Fe<=Yd;Fe++)Wt.setXYZ(Se*(Yd+1)+Fe,Rr.x,Rr.y,Rr.z)}}Ne.setAttribute("pathTangent",Wt);let yr=new Float32Array(Ne.attributes.position.count*3),Cn=new Wo(yr,3),$o,fi,bo,br=new Ie,H=he=>{u?($o=he.x*he.y,fi=-1+he.y*he.y,bo=he.z*he.y):($o=-he.x*he.z,fi=-he.y*he.z,bo=1-he.z*he.z);let Se=Math.sqrt($o*$o+fi*fi+bo*bo);return Se===0&&(Se=1),br.set($o/Se,fi/Se,bo/Se),br},S={x:0,y:0,z:0};if(N){let he=Ne;for(let Se=0;Se<=xe;Se++)qr=Se*3,S.x=he.tangentData[qr],S.y=he.tangentData[qr+1],S.z=he.tangentData[qr+2],H(S),Cn.setXYZ(Se*2,br.x,br.y,br.z),Cn.setXYZ(Se*2+1,br.x,br.y,br.z)}else{let he=Ne;for(let Se=0;Se<=xe;Se++){Rr=he.tangents[Se],H(Rr);for(let Fe=0;Fe<=Yd;Fe++)Cn.setXYZ(Se*(Yd+1)+Fe,br.x,br.y,br.z)}}Ne.setAttribute("pathNormal",Cn);let C=new ji({uniforms:ve,vertexShader:fx,fragmentShader:VC,side:HC});C.transparent=!0,C.alphaTest=.5,ve.resolution.value.x=1,ve.resolution.value.y=1,ve.vertexes.value=Ne.attributes.position.count,ve.arrowTexture.value.wrapS=gh,ve.arrowTexture.value.wrapT=gh,ve.arrowTexture.value.anisotropy=16;let P=new rt(Ne,C);P.name="path";let L=P.clone();L.name="xray";let R=oe(k({},ve),{opacityMultiplier:{type:"f",value:E},pathIsVertical:{type:"b",value:u}});R.complete.value=1,L.material=new ji({uniforms:R,vertexShader:fx,fragmentShader:VC,side:HC}),L.material.transparent=!0,L.material.alphaTest=.5,L.material.depthWrite=!1,L.material.depthTest=!1,ZC(L.material,v),R.resolution.value.x=1,R.resolution.value.y=1,R.vertexes.value=Ne.attributes.position.count,R.arrowTexture.value.wrapS=gh,R.arrowTexture.value.wrapT=gh,R.arrowTexture.value.anisotropy=16,R.complete.value=a,P.userData=L.userData=r.mesh.userData;let K=r.mesh;if(!l){let he=new ji({uniforms:ve,vertexShader:fx,fragmentShader:LB,side:HC}),Se=new rt(Ne,he);Se.name="stencil",Se.material.colorWrite=!1,Se.material.stencilWrite=!0,Se.material.stencilRef=vu.PATH,Se.material.stencilFunc=hp,Se.material.stencilZPass=Ri,Se.material.stencilZFail=Dn,Se.material.stencilFail=Dn,Se.material.depthWrite=!1,Se.material.depthTest=!0,Se.userData=r.mesh.userData,K.add(Se),K.add(L),L.renderOrder=cn.XRAY_PATH,P.renderOrder=cn.STENCIL_PATH}if(K.add(P),u){let he=new Nr().setFromObject(P),Se=new Ie;he.getCenter(Se),K.children.forEach(Fe=>{Fe.geometry.center(),Fe.position.copy(Se)})}l&&(P.material.stencilWrite=!0,P.material.stencilRef=vu.PATH,P.material.stencilFunc=su,P.material.stencilZPass=Dn,P.material.stencilZFail=Dn,P.material.stencilFail=Dn,P.material.needsUpdate=!0,P.layers.disableAll(),P.layers.enable(cn.ALWAYS_ON_TOP_PATHS)),Ne.computeBoundingBox();let re=new Ie;return Ne.boundingBox.getCenter(re),{mesh:K,material:C,center:re}}var DQ=.15,TQ=30,zB=.01;var MQ=.5,Gg=class extends Xe{constructor(t,n,o,i){super();h(this,"rendererState");h(this,"verticalDistanceDirty",!0);h(this,"convertTo3DMapPosition");h(this,"getParentContainer");h(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 fc))continue;let d=[];if(u.dirty||l.dirty||c){if(u.mesh.parent!=null)for(let p=u.mesh.children.length-1;p>=0;p--)Qr(u.mesh.children[0]);if(u.feature.features.length===2&&u.feature.features[0].properties.parentId&&u.feature.features[1].properties.parentId){let p=u.feature.features[0],m=u.feature.features[u.feature.features.length-1],g,y,E=p.geometry.coordinates[2]||0,b=m.geometry.coordinates[2]||0;p.properties.parentId&&(g=this.getParentContainer(p.properties.parentId,!0),g!=null&&g.altitude!=null&&(E+=g.altitude,u.isVertical=!0)),m.properties.parentId&&(y=this.getParentContainer(m.properties.parentId,!0),y!=null&&y.altitude!=null&&(b+=y.altitude,u.isVertical=!0));let v=this.convertTo3DMapPosition(p.geometry.coordinates[1],p.geometry.coordinates[0],E),D=this.convertTo3DMapPosition(m.geometry.coordinates[1],m.geometry.coordinates[0],b);Math.abs(v.z-D.z)>MQ&&g!=null&&g.visible&&y!=null&&y.visible&&(d=[v,D])}else{let p=u.feature.features;for(let m=0;m<p.length;m++)if(m===0||!g5(p[m].geometry.coordinates,p[m-1].geometry.coordinates)){let g=this.convertTo3DMapPosition(p[m].geometry.coordinates[1],p[m].geometry.coordinates[0],p[m].geometry.coordinates[2]||0);d.push(g)}}if(d.length>1){let{mesh:p,material:m,center:g}=$B(d,u,{color:l.color,altitude:l.altitude,isVertical:u.isVertical});u.mesh=p,u.material=m,u.position=g}u.dirty&&typeof u.width=="object"&&u.width.on==="zoom-level"&&(u.altitudeBreakpoints=u.width.input.map(p=>this.convertZoomLevelToAltitude(p))),u.dirty=!1}l.dirty&&(u.mesh.children.forEach(p=>{if(p.name==="stencil")return;p.material.uniforms.color.value.set(l.color),p.material.visible=l.visible,p.material.needsUpdate=!0;let m=u.__EXPERIMENTAL_BORDER;(m==null?void 0:m.color)==="darken"&&p.material.uniforms.borderColor.value.copy(p.material.uniforms.color.value).multiplyScalar(.6)}),u.mesh.position.z=l.altitude,l.dirty=!1),u.material&&(u.mesh.children.forEach(p=>{var g,y,E,b,v,D,M,T,B,G;let m=p.material.uniforms;if(p.name==="stencil"){u.materialDirty&&VB(u,p.material);return}if(u.materialDirty&&p.name==="xray"&&m.opacityMultiplier&&(m.opacityMultiplier.value=u.xrayOpacity,ZC(p.material,u.__EXPERIMENTAL_PREVENT_SELF_OVERLAP)),typeof u.width=="object"&&u.width.on==="zoom-level"){u.altitudeBreakpoints&&u.altitudeBreakpoints.length>2&&V.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 _=t5(o,(y=(g=u.altitudeBreakpoints)==null?void 0:g.slice(0,2))!=null?y:[t,n]);u.breakpoint=_,m.nearZoom.value=(b=(E=u.altitudeBreakpoints)==null?void 0:E[_])!=null?b:t,m.farZoom.value=(D=(v=u.altitudeBreakpoints)==null?void 0:v[_+1])!=null?D:n,m.nearRadius.value=Number(u.width.output[_])/2,m.farRadius.value=Number((M=u.width.output[_+1])!=null?M:u.width.output[_])/2}if(m.cameraParameters.value.x=o,m.cameraViewMatrix.value.copy(this.rendererState.cameraObject.matrixWorldInverse),u.materialDirty){m.displayArrowsOnPath.value=u.displayArrowsOnPath,m.pulseColor.value.set(u.accentColor),m.complete.value=u.completeFraction,VB(u,p.material),m.dashed.value=u.dashed,m.dashLength.value=u.dashLength,m.dashGap.value=u.dashGap,m.dashRelativeToWidth.value=u.dashRelativeToWidth,m.dashSize.value=u.dashSize,m.gapSize.value=u.gapSize,m.dashAbsolute.value=u.dashAbsolute,m.dashMeters.value=u.dashMeters,m.gapMeters.value=u.gapMeters;let _=u.__EXPERIMENTAL_BORDER;m.borderEnabled.value=(T=_==null?void 0:_.enabled)!=null?T:!1,m.borderWidth.value=(B=_==null?void 0:_.width)!=null?B:.1,(_==null?void 0:_.color)==="darken"?m.borderColor.value.copy(m.color.value).multiplyScalar(.6):m.borderColor.value.set((G=_==null?void 0:_.color)!=null?G:"#000000"),m.borderUseDarken.value=(_==null?void 0:_.color)==="darken",m.billboarded.value=u.__EXPERIMENTAL_BILLBOARDING;let[F,A]=u.__EXPERIMENTAL_ENDCAP_EXTENSION;m.endcapEnabled.value=new ct(F>0?1:0,A>0?1:0),typeof u.width=="number"&&(m.nearZoom.value=t,m.farZoom.value=n,m.nearRadius.value=Number(u.width)/2,m.farRadius.value=Number(u.width)/2)}}),u.displayArrowsOnPath&&u.animateArrowsOnPath&&(u.mesh.children.forEach(p=>{p.name!=="stencil"&&(p.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,p.material.needsUpdate=!0)}),i=!0),u.materialDirty=!1)}this.verticalDistanceDirty=!1,i&&this.publish("animate:path")}};function VB(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)}f();var Xr,Gm,ts,bx,yx=class{constructor(r){h(this,"rendererState");h(this,"dirty",!1);w(this,Xr);w(this,Gm);w(this,ts);w(this,bx,new qt);this.rendererState=r}updateOne(r){if(r instanceof Jt&&r.components[0]instanceof dn&&r.components[1]instanceof xs&&r.parentObject3D instanceof Qn&&(O(this,Xr,r.components[0]),O(this,ts,r.components[1]),!s(this,Xr).detached&&s(this,Xr).shouldDetach&&s(this,Xr).mesh!=null&&s(this,Xr).material!=null&&s(this,Xr).batchedProps!=null)){O(this,Gm,r.parentObject3D),s(this,Xr).visible=!1;let t=s(this,ts).color,n=s(this,ts).opacity*wp(r),o=s(this,Xr).material,i=n!=null?n:1,a=o.clone({color:t,side:k5(s(this,ts).side,i),opacity:i,transparent:i<1}),u=new mT(1,s(this,Xr).batchedProps.positionCount,0,a);u.layers.enable(Yo.SHOULD_CAST_SHADOWS);let l=P8(s(this,Xr),u,s(this,bx));if(l==null)return;u.userData={entities:{0:r.id},detached:!0},s(this,Xr).instanceIndex=l,a.setColor(s(this,Xr).instanceIndex,new mt(t),s(this,ts).topColor?new mt(s(this,ts).topColor):new mt(t)),s(this,Xr).mesh=u,s(this,Xr).currentHeight=-1,s(this,Xr).material=a,s(this,Gm).add(u),s(this,Xr).shouldDetach=!1,s(this,Xr).detached=!0,s(this,ts).dirty=!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(){O(this,Xr,void 0),O(this,Gm,void 0),O(this,ts,void 0)}};Xr=new WeakMap,Gm=new WeakMap,ts=new WeakMap,bx=new WeakMap;f();f();var Ec=new qt,zg=new Ie,vx=new gp,$g=new Ie;function HB(e,r,t){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh&&e.instanceIndex!==-1){let o=r||1e-4,i=o/Math.max(t,1e-4);return e.mesh.getMatrixAt(e.instanceIndex,Ec),Ec.decompose(zg,vx,$g),$g.z=i,Ec.compose(zg,vx,$g),e.mesh.setMatrixAt(e.instanceIndex,Ec),e.material&&(e.material.repeatYFactor=i),e.currentHeight=o,!0}return!1}function ZB(e,r){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,Ec),Ec.decompose(zg,vx,$g),zg.z=r,Ec.compose(zg,vx,$g),e.mesh.setMatrixAt(e.instanceIndex,Ec),e.altitude=r,!0):!1}var rs,qs,xx=class{constructor(r){h(this,"rendererState");h(this,"dirty",!1);w(this,rs);w(this,qs);this.rendererState=r}updateOne(r){var t;if(r instanceof Jt&&r.type==="geometry"&&((t=r.components[1])!=null&&t.dirty)&&(O(this,rs,r.components[0]),O(this,qs,r.components[1]),r.type==="geometry")){let n=!1;s(this,qs).height!==s(this,rs).currentHeight&&(n=HB(s(this,rs),s(this,qs).height,s(this,qs).initialHeight)),s(this,qs).altitude!==s(this,rs).altitude&&(n=ZB(s(this,rs),s(this,qs).altitude)),n&&s(this,rs).mesh!=null&&s(this,rs).mesh.computeBoundingSphere()}}update(){for(let r of this.rendererState.geometry3DsInScene)this.updateOne(r);this.cleanup()}cleanup(){O(this,rs,void 0),O(this,qs,void 0)}};rs=new WeakMap,qs=new WeakMap;f();var wQ={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1,showGeometryInFocus:!1,showImageLOD:!1,showModelInstancingStats:!1,showScreenOffsets:!1,showCameraTargets:!1},Ex=class{constructor(r){h(this,"state",wQ);h(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()),r.showImageLOD!=null&&(this.core.getSystems().imageSystem.debugLOD=r.showImageLOD,this.core.render()),r.showModelInstancingStats!=null&&(r.showModelInstancingStats?this.core.getSystems().modelSystem.showDebug():this.core.getSystems().modelSystem.hideDebug()),r.showScreenOffsets!=null&&(r.showScreenOffsets?this.core.camera.showScreenOffsetsDebug():this.core.camera.hideScreenOffsetsDebug()),r.showCameraTargets!=null&&(r.showCameraTargets?this.core.camera.showCameraTargetsDebug():this.core.camera.hideCameraTargetsDebug())}};f();var Vg=9,AQ=!1,WB=.1;function PQ(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 Ix=class{constructor(r,t,n){h(this,"state");h(this,"renderer");h(this,"renderService");h(this,"pickingTexture");h(this,"pickingMaterial");h(this,"pixelBuffer");h(this,"width",0);h(this,"height",0);h(this,"scale",1/2);h(this,"color",1);h(this,"convertTo3DMapPosition");h(this,"destroyed",!1);h(this,"enabled",!1);h(this,"backgroundId",16777215);h(this,"resize",()=>{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 bh(this.width,this.height,{format:CD,type:ID,internalFormat:"RGBA"})});h(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});h(this,"activeOccluders",new Set);h(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=hv(r,this.convertTo3DMapPosition,{color:"white",height:WB});t=this.createOccluderMesh(i,o.userData.occluderId),o.add(t)}else if(r.geometry.type==="MultiPolygon"){let i=gv(r,this.convertTo3DMapPosition,{color:"white",height:WB});t=this.createOccluderMesh(i,o.userData.occluderId),o==null||o.add(t)}o.userData.occluderDirty=!1}this.renderer.setRenderTarget(this.pickingTexture);let n=new mt(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(Vg),this.renderService.renderScene(this.state.geometryScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(Vg),AQ?this.renderService.enabledLayers.add(Vg):this.renderService.enabledLayers.delete(Vg),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||V.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 ji({glslVersion:MD,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);PQ(o,n.count,t),r.setAttribute("color",new Wo(o,3))}createOccluderMesh(r,t){let n=new rt(r,this.pickingMaterial);return n.layers.set(Vg),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}};f();var Sx=class{constructor(r){this.state=r;h(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 Jt&&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}}};f();var Cx=class extends Xe{constructor(t){super();h(this,"dirty",!0);h(this,"state");h(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)=>{gc.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 Jt))continue;let n=t.components[6];if(!(n instanceof jc))continue;let o=t.components[0];if(!(o instanceof dn)||!n.dirty)continue;let i=Th(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()}};f();var Dx=class{constructor(r){h(this,"currentOrder",cn.ALWAYS_ON_TOP_MODELS);h(this,"assignedOrders",new WeakMap);h(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),cn.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(r){return this.assignedOrders.get(r)}update(){let r,t;for(let n of this.state.geometry3DsInScene)if(n&&n.type==="model"&&(r=n.components[1],r!=null&&r.renderOrderDirty)){if(t=n.components[0],!t.mesh)continue;if(t.visibleThroughGeometry=r.visibleThroughGeometry,r.visibleThroughGeometry===!0){let o=this.assignOrder(t);t.renderOrder=o,this.applyRenderOrder(t)}else t.renderOrder>cn.GEOMETRY&&(t.renderOrder=this.releaseOrder(t),this.applyRenderOrder(t));r.renderOrderDirty=!1}}applyRenderOrder(r){var o;if(!r.mesh)return;let t=r.renderOrder,n=r.visibleThroughGeometry;if(r.mesh.children[0]instanceof rr){r.mesh.renderOrder=t;for(let a of r.mesh.children)a instanceof rr&&(a.renderOrder=t);if((o=r.mesh.userData)==null?void 0:o.detached)for(let a of r.mesh.children)a instanceof rr&&(Array.isArray(a.material)?a.material.forEach(u=>{u.depthWrite=!n,u.depthTest=!n,n&&(u.transparent=!0),u.needsUpdate=!0}):(a.material.depthWrite=!n,a.material.depthTest=!n,n&&(a.material.transparent=!0),a.material.needsUpdate=!0))}else r.mesh.traverse(i=>{let a=i;"isMesh"in a&&a.isMesh===!0&&a.material&&(a.renderOrder=t,Array.isArray(a.material)?a.material.forEach(u=>{u.depthWrite=!n,u.depthTest=!n,n&&(u.transparent=!0),u.needsUpdate=!0}):(a.material.depthWrite=!n,a.material.depthTest=!n,n&&(a.material.transparent=!0),a.material.needsUpdate=!0))})}};f();var Mx=class Mx{constructor(r){h(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"&&(!_g(t,this.state)||Hv(t)&&_g(t,this.state))&&(r=t.components[0],r!=null&&r.dirty&&(t.traverse(n=>{(n instanceof rt||n instanceof bp)&&n.material instanceof _D&&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=hp,r.stencilZPass=Ri,r.stencilZFail=Dn,r.stencilFail=Dn,r.needsUpdate=!0,r.depthWrite=!1,t.userData.originalTransparent===void 0&&(t.userData.originalTransparent=r.transparent),r.transparent=!1,t.layers.disableAll(),t.layers.set(cn.GEOMETRY),t.userData.originalRenderOrder===void 0&&(t.userData.originalRenderOrder=t.renderOrder),t.renderOrder=Mx.MASK_RENDER_ORDER}enableMaskReciever(r,t){r.stencilWrite=!0,r.stencilRef=t.maskId,r.stencilFunc=t.effect==="reveal"?TD:su,r.stencilZPass=Dn,r.stencilZFail=Dn,r.stencilFail=Dn,r.needsUpdate=!0}disableMask(r,t){r.stencilWrite=!1,r.colorWrite=!0,t.userData.originalTransparent!==void 0&&(r.transparent=t.userData.originalTransparent,delete t.userData.originalTransparent),r.needsUpdate=!0,t.layers.disableAll(),t.layers.set(cn.GEOMETRY),t.userData.originalRenderOrder!==void 0&&(t.renderOrder=t.userData.originalRenderOrder,delete t.userData.originalRenderOrder)}};h(Mx,"MASK_RENDER_ORDER",-1e3);var Tx=Mx;f();var XB=1e4,wx=class{constructor(r){h(this,"rendererState");h(this,"dirty",!1);this.rendererState=r}update(){var o;let r,t,n;for(let i of this.rendererState.geometry3DsInScene)if(t=i.components[0],n=i.components[1],r=i.components[7],i.type==="model"&&r!=null&&(n!=null&&n.EXPERIMENTAL_clippingEnabled)&&(r.dirty&&t.mesh!=null&&(r.plane==null&&(r.plane=new FD(new Ie(0,0,-1),r.verticalOffset),this.process(t,r)),r.plane.constant!==r.verticalOffset&&(r.plane.constant=r.verticalOffset),r.topColor!=null&&((o=r.holeFillMesh)==null?void 0:o.material)instanceof vh&&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 a=r.plane,u=r.holeFillMesh;a.coplanarPoint(u.position),u.lookAt(u.position.x-a.normal.x,u.position.y-a.normal.y,u.position.z-a.normal.z)}}process(r,t){var m;if(r.mesh==null)return;let n=r.mesh.parent,o=[];r.mesh.traverse(g=>{var y;if(g instanceof rt){let E=g.geometry.clone();if(g instanceof rr){let b=(y=r.instanceIndex)!=null?y:0,v=new qt;g.getMatrixAt(b,v),E.applyMatrix4(v)}else g.updateWorldMatrix(!0,!1),E.applyMatrix4(g.matrixWorld);o.push(E),E.computeVertexNormals(),g.material.clippingPlanes=[t.plane]}});let i=Gi(o),a=new t1,u=new t1,l=new xo(XB,XB),c=this.createHoleFillGeometry(i,l,t.plane,1);c.name="hole-fill-group";let d=new vh({color:(m=t.topColor)!=null?m:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilRef:vu.CLIPPING_BASELINE,stencilFunc:su,stencilFail:Ri,stencilZFail:Ri,stencilZPass:Ri}),p=new rt(l,d);p.name="hole-fill-mesh",t.holeFillMesh=p,p.renderOrder=1.1,u.add(c),u.add(r.mesh),a.add(u),a.add(p),n==null||n.add(a),r.mesh=a}createHoleFillGeometry(r,t,n,o=0){let i=new t1,a=new kn;a.depthWrite=!1,a.depthTest=!1,a.colorWrite=!1,a.stencilWrite=!0,a.stencilFunc=hp;let u=a.clone();u.side=hs,u.stencilRef=vu.CLIPPING_BASELINE,u.stencilFail=Ri,u.stencilZFail=Ri,u.stencilZPass=Ri;let l=new rt(t,u);l.renderOrder=o-.1,i.add(l);let c=a.clone();c.side=vD,c.clippingPlanes=[n],c.stencilFail=Qy,c.stencilZFail=Qy,c.stencilZPass=Qy;let d=new rt(r,c);d.renderOrder=o,i.add(d);let p=a.clone();p.side=Ky,p.clippingPlanes=[n],p.stencilFail=e1,p.stencilZFail=e1,p.stencilZPass=e1;let m=new rt(r,p);return m.renderOrder=o,i.add(m),i}};f();var Ax=class{constructor(){h(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)}};f();var Px=class{constructor(r){h(this,"type","occlusion2d");h(this,"enabled",!0);h(this,"id");this.id=r}};f();f();f();var YB="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";f();var WC="uniform sampler2D shadowMap;\nuniform mat4 lightMatrix;\nuniform float shadowBias;\nuniform float shadowOpacity;\nuniform vec3 baseColor;\nuniform float shadowMapSize;\nuniform float pcfSpread;\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// Compile-time sample count for loop unrolling (injected via material)\n#ifndef PCF_SAMPLES\n#define PCF_SAMPLES 4\n#endif\n\n// Poisson disk samples - only define what we need based on sample count\n#if PCF_SAMPLES <= 4\nconst vec2 poissonDisk[4] = 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);\n#elif PCF_SAMPLES <= 8\nconst vec2 poissonDisk[8] = 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);\n#else\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#endif\n\n/**\n * Samples the shadow map using PCF (Percentage Closer Filtering)\n * Uses compile-time loop count for GPU optimization\n * @param lightSpacePos Position in light space coordinates\n * @returns Visibility factor (1.0 = fully lit, 0.0 = fully shadowed)\n */\nfloat sampleShadow(vec3 lightSpacePos) {\n float scaledTexelSize = (1.0 / shadowMapSize) * pcfSpread;\n float currentDepth = lightSpacePos.z * depthRangeMax;\n \n // Rotation for temporal stability\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 float shadow = 0.0;\n \n // Compile-time unrolled loop - GPU can optimize this efficiently\n for(int i = 0; i < PCF_SAMPLES; i++) {\n vec2 offset = rotation * poissonDisk[i] * scaledTexelSize;\n vec2 uv = clamp(lightSpacePos.xy + offset, 0.0, 1.0);\n \n float sampledDepth = texture2D(shadowMap, uv).r;\n shadow += step(sampledDepth + shadowBias, currentDepth);\n }\n \n return 1.0 - shadow / float(PCF_SAMPLES);\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 _x=class extends ji{constructor(){super({vertexShader:YB,fragmentShader:"#define PCF_SAMPLES 4\n"+WC,uniforms:{shadowMap:{value:null},lightMatrix:{value:new qt},shadowBias:{value:8e-5},shadowOpacity:{value:.25},baseColor:{value:new mt(8421504)},shadowMapSize:{value:4096},pcfSpread:{value:3.5},depthRangeMax:{value:1},shadowEnabled:{value:!1}},transparent:!0,depthWrite:!1,side:hs,stencilWrite:!0,stencilFunc:su,stencilRef:vu.UNDERGROUND_MASK,stencilFail:Dn,stencilZFail:Dn,stencilZPass:Dn});h(this,"pcfSampleCount",4)}setShadowUniforms(t,n,o,i,a,u,l,c,d,p){this.uniforms.shadowMap.value=t,this.uniforms.lightMatrix.value.copy(n),this.uniforms.shadowBias.value=o,this.uniforms.shadowOpacity.value=i,this.uniforms.baseColor.value=a,this.uniforms.shadowMapSize.value=u,this.uniforms.pcfSpread.value=l,this.uniforms.depthRangeMax.value=d,this.uniforms.shadowEnabled.value=p,c!==this.pcfSampleCount&&(this.pcfSampleCount=c,this.fragmentShader="#define PCF_SAMPLES ".concat(c,"\n")+WC,this.needsUpdate=!0)}};var ya={enabled:!0,debug:!1,baseColor:"#a0a0a0",shadowOpacity:.25,pcfSamples:4,pcfSpread:3,shadowBias:.001,normalBias:.12,shadowMapSize:"auto",sunAzimuth:225,sunElevation:45,visibleAtZoomLevel:18},qB=1e4,OQ=-.05,FQ=999,BQ=4096,kQ=2048,LQ=20.5,RQ=19.5,JB=.1,NQ=400,jQ=-200,UQ=50,GQ=100,zQ=-50,$Q=40,zm=15,ol=22,VQ=100,HQ=5,ZQ=50,WQ=50,XQ=40,YQ=5,qQ=.5,XC=1,KB=1,JQ=5,Fn=256,KQ=65535,QQ=.5,Ox=.1,eee=1e3,tee=16737792,ree=.2,QB=.2,nee=1001,oee=8900331,YC=!0,Fx=class{constructor(r,t,n,o){h(this,"state");h(this,"rendererService");h(this,"depthMaterial");h(this,"cameraOrbit");h(this,"lightCamera");h(this,"shadowRenderTarget");h(this,"lightMatrix",new qt);h(this,"currentSnapX",0);h(this,"currentSnapY",0);h(this,"shadowCenter",new Ie);h(this,"shadowPlane",null);h(this,"shadowPlaneMaterial",null);h(this,"shadowPlaneEnabled",!0);h(this,"visibleAtCurrentZoom",!0);h(this,"zoomOpacityFactor",1);h(this,"lightCameraHelper",null);h(this,"debugEnabled",!1);h(this,"debugGrid",null);h(this,"debugCurrentCell",null);h(this,"debugCurrentCellMaterial",null);h(this,"debugCanvas",null);h(this,"debugCanvasCtx",null);h(this,"debugRenderTarget",null);h(this,"debugDepthMaterial",null);h(this,"debugDepthQuad",null);h(this,"debugDepthScene",null);h(this,"debugDepthCamera",null);h(this,"options");h(this,"internal");h(this,"shadowResolutionSizes",{high:BQ,low:kQ});h(this,"shadowResolutionZoomThresholds",{high:LQ,low:RQ});h(this,"debugPixelBuffer",null);h(this,"bias",new qt().set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1));h(this,"matrix",new qt);h(this,"transparentGeometryVisibilityStateMap",new Map);h(this,"lastZoomLevel",null);h(this,"lastCameraElevation",null);h(this,"needsRender",!0);h(this,"needsCompute",!0);var a,u,l,c,d,p,m,g,y,E,b,v;this.state=r,this.cameraOrbit=n,this.rendererService=t,this.options=Object.freeze({enabled:(a=o==null?void 0:o.enabled)!=null?a:ya.enabled,debug:(u=o==null?void 0:o.debug)!=null?u:ya.debug,baseColor:(l=o==null?void 0:o.baseColor)!=null?l:ya.baseColor,shadowOpacity:(c=o==null?void 0:o.shadowOpacity)!=null?c:ya.shadowOpacity,pcfSamples:(d=o==null?void 0:o.pcfSamples)!=null?d:ya.pcfSamples,pcfSpread:(p=o==null?void 0:o.pcfSpread)!=null?p:ya.pcfSpread,shadowBias:(m=o==null?void 0:o.shadowBias)!=null?m:ya.shadowBias,normalBias:(g=o==null?void 0:o.normalBias)!=null?g:ya.normalBias,shadowMapSize:(y=o==null?void 0:o.shadowMapSize)!=null?y:ya.shadowMapSize,sunAzimuth:(E=o==null?void 0:o.sunAzimuth)!=null?E:ya.sunAzimuth,sunElevation:(b=o==null?void 0:o.sunElevation)!=null?b:ya.sunElevation,visibleAtZoomLevel:(v=o==null?void 0:o.visibleAtZoomLevel)!=null?v:ya.visibleAtZoomLevel});let i=this.options.shadowMapSize==="auto"?this.shadowResolutionSizes.high:this.options.shadowMapSize;this.internal={baseColor:new mt(this.options.baseColor),lightOrthoSize:UQ,sunDistance:GQ,groundZPosition:zQ,snapGridSize:$Q,currentShadowMapSize:i,currentShadowResolutionMode:(this.options.shadowMapSize==="auto",null),sunDirection:new Ie,sunAzimuth:this.options.sunAzimuth,sunElevation:this.options.sunElevation},this.updateSunDirection(),this.lightCamera=new $3(-this.internal.lightOrthoSize,this.internal.lightOrthoSize,this.internal.lightOrthoSize,-this.internal.lightOrthoSize,JB,NQ),this.lightCamera.layers.disableAll(),this.lightCamera.layers.enable(Yo.SHOULD_CAST_SHADOWS),this.lightCamera.position.copy(this.internal.sunDirection.clone().multiplyScalar(jQ)),this.lightCamera.lookAt(new Ie(0,0,0)),this.lightCamera.updateMatrixWorld(),this.lightCamera.updateProjectionMatrix(),this.shadowRenderTarget=this.createShadowRenderTarget(i),this.depthMaterial=new UD,this.depthMaterial.depthPacking=DD,this.depthMaterial.blending=xD,this.createShadowPlane(),this.options.debug&&this.setDebugEnabled(!0)}createShadowRenderTarget(r){let t=new bh(r,r);return t.texture.minFilter=yh,t.texture.magFilter=yh,t.texture.generateMipmaps=!1,t.depthBuffer=!0,t.stencilBuffer=!1,t.depthTexture=new kD(r,r,SD),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 xo(qB,qB);r.rotateX(0),this.shadowPlaneMaterial=new _x,this.shadowPlane=new rt(r,this.shadowPlaneMaterial),this.shadowPlane.position.set(0,0,OQ),this.shadowPlane.renderOrder=FQ,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 $D(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=JQ,n=r*t*2,o=[];for(let u=-t;u<=t;u++){let l=u*r;o.push(l,-n/2,Ox),o.push(l,n/2,Ox)}for(let u=-t;u<=t;u++){let l=u*r;o.push(-n/2,l,Ox),o.push(n/2,l,Ox)}let i=new Tl;i.setAttribute("position",new kc(o,3));let a=new n1({color:KQ,transparent:!0,opacity:QQ,depthTest:!1});this.debugGrid=new bp(i,a),this.debugGrid.name="ShadowDebugGrid",this.debugGrid.renderOrder=eee,this.debugGrid.frustumCulled=!1,this.state.threeJSScene.add(this.debugGrid)}createDebugCurrentCell(){if(this.debugCurrentCell)return;let r=this.internal.snapGridSize,t=new xo(r,r);this.debugCurrentCellMaterial=new kn({color:tee,transparent:!0,opacity:ree,depthTest:!1,side:2}),this.debugCurrentCell=new rt(t,this.debugCurrentCellMaterial),this.debugCurrentCell.name="ShadowDebugCurrentCell",this.debugCurrentCell.renderOrder=nee,this.debugCurrentCell.frustumCulled=!1,this.debugCurrentCell.position.set(this.currentSnapX+r/2,this.currentSnapY+r/2,QB),this.state.threeJSScene.add(this.debugCurrentCell)}createDebugCanvas(){if(this.debugCanvas)return;this.debugCanvas=document.createElement("canvas"),this.debugCanvas.width=Fn,this.debugCanvas.height=Fn,this.debugCanvas.style.cssText="\n position: fixed;\n bottom: 16px;\n transform: rotate(-270deg);\n left: 16px;\n width: ".concat(Fn,"px;\n height: ").concat(Fn,"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");if(r.textContent=YC?"Shadow Depth Map":"Light Camera View",r.style.cssText="\n position: fixed;\n bottom: ".concat(Fn+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 bh(Fn,Fn),this.debugRenderTarget.texture.minFilter=yh,this.debugRenderTarget.texture.magFilter=yh,YC){this.debugDepthMaterial=new ji({uniforms:{depthTexture:{value:this.shadowRenderTarget.depthTexture}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform sampler2D depthTexture;\n varying vec2 vUv;\n void main() {\n float depth = texture2D(depthTexture, vUv).r;\n // Invert so near is bright, far is dark\n gl_FragColor = vec4(vec3(1.0 - depth), 1.0);\n }\n "});let t=new xo(2,2);this.debugDepthQuad=new rt(t,this.debugDepthMaterial),this.debugDepthScene=new cu,this.debugDepthScene.add(this.debugDepthQuad),this.debugDepthCamera=new $3(-1,1,1,-1,0,1)}}updateDebugCanvas(){if(!this.debugCanvas||!this.debugCanvasCtx||!this.rendererService.renderer||!this.debugRenderTarget)return;let r=this.rendererService.renderer,t=Fn*Fn*4;(!this.debugPixelBuffer||this.debugPixelBuffer.length!==t)&&(this.debugPixelBuffer=new Uint8Array(t)),YC&&this.debugDepthScene&&this.debugDepthCamera&&this.debugDepthMaterial?(this.debugDepthMaterial.uniforms.depthTexture.value=this.shadowRenderTarget.depthTexture,r.setRenderTarget(this.debugRenderTarget),r.clear(),r.render(this.debugDepthScene,this.debugDepthCamera),r.setRenderTarget(null)):(r.setRenderTarget(this.debugRenderTarget),r.setClearColor(oee,1),r.clear(),r.render(this.state.threeJSScene,this.lightCamera),r.setRenderTarget(null)),r.readRenderTargetPixels(this.debugRenderTarget,0,0,Fn,Fn,this.debugPixelBuffer);let n=this.debugCanvasCtx.createImageData(Fn,Fn),o=n.data,i,a;for(let u=0;u<Fn;u++)for(let l=0;l<Fn;l++)i=((Fn-1-u)*Fn+l)*4,a=(u*Fn+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),this.debugDepthQuad&&(this.debugDepthQuad.geometry.dispose(),this.debugDepthQuad=null),this.debugDepthMaterial&&(this.debugDepthMaterial.dispose(),this.debugDepthMaterial=null),this.debugDepthScene=null,this.debugDepthCamera=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,QB)}}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=JB,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(zm,Math.min(ol,r)),o=(ol-n)/(ol-zm),i=Math.max(t,VQ*Math.pow(HQ,o));Math.abs(this.internal.sunDistance-i)>XC&&(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(zm,Math.min(ol,r)),o=(ol-n)/(ol-zm),i=Math.max(t,ZQ*Math.pow(WQ,o));Math.abs(this.internal.lightOrthoSize-i)>XC&&(this.internal.lightOrthoSize=i,this.updateLightCamera(),this.needsRender=!0)}updateZoomVisibility(r){let t=this.options.visibleAtZoomLevel-KB,n=this.options.visibleAtZoomLevel,o;r>=n?o=1:r<=t?o=0:o=(r-t)/KB;let i=o>0;(i!==this.visibleAtCurrentZoom||o!==this.zoomOpacityFactor)&&(this.visibleAtCurrentZoom=i,this.zoomOpacityFactor=o,this.needsRender=!0)}isVisibleAtCurrentZoom(){return this.visibleAtCurrentZoom}updateAutoSnapGridSize(r){let t=Math.max(zm,Math.min(ol,r)),n=(ol-t)/(ol-zm),o=XQ*Math.pow(YQ,n);Math.abs(this.internal.snapGridSize-o)>XC&&(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 t,n;let r=this.state.threeJSScene.overrideMaterial;this.state.threeJSScene.overrideMaterial=this.depthMaterial,(t=this.rendererService.renderer)==null||t.setRenderTarget(this.shadowRenderTarget),this.rendererService.clear(),this.rendererService.renderScene(this.state.threeJSScene,this.lightCamera),(n=this.rendererService.renderer)==null||n.setRenderTarget(null),this.state.threeJSScene.overrideMaterial=r,this.debugEnabled&&this.updateDebugCanvas()}updateShadowUniforms(){var o;let r=this.options.enabled&&this.visibleAtCurrentZoom,t=this.options.shadowOpacity*this.zoomOpacityFactor,n;for(let i of this.state.geometry3DsInScene)if(n=i.components[0],n!=null&&n.mesh&&((o=n==null?void 0:n.mesh)==null?void 0:o.material)instanceof aE){let a=n.mesh.material;a instanceof aE&&a.setShadowUniforms(this.shadowRenderTarget.depthTexture,this.lightMatrix,this.lightCamera.near,this.lightCamera.far,this.options.shadowBias,t,this.internal.baseColor,this.internal.currentShadowMapSize,this.options.pcfSpread,this.options.pcfSamples,this.internal.sunDirection,this.options.normalBias,this.state.depthRangeFor3D[1],r)}this.shadowPlaneMaterial&&this.shadowPlaneMaterial.setShadowUniforms(this.shadowRenderTarget.depthTexture,this.lightMatrix,this.options.shadowBias,t,this.internal.baseColor,this.internal.currentShadowMapSize,this.options.pcfSpread,this.options.pcfSamples,this.state.depthRangeFor3D[1],r)}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)>=qQ,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.updateZoomVisibility(r),(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.visibleAtCurrentZoom&&this.renderShadowMap(),this.updateShadowPlanePosition(),this.updateShadowUniforms()),this.updateDebugHelpers(),this.needsRender=!1,this.needsCompute=!1}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()}};f();f();var iee=[100,500,2e3,1e4];function Hg(e,r){var t,n,o;return e.set(ft.degToRad((t=r==null?void 0:r[0])!=null?t:Fl[0]),ft.degToRad((n=r==null?void 0:r[1])!=null?n:Fl[1]),ft.degToRad((o=r==null?void 0:r[2])!=null?o:Fl[2]))}function Zg(e,r){var t,n,o;return e.set((t=r==null?void 0:r[0])!=null?t:Ol[0],(n=r==null?void 0:r[1])!=null?n:Ol[1],(o=r==null?void 0:r[2])!=null?o:Ol[2])}function Bx(e){var a,u,l,c;let r=e.components[0],t=e.components[1];if(t.opacity!=null&&t.opacity!==r.opacity&&(r.opacity=t.opacity),!(((a=r.mesh)==null?void 0:a.children[0])instanceof rr)){let d=t.material,p=t.color;if(d||p){let m=ek(p,d);(u=r.mesh)==null||u.traverse(g=>{g instanceof rt&&g.material&&(Array.isArray(g.material)?g.material.forEach(y=>{m[y.name]?(y.color.set(m[y.name].color),y.vertexColors=!1):p&&y.color.set(p)}):m[g.material.name]?(g.material.color.set(m[g.material.name].color),g.material.vertexColors=!1):p&&g.material.color.set(p))})}}let o=(l=r.feature.geometry.coordinates[2])!=null?l:0,i=((c=t.verticalOffset)!=null?c:0)+o;r.altitude!==i&&(r.altitude=i),t.visible!==r.visible&&(r.visible=t.visible),t.visibleThroughGeometry!==r.visibleThroughGeometry&&(r.visibleThroughGeometry=t.visibleThroughGeometry)}function ek(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 kx(e){e.traverse(r=>{r instanceof rr&&r.computeBoundingSphere()})}function tk(e,r=iee){for(let t of r)if(t>e)return t;return e*2}function Lx(e){var r,t;for(;e.children.length>0;){let n=e.children[0];if(n instanceof rr)if((r=n.geometry)==null||r.dispose(),Array.isArray(n.material))for(let o of n.material)o.dispose();else n.material&&n.material.dispose();e.remove(n)}(t=e.parent)==null||t.remove(e)}function Rx(e,r,t,n){var i,a;let o=n||t?ek(t,n):void 0;for(let u of e.children){if(!(u instanceof rr))continue;let l=Array.isArray(u.material)?(i=u.material[0])==null?void 0:i.name:(a=u.material)==null?void 0:a.name,c=o==null?void 0:o[l],d=c?new mt(c.color):t?new mt(t):u.userData.originalColor;d&&(u.setColorAt(r,d),u.instanceColor&&(u.instanceColor.needsUpdate=!0))}}function $m(e,r){let t=new mi;return e.scene.updateWorldMatrix(!0,!0),e.scene.traverse(n=>{var i,a,u;let o=n;if("isMesh"in o&&o.isMesh===!0){let l=o.geometry.clone();l.applyMatrix4(o.matrixWorld);let c=o.material,d;Array.isArray(c)?(d=(i=c[0].color)==null?void 0:i.clone(),c=c.map(g=>{var E;let y=g.clone();return(E=y.color)==null||E.setRGB(1,1,1),y})):(d=(a=c.color)==null?void 0:a.clone(),c=c.clone(),(u=c.color)==null||u.setRGB(1,1,1));let p=new rr(l,c,r);p.count=0,p.frustumCulled=!1,p.layers.enable(Yo.SHOULD_CAST_SHADOWS),p.userData={entities:{},originalColor:d},t.add(p)}}),t}function qC(e,r){let t=typeof r=="string"?new mt(r):r;e.traverse(n=>{let o=n;"isMesh"in o&&o.isMesh===!0&&(Array.isArray(o.material)?o.material.forEach(i=>{"color"in i&&i.color.copy(t)}):"color"in o.material&&o.material.color.copy(t))})}function JC(e,r,t=!1){e.traverse(n=>{let o=n;"isMesh"in o&&o.isMesh===!0&&(Array.isArray(o.material)?o.material.forEach(i=>{(!t||!i.transparent)&&(i.transparent=r<1),i.opacity=r}):((!t||!o.material.transparent)&&(o.material.transparent=r<1),o.material.opacity=r))})}function rk(e,r){e.traverse(t=>{let n=t;"isMesh"in n&&n.isMesh===!0&&(Array.isArray(n.material)?n.material.forEach(o=>{o.depthWrite=!r,o.depthTest=!r,r&&(o.transparent=!0)}):(n.material.depthWrite=!r,n.material.depthTest=!r,r&&(n.material.transparent=!0)))})}function Vm(e,r){e.traverse(t=>{t instanceof rr&&t.material&&(Array.isArray(t.material)?t.material.forEach(n=>{n.transparent=r<1,n.opacity=r}):(t.material.transparent=r<1,t.material.opacity=r))})}function KC(e){e.traverse(r=>{var n,o;let t=r;"isMesh"in t&&t.isMesh===!0&&((n=t.geometry)==null||n.dispose(),Array.isArray(t.material)?t.material.forEach(i=>i.dispose()):(o=t.material)==null||o.dispose())})}function nk(e){e.traverse(r=>{var t;r instanceof rr&&(r.geometry.dispose(),Array.isArray(r.material)?r.material.forEach(n=>n.dispose()):(t=r.material)==null||t.dispose())})}function Ic(e,r){let t=r!==0,n=!1;return e.traverse(o=>{if(!(o instanceof rr)&&!("isMesh"in o&&o.isMesh))return;let i=o.layers.isEnabled(Yo.SHOULD_CAST_SHADOWS);t&&!i?(o.layers.enable(Yo.SHOULD_CAST_SHADOWS),n=!0):!t&&i&&(o.layers.disable(Yo.SHOULD_CAST_SHADOWS),n=!0)}),n}f();var Nx=class{constructor(){h(this,"element",null);h(this,"enabled",!1)}show(){this.enabled||(this.enabled=!0,this.create())}hide(){this.enabled&&(this.enabled=!1,this.element&&(this.element.remove(),this.element=null))}isEnabled(){return this.enabled}create(){this.element=document.createElement("div"),this.element.id="model-debug-ui",this.element.style.cssText="\n position: fixed;\n bottom: 10px;\n left: 10px;\n background: rgba(0, 0, 0, 0.8);\n color: #fff;\n font-family: monospace;\n font-size: 12px;\n padding: 10px;\n border-radius: 5px;\n z-index: 10000;\n max-height: 300px;\n overflow-y: auto;\n min-width: 200px;\n ",document.body.appendChild(this.element)}getActualInstanceCount(r){for(let t of r.mesh.children)if(t.isInstancedMesh)return t.count;return r.count}update(r,t,n){var i,a,u;if(!this.enabled||!this.element)return;let o='<div style="margin-bottom: 5px; font-weight: bold; border-bottom: 1px solid #666; padding-bottom: 5px;">Model Batches</div>';if(r.size===0)o+='<div style="color: #888;">No models loaded</div>';else{let l=0,c=0,d=Array.from(r.keys()).sort((p,m)=>{var E,b;let g=(E=t.get(p))!=null?E:"",y=(b=t.get(m))!=null?b:"";return g.localeCompare(y)});for(let p of d){let m=r.get(p);if(!m||m.size===0)continue;let g=(i=t.get(p))!=null?i:"unknown_".concat(p),y=0;for(let b of m)y+=this.getActualInstanceCount(b);l+=m.size,c+=y,o+='<div style="margin: 6px 0 2px 0;">',o+='<span style="color: #4fc3f7; font-weight: bold;">"'.concat(g,'"</span>'),o+='<span style="color: #aaa;"> ('.concat(y," total, ").concat(m.size," batch").concat(m.size!==1?"es":"",")</span>"),o+="</div>";let E=Array.from(m).sort((b,v)=>b.id.localeCompare(v.id));for(let b of E){let v=this.getActualInstanceCount(b),D=b.count,M=v!==D,T=b.opacity===1?"":" @".concat((b.opacity*100).toFixed(0),"%");o+='<div style="margin-left: 12px; color: #ccc; font-size: 11px;">',o+='<span style="color: #81c784;">'.concat(b.id,"</span>"),M?o+='<span style="color: #e57373;">: '.concat(v," actual / ").concat(D," tracked</span>"):o+='<span style="color: #fff;">: '.concat(v," instance").concat(v!==1?"s":"","</span>"),T&&(o+='<span style="color: #ffb74d;">'.concat(T,"</span>")),o+="</div>"}}o+='<div style="margin-top: 8px; padding-top: 5px; border-top: 1px solid #666; color: #fff;">',o+='Total: <span style="color: #81c784;">'.concat(c," instance").concat(c!==1?"s":"","</span>"),o+=', <span style="color: #e57373;">'.concat(l," draw call").concat(l!==1?"s":"","</span>"),o+="</div>"}if(n.size>0){o+='<div style="margin-top: 8px; border-top: 1px solid #666; padding-top: 5px;">',o+='<div style="margin-bottom: 5px; font-weight: bold; color: #ff9800;">Non-instanced Models</div>',o+='<span style="color: #aaa;">('.concat(n.size," total, ").concat(n.size," draw call").concat(n.size!==1?"s":"",")</span>");let l=new Map;for(let[c,d]of n){let p=(a=l.get(d.urlHash))!=null?a:[];p.push(c),l.set(d.urlHash,p)}for(let[c,d]of l){let p=(u=t.get(c))!=null?u:"unknown_".concat(c);o+='<div style="margin: 6px 0 2px 0;">',o+='<span style="color: #ff9800;">"'.concat(p,'"</span>'),o+='<span style="color: #aaa;"> ('.concat(d.length," model").concat(d.length!==1?"s":"",")</span>"),o+="</div>";for(let m of d)o+='<div style="margin-left: 12px; color: #ccc; font-size: 11px;">'.concat(m,"</div>")}o+="</div>"}this.element.innerHTML=o}destroy(){this.element&&(this.element.remove(),this.element=null)}};var Hm=100,aee=!0,jx=class extends Xe{constructor(t,n){super();h(this,"transparencyChanged",!1);h(this,"state");h(this,"convertTo3DMapPosition");h(this,"loader");h(this,"loadPromises",[]);h(this,"gltfCache",new Map);h(this,"gltfLoadPromises",new Map);h(this,"instanceMap",new Map);h(this,"debugUI");h(this,"modelNames",new Map);h(this,"batchCounter",0);h(this,"batchByMesh",new Map);h(this,"batchesByUrlHash",new Map);h(this,"nonInstancedModels",new Map);h(this,"pendingOpacityChanges",new Map);h(this,"detachedEntityIds",new Set);h(this,"tempMatrix",new qt);h(this,"tempQuaternion",new gp);h(this,"tempEuler",new uu);h(this,"tempScale",new Ie);h(this,"tempColor",new mt);h(this,"endFrame",()=>{this.transparencyChanged=!1});this.state=t,this.convertTo3DMapPosition=n,this.debugUI=new Nx}createBatch(t,n,o,i,a){this.batchCounter++;let u={id:"batch_".concat(this.batchCounter),mesh:t,count:0,maxCount:a,opacity:i,urlHash:n,containerId:o};return t.userData.batchId=u.id,this.batchByMesh.set(t,u),this.batchesByUrlHash.has(n)||this.batchesByUrlHash.set(n,new Set),this.batchesByUrlHash.get(n).add(u),u}removeBatch(t){var n,o;this.batchByMesh.delete(t.mesh),(n=this.batchesByUrlHash.get(t.urlHash))==null||n.delete(t),((o=this.batchesByUrlHash.get(t.urlHash))==null?void 0:o.size)===0&&this.batchesByUrlHash.delete(t.urlHash)}getBatchForMesh(t){return this.batchByMesh.get(t)}updateDebugUI(){this.debugUI.update(this.batchesByUrlHash,this.modelNames,this.nonInstancedModels)}showDebug(){this.debugUI.show(),this.updateDebugUI()}hideDebug(){this.debugUI.hide()}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:t}=await import("./GLTFLoader-X5U6TBQB.js");return this.loader=new t,this.loader}async getOrLoadGLTF(t,n){let o=this.gltfCache.get(n);if(o)return o;let i=this.gltfLoadPromises.get(n);if(i)return i;let a=await this.getGLTFLoader(),u=new Promise((l,c)=>{let d=m=>{this.gltfCache.set(n,m),this.gltfLoadPromises.delete(n),l(m)},p=m=>{this.gltfLoadPromises.delete(n),c(m)};U5(t)?a.parse(G5(t),"",d,p):z5(t)?a.parse($5(t),"",d,p):a.load(t,d,void 0,p)});return this.gltfLoadPromises.set(n,u),u}createNonInstancedModel(t,n,o,i){var v,D,M,T,B;let a=t.components[0],u=t.components[1],l=a.feature,c=n.scene.clone(!0);c.updateWorldMatrix(!0,!0);let d=new mi;d.userData={nonInstanced:!0,entityId:String(t.id),type:"model"},c.traverse(G=>{let _=G;if("isMesh"in _&&_.isMesh===!0){let F=_.clone();F.geometry=_.geometry.clone(),F.geometry.applyMatrix4(_.matrixWorld),F.position.set(0,0,0),F.rotation.set(0,0,0),F.scale.set(1,1,1),Array.isArray(_.material)?F.material=_.material.map(A=>A.clone()):F.material=_.material.clone(),F.userData={entityId:String(t.id)},d.add(F)}});let{x:p,y:m}=this.convertTo3DMapPosition(l.geometry.coordinates[1],l.geometry.coordinates[0],0),g=(v=l.geometry.coordinates[2])!=null?v:0,y=((D=u.verticalOffset)!=null?D:0)+g;a.altitude=y,a.position.set(p,m,a.altitude);let E=(M=u.scale)!=null?M:Ol,b=(T=u.rotation)!=null?T:Fl;if(d.position.copy(a.position),d.rotation.set(ft.degToRad(b[0]),ft.degToRad(b[1]),ft.degToRad(b[2])),d.scale.set(E[0],E[1],E[2]),u.color&&qC(d,u.color),u.opacity!=null&&u.opacity!==1&&JC(d,u.opacity),u.visibleThroughGeometry&&rk(d,!0),!u.EXPERIMENTAL_clippingEnabled){let G=(B=u.opacity)!=null?B:1;Ic(d,G)}o.add(d),a.mesh=d,a.instanceIndex=-1,this.nonInstancedModels.set(t.id,{urlHash:i,mesh:d}),this.updateDebugUI()}resizeInstanceContainer(t,n){let o=tk(t.maxCount),i=$m(n,o),a=t.object.children,u=i.children;for(let c=0;c<a.length;c++){let d=a[c],p=u[c];if(!(!(d instanceof rr)||!(p instanceof rr))){for(let m=0;m<t.count;m++)d.getMatrixAt(m,this.tempMatrix),p.setMatrixAt(m,this.tempMatrix),p.userData.entities[m]=d.userData.entities[m],d.instanceColor&&(d.getColorAt(m,this.tempColor),p.setColorAt(m,this.tempColor));p.count=t.count,p.instanceMatrix.needsUpdate=!0}}let l=t.object.parent;return l&&(l.remove(t.object),l.add(i)),t.object=i,t.maxCount=o,t}getOrCreateInstanceContainer(t,n,o){let i=this.instanceMap.get(t);i||(i=new Map,this.instanceMap.set(t,i));let a=i.get(n);if(a){let u=this.getBatchForMesh(a.object);u&&(a.count=u.count)}else{let u=$m(o,Hm);a={object:u,count:0,maxCount:Hm},i.set(n,a);let l=this.createBatch(u,n,t,1,Hm);a.batch=l}return a}createModelFromFeature(t,n,o){let i=new mc(n),a=k({},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 y1(a);i.instancingDisabled=u.visibleThroughGeometry===!0||u.EXPERIMENTAL_clippingEnabled===!0;let l=new Jt(i,u);return l.id=t,u.EXPERIMENTAL_clippingEnabled&&(l.components[7]=new v1),l}async populateModelGroup(t,n,o){var c,d,p,m;let i=fu(n),a=this.getOrLoadGLTF(n,i).then(g=>{var A;let y=o.parent;if(!(y instanceof Tr))return;let E=y.userData.entityId,b=this.getOrCreateInstanceContainer(E,i,g);b.count+t.size>b.maxCount&&(b=this.resizeInstanceContainer(b,g)),b.object.parent||o.add(b.object);let D=new qt,M=new uu,T=new gp,B=new Ie,G,_,F;for(let j of t.values()){if(F=this.state.geometry3DMap.get(j),!F||(F==null?void 0:F.type)!=="model"||!this.state.geometry3DsInScene.has(F))continue;let N=F.components[0],Z=F.components[1];if(N.instanceIndex!=null&&N.instanceIndex>=0||N.instancingDisabled&&N.mesh)continue;if(_=N.feature,N.instancingDisabled){this.createNonInstancedModel(F,g,o,i);continue}let ie=Z.opacity!=null&&Z.opacity!==1;if(ie){let z=(A=Z.opacity)!=null?A:1,X=Math.round(z*100),W,ee,ce=this.batchesByUrlHash.get(i);if(ce){for(let Ce of ce)if(Ce.containerId===y.userData.entityId&&Math.round(Ce.opacity*100)===X&&Ce.count<Ce.maxCount){W=Ce,ee=Ce.mesh;break}}if(!W||!ee){let Ce=$m(g,Hm);Ce.userData.detached=!0,Ce.userData.sharedOpacity=z,o.add(Ce),W=this.createBatch(Ce,i,y.userData.entityId,z,Hm),ee=Ce,Vm(Ce,z),Ic(Ce,z)}let ye=W.count;N.mesh=ee,N.instanceIndex=ye,W.count++,this.detachedEntityIds.add(F.id)}else N.mesh=b.object,N.instanceIndex=b.count;Bx(F),Z.dirty=!1,G=this.convertTo3DMapPosition(_.geometry.coordinates[1],_.geometry.coordinates[0],0),N.position.set(G.x,G.y,N.altitude),Hg(M,Z.rotation),Zg(B,Z.scale),T.setFromEuler(M),D.compose(N.position,T,B);let de=N.mesh,J=N.instanceIndex;for(let z of de.children)z instanceof rr&&(z.setMatrixAt(J,D),z.userData.entities[J]=F.id,z.count=J+1,z.instanceMatrix.needsUpdate=!0);if(Rx(de,J,Z.color,Z.material),!ie){b.count++;let z=this.getBatchForMesh(b.object);z&&(z.count=b.count)}kx(N.mesh)}this.publish("model-loaded")});this.loadPromises.push(a);let u=(d=(c=o.parent)==null?void 0:c.userData)==null?void 0:d.entityId,l=(p=this.instanceMap.get(u))==null?void 0:p.get(i);return(m=l==null?void 0:l.object)!=null?m:new mi}update(){for(let n of this.state.geometryGroupIdsToLoad.values()){let o=this.state.geometry3DMap.get(n);o instanceof Qn&&o.userData.dirty&&o.userData.modelURL&&(this.populateModelGroup(o.userData.entities3D,o.userData.modelURL,o),o.userData.dirty=!1,o.userData.localCenter=void 0)}this.updateModelStyles(),this.rebatchDetachedInstances(),this.flushPendingOpacityChanges(),this.updateDebugUI();let t=this.loadPromises;return this.loadPromises=[],Promise.all(t)}rebatchDetachedInstances(){var n,o,i,a;if(!aee||this.detachedEntityIds.size===0)return;let t=new Map;for(let u of this.detachedEntityIds){let l=this.state.geometry3DMap.get(u);if(!l||l.type!=="model")continue;let c=l.components[0],d=l.components[1],p=(n=c.mesh)==null?void 0:n.userData;if(!((o=c.mesh)!=null&&o.parent))continue;let m=(i=d.opacity)!=null?i:1,g=p==null?void 0:p.sharedOpacity;if(Math.round(m*100)===100&&g!==void 0){this.pendingOpacityChanges.set(l.id,{entity:l,targetOpacity:m});continue}if(g!==void 0&&Math.abs(m-g)<=.01)continue;if(g!==void 0&&Math.abs(m-g)>.01){this.pendingOpacityChanges.set(l.id,{entity:l,targetOpacity:m});continue}let E=c.mesh.parent;if(!(E instanceof Qn))continue;let b=E.userData.modelURL;if(!b)continue;let v=fu(b),D=(a=d.opacity)!=null?a:1,M=Math.round(D*100);t.has(v)||t.set(v,new Map);let T=t.get(v);T.has(M)||T.set(M,[]),T.get(M).push(l)}for(let[u,l]of t.entries()){let c=this.gltfCache.get(u);if(c)for(let[d,p]of l.entries()){if(p.length<2)continue;let m=d/100;this.createSharedBatchForDetached(p,c,m,u)}}this.publish("batch-changed")}createSharedBatchForDetached(t,n,o,i){var M;if(t.length<2)return;let u=(M=t[0].components[0].mesh)==null?void 0:M.parent;if(!u)return;let l=u.parent,c=l instanceof Tr?l.userData.entityId:"unknown",d=$m(n,t.length);d.userData.detached=!0,d.userData.sharedOpacity=o,u.add(d);let p=this.createBatch(d,i,c,o,t.length);Vm(d,o),Ic(d,o);let m=new qt,g=new uu,y=new gp,E=new Ie,b,v,D=0;for(let T of t){let B=T.components[0],G=T.components[1],_=B.mesh;if(_){let F=this.getBatchForMesh(_);F&&this.removeBatch(F),Lx(_)}B.mesh=d,B.instanceIndex=D,v=B.feature,b=this.convertTo3DMapPosition(v.geometry.coordinates[1],v.geometry.coordinates[0],0),B.position.set(b.x,b.y,B.altitude),Hg(g,G.rotation),Zg(E,G.scale),G.visible===!1&&E.set(0,0,0),y.setFromEuler(g),m.compose(B.position,y,E);for(let F of d.children)F instanceof rr&&(F.setMatrixAt(D,m),F.userData.entities[D]=T.id,F.count=D+1,F.instanceMatrix.needsUpdate=!0);Rx(d,D,G.color,G.material),D++}p.count=D,kx(d)}removeInstanceFromBatch(t,n,o){var c;let i=t.count-1,a=t.opacity===1&&((c=n.userData)==null?void 0:c.detached)!==!0;if(t.count===1){if(a){t.count=0;for(let m of n.children)m instanceof rr&&(m.count=0,m.instanceMatrix.needsUpdate=!0);let d=this.instanceMap.get(t.containerId),p=d==null?void 0:d.get(t.urlHash);p&&p.object===t.mesh&&(p.count=0),this.updateDebugUI();return}this.removeBatch(t),Lx(n),this.updateDebugUI();return}for(let d of n.children)if(d instanceof rr){if(o!==i){d.getMatrixAt(i,this.tempMatrix),d.getColorAt(i,this.tempColor),d.setMatrixAt(o,this.tempMatrix),d.setColorAt(o,this.tempColor);let p=d.userData.entities[i];if(p){d.userData.entities[o]=p;let m=this.state.geometry3DMap.get(p);m&&(m.components[0].instanceIndex=o)}}delete d.userData.entities[i],d.count=i,d.instanceMatrix.needsUpdate=!0,d.instanceColor&&(d.instanceColor.needsUpdate=!0)}t.count=i;let u=this.instanceMap.get(t.containerId),l=u==null?void 0:u.get(t.urlHash);l&&l.object===t.mesh&&(l.count=i),this.updateDebugUI()}updateModelStyles(){var t,n,o,i,a;for(let u of this.state.geometry3DsInScene){if((u==null?void 0:u.type)!=="model")continue;let l=u.components[1],c=u.components[0];if(!l.dirty&&!c.positionDirty)continue;if(c.instancingDisabled){this.updateNonInstancedModelStyle(u),l.dirty=!1,c.positionDirty=!1;continue}let d=(t=c.mesh)==null?void 0:t.userData,p=d==null?void 0:d.detached,m=l.opacity!=null&&l.opacity!==1,g=(n=l.opacity)!=null?n:1,y=d==null?void 0:d.sharedOpacity,E=y!==void 0&&Math.abs(g-y)>.01;if((m&&!p&&c.mesh||E)&&this.pendingOpacityChanges.set(u.id,{entity:u,targetOpacity:g}),Bx(u),this.updateInstanceTransform(u),this.updateInstanceColor(u,l.color,l.material),((i=(o=c.mesh)==null?void 0:o.userData)==null?void 0:i.detached)&&c.mesh){let v=(a=l.opacity)!=null?a:1;Vm(c.mesh,v),Ic(c.mesh,v)&&(this.transparencyChanged=!0)}l.dirty=!1,c.positionDirty=!1}}flushPendingOpacityChanges(){var i,a;if(this.pendingOpacityChanges.size===0)return;let t=new Map,n=new Map,o=(u,l,c,d,p,m)=>{let g=Math.round(l*100),y="".concat(c,"_").concat(d,"_").concat(g),E=n.get(y);E||(E={entities:[],targetOpacity:l,urlHash:c,containerId:d,gltf:p,parent:m},n.set(y,E)),E.entities.push(u)};for(let{entity:u,targetOpacity:l}of this.pendingOpacityChanges.values()){let c=u.components[0];if(!c.mesh||c.instanceIndex==null)continue;let d=c.mesh,p=this.getBatchForMesh(d),m=d.parent;if(!(m instanceof Qn))continue;let g=m.userData.modelURL;if(!g)continue;let y=fu(g),E=this.gltfCache.get(y);if(!E)continue;let b=m.parent,v=b instanceof Tr?b.userData.entityId:"unknown";if(p){let D=t.get(p);D||(D={entities:[],targetOpacity:l},t.set(p,D)),Math.round(D.targetOpacity*100)===Math.round(l*100)?D.entities.push(u):o(u,l,y,v,E,m)}else o(u,l,y,v,E,m)}for(let[u,l]of t){let{entities:c,targetOpacity:d}=l,p=((i=u.mesh.userData)==null?void 0:i.detached)===!0,m=Math.round(d*100)===100;if(c.length===u.count&&p&&!m)u.opacity=d,u.mesh.userData.sharedOpacity=d,Vm(u.mesh,d),Ic(u.mesh,d)&&(this.transparencyChanged=!0);else{let g=(a=c[0])==null?void 0:a.components[0],y=g==null?void 0:g.mesh,E=y==null?void 0:y.parent;if(E instanceof Qn){let b=E.userData.modelURL;if(b){let v=fu(b),D=this.gltfCache.get(v),M=E.parent,T=M instanceof Tr?M.userData.entityId:"unknown";if(D)for(let B of c)o(B,d,v,T,D,E)}}}}for(let u of n.values()){let{entities:l,targetOpacity:c,urlHash:d,containerId:p,gltf:m,parent:g}=u,y=Math.round(c*100);for(let T of l){let B=T.components[0],G=B.mesh,_=this.getBatchForMesh(G),F=B.instanceIndex;_&&F!=null&&F>=0&&this.removeInstanceFromBatch(_,G,F)}let E,b,v=this.batchesByUrlHash.get(d);if(v){for(let T of v)if(T.containerId===p&&Math.round(T.opacity*100)===y&&T.count+l.length<=T.maxCount){E=T,b=T.mesh;break}}if(!E||!b){let T=Math.max(Hm,l.length),B=$m(m,T);B.userData.detached=!0,B.userData.sharedOpacity=c,g.add(B),E=this.createBatch(B,d,p,c,T),b=B,Vm(B,c),Ic(B,c)&&(this.transparencyChanged=!0)}let D,M;for(let T of l){let B=T.components[0],G=T.components[1],_=E.count;B.mesh=b,B.instanceIndex=_,M=B.feature,D=this.convertTo3DMapPosition(M.geometry.coordinates[1],M.geometry.coordinates[0],0),B.position.set(D.x,D.y,B.altitude),Hg(this.tempEuler,G.rotation),Zg(this.tempScale,G.scale),G.visible===!1&&this.tempScale.set(0,0,0),this.tempQuaternion.setFromEuler(this.tempEuler),this.tempMatrix.compose(B.position,this.tempQuaternion,this.tempScale);for(let F of b.children)F instanceof rr&&(F.setMatrixAt(_,this.tempMatrix),F.userData.entities[_]=T.id,F.count=_+1,F.instanceMatrix.needsUpdate=!0);this.updateInstanceColor(T,G.color,G.material),E.count++,b.userData.detached?this.detachedEntityIds.add(T.id):this.detachedEntityIds.delete(T.id)}kx(b),this.publish("batch-changed")}this.pendingOpacityChanges.clear(),this.updateDebugUI()}updateInstanceTransform(t){let n=t.components[0],o=t.components[1];if(!n.mesh)return;let i=n.feature,{x:a,y:u}=this.convertTo3DMapPosition(i.geometry.coordinates[1],i.geometry.coordinates[0],0);if(n.position.set(a,u,n.altitude),Hg(this.tempEuler,o.rotation),o.visible===!1?this.tempScale.set(0,0,0):Zg(this.tempScale,o.scale),n.instancingDisabled){n.mesh.position.copy(n.position),n.mesh.rotation.set(this.tempEuler.x,this.tempEuler.y,this.tempEuler.z),n.mesh.scale.copy(this.tempScale);return}if(!(n.instanceIndex==null||n.instanceIndex<0)){this.tempQuaternion.setFromEuler(this.tempEuler),this.tempMatrix.compose(n.position,this.tempQuaternion,this.tempScale);for(let l of n.mesh.children)l instanceof rr&&(l.setMatrixAt(n.instanceIndex,this.tempMatrix),l.instanceMatrix.needsUpdate=!0)}}updateNonInstancedModelStyle(t){var a;let n=t.components[0],o=t.components[1];if(!n.mesh)return;Bx(t),this.updateInstanceTransform(t);let i=(a=o.opacity)!=null?a:1;JC(n.mesh,i,o.visibleThroughGeometry),o.EXPERIMENTAL_clippingEnabled||Ic(n.mesh,i)&&(this.transparencyChanged=!0),o.color&&qC(n.mesh,o.color)}updateInstanceColor(t,n,o){let i=t.components[0];!i.mesh||i.instanceIndex==null||i.instanceIndex<0||Rx(i.mesh,i.instanceIndex,n,o)}removeInstance(t){var d,p;let n=t.components[0];if(this.detachedEntityIds.delete(t.id),this.nonInstancedModels.has(t.id)){let m=this.nonInstancedModels.get(t.id);return m!=null&&m.mesh&&(KC(m.mesh),(d=m.mesh.parent)==null||d.remove(m.mesh)),this.nonInstancedModels.delete(t.id),n.mesh=null,this.updateDebugUI(),!0}if(!n.mesh||n.instanceIndex==null||n.instanceIndex<0)return!0;let o=this.getBatchForMesh(n.mesh);if(!o)return!0;let i=n.instanceIndex,a=o.count-1,u=o.opacity===1&&((p=n.mesh.userData)==null?void 0:p.detached)!==!0;if(o.count===1){if(u){o.count=0;for(let v of n.mesh.children)v instanceof rr&&(v.count=0,v.instanceMatrix.needsUpdate=!0);let E=this.instanceMap.get(o.containerId),b=E==null?void 0:E.get(o.urlHash);return b&&b.object===o.mesh&&(b.count=0),n.mesh=null,this.updateDebugUI(),!1}let m=o.urlHash;this.removeBatch(o);let g=this.batchesByUrlHash.get(m),y=!1;if(g){for(let E of g)if(E.count>0){y=!0;break}}return Lx(n.mesh),n.mesh=null,this.updateDebugUI(),!y}for(let m of n.mesh.children)if(m instanceof rr){if(i!==a){m.getMatrixAt(a,this.tempMatrix),m.getColorAt(a,this.tempColor),m.setMatrixAt(i,this.tempMatrix),m.setColorAt(i,this.tempColor);let g=m.userData.entities[a];if(g){m.userData.entities[i]=g;let y=this.state.geometry3DMap.get(g);y?y.components[0].instanceIndex=i:V.warn("[removeInstance] Could not find lastEntity in geometry3DMap:",g)}}delete m.userData.entities[a],m.count=a,m.instanceMatrix.needsUpdate=!0,m.instanceColor&&(m.instanceColor.needsUpdate=!0)}o.count=a;let l=this.instanceMap.get(o.containerId),c=l==null?void 0:l.get(o.urlHash);return c&&c.object===o.mesh&&(c.count=a),n.mesh=null,this.updateDebugUI(),!1}destroy(){var t;this.gltfCache.clear(),this.gltfLoadPromises.clear();for(let n of this.instanceMap.values())for(let o of n.values())nk(o.object);this.instanceMap.clear(),this.modelNames.clear(),this.batchByMesh.clear(),this.batchesByUrlHash.clear(),this.batchCounter=0;for(let n of this.nonInstancedModels.values())n.mesh&&(KC(n.mesh),(t=n.mesh.parent)==null||t.remove(n.mesh));this.nonInstancedModels.clear(),this.debugUI.destroy(),this.loadPromises=[],this.loader=void 0}};var ok=new wl;var{DEFAULT_PITCH:n6,DEFAULT_BEARING:o6,DEFAULT_ZOOM_LEVEL:i6,DEFAULT_MIN_ZOOM_LEVEL:see,DEFAULT_MAX_ZOOM_LEVEL:uee}=ma,lee=ft.radToDeg(.6435011087932844),wr,Ar,qd,Jd,Zm,Sc,Kd,Qd,Yn,e6,Q,$t,ns,Pr,ba,on,te,Ux,Fi,$r,Gx,ep,ik,ak,sk,il,zx,Wg,$x,Vx,Wm,Xm,Hx,Xg,Yg,qg,t6,tp,Jg,Kg,al,sl,r6,Zx,pt,Ym,Qg,QC=class extends Xe{constructor(t,n={}){var y,E,b,v,D,M,T,B,G,_,F,A,j,N,Z,ie,de;super();w(this,Yn);h(this,"options");h(this,"container");h(this,"Debug");w(this,wr);w(this,Ar);w(this,qd);w(this,Jd);w(this,Zm);w(this,Sc);w(this,Kd);w(this,Qd);h(this,"rendererDomElement");w(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 Tr("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:c1,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new Mv,externalTweenGroup:new Mv,cameraObject:new z3,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1,directionalLight:new a1(16777215,.3*Math.PI),ambientLight:new GD(16777215,.741*Math.PI),renderer:void 0,threeJSScene:new cu,depthRangeFor3D:[0,1]});h(this,"camera");w(this,$t);w(this,ns);w(this,Pr);w(this,ba);w(this,on);w(this,te,{});w(this,Ux,window.matchMedia("screen and (min-resolution: 2dppx)"));h(this,"map");w(this,Fi,()=>{var t,n;(t=this.signal)!=null&&t.aborted||!((n=s(this,te))!=null&&n.renderSystem)||(s(this,te).renderSystem.twoDdirty=!0)});w(this,$r,()=>{var t,n;(t=this.signal)!=null&&t.aborted||!((n=s(this,te))!=null&&n.renderSystem)||(s(this,te).renderSystem.threeDdirty=!0)});w(this,Gx,()=>{this.map&&(s(this,Q).depthRangeFor3D=this.map.painter.depthRangeFor3D)});w(this,ep,(t,n)=>{t.addEventListener("childadded",n),t.addEventListener("childremoved",n),this.onAbort(()=>{t.removeEventListener("childadded",n),t.removeEventListener("childremoved",n)})});w(this,il,"standalone");w(this,zx,()=>{s(this,te).geometryDisposalSystem.dirty=!0,this.render()});w(this,Wg,t=>Math.trunc(t*10)/10);w(this,$x,()=>{se(this,Yn,e6).call(this,Mp()),s(this,te).twoDDrawSystem.dirty=!0,s(this,Xm).call(this,void 0,void 0,!0)});w(this,Vx,()=>{s(this,Xm).call(this)});w(this,Wm);w(this,Xm,(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;if(s(this,Q).canvasWidth=i,s(this,Q).canvasHeight=a,se(this,Yn,e6).call(this,Mp()),s(this,qg).call(this),se(this,Yn,sk).call(this),s(this,te).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,te).cameraSystem.dirty=!0,this.map!=null){g1(this.map,this.camera.minZoomLevel,this.camera.maxZoomLevel);let c=this.camera.zoomLevel,d=ft.clamp(c,this.camera.minZoomLevel,this.camera.maxZoomLevel);d!==c&&this.camera.setZoomLevel(d)}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()});w(this,Hx,()=>{this.renderSync()});w(this,Xg,new Ie);h(this,"project",(t,n)=>{if(s(this,Ar).position.z+this.camera.elevation>n.z){s(this,Xg).copy(n);let o=s(this,Xg).project(s(this,Wm)),i=(o.x+1)/2*this.canvasWidth-0/2,a=(-o.y+1)/2*this.canvasHeight-0/2,u=s(this,Wg).call(this,i),l=s(this,Wg).call(this,a);t.x=u,t.y=l,t instanceof Ie&&(t.z=o.z)}else t.x=-1e3,t.y=-1e3,t instanceof Ie&&(t.z=1/0)});w(this,Yg,(t,n)=>{s(this,on).setBufferSize(t,n),s(this,Ar).aspect=t/n,s(this,Ar).updateProjectionMatrix(),s(this,Ar).updateMatrixWorld(!0),s(this,Zm).x=t,s(this,Zm).y=n});w(this,qg,()=>{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,Yg).call(this,o,i),(a=this.map)==null||a.resize(),s(this,Q).shouldMeasureCanvas=!1});h(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 Tr?o:(V.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 Tr)return o}return n?s(this,Q).geometryScene:void 0});h(this,"showCollisionBoxes",()=>{s(this,te).collisionSystem.showCollisionBoxes(),this.render()});h(this,"hideCollisionBoxes",()=>{s(this,te).collisionSystem.hideCollisionBoxes(),this.render()});h(this,"projectScreenXYToCoordinate",(t,n,o=!1)=>{var p,m;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 ct(a,u),c,d;if(o)ok.setFromCamera(l,s(this,Ar)),c=(p=ok.intersectObject(s(this,Sc),!1)[0])==null?void 0:p.point;else{let g=s(this,te).interactionSystem.getThreeDIntersectsFromXY(l);c=(m=g==null?void 0:g[0])==null?void 0:m.point,d=s(this,te).interactionSystem.getGroupContainerIntersectsFromXY(l)}if(c)return{coordinate:this.convert3DMapPositionToCoordinate(c),groupContainers:d}});h(this,"projectCoordinateToScreenXY",t=>{let n=this.convertTo3DMapPosition(t[1],t[0],t[2]||0),o=new ct;return this.project(o,n),{x:o.x,y:o.y}});h(this,"convert3DMapPositionToCoordinate",t=>{var i,a,u,l;let{lat:n,lon:o}=p1((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]});h(this,"setBackgroundColor",(t,n)=>{s(this,on).setBackgroundColor(t,n)});h(this,"getMetersPerPixel",()=>s(this,te).cameraSystem.getCurrentMetersPerPixel());h(this,"hideOutdoorLayersIntersectingPolygons",(t,n)=>{s(this,te).outdoorLayersSystem.hideLayersIntersectingPolygons(t,n),this.render()});w(this,tp,new yp);w(this,Jg,new qt);w(this,Kg,t=>{var n;V.error("Render failed: ",t,(n=t.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:t})});h(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,Kg))});h(this,"renderSync",()=>{var t;return(t=this.signal)!=null&&t.aborted?Promise.resolve():s(this,te).renderSystem.update(!0).catch(s(this,Kg))});w(this,al,Pl(()=>{this.publish("user-interaction-start",void 0)},0,!0));w(this,sl,Pl(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));h(this,"on",(t,n,o)=>{let i=super.on(t,n,o);return["outdoor-view-loaded","outdoor-style-loaded"].includes(t)&&this.mode==="standalone"&&x.env.NODE_ENV!=="test"&&(V.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});h(this,"off",(t,n)=>{super.off(t,n)});h(this,"getCursor",()=>s(this,te).interactionSystem.getCursor());w(this,Zx,()=>{try{s(this,il)!=="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,ba)&&this.container.contains(s(this,ba))&&this.container.removeChild(s(this,ba)),s(this,$t)&&this.container.contains(s(this,$t))&&this.container.removeChild(s(this,$t)))}catch(t){V.warn("Error during DOM cleanup, some elements may not have been removed:",t)}});w(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));h(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,on).destroy(),(o=s(this,wr))==null||o.traverse(i=>{Qr(i),"dispose"in i&&typeof i.dispose=="function"&&i.dispose()}),O(this,wr,void 0),O(this,te,void 0),s(this,Zx).call(this),O(this,on,void 0))});w(this,Ym,new Ie);w(this,Qg,new Ie);if(s(this,Q).useStandaloneCamera=(y=n.useStandaloneCamera)!=null?y:!1,s(this,Q).naturalBearing=(E=n.naturalBearing)!=null?E: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&&(O(this,il,n.mode),this.map=n.map),s(this,ep).call(this,s(this,Q).geometryScene,()=>{s(this,$r).call(this),s(this,Fi).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,se(this,Yn,ik).call(this),se(this,Yn,ak).call(this),s(this,te).htmlControlsSystem=s(this,pt).call(this,new $v(this.container,{outdoorEnabled:!!this.map})),s(this,te).maskingSystem=s(this,pt).call(this,new Tx(s(this,Q))),s(this,il)!=="outdoors-overlay"&&s(this,te).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),x.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),O(this,on,new ov({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(b=n.gl)==null?void 0:b.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:J=>{var z;(z=n.onWebGLContextRestored)==null||z.call(n,J),s(this,Fi).call(this),s(this,$r).call(this),this.render()},onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(v=n.backgroundAlpha)!=null?v:1})),s(this,Q).renderer=s(this,on).renderer,O(this,wr,s(this,Q).threeJSScene),s(this,wr).matrixWorldAutoUpdate=!1,s(this,il)!=="standalone"&&s(this,wr).add(w5()),s(this,wr).add(s(this,Q).geometryScene);let o=window.__THREE_DEVTOOLS__;x.env.NODE_ENV==="dev"&&typeof o<"u"&&(o.dispatchEvent(new CustomEvent("observe",{detail:s(this,wr)})),o.dispatchEvent(new CustomEvent("observe",{detail:s(this,on)}))),O(this,Ar,new z3(lee,this.aspect,50,1e5)),s(this,Q).cameraObject=s(this,Ar),O(this,Jd,new OD),s(this,Jd).matrixWorldAutoUpdate=!1,s(this,Ar).renderOrder=999;let i=new Ni;i.add(s(this,Ar)),O(this,Qd,new Ni),s(this,Qd).add(i),s(this,wr).add(s(this,Qd)),s(this,Ar).updateProjectionMatrix(),s(this,Ar).updateMatrixWorld(!0),(D=n.__EXPERIMENTAL_shadows)!=null&&D.enabled&&(s(this,te).shadowsSystem=s(this,pt).call(this,new Fx(s(this,Q),s(this,on),s(this,Qd),n.__EXPERIMENTAL_shadows)),this.map&&this.onMapLibreEvent("render",s(this,Gx))),O(this,Wm,this.mode==="standalone"?s(this,Ar):s(this,Jd)),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,on).domElement(),O(this,Zm,new ct);let a=new xo(1e6,1e6),u=new kn({color:0,visible:!1});O(this,Sc,new rt(a,u)),s(this,Sc).name="worldPlane",s(this,wr).add(s(this,Sc)),(M=n.gl)!=null&&M.canvas||t.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,Vx),{capture:!1,signal:this.signal}),s(this,Ux).addEventListener("change",s(this,$x),{signal:this.signal}),typeof ResizeObserver=="function"&&((T=x.env)==null?void 0:T.NODE_ENV)!=="test"&&(O(this,Kd,new ResizeObserver(Sp(J=>{s(this,Xm).call(this,J[0].contentRect.width,J[0].contentRect.height)},50))),(B=s(this,Kd))==null||B.observe(t),s(this,Kd)&&this.onAbort(()=>{var J;return(J=s(this,Kd))==null?void 0:J.disconnect()})),t.classList.add("mappedin-map"),this.rendererDomElement.style.width=(G=globalThis.MappedinDebug)!=null&&G.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(_=globalThis.MappedinDebug)!=null&&_.TEST_IOS?"1920px":"100%",x.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 jv(s(this,Ar),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,Yg).call(this,Math.floor(l*this.resolutionScale),Math.floor(c*this.resolutionScale)),s(this,Q).directionalLight.position.set(-150,-150,350),s(this,wr).add(s(this,Q).directionalLight),s(this,wr).add(s(this,Q).ambientLight),s(this,te).cameraSystem=s(this,pt).call(this,new Ld(s(this,Ar),s(this,wr),s(this,on).renderer,s(this,Q),{mode:this.mode,canvasHeight:c,canvasWidth:l})),(F=globalThis.MappedinDebug)!=null&&F.__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,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-pan-start",s(this,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-rotate-start",s(this,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-zoom-start",s(this,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-tilt-start",s(this,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-pedestal-start",s(this,al),{signal:this.signal}),s(this,te).cameraSystem.on("user-dolly-end",s(this,sl),{signal:this.signal}),s(this,te).cameraSystem.on("user-pan-end",s(this,sl),{signal:this.signal}),s(this,te).cameraSystem.on("user-rotate-end",s(this,sl),{signal:this.signal}),s(this,te).cameraSystem.on("user-zoom-end",s(this,sl),{signal:this.signal}),s(this,te).cameraSystem.on("user-tilt-end",s(this,sl),{signal:this.signal}),s(this,te).cameraSystem.on("user-pedestal-end",s(this,sl),{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 Gg(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 zv(s(this,Q),s(this,te).cameraSystem));let d=()=>{let{panBounds:J,fov:z,convertAltitudeToZoomLevel:X}=s(this,te).cameraSystem;if(s(this,te).panBoundsSystem.autoMinZoomLevel){if(J.radius<=0)return;let W=Math.min(s(this,Q).canvasWidth/s(this,Q).canvasHeight,1),ee=z*Math.PI/180*W,ce=Math.tan(ee/2),{radius:ye,center:Ce}=s(this,te).cameraSystem.panBounds,Pe=ye/ce,Le=this.getThreeCamera().getWorldPosition(new Ie),be=Ce.distanceTo(Le),He=Math.abs(Le.z-Ce.z),tt=Pe*He/be,lt=X(tt);M5(lt,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(lt)}this.publish("pan-bounds-change",s(this,te).cameraSystem.panBounds)};s(this,te).panBoundsSystem.on("update",d,{signal:this.signal}),this.camera=s(this,pt).call(this,new Nv(this,s(this,te),s(this,Q)));let p=()=>{s(this,te).geometryInFocusSystem&&s(this,te).geometryInFocusSystem.resize(),this.render()};this.camera.on("padding-change",p,{signal:this.signal}),this.camera.setZoomLevel((A=n.zoomLevel)!=null?A:i6),this.camera.setBearing((j=n.bearing)!=null?j:o6),this.camera.setPitch((N=n.pitch)!=null?N:n6),this.camera.setMaxZoomLevel(uee),this.camera.setMinZoomLevel(see),s(this,te).domVisiblitySystem=s(this,pt).call(this,new bv(s(this,Q),s(this,ba))),s(this,te).domMutationSystem=s(this,pt).call(this,new kv(s(this,Q),s(this,ba))),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 Bv(s(this,Q))),s(this,te).collisionSystem=s(this,pt).call(this,new av(s(this,ns),s(this,Q),((Z=n.useCollisionWorker)!=null?Z:!0)&&((ie=n.useWorkers)!=null?ie:!0))),s(this,te).twoDDrawSystem=s(this,pt).call(this,new Ev(s(this,Q),s(this,Pr),n.transformImageRequest)),s(this,te).twoDDrawSystem.on("img:loaded",this.render),s(this,te).interactionSystem=s(this,pt).call(this,new ag(this.rendererDomElement,s(this,Q),s(this,Ar),s(this,Sc),s(this,te).cameraSystem.isUserInteracting)),s(this,te).interactionSystem.on("doubletap-with-onefinger",J=>{var z;s(this,te).cameraSystem.enableZoom&&this.camera.animateTo({center:(z=this.projectScreenXYToCoordinate(J.clientX,J.clientY))==null?void 0:z.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:Q3,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:Q3,easing:"ease-out"})}),s(this,te).interactionSystem.on("hover",this.render),s(this,te).interactionSystem.on("click",J=>{var ce,ye,Ce,Pe,Le,be,He,tt,lt;if(J.entity2D.some(U=>U.id==="watermark")&&typeof s(this,te).watermarkSystem.options.onClick=="function"&&s(this,te).watermarkSystem.options.interactive){s(this,te).watermarkSystem.options.onClick();return}if(!J.position){V.error("Pointer event outside world-plane");return}let X=J.entity3D?[(ce=J.entity3D)==null?void 0:ce.id]:[];(Pe=(Ce=(ye=J.entity3D)==null?void 0:ye.parentObject3D)==null?void 0:Ce.userData)!=null&&Pe.entityId&&X.push((He=(be=(Le=J.entity3D)==null?void 0:Le.parentObject3D)==null?void 0:be.userData)==null?void 0:He.entityId);let W=[],ee=[];for(let U of J.entity2D)U.components[0]instanceof bu?W.push(U.id):U.components[0]instanceof yu&&ee.push(U.id);this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(J.position),geometry:X,paths:((tt=J.entity3D)==null?void 0:tt.components[0])instanceof fc?[J.entity3D.id]:[],markers:W,models:((lt=J.entity3D)==null?void 0:lt.components[0])instanceof mc?[J.entity3D.id]:[],labels:ee,containers:Array.isArray(J.groupContainers)?J.groupContainers.map(U=>U.userData.entityId):[],pointerEvent:J.pointerEvent})}),s(this,te).interactionSystem.on("hover",J=>{var W,ee,ce;if(!J.position)return;let z=[],X=[];for(let ye of J.entity2D)ye.components[0]instanceof bu?z.push(ye.id):ye.components[0]instanceof yu&&X.push(ye.id);this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(J.position),geometry:J.entity3D?[(W=J.entity3D)==null?void 0:W.id]:[],paths:((ee=J.entity3D)==null?void 0:ee.components[0])instanceof fc?[J.entity3D.id]:[],markers:z,models:((ce=J.entity3D)==null?void 0:ce.components[0])instanceof mc?[J.entity3D.id]:[],labels:X,containers:Array.isArray(J.groupContainers)?J.groupContainers.map(ye=>ye.userData.entityId):[]})}),s(this,te).geometryInFocusSystem=s(this,pt).call(this,new ox(s(this,Q),s(this,Wm)));let m=J=>{this.publish("geometry-in-focus",J)};s(this,te).geometryInFocusSystem.on("geometry-in-focus",m,{signal:this.signal}),s(this,te).twoDVisiblitySystem=s(this,pt).call(this,new Cv(s(this,Q))),s(this,te).drawSystem=s(this,pt).call(this,new Sv(s(this,Q),this.convertTo3DMapPosition,this.convert3DMapPositionToCoordinate)),s(this,te).twoDProjectionSystem=s(this,pt).call(this,new vv(s(this,Q),this.project)),s(this,te).exporterSystem=s(this,pt).call(this,new ug(s(this,Q))),s(this,te).meshOptimizationSystem=s(this,pt).call(this,new yv(s(this,Q),this.convertTo3DMapPosition)),s(this,te).meshOptimizationSystem.on("geometry-2d-added",this.render,{signal:this.signal}),s(this,te).meshOptimizationSystem.on("geometry-group-added",s(this,zx),{signal:this.signal}),s(this,te).modelSystem=s(this,pt).call(this,new jx(s(this,Q),this.convertTo3DMapPosition)),s(this,te).modelSystem.on("model-loaded",()=>{s(this,te).shadowsSystem&&(s(this,te).shadowsSystem.needsRender=!0),this.render()},{signal:this.signal}),s(this,te).modelSystem.on("batch-changed",()=>{s(this,te).interactionSystem.dirty3D=!0},{signal:this.signal}),s(this,te).meshDetachmentSystem=s(this,pt).call(this,new yx(s(this,Q))),s(this,te).meshModificationSystem=s(this,pt).call(this,new xx(s(this,Q))),s(this,te).geometryDisposalSystem=s(this,pt).call(this,new Sx(s(this,Q))),s(this,te).textureSystem=s(this,pt).call(this,new Cx(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 fT(s(this,Q),this.convertTo3DMapPosition)),s(this,te).clippingPlaneSystem=s(this,pt).call(this,new wx(s(this,Q))),s(this,te).renderOrderSystem=s(this,pt).call(this,new Dx(s(this,Q))),s(this,te).pluginSystem=s(this,pt).call(this,new Ax),s(this,te).customGeometrySystem=s(this,pt).call(this,new Vv(s(this,Q),this.convertTo3DMapPosition));let g=typeof n.outlines=="object"?n.outlines:void 0;g&&(s(this,Q).outlinesOptions=g),s(this,te).outlineInterpolationSystem=s(this,pt).call(this,new Wv(s(this,Q),g)),s(this,te).outlineInterpolationSystem.on("needs-render",this.render,{signal:this.signal}),s(this,te).renderSystem=s(this,pt).call(this,new Dv(s(this,on),s(this,Q),this.mode,s(this,wr),s(this,Ar),this.viewCamera,s(this,te))),s(this,te).imageSystem=s(this,pt).call(this,new rx(s(this,Q),this.convertTo3DMapPosition,this.project,n.bearing,n.naturalBearing,n.imagePlacementOptions,n.transformImageRequest)),s(this,te).text3DSystem=s(this,pt).call(this,new P5(s(this,Q),this.convertTo3DMapPosition,(de=n.useWorkers)!=null?de:!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,qg),{signal:this.signal}),s(this,te).outdoorLayersSystem=s(this,pt).call(this,new ax(this.map)),s(this,te).occlusion2DSystem=s(this,pt).call(this,new Ix(s(this,Q),this.convertTo3DMapPosition,s(this,on))),n.occlusionEnabled&&s(this,te).occlusion2DSystem.enable(),this.Debug=new Ex(this),n.environment!==!1&&O(this,qd,se(this,Yn,r6).call(this)),s(this,Hx).call(this)}get viewCamera(){return s(this,Jd)}get cameraObject(){return s(this,Ar)}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:Mp()}get aspect(){return this.canvasWidth/this.canvasHeight}get labelsCanvas(){var t;return(t=s(this,Pr))!=null?t:null}get mode(){return s(this,il)}addGroupContainer(t,n,o){if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let i=new Tr(t);s(this,ep).call(this,i,()=>{s(this,$r).call(this),s(this,Fi).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&&hi(i,n.interactive,s(this,Q)),(n==null?void 0:n.focusable)!==void 0&&I1(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 Tr&&a.addEntity(i),s(this,$r).call(this),this.render()}else V.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))V.error("Custom geometry with ID '".concat(t,"' already exists. The custom geometry cannot be added."));else{let u=new Bm(n,o),l=new Jt(u,new xs(i));(i==null?void 0:i.interactive)!==void 0&&hi(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 Tr?c.addEntity(l):s(this,Q).geometryScene.addEntity(l),s(this,te).panBoundsSystem.dirty=!0,s(this,$r).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 Qn(t);s(this,ep).call(this,d,()=>{s(this,$r).call(this),s(this,Fi).call(this)}),d.userData.dirty=!0,s(this,Q).geometry3DMap.set(t,d);let p=typeof o=="function"?o(n.features[0]):o;(p==null?void 0:p.altitude)!=null&&(d.position.z=p.altitude);for(let g of n.features){if(g.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(g.geometry.type))continue;let y=(g==null?void 0:g.id)||((a=g==null?void 0:g.properties)==null?void 0:a.id)||ht(),E={color:S1};if(typeof o=="function")E=(u=o(g))!=null?u:{color:S1};else{let l=o||{color:S1},{visible:v,altitude:D}=l;E=Zr(l,["visible","altitude"])}let b=s(this,te).meshOptimizationSystem.createEntityFromFeature(y,g,k({outline:!0},E));s(this,Q).geometry3DMap.set(y,b),d.userData.entities3D.add(y),s(this,te).textureSystem.dirty=!0}(p==null?void 0:p.__EXPERIMENTAL_maskEnabled)===!0&&fE(d,{enabled:p.__EXPERIMENTAL_maskEnabled,maskId:p.__EXPERIMENTAL_maskId,effect:p.__EXPERIMENTAL_maskEffect,mode:p.__EXPERIMENTAL_maskMode}),d.setVisible((c=p==null?void 0:p.visible)!=null?c:!0);let m=this.getParentContainer(i);m instanceof Tr&&m.addEntity(d),s(this,te).panBoundsSystem.dirty=!0,s(this,$r).call(this),this.render()}else V.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){var a;try{cB(t,n,o)}catch(u){V.error(u);return}if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let u=new Jv(n),l=new Jt(u,new xs(o));l.id=t||ht(),u.mesh.userData={entityId:l.id,type:"path"},s(this,Q).geometry3DMap.set(l.id,l);let c=this.getParentContainer(i);c instanceof Tr&&c.addEntity(l);let d=n.geometry.coordinates;if(d){let p=this.convertTo3DMapPosition(d[1],d[0],(a=d[2])!=null?a:0);s(this,te).panBoundsSystem.expandBoundsIfOutside(p)}s(this,$r).call(this),this.render()}else V.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,c,d;try{V8(t,n,o)}catch(p){V.error(p);return}if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let p=new Qn(t);s(this,ep).call(this,p,()=>{s(this,$r).call(this),s(this,Fi).call(this)}),s(this,Q).geometry3DMap.set(t,p),p.userData.dirty=!0,p.userData.modelURL=o.url;for(let y of n.features){let E=y.id||y.properties.id||ht(),b=s(this,te).modelSystem.createModelFromFeature(E,y,k({},o));(y.properties.interactive!==void 0||o.interactive!=null)&&hi(b,(u=y.properties.interactive)!=null?u:o.interactive,s(this,Q)),o.clippingPlaneZOffset!=null&&(b.components[7]=new v1,b.components[7].verticalOffset=o.clippingPlaneZOffset),b.parentId=p.userData.entityId,s(this,Q).geometry3DMap.set(E,b),p.userData.entities3D.add(E)}let m=this.getParentContainer(i);m instanceof Tr&&m.addEntity(p);let g=(l=n.features[0])==null?void 0:l.geometry.coordinates;if(g){let y=this.convertTo3DMapPosition(g[1],g[0],(c=g[2])!=null?c:0);s(this,te).panBoundsSystem.expandBoundsIfOutside(y)}s(this,$r).call(this),(d=this.render())==null||d.then(a)}else V.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{f5(t,n,o||{})}catch(l){V.error(l);return}if(a===void 0||!s(this,Q).geometry2DMap.has(a)&&!s(this,Q).geometry3DMap.has(a)){let l=se(this,Yn,t6).call(this,t,new bu(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"&&hi(l,o==null?void 0:o.interactive,s(this,Q)),(o==null?void 0:o.enabled)!=null&&x1(l,o.enabled),(o==null?void 0:o.occlude)!=null&&cE(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 Jt&&c.attach(l),(u=this.getParentContainer(i))==null||u.addEntity(l),s(this,te).panBoundsSystem.expandBoundsIfOutside(l.object3d.position),this.render()}else V.error("Marker2D with ID '".concat(a,"' already exists. The marker cannot be added."));return{id:a,type:"marker"}}addText3D(t,n,o,i){var a;if(!s(this,Q).geometry3DMap.has(t)&&!s(this,Q).geometry2DMap.has(t)){let u=new b1(oe(k({},n),{properties:oe(k({},n.properties),{id:t,content:n.properties.text})})),l=new Jt(u,new Dh(o==null?void 0:o.appearance));l.id=t,u.mesh.userData.entityId=t.toString(),u.mesh.userData.type="text3d",s(this,Q).geometry3DMap.set(t,l);let c=this.getParentContainer(i);c instanceof Tr&&c.addEntity(l);let d=n.geometry.coordinates;if(d){let p=this.convertTo3DMapPosition(d[1],d[0],(a=d[2])!=null?a:0);s(this,te).panBoundsSystem.expandBoundsIfOutside(p)}s(this,$r).call(this),this.render()}else V.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");F5.parse(o)}catch(p){V.error(p);return}let i=s(this,Q).geometry3DMap.get(t);if((i==null?void 0:i.type)!=="geometry"){V.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 p=s(this,Q).geometry3DMap.get(a.textEntityId);if((p==null?void 0:p.type)!=="text3d"){V.error(".labelText3D failed: existing text3d not found");return}return{id:p.id,type:p.type}}let u=new b1({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:ht()}});u.polygonEntityId=t;let l=new Jt(u,new Dh(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{p5(t,n,o||{})}catch(l){V.error(l);return}if(a===void 0||!s(this,Q).geometry2DMap.has(a)&&!s(this,Q).geometry3DMap.has(a)){let l=se(this,Yn,t6).call(this,t,new yu(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&&hi(l,o==null?void 0:o.interactive,s(this,Q)),(o==null?void 0:o.enabled)!=null&&x1(l,o.enabled),(o==null?void 0:o.occlude)!=null&&cE(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 Jt&&c.attach(l),(u=this.getParentContainer(i))==null||u.addEntity(l),s(this,te).panBoundsSystem.expandBoundsIfOutside(l.object3d.position),s(this,Fi).call(this),this.render()}else V.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{U8(t,n||{})}catch(d){V.error(d);return}let i=new fc(t,aT(n)),a=new Jt(i,new xs({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)||ht(),i.mesh.userData={entityId:a.id,type:"path"},s(this,Q).geometry3DMap.set(a.id,a),(n==null?void 0:n.interactive)!=null&&hi(a,n==null?void 0:n.interactive,s(this,Q));let u=this.getParentContainer(o);return u instanceof Tr&&u.addEntity(a),s(this,te).panBoundsSystem.dirty=!0,s(this,$r).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,a;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&&Qr(n.object3d);else if(n.type==="group-container"){s(this,Q).geometry3DMap.delete(n.userData.entityId);for(let u of n.childrenIds.values())this.remove(u),n.userData.entities2D.delete(u);Qr(n)}else if(n.type==="geometry-group"){s(this,Q).geometry3DMap.delete(n.userData.entityId);for(let u of n.userData.entities3D.values())this.remove(u),n.userData.entities3D.delete(u);Qr(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let u=n.components[0];if(n.entities2D.size>0){for(let c of n.entities2D.values())this.remove(c);n.removeAllEntities()}let l=(i=(o=n.parentObject3D)==null?void 0:o.userData.entityId)!=null?i:n.parentId;if(l){let c=s(this,Q).geometry3DMap.get(l);c instanceof Qn&&c.userData.entities3D.delete(n.id)}if(n.type==="model"){if(s(this,te).modelSystem.removeInstance(n)&&n.object3d&&Qr(n.object3d),l){let d=s(this,Q).geometry3DMap.get(l);if(d instanceof Qn&&d.userData.entities3D.size===0){let p=!1;for(let m of d.children)if(m.children.length>0){let g=m.children[0];if(g.isInstancedMesh&&((a=g.count)!=null?a:0)>0){p=!0;break}}p||this.remove(l)}}}else n.object3d&&Qr(n.object3d);if(n.type==="geometry"){let c=n.components[3];c&&(c.enabled=!1,c.dirty=!0)}"textMesh"in u&&u.textMesh!=null&&this.remove(u.textMesh.userData.entityId),s(this,Q).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let u=n.attachedTo;if(u){let l=s(this,Q).geometry3DMap.get(u);l instanceof Jt&&l.detach(n)}n.object3d&&Qr(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&&Qr(n.object3d),s(this,Q).geometry3DMap.delete(n.id);else if(n.type==="text3d"){Qr(n.object3d);let{batchedText:u,textMesh:l,polygonEntityId:c}=n.components[0];if(l&&(u&&u.removeText(l),Qr(l)),c){s(this,te).text3DSystem.remove(c);let d=s(this,Q).geometry3DMap.get(c);(d==null?void 0:d.type)==="geometry"&&(d.components[0].textMesh=void 0,d.components[0].textEntityId=void 0)}s(this,Q).geometry3DMap.delete(n.id)}s(this,$r).call(this),s(this,Fi).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,wr)}getThreeCamera(){return s(this,Ar)}async setEnvironment(t){if(s(this,wr))if(t==="basic"){s(this,qd)||O(this,qd,se(this,Yn,r6).call(this));let n=await s(this,qd);s(this,wr).environment=n}else s(this,wr).environment=null}getEnvironment(){var t;return(t=s(this,wr))!=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 Nr;if(t==null)n.setFromObject(s(this,Q).geometryScene);else{let o=Nc(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 dn?i.geometry:void 0;i.mesh instanceof r1&&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(du(n))return y5(n).map(this.convert3DMapPositionToCoordinate)}hasState(t){return Nc(s(this,Q),t)!=null}getState(t){var o,i,a,u,l,c,d,p,m,g,y,E,b,v,D,M,T,B,G,_,F,A,j,N,Z,ie,de,J,z;if(t==null)return{type:"map-view",hoverColor:s(this,Q).hoverColor,text3dHoverColor:s(this,Q).text3dHoverColor};let n=Nc(s(this,Q),t);if((n==null?void 0:n.type)==="custom-geometry"){let X=n.components[0],W=n.components[1];return{id:n.id,type:"custom-geometry",visible:W.visible,altitude:W.altitude,parent:(o=n.parentObject3D)==null?void 0:o.userData.entityId,position:this.convert3DMapPositionToCoordinate(X.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let X=Array.from(n.userData.entities3D.values()),W=X==null?void 0:X[0],ee=W?this.getState(W):{},ce=s(this,Q),ye=this.convert3DMapPositionToCoordinate;return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:n.position.z,initialColor:ee==null?void 0:ee.initialColor,color:ee==null?void 0:ee.color,side:(i=ee==null?void 0:ee.side)!=null?i:"double",opacity:ee==null?void 0:ee.opacity,height:ee==null?void 0:ee.height,texture:ee==null?void 0:ee.texture,topColor:ee==null?void 0:ee.topColor,topTexture:ee==null?void 0:ee.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(Ce=>s(this,Q).geometry3DMap.get(Ce)).every(Ce=>Ce&&Ce.components[2]!=null),children:X,bevel:ee==null?void 0:ee.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,get position(){return dT(n,ce,ye)}}}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(cee).z)!=null?d:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map(X=>this.getState(X)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let X=n.components[0],W=n.object3d.parent,ee=W==null?void 0:W.userData.entityId;return{id:n.id,type:"label",text:X.text||"",parent:{id:ee,type:W==null?void 0:W.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:X.enabled,visible:X.visible,initialRank:Sh(X.initialRank),options:{rank:Sh(X.rank),appearance:X.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,occlude:(m=(p=n.components[2])==null?void 0:p.enabled)!=null?m:!1}}}else if((n==null?void 0:n.type)==="marker"){let X=n.components[0],W=n.object3d.parent,ee=W==null?void 0:W.userData.entityId;return{id:n.id,type:"marker",enabled:X.enabled,visible:X.visible,placement:X.options.placement,dynamicResize:X.options.dynamicResize,parent:{id:ee,type:W==null?void 0:W.type},position:this.convert3DMapPositionToCoordinate(n.position),element:X.containerEl,initialRank:Sh(X.initialRank),contentHTML:X.contentHtml,options:{rank:Sh(X.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:X.options.lowPriorityPin,occlude:(y=(g=n.components[2])==null?void 0:g.enabled)!=null?y:!1,zIndex:X.options.zIndex}}}else if((n==null?void 0:n.type)==="geometry"){let{color:X,hoverColor:W,initialColor:ee,initialTopColor:ce,topColor:ye,altitude:Ce}=n.components[1],Pe=n.components[0],Le=n.components[4],be=n.components[1],He=n.components[6],tt=n.components[2],lt=n.components[3],U=n.parentObject3D;return{id:n.id,type:"geometry",opacity:be.opacity,initialColor:ee,color:X,focusable:Le!=null&&Le.vertices!=null&&Le.vertices.length>0,initialTopColor:ce,topColor:ye,side:be.side,hoverColor:W,hovered:!!(tt!=null&&tt.hover),height:be.height,visible:be.visible,outline:lt==null?void 0:lt.enabled,showImage:be.showImage,texture:(E=He==null?void 0:He.texture)==null?void 0:E.path,topTexture:(b=He==null?void 0:He.topTexture)==null?void 0:b.path,flipImageToFaceCamera:be.flipImageToFaceCamera,enableImageCollisions:be.enableImageCollisions,parent:{id:U==null?void 0:U.userData.entityId,type:U==null?void 0:U.type},altitude:Ce,bevel:be.bevel,position:this.convert3DMapPositionToCoordinate(Pe.position),interactive:n.components[2]!=null,borderVisible:be.borderVisible,borderColor:be.borderColor,borderWidth:be.borderWidth}}else if((n==null?void 0:n.type)==="model"){let X=n.components[0],W=n.components[1],ee=n.components[2],ce=X.feature.geometry.coordinates,ye=[ce[0],ce[1],(v=ce[2])!=null?v:0];return{id:n.id,type:"model",position:ye,interactive:ee!=null,material:W.material,parent:(D=n.parentObject3D)!=null&&D.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:W.visible,verticalOffset:W.verticalOffset,color:W.color,opacity:W.opacity,rotation:(M=W.rotation)!=null?M:Fl,scale:(T=W.scale)!=null?T:Ol}}else if((n==null?void 0:n.type)==="path"){let X=n.components[0],W=n.components[2],ee=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(X.position),visible:ee.visible,interactive:W!=null,completeFraction:X.completeFraction,color:ee.color,accentColor:X.accentColor,width:X.width,animateArrowsOnPath:X.animateArrowsOnPath,displayArrowsOnPath:X.displayArrowsOnPath,verticalOffset:ee.altitude,highlightCompleteFraction:X.highlightCompleteFraction,highlightStartFraction:X.highlightStartFraction,highlightEndFraction:X.highlightEndFraction,highlightColor:X.highlightColor,highlightWidthMultiplier:X.highlightWidthMultiplier,xrayOpacity:X.xrayOpacity,smoothingTension:X.smoothingTension,smoothingCornerRadius:X.smoothingCornerRadius,dashed:X.dashed,dashLength:X.dashLength,dashGap:X.dashGap,dashRelativeToWidth:X.dashRelativeToWidth,dashSize:X.dashSize,gapSize:X.gapSize,dashAbsolute:X.dashAbsolute,dashMeters:X.dashMeters,gapMeters:X.gapMeters,__EXPERIMENTAL_GEOMETRY:X.__EXPERIMENTAL_GEOMETRY,__EXPERIMENTAL_ENDCAP_EXTENSION:X.__EXPERIMENTAL_ENDCAP_EXTENSION,__EXPERIMENTAL_BILLBOARDING:X.__EXPERIMENTAL_BILLBOARDING,__EXPERIMENTAL_BORDER:X.__EXPERIMENTAL_BORDER,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:X.__EXPERIMENTAL_PREVENT_SELF_OVERLAP}}else if((n==null?void 0:n.type)==="image"){let X=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate(X.position),visible:n.components[1].visible,verticalOffset:(B=X.feature.properties.verticalOffset)!=null?B:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(G=X.feature.properties.width)!=null?G:0,height:(_=X.feature.properties.height)!=null?_:0,rotation:(F=X.feature.properties.rotation)!=null?F:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof b1){sT(n);let X=n.components[0],W=n.components[1],{textMesh:ee}=X,ce=X.feature.properties,ye=(A=X.mesh)==null?void 0:A.parent;ye instanceof Tr&&((j=ye.children.find(He=>He.type==="batchedtext"))==null||j.getWorldPosition(s(this,Qg))),s(this,Ym).set(0,0,0);let Ce=ee?ee.getWorldPosition(s(this,Ym)):s(this,Ym),Pe=(ie=(Z=ce.rotation)!=null?Z:(N=ce.textArea)==null?void 0:N.rotation)!=null?ie:0,Le=(J=(de=ce.content)!=null?de:ce.text)!=null?J:"";return Object.assign({},xu,W.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(Ce.add(s(this,Qg))),visible:(z=X.visible)!=null?z:!1,content:Le,rotation:Pe})}else return}}getRenderedState(t){let n=typeof t=="string"||typeof t=="number"?t:t.id,o=Nc(s(this,Q),n);if(o&&o.type==="label")return{textVisible:o.components[0].textVisible}}setState(t,n){var i,a,u,l,c,d,p;if(typeof t=="object"&&n==null){"hoverColor"in t&&(Eh(t.hoverColor)?s(this,Q).hoverColor=(i=t.hoverColor)!=null?i:s(this,Q).hoverColor:V.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=Nc(s(this,Q),t);if(o!=null){if(o.type==="custom-geometry"){let m=s(this,Q).geometry3DMap.get(o.id);if(m instanceof Jt&&m.components[0]instanceof Bm){let g=n;Bl(o,s(this,Q),g.visible),Mh(o,s(this,Q),g.altitude),uE(o,g.position,this.convertTo3DMapPosition,s(this,te).panBoundsSystem),lE(o,this.getParentContainer(g.parent,!1)),hi(o,g.interactive,s(this,Q))&&s(this,$r).call(this)}}else if(o.type==="path"){let m=n;hi(o,m.interactive,s(this,Q))&&s(this,$r).call(this),Mh(o,s(this,Q),m.verticalOffset),iT(o,s(this,Q),m)}else if(o.type==="model"){let m=n;hi(o,m.interactive,s(this,Q))&&s(this,$r).call(this),Bl(o,s(this,Q),m.visible),lT(o,m,this.convertTo3DMapPosition,s(this,te).panBoundsSystem),cT(o,m)}else if(o.type==="group-container"){let m=n;Bl(o,s(this,Q),m.visible)&&(s(this,te).pathSystem.verticalDistanceDirty=!0,s(this,te).geometryInFocusSystem.focusablesDirty=!0),Mh(o,s(this,Q),m.altitude)&&(s(this,te).pathSystem.verticalDistanceDirty=!0),hi(o,m.interactive,s(this,Q))&&s(this,$r).call(this),E1(o,s(this,Q),m.opacity)&&(s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),m.preloadGeometry&&o.userData.preloadGeometry!==!0&&(o.userData.preloadGeometry=!0,s(this,te).outlineInterpolationSystem.geometries3DDirty=!0),I1(o,m.focusable)&&(s(this,te).geometryInFocusSystem.focusablesDirty=!0)}else if(o.type==="geometry-group"){let m=n;Bl(o,s(this,Q),m.visible),H5(o,s(this,Q),m),mE(o,s(this,Q),m.outline),m.height!=null&&sE(o,s(this,Q),m.height),m.altitude!=null&&(o.position.z=m.altitude),pE(o,s(this,Q),m)&&(s(this,te).textureSystem.dirty=!0),pE(o,s(this,Q),m),Z5(o,s(this,Q),m.shading),E1(o,s(this,Q),m.opacity)&&(s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),hi(o,m.interactive,s(this,Q))&&(s(this,$r).call(this),s(this,Fi).call(this)),hE(o,s(this,Q),m.side),fE(o,{maskId:m.maskId,enabled:m.maskEnabled,effect:m.maskEffect,mode:m.maskMode}),tT(o,s(this,Q),m.overlayStrength,m.overlayColor),m.position!=null&&(o.userData.centroid=[m.position[0],m.position[1]],o.userData.positionDirty=!0)}else if(o.type==="geometry"){if(o.components[0]instanceof dn){let m=n;if(Bl(o,s(this,Q),m.visible)&&s(this,$r).call(this),mE(o,s(this,Q),m.outline),W5(o,m),I1(o,m.focusable)&&(s(this,te).geometryInFocusSystem.focusablesDirty=!0),nT(o,m.renderOrder)&&(s(this,te).meshDetachmentSystem.dirty=!0),rT(o,m.opacity)&&(s(this,te).meshDetachmentSystem.dirty=!0,s(this,te).interactionSystem.dirty3D=!0,s(this,te).outlineInterpolationSystem.outlineOpacitiesDirty=!0),dE(o,m.flipImageToFaceCamera),Q5(o,m.enableImageCollisions),Mh(o,s(this,Q),m.altitude)){let g=o.components[1],y=((u=g.altitude)!=null?u:0)+((l=g.height)!=null?l:0);s(this,te).panBoundsSystem.expandBoundsIfOutside(new Ie(0,0,y)),s(this,te).shadowsSystem&&(s(this,te).shadowsSystem.needsRender=!0)}if(m.height!=null&&sE(o,s(this,Q),m.height)){let g=o.components[1],y=((c=g.altitude)!=null?c:0)+((d=g.height)!=null?d:0);s(this,te).panBoundsSystem.expandBoundsIfOutside(new Ie(0,0,y)),s(this,te).shadowsSystem&&(s(this,te).shadowsSystem.needsRender=!0)}eT(o,m)&&(s(this,te).meshDetachmentSystem.dirty=!0,s(this,te).textureSystem.dirty=!0),X5(o,m,(p=s(this,Q).outlinesOptions)==null?void 0:p.darkenFactor),J5(o,m.hoverColor),hi(o,m.interactive,s(this,Q))&&(s(this,te).interactionSystem.dirty3D=!0),K5(o,m.hovered),hE(o,s(this,Q),m.side),oT(o,m)}}else if(o.type==="label"||o.type==="marker"){let m=n;q5(o,m,s(this,Q)),Y5(o,m,s(this,Q))&&(s(this,Fi).call(this),s(this,te).domMutationSystem.dirty=!0),uE(o,m.position,this.convertTo3DMapPosition,s(this,te).panBoundsSystem),lE(o,this.getParentContainer(m.parent,!1))&&(s(this,Fi).call(this),s(this,te).panBoundsSystem.dirty=!0),x1(o,m.enabled),Bl(o,s(this,Q),m.visible)}else if(o.type==="image"){let m=n;Bl(o,s(this,Q),m.visible),E1(o,s(this,Q),m.opacity),dE(o,m.flipImageToFaceCamera)}else if(o.type==="text3d"){let m=n;uT(o,s(this,Q),m)}this.render()}}convertTo3DMapPosition(t,n,o=0,i){var l,c,d,p,m;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}=f1((d=(c=s(this,Q).center)==null?void 0:c[1])!=null?d:0,(m=(p=s(this,Q).center)==null?void 0:p[0])!=null?m:0,t,n);return i?(i.set(a,u,o),i):new Ie(a,u,o)}get backgroundColor(){return typeof s(this,on).backgroundColor=="string"?s(this,on).backgroundColor:"#".concat(s(this,on).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,on).backgroundAlpha}getThreeRenderer(){return s(this,on)}getCenter(t){let n=Array.isArray(t)?t:this.getBoundingArea(t);return n?T5(n):void 0}isInView(t){let n=Nc(s(this,Q),t);if(s(this,Jg).identity().multiply(s(this,Ar).projectionMatrix).multiply(s(this,Ar).matrixWorldInverse),s(this,tp).setFromProjectionMatrix(s(this,Jg)),n instanceof J3)return s(this,tp).containsPoint(n.position);if(n instanceof Jt){let o=n==null?void 0:n.components[0];if(o instanceof Bm||o instanceof mc)return s(this,tp).containsPoint(this.convertTo3DMapPosition(o.feature.geometry.coordinates));if(o instanceof dn){let i=new Nr(this.convertTo3DMapPosition(o.featureBbox[1],o.featureBbox[0],0),this.convertTo3DMapPosition(o.featureBbox[3],o.featureBbox[2],0));return s(this,tp).intersectsBox(i)}}return!1}queryGeometry2DInView(t){let{screenOffsets:n,fullyContains:o}=t!=null?t:{},[i,a,u,l]=A5(this.container,n),c=new st(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 yu||g.components[0]instanceof bu).map(g=>g.id.toString())}onMapLibreEvent(t,n){if(!this.map){V.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;Cp(t,"group-container"),Cp(n,"group-container"),t.updateMatrixWorld(!0),n.updateMatrixWorld(!0);let i=h1(t,this.getThreeCamera()),a=n.clone(!0);m1(a,!0),a.updateMatrixWorld();let u=h1(a,this.getThreeCamera());if(!du(i)||!du(u))return-1;let l=0,c;o&&this.container.querySelectorAll(".debug-box").forEach(p=>p.remove());do{if(l>1e4)return-1;if(l+=20,a.setAltitude(l),u.makeEmpty(),h1(a,s(this,Ar),u),c=i.intersectsBox(u),o){let d=nE(i,"blue",this.container),p=nE(u,c?"red":"green",this.container);d.classList.add("debug-box"),p.classList.add("debug-box")}}while(c);return l}};wr=new WeakMap,Ar=new WeakMap,qd=new WeakMap,Jd=new WeakMap,Zm=new WeakMap,Sc=new WeakMap,Kd=new WeakMap,Qd=new WeakMap,Yn=new WeakSet,e6=function(t){var n;s(this,il)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(t)),s(this,Q).pixelRatio=this.resolutionScale},Q=new WeakMap,$t=new WeakMap,ns=new WeakMap,Pr=new WeakMap,ba=new WeakMap,on=new WeakMap,te=new WeakMap,Ux=new WeakMap,Fi=new WeakMap,$r=new WeakMap,Gx=new WeakMap,ep=new WeakMap,ik=function(){O(this,$t,document.createElement("div")),s(this,$t).classList.add("mappedin__smart-collision-engine__container"),O(this,ns,document.createElement("canvas")),s(this,ns).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,$t)),O(this,Pr,document.createElement("canvas")),s(this,Pr).classList.add("mappedin__smart-collision-engine__container"),s(this,Pr).width=s(this,$t).clientWidth*this.resolutionScale,s(this,Pr).height=s(this,$t).clientHeight*this.resolutionScale,s(this,Pr).style.width=s(this,$t).clientWidth+"px",s(this,Pr).style.height=s(this,$t).clientHeight+"px",s(this,$t).appendChild(s(this,ns)),s(this,$t).appendChild(s(this,Pr)),s(this,ns).width=s(this,$t).clientWidth,s(this,ns).height=s(this,$t).clientHeight,s(this,Pr).width=s(this,$t).clientWidth*this.resolutionScale,s(this,Pr).height=s(this,$t).clientHeight*this.resolutionScale,s(this,Pr).style.width=s(this,$t).clientWidth+"px",s(this,Pr).style.height=s(this,$t).clientHeight+"px"},ak=function(){O(this,ba,document.createElement("div")),s(this,ba).classList.add("mappedin-2d-entities"),Object.assign(s(this,ba).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,ba))},sk=function(){s(this,Pr).width=s(this,$t).clientWidth*this.resolutionScale,s(this,Pr).height=s(this,$t).clientHeight*this.resolutionScale,s(this,Pr).style.width=s(this,$t).clientWidth+"px",s(this,Pr).style.height=s(this,$t).clientHeight+"px",s(this,ns).width=s(this,$t).clientWidth,s(this,ns).height=s(this,$t).clientHeight,s(this,Pr).width=s(this,$t).clientWidth*this.resolutionScale,s(this,Pr).height=s(this,$t).clientHeight*this.resolutionScale,s(this,Pr).style.width=s(this,$t).clientWidth+"px",s(this,Pr).style.height=s(this,$t).clientHeight+"px",s(this,te).collisionSystem.collidersDirty=!0},il=new WeakMap,zx=new WeakMap,Wg=new WeakMap,$x=new WeakMap,Vx=new WeakMap,Wm=new WeakMap,Xm=new WeakMap,Hx=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,qg=new WeakMap,t6=function(t,n,o,i){let a=new J3(n,this.convertTo3DMapPosition(t[1],t[0],t[2]||0),i);return a.components[2]=new Px(o!=null?o:s(this,te).occlusion2DSystem.backgroundId),s(this,Q).geometry2DMap.set(a.id,a),a},tp=new WeakMap,Jg=new WeakMap,Kg=new WeakMap,al=new WeakMap,sl=new WeakMap,r6=async function(){return gc.load(g8).then(t=>{var n;return s(this,wr)&&((n=s(this,wr).environment)==null||n.dispose(),t.mapping=ED,s(this,wr).environment=t,this.render()),t})},Zx=new WeakMap,pt=new WeakMap,Ym=new WeakMap,Qg=new WeakMap;var cee=new Ie,rp=QC;f();function dee(e,r){pee(e,r)(e.getScene(),r),fee(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 pee(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?l5(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 fee(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)})}f();var Wx=class extends Xe{constructor(t,n){super();h(this,"gl");h(this,"options");h(this,"el",document.createElement("div"));h(this,"core");h(this,"origin");h(this,"map");h(this,"layer");h(this,"handleStyleChange",()=>{!this.map||!this.layer||this.map.getLayer(this.layer.id)||(this.map.addLayer(this.layer),this.core.camera.setMinZoomLevel(this.map.getMinZoom()),this.core.camera.setMaxZoomLevel(this.map.getMaxZoom()),this.core.camera.setMinPitch(this.map.getMinPitch()),this.core.camera.setMaxPitch(this.map.getMaxPitch()))});h(this,"handleMove",()=>{if(!this.map)return;let[t,n]=this.map.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(t,n),this.core.getSystems().cameraSystem.setZoomLevel(this.map.getZoom()),this.core.getSystems().cameraSystem.setRotation(ft.degToRad(this.map.getBearing())),this.core.getSystems().cameraSystem.setTilt(ft.degToRad(this.map.getPitch()))});h(this,"handleError",t=>{V.warn(t)});this.origin=t,this.options=n}onAdd(t){this.origin=this.origin||t.getCenter().toArray(),this.gl=t.painter.context.gl,this.core=new rp(t._container,oe(k({},this.options),{center:this.origin,zoomLevel:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing(),gl:this.gl,map:t,mode:"outdoors-overlay"})),this.map=t,this.core.camera.setMinZoomLevel(t.getMinZoom()),this.core.camera.setMaxZoomLevel(t.getMaxZoom()),this.core.camera.setMinPitch(t.getMinPitch()),this.core.camera.setMaxPitch(t.getMaxPitch()),this.map.on("error",this.handleError);let n=l1.fromLngLat(this.origin,0);return this.layer=d1(n,this.core.viewCamera,()=>{this.core.renderSync()}),this.map.on("styledata",this.handleStyleChange),this.map.on("move",this.handleMove),this.handleStyleChange(),this.el}onRemove(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("move",this.handleMove),this.map.off("error",this.handleError),this.layer&&this.map.removeLayer(this.layer.id)),this.layer=void 0,this.map=void 0,this.core&&this.core.destroy(),this.core=void 0}};var a6="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",hee="https://auth.mappedin.com/oauth2/token";var Xx="";function s6(e){Xx=e,h5(e)}var Bd="";function u6(e){Bd=e}async function uk(e,r){var o,i,a,u,l,c,d,p,m;let t=(o=r==null?void 0:r.useWorkers)!=null?o:!0,n=oe(k({},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 C5(hee));let y=r.center||[0,0],E=null,b=null;try{E=new m5({container:e,style:r.outdoorView.style||a6,center:y,attributionControl:!1,zoom:(c=r.zoomLevel)!=null?c:i6,pitch:(d=r.pitch)!=null?d:n6,bearing:(p=r.bearing)!=null?p:o6,transformRequest:v5(g),trackResize:!1,pixelRatio:r.outdoorView.lowDpi?1:Mp(),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 x5(E,{timeout:1e4,styleUrl:((m=r.outdoorView)==null?void 0:m.style)||a6})}catch(D){if(b=D,V.warn("[MappedinJS] Outdoor view initialization failed: ".concat(b.message,". Falling back to indoor-only rendering.")),E){try{E.remove()}catch(M){}E=null}}if(!E||b){let D=new rp(e,n);return D.publish("outdoor-style-error",{error:b}),D}let v=null;try{let D=E.painter.context.gl;v=new rp(e,k({center:y,zoomLevel:E.getZoom(),pitch:E.getPitch(),bearing:E.getBearing(),gl:D,map:E,mode:"outdoors-interleaved"},n));let M={center:E.getCenter().toArray(),zoom:E.getZoom(),bearing:E.getBearing(),pitch:E.getPitch(),elevation:E.getCenterElevation()};g1(E,v.camera.minZoomLevel,v.camera.maxZoomLevel),E.setMaxPitch(v.camera.maxPitch),E.setMinPitch(v.camera.minPitch),v.on("camera-change",ie=>{M.center=ie.center,M.zoom=ie.zoomLevel,M.bearing=ie.bearing,M.pitch=ie.pitch,M.elevation=ie.elevation,E.jumpTo(M)});let T=l1.fromLngLat(y,0),B=d1(T,v.viewCamera,()=>{v==null||v.renderSync()}),G=async()=>{E&&(E.addLayer(B),v==null||v.renderSync())};v.onMapLibreEvent("style.load",G),G();let _=!1,F=!1,A=()=>{E&&(_||(v==null||v.publish("outdoor-view-loaded"),_=!0),F||(F=!0,v==null||v.publish("outdoor-style-loaded")))};v.onMapLibreEvent("idle",A);let j=ie=>{ie&&(ie.sourceDataType==="metadata"||ie.sourceDataType==="visibility"||ie.dataType==="style"||ie.type==="terrain")&&(v==null||v.getSystems().htmlControlsSystem.updateData(E))},N=ie=>{E&&ie&&ie.dataType==="style"&&ie.type==="styledata"&&(F=!1),j(ie)};v.onMapLibreEvent("styledata",N),v.onMapLibreEvent("sourcedata",j),v.onMapLibreEvent("terrain",j);let Z=ie=>{var de;if(((de=ie.error)==null?void 0:de.url)===a6){V.error('Failed to load outdoor view style, possibly due to invalid token "'.concat(g["x-mappedin-tiles-key"],'"'));return}V.warn(ie)};return v.onMapLibreEvent("error",Z),v}catch(D){if(v)try{v.destroy()}catch(T){}if(E)try{E.remove()}catch(T){}V.warn("Failed to initialize outdoor view, falling back to indoor-only rendering:",D);let M=new rp(e,n);return M.publish("outdoor-style-error",{error:D}),M}}else return new rp(e,n)}f();f();f();f();var ey=class ey{constructor(r,t,n){h(this,"id");h(this,"text");h(this,"target");h(this,"__type",ey.__type);this.id=r,this.text=t,this.target=n}static is(r){return r.__type===ey.__type}get focusTarget(){return this.target.anchorTarget}get navigationTarget(){return this.target.anchorTarget}};h(ey,"__type","label");var ul=ey;f();var np,qm=class qm{constructor(r,t,n){h(this,"id");w(this,np);h(this,"__type",qm.__type);h(this,"contentEl");this.id=r,this.contentEl=t,O(this,np,n)}get target(){return s(this,np)}get coordinate(){return s(this,np).anchorTarget}get navigationTarget(){return this.target.anchorTarget}toJSON(){return{id:this.id,__type:qm.__type,target:this.target,coordinate:this.coordinate}}static is(r){return r.__type===qm.__type}get focusTarget(){return this.target.anchorTarget}updateTarget(r){O(this,np,r)}};np=new WeakMap,h(qm,"__type","marker");var Js=qm;f();var Cc,Jm=class Jm{constructor(r,t,n){h(this,"id");h(this,"groupId");h(this,"__type",Jm.__type);w(this,Cc);this.id=r,this.groupId=t,O(this,Cc,n)}get target(){return s(this,Cc)}static is(r){return r.__type===Jm.__type}updateTarget(r){O(this,Cc,r)}toJSON(){return{id:this.id,__type:Jm.__type,groupId:this.groupId,target:s(this,Cc)}}get navigationTarget(){return s(this,Cc).anchorTarget}};Cc=new WeakMap,h(Jm,"__type","model");var op=Jm;f();var ip,ty=class ty{constructor(r,t){h(this,"id");h(this,"coordinates");w(this,ip);h(this,"__type",ty.__type);this.id=r,this.coordinates=t}static is(r){return r.__type===ty.__type}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return s(this,ip)?s(this,ip):(O(this,ip,mS(this.coordinates)),s(this,ip))}get focusTarget(){return this.coordinates}};ip=new WeakMap,h(ty,"__type","path-segment");var Dc=ty,ap,Km=class Km{constructor(r,t,n,o){h(this,"id");h(this,"animation");h(this,"coordinates");h(this,"segments");w(this,ap);h(this,"__type",Km.__type);this.id=r,this.animation=t,this.coordinates=n,this.segments=o.map(({id:i,coordinates:a})=>new Dc(i.toString(),a))}static is(r){return r.__type===Km.__type}get focusTarget(){return this.coordinates}get distance(){return s(this,ap)?s(this,ap):(O(this,ap,mS(this.coordinates)),s(this,ap))}toJSON(){return{__type:Km.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};ap=new WeakMap,h(Km,"__type","path");var os=Km;f();var gee=7,Tc,sp,ry=class{constructor(r,t){w(this,Tc);w(this,sp);var n;O(this,Tc,r),O(this,sp,(n=t==null?void 0:t.precision)!=null?n:gee)}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let r=s(this,Tc).center;if(s(this,sp)===-1)return r;let t=Al(r.latitude,s(this,sp)),n=Al(r.longitude,s(this,sp));return new ke({latitude:t,longitude:n,floorId:r.floorId,verticalOffset:r.verticalOffset})}get bearing(){return s(this,Tc).bearing}get pitch(){return s(this,Tc).pitch}get zoomLevel(){return Al(s(this,Tc).zoomLevel,5)}};Tc=new WeakMap,sp=new WeakMap;f();var ny=class ny{constructor(r){h(this,"id");h(this,"__type",ny.__type);this.id=r}static is(r){return r.__type===ny.__type}get focusTarget(){return this}};h(ny,"__type","shape");var ll=ny;f();var oy=class oy{constructor(r,t){h(this,"id");h(this,"target");h(this,"__type",oy.__type);this.id=r,this.target=t}static is(r){return r.__type===oy.__type}};h(oy,"__type","text-3d");var cl=oy;f();f();f();var yee=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>']]),bee=/<svg([^>]*)>/g;function lk(e,r,t){let n=yee.get(e);return n?n.replace(bee,'<svg$1 style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):""}var vee=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 '),xee=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 '),l6="#722ED1",c6="#1890FF",ck=({type:e="departure",color:r=c6,animated:t})=>{let n=t===!1?"":"dropped-pin-wrapper";return'<div class="'.concat(n,'">\n ').concat(e==="departure"?vee(r):xee(r),"\n </div>")},Eee=e=>{switch(e){case"default":return 28;case"selection":return 28;case"navigation":return 32}},dk=({type:e="stairs",color:r=l6,direction:t="up",animated:n})=>{let o=Eee("default"),i=o/2+2,a=t&&t!=="none";return'<div class="mappedin-connection-marker">\n <div class="connection-circle"\n role="button"\n style="background:'.concat(r,"; width:").concat(o,"px; height:").concat(o,'px;"\n >\n ').concat(lk("connection-"+e+"-16x16","white",i)||"","\n </div>\n ").concat(a?'<div style="margin-left: -'.concat(o*.2,'px;">\n <div class="').concat(n===!1?"":"bouncey",'">\n <div class="connection-circle"\n role="button"\n style="width: ').concat(o,"px; height: ").concat(o,'px;">\n <div class="').concat(t==="up"?"":"arrow--down",'">\n <svg viewBox="0 0 16 16" style="fill: white; width: ').concat(i,"px; height: ").concat(i,'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>")};f();var pk=63710088e-1,Yx=new WeakMap,fk=async e=>new Promise(r=>setTimeout(r,e));function qx(e,r,t){let n=e.distance,o=Cee(e,r,t);return o?(n-(o==null?void 0:o.distance))/n:0}function d6(e,r){if(e.coordinates.length===0)return[];if(Yx.has(e)&&Yx.get(e).has(r))return Yx.get(e).get(r);let t=e.coordinates.map(n=>Jx(n,r));return Yx.set(e,new Map([[r,t]])),t}function Jx(e,r){let t=r.latitude,n=r.longitude,o=e.latitude-t,i=e.longitude-n,a=Math.PI*pk/180,u=a*Math.cos(t*Math.PI/180),l=i*u,c=o*a;return{x:l,y:c}}function Iee(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=d6(i,r);for(let u=0;u<a.length-1;u++){let l=a[u],c=a[u+1],d=Kx(l,c,{x:0,y:0}),p=pu({x:0,y:0},d);p<n&&(n=p,t=d)}}if(t)return See(t,r)}function Kx(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 See(e,r){let n=Math.PI*pk/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 ke({latitude:u,longitude:l,floorId:r.floorId,verticalOffset:r.verticalOffset})}function Cee(e,r,t){let n=Iee([e],r);if(!n)return;let o=d6(e,t),i=Jx(n,t),a=-1,u=1/0;for(let c=0;c<o.length-1;c++){let d=o[c],p=o[c+1],m=Kx(d,p,i),g=pu(m,i);g<1&&g<u&&(u=g,a=c)}if(a===-1){let c=0,d=1/0;for(let p=0;p<o.length;p++){let m=o[p],g=pu(m,i);g<d&&(d=g,c=p)}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 Dc("".concat(e.id,"_remaining"),l)}function Qx(e,r,t,n){var p;let o,i,a=1/0,u=1/0,l=Jx(r,n),c=Jx(t,n);for(let m of e)for(let g of m.segments){if(g.isConnectionSegment)continue;let y=(p=g.coordinates[0])==null?void 0:p.floorId,E=y===r.floorId,b=y===t.floorId;if(!E&&!b)continue;let v=d6(g,n);if(E){let D=1/0;for(let M=0;M<v.length-1;M++){let T=v[M],B=v[M+1],G=Kx(T,B,l),_=pu(G,l);_<D&&(D=_)}D<a&&(a=D,o=g)}if(b){let D=1/0;for(let M=0;M<v.length-1;M++){let T=v[M],B=v[M+1],G=Kx(T,B,c),_=pu(G,c);_<D&&(D=_)}D<u&&(u=D,i=g)}}if(!o||!i)return;let d=[];if(o.id===i.id)return d.push({segment:o,startHighlightFraction:qx(o,r,n),endHighlightFraction:qx(i,t,n)}),d;for(let m of e)for(let g of m.segments)g.id===o.id?d.push({segment:g,startHighlightFraction:qx(g,r,n),endHighlightFraction:1}):g.id===i.id?d.push({segment:g,startHighlightFraction:0,endHighlightFraction:qx(g,t,n)}):d.push({segment:g,startHighlightFraction:0,endHighlightFraction:1});return d}var mk=.01,hk=.02,gk={drawDuration:1e3,color:"#40A9FF",interactive:!1,accentColor:"blue",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},Dee={drawDuration:1e3,color:"#B3DDFF",interactive:!1,accentColor:"#40A9FF",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},Mc={setMapOnConnectionClick:!0,setMapToDeparture:!0,createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:gk,inactivePathOptions:Dee,markerOptions:{departureColor:c6,destinationColor:l6},animatePathDrawing:!0};function yk(e){let r=k({},e);return r.__EXPERIMENTAL_ENDCAP_EXTENSION=[0,0],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 Tee=oe(k({},Mc),{connectionPathOptions:yk(gk)}),dl,Ks,Ot,at,pl,up,Yr,di,va,wc,ut,bk,vk,p6,f6,iy,xk,m6,ay,e3,Qm,h6,eh,sy=class{constructor(r){w(this,ut);w(this,dl,new Map);w(this,Ks,new Map);w(this,Ot);w(this,at,Tee);w(this,pl);w(this,up);w(this,Yr,[]);w(this,di);w(this,va,new Map);w(this,wc,new Map);w(this,eh,r=>{var t;if((t=s(this,at).createMarkers)!=null&&t.connection&&r.markers!=null&&r.markers.length>0){let{instruction:n}=s(this,dl).get(r.markers[0].id);n!=null&&n.action.toFloor&&(s(this,at).setMapOnConnectionClick&&s(this,Ot).setFloor(n.action.toFloor.id,"navigation-connection-click"),s(this,Ot).publish("navigation-connection-click",{instruction:n,fromFloor:n.action.fromFloor,toFloor:n.action.toFloor}))}});O(this,Ot,r)}get isMultiFloor(){if(!s(this,Yr).length)return!1;let r=new Set;for(let t of s(this,Yr))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,Ot).Paths.getById(r)}getMarkerById(r){return s(this,dl).get(r)}get paths(){let r=new Set;return s(this,Ks).forEach(t=>r.add(t)),Array.from(r)}get activeDirections(){return s(this,wc).get(s(this,di))}get activePath(){if(s(this,di))return s(this,Ks).get(s(this,di).id)}get floorStacks(){let r=s(this,Ot).getMapData();if(!s(this,Yr).length||!r)return[];let t=new Set;for(let n of s(this,Yr))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,Ot).getMapData();if(!s(this,Yr).length||!r)return[];let t=new Set;for(let n of s(this,Yr))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,Yr)[r];if(!s(this,Yr).length){V.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,Yr)[r]){V.warn("Direction #".concat(r," does not exist"));return}let n=s(this,va).get(t);if(!n){V.warn("The direction is not a part of muli-direcional path");return}se(this,ut,e3).call(this,n)}setActivePath(r){if(!s(this,Yr).length){V.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,wc).get(r)){V.warn('Path "'.concat(r.id,'" is not a part of muli-direcional path'));return}se(this,ut,e3).call(this,r)}setActivePathByDirections(r){if(!s(this,Yr).length){V.warn("[setActivePathByDirections] Cannot set an active path before drawing. Call Navigation.draw() first.");return}let t=s(this,va).get(r);if(!t){let n=s(this,Yr).find(o=>o.id===r.id);if(!n){V.warn("[setActivePathByDirections] Cannot find directions for id");return}t=s(this,va).get(n)}if(!t){V.warn("[setActivePathByDirections] Cannot find path for directions");return}se(this,ut,e3).call(this,t)}clearHighlightedPathSection(){for(let r of this.paths)for(let t of r.segments)s(this,Ot).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,Ot).getMapData().mapCenter,a=Qx(this.paths,r,t,i);if(!a)return;this.clearHighlightedPathSection();let u=a.map(p=>{var m,g;return s(this,Ot).updateState(p.segment,{highlightStartFraction:p.startHighlightFraction,highlightEndFraction:p.endHighlightFraction,highlightColor:(m=n==null?void 0:n.color)!=null?m:"red",highlightWidthMultiplier:(g=n==null?void 0:n.widthMultiplier)!=null?g:1}),new Xa({fraction:0}).to({fraction:1},o).onUpdate(y=>{s(this,Ot).updateState(p.segment,{highlightCompleteFraction:y.fraction})})}),l=()=>{},c=new Promise(p=>{l=p});return u.length>0&&(u.forEach((p,m)=>{m<u.length-1&&p.chain(u[m+1]),s(this,Ot).tweenGroup().add(u[m])}),u[0].start(),u[u.length-1].onComplete(()=>{s(this,Ot).tweenGroup().remove(u[u.length-1]),l()})),{animation:c}}drawSync(r,t={}){var u,l,c;s(this,up)&&this.clear(),O(this,up,!0),se(this,ut,m6).call(this,t);let n=Array.isArray(r)?r:[r],o=n[0],i=n[n.length-1],a=o.coordinates[0];O(this,Yr,n),a.floorId&&s(this,at).setMapToDeparture&&s(this,Ot).setFloor(a.floorId),(u=s(this,at).createMarkers)!=null&&u.departure&&se(this,ut,Qm).call(this,"departure",o.instructions[0]);for(let d=0;d<n.length;d++){let p=n[d],m=d?k({},s(this,at).inactivePathOptions):k({},s(this,at).pathOptions);if(p.coordinates.length<2){V.warn("Directions must have at least 2 coordinates");return}let g=oe(k({},s(this,at).connectionPathOptions),{animateDrawing:s(this,at).animatePathDrawing,verticalOffset:se(this,ut,iy).call(this,d===0?"active":"inactive")}),y=se(this,ut,p6).call(this,p.coordinates,oe(k({},m),{animateDrawing:s(this,at).animatePathDrawing,verticalOffset:se(this,ut,iy).call(this,d===0?"active":"inactive")}),g);s(this,va).set(p,y),s(this,wc).set(y,p),(l=s(this,at).createMarkers)!=null&&l.connection&&se(this,ut,h6).call(this,p.instructions,"connection"),d===0&&(O(this,di,s(this,va).get(s(this,Yr)[0])),s(this,Ot).externalPubSub.on("click",s(this,eh)))}(c=s(this,at).createMarkers)!=null&&c.destination&&se(this,ut,Qm).call(this,"destination",i.instructions[i.instructions.length-1]),s(this,Ot).mapObjects.forEach(d=>{d.processFloorChange(d.currentFloorId)}),se(this,ut,ay).call(this)}async draw(r,t={}){s(this,pl)&&this.clear(),se(this,ut,m6).call(this,t);let n=Array.isArray(r)?r:[r],i=n[0].coordinates[0];return O(this,Yr,n),i.floorId&&s(this,at).setMapToDeparture&&s(this,Ot).setFloor(i.floorId),se(this,ut,xk).call(this,n)}clear(){s(this,dl).forEach(r=>{r!=null&&r.marker&&s(this,Ot).currentMap.Markers.remove(r.marker.id.toString())}),s(this,dl).clear(),s(this,Ks).forEach(r=>{s(this,Ot).currentMap.Paths.remove(r.segments.map(t=>t.id.toString()))}),s(this,Ks).clear(),s(this,pl)&&(s(this,pl).cancel(),O(this,pl,void 0)),s(this,up)&&O(this,up,!1),O(this,Yr,[]),s(this,va).clear(),s(this,wc).clear(),O(this,di,void 0),s(this,Ot).externalPubSub.off("click",s(this,eh)),s(this,Ot).mapObjects.forEach(r=>{r.processFloorChange(r.currentFloorId)}),se(this,ut,ay).call(this)}};dl=new WeakMap,Ks=new WeakMap,Ot=new WeakMap,at=new WeakMap,pl=new WeakMap,up=new WeakMap,Yr=new WeakMap,di=new WeakMap,va=new WeakMap,wc=new WeakMap,ut=new WeakSet,bk=function(r){return r!=null&&["TakeConnection","ExitConnection","TakeVortex","ExitVortex"].includes(r.type)},vk=function(){if(!s(this,di))return;let r=s(this,Ks).get(s(this,di).id);if(r){for(let t of s(this,Ks).values())if(t.id.includes("internal-"))if(t.id===s(this,di).id)for(let n of r.segments)s(this,Ot).updateState(n,{verticalOffset:hk});else s(this,Ot).updateState(t,{verticalOffset:mk})}},p6=function(r,t,n){var u,l;let o=(l=(u=t.id)==null?void 0:u.toString())!=null?l:ht(),i=s(this,Ot).currentMap.Paths.add(r,t,n),a=new os(o,i.animation,r,i.paths);return s(this,Ks).set(o,a),a},f6=function(r,t,n=!1){let o=s(this,at).markerOptions.animated,i=s(this,Ot).currentMap.Markers.add(r.coordinate,t,{interactive:n,placement:"top",rank:"always-visible",animated:o}),a=s(this,Ot).currentMap.Markers.getContentEl(i.id.toString());if(!a)throw new Error("marker component should exist");return new Js(i.id.toString(),a,r.coordinate)},iy=function(r){var t,n,o,i;return r==="active"?hk+((n=(t=s(this,at).pathOptions)==null?void 0:t.verticalOffset)!=null?n:0):mk+((i=(o=s(this,at).inactivePathOptions)==null?void 0:o.verticalOffset)!=null?i:0)},xk=function(r){let t=r[0],n=r[r.length-1],o=!1;return O(this,pl,{promise:new Promise(async i=>{var a,u,l;if(x.env.NODE_ENV!=="test"&&await fk(500),o||!r.length){i();return}(a=s(this,at).createMarkers)!=null&&a.departure&&se(this,ut,Qm).call(this,"departure",t.instructions[0]);for(let c=0;c<r.length;c++){let d=r[c],p=c===0?k({},s(this,at).pathOptions):k({},s(this,at).inactivePathOptions);if(d.coordinates.length<2){V.warn("Directions must have at least 2 coordinates"),i();return}let m=oe(k({},s(this,at).connectionPathOptions),{animateDrawing:s(this,at).animatePathDrawing,verticalOffset:se(this,ut,iy).call(this,c===0?"active":"inactive")}),g=se(this,ut,p6).call(this,d.coordinates,oe(k({},p),{animateDrawing:s(this,at).animatePathDrawing,verticalOffset:se(this,ut,iy).call(this,c===0?"active":"inactive")}),m);if(s(this,va).set(d,g),s(this,wc).set(g,d),c===0&&(O(this,di,s(this,va).get(s(this,Yr)[0])),s(this,Ot).externalPubSub.on("click",s(this,eh))),x.env.NODE_ENV!=="test"&&await g.animation,o){i();return}(u=s(this,at).createMarkers)!=null&&u.connection&&se(this,ut,h6).call(this,d.instructions,"connection")}if((l=s(this,at).createMarkers)!=null&&l.destination&&se(this,ut,Qm).call(this,"destination",n.instructions[n.instructions.length-1]),o){i();return}s(this,Ot).mapObjects.forEach(c=>{c.processFloorChange(c.currentFloorId)}),se(this,ut,ay).call(this),i()}),cancel:()=>{o=!0}}),s(this,pl).promise},m6=function(r){var n,o,i;let t=k(k({},Mc.pathOptions),r.pathOptions);O(this,at,{setMapOnConnectionClick:(n=r.setMapOnConnectionClick)!=null?n:Mc.setMapOnConnectionClick,setMapToDeparture:(o=r.setMapToDeparture)!=null?o:Mc.setMapToDeparture,pathOptions:t,inactivePathOptions:k(k({},Mc.inactivePathOptions),r.inactivePathOptions),connectionPathOptions:yk(t),createMarkers:k(k({},Mc.createMarkers),r.createMarkers),markerOptions:k(k({},Mc.markerOptions),r.markerOptions),animatePathDrawing:(i=r.animatePathDrawing)!=null?i:Mc.animatePathDrawing})},ay=function(){s(this,Ot).publish("navigation-state-change",{isMultiFloor:this.isMultiFloor,floorStacks:this.floorStacks,floors:this.floors,activeDirections:this.activeDirections,activePath:this.activePath,paths:this.paths})},e3=function(r){O(this,di,r),s(this,Yr).forEach(t=>{let n=s(this,va).get(t);if(n){let o=n.id===s(this,di).id?k({},s(this,at).pathOptions):k({},s(this,at).inactivePathOptions);s(this,Ot).updateState(n,o)}}),s(this,Ot).publish("navigation-active-path-change",{directions:this.activeDirections,path:this.activePath}),se(this,ut,vk).call(this),se(this,ut,ay).call(this)},Qm=function(r,t){var n,o,i,a,u;if(r==="connection"&&t){let l=t.action.type==="ExitConnection"?s(this,at).markerOptions.departureColor:s(this,at).markerOptions.destinationColor,c;typeof((n=s(this,at).createMarkers)==null?void 0:n.connection)=="function"?(c=s(this,at).createMarkers.connection(t),s(this,Ot).updateState(c,{interactive:!0})):c=se(this,ut,f6).call(this,t,dk({type:(i=(o=t.action.connection)==null?void 0:o.type)!=null?i:t.action.connectionType,color:l,direction:t.action.direction,animated:s(this,at).markerOptions.animated}),!0),s(this,dl).set(c.id,{instruction:t,marker:c})}else{let l=r==="departure"?s(this,at).markerOptions.departureColor:s(this,at).markerOptions.destinationColor,c;typeof((a=s(this,at).createMarkers)==null?void 0:a.departure)=="function"&&r==="departure"?c=s(this,at).createMarkers.departure(t):typeof((u=s(this,at).createMarkers)==null?void 0:u.destination)=="function"&&r==="destination"?c=s(this,at).createMarkers.destination(t):c=se(this,ut,f6).call(this,t,ck({type:r,color:l,animated:s(this,at).markerOptions.animated})),s(this,dl).set(c.id,{instruction:t,marker:c})}},h6=function(r,t){r.filter(o=>se(this,ut,bk).call(this,o.action)).forEach(o=>{se(this,ut,Qm).call(this,t,o)})},eh=new WeakMap;f();var Ye,ly,fl,t3,g6,uy=class{constructor(r){w(this,fl);w(this,Ye);w(this,ly);h(this,"interactions",{set:r=>{(r==null?void 0:r.pan)!=null&&(s(this,Ye).getSystems().cameraSystem.enablePan=r.pan),(r==null?void 0:r.zoom)!=null&&(s(this,Ye).getSystems().cameraSystem.enableZoom=r.zoom),(r==null?void 0:r.bearingAndPitch)!=null&&(s(this,Ye).getSystems().cameraSystem.enableRotate=r.bearingAndPitch)},enable:()=>{s(this,Ye).getSystems().cameraSystem.enablePan=!0,s(this,Ye).getSystems().cameraSystem.enableZoom=!0,s(this,Ye).getSystems().cameraSystem.enableRotate=!0},disable:()=>{s(this,Ye).getSystems().cameraSystem.enablePan=!1,s(this,Ye).getSystems().cameraSystem.enableZoom=!1,s(this,Ye).getSystems().cameraSystem.enableRotate=!1}});h(this,"setMinPitch",r=>{s(this,Ye).camera.setMinPitch(r)});h(this,"setMaxPitch",r=>{s(this,Ye).camera.setMaxPitch(r)});h(this,"setMinZoomLevel",r=>{s(this,Ye).camera.setMinZoomLevel(r,!0)});h(this,"setMaxZoomLevel",r=>{s(this,Ye).camera.setMaxZoomLevel(r)});O(this,ly,r),O(this,Ye,r.core)}setScreenOffsets(r){s(this,Ye).camera.setInsetPadding(r)}get screenOffsets(){return s(this,Ye).camera.insetsPadding}get panMode(){return s(this,Ye).camera.panMode}setPanMode(r){if(r!=="default"&&r!=="elevation")throw new Error("Invalid pan mode");r!==this.panMode&&s(this,Ye).camera.setPanMode(r)}getFocusOnTransform(r,t){var o,i,a;let n=s(this,Ye).camera.getCameraFrameForCoordinates(se(this,fl,g6).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 ke(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,Ye).camera.focusOn(se(this,fl,g6).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,Ye).camera.animateTo({center:n!=null?[u.longitude,u.latitude,s(this,Ye).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,Ye).camera.setCenter(a),s(this,Ye).camera.setZoomLevel(n),s(this,Ye).camera.setBearing(o),s(this,Ye).camera.setPitch(i)}get center(){let r=s(this,Ye).camera.center;return new ke(r[1],r[0],void 0)}setAutoMinZoomLevel(r){s(this,Ye).camera.setAutoMinZoomLevel(r)}get autoMinZoomLevel(){return s(this,Ye).camera.autoMinZoomLevel}get zoomLevel(){return s(this,Ye).camera.zoomLevel}get pitch(){return s(this,Ye).camera.pitch}get minPitch(){return s(this,Ye).camera.minPitch}get maxPitch(){return s(this,Ye).camera.maxPitch}get bearing(){let r=s(this,Ye).camera.bearing;return(r<0?r+360:r)%360}get minZoomLevel(){return s(this,Ye).camera.minZoomLevel}get maxZoomLevel(){return s(this,Ye).camera.maxZoomLevel}setElevation(r){s(this,Ye).camera.setElevation(r)}get elevation(){return s(this,Ye).camera.elevation}animateElevation(r,t){return s(this,Ye).camera.animateElevation(r,t)}get bounds(){return R4(s(this,Ye).getSystems().cameraSystem.panBounds,s(this,Ye).convert3DMapPositionToCoordinate)}get isAnimating(){return s(this,Ye).camera.isAnimating}cancelAnimation(){s(this,Ye).camera.cancelAnimation()}updateFacadesInView(){s(this,Ye).getSystems().geometryInFocusSystem.compute()}};Ye=new WeakMap,ly=new WeakMap,fl=new WeakSet,t3=function(r){var n,o,i,a,u,l;let t=s(this,Ye).camera.elevation;return ke.is(r)&&r.floorId!=null?(o=(n=s(this,Ye).getState(r.floorId))==null?void 0:n.altitude)!=null?o:t:oi.is(r)?(a=(i=s(this,Ye).getState(r.id))==null?void 0:i.altitude)!=null?a:t:"floor"in r&&oi.is(r.floor)&&(l=(u=s(this,Ye).getState(r.floor.id))==null?void 0:u.altitude)!=null?l:t},g6=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(ke.is(a)){let u=se(this,fl,t3).call(this,a);t.push([a.longitude,a.latitude,u])}else if((a==null?void 0:a.id)!=null){let u=se(this,fl,t3).call(this,a);if(oi.is(a)&&((i=s(this,ly).getMapDataInternal())!=null&&i.enterpriseMode)){t.push(a.id);continue}else if("geoJSON"in a&&a.geoJSON.geometry.coordinates.length>0){s5(a.geoJSON,c=>{t.push([c[0],c[1],u])});continue}let l=s(this,Ye).getBoundingArea(a.id);if(l)t.push(...l.map(c=>[c[0],c[1],u]));else if("geoJSONBoundingBox"in a){let c=se(this,fl,t3).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 NO(a)&&t.push(a);return t};f();var th,cy=class{constructor({currentMapGetter:r}){w(this,th);O(this,th,r)}get currentMap(){return s(this,th).call(this)}async getCurrentSceneGLTF(r){let t=s(this,th).call(this);return t?t==null?void 0:t.Exporter.getCurrentSceneGLTF(r):(V.error("There is no map to export. Please load a map first."),new Blob)}};th=new WeakMap;f();var is,py,dy=class{constructor({currentMapGetter:r}){w(this,is,new Map);w(this,py);O(this,py,r)}get currentMap(){return s(this,py).call(this)}getAll(){return Array.from(s(this,is).values()).map(r=>r.label)}getById(r){return s(this,is).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,oe(k({},n),{attachTo:sm(r),rank:(n==null?void 0:n.rank)==null||(n==null?void 0:n.rank)==="initial"?"medium":n.rank})),u=new ul(a.id.toString(),t,r);return s(this,is).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 ul(o.toString(),i,a);s(this,is).set(u.id,{label:u,entityId:u.id}),t.push(u)},labelOptions:r}),t}remove(r){var n;let t=s(this,is).get(r.id);t&&((n=this.currentMap)==null||n.Labels.remove(t),s(this,is).delete(r.id.toString()))}removeAll(){let r=[];return s(this,is).forEach(({label:t})=>{this.remove(t),r.push(t),s(this,is).delete(t.id.toString())}),r}};is=new WeakMap,py=new WeakMap;f();f();f();f();var Ek=Dl(PS(),1);function Mee(e,r){var t=aa(e),n=aa(r),o=e.properties||{},i=Ek.default.difference(t.coordinates,n.coordinates);return i.length===0?null:i.length===1?_l(i[0],o):Dp(i,o)}var Ik=Mee;var Sk=.2,Ck=.1,rh=251,wee=!1;function Dk(e){if(!e||e.length<3)return null;let r=[],t=0;for(let u=0;u<e.length;u++){let l=e[u],c="".concat(l[0],",").concat(l[1]),d=!1;for(let p=0;p<r.length;p++)if(r[p]===c){d=!0;break}d||(r.push(c),t++)}if(t<3)return null;let n=e[0],o=e[e.length-1];if(n[0]===o[0]&&n[1]===o[1])return e;let a=[];for(let u=0;u<e.length;u++)a.push(e[u]);return a.push(n),a}function Tk(e,r){let t=[];if(e.type==="Polygon"){let n=Dk(e.coordinates[0]);n&&t.push(n)}else if(e.type==="MultiPolygon")for(let n of e.coordinates){let o=Dk(n[0]);o&&t.push(o)}return{type:"Feature",geometry:{type:"MultiLineString",coordinates:t},properties:r||{}}}var fy=class{constructor(r,t,n,o){h(this,"renderer");h(this,"mapObject");h(this,"config");h(this,"wallsId");h(this,"maskedWallsId");h(this,"voidWallsId");h(this,"maskedVoidWallsId");h(this,"ceilingId");h(this,"ceilingMaskId");h(this,"basementMaskId");h(this,"footprintColor");h(this,"layer");h(this,"groupContainer");var a;this.renderer=r,this.mapObject=t,this.config=o;let i=ml;if(o.obstructions!=null&&o.obstructions.features.length>0){let u=o.obstructions.features.filter(l=>{var c;return l.geometry.type==="LineString"&&((c=l.properties.kind)==null?void 0:c.toLowerCase())==="wall"&&l.properties.footprintComponent===!0});if(u!=null&&u.length>0){let l=o.styleMap[(a=u[0].properties)==null?void 0:a.id];l!=null&&(i=l)}}this.footprintColor=i.color,this.groupContainer=this.renderer.addGroupContainer("Footprint-".concat(o.floorId),{visible:!1},n),this.layer=this.renderer.addGroupContainer("".concat(O0,"-").concat(o.floorId),{visible:!1},this.groupContainer.id.toString())}getFloorAltitudes(){return this.mapObject.getFloorStackAltitudeData(this.config.floorStackId)}getVisualHeight(){var n,o;if(this.config.fixedHeight!=null)return this.config.fixedHeight;let t=((n=this.getFloorAltitudes())!=null?n:new Map).get(this.config.elevation);return(o=t==null?void 0:t.visualHeight)!=null?o:0}get footprintGeometry(){return this.config.footprintGeometry}buildWalls(){let n=Tk(this.config.footprintGeometry.geometry,{id:"Footprint-Floor-".concat(this.config.floorId)}).geometry.coordinates.map((u,l)=>({type:"Feature",geometry:{type:"LineString",coordinates:u},properties:{id:"Footprint-Floor-Section-".concat(this.config.floorId,"-").concat(l)}})),o=this.getVisualHeight(),i="front";this.wallsId="Footprint-Walls-".concat(this.config.floorId);let a={color:this.footprintColor,height:o,altitude:0,width:Ck,outline:!1,visible:!0,opacity:1,side:i,renderOrder:2};this.config.elevation<0&&(a.__EXPERIMENTAL_maskMode="masked-object",a.__EXPERIMENTAL_maskEffect="reveal",a.__EXPERIMENTAL_maskEnabled=!0,a.__EXPERIMENTAL_maskId=rh),this.renderer.addGeometryGroup(this.wallsId,{features:n},a,this.groupContainer)}buildVoidWalls(r){if(!r||r.length===0)return;let t=[],n=0;for(let u of r){let l=Tk(u.geometry,{id:"Void-Wall-".concat(this.config.floorId,"-").concat(n)});for(let c of l.geometry.coordinates)t.push({type:"Feature",geometry:{type:"LineString",coordinates:c},properties:{id:"Void-Wall-Section-".concat(this.config.floorId,"-").concat(n)}}),n++}if(t.length===0)return;let o=this.getVisualHeight(),i="front";this.voidWallsId="Void-Walls-".concat(this.config.floorId);let a={color:this.footprintColor,height:o,altitude:0,width:Ck,outline:!1,visible:!0,opacity:1,side:i,renderOrder:2};this.config.elevation<0&&(a.__EXPERIMENTAL_maskMode="masked-object",a.__EXPERIMENTAL_maskEffect="reveal",a.__EXPERIMENTAL_maskEnabled=!0,a.__EXPERIMENTAL_maskId=rh),this.renderer.addGeometryGroup(this.voidWallsId,{features:t},a,this.groupContainer)}buildCeiling(r){let t=k({},this.config.footprintGeometry);t=Mk(t),(r==null?void 0:r.length)>0&&(t=Aee(t,r));let n="front";this.ceilingId="Ceiling-".concat(this.config.floorId);let o=this.getVisualHeight(),i={color:this.footprintColor,height:-Sk,altitude:o,visible:!0,outline:!1,opacity:1,side:n};this.config.elevation<0&&(i.__EXPERIMENTAL_maskMode="masked-object",i.__EXPERIMENTAL_maskEffect="reveal",i.__EXPERIMENTAL_maskEnabled=!0,i.__EXPERIMENTAL_maskId=rh),this.renderer.addGeometryGroup(this.ceilingId,{features:[oe(k({},t),{properties:{id:"Footprint-Ceiling-".concat(this.config.floorId),externalId:this.config.externalId,elevation:this.config.elevation}})]},i,this.groupContainer)}buildBasementMask(){let r=this.config.footprintGeometry;r=Mk(r),this.basementMaskId="Footprint-Basement-Mask-".concat(this.config.floorId),this.renderer.addGeometryGroup(this.basementMaskId,{features:[oe(k({},r),{properties:{id:"Footprint-Basement-Mask-Geometry-".concat(this.config.floorId)}})]},{color:wk(-1),altitude:0,visible:!1,height:.01,outline:!1,__EXPERIMENTAL_maskEnabled:!0,__EXPERIMENTAL_maskMode:"mask",__EXPERIMENTAL_maskId:rh},"outdoors-container"),wee&&this.renderer.addGeometryGroup(this.basementMaskId+"debug",{features:[oe(k({},r),{properties:{id:"Footprint-Basement-Mask-Geometry-".concat(this.config.floorId,"-debug")}})]},{color:wk(-1),altitude:0,opacity:.5,visible:!1,height:.01,outline:!1},"outdoors-container")}update(r){var i;if(r.basementMaskEnabled!==void 0&&this.basementMaskId&&(this.renderer.setState(this.basementMaskId,{visible:r.basementMaskEnabled}),this.renderer.setState(this.basementMaskId+"debug",{visible:r.basementMaskEnabled})),(i=this.config.multiFloorView)!=null&&i.footprintsHidden)return;let t={};r.altitude!==void 0&&(t.altitude=r.altitude),r.visible!==void 0&&(t.visible=r.visible),Object.keys(t).length>0&&this.renderer.setState(this.groupContainer.id,t);let n={};r.opacity!==void 0&&(n.opacity=r.opacity),r.side!==void 0&&(n.side=r.side),r.color!==void 0&&(n.color=r.color),r.outline!==void 0&&(n.outline=r.outline);let o={};if(r.height!==void 0&&(n.height=r.height,o.altitude=r.height),this.wallsId&&Object.keys(n).length>0&&this.renderer.setState(this.wallsId,n),this.voidWallsId&&Object.keys(n).length>0&&this.renderer.setState(this.voidWallsId,n),this.maskedWallsId&&Object.keys(n).length>0){let a=n,{outline:c}=a,d=Zr(a,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.maskedWallsId,d)}if(this.maskedVoidWallsId&&Object.keys(n).length>0){let u=n,{outline:c}=u,d=Zr(u,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.maskedVoidWallsId,d)}if(r.opacity!==void 0&&(o.opacity=r.opacity),r.color!==void 0&&(o.color=r.color),r.ceilingVisible!==void 0&&(o.visible=r.ceilingVisible),r.outline!==void 0&&(o.outline=r.outline),this.ceilingId&&Object.keys(o).length>0&&this.renderer.setState(this.ceilingId,o),this.ceilingMaskId&&Object.keys(o).length>0){let l=o,{outline:c}=l,d=Zr(l,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.ceilingMaskId,d)}}getState(){var l,c;let r=this.renderer.getState(this.groupContainer.id),t=r.altitude,n=r.visible,o=this.ceilingId?this.renderer.getState(this.ceilingId):void 0,i=o==null?void 0:o.visible,a=(l=o==null?void 0:o.height)!=null?l:Sk,u=this.basementMaskId?(c=this.renderer.getState(this.basementMaskId))==null?void 0:c.visible:void 0;if(this.wallsId){let d=this.renderer.getState(this.wallsId),p=d.height;return{altitude:t,visible:n,opacity:d.opacity,side:d.side,color:d.color,height:p,ceilingVisible:i,basementMaskEnabled:u,outline:d.outline,ceilingThickness:a}}return{altitude:t,visible:n,ceilingVisible:i,basementMaskEnabled:u,ceilingThickness:a}}};function Mk(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}}function Aee(e,r){let t;if(Array.isArray(r))if(r.length>0&&"geometry"in r[0])t=r;else{t=[];for(let o of r)for(let i of o.coordinates)t.push({type:"Feature",geometry:{type:"Polygon",coordinates:i},properties:{}})}else{t=[];for(let o of r.coordinates)t.push({type:"Feature",geometry:{type:"Polygon",coordinates:o},properties:{}})}if(t.length===0)return e;let n=e;for(let o of t){if(n===null)break;n=Ik(n,o)}return n===null?{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[]},properties:e.properties}:oe(k({},n),{properties:e.properties})}var wk=e=>e===0?"red":e===-1?"blue":e===-2?"green":"black";var Pee={color:"#ffffff",opacity:1},ml={altitude:0,height:1,color:"#ffffff",opacity:1,width:.15},Ak={opacity:.25,color:"#a7d1ec",height:.8,width:.05,altitude:.1,cap:"square",visible:!1},Pk={color:"red",opacity:.2,height:ml.height+.1,visible:!0,borderVisible:!1},_k=.5,Bi=class{constructor(r,t,n=new Map){h(this,"containerId");h(this,"layers");h(this,"renderer");this.containerId=t,this.layers=n,this.renderer=r}get visible(){var r;return((r=this.renderer.getState(this.containerId))==null?void 0:r.visible)===!0}setVisible(r){this.visible!==r&&this.renderer.setState(this.containerId,{visible:r})}},Ok=0,lp,my=class{constructor(r,t,n,o,i,a,u,l){h(this,"id");h(this,"name");h(this,"elevation");h(this,"maxHeight");h(this,"containerId");h(this,"externalId");h(this,"metadata");h(this,"shortName");h(this,"subtitle");h(this,"occluderId");h(this,"loaded",!1);h(this,"styleMap",{});h(this,"obstructions");h(this,"entrances");h(this,"spaces");h(this,"floorImages");h(this,"floorText");h(this,"areas");h(this,"renderer");h(this,"mapObject");h(this,"options");h(this,"layers",new Map);h(this,"footprint");h(this,"ceiling");h(this,"floorStackId");h(this,"multiFloorView");h(this,"mapDataInternal");h(this,"_computedMaxHeight");h(this,"facadesByStyleId",new Map);h(this,"footprintObject");h(this,"gapFootprintObject");w(this,lp);h(this,"load",(r=!1)=>{var u,l,c,d,p,m,g,y,E,b,v,D,M,T,B,G,_,F;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&&V.warn("Floor ".concat(this.id," exists in the data but contains no geometry.")),this.loaded=!0;let t=this.renderer.addGroupContainer("".concat(Us,"-").concat(this.id),{},this.id);this.layers.set(Us,new Bi(this.renderer,t.id.toString()));let n=this.renderer.addGroupContainer("".concat(ja,"-").concat(this.id),{},this.id);this.layers.set(ja,new Bi(this.renderer,n.id.toString()));let o=this.renderer.addGroupContainer("".concat(Mr,"-").concat(this.id),{focusable:r},this.id);this.layers.set(Mr,new Bi(this.renderer,o.id.toString()));let i=this.renderer.addGroupContainer("".concat(Gs,"-").concat(this.id),{},this.id);this.layers.set(Gs,new Bi(this.renderer,i.id.toString()));let a=this.renderer.addGroupContainer("".concat(Ua,"-").concat(this.id),{},this.id);if(this.layers.set(Ua,new Bi(this.renderer,a.id.toString())),(d=this.multiFloorView)!=null&&d.__EXPERIMENTAL_DEBUG_showVoids){let A=0;for(let j of this.voids)this.renderer.addGeometryGroup("Void-".concat(this.id,"-").concat(A),{features:[j]},{color:"red"},o),A++}if((p=this.multiFloorView)!=null&&p.__EXPERIMENTAL_DEBUG_showOpenToBelow){let A=0;for(let j of this.spacesOpenToBelow)this.renderer.addGeometryGroup("SpacesOpenToBelow-".concat(this.id,"-").concat(A),{features:[j]},{color:"blue"},o),A++}if(this.spaces!=null&&this.spaces.features.length>0){let A=[],j=new Map,N=(m=this.multiFloorView)==null?void 0:m.__EXPERIMENTAL_excludeSpaceIdsInAutoHeightCalculation,Z=N!=null&&N.length>0?new Set(N):void 0;for(let J of this.spaces.features){if(J.geometry.type!=="Polygon")continue;let z=(g=J.properties.kind)==null?void 0:g.toLowerCase();if(z==="void"||z==="otb")continue;let X=this.styleMap[J.properties.id];if(X!=null&&"height"in X&&(X==null?void 0:X.height)!=null&&(Z==null||!Z.has(J.properties.id))){let ee=((y=X.altitude)!=null?y:0)+X.height;(this._computedMaxHeight==null||ee>this._computedMaxHeight)&&(this._computedMaxHeight=ee)}let W=(E=this.mapDataInternal)==null?void 0:E.facadesBySpaceId[J.properties.id];if(W){let ee=j.get(W.id);ee==null&&(ee=[],j.set(W.id,ee)),ee.push(J)}else A.push(J)}let ie=this.renderer.addGroupContainer("spaces-".concat(this.id),{},o),de=this.renderer.addGeometryGroup("Spaces-".concat(this.id,"-0"),{features:A},J=>{var z;return((z=J==null?void 0:J.properties)==null?void 0:z.id)!=null&&this.styleMap[J.properties.id]!=null?im(this.styleMap[J.properties.id],this.options):Pee},ie);if(this.layers.get(Mr).layers.set("Spaces",de.id.toString()),j.size>0){let J=this.renderer.addGroupContainer("".concat(pd,"-").concat(this.id),{},this.id);this.layers.set(pd,new Bi(this.renderer,J.id.toString()));for(let[z,X]of j){let W=this.renderer.addGroupContainer(z,{focusable:!0},J),ee=this.renderer.addGroupContainer("".concat(z,"-geometry"),{},W),ce=VS(X,this.styleMap),ye=0;for(let[Ce,Pe]of ce){let Le=this.renderer.addGeometryGroup("Facades-".concat(this.id,"-").concat(z,"-").concat(ye),{features:Pe},oe(k({},im(Ce,this.options)),{renderOrder:3}),ee);ye++;let be=Ce.id||Le.id.toString();this.layers.get(pd).layers.set("".concat(z,"-").concat(be),Le.id.toString()),this.facadesByStyleId.has(be)?(b=this.facadesByStyleId.get(be))==null||b.push(z):this.facadesByStyleId.set(be,[z])}}}}if(((v=this.footprint)==null?void 0:v.geometry)!=null&&this.footprint.geometry.coordinates.length>0&&this.styleMap!=null&&(this.footprintObject=new fy(this.renderer,this.mapObject,this.id,{floorId:this.id,externalId:this.externalId,elevation:this.elevation,floorStackId:this.floorStackId,footprintGeometry:this.footprint,obstructions:this.obstructions,styleMap:this.styleMap,multiFloorView:this.multiFloorView}),this.layers.set(O0,new Bi(this.renderer,this.footprintObject.layer.id.toString())),this.footprint=cF(this.footprint)),this.obstructions!=null&&this.obstructions.features.length>0){let A=this.obstructions.features.filter(W=>W.geometry.type==="Polygon"&&(W.properties.kind==="object"||W.properties.kind==="unknown")),j=VS(A,this.styleMap),N=this.renderer.addGroupContainer("objects-".concat(this.id),{},o),Z=0;for(let[W,ee]of j){let ce=this.renderer.addGeometryGroup("Objects-".concat(this.id,"-").concat(Z),{features:ee},im(W,this.options),N);Z++;let ye=N.id.toString();this.layers.get(Mr).layers.set(W.id||ye,ce.id.toString())}let ie=this.obstructions.features.filter(W=>{var ee;return W.geometry.type==="LineString"&&((ee=W.properties.kind)==null?void 0:ee.toLowerCase())==="wall"&&W.properties.footprintComponent===!1}),de=this.obstructions.features.filter(W=>{var ee;return W.geometry.type==="LineString"&&((ee=W.properties.kind)==null?void 0:ee.toLowerCase())==="wall"&&W.properties.footprintComponent===!0}),J=this.entrances,z=ml,X=ml;if(ie!=null&&ie.length>0){let W=this.styleMap[(D=ie[0].properties)==null?void 0:D.id];W!=null&&(z=k({},W)),X=z;let{walls:ee,entrances:ce}=$S(ie,(J==null?void 0:J.features)||[]),ye=Math.max(z.height-.11,_k),Ce=oe(k({},Ak),{height:ye}),Pe=this.renderer.addGeometryGroup("InteriorDoors-".concat(this.id),ce,Ce,o);this.layers.get(Mr).layers.set(kf,Pe.id.toString());let Le=this.renderer.addGeometryGroup("Walls-".concat(this.id),{features:[ee]},im(z,this.options),o);this.layers.get(Mr).layers.set(ec,Le.id.toString())}if(de!=null&&de.length>0){let W=this.styleMap[(M=de[0].properties)==null?void 0:M.id];W!=null&&(X=oe(k({},W),{id:js}));let{walls:ee,entrances:ce}=$S(de,(J==null?void 0:J.features)||[]),ye=Math.max(X.height-.11,_k),Ce=oe(k({},Ak),{height:ye}),Pe=this.renderer.addGeometryGroup("ExteriorDoors-".concat(this.id),ce,Ce,o);this.layers.get(Mr).layers.set(Lf,Pe.id.toString());let Le=this.renderer.addGeometryGroup("ExteriorWalls-".concat(this.id),{features:[ee]},im(X,this.options),o);this.layers.get(Mr).layers.set(js,Le.id.toString())}}if(this.floorImages!=null){let A=this.renderer.addGroupContainer("images-".concat(this.id),{},this.id);for(let j of this.floorImages.features||[]){let N="anchorId"in j.properties?j.properties.anchorId:null,Z=N==null,ie=N!=null&&this.mapDataInternal!=null&&this.mapDataInternal.pointsOfInterestById[N]!=null;if(Z||ie){let de=sF(j,Ok),z=(((T=j.properties.rotation)!=null?T:0)%360+360)%360;if(ie){let X=new ke({latitude:j.geometry.coordinates[1],longitude:j.geometry.coordinates[0],floorId:this.id});this.mapDataInternal.Query.at(X).then(W=>{var ce,ye,Ce;let ee=0;for(let Pe of W)if(Lr.is(Pe)){let Le=(ye=(ce=this.renderer.getState(Pe.id))==null?void 0:ce.height)!=null?ye:0;Le>ee&&(ee=Le)}this.mapObject.api.Image3D.add(new ke({latitude:j.geometry.coordinates[1],longitude:j.geometry.coordinates[0],floorId:this.id,verticalOffset:ee}),j.properties.path,oe(k({id:de,flipImageToFaceCamera:(Ce=this.options.flipImagesToFaceCamera)!=null?Ce:!0},j.properties),{rotation:z}))})}else this.mapObject.api.Image3D.add(new ke({latitude:j.geometry.coordinates[1],longitude:j.geometry.coordinates[0],floorId:this.id}),j.properties.path,oe(k({id:de,flipImageToFaceCamera:(B=this.options.flipImagesToFaceCamera)!=null?B:!0},j.properties),{rotation:z}));Ok++}}this.layers.set(Rf,new Bi(this.renderer,A.id.toString()))}if(this.floorText!=null)for(let A of this.floorText.features||[]){let j=0;"geometryId"in A.properties?j=(_=(G=this.renderer.getState(A.properties.geometryId))==null?void 0:G.height)!=null?_:0:j=(F=A.properties.verticalOffset)!=null?F:0,this.renderer.addText3D(ht(),oe(k({},A),{properties:oe(k({},A.properties),{verticalOffset:j})}),{appearance:{flipToFaceCamera:!1}},this.id)}if(this.areas!=null){let A=this.renderer.addGroupContainer("areas-".concat(this.id),{},this.id);this.layers.set(dd,new Bi(this.renderer,A.id.toString()));let j=this.renderer.addGeometryGroup("Areas-".concat(this.id),{features:this.areas.features},{color:Pk.color},A);for(let N of this.areas.features||[])this.renderer.setState(N.properties.id,oe(k({},Pk),{visible:!1}));this.layers.get(dd).layers.set(j.id.toString(),j.id.toString())}return this.renderer.render(),this});var d,p,m,g,y,E;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(b=>b.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=(p=a.area)==null?void 0:p[this.id],this.obstructions=a.obstruction[this.id],this.floorImages=(m=a.floorImages)==null?void 0:m[this.id],this.floorText=(y=(g=a.enterprise)==null?void 0:g.floorText)==null?void 0:y[this.id];let b=(E=a["floor.geojson"])==null?void 0:E.features.find(v=>v.properties.id===t.id);b&&b.geometry!=null&&b.geometry.coordinates.length>0&&(this.footprint=b)}this.floorStackId=r,this.multiFloorView=o,this.mapDataInternal=l}get geometryMaxHeight(){return this._computedMaxHeight}get spacesOpenToBelowEnabled(){var r,t;return(t=(r=this.multiFloorView)==null?void 0:r.spacesOpenToBelowEnabled)!=null?t:!1}get voids(){var r,t,n,o;return(o=(n=(t=(r=this.mapDataInternal)==null?void 0:r.voidsByFloorId[this.id])==null?void 0:t.voids)==null?void 0:n.features)!=null?o:[]}get spacesOpenToBelow(){var t,n;if(!this.spaces)return[];let r=[];for(let o of this.spaces.features){if(o.geometry.type!=="Polygon")continue;(((t=o.properties.kind)==null?void 0:t.toLowerCase())==="void"||((n=o.properties.kind)==null?void 0:n.toLowerCase())==="otb")&&r.push(o)}return r}get geoJSONBoundingBox(){if(s(this,lp))return s(this,lp);if(!this.footprint){V.warn("Attempting to get bounding box with no footprint for floor ".concat(this.id));return}return O(this,lp,iF(this.footprint)),s(this,lp)}addOccluder(){var n;if(((n=this.footprint)==null?void 0:n.geometry)==null)return;let r=this.renderer.addGroupContainer("".concat(cd,"-").concat(this.id),{},this.id),t=new Bi(this.renderer,r.id.toString());this.layers.set(cd,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})}buildCeiling(r){this.footprintObject&&this.footprintObject.buildCeiling(r)}buildBasementMask(){this.footprintObject&&this.footprintObject.buildBasementMask()}buildGapFootprint(r,t){var n;((n=this.footprint)==null?void 0:n.geometry)!=null&&(this.gapFootprintObject=new fy(this.renderer,this.mapObject,this.id,{floorId:"gap-below-".concat(this.id),externalId:this.externalId,elevation:this.elevation,floorStackId:this.floorStackId,footprintGeometry:this.footprint,obstructions:void 0,styleMap:{},multiFloorView:this.multiFloorView,fixedHeight:r}),this.gapFootprintObject.buildWalls(),this.gapFootprintObject.buildCeiling(t),this.gapFootprintObject.update({altitude:-r,visible:!1}))}getFootprintStyle(){var t;let r=ml;if(this.obstructions!=null&&this.obstructions.features.length>0){let n=this.obstructions.features.filter(o=>{var i;return o.geometry.type==="LineString"&&((i=o.properties.kind)==null?void 0:i.toLowerCase())==="wall"&&o.properties.footprintComponent===!0});n!=null&&n.length>0&&(r=this.styleMap[(t=n[0].properties)==null?void 0:t.id])}return r}buildFootprint(){if(!this.footprintObject)return;this.footprintObject.buildWalls(),this.footprintObject.buildVoidWalls(this.voids);let r=new Bi(this.renderer,this.footprintObject.layer.id.toString());this.layers.set(O0,r)}setBatchedTextVisible(r){let t=this.renderer.getInternalState().geometry3DMap.get(this.id);if(t&&t instanceof Tr){let n=this.renderer.getSystems().text3DSystem.batchedTextMap.get(t);n&&n.then(o=>{o.visible=r})}}};lp=new WeakMap;f();var nh,hy=class{constructor(r,t,n,o){h(this,"id");h(this,"externalId");h(this,"name");h(this,"type");h(this,"floorIds");h(this,"defaultFloorId");h(this,"floorObjects",[]);h(this,"floorObjectsByElevation",new Map);h(this,"metadata");h(this,"containerId");h(this,"facade");h(this,"renderer");h(this,"altitudeMap",new Map);w(this,nh);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,this.renderer=n}get defaultFloor(){if(s(this,nh)==null){if(this.floorObjects.length===0)throw new Kr("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)),O(this,nh,r)}return s(this,nh)}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)){V.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(r){this.floorObjects.sort((t,n)=>t.elevation-n.elevation);for(let t of this.floorObjects)t.load(this.facade!=null),!this.isOutdoors&&!t.hasFacadeGeometry&&t.footprint!=null&&t.addOccluder();if(this.altitudeMap=uF(this.floorObjects,r==null?void 0:r.floorGap,r==null?void 0:r.floorGapMultiplier,r==null?void 0:r.floorGapFallback,r==null?void 0:r.__EXPERIMENTAL_disableGapFilling),r!=null&&r.enabled)for(let t of this.floorObjects){let n=this.altitudeMap.get(t.elevation);n&&this.renderer.setState(t.id,{altitude:n.altitude})}if(!this.isOutdoors){for(let t of this.floorObjects){let n=this.floorObjectsByElevation.get(t.elevation+1),o=[];if(t.spacesOpenToBelowEnabled){for(let i of t.voids)o.push(i);if(n)for(let i of n.spacesOpenToBelow)o.push(i)}t.buildCeiling(o),t.buildFootprint(),t.elevation<=0&&t.buildBasementMask()}if(r!=null&&r.enabled&&!r.__EXPERIMENTAL_disableGapFilling){let t=lF(this.floorObjects,this.altitudeMap,r.floorGap,r.floorGapMultiplier,r.floorGapFallback);for(let n of t){let o=this.floorObjectsByElevation.get(n.floorAboveElevation);if(!o)continue;let i=o.spacesOpenToBelow;o.buildGapFootprint(n.height,i)}}}}};nh=new WeakMap;f();var _ee=.2,Oee=.05,Fee=-3;function Bee(e,r){return Lc(e,Fee,r,_ee,Oee)}var kee="#ffffff";function Lee(e,r){var t;return typeof e=="string"?e:(t=e[r])!=null?t:kee}function Ree(e){return e.spacesOpenToBelow.length>0}function y6(e,r,t,n,o){var c,d,p,m,g;let i={outdoorOpacity:"initial",floorStates:[]},{spacesOpenToBelowEnabled:a,__EXPERIMENTAL_darkenSpacesExposedToAbove:u=!0}=o,l=e.sort((y,E)=>y.elevation-E.elevation);for(let y of l){let E=(d=(c=n.get(y.elevation))==null?void 0:c.visualHeight)!=null?d:0,b=(p=o.opacity)!=null?p:y.elevation<0?1:.4,v=!1;if(a){let F=y.elevation<r.elevation?e.find(A=>A.elevation===y.elevation+1):null;v=F?Ree(F):!1}let D={maskEnabled:y.elevation<0,maskId:rh,maskEffect:"reveal",maskMode:"masked-object"},M=a?y.elevation===r.elevation||v:!1,T=a?y.elevation<r.elevation:y.elevation===r.elevation&&y.elevation<0,B=(r.elevation>=0?y.elevation===0:y.elevation===r.elevation)&&((g=(m=y.floorStack)==null?void 0:m.type)==null?void 0:g.toLowerCase())!=="outdoor",G={color:Lee(o.color,y.id),ceilingVisible:y.elevation<r.elevation,visible:T,basementMaskEnabled:B,outline:o.outline,ceilingThickness:.5,height:E,opacity:b},_={floor:y,state:{type:"floor",visible:M,geometry:a?oe(k({visible:M},D),{overlayColor:"#000000",overlayStrength:v&&u?Bee(y.elevation,r.elevation):0}):oe(k({},D),{visible:!1}),labels:{enabled:!1},markers:{enabled:!1},footprint:G,occlusion:{enabled:!1},areas:{visible:!1},text3d:{visible:!1},images:{visible:!1,collisionsEnabled:y.id===r.id},paths:{visible:!1},models:{visible:!1}}};i.floorStates.push(_),y.id===r.id?(_.state.visible=!0,_.state.images.visible=!0,_.state.paths.visible=!0,_.state.geometry.visible=!0,_.state.models.visible=!0,_.state.labels.enabled=!0,_.state.markers.enabled=!0,_.state.occlusion.enabled=!0,_.state.areas.visible=!0,_.state.text3d.visible=!0,y.elevation<0&&(_.state.footprint.height=E*Math.abs(y.elevation),_.state.footprint.visible=!0,i.outdoorOpacity=.2)):t.includes(y.id)&&y.elevation<r.elevation?(_.state.visible=!0,_.state.geometry.visible=!0,_.state.models.visible=!0,_.state.paths.visible=!0,_.state.markers.enabled=!0,_.state.occlusion.enabled=!0,_.state.footprint.visible=!0,_.state.footprint.height=E,y.elevation<0&&(i.outdoorOpacity=.2)):r.elevation>0&&y.elevation<r.elevation&&y.elevation>=0&&(_.state.visible=!0,_.state.footprint.visible=!0,_.state.footprint.height=E)}return i}f();import it from"zod";f();import{z as Fk}from"zod";function Bk(e){try{let r=e.shape;if("type"in r){let t=r.type;if(t instanceof Fk.ZodOptional&&(t=t._def.innerType),"value"in t)return String(t.value);if(t instanceof Fk.ZodDefault&&"value"in t._def.innerType)return String(t._def.innerType.value)}return"unknown"}catch(r){return"unknown"}}function kk(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 Lk(e,r){let t=Object.entries(e);if(t.length>0){let n=t.map(([o,i])=>"".concat(o,": ").concat(i.join(", "))).join("; ");V.warn("".concat(t.length," invalid field(s) in ").concat(r!=null?r:"unknown"," state: [").concat(n,"]"))}}function Vt(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=kk(n);t!=null&&t.warn&&Lk(o,Bk(e));let i={};for(let a of Object.keys(r))!(a in o)&&a in e.shape&&(i[a]=r[a]);return i}function Bn(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=kk(n);Lk(o,Bk(e))}return r}var Rk="path",as={color:"#4b90e2",width:1,completeFraction:0,visible:!0,verticalOffset:.1,xrayOpacity:.25,__EXPERIMENTAL_SMOOTHING_TENSION:Ui.tension,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:Ui.cornerRadius,dashed:!1,__EXPERIMENTAL_ENDCAP_EXTENSION:[.5,.5],__EXPERIMENTAL_BILLBOARDING:!1,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:!1},b6=it.object({type:it.literal(Rk).default(Rk),color:it.string().default(as.color),width:it.union([it.number(),it.any()]),completeFraction:it.number().default(as.completeFraction),visible:it.boolean().default(as.visible),verticalOffset:it.number().default(as.verticalOffset),highlightStartFraction:it.number().default(0),highlightEndFraction:it.number().default(0),highlightColor:it.string().default("red"),highlightWidthMultiplier:it.number().default(1.1),highlightCompleteFraction:it.number().default(1),xrayOpacity:it.number().min(0).max(1).default(as.xrayOpacity),__EXPERIMENTAL_SMOOTHING_TENSION:it.number().default(as.__EXPERIMENTAL_SMOOTHING_TENSION),__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:it.number().default(as.__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS),dashed:it.boolean().default(as.dashed),__EXPERIMENTAL_DASH_OPTIONS:it.discriminatedUnion("__EXPERIMENTAL_DASH_MODE",[it.object({__EXPERIMENTAL_DASH_MODE:it.literal("length-scaling"),__EXPERIMENTAL_DASH_LENGTH:it.number().min(0).max(1).default(.1),__EXPERIMENTAL_DASH_GAP:it.number().min(0).max(1).default(.1)}),it.object({__EXPERIMENTAL_DASH_MODE:it.literal("width-scaling"),__EXPERIMENTAL_DASH_SIZE:it.number().min(0).default(3),__EXPERIMENTAL_GAP_SIZE:it.number().min(0).default(2)}),it.object({__EXPERIMENTAL_DASH_MODE:it.literal("absolute"),__EXPERIMENTAL_DASH_METERS:it.number().min(0).default(1),__EXPERIMENTAL_GAP_METERS:it.number().min(0).default(.5)})]).optional(),__EXPERIMENTAL_GEOMETRY:it.enum(["tube","ribbon"]).default("tube"),__EXPERIMENTAL_ENDCAP_EXTENSION:it.tuple([it.number(),it.number()]).default(as.__EXPERIMENTAL_ENDCAP_EXTENSION),__EXPERIMENTAL_BILLBOARDING:it.boolean().default(as.__EXPERIMENTAL_BILLBOARDING),__EXPERIMENTAL_BORDER:it.object({enabled:it.boolean(),color:it.custom(e=>typeof e=="string"),width:it.number().optional()}).optional(),__EXPERIMENTAL_PREVENT_SELF_OVERLAP:it.boolean().default(as.__EXPERIMENTAL_PREVENT_SELF_OVERLAP)}),v6=b6.partial(),cYe=it.strictObject(b6.shape);function Nk(e){let{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:u,highlightColor:l,highlightWidthMultiplier:c,highlightCompleteFraction:d,xrayOpacity:p,smoothingTension:m,smoothingCornerRadius:g,dashed:y,dashLength:E,dashGap:b,dashRelativeToWidth:v,dashSize:D,gapSize:M,dashAbsolute:T,dashMeters:B,gapMeters:G,__EXPERIMENTAL_GEOMETRY:_,__EXPERIMENTAL_ENDCAP_EXTENSION:F,__EXPERIMENTAL_BILLBOARDING:A,__EXPERIMENTAL_BORDER:j,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:N}=e,Z;return T?Z={__EXPERIMENTAL_DASH_MODE:"absolute",__EXPERIMENTAL_DASH_METERS:B,__EXPERIMENTAL_GAP_METERS:G}:v?Z={__EXPERIMENTAL_DASH_MODE:"width-scaling",__EXPERIMENTAL_DASH_SIZE:D,__EXPERIMENTAL_GAP_SIZE:M}:Z={__EXPERIMENTAL_DASH_MODE:"length-scaling",__EXPERIMENTAL_DASH_LENGTH:E,__EXPERIMENTAL_DASH_GAP:b},Bn(b6,{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:u,highlightColor:l,highlightWidthMultiplier:c,highlightCompleteFraction:d,xrayOpacity:p,__EXPERIMENTAL_SMOOTHING_TENSION:m,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:g,dashed:y,__EXPERIMENTAL_DASH_OPTIONS:Z,__EXPERIMENTAL_GEOMETRY:_,__EXPERIMENTAL_ENDCAP_EXTENSION:F,__EXPERIMENTAL_BILLBOARDING:A,__EXPERIMENTAL_BORDER:j,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:N})}function oh(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 No,gy=class extends Xe{constructor(t,n,o,i){var c,d,p,m;super();h(this,"floorStacksById",new Map);h(this,"floorsById",new Map);h(this,"startingFloorId","");h(this,"currentFloorId","");h(this,"currentFloorStackId","");h(this,"outdoorFloorStacks",new Set);h(this,"id");h(this,"renderer");h(this,"api");h(this,"mvf");h(this,"options",{});h(this,"styleMap");h(this,"animations",new Map);h(this,"Models",{add:(t,n,o)=>{var g;let m=o,{floorId:i,scale:a}=m,u=Zr(m,["floorId","scale"]),l=i?this.floorsById.get(i):void 0,c=l==null?void 0:l.layers.get(Ua),d=k({},u);a!=null&&(d.scale=Array.isArray(o.scale)?o.scale:[o.scale,o.scale,o.scale]);let p=this.renderer.addModelGroup(t,{type:"FeatureCollection",features:n.map(y=>({type:"Feature",properties:{id:ht(),rotation:o.rotation,scale:d.scale,interactive:o.interactive},geometry:{type:"Point",coordinates:_i(y)}}))},d,{parent:(g=c==null?void 0:c.containerId)!=null?g:l==null?void 0:l.id});if(p==null)throw new Kr("error creating model");return this.renderer.getState(p).children},remove:(t,n)=>{this.renderer.remove(t)}});h(this,"Image3D",{add:(t,n,o)=>{var m;let p=o,{floorId:i,flipImageToFaceCamera:a,maxImageSize:u}=p,l=Zr(p,["floorId","flipImageToFaceCamera","maxImageSize"]),c=i?this.floorsById.get(i):this.currentFloor,d={type:"Feature",properties:l,geometry:{type:"Point",coordinates:t}};return this.renderer.addImage((m=o.id)!=null?m:ht(),d,{url:n,flipImageToFaceCamera:a!=null?a:!1,maxImageSize:u},c.id)},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}});h(this,"Markers",{add:(t,n,o)=>{let i=am(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),p=o,{attachTo:a}=p,u=Zr(p,["attachTo"]),l=u;u.rank==="initial"&&(l.rank="medium");let c=i.layers.get(ja),d=this.renderer.addMarker2D(_i(t),n,oe(k({},l),{occluderId:i==null?void 0:i.occluderId,attachTo:a}),c==null?void 0:c.containerId);if(!d)throw new Kr("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){V.error('Failed to retrieve state for Marker with id "'.concat(t,'".'));return}if(i.type!=="marker"){V.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(ja))==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 V.error('Failed to retrieve state for Marker with id "'.concat(t,'".')),Promise.resolve();if(a.type!=="marker")return V.error('Geometry with id "'.concat(t,'" is not of type "marker".')),Promise.resolve();let l=k({duration:1e3,easing:"ease-in-out"},i);this.cancelAnimation(t);let c=new Xa({lon:a.position[0],lat:a.position[1]}).to({lon:n[0],lat:n[1]},l.duration).easing(Ws[l.easing]).onUpdate(({lon:d,lat:p})=>{var g;if(!this.renderer.getState(t))this.cancelAnimation(t);else{let y=(g=u==null?void 0:u.layers.get(ja))==null?void 0:g.containerId;y&&this.Markers.setPosition(t,[d,p],y)}}).start();return this.renderer.getInternalTweenGroup().add(c),this.renderer.render(),this.animations.set(t,c),ZS(c).then(()=>{this.animations.delete(t)})}});h(this,"Exporter",{getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)});h(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-"+ht();return this.renderer.addGeometryGroup(a,t,n,i.id),a},remove:t=>(this.renderer.remove(t.id),t.id)});h(this,"Text3D",{label:(t,n,o)=>{var a;if(!((a=this.api.getMapDataInternal())!=null&&a.enterpriseMode)){V.warn("Enterprise mode is not enabled, skipping label creation");return}let i=jk(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 V.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=jk(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},add:(t,n,o)=>{var E;let{rotation:i=0,appearance:a}=o,{fontSize:u=12,color:l="black",font:c=""}=a!=null?a:{},d=am(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),m={type:"Feature",properties:{text:n,rotation:i,verticalOffset:(E=t.verticalOffset)!=null?E:0,fontSize:u,color:l,align:"center",visible:!0,fontFamily:c},geometry:{type:"Point",coordinates:_i(t)}},g=ht();return this.renderer.addText3D(g,m,{appearance:oe(k({},a),{fontSize:u,color:l,font:c||void 0})},d.id)},remove:t=>(this.renderer.remove(t),t)});h(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 E,b,v,D;let l=(E=this.api.getMapData())==null?void 0:E.getById("space",u.properties.id);if(!l)return;let c=(b=this.styleMap[u.properties.id])==null?void 0:b.showImage,d=(v=u.properties.details)==null?void 0:v.images,p=c&&((D=d==null?void 0:d[0])!=null&&D.url)?{icon:d[0].url}:{},m=k({icon:p.icon},n.appearance),y=(i?this.floorsById.get(i):this.currentFloor).layers.get(Us);if(u.properties.center&&l.name!==""){let M=this.renderer.addLabel2D(u.properties.center,l.name,oe(k({id:u.properties.id+"-label"},n),{appearance:m,rank:n.rank,attachTo:sm(l)}),Lr.is(l)?l.id:y==null?void 0:y.containerId);M&&t(M.id,l.name,l)}})}},add:(t,n,o={})=>{let d=o,{attachTo:i}=d,a=Zr(d,["attachTo"]),u=am(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),l=u.layers.get(Us),c=this.renderer.addLabel2D(_i(t),n,oe(k({},a),{occluderId:u.occluderId,attachTo:i}),l==null?void 0:l.containerId);if(!c)throw new Kr("label creating failed");return c},remove:({entityId:t})=>{this.renderer.remove(t)},removeAll:()=>{}});h(this,"Paths",{add:(t,n,o)=>{var p,m;let i=n?oh(n):void 0,a=(p=n==null?void 0:n.animateDrawing)!=null?p:!0,u=[],l=t[0].floorId||"root",c=0;for(let g of t){let y=(m=g.floorId)!=null?m:l,{latitude:E,longitude:b}=g;y!==l&&(c++,l=y),u[c]==null&&u.push({floorId:y,coordinates:[]});let v=g.floorId===y?g:new ke({longitude:b,latitude:E,floorId:y});u[c].coordinates.push(v)}let d=u.reduce((g,{floorId:y,coordinates:E},b)=>{var M,T,B,G,_,F,A,j,N;if(b!==0){let Z=u[b-1],ie=Z.coordinates[Z.coordinates.length-1],de=E[0],J=_i(ie),z=_i(de),X=this.floorsById.get(Z.floorId),W=this.floorsById.get(y),ee=X==null?void 0:X.floorStackId,ce=W==null?void 0:W.floorStackId,ye=ee?this.getFloorStackAltitudeData(ee):void 0,Ce=ce?this.getFloorStackAltitudeData(ce):void 0,Pe=(B=(T=ye==null?void 0:ye.get((M=X==null?void 0:X.elevation)!=null?M:0))==null?void 0:T.altitude)!=null?B:0,Le=(F=(_=Ce==null?void 0:Ce.get((G=W==null?void 0:W.elevation)!=null?G:0))==null?void 0:_.altitude)!=null?F:0,be=(A=o==null?void 0:o.__EXPERIMENTAL_JUNCTION_INSET)!=null?A:0;US(J,z,be,Pe,Le);let He=jS(o==null?void 0:o.__EXPERIMENTAL_BILLBOARDING,Pe,Le,J,z),tt=o?oe(k({},o),{__EXPERIMENTAL_BILLBOARDING:He}):i,lt=tt?oh(tt):i,U=this.renderer.addPath({type:"FeatureCollection",features:[{type:"Feature",properties:{parentId:Z.floorId},geometry:{type:"Point",coordinates:J}},{type:"Feature",properties:{parentId:y},geometry:{type:"Point",coordinates:z}}]},lt,this.id);U&&(a&&this.renderer.setState(U.id,{completeFraction:0}),g.push(oe(k({},U),{coordinates:[ie,de]})))}if(E.length<2)return g;let v=(N=(j=this.floorsById.get(y))==null?void 0:j.layers.get(Gs))==null?void 0:N.containerId,D=this.renderer.addPath({type:"FeatureCollection",features:E.map(Z=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:_i(Z)}}))},i,v!=null?v:y);return D&&(a&&this.renderer.setState(D.id,{completeFraction:0}),g.push(oe(k({},D),{coordinates:E}))),g},[]);if(a){let g=[],y=this.api.getMapData();return d.forEach(E=>{var v;let b=aF(E,y,this.api);g.push(new Xa({fraction:0}).to({fraction:1},b?(v=n==null?void 0:n.drawDuration)!=null?v:1500:0).onUpdate(D=>{this.renderer.setState(E.id,{completeFraction:D.fraction})}))}),g.forEach((E,b)=>{b<g.length-1&&E.chain(g[b+1]),this.renderer.getInternalTweenGroup().add(E)}),g[0].start(),this.renderer.render(),this.animations.set(d[0].id.toString(),g[0]),{paths:d,animation:ZS(g[g.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)})}});w(this,No,{enabled:!1,floorGap:"auto",updateCameraElevationOnFloorChange:!0,footprintColor:ml.color,footprintOpacity:void 0,footprintOutline:!0,spacesOpenToBelowEnabled:!1});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=oF(this.mvf["styles.json"]||{});if(this.styleMap=a,O(this,No,k(k({},s(this,No)),o==null?void 0:o.multiFloorView)),!n){this.id!=="outdoors-container"&&V.warn("Map (".concat(this.id,") created with no data."));let g=new hy({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 y=new my(g.id,{id:"default-floor",externalId:"default-floor",name:"Default Floor",elevation:0},this,s(this,No),o!=null?o:{});this.floorsById.set(y.id,y),g.addFloor(y),this.setFloor(y.id);return}let u=n.getMVFFeatureByType("floor-stack");if(u==null||u.length===0)throw new Kr("MVF does not contain any Floor Stacks.");for(let g of u){let y=new hy(g,this.id,this.renderer,(d=this.mvf.facade)==null?void 0:d[g.id]);for(let E of y.floorIds){let b=n.getMVFFeatureById("floor",E);if(b!=null){let v=new my(y.id,b,this,s(this,No),o!=null?o:{},this.mvf,a,n);this.floorsById.set(v.id,v),y.addFloor(v)}}if(y.floorObjects.length<1){V.warn("Floor stack ".concat(g.id," has no floors. It will not be loaded."));continue}this.floorStacksById.set(g.id,y),this.currentFloorStackId||(this.currentFloorStackId=g.id)}for(let[g]of Object.entries(n.facadesBySpaceId)){let y=n.getById("space",g);y&&(this.outdoorFloorStacks.add(y.floor.floorStack.id),(p=this.floorsById.get(y.floor.id))==null||p.setVisible(!0))}let l=(m=this.mvf.enterprise)==null?void 0:m.venue.defaultMap;if(o!=null&&o.initialFloor){let g=M0(o.initialFloor);g&&this.floorsById.has(g)?l=g:V.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 Kr('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){V.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){V.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 Kr('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,p,m,g,y,E,b,v;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){let D=n.floorStack.id===(o==null?void 0:o.id),M=(u=this.api.getMapDataInternal())==null?void 0:u.getById("floor-stack",n.floorStack.id);if((l=s(this,No))!=null&&l.enabled&&M){if(!D)for(let B of this.floorStacksById.values())B.id!==M.id&&B.floorObjects.forEach(G=>{G.setVisible(!1)});let T=y6(M.floors,n,((d=(c=this.api.Navigation)==null?void 0:c.floors)==null?void 0:d.map(B=>B.id))||[],this.getFloorStackAltitudeData(M.id),{color:(p=s(this,No).footprintColor)!=null?p:ml.color,opacity:s(this,No).footprintOpacity,outline:(m=s(this,No).footprintOutline)!=null?m:!0,spacesOpenToBelowEnabled:(g=s(this,No).spacesOpenToBelowEnabled)!=null?g:!1,__EXPERIMENTAL_darkenSpacesExposedToAbove:s(this,No).__EXPERIMENTAL_darkenSpacesExposedToAbove});if((E=(y=this.api)==null?void 0:y.Outdoor)==null||E.setOpacity(T.outdoorOpacity),T.floorStates.forEach(B=>{var G;if(B.floor){let _=(G=this.api.getMapData())==null?void 0:G.getById("floor",B.floor.id);_&&this.api.updateState(_,B.state)}}),s(this,No).updateCameraElevationOnFloorChange){let B=this.getFloorStackAltitudeData(M.id);this.api.Camera.setElevation((v=(b=B.get(n.elevation))==null?void 0:b.altitude)!=null?v:0)}}else for(let T of this.floorStacksById.values())T.floorObjects.forEach(B=>{B.id!==t&&B.setVisible(!1)})}}setFloor(t,n){if(this.currentFloorId===t)return;if(!this.floorsById.get(t)){V.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(Gs);if(!a)continue;let u=!t||o.id===this.currentFloor.id;a.setVisible(u)}}getFloorStackAltitudeData(t){var n,o;return(o=(n=this.floorStacksById.get(t))==null?void 0:n.altitudeMap)!=null?o:new Map}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(s(this,No)),(t=n.facade)==null||t.spaces.forEach(o=>{let i=this.styleMap[o.spaceId];if(i&&i.altitude>=0){let a=n.altitudeMap.get(i.altitude/2);a&&this.renderer.setState(o.spaceId,{altitude:a.altitude,height:a.visualHeight})}})}};No=new WeakMap;function jk(e,r,t,n){return e.labelText3D(r.id,t!=null?t:r.name,oe(k({},n),{parentId:r.floor.id}))}f();var xa,by,yy=class{constructor({currentMapGetter:r}){w(this,xa,new Map);w(this,by);O(this,by,r)}get currentMap(){return s(this,by).call(this)}getAll(){return Array.from(s(this,xa).values()).map(({marker:r})=>r)}getById(r){return s(this,xa).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,oe(k({},n),{rank:(n==null?void 0:n.rank)||"medium",dynamicResize:(c=n==null?void 0:n.dynamicResize)!=null?c:!0,attachTo:sm(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 Js(a.id.toString(),u,r);return s(this,xa).set(l.id,{marker:l,entityId:a.id.toString()}),l}remove(r){var n;let t=s(this,xa).get(r.id);t&&((n=this.currentMap)==null||n.Markers.remove(t.entityId),s(this,xa).delete(r.id.toString()))}removeAll(){let r=[];return s(this,xa).forEach(({marker:t})=>{this.remove(t),r.push(t),s(this,xa).delete(t.id.toString())}),r}setPosition(r,t){var a;let n=t.anchorTarget;if(!n){V.error("Cannot determine coordinate from target.");return}let o=this.currentMap;if(!o){V.error("Cannot determine the current map.");return}let i=s(this,xa).get(r.id);if(!i){V.error('Cannot find the Marker with id "'.concat(r.id,'".'));return}o.Markers.setPosition(i.entityId,_i(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 V.error("Cannot determine coordinate from target."),Promise.resolve();let i=this.currentMap;if(!i)return V.error("Cannot determine the current map."),Promise.resolve();let a=s(this,xa).get(r.id);return a?(a.marker.updateTarget(t),i.Markers.animateTo(a.entityId,_i(o),(u=o.floorId)!=null?u:i.currentFloorId,n)):(V.error('Cannot find the Marker with id "'.concat(r.id,'".')),Promise.resolve())}};xa=new WeakMap,by=new WeakMap;f();var hl,xy,ih,r3,Uk,vy=class{constructor({currentMapGetter:r,mapDataInternalGetter:t}){w(this,r3);w(this,hl,new Map);w(this,xy);w(this,ih);O(this,xy,r),O(this,ih,t)}get currentMap(){return s(this,xy).call(this)}getById(r){return s(this,hl).get(r)}add(r,t,n){var c,d,p;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(_i(o),t,oe(k({},n),{floorId:o.floorId,verticalOffset:o.verticalOffset+((c=n.verticalOffset)!=null?c:0)}));if(!a)throw new Error("image component should exist");let u=(d=s(this,ih))==null?void 0:d.call(this),l=new wi(a.id.toString(),t,r,u==null?void 0:u.tokenManager);if(s(this,hl).set(l.id,{image:l,entityId:a.id.toString(),anchorId:n.anchorId}),n.anchorId!=null&&u!=null){let m=(p=u.floorImagesByAnchorId.get(n.anchorId))!=null?p:[];m.push(l),u.floorImagesByAnchorId.set(n.anchorId,m)}return l}remove(r){var n;let t=s(this,hl).get(r.id);t&&((n=this.currentMap)==null||n.Image3D.remove(t.entityId),s(this,hl).delete(r.id),se(this,r3,Uk).call(this,t.anchorId,r))}removeAll(){let r=[];return s(this,hl).forEach(({image:t})=>{this.remove(t),r.push(t),s(this,hl).delete(t.id.toString())}),r}};hl=new WeakMap,xy=new WeakMap,ih=new WeakMap,r3=new WeakSet,Uk=function(r,t){var a,u;if(r==null)return;let n=(u=(a=s(this,ih))==null?void 0:a.call(this))==null?void 0:u.floorImagesByAnchorId;if(n==null)return;let o=n.get(r);if(o==null)return;let i=o.filter(l=>l!==t);i.length===0?n.delete(r):n.set(r,i)};f();var Qs,Iy,Sy,Ey=class{constructor({currentMapGetter:r,mapDataInternalGetter:t}){w(this,Qs,new Map);w(this,Iy);w(this,Sy);O(this,Iy,r),O(this,Sy,t)}get currentMap(){return s(this,Iy).call(this)}getById(r){return s(this,Qs).get(r)}add(r,t,n){let o=[r],i=o.reduce((l,c)=>{var p,m;if(!c)return V.error("Cannot determine coordinate from options."),l;let d=(p=am(c,this.currentMap.floorsById,this.currentMap.floorsById.get("default-floor")))==null?void 0:p.id;return l.has(d)||l.set(d,[]),(m=l.get(d))==null||m.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 m;let d=ht();a.Models.add(d,l,oe(k({},n),{url:t,floorId:c,verticalOffset:l[0].verticalOffset+((m=n==null?void 0:n.verticalOffset)!=null?m:0)})).forEach(g=>{let y=new op(g.toString(),d,l[0]);s(this,Qs).set(y.id,{model:y,entityId:g.toString(),groupId:d}),u.push(y)})}),u[0]}all(){var i,a,u;let r=(i=s(this,Sy))==null?void 0:i.call(this);if(!r)return[];let t=r.getByType("enterprise-venue");if(!t)return[];let n=(a=t.extra)==null?void 0:a.models;if(!((u=n==null?void 0:n.models)!=null&&u.length))return[];let o=[];for(let l of n.models){if(!(l!=null&&l.url)||!l.coordinate||!r.getById("floor",l.coordinate.floorId))continue;let d=new ke({latitude:l.coordinate.latitude,longitude:l.coordinate.longitude,floorId:l.coordinate.floorId,verticalOffset:l.coordinate.verticalOffset}),p=this.add(d,l.url,{visible:!0,rotation:l.rotation,scale:l.scale,material:{Default:{color:l.color},Fabric:{color:l.color}},EXPERIMENTAL_clippingEnabled:!!l.manifolded});o.push(p)}return o}remove(r){var n;let t=s(this,Qs).get(r.id);t&&((n=this.currentMap)==null||n.Models.remove(t.entityId,t.groupId),s(this,Qs).delete(r.id.toString()))}removeAll(){let r=[];return s(this,Qs).forEach(({model:t})=>{var o;let n=s(this,Qs).get(t.id);n&&(r.push(t),(o=this.currentMap)==null||o.Models.remove(n.entityId,n.groupId),s(this,Qs).delete(t.id.toString()))}),r}};Qs=new WeakMap,Iy=new WeakMap,Sy=new WeakMap;f();var ss,Dy,Cy=class{constructor({currentMapGetter:r}){w(this,ss,new Map);w(this,Dy);O(this,Dy,r)}get currentMap(){return s(this,Dy).call(this)}getById(r){var t;return(t=s(this,ss).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 os((t==null?void 0:t.id)||ht(),o.animation,r,o.paths);for(let u of i)s(this,ss).set(u,{path:a,entityIds:i});return s(this,ss).set(a.id,{path:a,entityIds:i}),a}highlightPathSection(r,t,n,o){var p,m,g,y;let i=(m=(p=this.currentMap)==null?void 0:p.api.getMapData())==null?void 0:m.mapCenter;if(!i)return;let a=Qx([r],t,n,i);if(!a)return;let u=(g=o==null?void 0:o.animationDuration)!=null?g:1500,l=()=>{},c=new Promise(E=>{l=E}),d=new Xa({fraction:0}).to({fraction:1},u).onUpdate(E=>{var b;for(let v of a)(b=this.currentMap)==null||b.api.updateState(v.segment,{highlightCompleteFraction:E.fraction})}).onStart(()=>{var E,b,v;for(let D of a)(v=this.currentMap)==null||v.api.updateState(D.segment,{highlightStartFraction:D.startHighlightFraction,highlightEndFraction:D.endHighlightFraction,highlightColor:(E=o==null?void 0:o.color)!=null?E:"red",highlightWidthMultiplier:(b=o==null?void 0:o.widthMultiplier)!=null?b:1})}).onComplete(()=>{var E;l(),(E=this.currentMap)==null||E.api.removeTween(d)});return(y=this.currentMap)==null||y.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,ss).values())this.clearHighlightedPathSection(r.path)}remove(r){var n;let t=s(this,ss).get(r.id);t&&((n=this.currentMap)==null||n.Paths.remove(t.entityIds),s(this,ss).delete(r.id),t.entityIds.forEach(o=>s(this,ss).delete(o)))}removeAll(){let r=[];return s(this,ss).forEach(({path:t})=>{this.remove(t),r.push(t)}),r}};ss=new WeakMap,Dy=new WeakMap;f();var gl,My,Ty=class{constructor({currentMapGetter:r}){w(this,gl,new Map);w(this,My);O(this,My,r)}get currentMap(){return s(this,My).call(this)}getById(r){return s(this,gl).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 ll(i);return s(this,gl).set(a.id,a),a}remove(r){var n;s(this,gl).get(r.id)&&((n=this.currentMap)==null||n.Shapes.remove(r),s(this,gl).delete(r.id.toString()))}removeAll(){let r=[];return s(this,gl).forEach(t=>{this.remove(t),r.push(t.id),s(this,gl).delete(t.id.toString())}),r}};gl=new WeakMap,My=new WeakMap;f();var Ay,wy=class{constructor({currentMapGetter:r}){w(this,Ay);O(this,Ay,r)}get currentMap(){return s(this,Ay).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(Mr))continue;let c=l.layers.get(Mr);for(let m of Object.values(r))if(m&&"polygons"in m&&"color"in m)for(let g of m.polygons)(n=this.currentMap)==null||n.renderer.setState(g,{color:m.color});if(c!=null&&c.layers.has(u)&&"color"in r[u]){let m=c.layers.get(u);m&&((o=this.currentMap)==null||o.renderer.setState(m,{color:r[u].color}))}if(c&&u===ec&&!(js in r)){let m=c.layers.get(js);m&&"color"in r[u]&&((i=this.currentMap)==null||i.renderer.setState(m,{color:r[u].color}))}if(!l.layers.has(pd))continue;let d=l.layers.get(pd),p=l.facadesByStyleId.get(u);if(p&&p.length>0)for(let m of p){let g=d.layers.get("".concat(m,"-").concat(u));g&&"color"in r[u]&&((a=this.currentMap)==null||a.renderer.setState(g,{color:r[u].color}))}}}};Ay=new WeakMap;f();var x6={opacity:1},mo,Py,_y,Ac,yl,cp,E6,Gk,ah=class{constructor(r,t){w(this,cp);w(this,mo);w(this,Py,[]);w(this,_y,{opacity:"initial"});w(this,Ac,{opacity:new Map});w(this,yl,new Set);O(this,mo,r),O(this,Py,t||[]);let n=s(this,mo).map;n&&n.on("idle",()=>{s(this,Ac).opacity.size||se(this,cp,E6).call(this,n)})}setStyle(r){var t,n;if(s(this,mo).map){(t=s(this,mo).map)==null||t.setStyle(r),s(this,yl).size&&(s(this,yl).clear(),this.hide()),se(this,cp,Gk).call(this),se(this,cp,E6).call(this,s(this,mo).map),this.setOpacity(s(this,_y).opacity),(n=s(this,mo).map)==null||n.moveLayer(K3);for(let[o,i]of s(this,Py)||[])s(this,mo).hideOutdoorLayersIntersectingPolygons(o,i)}}get map(){return s(this,mo).map}get enabled(){return!!s(this,mo).map}get visible(){return s(this,yl).size===0}show(){let r=s(this,mo).map;if(!r)return;let t=r.getStyle().layers;t&&(t.forEach(n=>{s(this,yl).has(n.id)&&r.setLayoutProperty(n.id,"visibility","visible")}),s(this,yl).clear())}hide(r=[]){let t=s(this,mo).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,yl).add(o.id))})}setOpacity(r,t=[]){var i,a,u;let n=s(this,mo).map;if(!n)return;let o=(u=(a=(i=s(this,mo).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,Ac).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,_y).opacity=r)}catch(d){V.warn("Error setting opacity:",d)}})})}};mo=new WeakMap,Py=new WeakMap,_y=new WeakMap,Ac=new WeakMap,yl=new WeakMap,cp=new WeakSet,E6=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,Ac).opacity.set(n.id,[(i=r.getPaintProperty(n.id,"icon-opacity"))!=null?i:x6.opacity,(a=r.getPaintProperty(n.id,"text-opacity"))!=null?a:x6.opacity]):s(this,Ac).opacity.set(n.id,[(u=r.getPaintProperty(n.id,"".concat(n.type,"-opacity")))!=null?u:x6.opacity,void 0])))})},Gk=function(){Object.values(s(this,Ac)).forEach(r=>r.clear())};f();function Nee(){iE(!1)}var eu,tu,us,Oy=class{constructor({currentMapGetter:r}){w(this,eu);w(this,tu,new Map);w(this,us,new Map);O(this,eu,r)}labelAll(r={}){var o,i;let t=[],n=new Set;return(i=(o=s(this,eu).call(this))==null?void 0:o.Text3D.labelAll(r))==null||i.forEach(({textInfo:a,target:u})=>{let l=a.id.toString(),c=s(this,us).get(l);if(c){n.has(l)||t.push(c.text3DView),n.add(l);return}n.add(l);let d=new cl(l,u);s(this,tu).set(d.id,{targetId:u.id,text3d:l,text3DView:d}),s(this,us).set(l,{text3DView:d}),t.push(d)}),t}label(r,t,n={}){var i;if(s(this,eu).call(this))if(Lr.is(r)){let a=(i=s(this,eu).call(this))==null?void 0:i.Text3D.label(r,t,n);if(!a)return;let u=a.textInfo.id.toString(),l=s(this,us).get(u);if(l)return l.text3DView;let c=new cl(u,a.target);return s(this,tu).set(c.id,{targetId:a.target.id,text3d:u,text3DView:c}),s(this,us).set(u,{text3DView:c}),c}else throw new Error("Non-space target is not supported")}add(r,t,n={}){let o=s(this,eu).call(this);if(!o)throw new Error("Current map not found.");if(!ke.is(r))throw new Error("Target must be a Coordinate");let i=r.anchorTarget,a=o.Text3D.add(i,t,n);if(!a)throw new Error("Failed to add Text3D.");let u=a.id.toString(),l=s(this,us).get(u);if(l)return V.warn("Text3DView with ID ".concat(u," already exists. A new Text3DView will not be created. Returning existing. ")),l.text3DView;let c=new cl(u,r);return s(this,tu).set(c.id,{targetId:r.id,text3d:u,text3DView:c}),s(this,us).set(u,{text3DView:c}),c}remove(r){var o;let t=typeof r=="string"?r:r.id,n=s(this,tu).get(t);n&&((o=s(this,eu).call(this))==null||o.Text3D.remove(n.text3d),s(this,tu).delete(t),s(this,us).delete(n.text3d))}removeAll(){s(this,tu).forEach(r=>{var t;(t=s(this,eu).call(this))==null||t.Text3D.remove(r.text3d)}),s(this,tu).clear(),s(this,us).clear()}};eu=new WeakMap,tu=new WeakMap,us=new WeakMap;f();f();import ls from"zod";var zk="doors",I6=ls.object({type:ls.literal(zk).default(zk),color:ls.string().default("#ffffff"),topColor:ls.string().optional(),texture:ls.object({url:ls.string().optional()}).optional(),topTexture:ls.object({url:ls.string().optional()}).optional(),visible:ls.boolean().default(!1),opacity:ls.number().default(1)}),n3=I6.partial(),Sqe=ls.strictObject(I6.shape);function $k(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,opacity:a}=e;return Bn(I6,{visible:i,color:r,topColor:t,opacity:a,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0})}function o3(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}f();import{z as Fy}from"zod";var Vk="facade",S6=Fy.object({type:Fy.literal(Vk).default(Vk),opacity:Fy.number().default(1),visible:Fy.boolean().default(!0)}),Hk=S6.partial(),wqe=Fy.strictObject(S6.shape);function Zk(e){return Bn(S6,{opacity:e.opacity,visible:e.visible})}f();import{z as Ge}from"zod";var cs="floor",Wk="".concat(cs,".footprint"),Xk="".concat(cs,".geometry"),Yk="".concat(cs,".labels"),qk="".concat(cs,".markers"),Jk="".concat(cs,".images"),Kk="".concat(cs,".occlusion"),Qk="".concat(cs,".paths"),e9="".concat(cs,".areas"),t9="".concat(cs,".models"),dp=Ge.object({type:Ge.literal(Wk).default(Wk),altitude:Ge.number().default(0),visible:Ge.boolean().default(!1),height:Ge.number().default(0),opacity:Ge.number().default(1),side:Ge.enum(["double","front","back"]).default("double"),color:Ge.string().default("#ffffff"),ceilingVisible:Ge.boolean().default(!0),basementMaskEnabled:Ge.boolean().default(!1),outline:Ge.boolean().default(!0),ceilingThickness:Ge.number().default(.2)}),kqe=dp.partial(),i3=Ge.object({type:Ge.literal(Xk).default(Xk),opacity:Ge.number().default(1),visible:Ge.boolean().default(!0),maskId:Ge.number().nullable().default(null),maskEffect:Ge.enum(["hide","reveal"]).default("hide"),maskMode:Ge.enum(["mask","masked-object"]).default("mask"),maskEnabled:Ge.boolean().default(!1),overlayStrength:Ge.number().default(0),overlayColor:Ge.string().default("#333333")}),r9=i3.partial(),a3=Ge.object({type:Ge.literal(Yk).default(Yk),enabled:Ge.boolean().default(!0)}),n9=a3.partial(),s3=Ge.object({type:Ge.literal(qk).default(qk),enabled:Ge.boolean().default(!0)}),o9=s3.partial(),u3=Ge.object({type:Ge.literal(Jk).default(Jk),visible:Ge.boolean().default(!0),collisionsEnabled:Ge.boolean().default(!1)}),i9=u3.partial(),l3=Ge.object({type:Ge.literal(Kk).default(Kk),enabled:Ge.boolean().default(!0)}),a9=l3.partial(),c3=Ge.object({type:Ge.literal(Qk).default(Qk),visible:Ge.boolean().default(!0)}),s9=c3.partial(),d3=Ge.object({type:Ge.literal(cs).default(cs),visible:Ge.boolean().default(!1),altitude:Ge.number().default(0)}),p3=Ge.object({type:Ge.literal(e9).default(e9),visible:Ge.boolean().default(!0)}),u9=p3.partial(),f3=Ge.object({visible:Ge.boolean().default(!0)}),l9=f3.partial(),m3=Ge.object({type:Ge.literal(t9).default(t9),visible:Ge.boolean().default(!0)}),c9=m3.partial(),jee=Ge.object(oe(k({},d3.shape),{geometry:i3,labels:a3,markers:s3,images:u3,footprint:dp,occlusion:l3,paths:c3,areas:p3,text3d:f3,models:m3})),d9=d3.partial(),Lqe=Ge.object(oe(k({},d3.shape),{geometry:i3.partial(),labels:a3.partial(),markers:s3.partial(),images:u3.partial(),footprint:dp.partial(),occlusion:l3.partial(),paths:c3.partial(),areas:p3.partial(),text3d:f3.partial(),models:m3.partial()})).partial(),Rqe=Ge.strictObject(oe(k({},d3.shape),{geometry:Ge.strictObject(i3.shape),labels:Ge.strictObject(a3.shape),markers:Ge.strictObject(s3.shape),images:Ge.strictObject(u3.shape),footprint:Ge.strictObject(dp.shape),occlusion:Ge.strictObject(l3.shape),paths:Ge.strictObject(c3.shape),areas:Ge.strictObject(p3.shape),text3d:Ge.strictObject(f3.shape),models:Ge.strictObject(m3.shape)}));function p9(e,r,t){var A,j,N,Z;if(!r){V.error("Floor is not defined. Cannot get floor state.");return}let n=r.layers.get(Mr),o=n?t==null?void 0:t.getState(n.containerId):void 0,i=r.layers.get(Us),a=r.layers.get(ja),u=(A=r.footprintObject)==null?void 0:A.getState(),l=r.layers.get(cd),c=l?t==null?void 0:t.getState(l.containerId):void 0,d=r.layers.get(Rf),p=d?t==null?void 0:t.getState(d.containerId):void 0,m=!1;if(n!=null&&n.layers)for(let ie of n.layers.values()){let de=t==null?void 0:t.getState(ie);if((j=de==null?void 0:de.children)!=null&&j[0]){let J=t==null?void 0:t.getState(de.children[0]);m=(N=J==null?void 0:J.enableImageCollisions)!=null?N:!1;break}}let g=r.layers.get(Gs),y=g?t==null?void 0:t.getState(g.containerId):void 0,E=r.layers.get(dd),b=E?t==null?void 0:t.getState(E.containerId):void 0,v=r.layers.get(Ua),D=v?t==null?void 0:t.getState(v.containerId):void 0,M=!0,T=!0,B=!0,G=!0;for(let[,ie]of n.layers){let de=t==null?void 0:t.getState(ie);de!=null&&de.maskId||(M=!1),de!=null&&de.maskEffect||(T=!1),de!=null&&de.maskMode||(B=!1),de!=null&&de.maskEnabled||(G=!1)}let _=t==null?void 0:t.getInternalState().geometry3DMap.get(r.id),F=!1;if((_==null?void 0:_.type)==="group-container"){let ie=_?t==null?void 0:t.getSystems().text3DSystem.getBatchedText(_):void 0;F=(Z=ie==null?void 0:ie.visible)!=null?Z:!0}return Bn(jee,{geometry:{opacity:o==null?void 0:o.opacity,visible:o==null?void 0:o.visible,maskId:M,maskEffect:T,maskMode:B,maskEnabled:G},labels:{enabled:i==null?void 0:i.visible},markers:{enabled:a==null?void 0:a.visible},footprint:{altitude:u==null?void 0:u.altitude,visible:u==null?void 0:u.visible,height:u==null?void 0:u.height,opacity:u==null?void 0:u.opacity,side:u==null?void 0:u.side,color:u==null?void 0:u.color,ceilingVisible:u==null?void 0:u.ceilingVisible,basementMaskEnabled:u==null?void 0:u.basementMaskEnabled,outline:u==null?void 0:u.outline,ceilingThickness:u==null?void 0:u.ceilingThickness},images:{visible:p==null?void 0:p.visible,collisionsEnabled:m},occlusion:{enabled:c==null?void 0:c.visible},paths:{visible:y==null?void 0:y.visible},areas:{visible:b==null?void 0:b.visible},text3d:{visible:F},models:{visible:D==null?void 0:D.visible},visible:e.visible,altitude:e.altitude})}f();import{z as hr}from"zod";var f9="geometry",C6=hr.object({type:hr.literal(f9).default(f9),visible:hr.boolean().default(!0),color:hr.union([hr.string(),hr.literal("initial")]).default("#ffffff"),topColor:hr.union([hr.string(),hr.literal("initial")]).optional(),hoverColor:hr.union([hr.string(),hr.literal("initial")]).optional(),interactive:hr.boolean().default(!1),opacity:hr.number().default(1),height:hr.number().default(0),altitude:hr.number().default(0),texture:hr.object({url:hr.string()}).optional(),topTexture:hr.object({url:hr.string()}).optional(),flipImageToFaceCamera:hr.boolean().default(!1),enableImageCollisions:hr.boolean().default(!1),borderVisible:hr.boolean().default(!1),borderColor:hr.string().optional(),borderWidth:hr.number().optional()}),D6=C6.partial(),$qe=hr.strictObject(C6.shape);function m9(e){let{altitude:r,interactive:t,hoverColor:n,color:o,visible:i,opacity:a,height:u,texture:l,topTexture:c,flipImageToFaceCamera:d,enableImageCollisions:p,topColor:m,borderVisible:g,borderColor:y,borderWidth:E}=e;return Bn(C6,{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:p,topColor:m,altitude:r,borderVisible:g,borderColor:y,borderWidth:E})}function h9(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}f();import Ea from"zod";var T6="label",Uee=Ea.object({type:Ea.literal(T6).default(T6),text:Ea.string(),rank:Ea.custom(e=>u1.safeParse(e).success||e==="initial"),appearance:Ea.custom(e=>c5.safeParse(e).success),interactive:Ea.boolean().default(!1),enabled:Ea.boolean().default(!0),textPlacement:Ea.union([Ea.enum(W3),Ea.array(Ea.enum(W3))]).default(X3),occlude:Ea.boolean().default(!0)}),g9=Uee.partial();function y9(e){var o,i,a,u,l;let{text:r,enabled:t,options:n}=e;return{type:T6,text:r!=null?r:"",appearance:d5((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:X3,occlude:(l=n==null?void 0:n.occlude)!=null?l:!0}}function b9(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}f();import an from"zod";var M6="marker",Gee=an.object({type:an.literal(M6).default(M6),rank:an.custom(e=>u1.safeParse(e).success||e==="initial"),placement:an.union([an.enum(Y3),an.array(an.enum(Y3))]).optional(),interactive:an.union([an.boolean(),an.literal("pointer-events-auto")]).default(!1),dynamicResize:an.boolean().default(!0),enabled:an.boolean().default(!0),zIndex:an.number().optional(),lowPriorityPin:an.object({enabled:an.boolean().optional(),size:an.number().positive().optional(),color:an.string().optional()}).optional(),element:an.custom(e=>e instanceof HTMLElement,{error:"Must be an HTMLElement instance"}),contentHTML:an.string(),occlude:an.boolean().default(!0)}),v9=Gee.omit({element:!0}).partial();function x9(e,r){var m,g,y,E,b;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,p=typeof d=="object"?d.id:d;return t==null&&(t=new ke({latitude:(m=c==null?void 0:c[1])!=null?m:0,longitude:(g=c==null?void 0:c[0])!=null?g:0,floorId:p==null?void 0:p.toString()})),{type:M6,rank:(y=l==null?void 0:l.rank)!=null?y:"medium",interactive:(E=l==null?void 0:l.interactive)!=null?E:!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:(b=l==null?void 0:l.occlude)!=null?b:!0}}function E9(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}f();import{z as ho}from"zod";var I9="shape",w6=ho.object({type:ho.literal(I9).default(I9),visible:ho.boolean().default(!0),altitude:ho.number().default(0),color:ho.string().default("#ffffff"),height:ho.number().default(0),opacity:ho.number().default(1),interactive:ho.boolean().default(!1),bevel:ho.object({enabled:ho.boolean().optional(),thickness:ho.number().optional(),size:ho.number().optional(),offset:ho.number().optional(),segments:ho.number().optional()}).optional(),position:ho.custom(e=>ke.is(e))}),A6=w6.partial(),sJe=ho.strictObject(w6.shape);function S9(e){let{altitude:r,visible:t,color:n,opacity:o,interactive:i,height:a,children:u,bevel:l,position:c}=e;if(u==null||u.length<1){V.error("Expected at least one child for Shape (".concat(e.id,"). Cannot get shape state."));return}return Bn(w6,{altitude:r,visible:t,color:n,height:a,opacity:o,interactive:i,bevel:l,position:new ke({latitude:c[1],longitude:c[0],verticalOffset:r!=null?r:0})})}function C9(e){let r=Vt(A6,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 r.position!==void 0&&(t.position=[r.position.longitude,r.position.latitude],t.altitude=r.position.verticalOffset),t}f();import h3 from"zod";var D9="text3d",T9=h3.object({type:h3.literal(D9).default(D9),position:h3.custom(e=>e instanceof ke,{error:"Must be a Coordinate instance"})}),M9=_5.extend(k({},T9.shape)),w9=O5.extend(k({},T9.shape)).partial(),mJe=h3.strictObject(M9.shape);function A9(e){var T,B;let{position:r,visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:u,outlineOpacity:l,outlineBlur:c,outlineWidth:d,outlineOffsetX:p,outlineOffsetY:m,strokeWidth:g,strokeOpacity:y,strokeColor:E,fillOpacity:b,hoverColor:v,rotation:D,content:M}=e;return Bn(M9,{position:new ke({latitude:(T=r==null?void 0:r[1])!=null?T:0,longitude:(B=r==null?void 0:r[0])!=null?B:0}),visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:u,outlineOpacity:l,outlineBlur:c,outlineWidth:d,outlineOffsetX:p,outlineOffsetY:m,strokeWidth:g,strokeOpacity:y,strokeColor:E,fillOpacity:b,hoverColor:v,rotation:D,content:M})}f();import pi from"zod";var P9="walls",P6=pi.object({type:pi.literal(P9).default(P9),color:pi.string().default("#ffffff"),topColor:pi.string().optional(),texture:pi.object({url:pi.string()}).or(pi.undefined()),topTexture:pi.object({url:pi.string()}).or(pi.undefined()),visible:pi.boolean().default(!0),height:pi.number().default(0),opacity:pi.number().default(1)}),_6=P6.partial(),xJe=pi.strictObject(P6.shape);function _9(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,height:a,opacity:u}=e;return Bn(P6,{visible:i,color:r,topColor:t,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0,height:a,opacity:u})}function O6(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}f();import{z as ru}from"zod";var F6="image3d",zee=ru.object({type:ru.literal(F6).default(F6),visible:ru.boolean().default(!0),opacity:ru.number().min(0).max(1).default(1),position:ru.custom(e=>e instanceof ke,{error:"Must be a Coordinate instance"}),width:ru.number().default(1),height:ru.number().default(1),rotation:ru.number().default(0),verticalOffset:ru.number().default(0),flipImagesToFaceCamera:ru.boolean().default(!1)}),O9=zee.partial();function F9(e){var t,n,o,i,a,u,l,c,d;let{position:r}=e;return{type:F6,visible:(t=e.visible)!=null?t:!0,opacity:(n=e.opacity)!=null?n:1,position:new ke({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}}f();import{z as Lt}from"zod";var B9="model",B6=TC.extend({type:Lt.literal(B9).default(B9),color:Lt.string().optional(),position:Lt.custom(e=>ke.is(e),{error:"Expected a Coordinate"}),visible:Lt.boolean().default(!0),rotation:Lt.tuple([Lt.number(),Lt.number(),Lt.number()]).default([0,0,0]),scale:Lt.tuple([Lt.number(),Lt.number(),Lt.number()]).default([1,1,1]),verticalOffset:Lt.number().default(0),opacity:Lt.number().default(1),material:Lt.record(Lt.string(),MC).optional(),interactive:Lt.boolean().default(!1),clippingPlaneZOffset:Lt.custom(e=>typeof e=="number"&&!Number.isNaN(e),{message:"Must be a valid number (including Infinity)"}).default(1/0),clippingPlaneTopColor:Lt.string().default("#E67B5B"),clippingPlaneTopVisible:Lt.boolean().default(!0)}),k9=B6.extend({scale:Lt.union([Lt.number(),Lt.tuple([Lt.number(),Lt.number(),Lt.number()])]),rotation:Lt.union([Lt.number(),Lt.tuple([Lt.number(),Lt.number(),Lt.number()])])}).partial(),OJe=Lt.strictObject(B6.shape);function L9(e){var b,v,D;let{color:r,position:t,rotation:n,scale:o,visible:i,interactive:a,opacity:u,material:l,verticalOffset:c,parent:d,clippingPlaneZOffset:p,clippingPlaneTopVisible:m}=e,g=typeof d=="object"?(b=d==null?void 0:d.id)==null?void 0:b.toString():d==null?void 0:d.toString(),y="".concat(Ua,"-"),E=g!=null&&g.startsWith(y)?g.slice(y.length):g;return Bn(B6,{color:r,position:new ke({latitude:(v=t==null?void 0:t[1])!=null?v:0,longitude:(D=t==null?void 0:t[0])!=null?D:0,verticalOffset:t==null?void 0:t[2],floorId:E}),rotation:n,scale:o,visible:i,interactive:a,opacity:u,material:l,verticalOffset:c,clippingPlaneZOffset:p,clippingPlaneTopVisible:m})}f();f();f();var uh=Dl(TL());uh.registerHelper({});uh.registerPartial({});var ML=uh.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 vre=30,wL=new Set(["annotation"]);function xre(e){var r,t;return ML({size:vre,icon:(t=(r=e.icon)==null?void 0:r.url)!=null?t:"",name:e.name})}function Ere(e={}){return k({rank:"high",placement:["center"],interactive:!0},e)}function Ire(e,r){return r.Markers.add(e.coordinate,xre(e),Ere())}function AL(e,r){let t=[];for(let n of r)Hu(n)&&$a.is(n)&&n.icon!=null&&typeof n.icon.url=="string"&&n.icon.url.length>0&&t.push(Ire(n,e));return t}f();var PL=new Set(["space","object"]);function _L(e,r){r.forEach(t=>{jO(t)&&e.updateState(t,{interactive:!0})})}f();f();function OL(e){return Hu(e)?"anchorTarget"in e&&e.anchorTarget!=null:!1}f();f();var{entries:zL,setPrototypeOf:FL,isFrozen:Sre,getPrototypeOf:Cre,getOwnPropertyDescriptor:Dre}=Object,{freeze:Uo,seal:Ia,create:$L}=Object,{apply:iD,construct:aD}=typeof Reflect<"u"&&Reflect;Uo||(Uo=function(r){return r});Ia||(Ia=function(r){return r});iD||(iD=function(r,t,n){return r.apply(t,n)});aD||(aD=function(r,t){return new r(...t)});var F3=Go(Array.prototype.forEach),Tre=Go(Array.prototype.lastIndexOf),BL=Go(Array.prototype.pop),Ny=Go(Array.prototype.push),Mre=Go(Array.prototype.splice),k3=Go(String.prototype.toLowerCase),eD=Go(String.prototype.toString),kL=Go(String.prototype.match),jy=Go(String.prototype.replace),wre=Go(String.prototype.indexOf),Are=Go(String.prototype.trim),ps=Go(Object.prototype.hasOwnProperty),jo=Go(RegExp.prototype.test),Uy=Pre(TypeError);function Go(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 iD(e,r,n)}}function Pre(e){return function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return aD(e,t)}}function bt(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k3;FL&&FL(e,null);let n=r.length;for(;n--;){let o=r[n];if(typeof o=="string"){let i=t(o);i!==o&&(Sre(r)||(r[n]=i),o=i)}e[o]=!0}return e}function _re(e){for(let r=0;r<e.length;r++)ps(e,r)||(e[r]=null);return e}function El(e){let r=$L(null);for(let[t,n]of zL(e))ps(e,t)&&(Array.isArray(n)?r[t]=_re(n):n&&typeof n=="object"&&n.constructor===Object?r[t]=El(n):r[t]=n);return r}function Gy(e,r){for(;e!==null;){let n=Dre(e,r);if(n){if(n.get)return Go(n.get);if(typeof n.value=="function")return Go(n.value)}e=Cre(e)}function t(){return null}return t}var LL=Uo(["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"]),tD=Uo(["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"]),rD=Uo(["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"]),Ore=Uo(["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"]),nD=Uo(["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"]),Fre=Uo(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RL=Uo(["#text"]),NL=Uo(["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"]),oD=Uo(["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"]),jL=Uo(["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"]),B3=Uo(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Bre=Ia(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kre=Ia(/<%[\w\W]*|[\w\W]*%>/gm),Lre=Ia(/\$\{[\w\W]*/gm),Rre=Ia(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nre=Ia(/^aria-[\-\w]+$/),VL=Ia(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jre=Ia(/^(?:\w+script|data):/i),Ure=Ia(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),HL=Ia(/^html$/i),Gre=Ia(/^[a-z][.\w]*(-[.\w]+)+$/i),UL=Object.freeze({__proto__:null,ARIA_ATTR:Nre,ATTR_WHITESPACE:Ure,CUSTOM_ELEMENT:Gre,DATA_ATTR:Rre,DOCTYPE_NAME:HL,ERB_EXPR:kre,IS_ALLOWED_URI:VL,IS_SCRIPT_OR_DATA:jre,MUSTACHE_EXPR:Bre,TMPLIT_EXPR:Lre}),zy={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zre=function(){return typeof window>"u"?null:window},$re=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}},GL=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ZL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zre(),r=Ze=>ZL(Ze);if(r.version="3.2.6",r.removed=[],!e||!e.document||e.document.nodeType!==zy.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:p,DOMParser:m,trustedTypes:g}=e,y=l.prototype,E=Gy(y,"cloneNode"),b=Gy(y,"remove"),v=Gy(y,"nextSibling"),D=Gy(y,"childNodes"),M=Gy(y,"parentNode");if(typeof a=="function"){let Ze=t.createElement("template");Ze.content&&Ze.content.ownerDocument&&(t=Ze.content.ownerDocument)}let T,B="",{implementation:G,createNodeIterator:_,createDocumentFragment:F,getElementsByTagName:A}=t,{importNode:j}=n,N=GL();r.isSupported=typeof zL=="function"&&typeof M=="function"&&G&&G.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Z,ERB_EXPR:ie,TMPLIT_EXPR:de,DATA_ATTR:J,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:ee}=UL,{IS_ALLOWED_URI:ce}=UL,ye=null,Ce=bt({},[...LL,...tD,...rD,...nD,...RL]),Pe=null,Le=bt({},[...NL,...oD,...jL,...B3]),be=Object.seal($L(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}})),He=null,tt=null,lt=!0,U=!0,ve=!1,Y=!0,we=!1,De=!0,xe=!1,Ne=!1,Rt=!1,Ht=!1,Zt=!1,Wt=!1,Rr=!0,qr=!1,go="user-content-",yo=!0,qn=!1,yr={},Cn=null,$o=bt({},["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"]),fi=null,bo=bt({},["audio","video","img","source","image","track"]),br=null,H=bt({},["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",P="http://www.w3.org/1999/xhtml",L=P,R=!1,K=null,re=bt({},[S,C,P],eD),fe=bt({},["mi","mo","mn","ms","mtext"]),ae=bt({},["annotation-xml"]),Te=bt({},["title","style","font","a","script"]),ne=null,me=["application/xhtml+xml","text/html"],Ae="text/html",je=null,he=null,Se=t.createElement("form"),Fe=function(q){return q instanceof RegExp||q instanceof Function},Ft=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(he&&he===q)){if((!q||typeof q!="object")&&(q={}),q=El(q),ne=me.indexOf(q.PARSER_MEDIA_TYPE)===-1?Ae:q.PARSER_MEDIA_TYPE,je=ne==="application/xhtml+xml"?eD:k3,ye=ps(q,"ALLOWED_TAGS")?bt({},q.ALLOWED_TAGS,je):Ce,Pe=ps(q,"ALLOWED_ATTR")?bt({},q.ALLOWED_ATTR,je):Le,K=ps(q,"ALLOWED_NAMESPACES")?bt({},q.ALLOWED_NAMESPACES,eD):re,br=ps(q,"ADD_URI_SAFE_ATTR")?bt(El(H),q.ADD_URI_SAFE_ATTR,je):H,fi=ps(q,"ADD_DATA_URI_TAGS")?bt(El(bo),q.ADD_DATA_URI_TAGS,je):bo,Cn=ps(q,"FORBID_CONTENTS")?bt({},q.FORBID_CONTENTS,je):$o,He=ps(q,"FORBID_TAGS")?bt({},q.FORBID_TAGS,je):El({}),tt=ps(q,"FORBID_ATTR")?bt({},q.FORBID_ATTR,je):El({}),yr=ps(q,"USE_PROFILES")?q.USE_PROFILES:!1,lt=q.ALLOW_ARIA_ATTR!==!1,U=q.ALLOW_DATA_ATTR!==!1,ve=q.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=q.SAFE_FOR_TEMPLATES||!1,De=q.SAFE_FOR_XML!==!1,xe=q.WHOLE_DOCUMENT||!1,Ht=q.RETURN_DOM||!1,Zt=q.RETURN_DOM_FRAGMENT||!1,Wt=q.RETURN_TRUSTED_TYPE||!1,Rt=q.FORCE_BODY||!1,Rr=q.SANITIZE_DOM!==!1,qr=q.SANITIZE_NAMED_PROPS||!1,yo=q.KEEP_CONTENT!==!1,qn=q.IN_PLACE||!1,ce=q.ALLOWED_URI_REGEXP||VL,L=q.NAMESPACE||P,fe=q.MATHML_TEXT_INTEGRATION_POINTS||fe,ae=q.HTML_INTEGRATION_POINTS||ae,be=q.CUSTOM_ELEMENT_HANDLING||{},q.CUSTOM_ELEMENT_HANDLING&&Fe(q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),q.CUSTOM_ELEMENT_HANDLING&&Fe(q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(be.allowCustomizedBuiltInElements=q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(U=!1),Zt&&(Ht=!0),yr&&(ye=bt({},RL),Pe=[],yr.html===!0&&(bt(ye,LL),bt(Pe,NL)),yr.svg===!0&&(bt(ye,tD),bt(Pe,oD),bt(Pe,B3)),yr.svgFilters===!0&&(bt(ye,rD),bt(Pe,oD),bt(Pe,B3)),yr.mathMl===!0&&(bt(ye,nD),bt(Pe,jL),bt(Pe,B3))),q.ADD_TAGS&&(ye===Ce&&(ye=El(ye)),bt(ye,q.ADD_TAGS,je)),q.ADD_ATTR&&(Pe===Le&&(Pe=El(Pe)),bt(Pe,q.ADD_ATTR,je)),q.ADD_URI_SAFE_ATTR&&bt(br,q.ADD_URI_SAFE_ATTR,je),q.FORBID_CONTENTS&&(Cn===$o&&(Cn=El(Cn)),bt(Cn,q.FORBID_CONTENTS,je)),yo&&(ye["#text"]=!0),xe&&bt(ye,["html","head","body"]),ye.table&&(bt(ye,["tbody"]),delete He.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=q.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=$re(g,o)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));Uo&&Uo(q),he=q}},Vr=bt({},[...tD,...rD,...Ore]),vr=bt({},[...nD,...Fre]),Jr=function(q){let Me=M(q);(!Me||!Me.tagName)&&(Me={namespaceURI:L,tagName:"template"});let $e=k3(q.tagName),Cr=k3(Me.tagName);return K[q.namespaceURI]?q.namespaceURI===C?Me.namespaceURI===P?$e==="svg":Me.namespaceURI===S?$e==="svg"&&(Cr==="annotation-xml"||fe[Cr]):!!Vr[$e]:q.namespaceURI===S?Me.namespaceURI===P?$e==="math":Me.namespaceURI===C?$e==="math"&&ae[Cr]:!!vr[$e]:q.namespaceURI===P?Me.namespaceURI===C&&!ae[Cr]||Me.namespaceURI===S&&!fe[Cr]?!1:!vr[$e]&&(Te[$e]||!Vr[$e]):!!(ne==="application/xhtml+xml"&&K[q.namespaceURI]):!1},Yt=function(q){Ny(r.removed,{element:q});try{M(q).removeChild(q)}catch(Me){b(q)}},sn=function(q,Me){try{Ny(r.removed,{attribute:Me.getAttributeNode(q),from:Me})}catch($e){Ny(r.removed,{attribute:null,from:Me})}if(Me.removeAttribute(q),q==="is")if(Ht||Zt)try{Yt(Me)}catch($e){}else try{Me.setAttribute(q,"")}catch($e){}},un=function(q){let Me=null,$e=null;if(Rt)q="<remove></remove>"+q;else{let ln=kL(q,/^[\r\n\t ]+/);$e=ln&&ln[0]}ne==="application/xhtml+xml"&&L===P&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");let Cr=T?T.createHTML(q):q;if(L===P)try{Me=new m().parseFromString(Cr,ne)}catch(ln){}if(!Me||!Me.documentElement){Me=G.createDocument(L,"template",null);try{Me.documentElement.innerHTML=R?B:Cr}catch(ln){}}let Jn=Me.body||Me.documentElement;return q&&$e&&Jn.insertBefore(t.createTextNode($e),Jn.childNodes[0]||null),L===P?A.call(Me,xe?"html":"body")[0]:xe?Me.documentElement:Jn},Vo=function(q){return _.call(q.ownerDocument||q,q,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},vo=function(q){return q instanceof p&&(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")},Ho=function(q){return typeof u=="function"&&q instanceof u};function Hr(Ze,q,Me){F3(Ze,$e=>{$e.call(r,q,Me,he)})}let Li=function(q){let Me=null;if(Hr(N.beforeSanitizeElements,q,null),vo(q))return Yt(q),!0;let $e=je(q.nodeName);if(Hr(N.uponSanitizeElement,q,{tagName:$e,allowedTags:ye}),De&&q.hasChildNodes()&&!Ho(q.firstElementChild)&&jo(/<[/\w!]/g,q.innerHTML)&&jo(/<[/\w!]/g,q.textContent)||q.nodeType===zy.progressingInstruction||De&&q.nodeType===zy.comment&&jo(/<[/\w]/g,q.data))return Yt(q),!0;if(!ye[$e]||He[$e]){if(!He[$e]&&Xy($e)&&(be.tagNameCheck instanceof RegExp&&jo(be.tagNameCheck,$e)||be.tagNameCheck instanceof Function&&be.tagNameCheck($e)))return!1;if(yo&&!Cn[$e]){let Cr=M(q)||q.parentNode,Jn=D(q)||q.childNodes;if(Jn&&Cr){let ln=Jn.length;for(let Zo=ln-1;Zo>=0;--Zo){let au=E(Jn[Zo],!0);au.__removalCount=(q.__removalCount||0)+1,Cr.insertBefore(au,v(q))}}}return Yt(q),!0}return q instanceof l&&!Jr(q)||($e==="noscript"||$e==="noembed"||$e==="noframes")&&jo(/<\/no(script|embed|frames)/i,q.innerHTML)?(Yt(q),!0):(we&&q.nodeType===zy.text&&(Me=q.textContent,F3([Z,ie,de],Cr=>{Me=jy(Me,Cr," ")}),q.textContent!==Me&&(Ny(r.removed,{element:q.cloneNode()}),q.textContent=Me)),Hr(N.afterSanitizeElements,q,null),!1)},Sl=function(q,Me,$e){if(Rr&&(Me==="id"||Me==="name")&&($e in t||$e in Se))return!1;if(!(U&&!tt[Me]&&jo(J,Me))){if(!(lt&&jo(z,Me))){if(!Pe[Me]||tt[Me]){if(!(Xy(q)&&(be.tagNameCheck instanceof RegExp&&jo(be.tagNameCheck,q)||be.tagNameCheck instanceof Function&&be.tagNameCheck(q))&&(be.attributeNameCheck instanceof RegExp&&jo(be.attributeNameCheck,Me)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(Me))||Me==="is"&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&jo(be.tagNameCheck,$e)||be.tagNameCheck instanceof Function&&be.tagNameCheck($e))))return!1}else if(!br[Me]){if(!jo(ce,jy($e,W,""))){if(!((Me==="src"||Me==="xlink:href"||Me==="href")&&q!=="script"&&wre($e,"data:")===0&&fi[q])){if(!(ve&&!jo(X,jy($e,W,"")))){if($e)return!1}}}}}}return!0},Xy=function(q){return q!=="annotation-xml"&&kL(q,ee)},Yy=function(q){Hr(N.beforeSanitizeAttributes,q,null);let{attributes:Me}=q;if(!Me||vo(q))return;let $e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pe,forceKeepAttr:void 0},Cr=Me.length;for(;Cr--;){let Jn=Me[Cr],{name:ln,namespaceURI:Zo,value:au}=Jn,hh=je(ln),U3=au,Kn=ln==="value"?U3:Are(U3);if($e.attrName=hh,$e.attrValue=Kn,$e.keepAttr=!0,$e.forceKeepAttr=void 0,Hr(N.uponSanitizeAttribute,q,$e),Kn=$e.attrValue,qr&&(hh==="id"||hh==="name")&&(sn(ln,q),Kn=go+Kn),De&&jo(/((--!?|])>)|<\/(style|title)/i,Kn)){sn(ln,q);continue}if($e.forceKeepAttr)continue;if(!$e.keepAttr){sn(ln,q);continue}if(!Y&&jo(/\/>/i,Kn)){sn(ln,q);continue}we&&F3([Z,ie,de],hD=>{Kn=jy(Kn,hD," ")});let mD=je(q.nodeName);if(!Sl(mD,hh,Kn)){sn(ln,q);continue}if(T&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Zo)switch(g.getAttributeType(mD,hh)){case"TrustedHTML":{Kn=T.createHTML(Kn);break}case"TrustedScriptURL":{Kn=T.createScriptURL(Kn);break}}if(Kn!==U3)try{Zo?q.setAttributeNS(Zo,ln,Kn):q.setAttribute(ln,Kn),vo(q)?Yt(q):BL(r.removed)}catch(hD){sn(ln,q)}}Hr(N.afterSanitizeAttributes,q,null)},j3=function Ze(q){let Me=null,$e=Vo(q);for(Hr(N.beforeSanitizeShadowDOM,q,null);Me=$e.nextNode();)Hr(N.uponSanitizeShadowNode,Me,null),Li(Me),Yy(Me),Me.content instanceof i&&Ze(Me.content);Hr(N.afterSanitizeShadowDOM,q,null)};return r.sanitize=function(Ze){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=null,$e=null,Cr=null,Jn=null;if(R=!Ze,R&&(Ze="<!-->"),typeof Ze!="string"&&!Ho(Ze))if(typeof Ze.toString=="function"){if(Ze=Ze.toString(),typeof Ze!="string")throw Uy("dirty is not a string, aborting")}else throw Uy("toString is not a function");if(!r.isSupported)return Ze;if(Ne||Ft(q),r.removed=[],typeof Ze=="string"&&(qn=!1),qn){if(Ze.nodeName){let au=je(Ze.nodeName);if(!ye[au]||He[au])throw Uy("root node is forbidden and cannot be sanitized in-place")}}else if(Ze instanceof u)Me=un("<!---->"),$e=Me.ownerDocument.importNode(Ze,!0),$e.nodeType===zy.element&&$e.nodeName==="BODY"||$e.nodeName==="HTML"?Me=$e:Me.appendChild($e);else{if(!Ht&&!we&&!xe&&Ze.indexOf("<")===-1)return T&&Wt?T.createHTML(Ze):Ze;if(Me=un(Ze),!Me)return Ht?null:Wt?B:""}Me&&Rt&&Yt(Me.firstChild);let ln=Vo(qn?Ze:Me);for(;Cr=ln.nextNode();)Li(Cr),Yy(Cr),Cr.content instanceof i&&j3(Cr.content);if(qn)return Ze;if(Ht){if(Zt)for(Jn=F.call(Me.ownerDocument);Me.firstChild;)Jn.appendChild(Me.firstChild);else Jn=Me;return(Pe.shadowroot||Pe.shadowrootmode)&&(Jn=j.call(n,Jn,!0)),Jn}let Zo=xe?Me.outerHTML:Me.innerHTML;return xe&&ye["!doctype"]&&Me.ownerDocument&&Me.ownerDocument.doctype&&Me.ownerDocument.doctype.name&&jo(HL,Me.ownerDocument.doctype.name)&&(Zo="<!DOCTYPE "+Me.ownerDocument.doctype.name+">\n"+Zo),we&&F3([Z,ie,de],au=>{Zo=jy(Zo,au," ")}),T&&Wt?T.createHTML(Zo):Zo},r.setConfig=function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ft(Ze),Ne=!0},r.clearConfig=function(){he=null,Ne=!1},r.isValidAttribute=function(Ze,q,Me){he||Ft({});let $e=je(Ze),Cr=je(q);return Sl($e,Cr,Me)},r.addHook=function(Ze,q){typeof q=="function"&&Ny(N[Ze],q)},r.removeHook=function(Ze,q){if(q!==void 0){let Me=Tre(N[Ze],q);return Me===-1?void 0:Mre(N[Ze],Me,1)[0]}return BL(N[Ze])},r.removeHooks=function(Ze){N[Ze]=[]},r.removeAllHooks=function(){N=GL()},r}var WL=ZL();var Vre={"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>'},Hre=/<svg([^>]*)>/g;function XL(e,r,t){let n=Vre[e];return n?n.replace(Hre,'<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):null}function Zre(e){return WL.sanitize(e,{USE_PROFILES:{svg:!0}})}function Wre(e,r){let o=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;return o==null||o.tagName==="parsererror"||o.tagName.toLowerCase()!=="svg"?(V.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 YL(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=Zre(i),(r==null?void 0:r.color)!=null&&(t=Wre(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 V.error("Failed to fetch icon from ".concat(e,"."),n),null}}f();function qL(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Restroom")))}function JL(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Parking")))}var QL=new Set(["connection","point-of-interest","space","object","door","facade"]),mp={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},lh={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 Xre(e){let r=null;if(Hn.is(e))switch(e.type){case"elevator":r=lh.elevator;break;case"ladder":r=lh.ladder;break;case"escalator":case"stairs":default:r=lh.stairs}else Ai.is(e)?r=lh.point:Mo.is(e)?r=lh.door:Pn.is(e)&&(r=lh.building);return r!=null?XL(r,"#FFFFFF",12):null}function KL(e){return Hn.is(e)?mp.connection:Pn.is(e)?mp.default:qL(e)?mp.washroom:JL(e)?mp.parking:Ai.is(e)?mp.point:Mo.is(e)?mp.door:mp.default}async function Yre(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 YL(n.url,{color:r.color,style:"fill"})),t==null){let i=Xre(e);i!=null&&(t={icon:i,type:"svg"})}return t}function qre(e){return Hn.is(e)||Mo.is(e)?"low":Ai.is(e)||Pn.is(e)?"high":"medium"}async function Jre(e){let r={appearance:{color:KL(e),pinOutlineColor:KL(e),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:qre(e),interactive:!0},t=await Yre(e,{color:"#FFFFFF"});return t!=null&&(r.appearance.icon=t.icon,t.type==="svg"?Pn.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 eR(e,r){return(await Promise.all(r.map(async n=>{let o=[];if(!Hu(n))return o;let i=await Jre(n);return Hn.is(n)?o=n.coordinates.map(a=>e.Labels.add(a,n.name,i)):Pn.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)):OL(n)&&hS(n)&&o.push(e.Labels.add(n,n.name,i)),o}))).flat()}async function tR(e,r){let t=e.getMapDataInternal();if(!t)throw new Error("Map data not found");let n=t.getAllOfTypes(QL,r),o=t.getAllOfTypes(wL,r),i=t.getAllOfTypes(PL,r),[a,u]=await Promise.all([n.length>0?eR(e,n):[],o.length>0?AL(e,o):[],i.length>0?_L(e,i):[]]);return{labels:a,markers:u}}var L3=.05,Vy,Hy,$y=class extends Xe{constructor(t,n,o){super();h(this,"core");h(this,"mapObjects",[]);h(this,"id");h(this,"mapDataExternal",{});h(this,"mapsByFloorId",{});h(this,"mapData");h(this,"currentMap");h(this,"hiddenOutdoorGeometries",[]);h(this,"lastFacadeIntersected");w(this,Vy,!1);w(this,Hy,!1);h(this,"mapView");h(this,"externalPubSub");h(this,"Camera");h(this,"Labels");h(this,"Text3D");h(this,"Markers");h(this,"Models");h(this,"Paths");h(this,"Exporter");h(this,"Navigation");h(this,"Outdoor");h(this,"Shapes");h(this,"Style");h(this,"Image3D");h(this,"update",()=>{this.core.render()});this.core=t,this.mapView=n,this.externalPubSub=o,this.Camera=new uy(this),this.id=this.core.addGroupContainer("root").id.toString();let i=new gy("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 bD(d instanceof Error?d.message:"Unknown error")})},{signal:this.signal});let a=d=>{let p=d;d.startsWith("".concat(Mr,"-"))&&(p=d.slice(Mr.length+1));let m=this.getMapDataObject(p);switch(m==null?void 0:m.__type){case"facade":return m;case"floor":return m.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let p=new Set;for(let m of d){let g=a(m);g&&p.add(g)}o.publish("facades-in-view-change",{facades:Array.from(p)})},{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 ry(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",R4(d,this.core.convert3DMapPositionToCoordinate))},{signal:this.signal});let l=d=>p=>{let m=[],g=[],y=[],E=[];p.labels.forEach(_=>{let F=this.Labels.getById(_.toString());F&&m.push(F.label)}),p.markers.forEach(_=>{let F=this.Markers.getById(_.toString())||this.Navigation.getMarkerById(_.toString());F&&g.push(F.marker)}),p.models.forEach(_=>{let F=this.Models.getById(_.toString());F&&y.push(F.model)}),p.paths.forEach(_=>{let F=this.Paths.getById(_.toString());F&&E.push(F)});let b=p.geometry,v;b.length>0&&(v=b.map(_=>{var F;return(F=this.getMapDataInternal())==null?void 0:F.getById("space",_)}).filter(Boolean)[0],v||(v=b.map(_=>{var F;return(F=this.getMapDataInternal())==null?void 0:F.getById("object",_)}).filter(Boolean)[0]),v||(v=b.map(_=>{var F;return(F=this.getMapDataInternal())==null?void 0:F.getById("area",_)}).filter(Boolean)[0]),v||(v=b.map(_=>this.Shapes.getById(_)).filter(Boolean)[0]));let D=p.containers.reduce((_,F)=>{var j;let A=(j=this.getMapDataInternal())==null?void 0:j.getById("floor",F);return A&&oi.is(A)&&_.push(A),_},[]),M,T=0;if(D.length>0){M=D[0].id;let _=this.core.getState(M);T=p.coordinate[2]?p.coordinate[2]-_.altitude:T}let B;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(_=>{this.core.setState(_.id,{hovered:!1})}),v&&Lr.is(v)&&(B=b.map(_=>{var F;return(F=this.getMapDataInternal())==null?void 0:F.facadesBySpaceId[_]}).filter(Boolean)[0],B&&B.spaces.forEach(_=>{this.core.setState(_.id,{hovered:!0})})),this.lastFacadeIntersected=B;let G={coordinate:new ke({latitude:p.coordinate[1],longitude:p.coordinate[0],floorId:M,verticalOffset:T}),spaces:v&&Lr.is(v)?[v]:[],objects:v&&ii.is(v)?[v]:[],areas:v&&ua.is(v)?[v]:[],shapes:v&&ll.is(v)?[v]:[],markers:g,labels:m,models:y,paths:E,floors:D,facades:B?[B]:[]};"pointerEvent"in p&&(G.pointerEvent=p.pointerEvent),o.publish(d,G)};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,mapDataInternalGetter:()=>{var d;return(d=this.mapData)==null?void 0:d.internal}};this.Markers=new yy(c),this.Models=new Ey(c),this.Labels=new dy(c),this.Text3D=new Oy(c),this.Exporter=new cy(c),this.Paths=new Cy(c),this.Navigation=new sy(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 ah(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 vy(c),this.Shapes=new Ty(c),this.Style=new wy(c)}get manualFloorVisibility(){return s(this,Vy)}set manualFloorVisibility(t){O(this,Vy,t),this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:t})}get hidePathsNotOnCurrentFloor(){return s(this,Hy)}set hidePathsNotOnCurrentFloor(t){var n;O(this,Hy,t),(n=this.currentMap)==null||n.updateOutdoorPathLayerVisibility()}preloadFloors(t){t.forEach(n=>{n instanceof oi&&this.core.setState(n.id,{preloadGeometry:!0})})}updateState(t,n){var a,u,c,d,p,m,g,y;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(E=>{let b=E.layers.get(Mr);if(b){let v=b.layers.get(ec);v&&this.core.hasState(v)&&this.core.setState(v,O6(Vt(_6,n,{warn:!0,disableValidation:o}),this.core.getState(v)))}});return}if(t==="exterior-walls"){this.currentMap.floors.forEach(E=>{let b=E.layers.get(Mr);if(b){let v=b.layers.get(js);v&&this.core.hasState(v)&&this.core.setState(v,O6(Vt(_6,n,{warn:!0,disableValidation:o}),this.core.getState(v)))}});return}if(t==="interior-doors"){this.currentMap.floors.forEach(E=>{let b=E.layers.get(Mr);if(b){let v=b.layers.get(kf);v&&this.core.hasState(v)&&this.core.setState(v,o3(Vt(n3,n,{warn:!0,disableValidation:o}),this.core.getState(v)))}});return}if(t==="exterior-doors"){this.currentMap.floors.forEach(E=>{let b=E.layers.get(Mr);if(b){let v=b.layers.get(Lf);v&&this.core.hasState(v)&&this.core.setState(v,o3(Vt(n3,n,{warn:!0,disableValidation:o}),this.core.getState(v)))}});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(i.__type!==os.__type&&!this.core.hasState(i.id)){V.warn('Failed to update state for "'.concat(i.id,'". No ').concat(i.__type," found with that ID."));return}if(ul.is(i))return this.core.setState(i.id,b9(Vt(g9,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(Js.is(i))return this.core.setState(i.id,E9(Vt(v9,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(Lr.is(i)||ii.is(i)){let E=this.core.getState(i.id);E!=null&&this.core.setState(i.id,h9(Vt(D6,n,{warn:!0,disableValidation:o}),E))}if(ua.is(i)&&this.core.setState(i.id,Vt(D6,n,{warn:!0,disableValidation:o})),wi.is(i)&&this.core.setState(i.id,Vt(O9,n,{warn:!0,disableValidation:o})),Mo.is(i)&&this.core.setState(i.id,o3(Vt(n3,n,{warn:!0,disableValidation:o}),this.core.getState(i.id))),ll.is(i)&&this.core.setState(i.id,C9(Vt(A6,n,{warn:!0,disableValidation:o}))),op.is(i)){let l=Vt(k9,n,{warn:!0,disableValidation:o}),{position:E,scale:b,rotation:v}=l,M=Zr(l,["position","scale","rotation"]);E&&(M.position=[E.longitude,E.latitude,E.verticalOffset]),b!=null&&(Array.isArray(b)?M.scale=b:M.scale=[b,b,b]),v!=null&&(Array.isArray(v)?M.rotation=v:M.rotation=[v,v,v]),E&&i.updateTarget(E),this.core.setState(i.id,M)}if(oi.is(i)){let E=this.currentMap.floorsById.get(i.id);if(E==null)return;let b=Vt(d9,n,{warn:!0,disableValidation:o});this.core.setState(i.id,b);let v=E.layers.get(Mr);if(v!=null&&"geometry"in n&&n.geometry){this.core.setState(v.containerId,Vt(r9,n.geometry,{warn:!0,disableValidation:o}));for(let A of v.layers.keys())this.core.setState(v.layers.get(A),{maskId:(c=n.geometry.maskId)!=null?c:void 0,maskEffect:(d=n.geometry.maskEffect)!=null?d:void 0,maskMode:(p=n.geometry.maskMode)!=null?p:void 0,maskEnabled:(m=n.geometry.maskEnabled)!=null?m:void 0,overlayStrength:(g=n.geometry.overlayStrength)!=null?g:void 0,overlayColor:(y=n.geometry.overlayColor)!=null?y:void 0})}let D=E.layers.get(Us);if(D!=null&&"labels"in n&&n.labels){let A=Vt(n9,n.labels,{warn:!0,disableValidation:o});"enabled"in A&&typeof A.enabled=="boolean"&&D.setVisible(A.enabled)}let M=E.layers.get(ja);if(M!=null&&"markers"in n&&n.markers){let A=Vt(o9,n.markers,{warn:!0,disableValidation:o});"enabled"in A&&typeof A.enabled=="boolean"&&M.setVisible(A.enabled)}if(E.footprintObject&&"footprint"in n&&n.footprint){let A=Vt(dp,n.footprint,{warn:!0,disableValidation:o});E.footprintObject.update({altitude:A.altitude,visible:A.visible,height:A.height,opacity:A.opacity,side:A.side,color:A.color,ceilingVisible:A.ceilingVisible,ceilingThickness:A.ceilingThickness,basementMaskEnabled:A.basementMaskEnabled,outline:A.outline})}if(E.gapFootprintObject&&"visible"in n){let A={visible:n.visible};if("footprint"in n&&n.footprint){let j=Vt(dp,n.footprint,{warn:!0,disableValidation:o});j.color!==void 0&&(A.color=j.color),j.opacity!==void 0&&(A.opacity=j.opacity),j.outline!==void 0&&(A.outline=j.outline)}E.gapFootprintObject.update(A)}let T=E.layers.get(cd);if(T!=null&&"occlusion"in n&&n.occlusion){let A=Vt(a9,n.occlusion,{warn:!0,disableValidation:o});"enabled"in A&&typeof A.enabled=="boolean"&&T.setVisible(A.enabled)}let B=E.layers.get(Rf);if(B!=null&&"images"in n&&n.images){let A=Vt(i9,n.images,{warn:!0,disableValidation:o});if("visible"in A&&typeof A.visible=="boolean"&&B.setVisible(A.visible),"collisionsEnabled"in A&&typeof A.collisionsEnabled=="boolean"&&v!=null)for(let j of v.layers.values()){let N=this.core.getState(j);if(N!=null&&N.children)for(let Z of N.children)this.core.setState(Z,{enableImageCollisions:A.collisionsEnabled})}}let G=E.layers.get(Gs);if(G!=null&&"paths"in n&&n.paths!=null){let A=Vt(s9,n.paths,{warn:!0,disableValidation:o});A.visible!=null&&typeof A.visible=="boolean"&&G.setVisible(A.visible)}let _=E.layers.get(dd);if(_!=null&&"areas"in n&&n.areas!=null){let A=Vt(u9,n.areas,{warn:!0,disableValidation:o});A.visible!=null&&typeof A.visible=="boolean"&&_.setVisible(A.visible)}let F=E.layers.get(Ua);if(F!=null&&"models"in n&&n.models!=null){let A=Vt(c9,n.models,{warn:!0,disableValidation:o});A.visible!=null&&typeof A.visible=="boolean"&&F.setVisible(A.visible)}if("text3d"in n&&n.text3d!=null){let A=Vt(l9,n.text3d,{warn:!0,disableValidation:o});A.visible!=null&&E.setBatchedTextVisible(A.visible)}}if(Pn.is(i)){let E=this.core.getState(i.id);for(let b of E.children)b.type==="group-container"&&this.core.setState(b.id,Vt(Hk,n,{warn:!0,disableValidation:o}))}if(cl.is(i)&&this.core.setState(i.id,Vt(w9,n,{warn:!0,disableValidation:o})),os.is(i)){let E=Vt(v6,n,{warn:!0,disableValidation:o}),b=oh(E);for(let v of i.segments)this.core.setState(v.id,b)}if(Dc.is(i)){let E=Vt(v6,n,{warn:!0,disableValidation:o}),b=oh(E);this.core.setState(i.id,b)}}}getMapDataObject(t){var n;return(n=this.getMapDataInternal())==null?void 0:n.getMapDataById(t)}getMapDataInternal(){if(this.mapData)return Bh(this.mapData)}getMapData(){return this.mapData}addMap(t,n){return new Promise(o=>{var p,m,g,y;let i;try{i=Bh(t)}catch(E){V.error("Error adding map",E),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 ke(u[1],u[0])});let l=a["manifest.geojson"].features[0].properties.name,c=new gy("mapObject-".concat(l),i,n,this);this.currentMap=c,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId),this.core.renderSync();let d=(m=(p=n==null?void 0:n.outdoorView)==null?void 0:p.layersHiddenByGeometry)!=null?m:[];if(d.length>0){let E=[];for(let b of c.floorStacksById.values())b.isOutdoors===!1&&b.defaultFloor.footprint&&b.defaultFloor.footprint.geometry!=null&&((g=b.defaultFloor.footprint.geometry)==null?void 0:g.coordinates.length)>0&&E.push(b.defaultFloor.footprint);E.length>0&&(this.core.hideOutdoorLayersIntersectingPolygons(E,d),this.hiddenOutdoorGeometries.push([E,d]))}if(this.mapObjects.push(c),i.getMVFFeatureByType("floor").forEach(E=>{this.mapsByFloorId[E.id]=c}),c.on("floor-change-start",E=>{var b,v,D,M;this.externalPubSub.publish("floor-change-start",{reason:E.reason,floor:(v=(b=this.getMapDataInternal())==null?void 0:b.getById("floor",E.floorId))!=null?v:this.currentFloor,previousFloor:(M=(D=this.getMapDataInternal())==null?void 0:D.getById("floor",E.previousFloorId))!=null?M:this.currentFloor})},{signal:this.signal}),c.on("floor-change",E=>{var b,v;this.externalPubSub.publish("floor-change",{reason:E.reason,floor:this.currentFloor,previousFloor:(v=(b=this.getMapDataInternal())==null?void 0:b.getById("floor",E.previousFloorId))!=null?v: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 E=(y=n==null?void 0:n.screenOffsets)!=null?y:{top:L3*this.core.canvasHeight,left:L3*this.core.canvasWidth,right:L3*this.core.canvasWidth,bottom:L3*this.core.canvasHeight};this.Camera.focusOn(this.currentFloor,{duration:UO,screenOffsets:E}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),o(t)})}else o(t)})}setFloor(t,n){return this.currentMap.setFloor(M0(t),n)}setFloorStack(t,n){return this.currentMap.setFloorStack(M0(t),n)}updateWatermark(t){this.core.updateWatermark(t)}get currentFloorStack(){var o;let t=this.currentMap.currentFloorStack.id;if(!t)throw new Kr("Missing currentFloorStack.");let n=(o=this.mapData)==null?void 0:o.getById("floor-stack",t);if(!n)throw new Kr("FloorStack was not found in map data.");return n}get currentFloor(){var o;let t=this.currentMap.currentFloor.id;if(!t)throw new Kr("Missing currentFloor object from GeoJsonApi");let n=(o=this.mapData)==null?void 0:o.getById("floor",t);if(!n)throw new Kr("Missing currentFloor");return n}getState(t){var i,a;typeof t=="object"&&os.is(t)&&V.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let n=HS(t,this),o=this.core.getState(n);if(o){if(["interior-walls","exterior-walls"].includes(t)&&o.type==="geometry-group")return _9(o);if(["interior-doors","exterior-doors"].includes(t)&&o.type==="geometry-group")return $k(o);if(o.type==="geometry")return m9(o);if(o.type==="label"&&o.options.appearance&&o.options.rank!==void 0&&o.options.interactive!==void 0)return y9(o);if(o.type==="marker"&&((i=o.options)==null?void 0:i.rank)!==void 0&&o.options.interactive!==void 0)return x9(o,(a=this.Markers.getById(o.id.toString()))==null?void 0:a.marker);if(o.type==="model")return L9(o);if(o.type==="image")return F9(o);if(o.type==="text3d")return A9(o);if(o.type==="geometry-group"&&t&&typeof t!="string"&&ll.is(t))return S9(o);if(o.type==="path")return Nk(o);if(o.type==="group-container"&&typeof t!="string"&&oi.is(t))return p9(o,this.currentMap.floorsById.get(t.id),this.core);if(o.type==="group-container"&&o.children.length>0&&typeof t!="string"&&Pn.is(t)){let u=this.core.getState(o.children[0].id);return Zk(u)}}}__EXPERIMENTAL__getRenderedState(t){let n=HS(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}getFloorStackAltitudeData(t){return this.currentMap.getFloorStackAltitudeData(t)}createCoordinateFromScreenCoordinate(t,n,o){var c;if(o!=null){let d=this.core.projectScreenXYToCoordinate(t,n,!0);return d?new ke(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 p=d.userData.entityId.toString();return p.includes("f_")||p.includes("m_")}))==null?void 0:c.userData.entityId.toString();return new ke(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 ul.__type:i=o.map(a=>this.Labels.getById(a)).filter(a=>a!=null).map(a=>a.label);break;case Js.__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 tR(this,t)}tween(t){let n=new Xa(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){V.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(t.length<2){V.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){V.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}if(Cp(i,"group-container"),Cp(a,"group-container"),n){let l=new Nr;l.setFromObject(i);let c=new Nr;if(c.setFromObject(a),i.children.forEach(b=>{b instanceof rt&&b.userData.debugBox&&Qr(b)}),a.children.forEach(b=>{b instanceof rt&&b.userData.debugBox&&Qr(b)}),!du(l)||!du(c))return;let d=new lu(l.max.x-l.min.x,l.max.y-l.min.y,l.max.z-l.min.z),p=new kn({color:255,transparent:!0,opacity:.5}),m=new rt(d,p);m.position.set((l.min.x+l.max.x)/2,(l.min.y+l.max.y)/2,(l.min.z+l.max.z)/2),m.userData.debugBox=!0;let g=new lu(c.max.x-c.min.x,c.max.y-c.min.y,c.max.z-c.min.z),y=new kn({color:"cyan",transparent:!0,opacity:.5}),E=new rt(g,y);E.position.set((c.min.x+c.max.x)/2,(c.min.y+c.max.y)/2,(c.min.z+c.max.z)/2),E.userData.debugBox=!0,i.add(m),a.add(E)}let u=o.renderer.computeMinZOffsetBetweenContainers(i,a);if(u!==-1)return u}};Vy=new WeakMap,Hy=new WeakMap;function Kre(e){if(e===""){u6(""),s6("");return}s6("".concat(e,"/").concat(tE)),u6("".concat(e,"/").concat(eE))}f();var Oc,R3=class{constructor(r){h(this,"state");w(this,Oc);h(this,"update");O(this,Oc,r),this.update=r.Debug.update.bind(r.Debug),this.state=r.Debug.state}getCameraState(){let r=s(this,Oc).camera.center,t=s(this,Oc).camera.bearing;return{center:new ke({longitude:r[0],latitude:r[1]}),zoomLevel:s(this,Oc).camera.zoomLevel,bearing:t,pitch:s(this,Oc).camera.pitch}}};Oc=new WeakMap;f();import ou from"zod";var rR=ou.strictObject({environment:ou.union([ou.literal("basic"),ou.literal(!1)]).optional(),text3d:ou.object({hoverColor:ou.string().optional()}).optional(),geometry:ou.object({hoverColor:ou.string().optional()}).optional(),backgroundColor:ou.string().optional(),backgroundAlpha:ou.number().optional()});f();var sD=Dl(yR(),1);var Qre=(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},nR=(e,r)=>{let t=Qre(e,r),n=(0,sD.default)({},t,r),o=(0,sD.default)({},t),i=(a,u,l,c=o)=>{for(let d in u){let p=a[d],m=u[d];if(typeof m=="number"&&typeof p=="number")c[d]=p+(m-p)*l;else if(typeof m=="string"&&typeof p=="string"){if(Eh(p)&&Eh(m)){let g=V3(p),y=V3(m);g&&y?c[d]=KD([g[0]+(y[0]-g[0])*l,g[1]+(y[1]-g[1])*l,g[2]+(y[2]-g[2])*l]):V.warn('Color "'.concat(d,'" could not be animated!'))}}else typeof m=="object"&&m!==null&&typeof p=="object"&&p!==null?i(p,m,l,c[d]):V.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))};f();function ene(e){return e.getContext("webgl2")||e.getContext("webgl")}function uD(e){let r=ene(e);if(!r||e.width===0||e.height===0)return null;let t=r;t.PIXEL_PACK_BUFFER!==void 0&&t.bindBuffer(t.PIXEL_PACK_BUFFER,null);let n=new Uint8Array(e.width*e.height*4);r.readPixels(0,0,e.width,e.height,r.RGBA,r.UNSIGNED_BYTE,n);let o=document.createElement("canvas");o.width=e.width,o.height=e.height;let i=o.getContext("2d");if(!i)return null;let a=new ImageData(e.width,e.height);for(let u=0;u<e.height;u++)for(let l=0;l<e.width;l++){let c=((e.height-u-1)*e.width+l)*4,d=(u*e.width+l)*4;a.data[d]=n[c],a.data[d+1]=n[c+1],a.data[d+2]=n[c+2],a.data[d+3]=n[c+3]}return i.putImageData(a,0,0),o}async function oR(e,r=1e3){let t=null,n=new Promise(a=>{t=()=>{let u=e.getCanvas();a(u?uD(u):null)},e.once("render",t),e.triggerRepaint()}),o=new Promise(a=>setTimeout(()=>a(null),r)),i=await Promise.race([n,o]);return i===null&&t&&e.off("render",t),i}function lD(e,r="labels"){let t=e.getContext("2d");if(!t)return null;try{let n=t.getImageData(0,0,e.width,e.height),o=document.createElement("canvas");o.width=e.width,o.height=e.height;let i=o.getContext("2d");return i?(i.putImageData(n,0,0),o):null}catch(n){let o=r==="overlay"?"HTML overlay canvas is tainted and cannot be included in screenshot. This may occur if overlay content contains cross-origin images without proper CORS headers.":"Labels canvas is tainted and cannot be included in screenshot. This may occur if labels contain cross-origin images without proper CORS headers.";return V.warn(o),null}}var Il,Oe,zo,Zy=class{constructor(r){w(this,Il);w(this,Oe);w(this,zo);h(this,"Camera");h(this,"Labels");h(this,"Text3D");h(this,"Markers");h(this,"Image3D");h(this,"Models");h(this,"Paths");h(this,"Exporter");h(this,"Navigation");h(this,"Style");h(this,"Shapes");h(this,"Outdoor");h(this,"update",()=>{s(this,Oe).core.render()});h(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,Oe).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_SYNC(r,t,n))!=null?i:void 0});h(this,"getDirections",(r,t,n)=>{var o,i;return(i=(o=s(this,Oe).getMapData())==null?void 0:o.getDirections(r,t,n))!=null?i:Promise.resolve(void 0)});h(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,Oe).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n))!=null?i:void 0});h(this,"getDirectionsMultiDestination",(r,t,n)=>{var o,i;return(i=(o=s(this,Oe).getMapData())==null?void 0:o.getDirectionsMultiDestination(r,t,n))!=null?i:Promise.resolve(void 0)});h(this,"on",(r,t)=>{s(this,Il).on(r,t)});h(this,"off",(r,t)=>{s(this,Il).off(r,t)});h(this,"Debug");O(this,Il,new Xe),O(this,zo,r);let t=new $y(r,this,s(this,Il));O(this,Oe,t),this.Camera=s(this,Oe).Camera,this.Markers=s(this,Oe).Markers,this.Models=s(this,Oe).Models,this.Labels=s(this,Oe).Labels,this.Text3D=s(this,Oe).Text3D,this.Exporter=s(this,Oe).Exporter,this.Paths=s(this,Oe).Paths,this.Navigation=s(this,Oe).Navigation,this.Shapes=s(this,Oe).Shapes,this.Style=s(this,Oe).Style,this.Outdoor=s(this,Oe).Outdoor,this.Image3D=s(this,Oe).Image3D,s(this,zo).container.dataset.version=x.env.npm_package_version,this.Debug=new R3(s(this,Oe).core)}updateState(r,t){return s(this,Oe).updateState(r,t)}animateState(r,t,n){var l;let o=s(this,Oe).getState(r);if(o==null)return V.warn("Cannot animate state of ".concat(r,".")),new Promise(d=>d({result:"completed"}));let i=nR(o,t),a=s(this,Oe).tween({percent:0}).to({percent:1},(l=n==null?void 0:n.duration)!=null?l:1e3).onUpdate(({percent:c})=>{s(this,Oe).updateState(r,i(c))});n!=null&&n.easing&&n.easing in Ws&&a.easing(Ws[n.easing]);let u=new Promise(c=>{a.onComplete(()=>{s(this,Oe).removeTween(a),c({result:"completed"})}).onStop(()=>{s(this,Oe).removeTween(a),c({result:"cancelled"})}),a.start()});return u.cancel=()=>{a.stop(),s(this,Oe).updateState(r,i(0))},u}updateGlobalState(r){var t,n,o,i;try{rR.parse(r)}catch(a){V.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,Oe).core.backgroundColor,l=(i=r.backgroundAlpha)!=null?i:s(this,Oe).core.backgroundAlpha;s(this,Oe).core.setBackgroundColor(u,l)}r.environment!=null&&s(this,Oe).core.setEnvironment(r.environment),s(this,Oe).core.setState(a)}}get options(){return $O(s(this,Oe).currentMap.options)}getGlobalState(){let r=s(this,Oe).core.getState();return{backgroundColor:s(this,Oe).core.backgroundColor,backgroundAlpha:s(this,Oe).core.backgroundAlpha,environment:s(this,Oe).core.getEnvironment(),geometry:{hoverColor:r.hoverColor},text3d:{hoverColor:r.text3dHoverColor}}}getMapData(){if(s(this,Oe).mapData==null)throw new Kr("MapData not found.");return s(this,Oe).mapData}getDimensions(){return{width:s(this,zo).canvasWidth,height:s(this,zo).canvasHeight}}addMap(r,t){return s(this,Oe).addMap(r,t)}setFloor(r,t){return s(this,Oe).setFloor(r,t==null?void 0:t.context)}setFloorStack(r,t){return s(this,Oe).setFloorStack(r,t==null?void 0:t.context)}preloadFloors(r){s(this,Oe).preloadFloors(r)}tween(r){return s(this,Oe).tween(r)}removeTween(r){s(this,Oe).removeTween(r)}get tweenGroup(){return s(this,Oe).tweenGroup()}get currentFloorStack(){return s(this,Oe).currentFloorStack}get currentFloor(){return s(this,Oe).currentFloor}updateWatermark(r){s(this,Oe).updateWatermark(r)}getState(r){return s(this,Oe).getState(r)}getFloorStackAltitudeData(r){let t=typeof r=="string"?r:r.id;return s(this,Oe).getFloorStackAltitudeData(t)}__EXPERIMENTAL__getRenderedState(r){return s(this,Oe).__EXPERIMENTAL__getRenderedState(r)}setHoverColor(r){s(this,Oe).setHoverColor(r)}getHoverColor(){return s(this,Oe).getHoverColor()}convertAltitudeToMercatorZoomLevel(r){return s(this,Oe).core.getSystems().cameraSystem.convertAltitudeToZoomLevel(r)}convertMercatorZoomLevelToAltitude(r){return s(this,Oe).core.getSystems().cameraSystem.convertZoomLevelToAltitude(r)}isInView(r){return s(this,Oe).isInView(r)}getInView(r,t){return s(this,Oe).getInView(r,t)}getMetersPerPixel(){return s(this,Oe).core.getMetersPerPixel()}getDistance(r,t){var n;return(n=s(this,Oe).getMapData())==null?void 0:n.getDistance(r,t)}createCoordinate(r,t,n){return typeof r=="object"?new ke(r):new ke(r,t,n==null?void 0:n.id)}createCoordinateFromScreenCoordinate(r,t,n){return s(this,Oe).createCoordinateFromScreenCoordinate(r,t,n)}getScreenCoordinateFromCoordinate(r){return s(this,Oe).getScreenCoordinateFromCoordinate(r)}__EXPERIMENTAL__auto(r){return s(this,Oe).__EXPERIMENTAL__auto(r)}get __core(){if(x.env.INTERNAL==="true")return s(this,Oe).core;throw new Error("__core is not available.")}get container(){return s(this,zo).container}publishAllState(){s(this,Oe).publishAllState()}clear(){s(this,Oe).clear()}destroy(){s(this,Il).publish("destroy"),s(this,Il).destroy(),s(this,Oe).destroy()}async enableDebug(r={}){let{Inspector:t}=await import("./inspector-A7WF4M5K.js");await new t(this,s(this,Oe)).enable(r)}async takeScreenshot(r){var l,c,d,p,m;let t={withOutdoorContext:(l=r==null?void 0:r.withOutdoorContext)!=null?l:!1,withLabels:(c=r==null?void 0:r.withLabels)!=null?c:!1,captureMarkers:r==null?void 0:r.captureMarkers},n=s(this,zo).rendererDomElement,o=s(this,zo).map,i=!1,a=!1,u=[];if(this.Outdoor.enabled&&this.Outdoor.visible&&!t.withOutdoorContext&&(this.Outdoor.hide(),i=!0,o)){let g=null;o.triggerRepaint(),await Promise.race([new Promise(E=>{g=()=>E(),o.once("render",g)}),new Promise(E=>setTimeout(E,1e3))])===void 0&&g&&o.off("render",g)}if(this.Outdoor.enabled&&t.withOutdoorContext&&!this.Outdoor.visible){if(o){let g=(d=o.getStyle())==null?void 0:d.layers;g&&(u=g.filter(y=>o.getLayoutProperty(y.id,"visibility")!=="none").map(y=>y.id))}if(this.Outdoor.show(),a=!0,o){let g=null;o.triggerRepaint(),await Promise.race([new Promise(E=>{g=()=>E(),o.once("render",g)}),new Promise(E=>setTimeout(E,1e3))])===void 0&&g&&o.off("render",g)}}try{let g=document.createElement("canvas"),y=g.getContext("2d",{willReadFrequently:!0});if(g.width=n.width,g.height=n.height,!y)throw new Error("Failed to get 2D context");if(t.withOutdoorContext&&o){if(!o.loaded()){let v=null;await Promise.race([new Promise(M=>{v=()=>M(),o.once("idle",v)}),new Promise(M=>setTimeout(M,5e3))])===void 0&&v&&o.off("idle",v)}let b=await oR(o);b&&y.drawImage(b,0,0,g.width,g.height)}await s(this,zo).renderSync();let E=uD(n);if(E&&y.drawImage(E,0,0,g.width,g.height),t.withLabels){let b=s(this,zo).labelsCanvas;if(b){let v=lD(b);v&&y.drawImage(v,0,0,g.width,g.height)}}if(t.withLabels&&t.captureMarkers){let b=s(this,zo).container;if(b)for(let v=0;v<b.children.length;v++){let D=b.children[v],M=D.classList.contains("mappedin-2d-entities");if(!(D.tagName==="CANVAS"||D.offsetWidth===0||D.offsetHeight===0||!M))try{let T=await t.captureMarkers(D),B=lD(T,"overlay");B&&B.width>0&&B.height>0&&y.drawImage(B,0,0,g.width,g.height)}catch(T){V.warn("Overlay layer capture failed: ".concat(T instanceof Error?T.message:String(T),". Continuing with other layers."))}}}try{return g.toDataURL("image/png")}catch(b){if((b instanceof Error?b.name:b==null?void 0:b.name)==="SecurityError"||((p=b==null?void 0:b.message)==null?void 0:p.includes("tainted"))||((m=b==null?void 0:b.message)==null?void 0:m.includes("security"))){let T=b instanceof Error?"Screenshot failed due to security restrictions: ".concat(b.message):"Screenshot failed due to security restrictions. Ensure all images have proper CORS headers.";throw new Kr(T)}let M=b instanceof Error?"Screenshot failed: ".concat(b.message):"Screenshot failed due to an unknown error.";throw new Kr(M)}}finally{i&&this.Outdoor.show(),a&&this.Outdoor.hide(u)}}get manualFloorVisibility(){return s(this,Oe).manualFloorVisibility}set manualFloorVisibility(r){s(this,Oe).manualFloorVisibility=r}getOptimalVisualDistanceBetweenFloors(r){return s(this,Oe).getOptimalVisualDistanceBetweenFloors(r)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return s(this,Oe).hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(r){s(this,Oe).hidePathsNotOnCurrentFloor=!!r}registerPlugin(r){s(this,zo).registerPlugin(r)}unregisterPlugin(r){s(this,zo).unregisterPlugin(r)}};Il=new WeakMap,Oe=new WeakMap,zo=new WeakMap;f();var tne=1e3*60*60*2,Fc,dh,gr,iu,fs,Sa,ms,ph,fh,Wy,Sr,iR,aR,ch,N3,cD,dD,pD,mh=class{constructor(r,t){w(this,Sr);w(this,Fc,new Xe);w(this,dh);w(this,gr);w(this,iu);w(this,fs);w(this,Sa);w(this,ms);w(this,ph);w(this,fh);w(this,Wy,()=>{"key"in s(this,gr)&&"secret"in s(this,gr)&&se(this,Sr,ch).call(this),se(this,Sr,N3).call(this)});h(this,"on",(r,t)=>s(this,Fc).on(r,t));h(this,"off",(r,t)=>s(this,Fc).off(r,t));O(this,dh,r),O(this,gr,t)}setMapIds(r){O(this,dh,r)}setEnterprise(r){s(this,gr).enterprise=r}async readySync(){var o;if((!("key"in s(this,gr))||!("secret"in s(this,gr)))&&!("accessToken"in s(this,gr))){V.error("No API keys or access token provided! Cannot preload tokens.");return}let r=[se(this,Sr,ch).call(this),null];s(this,gr).enterprise||(r[1]=this.getSasTokensAsync());let[t,n]=await Promise.all(r);se(this,Sr,pD).call(this),se(this,Sr,cD).call(this,t),n!=null&&se(this,Sr,dD).call(this,n),xh()&&((o=globalThis.addEventListener)==null||o.call(globalThis,"focus",s(this,Wy)))}async refreshing(){let r=[];return s(this,iu)!=null&&r.push(s(this,iu)),s(this,fs)!=null&&r.push(s(this,fs)),Promise.all(r)}getAccessTokenAsync(){return se(this,Sr,ch).call(this)}getSasTokensAsync(){return se(this,Sr,N3).call(this)}getAccessToken(){return s(this,Sa)==null?(V.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):s(this,Sa)}getSasToken(r){return this.isEnterpriseMode()?(V.error("SAS tokens are not available in the enterprise mode!"),{token:""}):s(this,ms)==null?(V.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):r in s(this,ms).tokens?s(this,ms).tokens[r]:(V.error("SAS token for map ".concat(r," not found!")),{token:""})}isEnterpriseMode(){var r;return(r=s(this,gr).enterprise)!=null?r:!1}destroy(){se(this,Sr,pD).call(this),s(this,Fc).destroy(),xh()&&globalThis.removeEventListener("focus",s(this,Wy))}};Fc=new WeakMap,dh=new WeakMap,gr=new WeakMap,iu=new WeakMap,fs=new WeakMap,Sa=new WeakMap,ms=new WeakMap,ph=new WeakMap,fh=new WeakMap,Wy=new WeakMap,Sr=new WeakSet,iR=function(r){var n;let t=r.token!==((n=s(this,Sa))==null?void 0:n.token);O(this,Sa,r),t&&s(this,Fc).publish("access-token-refreshed",{accessToken:r})},aR=function(r){var n;let t=JSON.stringify(r.tokens)!==JSON.stringify((n=s(this,ms))==null?void 0:n.tokens);O(this,ms,r),t&&s(this,Fc).publish("sas-tokens-refreshed",{sasTokens:r.tokens})},ch=async function(r=!1){var t;if("accessToken"in s(this,gr)&&typeof s(this,gr).accessToken=="string"){let n={token:s(this,gr).accessToken,expires:Date.now()+72e5};return O(this,Sa,n),n}if(!("key"in s(this,gr))||!("secret"in s(this,gr))||typeof s(this,gr).key!="string"||typeof s(this,gr).secret!="string")throw new Error("No API keys or access token provided!");return s(this,iu)!=null?s(this,iu):s(this,Sa)!=null&&s(this,Sa).expires!=null&&s(this,Sa).expires>Date.now()&&!r?s(this,Sa):(O(this,iu,x0(oe(k({},s(this,gr)),{key:s(this,gr).key,secret:s(this,gr).secret}),(t=s(this,gr).enterprise)!=null?t:!1).then(n=>{let o={token:n.accessToken,expires:n.expiresTimestamp*1e3};return se(this,Sr,iR).call(this,o),o}).catch(n=>{throw n}).finally(()=>{O(this,iu,void 0)})),s(this,iu))},N3=async function(r=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:s(this,fs)!=null?s(this,fs):s(this,ms)!=null&&s(this,ms).expires>Date.now()&&!r?s(this,ms):(O(this,fs,new Promise((t,n)=>{se(this,Sr,ch).call(this).then(o=>{let i={},a=s(this,dh).map(u=>_2(oe(k({},s(this,gr)),{mapId:u}),o.token).then(l=>{i[u]={token:l.token,expires:l.expires}}).catch(l=>{V.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}))};se(this,Sr,aR).call(this,u),t(u)})}).catch(o=>{n(o)})})),s(this,fs).catch(t=>{throw t}).finally(()=>{O(this,fs,void 0)}),s(this,fs))},cD=function(r){if(!("key"in s(this,gr))||!("secret"in s(this,gr)))return;let t=r.expires!=null?r.expires-Date.now():tne;isFinite(t)&&O(this,ph,setTimeout(()=>{se(this,Sr,ch).call(this,!0).then(n=>{se(this,Sr,cD).call(this,n)})},t-N_))},dD=function(r){let t=r.expires-Date.now();isFinite(t)&&O(this,fh,setTimeout(()=>{se(this,Sr,N3).call(this,!0).then(n=>{se(this,Sr,dD).call(this,n)})},t-G_))},pD=function(){s(this,ph)!=null&&clearTimeout(s(this,ph)),s(this,fh)!=null&&clearTimeout(s(this,fh))};f();var rne=async(e,r)=>{var E,b,v,D,M,T,B,G,_,F,A;let t=(v="mvfVersion"in(r!=null?r:{})?r==null?void 0:r.mvfVersion:void 0)!=null?v:"options"in e&&"version"in((E=e.options)!=null?E:{})?(b=e.options)==null?void 0:b.version:void 0,n=oe(k({prefetchTokens:!0},r||{}),{mvfVersion:t}),o,i,a=Xl();a.updateByUserOption(n);let u={};if("type"in e&&typeof e.type=="string"){if(e.type==="binary"&&e.main instanceof Uint8Array){let N=await y4(e.main,n.mvfVersion);o=N.mvf2,i=N.mvf3,u.languagePacks=[];for(let Z of(D=e.languagePacks)!=null?D:[])Z.localePack instanceof Uint8Array&&u.languagePacks.push({language:Z.language,localePack:await Df(Z.localePack)})}else if(e.type==="json")o=e.main,i=(M=e.options)==null?void 0:M.mvf3,u.languagePacks=(T=e.languagePacks)!=null?T:[];else throw new Error("Invalid backup type");e.type==="binary"&&e.main instanceof Uint8Array&&(u.binaryBundle=e.main);let j=o.enterprise!=null;((B=e.options)==null?void 0:B.enterprise)!==void 0&&(j?V.warn('The "enterprise" option in hydrateMapData is deprecated and ignored. Enterprise mode is now automatically detected from the MVF data.'):V.warn('The "enterprise" option in hydrateMapData is deprecated and will be removed in a future release. Please ensure your MVF bundle includes enterprise data for automatic detection.')),u.enterprise=j||((_=(G=e.options)==null?void 0:G.enterprise)!=null?_:!1)}else o=e,u.enterprise=o.enterprise!=null;u.mvf3=i,a.setEnterprise((F=u.enterprise)!=null?F:!1);let l=g4(o),c=l.length>0?l:[n.mapId];n.baseAuthUri=a.getBaseAuthUri();let d=new mh(c,oe(k({},n),{enterprise:u.enterprise})),p;if("accessToken"in n&&n.accessToken)p=n.accessToken;else if("key"in n&&"secret"in n){let j;try{j=await d.getAccessTokenAsync()}catch(N){V.error("Failed getting token during hydrateMapData",N)}p=(j==null?void 0:j.token)||""}if(u.outdoorViewToken=p,u.env=a,u.getMapDataOptions=n,u.tokenManager=d,n.prefetchTokens)try{await d.readySync()}catch(j){V.error("Failed to ready token manager!",j)}og()&&(u.enterprise&&V.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),n.mvfVersion!=="3.0.0"&&V.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let m=new Fd(o,u);p&&m.Analytics.init(oe(k({accessToken:p,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:(A=n.analytics)==null?void 0:A.context}));let g=new Fh(m),y=m.findPreferredLanguage({languageCode:n.language,fallbackToNavigatorLanguage:!1});if(y)try{await g.changeLanguage(y.code)}catch(j){}return typeof(r==null?void 0:r.onMVFParsed)=="function"&&r.onMVFParsed(o),g};var sR=":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 uR=".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 lR=".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 cR=".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 dR=".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 pR='.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}';var fR=".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";f();function cne(e){var r,t;if(!(!e.languages||!xh()||!((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 uC(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=cne(e);c&&(i=c)}catch(c){V.error("fallbackToNavigatorLanguage is set, however, there was an error getting the navigator language",c)}return i!=null?i:e.defaultLanguage}var dne=[sR,uR,lR,cR,dR,pR,fR],mR;function Ctt(e){mR=e}var Dtt=async(e,r)=>{let t,n=Xl();r&&n.updateByUserOption(r);try{r&&(t=(await x0(oe(k({},r),{baseAuthUri:n.getBaseAuthUri()}))).accessToken)}catch(a){V.warn("Getting access token failed. Outdoor map disabled.",a)}let o=new Fd(e,{outdoorViewToken:t,languagePacks:r==null?void 0:r.languagePacks,env:n});return new Fh(o)},hR=!1;function Ttt(e){hR=e}var gR=!1;function Mtt(e){gR=e}function og(){return gR}var pne=async e=>{var v,D;let r=hR,t,n=Xl();n.updateByUserOption(e);let o=oe(k({prefetchTokens:!0},e),{fallbackToNavigatorLanguage:(v=e.fallbackToNavigatorLanguage)!=null?v:!0}),i=new mh([o.mapId],o);if("accessToken"in o&&o.accessToken){t=o.accessToken;let{aud:M,sub:T}=s1(t);(GO.some(B=>M.includes(B))||T&&T.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 M;try{M=await i.getAccessTokenAsync(),t=M==null?void 0:M.token}catch(T){throw V.warn("Get access token failed",T.message),new Error("Get access token failed: "+T.message)}}else throw new Error("Missing key or secret.");o.layoutId!=null&&(r?o.layoutId!=="draft"&&V.warn('Invalid layoutId! Use "draft" to load draft data or leave unspecified to load live data.'):V.warn("layoutId is currently unsupported!")),o.baseUri=n.getBaseUri();let a=performance.now(),u,l;if(r){let M=oe(k({},o),{venue:o.mapId,clientId:o.key,clientSecret:o.secret,version:"1.0.0",perspective:o.viewId,useDraftData:o.layoutId==="draft"}),T=await G2(M);u=T.compressed,l=T.localePacks}else u=await z2(o,t);let c=performance.now(),{mvf2:d,mvf3:p}=await y4(u,o.mvfVersion),m=performance.now();typeof e.onMVFParsed=="function"&&e.onMVFParsed(d);let g=g4(d);if(g.length>0?i.setMapIds(g):i.setMapIds([o.mapId]),o.prefetchTokens)try{await i.readySync()}catch(M){V.error("Failed to ready token manager!",M)}og()&&(r&&V.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),o.mvfVersion!=="3.0.0"&&V.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let y=new Fd(d,{env:n,outdoorViewToken:t,tokenManager:i,enterprise:r,localePacksUrls:l,binaryBundle:u,getMapDataOptions:o,mvf3:p}),E=new Fh(y,{search:e.search});y.Analytics.init(oe(k({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:(D=o.analytics)==null?void 0:D.context})),y.Analytics.sendGetMapDataEvent({parseDuration:m-c,downloadDuration:c-a,viewId:o.viewId});let b=y.findPreferredLanguage({languageCode:o.language,fallbackToNavigatorLanguage:o.fallbackToNavigatorLanguage});if(b)try{await E.changeLanguage(b.code)}catch(M){}return E},wtt=pne,fne=async()=>{if(Bd===""||Xx==="")return!1;let e=[fetch(Bd,{mode:"same-origin"}),fetch(Xx,{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}},fD=new WeakSet,mne=async(e,r,t)=>{var m,g,y,E,b,v,D,M,T,B,G,_,F,A,j,N,Z;let n=performance.now();fD.has(e)&&V.warn("show3dMap was called on a container that already has an active MapView. Call destroy() on the existing MapView before creating a new one to avoid resource leaks.");let o=bS(t,r);o&&yS(o),((m=o.injectStyles)==null||m)&&n5(dne,{id:"mappedin__styles"});let i=zO((g=r.outdoorViewToken)!=null?g:""),a=Bh(r);(y=o.outdoorView)!=null&&y.style&&a.envControl.updateTileServerBaseUrl((E=o.outdoorView)==null?void 0:E.style);let u=!1,l=!1,c=await fne();c&&(c.collision||(u=!0),c.maplibre||(l=!0));let d=await uk(e,{center:[r.mapCenter.longitude,r.mapCenter.latitude],bearing:o.bearing,pitch:o.pitch,zoomLevel:o.zoomLevel,backgroundAlpha:(b=o.style)==null?void 0:b.backgroundAlpha,backgroundColor:(v=o.style)==null?void 0:v.backgroundColor,outdoorView:!l&&((D=o.outdoorView)!=null&&D.token)?{headers:{"x-mappedin-tiles-key":(M=o.outdoorView)==null?void 0:M.token},style:r.getEnv().tileServerUri,enabled:!!((T=o.outdoorView)!=null&&T.enabled),lowDpi:(B=o.outdoorView)==null?void 0:B.lowDpi}:void 0,watermark:oe(k({},o.watermark),{visible:(_=(G=o.watermark)==null?void 0:G.visible)!=null?_:!a.enterpriseMode&&!i.remove_watermark,onClick:mR||void 0}),attribution:o.attribution,antialias:typeof o.antialiasing=="boolean"?o.antialiasing:!!((F=o.antialiasing)!=null&&F.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:(A=o.useStandaloneCamera)!=null?A:!1,useWorkers:!((j=o.disableWorkers)!=null&&j),useCollisionWorker:!u,disableUpdateStateValidation:(N=o.disableUpdateStateValidation)!=null?N:!1,__EXPERIMENTAL_shadows:o.__EXPERIMENTAL_shadows,outlines:typeof((Z=o.style)==null?void 0:Z.outlines)=="object"?o.style.outlines:void 0}),p=new Zy(d);return await p.addMap(r,o),a.Analytics.sendMapViewLoadedEvent({firstRenderDuration:performance.now()-n,dimension:p.getDimensions(),collisionWorkerDisabled:u,outdoorsWorkerDisabled:l}),fD.add(e),p.on("destroy",()=>fD.delete(e)),p},Att=()=>x.env.npm_package_version,Ptt=mne;export{ke as a,sa as b,ad as c,Ns as d,bn as e,Nq as f,ua as g,Mo as h,Lr as i,oi as j,Hn as k,ii as l,Ai as m,$a as n,O4 as o,Pn as p,ri as q,F4 as r,RS as s,tO as t,$2 as u,y4 as v,KO as w,NS as x,QO as y,k4 as z,L4 as A,uc as B,Xu as C,B4 as D,b8 as E,Ws as F,dee as G,Wx as H,y6 as I,Nee as J,T6 as K,M6 as L,Kre as M,Zy as N,rne as O,uC as P,Ctt as Q,Dtt as R,Ttt as S,Mtt as T,og as U,pne as V,wtt as W,fne as X,mne as Y,Att as Z,Ptt as _};
|