@mappedin/mappedin-js 6.0.1-alpha.26 → 6.0.1-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/esm/index.js CHANGED
@@ -1,452 +1,14 @@
1
- import{j as lm}from"./chunk-D44LKVHI.js";import{a as Mr}from"./chunk-WUHUS4HS.js";import{A as zd,B as Ud,C as Wd,D as X,E as Ne,F as Zd,Fa as Ji,G as ti,H as Zi,I as Ce,Ia as cs,J as Mt,Ja as am,L as xr,M as to,Ma as sm,O as Ft,P as qd,Pa as Pr,Q as eo,R as $d,S as Jd,T as qi,W as Kd,X as Qd,Y as as,a as os,ba as tm,c as Kn,d as Qn,ea as ss,fa as ls,ga as em,ia as ro,m as Yd,n as jd,oa as rm,pa as Sr,qa as Hc,ra as im,sa as ke,ta as Re,u as Wi,ua as nm,va as om,w as at,x as z,xa as $i}from"./chunk-WLHJOLTZ.js";import{a as s,b as A,d as Cr,e as v,f as u,g as I,h as _,i as j,j as f,k as b}from"./chunk-AMKFVFEX.js";var xm=A((eu,ru)=>{f();(function(e,t){typeof eu=="object"&&typeof ru<"u"?ru.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(eu,function(){"use strict";function e(g,C,M,T,w){s(function E(L,R,F,k,G){for(;k>F;){if(k-F>600){var H=k-F+1,Q=R-F+1,lt=Math.log(H),ht=.5*Math.exp(2*lt/3),gt=.5*Math.sqrt(lt*ht*(H-ht)/H)*(Q-H/2<0?-1:1),At=Math.max(F,Math.floor(R-Q*ht/H+gt)),ve=Math.min(k,Math.floor(R+(H-Q)*ht/H+gt));E(L,R,At,ve,G)}var Rt=L[R],ut=F,Ct=k;for(t(L,F,R),G(L[k],Rt)>0&&t(L,F,k);ut<Ct;){for(t(L,ut,Ct),ut++,Ct--;G(L[ut],Rt)<0;)ut++;for(;G(L[Ct],Rt)>0;)Ct--}G(L[F],Rt)===0?t(L,F,Ct):t(L,++Ct,k),Ct<=R&&(F=Ct+1),R<=Ct&&(k=Ct-1)}},"t")(g,C,M||0,T||g.length-1,w||r)}s(e,"t");function t(g,C,M){var T=g[C];g[C]=g[M],g[M]=T}s(t,"i");function r(g,C){return g<C?-1:g>C?1:0}s(r,"n");var i=s(function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function n(g,C,M){if(!M)return C.indexOf(g);for(var T=0;T<C.length;T++)if(M(g,C[T]))return T;return-1}s(n,"e");function o(g,C){a(g,0,g.children.length,C,g)}s(o,"a");function a(g,C,M,T,w){w||(w=S(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var E=C;E<M;E++){var L=g.children[E];l(w,g.leaf?T(L):L)}return w}s(a,"h");function l(g,C){return g.minX=Math.min(g.minX,C.minX),g.minY=Math.min(g.minY,C.minY),g.maxX=Math.max(g.maxX,C.maxX),g.maxY=Math.max(g.maxY,C.maxY),g}s(l,"o");function c(g,C){return g.minX-C.minX}s(c,"s");function h(g,C){return g.minY-C.minY}s(h,"l");function d(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}s(d,"f");function m(g){return g.maxX-g.minX+(g.maxY-g.minY)}s(m,"u");function y(g,C){return g.minX<=C.minX&&g.minY<=C.minY&&C.maxX<=g.maxX&&C.maxY<=g.maxY}s(y,"m");function x(g,C){return C.minX<=g.maxX&&C.minY<=g.maxY&&C.maxX>=g.minX&&C.maxY>=g.minY}s(x,"c");function S(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}s(S,"p");function P(g,C,M,T,w){for(var E=[C,M];E.length;)if(!((M=E.pop())-(C=E.pop())<=T)){var L=C+Math.ceil((M-C)/T/2)*T;e(g,L,C,M,w),E.push(C,L,L,M)}}return s(P,"d"),i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(g){var C=this.data,M=[];if(!x(g,C))return M;for(var T=this.toBBox,w=[];C;){for(var E=0;E<C.children.length;E++){var L=C.children[E],R=C.leaf?T(L):L;x(g,R)&&(C.leaf?M.push(L):y(g,R)?this._all(L,M):w.push(L))}C=w.pop()}return M},i.prototype.collides=function(g){var C=this.data;if(!x(g,C))return!1;for(var M=[];C;){for(var T=0;T<C.children.length;T++){var w=C.children[T],E=C.leaf?this.toBBox(w):w;if(x(g,E)){if(C.leaf||y(g,E))return!0;M.push(w)}}C=M.pop()}return!1},i.prototype.load=function(g){if(!g||!g.length)return this;if(g.length<this._minEntries){for(var C=0;C<g.length;C++)this.insert(g[C]);return this}var M=this._build(g.slice(),0,g.length-1,0);if(this.data.children.length)if(this.data.height===M.height)this._splitRoot(this.data,M);else{if(this.data.height<M.height){var T=this.data;this.data=M,M=T}this._insert(M,this.data.height-M.height-1,!0)}else this.data=M;return this},i.prototype.insert=function(g){return g&&this._insert(g,this.data.height-1),this},i.prototype.clear=function(){return this.data=S([]),this},i.prototype.remove=function(g,C){if(!g)return this;for(var M,T,w,E=this.data,L=this.toBBox(g),R=[],F=[];E||R.length;){if(E||(E=R.pop(),T=R[R.length-1],M=F.pop(),w=!0),E.leaf){var k=n(g,E.children,C);if(k!==-1)return E.children.splice(k,1),R.push(E),this._condense(R),this}w||E.leaf||!y(E,L)?T?(M++,E=T.children[M],w=!1):E=null:(R.push(E),F.push(M),M=0,T=E,E=E.children[0])}return this},i.prototype.toBBox=function(g){return g},i.prototype.compareMinX=function(g,C){return g.minX-C.minX},i.prototype.compareMinY=function(g,C){return g.minY-C.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(g){return this.data=g,this},i.prototype._all=function(g,C){for(var M=[];g;)g.leaf?C.push.apply(C,g.children):M.push.apply(M,g.children),g=M.pop();return C},i.prototype._build=function(g,C,M,T){var w,E=M-C+1,L=this._maxEntries;if(E<=L)return o(w=S(g.slice(C,M+1)),this.toBBox),w;T||(T=Math.ceil(Math.log(E)/Math.log(L)),L=Math.ceil(E/Math.pow(L,T-1))),(w=S([])).leaf=!1,w.height=T;var R=Math.ceil(E/L),F=R*Math.ceil(Math.sqrt(L));P(g,C,M,F,this.compareMinX);for(var k=C;k<=M;k+=F){var G=Math.min(k+F-1,M);P(g,k,G,R,this.compareMinY);for(var H=k;H<=G;H+=R){var Q=Math.min(H+R-1,G);w.children.push(this._build(g,H,Q,T-1))}}return o(w,this.toBBox),w},i.prototype._chooseSubtree=function(g,C,M,T){for(;T.push(C),!C.leaf&&T.length-1!==M;){for(var w=1/0,E=1/0,L=void 0,R=0;R<C.children.length;R++){var F=C.children[R],k=d(F),G=(H=g,Q=F,(Math.max(Q.maxX,H.maxX)-Math.min(Q.minX,H.minX))*(Math.max(Q.maxY,H.maxY)-Math.min(Q.minY,H.minY))-k);G<E?(E=G,w=k<w?k:w,L=F):G===E&&k<w&&(w=k,L=F)}C=L||C.children[0]}var H,Q;return C},i.prototype._insert=function(g,C,M){var T=M?g:this.toBBox(g),w=[],E=this._chooseSubtree(T,this.data,C,w);for(E.children.push(g),l(E,T);C>=0&&w[C].children.length>this._maxEntries;)this._split(w,C),C--;this._adjustParentBBoxes(T,w,C)},i.prototype._split=function(g,C){var M=g[C],T=M.children.length,w=this._minEntries;this._chooseSplitAxis(M,w,T);var E=this._chooseSplitIndex(M,w,T),L=S(M.children.splice(E,M.children.length-E));L.height=M.height,L.leaf=M.leaf,o(M,this.toBBox),o(L,this.toBBox),C?g[C-1].children.push(L):this._splitRoot(M,L)},i.prototype._splitRoot=function(g,C){this.data=S([g,C]),this.data.height=g.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(g,C,M){for(var T,w,E,L,R,F,k,G=1/0,H=1/0,Q=C;Q<=M-C;Q++){var lt=a(g,0,Q,this.toBBox),ht=a(g,Q,M,this.toBBox),gt=(w=lt,E=ht,L=void 0,R=void 0,F=void 0,k=void 0,L=Math.max(w.minX,E.minX),R=Math.max(w.minY,E.minY),F=Math.min(w.maxX,E.maxX),k=Math.min(w.maxY,E.maxY),Math.max(0,F-L)*Math.max(0,k-R)),At=d(lt)+d(ht);gt<G?(G=gt,T=Q,H=At<H?At:H):gt===G&&At<H&&(H=At,T=Q)}return T||M-C},i.prototype._chooseSplitAxis=function(g,C,M){var T=g.leaf?this.compareMinX:c,w=g.leaf?this.compareMinY:h;this._allDistMargin(g,C,M,T)<this._allDistMargin(g,C,M,w)&&g.children.sort(T)},i.prototype._allDistMargin=function(g,C,M,T){g.children.sort(T);for(var w=this.toBBox,E=a(g,0,C,w),L=a(g,M-C,M,w),R=m(E)+m(L),F=C;F<M-C;F++){var k=g.children[F];l(E,g.leaf?w(k):k),R+=m(E)}for(var G=M-C-1;G>=C;G--){var H=g.children[G];l(L,g.leaf?w(H):H),R+=m(L)}return R},i.prototype._adjustParentBBoxes=function(g,C,M){for(var T=M;T>=0;T--)l(C[T],g)},i.prototype._condense=function(g){for(var C=g.length-1,M=void 0;C>=0;C--)g[C].children.length===0?C>0?(M=g[C-1].children).splice(M.indexOf(g[C]),1):this.clear():o(g[C],this.toBBox)},i})});var su=A(V=>{"use strict";f();Object.defineProperty(V,"__esModule",{value:!0});V.earthRadius=63710088e-1;V.factors={centimeters:V.earthRadius*100,centimetres:V.earthRadius*100,degrees:V.earthRadius/111325,feet:V.earthRadius*3.28084,inches:V.earthRadius*39.37,kilometers:V.earthRadius/1e3,kilometres:V.earthRadius/1e3,meters:V.earthRadius,metres:V.earthRadius,miles:V.earthRadius/1609.344,millimeters:V.earthRadius*1e3,millimetres:V.earthRadius*1e3,nauticalmiles:V.earthRadius/1852,radians:1,yards:V.earthRadius*1.0936};V.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/V.earthRadius,yards:1.0936133};V.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 Ir(e,t,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(Ir,"feature");V.feature=Ir;function R3(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return iu(t).geometry;case"LineString":return ou(t).geometry;case"Polygon":return nu(t).geometry;case"MultiPoint":return Pm(t).geometry;case"MultiLineString":return Sm(t).geometry;case"MultiPolygon":return Mm(t).geometry;default:throw new Error(e+" is invalid")}}s(R3,"geometry");V.geometry=R3;function iu(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ms(e[0])||!ms(e[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:e};return Ir(i,t,r)}s(iu,"point");V.point=iu;function F3(e,t,r){return r===void 0&&(r={}),ys(e.map(function(i){return iu(i,t)}),r)}s(F3,"points");V.points=F3;function nu(e,t,r){r===void 0&&(r={});for(var i=0,n=e;i<n.length;i++){var o=n[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:e};return Ir(l,t,r)}s(nu,"polygon");V.polygon=nu;function B3(e,t,r){return r===void 0&&(r={}),ys(e.map(function(i){return nu(i,t)}),r)}s(B3,"polygons");V.polygons=B3;function ou(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:e};return Ir(i,t,r)}s(ou,"lineString");V.lineString=ou;function G3(e,t,r){return r===void 0&&(r={}),ys(e.map(function(i){return ou(i,t)}),r)}s(G3,"lineStrings");V.lineStrings=G3;function ys(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(ys,"featureCollection");V.featureCollection=ys;function Sm(e,t,r){r===void 0&&(r={});var i={type:"MultiLineString",coordinates:e};return Ir(i,t,r)}s(Sm,"multiLineString");V.multiLineString=Sm;function Pm(e,t,r){r===void 0&&(r={});var i={type:"MultiPoint",coordinates:e};return Ir(i,t,r)}s(Pm,"multiPoint");V.multiPoint=Pm;function Mm(e,t,r){r===void 0&&(r={});var i={type:"MultiPolygon",coordinates:e};return Ir(i,t,r)}s(Mm,"multiPolygon");V.multiPolygon=Mm;function V3(e,t,r){r===void 0&&(r={});var i={type:"GeometryCollection",geometries:e};return Ir(i,t,r)}s(V3,"geometryCollection");V.geometryCollection=V3;function H3(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}s(H3,"round");V.round=H3;function wm(e,t){t===void 0&&(t="kilometers");var r=V.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(wm,"radiansToLength");V.radiansToLength=wm;function au(e,t){t===void 0&&(t="kilometers");var r=V.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(au,"lengthToRadians");V.lengthToRadians=au;function X3(e,t){return Tm(au(e,t))}s(X3,"lengthToDegrees");V.lengthToDegrees=X3;function Y3(e){var t=e%360;return t<0&&(t+=360),t}s(Y3,"bearingToAzimuth");V.bearingToAzimuth=Y3;function Tm(e){var t=e%(2*Math.PI);return t*180/Math.PI}s(Tm,"radiansToDegrees");V.radiansToDegrees=Tm;function j3(e){var t=e%360;return t*Math.PI/180}s(j3,"degreesToRadians");V.degreesToRadians=j3;function z3(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return wm(au(e,t),r)}s(z3,"convertLength");V.convertLength=z3;function U3(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=V.areaFactors[t];if(!i)throw new Error("invalid original units");var n=V.areaFactors[r];if(!n)throw new Error("invalid final units");return e/i*n}s(U3,"convertArea");V.convertArea=U3;function ms(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(ms,"isNumber");V.isNumber=ms;function W3(e){return!!e&&e.constructor===Object}s(W3,"isObject");V.isObject=W3;function Z3(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!ms(t))throw new Error("bbox must only contain numbers")})}s(Z3,"validateBBox");V.validateBBox=Z3;function q3(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")}s(q3,"validateId");V.validateId=q3});var Om=A(wt=>{"use strict";f();Object.defineProperty(wt,"__esModule",{value:!0});var Gt=su();function ao(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,m=0,y,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,y=h?h.type==="GeometryCollection":!1,l=y?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=y?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],m,C,T,w)===!1)return!1;m++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],m,C,T,w)===!1)return!1;m++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(ao(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(ao,"coordEach");function $3(e,t,r,i){var n=r;return ao(e,function(o,a,l,c,h){a===0&&r===void 0?n=o:n=t(n,o,a,l,c,h)},i),n}s($3,"coordReduce");function Im(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}s(Im,"propEach");function J3(e,t,r){var i=r;return Im(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(J3,"propReduce");function Em(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(Em,"featureEach");function K3(e,t,r){var i=r;return Em(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(K3,"featureReduce");function Q3(e){var t=[];return ao(e,function(r){t.push(r)}),t}s(Q3,"coordAll");function lu(e,t){var r,i,n,o,a,l,c,h,d,m,y=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,m=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,y,h,d,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,h,d,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,h,d,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}s(lu,"geomEach");function t5(e,t,r){var i=r;return lu(e,function(n,o,a,l,c){o===0&&r===void 0?i=n:i=t(i,n,o,a,l,c)}),i}s(t5,"geomReduce");function gs(e,t){lu(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(Gt.feature(r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],m={type:c,coordinates:d};if(t(Gt.feature(m,n),i,h)===!1)return!1}})}s(gs,"flattenEach");function e5(e,t,r){var i=r;return gs(e,function(n,o,a){o===0&&a===0&&r===void 0?i=n:i=t(i,n,o,a)}),i}s(e5,"flattenReduce");function _m(e,t){gs(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(ao(r,function(m,y,x,S,P){if(l===void 0||i>c||S>h||P>d){l=m,c=i,h=S,d=P,o=0;return}var g=Gt.lineString([l,m],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=m})===!1)return!1}}})}s(_m,"segmentEach");function r5(e,t,r){var i=r,n=!1;return _m(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(r5,"segmentReduce");function Lm(e,t){if(!e)throw new Error("geojson is required");gs(e,function(r,i,n){if(r.geometry!==null){var o=r.geometry.type,a=r.geometry.coordinates;switch(o){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<a.length;l++)if(t(Gt.lineString(a[l],r.properties),i,n,l)===!1)return!1;break}}})}s(Lm,"lineEach");function i5(e,t,r){var i=r;return Lm(e,function(n,o,a,l){o===0&&r===void 0?i=n:i=t(i,n,o,a,l)}),i}s(i5,"lineReduce");function n5(e,t){if(t=t||{},!Gt.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=c.length+o-1),Gt.lineString([c[o],c[o+1]],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o-1),Gt.lineString([c[n][o],c[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o-1),Gt.lineString([c[i][o],c[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o-1),Gt.lineString([c[i][n][o],c[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}s(n5,"findSegment");function o5(e,t){if(t=t||{},!Gt.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":return Gt.point(c,a,t);case"MultiPoint":return i<0&&(i=c.length+i),Gt.point(c[i],a,t);case"LineString":return o<0&&(o=c.length+o),Gt.point(c[o],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o),Gt.point(c[n][o],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),Gt.point(c[i][o],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o),Gt.point(c[i][n][o],a,t)}throw new Error("geojson is invalid")}s(o5,"findPoint");wt.coordAll=Q3;wt.coordEach=ao;wt.coordReduce=$3;wt.featureEach=Em;wt.featureReduce=K3;wt.findPoint=o5;wt.findSegment=n5;wt.flattenEach=gs;wt.flattenReduce=e5;wt.geomEach=lu;wt.geomReduce=t5;wt.lineEach=Lm;wt.lineReduce=i5;wt.propEach=Im;wt.propReduce=J3;wt.segmentEach=_m;wt.segmentReduce=r5});var cu=A((ww,Am)=>{"use strict";f();var Dm=Object.prototype.toString;Am.exports=s(function(t){var r=Dm.call(t),i=r==="[object Arguments]";return i||(i=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Dm.call(t.callee)==="[object Function]"),i},"isArguments")});var Xm=A((Ew,Hm)=>{"use strict";f();var Vm;Object.keys||(so=Object.prototype.hasOwnProperty,uu=Object.prototype.toString,Nm=cu(),pu=Object.prototype.propertyIsEnumerable,km=!pu.call({toString:null},"toString"),Rm=pu.call(function(){},"prototype"),lo=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],vs=s(function(e){var t=e.constructor;return t&&t.prototype===e},"equalsConstructorPrototype"),Fm={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Bm=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!Fm["$"+e]&&so.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{vs(window[e])}catch{return!0}}catch{return!0}return!1}(),Gm=s(function(e){if(typeof window>"u"||!Bm)return vs(e);try{return vs(e)}catch{return!1}},"equalsConstructorPrototypeIfNotBuggy"),Vm=s(function(t){var r=t!==null&&typeof t=="object",i=uu.call(t)==="[object Function]",n=Nm(t),o=r&&uu.call(t)==="[object String]",a=[];if(!r&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var l=Rm&&i;if(o&&t.length>0&&!so.call(t,0))for(var c=0;c<t.length;++c)a.push(String(c));if(n&&t.length>0)for(var h=0;h<t.length;++h)a.push(String(h));else for(var d in t)!(l&&d==="prototype")&&so.call(t,d)&&a.push(String(d));if(km)for(var m=Gm(t),y=0;y<lo.length;++y)!(m&&lo[y]==="constructor")&&so.call(t,lo[y])&&a.push(lo[y]);return a},"keys"));var so,uu,Nm,pu,km,Rm,lo,vs,Fm,Bm,Gm;Hm.exports=Vm});var Cs=A((Ow,zm)=>{"use strict";f();var a5=Array.prototype.slice,s5=cu(),Ym=Object.keys,bs=Ym?s(function(t){return Ym(t)},"keys"):Xm(),jm=Object.keys;bs.shim=s(function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=s(function(i){return s5(i)?jm(a5.call(i)):jm(i)},"keys"))}else Object.keys=bs;return Object.keys||bs},"shimObjectKeys");zm.exports=bs});var Wm=A((Nw,Um)=>{"use strict";f();Um.exports=Error});var qm=A((Rw,Zm)=>{"use strict";f();Zm.exports=EvalError});var Jm=A((Bw,$m)=>{"use strict";f();$m.exports=RangeError});var Qm=A((Vw,Km)=>{"use strict";f();Km.exports=ReferenceError});var hu=A((Xw,t1)=>{"use strict";f();t1.exports=SyntaxError});var Qe=A((jw,e1)=>{"use strict";f();e1.exports=TypeError});var i1=A((Uw,r1)=>{"use strict";f();r1.exports=URIError});var co=A((Zw,n1)=>{"use strict";f();n1.exports=s(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==n||a.enumerable!==!0)return!1}return!0},"hasSymbols")});var xs=A((Jw,a1)=>{"use strict";f();var o1=typeof Symbol<"u"&&Symbol,l5=co();a1.exports=s(function(){return typeof o1!="function"||typeof Symbol!="function"||typeof o1("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l5()},"hasNativeSymbols")});var l1=A((tT,s1)=>{"use strict";f();var fu={__proto__:null,foo:{}},c5=Object;s1.exports=s(function(){return{__proto__:fu}.foo===fu.foo&&!(fu instanceof c5)},"hasProto")});var p1=A((iT,u1)=>{"use strict";f();var u5="Function.prototype.bind called on incompatible ",p5=Object.prototype.toString,h5=Math.max,f5="[object Function]",c1=s(function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<r.length;o+=1)i[o+t.length]=r[o];return i},"concatty"),d5=s(function(t,r){for(var i=[],n=r||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},"slicy"),m5=s(function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r},"joiny");u1.exports=s(function(t){var r=this;if(typeof r!="function"||p5.apply(r)!==f5)throw new TypeError(u5+r);for(var i=d5(arguments,1),n,o=s(function(){if(this instanceof n){var d=r.apply(this,c1(i,arguments));return Object(d)===d?d:this}return r.apply(t,c1(i,arguments))},"binder"),a=h5(0,r.length-i.length),l=[],c=0;c<a;c++)l[c]="$"+c;if(n=Function("binder","return function ("+m5(l,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var h=s(function(){},"Empty");h.prototype=r.prototype,n.prototype=new h,h.prototype=null}return n},"bind")});var Ss=A((aT,h1)=>{"use strict";f();var y5=p1();h1.exports=Function.prototype.bind||y5});var du=A((lT,f1)=>{"use strict";f();var g5=Function.prototype.call,v5=Object.prototype.hasOwnProperty,b5=Ss();f1.exports=b5.call(g5,v5)});var Se=A((uT,v1)=>{"use strict";f();var Z,C5=Wm(),x5=qm(),S5=Jm(),P5=Qm(),en=hu(),tn=Qe(),M5=i1(),g1=Function,mu=s(function(e){try{return g1('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ei=Object.getOwnPropertyDescriptor;if(ei)try{ei({},"")}catch{ei=null}var yu=s(function(){throw new tn},"throwTypeError"),w5=ei?function(){try{return arguments.callee,yu}catch{try{return ei(arguments,"callee").get}catch{return yu}}}():yu,Ki=xs()(),T5=l1()(),Ot=Object.getPrototypeOf||(T5?function(e){return e.__proto__}:null),Qi={},I5=typeof Uint8Array>"u"||!Ot?Z:Ot(Uint8Array),ri={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z:ArrayBuffer,"%ArrayIteratorPrototype%":Ki&&Ot?Ot([][Symbol.iterator]()):Z,"%AsyncFromSyncIteratorPrototype%":Z,"%AsyncFunction%":Qi,"%AsyncGenerator%":Qi,"%AsyncGeneratorFunction%":Qi,"%AsyncIteratorPrototype%":Qi,"%Atomics%":typeof Atomics>"u"?Z:Atomics,"%BigInt%":typeof BigInt>"u"?Z:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C5,"%eval%":eval,"%EvalError%":x5,"%Float32Array%":typeof Float32Array>"u"?Z:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z:FinalizationRegistry,"%Function%":g1,"%GeneratorFunction%":Qi,"%Int8Array%":typeof Int8Array>"u"?Z:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ki&&Ot?Ot(Ot([][Symbol.iterator]())):Z,"%JSON%":typeof JSON=="object"?JSON:Z,"%Map%":typeof Map>"u"?Z:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ki||!Ot?Z:Ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z:Promise,"%Proxy%":typeof Proxy>"u"?Z:Proxy,"%RangeError%":S5,"%ReferenceError%":P5,"%Reflect%":typeof Reflect>"u"?Z:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ki||!Ot?Z:Ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ki&&Ot?Ot(""[Symbol.iterator]()):Z,"%Symbol%":Ki?Symbol:Z,"%SyntaxError%":en,"%ThrowTypeError%":w5,"%TypedArray%":I5,"%TypeError%":tn,"%Uint8Array%":typeof Uint8Array>"u"?Z:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z:Uint32Array,"%URIError%":M5,"%WeakMap%":typeof WeakMap>"u"?Z:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z:WeakSet};if(Ot)try{null.error}catch(e){d1=Ot(Ot(e)),ri["%Error.prototype%"]=d1}var d1,E5=s(function e(t){var r;if(t==="%AsyncFunction%")r=mu("async function () {}");else if(t==="%GeneratorFunction%")r=mu("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=mu("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Ot&&(r=Ot(n.prototype))}return ri[t]=r,r},"doEval"),m1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},uo=Ss(),Ps=du(),_5=uo.call(Function.call,Array.prototype.concat),L5=uo.call(Function.apply,Array.prototype.splice),y1=uo.call(Function.call,String.prototype.replace),Ms=uo.call(Function.call,String.prototype.slice),O5=uo.call(Function.call,RegExp.prototype.exec),D5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A5=/\\(\\)?/g,N5=s(function(t){var r=Ms(t,0,1),i=Ms(t,-1);if(r==="%"&&i!=="%")throw new en("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new en("invalid intrinsic syntax, expected opening `%`");var n=[];return y1(t,D5,function(o,a,l,c){n[n.length]=l?y1(c,A5,"$1"):a||o}),n},"stringToPath"),k5=s(function(t,r){var i=t,n;if(Ps(m1,i)&&(n=m1[i],i="%"+n[0]+"%"),Ps(ri,i)){var o=ri[i];if(o===Qi&&(o=E5(i)),typeof o>"u"&&!r)throw new tn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new en("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");v1.exports=s(function(t,r){if(typeof t!="string"||t.length===0)throw new tn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new tn('"allowMissing" argument must be a boolean');if(O5(/^%?[^%]*%?$/,t)===null)throw new en("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=N5(t),n=i.length>0?i[0]:"",o=k5("%"+n+"%",r),a=o.name,l=o.value,c=!1,h=o.alias;h&&(n=h[0],L5(i,_5([0,1],h)));for(var d=1,m=!0;d<i.length;d+=1){var y=i[d],x=Ms(y,0,1),S=Ms(y,-1);if((x==='"'||x==="'"||x==="`"||S==='"'||S==="'"||S==="`")&&x!==S)throw new en("property names with quotes must have matching quotes");if((y==="constructor"||!m)&&(c=!0),n+="."+y,a="%"+n+"%",Ps(ri,a))l=ri[a];else if(l!=null){if(!(y in l)){if(!r)throw new tn("base intrinsic for "+t+" exists, but the property is not available.");return}if(ei&&d+1>=i.length){var P=ei(l,y);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?l=P.get:l=l[y]}else m=Ps(l,y),l=l[y];m&&!c&&(ri[a]=l)}}return l},"GetIntrinsic")});var Ts=A((fT,b1)=>{"use strict";f();var R5=Se(),ws=R5("%Object.defineProperty%",!0)||!1;if(ws)try{ws({},"a",{value:1})}catch{ws=!1}b1.exports=ws});var Es=A((mT,C1)=>{"use strict";f();var F5=Se(),Is=F5("%Object.getOwnPropertyDescriptor%",!0);if(Is)try{Is([],"length")}catch{Is=null}C1.exports=Is});var _s=A((gT,P1)=>{"use strict";f();var x1=Ts(),B5=hu(),rn=Qe(),S1=Es();P1.exports=s(function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new rn("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new rn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rn("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,c=!!S1&&S1(t,r);if(x1)x1(t,r,{configurable:a===null&&c?c.configurable:!a,enumerable:n===null&&c?c.enumerable:!n,value:i,writable:o===null&&c?c.writable:!o});else if(l||!n&&!o&&!a)t[r]=i;else throw new B5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")});var Ls=A((CT,w1)=>{"use strict";f();var gu=Ts(),M1=s(function(){return!!gu},"hasPropertyDescriptors");M1.hasArrayLengthDefineBug=s(function(){if(!gu)return null;try{return gu([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug");w1.exports=M1});var Er=A((PT,_1)=>{"use strict";f();var G5=Cs(),V5=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",H5=Object.prototype.toString,X5=Array.prototype.concat,T1=_s(),Y5=s(function(e){return typeof e=="function"&&H5.call(e)==="[object Function]"},"isFunction"),I1=Ls()(),j5=s(function(e,t,r,i){if(t in e){if(i===!0){if(e[t]===r)return}else if(!Y5(i)||!i())return}I1?T1(e,t,r,!0):T1(e,t,r)},"defineProperty"),E1=s(function(e,t){var r=arguments.length>2?arguments[2]:{},i=G5(t);V5&&(i=X5.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n<i.length;n+=1)j5(e,i[n],t[i[n]],r[i[n]])},"defineProperties");E1.supportsDescriptors=!!I1;_1.exports=E1});var N1=A((TT,A1)=>{"use strict";f();var z5=Se(),L1=_s(),U5=Ls()(),O1=Es(),D1=Qe(),W5=z5("%Math.floor%");A1.exports=s(function(t,r){if(typeof t!="function")throw new D1("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||W5(r)!==r)throw new D1("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&O1){var a=O1(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(U5?L1(t,"length",r,!0,!0):L1(t,"length",r)),t},"setFunctionLength")});var ii=A((_T,Os)=>{"use strict";f();var vu=Ss(),Ds=Se(),Z5=N1(),q5=Qe(),F1=Ds("%Function.prototype.apply%"),B1=Ds("%Function.prototype.call%"),G1=Ds("%Reflect.apply%",!0)||vu.call(B1,F1),k1=Ts(),$5=Ds("%Math.max%");Os.exports=s(function(t){if(typeof t!="function")throw new q5("a function is required");var r=G1(vu,B1,arguments);return Z5(r,1+$5(0,t.length-(arguments.length-1)),!0)},"callBind");var R1=s(function(){return G1(vu,F1,arguments)},"applyBind");k1?k1(Os.exports,"apply",{value:R1}):Os.exports.apply=R1});var le=A((DT,X1)=>{"use strict";f();var V1=Se(),H1=ii(),J5=H1(V1("String.prototype.indexOf"));X1.exports=s(function(t,r){var i=V1(t,!!r);return typeof i=="function"&&J5(t,".prototype.")>-1?H1(i):i},"callBoundIntrinsic")});var bu=A((kT,W1)=>{"use strict";f();var K5=Cs(),z1=co()(),U1=le(),Y1=Object,Q5=U1("Array.prototype.push"),j1=U1("Object.prototype.propertyIsEnumerable"),t4=z1?Object.getOwnPropertySymbols:null;W1.exports=s(function(t,r){if(t==null)throw new TypeError("target must be an object");var i=Y1(t);if(arguments.length===1)return i;for(var n=1;n<arguments.length;++n){var o=Y1(arguments[n]),a=K5(o),l=z1&&(Object.getOwnPropertySymbols||t4);if(l)for(var c=l(o),h=0;h<c.length;++h){var d=c[h];j1(o,d)&&Q5(a,d)}for(var m=0;m<a.length;++m){var y=a[m];if(j1(o,y)){var x=o[y];i[y]=x}}}return i},"assign")});var xu=A((BT,Z1)=>{"use strict";f();var Cu=bu(),e4=s(function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i<t.length;++i)r[t[i]]=t[i];var n=Object.assign({},r),o="";for(var a in n)o+=a;return e!==o},"lacksProperEnumerationOrder"),r4=s(function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},"assignHasPendingExceptions");Z1.exports=s(function(){return!Object.assign||e4()||r4()?Cu:Object.assign},"getPolyfill")});var $1=A((HT,q1)=>{"use strict";f();var i4=Er(),n4=xu();q1.exports=s(function(){var t=n4();return i4(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},"shimAssign")});var ty=A((jT,Q1)=>{"use strict";f();var o4=Er(),a4=ii(),s4=bu(),J1=xu(),l4=$1(),c4=a4.apply(J1()),K1=s(function(t,r){return c4(Object,arguments)},"assign");o4(K1,{getPolyfill:J1,implementation:s4,shim:l4});Q1.exports=K1});var ry=A((WT,ey)=>{"use strict";f();var ho=s(function(){return typeof s(function(){},"f").name=="string"},"functionsHaveNames"),po=Object.getOwnPropertyDescriptor;if(po)try{po([],"length")}catch{po=null}ho.functionsHaveConfigurableNames=s(function(){if(!ho()||!po)return!1;var t=po(function(){},"name");return!!t&&!!t.configurable},"functionsHaveConfigurableNames");var u4=Function.prototype.bind;ho.boundFunctionsHaveNames=s(function(){return ho()&&typeof u4=="function"&&s(function(){},"f").bind().name!==""},"boundFunctionsHaveNames");ey.exports=ho});var oy=A(($T,ny)=>{"use strict";f();var iy=_s(),p4=Ls()(),h4=ry().functionsHaveConfigurableNames(),f4=Qe();ny.exports=s(function(t,r){if(typeof t!="function")throw new f4("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return(!i||h4)&&(p4?iy(t,"name",r,!0,!0):iy(t,"name",r)),t},"setFunctionName")});var Su=A((QT,ay)=>{"use strict";f();var d4=oy(),m4=Qe(),y4=Object;ay.exports=d4(s(function(){if(this==null||this!==y4(this))throw new m4("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"flags"),"get flags",!0)});var Pu=A((rI,sy)=>{"use strict";f();var g4=Su(),v4=Er().supportsDescriptors,b4=Object.getOwnPropertyDescriptor;sy.exports=s(function(){if(v4&&/a/mig.flags==="gim"){var t=b4(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(i,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return g4},"getPolyfill")});var uy=A((oI,cy)=>{"use strict";f();var C4=Er().supportsDescriptors,x4=Pu(),S4=Object.getOwnPropertyDescriptor,P4=Object.defineProperty,M4=TypeError,ly=Object.getPrototypeOf,w4=/a/;cy.exports=s(function(){if(!C4||!ly)throw new M4("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=x4(),r=ly(w4),i=S4(r,"flags");return(!i||i.get!==t)&&P4(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},"shimFlags")});var dy=A((lI,fy)=>{"use strict";f();var T4=Er(),I4=ii(),E4=Su(),py=Pu(),_4=uy(),hy=I4(py());T4(hy,{getPolyfill:py,implementation:E4,shim:_4});fy.exports=hy});var _r=A((uI,my)=>{"use strict";f();var L4=co();my.exports=s(function(){return L4()&&!!Symbol.toStringTag},"hasToStringTagShams")});var wu=A((fI,gy)=>{"use strict";f();var O4=_r()(),D4=le(),Mu=D4("Object.prototype.toString"),As=s(function(t){return O4&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Mu(t)==="[object Arguments]"},"isArguments"),yy=s(function(t){return As(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Mu(t)!=="[object Array]"&&Mu(t.callee)==="[object Function]"},"isArguments"),A4=function(){return As(arguments)}();As.isLegacyArguments=yy;gy.exports=A4?As:yy});var vy=A(()=>{f()});var By=A((bI,Fy)=>{f();var ku=typeof Map=="function"&&Map.prototype,Tu=Object.getOwnPropertyDescriptor&&ku?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ks=ku&&Tu&&typeof Tu.get=="function"?Tu.get:null,by=ku&&Map.prototype.forEach,Ru=typeof Set=="function"&&Set.prototype,Iu=Object.getOwnPropertyDescriptor&&Ru?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Rs=Ru&&Iu&&typeof Iu.get=="function"?Iu.get:null,Cy=Ru&&Set.prototype.forEach,N4=typeof WeakMap=="function"&&WeakMap.prototype,mo=N4?WeakMap.prototype.has:null,k4=typeof WeakSet=="function"&&WeakSet.prototype,yo=k4?WeakSet.prototype.has:null,R4=typeof WeakRef=="function"&&WeakRef.prototype,xy=R4?WeakRef.prototype.deref:null,F4=Boolean.prototype.valueOf,B4=Object.prototype.toString,G4=Function.prototype.toString,V4=String.prototype.match,Fu=String.prototype.slice,Or=String.prototype.replace,H4=String.prototype.toUpperCase,Sy=String.prototype.toLowerCase,Oy=RegExp.prototype.test,Py=Array.prototype.concat,Be=Array.prototype.join,X4=Array.prototype.slice,My=Math.floor,Lu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Eu=Object.getOwnPropertySymbols,Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,nn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Vt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===nn||!0)?Symbol.toStringTag:null,Dy=Object.prototype.propertyIsEnumerable,wy=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ty(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Oy.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var i=e<0?-My(-e):My(e);if(i!==e){var n=String(i),o=Fu.call(t,n.length+1);return Or.call(n,r,"$&_")+"."+Or.call(Or.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Or.call(t,r,"$&_")}s(Ty,"addNumericSeparator");var Du=vy(),Iy=Du.custom,Ey=Ny(Iy)?Iy:null;Fy.exports=s(function e(t,r,i,n){var o=r||{};if(Lr(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Lr(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Lr(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Lr(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Lr(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ry(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?Ty(t,c):c}if(typeof t=="bigint"){var h=String(t)+"n";return l?Ty(t,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof t=="object")return Au(t)?"[Array]":"[Object]";var m=a7(o,i);if(typeof n>"u")n=[];else if(ky(n,t)>=0)return"[Circular]";function y(lt,ht,gt){if(ht&&(n=X4.call(n),n.push(ht)),gt){var At={depth:o.depth};return Lr(o,"quoteStyle")&&(At.quoteStyle=o.quoteStyle),e(lt,At,i+1,n)}return e(lt,o,i+1,n)}if(s(y,"inspect"),typeof t=="function"&&!_y(t)){var x=J4(t),S=Ns(t,y);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(S.length>0?" { "+Be.call(S,", ")+" }":"")}if(Ny(t)){var P=nn?Or.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ou.call(t);return typeof t=="object"&&!nn?fo(P):P}if(i7(t)){for(var g="<"+Sy.call(String(t.nodeName)),C=t.attributes||[],M=0;M<C.length;M++)g+=" "+C[M].name+"="+Ay(Y4(C[M].value),"double",o);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Sy.call(String(t.nodeName))+">",g}if(Au(t)){if(t.length===0)return"[]";var T=Ns(t,y);return m&&!o7(T)?"["+Nu(T,m)+"]":"[ "+Be.call(T,", ")+" ]"}if(z4(t)){var w=Ns(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Dy.call(t,"cause")?"{ ["+String(t)+"] "+Be.call(Py.call("[cause]: "+y(t.cause),w),", ")+" }":w.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Be.call(w,", ")+" }"}if(typeof t=="object"&&a){if(Ey&&typeof t[Ey]=="function"&&Du)return Du(t,{depth:d-i});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(K4(t)){var E=[];return by&&by.call(t,function(lt,ht){E.push(y(ht,t,!0)+" => "+y(lt,t))}),Ly("Map",ks.call(t),E,m)}if(e7(t)){var L=[];return Cy&&Cy.call(t,function(lt){L.push(y(lt,t))}),Ly("Set",Rs.call(t),L,m)}if(Q4(t))return _u("WeakMap");if(r7(t))return _u("WeakSet");if(t7(t))return _u("WeakRef");if(W4(t))return fo(y(Number(t)));if(q4(t))return fo(y(Lu.call(t)));if(Z4(t))return fo(F4.call(t));if(U4(t))return fo(y(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===global)return"{ [object globalThis] }";if(!j4(t)&&!_y(t)){var R=Ns(t,y),F=wy?wy(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",G=!F&&Vt&&Object(t)===t&&Vt in t?Fu.call(Dr(t),8,-1):k?"Object":"",H=F||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Q=H+(G||k?"["+Be.call(Py.call([],G||[],k||[]),": ")+"] ":"");return R.length===0?Q+"{}":m?Q+"{"+Nu(R,m)+"}":Q+"{ "+Be.call(R,", ")+" }"}return String(t)},"inspect_");function Ay(e,t,r){var i=(r.quoteStyle||t)==="double"?'"':"'";return i+e+i}s(Ay,"wrapQuotes");function Y4(e){return Or.call(String(e),/"/g,"&quot;")}s(Y4,"quote");function Au(e){return Dr(e)==="[object Array]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(Au,"isArray");function j4(e){return Dr(e)==="[object Date]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(j4,"isDate");function _y(e){return Dr(e)==="[object RegExp]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(_y,"isRegExp");function z4(e){return Dr(e)==="[object Error]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(z4,"isError");function U4(e){return Dr(e)==="[object String]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(U4,"isString");function W4(e){return Dr(e)==="[object Number]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(W4,"isNumber");function Z4(e){return Dr(e)==="[object Boolean]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(Z4,"isBoolean");function Ny(e){if(nn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ou)return!1;try{return Ou.call(e),!0}catch{}return!1}s(Ny,"isSymbol");function q4(e){if(!e||typeof e!="object"||!Lu)return!1;try{return Lu.call(e),!0}catch{}return!1}s(q4,"isBigInt");var $4=Object.prototype.hasOwnProperty||function(e){return e in this};function Lr(e,t){return $4.call(e,t)}s(Lr,"has");function Dr(e){return B4.call(e)}s(Dr,"toStr");function J4(e){if(e.name)return e.name;var t=V4.call(G4.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}s(J4,"nameOf");function ky(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}s(ky,"indexOf");function K4(e){if(!ks||!e||typeof e!="object")return!1;try{ks.call(e);try{Rs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}s(K4,"isMap");function Q4(e){if(!mo||!e||typeof e!="object")return!1;try{mo.call(e,mo);try{yo.call(e,yo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}s(Q4,"isWeakMap");function t7(e){if(!xy||!e||typeof e!="object")return!1;try{return xy.call(e),!0}catch{}return!1}s(t7,"isWeakRef");function e7(e){if(!Rs||!e||typeof e!="object")return!1;try{Rs.call(e);try{ks.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}s(e7,"isSet");function r7(e){if(!yo||!e||typeof e!="object")return!1;try{yo.call(e,yo);try{mo.call(e,mo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}s(r7,"isWeakSet");function i7(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}s(i7,"isElement");function Ry(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return Ry(Fu.call(e,0,t.maxStringLength),t)+i}var n=Or.call(Or.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,n7);return Ay(n,"single",t)}s(Ry,"inspectString");function n7(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+H4.call(t.toString(16))}s(n7,"lowbyte");function fo(e){return"Object("+e+")"}s(fo,"markBoxed");function _u(e){return e+" { ? }"}s(_u,"weakCollectionOf");function Ly(e,t,r,i){var n=i?Nu(r,i):Be.call(r,", ");return e+" ("+t+") {"+n+"}"}s(Ly,"collectionOf");function o7(e){for(var t=0;t<e.length;t++)if(ky(e[t],`
2
- `)>=0)return!1;return!0}s(o7,"singleLineValues");function a7(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Be.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Be.call(Array(t+1),r)}}s(a7,"getIndent");function Nu(e,t){if(e.length===0)return"";var r=`
1
+ import{j as cm}from"./chunk-5H3MOETP.js";import{a as Mr}from"./chunk-MO5376RR.js";import{A as Ud,B as Wd,C as Zd,D as Y,E as Ne,F as qd,Fa as Ki,G as ti,H as qi,I as Ce,Ia as us,J as Mt,Ja as sm,L as xr,M as to,Ma as lm,O as Ft,P as $d,Pa as Pr,Q as eo,R as Jd,S as Kd,T as $i,W as Qd,X as tm,Y as ss,a as as,ba as em,c as Kn,d as Qn,ea as ls,fa as cs,ga as rm,ia as ro,m as jd,n as zd,oa as im,pa as Sr,qa as Xc,ra as nm,sa as ke,ta as Re,u as Zi,ua as om,va as am,w as at,x as z,xa as Ji}from"./chunk-QTYWBEVO.js";import{a as s,b as N,d as Cr,e as v,f as u,g as I,h as _,i as j,j as f,k as b}from"./chunk-6ZWKZHHA.js";var Sm=N((ru,iu)=>{f();(function(e,t){typeof ru=="object"&&typeof iu<"u"?iu.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(ru,function(){"use strict";function e(g,C,M,T,w){s(function E(L,R,F,k,G){for(;k>F;){if(k-F>600){var H=k-F+1,Q=R-F+1,lt=Math.log(H),ht=.5*Math.exp(2*lt/3),yt=.5*Math.sqrt(lt*ht*(H-ht)/H)*(Q-H/2<0?-1:1),At=Math.max(F,Math.floor(R-Q*ht/H+yt)),ve=Math.min(k,Math.floor(R+(H-Q)*ht/H+yt));E(L,R,At,ve,G)}var Rt=L[R],ut=F,Ct=k;for(t(L,F,R),G(L[k],Rt)>0&&t(L,F,k);ut<Ct;){for(t(L,ut,Ct),ut++,Ct--;G(L[ut],Rt)<0;)ut++;for(;G(L[Ct],Rt)>0;)Ct--}G(L[F],Rt)===0?t(L,F,Ct):t(L,++Ct,k),Ct<=R&&(F=Ct+1),R<=Ct&&(k=Ct-1)}},"t")(g,C,M||0,T||g.length-1,w||r)}s(e,"t");function t(g,C,M){var T=g[C];g[C]=g[M],g[M]=T}s(t,"i");function r(g,C){return g<C?-1:g>C?1:0}s(r,"n");var i=s(function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function n(g,C,M){if(!M)return C.indexOf(g);for(var T=0;T<C.length;T++)if(M(g,C[T]))return T;return-1}s(n,"e");function o(g,C){a(g,0,g.children.length,C,g)}s(o,"a");function a(g,C,M,T,w){w||(w=S(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var E=C;E<M;E++){var L=g.children[E];l(w,g.leaf?T(L):L)}return w}s(a,"h");function l(g,C){return g.minX=Math.min(g.minX,C.minX),g.minY=Math.min(g.minY,C.minY),g.maxX=Math.max(g.maxX,C.maxX),g.maxY=Math.max(g.maxY,C.maxY),g}s(l,"o");function c(g,C){return g.minX-C.minX}s(c,"s");function h(g,C){return g.minY-C.minY}s(h,"l");function d(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}s(d,"f");function y(g){return g.maxX-g.minX+(g.maxY-g.minY)}s(y,"u");function m(g,C){return g.minX<=C.minX&&g.minY<=C.minY&&C.maxX<=g.maxX&&C.maxY<=g.maxY}s(m,"m");function x(g,C){return C.minX<=g.maxX&&C.minY<=g.maxY&&C.maxX>=g.minX&&C.maxY>=g.minY}s(x,"c");function S(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}s(S,"p");function P(g,C,M,T,w){for(var E=[C,M];E.length;)if(!((M=E.pop())-(C=E.pop())<=T)){var L=C+Math.ceil((M-C)/T/2)*T;e(g,L,C,M,w),E.push(C,L,L,M)}}return s(P,"d"),i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(g){var C=this.data,M=[];if(!x(g,C))return M;for(var T=this.toBBox,w=[];C;){for(var E=0;E<C.children.length;E++){var L=C.children[E],R=C.leaf?T(L):L;x(g,R)&&(C.leaf?M.push(L):m(g,R)?this._all(L,M):w.push(L))}C=w.pop()}return M},i.prototype.collides=function(g){var C=this.data;if(!x(g,C))return!1;for(var M=[];C;){for(var T=0;T<C.children.length;T++){var w=C.children[T],E=C.leaf?this.toBBox(w):w;if(x(g,E)){if(C.leaf||m(g,E))return!0;M.push(w)}}C=M.pop()}return!1},i.prototype.load=function(g){if(!g||!g.length)return this;if(g.length<this._minEntries){for(var C=0;C<g.length;C++)this.insert(g[C]);return this}var M=this._build(g.slice(),0,g.length-1,0);if(this.data.children.length)if(this.data.height===M.height)this._splitRoot(this.data,M);else{if(this.data.height<M.height){var T=this.data;this.data=M,M=T}this._insert(M,this.data.height-M.height-1,!0)}else this.data=M;return this},i.prototype.insert=function(g){return g&&this._insert(g,this.data.height-1),this},i.prototype.clear=function(){return this.data=S([]),this},i.prototype.remove=function(g,C){if(!g)return this;for(var M,T,w,E=this.data,L=this.toBBox(g),R=[],F=[];E||R.length;){if(E||(E=R.pop(),T=R[R.length-1],M=F.pop(),w=!0),E.leaf){var k=n(g,E.children,C);if(k!==-1)return E.children.splice(k,1),R.push(E),this._condense(R),this}w||E.leaf||!m(E,L)?T?(M++,E=T.children[M],w=!1):E=null:(R.push(E),F.push(M),M=0,T=E,E=E.children[0])}return this},i.prototype.toBBox=function(g){return g},i.prototype.compareMinX=function(g,C){return g.minX-C.minX},i.prototype.compareMinY=function(g,C){return g.minY-C.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(g){return this.data=g,this},i.prototype._all=function(g,C){for(var M=[];g;)g.leaf?C.push.apply(C,g.children):M.push.apply(M,g.children),g=M.pop();return C},i.prototype._build=function(g,C,M,T){var w,E=M-C+1,L=this._maxEntries;if(E<=L)return o(w=S(g.slice(C,M+1)),this.toBBox),w;T||(T=Math.ceil(Math.log(E)/Math.log(L)),L=Math.ceil(E/Math.pow(L,T-1))),(w=S([])).leaf=!1,w.height=T;var R=Math.ceil(E/L),F=R*Math.ceil(Math.sqrt(L));P(g,C,M,F,this.compareMinX);for(var k=C;k<=M;k+=F){var G=Math.min(k+F-1,M);P(g,k,G,R,this.compareMinY);for(var H=k;H<=G;H+=R){var Q=Math.min(H+R-1,G);w.children.push(this._build(g,H,Q,T-1))}}return o(w,this.toBBox),w},i.prototype._chooseSubtree=function(g,C,M,T){for(;T.push(C),!C.leaf&&T.length-1!==M;){for(var w=1/0,E=1/0,L=void 0,R=0;R<C.children.length;R++){var F=C.children[R],k=d(F),G=(H=g,Q=F,(Math.max(Q.maxX,H.maxX)-Math.min(Q.minX,H.minX))*(Math.max(Q.maxY,H.maxY)-Math.min(Q.minY,H.minY))-k);G<E?(E=G,w=k<w?k:w,L=F):G===E&&k<w&&(w=k,L=F)}C=L||C.children[0]}var H,Q;return C},i.prototype._insert=function(g,C,M){var T=M?g:this.toBBox(g),w=[],E=this._chooseSubtree(T,this.data,C,w);for(E.children.push(g),l(E,T);C>=0&&w[C].children.length>this._maxEntries;)this._split(w,C),C--;this._adjustParentBBoxes(T,w,C)},i.prototype._split=function(g,C){var M=g[C],T=M.children.length,w=this._minEntries;this._chooseSplitAxis(M,w,T);var E=this._chooseSplitIndex(M,w,T),L=S(M.children.splice(E,M.children.length-E));L.height=M.height,L.leaf=M.leaf,o(M,this.toBBox),o(L,this.toBBox),C?g[C-1].children.push(L):this._splitRoot(M,L)},i.prototype._splitRoot=function(g,C){this.data=S([g,C]),this.data.height=g.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(g,C,M){for(var T,w,E,L,R,F,k,G=1/0,H=1/0,Q=C;Q<=M-C;Q++){var lt=a(g,0,Q,this.toBBox),ht=a(g,Q,M,this.toBBox),yt=(w=lt,E=ht,L=void 0,R=void 0,F=void 0,k=void 0,L=Math.max(w.minX,E.minX),R=Math.max(w.minY,E.minY),F=Math.min(w.maxX,E.maxX),k=Math.min(w.maxY,E.maxY),Math.max(0,F-L)*Math.max(0,k-R)),At=d(lt)+d(ht);yt<G?(G=yt,T=Q,H=At<H?At:H):yt===G&&At<H&&(H=At,T=Q)}return T||M-C},i.prototype._chooseSplitAxis=function(g,C,M){var T=g.leaf?this.compareMinX:c,w=g.leaf?this.compareMinY:h;this._allDistMargin(g,C,M,T)<this._allDistMargin(g,C,M,w)&&g.children.sort(T)},i.prototype._allDistMargin=function(g,C,M,T){g.children.sort(T);for(var w=this.toBBox,E=a(g,0,C,w),L=a(g,M-C,M,w),R=y(E)+y(L),F=C;F<M-C;F++){var k=g.children[F];l(E,g.leaf?w(k):k),R+=y(E)}for(var G=M-C-1;G>=C;G--){var H=g.children[G];l(L,g.leaf?w(H):H),R+=y(L)}return R},i.prototype._adjustParentBBoxes=function(g,C,M){for(var T=M;T>=0;T--)l(C[T],g)},i.prototype._condense=function(g){for(var C=g.length-1,M=void 0;C>=0;C--)g[C].children.length===0?C>0?(M=g[C-1].children).splice(M.indexOf(g[C]),1):this.clear():o(g[C],this.toBBox)},i})});var lu=N(V=>{"use strict";f();Object.defineProperty(V,"__esModule",{value:!0});V.earthRadius=63710088e-1;V.factors={centimeters:V.earthRadius*100,centimetres:V.earthRadius*100,degrees:V.earthRadius/111325,feet:V.earthRadius*3.28084,inches:V.earthRadius*39.37,kilometers:V.earthRadius/1e3,kilometres:V.earthRadius/1e3,meters:V.earthRadius,metres:V.earthRadius,miles:V.earthRadius/1609.344,millimeters:V.earthRadius*1e3,millimetres:V.earthRadius*1e3,nauticalmiles:V.earthRadius/1852,radians:1,yards:V.earthRadius*1.0936};V.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/V.earthRadius,yards:1.0936133};V.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 Ir(e,t,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(Ir,"feature");V.feature=Ir;function F3(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return nu(t).geometry;case"LineString":return au(t).geometry;case"Polygon":return ou(t).geometry;case"MultiPoint":return Mm(t).geometry;case"MultiLineString":return Pm(t).geometry;case"MultiPolygon":return wm(t).geometry;default:throw new Error(e+" is invalid")}}s(F3,"geometry");V.geometry=F3;function nu(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ys(e[0])||!ys(e[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:e};return Ir(i,t,r)}s(nu,"point");V.point=nu;function B3(e,t,r){return r===void 0&&(r={}),gs(e.map(function(i){return nu(i,t)}),r)}s(B3,"points");V.points=B3;function ou(e,t,r){r===void 0&&(r={});for(var i=0,n=e;i<n.length;i++){var o=n[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:e};return Ir(l,t,r)}s(ou,"polygon");V.polygon=ou;function G3(e,t,r){return r===void 0&&(r={}),gs(e.map(function(i){return ou(i,t)}),r)}s(G3,"polygons");V.polygons=G3;function au(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:e};return Ir(i,t,r)}s(au,"lineString");V.lineString=au;function V3(e,t,r){return r===void 0&&(r={}),gs(e.map(function(i){return au(i,t)}),r)}s(V3,"lineStrings");V.lineStrings=V3;function gs(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(gs,"featureCollection");V.featureCollection=gs;function Pm(e,t,r){r===void 0&&(r={});var i={type:"MultiLineString",coordinates:e};return Ir(i,t,r)}s(Pm,"multiLineString");V.multiLineString=Pm;function Mm(e,t,r){r===void 0&&(r={});var i={type:"MultiPoint",coordinates:e};return Ir(i,t,r)}s(Mm,"multiPoint");V.multiPoint=Mm;function wm(e,t,r){r===void 0&&(r={});var i={type:"MultiPolygon",coordinates:e};return Ir(i,t,r)}s(wm,"multiPolygon");V.multiPolygon=wm;function H3(e,t,r){r===void 0&&(r={});var i={type:"GeometryCollection",geometries:e};return Ir(i,t,r)}s(H3,"geometryCollection");V.geometryCollection=H3;function X3(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}s(X3,"round");V.round=X3;function Tm(e,t){t===void 0&&(t="kilometers");var r=V.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(Tm,"radiansToLength");V.radiansToLength=Tm;function su(e,t){t===void 0&&(t="kilometers");var r=V.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(su,"lengthToRadians");V.lengthToRadians=su;function Y3(e,t){return Im(su(e,t))}s(Y3,"lengthToDegrees");V.lengthToDegrees=Y3;function j3(e){var t=e%360;return t<0&&(t+=360),t}s(j3,"bearingToAzimuth");V.bearingToAzimuth=j3;function Im(e){var t=e%(2*Math.PI);return t*180/Math.PI}s(Im,"radiansToDegrees");V.radiansToDegrees=Im;function z3(e){var t=e%360;return t*Math.PI/180}s(z3,"degreesToRadians");V.degreesToRadians=z3;function U3(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return Tm(su(e,t),r)}s(U3,"convertLength");V.convertLength=U3;function W3(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=V.areaFactors[t];if(!i)throw new Error("invalid original units");var n=V.areaFactors[r];if(!n)throw new Error("invalid final units");return e/i*n}s(W3,"convertArea");V.convertArea=W3;function ys(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(ys,"isNumber");V.isNumber=ys;function Z3(e){return!!e&&e.constructor===Object}s(Z3,"isObject");V.isObject=Z3;function q3(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!ys(t))throw new Error("bbox must only contain numbers")})}s(q3,"validateBBox");V.validateBBox=q3;function $3(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")}s($3,"validateId");V.validateId=$3});var Dm=N(wt=>{"use strict";f();Object.defineProperty(wt,"__esModule",{value:!0});var Gt=lu();function ao(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,y=0,m,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,m=h?h.type==="GeometryCollection":!1,l=m?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=m?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,y,C,T,w)===!1)return!1;y++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],y,C,T,w)===!1)return!1;y++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],y,C,T,w)===!1)return!1;y++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],y,C,T,w)===!1)return!1;y++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(ao(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(ao,"coordEach");function J3(e,t,r,i){var n=r;return ao(e,function(o,a,l,c,h){a===0&&r===void 0?n=o:n=t(n,o,a,l,c,h)},i),n}s(J3,"coordReduce");function Em(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}s(Em,"propEach");function K3(e,t,r){var i=r;return Em(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(K3,"propReduce");function _m(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(_m,"featureEach");function Q3(e,t,r){var i=r;return _m(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(Q3,"featureReduce");function t5(e){var t=[];return ao(e,function(r){t.push(r)}),t}s(t5,"coordAll");function cu(e,t){var r,i,n,o,a,l,c,h,d,y,m=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,y=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,m,h,d,y)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,m,h,d,y)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],m,h,d,y)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}m++}}s(cu,"geomEach");function e5(e,t,r){var i=r;return cu(e,function(n,o,a,l,c){o===0&&r===void 0?i=n:i=t(i,n,o,a,l,c)}),i}s(e5,"geomReduce");function vs(e,t){cu(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(Gt.feature(r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],y={type:c,coordinates:d};if(t(Gt.feature(y,n),i,h)===!1)return!1}})}s(vs,"flattenEach");function r5(e,t,r){var i=r;return vs(e,function(n,o,a){o===0&&a===0&&r===void 0?i=n:i=t(i,n,o,a)}),i}s(r5,"flattenReduce");function Lm(e,t){vs(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(ao(r,function(y,m,x,S,P){if(l===void 0||i>c||S>h||P>d){l=y,c=i,h=S,d=P,o=0;return}var g=Gt.lineString([l,y],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=y})===!1)return!1}}})}s(Lm,"segmentEach");function i5(e,t,r){var i=r,n=!1;return Lm(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(i5,"segmentReduce");function Om(e,t){if(!e)throw new Error("geojson is required");vs(e,function(r,i,n){if(r.geometry!==null){var o=r.geometry.type,a=r.geometry.coordinates;switch(o){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<a.length;l++)if(t(Gt.lineString(a[l],r.properties),i,n,l)===!1)return!1;break}}})}s(Om,"lineEach");function n5(e,t,r){var i=r;return Om(e,function(n,o,a,l){o===0&&r===void 0?i=n:i=t(i,n,o,a,l)}),i}s(n5,"lineReduce");function o5(e,t){if(t=t||{},!Gt.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=c.length+o-1),Gt.lineString([c[o],c[o+1]],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o-1),Gt.lineString([c[n][o],c[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o-1),Gt.lineString([c[i][o],c[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o-1),Gt.lineString([c[i][n][o],c[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}s(o5,"findSegment");function a5(e,t){if(t=t||{},!Gt.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":return Gt.point(c,a,t);case"MultiPoint":return i<0&&(i=c.length+i),Gt.point(c[i],a,t);case"LineString":return o<0&&(o=c.length+o),Gt.point(c[o],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o),Gt.point(c[n][o],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),Gt.point(c[i][o],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o),Gt.point(c[i][n][o],a,t)}throw new Error("geojson is invalid")}s(a5,"findPoint");wt.coordAll=t5;wt.coordEach=ao;wt.coordReduce=J3;wt.featureEach=_m;wt.featureReduce=Q3;wt.findPoint=a5;wt.findSegment=o5;wt.flattenEach=vs;wt.flattenReduce=r5;wt.geomEach=cu;wt.geomReduce=e5;wt.lineEach=Om;wt.lineReduce=n5;wt.propEach=Em;wt.propReduce=K3;wt.segmentEach=Lm;wt.segmentReduce=i5});var uu=N((Tw,Nm)=>{"use strict";f();var Am=Object.prototype.toString;Nm.exports=s(function(t){var r=Am.call(t),i=r==="[object Arguments]";return i||(i=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Am.call(t.callee)==="[object Function]"),i},"isArguments")});var Ym=N((_w,Xm)=>{"use strict";f();var Hm;Object.keys||(so=Object.prototype.hasOwnProperty,pu=Object.prototype.toString,km=uu(),hu=Object.prototype.propertyIsEnumerable,Rm=!hu.call({toString:null},"toString"),Fm=hu.call(function(){},"prototype"),lo=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],bs=s(function(e){var t=e.constructor;return t&&t.prototype===e},"equalsConstructorPrototype"),Bm={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Gm=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!Bm["$"+e]&&so.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{bs(window[e])}catch{return!0}}catch{return!0}return!1}(),Vm=s(function(e){if(typeof window>"u"||!Gm)return bs(e);try{return bs(e)}catch{return!1}},"equalsConstructorPrototypeIfNotBuggy"),Hm=s(function(t){var r=t!==null&&typeof t=="object",i=pu.call(t)==="[object Function]",n=km(t),o=r&&pu.call(t)==="[object String]",a=[];if(!r&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var l=Fm&&i;if(o&&t.length>0&&!so.call(t,0))for(var c=0;c<t.length;++c)a.push(String(c));if(n&&t.length>0)for(var h=0;h<t.length;++h)a.push(String(h));else for(var d in t)!(l&&d==="prototype")&&so.call(t,d)&&a.push(String(d));if(Rm)for(var y=Vm(t),m=0;m<lo.length;++m)!(y&&lo[m]==="constructor")&&so.call(t,lo[m])&&a.push(lo[m]);return a},"keys"));var so,pu,km,hu,Rm,Fm,lo,bs,Bm,Gm,Vm;Xm.exports=Hm});var xs=N((Dw,Um)=>{"use strict";f();var s5=Array.prototype.slice,l5=uu(),jm=Object.keys,Cs=jm?s(function(t){return jm(t)},"keys"):Ym(),zm=Object.keys;Cs.shim=s(function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=s(function(i){return l5(i)?zm(s5.call(i)):zm(i)},"keys"))}else Object.keys=Cs;return Object.keys||Cs},"shimObjectKeys");Um.exports=Cs});var Zm=N((kw,Wm)=>{"use strict";f();Wm.exports=Error});var $m=N((Fw,qm)=>{"use strict";f();qm.exports=EvalError});var Km=N((Gw,Jm)=>{"use strict";f();Jm.exports=RangeError});var t1=N((Hw,Qm)=>{"use strict";f();Qm.exports=ReferenceError});var fu=N((Yw,e1)=>{"use strict";f();e1.exports=SyntaxError});var Qe=N((zw,r1)=>{"use strict";f();r1.exports=TypeError});var n1=N((Ww,i1)=>{"use strict";f();i1.exports=URIError});var co=N((qw,o1)=>{"use strict";f();o1.exports=s(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==n||a.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ss=N((Kw,s1)=>{"use strict";f();var a1=typeof Symbol<"u"&&Symbol,c5=co();s1.exports=s(function(){return typeof a1!="function"||typeof Symbol!="function"||typeof a1("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:c5()},"hasNativeSymbols")});var c1=N((eT,l1)=>{"use strict";f();var du={__proto__:null,foo:{}},u5=Object;l1.exports=s(function(){return{__proto__:du}.foo===du.foo&&!(du instanceof u5)},"hasProto")});var h1=N((nT,p1)=>{"use strict";f();var p5="Function.prototype.bind called on incompatible ",h5=Object.prototype.toString,f5=Math.max,d5="[object Function]",u1=s(function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<r.length;o+=1)i[o+t.length]=r[o];return i},"concatty"),m5=s(function(t,r){for(var i=[],n=r||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},"slicy"),y5=s(function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r},"joiny");p1.exports=s(function(t){var r=this;if(typeof r!="function"||h5.apply(r)!==d5)throw new TypeError(p5+r);for(var i=m5(arguments,1),n,o=s(function(){if(this instanceof n){var d=r.apply(this,u1(i,arguments));return Object(d)===d?d:this}return r.apply(t,u1(i,arguments))},"binder"),a=f5(0,r.length-i.length),l=[],c=0;c<a;c++)l[c]="$"+c;if(n=Function("binder","return function ("+y5(l,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var h=s(function(){},"Empty");h.prototype=r.prototype,n.prototype=new h,h.prototype=null}return n},"bind")});var Ps=N((sT,f1)=>{"use strict";f();var g5=h1();f1.exports=Function.prototype.bind||g5});var mu=N((cT,d1)=>{"use strict";f();var v5=Function.prototype.call,b5=Object.prototype.hasOwnProperty,C5=Ps();d1.exports=C5.call(v5,b5)});var Se=N((pT,b1)=>{"use strict";f();var Z,x5=Zm(),S5=$m(),P5=Km(),M5=t1(),rn=fu(),en=Qe(),w5=n1(),v1=Function,yu=s(function(e){try{return v1('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ei=Object.getOwnPropertyDescriptor;if(ei)try{ei({},"")}catch{ei=null}var gu=s(function(){throw new en},"throwTypeError"),T5=ei?function(){try{return arguments.callee,gu}catch{try{return ei(arguments,"callee").get}catch{return gu}}}():gu,Qi=Ss()(),I5=c1()(),Ot=Object.getPrototypeOf||(I5?function(e){return e.__proto__}:null),tn={},E5=typeof Uint8Array>"u"||!Ot?Z:Ot(Uint8Array),ri={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z:ArrayBuffer,"%ArrayIteratorPrototype%":Qi&&Ot?Ot([][Symbol.iterator]()):Z,"%AsyncFromSyncIteratorPrototype%":Z,"%AsyncFunction%":tn,"%AsyncGenerator%":tn,"%AsyncGeneratorFunction%":tn,"%AsyncIteratorPrototype%":tn,"%Atomics%":typeof Atomics>"u"?Z:Atomics,"%BigInt%":typeof BigInt>"u"?Z:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":x5,"%eval%":eval,"%EvalError%":S5,"%Float32Array%":typeof Float32Array>"u"?Z:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z:FinalizationRegistry,"%Function%":v1,"%GeneratorFunction%":tn,"%Int8Array%":typeof Int8Array>"u"?Z:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qi&&Ot?Ot(Ot([][Symbol.iterator]())):Z,"%JSON%":typeof JSON=="object"?JSON:Z,"%Map%":typeof Map>"u"?Z:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Qi||!Ot?Z:Ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z:Promise,"%Proxy%":typeof Proxy>"u"?Z:Proxy,"%RangeError%":P5,"%ReferenceError%":M5,"%Reflect%":typeof Reflect>"u"?Z:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Qi||!Ot?Z:Ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qi&&Ot?Ot(""[Symbol.iterator]()):Z,"%Symbol%":Qi?Symbol:Z,"%SyntaxError%":rn,"%ThrowTypeError%":T5,"%TypedArray%":E5,"%TypeError%":en,"%Uint8Array%":typeof Uint8Array>"u"?Z:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z:Uint32Array,"%URIError%":w5,"%WeakMap%":typeof WeakMap>"u"?Z:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z:WeakSet};if(Ot)try{null.error}catch(e){m1=Ot(Ot(e)),ri["%Error.prototype%"]=m1}var m1,_5=s(function e(t){var r;if(t==="%AsyncFunction%")r=yu("async function () {}");else if(t==="%GeneratorFunction%")r=yu("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=yu("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Ot&&(r=Ot(n.prototype))}return ri[t]=r,r},"doEval"),y1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},uo=Ps(),Ms=mu(),L5=uo.call(Function.call,Array.prototype.concat),O5=uo.call(Function.apply,Array.prototype.splice),g1=uo.call(Function.call,String.prototype.replace),ws=uo.call(Function.call,String.prototype.slice),D5=uo.call(Function.call,RegExp.prototype.exec),A5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N5=/\\(\\)?/g,k5=s(function(t){var r=ws(t,0,1),i=ws(t,-1);if(r==="%"&&i!=="%")throw new rn("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new rn("invalid intrinsic syntax, expected opening `%`");var n=[];return g1(t,A5,function(o,a,l,c){n[n.length]=l?g1(c,N5,"$1"):a||o}),n},"stringToPath"),R5=s(function(t,r){var i=t,n;if(Ms(y1,i)&&(n=y1[i],i="%"+n[0]+"%"),Ms(ri,i)){var o=ri[i];if(o===tn&&(o=_5(i)),typeof o>"u"&&!r)throw new en("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new rn("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");b1.exports=s(function(t,r){if(typeof t!="string"||t.length===0)throw new en("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new en('"allowMissing" argument must be a boolean');if(D5(/^%?[^%]*%?$/,t)===null)throw new rn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=k5(t),n=i.length>0?i[0]:"",o=R5("%"+n+"%",r),a=o.name,l=o.value,c=!1,h=o.alias;h&&(n=h[0],O5(i,L5([0,1],h)));for(var d=1,y=!0;d<i.length;d+=1){var m=i[d],x=ws(m,0,1),S=ws(m,-1);if((x==='"'||x==="'"||x==="`"||S==='"'||S==="'"||S==="`")&&x!==S)throw new rn("property names with quotes must have matching quotes");if((m==="constructor"||!y)&&(c=!0),n+="."+m,a="%"+n+"%",Ms(ri,a))l=ri[a];else if(l!=null){if(!(m in l)){if(!r)throw new en("base intrinsic for "+t+" exists, but the property is not available.");return}if(ei&&d+1>=i.length){var P=ei(l,m);y=!!P,y&&"get"in P&&!("originalValue"in P.get)?l=P.get:l=l[m]}else y=Ms(l,m),l=l[m];y&&!c&&(ri[a]=l)}}return l},"GetIntrinsic")});var Is=N((dT,C1)=>{"use strict";f();var F5=Se(),Ts=F5("%Object.defineProperty%",!0)||!1;if(Ts)try{Ts({},"a",{value:1})}catch{Ts=!1}C1.exports=Ts});var _s=N((yT,x1)=>{"use strict";f();var B5=Se(),Es=B5("%Object.getOwnPropertyDescriptor%",!0);if(Es)try{Es([],"length")}catch{Es=null}x1.exports=Es});var Ls=N((vT,M1)=>{"use strict";f();var S1=Is(),G5=fu(),nn=Qe(),P1=_s();M1.exports=s(function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new nn("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new nn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new nn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new nn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new nn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new nn("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,c=!!P1&&P1(t,r);if(S1)S1(t,r,{configurable:a===null&&c?c.configurable:!a,enumerable:n===null&&c?c.enumerable:!n,value:i,writable:o===null&&c?c.writable:!o});else if(l||!n&&!o&&!a)t[r]=i;else throw new G5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")});var Os=N((xT,T1)=>{"use strict";f();var vu=Is(),w1=s(function(){return!!vu},"hasPropertyDescriptors");w1.hasArrayLengthDefineBug=s(function(){if(!vu)return null;try{return vu([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug");T1.exports=w1});var Er=N((MT,L1)=>{"use strict";f();var V5=xs(),H5=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",X5=Object.prototype.toString,Y5=Array.prototype.concat,I1=Ls(),j5=s(function(e){return typeof e=="function"&&X5.call(e)==="[object Function]"},"isFunction"),E1=Os()(),z5=s(function(e,t,r,i){if(t in e){if(i===!0){if(e[t]===r)return}else if(!j5(i)||!i())return}E1?I1(e,t,r,!0):I1(e,t,r)},"defineProperty"),_1=s(function(e,t){var r=arguments.length>2?arguments[2]:{},i=V5(t);H5&&(i=Y5.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n<i.length;n+=1)z5(e,i[n],t[i[n]],r[i[n]])},"defineProperties");_1.supportsDescriptors=!!E1;L1.exports=_1});var k1=N((IT,N1)=>{"use strict";f();var U5=Se(),O1=Ls(),W5=Os()(),D1=_s(),A1=Qe(),Z5=U5("%Math.floor%");N1.exports=s(function(t,r){if(typeof t!="function")throw new A1("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Z5(r)!==r)throw new A1("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&D1){var a=D1(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(W5?O1(t,"length",r,!0,!0):O1(t,"length",r)),t},"setFunctionLength")});var ii=N((LT,Ds)=>{"use strict";f();var bu=Ps(),As=Se(),q5=k1(),$5=Qe(),B1=As("%Function.prototype.apply%"),G1=As("%Function.prototype.call%"),V1=As("%Reflect.apply%",!0)||bu.call(G1,B1),R1=Is(),J5=As("%Math.max%");Ds.exports=s(function(t){if(typeof t!="function")throw new $5("a function is required");var r=V1(bu,G1,arguments);return q5(r,1+J5(0,t.length-(arguments.length-1)),!0)},"callBind");var F1=s(function(){return V1(bu,B1,arguments)},"applyBind");R1?R1(Ds.exports,"apply",{value:F1}):Ds.exports.apply=F1});var le=N((AT,Y1)=>{"use strict";f();var H1=Se(),X1=ii(),K5=X1(H1("String.prototype.indexOf"));Y1.exports=s(function(t,r){var i=H1(t,!!r);return typeof i=="function"&&K5(t,".prototype.")>-1?X1(i):i},"callBoundIntrinsic")});var Cu=N((RT,Z1)=>{"use strict";f();var Q5=xs(),U1=co()(),W1=le(),j1=Object,t4=W1("Array.prototype.push"),z1=W1("Object.prototype.propertyIsEnumerable"),e4=U1?Object.getOwnPropertySymbols:null;Z1.exports=s(function(t,r){if(t==null)throw new TypeError("target must be an object");var i=j1(t);if(arguments.length===1)return i;for(var n=1;n<arguments.length;++n){var o=j1(arguments[n]),a=Q5(o),l=U1&&(Object.getOwnPropertySymbols||e4);if(l)for(var c=l(o),h=0;h<c.length;++h){var d=c[h];z1(o,d)&&t4(a,d)}for(var y=0;y<a.length;++y){var m=a[y];if(z1(o,m)){var x=o[m];i[m]=x}}}return i},"assign")});var Su=N((GT,q1)=>{"use strict";f();var xu=Cu(),r4=s(function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i<t.length;++i)r[t[i]]=t[i];var n=Object.assign({},r),o="";for(var a in n)o+=a;return e!==o},"lacksProperEnumerationOrder"),i4=s(function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},"assignHasPendingExceptions");q1.exports=s(function(){return!Object.assign||r4()||i4()?xu:Object.assign},"getPolyfill")});var J1=N((XT,$1)=>{"use strict";f();var n4=Er(),o4=Su();$1.exports=s(function(){var t=o4();return n4(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},"shimAssign")});var ey=N((zT,ty)=>{"use strict";f();var a4=Er(),s4=ii(),l4=Cu(),K1=Su(),c4=J1(),u4=s4.apply(K1()),Q1=s(function(t,r){return u4(Object,arguments)},"assign");a4(Q1,{getPolyfill:K1,implementation:l4,shim:c4});ty.exports=Q1});var iy=N((ZT,ry)=>{"use strict";f();var ho=s(function(){return typeof s(function(){},"f").name=="string"},"functionsHaveNames"),po=Object.getOwnPropertyDescriptor;if(po)try{po([],"length")}catch{po=null}ho.functionsHaveConfigurableNames=s(function(){if(!ho()||!po)return!1;var t=po(function(){},"name");return!!t&&!!t.configurable},"functionsHaveConfigurableNames");var p4=Function.prototype.bind;ho.boundFunctionsHaveNames=s(function(){return ho()&&typeof p4=="function"&&s(function(){},"f").bind().name!==""},"boundFunctionsHaveNames");ry.exports=ho});var ay=N((JT,oy)=>{"use strict";f();var ny=Ls(),h4=Os()(),f4=iy().functionsHaveConfigurableNames(),d4=Qe();oy.exports=s(function(t,r){if(typeof t!="function")throw new d4("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return(!i||f4)&&(h4?ny(t,"name",r,!0,!0):ny(t,"name",r)),t},"setFunctionName")});var Pu=N((tI,sy)=>{"use strict";f();var m4=ay(),y4=Qe(),g4=Object;sy.exports=m4(s(function(){if(this==null||this!==g4(this))throw new y4("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"flags"),"get flags",!0)});var Mu=N((iI,ly)=>{"use strict";f();var v4=Pu(),b4=Er().supportsDescriptors,C4=Object.getOwnPropertyDescriptor;ly.exports=s(function(){if(b4&&/a/mig.flags==="gim"){var t=C4(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(i,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return v4},"getPolyfill")});var py=N((aI,uy)=>{"use strict";f();var x4=Er().supportsDescriptors,S4=Mu(),P4=Object.getOwnPropertyDescriptor,M4=Object.defineProperty,w4=TypeError,cy=Object.getPrototypeOf,T4=/a/;uy.exports=s(function(){if(!x4||!cy)throw new w4("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=S4(),r=cy(T4),i=P4(r,"flags");return(!i||i.get!==t)&&M4(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},"shimFlags")});var my=N((cI,dy)=>{"use strict";f();var I4=Er(),E4=ii(),_4=Pu(),hy=Mu(),L4=py(),fy=E4(hy());I4(fy,{getPolyfill:hy,implementation:_4,shim:L4});dy.exports=fy});var _r=N((pI,yy)=>{"use strict";f();var O4=co();yy.exports=s(function(){return O4()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Tu=N((dI,vy)=>{"use strict";f();var D4=_r()(),A4=le(),wu=A4("Object.prototype.toString"),Ns=s(function(t){return D4&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:wu(t)==="[object Arguments]"},"isArguments"),gy=s(function(t){return Ns(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&wu(t)!=="[object Array]"&&wu(t.callee)==="[object Function]"},"isArguments"),N4=function(){return Ns(arguments)}();Ns.isLegacyArguments=gy;vy.exports=N4?Ns:gy});var by=N(()=>{f()});var Gy=N((CI,By)=>{f();var Ru=typeof Map=="function"&&Map.prototype,Iu=Object.getOwnPropertyDescriptor&&Ru?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Rs=Ru&&Iu&&typeof Iu.get=="function"?Iu.get:null,Cy=Ru&&Map.prototype.forEach,Fu=typeof Set=="function"&&Set.prototype,Eu=Object.getOwnPropertyDescriptor&&Fu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fs=Fu&&Eu&&typeof Eu.get=="function"?Eu.get:null,xy=Fu&&Set.prototype.forEach,k4=typeof WeakMap=="function"&&WeakMap.prototype,mo=k4?WeakMap.prototype.has:null,R4=typeof WeakSet=="function"&&WeakSet.prototype,yo=R4?WeakSet.prototype.has:null,F4=typeof WeakRef=="function"&&WeakRef.prototype,Sy=F4?WeakRef.prototype.deref:null,B4=Boolean.prototype.valueOf,G4=Object.prototype.toString,V4=Function.prototype.toString,H4=String.prototype.match,Bu=String.prototype.slice,Or=String.prototype.replace,X4=String.prototype.toUpperCase,Py=String.prototype.toLowerCase,Dy=RegExp.prototype.test,My=Array.prototype.concat,Be=Array.prototype.join,Y4=Array.prototype.slice,wy=Math.floor,Ou=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_u=Object.getOwnPropertySymbols,Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,on=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Vt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===on||!0)?Symbol.toStringTag:null,Ay=Object.prototype.propertyIsEnumerable,Ty=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Iy(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Dy.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var i=e<0?-wy(-e):wy(e);if(i!==e){var n=String(i),o=Bu.call(t,n.length+1);return Or.call(n,r,"$&_")+"."+Or.call(Or.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Or.call(t,r,"$&_")}s(Iy,"addNumericSeparator");var Au=by(),Ey=Au.custom,_y=ky(Ey)?Ey:null;By.exports=s(function e(t,r,i,n){var o=r||{};if(Lr(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Lr(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Lr(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Lr(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Lr(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Fy(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?Iy(t,c):c}if(typeof t=="bigint"){var h=String(t)+"n";return l?Iy(t,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof t=="object")return Nu(t)?"[Array]":"[Object]";var y=s7(o,i);if(typeof n>"u")n=[];else if(Ry(n,t)>=0)return"[Circular]";function m(lt,ht,yt){if(ht&&(n=Y4.call(n),n.push(ht)),yt){var At={depth:o.depth};return Lr(o,"quoteStyle")&&(At.quoteStyle=o.quoteStyle),e(lt,At,i+1,n)}return e(lt,o,i+1,n)}if(s(m,"inspect"),typeof t=="function"&&!Ly(t)){var x=K4(t),S=ks(t,m);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(S.length>0?" { "+Be.call(S,", ")+" }":"")}if(ky(t)){var P=on?Or.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Du.call(t);return typeof t=="object"&&!on?fo(P):P}if(n7(t)){for(var g="<"+Py.call(String(t.nodeName)),C=t.attributes||[],M=0;M<C.length;M++)g+=" "+C[M].name+"="+Ny(j4(C[M].value),"double",o);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Py.call(String(t.nodeName))+">",g}if(Nu(t)){if(t.length===0)return"[]";var T=ks(t,m);return y&&!a7(T)?"["+ku(T,y)+"]":"[ "+Be.call(T,", ")+" ]"}if(U4(t)){var w=ks(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!Ay.call(t,"cause")?"{ ["+String(t)+"] "+Be.call(My.call("[cause]: "+m(t.cause),w),", ")+" }":w.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Be.call(w,", ")+" }"}if(typeof t=="object"&&a){if(_y&&typeof t[_y]=="function"&&Au)return Au(t,{depth:d-i});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Q4(t)){var E=[];return Cy&&Cy.call(t,function(lt,ht){E.push(m(ht,t,!0)+" => "+m(lt,t))}),Oy("Map",Rs.call(t),E,y)}if(r7(t)){var L=[];return xy&&xy.call(t,function(lt){L.push(m(lt,t))}),Oy("Set",Fs.call(t),L,y)}if(t7(t))return Lu("WeakMap");if(i7(t))return Lu("WeakSet");if(e7(t))return Lu("WeakRef");if(Z4(t))return fo(m(Number(t)));if($4(t))return fo(m(Ou.call(t)));if(q4(t))return fo(B4.call(t));if(W4(t))return fo(m(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===global)return"{ [object globalThis] }";if(!z4(t)&&!Ly(t)){var R=ks(t,m),F=Ty?Ty(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",G=!F&&Vt&&Object(t)===t&&Vt in t?Bu.call(Dr(t),8,-1):k?"Object":"",H=F||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Q=H+(G||k?"["+Be.call(My.call([],G||[],k||[]),": ")+"] ":"");return R.length===0?Q+"{}":y?Q+"{"+ku(R,y)+"}":Q+"{ "+Be.call(R,", ")+" }"}return String(t)},"inspect_");function Ny(e,t,r){var i=(r.quoteStyle||t)==="double"?'"':"'";return i+e+i}s(Ny,"wrapQuotes");function j4(e){return Or.call(String(e),/"/g,"&quot;")}s(j4,"quote");function Nu(e){return Dr(e)==="[object Array]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(Nu,"isArray");function z4(e){return Dr(e)==="[object Date]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(z4,"isDate");function Ly(e){return Dr(e)==="[object RegExp]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(Ly,"isRegExp");function U4(e){return Dr(e)==="[object Error]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(U4,"isError");function W4(e){return Dr(e)==="[object String]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(W4,"isString");function Z4(e){return Dr(e)==="[object Number]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(Z4,"isNumber");function q4(e){return Dr(e)==="[object Boolean]"&&(!Vt||!(typeof e=="object"&&Vt in e))}s(q4,"isBoolean");function ky(e){if(on)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Du)return!1;try{return Du.call(e),!0}catch{}return!1}s(ky,"isSymbol");function $4(e){if(!e||typeof e!="object"||!Ou)return!1;try{return Ou.call(e),!0}catch{}return!1}s($4,"isBigInt");var J4=Object.prototype.hasOwnProperty||function(e){return e in this};function Lr(e,t){return J4.call(e,t)}s(Lr,"has");function Dr(e){return G4.call(e)}s(Dr,"toStr");function K4(e){if(e.name)return e.name;var t=H4.call(V4.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}s(K4,"nameOf");function Ry(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}s(Ry,"indexOf");function Q4(e){if(!Rs||!e||typeof e!="object")return!1;try{Rs.call(e);try{Fs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}s(Q4,"isMap");function t7(e){if(!mo||!e||typeof e!="object")return!1;try{mo.call(e,mo);try{yo.call(e,yo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}s(t7,"isWeakMap");function e7(e){if(!Sy||!e||typeof e!="object")return!1;try{return Sy.call(e),!0}catch{}return!1}s(e7,"isWeakRef");function r7(e){if(!Fs||!e||typeof e!="object")return!1;try{Fs.call(e);try{Rs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}s(r7,"isSet");function i7(e){if(!yo||!e||typeof e!="object")return!1;try{yo.call(e,yo);try{mo.call(e,mo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}s(i7,"isWeakSet");function n7(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}s(n7,"isElement");function Fy(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return Fy(Bu.call(e,0,t.maxStringLength),t)+i}var n=Or.call(Or.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,o7);return Ny(n,"single",t)}s(Fy,"inspectString");function o7(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+X4.call(t.toString(16))}s(o7,"lowbyte");function fo(e){return"Object("+e+")"}s(fo,"markBoxed");function Lu(e){return e+" { ? }"}s(Lu,"weakCollectionOf");function Oy(e,t,r,i){var n=i?ku(r,i):Be.call(r,", ");return e+" ("+t+") {"+n+"}"}s(Oy,"collectionOf");function a7(e){for(var t=0;t<e.length;t++)if(Ry(e[t],`
2
+ `)>=0)return!1;return!0}s(a7,"singleLineValues");function s7(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Be.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Be.call(Array(t+1),r)}}s(s7,"getIndent");function ku(e,t){if(e.length===0)return"";var r=`
3
3
  `+t.prev+t.base;return r+Be.call(e,","+r)+`
4
- `+t.prev}s(Nu,"indentedJoin");function Ns(e,t){var r=Au(e),i=[];if(r){i.length=e.length;for(var n=0;n<e.length;n++)i[n]=Lr(e,n)?t(e[n],e):""}var o=typeof Eu=="function"?Eu(e):[],a;if(nn){a={};for(var l=0;l<o.length;l++)a["$"+o[l]]=o[l]}for(var c in e)Lr(e,c)&&(r&&String(Number(c))===c&&c<e.length||nn&&a["$"+c]instanceof Symbol||(Oy.call(/[^\w$]/,c)?i.push(t(c,e)+": "+t(e[c],e)):i.push(c+": "+t(e[c],e))));if(typeof Eu=="function")for(var h=0;h<o.length;h++)Dy.call(e,o[h])&&i.push("["+t(o[h])+"]: "+t(e[o[h]],e));return i}s(Ns,"arrObjKeys")});var Gu=A((SI,Vy)=>{"use strict";f();var Gy=Se(),on=le(),s7=By(),l7=Qe(),Fs=Gy("%WeakMap%",!0),Bs=Gy("%Map%",!0),c7=on("WeakMap.prototype.get",!0),u7=on("WeakMap.prototype.set",!0),p7=on("WeakMap.prototype.has",!0),h7=on("Map.prototype.get",!0),f7=on("Map.prototype.set",!0),d7=on("Map.prototype.has",!0),Bu=s(function(e,t){for(var r=e,i;(i=r.next)!==null;r=i)if(i.key===t)return r.next=i.next,i.next=e.next,e.next=i,i},"listGetNode"),m7=s(function(e,t){var r=Bu(e,t);return r&&r.value},"listGet"),y7=s(function(e,t,r){var i=Bu(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}},"listSet"),g7=s(function(e,t){return!!Bu(e,t)},"listHas");Vy.exports=s(function(){var t,r,i,n={assert:function(o){if(!n.has(o))throw new l7("Side channel does not contain "+s7(o))},get:function(o){if(Fs&&o&&(typeof o=="object"||typeof o=="function")){if(t)return c7(t,o)}else if(Bs){if(r)return h7(r,o)}else if(i)return m7(i,o)},has:function(o){if(Fs&&o&&(typeof o=="object"||typeof o=="function")){if(t)return p7(t,o)}else if(Bs){if(r)return d7(r,o)}else if(i)return g7(i,o);return!1},set:function(o,a){Fs&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Fs),u7(t,o,a)):Bs?(r||(r=new Bs),f7(r,o,a)):(i||(i={key:{},next:null}),y7(i,o,a))}};return n},"getSideChannel")});var Xy=A((wI,Hy)=>{"use strict";f();var v7=du(),go=Gu()(),tr=Qe(),Vu={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");if(go.assert(e),!Vu.has(e,t))throw new tr("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var r=go.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var r=go.get(e);return!!r&&v7(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var i=go.get(e);i||(i={},go.set(e,i)),i["$"+t]=r}};Object.freeze&&Object.freeze(Vu);Hy.exports=Vu});var zy=A((II,jy)=>{"use strict";f();var vo=Xy(),b7=SyntaxError,Yy=typeof StopIteration=="object"?StopIteration:null;jy.exports=s(function(t){if(!Yy)throw new b7("this environment lacks StopIteration");vo.set(t,"[[Done]]",!1);var r={next:s(function(){var n=vo.get(this,"[[Iterator]]"),o=vo.get(n,"[[Done]]");try{return{done:o,value:o?void 0:n.next()}}catch(a){if(vo.set(n,"[[Done]]",!0),a!==Yy)throw a;return{done:!0,value:void 0}}},"next")};return vo.set(r,"[[Iterator]]",t),r},"getStopIterationIterator")});var Hu=A((LI,Uy)=>{f();var C7={}.toString;Uy.exports=Array.isArray||function(e){return C7.call(e)=="[object Array]"}});var Xu=A((DI,Wy)=>{"use strict";f();var x7=String.prototype.valueOf,S7=s(function(t){try{return x7.call(t),!0}catch{return!1}},"tryStringObject"),P7=Object.prototype.toString,M7="[object String]",w7=_r()();Wy.exports=s(function(t){return typeof t=="string"?!0:typeof t!="object"?!1:w7?S7(t):P7.call(t)===M7},"isString")});var ju=A((kI,$y)=>{"use strict";f();var Yu=typeof Map=="function"&&Map.prototype?Map:null,T7=typeof Set=="function"&&Set.prototype?Set:null,Gs;Yu||(Gs=s(function(t){return!1},"isMap"));var qy=Yu?Map.prototype.has:null,Zy=T7?Set.prototype.has:null;!Gs&&!qy&&(Gs=s(function(t){return!1},"isMap"));$y.exports=Gs||s(function(t){if(!t||typeof t!="object")return!1;try{if(qy.call(t),Zy)try{Zy.call(t)}catch{return!0}return t instanceof Yu}catch{}return!1},"isMap")});var Uu=A((BI,Qy)=>{"use strict";f();var I7=typeof Map=="function"&&Map.prototype?Map:null,zu=typeof Set=="function"&&Set.prototype?Set:null,Vs;zu||(Vs=s(function(t){return!1},"isSet"));var Jy=I7?Map.prototype.has:null,Ky=zu?Set.prototype.has:null;!Vs&&!Ky&&(Vs=s(function(t){return!1},"isSet"));Qy.exports=Vs||s(function(t){if(!t||typeof t!="object")return!1;try{if(Ky.call(t),Jy)try{Jy.call(t)}catch{return!0}return t instanceof zu}catch{}return!1},"isSet")});var p0=A((HI,Ys)=>{"use strict";f();var t0=wu(),e0=zy();xs()()||co()()?(Hs=Symbol.iterator,Ys.exports=s(function(t){if(t!=null&&typeof t[Hs]<"u")return t[Hs]();if(t0(t))return Array.prototype[Hs].call(t)},"getIterator")):(r0=Hu(),i0=Xu(),Wu=Se(),n0=Wu("%Map%",!0),o0=Wu("%Set%",!0),he=le(),Zu=he("Array.prototype.push"),qu=he("String.prototype.charCodeAt"),a0=he("String.prototype.slice"),s0=s(function(t,r){var i=t.length;if(r+1>=i)return r+1;var n=qu(t,r);if(n<55296||n>56319)return r+1;var o=qu(t,r+1);return o<56320||o>57343?r+1:r+2},"advanceStringIndex"),Xs=s(function(t){var r=0;return{next:s(function(){var n=r>=t.length,o;return n||(o=t[r],r+=1),{done:n,value:o}},"next")}},"getArrayIterator"),$u=s(function(t,r){if(r0(t)||t0(t))return Xs(t);if(i0(t)){var i=0;return{next:s(function(){var o=s0(t,i),a=a0(t,i,o);return i=o,{done:o>t.length,value:a}},"next")}}if(r&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()},"getNonCollectionIterator"),!n0&&!o0?Ys.exports=s(function(t){if(t!=null)return $u(t,!0)},"getIterator"):(l0=ju(),c0=Uu(),Ju=he("Map.prototype.forEach",!0),Ku=he("Set.prototype.forEach",!0),(typeof b>"u"||!b.versions||!b.versions.node)&&(Qu=he("Map.prototype.iterator",!0),tp=he("Set.prototype.iterator",!0)),ep=he("Map.prototype.@@iterator",!0)||he("Map.prototype._es6-shim iterator_",!0),rp=he("Set.prototype.@@iterator",!0)||he("Set.prototype._es6-shim iterator_",!0),u0=s(function(t){if(l0(t)){if(Qu)return e0(Qu(t));if(ep)return ep(t);if(Ju){var r=[];return Ju(t,function(n,o){Zu(r,[o,n])}),Xs(r)}}if(c0(t)){if(tp)return e0(tp(t));if(rp)return rp(t);if(Ku){var i=[];return Ku(t,function(n){Zu(i,n)}),Xs(i)}}},"getCollectionIterator"),Ys.exports=s(function(t){return u0(t)||$u(t)},"getIterator")));var Hs,r0,i0,Wu,n0,o0,he,Zu,qu,a0,s0,Xs,$u,l0,c0,Ju,Ku,Qu,tp,ep,rp,u0});var ip=A((jI,f0)=>{"use strict";f();var h0=s(function(e){return e!==e},"numberIsNaN");f0.exports=s(function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||h0(t)&&h0(r))},"is")});var np=A((WI,d0)=>{"use strict";f();var E7=ip();d0.exports=s(function(){return typeof Object.is=="function"?Object.is:E7},"getPolyfill")});var y0=A(($I,m0)=>{"use strict";f();var _7=np(),L7=Er();m0.exports=s(function(){var t=_7();return L7(Object,{is:t},{is:s(function(){return Object.is!==t},"testObjectIs")}),t},"shimObjectIs")});var C0=A((QI,b0)=>{"use strict";f();var O7=Er(),D7=ii(),A7=ip(),g0=np(),N7=y0(),v0=D7(g0(),Object);O7(v0,{getPolyfill:g0,implementation:A7,shim:N7});b0.exports=v0});var ap=A((eE,M0)=>{"use strict";f();var k7=ii(),P0=le(),R7=Se(),op=R7("%ArrayBuffer%",!0),js=P0("ArrayBuffer.prototype.byteLength",!0),F7=P0("Object.prototype.toString"),x0=!!op&&!js&&new op(0).slice,S0=!!x0&&k7(x0);M0.exports=s(js||S0?function(t){if(!t||typeof t!="object")return!1;try{return js?js(t):S0(t,0),!0}catch{return!1}}:op?function(t){return F7(t)==="[object ArrayBuffer]"}:function(t){return!1},"isArrayBuffer")});var T0=A((nE,w0)=>{"use strict";f();var B7=Date.prototype.getDay,G7=s(function(t){try{return B7.call(t),!0}catch{return!1}},"tryDateGetDayCall"),V7=Object.prototype.toString,H7="[object Date]",X7=_r()();w0.exports=s(function(t){return typeof t!="object"||t===null?!1:X7?G7(t):V7.call(t)===H7},"isDateObject")});var O0=A((sE,L0)=>{"use strict";f();var sp=le(),I0=_r()(),E0,_0,lp,cp;I0&&(E0=sp("Object.prototype.hasOwnProperty"),_0=sp("RegExp.prototype.exec"),lp={},zs=s(function(){throw lp},"throwRegexMarker"),cp={toString:zs,valueOf:zs},typeof Symbol.toPrimitive=="symbol"&&(cp[Symbol.toPrimitive]=zs));var zs,Y7=sp("Object.prototype.toString"),j7=Object.getOwnPropertyDescriptor,z7="[object RegExp]";L0.exports=s(I0?function(t){if(!t||typeof t!="object")return!1;var r=j7(t,"lastIndex"),i=r&&E0(r,"value");if(!i)return!1;try{_0(t,cp)}catch(n){return n===lp}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:Y7(t)===z7},"isRegex")});var N0=A((uE,A0)=>{"use strict";f();var U7=le(),D0=U7("SharedArrayBuffer.prototype.byteLength",!0);A0.exports=s(D0?function(t){if(!t||typeof t!="object")return!1;try{return D0(t),!0}catch{return!1}}:function(t){return!1},"isSharedArrayBuffer")});var R0=A((fE,k0)=>{"use strict";f();var W7=Number.prototype.toString,Z7=s(function(t){try{return W7.call(t),!0}catch{return!1}},"tryNumberObject"),q7=Object.prototype.toString,$7="[object Number]",J7=_r()();k0.exports=s(function(t){return typeof t=="number"?!0:typeof t!="object"?!1:J7?Z7(t):q7.call(t)===$7},"isNumberObject")});var G0=A((yE,B0)=>{"use strict";f();var F0=le(),K7=F0("Boolean.prototype.toString"),Q7=F0("Object.prototype.toString"),tC=s(function(t){try{return K7(t),!0}catch{return!1}},"booleanBrandCheck"),eC="[object Boolean]",rC=_r()();B0.exports=s(function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:rC&&Symbol.toStringTag in t?tC(t):Q7(t)===eC},"isBoolean")});var Y0=A((bE,up)=>{"use strict";f();var iC=Object.prototype.toString,nC=xs()();nC?(V0=Symbol.prototype.toString,H0=/^Symbol\(.*\)$/,X0=s(function(t){return typeof t.valueOf()!="symbol"?!1:H0.test(V0.call(t))},"isRealSymbolObject"),up.exports=s(function(t){if(typeof t=="symbol")return!0;if(iC.call(t)!=="[object Symbol]")return!1;try{return X0(t)}catch{return!1}},"isSymbol")):up.exports=s(function(t){return!1},"isSymbol");var V0,H0,X0});var U0=A((SE,z0)=>{"use strict";f();var j0=typeof BigInt<"u"&&BigInt;z0.exports=s(function(){return typeof j0=="function"&&typeof BigInt=="function"&&typeof j0(42)=="bigint"&&typeof BigInt(42)=="bigint"},"hasNativeBigInts")});var q0=A((wE,pp)=>{"use strict";f();var oC=U0()();oC?(W0=BigInt.prototype.valueOf,Z0=s(function(t){try{return W0.call(t),!0}catch{}return!1},"tryBigIntObject"),pp.exports=s(function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:Z0(t)},"isBigInt")):pp.exports=s(function(t){return!1},"isBigInt");var W0,Z0});var J0=A((EE,$0)=>{"use strict";f();var aC=Xu(),sC=R0(),lC=G0(),cC=Y0(),uC=q0();$0.exports=s(function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(aC(t))return"String";if(sC(t))return"Number";if(lC(t))return"Boolean";if(cC(t))return"Symbol";if(uC(t))return"BigInt"},"whichBoxedPrimitive")});var tg=A((OE,Q0)=>{"use strict";f();var Us=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,K0=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Ws;Us||(Ws=s(function(t){return!1},"isWeakMap"));var fp=Us?Us.prototype.has:null,hp=K0?K0.prototype.has:null;!Ws&&!fp&&(Ws=s(function(t){return!1},"isWeakMap"));Q0.exports=Ws||s(function(t){if(!t||typeof t!="object")return!1;try{if(fp.call(t,fp),hp)try{hp.call(t,hp)}catch{return!0}return t instanceof Us}catch{}return!1},"isWeakMap")});var rg=A((NE,mp)=>{"use strict";f();var pC=Se(),eg=le(),hC=pC("%WeakSet%",!0),dp=eg("WeakSet.prototype.has",!0);dp?(Zs=eg("WeakMap.prototype.has",!0),mp.exports=s(function(t){if(!t||typeof t!="object")return!1;try{if(dp(t,dp),Zs)try{Zs(t,Zs)}catch{return!0}return t instanceof hC}catch{}return!1},"isWeakSet")):mp.exports=s(function(t){return!1},"isWeakSet");var Zs});var ng=A((FE,ig)=>{"use strict";f();var fC=ju(),dC=Uu(),mC=tg(),yC=rg();ig.exports=s(function(t){if(t&&typeof t=="object"){if(fC(t))return"Map";if(dC(t))return"Set";if(mC(t))return"WeakMap";if(yC(t))return"WeakSet"}return!1},"whichCollection")});var lg=A((VE,sg)=>{"use strict";f();var ag=Function.prototype.toString,an=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,gp,qs;if(typeof an=="function"&&typeof Object.defineProperty=="function")try{gp=Object.defineProperty({},"length",{get:function(){throw qs}}),qs={},an(function(){throw 42},null,gp)}catch(e){e!==qs&&(an=null)}else an=null;var gC=/^\s*class\b/,vp=s(function(t){try{var r=ag.call(t);return gC.test(r)}catch{return!1}},"isES6ClassFunction"),yp=s(function(t){try{return vp(t)?!1:(ag.call(t),!0)}catch{return!1}},"tryFunctionToStr"),$s=Object.prototype.toString,vC="[object Object]",bC="[object Function]",CC="[object GeneratorFunction]",xC="[object HTMLAllCollection]",SC="[object HTML document.all class]",PC="[object HTMLCollection]",MC=typeof Symbol=="function"&&!!Symbol.toStringTag,wC=!(0 in[,]),bp=s(function(){return!1},"isDocumentDotAll");typeof document=="object"&&(og=document.all,$s.call(og)===$s.call(document.all)&&(bp=s(function(t){if((wC||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=$s.call(t);return(r===xC||r===SC||r===PC||r===vC)&&t("")==null}catch{}return!1},"isDocumentDotAll")));var og;sg.exports=s(an?function(t){if(bp(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{an(t,null,gp)}catch(r){if(r!==qs)return!1}return!vp(t)&&yp(t)}:function(t){if(bp(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(MC)return yp(t);if(vp(t))return!1;var r=$s.call(t);return r!==bC&&r!==CC&&!/^\[object HTML/.test(r)?!1:yp(t)},"isCallable")});var pg=A((YE,ug)=>{"use strict";f();var TC=lg(),IC=Object.prototype.toString,cg=Object.prototype.hasOwnProperty,EC=s(function(t,r,i){for(var n=0,o=t.length;n<o;n++)cg.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},"forEachArray"),_C=s(function(t,r,i){for(var n=0,o=t.length;n<o;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},"forEachString"),LC=s(function(t,r,i){for(var n in t)cg.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},"forEachObject"),OC=s(function(t,r,i){if(!TC(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),IC.call(t)==="[object Array]"?EC(t,r,n):typeof t=="string"?_C(t,r,n):LC(t,r,n)},"forEach");ug.exports=OC});var fg=A((UE,hg)=>{"use strict";f();hg.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var mg=A((ZE,dg)=>{"use strict";f();var Cp=fg(),DC=typeof globalThis>"u"?global:globalThis;dg.exports=s(function(){for(var t=[],r=0;r<Cp.length;r++)typeof DC[Cp[r]]=="function"&&(t[t.length]=Cp[r]);return t},"availableTypedArrays")});var Cg=A((JE,bg)=>{"use strict";f();var Ks=pg(),AC=mg(),yg=ii(),Pp=le(),Js=Es(),NC=Pp("Object.prototype.toString"),vg=_r()(),gg=typeof globalThis>"u"?global:globalThis,Sp=AC(),Mp=Pp("String.prototype.slice"),xp=Object.getPrototypeOf,kC=Pp("Array.prototype.indexOf",!0)||s(function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},"indexOf"),Qs={__proto__:null};vg&&Js&&xp?Ks(Sp,function(e){var t=new gg[e];if(Symbol.toStringTag in t){var r=xp(t),i=Js(r,Symbol.toStringTag);if(!i){var n=xp(r);i=Js(n,Symbol.toStringTag)}Qs["$"+e]=yg(i.get)}}):Ks(Sp,function(e){var t=new gg[e],r=t.slice||t.set;r&&(Qs["$"+e]=yg(r))});var RC=s(function(t){var r=!1;return Ks(Qs,function(i,n){if(!r)try{"$"+i(t)===n&&(r=Mp(n,1))}catch{}}),r},"tryAllTypedArrays"),FC=s(function(t){var r=!1;return Ks(Qs,function(i,n){if(!r)try{i(t),r=Mp(n,1)}catch{}}),r},"tryAllSlices");bg.exports=s(function(t){if(!t||typeof t!="object")return!1;if(!vg){var r=Mp(NC(t),8,-1);return kC(Sp,r)>-1?r:r!=="Object"?!1:FC(t)}return Js?RC(t):null},"whichTypedArray")});var Pg=A((t_,Sg)=>{"use strict";f();var BC=le(),xg=BC("ArrayBuffer.prototype.byteLength",!0),GC=ap();Sg.exports=s(function(t){return GC(t)?xg?xg(t):t.byteLength:NaN},"byteLength")});var Zg=A((i_,Wg)=>{"use strict";f();var jg=ty(),Ge=le(),Mg=dy(),VC=Se(),sn=p0(),HC=Gu(),wg=C0(),Tg=wu(),Ig=Hu(),Eg=ap(),_g=T0(),Lg=O0(),Og=N0(),Dg=Cs(),Ag=J0(),Ng=ng(),kg=Cg(),Rg=Pg(),Fg=Ge("SharedArrayBuffer.prototype.byteLength",!0),Bg=Ge("Date.prototype.getTime"),wp=Object.getPrototypeOf,Gg=Ge("Object.prototype.toString"),el=VC("%Set%",!0),Tp=Ge("Map.prototype.has",!0),rl=Ge("Map.prototype.get",!0),Vg=Ge("Map.prototype.size",!0),il=Ge("Set.prototype.add",!0),zg=Ge("Set.prototype.delete",!0),nl=Ge("Set.prototype.has",!0),tl=Ge("Set.prototype.size",!0);function Hg(e,t,r,i){for(var n=sn(e),o;(o=n.next())&&!o.done;)if(Pe(t,o.value,r,i))return zg(e,o.value),!0;return!1}s(Hg,"setHasEqualElement");function Ug(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}s(Ug,"findLooseMatchingPrimitives");function XC(e,t,r,i,n,o){var a=Ug(r);if(a!=null)return a;var l=rl(t,a),c=jg({},n,{strict:!1});return typeof l>"u"&&!Tp(t,a)||!Pe(i,l,c,o)?!1:!Tp(e,a)&&Pe(i,l,c,o)}s(XC,"mapMightHaveLoosePrim");function YC(e,t,r){var i=Ug(r);return i!=null?i:nl(t,i)&&!nl(e,i)}s(YC,"setMightHaveLoosePrim");function Xg(e,t,r,i,n,o){for(var a=sn(e),l,c;(l=a.next())&&!l.done;)if(c=l.value,Pe(r,c,n,o)&&Pe(i,rl(t,c),n,o))return zg(e,c),!0;return!1}s(Xg,"mapHasEqualEntry");function Pe(e,t,r,i){var n=r||{};if(n.strict?wg(e,t):e===t)return!0;var o=Ag(e),a=Ag(t);if(o!==a)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return n.strict?wg(e,t):e==t;var l=i.has(e),c=i.has(t),h;if(l&&c){if(i.get(e)===i.get(t))return!0}else h={};return l||i.set(e,h),c||i.set(t,h),UC(e,t,n,i)}s(Pe,"internalDeepEqual");function Yg(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}s(Yg,"isBuffer");function jC(e,t,r,i){if(tl(e)!==tl(t))return!1;for(var n=sn(e),o=sn(t),a,l,c;(a=n.next())&&!a.done;)if(a.value&&typeof a.value=="object")c||(c=new el),il(c,a.value);else if(!nl(t,a.value)){if(r.strict||!YC(e,t,a.value))return!1;c||(c=new el),il(c,a.value)}if(c){for(;(l=o.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!Hg(c,l.value,r.strict,i))return!1}else if(!r.strict&&!nl(e,l.value)&&!Hg(c,l.value,r.strict,i))return!1;return tl(c)===0}return!0}s(jC,"setEquiv");function zC(e,t,r,i){if(Vg(e)!==Vg(t))return!1;for(var n=sn(e),o=sn(t),a,l,c,h,d,m;(a=n.next())&&!a.done;)if(h=a.value[0],d=a.value[1],h&&typeof h=="object")c||(c=new el),il(c,h);else if(m=rl(t,h),typeof m>"u"&&!Tp(t,h)||!Pe(d,m,r,i)){if(r.strict||!XC(e,t,h,d,r,i))return!1;c||(c=new el),il(c,h)}if(c){for(;(l=o.next())&&!l.done;)if(h=l.value[0],m=l.value[1],h&&typeof h=="object"){if(!Xg(c,e,h,m,r,i))return!1}else if(!r.strict&&(!e.has(h)||!Pe(rl(e,h),m,r,i))&&!Xg(c,e,h,m,jg({},r,{strict:!1}),i))return!1;return tl(c)===0}return!0}s(zC,"mapEquiv");function UC(e,t,r,i){var n,o;if(typeof e!=typeof t||e==null||t==null||Gg(e)!==Gg(t)||Tg(e)!==Tg(t))return!1;var a=Ig(e),l=Ig(t);if(a!==l)return!1;var c=e instanceof Error,h=t instanceof Error;if(c!==h||(c||h)&&(e.name!==t.name||e.message!==t.message))return!1;var d=Lg(e),m=Lg(t);if(d!==m||(d||m)&&(e.source!==t.source||Mg(e)!==Mg(t)))return!1;var y=_g(e),x=_g(t);if(y!==x||(y||x)&&Bg(e)!==Bg(t)||r.strict&&wp&&wp(e)!==wp(t))return!1;var S=kg(e),P=kg(t);if(S!==P)return!1;if(S||P){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var g=Yg(e),C=Yg(t);if(g!==C)return!1;if(g||C){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var M=Eg(e),T=Eg(t);if(M!==T)return!1;if(M||T)return Rg(e)!==Rg(t)?!1:typeof Uint8Array=="function"&&Pe(new Uint8Array(e),new Uint8Array(t),r,i);var w=Og(e),E=Og(t);if(w!==E)return!1;if(w||E)return Fg(e)!==Fg(t)?!1:typeof Uint8Array=="function"&&Pe(new Uint8Array(e),new Uint8Array(t),r,i);if(typeof e!=typeof t)return!1;var L=Dg(e),R=Dg(t);if(L.length!==R.length)return!1;for(L.sort(),R.sort(),n=L.length-1;n>=0;n--)if(L[n]!=R[n])return!1;for(n=L.length-1;n>=0;n--)if(o=L[n],!Pe(e[o],t[o],r,i))return!1;var F=Ng(e),k=Ng(t);return F!==k?!1:F==="Set"||k==="Set"?jC(e,t,r,i):F==="Map"?zC(e,t,r,i):!0}s(UC,"objEquiv");Wg.exports=s(function(t,r,i){return Pe(t,r,i,HC())},"deepEqual")});var u2=A(K=>{"use strict";f();Object.defineProperty(K,"__esModule",{value:!0});function WC(e){return e&&e.__esModule?e:{default:e}}s(WC,"_interopRequireDefault");var ZC=Object.defineProperty,et=s((e,t)=>ZC(e,"name",{value:t,configurable:!0}),"__name"),qC=Zg(),$C=WC(qC),xo,qg=(xo=class{constructor(t){this.direction=!1,this.compareProperties=!0;var r,i,n;this.precision=10**-((r=t==null?void 0:t.precision)!=null?r:17),this.direction=(i=t==null?void 0:t.direction)!=null?i:!1,this.compareProperties=(n=t==null?void 0:t.compareProperties)!=null?n:!0}compare(t,r){if(t.type!==r.type||!bo(t,r))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,r.coordinates);case"LineString":return this.compareLine(t.coordinates,r.coordinates);case"Polygon":return this.comparePolygon(t,r);case"GeometryCollection":return this.compareGeometryCollection(t,r);case"Feature":return this.compareFeature(t,r);case"FeatureCollection":return this.compareFeatureCollection(t,r);default:if(t.type.startsWith("Multi")){let i=Ip(t),n=Ip(r);return i.every(o=>n.some(a=>this.compare(o,a)))}}return!1}compareCoord(t,r){return t.length===r.length&&t.every((i,n)=>Math.abs(i-r[n])<this.precision)}compareLine(t,r,i=0,n=!1){if(!bo(t,r))return!1;let o=t,a=r;if(n&&!this.compareCoord(o[0],a[0])){let c=this.fixStartIndex(a,o);if(c)a=c;else return!1}let l=this.compareCoord(o[i],a[i]);return this.direction||l?this.comparePath(o,a):this.compareCoord(o[i],a[a.length-(1+i)])?this.comparePath(o.slice().reverse(),a):!1}fixStartIndex(t,r){let i,n=-1;for(let o=0;o<t.length;o++)if(this.compareCoord(t[o],r[0])){n=o;break}return n>=0&&(i=[].concat(t.slice(n,t.length),t.slice(1,n+1))),i}comparePath(t,r){return t.every((i,n)=>this.compareCoord(i,r[n]))}comparePolygon(t,r){if(this.compareLine(t.coordinates[0],r.coordinates[0],1,!0)){let i=t.coordinates.slice(1,t.coordinates.length),n=r.coordinates.slice(1,r.coordinates.length);return i.every(o=>n.some(a=>this.compareLine(o,a,1,!0)))}return!1}compareGeometryCollection(t,r){return bo(t.geometries,r.geometries)&&this.compareBBox(t,r)&&t.geometries.every((i,n)=>this.compare(i,r.geometries[n]))}compareFeature(t,r){return t.id===r.id&&(this.compareProperties?$C.default.call(void 0,t.properties,r.properties):!0)&&this.compareBBox(t,r)&&this.compare(t.geometry,r.geometry)}compareFeatureCollection(t,r){return bo(t.features,r.features)&&this.compareBBox(t,r)&&t.features.every((i,n)=>this.compare(i,r.features[n]))}compareBBox(t,r){return!t.bbox&&!r.bbox||(t.bbox&&r.bbox?this.compareCoord(t.bbox,r.bbox):!1)}},s(xo,"_GeojsonEquality"),xo);et(qg,"GeojsonEquality");var JC=qg;function bo(e,t){return e.coordinates?e.coordinates.length===t.coordinates.length:e.length===t.length}s(bo,"sameLength");et(bo,"sameLength");function Ip(e){return e.coordinates.map(t=>({type:e.type.replace("Multi",""),coordinates:t}))}s(Ip,"explode");et(Ip,"explode");var ee=63710088e-1,_p={centimeters:ee*100,centimetres:ee*100,degrees:360/(2*Math.PI),feet:ee*3.28084,inches:ee*39.37,kilometers:ee/1e3,kilometres:ee/1e3,meters:ee,metres:ee,miles:ee/1609.344,millimeters:ee*1e3,millimetres:ee*1e3,nauticalmiles:ee/1852,radians:1,yards:ee*1.0936},Ep={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 er(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(er,"feature");et(er,"feature");function $g(e,t,r={}){switch(e){case"Point":return ol(t).geometry;case"LineString":return sl(t).geometry;case"Polygon":return al(t).geometry;case"MultiPoint":return Op(t).geometry;case"MultiLineString":return Lp(t).geometry;case"MultiPolygon":return Dp(t).geometry;default:throw new Error(e+" is invalid")}}s($g,"geometry");et($g,"geometry");function ol(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Co(e[0])||!Co(e[1]))throw new Error("coordinates must contain numbers");return er({type:"Point",coordinates:e},t,r)}s(ol,"point");et(ol,"point");function Jg(e,t,r={}){return So(e.map(i=>ol(i,t)),r)}s(Jg,"points");et(Jg,"points");function al(e,t,r={}){for(let n of e){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<n[n.length-1].length;o++)if(n[n.length-1][o]!==n[0][o])throw new Error("First and last Position are not equivalent.")}return er({type:"Polygon",coordinates:e},t,r)}s(al,"polygon");et(al,"polygon");function Kg(e,t,r={}){return So(e.map(i=>al(i,t)),r)}s(Kg,"polygons");et(Kg,"polygons");function sl(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return er({type:"LineString",coordinates:e},t,r)}s(sl,"lineString");et(sl,"lineString");function Qg(e,t,r={}){return So(e.map(i=>sl(i,t)),r)}s(Qg,"lineStrings");et(Qg,"lineStrings");function So(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(So,"featureCollection");et(So,"featureCollection");function Lp(e,t,r={}){return er({type:"MultiLineString",coordinates:e},t,r)}s(Lp,"multiLineString");et(Lp,"multiLineString");function Op(e,t,r={}){return er({type:"MultiPoint",coordinates:e},t,r)}s(Op,"multiPoint");et(Op,"multiPoint");function Dp(e,t,r={}){return er({type:"MultiPolygon",coordinates:e},t,r)}s(Dp,"multiPolygon");et(Dp,"multiPolygon");function t2(e,t,r={}){return er({type:"GeometryCollection",geometries:e},t,r)}s(t2,"geometryCollection");et(t2,"geometryCollection");function e2(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}s(e2,"round");et(e2,"round");function Ap(e,t="kilometers"){let r=_p[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(Ap,"radiansToLength");et(Ap,"radiansToLength");function ll(e,t="kilometers"){let r=_p[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(ll,"lengthToRadians");et(ll,"lengthToRadians");function r2(e,t){return Np(ll(e,t))}s(r2,"lengthToDegrees");et(r2,"lengthToDegrees");function i2(e){let t=e%360;return t<0&&(t+=360),t}s(i2,"bearingToAzimuth");et(i2,"bearingToAzimuth");function Np(e){return e%(2*Math.PI)*180/Math.PI}s(Np,"radiansToDegrees");et(Np,"radiansToDegrees");function n2(e){return e%360*Math.PI/180}s(n2,"degreesToRadians");et(n2,"degreesToRadians");function o2(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return Ap(ll(e,t),r)}s(o2,"convertLength");et(o2,"convertLength");function a2(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=Ep[t];if(!i)throw new Error("invalid original units");let n=Ep[r];if(!n)throw new Error("invalid final units");return e/i*n}s(a2,"convertArea");et(a2,"convertArea");function Co(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(Co,"isNumber");et(Co,"isNumber");function s2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}s(s2,"isObject");et(s2,"isObject");function l2(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!Co(t))throw new Error("bbox must only contain numbers")})}s(l2,"validateBBox");et(l2,"validateBBox");function c2(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")}s(c2,"validateId");et(c2,"validateId");K.GeojsonEquality=JC;K.areaFactors=Ep;K.bearingToAzimuth=i2;K.convertArea=a2;K.convertLength=o2;K.degreesToRadians=n2;K.earthRadius=ee;K.factors=_p;K.feature=er;K.featureCollection=So;K.geometry=$g;K.geometryCollection=t2;K.isNumber=Co;K.isObject=s2;K.lengthToDegrees=r2;K.lengthToRadians=ll;K.lineString=sl;K.lineStrings=Qg;K.multiLineString=Lp;K.multiPoint=Op;K.multiPolygon=Dp;K.point=ol;K.points=Jg;K.polygon=al;K.polygons=Kg;K.radiansToDegrees=Np;K.radiansToLength=Ap;K.round=e2;K.validateBBox=l2;K.validateId=c2});var x2=A(Tt=>{"use strict";f();Object.defineProperty(Tt,"__esModule",{value:!0});var KC=Object.defineProperty,kt=s((e,t)=>KC(e,"name",{value:t,configurable:!0}),"__name"),Ht=u2();function ln(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,m=0,y,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,y=h?h.type==="GeometryCollection":!1,l=y?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=y?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],m,C,T,w)===!1)return!1;m++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],m,C,T,w)===!1)return!1;m++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(ln(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(ln,"coordEach");kt(ln,"coordEach");function p2(e,t,r,i){var n=r;return ln(e,function(o,a,l,c,h){a===0&&r===void 0?n=o:n=t(n,o,a,l,c,h)},i),n}s(p2,"coordReduce");kt(p2,"coordReduce");function kp(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}s(kp,"propEach");kt(kp,"propEach");function h2(e,t,r){var i=r;return kp(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(h2,"propReduce");kt(h2,"propReduce");function Rp(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(Rp,"featureEach");kt(Rp,"featureEach");function f2(e,t,r){var i=r;return Rp(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(f2,"featureReduce");kt(f2,"featureReduce");function d2(e){var t=[];return ln(e,function(r){t.push(r)}),t}s(d2,"coordAll");kt(d2,"coordAll");function cl(e,t){var r,i,n,o,a,l,c,h,d,m,y=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,m=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,y,h,d,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,h,d,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,h,d,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}s(cl,"geomEach");kt(cl,"geomEach");function m2(e,t,r){var i=r;return cl(e,function(n,o,a,l,c){o===0&&r===void 0?i=n:i=t(i,n,o,a,l,c)}),i}s(m2,"geomReduce");kt(m2,"geomReduce");function Po(e,t){cl(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(Ht.feature.call(void 0,r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],m={type:c,coordinates:d};if(t(Ht.feature.call(void 0,m,n),i,h)===!1)return!1}})}s(Po,"flattenEach");kt(Po,"flattenEach");function y2(e,t,r){var i=r;return Po(e,function(n,o,a){o===0&&a===0&&r===void 0?i=n:i=t(i,n,o,a)}),i}s(y2,"flattenReduce");kt(y2,"flattenReduce");function Fp(e,t){Po(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(ln(r,function(m,y,x,S,P){if(l===void 0||i>c||S>h||P>d){l=m,c=i,h=S,d=P,o=0;return}var g=Ht.lineString.call(void 0,[l,m],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=m})===!1)return!1}}})}s(Fp,"segmentEach");kt(Fp,"segmentEach");function g2(e,t,r){var i=r,n=!1;return Fp(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(g2,"segmentReduce");kt(g2,"segmentReduce");function Bp(e,t){if(!e)throw new Error("geojson is required");Po(e,function(r,i,n){if(r.geometry!==null){var o=r.geometry.type,a=r.geometry.coordinates;switch(o){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<a.length;l++)if(t(Ht.lineString.call(void 0,a[l],r.properties),i,n,l)===!1)return!1;break}}})}s(Bp,"lineEach");kt(Bp,"lineEach");function v2(e,t,r){var i=r;return Bp(e,function(n,o,a,l){o===0&&r===void 0?i=n:i=t(i,n,o,a,l)}),i}s(v2,"lineReduce");kt(v2,"lineReduce");function b2(e,t){if(t=t||{},!Ht.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=c.length+o-1),Ht.lineString.call(void 0,[c[o],c[o+1]],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o-1),Ht.lineString.call(void 0,[c[n][o],c[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o-1),Ht.lineString.call(void 0,[c[i][o],c[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o-1),Ht.lineString.call(void 0,[c[i][n][o],c[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}s(b2,"findSegment");kt(b2,"findSegment");function C2(e,t){if(t=t||{},!Ht.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":return Ht.point.call(void 0,c,a,t);case"MultiPoint":return i<0&&(i=c.length+i),Ht.point.call(void 0,c[i],a,t);case"LineString":return o<0&&(o=c.length+o),Ht.point.call(void 0,c[o],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o),Ht.point.call(void 0,c[n][o],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),Ht.point.call(void 0,c[i][o],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o),Ht.point.call(void 0,c[i][n][o],a,t)}throw new Error("geojson is invalid")}s(C2,"findPoint");kt(C2,"findPoint");Tt.coordAll=d2;Tt.coordEach=ln;Tt.coordReduce=p2;Tt.featureEach=Rp;Tt.featureReduce=f2;Tt.findPoint=C2;Tt.findSegment=b2;Tt.flattenEach=Po;Tt.flattenReduce=y2;Tt.geomEach=cl;Tt.geomReduce=m2;Tt.lineEach=Bp;Tt.lineReduce=v2;Tt.propEach=kp;Tt.propReduce=h2;Tt.segmentEach=Fp;Tt.segmentReduce=g2});var S2=A(ul=>{"use strict";f();Object.defineProperty(ul,"__esModule",{value:!0});var QC=Object.defineProperty,t6=s((e,t)=>QC(e,"name",{value:t,configurable:!0}),"__name"),e6=x2();function Gp(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return e6.coordEach.call(void 0,e,i=>{r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}s(Gp,"bbox");t6(Gp,"bbox");var r6=Gp;ul.bbox=Gp;ul.default=r6});var I2=A((g_,Vp)=>{f();var Ve=xm(),M2=su(),w2=Om(),cn=S2().default,i6=w2.featureEach,m_=w2.coordEach,y_=M2.polygon,P2=M2.featureCollection;function T2(e){var t=new Ve(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:cn(r),Ve.prototype.insert.call(this,r)},t.load=function(r){var i=[];return Array.isArray(r)?r.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:cn(n),i.push(n)}):i6(r,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:cn(n),i.push(n)}),Ve.prototype.load.call(this,i)},t.remove=function(r,i){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:cn(r),Ve.prototype.remove.call(this,r,i)},t.clear=function(){return Ve.prototype.clear.call(this)},t.search=function(r){var i=Ve.prototype.search.call(this,this.toBBox(r));return P2(i)},t.collides=function(r){return Ve.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=Ve.prototype.all.call(this);return P2(r)},t.toJSON=function(){return Ve.prototype.toJSON.call(this)},t.fromJSON=function(r){return Ve.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var i;if(r.bbox)i=r.bbox;else if(Array.isArray(r)&&r.length===4)i=r;else if(Array.isArray(r)&&r.length===6)i=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")i=cn(r);else if(r.type==="FeatureCollection")i=cn(r);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},t}s(T2,"geojsonRbush");Vp.exports=T2;Vp.exports.default=T2});var On=A((zh,Uh)=>{f();var Wh=s(function(){this._tweens={},this._tweensAddedDuringUpdate={}},"_Group");Wh.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var r=Object.keys(this._tweens);if(r.length===0)return!1;for(e=e!==void 0?e:it.now();r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var n=this._tweens[r[i]];n&&n.update(e)===!1&&(n._isPlaying=!1,t||delete this._tweens[r[i]])}r=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var it=new Wh;it.Group=Wh;it._nextId=0;it.nextId=function(){return it._nextId++};typeof self>"u"&&typeof b<"u"&&b.hrtime?it.now=function(){var e=b.hrtime();return e[0]*1e3+e[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?it.now=self.performance.now.bind(self.performance):Date.now!==void 0?it.now=Date.now:it.now=function(){return new Date().getTime()};it.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=it.Easing.Linear.None,this._interpolationFunction=it.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||it,this._id=it.nextId()};it.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,t!==void 0&&(this._duration=t),this},duration:s(function(t){return this._duration=t,this},"duration"),start:function(e){this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=e!==void 0?typeof e=="string"?it.now()+parseFloat(e):e:it.now(),this._startTime+=this._delayTime;for(var t in this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(this._valuesEnd[t].length===0)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}this._object[t]!==void 0&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array||(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._onStopCallback!==null&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onRepeat:s(function(t){return this._onRepeatCallback=t,this},"onRepeat"),onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,r,i;if(e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback!==null&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=this._duration===0||r>1?1:r,i=this._easingFunction(r);for(t in this._valuesEnd)if(this._valuesStart[t]!==void 0){var n=this._valuesStart[t]||0,o=this._valuesEnd[t];o instanceof Array?this._object[t]=this._interpolationFunction(o,i):(typeof o=="string"&&(o.charAt(0)==="+"||o.charAt(0)==="-"?o=n+parseFloat(o):o=parseFloat(o)),typeof o=="number"&&(this._object[t]=n+(o-n)*i))}if(this._onUpdateCallback!==null&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(t in this._valuesStartRepeat){if(typeof this._valuesEnd[t]=="string"&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var a=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=a}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback!==null&&this._onRepeatCallback(this._object),!0}else{this._onCompleteCallback!==null&&this._onCompleteCallback(this._object);for(var l=0,c=this._chainedTweens.length;l<c;l++)this._chainedTweens[l].start(this._startTime+this._duration);return!1}return!0}};it.Easing={Linear:{None:function(e){return e}},Quadratic:{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:{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:{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:{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:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.cos(Math.PI*e))}},Exponential:{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:{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:{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:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-it.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?it.Easing.Bounce.In(e*2)*.5:it.Easing.Bounce.Out(e*2-1)*.5+.5}}};it.Interpolation={Linear:function(e,t){var r=e.length-1,i=r*t,n=Math.floor(i),o=it.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],i):t>1?o(e[r],e[r-1],r-i):o(e[n],e[n+1>r?r:n+1],i-n)},Bezier:function(e,t){for(var r=0,i=e.length-1,n=Math.pow,o=it.Interpolation.Utils.Bernstein,a=0;a<=i;a++)r+=n(1-t,i-a)*n(t,a)*e[a]*o(i,a);return r},CatmullRom:function(e,t){var r=e.length-1,i=r*t,n=Math.floor(i),o=it.Interpolation.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(n=Math.floor(i=r*(1+t))),o(e[(n-1+r)%r],e[n],e[(n+1)%r],e[(n+2)%r],i-n)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[n?n-1:0],e[n],e[r<n+1?r:n+1],e[r<n+2?r:n+2],i-n)},Utils:{Linear:function(e,t,r){return(t-e)*r+e},Bernstein:function(e,t){var r=it.Interpolation.Utils.Factorial;return r(e)/r(t)/r(e-t)},Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var i=t;i>1;i--)r*=i;return e[t]=r,r}}(),CatmullRom:function(e,t,r,i,n){var o=(r-e)*.5,a=(i-t)*.5,l=n*n,c=n*l;return(2*t-2*r+o+a)*c+(-3*t+3*r-2*o-a)*l+o*n+t}}};(function(e){typeof define=="function"&&define.amd?define([],function(){return it}):typeof Uh<"u"&&typeof zh=="object"?Uh.exports=it:e!==void 0&&(e.TWEEN=it)})(zh)});var nb=A((aa,Rn)=>{f();var o8=200,Fv="__lodash_hash_undefined__",a8=800,s8=16,Bv=9007199254740991,Gv="[object Arguments]",l8="[object Array]",c8="[object AsyncFunction]",u8="[object Boolean]",p8="[object Date]",h8="[object Error]",Vv="[object Function]",f8="[object GeneratorFunction]",d8="[object Map]",m8="[object Number]",y8="[object Null]",Hv="[object Object]",g8="[object Proxy]",v8="[object RegExp]",b8="[object Set]",C8="[object String]",x8="[object Undefined]",S8="[object WeakMap]",P8="[object ArrayBuffer]",M8="[object DataView]",w8="[object Float32Array]",T8="[object Float64Array]",I8="[object Int8Array]",E8="[object Int16Array]",_8="[object Int32Array]",L8="[object Uint8Array]",O8="[object Uint8ClampedArray]",D8="[object Uint16Array]",A8="[object Uint32Array]",N8=/[\\^$.*+?()[\]{}|]/g,k8=/^\[object .+?Constructor\]$/,R8=/^(?:0|[1-9]\d*)$/,ct={};ct[w8]=ct[T8]=ct[I8]=ct[E8]=ct[_8]=ct[L8]=ct[O8]=ct[D8]=ct[A8]=!0;ct[Gv]=ct[l8]=ct[P8]=ct[u8]=ct[M8]=ct[p8]=ct[h8]=ct[Vv]=ct[d8]=ct[m8]=ct[Hv]=ct[v8]=ct[b8]=ct[C8]=ct[S8]=!1;var Xv=typeof global=="object"&&global&&global.Object===Object&&global,F8=typeof self=="object"&&self&&self.Object===Object&&self,ca=Xv||F8||Function("return this")(),Yv=typeof aa=="object"&&aa&&!aa.nodeType&&aa,sa=Yv&&typeof Rn=="object"&&Rn&&!Rn.nodeType&&Rn,jv=sa&&sa.exports===Yv,vf=jv&&Xv.process,Ev=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||vf&&vf.binding&&vf.binding("util")}catch{}}(),_v=Ev&&Ev.isTypedArray;function zv(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}s(zv,"apply");function B8(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}s(B8,"baseTimes");function G8(e){return function(t){return e(t)}}s(G8,"baseUnary");function V8(e,t){return e==null?void 0:e[t]}s(V8,"getValue");function H8(e,t){return function(r){return e(t(r))}}s(H8,"overArg");var X8=Array.prototype,Y8=Function.prototype,Yl=Object.prototype,bf=ca["__core-js_shared__"],jl=Y8.toString,mr=Yl.hasOwnProperty,Lv=function(){var e=/[^.]+$/.exec(bf&&bf.keys&&bf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Uv=Yl.toString,j8=jl.call(Object),z8=RegExp("^"+jl.call(mr).replace(N8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hl=jv?ca.Buffer:void 0,Ov=ca.Symbol,Dv=ca.Uint8Array,Av=Hl?Hl.allocUnsafe:void 0,Wv=H8(Object.getPrototypeOf,Object),Nv=Object.create,U8=Yl.propertyIsEnumerable,W8=X8.splice,Ti=Ov?Ov.toStringTag:void 0,Xl=function(){try{var e=Tf(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Z8=Hl?Hl.isBuffer:void 0,kv=Math.max,q8=Date.now,Zv=Tf(ca,"Map"),la=Tf(Object,"create"),$8=function(){function e(){}return s(e,"object"),function(t){if(!dr(t))return{};if(Nv)return Nv(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(Ii,"Hash");function J8(){this.__data__=la?la(null):{},this.size=0}s(J8,"hashClear");function K8(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}s(K8,"hashDelete");function Q8(e){var t=this.__data__;if(la){var r=t[e];return r===Fv?void 0:r}return mr.call(t,e)?t[e]:void 0}s(Q8,"hashGet");function t9(e){var t=this.__data__;return la?t[e]!==void 0:mr.call(t,e)}s(t9,"hashHas");function e9(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=la&&t===void 0?Fv:t,this}s(e9,"hashSet");Ii.prototype.clear=J8;Ii.prototype.delete=K8;Ii.prototype.get=Q8;Ii.prototype.has=t9;Ii.prototype.set=e9;function yr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(yr,"ListCache");function r9(){this.__data__=[],this.size=0}s(r9,"listCacheClear");function i9(e){var t=this.__data__,r=zl(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():W8.call(t,r,1),--this.size,!0}s(i9,"listCacheDelete");function n9(e){var t=this.__data__,r=zl(t,e);return r<0?void 0:t[r][1]}s(n9,"listCacheGet");function o9(e){return zl(this.__data__,e)>-1}s(o9,"listCacheHas");function a9(e,t){var r=this.__data__,i=zl(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}s(a9,"listCacheSet");yr.prototype.clear=r9;yr.prototype.delete=i9;yr.prototype.get=n9;yr.prototype.has=o9;yr.prototype.set=a9;function Fn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(Fn,"MapCache");function s9(){this.size=0,this.__data__={hash:new Ii,map:new(Zv||yr),string:new Ii}}s(s9,"mapCacheClear");function l9(e){var t=Wl(this,e).delete(e);return this.size-=t?1:0,t}s(l9,"mapCacheDelete");function c9(e){return Wl(this,e).get(e)}s(c9,"mapCacheGet");function u9(e){return Wl(this,e).has(e)}s(u9,"mapCacheHas");function p9(e,t){var r=Wl(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}s(p9,"mapCacheSet");Fn.prototype.clear=s9;Fn.prototype.delete=l9;Fn.prototype.get=c9;Fn.prototype.has=u9;Fn.prototype.set=p9;function Bn(e){var t=this.__data__=new yr(e);this.size=t.size}s(Bn,"Stack");function h9(){this.__data__=new yr,this.size=0}s(h9,"stackClear");function f9(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}s(f9,"stackDelete");function d9(e){return this.__data__.get(e)}s(d9,"stackGet");function m9(e){return this.__data__.has(e)}s(m9,"stackHas");function y9(e,t){var r=this.__data__;if(r instanceof yr){var i=r.__data__;if(!Zv||i.length<o8-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fn(i)}return r.set(e,t),this.size=r.size,this}s(y9,"stackSet");Bn.prototype.clear=h9;Bn.prototype.delete=f9;Bn.prototype.get=d9;Bn.prototype.has=m9;Bn.prototype.set=y9;function g9(e,t){var r=Pf(e),i=!r&&Sf(e),n=!r&&!i&&Qv(e),o=!r&&!i&&!n&&eb(e),a=r||i||n||o,l=a?B8(e.length,String):[],c=l.length;for(var h in e)(t||mr.call(e,h))&&!(a&&(h=="length"||n&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Jv(h,c)))&&l.push(h);return l}s(g9,"arrayLikeKeys");function Cf(e,t,r){(r!==void 0&&!Zl(e[t],r)||r===void 0&&!(t in e))&&Mf(e,t,r)}s(Cf,"assignMergeValue");function v9(e,t,r){var i=e[t];(!(mr.call(e,t)&&Zl(i,r))||r===void 0&&!(t in e))&&Mf(e,t,r)}s(v9,"assignValue");function zl(e,t){for(var r=e.length;r--;)if(Zl(e[r][0],t))return r;return-1}s(zl,"assocIndexOf");function Mf(e,t,r){t=="__proto__"&&Xl?Xl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Mf,"baseAssignValue");var b9=O9();function Ul(e){return e==null?e===void 0?x8:y8:Ti&&Ti in Object(e)?D9(e):B9(e)}s(Ul,"baseGetTag");function Rv(e){return ua(e)&&Ul(e)==Gv}s(Rv,"baseIsArguments");function C9(e){if(!dr(e)||R9(e))return!1;var t=Ef(e)?z8:k8;return t.test(X9(e))}s(C9,"baseIsNative");function x9(e){return ua(e)&&tb(e.length)&&!!ct[Ul(e)]}s(x9,"baseIsTypedArray");function S9(e){if(!dr(e))return F9(e);var t=Kv(e),r=[];for(var i in e)i=="constructor"&&(t||!mr.call(e,i))||r.push(i);return r}s(S9,"baseKeysIn");function wf(e,t,r,i,n){e!==t&&b9(t,function(o,a){if(n||(n=new Bn),dr(o))P9(e,t,a,r,wf,i,n);else{var l=i?i(xf(e,a),o,a+"",e,t,n):void 0;l===void 0&&(l=o),Cf(e,a,l)}},rb)}s(wf,"baseMerge");function P9(e,t,r,i,n,o,a){var l=xf(e,r),c=xf(t,r),h=a.get(c);if(h){Cf(e,r,h);return}var d=o?o(l,c,r+"",e,t,a):void 0,m=d===void 0;if(m){var y=Pf(c),x=!y&&Qv(c),S=!y&&!x&&eb(c);d=c,y||x||S?Pf(l)?d=l:Y9(l)?d=E9(l):x?(m=!1,d=w9(c,!0)):S?(m=!1,d=I9(c,!0)):d=[]:j9(c)||Sf(c)?(d=l,Sf(l)?d=z9(l):(!dr(l)||Ef(l))&&(d=A9(c))):m=!1}m&&(a.set(c,d),n(d,c,i,o,a),a.delete(c)),Cf(e,r,d)}s(P9,"baseMergeDeep");function qv(e,t){return V9(G9(e,t,ib),e+"")}s(qv,"baseRest");var M9=Xl?function(e,t){return Xl(e,"toString",{configurable:!0,enumerable:!1,value:Z9(t),writable:!0})}:ib;function w9(e,t){if(t)return e.slice();var r=e.length,i=Av?Av(r):new e.constructor(r);return e.copy(i),i}s(w9,"cloneBuffer");function T9(e){var t=new e.constructor(e.byteLength);return new Dv(t).set(new Dv(e)),t}s(T9,"cloneArrayBuffer");function I9(e,t){var r=t?T9(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}s(I9,"cloneTypedArray");function E9(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}s(E9,"copyArray");function _9(e,t,r,i){var n=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var l=t[o],c=i?i(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),n?Mf(r,l,c):v9(r,l,c)}return r}s(_9,"copyObject");function L9(e){return qv(function(t,r){var i=-1,n=r.length,o=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(n--,o):void 0,a&&N9(r[0],r[1],a)&&(o=n<3?void 0:o,n=1),t=Object(t);++i<n;){var l=r[i];l&&e(t,l,i,o)}return t})}s(L9,"createAssigner");function O9(e){return function(t,r,i){for(var n=-1,o=Object(t),a=i(t),l=a.length;l--;){var c=a[e?l:++n];if(r(o[c],c,o)===!1)break}return t}}s(O9,"createBaseFor");function $v(e,t,r,i,n,o){return dr(e)&&dr(t)&&(o.set(t,e),wf(e,t,void 0,$v,o),o.delete(t)),e}s($v,"customDefaultsMerge");function Wl(e,t){var r=e.__data__;return k9(t)?r[typeof t=="string"?"string":"hash"]:r.map}s(Wl,"getMapData");function Tf(e,t){var r=V8(e,t);return C9(r)?r:void 0}s(Tf,"getNative");function D9(e){var t=mr.call(e,Ti),r=e[Ti];try{e[Ti]=void 0;var i=!0}catch{}var n=Uv.call(e);return i&&(t?e[Ti]=r:delete e[Ti]),n}s(D9,"getRawTag");function A9(e){return typeof e.constructor=="function"&&!Kv(e)?$8(Wv(e)):{}}s(A9,"initCloneObject");function Jv(e,t){var r=typeof e;return t=t==null?Bv:t,!!t&&(r=="number"||r!="symbol"&&R8.test(e))&&e>-1&&e%1==0&&e<t}s(Jv,"isIndex");function N9(e,t,r){if(!dr(r))return!1;var i=typeof t;return(i=="number"?If(r)&&Jv(t,r.length):i=="string"&&t in r)?Zl(r[t],e):!1}s(N9,"isIterateeCall");function k9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}s(k9,"isKeyable");function R9(e){return!!Lv&&Lv in e}s(R9,"isMasked");function Kv(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Yl;return e===r}s(Kv,"isPrototype");function F9(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}s(F9,"nativeKeysIn");function B9(e){return Uv.call(e)}s(B9,"objectToString");function G9(e,t,r){return t=kv(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,o=kv(i.length-t,0),a=Array(o);++n<o;)a[n]=i[t+n];n=-1;for(var l=Array(t+1);++n<t;)l[n]=i[n];return l[t]=r(a),zv(e,this,l)}}s(G9,"overRest");function xf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}s(xf,"safeGet");var V9=H9(M9);function H9(e){var t=0,r=0;return function(){var i=q8(),n=s8-(i-r);if(r=i,n>0){if(++t>=a8)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}s(H9,"shortOut");function X9(e){if(e!=null){try{return jl.call(e)}catch{}try{return e+""}catch{}}return""}s(X9,"toSource");function Zl(e,t){return e===t||e!==e&&t!==t}s(Zl,"eq");var Sf=Rv(function(){return arguments}())?Rv:function(e){return ua(e)&&mr.call(e,"callee")&&!U8.call(e,"callee")},Pf=Array.isArray;function If(e){return e!=null&&tb(e.length)&&!Ef(e)}s(If,"isArrayLike");function Y9(e){return ua(e)&&If(e)}s(Y9,"isArrayLikeObject");var Qv=Z8||q9;function Ef(e){if(!dr(e))return!1;var t=Ul(e);return t==Vv||t==f8||t==c8||t==g8}s(Ef,"isFunction");function tb(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bv}s(tb,"isLength");function dr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}s(dr,"isObject");function ua(e){return e!=null&&typeof e=="object"}s(ua,"isObjectLike");function j9(e){if(!ua(e)||Ul(e)!=Hv)return!1;var t=Wv(e);if(t===null)return!0;var r=mr.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&jl.call(r)==j8}s(j9,"isPlainObject");var eb=_v?G8(_v):x9;function z9(e){return _9(e,rb(e))}s(z9,"toPlainObject");var U9=qv(function(e){return e.push(void 0,$v),zv(W9,void 0,e)});function rb(e){return If(e)?g9(e,!0):S9(e)}s(rb,"keysIn");var W9=L9(function(e,t,r,i){wf(e,t,r,i)});function Z9(e){return function(){return e}}s(Z9,"constant");function ib(e){return e}s(ib,"identity");function q9(){return!1}s(q9,"stubFalse");Rn.exports=U9});var Rb=A((BG,xa)=>{"use strict";f();var yx=!1,Oi=!1,_b=!0,Lb=!1,p={},Ob=!1;typeof xa<"u"&&xa.exports?(xa.exports=p,Ob=!0):typeof document<"u"?window.ClipperLib=p:self.ClipperLib=p;var ac;Ob?(Lt="chrome",ac="Netscape"):(Lt=navigator.userAgent.toString().toLowerCase(),ac=navigator.appName);var Lt,W={};Lt.indexOf("chrome")!=-1&&Lt.indexOf("chromium")==-1?W.chrome=1:W.chrome=0;Lt.indexOf("chromium")!=-1?W.chromium=1:W.chromium=0;Lt.indexOf("safari")!=-1&&Lt.indexOf("chrome")==-1&&Lt.indexOf("chromium")==-1?W.safari=1:W.safari=0;Lt.indexOf("firefox")!=-1?W.firefox=1:W.firefox=0;Lt.indexOf("firefox/17")!=-1?W.firefox17=1:W.firefox17=0;Lt.indexOf("firefox/15")!=-1?W.firefox15=1:W.firefox15=0;Lt.indexOf("firefox/3")!=-1?W.firefox3=1:W.firefox3=0;Lt.indexOf("opera")!=-1?W.opera=1:W.opera=0;Lt.indexOf("msie 10")!=-1?W.msie10=1:W.msie10=0;Lt.indexOf("msie 9")!=-1?W.msie9=1:W.msie9=0;Lt.indexOf("msie 8")!=-1?W.msie8=1:W.msie8=0;Lt.indexOf("msie 7")!=-1?W.msie7=1:W.msie7=0;Lt.indexOf("msie ")!=-1?W.msie=1:W.msie=0;p.biginteger_used=null;var qr,gx=0xdeadbeefcafe,Ib=(gx&16777215)==15715070;function O(e,t,r){p.biginteger_used=1,e!=null&&(typeof e=="number"&&typeof t>"u"?this.fromInt(e):typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}s(O,"BigInteger");function q(){return new O(null)}s(q,"nbi");function vx(e,t,r,i,n,o){for(;--o>=0;){var a=t*this[e++]+r[i]+n;n=Math.floor(a/67108864),r[i++]=a&67108863}return n}s(vx,"am1");function bx(e,t,r,i,n,o){for(var a=t&32767,l=t>>15;--o>=0;){var c=this[e]&32767,h=this[e++]>>15,d=l*c+h*a;c=a*c+((d&32767)<<15)+r[i]+(n&1073741823),n=(c>>>30)+(d>>>15)+l*h+(n>>>30),r[i++]=c&1073741823}return n}s(bx,"am2");function Cx(e,t,r,i,n,o){for(var a=t&16383,l=t>>14;--o>=0;){var c=this[e]&16383,h=this[e++]>>14,d=l*c+h*a;c=a*c+((d&16383)<<14)+r[i]+n,n=(c>>28)+(d>>14)+l*h,r[i++]=c&268435455}return n}s(Cx,"am3");Ib&&ac=="Microsoft Internet Explorer"?(O.prototype.am=bx,qr=30):Ib&&ac!="Netscape"?(O.prototype.am=vx,qr=26):(O.prototype.am=Cx,qr=28);O.prototype.DB=qr;O.prototype.DM=(1<<qr)-1;O.prototype.DV=1<<qr;var Xf=52;O.prototype.FV=Math.pow(2,Xf);O.prototype.F1=Xf-qr;O.prototype.F2=2*qr-Xf;var xx="0123456789abcdefghijklmnopqrstuvwxyz",lc=new Array,Hn,ye;Hn=48;for(ye=0;ye<=9;++ye)lc[Hn++]=ye;Hn=97;for(ye=10;ye<36;++ye)lc[Hn++]=ye;Hn=65;for(ye=10;ye<36;++ye)lc[Hn++]=ye;function Eb(e){return xx.charAt(e)}s(Eb,"int2char");function Db(e,t){var r=lc[e.charCodeAt(t)];return r==null?-1:r}s(Db,"intAt");function Sx(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}s(Sx,"bnpCopyTo");function Px(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}s(Px,"bnpFromInt");function Zr(e){var t=q();return t.fromInt(e),t}s(Zr,"nbv");function Mx(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var i=e.length,n=!1,o=0;--i>=0;){var a=r==8?e[i]&255:Db(e,i);if(a<0){e.charAt(i)=="-"&&(n=!0);continue}n=!1,o==0?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=r,o>=this.DB&&(o-=this.DB)}r==8&&e[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),n&&O.ZERO.subTo(this,this)}s(Mx,"bnpFromString");function wx(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}s(wx,"bnpClamp");function Tx(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,n=!1,o="",a=this.t,l=this.DB-a*this.DB%t;if(a-- >0)for(l<this.DB&&(i=this[a]>>l)>0&&(n=!0,o=Eb(i));a>=0;)l<t?(i=(this[a]&(1<<l)-1)<<t-l,i|=this[--a]>>(l+=this.DB-t)):(i=this[a]>>(l-=t)&r,l<=0&&(l+=this.DB,--a)),i>0&&(n=!0),n&&(o+=Eb(i));return n?o:"0"}s(Tx,"bnToString");function Ix(){var e=q();return O.ZERO.subTo(this,e),e}s(Ix,"bnNegate");function Ex(){return this.s<0?this.negate():this}s(Ex,"bnAbs");function _x(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}s(_x,"bnCompareTo");function cc(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}s(cc,"nbits");function Lx(){return this.t<=0?0:this.DB*(this.t-1)+cc(this[this.t-1]^this.s&this.DM)}s(Lx,"bnBitLength");function Ox(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}s(Ox,"bnpDLShiftTo");function Dx(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}s(Dx,"bnpDRShiftTo");function Ax(e,t){var r=e%this.DB,i=this.DB-r,n=(1<<i)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,l;for(l=this.t-1;l>=0;--l)t[l+o+1]=this[l]>>i|a,a=(this[l]&n)<<r;for(l=o-1;l>=0;--l)t[l]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()}s(Ax,"bnpLShiftTo");function Nx(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB,n=this.DB-i,o=(1<<i)-1;t[0]=this[r]>>i;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<n,t[a-r]=this[a]>>i;i>0&&(t[this.t-r-1]|=(this.s&o)<<n),t.t=this.t-r,t.clamp()}s(Nx,"bnpRShiftTo");function kx(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this[r]-e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i-=e[r],t[r++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()}s(kx,"bnpSubTo");function Rx(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&O.ZERO.subTo(t,t)}s(Rx,"bnpMultiplyTo");function Fx(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}s(Fx,"bnpSquareTo");function Bx(e,t,r){var i=e.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=q());var o=q(),a=this.s,l=e.s,c=this.DB-cc(i[i.t-1]);c>0?(i.lShiftTo(c,o),n.lShiftTo(c,r)):(i.copyTo(o),n.copyTo(r));var h=o.t,d=o[h-1];if(d!=0){var m=d*(1<<this.F1)+(h>1?o[h-2]>>this.F2:0),y=this.FV/m,x=(1<<this.F1)/m,S=1<<this.F2,P=r.t,g=P-h,C=t==null?q():t;for(o.dlShiftTo(g,C),r.compareTo(C)>=0&&(r[r.t++]=1,r.subTo(C,r)),O.ONE.dlShiftTo(h,C),C.subTo(o,o);o.t<h;)o[o.t++]=0;for(;--g>=0;){var M=r[--P]==d?this.DM:Math.floor(r[P]*y+(r[P-1]+S)*x);if((r[P]+=o.am(0,M,r,g,0,h))<M)for(o.dlShiftTo(g,C),r.subTo(C,r);r[P]<--M;)r.subTo(C,r)}t!=null&&(r.drShiftTo(h,t),a!=l&&O.ZERO.subTo(t,t)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&O.ZERO.subTo(r,r)}}}s(Bx,"bnpDivRemTo");function Gx(e){var t=q();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(O.ZERO)>0&&e.subTo(t,t),t}s(Gx,"bnMod");function Di(e){this.m=e}s(Di,"Classic");function Vx(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}s(Vx,"cConvert");function Hx(e){return e}s(Hx,"cRevert");function Xx(e){e.divRemTo(this.m,null,e)}s(Xx,"cReduce");function Yx(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(Yx,"cMulTo");function jx(e,t){e.squareTo(t),this.reduce(t)}s(jx,"cSqrTo");Di.prototype.convert=Vx;Di.prototype.revert=Hx;Di.prototype.reduce=Xx;Di.prototype.mulTo=Yx;Di.prototype.sqrTo=jx;function zx(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}s(zx,"bnpInvDigit");function Ai(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}s(Ai,"Montgomery");function Ux(e){var t=q();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(O.ZERO)>0&&this.m.subTo(t,t),t}s(Ux,"montConvert");function Wx(e){var t=q();return e.copyTo(t),this.reduce(t),t}s(Wx,"montRevert");function Zx(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}s(Zx,"montReduce");function qx(e,t){e.squareTo(t),this.reduce(t)}s(qx,"montSqrTo");function $x(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s($x,"montMulTo");Ai.prototype.convert=Ux;Ai.prototype.revert=Wx;Ai.prototype.reduce=Zx;Ai.prototype.mulTo=$x;Ai.prototype.sqrTo=qx;function Jx(){return(this.t>0?this[0]&1:this.s)==0}s(Jx,"bnpIsEven");function Kx(e,t){if(e>4294967295||e<1)return O.ONE;var r=q(),i=q(),n=t.convert(this),o=cc(e)-1;for(n.copyTo(r);--o>=0;)if(t.sqrTo(r,i),(e&1<<o)>0)t.mulTo(i,n,r);else{var a=r;r=i,i=a}return t.revert(r)}s(Kx,"bnpExp");function Qx(e,t){var r;return e<256||t.isEven()?r=new Di(t):r=new Ai(t),this.exp(e,r)}s(Qx,"bnModPowInt");O.prototype.copyTo=Sx;O.prototype.fromInt=Px;O.prototype.fromString=Mx;O.prototype.clamp=wx;O.prototype.dlShiftTo=Ox;O.prototype.drShiftTo=Dx;O.prototype.lShiftTo=Ax;O.prototype.rShiftTo=Nx;O.prototype.subTo=kx;O.prototype.multiplyTo=Rx;O.prototype.squareTo=Fx;O.prototype.divRemTo=Bx;O.prototype.invDigit=zx;O.prototype.isEven=Jx;O.prototype.exp=Kx;O.prototype.toString=Tx;O.prototype.negate=Ix;O.prototype.abs=Ex;O.prototype.compareTo=_x;O.prototype.bitLength=Lx;O.prototype.mod=Gx;O.prototype.modPowInt=Qx;O.ZERO=Zr(0);O.ONE=Zr(1);function tS(){var e=q();return this.copyTo(e),e}s(tS,"bnClone");function eS(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}s(eS,"bnIntValue");function rS(){return this.t==0?this.s:this[0]<<24>>24}s(rS,"bnByteValue");function iS(){return this.t==0?this.s:this[0]<<16>>16}s(iS,"bnShortValue");function nS(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}s(nS,"bnpChunkSize");function oS(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}s(oS,"bnSigNum");function aS(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=Zr(r),n=q(),o=q(),a="";for(this.divRemTo(i,n,o);n.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,n.divRemTo(i,n,o);return o.intValue().toString(e)+a}s(aS,"bnpToRadix");function sS(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),n=!1,o=0,a=0,l=0;l<e.length;++l){var c=Db(e,l);if(c<0){e.charAt(l)=="-"&&this.signum()==0&&(n=!0);continue}a=t*a+c,++o>=r&&(this.dMultiply(i),this.dAddOffset(a,0),o=0,a=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),n&&O.ZERO.subTo(this,this)}s(sS,"bnpFromRadix");function lS(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(O.ONE.shiftLeft(e-1),Yf,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(O.ONE.shiftLeft(e-1),this);else{var i=new Array,n=e&7;i.length=(e>>3)+1,t.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}}s(lS,"bnpFromNumber");function cS(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,i,n=0;if(e-- >0)for(r<this.DB&&(i=this[e]>>r)!=(this.s&this.DM)>>r&&(t[n++]=i|this.s<<this.DB-r);e>=0;)r<8?(i=(this[e]&(1<<r)-1)<<8-r,i|=this[--e]>>(r+=this.DB-8)):(i=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),i&128&&(i|=-256),n==0&&(this.s&128)!=(i&128)&&++n,(n>0||i!=this.s)&&(t[n++]=i);return t}s(cS,"bnToByteArray");function uS(e){return this.compareTo(e)==0}s(uS,"bnEquals");function pS(e){return this.compareTo(e)<0?this:e}s(pS,"bnMin");function hS(e){return this.compareTo(e)>0?this:e}s(hS,"bnMax");function fS(e,t,r){var i,n,o=Math.min(e.t,this.t);for(i=0;i<o;++i)r[i]=t(this[i],e[i]);if(e.t<this.t){for(n=e.s&this.DM,i=o;i<this.t;++i)r[i]=t(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=o;i<e.t;++i)r[i]=t(n,e[i]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}s(fS,"bnpBitwiseTo");function dS(e,t){return e&t}s(dS,"op_and");function mS(e){var t=q();return this.bitwiseTo(e,dS,t),t}s(mS,"bnAnd");function Yf(e,t){return e|t}s(Yf,"op_or");function yS(e){var t=q();return this.bitwiseTo(e,Yf,t),t}s(yS,"bnOr");function Ab(e,t){return e^t}s(Ab,"op_xor");function gS(e){var t=q();return this.bitwiseTo(e,Ab,t),t}s(gS,"bnXor");function Nb(e,t){return e&~t}s(Nb,"op_andnot");function vS(e){var t=q();return this.bitwiseTo(e,Nb,t),t}s(vS,"bnAndNot");function bS(){for(var e=q(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}s(bS,"bnNot");function CS(e){var t=q();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}s(CS,"bnShiftLeft");function xS(e){var t=q();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}s(xS,"bnShiftRight");function SS(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}s(SS,"lbit");function PS(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+SS(this[e]);return this.s<0?this.t*this.DB:-1}s(PS,"bnGetLowestSetBit");function MS(e){for(var t=0;e!=0;)e&=e-1,++t;return t}s(MS,"cbit");function wS(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=MS(this[r]^t);return e}s(wS,"bnBitCount");function TS(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}s(TS,"bnTestBit");function IS(e,t){var r=O.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}s(IS,"bnpChangeBit");function ES(e){return this.changeBit(e,Yf)}s(ES,"bnSetBit");function _S(e){return this.changeBit(e,Nb)}s(_S,"bnClearBit");function LS(e){return this.changeBit(e,Ab)}s(LS,"bnFlipBit");function OS(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this[r]+e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i+=e[r],t[r++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()}s(OS,"bnpAddTo");function DS(e){var t=q();return this.addTo(e,t),t}s(DS,"bnAdd");function AS(e){var t=q();return this.subTo(e,t),t}s(AS,"bnSubtract");function NS(e){var t=q();return this.multiplyTo(e,t),t}s(NS,"bnMultiply");function kS(){var e=q();return this.squareTo(e),e}s(kS,"bnSquare");function RS(e){var t=q();return this.divRemTo(e,t,null),t}s(RS,"bnDivide");function FS(e){var t=q();return this.divRemTo(e,null,t),t}s(FS,"bnRemainder");function BS(e){var t=q(),r=q();return this.divRemTo(e,t,r),new Array(t,r)}s(BS,"bnDivideAndRemainder");function GS(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}s(GS,"bnpDMultiply");function VS(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}s(VS,"bnpDAddOffset");function Sa(){}s(Sa,"NullExp");function kb(e){return e}s(kb,"nNop");function HS(e,t,r){e.multiplyTo(t,r)}s(HS,"nMulTo");function XS(e,t){e.squareTo(t)}s(XS,"nSqrTo");Sa.prototype.convert=kb;Sa.prototype.revert=kb;Sa.prototype.mulTo=HS;Sa.prototype.sqrTo=XS;function YS(e){return this.exp(e,new Sa)}s(YS,"bnPow");function jS(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}s(jS,"bnpMultiplyLowerTo");function zS(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}s(zS,"bnpMultiplyUpperTo");function Xn(e){this.r2=q(),this.q3=q(),O.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}s(Xn,"Barrett");function US(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=q();return e.copyTo(t),this.reduce(t),t}s(US,"barrettConvert");function WS(e){return e}s(WS,"barrettRevert");function ZS(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}s(ZS,"barrettReduce");function qS(e,t){e.squareTo(t),this.reduce(t)}s(qS,"barrettSqrTo");function $S(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s($S,"barrettMulTo");Xn.prototype.convert=US;Xn.prototype.revert=WS;Xn.prototype.reduce=ZS;Xn.prototype.mulTo=$S;Xn.prototype.sqrTo=qS;function JS(e,t){var r=e.bitLength(),i,n=Zr(1),o;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?o=new Di(t):t.isEven()?o=new Xn(t):o=new Ai(t);var a=new Array,l=3,c=i-1,h=(1<<i)-1;if(a[1]=o.convert(this),i>1){var d=q();for(o.sqrTo(a[1],d);l<=h;)a[l]=q(),o.mulTo(d,a[l-2],a[l]),l+=2}var m=e.t-1,y,x=!0,S=q(),P;for(r=cc(e[m])-1;m>=0;){for(r>=c?y=e[m]>>r-c&h:(y=(e[m]&(1<<r+1)-1)<<c-r,m>0&&(y|=e[m-1]>>this.DB+r-c)),l=i;!(y&1);)y>>=1,--l;if((r-=l)<0&&(r+=this.DB,--m),x)a[y].copyTo(n),x=!1;else{for(;l>1;)o.sqrTo(n,S),o.sqrTo(S,n),l-=2;l>0?o.sqrTo(n,S):(P=n,n=S,S=P),o.mulTo(S,a[y],n)}for(;m>=0&&!(e[m]&1<<r);)o.sqrTo(n,S),P=n,n=S,S=P,--r<0&&(r=this.DB-1,--m)}return o.revert(n)}s(JS,"bnModPow");function KS(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(n<o&&(o=n),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}s(KS,"bnGCD");function QS(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}s(QS,"bnpModInt");function tP(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return O.ZERO;for(var r=e.clone(),i=this.clone(),n=Zr(1),o=Zr(0),a=Zr(0),l=Zr(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!o.isEven())&&(n.addTo(this,n),o.subTo(e,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!l.isEven())&&(a.addTo(this,a),l.subTo(e,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(a,n),o.subTo(l,o)):(i.subTo(r,i),t&&a.subTo(n,a),l.subTo(o,l))}if(i.compareTo(O.ONE)!=0)return O.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l}s(tP,"bnModInverse");var qt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],eP=(1<<26)/qt[qt.length-1];function rP(e){var t,r=this.abs();if(r.t==1&&r[0]<=qt[qt.length-1]){for(t=0;t<qt.length;++t)if(r[0]==qt[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<qt.length;){for(var i=qt[t],n=t+1;n<qt.length&&i<eP;)i*=qt[n++];for(i=r.modInt(i);t<n;)if(i%qt[t++]==0)return!1}return r.millerRabin(e)}s(rP,"bnIsProbablePrime");function iP(e){var t=this.subtract(O.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>qt.length&&(e=qt.length);for(var n=q(),o=0;o<e;++o){n.fromInt(qt[Math.floor(Math.random()*qt.length)]);var a=n.modPow(i,this);if(a.compareTo(O.ONE)!=0&&a.compareTo(t)!=0){for(var l=1;l++<r&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(O.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0}s(iP,"bnpMillerRabin");O.prototype.chunkSize=nS;O.prototype.toRadix=aS;O.prototype.fromRadix=sS;O.prototype.fromNumber=lS;O.prototype.bitwiseTo=fS;O.prototype.changeBit=IS;O.prototype.addTo=OS;O.prototype.dMultiply=GS;O.prototype.dAddOffset=VS;O.prototype.multiplyLowerTo=jS;O.prototype.multiplyUpperTo=zS;O.prototype.modInt=QS;O.prototype.millerRabin=iP;O.prototype.clone=tS;O.prototype.intValue=eS;O.prototype.byteValue=rS;O.prototype.shortValue=iS;O.prototype.signum=oS;O.prototype.toByteArray=cS;O.prototype.equals=uS;O.prototype.min=pS;O.prototype.max=hS;O.prototype.and=mS;O.prototype.or=yS;O.prototype.xor=gS;O.prototype.andNot=vS;O.prototype.not=bS;O.prototype.shiftLeft=CS;O.prototype.shiftRight=xS;O.prototype.getLowestSetBit=PS;O.prototype.bitCount=wS;O.prototype.testBit=TS;O.prototype.setBit=ES;O.prototype.clearBit=_S;O.prototype.flipBit=LS;O.prototype.add=DS;O.prototype.subtract=AS;O.prototype.multiply=NS;O.prototype.divide=RS;O.prototype.remainder=FS;O.prototype.divideAndRemainder=BS;O.prototype.modPow=JS;O.prototype.modInverse=tP;O.prototype.pow=YS;O.prototype.gcd=KS;O.prototype.isProbablePrime=rP;O.prototype.square=kS;var U=O;U.prototype.IsNegative=function(){return this.compareTo(U.ZERO)==-1};U.op_Equality=function(e,t){return e.compareTo(t)==0};U.op_Inequality=function(e,t){return e.compareTo(t)!=0};U.op_GreaterThan=function(e,t){return e.compareTo(t)>0};U.op_LessThan=function(e,t){return e.compareTo(t)<0};U.op_Addition=function(e,t){return new U(e).add(new U(t))};U.op_Subtraction=function(e,t){return new U(e).subtract(new U(t))};U.Int128Mul=function(e,t){return new U(e).multiply(new U(t))};U.op_Division=function(e,t){return e.divide(t)};U.prototype.ToDouble=function(){return parseFloat(this.toString())};typeof sc>"u"&&(sc=s(function(e,t){var r;if(typeof Object.getOwnPropertyNames>"u"){for(r in t.prototype)(typeof e.prototype[r]>"u"||e.prototype[r]==Object.prototype[r])&&(e.prototype[r]=t.prototype[r]);for(r in t)typeof e[r]>"u"&&(e[r]=t[r]);e.$baseCtor=t}else{for(var i=Object.getOwnPropertyNames(t.prototype),n=0;n<i.length;n++)typeof Object.getOwnPropertyDescriptor(e.prototype,i[n])>"u"&&Object.defineProperty(e.prototype,i[n],Object.getOwnPropertyDescriptor(t.prototype,i[n]));for(r in t)typeof e[r]>"u"&&(e[r]=t[r]);e.$baseCtor=t}},"Inherit"));var sc;p.Path=function(){return[]};p.Paths=function(){return[]};p.DoublePoint=function(){var e=arguments;this.X=0,this.Y=0,e.length==1?(this.X=e[0].X,this.Y=e[0].Y):e.length==2&&(this.X=e[0],this.Y=e[1])};p.DoublePoint0=function(){this.X=0,this.Y=0};p.DoublePoint1=function(e){this.X=e.X,this.Y=e.Y};p.DoublePoint2=function(e,t){this.X=e,this.Y=t};p.PolyNode=function(){this.m_Parent=null,this.m_polygon=new p.Path,this.m_Index=0,this.m_jointype=0,this.m_endtype=0,this.m_Childs=[],this.IsOpen=!1};p.PolyNode.prototype.IsHoleNode=function(){for(var e=!0,t=this.m_Parent;t!==null;)e=!e,t=t.m_Parent;return e};p.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length};p.PolyNode.prototype.Contour=function(){return this.m_polygon};p.PolyNode.prototype.AddChild=function(e){var t=this.m_Childs.length;this.m_Childs.push(e),e.m_Parent=this,e.m_Index=t};p.PolyNode.prototype.GetNext=function(){return this.m_Childs.length>0?this.m_Childs[0]:this.GetNextSiblingUp()};p.PolyNode.prototype.GetNextSiblingUp=function(){return this.m_Parent===null?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]};p.PolyNode.prototype.Childs=function(){return this.m_Childs};p.PolyNode.prototype.Parent=function(){return this.m_Parent};p.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()};p.PolyTree=function(){this.m_AllPolys=[],p.PolyNode.call(this)};p.PolyTree.prototype.Clear=function(){for(var e=0,t=this.m_AllPolys.length;e<t;e++)this.m_AllPolys[e]=null;this.m_AllPolys.length=0,this.m_Childs.length=0};p.PolyTree.prototype.GetFirst=function(){return this.m_Childs.length>0?this.m_Childs[0]:null};p.PolyTree.prototype.Total=function(){return this.m_AllPolys.length};sc(p.PolyTree,p.PolyNode);p.Math_Abs_Int64=p.Math_Abs_Int32=p.Math_Abs_Double=function(e){return Math.abs(e)};p.Math_Max_Int32_Int32=function(e,t){return Math.max(e,t)};W.msie||W.opera||W.safari?p.Cast_Int32=function(e){return e|0}:p.Cast_Int32=function(e){return~~e};W.chrome?p.Cast_Int64=function(e){return e<-2147483648||e>2147483647?e<0?Math.ceil(e):Math.floor(e):~~e}:W.firefox&&typeof Number.toInteger=="function"?p.Cast_Int64=function(e){return Number.toInteger(e)}:W.msie7||W.msie8?p.Cast_Int64=function(e){return parseInt(e,10)}:W.msie?p.Cast_Int64=function(e){return e<-2147483648||e>2147483647?e<0?Math.ceil(e):Math.floor(e):e|0}:p.Cast_Int64=function(e){return e<0?Math.ceil(e):Math.floor(e)};p.Clear=function(e){e.length=0};p.PI=3.141592653589793;p.PI2=2*3.141592653589793;p.IntPoint=function(){var e=arguments,t=e.length;if(this.X=0,this.Y=0,Oi)if(this.Z=0,t==3)this.X=e[0],this.Y=e[1],this.Z=e[2];else if(t==2)this.X=e[0],this.Y=e[1],this.Z=0;else if(t==1)if(e[0]instanceof p.DoublePoint){var r=e[0];this.X=p.Clipper.Round(r.X),this.Y=p.Clipper.Round(r.Y),this.Z=0}else{var i=e[0];typeof i.Z>"u"&&(i.Z=0),this.X=i.X,this.Y=i.Y,this.Z=i.Z}else this.X=0,this.Y=0,this.Z=0;else if(t==2)this.X=e[0],this.Y=e[1];else if(t==1)if(e[0]instanceof p.DoublePoint){var r=e[0];this.X=p.Clipper.Round(r.X),this.Y=p.Clipper.Round(r.Y)}else{var i=e[0];this.X=i.X,this.Y=i.Y}else this.X=0,this.Y=0};p.IntPoint.op_Equality=function(e,t){return e.X==t.X&&e.Y==t.Y};p.IntPoint.op_Inequality=function(e,t){return e.X!=t.X||e.Y!=t.Y};Oi?(p.IntPoint0=function(){this.X=0,this.Y=0,this.Z=0},p.IntPoint1=function(e){this.X=e.X,this.Y=e.Y,this.Z=e.Z},p.IntPoint1dp=function(e){this.X=p.Clipper.Round(e.X),this.Y=p.Clipper.Round(e.Y),this.Z=0},p.IntPoint2=function(e,t){this.X=e,this.Y=t,this.Z=0},p.IntPoint3=function(e,t,r){this.X=e,this.Y=t,this.Z=r}):(p.IntPoint0=function(){this.X=0,this.Y=0},p.IntPoint1=function(e){this.X=e.X,this.Y=e.Y},p.IntPoint1dp=function(e){this.X=p.Clipper.Round(e.X),this.Y=p.Clipper.Round(e.Y)},p.IntPoint2=function(e,t){this.X=e,this.Y=t});p.IntRect=function(){var e=arguments,t=e.length;t==4?(this.left=e[0],this.top=e[1],this.right=e[2],this.bottom=e[3]):t==1?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):(this.left=0,this.top=0,this.right=0,this.bottom=0)};p.IntRect0=function(){this.left=0,this.top=0,this.right=0,this.bottom=0};p.IntRect1=function(e){this.left=e.left,this.top=e.top,this.right=e.right,this.bottom=e.bottom};p.IntRect4=function(e,t,r,i){this.left=e,this.top=t,this.right=r,this.bottom=i};p.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3};p.PolyType={ptSubject:0,ptClip:1};p.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3};p.JoinType={jtSquare:0,jtRound:1,jtMiter:2};p.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4};Lb&&(p.EndType_={etSquare:0,etRound:1,etButt:2,etClosed:3});p.EdgeSide={esLeft:0,esRight:1};p.Direction={dRightToLeft:0,dLeftToRight:1};p.TEdge=function(){this.Bot=new p.IntPoint,this.Curr=new p.IntPoint,this.Top=new p.IntPoint,this.Delta=new p.IntPoint,this.Dx=0,this.PolyTyp=p.PolyType.ptSubject,this.Side=p.EdgeSide.esLeft,this.WindDelta=0,this.WindCnt=0,this.WindCnt2=0,this.OutIdx=0,this.Next=null,this.Prev=null,this.NextInLML=null,this.NextInAEL=null,this.PrevInAEL=null,this.NextInSEL=null,this.PrevInSEL=null};p.IntersectNode=function(){this.Edge1=null,this.Edge2=null,this.Pt=new p.IntPoint};p.MyIntersectNodeSort=function(){};p.MyIntersectNodeSort.Compare=function(e,t){return t.Pt.Y-e.Pt.Y};p.LocalMinima=function(){this.Y=0,this.LeftBound=null,this.RightBound=null,this.Next=null};p.Scanbeam=function(){this.Y=0,this.Next=null};p.OutRec=function(){this.Idx=0,this.IsHole=!1,this.IsOpen=!1,this.FirstLeft=null,this.Pts=null,this.BottomPt=null,this.PolyNode=null};p.OutPt=function(){this.Idx=0,this.Pt=new p.IntPoint,this.Next=null,this.Prev=null};p.Join=function(){this.OutPt1=null,this.OutPt2=null,this.OffPt=new p.IntPoint};p.ClipperBase=function(){this.m_MinimaList=null,this.m_CurrentLM=null,this.m_edges=new Array,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1,this.PreserveCollinear=!1,this.m_MinimaList=null,this.m_CurrentLM=null,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};p.ClipperBase.horizontal=-9007199254740992;p.ClipperBase.Skip=-2;p.ClipperBase.Unassigned=-1;p.ClipperBase.tolerance=1e-20;yx?(p.ClipperBase.loRange=46340,p.ClipperBase.hiRange=46340):(p.ClipperBase.loRange=47453132,p.ClipperBase.hiRange=0xfffffffffffff);p.ClipperBase.near_zero=function(e){return e>-p.ClipperBase.tolerance&&e<p.ClipperBase.tolerance};p.ClipperBase.IsHorizontal=function(e){return e.Delta.Y===0};p.ClipperBase.prototype.PointIsVertex=function(e,t){var r=t;do{if(p.IntPoint.op_Equality(r.Pt,e))return!0;r=r.Next}while(r!=t);return!1};p.ClipperBase.prototype.PointOnLineSegment=function(e,t,r,i){return i?e.X==t.X&&e.Y==t.Y||e.X==r.X&&e.Y==r.Y||e.X>t.X==e.X<r.X&&e.Y>t.Y==e.Y<r.Y&&U.op_Equality(U.Int128Mul(e.X-t.X,r.Y-t.Y),U.Int128Mul(r.X-t.X,e.Y-t.Y)):e.X==t.X&&e.Y==t.Y||e.X==r.X&&e.Y==r.Y||e.X>t.X==e.X<r.X&&e.Y>t.Y==e.Y<r.Y&&(e.X-t.X)*(r.Y-t.Y)==(r.X-t.X)*(e.Y-t.Y)};p.ClipperBase.prototype.PointOnPolygon=function(e,t,r){for(var i=t;;){if(this.PointOnLineSegment(e,i.Pt,i.Next.Pt,r))return!0;if(i=i.Next,i==t)break}return!1};p.ClipperBase.prototype.SlopesEqual=p.ClipperBase.SlopesEqual=function(){var e=arguments,t=e.length,r,i,n,o,a,l,c;return t==3?(r=e[0],i=e[1],c=e[2],c?U.op_Equality(U.Int128Mul(r.Delta.Y,i.Delta.X),U.Int128Mul(r.Delta.X,i.Delta.Y)):p.Cast_Int64(r.Delta.Y*i.Delta.X)==p.Cast_Int64(r.Delta.X*i.Delta.Y)):t==4?(n=e[0],o=e[1],a=e[2],c=e[3],c?U.op_Equality(U.Int128Mul(n.Y-o.Y,o.X-a.X),U.Int128Mul(n.X-o.X,o.Y-a.Y)):p.Cast_Int64((n.Y-o.Y)*(o.X-a.X))-p.Cast_Int64((n.X-o.X)*(o.Y-a.Y))===0):(n=e[0],o=e[1],a=e[2],l=e[3],c=e[4],c?U.op_Equality(U.Int128Mul(n.Y-o.Y,a.X-l.X),U.Int128Mul(n.X-o.X,a.Y-l.Y)):p.Cast_Int64((n.Y-o.Y)*(a.X-l.X))-p.Cast_Int64((n.X-o.X)*(a.Y-l.Y))===0)};p.ClipperBase.SlopesEqual3=function(e,t,r){return r?U.op_Equality(U.Int128Mul(e.Delta.Y,t.Delta.X),U.Int128Mul(e.Delta.X,t.Delta.Y)):p.Cast_Int64(e.Delta.Y*t.Delta.X)==p.Cast_Int64(e.Delta.X*t.Delta.Y)};p.ClipperBase.SlopesEqual4=function(e,t,r,i){return i?U.op_Equality(U.Int128Mul(e.Y-t.Y,t.X-r.X),U.Int128Mul(e.X-t.X,t.Y-r.Y)):p.Cast_Int64((e.Y-t.Y)*(t.X-r.X))-p.Cast_Int64((e.X-t.X)*(t.Y-r.Y))===0};p.ClipperBase.SlopesEqual5=function(e,t,r,i,n){return n?U.op_Equality(U.Int128Mul(e.Y-t.Y,r.X-i.X),U.Int128Mul(e.X-t.X,r.Y-i.Y)):p.Cast_Int64((e.Y-t.Y)*(r.X-i.X))-p.Cast_Int64((e.X-t.X)*(r.Y-i.Y))===0};p.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var e=0,t=this.m_edges.length;e<t;++e){for(var r=0,i=this.m_edges[e].length;r<i;++r)this.m_edges[e][r]=null;p.Clear(this.m_edges[e])}p.Clear(this.m_edges),this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};p.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;this.m_MinimaList!==null;){var e=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=e}this.m_CurrentLM=null};p.ClipperBase.prototype.RangeTest=function(e,t){t.Value?(e.X>p.ClipperBase.hiRange||e.Y>p.ClipperBase.hiRange||-e.X>p.ClipperBase.hiRange||-e.Y>p.ClipperBase.hiRange)&&p.Error("Coordinate outside allowed range in RangeTest()."):(e.X>p.ClipperBase.loRange||e.Y>p.ClipperBase.loRange||-e.X>p.ClipperBase.loRange||-e.Y>p.ClipperBase.loRange)&&(t.Value=!0,this.RangeTest(e,t))};p.ClipperBase.prototype.InitEdge=function(e,t,r,i){e.Next=t,e.Prev=r,e.Curr.X=i.X,e.Curr.Y=i.Y,e.OutIdx=-1};p.ClipperBase.prototype.InitEdge2=function(e,t){e.Curr.Y>=e.Next.Curr.Y?(e.Bot.X=e.Curr.X,e.Bot.Y=e.Curr.Y,e.Top.X=e.Next.Curr.X,e.Top.Y=e.Next.Curr.Y):(e.Top.X=e.Curr.X,e.Top.Y=e.Curr.Y,e.Bot.X=e.Next.Curr.X,e.Bot.Y=e.Next.Curr.Y),this.SetDx(e),e.PolyTyp=t};p.ClipperBase.prototype.FindNextLocMin=function(e){for(var t;;){for(;p.IntPoint.op_Inequality(e.Bot,e.Prev.Bot)||p.IntPoint.op_Equality(e.Curr,e.Top);)e=e.Next;if(e.Dx!=p.ClipperBase.horizontal&&e.Prev.Dx!=p.ClipperBase.horizontal)break;for(;e.Prev.Dx==p.ClipperBase.horizontal;)e=e.Prev;for(t=e;e.Dx==p.ClipperBase.horizontal;)e=e.Next;if(e.Top.Y!=e.Prev.Bot.Y){t.Prev.Bot.X<e.Bot.X&&(e=t);break}}return e};p.ClipperBase.prototype.ProcessBound=function(e,t){var r=e,i=e,n,o;if(e.Dx==p.ClipperBase.horizontal&&(t?o=e.Prev.Bot.X:o=e.Next.Bot.X,e.Bot.X!=o&&this.ReverseHorizontal(e)),i.OutIdx!=p.ClipperBase.Skip)if(t){for(;i.Top.Y==i.Next.Bot.Y&&i.Next.OutIdx!=p.ClipperBase.Skip;)i=i.Next;if(i.Dx==p.ClipperBase.horizontal&&i.Next.OutIdx!=p.ClipperBase.Skip){for(n=i;n.Prev.Dx==p.ClipperBase.horizontal;)n=n.Prev;n.Prev.Top.X==i.Next.Top.X?t||(i=n.Prev):n.Prev.Top.X>i.Next.Top.X&&(i=n.Prev)}for(;e!=i;)e.NextInLML=e.Next,e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Prev.Top.X&&this.ReverseHorizontal(e),e=e.Next;e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Prev.Top.X&&this.ReverseHorizontal(e),i=i.Next}else{for(;i.Top.Y==i.Prev.Bot.Y&&i.Prev.OutIdx!=p.ClipperBase.Skip;)i=i.Prev;if(i.Dx==p.ClipperBase.horizontal&&i.Prev.OutIdx!=p.ClipperBase.Skip){for(n=i;n.Next.Dx==p.ClipperBase.horizontal;)n=n.Next;n.Next.Top.X==i.Prev.Top.X?t||(i=n.Next):n.Next.Top.X>i.Prev.Top.X&&(i=n.Next)}for(;e!=i;)e.NextInLML=e.Prev,e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Next.Top.X&&this.ReverseHorizontal(e),e=e.Prev;e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Next.Top.X&&this.ReverseHorizontal(e),i=i.Prev}if(i.OutIdx==p.ClipperBase.Skip){if(e=i,t){for(;e.Top.Y==e.Next.Bot.Y;)e=e.Next;for(;e!=i&&e.Dx==p.ClipperBase.horizontal;)e=e.Prev}else{for(;e.Top.Y==e.Prev.Bot.Y;)e=e.Prev;for(;e!=i&&e.Dx==p.ClipperBase.horizontal;)e=e.Next}if(e==i)t?i=e.Next:i=e.Prev;else{t?e=i.Next:e=i.Prev;var a=new p.LocalMinima;a.Next=null,a.Y=e.Bot.Y,a.LeftBound=null,a.RightBound=e,a.RightBound.WindDelta=0,i=this.ProcessBound(a.RightBound,t),this.InsertLocalMinima(a)}}return i};p.ClipperBase.prototype.AddPath=function(e,t,r){_b?!r&&t==p.PolyType.ptClip&&p.Error("AddPath: Open paths must be subject."):r||p.Error("AddPath: Open paths have been disabled.");var i=e.length-1;if(r)for(;i>0&&p.IntPoint.op_Equality(e[i],e[0]);)--i;for(;i>0&&p.IntPoint.op_Equality(e[i],e[i-1]);)--i;if(r&&i<2||!r&&i<1)return!1;for(var n=new Array,o=0;o<=i;o++)n.push(new p.TEdge);var a=!0;n[1].Curr.X=e[1].X,n[1].Curr.Y=e[1].Y;var l={Value:this.m_UseFullRange};this.RangeTest(e[0],l),this.m_UseFullRange=l.Value,l.Value=this.m_UseFullRange,this.RangeTest(e[i],l),this.m_UseFullRange=l.Value,this.InitEdge(n[0],n[1],n[i],e[0]),this.InitEdge(n[i],n[0],n[i-1],e[i]);for(var o=i-1;o>=1;--o)l.Value=this.m_UseFullRange,this.RangeTest(e[o],l),this.m_UseFullRange=l.Value,this.InitEdge(n[o],n[o+1],n[o-1],e[o]);for(var c=n[0],h=c,d=c;;){if(p.IntPoint.op_Equality(h.Curr,h.Next.Curr)){if(h==h.Next)break;h==c&&(c=h.Next),h=this.RemoveEdge(h),d=h;continue}if(h.Prev==h.Next)break;if(r&&p.ClipperBase.SlopesEqual(h.Prev.Curr,h.Curr,h.Next.Curr,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(h.Prev.Curr,h.Curr,h.Next.Curr))){h==c&&(c=h.Next),h=this.RemoveEdge(h),h=h.Prev,d=h;continue}if(h=h.Next,h==d)break}if(!r&&h==h.Next||r&&h.Prev==h.Next)return!1;r||(this.m_HasOpenPaths=!0,c.Prev.OutIdx=p.ClipperBase.Skip);var m=c;h=c;do this.InitEdge2(h,t),h=h.Next,a&&h.Curr.Y!=c.Curr.Y&&(a=!1);while(h!=c);if(a){if(r)return!1;h.Prev.OutIdx=p.ClipperBase.Skip,h.Prev.Bot.X<h.Prev.Top.X&&this.ReverseHorizontal(h.Prev);var y=new p.LocalMinima;for(y.Next=null,y.Y=h.Bot.Y,y.LeftBound=null,y.RightBound=h,y.RightBound.Side=p.EdgeSide.esRight,y.RightBound.WindDelta=0;h.Next.OutIdx!=p.ClipperBase.Skip;)h.NextInLML=h.Next,h.Bot.X!=h.Prev.Top.X&&this.ReverseHorizontal(h),h=h.Next;return this.InsertLocalMinima(y),this.m_edges.push(n),!0}this.m_edges.push(n);for(var x,S=null;h=this.FindNextLocMin(h),h!=S;){S==null&&(S=h);var y=new p.LocalMinima;y.Next=null,y.Y=h.Bot.Y,h.Dx<h.Prev.Dx?(y.LeftBound=h.Prev,y.RightBound=h,x=!1):(y.LeftBound=h,y.RightBound=h.Prev,x=!0),y.LeftBound.Side=p.EdgeSide.esLeft,y.RightBound.Side=p.EdgeSide.esRight,r?y.LeftBound.Next==y.RightBound?y.LeftBound.WindDelta=-1:y.LeftBound.WindDelta=1:y.LeftBound.WindDelta=0,y.RightBound.WindDelta=-y.LeftBound.WindDelta,h=this.ProcessBound(y.LeftBound,x);var P=this.ProcessBound(y.RightBound,!x);y.LeftBound.OutIdx==p.ClipperBase.Skip?y.LeftBound=null:y.RightBound.OutIdx==p.ClipperBase.Skip&&(y.RightBound=null),this.InsertLocalMinima(y),x||(h=P)}return!0};p.ClipperBase.prototype.AddPaths=function(e,t,r){for(var i=!1,n=0,o=e.length;n<o;++n)this.AddPath(e[n],t,r)&&(i=!0);return i};p.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(e,t,r){return p.IntPoint.op_Equality(e,r)||p.IntPoint.op_Equality(e,t)||p.IntPoint.op_Equality(r,t)?!1:e.X!=r.X?t.X>e.X==t.X<r.X:t.Y>e.Y==t.Y<r.Y};p.ClipperBase.prototype.RemoveEdge=function(e){e.Prev.Next=e.Next,e.Next.Prev=e.Prev;var t=e.Next;return e.Prev=null,t};p.ClipperBase.prototype.SetDx=function(e){e.Delta.X=e.Top.X-e.Bot.X,e.Delta.Y=e.Top.Y-e.Bot.Y,e.Delta.Y===0?e.Dx=p.ClipperBase.horizontal:e.Dx=e.Delta.X/e.Delta.Y};p.ClipperBase.prototype.InsertLocalMinima=function(e){if(this.m_MinimaList===null)this.m_MinimaList=e;else if(e.Y>=this.m_MinimaList.Y)e.Next=this.m_MinimaList,this.m_MinimaList=e;else{for(var t=this.m_MinimaList;t.Next!==null&&e.Y<t.Next.Y;)t=t.Next;e.Next=t.Next,t.Next=e}};p.ClipperBase.prototype.PopLocalMinima=function(){this.m_CurrentLM!==null&&(this.m_CurrentLM=this.m_CurrentLM.Next)};p.ClipperBase.prototype.ReverseHorizontal=function(e){var t=e.Top.X;e.Top.X=e.Bot.X,e.Bot.X=t,Oi&&(t=e.Top.Z,e.Top.Z=e.Bot.Z,e.Bot.Z=t)};p.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,this.m_CurrentLM!=null)for(var e=this.m_MinimaList;e!=null;){var t=e.LeftBound;t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=p.EdgeSide.esLeft,t.OutIdx=p.ClipperBase.Unassigned),t=e.RightBound,t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=p.EdgeSide.esRight,t.OutIdx=p.ClipperBase.Unassigned),e=e.Next}};p.Clipper=function(e){typeof e>"u"&&(e=0),this.m_PolyOuts=null,this.m_ClipType=p.ClipType.ctIntersection,this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=null,this.m_IntersectNodeComparer=null,this.m_ExecuteLocked=!1,this.m_ClipFillType=p.PolyFillType.pftEvenOdd,this.m_SubjFillType=p.PolyFillType.pftEvenOdd,this.m_Joins=null,this.m_GhostJoins=null,this.m_UsingPolyTree=!1,this.ReverseSolution=!1,this.StrictlySimple=!1,p.ClipperBase.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=new Array,this.m_IntersectNodeComparer=p.MyIntersectNodeSort.Compare,this.m_ExecuteLocked=!1,this.m_UsingPolyTree=!1,this.m_PolyOuts=new Array,this.m_Joins=new Array,this.m_GhostJoins=new Array,this.ReverseSolution=(1&e)!==0,this.StrictlySimple=(2&e)!==0,this.PreserveCollinear=(4&e)!==0,Oi&&(this.ZFillFunction=null)};p.Clipper.ioReverseSolution=1;p.Clipper.ioStrictlySimple=2;p.Clipper.ioPreserveCollinear=4;p.Clipper.prototype.Clear=function(){this.m_edges.length!==0&&(this.DisposeAllPolyPts(),p.ClipperBase.prototype.Clear.call(this))};p.Clipper.prototype.DisposeScanbeamList=function(){for(;this.m_Scanbeam!==null;){var e=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=e}};p.Clipper.prototype.Reset=function(){p.ClipperBase.prototype.Reset.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null;for(var e=this.m_MinimaList;e!==null;)this.InsertScanbeam(e.Y),e=e.Next};p.Clipper.prototype.InsertScanbeam=function(e){if(this.m_Scanbeam===null)this.m_Scanbeam=new p.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=e;else if(e>this.m_Scanbeam.Y){var t=new p.Scanbeam;t.Y=e,t.Next=this.m_Scanbeam,this.m_Scanbeam=t}else{for(var r=this.m_Scanbeam;r.Next!==null&&e<=r.Next.Y;)r=r.Next;if(e==r.Y)return;var t=new p.Scanbeam;t.Y=e,t.Next=r.Next,r.Next=t}};p.Clipper.prototype.Execute=function(){var e=arguments,t=e.length,r=e[1]instanceof p.PolyTree;if(t==4&&!r){var i=e[0],n=e[1],o=e[2],a=e[3];if(this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&p.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,p.Clear(n),this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!1;try{var l=this.ExecuteInternal();l&&this.BuildResult(n)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return l}else if(t==4&&r){var i=e[0],c=e[1],o=e[2],a=e[3];if(this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!0;try{var l=this.ExecuteInternal();l&&this.BuildResult2(c)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return l}else if(t==2&&!r){var i=e[0],n=e[1];return this.Execute(i,n,p.PolyFillType.pftEvenOdd,p.PolyFillType.pftEvenOdd)}else if(t==2&&r){var i=e[0],c=e[1];return this.Execute(i,c,p.PolyFillType.pftEvenOdd,p.PolyFillType.pftEvenOdd)}};p.Clipper.prototype.FixHoleLinkage=function(e){if(!(e.FirstLeft===null||e.IsHole!=e.FirstLeft.IsHole&&e.FirstLeft.Pts!==null)){for(var t=e.FirstLeft;t!==null&&(t.IsHole==e.IsHole||t.Pts===null);)t=t.FirstLeft;e.FirstLeft=t}};p.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),this.m_CurrentLM===null)return!1;var e=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(e),p.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),this.m_Scanbeam===null)break;var t=this.PopScanbeam();if(!this.ProcessIntersections(e,t))return!1;this.ProcessEdgesAtTopOfScanbeam(t),e=t}while(this.m_Scanbeam!==null||this.m_CurrentLM!==null);for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts===null||n.IsOpen||(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)}this.JoinCommonEdges();for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts!==null&&!n.IsOpen&&this.FixupOutPolygon(n)}return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{p.Clear(this.m_Joins),p.Clear(this.m_GhostJoins)}};p.Clipper.prototype.PopScanbeam=function(){var e=this.m_Scanbeam.Y,t=this.m_Scanbeam;return this.m_Scanbeam=this.m_Scanbeam.Next,t=null,e};p.Clipper.prototype.DisposeAllPolyPts=function(){for(var e=0,t=this.m_PolyOuts.length;e<t;++e)this.DisposeOutRec(e);p.Clear(this.m_PolyOuts)};p.Clipper.prototype.DisposeOutRec=function(e){var t=this.m_PolyOuts[e];t.Pts!==null&&this.DisposeOutPts(t.Pts),t=null,this.m_PolyOuts[e]=null};p.Clipper.prototype.DisposeOutPts=function(e){if(e!==null){var t=null;for(e.Prev.Next=null;e!==null;)t=e,e=e.Next,t=null}};p.Clipper.prototype.AddJoin=function(e,t,r){var i=new p.Join;i.OutPt1=e,i.OutPt2=t,i.OffPt.X=r.X,i.OffPt.Y=r.Y,this.m_Joins.push(i)};p.Clipper.prototype.AddGhostJoin=function(e,t){var r=new p.Join;r.OutPt1=e,r.OffPt.X=t.X,r.OffPt.Y=t.Y,this.m_GhostJoins.push(r)};Oi&&(p.Clipper.prototype.SetZ=function(e,t){e.Z=0,this.ZFillFunction!==null&&(t.OutIdx<0?this.ZFillFunction(t.Bot,t.Top,e):this.ZFillFunction(t.Top,t.Bot,e))});p.Clipper.prototype.InsertLocalMinimaIntoAEL=function(e){for(;this.m_CurrentLM!==null&&this.m_CurrentLM.Y==e;){var t=this.m_CurrentLM.LeftBound,r=this.m_CurrentLM.RightBound;this.PopLocalMinima();var i=null;if(t===null?(this.InsertEdgeIntoAEL(r,null),this.SetWindingCount(r),this.IsContributing(r)&&(i=this.AddOutPt(r,r.Bot))):r==null?(this.InsertEdgeIntoAEL(t,null),this.SetWindingCount(t),this.IsContributing(t)&&(i=this.AddOutPt(t,t.Bot)),this.InsertScanbeam(t.Top.Y)):(this.InsertEdgeIntoAEL(t,null),this.InsertEdgeIntoAEL(r,t),this.SetWindingCount(t),r.WindCnt=t.WindCnt,r.WindCnt2=t.WindCnt2,this.IsContributing(t)&&(i=this.AddLocalMinPoly(t,r,t.Bot)),this.InsertScanbeam(t.Top.Y)),r!=null&&(p.ClipperBase.IsHorizontal(r)?this.AddEdgeToSEL(r):this.InsertScanbeam(r.Top.Y)),!(t==null||r==null)){if(i!==null&&p.ClipperBase.IsHorizontal(r)&&this.m_GhostJoins.length>0&&r.WindDelta!==0)for(var n=0,o=this.m_GhostJoins.length;n<o;n++){var a=this.m_GhostJoins[n];this.HorzSegmentsOverlap(a.OutPt1.Pt,a.OffPt,r.Bot,r.Top)&&this.AddJoin(a.OutPt1,i,a.OffPt)}if(t.OutIdx>=0&&t.PrevInAEL!==null&&t.PrevInAEL.Curr.X==t.Bot.X&&t.PrevInAEL.OutIdx>=0&&p.ClipperBase.SlopesEqual(t.PrevInAEL,t,this.m_UseFullRange)&&t.WindDelta!==0&&t.PrevInAEL.WindDelta!==0){var l=this.AddOutPt(t.PrevInAEL,t.Bot);this.AddJoin(i,l,t.Top)}if(t.NextInAEL!=r){if(r.OutIdx>=0&&r.PrevInAEL.OutIdx>=0&&p.ClipperBase.SlopesEqual(r.PrevInAEL,r,this.m_UseFullRange)&&r.WindDelta!==0&&r.PrevInAEL.WindDelta!==0){var l=this.AddOutPt(r.PrevInAEL,r.Bot);this.AddJoin(i,l,r.Top)}var c=t.NextInAEL;if(c!==null)for(;c!=r;)this.IntersectEdges(r,c,t.Curr,!1),c=c.NextInAEL}}}};p.Clipper.prototype.InsertEdgeIntoAEL=function(e,t){if(this.m_ActiveEdges===null)e.PrevInAEL=null,e.NextInAEL=null,this.m_ActiveEdges=e;else if(t===null&&this.E2InsertsBeforeE1(this.m_ActiveEdges,e))e.PrevInAEL=null,e.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges.PrevInAEL=e,this.m_ActiveEdges=e;else{for(t===null&&(t=this.m_ActiveEdges);t.NextInAEL!==null&&!this.E2InsertsBeforeE1(t.NextInAEL,e);)t=t.NextInAEL;e.NextInAEL=t.NextInAEL,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=e),e.PrevInAEL=t,t.NextInAEL=e}};p.Clipper.prototype.E2InsertsBeforeE1=function(e,t){return t.Curr.X==e.Curr.X?t.Top.Y>e.Top.Y?t.Top.X<p.Clipper.TopX(e,t.Top.Y):e.Top.X>p.Clipper.TopX(t,e.Top.Y):t.Curr.X<e.Curr.X};p.Clipper.prototype.IsEvenOddFillType=function(e){return e.PolyTyp==p.PolyType.ptSubject?this.m_SubjFillType==p.PolyFillType.pftEvenOdd:this.m_ClipFillType==p.PolyFillType.pftEvenOdd};p.Clipper.prototype.IsEvenOddAltFillType=function(e){return e.PolyTyp==p.PolyType.ptSubject?this.m_ClipFillType==p.PolyFillType.pftEvenOdd:this.m_SubjFillType==p.PolyFillType.pftEvenOdd};p.Clipper.prototype.IsContributing=function(e){var t,r;switch(e.PolyTyp==p.PolyType.ptSubject?(t=this.m_SubjFillType,r=this.m_ClipFillType):(t=this.m_ClipFillType,r=this.m_SubjFillType),t){case p.PolyFillType.pftEvenOdd:if(e.WindDelta===0&&e.WindCnt!=1)return!1;break;case p.PolyFillType.pftNonZero:if(Math.abs(e.WindCnt)!=1)return!1;break;case p.PolyFillType.pftPositive:if(e.WindCnt!=1)return!1;break;default:if(e.WindCnt!=-1)return!1;break}switch(this.m_ClipType){case p.ClipType.ctIntersection:switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2!==0;case p.PolyFillType.pftPositive:return e.WindCnt2>0;default:return e.WindCnt2<0}case p.ClipType.ctUnion:switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}case p.ClipType.ctDifference:if(e.PolyTyp==p.PolyType.ptSubject)switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}else switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2!==0;case p.PolyFillType.pftPositive:return e.WindCnt2>0;default:return e.WindCnt2<0}case p.ClipType.ctXor:if(e.WindDelta===0)switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}else return!0}return!0};p.Clipper.prototype.SetWindingCount=function(e){for(var t=e.PrevInAEL;t!==null&&(t.PolyTyp!=e.PolyTyp||t.WindDelta===0);)t=t.PrevInAEL;if(t===null)e.WindCnt=e.WindDelta===0?1:e.WindDelta,e.WindCnt2=0,t=this.m_ActiveEdges;else if(e.WindDelta===0&&this.m_ClipType!=p.ClipType.ctUnion)e.WindCnt=1,e.WindCnt2=t.WindCnt2,t=t.NextInAEL;else if(this.IsEvenOddFillType(e)){if(e.WindDelta===0){for(var r=!0,i=t.PrevInAEL;i!==null;)i.PolyTyp==t.PolyTyp&&i.WindDelta!==0&&(r=!r),i=i.PrevInAEL;e.WindCnt=r?0:1}else e.WindCnt=e.WindDelta;e.WindCnt2=t.WindCnt2,t=t.NextInAEL}else t.WindCnt*t.WindDelta<0?Math.abs(t.WindCnt)>1?t.WindDelta*e.WindDelta<0?e.WindCnt=t.WindCnt:e.WindCnt=t.WindCnt+e.WindDelta:e.WindCnt=e.WindDelta===0?1:e.WindDelta:e.WindDelta===0?e.WindCnt=t.WindCnt<0?t.WindCnt-1:t.WindCnt+1:t.WindDelta*e.WindDelta<0?e.WindCnt=t.WindCnt:e.WindCnt=t.WindCnt+e.WindDelta,e.WindCnt2=t.WindCnt2,t=t.NextInAEL;if(this.IsEvenOddAltFillType(e))for(;t!=e;)t.WindDelta!==0&&(e.WindCnt2=e.WindCnt2===0?1:0),t=t.NextInAEL;else for(;t!=e;)e.WindCnt2+=t.WindDelta,t=t.NextInAEL};p.Clipper.prototype.AddEdgeToSEL=function(e){this.m_SortedEdges===null?(this.m_SortedEdges=e,e.PrevInSEL=null,e.NextInSEL=null):(e.NextInSEL=this.m_SortedEdges,e.PrevInSEL=null,this.m_SortedEdges.PrevInSEL=e,this.m_SortedEdges=e)};p.Clipper.prototype.CopyAELToSEL=function(){var e=this.m_ActiveEdges;for(this.m_SortedEdges=e;e!==null;)e.PrevInSEL=e.PrevInAEL,e.NextInSEL=e.NextInAEL,e=e.NextInAEL};p.Clipper.prototype.SwapPositionsInAEL=function(e,t){if(!(e.NextInAEL==e.PrevInAEL||t.NextInAEL==t.PrevInAEL)){if(e.NextInAEL==t){var r=t.NextInAEL;r!==null&&(r.PrevInAEL=e);var i=e.PrevInAEL;i!==null&&(i.NextInAEL=t),t.PrevInAEL=i,t.NextInAEL=e,e.PrevInAEL=t,e.NextInAEL=r}else if(t.NextInAEL==e){var r=e.NextInAEL;r!==null&&(r.PrevInAEL=t);var i=t.PrevInAEL;i!==null&&(i.NextInAEL=e),e.PrevInAEL=i,e.NextInAEL=t,t.PrevInAEL=e,t.NextInAEL=r}else{var r=e.NextInAEL,i=e.PrevInAEL;e.NextInAEL=t.NextInAEL,e.NextInAEL!==null&&(e.NextInAEL.PrevInAEL=e),e.PrevInAEL=t.PrevInAEL,e.PrevInAEL!==null&&(e.PrevInAEL.NextInAEL=e),t.NextInAEL=r,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=t),t.PrevInAEL=i,t.PrevInAEL!==null&&(t.PrevInAEL.NextInAEL=t)}e.PrevInAEL===null?this.m_ActiveEdges=e:t.PrevInAEL===null&&(this.m_ActiveEdges=t)}};p.Clipper.prototype.SwapPositionsInSEL=function(e,t){if(!(e.NextInSEL===null&&e.PrevInSEL===null)&&!(t.NextInSEL===null&&t.PrevInSEL===null)){if(e.NextInSEL==t){var r=t.NextInSEL;r!==null&&(r.PrevInSEL=e);var i=e.PrevInSEL;i!==null&&(i.NextInSEL=t),t.PrevInSEL=i,t.NextInSEL=e,e.PrevInSEL=t,e.NextInSEL=r}else if(t.NextInSEL==e){var r=e.NextInSEL;r!==null&&(r.PrevInSEL=t);var i=t.PrevInSEL;i!==null&&(i.NextInSEL=e),e.PrevInSEL=i,e.NextInSEL=t,t.PrevInSEL=e,t.NextInSEL=r}else{var r=e.NextInSEL,i=e.PrevInSEL;e.NextInSEL=t.NextInSEL,e.NextInSEL!==null&&(e.NextInSEL.PrevInSEL=e),e.PrevInSEL=t.PrevInSEL,e.PrevInSEL!==null&&(e.PrevInSEL.NextInSEL=e),t.NextInSEL=r,t.NextInSEL!==null&&(t.NextInSEL.PrevInSEL=t),t.PrevInSEL=i,t.PrevInSEL!==null&&(t.PrevInSEL.NextInSEL=t)}e.PrevInSEL===null?this.m_SortedEdges=e:t.PrevInSEL===null&&(this.m_SortedEdges=t)}};p.Clipper.prototype.AddLocalMaxPoly=function(e,t,r){this.AddOutPt(e,r),t.WindDelta==0&&this.AddOutPt(t,r),e.OutIdx==t.OutIdx?(e.OutIdx=-1,t.OutIdx=-1):e.OutIdx<t.OutIdx?this.AppendPolygon(e,t):this.AppendPolygon(t,e)};p.Clipper.prototype.AddLocalMinPoly=function(e,t,r){var i,n,o;if(p.ClipperBase.IsHorizontal(t)||e.Dx>t.Dx?(i=this.AddOutPt(e,r),t.OutIdx=e.OutIdx,e.Side=p.EdgeSide.esLeft,t.Side=p.EdgeSide.esRight,n=e,n.PrevInAEL==t?o=t.PrevInAEL:o=n.PrevInAEL):(i=this.AddOutPt(t,r),e.OutIdx=t.OutIdx,e.Side=p.EdgeSide.esRight,t.Side=p.EdgeSide.esLeft,n=t,n.PrevInAEL==e?o=e.PrevInAEL:o=n.PrevInAEL),o!==null&&o.OutIdx>=0&&p.Clipper.TopX(o,r.Y)==p.Clipper.TopX(n,r.Y)&&p.ClipperBase.SlopesEqual(n,o,this.m_UseFullRange)&&n.WindDelta!==0&&o.WindDelta!==0){var a=this.AddOutPt(o,r);this.AddJoin(i,a,n.Top)}return i};p.Clipper.prototype.CreateOutRec=function(){var e=new p.OutRec;return e.Idx=-1,e.IsHole=!1,e.IsOpen=!1,e.FirstLeft=null,e.Pts=null,e.BottomPt=null,e.PolyNode=null,this.m_PolyOuts.push(e),e.Idx=this.m_PolyOuts.length-1,e};p.Clipper.prototype.AddOutPt=function(e,t){var r=e.Side==p.EdgeSide.esLeft;if(e.OutIdx<0){var i=this.CreateOutRec();i.IsOpen=e.WindDelta===0;var n=new p.OutPt;return i.Pts=n,n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=n,n.Prev=n,i.IsOpen||this.SetHoleState(e,i),Oi&&(p.IntPoint.op_Equality(t,e.Bot)?(n.Pt.X=e.Bot.X,n.Pt.Y=e.Bot.Y,n.Pt.Z=e.Bot.Z):p.IntPoint.op_Equality(t,e.Top)?(n.Pt.X=e.Top.X,n.Pt.Y=e.Top.Y,n.Pt.Z=e.Top.Z):this.SetZ(n.Pt,e)),e.OutIdx=i.Idx,n}else{var i=this.m_PolyOuts[e.OutIdx],o=i.Pts;if(r&&p.IntPoint.op_Equality(t,o.Pt))return o;if(!r&&p.IntPoint.op_Equality(t,o.Prev.Pt))return o.Prev;var n=new p.OutPt;return n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=o,n.Prev=o.Prev,n.Prev.Next=n,o.Prev=n,r&&(i.Pts=n),Oi&&(p.IntPoint.op_Equality(t,e.Bot)?(n.Pt.X=e.Bot.X,n.Pt.Y=e.Bot.Y,n.Pt.Z=e.Bot.Z):p.IntPoint.op_Equality(t,e.Top)?(n.Pt.X=e.Top.X,n.Pt.Y=e.Top.Y,n.Pt.Z=e.Top.Z):this.SetZ(n.Pt,e)),n}};p.Clipper.prototype.SwapPoints=function(e,t){var r=new p.IntPoint(e.Value);e.Value.X=t.Value.X,e.Value.Y=t.Value.Y,t.Value.X=r.X,t.Value.Y=r.Y};p.Clipper.prototype.HorzSegmentsOverlap=function(e,t,r,i){return e.X>r.X==e.X<i.X||t.X>r.X==t.X<i.X||r.X>e.X==r.X<t.X||i.X>e.X==i.X<t.X||e.X==r.X&&t.X==i.X?!0:e.X==i.X&&t.X==r.X};p.Clipper.prototype.InsertPolyPtBetween=function(e,t,r){var i=new p.OutPt;return i.Pt.X=r.X,i.Pt.Y=r.Y,t==e.Next?(e.Next=i,t.Prev=i,i.Next=t,i.Prev=e):(t.Next=i,e.Prev=i,i.Next=e,i.Prev=t),i};p.Clipper.prototype.SetHoleState=function(e,t){for(var r=!1,i=e.PrevInAEL;i!==null;)i.OutIdx>=0&&i.WindDelta!=0&&(r=!r,t.FirstLeft===null&&(t.FirstLeft=this.m_PolyOuts[i.OutIdx])),i=i.PrevInAEL;r&&(t.IsHole=!0)};p.Clipper.prototype.GetDx=function(e,t){return e.Y==t.Y?p.ClipperBase.horizontal:(t.X-e.X)/(t.Y-e.Y)};p.Clipper.prototype.FirstIsBottomPt=function(e,t){for(var r=e.Prev;p.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Prev;var i=Math.abs(this.GetDx(e.Pt,r.Pt));for(r=e.Next;p.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Next;var n=Math.abs(this.GetDx(e.Pt,r.Pt));for(r=t.Prev;p.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Prev;var o=Math.abs(this.GetDx(t.Pt,r.Pt));for(r=t.Next;p.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Next;var a=Math.abs(this.GetDx(t.Pt,r.Pt));return i>=o&&i>=a||n>=o&&n>=a};p.Clipper.prototype.GetBottomPt=function(e){for(var t=null,r=e.Next;r!=e;)r.Pt.Y>e.Pt.Y?(e=r,t=null):r.Pt.Y==e.Pt.Y&&r.Pt.X<=e.Pt.X&&(r.Pt.X<e.Pt.X?(t=null,e=r):r.Next!=e&&r.Prev!=e&&(t=r)),r=r.Next;if(t!==null)for(;t!=r;)for(this.FirstIsBottomPt(r,t)||(e=t),t=t.Next;p.IntPoint.op_Inequality(t.Pt,e.Pt);)t=t.Next;return e};p.Clipper.prototype.GetLowermostRec=function(e,t){e.BottomPt===null&&(e.BottomPt=this.GetBottomPt(e.Pts)),t.BottomPt===null&&(t.BottomPt=this.GetBottomPt(t.Pts));var r=e.BottomPt,i=t.BottomPt;return r.Pt.Y>i.Pt.Y?e:r.Pt.Y<i.Pt.Y?t:r.Pt.X<i.Pt.X?e:r.Pt.X>i.Pt.X||r.Next==r?t:i.Next==i||this.FirstIsBottomPt(r,i)?e:t};p.Clipper.prototype.Param1RightOfParam2=function(e,t){do if(e=e.FirstLeft,e==t)return!0;while(e!==null);return!1};p.Clipper.prototype.GetOutRec=function(e){for(var t=this.m_PolyOuts[e];t!=this.m_PolyOuts[t.Idx];)t=this.m_PolyOuts[t.Idx];return t};p.Clipper.prototype.AppendPolygon=function(e,t){var r=this.m_PolyOuts[e.OutIdx],i=this.m_PolyOuts[t.OutIdx],n;this.Param1RightOfParam2(r,i)?n=i:this.Param1RightOfParam2(i,r)?n=r:n=this.GetLowermostRec(r,i);var o=r.Pts,a=o.Prev,l=i.Pts,c=l.Prev,h;e.Side==p.EdgeSide.esLeft?(t.Side==p.EdgeSide.esLeft?(this.ReversePolyPtLinks(l),l.Next=o,o.Prev=l,a.Next=c,c.Prev=a,r.Pts=c):(c.Next=o,o.Prev=c,l.Prev=a,a.Next=l,r.Pts=l),h=p.EdgeSide.esLeft):(t.Side==p.EdgeSide.esRight?(this.ReversePolyPtLinks(l),a.Next=c,c.Prev=a,l.Next=o,o.Prev=l):(a.Next=l,l.Prev=a,o.Prev=c,c.Next=o),h=p.EdgeSide.esRight),r.BottomPt=null,n==i&&(i.FirstLeft!=r&&(r.FirstLeft=i.FirstLeft),r.IsHole=i.IsHole),i.Pts=null,i.BottomPt=null,i.FirstLeft=r;var d=e.OutIdx,m=t.OutIdx;e.OutIdx=-1,t.OutIdx=-1;for(var y=this.m_ActiveEdges;y!==null;){if(y.OutIdx==m){y.OutIdx=d,y.Side=h;break}y=y.NextInAEL}i.Idx=r.Idx};p.Clipper.prototype.ReversePolyPtLinks=function(e){if(e!==null){var t,r;t=e;do r=t.Next,t.Next=t.Prev,t.Prev=r,t=r;while(t!=e)}};p.Clipper.SwapSides=function(e,t){var r=e.Side;e.Side=t.Side,t.Side=r};p.Clipper.SwapPolyIndexes=function(e,t){var r=e.OutIdx;e.OutIdx=t.OutIdx,t.OutIdx=r};p.Clipper.prototype.IntersectEdges=function(e,t,r,i){var n=!i&&e.NextInLML===null&&e.Top.X==r.X&&e.Top.Y==r.Y,o=!i&&t.NextInLML===null&&t.Top.X==r.X&&t.Top.Y==r.Y,a=e.OutIdx>=0,l=t.OutIdx>=0;if(_b&&(e.WindDelta===0||t.WindDelta===0)){e.WindDelta===0&&t.WindDelta===0?(n||o)&&a&&l&&this.AddLocalMaxPoly(e,t,r):e.PolyTyp==t.PolyTyp&&e.WindDelta!=t.WindDelta&&this.m_ClipType==p.ClipType.ctUnion?e.WindDelta===0?l&&(this.AddOutPt(e,r),a&&(e.OutIdx=-1)):a&&(this.AddOutPt(t,r),l&&(t.OutIdx=-1)):e.PolyTyp!=t.PolyTyp&&(e.WindDelta===0&&Math.abs(t.WindCnt)==1&&(this.m_ClipType!=p.ClipType.ctUnion||t.WindCnt2===0)?(this.AddOutPt(e,r),a&&(e.OutIdx=-1)):t.WindDelta===0&&Math.abs(e.WindCnt)==1&&(this.m_ClipType!=p.ClipType.ctUnion||e.WindCnt2===0)&&(this.AddOutPt(t,r),l&&(t.OutIdx=-1))),n&&(e.OutIdx<0?this.DeleteFromAEL(e):p.Error("Error intersecting polylines")),o&&(t.OutIdx<0?this.DeleteFromAEL(t):p.Error("Error intersecting polylines"));return}if(e.PolyTyp==t.PolyTyp)if(this.IsEvenOddFillType(e)){var c=e.WindCnt;e.WindCnt=t.WindCnt,t.WindCnt=c}else e.WindCnt+t.WindDelta===0?e.WindCnt=-e.WindCnt:e.WindCnt+=t.WindDelta,t.WindCnt-e.WindDelta===0?t.WindCnt=-t.WindCnt:t.WindCnt-=e.WindDelta;else this.IsEvenOddFillType(t)?e.WindCnt2=e.WindCnt2===0?1:0:e.WindCnt2+=t.WindDelta,this.IsEvenOddFillType(e)?t.WindCnt2=t.WindCnt2===0?1:0:t.WindCnt2-=e.WindDelta;var h,d,m,y;e.PolyTyp==p.PolyType.ptSubject?(h=this.m_SubjFillType,m=this.m_ClipFillType):(h=this.m_ClipFillType,m=this.m_SubjFillType),t.PolyTyp==p.PolyType.ptSubject?(d=this.m_SubjFillType,y=this.m_ClipFillType):(d=this.m_ClipFillType,y=this.m_SubjFillType);var x,S;switch(h){case p.PolyFillType.pftPositive:x=e.WindCnt;break;case p.PolyFillType.pftNegative:x=-e.WindCnt;break;default:x=Math.abs(e.WindCnt);break}switch(d){case p.PolyFillType.pftPositive:S=t.WindCnt;break;case p.PolyFillType.pftNegative:S=-t.WindCnt;break;default:S=Math.abs(t.WindCnt);break}if(a&&l)n||o||x!==0&&x!=1||S!==0&&S!=1||e.PolyTyp!=t.PolyTyp&&this.m_ClipType!=p.ClipType.ctXor?this.AddLocalMaxPoly(e,t,r):(this.AddOutPt(e,r),this.AddOutPt(t,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if(a)(S===0||S==1)&&(this.AddOutPt(e,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if(l)(x===0||x==1)&&(this.AddOutPt(t,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if((x===0||x==1)&&(S===0||S==1)&&!n&&!o){var P,g;switch(m){case p.PolyFillType.pftPositive:P=e.WindCnt2;break;case p.PolyFillType.pftNegative:P=-e.WindCnt2;break;default:P=Math.abs(e.WindCnt2);break}switch(y){case p.PolyFillType.pftPositive:g=t.WindCnt2;break;case p.PolyFillType.pftNegative:g=-t.WindCnt2;break;default:g=Math.abs(t.WindCnt2);break}if(e.PolyTyp!=t.PolyTyp)this.AddLocalMinPoly(e,t,r);else if(x==1&&S==1)switch(this.m_ClipType){case p.ClipType.ctIntersection:P>0&&g>0&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctUnion:P<=0&&g<=0&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctDifference:(e.PolyTyp==p.PolyType.ptClip&&P>0&&g>0||e.PolyTyp==p.PolyType.ptSubject&&P<=0&&g<=0)&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctXor:this.AddLocalMinPoly(e,t,r);break}else p.Clipper.SwapSides(e,t)}n!=o&&(n&&e.OutIdx>=0||o&&t.OutIdx>=0)&&(p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t)),n&&this.DeleteFromAEL(e),o&&this.DeleteFromAEL(t)};p.Clipper.prototype.DeleteFromAEL=function(e){var t=e.PrevInAEL,r=e.NextInAEL;t===null&&r===null&&e!=this.m_ActiveEdges||(t!==null?t.NextInAEL=r:this.m_ActiveEdges=r,r!==null&&(r.PrevInAEL=t),e.NextInAEL=null,e.PrevInAEL=null)};p.Clipper.prototype.DeleteFromSEL=function(e){var t=e.PrevInSEL,r=e.NextInSEL;t===null&&r===null&&e!=this.m_SortedEdges||(t!==null?t.NextInSEL=r:this.m_SortedEdges=r,r!==null&&(r.PrevInSEL=t),e.NextInSEL=null,e.PrevInSEL=null)};p.Clipper.prototype.UpdateEdgeIntoAEL=function(e){e.NextInLML===null&&p.Error("UpdateEdgeIntoAEL: invalid call");var t=e.PrevInAEL,r=e.NextInAEL;return e.NextInLML.OutIdx=e.OutIdx,t!==null?t.NextInAEL=e.NextInLML:this.m_ActiveEdges=e.NextInLML,r!==null&&(r.PrevInAEL=e.NextInLML),e.NextInLML.Side=e.Side,e.NextInLML.WindDelta=e.WindDelta,e.NextInLML.WindCnt=e.WindCnt,e.NextInLML.WindCnt2=e.WindCnt2,e=e.NextInLML,e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.PrevInAEL=t,e.NextInAEL=r,p.ClipperBase.IsHorizontal(e)||this.InsertScanbeam(e.Top.Y),e};p.Clipper.prototype.ProcessHorizontals=function(e){for(var t=this.m_SortedEdges;t!==null;)this.DeleteFromSEL(t),this.ProcessHorizontal(t,e),t=this.m_SortedEdges};p.Clipper.prototype.GetHorzDirection=function(e,t){e.Bot.X<e.Top.X?(t.Left=e.Bot.X,t.Right=e.Top.X,t.Dir=p.Direction.dLeftToRight):(t.Left=e.Top.X,t.Right=e.Bot.X,t.Dir=p.Direction.dRightToLeft)};p.Clipper.prototype.PrepareHorzJoins=function(e,t){var r=this.m_PolyOuts[e.OutIdx].Pts;e.Side!=p.EdgeSide.esLeft&&(r=r.Prev),t&&(p.IntPoint.op_Equality(r.Pt,e.Top)?this.AddGhostJoin(r,e.Bot):this.AddGhostJoin(r,e.Top))};p.Clipper.prototype.ProcessHorizontal=function(e,t){var r={Dir:null,Left:null,Right:null};this.GetHorzDirection(e,r);for(var i=r.Dir,n=r.Left,o=r.Right,a=e,l=null;a.NextInLML!==null&&p.ClipperBase.IsHorizontal(a.NextInLML);)a=a.NextInLML;for(a.NextInLML===null&&(l=this.GetMaximaPair(a));;){for(var c=e==a,h=this.GetNextInAEL(e,i);h!==null&&!(h.Curr.X==e.Top.X&&e.NextInLML!==null&&h.Dx<e.NextInLML.Dx);){var d=this.GetNextInAEL(h,i);if(i==p.Direction.dLeftToRight&&h.Curr.X<=o||i==p.Direction.dRightToLeft&&h.Curr.X>=n){if(e.OutIdx>=0&&e.WindDelta!=0&&this.PrepareHorzJoins(e,t),h==l&&c){i==p.Direction.dLeftToRight?this.IntersectEdges(e,h,h.Top,!1):this.IntersectEdges(h,e,h.Top,!1),l.OutIdx>=0&&p.Error("ProcessHorizontal error");return}else if(i==p.Direction.dLeftToRight){var m=new p.IntPoint(h.Curr.X,e.Curr.Y);this.IntersectEdges(e,h,m,!0)}else{var m=new p.IntPoint(h.Curr.X,e.Curr.Y);this.IntersectEdges(h,e,m,!0)}this.SwapPositionsInAEL(e,h)}else if(i==p.Direction.dLeftToRight&&h.Curr.X>=o||i==p.Direction.dRightToLeft&&h.Curr.X<=n)break;h=d}if(e.OutIdx>=0&&e.WindDelta!==0&&this.PrepareHorzJoins(e,t),e.NextInLML!==null&&p.ClipperBase.IsHorizontal(e.NextInLML)){e=this.UpdateEdgeIntoAEL(e),e.OutIdx>=0&&this.AddOutPt(e,e.Bot);var r={Dir:i,Left:n,Right:o};this.GetHorzDirection(e,r),i=r.Dir,n=r.Left,o=r.Right}else break}if(e.NextInLML!==null)if(e.OutIdx>=0){var y=this.AddOutPt(e,e.Top);if(e=this.UpdateEdgeIntoAEL(e),e.WindDelta===0)return;var x=e.PrevInAEL,d=e.NextInAEL;if(x!==null&&x.Curr.X==e.Bot.X&&x.Curr.Y==e.Bot.Y&&x.WindDelta!==0&&x.OutIdx>=0&&x.Curr.Y>x.Top.Y&&p.ClipperBase.SlopesEqual(e,x,this.m_UseFullRange)){var S=this.AddOutPt(x,e.Bot);this.AddJoin(y,S,e.Top)}else if(d!==null&&d.Curr.X==e.Bot.X&&d.Curr.Y==e.Bot.Y&&d.WindDelta!==0&&d.OutIdx>=0&&d.Curr.Y>d.Top.Y&&p.ClipperBase.SlopesEqual(e,d,this.m_UseFullRange)){var S=this.AddOutPt(d,e.Bot);this.AddJoin(y,S,e.Top)}}else e=this.UpdateEdgeIntoAEL(e);else l!==null?l.OutIdx>=0?(i==p.Direction.dLeftToRight?this.IntersectEdges(e,l,e.Top,!1):this.IntersectEdges(l,e,e.Top,!1),l.OutIdx>=0&&p.Error("ProcessHorizontal error")):(this.DeleteFromAEL(e),this.DeleteFromAEL(l)):(e.OutIdx>=0&&this.AddOutPt(e,e.Top),this.DeleteFromAEL(e))};p.Clipper.prototype.GetNextInAEL=function(e,t){return t==p.Direction.dLeftToRight?e.NextInAEL:e.PrevInAEL};p.Clipper.prototype.IsMinima=function(e){return e!==null&&e.Prev.NextInLML!=e&&e.Next.NextInLML!=e};p.Clipper.prototype.IsMaxima=function(e,t){return e!==null&&e.Top.Y==t&&e.NextInLML===null};p.Clipper.prototype.IsIntermediate=function(e,t){return e.Top.Y==t&&e.NextInLML!==null};p.Clipper.prototype.GetMaximaPair=function(e){var t=null;return p.IntPoint.op_Equality(e.Next.Top,e.Top)&&e.Next.NextInLML===null?t=e.Next:p.IntPoint.op_Equality(e.Prev.Top,e.Top)&&e.Prev.NextInLML===null&&(t=e.Prev),t!==null&&(t.OutIdx==-2||t.NextInAEL==t.PrevInAEL&&!p.ClipperBase.IsHorizontal(t))?null:t};p.Clipper.prototype.ProcessIntersections=function(e,t){if(this.m_ActiveEdges==null)return!0;try{if(this.BuildIntersectList(e,t),this.m_IntersectList.length==0)return!0;if(this.m_IntersectList.length==1||this.FixupIntersectionOrder())this.ProcessIntersectList();else return!1}catch{this.m_SortedEdges=null,this.m_IntersectList.length=0,p.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0};p.Clipper.prototype.BuildIntersectList=function(e,t){if(this.m_ActiveEdges!==null){var r=this.m_ActiveEdges;for(this.m_SortedEdges=r;r!==null;)r.PrevInSEL=r.PrevInAEL,r.NextInSEL=r.NextInAEL,r.Curr.X=p.Clipper.TopX(r,t),r=r.NextInAEL;for(var i=!0;i&&this.m_SortedEdges!==null;){for(i=!1,r=this.m_SortedEdges;r.NextInSEL!==null;){var n=r.NextInSEL,o=new p.IntPoint;if(r.Curr.X>n.Curr.X){!this.IntersectPoint(r,n,o)&&r.Curr.X>n.Curr.X+1&&p.Error("Intersection error"),o.Y>e&&(o.Y=e,Math.abs(r.Dx)>Math.abs(n.Dx)?o.X=p.Clipper.TopX(n,e):o.X=p.Clipper.TopX(r,e));var a=new p.IntersectNode;a.Edge1=r,a.Edge2=n,a.Pt.X=o.X,a.Pt.Y=o.Y,this.m_IntersectList.push(a),this.SwapPositionsInSEL(r,n),i=!0}else r=n}if(r.PrevInSEL!==null)r.PrevInSEL.NextInSEL=null;else break}this.m_SortedEdges=null}};p.Clipper.prototype.EdgesAdjacent=function(e){return e.Edge1.NextInSEL==e.Edge2||e.Edge1.PrevInSEL==e.Edge2};p.Clipper.IntersectNodeSort=function(e,t){return t.Pt.Y-e.Pt.Y};p.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var e=this.m_IntersectList.length,t=0;t<e;t++){if(!this.EdgesAdjacent(this.m_IntersectList[t])){for(var r=t+1;r<e&&!this.EdgesAdjacent(this.m_IntersectList[r]);)r++;if(r==e)return!1;var i=this.m_IntersectList[t];this.m_IntersectList[t]=this.m_IntersectList[r],this.m_IntersectList[r]=i}this.SwapPositionsInSEL(this.m_IntersectList[t].Edge1,this.m_IntersectList[t].Edge2)}return!0};p.Clipper.prototype.ProcessIntersectList=function(){for(var e=0,t=this.m_IntersectList.length;e<t;e++){var r=this.m_IntersectList[e];this.IntersectEdges(r.Edge1,r.Edge2,r.Pt,!0),this.SwapPositionsInAEL(r.Edge1,r.Edge2)}this.m_IntersectList.length=0};var nP=s(function(e){return e<0?Math.ceil(e-.5):Math.round(e)},"R1"),oP=s(function(e){return e<0?Math.ceil(e-.5):Math.floor(e+.5)},"R2"),aP=s(function(e){return e<0?-Math.round(Math.abs(e)):Math.round(e)},"R3"),sP=s(function(e){return e<0?(e-=.5,e<-2147483648?Math.ceil(e):e|0):(e+=.5,e>2147483647?Math.floor(e):e|0)},"R4");W.msie?p.Clipper.Round=nP:W.chromium?p.Clipper.Round=aP:W.safari?p.Clipper.Round=sP:p.Clipper.Round=oP;p.Clipper.TopX=function(e,t){return t==e.Top.Y?e.Top.X:e.Bot.X+p.Clipper.Round(e.Dx*(t-e.Bot.Y))};p.Clipper.prototype.IntersectPoint=function(e,t,r){r.X=0,r.Y=0;var i,n;if(p.ClipperBase.SlopesEqual(e,t,this.m_UseFullRange)||e.Dx==t.Dx)return t.Bot.Y>e.Bot.Y?(r.X=t.Bot.X,r.Y=t.Bot.Y):(r.X=e.Bot.X,r.Y=e.Bot.Y),!1;if(e.Delta.X===0)r.X=e.Bot.X,p.ClipperBase.IsHorizontal(t)?r.Y=t.Bot.Y:(n=t.Bot.Y-t.Bot.X/t.Dx,r.Y=p.Clipper.Round(r.X/t.Dx+n));else if(t.Delta.X===0)r.X=t.Bot.X,p.ClipperBase.IsHorizontal(e)?r.Y=e.Bot.Y:(i=e.Bot.Y-e.Bot.X/e.Dx,r.Y=p.Clipper.Round(r.X/e.Dx+i));else{i=e.Bot.X-e.Bot.Y*e.Dx,n=t.Bot.X-t.Bot.Y*t.Dx;var o=(n-i)/(e.Dx-t.Dx);r.Y=p.Clipper.Round(o),Math.abs(e.Dx)<Math.abs(t.Dx)?r.X=p.Clipper.Round(e.Dx*o+i):r.X=p.Clipper.Round(t.Dx*o+n)}if(r.Y<e.Top.Y||r.Y<t.Top.Y){if(e.Top.Y>t.Top.Y)return r.Y=e.Top.Y,r.X=p.Clipper.TopX(t,e.Top.Y),r.X<e.Top.X;r.Y=t.Top.Y,Math.abs(e.Dx)<Math.abs(t.Dx)?r.X=p.Clipper.TopX(e,r.Y):r.X=p.Clipper.TopX(t,r.Y)}return!0};p.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(e){for(var t=this.m_ActiveEdges;t!==null;){var r=this.IsMaxima(t,e);if(r){var i=this.GetMaximaPair(t);r=i===null||!p.ClipperBase.IsHorizontal(i)}if(r){var n=t.PrevInAEL;this.DoMaxima(t),n===null?t=this.m_ActiveEdges:t=n.NextInAEL}else{if(this.IsIntermediate(t,e)&&p.ClipperBase.IsHorizontal(t.NextInLML)?(t=this.UpdateEdgeIntoAEL(t),t.OutIdx>=0&&this.AddOutPt(t,t.Bot),this.AddEdgeToSEL(t)):(t.Curr.X=p.Clipper.TopX(t,e),t.Curr.Y=e),this.StrictlySimple){var n=t.PrevInAEL;if(t.OutIdx>=0&&t.WindDelta!==0&&n!==null&&n.OutIdx>=0&&n.Curr.X==t.Curr.X&&n.WindDelta!==0){var o=this.AddOutPt(n,t.Curr),a=this.AddOutPt(t,t.Curr);this.AddJoin(o,a,t.Curr)}}t=t.NextInAEL}}for(this.ProcessHorizontals(!0),t=this.m_ActiveEdges;t!==null;){if(this.IsIntermediate(t,e)){var o=null;t.OutIdx>=0&&(o=this.AddOutPt(t,t.Top)),t=this.UpdateEdgeIntoAEL(t);var n=t.PrevInAEL,l=t.NextInAEL;if(n!==null&&n.Curr.X==t.Bot.X&&n.Curr.Y==t.Bot.Y&&o!==null&&n.OutIdx>=0&&n.Curr.Y>n.Top.Y&&p.ClipperBase.SlopesEqual(t,n,this.m_UseFullRange)&&t.WindDelta!==0&&n.WindDelta!==0){var a=this.AddOutPt(n,t.Bot);this.AddJoin(o,a,t.Top)}else if(l!==null&&l.Curr.X==t.Bot.X&&l.Curr.Y==t.Bot.Y&&o!==null&&l.OutIdx>=0&&l.Curr.Y>l.Top.Y&&p.ClipperBase.SlopesEqual(t,l,this.m_UseFullRange)&&t.WindDelta!==0&&l.WindDelta!==0){var a=this.AddOutPt(l,t.Bot);this.AddJoin(o,a,t.Top)}}t=t.NextInAEL}};p.Clipper.prototype.DoMaxima=function(e){var t=this.GetMaximaPair(e);if(t===null){e.OutIdx>=0&&this.AddOutPt(e,e.Top),this.DeleteFromAEL(e);return}for(var r=e.NextInAEL,i=!0;r!==null&&r!=t;)this.IntersectEdges(e,r,e.Top,!0),this.SwapPositionsInAEL(e,r),r=e.NextInAEL;e.OutIdx==-1&&t.OutIdx==-1?(this.DeleteFromAEL(e),this.DeleteFromAEL(t)):e.OutIdx>=0&&t.OutIdx>=0?this.IntersectEdges(e,t,e.Top,!1):i&&e.WindDelta===0?(e.OutIdx>=0&&(this.AddOutPt(e,e.Top),e.OutIdx=-1),this.DeleteFromAEL(e),t.OutIdx>=0&&(this.AddOutPt(t,e.Top),t.OutIdx=-1),this.DeleteFromAEL(t)):p.Error("DoMaxima error")};p.Clipper.ReversePaths=function(e){for(var t=0,r=e.length;t<r;t++)e[t].reverse()};p.Clipper.Orientation=function(e){return p.Clipper.Area(e)>=0};p.Clipper.prototype.PointCount=function(e){if(e===null)return 0;var t=0,r=e;do t++,r=r.Next;while(r!=e);return t};p.Clipper.prototype.BuildResult=function(e){p.Clear(e);for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t];if(i.Pts!==null){var n=i.Pts.Prev,o=this.PointCount(n);if(!(o<2)){for(var a=new Array(o),l=0;l<o;l++)a[l]=n.Pt,n=n.Prev;e.push(a)}}}};p.Clipper.prototype.BuildResult2=function(e){e.Clear();for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t],n=this.PointCount(i.Pts);if(!(i.IsOpen&&n<2||!i.IsOpen&&n<3)){this.FixHoleLinkage(i);var o=new p.PolyNode;e.m_AllPolys.push(o),i.PolyNode=o,o.m_polygon.length=n;for(var a=i.Pts.Prev,l=0;l<n;l++)o.m_polygon[l]=a.Pt,a=a.Prev}}for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t];i.PolyNode!==null&&(i.IsOpen?(i.PolyNode.IsOpen=!0,e.AddChild(i.PolyNode)):i.FirstLeft!==null&&i.FirstLeft.PolyNode!=null?i.FirstLeft.PolyNode.AddChild(i.PolyNode):e.AddChild(i.PolyNode))}};p.Clipper.prototype.FixupOutPolygon=function(e){var t=null;e.BottomPt=null;for(var r=e.Pts;;){if(r.Prev==r||r.Prev==r.Next){this.DisposeOutPts(r),e.Pts=null;return}if(p.IntPoint.op_Equality(r.Pt,r.Next.Pt)||p.IntPoint.op_Equality(r.Pt,r.Prev.Pt)||p.ClipperBase.SlopesEqual(r.Prev.Pt,r.Pt,r.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(r.Prev.Pt,r.Pt,r.Next.Pt))){t=null;var i=r;r.Prev.Next=r.Next,r.Next.Prev=r.Prev,r=r.Prev,i=null}else{if(r==t)break;t===null&&(t=r),r=r.Next}}e.Pts=r};p.Clipper.prototype.DupOutPt=function(e,t){var r=new p.OutPt;return r.Pt.X=e.Pt.X,r.Pt.Y=e.Pt.Y,r.Idx=e.Idx,t?(r.Next=e.Next,r.Prev=e,e.Next.Prev=r,e.Next=r):(r.Prev=e.Prev,r.Next=e,e.Prev.Next=r,e.Prev=r),r};p.Clipper.prototype.GetOverlap=function(e,t,r,i,n){return e<t?r<i?(n.Left=Math.max(e,r),n.Right=Math.min(t,i)):(n.Left=Math.max(e,i),n.Right=Math.min(t,r)):r<i?(n.Left=Math.max(t,r),n.Right=Math.min(e,i)):(n.Left=Math.max(t,i),n.Right=Math.min(e,r)),n.Left<n.Right};p.Clipper.prototype.JoinHorz=function(e,t,r,i,n,o){var a=e.Pt.X>t.Pt.X?p.Direction.dRightToLeft:p.Direction.dLeftToRight,l=r.Pt.X>i.Pt.X?p.Direction.dRightToLeft:p.Direction.dLeftToRight;if(a==l)return!1;if(a==p.Direction.dLeftToRight){for(;e.Next.Pt.X<=n.X&&e.Next.Pt.X>=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;o&&e.Pt.X!=n.X&&(e=e.Next),t=this.DupOutPt(e,!o),p.IntPoint.op_Inequality(t.Pt,n)&&(e=t,e.Pt.X=n.X,e.Pt.Y=n.Y,t=this.DupOutPt(e,!o))}else{for(;e.Next.Pt.X>=n.X&&e.Next.Pt.X<=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;!o&&e.Pt.X!=n.X&&(e=e.Next),t=this.DupOutPt(e,o),p.IntPoint.op_Inequality(t.Pt,n)&&(e=t,e.Pt.X=n.X,e.Pt.Y=n.Y,t=this.DupOutPt(e,o))}if(l==p.Direction.dLeftToRight){for(;r.Next.Pt.X<=n.X&&r.Next.Pt.X>=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;o&&r.Pt.X!=n.X&&(r=r.Next),i=this.DupOutPt(r,!o),p.IntPoint.op_Inequality(i.Pt,n)&&(r=i,r.Pt.X=n.X,r.Pt.Y=n.Y,i=this.DupOutPt(r,!o))}else{for(;r.Next.Pt.X>=n.X&&r.Next.Pt.X<=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;!o&&r.Pt.X!=n.X&&(r=r.Next),i=this.DupOutPt(r,o),p.IntPoint.op_Inequality(i.Pt,n)&&(r=i,r.Pt.X=n.X,r.Pt.Y=n.Y,i=this.DupOutPt(r,o))}return a==p.Direction.dLeftToRight==o?(e.Prev=r,r.Next=e,t.Next=i,i.Prev=t):(e.Next=r,r.Prev=e,t.Prev=i,i.Next=t),!0};p.Clipper.prototype.JoinPoints=function(e,t,r){var i=e.OutPt1,n=new p.OutPt,o=e.OutPt2,a=new p.OutPt,l=e.OutPt1.Pt.Y==e.OffPt.Y;if(l&&p.IntPoint.op_Equality(e.OffPt,e.OutPt1.Pt)&&p.IntPoint.op_Equality(e.OffPt,e.OutPt2.Pt)){for(n=e.OutPt1.Next;n!=i&&p.IntPoint.op_Equality(n.Pt,e.OffPt);)n=n.Next;var c=n.Pt.Y>e.OffPt.Y;for(a=e.OutPt2.Next;a!=o&&p.IntPoint.op_Equality(a.Pt,e.OffPt);)a=a.Next;var h=a.Pt.Y>e.OffPt.Y;return c==h?!1:c?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,e.OutPt1=i,e.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,e.OutPt1=i,e.OutPt2=n,!0)}else if(l){for(n=i;i.Prev.Pt.Y==i.Pt.Y&&i.Prev!=n&&i.Prev!=o;)i=i.Prev;for(;n.Next.Pt.Y==n.Pt.Y&&n.Next!=i&&n.Next!=o;)n=n.Next;if(n.Next==i||n.Next==o)return!1;for(a=o;o.Prev.Pt.Y==o.Pt.Y&&o.Prev!=a&&o.Prev!=n;)o=o.Prev;for(;a.Next.Pt.Y==a.Pt.Y&&a.Next!=o&&a.Next!=i;)a=a.Next;if(a.Next==o||a.Next==i)return!1;var d={Left:null,Right:null};if(!this.GetOverlap(i.Pt.X,n.Pt.X,o.Pt.X,a.Pt.X,d))return!1;var m=d.Left,y=d.Right,x=new p.IntPoint,S;return i.Pt.X>=m&&i.Pt.X<=y?(x.X=i.Pt.X,x.Y=i.Pt.Y,S=i.Pt.X>n.Pt.X):o.Pt.X>=m&&o.Pt.X<=y?(x.X=o.Pt.X,x.Y=o.Pt.Y,S=o.Pt.X>a.Pt.X):n.Pt.X>=m&&n.Pt.X<=y?(x.X=n.Pt.X,x.Y=n.Pt.Y,S=n.Pt.X>i.Pt.X):(x.X=a.Pt.X,x.Y=a.Pt.Y,S=a.Pt.X>o.Pt.X),e.OutPt1=i,e.OutPt2=o,this.JoinHorz(i,n,o,a,x,S)}else{for(n=i.Next;p.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Next;var P=n.Pt.Y>i.Pt.Y||!p.ClipperBase.SlopesEqual(i.Pt,n.Pt,e.OffPt,this.m_UseFullRange);if(P){for(n=i.Prev;p.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Prev;if(n.Pt.Y>i.Pt.Y||!p.ClipperBase.SlopesEqual(i.Pt,n.Pt,e.OffPt,this.m_UseFullRange))return!1}for(a=o.Next;p.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Next;var g=a.Pt.Y>o.Pt.Y||!p.ClipperBase.SlopesEqual(o.Pt,a.Pt,e.OffPt,this.m_UseFullRange);if(g){for(a=o.Prev;p.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Prev;if(a.Pt.Y>o.Pt.Y||!p.ClipperBase.SlopesEqual(o.Pt,a.Pt,e.OffPt,this.m_UseFullRange))return!1}return n==i||a==o||n==a||t==r&&P==g?!1:P?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,e.OutPt1=i,e.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,e.OutPt1=i,e.OutPt2=n,!0)}};p.Clipper.GetBounds=function(e){for(var t=0,r=e.length;t<r&&e[t].length==0;)t++;if(t==r)return new p.IntRect(0,0,0,0);var i=new p.IntRect;for(i.left=e[t][0].X,i.right=i.left,i.top=e[t][0].Y,i.bottom=i.top;t<r;t++)for(var n=0,o=e[t].length;n<o;n++)e[t][n].X<i.left?i.left=e[t][n].X:e[t][n].X>i.right&&(i.right=e[t][n].X),e[t][n].Y<i.top?i.top=e[t][n].Y:e[t][n].Y>i.bottom&&(i.bottom=e[t][n].Y);return i};p.Clipper.prototype.GetBounds2=function(e){var t=e,r=new p.IntRect;for(r.left=e.Pt.X,r.right=e.Pt.X,r.top=e.Pt.Y,r.bottom=e.Pt.Y,e=e.Next;e!=t;)e.Pt.X<r.left&&(r.left=e.Pt.X),e.Pt.X>r.right&&(r.right=e.Pt.X),e.Pt.Y<r.top&&(r.top=e.Pt.Y),e.Pt.Y>r.bottom&&(r.bottom=e.Pt.Y),e=e.Next;return r};p.Clipper.PointInPolygon=function(e,t){var r=0,i=t.length;if(i<3)return 0;for(var n=t[0],o=1;o<=i;++o){var a=o==i?t[0]:t[o];if(a.Y==e.Y&&(a.X==e.X||n.Y==e.Y&&a.X>e.X==n.X<e.X))return-1;if(n.Y<e.Y!=a.Y<e.Y){if(n.X>=e.X)if(a.X>e.X)r=1-r;else{var l=(n.X-e.X)*(a.Y-e.Y)-(a.X-e.X)*(n.Y-e.Y);if(l==0)return-1;l>0==a.Y>n.Y&&(r=1-r)}else if(a.X>e.X){var l=(n.X-e.X)*(a.Y-e.Y)-(a.X-e.X)*(n.Y-e.Y);if(l==0)return-1;l>0==a.Y>n.Y&&(r=1-r)}}n=a}return r};p.Clipper.prototype.PointInPolygon=function(e,t){for(var r=0,i=t;;){var n=t.Pt.X,o=t.Pt.Y,a=t.Next.Pt.X,l=t.Next.Pt.Y;if(l==e.Y&&(a==e.X||o==e.Y&&a>e.X==n<e.X))return-1;if(o<e.Y!=l<e.Y){if(n>=e.X)if(a>e.X)r=1-r;else{var c=(n-e.X)*(l-e.Y)-(a-e.X)*(o-e.Y);if(c==0)return-1;c>0==l>o&&(r=1-r)}else if(a>e.X){var c=(n-e.X)*(l-e.Y)-(a-e.X)*(o-e.Y);if(c==0)return-1;c>0==l>o&&(r=1-r)}}if(t=t.Next,i==t)break}return r};p.Clipper.prototype.Poly2ContainsPoly1=function(e,t){var r=e;do{var i=this.PointInPolygon(r.Pt,t);if(i>=0)return i!=0;r=r.Next}while(r!=e);return!0};p.Clipper.prototype.FixupFirstLefts1=function(e,t){for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts!==null&&n.FirstLeft==e&&this.Poly2ContainsPoly1(n.Pts,t.Pts)&&(n.FirstLeft=t)}};p.Clipper.prototype.FixupFirstLefts2=function(e,t){for(var r=0,i=this.m_PolyOuts,n=i.length,o=i[r];r<n;r++,o=i[r])o.FirstLeft==e&&(o.FirstLeft=t)};p.Clipper.ParseFirstLeft=function(e){for(;e!=null&&e.Pts==null;)e=e.FirstLeft;return e};p.Clipper.prototype.JoinCommonEdges=function(){for(var e=0,t=this.m_Joins.length;e<t;e++){var r=this.m_Joins[e],i=this.GetOutRec(r.OutPt1.Idx),n=this.GetOutRec(r.OutPt2.Idx);if(!(i.Pts==null||n.Pts==null)){var o;if(i==n?o=i:this.Param1RightOfParam2(i,n)?o=n:this.Param1RightOfParam2(n,i)?o=i:o=this.GetLowermostRec(i,n),!!this.JoinPoints(r,i,n))if(i==n){if(i.Pts=r.OutPt1,i.BottomPt=null,n=this.CreateOutRec(),n.Pts=r.OutPt2,this.UpdateOutPtIdxs(n),this.m_UsingPolyTree)for(var a=0,l=this.m_PolyOuts.length;a<l-1;a++){var c=this.m_PolyOuts[a];c.Pts==null||p.Clipper.ParseFirstLeft(c.FirstLeft)!=i||c.IsHole==i.IsHole||this.Poly2ContainsPoly1(c.Pts,r.OutPt2)&&(c.FirstLeft=n)}this.Poly2ContainsPoly1(n.Pts,i.Pts)?(n.IsHole=!i.IsHole,n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i),(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)):this.Poly2ContainsPoly1(i.Pts,n.Pts)?(n.IsHole=i.IsHole,i.IsHole=!n.IsHole,n.FirstLeft=i.FirstLeft,i.FirstLeft=n,this.m_UsingPolyTree&&this.FixupFirstLefts2(i,n),(i.IsHole^this.ReverseSolution)==this.Area(i)>0&&this.ReversePolyPtLinks(i.Pts)):(n.IsHole=i.IsHole,n.FirstLeft=i.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(i,n))}else n.Pts=null,n.BottomPt=null,n.Idx=i.Idx,i.IsHole=o.IsHole,o==n&&(i.FirstLeft=n.FirstLeft),n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i)}}};p.Clipper.prototype.UpdateOutPtIdxs=function(e){var t=e.Pts;do t.Idx=e.Idx,t=t.Prev;while(t!=e.Pts)};p.Clipper.prototype.DoSimplePolygons=function(){for(var e=0;e<this.m_PolyOuts.length;){var t=this.m_PolyOuts[e++],r=t.Pts;if(r!==null)do{for(var i=r.Next;i!=t.Pts;){if(p.IntPoint.op_Equality(r.Pt,i.Pt)&&i.Next!=r&&i.Prev!=r){var n=r.Prev,o=i.Prev;r.Prev=o,o.Next=r,i.Prev=n,n.Next=i,t.Pts=r;var a=this.CreateOutRec();a.Pts=i,this.UpdateOutPtIdxs(a),this.Poly2ContainsPoly1(a.Pts,t.Pts)?(a.IsHole=!t.IsHole,a.FirstLeft=t):this.Poly2ContainsPoly1(t.Pts,a.Pts)?(a.IsHole=t.IsHole,t.IsHole=!a.IsHole,a.FirstLeft=t.FirstLeft,t.FirstLeft=a):(a.IsHole=t.IsHole,a.FirstLeft=t.FirstLeft),i=r}i=i.Next}r=r.Next}while(r!=t.Pts)}};p.Clipper.Area=function(e){var t=e.length;if(t<3)return 0;for(var r=0,i=0,n=t-1;i<t;++i)r+=(e[n].X+e[i].X)*(e[n].Y-e[i].Y),n=i;return-r*.5};p.Clipper.prototype.Area=function(e){var t=e.Pts;if(t==null)return 0;var r=0;do r=r+(t.Prev.Pt.X+t.Pt.X)*(t.Prev.Pt.Y-t.Pt.Y),t=t.Next;while(t!=e.Pts);return r*.5};Lb&&(p.Clipper.OffsetPaths=function(e,t,r,i,n){var o=new p.Paths,a=new p.ClipperOffset(n,n);return a.AddPaths(e,r,i),a.Execute(o,t),o});p.Clipper.SimplifyPolygon=function(e,t){var r=new Array,i=new p.Clipper(0);return i.StrictlySimple=!0,i.AddPath(e,p.PolyType.ptSubject,!0),i.Execute(p.ClipType.ctUnion,r,t,t),r};p.Clipper.SimplifyPolygons=function(e,t){typeof t>"u"&&(t=p.PolyFillType.pftEvenOdd);var r=new Array,i=new p.Clipper(0);return i.StrictlySimple=!0,i.AddPaths(e,p.PolyType.ptSubject,!0),i.Execute(p.ClipType.ctUnion,r,t,t),r};p.Clipper.DistanceSqrd=function(e,t){var r=e.X-t.X,i=e.Y-t.Y;return r*r+i*i};p.Clipper.DistanceFromLineSqrd=function(e,t,r){var i=t.Y-r.Y,n=r.X-t.X,o=i*t.X+n*t.Y;return o=i*e.X+n*e.Y-o,o*o/(i*i+n*n)};p.Clipper.SlopesNearCollinear=function(e,t,r,i){return p.Clipper.DistanceFromLineSqrd(t,e,r)<i};p.Clipper.PointsAreClose=function(e,t,r){var i=e.X-t.X,n=e.Y-t.Y;return i*i+n*n<=r};p.Clipper.ExcludeOp=function(e){var t=e.Prev;return t.Next=e.Next,e.Next.Prev=t,t.Idx=0,t};p.Clipper.CleanPolygon=function(e,t){typeof t>"u"&&(t=1.415);var r=e.length;if(r==0)return new Array;for(var i=new Array(r),n=0;n<r;++n)i[n]=new p.OutPt;for(var n=0;n<r;++n)i[n].Pt=e[n],i[n].Next=i[(n+1)%r],i[n].Next.Prev=i[n],i[n].Idx=0;for(var o=t*t,a=i[0];a.Idx==0&&a.Next!=a.Prev;)p.Clipper.PointsAreClose(a.Pt,a.Prev.Pt,o)?(a=p.Clipper.ExcludeOp(a),r--):p.Clipper.PointsAreClose(a.Prev.Pt,a.Next.Pt,o)?(p.Clipper.ExcludeOp(a.Next),a=p.Clipper.ExcludeOp(a),r-=2):p.Clipper.SlopesNearCollinear(a.Prev.Pt,a.Pt,a.Next.Pt,o)?(a=p.Clipper.ExcludeOp(a),r--):(a.Idx=1,a=a.Next);r<3&&(r=0);for(var l=new Array(r),n=0;n<r;++n)l[n]=new p.IntPoint(a.Pt),a=a.Next;return i=null,l};p.Clipper.CleanPolygons=function(e,t){for(var r=new Array(e.length),i=0,n=e.length;i<n;i++)r[i]=p.Clipper.CleanPolygon(e[i],t);return r};p.Clipper.Minkowski=function(e,t,r,i){var n=i?1:0,o=e.length,a=t.length,l=new Array;if(r)for(var c=0;c<a;c++){for(var h=new Array(o),d=0,m=e.length,y=e[d];d<m;d++,y=e[d])h[d]=new p.IntPoint(t[c].X+y.X,t[c].Y+y.Y);l.push(h)}else for(var c=0;c<a;c++){for(var h=new Array(o),d=0,m=e.length,y=e[d];d<m;d++,y=e[d])h[d]=new p.IntPoint(t[c].X-y.X,t[c].Y-y.Y);l.push(h)}for(var x=new Array,c=0;c<a-1+n;c++)for(var d=0;d<o;d++){var S=new Array;S.push(l[c%a][d%o]),S.push(l[(c+1)%a][d%o]),S.push(l[(c+1)%a][(d+1)%o]),S.push(l[c%a][(d+1)%o]),p.Clipper.Orientation(S)||S.reverse(),x.push(S)}var P=new p.Clipper(0);return P.AddPaths(x,p.PolyType.ptSubject,!0),P.Execute(p.ClipType.ctUnion,l,p.PolyFillType.pftNonZero,p.PolyFillType.pftNonZero),l};p.Clipper.MinkowskiSum=function(){var e=arguments,t=e.length;if(t==3){var r=e[0],i=e[1],n=e[2];return p.Clipper.Minkowski(r,i,!0,n)}else if(t==4){for(var r=e[0],o=e[1],a=e[2],n=e[3],l=new p.Clipper,c,h=0,d=o.length;h<d;++h){var c=p.Clipper.Minkowski(r,o[h],!0,n);l.AddPaths(c,p.PolyType.ptSubject,!0)}n&&l.AddPaths(o,p.PolyType.ptClip,!0);var m=new p.Paths;return l.Execute(p.ClipType.ctUnion,m,a,a),m}};p.Clipper.MinkowskiDiff=function(e,t,r){return p.Clipper.Minkowski(e,t,!1,r)};p.Clipper.PolyTreeToPaths=function(e){var t=new Array;return p.Clipper.AddPolyNodeToPaths(e,p.Clipper.NodeType.ntAny,t),t};p.Clipper.AddPolyNodeToPaths=function(e,t,r){var i=!0;switch(t){case p.Clipper.NodeType.ntOpen:return;case p.Clipper.NodeType.ntClosed:i=!e.IsOpen;break;default:break}e.m_polygon.length>0&&i&&r.push(e.m_polygon);for(var n=0,o=e.Childs(),a=o.length,l=o[n];n<a;n++,l=o[n])p.Clipper.AddPolyNodeToPaths(l,t,r)};p.Clipper.OpenPathsFromPolyTree=function(e){for(var t=new p.Paths,r=0,i=e.ChildCount();r<i;r++)e.Childs()[r].IsOpen&&t.push(e.Childs()[r].m_polygon);return t};p.Clipper.ClosedPathsFromPolyTree=function(e){var t=new p.Paths;return p.Clipper.AddPolyNodeToPaths(e,p.Clipper.NodeType.ntClosed,t),t};sc(p.Clipper,p.ClipperBase);p.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2};p.ClipperOffset=function(e,t){typeof e>"u"&&(e=2),typeof t>"u"&&(t=p.ClipperOffset.def_arc_tolerance),this.m_destPolys=new p.Paths,this.m_srcPoly=new p.Path,this.m_destPoly=new p.Path,this.m_normals=new Array,this.m_delta=0,this.m_sinA=0,this.m_sin=0,this.m_cos=0,this.m_miterLim=0,this.m_StepsPerRad=0,this.m_lowest=new p.IntPoint,this.m_polyNodes=new p.PolyNode,this.MiterLimit=e,this.ArcTolerance=t,this.m_lowest.X=-1};p.ClipperOffset.two_pi=6.28318530717959;p.ClipperOffset.def_arc_tolerance=.25;p.ClipperOffset.prototype.Clear=function(){p.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1};p.ClipperOffset.Round=p.Clipper.Round;p.ClipperOffset.prototype.AddPath=function(e,t,r){var i=e.length-1;if(!(i<0)){var n=new p.PolyNode;if(n.m_jointype=t,n.m_endtype=r,r==p.EndType.etClosedLine||r==p.EndType.etClosedPolygon)for(;i>0&&p.IntPoint.op_Equality(e[0],e[i]);)i--;n.m_polygon.push(e[0]);for(var o=0,a=0,l=1;l<=i;l++)p.IntPoint.op_Inequality(n.m_polygon[o],e[l])&&(o++,n.m_polygon.push(e[l]),(e[l].Y>n.m_polygon[a].Y||e[l].Y==n.m_polygon[a].Y&&e[l].X<n.m_polygon[a].X)&&(a=o));if(!(r==p.EndType.etClosedPolygon&&o<2||r!=p.EndType.etClosedPolygon&&o<0)&&(this.m_polyNodes.AddChild(n),r==p.EndType.etClosedPolygon))if(this.m_lowest.X<0)this.m_lowest=new p.IntPoint(0,a);else{var c=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];(n.m_polygon[a].Y>c.Y||n.m_polygon[a].Y==c.Y&&n.m_polygon[a].X<c.X)&&(this.m_lowest=new p.IntPoint(this.m_polyNodes.ChildCount()-1,a))}}};p.ClipperOffset.prototype.AddPaths=function(e,t,r){for(var i=0,n=e.length;i<n;i++)this.AddPath(e[i],t,r)};p.ClipperOffset.prototype.FixOrientations=function(){if(this.m_lowest.X>=0&&!p.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var e=0;e<this.m_polyNodes.ChildCount();e++){var t=this.m_polyNodes.Childs()[e];(t.m_endtype==p.EndType.etClosedPolygon||t.m_endtype==p.EndType.etClosedLine&&p.Clipper.Orientation(t.m_polygon))&&t.m_polygon.reverse()}else for(var e=0;e<this.m_polyNodes.ChildCount();e++){var t=this.m_polyNodes.Childs()[e];t.m_endtype==p.EndType.etClosedLine&&!p.Clipper.Orientation(t.m_polygon)&&t.m_polygon.reverse()}};p.ClipperOffset.GetUnitNormal=function(e,t){var r=t.X-e.X,i=t.Y-e.Y;if(r==0&&i==0)return new p.DoublePoint(0,0);var n=1/Math.sqrt(r*r+i*i);return r*=n,i*=n,new p.DoublePoint(i,-r)};p.ClipperOffset.prototype.DoOffset=function(e){if(this.m_destPolys=new Array,this.m_delta=e,p.ClipperBase.near_zero(e)){for(var t=0;t<this.m_polyNodes.ChildCount();t++){var r=this.m_polyNodes.Childs()[t];r.m_endtype==p.EndType.etClosedPolygon&&this.m_destPolys.push(r.m_polygon)}return}this.MiterLimit>2?this.m_miterLim=2/(this.MiterLimit*this.MiterLimit):this.m_miterLim=.5;var i;this.ArcTolerance<=0?i=p.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(e)*p.ClipperOffset.def_arc_tolerance?i=Math.abs(e)*p.ClipperOffset.def_arc_tolerance:i=this.ArcTolerance;var n=3.14159265358979/Math.acos(1-i/Math.abs(e));this.m_sin=Math.sin(p.ClipperOffset.two_pi/n),this.m_cos=Math.cos(p.ClipperOffset.two_pi/n),this.m_StepsPerRad=n/p.ClipperOffset.two_pi,e<0&&(this.m_sin=-this.m_sin);for(var t=0;t<this.m_polyNodes.ChildCount();t++){var r=this.m_polyNodes.Childs()[t];this.m_srcPoly=r.m_polygon;var o=this.m_srcPoly.length;if(!(o==0||e<=0&&(o<3||r.m_endtype!=p.EndType.etClosedPolygon))){if(this.m_destPoly=new Array,o==1){if(r.m_jointype==p.JoinType.jtRound)for(var a=1,l=0,c=1;c<=n;c++){this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+a*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+l*e)));var h=a;a=a*this.m_cos-this.m_sin*l,l=h*this.m_sin+l*this.m_cos}else for(var a=-1,l=-1,c=0;c<4;++c)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+a*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+l*e))),a<0?a=1:l<0?l=1:a=-1;this.m_destPolys.push(this.m_destPoly);continue}this.m_normals.length=0;for(var c=0;c<o-1;c++)this.m_normals.push(p.ClipperOffset.GetUnitNormal(this.m_srcPoly[c],this.m_srcPoly[c+1]));if(r.m_endtype==p.EndType.etClosedLine||r.m_endtype==p.EndType.etClosedPolygon?this.m_normals.push(p.ClipperOffset.GetUnitNormal(this.m_srcPoly[o-1],this.m_srcPoly[0])):this.m_normals.push(new p.DoublePoint(this.m_normals[o-2])),r.m_endtype==p.EndType.etClosedPolygon){for(var d=o-1,c=0;c<o;c++)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly)}else if(r.m_endtype==p.EndType.etClosedLine){for(var d=o-1,c=0;c<o;c++)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly),this.m_destPoly=new Array;for(var m=this.m_normals[o-1],c=o-1;c>0;c--)this.m_normals[c]=new p.DoublePoint(-this.m_normals[c-1].X,-this.m_normals[c-1].Y);this.m_normals[0]=new p.DoublePoint(-m.X,-m.Y),d=0;for(var c=o-1;c>=0;c--)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly)}else{for(var d=0,c=1;c<o-1;++c)d=this.OffsetPoint(c,d,r.m_jointype);var y;if(r.m_endtype==p.EndType.etOpenButt){var c=o-1;y=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[c].X+this.m_normals[c].X*e),p.ClipperOffset.Round(this.m_srcPoly[c].Y+this.m_normals[c].Y*e)),this.m_destPoly.push(y),y=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[c].X-this.m_normals[c].X*e),p.ClipperOffset.Round(this.m_srcPoly[c].Y-this.m_normals[c].Y*e)),this.m_destPoly.push(y)}else{var c=o-1;d=o-2,this.m_sinA=0,this.m_normals[c]=new p.DoublePoint(-this.m_normals[c].X,-this.m_normals[c].Y),r.m_endtype==p.EndType.etOpenSquare?this.DoSquare(c,d):this.DoRound(c,d)}for(var c=o-1;c>0;c--)this.m_normals[c]=new p.DoublePoint(-this.m_normals[c-1].X,-this.m_normals[c-1].Y);this.m_normals[0]=new p.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y),d=o-1;for(var c=d-1;c>0;--c)d=this.OffsetPoint(c,d,r.m_jointype);r.m_endtype==p.EndType.etOpenButt?(y=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*e)),this.m_destPoly.push(y),y=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*e)),this.m_destPoly.push(y)):(d=1,this.m_sinA=0,r.m_endtype==p.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1)),this.m_destPolys.push(this.m_destPoly)}}}};p.ClipperOffset.prototype.Execute=function(){var e=arguments,t=e[0]instanceof p.PolyTree;if(t){var r=e[0],i=e[1];r.Clear(),this.FixOrientations(),this.DoOffset(i);var n=new p.Clipper(0);if(n.AddPaths(this.m_destPolys,p.PolyType.ptSubject,!0),i>0)n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftPositive,p.PolyFillType.pftPositive);else{var o=p.Clipper.GetBounds(this.m_destPolys),a=new p.Path;if(a.push(new p.IntPoint(o.left-10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.top-10)),a.push(new p.IntPoint(o.left-10,o.top-10)),n.AddPath(a,p.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftNegative,p.PolyFillType.pftNegative),r.ChildCount()==1&&r.Childs()[0].ChildCount()>0){var l=r.Childs()[0];r.Childs()[0]=l.Childs()[0];for(var c=1;c<l.ChildCount();c++)r.AddChild(l.Childs()[c])}else r.Clear()}}else{var r=e[0],i=e[1];p.Clear(r),this.FixOrientations(),this.DoOffset(i);var n=new p.Clipper(0);if(n.AddPaths(this.m_destPolys,p.PolyType.ptSubject,!0),i>0)n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftPositive,p.PolyFillType.pftPositive);else{var o=p.Clipper.GetBounds(this.m_destPolys),a=new p.Path;a.push(new p.IntPoint(o.left-10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.top-10)),a.push(new p.IntPoint(o.left-10,o.top-10)),n.AddPath(a,p.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftNegative,p.PolyFillType.pftNegative),r.length>0&&r.splice(0,1)}}};p.ClipperOffset.prototype.OffsetPoint=function(e,t,r){if(this.m_sinA=this.m_normals[t].X*this.m_normals[e].Y-this.m_normals[e].X*this.m_normals[t].Y,this.m_sinA<5e-5&&this.m_sinA>-5e-5)return t;if(this.m_sinA>1?this.m_sinA=1:this.m_sinA<-1&&(this.m_sinA=-1),this.m_sinA*this.m_delta<0)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[t].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[t].Y*this.m_delta))),this.m_destPoly.push(new p.IntPoint(this.m_srcPoly[e])),this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[e].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[e].Y*this.m_delta)));else switch(r){case p.JoinType.jtMiter:{var i=1+(this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y);i>=this.m_miterLim?this.DoMiter(e,t,i):this.DoSquare(e,t);break}case p.JoinType.jtSquare:this.DoSquare(e,t);break;case p.JoinType.jtRound:this.DoRound(e,t);break}return t=e,t};p.ClipperOffset.prototype.DoSquare=function(e,t){var r=Math.tan(Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y)/4);this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_delta*(this.m_normals[t].X-this.m_normals[t].Y*r)),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_delta*(this.m_normals[t].Y+this.m_normals[t].X*r)))),this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_delta*(this.m_normals[e].X+this.m_normals[e].Y*r)),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_delta*(this.m_normals[e].Y-this.m_normals[e].X*r))))};p.ClipperOffset.prototype.DoMiter=function(e,t,r){var i=this.m_delta/r;this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+(this.m_normals[t].X+this.m_normals[e].X)*i),p.ClipperOffset.Round(this.m_srcPoly[e].Y+(this.m_normals[t].Y+this.m_normals[e].Y)*i)))};p.ClipperOffset.prototype.DoRound=function(e,t){for(var r=Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y),i=p.Cast_Int32(p.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(r))),n=this.m_normals[t].X,o=this.m_normals[t].Y,a,l=0;l<i;++l)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+n*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+o*this.m_delta))),a=n,n=n*this.m_cos-this.m_sin*o,o=a*this.m_sin+o*this.m_cos;this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[e].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[e].Y*this.m_delta)))};p.Error=function(e){try{throw new Error(e)}catch(t){alert(t.message)}};p.JS={};p.JS.AreaOfPolygon=function(e,t){return t||(t=1),p.Clipper.Area(e)/(t*t)};p.JS.AreaOfPolygons=function(e,t){t||(t=1);for(var r=0,i=0;i<e.length;i++)r+=p.Clipper.Area(e[i]);return r/(t*t)};p.JS.BoundsOfPath=function(e,t){return p.JS.BoundsOfPaths([e],t)};p.JS.BoundsOfPaths=function(e,t){t||(t=1);var r=p.Clipper.GetBounds(e);return r.left/=t,r.bottom/=t,r.right/=t,r.top/=t,r};p.JS.Clean=function(i,t){if(!(i instanceof Array))return[];var r=i[0]instanceof Array,i=p.JS.Clone(i);if(typeof t!="number"||t===null)return p.Error("Delta is not a number in Clean()."),i;if(i.length===0||i.length==1&&i[0].length===0||t<0)return i;r||(i=[i]);for(var n=i.length,o,a,l,c,h,d,m,y=[],x=0;x<n;x++)if(a=i[x],o=a.length,o!==0){if(o<3){l=a,y.push(l);continue}for(l=a,c=t*t,h=a[0],d=1,m=1;m<o;m++)(a[m].X-h.X)*(a[m].X-h.X)+(a[m].Y-h.Y)*(a[m].Y-h.Y)<=c||(l[d]=a[m],h=a[m],d++);h=a[d-1],(a[0].X-h.X)*(a[0].X-h.X)+(a[0].Y-h.Y)*(a[0].Y-h.Y)<=c&&d--,d<o&&l.splice(d,o-d),l.length&&y.push(l)}return!r&&y.length?y=y[0]:!r&&y.length===0?y=[]:r&&y.length===0&&(y=[[]]),y};p.JS.Clone=function(e){if(!(e instanceof Array))return[];if(e.length===0)return[];if(e.length==1&&e[0].length===0)return[[]];var t=e[0]instanceof Array;t||(e=[e]);var r=e.length,i,n,o,a,l=new Array(r);for(n=0;n<r;n++){for(i=e[n].length,a=new Array(i),o=0;o<i;o++)a[o]={X:e[n][o].X,Y:e[n][o].Y};l[n]=a}return t||(l=l[0]),l};p.JS.Lighten=function(e,t){if(!(e instanceof Array))return[];if(typeof t!="number"||t===null)return p.Error("Tolerance is not a number in Lighten()."),p.JS.Clone(e);if(e.length===0||e.length==1&&e[0].length===0||t<0)return p.JS.Clone(e);e[0]instanceof Array||(e=[e]);var r,i,n,o,a,l,c,h,d,m,y,x,S,P,g,C,M,T=e.length,w=t*t,E=[];for(r=0;r<T;r++)if(n=e[r],l=n.length,l!=0){for(o=0;o<1e6;o++){for(a=[],l=n.length,n[l-1].X!=n[0].X||n[l-1].Y!=n[0].Y?(x=1,n.push({X:n[0].X,Y:n[0].Y}),l=n.length):x=0,y=[],i=0;i<l-2;i++)c=n[i],d=n[i+1],h=n[i+2],C=c.X,M=c.Y,S=h.X-C,P=h.Y-M,(S!==0||P!==0)&&(g=((d.X-C)*S+(d.Y-M)*P)/(S*S+P*P),g>1?(C=h.X,M=h.Y):g>0&&(C+=S*g,M+=P*g)),S=d.X-C,P=d.Y-M,m=S*S+P*P,m<=w&&(y[i+1]=1,i++);for(a.push({X:n[0].X,Y:n[0].Y}),i=1;i<l-1;i++)y[i]||a.push({X:n[i].X,Y:n[i].Y});if(a.push({X:n[l-1].X,Y:n[l-1].Y}),x&&n.pop(),y.length)n=a;else break}l=a.length,a[l-1].X==a[0].X&&a[l-1].Y==a[0].Y&&a.pop(),a.length>2&&E.push(a)}return!e[0]instanceof Array&&(E=E[0]),typeof E>"u"&&(E=[[]]),E};p.JS.PerimeterOfPath=function(e,t,r){if(typeof e>"u")return 0;var i=Math.sqrt,n=0,o,a,l=0,c=0,h=0,d=0,m=e.length;if(m<2)return 0;for(t&&(e[m]=e[0],m++);--m;)o=e[m],l=o.X,c=o.Y,a=e[m-1],h=a.X,d=a.Y,n+=i((l-h)*(l-h)+(c-d)*(c-d));return t&&e.pop(),n/r};p.JS.PerimeterOfPaths=function(e,t,r){r||(r=1);for(var i=0,n=0;n<e.length;n++)i+=p.JS.PerimeterOfPath(e[n],t,r);return i};p.JS.ScaleDownPath=function(e,t){var r,i;for(t||(t=1),r=e.length;r--;)i=e[r],i.X=i.X/t,i.Y=i.Y/t};p.JS.ScaleDownPaths=function(e,t){var r,i,n,o=Math.round;for(t||(t=1),r=e.length;r--;)for(i=e[r].length;i--;)n=e[r][i],n.X=n.X/t,n.Y=n.Y/t};p.JS.ScaleUpPath=function(e,t){var r,i,n=Math.round;for(t||(t=1),r=e.length;r--;)i=e[r],i.X=n(i.X*t),i.Y=n(i.Y*t)};p.JS.ScaleUpPaths=function(e,t){var r,i,n,o=Math.round;for(t||(t=1),r=e.length;r--;)for(i=e[r].length;i--;)n=e[r][i],n.X=o(n.X*t),n.Y=o(n.Y*t)};p.ExPolygons=function(){return[]};p.ExPolygon=function(){this.outer=null,this.holes=null};p.JS.AddOuterPolyNodeToExPolygons=function(e,t){var r=new p.ExPolygon;r.outer=e.Contour();var i=e.Childs(),n=i.length;r.holes=new Array(n);var o,a,l,c,h,d;for(l=0;l<n;l++)for(o=i[l],r.holes[l]=o.Contour(),c=0,h=o.Childs(),d=h.length;c<d;c++)a=h[c],p.JS.AddOuterPolyNodeToExPolygons(a,t);t.push(r)};p.JS.ExPolygonsToPaths=function(e){var t,r,i,n,o=new p.Paths;for(t=0,i=e.length;t<i;t++)for(o.push(e[t].outer),r=0,n=e[t].holes.length;r<n;r++)o.push(e[t].holes[r]);return o};p.JS.PolyTreeToExPolygons=function(e){var t=new p.ExPolygons,r,i,n,o;for(i=0,n=e.Childs(),o=n.length;i<o;i++)r=n[i],p.JS.AddOuterPolyNodeToExPolygons(r,t);return t};xa.exports=p});f();f();var Yc=new WeakMap,Bt,zc=class zc{constructor(t){I(this,Bt,void 0);_(this,Bt,t),Yc.set(this,t)}get mapName(){return u(this,Bt).mapName}get mapCenter(){return u(this,Bt).mapCenter}get organizationId(){return u(this,Bt).organizationId}get outdoorViewToken(){return u(this,Bt).outdoorViewToken}getByType(t){switch(t){case"space":return u(this,Bt).spaces;case"door":return u(this,Bt).doors;case"floor":return u(this,Bt).floors;case"connection":return u(this,Bt).connections;case"object":return u(this,Bt).objects;case"point-of-interest":return u(this,Bt).pointsOfInterest;case"annotation":return u(this,Bt).annotations;default:return[]}}getById(t,r){return u(this,Bt).getById(t,r)}};Bt=new WeakMap,s(zc,"MapData");var Xc=zc,jc=Xc;f();f();f();var C3={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},Y=C3;f();var cm=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];var um=globalThis.fetch,pm,x3=(pm=b==null?void 0:b.env)==null?void 0:pm.npm_package_version;function Uc(){if(um==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return um}s(Uc,"isomorphicFetch");var S3={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function Wc(e){var r;let t={...S3,...e};return t.headers={...t.headers,"mappedin-sdk-version":x3},t.things=[],"platformString"in e&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization=`Bearer ${t.accessToken}`:t.clientId&&t.clientSecret&&(t.authorization=`Basic ${globalThis.btoa(`${t.clientId}:${t.clientSecret}`)}`)),t.language=(r=t.language)==null?void 0:r.toLowerCase(),t}s(Wc,"parseOptions");async function Zc(e,t){return new Promise(async(r,i)=>{try{let{url:n}=await P3(e,t),o=await Uc()(n).then(l=>l.arrayBuffer()),a=new Uint8Array(o);r(a)}catch(n){i(n)}})}s(Zc,"downloadMVF");function hm(e){return e.endsWith("/")?e:`${e}/`}s(hm,"normalizeUrl");async function P3(e,t){let r=`${e.bundleBaseUri?hm(e.bundleBaseUri):"https://app.mappedin.com/"}api/venue/${e.mapId}/mvf`,i=await Uc()(r,{headers:{Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);return i.json()}s(P3,"getMakerBundleURL");async function us(e){let t=`${e.authBaseUri?hm(e.authBaseUri):"https://auth-maker.mappedin.com/"}api-key/token`,r=await Uc()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);return r.json()}s(us,"getMakerAccessToken");function qc(e){let t=new TextDecoder,r=t.decode.bind(t);try{let i={"connection.json":JSON.parse(r(e["connection.json"])),"manifest.geojson":JSON.parse(r(e["manifest.geojson"])),"styles.json":JSON.parse(r(e["styles.json"])),"map.geojson":JSON.parse(r(e["map.geojson"])),"mapstack.geojson":JSON.parse(r(e["mapstack.geojson"])),"node.geojson":JSON.parse(r(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(e.annotation!=null){let l=Object.keys(e.annotation);for(let c of l){let h=c.replace(/\.json|\.geojson/g,"");i.annotation[h]=JSON.parse(r(e.annotation[c]))}}let n=Object.keys(e.space);for(let l of n){let c=l.replace(/\.json|\.geojson/g,"");i.space[c]=JSON.parse(r(e.space[l]))}let o=Object.keys(e.obstruction);for(let l of o){let c=l.replace(/\.json|\.geojson/g,"");i.obstruction[c]=JSON.parse(r(e.obstruction[l]))}let a=Object.keys(e.entrance);for(let l of a){let c=l.replace(/\.json|\.geojson/g,"");i.entrance[c]=JSON.parse(r(e.entrance[l]))}return i}catch(i){throw Y.error(i),new Error("MVF parsing failed! Probably encountered a bad file.")}}s(qc,"parseMVF");function M3(e){if(e==null||typeof e!="object")return!1;for(let t of cm)if(e[t][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}s(M3,"validateStaticMVFFiles");async function $c(e){return new Promise(async(t,r)=>{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=(await import("./browser-CVKR4WHQ.js")).unzipSync(e);if(!M3(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},a=Object.keys(n);for(let l of a){if(n[l].length===0)continue;let c=l.split("/");if(c.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(c.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(c.length!==1)if(c[0]==="image"){Y.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[c[0]]==null&&(o[c[0]]={}),o[c[0]][c[1]]=n[l]}t(o)}catch(i){r(i)}})}s($c,"unzipMVF");f();f();f();f();var zt=63710088e-1,fm={centimeters:zt*100,centimetres:zt*100,degrees:zt/111325,feet:zt*3.28084,inches:zt*39.37,kilometers:zt/1e3,kilometres:zt/1e3,meters:zt,metres:zt,miles:zt/1609.344,millimeters:zt*1e3,millimetres:zt*1e3,nauticalmiles:zt/1852,radians:1,yards:zt*1.0936},bM={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/zt,yards:1.0936133};function wr(e,t,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(wr,"feature");function xe(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Jc(e[0])||!Jc(e[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:e};return wr(i,t,r)}s(xe,"point");function Ke(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:e};return wr(i,t,r)}s(Ke,"lineString");function io(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(io,"featureCollection");function dm(e,t){t===void 0&&(t="kilometers");var r=fm[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(dm,"radiansToLength");function mm(e,t){t===void 0&&(t="kilometers");var r=fm[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(mm,"lengthToRadians");function no(e){var t=e%(2*Math.PI);return t*180/Math.PI}s(no,"radiansToDegrees");function te(e){var t=e%360;return t*Math.PI/180}s(te,"degreesToRadians");function Jc(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(Jc,"isNumber");function Fe(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")}s(Fe,"getCoord");function se(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")}s(se,"getCoords");function ym(e,t){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}s(ym,"getType");function w3(e,t,r){r===void 0&&(r={});for(var i=Fe(e),n=se(t),o=0;o<n.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(o===0&&(a="start"),o===n.length-2&&(a="end"),o===0&&o+1===n.length-1&&(a="both")),T3(n[o],n[o+1],i,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}s(w3,"booleanPointOnLine");function T3(e,t,r,i,n){var o=r[0],a=r[1],l=e[0],c=e[1],h=t[0],d=t[1],m=r[0]-l,y=r[1]-c,x=h-l,S=d-c,P=m*S-y*x;if(n!==null){if(Math.abs(P)>n)return!1}else if(P!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(S)?x>0?l<o&&o<=h:h<=o&&o<l:S>0?c<a&&a<=d:d<=a&&a<c;if(i==="end")return Math.abs(x)>=Math.abs(S)?x>0?l<=o&&o<h:h<o&&o<=l:S>0?c<=a&&a<d:d<a&&a<=c;if(i==="both")return Math.abs(x)>=Math.abs(S)?x>0?l<o&&o<h:h<o&&o<l:S>0?c<a&&a<d:d<a&&a<c}else return Math.abs(x)>=Math.abs(S)?x>0?l<=o&&o<=h:h<=o&&o<=l:S>0?c<=a&&a<=d:d<=a&&a<=c;return!1}s(T3,"isPointOnLineSegment");var gm=w3;f();f();f();function ps(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,m=0,y,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,y=h?h.type==="GeometryCollection":!1,l=y?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=y?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],m,C,T,w)===!1)return!1;m++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],m,C,T,w)===!1)return!1;m++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(ps(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(ps,"coordEach");function Kc(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(Kc,"featureEach");function I3(e,t){var r,i,n,o,a,l,c,h,d,m,y=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,m=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,y,h,d,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,h,d,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,h,d,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}s(I3,"geomEach");function oo(e,t){I3(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(wr(r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],m={type:c,coordinates:d};if(t(wr(m,n),i,h)===!1)return!1}})}s(oo,"flattenEach");function E3(e,t){oo(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(ps(r,function(m,y,x,S,P){if(l===void 0||i>c||S>h||P>d){l=m,c=i,h=S,d=P,o=0;return}var g=Ke([l,m],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=m})===!1)return!1}}})}s(E3,"segmentEach");function vm(e,t,r){var i=r,n=!1;return E3(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(vm,"segmentReduce");function Qc(e){var t=[1/0,1/0,-1/0,-1/0];return ps(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}s(Qc,"bbox");Qc.default=Qc;var bm=Qc;function _3(e,t){t===void 0&&(t={});var r=bm(e),i=(r[0]+r[2])/2,n=(r[1]+r[3])/2;return xe([i,n],t.properties,t)}s(_3,"center");var Cm=_3;f();f();function L3(e,t,r){r===void 0&&(r={});var i=Fe(e),n=Fe(t),o=te(n[1]-i[1]),a=te(n[0]-i[0]),l=te(i[1]),c=te(n[1]),h=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(c);return dm(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),r.units)}s(L3,"distance");var Tr=L3;function hs(e,t){return t===void 0&&(t={}),vm(e,function(r,i){var n=i.geometry.coordinates;return r+Tr(n[0],n[1],t)},0)}s(hs,"length");f();f();f();function fs(e,t,r){if(r===void 0&&(r={}),r.final===!0)return O3(e,t);var i=Fe(e),n=Fe(t),o=te(i[0]),a=te(n[0]),l=te(i[1]),c=te(n[1]),h=Math.sin(a-o)*Math.cos(c),d=Math.cos(l)*Math.sin(c)-Math.sin(l)*Math.cos(c)*Math.cos(a-o);return no(Math.atan2(h,d))}s(fs,"bearing");function O3(e,t){var r=fs(t,e);return r=(r+180)%360,r}s(O3,"calculateFinalBearing");f();function ds(e,t,r,i){i===void 0&&(i={});var n=Fe(e),o=te(n[0]),a=te(n[1]),l=te(r),c=mm(t,i.units),h=Math.asin(Math.sin(a)*Math.cos(c)+Math.cos(a)*Math.sin(c)*Math.cos(l)),d=o+Math.atan2(Math.sin(l)*Math.sin(c)*Math.cos(a),Math.cos(c)-Math.sin(a)*Math.sin(h)),m=no(d),y=no(h);return xe([m,y],i.properties)}s(ds,"destination");f();f();function D3(e){if(!e)throw new Error("geojson is required");var t=[];return oo(e,function(r){A3(r,t)}),io(t)}s(D3,"lineSegment");function A3(e,t){var r=[],i=e.geometry;if(i!==null){switch(i.type){case"Polygon":r=se(i);break;case"LineString":r=[se(i)]}r.forEach(function(n){var o=N3(n,e.properties);o.forEach(function(a){a.id=t.length,t.push(a)})})}}s(A3,"lineSegmentFeature");function N3(e,t){var r=[];return e.reduce(function(i,n){var o=Ke([i,n],t);return o.bbox=k3(i,n),r.push(o),n}),r}s(N3,"createSegments");function k3(e,t){var r=e[0],i=e[1],n=t[0],o=t[1],a=r<n?r:n,l=i<o?i:o,c=r>n?r:n,h=i>o?i:o;return[a,l,c,h]}s(k3,"bbox");var tu=D3;var _2=Cr(I2(),1);function n6(e,t){var r={},i=[];if(e.type==="LineString"&&(e=wr(e)),t.type==="LineString"&&(t=wr(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var n=E2(e,t);return n&&i.push(n),io(i)}var o=(0,_2.default)();return o.load(tu(t)),Kc(tu(e),function(a){Kc(o.search(a),function(l){var c=E2(a,l);if(c){var h=se(c).join(",");r[h]||(r[h]=!0,i.push(c))}})}),io(i)}s(n6,"lineIntersect");function E2(e,t){var r=se(e),i=se(t);if(r.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=r[0][0],o=r[0][1],a=r[1][0],l=r[1][1],c=i[0][0],h=i[0][1],d=i[1][0],m=i[1][1],y=(m-h)*(a-n)-(d-c)*(l-o),x=(d-c)*(o-h)-(m-h)*(n-c),S=(a-n)*(o-h)-(l-o)*(n-c);if(y===0)return null;var P=x/y,g=S/y;if(P>=0&&P<=1&&g>=0&&g<=1){var C=n+P*(a-n),M=o+P*(l-o);return xe([C,M])}return null}s(E2,"intersects");var L2=n6;function o6(e,t,r){r===void 0&&(r={});var i=xe([1/0,1/0],{dist:1/0}),n=0;return oo(e,function(o){for(var a=se(o),l=0;l<a.length-1;l++){var c=xe(a[l]);c.properties.dist=Tr(t,c,r);var h=xe(a[l+1]);h.properties.dist=Tr(t,h,r);var d=Tr(c,h,r),m=Math.max(c.properties.dist,h.properties.dist),y=fs(c,h),x=ds(t,m,y+90,r),S=ds(t,m,y-90,r),P=L2(Ke([x.geometry.coordinates,S.geometry.coordinates]),Ke([c.geometry.coordinates,h.geometry.coordinates])),g=null;P.features.length>0&&(g=P.features[0],g.properties.dist=Tr(t,g,r),g.properties.location=n+Tr(c,g,r)),c.properties.dist<i.properties.dist&&(i=c,i.properties.index=l,i.properties.location=n),h.properties.dist<i.properties.dist&&(i=h,i.properties.index=l+1,i.properties.location=n+d),g&&g.properties.dist<i.properties.dist&&(i=g,i.properties.index=l),n+=d}}),i}s(o6,"nearestPointOnLine");var Mo=o6;function a6(e,t,r){var i=se(r);if(ym(r)!=="LineString")throw new Error("line must be a LineString");var n=Mo(r,e),o=Mo(r,t),a;n.properties.index<=o.properties.index?a=[n,o]:a=[o,n];for(var l=[a[0].geometry.coordinates],c=a[0].properties.index+1;c<a[1].properties.index+1;c++)l.push(i[c]);return l.push(a[1].geometry.coordinates),Ke(l,r.properties)}s(a6,"lineSlice");var Hp=a6;var s6=1e-7;function Xp(e){return{type:"Point",coordinates:e}}s(Xp,"point");function l6(e,t){let{coordinates:r}=t.geometry,{coordinates:i}=e.geometry,n=r.map(o=>Mo(e,Xp(o)));return i.reduce((o,a)=>{let l=Hp(Xp(a),n[0],e),c=Hp(Xp(a),n[1],e),h=hs(l)<hs(c)?l:c;return h.properties={...e.properties,entrances:[]},o.concat([h])},[])}s(l6,"splitObstructionByEntrance");function Yp(e,t){return t.reduce((r,i)=>{let n={epsilon:s6},o=r.findIndex(l=>gm(Cm(i),l,n)),a=r[o];if(a){let[l,c]=l6(a,i);r.splice(o,1,l,c)}return r},[e])}s(Yp,"splitObstructionByAllEntrances");f();f();f();f();var jp=[0,4,6,8,10],ft=s(()=>{let e=new Array(16).fill(0),t=Math.random()*4294967296;for(let i=0;i<e.length;i++)i>0&&!(i&3)&&(t=Math.random()*4294967296),e[i]=t>>>((i&3)<<3)&255;let r=e.map(i=>i.toString(16).padStart(2,"0"));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],jp.map((i,n)=>r.slice(i,n===jp.length-1?void 0:jp[n+1]).join("")).join("-")},"randomId");var un=class un{__type=un.__type;id=ft();latitude;longitude;floorId;static is(t){return t.__type===un.__type}constructor(t,r,i){this.latitude=t,this.longitude=r,this.floorId=i}isEqual(t){return this.latitude===t.latitude&&this.longitude===t.longitude&&this.floorId===t.floorId}toJSON(){return{latitude:this.latitude,longitude:this.longitude,floor:this.floorId}}destroy(){}};s(un,"Coordinate"),v(un,"__type","coordinate");var zp=un,$=zp;f();f();f();f();var Up=class Up{id;constructor(t){this.id=t}};s(Up,"BaseMetaData");var ni=Up;var To,pn,wo=class wo extends ni{constructor(r){super(String(ft()));I(this,To,{});I(this,pn,void 0);_(this,pn,r.mvfData)}static is(r){return r.__type===wo.__type}get url(){return u(this,pn).url}get name(){return u(this,pn).displayName}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let r of globalThis.Object.keys(u(this,To)))delete u(this,To)[r]}};To=new WeakMap,pn=new WeakMap,s(wo,"Hyperlink"),v(wo,"__type","hyperlink");var Wp=wo,pl=Wp;var Zp=class Zp{id;constructor(t,r){var n;this.id=t;let i=(n=r==null?void 0:r.links)!=null?n:[];i.length>0&&(this.links=i.map(o=>new pl({mvfData:o})))}links=[]};s(Zp,"BaseMapData");var It=Zp;var oi,rr,ai,Ar,hn=class hn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",hn.__type);I(this,oi,void 0);I(this,rr,void 0);I(this,ai,void 0);I(this,Ar,void 0);_(this,rr,{}),_(this,Ar,i.mvfData),_(this,oi,r),_(this,ai,i.floorId)}static is(r){return r.__type===hn.__type}get name(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.images)!=null?i:[]}get floor(){let r=u(this,oi).getById("floor",u(this,ai));if(r==null)throw new Error(`Floor ${u(this,ai)} not found!`);return r}get center(){if(u(this,rr).center==null){let[[r,i],[n,o]]=u(this,Ar).geometry.coordinates,a=(r+n)/2,l=(i+o)/2;u(this,rr).center=new $(l,a,u(this,ai))}return u(this,rr).center}get isExterior(){var n;let r=u(this,oi).obstructionIdByEntranceId[this.id],i=u(this,oi).getMVFFeatureById("obstruction",r);return(n=i==null?void 0:i.properties.footprintComponent)!=null?n:!1}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of Object.keys(u(this,rr)))delete u(this,rr)[r]}};oi=new WeakMap,rr=new WeakMap,ai=new WeakMap,Ar=new WeakMap,s(hn,"Door"),v(hn,"__type","door");var qp=hn,Nr=qp;f();var Io,si,kr,nr,fn=class fn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",fn.__type);I(this,Io,void 0);I(this,si,void 0);I(this,kr,{});I(this,nr,void 0);_(this,Io,r),_(this,si,i.floorId),_(this,nr,i.mvfData)}static is(r){return r.__type===fn.__type}get name(){var i,n;let{properties:r}=u(this,nr);return(n=(i=r.details)==null?void 0:i.name)!=null?n:r.externalId}get type(){return u6(u(this,nr).properties.kind)}get description(){var r,i;return(i=(r=u(this,nr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,nr).properties.details)==null?void 0:r.images)!=null?i:[]}get floor(){let r=u(this,Io).getById("floor",u(this,si));if(r==null)throw new Error(`Floor ${u(this,si)} not found!`);return r}get center(){var r;if(u(this,kr).center==null){let[i,n]=(r=u(this,nr).properties.center)!=null?r:[0,0];u(this,kr).center=new $(n,i,u(this,si))}return u(this,kr).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of Object.keys(u(this,kr)))delete u(this,kr)[r]}};Io=new WeakMap,si=new WeakMap,kr=new WeakMap,nr=new WeakMap,s(fn,"Space"),v(fn,"__type","space");var $p=fn,c6=["room","hallway","exterior","void","connection.stairs","connection.elevator","poi"];function u6(e){if(e==null||e==="default")return"room";let t=e.toLowerCase();return c6.includes(t)?t:"room"}s(u6,"validateSpaceType");var Me=$p;f();var He,dt,mn,dn=class dn extends It{constructor(r,i){super(i.mvfData.id);v(this,"__type",dn.__type);I(this,He,void 0);I(this,dt,{});I(this,mn,void 0);_(this,He,r),_(this,mn,i.mvfData)}static is(r){return r.__type===dn.__type}get name(){return u(this,mn).externalId}get elevation(){return u(this,mn).elevation}get spaces(){if(u(this,dt).spaces==null){let r=u(this,He).spaces.filter(i=>i.floor.id===this.id);u(this,dt).spaces=r}return u(this,dt).spaces}get objects(){if(u(this,dt).objects==null){let r=u(this,He).objects.filter(i=>i.floor.id===this.id);u(this,dt).objects=r}return u(this,dt).objects}get connections(){if(u(this,dt).connections==null){let r=u(this,He).connections.filter(i=>i.floors.includes(this));u(this,dt).connections=r}return u(this,dt).connections}get doors(){if(u(this,dt).doors==null){let r=u(this,He).doors.filter(i=>i.floor.id===this.id);u(this,dt).doors=r}return u(this,dt).doors}get annotations(){if(u(this,dt).annotations==null){let r=u(this,He).annotations.filter(i=>i.floor.id===this.id);u(this,dt).annotations=r}return u(this,dt).annotations}get pois(){if(u(this,dt).pois==null){let r=u(this,He).pointsOfInterest.filter(i=>i.floor.id===this.id);u(this,dt).pois=r}return u(this,dt).pois}toJSON(){return{id:this.id,name:this.name,elevation:this.elevation,spaces:this.spaces.map(r=>r.id),objects:this.objects.map(r=>r.id),connections:this.connections.map(r=>r.id),doors:this.doors.map(r=>r.id),annotations:this.annotations.map(r=>r.id),pois:this.pois.map(r=>r.id)}}destroy(){for(let r of globalThis.Object.keys(u(this,dt)))delete u(this,dt)[r]}};He=new WeakMap,dt=new WeakMap,mn=new WeakMap,s(dn,"Floor"),v(dn,"__type","floor");var Jp=dn,hl=Jp;f();f();f();var Kp=s(e=>e!=null,"notNull");f();function Rr(e){let t;if(Me.is(e)||Nr.is(e)||we.is(e))t=e.center;else if(Fr.is(e))t=e.coordinate;else if($.is(e))t=e;else return;return t}s(Rr,"getCoordinateFromStuffs");var Eo,or,ar,yn=class yn extends It{constructor(r,i){let n=Object.values(i.mvfDataByFloorId)[0];super(n.properties.id,n.properties.details);v(this,"__type",yn.__type);I(this,Eo,void 0);I(this,or,void 0);I(this,ar,void 0);_(this,or,{}),_(this,Eo,r),_(this,ar,i.mvfDataByFloorId)}static is(r){return r.__type===yn.__type}get name(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.images)!=null?i:[]}get type(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.kind)==null?void 0:r.split(".")[1])!=null?i:"unknown"}get coordinates(){return u(this,or).coordinates==null&&(u(this,or).coordinates=Object.entries(u(this,ar)).map(([r,i])=>new $(i.geometry.coordinates[1],i.geometry.coordinates[0],r))),u(this,or).coordinates}get floors(){return this.coordinates.map(r=>r.floorId?u(this,Eo).getById("floor",r.floorId):void 0).filter(Kp)}toJSON(){return{id:this.id,name:this.name,type:this.type,coordinates:this.coordinates.map(r=>r.toJSON()),floors:this.floors.map(r=>r.id)}}destroy(){for(let r of Object.keys(u(this,or)))delete u(this,or)[r]}};Eo=new WeakMap,or=new WeakMap,ar=new WeakMap,s(yn,"Connection"),v(yn,"__type","connection");var Qp=yn,Br=Qp;f();var _o,li,Gr,sr,gn=class gn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",gn.__type);I(this,_o,void 0);I(this,li,void 0);I(this,Gr,{});I(this,sr,void 0);_(this,_o,r),_(this,li,i.floorId),_(this,sr,i.mvfData)}static is(r){return r.__type===gn.__type}get name(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.images)!=null?i:[]}get type(){let r=u(this,sr).properties.kind;return r==null&&(r="object"),r==="Desks"&&(r="desk"),r.toLowerCase()}get floor(){let r=u(this,_o).getById("floor",u(this,li));if(r==null)throw new Error(`Floor ${u(this,li)} not found!`);return r}get center(){var r;if(u(this,Gr).center==null){let[i,n]=(r=u(this,sr).properties.center)!=null?r:[0,0];u(this,Gr).center=new $(n,i,u(this,li))}return u(this,Gr).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of globalThis.Object.keys(u(this,Gr)))u(this,Gr)[r]=null}};_o=new WeakMap,li=new WeakMap,Gr=new WeakMap,sr=new WeakMap,s(gn,"MapObject"),v(gn,"__type","object");var th=gn,we=th;f();f();var Oo,vn,Lo=class Lo extends ni{constructor(r){super(String(ft()));I(this,Oo,{});I(this,vn,void 0);_(this,vn,r.mvfData)}static is(r){return r.__type===Lo.__type}get url(){return u(this,vn).url}get name(){return u(this,vn).altText}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let r of globalThis.Object.keys(u(this,Oo)))delete u(this,Oo)[r]}};Oo=new WeakMap,vn=new WeakMap,s(Lo,"Image"),v(Lo,"__type","image");var eh=Lo,fl=eh;var Do,ci,Te,Vr,bn=class bn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",bn.__type);I(this,Do,void 0);I(this,ci,void 0);I(this,Te,{});I(this,Vr,void 0);_(this,Do,r),_(this,Vr,i.mvfData),_(this,ci,i.floorId)}static is(r){return r.__type===bn.__type}get name(){var r,i;return(i=(r=u(this,Vr).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,Vr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;if(u(this,Te).images==null){let n=(i=(r=u(this,Vr).properties.details)==null?void 0:r.images)!=null?i:[];u(this,Te).images=n.map(o=>new fl({mvfData:o}))}return u(this,Te).images}get floor(){let r=u(this,Do).getById("floor",u(this,ci));if(r==null)throw new Error(`Floor ${u(this,ci)} not found!`);return r}get coordinate(){var r;if(u(this,Te).coordinate==null){let[i,n]=(r=u(this,Vr).geometry.coordinates)!=null?r:[0,0];u(this,Te).coordinate=new $(n,i,u(this,ci))}return u(this,Te).coordinate}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let r in u(this,Te))u(this,Te)[r]=null}};Do=new WeakMap,ci=new WeakMap,Te=new WeakMap,Vr=new WeakMap,s(bn,"PointOfInterest"),v(bn,"__type","point-of-interest");var rh=bn,Fr=rh;f();var Ao,ui,Hr,xn,No,nh,Cn=class Cn extends It{constructor(r,i){super(i.mvfData.properties.id);I(this,No);v(this,"__type",Cn.__type);I(this,Ao,void 0);I(this,ui,void 0);I(this,Hr,{});I(this,xn,void 0);_(this,Ao,r),_(this,ui,i.floorId),_(this,xn,i.mvfData)}static is(r){return r.__type===Cn.__type}get group(){return j(this,No,nh).call(this).group}get type(){return j(this,No,nh).call(this).type}get coordinate(){if(u(this,Hr).coordinate==null){let[r,i]=u(this,xn).geometry.coordinates;u(this,Hr).coordinate=new $(i,r,u(this,ui))}return u(this,Hr).coordinate}get floor(){let r=u(this,Ao).getById("floor",u(this,ui));if(r==null)throw new Error(`Floor ${u(this,ui)} not found!`);return r}toJSON(){return{id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let r of Object.keys(u(this,Hr)))delete u(this,Hr)[r]}};Ao=new WeakMap,ui=new WeakMap,Hr=new WeakMap,xn=new WeakMap,No=new WeakSet,nh=s(function(){let[r,i]=u(this,xn).properties.symbolId.split("--");return{group:r,type:i}},"#getGroupAndTypeFromSymbolId"),s(Cn,"Annotation"),v(Cn,"__type","annotation");var ih=Cn,dl=ih;f();f();var Pn,Ie,pi,Mn,Sn=class Sn extends It{constructor(r,i){super(i.mvfData.properties.id);v(this,"__type",Sn.__type);I(this,Pn,void 0);I(this,Ie,{});I(this,pi,void 0);I(this,Mn,void 0);_(this,Pn,r),_(this,pi,i.floorId),_(this,Mn,i.mvfData)}static is(r){return r.__type===Sn.__type}get floor(){let r=u(this,Pn).getById("floor",u(this,pi));if(r==null)throw new Error(`Floor ${u(this,pi)} not found!`);return r}get coordinate(){if(u(this,Ie).coordinate==null){let[r,i]=u(this,Mn).geometry.coordinates;u(this,Ie).coordinate=new $(i,r,u(this,pi))}return u(this,Ie).coordinate}get neighbors(){if(u(this,Ie).neighbours==null){let r=u(this,Mn).properties.neighbors.map(i=>{let n=u(this,Pn).getById("node",i.id);if(n==null)throw new Error(`Node ${i.id} not found!`);return n});u(this,Ie).neighbours=r}return u(this,Ie).neighbours}toJSON(){return{id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(r=>r.id)}}destroy(){for(let r of Object.keys(u(this,Ie)))delete u(this,Ie)[r]}};Pn=new WeakMap,Ie=new WeakMap,pi=new WeakMap,Mn=new WeakMap,s(Sn,"Node"),v(Sn,"__type","node");var oh=Sn,O2=oh;var p6=s((e,t)=>{var m,y;let r={},i={},n={},o={},a={},l={},c={},h={},d=globalThis.Object.keys(e.space);for(let x of d){let S=e.space[x];if(S!=null)for(let P of S.features){h[P.properties.id]=x,a[P.properties.id]=P;for(let g of P.properties.destinationNodes)n[g]==null&&(n[g]=[]),n[g].push(P.properties.id);if(P.properties.kind==="desk-entrance"&&(o[P.properties.externalId]==null&&(o[P.properties.externalId]=[]),o[P.properties.externalId].push(...P.properties.destinationNodes)),!["void","desk-entrance"].includes((m=P.properties.kind)!=null?m:"")){if((y=P.properties.kind)!=null&&y.includes("connection")){let g=`${P.geometry.coordinates[1]}-${P.geometry.coordinates[0]}`;l[g]==null&&(l[g]=[]),l[g].push(P.properties.id);continue}if(P.properties.kind==="poi"){let g=new Fr(t,{floorId:x,mvfData:P});i[P.properties.id]=g}else{let g=new Me(t,{floorId:x,mvfData:P});r[P.properties.id]=g}}}}for(let x in l){let S=l[x],P={};for(let C of S){let M=h[C],T=a[C];P[M]=T}let g=new Br(t,{mvfDataByFloorId:P});c[g.id]=g}return{spacesById:r,poisById:i,connectionsById:c,spaceIdsByDestinationNodeId:n,objectEntranceNodeIdsByObstructionId:o,mvfSpacesById:a,connectionIdsByLatLon:l}},"processMVFSpaces"),h6=s((e,t)=>{let r={},i={};for(let n of e["node.geojson"].features){i[n.properties.id]=n;let o=new O2(t,{mvfData:n,floorId:n.properties.map});r[n.properties.id]=o}return{nodesById:r,mvfNodesById:i}},"processMVFNodes"),f6=s((e,t)=>{let r={},i={},n={},o=globalThis.Object.keys(e.obstruction);for(let a of o){let l=e.obstruction[a];if(l!=null)for(let c of l.features){i[c.properties.id]=c;for(let d of c.properties.entrances)n[d]=c.properties.id;if(c.properties.kind==="Wall")continue;let h=new we(t,{floorId:a,mvfData:c});r[c.properties.id]=h}}return{objectsById:r,mvfObstructionById:i,obstructionIdByEntranceId:n}},"processMVFObstructions"),d6=s((e,t)=>{let r={},i={};for(let n of e["map.geojson"]){i[n.id]=n;let o=new hl(t,{mvfData:n});r[n.id]=o}return{floorsById:r,mvfMapsById:i}},"processMVFMaps"),m6=s((e,t)=>{let r={},i=e["connection.json"].reduce((n,o)=>(o.nodes.forEach(a=>n[a]=o),r[o.id]=o,n),{});return{mvfConnectionsById:r,mvfConnectionsByNodeId:i}},"processMVFConnections"),y6=s((e,t)=>{let r={},i={},n=globalThis.Object.keys(e.entrance);for(let o of n){let a=e.entrance[o];if(a!=null)for(let l of a.features){i[l.properties.id]=l;let c=new Nr(t,{floorId:o,mvfData:l});r[l.properties.id]=c}}return{doorsById:r,mvfEntrancesById:i}},"processMVFEntrances"),g6=s((e,t)=>{let r={},i={};if(e.annotation==null)return{annotationsById:r,mvfAnnotationsById:i};let n=globalThis.Object.keys(e.annotation);for(let o of n){let a=e.annotation[o];if(a!=null)for(let l of a.features){i[l.properties.id]=l;let c=new dl(t,{floorId:o,mvfData:l});r[l.properties.id]=c}}return{annotationsById:r,mvfAnnotationsById:i}},"processMVFAnnotations"),D2=s((e,t)=>{let{spacesById:r,spaceIdsByDestinationNodeId:i,poisById:n,mvfSpacesById:o,objectEntranceNodeIdsByObstructionId:a,connectionsById:l,connectionIdsByLatLon:c}=p6(e,t),{nodesById:h,mvfNodesById:d}=h6(e,t),{objectsById:m,mvfObstructionById:y,obstructionIdByEntranceId:x}=f6(e,t),{floorsById:S,mvfMapsById:P}=d6(e,t),{mvfConnectionsById:g,mvfConnectionsByNodeId:C}=m6(e,t),{doorsById:M,mvfEntrancesById:T}=y6(e,t),{annotationsById:w,mvfAnnotationsById:E}=g6(e,t);return{spacesById:r,nodesById:h,objectsById:m,floorsById:S,connectionsById:l,doorsById:M,poisById:n,annotationsById:w,spaceIdsByDestinationNodeId:i,objectEntranceNodeIdsByObstructionId:a,obstructionIdByEntranceId:x,connectionIdsByLatLon:c,mvfSpacesById:o,mvfNodesById:d,mvfObstructionById:y,mvfMapsById:P,mvfConnectionsById:g,mvfConnectionsByNodeId:C,mvfEntrancesById:T,mvfAnnotationsById:E}},"createDataFromMVF");var rt,hi,fi,di,mi,yi,gi,vi,bi,Ro,Fo,Bo,Go,Vo,Ho,Xo,Yo,ah=class ah{constructor(t,r){I(this,rt,{});v(this,"mvf");v(this,"outdoorViewToken");v(this,"spaceIdsByDestinationNodeId");v(this,"objectEntranceNodeIdsByObstructionId");v(this,"obstructionIdByEntranceId");I(this,hi,void 0);I(this,fi,void 0);I(this,di,void 0);I(this,mi,void 0);I(this,yi,void 0);I(this,gi,void 0);I(this,vi,void 0);I(this,bi,void 0);I(this,Ro,void 0);I(this,Fo,void 0);I(this,Bo,void 0);I(this,Go,void 0);I(this,Vo,void 0);I(this,Ho,void 0);I(this,Xo,void 0);I(this,Yo,void 0);this.mvf=t,this.outdoorViewToken=r;let i=D2(t,this);_(this,hi,i.nodesById),_(this,fi,i.spacesById),_(this,di,i.floorsById),_(this,mi,i.connectionsById),_(this,yi,i.objectsById),_(this,gi,i.doorsById),_(this,vi,i.poisById),_(this,bi,i.annotationsById),_(this,Ro,i.mvfAnnotationsById),_(this,Fo,i.mvfConnectionsById),_(this,Bo,i.mvfConnectionsByNodeId),_(this,Go,i.mvfEntrancesById),_(this,Vo,i.mvfNodesById),_(this,Ho,i.mvfObstructionById),_(this,Xo,i.mvfSpacesById),_(this,Yo,i.mvfMapsById),this.spaceIdsByDestinationNodeId=i.spaceIdsByDestinationNodeId,this.objectEntranceNodeIdsByObstructionId=i.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=i.obstructionIdByEntranceId}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 new $(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])}get spaces(){return u(this,rt).spaces==null&&(u(this,rt).spaces=globalThis.Object.values(u(this,fi))),u(this,rt).spaces}get objects(){return u(this,rt).objects==null&&(u(this,rt).objects=globalThis.Object.values(u(this,yi))),u(this,rt).objects}get connections(){return u(this,rt).connections==null&&(u(this,rt).connections=globalThis.Object.values(u(this,mi))),u(this,rt).connections}get floors(){return u(this,rt).floors==null&&(u(this,rt).floors=globalThis.Object.values(u(this,di))),u(this,rt).floors}get doors(){return u(this,rt).doors==null&&(u(this,rt).doors=globalThis.Object.values(u(this,gi))),u(this,rt).doors}get pointsOfInterest(){return u(this,rt).pointsOfInterest==null&&(u(this,rt).pointsOfInterest=globalThis.Object.values(u(this,vi))),u(this,rt).pointsOfInterest}get annotations(){return u(this,rt).annotations==null&&(u(this,rt).annotations=globalThis.Object.values(u(this,bi))),u(this,rt).annotations}get nodes(){return u(this,rt).nodes==null&&(u(this,rt).nodes=globalThis.Object.values(u(this,hi))),u(this,rt).nodes}getById(t,r){switch(t){case"space":return u(this,fi)[r];case"floor":return u(this,di)[r];case"node":return u(this,hi)[r];case"door":return u(this,gi)[r];case"connection":return u(this,mi)[r];case"object":return u(this,yi)[r];case"point-of-interest":return u(this,vi)[r];case"annotation":return u(this,bi)[r];default:throw new Error(`Unknown type: ${t}`)}}getMapDataById(t){var r,i,n,o,a,l,c;return(c=(l=(a=(o=(n=(i=(r=u(this,fi)[t])!=null?r:u(this,di)[t])!=null?i:u(this,hi)[t])!=null?n:u(this,gi)[t])!=null?o:u(this,mi)[t])!=null?a:u(this,yi)[t])!=null?l:u(this,vi)[t])!=null?c:u(this,bi)[t]}getMVFFeatureById(t,r){switch(t){case"space":return u(this,Xo)[r];case"node":return u(this,Vo)[r];case"obstruction":return u(this,Ho)[r];case"map":return u(this,Yo)[r];case"connection":return u(this,Fo)[r];case"entrance":return u(this,Go)[r];case"annotation":return u(this,Ro)[r];default:throw new Error(`Unknown MVF feature type: ${t}`)}}getMVFFeatureByNodeId(t,r){switch(t){case"connection":return u(this,Bo)[r];default:throw new Error(`Unsupported MVF feature type: ${t}`)}}destroy(){for(let t of globalThis.Object.keys(u(this,rt)))u(this,rt)[t]=null}};rt=new WeakMap,hi=new WeakMap,fi=new WeakMap,di=new WeakMap,mi=new WeakMap,yi=new WeakMap,gi=new WeakMap,vi=new WeakMap,bi=new WeakMap,Ro=new WeakMap,Fo=new WeakMap,Bo=new WeakMap,Go=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Xo=new WeakMap,Yo=new WeakMap,s(ah,"MapDataInternal");var ko=ah;f();f();f();f();var sh=class sh{_subscribers={};publish(t,r){!this._subscribers||!this._subscribers[t]||this._subscribers[t].forEach(function(i){typeof i=="function"&&i(r)})}on(t,r){this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(r)}off(t,r){if(!this._subscribers||this._subscribers[t]==null)return;let i=this._subscribers[t].indexOf(r);i!==-1&&this._subscribers[t].splice(i,1)}destroy(){this._subscribers={}}};s(sh,"PubSub");var st=sh;f();f();f();f();var wn=class wn{id;text;__type=wn.__type;static is(t){return t.__type===wn.__type}constructor(t,r){this.id=t,this.text=r}};s(wn,"Label"),v(wn,"__type","Label");var Xr=wn;f();var Tn=class Tn{id;__type=Tn.__type;contentEl;update;static is(t){return t.__type===Tn.__type}constructor(t,r,i){this.id=t,this.contentEl=r,this.update=i}};s(Tn,"Marker"),v(Tn,"__type","Marker");var Ci=Tn;f();var lh=class lh{id;__type;constructor(t){this.id=t,this.__type="Path"}};s(lh,"Path");var jo=lh;f();var Yr,ch=class ch{constructor(t){I(this,Yr,void 0);_(this,Yr,t)}get center(){return u(this,Yr).center}get bearing(){return u(this,Yr).bearing}get pitch(){return u(this,Yr).pitch}get zoomLevel(){return u(this,Yr).zoomLevel}};Yr=new WeakMap,s(ch,"CameraTransform");var zo=ch;f();f();f();var v6=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
5
- <path
6
- fillRule="evenodd"
7
- clipRule="evenodd"
8
- 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"
9
- stroke="none"
10
- />
11
- </svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
12
- <path
13
- 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"
14
- stroke="none"
15
- />
16
- <path
17
- 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"
18
- stroke="none"
19
- />
20
- </svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
21
- <g>
22
- <g clipPath="url(#clip0_499_175492)">
23
- <path
24
- 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"
25
- stroke="none"
26
- fill="#F5F5F5"
27
- />
28
- <path
29
- 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"
30
- fill="none"
31
- />
32
- <path
33
- 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"
34
- fill="#FAFAFA"
35
- />
36
- </g>
37
- <defs>
38
- <clipPath id="clip0_499_175492">
39
- <rect width="64" height="40" fill="white" />
40
- </clipPath>
41
- </defs>
42
- </g>
43
- </svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
44
- <path
45
- stroke="none"
46
- 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"
47
- />
48
- </svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
49
- <path
50
- 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"
51
- stroke="none"
52
- />
53
- </svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
54
- <g stroke="none">
55
- <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" />
56
- <path
57
- fillRule="evenodd"
58
- clipRule="evenodd"
59
- 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"
60
- />
61
- <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" />
62
- </g>
63
- </svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
64
- <path
65
- 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"
66
- stroke="none"
67
- />
68
- </svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
69
- <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" />
70
- <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" />
71
- <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" />
72
- <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" />
73
- </svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
74
- <path
75
- fillRule="evenodd"
76
- clipRule="evenodd"
77
- 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"
78
- stroke="none"
79
- />
80
- </svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
81
- <path
82
- fillRule="evenodd"
83
- clipRule="evenodd"
84
- 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"
85
- stroke="none"
86
- />
87
- </svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
88
- <path
89
- fillRule="evenodd"
90
- clipRule="evenodd"
91
- 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"
92
- stroke="none"
93
- />
94
- </svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
95
- <path
96
- fillRule="evenodd"
97
- clipRule="evenodd"
98
- 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"
99
- stroke="none"
100
- />
101
- </svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
102
- <g stroke="none">
103
- <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" />
104
- <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
105
- <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
106
- <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" />
107
- </g>
108
- </svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
109
- <path
110
- 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"
111
- stroke="none"
112
- />
113
- </svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
114
- <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" />
115
- <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" />
116
- <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" />
117
- <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" />
118
- </svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
119
- <g stroke="none">
120
- <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" />
121
- <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
122
- <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" />
123
- </g>
124
- </svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
125
- <path
126
- 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"
127
- stroke="none"
128
- />
129
- <path
130
- 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"
131
- stroke="none"
132
- />
133
- </svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
134
- <g stroke="none">
135
- <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" />
136
- <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" />
137
- <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
138
- <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
139
- </g>
140
- </svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
141
- <path
142
- 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"
143
- stroke="none"
144
- />
145
- <path
146
- 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"
147
- stroke="none"
148
- />
149
- <path
150
- 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"
151
- stroke="none"
152
- />
153
- </svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
154
- <circle cx="1.9375" cy="4.4375" r="0.9375" />
155
- <circle cx="1.9375" cy="7.5625" r="0.9375" />
156
- <path
157
- fillRule="evenodd"
158
- clipRule="evenodd"
159
- 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"
160
- />
161
- </svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
162
- <g stroke="none">
163
- <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" />
164
- <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" />
165
- </g>
166
- </svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
167
- <g stroke="none">
168
- <path
169
- id="Vector"
170
- 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"
171
- />
172
- </g>
173
- </svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
174
- <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" />
175
- <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" />
176
- <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" />
177
- <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" />
178
- <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" />
179
- </svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
180
- <path
181
- stroke="none"
182
- id="Subtract"
183
- // Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs
184
- fill-rule="evenodd"
185
- clip-rule="evenodd"
186
- 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"
187
- />
188
- </svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
189
- <path
190
- 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"
191
- stroke="none"
192
- />
193
- </svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
194
- <path
195
- 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"
196
- stroke="none"
197
- />
198
- </svg>`]]),b6=/<svg([^>]*)>/g;function A2(e,t,r){let i=v6.get(e);return i?i.replace(b6,`<svg$1 style="fill:${t}; width:${r}px; height:${r}px">`):""}s(A2,"getStyledIcon");var C6=s(e=>`
199
- <div class="pin-shadow" style="background: ${e}"></div>
200
- <svg width="${20*.9}px" height="${48*.9}px" viewBox="0 0 20 48">
201
- <path
202
- 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"
203
- fill={color}
204
- stroke="white"
205
- strokeWidth="2"
206
- />
207
- </svg>
208
- `,"getDeparturePin"),x6=s(e=>`
209
- <div class="pin-shadow" style="background: ${e}"></div>
210
- <svg width="36" height="42" viewBox="-2 -2 40 46">
211
- <path
212
- 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"
213
- fill="none"
214
- stroke="white"
215
- strokeWidth="4"
216
- />
217
- <path
218
- 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"
219
- fill={color}
220
- />
221
- </svg>
222
- `,"getDestinationPin"),uh="#722ED1",ph="#1890FF",hh=s(({type:e="departure",destinationColor:t=uh,departureColor:r=ph})=>`<div class="dropped-pin-wrapper">
223
- ${e==="departure"?C6(r):x6(t)}
224
- </div>`,"DroppedPin"),S6=s(e=>{switch(e){case"default":return 28;case"selection":return 28;case"navigation":return 32}},"getSize"),N2=s(({type:e="stairs",color:t="#722ED1",direction:r="up"})=>{let i=S6("default"),n=i/2+2;return`<div style="position: relative; width: 56px;" class="mappedin-connection-marker">
225
- ${r!=null?`<div style="position: absolute; top: 0px; left:${i*.9}px; zIndex: -1">
226
- <div class="bouncey">
227
- <div class="connection-circle"
228
- role="button"
229
- style="background: #595959; width: ${i}px; height: ${i}px;">
230
- <div class="${r==="up"?"":"arrow--down"}">
231
- <svg viewBox="0 0 16 16" style="fill: white; width: ${n}px; height: ${n}px">
232
- <path
233
- fillRule="evenodd"
234
- clipRule="evenodd"
235
- 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"
236
- stroke="none"
237
- />
238
- </svg>
239
- </div>
240
- </div>
241
- </div>
242
- </div>`:""}
243
- <div class="connection-circle"
244
- role="button"
245
- style="background:${t}; width:${i}px; height:${i}px;"
246
- >
247
- ${A2("connection-"+e+"-16x16","white",n)||""}
248
- </div>
249
- </div>`},"ConnectionMarker");f();var fh=s(async e=>new Promise(t=>setTimeout(t,e)),"ms");var ml={createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:{color:"#40A9FF",nearRadius:.25,farRadius:.25*4,displayArrowsOnPath:!1},polygons:{departure:"#40A9FF"}},lr,cr,xi,Xt,jr,gl,k2,Uo,dh=class dh{constructor(t){I(this,gl);I(this,lr,void 0);I(this,cr,new Map);I(this,xi,void 0);I(this,Xt,void 0);I(this,jr,ml);v(this,"draw",async(t,r={})=>{var l,c,h;if(t.coordinates.length<2){Y.warn("Directions must have at least 2 coordinates");return}u(this,lr)&&this.clear();let i={pathOptions:{...ml.pathOptions,...r.pathOptions},createMarkers:{...ml.createMarkers,...r.createMarkers},polygons:{...ml.polygons,...r.polygons}};_(this,jr,i),_(this,lr,t);let n=t.coordinates[0],o=t.coordinates[t.coordinates.length-1],a=u(this,Xt).getMapData()[Object.keys(u(this,Xt).getMapData())[0]];if(n.floorId&&u(this,Xt).setFloor(a.getById("floor",n.floorId)),(l=u(this,jr).createMarkers)!=null&&l.departure){let d=u(this,Xt).Markers.add(n,hh({type:"departure"}),{anchor:"top",rank:"always-visible"});u(this,cr).set(d,void 0)}if(await fh(500),!!u(this,lr)&&(_(this,xi,u(this,Xt).Paths.add(t.coordinates,u(this,jr).pathOptions)),await fh(1e3),!!u(this,lr))){if((c=u(this,jr).createMarkers)!=null&&c.destination){let d=u(this,Xt).Markers.add(o,hh({type:"destination"}),{anchor:"top",rank:"always-visible"});u(this,cr).set(d,void 0)}(h=u(this,jr).createMarkers)!=null&&h.connection&&(t.instructions.filter(m=>j(this,gl,k2).call(this,m.action)).forEach(m=>{let y=u(this,Xt).Markers.add(m.coordinate,N2({type:m.action.connectionType,color:m.action.type==="ExitConnection"?ph:uh,direction:m.action.direction}),{interactive:!0,anchor:"top",rank:"always-visible"});u(this,cr).set(y,m)}),u(this,Xt).on("click",u(this,Uo)))}});I(this,Uo,s(t=>{if(t.markers.length>0){let r=u(this,cr).get(t.markers[0]);r!=null&&r.action.toFloor&&u(this,Xt).setFloor(r.action.toFloor)}},"#handleClick"));v(this,"clear",()=>{u(this,lr)&&(u(this,cr).forEach((t,r)=>{u(this,Xt).Markers.remove(r)}),u(this,cr).clear(),u(this,xi)&&(u(this,Xt).Paths.remove(u(this,xi)),_(this,xi,void 0)),u(this,Xt).off("click",u(this,Uo)),_(this,lr,void 0))});_(this,Xt,t)}};lr=new WeakMap,cr=new WeakMap,xi=new WeakMap,Xt=new WeakMap,jr=new WeakMap,gl=new WeakSet,k2=s(function(t){return t!=null&&["TakeConnection","ExitConnection"].includes(t.type)},"#isVortexAction"),Uo=new WeakMap,s(dh,"Navigation");var yl=dh;f();f();f();var P6=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
250
- <path
251
- fillRule="evenodd"
252
- clipRule="evenodd"
253
- 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"
254
- stroke="none"
255
- />
256
- </svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
257
- <path
258
- 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"
259
- stroke="none"
260
- />
261
- <path
262
- 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"
263
- stroke="none"
264
- />
265
- </svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
266
- <g>
267
- <g clipPath="url(#clip0_499_175492)">
268
- <path
269
- 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"
270
- stroke="none"
271
- fill="#F5F5F5"
272
- />
273
- <path
274
- 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"
275
- fill="none"
276
- />
277
- <path
278
- 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"
279
- fill="#FAFAFA"
280
- />
281
- </g>
282
- <defs>
283
- <clipPath id="clip0_499_175492">
284
- <rect width="64" height="40" fill="white" />
285
- </clipPath>
286
- </defs>
287
- </g>
288
- </svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
289
- <path
290
- stroke="none"
291
- 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"
292
- />
293
- </svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
294
- <path
295
- 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"
296
- stroke="none"
297
- />
298
- </svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
299
- <g stroke="none">
300
- <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" />
301
- <path
302
- fillRule="evenodd"
303
- clipRule="evenodd"
304
- 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"
305
- />
306
- <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" />
307
- </g>
308
- </svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
309
- <path
310
- 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"
311
- stroke="none"
312
- />
313
- </svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
314
- <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" />
315
- <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" />
316
- <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" />
317
- <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" />
318
- </svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
319
- <path
320
- fillRule="evenodd"
321
- clipRule="evenodd"
322
- 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"
323
- stroke="none"
324
- />
325
- </svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
326
- <path
327
- fillRule="evenodd"
328
- clipRule="evenodd"
329
- 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"
330
- stroke="none"
331
- />
332
- </svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
333
- <path
334
- fillRule="evenodd"
335
- clipRule="evenodd"
336
- 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"
337
- stroke="none"
338
- />
339
- </svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
340
- <path
341
- fillRule="evenodd"
342
- clipRule="evenodd"
343
- 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"
344
- stroke="none"
345
- />
346
- </svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
347
- <g stroke="none">
348
- <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" />
349
- <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
350
- <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
351
- <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" />
352
- </g>
353
- </svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
354
- <path
355
- 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"
356
- stroke="none"
357
- />
358
- </svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
359
- <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" />
360
- <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" />
361
- <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" />
362
- <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" />
363
- </svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
364
- <g stroke="none">
365
- <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" />
366
- <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
367
- <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" />
368
- </g>
369
- </svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
370
- <path
371
- 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"
372
- stroke="none"
373
- />
374
- <path
375
- 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"
376
- stroke="none"
377
- />
378
- </svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
379
- <g stroke="none">
380
- <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" />
381
- <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" />
382
- <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
383
- <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
384
- </g>
385
- </svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
386
- <path
387
- 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"
388
- stroke="none"
389
- />
390
- <path
391
- 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"
392
- stroke="none"
393
- />
394
- <path
395
- 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"
396
- stroke="none"
397
- />
398
- </svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
399
- <circle cx="1.9375" cy="4.4375" r="0.9375" />
400
- <circle cx="1.9375" cy="7.5625" r="0.9375" />
401
- <path
402
- fillRule="evenodd"
403
- clipRule="evenodd"
404
- 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"
405
- />
406
- </svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
407
- <g stroke="none">
408
- <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" />
409
- <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" />
410
- </g>
411
- </svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
412
- <g stroke="none">
413
- <path
414
- id="Vector"
415
- 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"
416
- />
417
- </g>
418
- </svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
419
- <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" />
420
- <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" />
421
- <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" />
422
- <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" />
423
- <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" />
424
- </svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
425
- <path
426
- stroke="none"
427
- id="Subtract"
428
- fill-rule="evenodd"
429
- clip-rule="evenodd"
430
- 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"
431
- />
432
- </svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
433
- <path
434
- 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"
435
- stroke="none"
436
- />
437
- </svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
438
- <path
439
- 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"
440
- stroke="none"
441
- />
442
- </svg>`]]),M6=/<svg([^>]*)>/g;function R2(e,t,r){let i=P6.get(e);return i?i.replace(M6,`<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:${t}; width:${r}px; height:${r}px">`):""}s(R2,"getStyledIcon");var Si,In,Wo,mh,bl,F2,Cl,B2,Zo,yh,xl,G2,gh=class gh{constructor(t,r){I(this,Wo);I(this,bl);I(this,Cl);I(this,Zo);I(this,xl);I(this,Si,void 0);I(this,In,void 0);v(this,"colors",{default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F"});_(this,Si,t),_(this,In,r)}auto(){let t=u(this,In)[Object.keys(u(this,In))[0]];[...t.getByType("connection"),...t.getByType("point-of-interest"),...t.getByType("space")].forEach(r=>{r.__type==="connection"?r.coordinates.forEach(i=>{u(this,Si).Labels.add(i,r.name,j(this,Wo,mh).call(this,r))}):(r.__type==="space"&&r.name!==""&&u(this,Si).updateState(r,{interactive:!0,hoverColor:"#F0F0F0"}),u(this,Si).Labels.add(r,r.name,j(this,Wo,mh).call(this,r)))})}};Si=new WeakMap,In=new WeakMap,Wo=new WeakSet,mh=s(function(t){let r=R2(j(this,bl,F2).call(this,t),"white",12);return{appearance:{text:{foregroundColor:j(this,Zo,yh).call(this,t)},marker:{foregroundColor:{active:j(this,Zo,yh).call(this,t)},icon:r,iconSize:12}},interactive:!0,rank:j(this,xl,G2).call(this,t)}},"#generatLabelAppearance"),bl=new WeakSet,F2=s(function(t){return t.__type==="connection"?j(this,Cl,B2).call(this,t.type):t.name.includes("Washroom")?"washroom-14x14":t.__type==="point-of-interest"?"point-of-interest-12x12":""},"#getIconName"),Cl=new WeakSet,B2=s(function(t){let r="";switch(t){case"elevator":r="connection-elevator-12x12";break;case"escalator":r="connection-escalator-12x12";break;case"stairs":r="connection-stairs-12x12";break}return r},"#attemptIconNameForConnection"),Zo=new WeakSet,yh=s(function(t){return t.__type==="connection"?this.colors.connection:t.__type==="point-of-interest"?this.colors.point:"name"in t&&t.name.includes("Washroom")?this.colors.washroom:this.colors.default},"#getLabelColor"),xl=new WeakSet,G2=s(function(t){return t.__type==="connection"?"high":(t.__type==="point-of-interest","medium")},"#getDefaultLabelRank"),s(gh,"Labels");var vl=gh;var vh=class vh{Labels;constructor(t,r){this.Labels=new vl(t,r)}auto=()=>{this.Labels.auto()}};s(vh,"DefaultTheme");var Sl=vh;f();var St,bh=class bh{constructor(t){I(this,St,void 0);v(this,"setMinZoomLevel",t=>{u(this,St).camera.setMinZoomLevel(t)});v(this,"setMaxZoomLevel",t=>{u(this,St).camera.setMaxZoomLevel(t)});_(this,St,t)}setScreenOffsets(t){u(this,St).camera.setInsetPadding(t)}focusOn(t,r){var o;let i=[],n=Array.isArray(t)?t:[t];for(let a of n)if(Br.is(a)){let l;for(l of a.coordinates)i.push([l.longitude,l.latitude])}else{let l=Rr(a);if(l){let c=0;l.floorId&&(c=((o=u(this,St).getState(l.floorId))==null?void 0:o.altitude)||0),i.push([l.longitude,l.latitude,c])}}return u(this,St).camera.focusOn(i,{pitch:r==null?void 0:r.pitch,bearing:r==null?void 0:r.bearing,padding:r==null?void 0:r.screenOffsets,maxZoomLevel:r==null?void 0:r.maxZoomLevel,minZoomLevel:r==null?void 0:r.minZoomLevel,duration:r==null?void 0:r.duration,updateZoomLimits:!1,easing:r==null?void 0:r.easing})}animateTo(t,r){var h;let{center:i,zoomLevel:n,bearing:o,pitch:a}=t,l=i!=null?i:this.center,c=[l.longitude,l.latitude];return u(this,St).camera.animateTo({center:c,zoomLevel:n!=null?n:this.zoomLevel,bearing:o!=null?o:this.bearing,pitch:a!=null?a:this.pitch,duration:(h=r==null?void 0:r.duration)!=null?h:600,easing:r==null?void 0:r.easing})}set(t){let{center:r=this.center,zoomLevel:i=this.zoomLevel,bearing:n=this.bearing,pitch:o=this.pitch}=t,a=[r.longitude,r.latitude];u(this,St).camera.setCenter(a),u(this,St).camera.setZoomLevel(i),u(this,St).camera.setBearing(n),u(this,St).camera.setPitch(o)}get center(){let t=u(this,St).camera.center;return new $(t[1],t[0],void 0)}get zoomLevel(){return u(this,St).camera.zoomLevel}get pitch(){return u(this,St).camera.pitch}get bearing(){let t=u(this,St).camera.bearing;return(t<0?t+360:t)%360}get minZoomLevel(){return u(this,St).camera.minZoomLevel}get maxZoomLevel(){return u(this,St).camera.maxZoomLevel}};St=new WeakMap,s(bh,"Camera");var qo=bh;f();f();f();f();f();f();f();f();function Ch(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return V2(this.cover(t,r),t,r,e)}s(Ch,"default");function V2(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,o=e._root,a={data:i},l=e._x0,c=e._y0,h=e._x1,d=e._y1,m,y,x,S,P,g,C,M;if(!o)return e._root=a,e;for(;o.length;)if((P=t>=(m=(l+h)/2))?l=m:h=m,(g=r>=(y=(c+d)/2))?c=y:d=y,n=o,!(o=o[C=g<<1|P]))return n[C]=a,e;if(x=+e._x.call(null,o.data),S=+e._y.call(null,o.data),t===x&&r===S)return a.next=o,n?n[C]=a:e._root=a,e;do n=n?n[C]=new Array(4):e._root=new Array(4),(P=t>=(m=(l+h)/2))?l=m:h=m,(g=r>=(y=(c+d)/2))?c=y:d=y;while((C=g<<1|P)===(M=(S>=y)<<1|x>=m));return n[M]=o,n[C]=a,e}s(V2,"add");function H2(e){var t,r,i=e.length,n,o,a=new Array(i),l=new Array(i),c=1/0,h=1/0,d=-1/0,m=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,l[r]=o,n<c&&(c=n),n>d&&(d=n),o<h&&(h=o),o>m&&(m=o));if(c>d||h>m)return this;for(this.cover(c,h).cover(d,m),r=0;r<i;++r)V2(this,a[r],l[r],e[r]);return this}s(H2,"addAll");f();function xh(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,i=this._y0,n=this._x1,o=this._y1;if(isNaN(r))n=(r=Math.floor(e))+1,o=(i=Math.floor(t))+1;else{for(var a=n-r||1,l=this._root,c,h;r>e||e>=n||i>t||t>=o;)switch(h=(t<i)<<1|e<r,c=new Array(4),c[h]=l,l=c,a*=2,h){case 0:n=r+a,o=i+a;break;case 1:r=n-a,o=i+a;break;case 2:n=r+a,i=o-a;break;case 3:r=n-a,i=o-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=i,this._x1=n,this._y1=o,this}s(xh,"default");f();function Sh(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}s(Sh,"default");f();function Ph(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]]}s(Ph,"default");f();f();function Et(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}s(Et,"default");function Mh(e,t,r){var i,n=this._x0,o=this._y0,a,l,c,h,d=this._x1,m=this._y1,y=[],x=this._root,S,P;for(x&&y.push(new Et(x,n,o,d,m)),r==null?r=1/0:(n=e-r,o=t-r,d=e+r,m=t+r,r*=r);S=y.pop();)if(!(!(x=S.node)||(a=S.x0)>d||(l=S.y0)>m||(c=S.x1)<n||(h=S.y1)<o))if(x.length){var g=(a+c)/2,C=(l+h)/2;y.push(new Et(x[3],g,C,c,h),new Et(x[2],a,C,g,h),new Et(x[1],g,l,c,C),new Et(x[0],a,l,g,C)),(P=(t>=C)<<1|e>=g)&&(S=y[y.length-1],y[y.length-1]=y[y.length-1-P],y[y.length-1-P]=S)}else{var M=e-+this._x.call(null,x.data),T=t-+this._y.call(null,x.data),w=M*M+T*T;if(w<r){var E=Math.sqrt(r=w);n=e-E,o=t-E,d=e+E,m=t+E,i=x.data}}return i}s(Mh,"default");f();function wh(e){if(isNaN(d=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e)))return this;var t,r=this._root,i,n,o,a=this._x0,l=this._y0,c=this._x1,h=this._y1,d,m,y,x,S,P,g,C;if(!r)return this;if(r.length)for(;;){if((S=d>=(y=(a+c)/2))?a=y:c=y,(P=m>=(x=(l+h)/2))?l=x:h=x,t=r,!(r=r[g=P<<1|S]))return this;if(!r.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(i=t,C=g)}for(;r.data!==e;)if(n=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,n?(o?n.next=o:delete n.next,this):t?(o?t[g]=o:delete t[g],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(i?i[C]=r:this._root=r),this):(this._root=o,this)}s(wh,"default");function X2(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}s(X2,"removeAll");f();function Th(){return this._root}s(Th,"default");f();function Ih(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}s(Ih,"default");f();function Eh(e){var t=[],r,i=this._root,n,o,a,l,c;for(i&&t.push(new Et(i,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(i=r.node,o=r.x0,a=r.y0,l=r.x1,c=r.y1)&&i.length){var h=(o+l)/2,d=(a+c)/2;(n=i[3])&&t.push(new Et(n,h,d,l,c)),(n=i[2])&&t.push(new Et(n,o,d,h,c)),(n=i[1])&&t.push(new Et(n,h,a,l,d)),(n=i[0])&&t.push(new Et(n,o,a,h,d))}return this}s(Eh,"default");f();function _h(e){var t=[],r=[],i;for(this._root&&t.push(new Et(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var n=i.node;if(n.length){var o,a=i.x0,l=i.y0,c=i.x1,h=i.y1,d=(a+c)/2,m=(l+h)/2;(o=n[0])&&t.push(new Et(o,a,l,d,m)),(o=n[1])&&t.push(new Et(o,d,l,c,m)),(o=n[2])&&t.push(new Et(o,a,m,d,h)),(o=n[3])&&t.push(new Et(o,d,m,c,h))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}s(_h,"default");f();function Y2(e){return e[0]}s(Y2,"defaultX");function Lh(e){return arguments.length?(this._x=e,this):this._x}s(Lh,"default");f();function j2(e){return e[1]}s(j2,"defaultY");function Oh(e){return arguments.length?(this._y=e,this):this._y}s(Oh,"default");function $o(e,t,r){var i=new Dh(t==null?Y2:t,r==null?j2:r,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}s($o,"quadtree");function Dh(e,t,r,i,n,o){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=o,this._root=void 0}s(Dh,"Quadtree");function z2(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}s(z2,"leaf_copy");var Ut=$o.prototype=Dh.prototype;Ut.copy=function(){var e=new Dh(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,i;if(!t)return e;if(!t.length)return e._root=z2(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var n=0;n<4;++n)(i=t.source[n])&&(i.length?r.push({source:i,target:t.target[n]=new Array(4)}):t.target[n]=z2(i));return e};Ut.add=Ch;Ut.addAll=H2;Ut.cover=xh;Ut.data=Sh;Ut.extent=Ph;Ut.find=Mh;Ut.remove=wh;Ut.removeAll=X2;Ut.root=Th;Ut.size=Ih;Ut.visit=Eh;Ut.visitAfter=_h;Ut.x=Lh;Ut.y=Oh;f();f();var Ah=class Ah{origin;destination;distance;angle;weight;constructor({origin:t,destination:r,distance:i=0,angle:n=0,pathWeight:o=0}){this.origin=t,this.destination=r,this.distance=i,this.angle=n;let a=o||0;if(this.weight=a>=0?this.distance+a:0,isNaN(this.angle))throw new Error("nan angle")}};s(Ah,"Edge");var Pi=Ah;f();f();f();f();function En([e,t],[r,i]){let n=t-i,o=e-r;return(Math.atan2(o,n)+Math.PI*3)%(Math.PI*2)}s(En,"getAngle");f();var w6=63710088e-1;function Mi(e,t){let[r,i]=e.map(d=>d*Math.PI/180),[n,o]=t.map(d=>d*Math.PI/180),a=o-i,l=n-r,c=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),h=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return w6*h}s(Mi,"getDistance");f();f();function Pl(e,t,r,i){let[n,o]=e,[a,l]=t,[c,h]=r,[d,m]=i;if(o===l&&n===a||h===m&&c===d)return null;let y=(d-c)*(l-o)-(m-h)*(a-n);if(y===0)return null;let x=((m-h)*(n-c)-(d-c)*(o-h))/y,S=((l-o)*(n-c)-(a-n)*(o-h))/y;if(x<0||x>1||S<0||S>1)return null;let P=o+x*(l-o);return[n+x*(a-n),P]}s(Pl,"getLineIntersection");f();function Nh(e,t,r){if(e[1]===t[1])return[[e[0],e[1]+r],[t[0],t[1]+r]];if(e[0]===t[0])return[[e[0]+r,e[1]],[t[0]+r,t[1]]];let n=-1/((t[1]-e[1])/(t[0]-e[0])),o=r*Math.sqrt(1/(1+n*n)),a=n*o;return[[e[0]+a,e[1]+o],[t[0]+a,t[1]+o]]}s(Nh,"getOffsetLine");function U2(e,t,r=[],i=0){let n=!0;return r.forEach(o=>{let a=e.geometry.coordinates,l=t.geometry.coordinates;if(i>0){let c=Nh(a,l,-i),h=Nh(a,l,i);if(Pl(c[0],c[1],o[0],o[1])||Pl(h[0],h[1],o[0],o[1])){n=!1;return}}else if(Pl(a,l,o[0],o[1])){n=!1;return}}),n}s(U2,"hasLineOfSight");f();var T6=63710088e-1;function W2(e,t){let r=1/T6,i=t*Math.PI/180;return e*r*(180/Math.PI)/Math.cos(i)}s(W2,"metersToDegreesLongitude");var kh=class kh{edges;nodesById;nodesByGroup=new Map;constructor({nodes:t,groupBy:r}){this.edges={};let{features:i}=t;this.nodesById=i.reduce((n,o)=>(n[o.properties.id]=o,n),{});for(let n in this.nodesById)this.nodesById.hasOwnProperty(n)&&(this.nodesById[n].properties.neighbors=this.nodesById[n].properties.neighbors.filter(({id:o})=>!!this.nodesById[o]));i.forEach(n=>{let o=r==="default"?r:n.properties[r];this.nodesByGroup.has(o)||this.nodesByGroup.set(o,[]),this.nodesByGroup.get(o).push(n),this.edges[n.properties.id]=n.properties.neighbors.map(({id:a,weight:l})=>{let c=this.nodesById[a];return new Pi({origin:n,destination:c,distance:Mi(n.geometry.coordinates,c.geometry.coordinates),angle:En(n.geometry.coordinates,c.geometry.coordinates),pathWeight:l})})})}aStar({originIds:t,destinationNodeIds:r,excludedNodeIds:i}){let n=t.map(h=>this.nodesById[h]).filter(h=>h),o=r.map(h=>this.nodesById[h]).filter(h=>h);if(n.length===0||o.length===0)return[];let a=[],l={},c={};for(n.forEach(h=>{let d=this.getShortestEuclideanDistance(h,o);a.push({origin:h,priority:d}),l[h.properties.id]=null,c[h.properties.id]=0}),a.sort((h,d)=>h.priority-d.priority);a.length>0;){let h=a[0];if(o.includes(h.origin)){let d=[],m=l[h.origin.properties.id];for(;m!=null;){d.push(m);let y=l[m.origin.properties.id];y!=null?m=y:m=null}return d.reverse()}for(let d of this.edges[h.origin.properties.id]){if(i&&i.has(d.destination.properties.id))continue;let m=c[h.origin.properties.id]+d.weight;if(c[d.destination.properties.id]==null||m<c[d.destination.properties.id]){c[d.destination.properties.id]=m;let y=m+this.getShortestEuclideanDistance(d.destination,o);a.push({origin:d.destination,priority:y}),l[d.destination.properties.id]=d}}a.splice(0,1),a.sort((d,m)=>d.priority-m.priority)}return[]}getShortestEuclideanDistance(t,r){return r.reduce((i,n)=>{let o=Mi(t.geometry.coordinates,n.geometry.coordinates);return Math.min(i,o)},Number.MAX_VALUE)}};s(kh,"NavigationGraph");var Ml=kh;var I6=.75,Rh=class Rh{groupBy;graph;geometryEdgesByMapId=new Map;cache={nodeTreesByGroup:new Map};constructor({nodes:t,obstructions:r,groupBy:i="default"}){this.groupBy=i,this.graph=new Ml({nodes:t,groupBy:this.groupBy}),r&&r.features.forEach(n=>{let o=n.geometry.coordinates.length===1?n.geometry.coordinates[0]:n.geometry.coordinates,a=this.groupBy==="default"?this.groupBy:n.properties[this.groupBy];this.geometryEdgesByMapId.has(a)||this.geometryEdgesByMapId.set(a,[]),o.forEach((l,c)=>{this.geometryEdgesByMapId.get(a).push([l,o[c+1]||o[0]])})})}findNearestNode=t=>{var n;let r=this.groupBy==="default"?this.groupBy:t.properties[this.groupBy];if(!this.cache.nodeTreesByGroup.has(r)){let o=(n=this.graph.nodesByGroup.get(r))!=null?n:[],a=$o();a.x(l=>l.geometry.coordinates[1]),a.y(l=>l.geometry.coordinates[0]),a.addAll(o),this.cache.nodeTreesByGroup.set(r,a)}return this.cache.nodeTreesByGroup.get(r).find(t.geometry.coordinates[1],t.geometry.coordinates[0])||null};getDirections({originIds:t,destinationNodeIds:r,excludedNodeIds:i,simplify:n}){var l,c;let o=(l=n==null?void 0:n.enabled)!=null?l:!0,a=this.graph.aStar({originIds:t,destinationNodeIds:r,excludedNodeIds:new Set(i)});if(a.length===0)return{type:"FeatureCollection",features:[]};if(o){let h=W2((c=n==null?void 0:n.bufferRadius)!=null?c:I6,a[0].origin.geometry.coordinates[1]);a=this.simplifyAllSteps(a,h)}return this.generatePath(a)}generatePath=t=>{let{destination:r}=t[t.length-1],i={type:"FeatureCollection",features:[]};for(let o=0;o<t.length;o++){let{origin:a}=t[o],l={id:a.properties.id,angle:t[o].angle,distance:t[o].distance};this.groupBy!=="default"&&(l.groupBy=a.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[a.geometry.coordinates[0],a.geometry.coordinates[1]]},properties:l})}let n={id:r.properties.id};return this.groupBy!=="default"&&(n.groupBy=r.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[r.geometry.coordinates[0],r.geometry.coordinates[1]]},properties:n}),i};simplifyAllSteps(t,r){var c,h;let i=[],n=[t[0]];for(let d=1;d<t.length;d++){if(this.groupBy!=="default"&&t[d].origin.properties[this.groupBy]!==t[d-1].origin.properties[this.groupBy]){let m=t[d-1].origin.properties[this.groupBy],y=(c=this.geometryEdgesByMapId.get(m))!=null?c:[];i.push(...this.simplifySteps(n,y,r)),n=[t[d]]}n.push(t[d])}let o=t[t.length-1],a=this.groupBy==="default"?this.groupBy:o.origin.properties[this.groupBy],l=(h=this.geometryEdgesByMapId.get(a))!=null?h:[];return i.push(...this.simplifySteps(n,l,r)),i}simplifySteps(t,r,i){if(t.length<3)return t;let n=[t[0]],o=1;for(let a=o+2;a<t.length;a++)if(!U2(t[o].origin,t[a].origin,r,i)){let l=a-1;n.push(new Pi({...t[o],destination:t[l].origin,distance:Mi(t[o].origin.geometry.coordinates,t[l].origin.geometry.coordinates),angle:En(t[o].origin.geometry.coordinates,t[l].origin.geometry.coordinates)})),o=l}return n.push(new Pi({...t[o],destination:t[t.length-1].origin,distance:Mi(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates),angle:En(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates)}),t[t.length-1]),n}getDistance=(t,r)=>Mi(t,r);getAngle=(t,r)=>En(t,r)};s(Rh,"Navigator");var Jo=Rh;f();function _n(e){return[e.longitude,e.latitude]}s(_n,"convertCoordinateToPosition");function E6(e){return new Map(e.map(t=>{let{properties:r}=t,{id:i}=r;return[i,t]}))}s(E6,"getEntranceMap");var Fh=s((e,t)=>{let r=E6(t),i={type:"Feature",properties:{},geometry:{type:"MultiLineString",coordinates:[]}};for(let n of e){let o=[n.geometry.coordinates],a=(n.properties.entrances||[]).reduce((l,c)=>(r.has(c)&&l.push(r.get(c)),l),[]);a.length&&(o=Yp(n,a).map(l=>l.geometry.coordinates)),i.geometry.coordinates.push(...o)}return i},"cutEntracesFromLineStrings");function Z2(e,t){let r={options:{}};if(!r.options)throw new Error("options should exist");return e.appearance&&(r.options.appearance=e.appearance),e.rank!=null&&(e.rank==="initial"?r.options.rank=t.initialRank||2:r.options.rank=e.rank),e.enabled!==void 0&&(r.enabled=e.enabled),e.interactive!==null&&(r.options.interactive=e.interactive),r}s(Z2,"translateLabelStateToGeojsonCore");function q2(e,t){let r={options:{}};if(!r.options)throw new Error("options should exist");return e.rank!=null&&(e.rank==="initial"?r.options.rank=t.initialRank||2:r.options.rank=e.rank),e.enabled!==void 0&&(r.enabled=e.enabled),e.interactive!==null&&(r.options.interactive=e.interactive),r}s(q2,"translateMarkerStateToGeojsonCore");function $2(e,t){let r={};return t==null||(e.color&&(e.color==="initial"?r.color=t.initialColor:r.color=e.color),e.hoverColor&&(r.hoverColor=e.hoverColor),e.interactive!==void 0&&(r.interactive=e.interactive)),r}s($2,"translateSpaceStateToGeojsonCore");function J2(e,t){return((t-e+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}s(J2,"differenceBetweenAngles");function K2(e,t){let r="Left";return e<=-Math.PI/4?r="Right":e<=-t?r="SlightRight":e<=t?r="Straight":e<=Math.PI/4?r="SlightLeft":r="Left",r}s(K2,"getRelativeBearing");function Q2(e){let t={};for(let r in e){let i=e[r];if(i!=null){if("polygons"in i)for(let n of i.polygons)t[n]=i;else if("lineStrings"in i)for(let n of i.lineStrings)t[n]=i;else if("points"in i)for(let n of i.points)t[n]=i}}return t}s(Q2,"extractStyleMap");function Bh(e,t){return e.reduce((r,i)=>{let n=t[i.properties.id];return n==null||(r.has(n)||r.set(n,[]),r.get(n).push(i)),r},new Map)}s(Bh,"groupGeometryByStyle");var tv=Math.PI*.1,Wt,Xe,fe,Il,ev,Ko,Gh,El,rv,Vh=class Vh{constructor(t,r){I(this,Il);I(this,Ko);I(this,El);I(this,Wt,{});I(this,Xe,void 0);I(this,fe,void 0);_(this,Xe,r),_(this,fe,t.features),_(this,Xe,r),_(this,fe,t.features)}get coordinates(){return u(this,Wt).coordinates?u(this,Wt).coordinates:(u(this,Wt).coordinates=u(this,fe).map(t=>new $(t.geometry.coordinates[1],t.geometry.coordinates[0],t.properties.groupBy)),u(this,Wt).coordinates)}get distance(){return u(this,Wt).distance?u(this,Wt).distance:(u(this,Wt).distance=u(this,fe).reduce((t,r)=>t+(r.properties.distance||0),0),u(this,Wt).distance)}get instructions(){if(u(this,fe).length<2)return[];if(u(this,Wt).instructions)return u(this,Wt).instructions;let t=[],r=0;for(let i=0;i<u(this,fe).length;i++){let n=u(this,fe)[i],o=u(this,fe)[i-1],a=u(this,fe)[i+1],l=new $(n.geometry.coordinates[1],n.geometry.coordinates[0],n.properties.groupBy),c=j(this,Il,ev).call(this,{prevDirection:o,direction:n,nextDirection:a});r+=(o==null?void 0:o.properties.distance)||0;for(let h of c)h&&(t.push({action:h,distance:r,coordinate:l}),r=0)}return u(this,Wt).instructions=t,u(this,Wt).instructions}};Wt=new WeakMap,Xe=new WeakMap,fe=new WeakMap,Il=new WeakSet,ev=s(function(t){let{prevDirection:r,direction:i,nextDirection:n}=t,o=r&&u(this,Xe).getById("floor",r.properties.groupBy),a=u(this,Xe).getById("floor",i.properties.groupBy),l=n&&u(this,Xe).getById("floor",n.properties.groupBy),c=[];if(r||c.push({type:"Departure"}),l&&a.id!==l.id){let h=u(this,Xe).getMVFFeatureByNodeId("connection",i.properties.id);c.push(j(this,Ko,Gh).call(this,"TakeConnection",a,l,h==null?void 0:h.type))}else if(o&&o.id!==a.id){let h=u(this,Xe).getMVFFeatureByNodeId("connection",i.properties.id);c.push(j(this,Ko,Gh).call(this,"ExitConnection",a,o,h==null?void 0:h.type))}else c.push(j(this,El,rv).call(this,r,i));return n||c.push({type:"Arrival"}),c},"#getActions"),Ko=new WeakSet,Gh=s(function(t,r,i,n){let o=r.elevation-i.elevation,a="none";return o>0?a="down":o<0&&(a="up"),{type:t,fromFloor:r,toFloor:i,direction:a,connectionType:n!=null?n:"stairs"}},"#createConnectionAction"),El=new WeakSet,rv=s(function(t,r){let i=t?-J2(t.properties.angle,r.properties.angle):0;return Math.abs(i)>=tv?{type:"Turn",bearing:K2(i,tv),referencePosition:"At"}:null},"#createTurnAction"),s(Vh,"Directions");var wl=Vh,Hh=class Hh{navigator;connections;constructor({nodes:t,obstructions:r,connections:i,groupBy:n}){this.navigator=new Jo({nodes:t,obstructions:this.createObstructionCollection(r),groupBy:n}),this.connections=i}getDirections=(t,r,i,n)=>{let{accessible:o,smoothing:{enabled:a,radius:l}}=i,c=t.flatMap(x=>this.getNodesFromTarget(x,n)),h=r.flatMap(x=>this.getNodesFromTarget(x,n)),d=this.getExcludedNodeIds(o).filter(x=>!c.includes(x)&&!h.includes(x)),m=this.navigator.getDirections({originIds:c,destinationNodeIds:h,excludedNodeIds:d,simplify:{enabled:a,bufferRadius:l}});this.addCoordinateDirections(m,t,r);let y=new wl(m,n);if(!(y.distance===0&&new Set([...c,...h]).size===c.length+h.length))return y};getExcludedNodeIds=t=>t?this.connections.reduce((r,i)=>i.accessible?r:r.concat(i.nodes),[]):[];addCoordinateDirections=(t,[r],[i])=>{if(t.features.length){if($.is(r)){let n=this.createDirectionFeature(r,this.navigator.getAngle([r.longitude,r.latitude],t.features[0].geometry.coordinates),this.navigator.getDistance([r.longitude,r.latitude],t.features[0].geometry.coordinates));t.features.splice(0,0,n)}if($.is(i)){let n=this.createDirectionFeature(i,0,0),o=t.features[t.features.length-1];o.properties.distance=this.navigator.getDistance(o.geometry.coordinates,[i.longitude,i.latitude]),o.properties.angle=this.navigator.getAngle(o.geometry.coordinates,[i.longitude,i.latitude]),t.features.push(n)}}};getNodesFromTarget=(t,r)=>{if($.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t));return i?[i.properties.id]:[]}else if(Fr.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.coordinate));return i?[i.properties.id]:[]}else if(Nr.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.center));return i?[i.properties.id]:[]}else if(Me.is(t)){let i=r==null?void 0:r.getMVFFeatureById("space",t.id);return i==null?[]:i.properties.destinationNodes}else{if(Br.is(t))return t.coordinates.reduce((i,n)=>{let o=this.navigator.findNearestNode(this.createCoordinateFeature(n));return o&&i.push(o.properties.id),i},[]);if(we.is(t)){let i=r==null?void 0:r.objectEntranceNodeIdsByObstructionId[t.id];return i!=null?i:[]}else return[]}};createObstructionCollection(t){return{type:"FeatureCollection",features:Object.entries(t).reduce((r,[i,n])=>r.concat(n.features.map(o=>(o.properties.map=i,o))),[])}}createCoordinateFeature=t=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{map:t.floorId}});createDirectionFeature=(t,r,i)=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{groupBy:t.floorId,id:t.id,angle:r,distance:i}})};s(Hh,"DirectionsInternal");var Tl=Hh;f();var Ln,Xh=class Xh{constructor({currentMapGetter:t}){I(this,Ln,void 0);_(this,Ln,t)}get currentMap(){return u(this,Ln).call(this)}async getCurrentSceneGLTF(t){let r=u(this,Ln).call(this);return r?r==null?void 0:r.Exporter.getCurrentSceneGLTF(t):(Y.error("There is no map to export. Please load a map first."),new Blob)}};Ln=new WeakMap,s(Xh,"Exporter");var Qo=Xh;f();var Ye,ea,Yh=class Yh{constructor({currentMapGetter:t}){I(this,Ye,new Map);I(this,ea,void 0);_(this,ea,t)}get currentMap(){return u(this,ea).call(this)}getById(t){return u(this,Ye).get(t)}add(t,r,i){let n=Rr(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let a=o.Labels.add(_n(n),r,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium"}),l=new Xr(a.id.toString(),r);return u(this,Ye).set(l.id,{label:l,entityId:l.id}),l}all(){var r;let t=[];return(r=this.currentMap)==null||r.Labels.all({onCreate:(i,n)=>{let o=new Xr(i.toString(),n);u(this,Ye).set(o.id,{label:o,entityId:o.id}),t.push(o)}}),t}remove(t){var i;let r=u(this,Ye).get(t.id);r&&((i=this.currentMap)==null||i.Labels.remove(r.entityId),u(this,Ye).delete(t.id.toString()))}removeAll(){let t=[];return u(this,Ye).forEach(({label:r})=>{this.remove(r),t.push(r),u(this,Ye).delete(r.id.toString())}),t}};Ye=new WeakMap,ea=new WeakMap,s(Yh,"Labels");var ta=Yh;f();f();var jh=class jh{id;name;elevation;containerId;loaded=!1;styleMap={};obstructions;entrances;spaces;renderer;options;layers=new Map;constructor(t,r,i,n,o,a){this.id=r.id,this.options=n;let l=i.addGroupContainer(this.id,{visible:!1},t);this.containerId=l.id.toString(),this.name=r.externalId,this.elevation=r.elevation,o!=null&&a!=null&&(this.styleMap=a,this.spaces=o.space[this.id],this.entrances=o.entrance[this.id],this.obstructions=o.obstruction[this.id]),this.renderer=i}load=()=>{if(this.loaded||this.obstructions==null&&this.spaces==null)return this;if(this.loaded=!0,this.spaces!=null&&this.spaces.features.length>0){let t=this.spaces.features.filter(n=>{var o;return n.geometry.type==="Polygon"&&((o=n.properties.kind)==null?void 0:o.toLowerCase())!=="void"}),r=Bh(t,this.styleMap),i=this.renderer.addGroupContainer("spaces",{},this.id);for(let[n,o]of r)this.renderer.addGeometryGroup(`Spaces-${this.id}`,{features:o},n,i);this.layers.set("Spaces",i.id.toString())}if(this.obstructions!=null&&this.obstructions.features.length>0){let t=this.obstructions.features.filter(m=>m.geometry.type==="Polygon"&&m.properties.kind==="object"),r=Bh(t,this.styleMap),i=this.renderer.addGroupContainer("objects",{},this.id);for(let[m,y]of r)this.renderer.addGeometryGroup(`Objects-${this.id}`,{features:y},m,i);this.layers.set("Objects",i.id.toString());let n=this.obstructions.features.filter(m=>m.geometry.type==="LineString"&&m.properties.kind==="Wall"&&m.properties.footprintComponent===!1),o=this.obstructions.features.filter(m=>m.geometry.type==="LineString"&&m.properties.kind==="Wall"&&m.properties.footprintComponent===!0),a={...this.styleMap[n[0].properties.id]},l=a;if(o.length>0){let m=this.styleMap[o[0].properties.id];m!=null&&(l={...m})}this.options.wallTopColor!=null&&(a.topColor=this.options.wallTopColor,l.topColor=this.options.wallTopColor);let c=this.entrances,h=this.renderer.addGeometryGroup(`Walls-${this.id}`,{features:[Fh(n,(c==null?void 0:c.features)||[])]},a,this.id),d=this.renderer.addGeometryGroup(`ExteriorWalls-${this.id}`,{features:[Fh(o,(c==null?void 0:c.features)||[])]},l,this.id);this.layers.set("Walls",h.id.toString()),this.layers.set("ExteriorWalls",d.id.toString())}return this.renderer.render(),this}};s(jh,"FloorObject");var _l=jh;var Xi=Cr(On());f();f();f();f();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();f();f();var Zh=class Zh extends Ce{visible=!0;type="geometry-group";userData={entityId:"",entities3D:new Set,opacity:1,dirty:!0};setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}getOpacity(){return this.userData.opacity}setOpacity(t){this.userData.opacity=t}constructor(t){super(),this.userData.entityId=t}};s(Zh,"GeometryGroupObject3D");var de=Zh;f();var qh=class qh extends Ce{};s(qh,"Geometry2DObject3D");var Dn=qh,$h=class $h{id;get type(){return this.components[0].type}get parent(){return this.object3d.parent}positionDirty=!0;object3d=new Dn;components;disposed=!1;constructor(t,r){this.id=t.id||ft(),this.components=[t],this.object3d=new Dn,this.object3d.position.copy(r),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}worldPosition=new X;get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}};s($h,"Geometry2D");var Ee=$h;f();var Jh=class Jh extends Ce{userData={entityId:"",type:"geometry"}};s(Jh,"Geometry3DObject3D");var je=Jh,Kh=class Kh{id=ft();components;get object3d(){return this.components[0].mesh}get parent(){var t;return(t=this.components[0].mesh)==null?void 0:t.parent}get type(){return this.components[0].type}constructor(t,r){this.components=[t,r]}};s(Kh,"Geometry3D");var Pt=Kh;var ra=class ra extends Ce{childrenIds=new Set;type="group-container";userData={entityId:"",entities2D:new Set,dirty:!0};components=[];constructor(t){super(),this.userData.entityId=t}addEntity(t){t instanceof ra?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Ee?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id)):t instanceof de?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Pt&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof ra?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Ee?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof de?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Pt&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}setAltitude(t){this.position.z=t,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};s(ra,"GroupContainerObject3D");var re=ra;f();var iv=!1;function nv(){iv=!0}s(nv,"enableTestMode");var Qh=class Qh{backgroundAlpha=1;backgroundColor=new Mt;width=0;height=0;options={};renderer;constructor(t,r=2){try{this.options=t;let i={canvas:t.canvas,alpha:t.alpha||!1,stencil:!1,antialias:typeof t.antialias=="boolean"?t.antialias:!0,outputColorSpace:Wi,powerPreference:"high-performance",preserveDrawingBuffer:!0};iv?(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}}}),setRenderTarget:()=>{},setClearColor:()=>{},clear:()=>{},render:()=>{},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=r===2?new Kd(i):new Qd(i),this.backgroundColor=new Mt,this.backgroundAlpha=1}catch(i){Y.error(i),t.onWebGLRendererError&&t.onWebGLRendererError(i)}}destroy(){this.renderer&&this.renderer.dispose()}render(t,r){this.renderer&&(this.renderer.state.reset(),r.layers.enable(0),r.layers.enable(1),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,r),this.renderer.state.reset())}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){b.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};s(Qh,"Renderer");var Ll=Qh;f();f();var tf=class tf{percentExpanded=0;activeId="";gap=20;dirty=!0};s(tf,"StackComponent");var An=tf;f();var zr=63710088e-1,ov=-85.051129,av=85.051129,Ol=1e4,ef={chain:"chain",cancel:"cancel"},rf=Math.PI*2,ia=100,sv=1e4,nf=0,of=22;var af=["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"];f();function Ur(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}s(Ur,"getPixelRatio");function Dl(e,t,r,i){let n=e*(Math.PI/180),o=i/zr,a=e+o*180/Math.PI,l=r/zr/Math.cos(n),c=t+l*180/Math.PI;return{lat:a,lon:c}}s(Dl,"cartesianToGeographic");function Al(e,t,r,i){let n=r*(Math.PI/180),o=i*(Math.PI/180),a=e*(Math.PI/180),l=t*(Math.PI/180),c=n-a,h=o-l,d=zr*h*Math.cos(a),m=zr*c;return{x:d,y:m}}s(Al,"geographicToCartesian");var sf=s((e,t=[])=>{var r;if(e.children&&e.visible)for(let i of e.children){if(i.visible)if((r=i.userData)!=null&&r.entities3D&&i.type==="geometry-group"){t.push(i.userData.entityId);for(let n of i.userData.entities3D.values())t.push(n)}else(i.type==="group-container"&&i.components[0]instanceof An||i.type==="custom-geometry"||i instanceof je)&&t.push(i.userData.entityId);sf(i,t)}return t},"extract3DEntitiesFromTree"),lf=s((e,t)=>{var r;if(e.children&&e.visible&&!((r=e.userData)!=null&&r.hidden))for(let i of e.children)i.visible&&i instanceof Dn&&t.add(i.userData.entityId),lf(i,t);return t},"extractEntitiesFromTree");function cf(e,t){for(let r in t){if(t[r]==null){e[r]=void 0;continue}typeof t[r]=="object"?cf(e[r],t[r]):e[r]=t[r]}return e}s(cf,"mergeObjects");function cv(e,t,r,i){let n={translateX:e.x,translateY:e.y,translateZ:e.z,scale:e.meterInMercatorCoordinateUnits()},o=new ti,a=new X(n.scale,-n.scale,n.scale),l=new ti().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(a);return{id:"mappedin",type:"custom",renderingMode:"3d",render:(c,h)=>{if(o.fromArray(h),r.elevation>0){let d=lm.fromLngLat(e.toLngLat(),r.elevation);l.makeTranslation(n.translateX,n.translateY,-d.z).scale(a)}t.projectionMatrix=o.multiply(l),i()}}}s(cv,"createCustomLayer");function _6(e){return fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}s(_6,"fetchToken");async function uv(e){let t=await _6(e),{access_token:r}=await t.json();return{"x-mappedin-tiles-key":r}}s(uv,"getRequestHeaders");function pv(e,t=0){let r=3735928559^t,i=1103547991^t;for(let n=0,o;n<e.length;n++)o=e.charCodeAt(n),r=Math.imul(r^o,2654435761),i=Math.imul(i^o,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&i)+(r>>>0)}s(pv,"cyrb53");var L6=s(e=>e,"linearEase");function Zt(e,t,r,i,n,o=L6){e=Math.max(t,Math.min(e,r));let a=(e-Math.min(t,r))/Math.abs(r-t),l=o(a);return i+l*(n-i)}s(Zt,"interpolate");function uf(e,t,r){let i=e*(Math.PI/180)/2,n=t/2;return r*Math.tan(i)/n}s(uf,"getProjectionScaleFactor");function Nl(e,t){let r;return typeof t=="string"||typeof t=="number"?(r=e.entity2DMap.get(t),r==null&&(r=e.entity3DMap.get(t))):typeof(t==null?void 0:t.id)=="string"||typeof(t==null?void 0:t.id)=="number"?(r=e.entity2DMap.get(t.id),r==null&&(r=e.entity3DMap.get(t.id))):r=t,r}s(Nl,"getGeometryByGeometryId");f();f();var hv=`"use strict";(()=>{function q(i,e){return e.x+e.w<i.x+i.w&&e.x>i.x&&e.y>i.y&&e.y+e.h<i.y+i.h}function z(i,e){let[t,o]=e;return t>=i.x&&t<=i.x+i.w&&o>=i.y&&o<=i.y+i.h}function E(i,e){let t=e.x,o=e.y,n=e.x+e.w,l=e.y+e.h,d=i.x,m=i.y,v=i.x+i.w,C=i.y+i.h;return t<v&&d<n&&o<C&&m<l}function a(i,e){for(let t=0;t<e.length;t++)i.push(e[t])}var T=4,s=class{x;y;w;h;userData;constructor(e,t,o,n,l){let d=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof l>"u"?null:l,this.x=e-T,this.y=t-T,this.w=o+T*Math.min(d,2),this.h=n+T*Math.min(d,2)}contains(e){return e===this?!1:q(this,e)}intersects(e){return E(this,e)}intersectsPoint(e){return z(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.5)",e.fillRect(this.x,this.y,this.w,this.h)}};var x=class i{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,t){this.parent=t,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:t,w:o,h:n}=this.boundary;this.topLeft=new i(new s(e,t,o/2,n/2),this),this.topRight=new i(new s(e+o/2,t,o/2,n/2),this),this.bottomLeft=new i(new s(e,t+n/2,o/2,n/2),this),this.bottomRight=new i(new s(e+o/2,t+n/2,o/2,n/2),this),this.divided=!0}queryRect(e){let t=[];if(this.boundary.intersects(e))t.push(...this.objects);else return[];return this.divided&&(a(t,this.topLeft.queryRect(e)),a(t,this.topRight.queryRect(e)),a(t,this.bottomLeft.queryRect(e)),a(t,this.bottomRight.queryRect(e))),t}queryPoint(e){let t=[];if(this.boundary.intersectsPoint(e))t.push(...this.objects);else return[];return this.divided&&(a(t,this.topLeft.queryPoint(e)),a(t,this.topRight.queryPoint(e)),a(t,this.bottomLeft.queryPoint(e)),a(t,this.bottomRight.queryPoint(e))),t}insert(e){return this.boundary.contains(e)?this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0):!1}drawObjects(e){this.objects.forEach(t=>t.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};var c=200,P=10;function O(i,e,t,o="-1"){let n=1/0,l=1/0,d=-1/0,m=-1/0,v=new s(-P,0,5,t),C=new s(-P,0,e,5),F=new s(e-5,0,e+P,t),N=new s(0,t-5,e,t+P),A=[v,C,F,N],M=new s(-c,-c,e+c*2,t+c*2);for(let r of i)for(let h=0;h<r.bboxes.length;h++){let{boundingBox:R}=r.bboxes[h],[b,w,u,p]=R,[B,f,D,W]=[r.y-b,r.y+w,r.x-u,r.x+p],S=D,L=B,I=W-D,j=f-B;n=Math.min(n,S)-c,l=Math.min(l,L)-c,d=Math.max(d,S+I)+c,m=Math.max(m,L+j)+c,r.bboxes[h].boundingRect=new s(S,L,I,j)}let y={msgId:o,colliders:new Array(i.length),debug:[]},k=new x(new s(n,l,d-n,m-l)),g;for(let r=0;r<i.length;r++)if(g=i[r],y.colliders[r]=[-1,!1],g.enabled){let[h,R,b]=[1/0,-1,void 0];for(let{index:w,boundingRect:u}of g.bboxes){let p=[];if(p=k.queryRect(u).filter(f=>u.intersects(f)),g.shouldCollideWithScreenEdges&&A.forEach(f=>{u.intersects(f)&&p.push(f)}),p.length<=h&&(b=u,R=w,h=p.length),p.length===0){k.insert(u),y.colliders[r]=[w,!M.contains(u),u];break}}g.rank===4&&b!=null&&(k.insert(b),y.colliders[r]=[R,!M.contains(b),b])}else y.colliders[r]=[-1,!1];return y}function Q(i){let e=i[0].map(t=>{let o=t[0].map((n,l)=>({index:l,boundingBox:[n[0],n[1],n[2],n[3]]}));return{enabled:t[1]===1,rank:t[2]===1?4:0,x:t[3],y:t[4],bboxes:o}});return{msgId:"-1",totalWidth:i[3],totalHeight:i[2],colliders:e,devicePixelRatio:i[1]}}self.onmessage=i=>{let e=Q(i.data);self.postMessage(O(e.colliders,e.totalWidth,e.totalHeight,e.msgId))};})();
443
- `;f();f();f();f();f();function fv(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}s(fv,"contains");f();function dv(e,t){let[r,i]=t;return r>=e.x&&r<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}s(dv,"intersectPoint");f();function mv(e,t){let r=t.x,i=t.y,n=t.x+t.w,o=t.y+t.h,a=e.x,l=e.y,c=e.x+e.w,h=e.y+e.h;return r<c&&a<n&&i<h&&l<o}s(mv,"intersects");f();function ur(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}s(ur,"appendItems");f();var kl=4,pf=class pf{x;y;w;h;userData;constructor(t,r,i,n,o){let a=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof o>"u"?null:o,this.x=t-kl,this.y=r-kl,this.w=i+kl*Math.min(a,2),this.h=n+kl*Math.min(a,2)}contains(t){return t===this?!1:fv(this,t)}intersects(t){return mv(this,t)}intersectsPoint(t){return dv(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.5)",t.fillRect(this.x,this.y,this.w,this.h)}};s(pf,"Rectangle");var _t=pf;var wi=class wi{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(t,r){this.parent=r,this.boundary=t}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:t,y:r,w:i,h:n}=this.boundary;this.topLeft=new wi(new _t(t,r,i/2,n/2),this),this.topRight=new wi(new _t(t+i/2,r,i/2,n/2),this),this.bottomLeft=new wi(new _t(t,r+n/2,i/2,n/2),this),this.bottomRight=new wi(new _t(t+i/2,r+n/2,i/2,n/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(ur(r,this.topLeft.queryRect(t)),ur(r,this.topRight.queryRect(t)),ur(r,this.bottomLeft.queryRect(t)),ur(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(ur(r,this.topLeft.queryPoint(t)),ur(r,this.topRight.queryPoint(t)),ur(r,this.bottomLeft.queryPoint(t)),ur(r,this.bottomRight.queryPoint(t))),r}insert(t){return this.boundary.contains(t)?this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0):!1}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};s(wi,"QuadTree");var ze=wi;f();function yv(e,t,r){let i,n,o,a=null,l=0;r||(r={});let c=s(function(){l=r.leading===!1?0:Date.now(),a=null,o=e.apply(i,n),a||(i=n=null)},"later");return function(){let h=Date.now();!l&&r.leading===!1&&(l=h);let d=t-(h-l);return i=globalThis,n=arguments,d<=0||d>t?(a&&(clearTimeout(a),a=null),l=h,o=e.apply(i,n),a||(i=n=null)):!a&&r.trailing!==!1&&(a=setTimeout(c,d)),o}}s(yv,"throttle");function gv(e){return[e.bboxes.map(r=>[r.boundingBox[0],r.boundingBox[1],r.boundingBox[2],r.boundingBox[3]]),e.enabled?1:0,e.rank===4?1:0,e.x,e.y]}s(gv,"packCollider");var Nn=!1,O6=150,hf=class hf extends st{worker;debugContext;debugCanvas;dirty=!0;packedMessage=[[],0,0,0];visibleCollidersQTree=new ze(new _t(0,0,0,0));interactiveCollidersQTree=new ze(new _t(0,0,0,0));coreState;constructor(t,r,i=new Worker(URL.createObjectURL(new Blob([hv],{type:"text/javascript"})))){super(),this.coreState=r,this.debugCanvas=t,this.debugContext=t.getContext("2d"),this.worker=i,this.worker.onmessage=n=>this.resolve(n),this.postMessage=yv(this._postMessage,O6,!1)}postMessage;showCollisionBoxes=()=>{Nn=!0};hideCollisionBoxes=()=>{Nn=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height)};currentMsgId="";working=!1;_postMessage=()=>{this.worker.postMessage(this.packedMessage)};componentArray=[];update=()=>{if(this.dirty){this.packedMessage=[[],0,0,0],this.componentArray=new Array(this.coreState.entity2DIds.size);let t=0,r;for(let i of this.coreState.entity2DIds){let n=this.coreState.entity2DMap.get(i);n&&(r=n.components[0],this.componentArray[t]=r),t++}this.resize(),this.dirty=!1,this.componentArray.sort((i,n)=>n.rank-i.rank)}else this.componentArray.filter(r=>r.collisionDirty===!0).length>0&&this.componentArray.sort((r,i)=>i.rank-r.rank);for(let t=0;t<this.componentArray.length;t++)this.packedMessage&&(this.componentArray[t].collisionDirty||this.packedMessage[0][t]==null?(this.packedMessage[0][t]=gv(this.componentArray[t].toJSON()),this.componentArray[t].collisionDirty=!1):(this.packedMessage[0][t][1]=this.componentArray[t].enabled?1:0,this.packedMessage[0][t][2]=this.componentArray[t].rank===4?1:0,this.packedMessage[0][t][3]=this.componentArray[t].projection.x,this.packedMessage[0][t][4]=this.componentArray[t].projection.y));this.working||this.postMessage()};resize(){this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}resolve=t=>{if(this.working=!1,this.dirty||!t.data)return;let r=t.data.colliders,i=-1,n=!1,o,a,l;Nn&&(this.visibleCollidersQTree=new ze(new _t(0,0,this.debugCanvas.width,this.debugCanvas.height))),this.interactiveCollidersQTree=new ze(new _t(0,0,this.debugCanvas.width,this.debugCanvas.height));for(let c=0;c<this.componentArray.length;c++){let h=this.componentArray[c];r[c]==null||!h.enabled||([i,n,o]=r[c],i!==-1&&!n&&o!=null?(l=new _t(o.x,o.y,o.w,o.h,{entityId:h.id}),Nn&&this.visibleCollidersQTree.insert(l),a=this.coreState.entity2DMap.get(h.id),(a==null?void 0:a.components[1])!=null&&this.interactiveCollidersQTree.insert(new _t(o.x,o.y,o.w,o.h,{entityId:h.id})),h.visible===!1&&(h.visible=!0,"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate=!0)),i!==-1&&i!==h.activeStrategyIndex&&(h.activeBoundingBox=l,h.onStrategySelected(i))):(h.visible===!0&&(h.visible=!1,"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate=!0)),i!==-1&&i!==h.activeStrategyIndex&&h.onStrategySelected(i)))}Nn&&this.drawDebug(),this.publish("visibility-changed")};drawDebug=()=>{Nn&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))};destroy=()=>{this.worker.terminate()}};s(hf,"CollisionSystem");var Rl=hf;f();f();f();f();var df=class df{type;event;constructor(t){this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};s(df,"Tap");var Fl=df,mf=class mf{taps=[];add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};s(mf,"TapsController");var Bl=mf;var kn,yf=class yf extends st{constructor(r,i,n,o){super();v(this,"raycaster",new Pr);v(this,"state",{hovered3DEntity:void 0,hovered2DEntity:void 0,lastHover:void 0,containerOffset:[0,0],interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});v(this,"coreState");v(this,"camera");v(this,"cameraPlane");v(this,"_quadtree",new ze(new _t(0,0,0,0)));v(this,"_container");v(this,"cursor","grab");v(this,"hasTouched",!1);I(this,kn,void 0);v(this,"onPointerMoveRaf",r=>{u(this,kn)&&cancelAnimationFrame(u(this,kn)),_(this,kn,requestAnimationFrame(()=>{this.onPointerMove(r)}))});v(this,"onPointerMove",r=>{r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor()});v(this,"tapsControl",new Bl);v(this,"onPointerDown",r=>{r.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:r.timeStamp,clientX:r.clientX,clientY:r.clientY},this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&this.tapsControl.add(new Fl(r)))});v(this,"clickTimeout");v(this,"onPointerUp",r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1),this.updateInteractionStateIfPanning(r);let{mouseDownStart:i}=this.state.interaction;!i||this.state.interaction.distanceFromMouseDown==null||(Date.now()<i.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(r.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())});v(this,"dirty3D",!0);v(this,"cachedHitBoxes",[]);v(this,"ndcPoint",new z);v(this,"debugPanel");this.raycaster.layers.enableAll();let{top:a,left:l}=r.getBoundingClientRect();this.state.containerOffset=[a,l],this.camera=n,this._container=r,this.coreState=i,this.cameraPlane=o,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){if(this.state.interaction.mouseDownStart)return;let{entity3D:i,entity2D:n,position:o}=this.intersect(r);(this.handle3DEntityHover(i)||this.handle2DEntityHover(n))&&this.publish("hover",{entity2D:this.state.hovered2DEntity,entity3D:this.state.hovered3DEntity,position:o}),this.handleCursor()}handleCursor(){let r=!!(this.state.hovered3DEntity||this.state.hovered2DEntity),i=!!this.state.interaction.mouseDownStart,n=this.state.interaction.isPanning,o=N6(r,n,i);this.cursor!==o&&(this.cursor=o,o==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}handle2DEntityHover(r){let i=this.state.hovered2DEntity!==r;return this.state.hovered2DEntity=r,i}handleClick(r){let i=this.intersect(r);this.publish("click",{entity2D:i.entity2D,entity3D:i.entity3D,position:i.position,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes=[];let r;for(let i of this.coreState.threeDEntities)r=this.coreState.entity3DMap.get(i),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model")&&r.components[2]&&r.components[0].mesh&&!this.cachedHitBoxes.includes(r.components[0].mesh)&&this.cachedHitBoxes.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var y,x;let i=[r.offsetX,r.offsetY],n=this._quadtree.queryPoint(i),[o]=n.filter(S=>S.intersectsPoint(i)),a=this.state.containerOffset[0],l=this.state.containerOffset[1];this.ndcPoint.x=(r.clientX-l)/this._container.clientWidth*2-1,this.ndcPoint.y=-((r.clientY-a)/this._container.clientHeight)*2+1,this.raycaster.setFromCamera(this.ndcPoint,this.camera),this.raycaster.layers.enable(0);let[c]=this.getMouseRayIntersects(),h=this.raycaster.intersectObjects(this._hitBoxes,!0).filter(S=>S.object.visible),[d]=h,m=(y=d==null?void 0:d.instanceId)!=null?y:d==null?void 0:d.batchId;return{entity2D:((x=o==null?void 0:o.userData)==null?void 0:x.entityId)==="watermark"?{id:"watermark"}:this.coreState.entity2DMap.get(o==null?void 0:o.userData.entityId),entity3D:m!=null?this.coreState.entity3DMap.get(d==null?void 0:d.object.userData.entities[m]):this.coreState.entity3DMap.get(d==null?void 0:d.object.userData.entityId),position:c==null?void 0:c.point}}handle3DEntityHover(r){this.state.lastHover!==r&&(this.state.lastHover&&bv(this.state.lastHover,!1),r&&bv(r,!0));let i=this.state.hovered3DEntity!==r;return this.state.hovered3DEntity=r,this.state.lastHover=r,i}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.clientX-this.state.interaction.mouseDownStart.clientX,2)+Math.pow(r.clientY-this.state.interaction.mouseDownStart.clientY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.cameraPlane],!1)}destroy(){this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.zIndex="1",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",i=>{var n,o,a;this.queueDebugMessage(`CLICK
4
+ `+t.prev}s(ku,"indentedJoin");function ks(e,t){var r=Nu(e),i=[];if(r){i.length=e.length;for(var n=0;n<e.length;n++)i[n]=Lr(e,n)?t(e[n],e):""}var o=typeof _u=="function"?_u(e):[],a;if(on){a={};for(var l=0;l<o.length;l++)a["$"+o[l]]=o[l]}for(var c in e)Lr(e,c)&&(r&&String(Number(c))===c&&c<e.length||on&&a["$"+c]instanceof Symbol||(Dy.call(/[^\w$]/,c)?i.push(t(c,e)+": "+t(e[c],e)):i.push(c+": "+t(e[c],e))));if(typeof _u=="function")for(var h=0;h<o.length;h++)Ay.call(e,o[h])&&i.push("["+t(o[h])+"]: "+t(e[o[h]],e));return i}s(ks,"arrObjKeys")});var Vu=N((PI,Hy)=>{"use strict";f();var Vy=Se(),an=le(),l7=Gy(),c7=Qe(),Bs=Vy("%WeakMap%",!0),Gs=Vy("%Map%",!0),u7=an("WeakMap.prototype.get",!0),p7=an("WeakMap.prototype.set",!0),h7=an("WeakMap.prototype.has",!0),f7=an("Map.prototype.get",!0),d7=an("Map.prototype.set",!0),m7=an("Map.prototype.has",!0),Gu=s(function(e,t){for(var r=e,i;(i=r.next)!==null;r=i)if(i.key===t)return r.next=i.next,i.next=e.next,e.next=i,i},"listGetNode"),y7=s(function(e,t){var r=Gu(e,t);return r&&r.value},"listGet"),g7=s(function(e,t,r){var i=Gu(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}},"listSet"),v7=s(function(e,t){return!!Gu(e,t)},"listHas");Hy.exports=s(function(){var t,r,i,n={assert:function(o){if(!n.has(o))throw new c7("Side channel does not contain "+l7(o))},get:function(o){if(Bs&&o&&(typeof o=="object"||typeof o=="function")){if(t)return u7(t,o)}else if(Gs){if(r)return f7(r,o)}else if(i)return y7(i,o)},has:function(o){if(Bs&&o&&(typeof o=="object"||typeof o=="function")){if(t)return h7(t,o)}else if(Gs){if(r)return m7(r,o)}else if(i)return v7(i,o);return!1},set:function(o,a){Bs&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Bs),p7(t,o,a)):Gs?(r||(r=new Gs),d7(r,o,a)):(i||(i={key:{},next:null}),g7(i,o,a))}};return n},"getSideChannel")});var Yy=N((TI,Xy)=>{"use strict";f();var b7=mu(),go=Vu()(),tr=Qe(),Hu={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");if(go.assert(e),!Hu.has(e,t))throw new tr("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var r=go.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var r=go.get(e);return!!r&&b7(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`O` is not an object");if(typeof t!="string")throw new tr("`slot` must be a string");var i=go.get(e);i||(i={},go.set(e,i)),i["$"+t]=r}};Object.freeze&&Object.freeze(Hu);Xy.exports=Hu});var Uy=N((EI,zy)=>{"use strict";f();var vo=Yy(),C7=SyntaxError,jy=typeof StopIteration=="object"?StopIteration:null;zy.exports=s(function(t){if(!jy)throw new C7("this environment lacks StopIteration");vo.set(t,"[[Done]]",!1);var r={next:s(function(){var n=vo.get(this,"[[Iterator]]"),o=vo.get(n,"[[Done]]");try{return{done:o,value:o?void 0:n.next()}}catch(a){if(vo.set(n,"[[Done]]",!0),a!==jy)throw a;return{done:!0,value:void 0}}},"next")};return vo.set(r,"[[Iterator]]",t),r},"getStopIterationIterator")});var Xu=N((OI,Wy)=>{f();var x7={}.toString;Wy.exports=Array.isArray||function(e){return x7.call(e)=="[object Array]"}});var Yu=N((AI,Zy)=>{"use strict";f();var S7=String.prototype.valueOf,P7=s(function(t){try{return S7.call(t),!0}catch{return!1}},"tryStringObject"),M7=Object.prototype.toString,w7="[object String]",T7=_r()();Zy.exports=s(function(t){return typeof t=="string"?!0:typeof t!="object"?!1:T7?P7(t):M7.call(t)===w7},"isString")});var zu=N((RI,Jy)=>{"use strict";f();var ju=typeof Map=="function"&&Map.prototype?Map:null,I7=typeof Set=="function"&&Set.prototype?Set:null,Vs;ju||(Vs=s(function(t){return!1},"isMap"));var $y=ju?Map.prototype.has:null,qy=I7?Set.prototype.has:null;!Vs&&!$y&&(Vs=s(function(t){return!1},"isMap"));Jy.exports=Vs||s(function(t){if(!t||typeof t!="object")return!1;try{if($y.call(t),qy)try{qy.call(t)}catch{return!0}return t instanceof ju}catch{}return!1},"isMap")});var Wu=N((GI,tg)=>{"use strict";f();var E7=typeof Map=="function"&&Map.prototype?Map:null,Uu=typeof Set=="function"&&Set.prototype?Set:null,Hs;Uu||(Hs=s(function(t){return!1},"isSet"));var Ky=E7?Map.prototype.has:null,Qy=Uu?Set.prototype.has:null;!Hs&&!Qy&&(Hs=s(function(t){return!1},"isSet"));tg.exports=Hs||s(function(t){if(!t||typeof t!="object")return!1;try{if(Qy.call(t),Ky)try{Ky.call(t)}catch{return!0}return t instanceof Uu}catch{}return!1},"isSet")});var hg=N((XI,js)=>{"use strict";f();var eg=Tu(),rg=Uy();Ss()()||co()()?(Xs=Symbol.iterator,js.exports=s(function(t){if(t!=null&&typeof t[Xs]<"u")return t[Xs]();if(eg(t))return Array.prototype[Xs].call(t)},"getIterator")):(ig=Xu(),ng=Yu(),Zu=Se(),og=Zu("%Map%",!0),ag=Zu("%Set%",!0),he=le(),qu=he("Array.prototype.push"),$u=he("String.prototype.charCodeAt"),sg=he("String.prototype.slice"),lg=s(function(t,r){var i=t.length;if(r+1>=i)return r+1;var n=$u(t,r);if(n<55296||n>56319)return r+1;var o=$u(t,r+1);return o<56320||o>57343?r+1:r+2},"advanceStringIndex"),Ys=s(function(t){var r=0;return{next:s(function(){var n=r>=t.length,o;return n||(o=t[r],r+=1),{done:n,value:o}},"next")}},"getArrayIterator"),Ju=s(function(t,r){if(ig(t)||eg(t))return Ys(t);if(ng(t)){var i=0;return{next:s(function(){var o=lg(t,i),a=sg(t,i,o);return i=o,{done:o>t.length,value:a}},"next")}}if(r&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()},"getNonCollectionIterator"),!og&&!ag?js.exports=s(function(t){if(t!=null)return Ju(t,!0)},"getIterator"):(cg=zu(),ug=Wu(),Ku=he("Map.prototype.forEach",!0),Qu=he("Set.prototype.forEach",!0),(typeof b>"u"||!b.versions||!b.versions.node)&&(tp=he("Map.prototype.iterator",!0),ep=he("Set.prototype.iterator",!0)),rp=he("Map.prototype.@@iterator",!0)||he("Map.prototype._es6-shim iterator_",!0),ip=he("Set.prototype.@@iterator",!0)||he("Set.prototype._es6-shim iterator_",!0),pg=s(function(t){if(cg(t)){if(tp)return rg(tp(t));if(rp)return rp(t);if(Ku){var r=[];return Ku(t,function(n,o){qu(r,[o,n])}),Ys(r)}}if(ug(t)){if(ep)return rg(ep(t));if(ip)return ip(t);if(Qu){var i=[];return Qu(t,function(n){qu(i,n)}),Ys(i)}}},"getCollectionIterator"),js.exports=s(function(t){return pg(t)||Ju(t)},"getIterator")));var Xs,ig,ng,Zu,og,ag,he,qu,$u,sg,lg,Ys,Ju,cg,ug,Ku,Qu,tp,ep,rp,ip,pg});var np=N((zI,dg)=>{"use strict";f();var fg=s(function(e){return e!==e},"numberIsNaN");dg.exports=s(function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||fg(t)&&fg(r))},"is")});var op=N((ZI,mg)=>{"use strict";f();var _7=np();mg.exports=s(function(){return typeof Object.is=="function"?Object.is:_7},"getPolyfill")});var gg=N((JI,yg)=>{"use strict";f();var L7=op(),O7=Er();yg.exports=s(function(){var t=L7();return O7(Object,{is:t},{is:s(function(){return Object.is!==t},"testObjectIs")}),t},"shimObjectIs")});var xg=N((tE,Cg)=>{"use strict";f();var D7=Er(),A7=ii(),N7=np(),vg=op(),k7=gg(),bg=A7(vg(),Object);D7(bg,{getPolyfill:vg,implementation:N7,shim:k7});Cg.exports=bg});var sp=N((rE,wg)=>{"use strict";f();var R7=ii(),Mg=le(),F7=Se(),ap=F7("%ArrayBuffer%",!0),zs=Mg("ArrayBuffer.prototype.byteLength",!0),B7=Mg("Object.prototype.toString"),Sg=!!ap&&!zs&&new ap(0).slice,Pg=!!Sg&&R7(Sg);wg.exports=s(zs||Pg?function(t){if(!t||typeof t!="object")return!1;try{return zs?zs(t):Pg(t,0),!0}catch{return!1}}:ap?function(t){return B7(t)==="[object ArrayBuffer]"}:function(t){return!1},"isArrayBuffer")});var Ig=N((oE,Tg)=>{"use strict";f();var G7=Date.prototype.getDay,V7=s(function(t){try{return G7.call(t),!0}catch{return!1}},"tryDateGetDayCall"),H7=Object.prototype.toString,X7="[object Date]",Y7=_r()();Tg.exports=s(function(t){return typeof t!="object"||t===null?!1:Y7?V7(t):H7.call(t)===X7},"isDateObject")});var Dg=N((lE,Og)=>{"use strict";f();var lp=le(),Eg=_r()(),_g,Lg,cp,up;Eg&&(_g=lp("Object.prototype.hasOwnProperty"),Lg=lp("RegExp.prototype.exec"),cp={},Us=s(function(){throw cp},"throwRegexMarker"),up={toString:Us,valueOf:Us},typeof Symbol.toPrimitive=="symbol"&&(up[Symbol.toPrimitive]=Us));var Us,j7=lp("Object.prototype.toString"),z7=Object.getOwnPropertyDescriptor,U7="[object RegExp]";Og.exports=s(Eg?function(t){if(!t||typeof t!="object")return!1;var r=z7(t,"lastIndex"),i=r&&_g(r,"value");if(!i)return!1;try{Lg(t,up)}catch(n){return n===cp}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:j7(t)===U7},"isRegex")});var kg=N((pE,Ng)=>{"use strict";f();var W7=le(),Ag=W7("SharedArrayBuffer.prototype.byteLength",!0);Ng.exports=s(Ag?function(t){if(!t||typeof t!="object")return!1;try{return Ag(t),!0}catch{return!1}}:function(t){return!1},"isSharedArrayBuffer")});var Fg=N((dE,Rg)=>{"use strict";f();var Z7=Number.prototype.toString,q7=s(function(t){try{return Z7.call(t),!0}catch{return!1}},"tryNumberObject"),$7=Object.prototype.toString,J7="[object Number]",K7=_r()();Rg.exports=s(function(t){return typeof t=="number"?!0:typeof t!="object"?!1:K7?q7(t):$7.call(t)===J7},"isNumberObject")});var Vg=N((gE,Gg)=>{"use strict";f();var Bg=le(),Q7=Bg("Boolean.prototype.toString"),tC=Bg("Object.prototype.toString"),eC=s(function(t){try{return Q7(t),!0}catch{return!1}},"booleanBrandCheck"),rC="[object Boolean]",iC=_r()();Gg.exports=s(function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:iC&&Symbol.toStringTag in t?eC(t):tC(t)===rC},"isBoolean")});var jg=N((CE,pp)=>{"use strict";f();var nC=Object.prototype.toString,oC=Ss()();oC?(Hg=Symbol.prototype.toString,Xg=/^Symbol\(.*\)$/,Yg=s(function(t){return typeof t.valueOf()!="symbol"?!1:Xg.test(Hg.call(t))},"isRealSymbolObject"),pp.exports=s(function(t){if(typeof t=="symbol")return!0;if(nC.call(t)!=="[object Symbol]")return!1;try{return Yg(t)}catch{return!1}},"isSymbol")):pp.exports=s(function(t){return!1},"isSymbol");var Hg,Xg,Yg});var Wg=N((PE,Ug)=>{"use strict";f();var zg=typeof BigInt<"u"&&BigInt;Ug.exports=s(function(){return typeof zg=="function"&&typeof BigInt=="function"&&typeof zg(42)=="bigint"&&typeof BigInt(42)=="bigint"},"hasNativeBigInts")});var $g=N((TE,hp)=>{"use strict";f();var aC=Wg()();aC?(Zg=BigInt.prototype.valueOf,qg=s(function(t){try{return Zg.call(t),!0}catch{}return!1},"tryBigIntObject"),hp.exports=s(function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:qg(t)},"isBigInt")):hp.exports=s(function(t){return!1},"isBigInt");var Zg,qg});var Kg=N((_E,Jg)=>{"use strict";f();var sC=Yu(),lC=Fg(),cC=Vg(),uC=jg(),pC=$g();Jg.exports=s(function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(sC(t))return"String";if(lC(t))return"Number";if(cC(t))return"Boolean";if(uC(t))return"Symbol";if(pC(t))return"BigInt"},"whichBoxedPrimitive")});var e0=N((DE,t0)=>{"use strict";f();var Ws=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,Qg=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Zs;Ws||(Zs=s(function(t){return!1},"isWeakMap"));var dp=Ws?Ws.prototype.has:null,fp=Qg?Qg.prototype.has:null;!Zs&&!dp&&(Zs=s(function(t){return!1},"isWeakMap"));t0.exports=Zs||s(function(t){if(!t||typeof t!="object")return!1;try{if(dp.call(t,dp),fp)try{fp.call(t,fp)}catch{return!0}return t instanceof Ws}catch{}return!1},"isWeakMap")});var i0=N((kE,yp)=>{"use strict";f();var hC=Se(),r0=le(),fC=hC("%WeakSet%",!0),mp=r0("WeakSet.prototype.has",!0);mp?(qs=r0("WeakMap.prototype.has",!0),yp.exports=s(function(t){if(!t||typeof t!="object")return!1;try{if(mp(t,mp),qs)try{qs(t,qs)}catch{return!0}return t instanceof fC}catch{}return!1},"isWeakSet")):yp.exports=s(function(t){return!1},"isWeakSet");var qs});var o0=N((BE,n0)=>{"use strict";f();var dC=zu(),mC=Wu(),yC=e0(),gC=i0();n0.exports=s(function(t){if(t&&typeof t=="object"){if(dC(t))return"Map";if(mC(t))return"Set";if(yC(t))return"WeakMap";if(gC(t))return"WeakSet"}return!1},"whichCollection")});var c0=N((HE,l0)=>{"use strict";f();var s0=Function.prototype.toString,sn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,vp,$s;if(typeof sn=="function"&&typeof Object.defineProperty=="function")try{vp=Object.defineProperty({},"length",{get:function(){throw $s}}),$s={},sn(function(){throw 42},null,vp)}catch(e){e!==$s&&(sn=null)}else sn=null;var vC=/^\s*class\b/,bp=s(function(t){try{var r=s0.call(t);return vC.test(r)}catch{return!1}},"isES6ClassFunction"),gp=s(function(t){try{return bp(t)?!1:(s0.call(t),!0)}catch{return!1}},"tryFunctionToStr"),Js=Object.prototype.toString,bC="[object Object]",CC="[object Function]",xC="[object GeneratorFunction]",SC="[object HTMLAllCollection]",PC="[object HTML document.all class]",MC="[object HTMLCollection]",wC=typeof Symbol=="function"&&!!Symbol.toStringTag,TC=!(0 in[,]),Cp=s(function(){return!1},"isDocumentDotAll");typeof document=="object"&&(a0=document.all,Js.call(a0)===Js.call(document.all)&&(Cp=s(function(t){if((TC||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=Js.call(t);return(r===SC||r===PC||r===MC||r===bC)&&t("")==null}catch{}return!1},"isDocumentDotAll")));var a0;l0.exports=s(sn?function(t){if(Cp(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{sn(t,null,vp)}catch(r){if(r!==$s)return!1}return!bp(t)&&gp(t)}:function(t){if(Cp(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(wC)return gp(t);if(bp(t))return!1;var r=Js.call(t);return r!==CC&&r!==xC&&!/^\[object HTML/.test(r)?!1:gp(t)},"isCallable")});var h0=N((jE,p0)=>{"use strict";f();var IC=c0(),EC=Object.prototype.toString,u0=Object.prototype.hasOwnProperty,_C=s(function(t,r,i){for(var n=0,o=t.length;n<o;n++)u0.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},"forEachArray"),LC=s(function(t,r,i){for(var n=0,o=t.length;n<o;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},"forEachString"),OC=s(function(t,r,i){for(var n in t)u0.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},"forEachObject"),DC=s(function(t,r,i){if(!IC(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),EC.call(t)==="[object Array]"?_C(t,r,n):typeof t=="string"?LC(t,r,n):OC(t,r,n)},"forEach");p0.exports=DC});var d0=N((WE,f0)=>{"use strict";f();f0.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var y0=N((qE,m0)=>{"use strict";f();var xp=d0(),AC=typeof globalThis>"u"?global:globalThis;m0.exports=s(function(){for(var t=[],r=0;r<xp.length;r++)typeof AC[xp[r]]=="function"&&(t[t.length]=xp[r]);return t},"availableTypedArrays")});var x0=N((KE,C0)=>{"use strict";f();var Qs=h0(),NC=y0(),g0=ii(),Mp=le(),Ks=_s(),kC=Mp("Object.prototype.toString"),b0=_r()(),v0=typeof globalThis>"u"?global:globalThis,Pp=NC(),wp=Mp("String.prototype.slice"),Sp=Object.getPrototypeOf,RC=Mp("Array.prototype.indexOf",!0)||s(function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},"indexOf"),tl={__proto__:null};b0&&Ks&&Sp?Qs(Pp,function(e){var t=new v0[e];if(Symbol.toStringTag in t){var r=Sp(t),i=Ks(r,Symbol.toStringTag);if(!i){var n=Sp(r);i=Ks(n,Symbol.toStringTag)}tl["$"+e]=g0(i.get)}}):Qs(Pp,function(e){var t=new v0[e],r=t.slice||t.set;r&&(tl["$"+e]=g0(r))});var FC=s(function(t){var r=!1;return Qs(tl,function(i,n){if(!r)try{"$"+i(t)===n&&(r=wp(n,1))}catch{}}),r},"tryAllTypedArrays"),BC=s(function(t){var r=!1;return Qs(tl,function(i,n){if(!r)try{i(t),r=wp(n,1)}catch{}}),r},"tryAllSlices");C0.exports=s(function(t){if(!t||typeof t!="object")return!1;if(!b0){var r=wp(kC(t),8,-1);return RC(Pp,r)>-1?r:r!=="Object"?!1:BC(t)}return Ks?FC(t):null},"whichTypedArray")});var M0=N((e_,P0)=>{"use strict";f();var GC=le(),S0=GC("ArrayBuffer.prototype.byteLength",!0),VC=sp();P0.exports=s(function(t){return VC(t)?S0?S0(t):t.byteLength:NaN},"byteLength")});var q0=N((n_,Z0)=>{"use strict";f();var z0=ey(),Ge=le(),w0=my(),HC=Se(),ln=hg(),XC=Vu(),T0=xg(),I0=Tu(),E0=Xu(),_0=sp(),L0=Ig(),O0=Dg(),D0=kg(),A0=xs(),N0=Kg(),k0=o0(),R0=x0(),F0=M0(),B0=Ge("SharedArrayBuffer.prototype.byteLength",!0),G0=Ge("Date.prototype.getTime"),Tp=Object.getPrototypeOf,V0=Ge("Object.prototype.toString"),rl=HC("%Set%",!0),Ip=Ge("Map.prototype.has",!0),il=Ge("Map.prototype.get",!0),H0=Ge("Map.prototype.size",!0),nl=Ge("Set.prototype.add",!0),U0=Ge("Set.prototype.delete",!0),ol=Ge("Set.prototype.has",!0),el=Ge("Set.prototype.size",!0);function X0(e,t,r,i){for(var n=ln(e),o;(o=n.next())&&!o.done;)if(Pe(t,o.value,r,i))return U0(e,o.value),!0;return!1}s(X0,"setHasEqualElement");function W0(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}s(W0,"findLooseMatchingPrimitives");function YC(e,t,r,i,n,o){var a=W0(r);if(a!=null)return a;var l=il(t,a),c=z0({},n,{strict:!1});return typeof l>"u"&&!Ip(t,a)||!Pe(i,l,c,o)?!1:!Ip(e,a)&&Pe(i,l,c,o)}s(YC,"mapMightHaveLoosePrim");function jC(e,t,r){var i=W0(r);return i!=null?i:ol(t,i)&&!ol(e,i)}s(jC,"setMightHaveLoosePrim");function Y0(e,t,r,i,n,o){for(var a=ln(e),l,c;(l=a.next())&&!l.done;)if(c=l.value,Pe(r,c,n,o)&&Pe(i,il(t,c),n,o))return U0(e,c),!0;return!1}s(Y0,"mapHasEqualEntry");function Pe(e,t,r,i){var n=r||{};if(n.strict?T0(e,t):e===t)return!0;var o=N0(e),a=N0(t);if(o!==a)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return n.strict?T0(e,t):e==t;var l=i.has(e),c=i.has(t),h;if(l&&c){if(i.get(e)===i.get(t))return!0}else h={};return l||i.set(e,h),c||i.set(t,h),WC(e,t,n,i)}s(Pe,"internalDeepEqual");function j0(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}s(j0,"isBuffer");function zC(e,t,r,i){if(el(e)!==el(t))return!1;for(var n=ln(e),o=ln(t),a,l,c;(a=n.next())&&!a.done;)if(a.value&&typeof a.value=="object")c||(c=new rl),nl(c,a.value);else if(!ol(t,a.value)){if(r.strict||!jC(e,t,a.value))return!1;c||(c=new rl),nl(c,a.value)}if(c){for(;(l=o.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!X0(c,l.value,r.strict,i))return!1}else if(!r.strict&&!ol(e,l.value)&&!X0(c,l.value,r.strict,i))return!1;return el(c)===0}return!0}s(zC,"setEquiv");function UC(e,t,r,i){if(H0(e)!==H0(t))return!1;for(var n=ln(e),o=ln(t),a,l,c,h,d,y;(a=n.next())&&!a.done;)if(h=a.value[0],d=a.value[1],h&&typeof h=="object")c||(c=new rl),nl(c,h);else if(y=il(t,h),typeof y>"u"&&!Ip(t,h)||!Pe(d,y,r,i)){if(r.strict||!YC(e,t,h,d,r,i))return!1;c||(c=new rl),nl(c,h)}if(c){for(;(l=o.next())&&!l.done;)if(h=l.value[0],y=l.value[1],h&&typeof h=="object"){if(!Y0(c,e,h,y,r,i))return!1}else if(!r.strict&&(!e.has(h)||!Pe(il(e,h),y,r,i))&&!Y0(c,e,h,y,z0({},r,{strict:!1}),i))return!1;return el(c)===0}return!0}s(UC,"mapEquiv");function WC(e,t,r,i){var n,o;if(typeof e!=typeof t||e==null||t==null||V0(e)!==V0(t)||I0(e)!==I0(t))return!1;var a=E0(e),l=E0(t);if(a!==l)return!1;var c=e instanceof Error,h=t instanceof Error;if(c!==h||(c||h)&&(e.name!==t.name||e.message!==t.message))return!1;var d=O0(e),y=O0(t);if(d!==y||(d||y)&&(e.source!==t.source||w0(e)!==w0(t)))return!1;var m=L0(e),x=L0(t);if(m!==x||(m||x)&&G0(e)!==G0(t)||r.strict&&Tp&&Tp(e)!==Tp(t))return!1;var S=R0(e),P=R0(t);if(S!==P)return!1;if(S||P){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var g=j0(e),C=j0(t);if(g!==C)return!1;if(g||C){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var M=_0(e),T=_0(t);if(M!==T)return!1;if(M||T)return F0(e)!==F0(t)?!1:typeof Uint8Array=="function"&&Pe(new Uint8Array(e),new Uint8Array(t),r,i);var w=D0(e),E=D0(t);if(w!==E)return!1;if(w||E)return B0(e)!==B0(t)?!1:typeof Uint8Array=="function"&&Pe(new Uint8Array(e),new Uint8Array(t),r,i);if(typeof e!=typeof t)return!1;var L=A0(e),R=A0(t);if(L.length!==R.length)return!1;for(L.sort(),R.sort(),n=L.length-1;n>=0;n--)if(L[n]!=R[n])return!1;for(n=L.length-1;n>=0;n--)if(o=L[n],!Pe(e[o],t[o],r,i))return!1;var F=k0(e),k=k0(t);return F!==k?!1:F==="Set"||k==="Set"?zC(e,t,r,i):F==="Map"?UC(e,t,r,i):!0}s(WC,"objEquiv");Z0.exports=s(function(t,r,i){return Pe(t,r,i,XC())},"deepEqual")});var p2=N(K=>{"use strict";f();Object.defineProperty(K,"__esModule",{value:!0});function ZC(e){return e&&e.__esModule?e:{default:e}}s(ZC,"_interopRequireDefault");var qC=Object.defineProperty,et=s((e,t)=>qC(e,"name",{value:t,configurable:!0}),"__name"),$C=q0(),JC=ZC($C),xo,$0=(xo=class{constructor(t){this.direction=!1,this.compareProperties=!0;var r,i,n;this.precision=10**-((r=t==null?void 0:t.precision)!=null?r:17),this.direction=(i=t==null?void 0:t.direction)!=null?i:!1,this.compareProperties=(n=t==null?void 0:t.compareProperties)!=null?n:!0}compare(t,r){if(t.type!==r.type||!bo(t,r))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,r.coordinates);case"LineString":return this.compareLine(t.coordinates,r.coordinates);case"Polygon":return this.comparePolygon(t,r);case"GeometryCollection":return this.compareGeometryCollection(t,r);case"Feature":return this.compareFeature(t,r);case"FeatureCollection":return this.compareFeatureCollection(t,r);default:if(t.type.startsWith("Multi")){let i=Ep(t),n=Ep(r);return i.every(o=>n.some(a=>this.compare(o,a)))}}return!1}compareCoord(t,r){return t.length===r.length&&t.every((i,n)=>Math.abs(i-r[n])<this.precision)}compareLine(t,r,i=0,n=!1){if(!bo(t,r))return!1;let o=t,a=r;if(n&&!this.compareCoord(o[0],a[0])){let c=this.fixStartIndex(a,o);if(c)a=c;else return!1}let l=this.compareCoord(o[i],a[i]);return this.direction||l?this.comparePath(o,a):this.compareCoord(o[i],a[a.length-(1+i)])?this.comparePath(o.slice().reverse(),a):!1}fixStartIndex(t,r){let i,n=-1;for(let o=0;o<t.length;o++)if(this.compareCoord(t[o],r[0])){n=o;break}return n>=0&&(i=[].concat(t.slice(n,t.length),t.slice(1,n+1))),i}comparePath(t,r){return t.every((i,n)=>this.compareCoord(i,r[n]))}comparePolygon(t,r){if(this.compareLine(t.coordinates[0],r.coordinates[0],1,!0)){let i=t.coordinates.slice(1,t.coordinates.length),n=r.coordinates.slice(1,r.coordinates.length);return i.every(o=>n.some(a=>this.compareLine(o,a,1,!0)))}return!1}compareGeometryCollection(t,r){return bo(t.geometries,r.geometries)&&this.compareBBox(t,r)&&t.geometries.every((i,n)=>this.compare(i,r.geometries[n]))}compareFeature(t,r){return t.id===r.id&&(this.compareProperties?JC.default.call(void 0,t.properties,r.properties):!0)&&this.compareBBox(t,r)&&this.compare(t.geometry,r.geometry)}compareFeatureCollection(t,r){return bo(t.features,r.features)&&this.compareBBox(t,r)&&t.features.every((i,n)=>this.compare(i,r.features[n]))}compareBBox(t,r){return!t.bbox&&!r.bbox||(t.bbox&&r.bbox?this.compareCoord(t.bbox,r.bbox):!1)}},s(xo,"_GeojsonEquality"),xo);et($0,"GeojsonEquality");var KC=$0;function bo(e,t){return e.coordinates?e.coordinates.length===t.coordinates.length:e.length===t.length}s(bo,"sameLength");et(bo,"sameLength");function Ep(e){return e.coordinates.map(t=>({type:e.type.replace("Multi",""),coordinates:t}))}s(Ep,"explode");et(Ep,"explode");var ee=63710088e-1,Lp={centimeters:ee*100,centimetres:ee*100,degrees:360/(2*Math.PI),feet:ee*3.28084,inches:ee*39.37,kilometers:ee/1e3,kilometres:ee/1e3,meters:ee,metres:ee,miles:ee/1609.344,millimeters:ee*1e3,millimetres:ee*1e3,nauticalmiles:ee/1852,radians:1,yards:ee*1.0936},_p={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 er(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(er,"feature");et(er,"feature");function J0(e,t,r={}){switch(e){case"Point":return al(t).geometry;case"LineString":return ll(t).geometry;case"Polygon":return sl(t).geometry;case"MultiPoint":return Dp(t).geometry;case"MultiLineString":return Op(t).geometry;case"MultiPolygon":return Ap(t).geometry;default:throw new Error(e+" is invalid")}}s(J0,"geometry");et(J0,"geometry");function al(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Co(e[0])||!Co(e[1]))throw new Error("coordinates must contain numbers");return er({type:"Point",coordinates:e},t,r)}s(al,"point");et(al,"point");function K0(e,t,r={}){return So(e.map(i=>al(i,t)),r)}s(K0,"points");et(K0,"points");function sl(e,t,r={}){for(let n of e){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<n[n.length-1].length;o++)if(n[n.length-1][o]!==n[0][o])throw new Error("First and last Position are not equivalent.")}return er({type:"Polygon",coordinates:e},t,r)}s(sl,"polygon");et(sl,"polygon");function Q0(e,t,r={}){return So(e.map(i=>sl(i,t)),r)}s(Q0,"polygons");et(Q0,"polygons");function ll(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return er({type:"LineString",coordinates:e},t,r)}s(ll,"lineString");et(ll,"lineString");function t2(e,t,r={}){return So(e.map(i=>ll(i,t)),r)}s(t2,"lineStrings");et(t2,"lineStrings");function So(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(So,"featureCollection");et(So,"featureCollection");function Op(e,t,r={}){return er({type:"MultiLineString",coordinates:e},t,r)}s(Op,"multiLineString");et(Op,"multiLineString");function Dp(e,t,r={}){return er({type:"MultiPoint",coordinates:e},t,r)}s(Dp,"multiPoint");et(Dp,"multiPoint");function Ap(e,t,r={}){return er({type:"MultiPolygon",coordinates:e},t,r)}s(Ap,"multiPolygon");et(Ap,"multiPolygon");function e2(e,t,r={}){return er({type:"GeometryCollection",geometries:e},t,r)}s(e2,"geometryCollection");et(e2,"geometryCollection");function r2(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}s(r2,"round");et(r2,"round");function Np(e,t="kilometers"){let r=Lp[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(Np,"radiansToLength");et(Np,"radiansToLength");function cl(e,t="kilometers"){let r=Lp[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(cl,"lengthToRadians");et(cl,"lengthToRadians");function i2(e,t){return kp(cl(e,t))}s(i2,"lengthToDegrees");et(i2,"lengthToDegrees");function n2(e){let t=e%360;return t<0&&(t+=360),t}s(n2,"bearingToAzimuth");et(n2,"bearingToAzimuth");function kp(e){return e%(2*Math.PI)*180/Math.PI}s(kp,"radiansToDegrees");et(kp,"radiansToDegrees");function o2(e){return e%360*Math.PI/180}s(o2,"degreesToRadians");et(o2,"degreesToRadians");function a2(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return Np(cl(e,t),r)}s(a2,"convertLength");et(a2,"convertLength");function s2(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=_p[t];if(!i)throw new Error("invalid original units");let n=_p[r];if(!n)throw new Error("invalid final units");return e/i*n}s(s2,"convertArea");et(s2,"convertArea");function Co(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(Co,"isNumber");et(Co,"isNumber");function l2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}s(l2,"isObject");et(l2,"isObject");function c2(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!Co(t))throw new Error("bbox must only contain numbers")})}s(c2,"validateBBox");et(c2,"validateBBox");function u2(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")}s(u2,"validateId");et(u2,"validateId");K.GeojsonEquality=KC;K.areaFactors=_p;K.bearingToAzimuth=n2;K.convertArea=s2;K.convertLength=a2;K.degreesToRadians=o2;K.earthRadius=ee;K.factors=Lp;K.feature=er;K.featureCollection=So;K.geometry=J0;K.geometryCollection=e2;K.isNumber=Co;K.isObject=l2;K.lengthToDegrees=i2;K.lengthToRadians=cl;K.lineString=ll;K.lineStrings=t2;K.multiLineString=Op;K.multiPoint=Dp;K.multiPolygon=Ap;K.point=al;K.points=K0;K.polygon=sl;K.polygons=Q0;K.radiansToDegrees=kp;K.radiansToLength=Np;K.round=r2;K.validateBBox=c2;K.validateId=u2});var S2=N(Tt=>{"use strict";f();Object.defineProperty(Tt,"__esModule",{value:!0});var QC=Object.defineProperty,kt=s((e,t)=>QC(e,"name",{value:t,configurable:!0}),"__name"),Ht=p2();function cn(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,y=0,m,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,m=h?h.type==="GeometryCollection":!1,l=m?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=m?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,y,C,T,w)===!1)return!1;y++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],y,C,T,w)===!1)return!1;y++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],y,C,T,w)===!1)return!1;y++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],y,C,T,w)===!1)return!1;y++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(cn(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(cn,"coordEach");kt(cn,"coordEach");function h2(e,t,r,i){var n=r;return cn(e,function(o,a,l,c,h){a===0&&r===void 0?n=o:n=t(n,o,a,l,c,h)},i),n}s(h2,"coordReduce");kt(h2,"coordReduce");function Rp(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}s(Rp,"propEach");kt(Rp,"propEach");function f2(e,t,r){var i=r;return Rp(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(f2,"propReduce");kt(f2,"propReduce");function Fp(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(Fp,"featureEach");kt(Fp,"featureEach");function d2(e,t,r){var i=r;return Fp(e,function(n,o){o===0&&r===void 0?i=n:i=t(i,n,o)}),i}s(d2,"featureReduce");kt(d2,"featureReduce");function m2(e){var t=[];return cn(e,function(r){t.push(r)}),t}s(m2,"coordAll");kt(m2,"coordAll");function ul(e,t){var r,i,n,o,a,l,c,h,d,y,m=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,y=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,m,h,d,y)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,m,h,d,y)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],m,h,d,y)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}m++}}s(ul,"geomEach");kt(ul,"geomEach");function y2(e,t,r){var i=r;return ul(e,function(n,o,a,l,c){o===0&&r===void 0?i=n:i=t(i,n,o,a,l,c)}),i}s(y2,"geomReduce");kt(y2,"geomReduce");function Po(e,t){ul(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(Ht.feature.call(void 0,r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],y={type:c,coordinates:d};if(t(Ht.feature.call(void 0,y,n),i,h)===!1)return!1}})}s(Po,"flattenEach");kt(Po,"flattenEach");function g2(e,t,r){var i=r;return Po(e,function(n,o,a){o===0&&a===0&&r===void 0?i=n:i=t(i,n,o,a)}),i}s(g2,"flattenReduce");kt(g2,"flattenReduce");function Bp(e,t){Po(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(cn(r,function(y,m,x,S,P){if(l===void 0||i>c||S>h||P>d){l=y,c=i,h=S,d=P,o=0;return}var g=Ht.lineString.call(void 0,[l,y],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=y})===!1)return!1}}})}s(Bp,"segmentEach");kt(Bp,"segmentEach");function v2(e,t,r){var i=r,n=!1;return Bp(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(v2,"segmentReduce");kt(v2,"segmentReduce");function Gp(e,t){if(!e)throw new Error("geojson is required");Po(e,function(r,i,n){if(r.geometry!==null){var o=r.geometry.type,a=r.geometry.coordinates;switch(o){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<a.length;l++)if(t(Ht.lineString.call(void 0,a[l],r.properties),i,n,l)===!1)return!1;break}}})}s(Gp,"lineEach");kt(Gp,"lineEach");function b2(e,t,r){var i=r;return Gp(e,function(n,o,a,l){o===0&&r===void 0?i=n:i=t(i,n,o,a,l)}),i}s(b2,"lineReduce");kt(b2,"lineReduce");function C2(e,t){if(t=t||{},!Ht.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=c.length+o-1),Ht.lineString.call(void 0,[c[o],c[o+1]],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o-1),Ht.lineString.call(void 0,[c[n][o],c[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o-1),Ht.lineString.call(void 0,[c[i][o],c[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o-1),Ht.lineString.call(void 0,[c[i][n][o],c[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}s(C2,"findSegment");kt(C2,"findSegment");function x2(e,t){if(t=t||{},!Ht.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,l;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),a=a||e.features[r].properties,l=e.features[r].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var c=l.coordinates;switch(l.type){case"Point":return Ht.point.call(void 0,c,a,t);case"MultiPoint":return i<0&&(i=c.length+i),Ht.point.call(void 0,c[i],a,t);case"LineString":return o<0&&(o=c.length+o),Ht.point.call(void 0,c[o],a,t);case"Polygon":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o),Ht.point.call(void 0,c[n][o],a,t);case"MultiLineString":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),Ht.point.call(void 0,c[i][o],a,t);case"MultiPolygon":return i<0&&(i=c.length+i),n<0&&(n=c[i].length+n),o<0&&(o=c[i][n].length-o),Ht.point.call(void 0,c[i][n][o],a,t)}throw new Error("geojson is invalid")}s(x2,"findPoint");kt(x2,"findPoint");Tt.coordAll=m2;Tt.coordEach=cn;Tt.coordReduce=h2;Tt.featureEach=Fp;Tt.featureReduce=d2;Tt.findPoint=x2;Tt.findSegment=C2;Tt.flattenEach=Po;Tt.flattenReduce=g2;Tt.geomEach=ul;Tt.geomReduce=y2;Tt.lineEach=Gp;Tt.lineReduce=b2;Tt.propEach=Rp;Tt.propReduce=f2;Tt.segmentEach=Bp;Tt.segmentReduce=v2});var P2=N(pl=>{"use strict";f();Object.defineProperty(pl,"__esModule",{value:!0});var t6=Object.defineProperty,e6=s((e,t)=>t6(e,"name",{value:t,configurable:!0}),"__name"),r6=S2();function Vp(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return r6.coordEach.call(void 0,e,i=>{r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}s(Vp,"bbox");e6(Vp,"bbox");var i6=Vp;pl.bbox=Vp;pl.default=i6});var E2=N((v_,Hp)=>{f();var Ve=Sm(),w2=lu(),T2=Dm(),un=P2().default,n6=T2.featureEach,y_=T2.coordEach,g_=w2.polygon,M2=w2.featureCollection;function I2(e){var t=new Ve(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:un(r),Ve.prototype.insert.call(this,r)},t.load=function(r){var i=[];return Array.isArray(r)?r.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:un(n),i.push(n)}):n6(r,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:un(n),i.push(n)}),Ve.prototype.load.call(this,i)},t.remove=function(r,i){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:un(r),Ve.prototype.remove.call(this,r,i)},t.clear=function(){return Ve.prototype.clear.call(this)},t.search=function(r){var i=Ve.prototype.search.call(this,this.toBBox(r));return M2(i)},t.collides=function(r){return Ve.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=Ve.prototype.all.call(this);return M2(r)},t.toJSON=function(){return Ve.prototype.toJSON.call(this)},t.fromJSON=function(r){return Ve.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var i;if(r.bbox)i=r.bbox;else if(Array.isArray(r)&&r.length===4)i=r;else if(Array.isArray(r)&&r.length===6)i=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")i=un(r);else if(r.type==="FeatureCollection")i=un(r);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},t}s(I2,"geojsonRbush");Hp.exports=I2;Hp.exports.default=I2});var kv=N((qo,_n)=>{f();var q6=200,dv="__lodash_hash_undefined__",$6=800,J6=16,mv=9007199254740991,yv="[object Arguments]",K6="[object Array]",Q6="[object AsyncFunction]",t8="[object Boolean]",e8="[object Date]",r8="[object Error]",gv="[object Function]",i8="[object GeneratorFunction]",n8="[object Map]",o8="[object Number]",a8="[object Null]",vv="[object Object]",s8="[object Proxy]",l8="[object RegExp]",c8="[object Set]",u8="[object String]",p8="[object Undefined]",h8="[object WeakMap]",f8="[object ArrayBuffer]",d8="[object DataView]",m8="[object Float32Array]",y8="[object Float64Array]",g8="[object Int8Array]",v8="[object Int16Array]",b8="[object Int32Array]",C8="[object Uint8Array]",x8="[object Uint8ClampedArray]",S8="[object Uint16Array]",P8="[object Uint32Array]",M8=/[\\^$.*+?()[\]{}|]/g,w8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,ct={};ct[m8]=ct[y8]=ct[g8]=ct[v8]=ct[b8]=ct[C8]=ct[x8]=ct[S8]=ct[P8]=!0;ct[yv]=ct[K6]=ct[f8]=ct[t8]=ct[d8]=ct[e8]=ct[r8]=ct[gv]=ct[n8]=ct[o8]=ct[vv]=ct[l8]=ct[c8]=ct[u8]=ct[h8]=!1;var bv=typeof global=="object"&&global&&global.Object===Object&&global,I8=typeof self=="object"&&self&&self.Object===Object&&self,Ko=bv||I8||Function("return this")(),Cv=typeof qo=="object"&&qo&&!qo.nodeType&&qo,$o=Cv&&typeof _n=="object"&&_n&&!_n.nodeType&&_n,xv=$o&&$o.exports===Cv,Dh=xv&&bv.process,ov=function(){try{var e=$o&&$o.require&&$o.require("util").types;return e||Dh&&Dh.binding&&Dh.binding("util")}catch{}}(),av=ov&&ov.isTypedArray;function Sv(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}s(Sv,"apply");function E8(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}s(E8,"baseTimes");function _8(e){return function(t){return e(t)}}s(_8,"baseUnary");function L8(e,t){return e==null?void 0:e[t]}s(L8,"getValue");function O8(e,t){return function(r){return e(t(r))}}s(O8,"overArg");var D8=Array.prototype,A8=Function.prototype,_l=Object.prototype,Ah=Ko["__core-js_shared__"],Ll=A8.toString,fr=_l.hasOwnProperty,sv=function(){var e=/[^.]+$/.exec(Ah&&Ah.keys&&Ah.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pv=_l.toString,N8=Ll.call(Object),k8=RegExp("^"+Ll.call(fr).replace(M8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Il=xv?Ko.Buffer:void 0,lv=Ko.Symbol,cv=Ko.Uint8Array,uv=Il?Il.allocUnsafe:void 0,Mv=O8(Object.getPrototypeOf,Object),pv=Object.create,R8=_l.propertyIsEnumerable,F8=D8.splice,Si=lv?lv.toStringTag:void 0,El=function(){try{var e=Vh(Object,"defineProperty");return e({},"",{}),e}catch{}}(),B8=Il?Il.isBuffer:void 0,hv=Math.max,G8=Date.now,wv=Vh(Ko,"Map"),Jo=Vh(Object,"create"),V8=function(){function e(){}return s(e,"object"),function(t){if(!hr(t))return{};if(pv)return pv(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(Pi,"Hash");function H8(){this.__data__=Jo?Jo(null):{},this.size=0}s(H8,"hashClear");function X8(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}s(X8,"hashDelete");function Y8(e){var t=this.__data__;if(Jo){var r=t[e];return r===dv?void 0:r}return fr.call(t,e)?t[e]:void 0}s(Y8,"hashGet");function j8(e){var t=this.__data__;return Jo?t[e]!==void 0:fr.call(t,e)}s(j8,"hashHas");function z8(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Jo&&t===void 0?dv:t,this}s(z8,"hashSet");Pi.prototype.clear=H8;Pi.prototype.delete=X8;Pi.prototype.get=Y8;Pi.prototype.has=j8;Pi.prototype.set=z8;function dr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(dr,"ListCache");function U8(){this.__data__=[],this.size=0}s(U8,"listCacheClear");function W8(e){var t=this.__data__,r=Ol(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():F8.call(t,r,1),--this.size,!0}s(W8,"listCacheDelete");function Z8(e){var t=this.__data__,r=Ol(t,e);return r<0?void 0:t[r][1]}s(Z8,"listCacheGet");function q8(e){return Ol(this.__data__,e)>-1}s(q8,"listCacheHas");function $8(e,t){var r=this.__data__,i=Ol(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}s($8,"listCacheSet");dr.prototype.clear=U8;dr.prototype.delete=W8;dr.prototype.get=Z8;dr.prototype.has=q8;dr.prototype.set=$8;function Ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}s(Ln,"MapCache");function J8(){this.size=0,this.__data__={hash:new Pi,map:new(wv||dr),string:new Pi}}s(J8,"mapCacheClear");function K8(e){var t=Al(this,e).delete(e);return this.size-=t?1:0,t}s(K8,"mapCacheDelete");function Q8(e){return Al(this,e).get(e)}s(Q8,"mapCacheGet");function t9(e){return Al(this,e).has(e)}s(t9,"mapCacheHas");function e9(e,t){var r=Al(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}s(e9,"mapCacheSet");Ln.prototype.clear=J8;Ln.prototype.delete=K8;Ln.prototype.get=Q8;Ln.prototype.has=t9;Ln.prototype.set=e9;function On(e){var t=this.__data__=new dr(e);this.size=t.size}s(On,"Stack");function r9(){this.__data__=new dr,this.size=0}s(r9,"stackClear");function i9(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}s(i9,"stackDelete");function n9(e){return this.__data__.get(e)}s(n9,"stackGet");function o9(e){return this.__data__.has(e)}s(o9,"stackHas");function a9(e,t){var r=this.__data__;if(r instanceof dr){var i=r.__data__;if(!wv||i.length<q6-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ln(i)}return r.set(e,t),this.size=r.size,this}s(a9,"stackSet");On.prototype.clear=r9;On.prototype.delete=i9;On.prototype.get=n9;On.prototype.has=o9;On.prototype.set=a9;function s9(e,t){var r=Fh(e),i=!r&&Rh(e),n=!r&&!i&&Lv(e),o=!r&&!i&&!n&&Dv(e),a=r||i||n||o,l=a?E8(e.length,String):[],c=l.length;for(var h in e)(t||fr.call(e,h))&&!(a&&(h=="length"||n&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ev(h,c)))&&l.push(h);return l}s(s9,"arrayLikeKeys");function Nh(e,t,r){(r!==void 0&&!Nl(e[t],r)||r===void 0&&!(t in e))&&Bh(e,t,r)}s(Nh,"assignMergeValue");function l9(e,t,r){var i=e[t];(!(fr.call(e,t)&&Nl(i,r))||r===void 0&&!(t in e))&&Bh(e,t,r)}s(l9,"assignValue");function Ol(e,t){for(var r=e.length;r--;)if(Nl(e[r][0],t))return r;return-1}s(Ol,"assocIndexOf");function Bh(e,t,r){t=="__proto__"&&El?El(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Bh,"baseAssignValue");var c9=x9();function Dl(e){return e==null?e===void 0?p8:a8:Si&&Si in Object(e)?S9(e):E9(e)}s(Dl,"baseGetTag");function fv(e){return Qo(e)&&Dl(e)==yv}s(fv,"baseIsArguments");function u9(e){if(!hr(e)||T9(e))return!1;var t=Xh(e)?k8:w8;return t.test(D9(e))}s(u9,"baseIsNative");function p9(e){return Qo(e)&&Ov(e.length)&&!!ct[Dl(e)]}s(p9,"baseIsTypedArray");function h9(e){if(!hr(e))return I9(e);var t=_v(e),r=[];for(var i in e)i=="constructor"&&(t||!fr.call(e,i))||r.push(i);return r}s(h9,"baseKeysIn");function Gh(e,t,r,i,n){e!==t&&c9(t,function(o,a){if(n||(n=new On),hr(o))f9(e,t,a,r,Gh,i,n);else{var l=i?i(kh(e,a),o,a+"",e,t,n):void 0;l===void 0&&(l=o),Nh(e,a,l)}},Av)}s(Gh,"baseMerge");function f9(e,t,r,i,n,o,a){var l=kh(e,r),c=kh(t,r),h=a.get(c);if(h){Nh(e,r,h);return}var d=o?o(l,c,r+"",e,t,a):void 0,y=d===void 0;if(y){var m=Fh(c),x=!m&&Lv(c),S=!m&&!x&&Dv(c);d=c,m||x||S?Fh(l)?d=l:A9(l)?d=v9(l):x?(y=!1,d=m9(c,!0)):S?(y=!1,d=g9(c,!0)):d=[]:N9(c)||Rh(c)?(d=l,Rh(l)?d=k9(l):(!hr(l)||Xh(l))&&(d=P9(c))):y=!1}y&&(a.set(c,d),n(d,c,i,o,a),a.delete(c)),Nh(e,r,d)}s(f9,"baseMergeDeep");function Tv(e,t){return L9(_9(e,t,Nv),e+"")}s(Tv,"baseRest");var d9=El?function(e,t){return El(e,"toString",{configurable:!0,enumerable:!1,value:B9(t),writable:!0})}:Nv;function m9(e,t){if(t)return e.slice();var r=e.length,i=uv?uv(r):new e.constructor(r);return e.copy(i),i}s(m9,"cloneBuffer");function y9(e){var t=new e.constructor(e.byteLength);return new cv(t).set(new cv(e)),t}s(y9,"cloneArrayBuffer");function g9(e,t){var r=t?y9(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}s(g9,"cloneTypedArray");function v9(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}s(v9,"copyArray");function b9(e,t,r,i){var n=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var l=t[o],c=i?i(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),n?Bh(r,l,c):l9(r,l,c)}return r}s(b9,"copyObject");function C9(e){return Tv(function(t,r){var i=-1,n=r.length,o=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(n--,o):void 0,a&&M9(r[0],r[1],a)&&(o=n<3?void 0:o,n=1),t=Object(t);++i<n;){var l=r[i];l&&e(t,l,i,o)}return t})}s(C9,"createAssigner");function x9(e){return function(t,r,i){for(var n=-1,o=Object(t),a=i(t),l=a.length;l--;){var c=a[e?l:++n];if(r(o[c],c,o)===!1)break}return t}}s(x9,"createBaseFor");function Iv(e,t,r,i,n,o){return hr(e)&&hr(t)&&(o.set(t,e),Gh(e,t,void 0,Iv,o),o.delete(t)),e}s(Iv,"customDefaultsMerge");function Al(e,t){var r=e.__data__;return w9(t)?r[typeof t=="string"?"string":"hash"]:r.map}s(Al,"getMapData");function Vh(e,t){var r=L8(e,t);return u9(r)?r:void 0}s(Vh,"getNative");function S9(e){var t=fr.call(e,Si),r=e[Si];try{e[Si]=void 0;var i=!0}catch{}var n=Pv.call(e);return i&&(t?e[Si]=r:delete e[Si]),n}s(S9,"getRawTag");function P9(e){return typeof e.constructor=="function"&&!_v(e)?V8(Mv(e)):{}}s(P9,"initCloneObject");function Ev(e,t){var r=typeof e;return t=t==null?mv:t,!!t&&(r=="number"||r!="symbol"&&T8.test(e))&&e>-1&&e%1==0&&e<t}s(Ev,"isIndex");function M9(e,t,r){if(!hr(r))return!1;var i=typeof t;return(i=="number"?Hh(r)&&Ev(t,r.length):i=="string"&&t in r)?Nl(r[t],e):!1}s(M9,"isIterateeCall");function w9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}s(w9,"isKeyable");function T9(e){return!!sv&&sv in e}s(T9,"isMasked");function _v(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_l;return e===r}s(_v,"isPrototype");function I9(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}s(I9,"nativeKeysIn");function E9(e){return Pv.call(e)}s(E9,"objectToString");function _9(e,t,r){return t=hv(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,o=hv(i.length-t,0),a=Array(o);++n<o;)a[n]=i[t+n];n=-1;for(var l=Array(t+1);++n<t;)l[n]=i[n];return l[t]=r(a),Sv(e,this,l)}}s(_9,"overRest");function kh(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}s(kh,"safeGet");var L9=O9(d9);function O9(e){var t=0,r=0;return function(){var i=G8(),n=J6-(i-r);if(r=i,n>0){if(++t>=$6)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}s(O9,"shortOut");function D9(e){if(e!=null){try{return Ll.call(e)}catch{}try{return e+""}catch{}}return""}s(D9,"toSource");function Nl(e,t){return e===t||e!==e&&t!==t}s(Nl,"eq");var Rh=fv(function(){return arguments}())?fv:function(e){return Qo(e)&&fr.call(e,"callee")&&!R8.call(e,"callee")},Fh=Array.isArray;function Hh(e){return e!=null&&Ov(e.length)&&!Xh(e)}s(Hh,"isArrayLike");function A9(e){return Qo(e)&&Hh(e)}s(A9,"isArrayLikeObject");var Lv=B8||G9;function Xh(e){if(!hr(e))return!1;var t=Dl(e);return t==gv||t==i8||t==Q6||t==s8}s(Xh,"isFunction");function Ov(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mv}s(Ov,"isLength");function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}s(hr,"isObject");function Qo(e){return e!=null&&typeof e=="object"}s(Qo,"isObjectLike");function N9(e){if(!Qo(e)||Dl(e)!=vv)return!1;var t=Mv(e);if(t===null)return!0;var r=fr.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ll.call(r)==N8}s(N9,"isPlainObject");var Dv=av?_8(av):p9;function k9(e){return b9(e,Av(e))}s(k9,"toPlainObject");var R9=Tv(function(e){return e.push(void 0,Iv),Sv(F9,void 0,e)});function Av(e){return Hh(e)?s9(e,!0):h9(e)}s(Av,"keysIn");var F9=C9(function(e,t,r,i){Gh(e,t,r,i)});function B9(e){return function(){return e}}s(B9,"constant");function Nv(e){return e}s(Nv,"identity");function G9(){return!1}s(G9,"stubFalse");_n.exports=R9});var fb=N((oR,ua)=>{"use strict";f();var ax=!1,Ii=!1,ab=!0,sb=!1,p={},lb=!1;typeof ua<"u"&&ua.exports?(ua.exports=p,lb=!0):typeof document<"u"?window.ClipperLib=p:self.ClipperLib=p;var Ul;lb?(_t="chrome",Ul="Netscape"):(_t=navigator.userAgent.toString().toLowerCase(),Ul=navigator.appName);var _t,W={};_t.indexOf("chrome")!=-1&&_t.indexOf("chromium")==-1?W.chrome=1:W.chrome=0;_t.indexOf("chromium")!=-1?W.chromium=1:W.chromium=0;_t.indexOf("safari")!=-1&&_t.indexOf("chrome")==-1&&_t.indexOf("chromium")==-1?W.safari=1:W.safari=0;_t.indexOf("firefox")!=-1?W.firefox=1:W.firefox=0;_t.indexOf("firefox/17")!=-1?W.firefox17=1:W.firefox17=0;_t.indexOf("firefox/15")!=-1?W.firefox15=1:W.firefox15=0;_t.indexOf("firefox/3")!=-1?W.firefox3=1:W.firefox3=0;_t.indexOf("opera")!=-1?W.opera=1:W.opera=0;_t.indexOf("msie 10")!=-1?W.msie10=1:W.msie10=0;_t.indexOf("msie 9")!=-1?W.msie9=1:W.msie9=0;_t.indexOf("msie 8")!=-1?W.msie8=1:W.msie8=0;_t.indexOf("msie 7")!=-1?W.msie7=1:W.msie7=0;_t.indexOf("msie ")!=-1?W.msie=1:W.msie=0;p.biginteger_used=null;var Ur,sx=0xdeadbeefcafe,nb=(sx&16777215)==15715070;function O(e,t,r){p.biginteger_used=1,e!=null&&(typeof e=="number"&&typeof t>"u"?this.fromInt(e):typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}s(O,"BigInteger");function q(){return new O(null)}s(q,"nbi");function lx(e,t,r,i,n,o){for(;--o>=0;){var a=t*this[e++]+r[i]+n;n=Math.floor(a/67108864),r[i++]=a&67108863}return n}s(lx,"am1");function cx(e,t,r,i,n,o){for(var a=t&32767,l=t>>15;--o>=0;){var c=this[e]&32767,h=this[e++]>>15,d=l*c+h*a;c=a*c+((d&32767)<<15)+r[i]+(n&1073741823),n=(c>>>30)+(d>>>15)+l*h+(n>>>30),r[i++]=c&1073741823}return n}s(cx,"am2");function ux(e,t,r,i,n,o){for(var a=t&16383,l=t>>14;--o>=0;){var c=this[e]&16383,h=this[e++]>>14,d=l*c+h*a;c=a*c+((d&16383)<<14)+r[i]+n,n=(c>>28)+(d>>14)+l*h,r[i++]=c&268435455}return n}s(ux,"am3");nb&&Ul=="Microsoft Internet Explorer"?(O.prototype.am=cx,Ur=30):nb&&Ul!="Netscape"?(O.prototype.am=lx,Ur=26):(O.prototype.am=ux,Ur=28);O.prototype.DB=Ur;O.prototype.DM=(1<<Ur)-1;O.prototype.DV=1<<Ur;var rf=52;O.prototype.FV=Math.pow(2,rf);O.prototype.F1=rf-Ur;O.prototype.F2=2*Ur-rf;var px="0123456789abcdefghijklmnopqrstuvwxyz",Zl=new Array,Nn,me;Nn=48;for(me=0;me<=9;++me)Zl[Nn++]=me;Nn=97;for(me=10;me<36;++me)Zl[Nn++]=me;Nn=65;for(me=10;me<36;++me)Zl[Nn++]=me;function ob(e){return px.charAt(e)}s(ob,"int2char");function cb(e,t){var r=Zl[e.charCodeAt(t)];return r==null?-1:r}s(cb,"intAt");function hx(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}s(hx,"bnpCopyTo");function fx(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}s(fx,"bnpFromInt");function zr(e){var t=q();return t.fromInt(e),t}s(zr,"nbv");function dx(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var i=e.length,n=!1,o=0;--i>=0;){var a=r==8?e[i]&255:cb(e,i);if(a<0){e.charAt(i)=="-"&&(n=!0);continue}n=!1,o==0?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=r,o>=this.DB&&(o-=this.DB)}r==8&&e[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),n&&O.ZERO.subTo(this,this)}s(dx,"bnpFromString");function mx(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}s(mx,"bnpClamp");function yx(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,n=!1,o="",a=this.t,l=this.DB-a*this.DB%t;if(a-- >0)for(l<this.DB&&(i=this[a]>>l)>0&&(n=!0,o=ob(i));a>=0;)l<t?(i=(this[a]&(1<<l)-1)<<t-l,i|=this[--a]>>(l+=this.DB-t)):(i=this[a]>>(l-=t)&r,l<=0&&(l+=this.DB,--a)),i>0&&(n=!0),n&&(o+=ob(i));return n?o:"0"}s(yx,"bnToString");function gx(){var e=q();return O.ZERO.subTo(this,e),e}s(gx,"bnNegate");function vx(){return this.s<0?this.negate():this}s(vx,"bnAbs");function bx(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}s(bx,"bnCompareTo");function ql(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}s(ql,"nbits");function Cx(){return this.t<=0?0:this.DB*(this.t-1)+ql(this[this.t-1]^this.s&this.DM)}s(Cx,"bnBitLength");function xx(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}s(xx,"bnpDLShiftTo");function Sx(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}s(Sx,"bnpDRShiftTo");function Px(e,t){var r=e%this.DB,i=this.DB-r,n=(1<<i)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,l;for(l=this.t-1;l>=0;--l)t[l+o+1]=this[l]>>i|a,a=(this[l]&n)<<r;for(l=o-1;l>=0;--l)t[l]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()}s(Px,"bnpLShiftTo");function Mx(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB,n=this.DB-i,o=(1<<i)-1;t[0]=this[r]>>i;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<n,t[a-r]=this[a]>>i;i>0&&(t[this.t-r-1]|=(this.s&o)<<n),t.t=this.t-r,t.clamp()}s(Mx,"bnpRShiftTo");function wx(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this[r]-e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i-=e[r],t[r++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()}s(wx,"bnpSubTo");function Tx(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&O.ZERO.subTo(t,t)}s(Tx,"bnpMultiplyTo");function Ix(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}s(Ix,"bnpSquareTo");function Ex(e,t,r){var i=e.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=q());var o=q(),a=this.s,l=e.s,c=this.DB-ql(i[i.t-1]);c>0?(i.lShiftTo(c,o),n.lShiftTo(c,r)):(i.copyTo(o),n.copyTo(r));var h=o.t,d=o[h-1];if(d!=0){var y=d*(1<<this.F1)+(h>1?o[h-2]>>this.F2:0),m=this.FV/y,x=(1<<this.F1)/y,S=1<<this.F2,P=r.t,g=P-h,C=t==null?q():t;for(o.dlShiftTo(g,C),r.compareTo(C)>=0&&(r[r.t++]=1,r.subTo(C,r)),O.ONE.dlShiftTo(h,C),C.subTo(o,o);o.t<h;)o[o.t++]=0;for(;--g>=0;){var M=r[--P]==d?this.DM:Math.floor(r[P]*m+(r[P-1]+S)*x);if((r[P]+=o.am(0,M,r,g,0,h))<M)for(o.dlShiftTo(g,C),r.subTo(C,r);r[P]<--M;)r.subTo(C,r)}t!=null&&(r.drShiftTo(h,t),a!=l&&O.ZERO.subTo(t,t)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&O.ZERO.subTo(r,r)}}}s(Ex,"bnpDivRemTo");function _x(e){var t=q();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(O.ZERO)>0&&e.subTo(t,t),t}s(_x,"bnMod");function Ei(e){this.m=e}s(Ei,"Classic");function Lx(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}s(Lx,"cConvert");function Ox(e){return e}s(Ox,"cRevert");function Dx(e){e.divRemTo(this.m,null,e)}s(Dx,"cReduce");function Ax(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(Ax,"cMulTo");function Nx(e,t){e.squareTo(t),this.reduce(t)}s(Nx,"cSqrTo");Ei.prototype.convert=Lx;Ei.prototype.revert=Ox;Ei.prototype.reduce=Dx;Ei.prototype.mulTo=Ax;Ei.prototype.sqrTo=Nx;function kx(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}s(kx,"bnpInvDigit");function _i(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}s(_i,"Montgomery");function Rx(e){var t=q();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(O.ZERO)>0&&this.m.subTo(t,t),t}s(Rx,"montConvert");function Fx(e){var t=q();return e.copyTo(t),this.reduce(t),t}s(Fx,"montRevert");function Bx(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}s(Bx,"montReduce");function Gx(e,t){e.squareTo(t),this.reduce(t)}s(Gx,"montSqrTo");function Vx(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(Vx,"montMulTo");_i.prototype.convert=Rx;_i.prototype.revert=Fx;_i.prototype.reduce=Bx;_i.prototype.mulTo=Vx;_i.prototype.sqrTo=Gx;function Hx(){return(this.t>0?this[0]&1:this.s)==0}s(Hx,"bnpIsEven");function Xx(e,t){if(e>4294967295||e<1)return O.ONE;var r=q(),i=q(),n=t.convert(this),o=ql(e)-1;for(n.copyTo(r);--o>=0;)if(t.sqrTo(r,i),(e&1<<o)>0)t.mulTo(i,n,r);else{var a=r;r=i,i=a}return t.revert(r)}s(Xx,"bnpExp");function Yx(e,t){var r;return e<256||t.isEven()?r=new Ei(t):r=new _i(t),this.exp(e,r)}s(Yx,"bnModPowInt");O.prototype.copyTo=hx;O.prototype.fromInt=fx;O.prototype.fromString=dx;O.prototype.clamp=mx;O.prototype.dlShiftTo=xx;O.prototype.drShiftTo=Sx;O.prototype.lShiftTo=Px;O.prototype.rShiftTo=Mx;O.prototype.subTo=wx;O.prototype.multiplyTo=Tx;O.prototype.squareTo=Ix;O.prototype.divRemTo=Ex;O.prototype.invDigit=kx;O.prototype.isEven=Hx;O.prototype.exp=Xx;O.prototype.toString=yx;O.prototype.negate=gx;O.prototype.abs=vx;O.prototype.compareTo=bx;O.prototype.bitLength=Cx;O.prototype.mod=_x;O.prototype.modPowInt=Yx;O.ZERO=zr(0);O.ONE=zr(1);function jx(){var e=q();return this.copyTo(e),e}s(jx,"bnClone");function zx(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}s(zx,"bnIntValue");function Ux(){return this.t==0?this.s:this[0]<<24>>24}s(Ux,"bnByteValue");function Wx(){return this.t==0?this.s:this[0]<<16>>16}s(Wx,"bnShortValue");function Zx(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}s(Zx,"bnpChunkSize");function qx(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}s(qx,"bnSigNum");function $x(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=zr(r),n=q(),o=q(),a="";for(this.divRemTo(i,n,o);n.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,n.divRemTo(i,n,o);return o.intValue().toString(e)+a}s($x,"bnpToRadix");function Jx(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),n=!1,o=0,a=0,l=0;l<e.length;++l){var c=cb(e,l);if(c<0){e.charAt(l)=="-"&&this.signum()==0&&(n=!0);continue}a=t*a+c,++o>=r&&(this.dMultiply(i),this.dAddOffset(a,0),o=0,a=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),n&&O.ZERO.subTo(this,this)}s(Jx,"bnpFromRadix");function Kx(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(O.ONE.shiftLeft(e-1),nf,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(O.ONE.shiftLeft(e-1),this);else{var i=new Array,n=e&7;i.length=(e>>3)+1,t.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}}s(Kx,"bnpFromNumber");function Qx(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,i,n=0;if(e-- >0)for(r<this.DB&&(i=this[e]>>r)!=(this.s&this.DM)>>r&&(t[n++]=i|this.s<<this.DB-r);e>=0;)r<8?(i=(this[e]&(1<<r)-1)<<8-r,i|=this[--e]>>(r+=this.DB-8)):(i=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),i&128&&(i|=-256),n==0&&(this.s&128)!=(i&128)&&++n,(n>0||i!=this.s)&&(t[n++]=i);return t}s(Qx,"bnToByteArray");function tS(e){return this.compareTo(e)==0}s(tS,"bnEquals");function eS(e){return this.compareTo(e)<0?this:e}s(eS,"bnMin");function rS(e){return this.compareTo(e)>0?this:e}s(rS,"bnMax");function iS(e,t,r){var i,n,o=Math.min(e.t,this.t);for(i=0;i<o;++i)r[i]=t(this[i],e[i]);if(e.t<this.t){for(n=e.s&this.DM,i=o;i<this.t;++i)r[i]=t(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=o;i<e.t;++i)r[i]=t(n,e[i]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}s(iS,"bnpBitwiseTo");function nS(e,t){return e&t}s(nS,"op_and");function oS(e){var t=q();return this.bitwiseTo(e,nS,t),t}s(oS,"bnAnd");function nf(e,t){return e|t}s(nf,"op_or");function aS(e){var t=q();return this.bitwiseTo(e,nf,t),t}s(aS,"bnOr");function ub(e,t){return e^t}s(ub,"op_xor");function sS(e){var t=q();return this.bitwiseTo(e,ub,t),t}s(sS,"bnXor");function pb(e,t){return e&~t}s(pb,"op_andnot");function lS(e){var t=q();return this.bitwiseTo(e,pb,t),t}s(lS,"bnAndNot");function cS(){for(var e=q(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}s(cS,"bnNot");function uS(e){var t=q();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}s(uS,"bnShiftLeft");function pS(e){var t=q();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}s(pS,"bnShiftRight");function hS(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}s(hS,"lbit");function fS(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+hS(this[e]);return this.s<0?this.t*this.DB:-1}s(fS,"bnGetLowestSetBit");function dS(e){for(var t=0;e!=0;)e&=e-1,++t;return t}s(dS,"cbit");function mS(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=dS(this[r]^t);return e}s(mS,"bnBitCount");function yS(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}s(yS,"bnTestBit");function gS(e,t){var r=O.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}s(gS,"bnpChangeBit");function vS(e){return this.changeBit(e,nf)}s(vS,"bnSetBit");function bS(e){return this.changeBit(e,pb)}s(bS,"bnClearBit");function CS(e){return this.changeBit(e,ub)}s(CS,"bnFlipBit");function xS(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this[r]+e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i+=e[r],t[r++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()}s(xS,"bnpAddTo");function SS(e){var t=q();return this.addTo(e,t),t}s(SS,"bnAdd");function PS(e){var t=q();return this.subTo(e,t),t}s(PS,"bnSubtract");function MS(e){var t=q();return this.multiplyTo(e,t),t}s(MS,"bnMultiply");function wS(){var e=q();return this.squareTo(e),e}s(wS,"bnSquare");function TS(e){var t=q();return this.divRemTo(e,t,null),t}s(TS,"bnDivide");function IS(e){var t=q();return this.divRemTo(e,null,t),t}s(IS,"bnRemainder");function ES(e){var t=q(),r=q();return this.divRemTo(e,t,r),new Array(t,r)}s(ES,"bnDivideAndRemainder");function _S(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}s(_S,"bnpDMultiply");function LS(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}s(LS,"bnpDAddOffset");function pa(){}s(pa,"NullExp");function hb(e){return e}s(hb,"nNop");function OS(e,t,r){e.multiplyTo(t,r)}s(OS,"nMulTo");function DS(e,t){e.squareTo(t)}s(DS,"nSqrTo");pa.prototype.convert=hb;pa.prototype.revert=hb;pa.prototype.mulTo=OS;pa.prototype.sqrTo=DS;function AS(e){return this.exp(e,new pa)}s(AS,"bnPow");function NS(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}s(NS,"bnpMultiplyLowerTo");function kS(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}s(kS,"bnpMultiplyUpperTo");function kn(e){this.r2=q(),this.q3=q(),O.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}s(kn,"Barrett");function RS(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=q();return e.copyTo(t),this.reduce(t),t}s(RS,"barrettConvert");function FS(e){return e}s(FS,"barrettRevert");function BS(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}s(BS,"barrettReduce");function GS(e,t){e.squareTo(t),this.reduce(t)}s(GS,"barrettSqrTo");function VS(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(VS,"barrettMulTo");kn.prototype.convert=RS;kn.prototype.revert=FS;kn.prototype.reduce=BS;kn.prototype.mulTo=VS;kn.prototype.sqrTo=GS;function HS(e,t){var r=e.bitLength(),i,n=zr(1),o;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?o=new Ei(t):t.isEven()?o=new kn(t):o=new _i(t);var a=new Array,l=3,c=i-1,h=(1<<i)-1;if(a[1]=o.convert(this),i>1){var d=q();for(o.sqrTo(a[1],d);l<=h;)a[l]=q(),o.mulTo(d,a[l-2],a[l]),l+=2}var y=e.t-1,m,x=!0,S=q(),P;for(r=ql(e[y])-1;y>=0;){for(r>=c?m=e[y]>>r-c&h:(m=(e[y]&(1<<r+1)-1)<<c-r,y>0&&(m|=e[y-1]>>this.DB+r-c)),l=i;!(m&1);)m>>=1,--l;if((r-=l)<0&&(r+=this.DB,--y),x)a[m].copyTo(n),x=!1;else{for(;l>1;)o.sqrTo(n,S),o.sqrTo(S,n),l-=2;l>0?o.sqrTo(n,S):(P=n,n=S,S=P),o.mulTo(S,a[m],n)}for(;y>=0&&!(e[y]&1<<r);)o.sqrTo(n,S),P=n,n=S,S=P,--r<0&&(r=this.DB-1,--y)}return o.revert(n)}s(HS,"bnModPow");function XS(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(n<o&&(o=n),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}s(XS,"bnGCD");function YS(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}s(YS,"bnpModInt");function jS(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return O.ZERO;for(var r=e.clone(),i=this.clone(),n=zr(1),o=zr(0),a=zr(0),l=zr(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!o.isEven())&&(n.addTo(this,n),o.subTo(e,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!l.isEven())&&(a.addTo(this,a),l.subTo(e,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(a,n),o.subTo(l,o)):(i.subTo(r,i),t&&a.subTo(n,a),l.subTo(o,l))}if(i.compareTo(O.ONE)!=0)return O.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l}s(jS,"bnModInverse");var Wt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],zS=(1<<26)/Wt[Wt.length-1];function US(e){var t,r=this.abs();if(r.t==1&&r[0]<=Wt[Wt.length-1]){for(t=0;t<Wt.length;++t)if(r[0]==Wt[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Wt.length;){for(var i=Wt[t],n=t+1;n<Wt.length&&i<zS;)i*=Wt[n++];for(i=r.modInt(i);t<n;)if(i%Wt[t++]==0)return!1}return r.millerRabin(e)}s(US,"bnIsProbablePrime");function WS(e){var t=this.subtract(O.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>Wt.length&&(e=Wt.length);for(var n=q(),o=0;o<e;++o){n.fromInt(Wt[Math.floor(Math.random()*Wt.length)]);var a=n.modPow(i,this);if(a.compareTo(O.ONE)!=0&&a.compareTo(t)!=0){for(var l=1;l++<r&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(O.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0}s(WS,"bnpMillerRabin");O.prototype.chunkSize=Zx;O.prototype.toRadix=$x;O.prototype.fromRadix=Jx;O.prototype.fromNumber=Kx;O.prototype.bitwiseTo=iS;O.prototype.changeBit=gS;O.prototype.addTo=xS;O.prototype.dMultiply=_S;O.prototype.dAddOffset=LS;O.prototype.multiplyLowerTo=NS;O.prototype.multiplyUpperTo=kS;O.prototype.modInt=YS;O.prototype.millerRabin=WS;O.prototype.clone=jx;O.prototype.intValue=zx;O.prototype.byteValue=Ux;O.prototype.shortValue=Wx;O.prototype.signum=qx;O.prototype.toByteArray=Qx;O.prototype.equals=tS;O.prototype.min=eS;O.prototype.max=rS;O.prototype.and=oS;O.prototype.or=aS;O.prototype.xor=sS;O.prototype.andNot=lS;O.prototype.not=cS;O.prototype.shiftLeft=uS;O.prototype.shiftRight=pS;O.prototype.getLowestSetBit=fS;O.prototype.bitCount=mS;O.prototype.testBit=yS;O.prototype.setBit=vS;O.prototype.clearBit=bS;O.prototype.flipBit=CS;O.prototype.add=SS;O.prototype.subtract=PS;O.prototype.multiply=MS;O.prototype.divide=TS;O.prototype.remainder=IS;O.prototype.divideAndRemainder=ES;O.prototype.modPow=HS;O.prototype.modInverse=jS;O.prototype.pow=AS;O.prototype.gcd=XS;O.prototype.isProbablePrime=US;O.prototype.square=wS;var U=O;U.prototype.IsNegative=function(){return this.compareTo(U.ZERO)==-1};U.op_Equality=function(e,t){return e.compareTo(t)==0};U.op_Inequality=function(e,t){return e.compareTo(t)!=0};U.op_GreaterThan=function(e,t){return e.compareTo(t)>0};U.op_LessThan=function(e,t){return e.compareTo(t)<0};U.op_Addition=function(e,t){return new U(e).add(new U(t))};U.op_Subtraction=function(e,t){return new U(e).subtract(new U(t))};U.Int128Mul=function(e,t){return new U(e).multiply(new U(t))};U.op_Division=function(e,t){return e.divide(t)};U.prototype.ToDouble=function(){return parseFloat(this.toString())};typeof Wl>"u"&&(Wl=s(function(e,t){var r;if(typeof Object.getOwnPropertyNames>"u"){for(r in t.prototype)(typeof e.prototype[r]>"u"||e.prototype[r]==Object.prototype[r])&&(e.prototype[r]=t.prototype[r]);for(r in t)typeof e[r]>"u"&&(e[r]=t[r]);e.$baseCtor=t}else{for(var i=Object.getOwnPropertyNames(t.prototype),n=0;n<i.length;n++)typeof Object.getOwnPropertyDescriptor(e.prototype,i[n])>"u"&&Object.defineProperty(e.prototype,i[n],Object.getOwnPropertyDescriptor(t.prototype,i[n]));for(r in t)typeof e[r]>"u"&&(e[r]=t[r]);e.$baseCtor=t}},"Inherit"));var Wl;p.Path=function(){return[]};p.Paths=function(){return[]};p.DoublePoint=function(){var e=arguments;this.X=0,this.Y=0,e.length==1?(this.X=e[0].X,this.Y=e[0].Y):e.length==2&&(this.X=e[0],this.Y=e[1])};p.DoublePoint0=function(){this.X=0,this.Y=0};p.DoublePoint1=function(e){this.X=e.X,this.Y=e.Y};p.DoublePoint2=function(e,t){this.X=e,this.Y=t};p.PolyNode=function(){this.m_Parent=null,this.m_polygon=new p.Path,this.m_Index=0,this.m_jointype=0,this.m_endtype=0,this.m_Childs=[],this.IsOpen=!1};p.PolyNode.prototype.IsHoleNode=function(){for(var e=!0,t=this.m_Parent;t!==null;)e=!e,t=t.m_Parent;return e};p.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length};p.PolyNode.prototype.Contour=function(){return this.m_polygon};p.PolyNode.prototype.AddChild=function(e){var t=this.m_Childs.length;this.m_Childs.push(e),e.m_Parent=this,e.m_Index=t};p.PolyNode.prototype.GetNext=function(){return this.m_Childs.length>0?this.m_Childs[0]:this.GetNextSiblingUp()};p.PolyNode.prototype.GetNextSiblingUp=function(){return this.m_Parent===null?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]};p.PolyNode.prototype.Childs=function(){return this.m_Childs};p.PolyNode.prototype.Parent=function(){return this.m_Parent};p.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()};p.PolyTree=function(){this.m_AllPolys=[],p.PolyNode.call(this)};p.PolyTree.prototype.Clear=function(){for(var e=0,t=this.m_AllPolys.length;e<t;e++)this.m_AllPolys[e]=null;this.m_AllPolys.length=0,this.m_Childs.length=0};p.PolyTree.prototype.GetFirst=function(){return this.m_Childs.length>0?this.m_Childs[0]:null};p.PolyTree.prototype.Total=function(){return this.m_AllPolys.length};Wl(p.PolyTree,p.PolyNode);p.Math_Abs_Int64=p.Math_Abs_Int32=p.Math_Abs_Double=function(e){return Math.abs(e)};p.Math_Max_Int32_Int32=function(e,t){return Math.max(e,t)};W.msie||W.opera||W.safari?p.Cast_Int32=function(e){return e|0}:p.Cast_Int32=function(e){return~~e};W.chrome?p.Cast_Int64=function(e){return e<-2147483648||e>2147483647?e<0?Math.ceil(e):Math.floor(e):~~e}:W.firefox&&typeof Number.toInteger=="function"?p.Cast_Int64=function(e){return Number.toInteger(e)}:W.msie7||W.msie8?p.Cast_Int64=function(e){return parseInt(e,10)}:W.msie?p.Cast_Int64=function(e){return e<-2147483648||e>2147483647?e<0?Math.ceil(e):Math.floor(e):e|0}:p.Cast_Int64=function(e){return e<0?Math.ceil(e):Math.floor(e)};p.Clear=function(e){e.length=0};p.PI=3.141592653589793;p.PI2=2*3.141592653589793;p.IntPoint=function(){var e=arguments,t=e.length;if(this.X=0,this.Y=0,Ii)if(this.Z=0,t==3)this.X=e[0],this.Y=e[1],this.Z=e[2];else if(t==2)this.X=e[0],this.Y=e[1],this.Z=0;else if(t==1)if(e[0]instanceof p.DoublePoint){var r=e[0];this.X=p.Clipper.Round(r.X),this.Y=p.Clipper.Round(r.Y),this.Z=0}else{var i=e[0];typeof i.Z>"u"&&(i.Z=0),this.X=i.X,this.Y=i.Y,this.Z=i.Z}else this.X=0,this.Y=0,this.Z=0;else if(t==2)this.X=e[0],this.Y=e[1];else if(t==1)if(e[0]instanceof p.DoublePoint){var r=e[0];this.X=p.Clipper.Round(r.X),this.Y=p.Clipper.Round(r.Y)}else{var i=e[0];this.X=i.X,this.Y=i.Y}else this.X=0,this.Y=0};p.IntPoint.op_Equality=function(e,t){return e.X==t.X&&e.Y==t.Y};p.IntPoint.op_Inequality=function(e,t){return e.X!=t.X||e.Y!=t.Y};Ii?(p.IntPoint0=function(){this.X=0,this.Y=0,this.Z=0},p.IntPoint1=function(e){this.X=e.X,this.Y=e.Y,this.Z=e.Z},p.IntPoint1dp=function(e){this.X=p.Clipper.Round(e.X),this.Y=p.Clipper.Round(e.Y),this.Z=0},p.IntPoint2=function(e,t){this.X=e,this.Y=t,this.Z=0},p.IntPoint3=function(e,t,r){this.X=e,this.Y=t,this.Z=r}):(p.IntPoint0=function(){this.X=0,this.Y=0},p.IntPoint1=function(e){this.X=e.X,this.Y=e.Y},p.IntPoint1dp=function(e){this.X=p.Clipper.Round(e.X),this.Y=p.Clipper.Round(e.Y)},p.IntPoint2=function(e,t){this.X=e,this.Y=t});p.IntRect=function(){var e=arguments,t=e.length;t==4?(this.left=e[0],this.top=e[1],this.right=e[2],this.bottom=e[3]):t==1?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):(this.left=0,this.top=0,this.right=0,this.bottom=0)};p.IntRect0=function(){this.left=0,this.top=0,this.right=0,this.bottom=0};p.IntRect1=function(e){this.left=e.left,this.top=e.top,this.right=e.right,this.bottom=e.bottom};p.IntRect4=function(e,t,r,i){this.left=e,this.top=t,this.right=r,this.bottom=i};p.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3};p.PolyType={ptSubject:0,ptClip:1};p.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3};p.JoinType={jtSquare:0,jtRound:1,jtMiter:2};p.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4};sb&&(p.EndType_={etSquare:0,etRound:1,etButt:2,etClosed:3});p.EdgeSide={esLeft:0,esRight:1};p.Direction={dRightToLeft:0,dLeftToRight:1};p.TEdge=function(){this.Bot=new p.IntPoint,this.Curr=new p.IntPoint,this.Top=new p.IntPoint,this.Delta=new p.IntPoint,this.Dx=0,this.PolyTyp=p.PolyType.ptSubject,this.Side=p.EdgeSide.esLeft,this.WindDelta=0,this.WindCnt=0,this.WindCnt2=0,this.OutIdx=0,this.Next=null,this.Prev=null,this.NextInLML=null,this.NextInAEL=null,this.PrevInAEL=null,this.NextInSEL=null,this.PrevInSEL=null};p.IntersectNode=function(){this.Edge1=null,this.Edge2=null,this.Pt=new p.IntPoint};p.MyIntersectNodeSort=function(){};p.MyIntersectNodeSort.Compare=function(e,t){return t.Pt.Y-e.Pt.Y};p.LocalMinima=function(){this.Y=0,this.LeftBound=null,this.RightBound=null,this.Next=null};p.Scanbeam=function(){this.Y=0,this.Next=null};p.OutRec=function(){this.Idx=0,this.IsHole=!1,this.IsOpen=!1,this.FirstLeft=null,this.Pts=null,this.BottomPt=null,this.PolyNode=null};p.OutPt=function(){this.Idx=0,this.Pt=new p.IntPoint,this.Next=null,this.Prev=null};p.Join=function(){this.OutPt1=null,this.OutPt2=null,this.OffPt=new p.IntPoint};p.ClipperBase=function(){this.m_MinimaList=null,this.m_CurrentLM=null,this.m_edges=new Array,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1,this.PreserveCollinear=!1,this.m_MinimaList=null,this.m_CurrentLM=null,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};p.ClipperBase.horizontal=-9007199254740992;p.ClipperBase.Skip=-2;p.ClipperBase.Unassigned=-1;p.ClipperBase.tolerance=1e-20;ax?(p.ClipperBase.loRange=46340,p.ClipperBase.hiRange=46340):(p.ClipperBase.loRange=47453132,p.ClipperBase.hiRange=0xfffffffffffff);p.ClipperBase.near_zero=function(e){return e>-p.ClipperBase.tolerance&&e<p.ClipperBase.tolerance};p.ClipperBase.IsHorizontal=function(e){return e.Delta.Y===0};p.ClipperBase.prototype.PointIsVertex=function(e,t){var r=t;do{if(p.IntPoint.op_Equality(r.Pt,e))return!0;r=r.Next}while(r!=t);return!1};p.ClipperBase.prototype.PointOnLineSegment=function(e,t,r,i){return i?e.X==t.X&&e.Y==t.Y||e.X==r.X&&e.Y==r.Y||e.X>t.X==e.X<r.X&&e.Y>t.Y==e.Y<r.Y&&U.op_Equality(U.Int128Mul(e.X-t.X,r.Y-t.Y),U.Int128Mul(r.X-t.X,e.Y-t.Y)):e.X==t.X&&e.Y==t.Y||e.X==r.X&&e.Y==r.Y||e.X>t.X==e.X<r.X&&e.Y>t.Y==e.Y<r.Y&&(e.X-t.X)*(r.Y-t.Y)==(r.X-t.X)*(e.Y-t.Y)};p.ClipperBase.prototype.PointOnPolygon=function(e,t,r){for(var i=t;;){if(this.PointOnLineSegment(e,i.Pt,i.Next.Pt,r))return!0;if(i=i.Next,i==t)break}return!1};p.ClipperBase.prototype.SlopesEqual=p.ClipperBase.SlopesEqual=function(){var e=arguments,t=e.length,r,i,n,o,a,l,c;return t==3?(r=e[0],i=e[1],c=e[2],c?U.op_Equality(U.Int128Mul(r.Delta.Y,i.Delta.X),U.Int128Mul(r.Delta.X,i.Delta.Y)):p.Cast_Int64(r.Delta.Y*i.Delta.X)==p.Cast_Int64(r.Delta.X*i.Delta.Y)):t==4?(n=e[0],o=e[1],a=e[2],c=e[3],c?U.op_Equality(U.Int128Mul(n.Y-o.Y,o.X-a.X),U.Int128Mul(n.X-o.X,o.Y-a.Y)):p.Cast_Int64((n.Y-o.Y)*(o.X-a.X))-p.Cast_Int64((n.X-o.X)*(o.Y-a.Y))===0):(n=e[0],o=e[1],a=e[2],l=e[3],c=e[4],c?U.op_Equality(U.Int128Mul(n.Y-o.Y,a.X-l.X),U.Int128Mul(n.X-o.X,a.Y-l.Y)):p.Cast_Int64((n.Y-o.Y)*(a.X-l.X))-p.Cast_Int64((n.X-o.X)*(a.Y-l.Y))===0)};p.ClipperBase.SlopesEqual3=function(e,t,r){return r?U.op_Equality(U.Int128Mul(e.Delta.Y,t.Delta.X),U.Int128Mul(e.Delta.X,t.Delta.Y)):p.Cast_Int64(e.Delta.Y*t.Delta.X)==p.Cast_Int64(e.Delta.X*t.Delta.Y)};p.ClipperBase.SlopesEqual4=function(e,t,r,i){return i?U.op_Equality(U.Int128Mul(e.Y-t.Y,t.X-r.X),U.Int128Mul(e.X-t.X,t.Y-r.Y)):p.Cast_Int64((e.Y-t.Y)*(t.X-r.X))-p.Cast_Int64((e.X-t.X)*(t.Y-r.Y))===0};p.ClipperBase.SlopesEqual5=function(e,t,r,i,n){return n?U.op_Equality(U.Int128Mul(e.Y-t.Y,r.X-i.X),U.Int128Mul(e.X-t.X,r.Y-i.Y)):p.Cast_Int64((e.Y-t.Y)*(r.X-i.X))-p.Cast_Int64((e.X-t.X)*(r.Y-i.Y))===0};p.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var e=0,t=this.m_edges.length;e<t;++e){for(var r=0,i=this.m_edges[e].length;r<i;++r)this.m_edges[e][r]=null;p.Clear(this.m_edges[e])}p.Clear(this.m_edges),this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};p.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;this.m_MinimaList!==null;){var e=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=e}this.m_CurrentLM=null};p.ClipperBase.prototype.RangeTest=function(e,t){t.Value?(e.X>p.ClipperBase.hiRange||e.Y>p.ClipperBase.hiRange||-e.X>p.ClipperBase.hiRange||-e.Y>p.ClipperBase.hiRange)&&p.Error("Coordinate outside allowed range in RangeTest()."):(e.X>p.ClipperBase.loRange||e.Y>p.ClipperBase.loRange||-e.X>p.ClipperBase.loRange||-e.Y>p.ClipperBase.loRange)&&(t.Value=!0,this.RangeTest(e,t))};p.ClipperBase.prototype.InitEdge=function(e,t,r,i){e.Next=t,e.Prev=r,e.Curr.X=i.X,e.Curr.Y=i.Y,e.OutIdx=-1};p.ClipperBase.prototype.InitEdge2=function(e,t){e.Curr.Y>=e.Next.Curr.Y?(e.Bot.X=e.Curr.X,e.Bot.Y=e.Curr.Y,e.Top.X=e.Next.Curr.X,e.Top.Y=e.Next.Curr.Y):(e.Top.X=e.Curr.X,e.Top.Y=e.Curr.Y,e.Bot.X=e.Next.Curr.X,e.Bot.Y=e.Next.Curr.Y),this.SetDx(e),e.PolyTyp=t};p.ClipperBase.prototype.FindNextLocMin=function(e){for(var t;;){for(;p.IntPoint.op_Inequality(e.Bot,e.Prev.Bot)||p.IntPoint.op_Equality(e.Curr,e.Top);)e=e.Next;if(e.Dx!=p.ClipperBase.horizontal&&e.Prev.Dx!=p.ClipperBase.horizontal)break;for(;e.Prev.Dx==p.ClipperBase.horizontal;)e=e.Prev;for(t=e;e.Dx==p.ClipperBase.horizontal;)e=e.Next;if(e.Top.Y!=e.Prev.Bot.Y){t.Prev.Bot.X<e.Bot.X&&(e=t);break}}return e};p.ClipperBase.prototype.ProcessBound=function(e,t){var r=e,i=e,n,o;if(e.Dx==p.ClipperBase.horizontal&&(t?o=e.Prev.Bot.X:o=e.Next.Bot.X,e.Bot.X!=o&&this.ReverseHorizontal(e)),i.OutIdx!=p.ClipperBase.Skip)if(t){for(;i.Top.Y==i.Next.Bot.Y&&i.Next.OutIdx!=p.ClipperBase.Skip;)i=i.Next;if(i.Dx==p.ClipperBase.horizontal&&i.Next.OutIdx!=p.ClipperBase.Skip){for(n=i;n.Prev.Dx==p.ClipperBase.horizontal;)n=n.Prev;n.Prev.Top.X==i.Next.Top.X?t||(i=n.Prev):n.Prev.Top.X>i.Next.Top.X&&(i=n.Prev)}for(;e!=i;)e.NextInLML=e.Next,e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Prev.Top.X&&this.ReverseHorizontal(e),e=e.Next;e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Prev.Top.X&&this.ReverseHorizontal(e),i=i.Next}else{for(;i.Top.Y==i.Prev.Bot.Y&&i.Prev.OutIdx!=p.ClipperBase.Skip;)i=i.Prev;if(i.Dx==p.ClipperBase.horizontal&&i.Prev.OutIdx!=p.ClipperBase.Skip){for(n=i;n.Next.Dx==p.ClipperBase.horizontal;)n=n.Next;n.Next.Top.X==i.Prev.Top.X?t||(i=n.Next):n.Next.Top.X>i.Prev.Top.X&&(i=n.Next)}for(;e!=i;)e.NextInLML=e.Prev,e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Next.Top.X&&this.ReverseHorizontal(e),e=e.Prev;e.Dx==p.ClipperBase.horizontal&&e!=r&&e.Bot.X!=e.Next.Top.X&&this.ReverseHorizontal(e),i=i.Prev}if(i.OutIdx==p.ClipperBase.Skip){if(e=i,t){for(;e.Top.Y==e.Next.Bot.Y;)e=e.Next;for(;e!=i&&e.Dx==p.ClipperBase.horizontal;)e=e.Prev}else{for(;e.Top.Y==e.Prev.Bot.Y;)e=e.Prev;for(;e!=i&&e.Dx==p.ClipperBase.horizontal;)e=e.Next}if(e==i)t?i=e.Next:i=e.Prev;else{t?e=i.Next:e=i.Prev;var a=new p.LocalMinima;a.Next=null,a.Y=e.Bot.Y,a.LeftBound=null,a.RightBound=e,a.RightBound.WindDelta=0,i=this.ProcessBound(a.RightBound,t),this.InsertLocalMinima(a)}}return i};p.ClipperBase.prototype.AddPath=function(e,t,r){ab?!r&&t==p.PolyType.ptClip&&p.Error("AddPath: Open paths must be subject."):r||p.Error("AddPath: Open paths have been disabled.");var i=e.length-1;if(r)for(;i>0&&p.IntPoint.op_Equality(e[i],e[0]);)--i;for(;i>0&&p.IntPoint.op_Equality(e[i],e[i-1]);)--i;if(r&&i<2||!r&&i<1)return!1;for(var n=new Array,o=0;o<=i;o++)n.push(new p.TEdge);var a=!0;n[1].Curr.X=e[1].X,n[1].Curr.Y=e[1].Y;var l={Value:this.m_UseFullRange};this.RangeTest(e[0],l),this.m_UseFullRange=l.Value,l.Value=this.m_UseFullRange,this.RangeTest(e[i],l),this.m_UseFullRange=l.Value,this.InitEdge(n[0],n[1],n[i],e[0]),this.InitEdge(n[i],n[0],n[i-1],e[i]);for(var o=i-1;o>=1;--o)l.Value=this.m_UseFullRange,this.RangeTest(e[o],l),this.m_UseFullRange=l.Value,this.InitEdge(n[o],n[o+1],n[o-1],e[o]);for(var c=n[0],h=c,d=c;;){if(p.IntPoint.op_Equality(h.Curr,h.Next.Curr)){if(h==h.Next)break;h==c&&(c=h.Next),h=this.RemoveEdge(h),d=h;continue}if(h.Prev==h.Next)break;if(r&&p.ClipperBase.SlopesEqual(h.Prev.Curr,h.Curr,h.Next.Curr,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(h.Prev.Curr,h.Curr,h.Next.Curr))){h==c&&(c=h.Next),h=this.RemoveEdge(h),h=h.Prev,d=h;continue}if(h=h.Next,h==d)break}if(!r&&h==h.Next||r&&h.Prev==h.Next)return!1;r||(this.m_HasOpenPaths=!0,c.Prev.OutIdx=p.ClipperBase.Skip);var y=c;h=c;do this.InitEdge2(h,t),h=h.Next,a&&h.Curr.Y!=c.Curr.Y&&(a=!1);while(h!=c);if(a){if(r)return!1;h.Prev.OutIdx=p.ClipperBase.Skip,h.Prev.Bot.X<h.Prev.Top.X&&this.ReverseHorizontal(h.Prev);var m=new p.LocalMinima;for(m.Next=null,m.Y=h.Bot.Y,m.LeftBound=null,m.RightBound=h,m.RightBound.Side=p.EdgeSide.esRight,m.RightBound.WindDelta=0;h.Next.OutIdx!=p.ClipperBase.Skip;)h.NextInLML=h.Next,h.Bot.X!=h.Prev.Top.X&&this.ReverseHorizontal(h),h=h.Next;return this.InsertLocalMinima(m),this.m_edges.push(n),!0}this.m_edges.push(n);for(var x,S=null;h=this.FindNextLocMin(h),h!=S;){S==null&&(S=h);var m=new p.LocalMinima;m.Next=null,m.Y=h.Bot.Y,h.Dx<h.Prev.Dx?(m.LeftBound=h.Prev,m.RightBound=h,x=!1):(m.LeftBound=h,m.RightBound=h.Prev,x=!0),m.LeftBound.Side=p.EdgeSide.esLeft,m.RightBound.Side=p.EdgeSide.esRight,r?m.LeftBound.Next==m.RightBound?m.LeftBound.WindDelta=-1:m.LeftBound.WindDelta=1:m.LeftBound.WindDelta=0,m.RightBound.WindDelta=-m.LeftBound.WindDelta,h=this.ProcessBound(m.LeftBound,x);var P=this.ProcessBound(m.RightBound,!x);m.LeftBound.OutIdx==p.ClipperBase.Skip?m.LeftBound=null:m.RightBound.OutIdx==p.ClipperBase.Skip&&(m.RightBound=null),this.InsertLocalMinima(m),x||(h=P)}return!0};p.ClipperBase.prototype.AddPaths=function(e,t,r){for(var i=!1,n=0,o=e.length;n<o;++n)this.AddPath(e[n],t,r)&&(i=!0);return i};p.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(e,t,r){return p.IntPoint.op_Equality(e,r)||p.IntPoint.op_Equality(e,t)||p.IntPoint.op_Equality(r,t)?!1:e.X!=r.X?t.X>e.X==t.X<r.X:t.Y>e.Y==t.Y<r.Y};p.ClipperBase.prototype.RemoveEdge=function(e){e.Prev.Next=e.Next,e.Next.Prev=e.Prev;var t=e.Next;return e.Prev=null,t};p.ClipperBase.prototype.SetDx=function(e){e.Delta.X=e.Top.X-e.Bot.X,e.Delta.Y=e.Top.Y-e.Bot.Y,e.Delta.Y===0?e.Dx=p.ClipperBase.horizontal:e.Dx=e.Delta.X/e.Delta.Y};p.ClipperBase.prototype.InsertLocalMinima=function(e){if(this.m_MinimaList===null)this.m_MinimaList=e;else if(e.Y>=this.m_MinimaList.Y)e.Next=this.m_MinimaList,this.m_MinimaList=e;else{for(var t=this.m_MinimaList;t.Next!==null&&e.Y<t.Next.Y;)t=t.Next;e.Next=t.Next,t.Next=e}};p.ClipperBase.prototype.PopLocalMinima=function(){this.m_CurrentLM!==null&&(this.m_CurrentLM=this.m_CurrentLM.Next)};p.ClipperBase.prototype.ReverseHorizontal=function(e){var t=e.Top.X;e.Top.X=e.Bot.X,e.Bot.X=t,Ii&&(t=e.Top.Z,e.Top.Z=e.Bot.Z,e.Bot.Z=t)};p.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,this.m_CurrentLM!=null)for(var e=this.m_MinimaList;e!=null;){var t=e.LeftBound;t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=p.EdgeSide.esLeft,t.OutIdx=p.ClipperBase.Unassigned),t=e.RightBound,t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=p.EdgeSide.esRight,t.OutIdx=p.ClipperBase.Unassigned),e=e.Next}};p.Clipper=function(e){typeof e>"u"&&(e=0),this.m_PolyOuts=null,this.m_ClipType=p.ClipType.ctIntersection,this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=null,this.m_IntersectNodeComparer=null,this.m_ExecuteLocked=!1,this.m_ClipFillType=p.PolyFillType.pftEvenOdd,this.m_SubjFillType=p.PolyFillType.pftEvenOdd,this.m_Joins=null,this.m_GhostJoins=null,this.m_UsingPolyTree=!1,this.ReverseSolution=!1,this.StrictlySimple=!1,p.ClipperBase.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=new Array,this.m_IntersectNodeComparer=p.MyIntersectNodeSort.Compare,this.m_ExecuteLocked=!1,this.m_UsingPolyTree=!1,this.m_PolyOuts=new Array,this.m_Joins=new Array,this.m_GhostJoins=new Array,this.ReverseSolution=(1&e)!==0,this.StrictlySimple=(2&e)!==0,this.PreserveCollinear=(4&e)!==0,Ii&&(this.ZFillFunction=null)};p.Clipper.ioReverseSolution=1;p.Clipper.ioStrictlySimple=2;p.Clipper.ioPreserveCollinear=4;p.Clipper.prototype.Clear=function(){this.m_edges.length!==0&&(this.DisposeAllPolyPts(),p.ClipperBase.prototype.Clear.call(this))};p.Clipper.prototype.DisposeScanbeamList=function(){for(;this.m_Scanbeam!==null;){var e=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=e}};p.Clipper.prototype.Reset=function(){p.ClipperBase.prototype.Reset.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null;for(var e=this.m_MinimaList;e!==null;)this.InsertScanbeam(e.Y),e=e.Next};p.Clipper.prototype.InsertScanbeam=function(e){if(this.m_Scanbeam===null)this.m_Scanbeam=new p.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=e;else if(e>this.m_Scanbeam.Y){var t=new p.Scanbeam;t.Y=e,t.Next=this.m_Scanbeam,this.m_Scanbeam=t}else{for(var r=this.m_Scanbeam;r.Next!==null&&e<=r.Next.Y;)r=r.Next;if(e==r.Y)return;var t=new p.Scanbeam;t.Y=e,t.Next=r.Next,r.Next=t}};p.Clipper.prototype.Execute=function(){var e=arguments,t=e.length,r=e[1]instanceof p.PolyTree;if(t==4&&!r){var i=e[0],n=e[1],o=e[2],a=e[3];if(this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&p.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,p.Clear(n),this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!1;try{var l=this.ExecuteInternal();l&&this.BuildResult(n)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return l}else if(t==4&&r){var i=e[0],c=e[1],o=e[2],a=e[3];if(this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!0;try{var l=this.ExecuteInternal();l&&this.BuildResult2(c)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return l}else if(t==2&&!r){var i=e[0],n=e[1];return this.Execute(i,n,p.PolyFillType.pftEvenOdd,p.PolyFillType.pftEvenOdd)}else if(t==2&&r){var i=e[0],c=e[1];return this.Execute(i,c,p.PolyFillType.pftEvenOdd,p.PolyFillType.pftEvenOdd)}};p.Clipper.prototype.FixHoleLinkage=function(e){if(!(e.FirstLeft===null||e.IsHole!=e.FirstLeft.IsHole&&e.FirstLeft.Pts!==null)){for(var t=e.FirstLeft;t!==null&&(t.IsHole==e.IsHole||t.Pts===null);)t=t.FirstLeft;e.FirstLeft=t}};p.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),this.m_CurrentLM===null)return!1;var e=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(e),p.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),this.m_Scanbeam===null)break;var t=this.PopScanbeam();if(!this.ProcessIntersections(e,t))return!1;this.ProcessEdgesAtTopOfScanbeam(t),e=t}while(this.m_Scanbeam!==null||this.m_CurrentLM!==null);for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts===null||n.IsOpen||(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)}this.JoinCommonEdges();for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts!==null&&!n.IsOpen&&this.FixupOutPolygon(n)}return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{p.Clear(this.m_Joins),p.Clear(this.m_GhostJoins)}};p.Clipper.prototype.PopScanbeam=function(){var e=this.m_Scanbeam.Y,t=this.m_Scanbeam;return this.m_Scanbeam=this.m_Scanbeam.Next,t=null,e};p.Clipper.prototype.DisposeAllPolyPts=function(){for(var e=0,t=this.m_PolyOuts.length;e<t;++e)this.DisposeOutRec(e);p.Clear(this.m_PolyOuts)};p.Clipper.prototype.DisposeOutRec=function(e){var t=this.m_PolyOuts[e];t.Pts!==null&&this.DisposeOutPts(t.Pts),t=null,this.m_PolyOuts[e]=null};p.Clipper.prototype.DisposeOutPts=function(e){if(e!==null){var t=null;for(e.Prev.Next=null;e!==null;)t=e,e=e.Next,t=null}};p.Clipper.prototype.AddJoin=function(e,t,r){var i=new p.Join;i.OutPt1=e,i.OutPt2=t,i.OffPt.X=r.X,i.OffPt.Y=r.Y,this.m_Joins.push(i)};p.Clipper.prototype.AddGhostJoin=function(e,t){var r=new p.Join;r.OutPt1=e,r.OffPt.X=t.X,r.OffPt.Y=t.Y,this.m_GhostJoins.push(r)};Ii&&(p.Clipper.prototype.SetZ=function(e,t){e.Z=0,this.ZFillFunction!==null&&(t.OutIdx<0?this.ZFillFunction(t.Bot,t.Top,e):this.ZFillFunction(t.Top,t.Bot,e))});p.Clipper.prototype.InsertLocalMinimaIntoAEL=function(e){for(;this.m_CurrentLM!==null&&this.m_CurrentLM.Y==e;){var t=this.m_CurrentLM.LeftBound,r=this.m_CurrentLM.RightBound;this.PopLocalMinima();var i=null;if(t===null?(this.InsertEdgeIntoAEL(r,null),this.SetWindingCount(r),this.IsContributing(r)&&(i=this.AddOutPt(r,r.Bot))):r==null?(this.InsertEdgeIntoAEL(t,null),this.SetWindingCount(t),this.IsContributing(t)&&(i=this.AddOutPt(t,t.Bot)),this.InsertScanbeam(t.Top.Y)):(this.InsertEdgeIntoAEL(t,null),this.InsertEdgeIntoAEL(r,t),this.SetWindingCount(t),r.WindCnt=t.WindCnt,r.WindCnt2=t.WindCnt2,this.IsContributing(t)&&(i=this.AddLocalMinPoly(t,r,t.Bot)),this.InsertScanbeam(t.Top.Y)),r!=null&&(p.ClipperBase.IsHorizontal(r)?this.AddEdgeToSEL(r):this.InsertScanbeam(r.Top.Y)),!(t==null||r==null)){if(i!==null&&p.ClipperBase.IsHorizontal(r)&&this.m_GhostJoins.length>0&&r.WindDelta!==0)for(var n=0,o=this.m_GhostJoins.length;n<o;n++){var a=this.m_GhostJoins[n];this.HorzSegmentsOverlap(a.OutPt1.Pt,a.OffPt,r.Bot,r.Top)&&this.AddJoin(a.OutPt1,i,a.OffPt)}if(t.OutIdx>=0&&t.PrevInAEL!==null&&t.PrevInAEL.Curr.X==t.Bot.X&&t.PrevInAEL.OutIdx>=0&&p.ClipperBase.SlopesEqual(t.PrevInAEL,t,this.m_UseFullRange)&&t.WindDelta!==0&&t.PrevInAEL.WindDelta!==0){var l=this.AddOutPt(t.PrevInAEL,t.Bot);this.AddJoin(i,l,t.Top)}if(t.NextInAEL!=r){if(r.OutIdx>=0&&r.PrevInAEL.OutIdx>=0&&p.ClipperBase.SlopesEqual(r.PrevInAEL,r,this.m_UseFullRange)&&r.WindDelta!==0&&r.PrevInAEL.WindDelta!==0){var l=this.AddOutPt(r.PrevInAEL,r.Bot);this.AddJoin(i,l,r.Top)}var c=t.NextInAEL;if(c!==null)for(;c!=r;)this.IntersectEdges(r,c,t.Curr,!1),c=c.NextInAEL}}}};p.Clipper.prototype.InsertEdgeIntoAEL=function(e,t){if(this.m_ActiveEdges===null)e.PrevInAEL=null,e.NextInAEL=null,this.m_ActiveEdges=e;else if(t===null&&this.E2InsertsBeforeE1(this.m_ActiveEdges,e))e.PrevInAEL=null,e.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges.PrevInAEL=e,this.m_ActiveEdges=e;else{for(t===null&&(t=this.m_ActiveEdges);t.NextInAEL!==null&&!this.E2InsertsBeforeE1(t.NextInAEL,e);)t=t.NextInAEL;e.NextInAEL=t.NextInAEL,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=e),e.PrevInAEL=t,t.NextInAEL=e}};p.Clipper.prototype.E2InsertsBeforeE1=function(e,t){return t.Curr.X==e.Curr.X?t.Top.Y>e.Top.Y?t.Top.X<p.Clipper.TopX(e,t.Top.Y):e.Top.X>p.Clipper.TopX(t,e.Top.Y):t.Curr.X<e.Curr.X};p.Clipper.prototype.IsEvenOddFillType=function(e){return e.PolyTyp==p.PolyType.ptSubject?this.m_SubjFillType==p.PolyFillType.pftEvenOdd:this.m_ClipFillType==p.PolyFillType.pftEvenOdd};p.Clipper.prototype.IsEvenOddAltFillType=function(e){return e.PolyTyp==p.PolyType.ptSubject?this.m_ClipFillType==p.PolyFillType.pftEvenOdd:this.m_SubjFillType==p.PolyFillType.pftEvenOdd};p.Clipper.prototype.IsContributing=function(e){var t,r;switch(e.PolyTyp==p.PolyType.ptSubject?(t=this.m_SubjFillType,r=this.m_ClipFillType):(t=this.m_ClipFillType,r=this.m_SubjFillType),t){case p.PolyFillType.pftEvenOdd:if(e.WindDelta===0&&e.WindCnt!=1)return!1;break;case p.PolyFillType.pftNonZero:if(Math.abs(e.WindCnt)!=1)return!1;break;case p.PolyFillType.pftPositive:if(e.WindCnt!=1)return!1;break;default:if(e.WindCnt!=-1)return!1;break}switch(this.m_ClipType){case p.ClipType.ctIntersection:switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2!==0;case p.PolyFillType.pftPositive:return e.WindCnt2>0;default:return e.WindCnt2<0}case p.ClipType.ctUnion:switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}case p.ClipType.ctDifference:if(e.PolyTyp==p.PolyType.ptSubject)switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}else switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2!==0;case p.PolyFillType.pftPositive:return e.WindCnt2>0;default:return e.WindCnt2<0}case p.ClipType.ctXor:if(e.WindDelta===0)switch(r){case p.PolyFillType.pftEvenOdd:case p.PolyFillType.pftNonZero:return e.WindCnt2===0;case p.PolyFillType.pftPositive:return e.WindCnt2<=0;default:return e.WindCnt2>=0}else return!0}return!0};p.Clipper.prototype.SetWindingCount=function(e){for(var t=e.PrevInAEL;t!==null&&(t.PolyTyp!=e.PolyTyp||t.WindDelta===0);)t=t.PrevInAEL;if(t===null)e.WindCnt=e.WindDelta===0?1:e.WindDelta,e.WindCnt2=0,t=this.m_ActiveEdges;else if(e.WindDelta===0&&this.m_ClipType!=p.ClipType.ctUnion)e.WindCnt=1,e.WindCnt2=t.WindCnt2,t=t.NextInAEL;else if(this.IsEvenOddFillType(e)){if(e.WindDelta===0){for(var r=!0,i=t.PrevInAEL;i!==null;)i.PolyTyp==t.PolyTyp&&i.WindDelta!==0&&(r=!r),i=i.PrevInAEL;e.WindCnt=r?0:1}else e.WindCnt=e.WindDelta;e.WindCnt2=t.WindCnt2,t=t.NextInAEL}else t.WindCnt*t.WindDelta<0?Math.abs(t.WindCnt)>1?t.WindDelta*e.WindDelta<0?e.WindCnt=t.WindCnt:e.WindCnt=t.WindCnt+e.WindDelta:e.WindCnt=e.WindDelta===0?1:e.WindDelta:e.WindDelta===0?e.WindCnt=t.WindCnt<0?t.WindCnt-1:t.WindCnt+1:t.WindDelta*e.WindDelta<0?e.WindCnt=t.WindCnt:e.WindCnt=t.WindCnt+e.WindDelta,e.WindCnt2=t.WindCnt2,t=t.NextInAEL;if(this.IsEvenOddAltFillType(e))for(;t!=e;)t.WindDelta!==0&&(e.WindCnt2=e.WindCnt2===0?1:0),t=t.NextInAEL;else for(;t!=e;)e.WindCnt2+=t.WindDelta,t=t.NextInAEL};p.Clipper.prototype.AddEdgeToSEL=function(e){this.m_SortedEdges===null?(this.m_SortedEdges=e,e.PrevInSEL=null,e.NextInSEL=null):(e.NextInSEL=this.m_SortedEdges,e.PrevInSEL=null,this.m_SortedEdges.PrevInSEL=e,this.m_SortedEdges=e)};p.Clipper.prototype.CopyAELToSEL=function(){var e=this.m_ActiveEdges;for(this.m_SortedEdges=e;e!==null;)e.PrevInSEL=e.PrevInAEL,e.NextInSEL=e.NextInAEL,e=e.NextInAEL};p.Clipper.prototype.SwapPositionsInAEL=function(e,t){if(!(e.NextInAEL==e.PrevInAEL||t.NextInAEL==t.PrevInAEL)){if(e.NextInAEL==t){var r=t.NextInAEL;r!==null&&(r.PrevInAEL=e);var i=e.PrevInAEL;i!==null&&(i.NextInAEL=t),t.PrevInAEL=i,t.NextInAEL=e,e.PrevInAEL=t,e.NextInAEL=r}else if(t.NextInAEL==e){var r=e.NextInAEL;r!==null&&(r.PrevInAEL=t);var i=t.PrevInAEL;i!==null&&(i.NextInAEL=e),e.PrevInAEL=i,e.NextInAEL=t,t.PrevInAEL=e,t.NextInAEL=r}else{var r=e.NextInAEL,i=e.PrevInAEL;e.NextInAEL=t.NextInAEL,e.NextInAEL!==null&&(e.NextInAEL.PrevInAEL=e),e.PrevInAEL=t.PrevInAEL,e.PrevInAEL!==null&&(e.PrevInAEL.NextInAEL=e),t.NextInAEL=r,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=t),t.PrevInAEL=i,t.PrevInAEL!==null&&(t.PrevInAEL.NextInAEL=t)}e.PrevInAEL===null?this.m_ActiveEdges=e:t.PrevInAEL===null&&(this.m_ActiveEdges=t)}};p.Clipper.prototype.SwapPositionsInSEL=function(e,t){if(!(e.NextInSEL===null&&e.PrevInSEL===null)&&!(t.NextInSEL===null&&t.PrevInSEL===null)){if(e.NextInSEL==t){var r=t.NextInSEL;r!==null&&(r.PrevInSEL=e);var i=e.PrevInSEL;i!==null&&(i.NextInSEL=t),t.PrevInSEL=i,t.NextInSEL=e,e.PrevInSEL=t,e.NextInSEL=r}else if(t.NextInSEL==e){var r=e.NextInSEL;r!==null&&(r.PrevInSEL=t);var i=t.PrevInSEL;i!==null&&(i.NextInSEL=e),e.PrevInSEL=i,e.NextInSEL=t,t.PrevInSEL=e,t.NextInSEL=r}else{var r=e.NextInSEL,i=e.PrevInSEL;e.NextInSEL=t.NextInSEL,e.NextInSEL!==null&&(e.NextInSEL.PrevInSEL=e),e.PrevInSEL=t.PrevInSEL,e.PrevInSEL!==null&&(e.PrevInSEL.NextInSEL=e),t.NextInSEL=r,t.NextInSEL!==null&&(t.NextInSEL.PrevInSEL=t),t.PrevInSEL=i,t.PrevInSEL!==null&&(t.PrevInSEL.NextInSEL=t)}e.PrevInSEL===null?this.m_SortedEdges=e:t.PrevInSEL===null&&(this.m_SortedEdges=t)}};p.Clipper.prototype.AddLocalMaxPoly=function(e,t,r){this.AddOutPt(e,r),t.WindDelta==0&&this.AddOutPt(t,r),e.OutIdx==t.OutIdx?(e.OutIdx=-1,t.OutIdx=-1):e.OutIdx<t.OutIdx?this.AppendPolygon(e,t):this.AppendPolygon(t,e)};p.Clipper.prototype.AddLocalMinPoly=function(e,t,r){var i,n,o;if(p.ClipperBase.IsHorizontal(t)||e.Dx>t.Dx?(i=this.AddOutPt(e,r),t.OutIdx=e.OutIdx,e.Side=p.EdgeSide.esLeft,t.Side=p.EdgeSide.esRight,n=e,n.PrevInAEL==t?o=t.PrevInAEL:o=n.PrevInAEL):(i=this.AddOutPt(t,r),e.OutIdx=t.OutIdx,e.Side=p.EdgeSide.esRight,t.Side=p.EdgeSide.esLeft,n=t,n.PrevInAEL==e?o=e.PrevInAEL:o=n.PrevInAEL),o!==null&&o.OutIdx>=0&&p.Clipper.TopX(o,r.Y)==p.Clipper.TopX(n,r.Y)&&p.ClipperBase.SlopesEqual(n,o,this.m_UseFullRange)&&n.WindDelta!==0&&o.WindDelta!==0){var a=this.AddOutPt(o,r);this.AddJoin(i,a,n.Top)}return i};p.Clipper.prototype.CreateOutRec=function(){var e=new p.OutRec;return e.Idx=-1,e.IsHole=!1,e.IsOpen=!1,e.FirstLeft=null,e.Pts=null,e.BottomPt=null,e.PolyNode=null,this.m_PolyOuts.push(e),e.Idx=this.m_PolyOuts.length-1,e};p.Clipper.prototype.AddOutPt=function(e,t){var r=e.Side==p.EdgeSide.esLeft;if(e.OutIdx<0){var i=this.CreateOutRec();i.IsOpen=e.WindDelta===0;var n=new p.OutPt;return i.Pts=n,n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=n,n.Prev=n,i.IsOpen||this.SetHoleState(e,i),Ii&&(p.IntPoint.op_Equality(t,e.Bot)?(n.Pt.X=e.Bot.X,n.Pt.Y=e.Bot.Y,n.Pt.Z=e.Bot.Z):p.IntPoint.op_Equality(t,e.Top)?(n.Pt.X=e.Top.X,n.Pt.Y=e.Top.Y,n.Pt.Z=e.Top.Z):this.SetZ(n.Pt,e)),e.OutIdx=i.Idx,n}else{var i=this.m_PolyOuts[e.OutIdx],o=i.Pts;if(r&&p.IntPoint.op_Equality(t,o.Pt))return o;if(!r&&p.IntPoint.op_Equality(t,o.Prev.Pt))return o.Prev;var n=new p.OutPt;return n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=o,n.Prev=o.Prev,n.Prev.Next=n,o.Prev=n,r&&(i.Pts=n),Ii&&(p.IntPoint.op_Equality(t,e.Bot)?(n.Pt.X=e.Bot.X,n.Pt.Y=e.Bot.Y,n.Pt.Z=e.Bot.Z):p.IntPoint.op_Equality(t,e.Top)?(n.Pt.X=e.Top.X,n.Pt.Y=e.Top.Y,n.Pt.Z=e.Top.Z):this.SetZ(n.Pt,e)),n}};p.Clipper.prototype.SwapPoints=function(e,t){var r=new p.IntPoint(e.Value);e.Value.X=t.Value.X,e.Value.Y=t.Value.Y,t.Value.X=r.X,t.Value.Y=r.Y};p.Clipper.prototype.HorzSegmentsOverlap=function(e,t,r,i){return e.X>r.X==e.X<i.X||t.X>r.X==t.X<i.X||r.X>e.X==r.X<t.X||i.X>e.X==i.X<t.X||e.X==r.X&&t.X==i.X?!0:e.X==i.X&&t.X==r.X};p.Clipper.prototype.InsertPolyPtBetween=function(e,t,r){var i=new p.OutPt;return i.Pt.X=r.X,i.Pt.Y=r.Y,t==e.Next?(e.Next=i,t.Prev=i,i.Next=t,i.Prev=e):(t.Next=i,e.Prev=i,i.Next=e,i.Prev=t),i};p.Clipper.prototype.SetHoleState=function(e,t){for(var r=!1,i=e.PrevInAEL;i!==null;)i.OutIdx>=0&&i.WindDelta!=0&&(r=!r,t.FirstLeft===null&&(t.FirstLeft=this.m_PolyOuts[i.OutIdx])),i=i.PrevInAEL;r&&(t.IsHole=!0)};p.Clipper.prototype.GetDx=function(e,t){return e.Y==t.Y?p.ClipperBase.horizontal:(t.X-e.X)/(t.Y-e.Y)};p.Clipper.prototype.FirstIsBottomPt=function(e,t){for(var r=e.Prev;p.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Prev;var i=Math.abs(this.GetDx(e.Pt,r.Pt));for(r=e.Next;p.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Next;var n=Math.abs(this.GetDx(e.Pt,r.Pt));for(r=t.Prev;p.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Prev;var o=Math.abs(this.GetDx(t.Pt,r.Pt));for(r=t.Next;p.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Next;var a=Math.abs(this.GetDx(t.Pt,r.Pt));return i>=o&&i>=a||n>=o&&n>=a};p.Clipper.prototype.GetBottomPt=function(e){for(var t=null,r=e.Next;r!=e;)r.Pt.Y>e.Pt.Y?(e=r,t=null):r.Pt.Y==e.Pt.Y&&r.Pt.X<=e.Pt.X&&(r.Pt.X<e.Pt.X?(t=null,e=r):r.Next!=e&&r.Prev!=e&&(t=r)),r=r.Next;if(t!==null)for(;t!=r;)for(this.FirstIsBottomPt(r,t)||(e=t),t=t.Next;p.IntPoint.op_Inequality(t.Pt,e.Pt);)t=t.Next;return e};p.Clipper.prototype.GetLowermostRec=function(e,t){e.BottomPt===null&&(e.BottomPt=this.GetBottomPt(e.Pts)),t.BottomPt===null&&(t.BottomPt=this.GetBottomPt(t.Pts));var r=e.BottomPt,i=t.BottomPt;return r.Pt.Y>i.Pt.Y?e:r.Pt.Y<i.Pt.Y?t:r.Pt.X<i.Pt.X?e:r.Pt.X>i.Pt.X||r.Next==r?t:i.Next==i||this.FirstIsBottomPt(r,i)?e:t};p.Clipper.prototype.Param1RightOfParam2=function(e,t){do if(e=e.FirstLeft,e==t)return!0;while(e!==null);return!1};p.Clipper.prototype.GetOutRec=function(e){for(var t=this.m_PolyOuts[e];t!=this.m_PolyOuts[t.Idx];)t=this.m_PolyOuts[t.Idx];return t};p.Clipper.prototype.AppendPolygon=function(e,t){var r=this.m_PolyOuts[e.OutIdx],i=this.m_PolyOuts[t.OutIdx],n;this.Param1RightOfParam2(r,i)?n=i:this.Param1RightOfParam2(i,r)?n=r:n=this.GetLowermostRec(r,i);var o=r.Pts,a=o.Prev,l=i.Pts,c=l.Prev,h;e.Side==p.EdgeSide.esLeft?(t.Side==p.EdgeSide.esLeft?(this.ReversePolyPtLinks(l),l.Next=o,o.Prev=l,a.Next=c,c.Prev=a,r.Pts=c):(c.Next=o,o.Prev=c,l.Prev=a,a.Next=l,r.Pts=l),h=p.EdgeSide.esLeft):(t.Side==p.EdgeSide.esRight?(this.ReversePolyPtLinks(l),a.Next=c,c.Prev=a,l.Next=o,o.Prev=l):(a.Next=l,l.Prev=a,o.Prev=c,c.Next=o),h=p.EdgeSide.esRight),r.BottomPt=null,n==i&&(i.FirstLeft!=r&&(r.FirstLeft=i.FirstLeft),r.IsHole=i.IsHole),i.Pts=null,i.BottomPt=null,i.FirstLeft=r;var d=e.OutIdx,y=t.OutIdx;e.OutIdx=-1,t.OutIdx=-1;for(var m=this.m_ActiveEdges;m!==null;){if(m.OutIdx==y){m.OutIdx=d,m.Side=h;break}m=m.NextInAEL}i.Idx=r.Idx};p.Clipper.prototype.ReversePolyPtLinks=function(e){if(e!==null){var t,r;t=e;do r=t.Next,t.Next=t.Prev,t.Prev=r,t=r;while(t!=e)}};p.Clipper.SwapSides=function(e,t){var r=e.Side;e.Side=t.Side,t.Side=r};p.Clipper.SwapPolyIndexes=function(e,t){var r=e.OutIdx;e.OutIdx=t.OutIdx,t.OutIdx=r};p.Clipper.prototype.IntersectEdges=function(e,t,r,i){var n=!i&&e.NextInLML===null&&e.Top.X==r.X&&e.Top.Y==r.Y,o=!i&&t.NextInLML===null&&t.Top.X==r.X&&t.Top.Y==r.Y,a=e.OutIdx>=0,l=t.OutIdx>=0;if(ab&&(e.WindDelta===0||t.WindDelta===0)){e.WindDelta===0&&t.WindDelta===0?(n||o)&&a&&l&&this.AddLocalMaxPoly(e,t,r):e.PolyTyp==t.PolyTyp&&e.WindDelta!=t.WindDelta&&this.m_ClipType==p.ClipType.ctUnion?e.WindDelta===0?l&&(this.AddOutPt(e,r),a&&(e.OutIdx=-1)):a&&(this.AddOutPt(t,r),l&&(t.OutIdx=-1)):e.PolyTyp!=t.PolyTyp&&(e.WindDelta===0&&Math.abs(t.WindCnt)==1&&(this.m_ClipType!=p.ClipType.ctUnion||t.WindCnt2===0)?(this.AddOutPt(e,r),a&&(e.OutIdx=-1)):t.WindDelta===0&&Math.abs(e.WindCnt)==1&&(this.m_ClipType!=p.ClipType.ctUnion||e.WindCnt2===0)&&(this.AddOutPt(t,r),l&&(t.OutIdx=-1))),n&&(e.OutIdx<0?this.DeleteFromAEL(e):p.Error("Error intersecting polylines")),o&&(t.OutIdx<0?this.DeleteFromAEL(t):p.Error("Error intersecting polylines"));return}if(e.PolyTyp==t.PolyTyp)if(this.IsEvenOddFillType(e)){var c=e.WindCnt;e.WindCnt=t.WindCnt,t.WindCnt=c}else e.WindCnt+t.WindDelta===0?e.WindCnt=-e.WindCnt:e.WindCnt+=t.WindDelta,t.WindCnt-e.WindDelta===0?t.WindCnt=-t.WindCnt:t.WindCnt-=e.WindDelta;else this.IsEvenOddFillType(t)?e.WindCnt2=e.WindCnt2===0?1:0:e.WindCnt2+=t.WindDelta,this.IsEvenOddFillType(e)?t.WindCnt2=t.WindCnt2===0?1:0:t.WindCnt2-=e.WindDelta;var h,d,y,m;e.PolyTyp==p.PolyType.ptSubject?(h=this.m_SubjFillType,y=this.m_ClipFillType):(h=this.m_ClipFillType,y=this.m_SubjFillType),t.PolyTyp==p.PolyType.ptSubject?(d=this.m_SubjFillType,m=this.m_ClipFillType):(d=this.m_ClipFillType,m=this.m_SubjFillType);var x,S;switch(h){case p.PolyFillType.pftPositive:x=e.WindCnt;break;case p.PolyFillType.pftNegative:x=-e.WindCnt;break;default:x=Math.abs(e.WindCnt);break}switch(d){case p.PolyFillType.pftPositive:S=t.WindCnt;break;case p.PolyFillType.pftNegative:S=-t.WindCnt;break;default:S=Math.abs(t.WindCnt);break}if(a&&l)n||o||x!==0&&x!=1||S!==0&&S!=1||e.PolyTyp!=t.PolyTyp&&this.m_ClipType!=p.ClipType.ctXor?this.AddLocalMaxPoly(e,t,r):(this.AddOutPt(e,r),this.AddOutPt(t,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if(a)(S===0||S==1)&&(this.AddOutPt(e,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if(l)(x===0||x==1)&&(this.AddOutPt(t,r),p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t));else if((x===0||x==1)&&(S===0||S==1)&&!n&&!o){var P,g;switch(y){case p.PolyFillType.pftPositive:P=e.WindCnt2;break;case p.PolyFillType.pftNegative:P=-e.WindCnt2;break;default:P=Math.abs(e.WindCnt2);break}switch(m){case p.PolyFillType.pftPositive:g=t.WindCnt2;break;case p.PolyFillType.pftNegative:g=-t.WindCnt2;break;default:g=Math.abs(t.WindCnt2);break}if(e.PolyTyp!=t.PolyTyp)this.AddLocalMinPoly(e,t,r);else if(x==1&&S==1)switch(this.m_ClipType){case p.ClipType.ctIntersection:P>0&&g>0&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctUnion:P<=0&&g<=0&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctDifference:(e.PolyTyp==p.PolyType.ptClip&&P>0&&g>0||e.PolyTyp==p.PolyType.ptSubject&&P<=0&&g<=0)&&this.AddLocalMinPoly(e,t,r);break;case p.ClipType.ctXor:this.AddLocalMinPoly(e,t,r);break}else p.Clipper.SwapSides(e,t)}n!=o&&(n&&e.OutIdx>=0||o&&t.OutIdx>=0)&&(p.Clipper.SwapSides(e,t),p.Clipper.SwapPolyIndexes(e,t)),n&&this.DeleteFromAEL(e),o&&this.DeleteFromAEL(t)};p.Clipper.prototype.DeleteFromAEL=function(e){var t=e.PrevInAEL,r=e.NextInAEL;t===null&&r===null&&e!=this.m_ActiveEdges||(t!==null?t.NextInAEL=r:this.m_ActiveEdges=r,r!==null&&(r.PrevInAEL=t),e.NextInAEL=null,e.PrevInAEL=null)};p.Clipper.prototype.DeleteFromSEL=function(e){var t=e.PrevInSEL,r=e.NextInSEL;t===null&&r===null&&e!=this.m_SortedEdges||(t!==null?t.NextInSEL=r:this.m_SortedEdges=r,r!==null&&(r.PrevInSEL=t),e.NextInSEL=null,e.PrevInSEL=null)};p.Clipper.prototype.UpdateEdgeIntoAEL=function(e){e.NextInLML===null&&p.Error("UpdateEdgeIntoAEL: invalid call");var t=e.PrevInAEL,r=e.NextInAEL;return e.NextInLML.OutIdx=e.OutIdx,t!==null?t.NextInAEL=e.NextInLML:this.m_ActiveEdges=e.NextInLML,r!==null&&(r.PrevInAEL=e.NextInLML),e.NextInLML.Side=e.Side,e.NextInLML.WindDelta=e.WindDelta,e.NextInLML.WindCnt=e.WindCnt,e.NextInLML.WindCnt2=e.WindCnt2,e=e.NextInLML,e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.PrevInAEL=t,e.NextInAEL=r,p.ClipperBase.IsHorizontal(e)||this.InsertScanbeam(e.Top.Y),e};p.Clipper.prototype.ProcessHorizontals=function(e){for(var t=this.m_SortedEdges;t!==null;)this.DeleteFromSEL(t),this.ProcessHorizontal(t,e),t=this.m_SortedEdges};p.Clipper.prototype.GetHorzDirection=function(e,t){e.Bot.X<e.Top.X?(t.Left=e.Bot.X,t.Right=e.Top.X,t.Dir=p.Direction.dLeftToRight):(t.Left=e.Top.X,t.Right=e.Bot.X,t.Dir=p.Direction.dRightToLeft)};p.Clipper.prototype.PrepareHorzJoins=function(e,t){var r=this.m_PolyOuts[e.OutIdx].Pts;e.Side!=p.EdgeSide.esLeft&&(r=r.Prev),t&&(p.IntPoint.op_Equality(r.Pt,e.Top)?this.AddGhostJoin(r,e.Bot):this.AddGhostJoin(r,e.Top))};p.Clipper.prototype.ProcessHorizontal=function(e,t){var r={Dir:null,Left:null,Right:null};this.GetHorzDirection(e,r);for(var i=r.Dir,n=r.Left,o=r.Right,a=e,l=null;a.NextInLML!==null&&p.ClipperBase.IsHorizontal(a.NextInLML);)a=a.NextInLML;for(a.NextInLML===null&&(l=this.GetMaximaPair(a));;){for(var c=e==a,h=this.GetNextInAEL(e,i);h!==null&&!(h.Curr.X==e.Top.X&&e.NextInLML!==null&&h.Dx<e.NextInLML.Dx);){var d=this.GetNextInAEL(h,i);if(i==p.Direction.dLeftToRight&&h.Curr.X<=o||i==p.Direction.dRightToLeft&&h.Curr.X>=n){if(e.OutIdx>=0&&e.WindDelta!=0&&this.PrepareHorzJoins(e,t),h==l&&c){i==p.Direction.dLeftToRight?this.IntersectEdges(e,h,h.Top,!1):this.IntersectEdges(h,e,h.Top,!1),l.OutIdx>=0&&p.Error("ProcessHorizontal error");return}else if(i==p.Direction.dLeftToRight){var y=new p.IntPoint(h.Curr.X,e.Curr.Y);this.IntersectEdges(e,h,y,!0)}else{var y=new p.IntPoint(h.Curr.X,e.Curr.Y);this.IntersectEdges(h,e,y,!0)}this.SwapPositionsInAEL(e,h)}else if(i==p.Direction.dLeftToRight&&h.Curr.X>=o||i==p.Direction.dRightToLeft&&h.Curr.X<=n)break;h=d}if(e.OutIdx>=0&&e.WindDelta!==0&&this.PrepareHorzJoins(e,t),e.NextInLML!==null&&p.ClipperBase.IsHorizontal(e.NextInLML)){e=this.UpdateEdgeIntoAEL(e),e.OutIdx>=0&&this.AddOutPt(e,e.Bot);var r={Dir:i,Left:n,Right:o};this.GetHorzDirection(e,r),i=r.Dir,n=r.Left,o=r.Right}else break}if(e.NextInLML!==null)if(e.OutIdx>=0){var m=this.AddOutPt(e,e.Top);if(e=this.UpdateEdgeIntoAEL(e),e.WindDelta===0)return;var x=e.PrevInAEL,d=e.NextInAEL;if(x!==null&&x.Curr.X==e.Bot.X&&x.Curr.Y==e.Bot.Y&&x.WindDelta!==0&&x.OutIdx>=0&&x.Curr.Y>x.Top.Y&&p.ClipperBase.SlopesEqual(e,x,this.m_UseFullRange)){var S=this.AddOutPt(x,e.Bot);this.AddJoin(m,S,e.Top)}else if(d!==null&&d.Curr.X==e.Bot.X&&d.Curr.Y==e.Bot.Y&&d.WindDelta!==0&&d.OutIdx>=0&&d.Curr.Y>d.Top.Y&&p.ClipperBase.SlopesEqual(e,d,this.m_UseFullRange)){var S=this.AddOutPt(d,e.Bot);this.AddJoin(m,S,e.Top)}}else e=this.UpdateEdgeIntoAEL(e);else l!==null?l.OutIdx>=0?(i==p.Direction.dLeftToRight?this.IntersectEdges(e,l,e.Top,!1):this.IntersectEdges(l,e,e.Top,!1),l.OutIdx>=0&&p.Error("ProcessHorizontal error")):(this.DeleteFromAEL(e),this.DeleteFromAEL(l)):(e.OutIdx>=0&&this.AddOutPt(e,e.Top),this.DeleteFromAEL(e))};p.Clipper.prototype.GetNextInAEL=function(e,t){return t==p.Direction.dLeftToRight?e.NextInAEL:e.PrevInAEL};p.Clipper.prototype.IsMinima=function(e){return e!==null&&e.Prev.NextInLML!=e&&e.Next.NextInLML!=e};p.Clipper.prototype.IsMaxima=function(e,t){return e!==null&&e.Top.Y==t&&e.NextInLML===null};p.Clipper.prototype.IsIntermediate=function(e,t){return e.Top.Y==t&&e.NextInLML!==null};p.Clipper.prototype.GetMaximaPair=function(e){var t=null;return p.IntPoint.op_Equality(e.Next.Top,e.Top)&&e.Next.NextInLML===null?t=e.Next:p.IntPoint.op_Equality(e.Prev.Top,e.Top)&&e.Prev.NextInLML===null&&(t=e.Prev),t!==null&&(t.OutIdx==-2||t.NextInAEL==t.PrevInAEL&&!p.ClipperBase.IsHorizontal(t))?null:t};p.Clipper.prototype.ProcessIntersections=function(e,t){if(this.m_ActiveEdges==null)return!0;try{if(this.BuildIntersectList(e,t),this.m_IntersectList.length==0)return!0;if(this.m_IntersectList.length==1||this.FixupIntersectionOrder())this.ProcessIntersectList();else return!1}catch{this.m_SortedEdges=null,this.m_IntersectList.length=0,p.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0};p.Clipper.prototype.BuildIntersectList=function(e,t){if(this.m_ActiveEdges!==null){var r=this.m_ActiveEdges;for(this.m_SortedEdges=r;r!==null;)r.PrevInSEL=r.PrevInAEL,r.NextInSEL=r.NextInAEL,r.Curr.X=p.Clipper.TopX(r,t),r=r.NextInAEL;for(var i=!0;i&&this.m_SortedEdges!==null;){for(i=!1,r=this.m_SortedEdges;r.NextInSEL!==null;){var n=r.NextInSEL,o=new p.IntPoint;if(r.Curr.X>n.Curr.X){!this.IntersectPoint(r,n,o)&&r.Curr.X>n.Curr.X+1&&p.Error("Intersection error"),o.Y>e&&(o.Y=e,Math.abs(r.Dx)>Math.abs(n.Dx)?o.X=p.Clipper.TopX(n,e):o.X=p.Clipper.TopX(r,e));var a=new p.IntersectNode;a.Edge1=r,a.Edge2=n,a.Pt.X=o.X,a.Pt.Y=o.Y,this.m_IntersectList.push(a),this.SwapPositionsInSEL(r,n),i=!0}else r=n}if(r.PrevInSEL!==null)r.PrevInSEL.NextInSEL=null;else break}this.m_SortedEdges=null}};p.Clipper.prototype.EdgesAdjacent=function(e){return e.Edge1.NextInSEL==e.Edge2||e.Edge1.PrevInSEL==e.Edge2};p.Clipper.IntersectNodeSort=function(e,t){return t.Pt.Y-e.Pt.Y};p.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var e=this.m_IntersectList.length,t=0;t<e;t++){if(!this.EdgesAdjacent(this.m_IntersectList[t])){for(var r=t+1;r<e&&!this.EdgesAdjacent(this.m_IntersectList[r]);)r++;if(r==e)return!1;var i=this.m_IntersectList[t];this.m_IntersectList[t]=this.m_IntersectList[r],this.m_IntersectList[r]=i}this.SwapPositionsInSEL(this.m_IntersectList[t].Edge1,this.m_IntersectList[t].Edge2)}return!0};p.Clipper.prototype.ProcessIntersectList=function(){for(var e=0,t=this.m_IntersectList.length;e<t;e++){var r=this.m_IntersectList[e];this.IntersectEdges(r.Edge1,r.Edge2,r.Pt,!0),this.SwapPositionsInAEL(r.Edge1,r.Edge2)}this.m_IntersectList.length=0};var ZS=s(function(e){return e<0?Math.ceil(e-.5):Math.round(e)},"R1"),qS=s(function(e){return e<0?Math.ceil(e-.5):Math.floor(e+.5)},"R2"),$S=s(function(e){return e<0?-Math.round(Math.abs(e)):Math.round(e)},"R3"),JS=s(function(e){return e<0?(e-=.5,e<-2147483648?Math.ceil(e):e|0):(e+=.5,e>2147483647?Math.floor(e):e|0)},"R4");W.msie?p.Clipper.Round=ZS:W.chromium?p.Clipper.Round=$S:W.safari?p.Clipper.Round=JS:p.Clipper.Round=qS;p.Clipper.TopX=function(e,t){return t==e.Top.Y?e.Top.X:e.Bot.X+p.Clipper.Round(e.Dx*(t-e.Bot.Y))};p.Clipper.prototype.IntersectPoint=function(e,t,r){r.X=0,r.Y=0;var i,n;if(p.ClipperBase.SlopesEqual(e,t,this.m_UseFullRange)||e.Dx==t.Dx)return t.Bot.Y>e.Bot.Y?(r.X=t.Bot.X,r.Y=t.Bot.Y):(r.X=e.Bot.X,r.Y=e.Bot.Y),!1;if(e.Delta.X===0)r.X=e.Bot.X,p.ClipperBase.IsHorizontal(t)?r.Y=t.Bot.Y:(n=t.Bot.Y-t.Bot.X/t.Dx,r.Y=p.Clipper.Round(r.X/t.Dx+n));else if(t.Delta.X===0)r.X=t.Bot.X,p.ClipperBase.IsHorizontal(e)?r.Y=e.Bot.Y:(i=e.Bot.Y-e.Bot.X/e.Dx,r.Y=p.Clipper.Round(r.X/e.Dx+i));else{i=e.Bot.X-e.Bot.Y*e.Dx,n=t.Bot.X-t.Bot.Y*t.Dx;var o=(n-i)/(e.Dx-t.Dx);r.Y=p.Clipper.Round(o),Math.abs(e.Dx)<Math.abs(t.Dx)?r.X=p.Clipper.Round(e.Dx*o+i):r.X=p.Clipper.Round(t.Dx*o+n)}if(r.Y<e.Top.Y||r.Y<t.Top.Y){if(e.Top.Y>t.Top.Y)return r.Y=e.Top.Y,r.X=p.Clipper.TopX(t,e.Top.Y),r.X<e.Top.X;r.Y=t.Top.Y,Math.abs(e.Dx)<Math.abs(t.Dx)?r.X=p.Clipper.TopX(e,r.Y):r.X=p.Clipper.TopX(t,r.Y)}return!0};p.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(e){for(var t=this.m_ActiveEdges;t!==null;){var r=this.IsMaxima(t,e);if(r){var i=this.GetMaximaPair(t);r=i===null||!p.ClipperBase.IsHorizontal(i)}if(r){var n=t.PrevInAEL;this.DoMaxima(t),n===null?t=this.m_ActiveEdges:t=n.NextInAEL}else{if(this.IsIntermediate(t,e)&&p.ClipperBase.IsHorizontal(t.NextInLML)?(t=this.UpdateEdgeIntoAEL(t),t.OutIdx>=0&&this.AddOutPt(t,t.Bot),this.AddEdgeToSEL(t)):(t.Curr.X=p.Clipper.TopX(t,e),t.Curr.Y=e),this.StrictlySimple){var n=t.PrevInAEL;if(t.OutIdx>=0&&t.WindDelta!==0&&n!==null&&n.OutIdx>=0&&n.Curr.X==t.Curr.X&&n.WindDelta!==0){var o=this.AddOutPt(n,t.Curr),a=this.AddOutPt(t,t.Curr);this.AddJoin(o,a,t.Curr)}}t=t.NextInAEL}}for(this.ProcessHorizontals(!0),t=this.m_ActiveEdges;t!==null;){if(this.IsIntermediate(t,e)){var o=null;t.OutIdx>=0&&(o=this.AddOutPt(t,t.Top)),t=this.UpdateEdgeIntoAEL(t);var n=t.PrevInAEL,l=t.NextInAEL;if(n!==null&&n.Curr.X==t.Bot.X&&n.Curr.Y==t.Bot.Y&&o!==null&&n.OutIdx>=0&&n.Curr.Y>n.Top.Y&&p.ClipperBase.SlopesEqual(t,n,this.m_UseFullRange)&&t.WindDelta!==0&&n.WindDelta!==0){var a=this.AddOutPt(n,t.Bot);this.AddJoin(o,a,t.Top)}else if(l!==null&&l.Curr.X==t.Bot.X&&l.Curr.Y==t.Bot.Y&&o!==null&&l.OutIdx>=0&&l.Curr.Y>l.Top.Y&&p.ClipperBase.SlopesEqual(t,l,this.m_UseFullRange)&&t.WindDelta!==0&&l.WindDelta!==0){var a=this.AddOutPt(l,t.Bot);this.AddJoin(o,a,t.Top)}}t=t.NextInAEL}};p.Clipper.prototype.DoMaxima=function(e){var t=this.GetMaximaPair(e);if(t===null){e.OutIdx>=0&&this.AddOutPt(e,e.Top),this.DeleteFromAEL(e);return}for(var r=e.NextInAEL,i=!0;r!==null&&r!=t;)this.IntersectEdges(e,r,e.Top,!0),this.SwapPositionsInAEL(e,r),r=e.NextInAEL;e.OutIdx==-1&&t.OutIdx==-1?(this.DeleteFromAEL(e),this.DeleteFromAEL(t)):e.OutIdx>=0&&t.OutIdx>=0?this.IntersectEdges(e,t,e.Top,!1):i&&e.WindDelta===0?(e.OutIdx>=0&&(this.AddOutPt(e,e.Top),e.OutIdx=-1),this.DeleteFromAEL(e),t.OutIdx>=0&&(this.AddOutPt(t,e.Top),t.OutIdx=-1),this.DeleteFromAEL(t)):p.Error("DoMaxima error")};p.Clipper.ReversePaths=function(e){for(var t=0,r=e.length;t<r;t++)e[t].reverse()};p.Clipper.Orientation=function(e){return p.Clipper.Area(e)>=0};p.Clipper.prototype.PointCount=function(e){if(e===null)return 0;var t=0,r=e;do t++,r=r.Next;while(r!=e);return t};p.Clipper.prototype.BuildResult=function(e){p.Clear(e);for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t];if(i.Pts!==null){var n=i.Pts.Prev,o=this.PointCount(n);if(!(o<2)){for(var a=new Array(o),l=0;l<o;l++)a[l]=n.Pt,n=n.Prev;e.push(a)}}}};p.Clipper.prototype.BuildResult2=function(e){e.Clear();for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t],n=this.PointCount(i.Pts);if(!(i.IsOpen&&n<2||!i.IsOpen&&n<3)){this.FixHoleLinkage(i);var o=new p.PolyNode;e.m_AllPolys.push(o),i.PolyNode=o,o.m_polygon.length=n;for(var a=i.Pts.Prev,l=0;l<n;l++)o.m_polygon[l]=a.Pt,a=a.Prev}}for(var t=0,r=this.m_PolyOuts.length;t<r;t++){var i=this.m_PolyOuts[t];i.PolyNode!==null&&(i.IsOpen?(i.PolyNode.IsOpen=!0,e.AddChild(i.PolyNode)):i.FirstLeft!==null&&i.FirstLeft.PolyNode!=null?i.FirstLeft.PolyNode.AddChild(i.PolyNode):e.AddChild(i.PolyNode))}};p.Clipper.prototype.FixupOutPolygon=function(e){var t=null;e.BottomPt=null;for(var r=e.Pts;;){if(r.Prev==r||r.Prev==r.Next){this.DisposeOutPts(r),e.Pts=null;return}if(p.IntPoint.op_Equality(r.Pt,r.Next.Pt)||p.IntPoint.op_Equality(r.Pt,r.Prev.Pt)||p.ClipperBase.SlopesEqual(r.Prev.Pt,r.Pt,r.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(r.Prev.Pt,r.Pt,r.Next.Pt))){t=null;var i=r;r.Prev.Next=r.Next,r.Next.Prev=r.Prev,r=r.Prev,i=null}else{if(r==t)break;t===null&&(t=r),r=r.Next}}e.Pts=r};p.Clipper.prototype.DupOutPt=function(e,t){var r=new p.OutPt;return r.Pt.X=e.Pt.X,r.Pt.Y=e.Pt.Y,r.Idx=e.Idx,t?(r.Next=e.Next,r.Prev=e,e.Next.Prev=r,e.Next=r):(r.Prev=e.Prev,r.Next=e,e.Prev.Next=r,e.Prev=r),r};p.Clipper.prototype.GetOverlap=function(e,t,r,i,n){return e<t?r<i?(n.Left=Math.max(e,r),n.Right=Math.min(t,i)):(n.Left=Math.max(e,i),n.Right=Math.min(t,r)):r<i?(n.Left=Math.max(t,r),n.Right=Math.min(e,i)):(n.Left=Math.max(t,i),n.Right=Math.min(e,r)),n.Left<n.Right};p.Clipper.prototype.JoinHorz=function(e,t,r,i,n,o){var a=e.Pt.X>t.Pt.X?p.Direction.dRightToLeft:p.Direction.dLeftToRight,l=r.Pt.X>i.Pt.X?p.Direction.dRightToLeft:p.Direction.dLeftToRight;if(a==l)return!1;if(a==p.Direction.dLeftToRight){for(;e.Next.Pt.X<=n.X&&e.Next.Pt.X>=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;o&&e.Pt.X!=n.X&&(e=e.Next),t=this.DupOutPt(e,!o),p.IntPoint.op_Inequality(t.Pt,n)&&(e=t,e.Pt.X=n.X,e.Pt.Y=n.Y,t=this.DupOutPt(e,!o))}else{for(;e.Next.Pt.X>=n.X&&e.Next.Pt.X<=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;!o&&e.Pt.X!=n.X&&(e=e.Next),t=this.DupOutPt(e,o),p.IntPoint.op_Inequality(t.Pt,n)&&(e=t,e.Pt.X=n.X,e.Pt.Y=n.Y,t=this.DupOutPt(e,o))}if(l==p.Direction.dLeftToRight){for(;r.Next.Pt.X<=n.X&&r.Next.Pt.X>=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;o&&r.Pt.X!=n.X&&(r=r.Next),i=this.DupOutPt(r,!o),p.IntPoint.op_Inequality(i.Pt,n)&&(r=i,r.Pt.X=n.X,r.Pt.Y=n.Y,i=this.DupOutPt(r,!o))}else{for(;r.Next.Pt.X>=n.X&&r.Next.Pt.X<=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;!o&&r.Pt.X!=n.X&&(r=r.Next),i=this.DupOutPt(r,o),p.IntPoint.op_Inequality(i.Pt,n)&&(r=i,r.Pt.X=n.X,r.Pt.Y=n.Y,i=this.DupOutPt(r,o))}return a==p.Direction.dLeftToRight==o?(e.Prev=r,r.Next=e,t.Next=i,i.Prev=t):(e.Next=r,r.Prev=e,t.Prev=i,i.Next=t),!0};p.Clipper.prototype.JoinPoints=function(e,t,r){var i=e.OutPt1,n=new p.OutPt,o=e.OutPt2,a=new p.OutPt,l=e.OutPt1.Pt.Y==e.OffPt.Y;if(l&&p.IntPoint.op_Equality(e.OffPt,e.OutPt1.Pt)&&p.IntPoint.op_Equality(e.OffPt,e.OutPt2.Pt)){for(n=e.OutPt1.Next;n!=i&&p.IntPoint.op_Equality(n.Pt,e.OffPt);)n=n.Next;var c=n.Pt.Y>e.OffPt.Y;for(a=e.OutPt2.Next;a!=o&&p.IntPoint.op_Equality(a.Pt,e.OffPt);)a=a.Next;var h=a.Pt.Y>e.OffPt.Y;return c==h?!1:c?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,e.OutPt1=i,e.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,e.OutPt1=i,e.OutPt2=n,!0)}else if(l){for(n=i;i.Prev.Pt.Y==i.Pt.Y&&i.Prev!=n&&i.Prev!=o;)i=i.Prev;for(;n.Next.Pt.Y==n.Pt.Y&&n.Next!=i&&n.Next!=o;)n=n.Next;if(n.Next==i||n.Next==o)return!1;for(a=o;o.Prev.Pt.Y==o.Pt.Y&&o.Prev!=a&&o.Prev!=n;)o=o.Prev;for(;a.Next.Pt.Y==a.Pt.Y&&a.Next!=o&&a.Next!=i;)a=a.Next;if(a.Next==o||a.Next==i)return!1;var d={Left:null,Right:null};if(!this.GetOverlap(i.Pt.X,n.Pt.X,o.Pt.X,a.Pt.X,d))return!1;var y=d.Left,m=d.Right,x=new p.IntPoint,S;return i.Pt.X>=y&&i.Pt.X<=m?(x.X=i.Pt.X,x.Y=i.Pt.Y,S=i.Pt.X>n.Pt.X):o.Pt.X>=y&&o.Pt.X<=m?(x.X=o.Pt.X,x.Y=o.Pt.Y,S=o.Pt.X>a.Pt.X):n.Pt.X>=y&&n.Pt.X<=m?(x.X=n.Pt.X,x.Y=n.Pt.Y,S=n.Pt.X>i.Pt.X):(x.X=a.Pt.X,x.Y=a.Pt.Y,S=a.Pt.X>o.Pt.X),e.OutPt1=i,e.OutPt2=o,this.JoinHorz(i,n,o,a,x,S)}else{for(n=i.Next;p.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Next;var P=n.Pt.Y>i.Pt.Y||!p.ClipperBase.SlopesEqual(i.Pt,n.Pt,e.OffPt,this.m_UseFullRange);if(P){for(n=i.Prev;p.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Prev;if(n.Pt.Y>i.Pt.Y||!p.ClipperBase.SlopesEqual(i.Pt,n.Pt,e.OffPt,this.m_UseFullRange))return!1}for(a=o.Next;p.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Next;var g=a.Pt.Y>o.Pt.Y||!p.ClipperBase.SlopesEqual(o.Pt,a.Pt,e.OffPt,this.m_UseFullRange);if(g){for(a=o.Prev;p.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Prev;if(a.Pt.Y>o.Pt.Y||!p.ClipperBase.SlopesEqual(o.Pt,a.Pt,e.OffPt,this.m_UseFullRange))return!1}return n==i||a==o||n==a||t==r&&P==g?!1:P?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,e.OutPt1=i,e.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,e.OutPt1=i,e.OutPt2=n,!0)}};p.Clipper.GetBounds=function(e){for(var t=0,r=e.length;t<r&&e[t].length==0;)t++;if(t==r)return new p.IntRect(0,0,0,0);var i=new p.IntRect;for(i.left=e[t][0].X,i.right=i.left,i.top=e[t][0].Y,i.bottom=i.top;t<r;t++)for(var n=0,o=e[t].length;n<o;n++)e[t][n].X<i.left?i.left=e[t][n].X:e[t][n].X>i.right&&(i.right=e[t][n].X),e[t][n].Y<i.top?i.top=e[t][n].Y:e[t][n].Y>i.bottom&&(i.bottom=e[t][n].Y);return i};p.Clipper.prototype.GetBounds2=function(e){var t=e,r=new p.IntRect;for(r.left=e.Pt.X,r.right=e.Pt.X,r.top=e.Pt.Y,r.bottom=e.Pt.Y,e=e.Next;e!=t;)e.Pt.X<r.left&&(r.left=e.Pt.X),e.Pt.X>r.right&&(r.right=e.Pt.X),e.Pt.Y<r.top&&(r.top=e.Pt.Y),e.Pt.Y>r.bottom&&(r.bottom=e.Pt.Y),e=e.Next;return r};p.Clipper.PointInPolygon=function(e,t){var r=0,i=t.length;if(i<3)return 0;for(var n=t[0],o=1;o<=i;++o){var a=o==i?t[0]:t[o];if(a.Y==e.Y&&(a.X==e.X||n.Y==e.Y&&a.X>e.X==n.X<e.X))return-1;if(n.Y<e.Y!=a.Y<e.Y){if(n.X>=e.X)if(a.X>e.X)r=1-r;else{var l=(n.X-e.X)*(a.Y-e.Y)-(a.X-e.X)*(n.Y-e.Y);if(l==0)return-1;l>0==a.Y>n.Y&&(r=1-r)}else if(a.X>e.X){var l=(n.X-e.X)*(a.Y-e.Y)-(a.X-e.X)*(n.Y-e.Y);if(l==0)return-1;l>0==a.Y>n.Y&&(r=1-r)}}n=a}return r};p.Clipper.prototype.PointInPolygon=function(e,t){for(var r=0,i=t;;){var n=t.Pt.X,o=t.Pt.Y,a=t.Next.Pt.X,l=t.Next.Pt.Y;if(l==e.Y&&(a==e.X||o==e.Y&&a>e.X==n<e.X))return-1;if(o<e.Y!=l<e.Y){if(n>=e.X)if(a>e.X)r=1-r;else{var c=(n-e.X)*(l-e.Y)-(a-e.X)*(o-e.Y);if(c==0)return-1;c>0==l>o&&(r=1-r)}else if(a>e.X){var c=(n-e.X)*(l-e.Y)-(a-e.X)*(o-e.Y);if(c==0)return-1;c>0==l>o&&(r=1-r)}}if(t=t.Next,i==t)break}return r};p.Clipper.prototype.Poly2ContainsPoly1=function(e,t){var r=e;do{var i=this.PointInPolygon(r.Pt,t);if(i>=0)return i!=0;r=r.Next}while(r!=e);return!0};p.Clipper.prototype.FixupFirstLefts1=function(e,t){for(var r=0,i=this.m_PolyOuts.length;r<i;r++){var n=this.m_PolyOuts[r];n.Pts!==null&&n.FirstLeft==e&&this.Poly2ContainsPoly1(n.Pts,t.Pts)&&(n.FirstLeft=t)}};p.Clipper.prototype.FixupFirstLefts2=function(e,t){for(var r=0,i=this.m_PolyOuts,n=i.length,o=i[r];r<n;r++,o=i[r])o.FirstLeft==e&&(o.FirstLeft=t)};p.Clipper.ParseFirstLeft=function(e){for(;e!=null&&e.Pts==null;)e=e.FirstLeft;return e};p.Clipper.prototype.JoinCommonEdges=function(){for(var e=0,t=this.m_Joins.length;e<t;e++){var r=this.m_Joins[e],i=this.GetOutRec(r.OutPt1.Idx),n=this.GetOutRec(r.OutPt2.Idx);if(!(i.Pts==null||n.Pts==null)){var o;if(i==n?o=i:this.Param1RightOfParam2(i,n)?o=n:this.Param1RightOfParam2(n,i)?o=i:o=this.GetLowermostRec(i,n),!!this.JoinPoints(r,i,n))if(i==n){if(i.Pts=r.OutPt1,i.BottomPt=null,n=this.CreateOutRec(),n.Pts=r.OutPt2,this.UpdateOutPtIdxs(n),this.m_UsingPolyTree)for(var a=0,l=this.m_PolyOuts.length;a<l-1;a++){var c=this.m_PolyOuts[a];c.Pts==null||p.Clipper.ParseFirstLeft(c.FirstLeft)!=i||c.IsHole==i.IsHole||this.Poly2ContainsPoly1(c.Pts,r.OutPt2)&&(c.FirstLeft=n)}this.Poly2ContainsPoly1(n.Pts,i.Pts)?(n.IsHole=!i.IsHole,n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i),(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)):this.Poly2ContainsPoly1(i.Pts,n.Pts)?(n.IsHole=i.IsHole,i.IsHole=!n.IsHole,n.FirstLeft=i.FirstLeft,i.FirstLeft=n,this.m_UsingPolyTree&&this.FixupFirstLefts2(i,n),(i.IsHole^this.ReverseSolution)==this.Area(i)>0&&this.ReversePolyPtLinks(i.Pts)):(n.IsHole=i.IsHole,n.FirstLeft=i.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(i,n))}else n.Pts=null,n.BottomPt=null,n.Idx=i.Idx,i.IsHole=o.IsHole,o==n&&(i.FirstLeft=n.FirstLeft),n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i)}}};p.Clipper.prototype.UpdateOutPtIdxs=function(e){var t=e.Pts;do t.Idx=e.Idx,t=t.Prev;while(t!=e.Pts)};p.Clipper.prototype.DoSimplePolygons=function(){for(var e=0;e<this.m_PolyOuts.length;){var t=this.m_PolyOuts[e++],r=t.Pts;if(r!==null)do{for(var i=r.Next;i!=t.Pts;){if(p.IntPoint.op_Equality(r.Pt,i.Pt)&&i.Next!=r&&i.Prev!=r){var n=r.Prev,o=i.Prev;r.Prev=o,o.Next=r,i.Prev=n,n.Next=i,t.Pts=r;var a=this.CreateOutRec();a.Pts=i,this.UpdateOutPtIdxs(a),this.Poly2ContainsPoly1(a.Pts,t.Pts)?(a.IsHole=!t.IsHole,a.FirstLeft=t):this.Poly2ContainsPoly1(t.Pts,a.Pts)?(a.IsHole=t.IsHole,t.IsHole=!a.IsHole,a.FirstLeft=t.FirstLeft,t.FirstLeft=a):(a.IsHole=t.IsHole,a.FirstLeft=t.FirstLeft),i=r}i=i.Next}r=r.Next}while(r!=t.Pts)}};p.Clipper.Area=function(e){var t=e.length;if(t<3)return 0;for(var r=0,i=0,n=t-1;i<t;++i)r+=(e[n].X+e[i].X)*(e[n].Y-e[i].Y),n=i;return-r*.5};p.Clipper.prototype.Area=function(e){var t=e.Pts;if(t==null)return 0;var r=0;do r=r+(t.Prev.Pt.X+t.Pt.X)*(t.Prev.Pt.Y-t.Pt.Y),t=t.Next;while(t!=e.Pts);return r*.5};sb&&(p.Clipper.OffsetPaths=function(e,t,r,i,n){var o=new p.Paths,a=new p.ClipperOffset(n,n);return a.AddPaths(e,r,i),a.Execute(o,t),o});p.Clipper.SimplifyPolygon=function(e,t){var r=new Array,i=new p.Clipper(0);return i.StrictlySimple=!0,i.AddPath(e,p.PolyType.ptSubject,!0),i.Execute(p.ClipType.ctUnion,r,t,t),r};p.Clipper.SimplifyPolygons=function(e,t){typeof t>"u"&&(t=p.PolyFillType.pftEvenOdd);var r=new Array,i=new p.Clipper(0);return i.StrictlySimple=!0,i.AddPaths(e,p.PolyType.ptSubject,!0),i.Execute(p.ClipType.ctUnion,r,t,t),r};p.Clipper.DistanceSqrd=function(e,t){var r=e.X-t.X,i=e.Y-t.Y;return r*r+i*i};p.Clipper.DistanceFromLineSqrd=function(e,t,r){var i=t.Y-r.Y,n=r.X-t.X,o=i*t.X+n*t.Y;return o=i*e.X+n*e.Y-o,o*o/(i*i+n*n)};p.Clipper.SlopesNearCollinear=function(e,t,r,i){return p.Clipper.DistanceFromLineSqrd(t,e,r)<i};p.Clipper.PointsAreClose=function(e,t,r){var i=e.X-t.X,n=e.Y-t.Y;return i*i+n*n<=r};p.Clipper.ExcludeOp=function(e){var t=e.Prev;return t.Next=e.Next,e.Next.Prev=t,t.Idx=0,t};p.Clipper.CleanPolygon=function(e,t){typeof t>"u"&&(t=1.415);var r=e.length;if(r==0)return new Array;for(var i=new Array(r),n=0;n<r;++n)i[n]=new p.OutPt;for(var n=0;n<r;++n)i[n].Pt=e[n],i[n].Next=i[(n+1)%r],i[n].Next.Prev=i[n],i[n].Idx=0;for(var o=t*t,a=i[0];a.Idx==0&&a.Next!=a.Prev;)p.Clipper.PointsAreClose(a.Pt,a.Prev.Pt,o)?(a=p.Clipper.ExcludeOp(a),r--):p.Clipper.PointsAreClose(a.Prev.Pt,a.Next.Pt,o)?(p.Clipper.ExcludeOp(a.Next),a=p.Clipper.ExcludeOp(a),r-=2):p.Clipper.SlopesNearCollinear(a.Prev.Pt,a.Pt,a.Next.Pt,o)?(a=p.Clipper.ExcludeOp(a),r--):(a.Idx=1,a=a.Next);r<3&&(r=0);for(var l=new Array(r),n=0;n<r;++n)l[n]=new p.IntPoint(a.Pt),a=a.Next;return i=null,l};p.Clipper.CleanPolygons=function(e,t){for(var r=new Array(e.length),i=0,n=e.length;i<n;i++)r[i]=p.Clipper.CleanPolygon(e[i],t);return r};p.Clipper.Minkowski=function(e,t,r,i){var n=i?1:0,o=e.length,a=t.length,l=new Array;if(r)for(var c=0;c<a;c++){for(var h=new Array(o),d=0,y=e.length,m=e[d];d<y;d++,m=e[d])h[d]=new p.IntPoint(t[c].X+m.X,t[c].Y+m.Y);l.push(h)}else for(var c=0;c<a;c++){for(var h=new Array(o),d=0,y=e.length,m=e[d];d<y;d++,m=e[d])h[d]=new p.IntPoint(t[c].X-m.X,t[c].Y-m.Y);l.push(h)}for(var x=new Array,c=0;c<a-1+n;c++)for(var d=0;d<o;d++){var S=new Array;S.push(l[c%a][d%o]),S.push(l[(c+1)%a][d%o]),S.push(l[(c+1)%a][(d+1)%o]),S.push(l[c%a][(d+1)%o]),p.Clipper.Orientation(S)||S.reverse(),x.push(S)}var P=new p.Clipper(0);return P.AddPaths(x,p.PolyType.ptSubject,!0),P.Execute(p.ClipType.ctUnion,l,p.PolyFillType.pftNonZero,p.PolyFillType.pftNonZero),l};p.Clipper.MinkowskiSum=function(){var e=arguments,t=e.length;if(t==3){var r=e[0],i=e[1],n=e[2];return p.Clipper.Minkowski(r,i,!0,n)}else if(t==4){for(var r=e[0],o=e[1],a=e[2],n=e[3],l=new p.Clipper,c,h=0,d=o.length;h<d;++h){var c=p.Clipper.Minkowski(r,o[h],!0,n);l.AddPaths(c,p.PolyType.ptSubject,!0)}n&&l.AddPaths(o,p.PolyType.ptClip,!0);var y=new p.Paths;return l.Execute(p.ClipType.ctUnion,y,a,a),y}};p.Clipper.MinkowskiDiff=function(e,t,r){return p.Clipper.Minkowski(e,t,!1,r)};p.Clipper.PolyTreeToPaths=function(e){var t=new Array;return p.Clipper.AddPolyNodeToPaths(e,p.Clipper.NodeType.ntAny,t),t};p.Clipper.AddPolyNodeToPaths=function(e,t,r){var i=!0;switch(t){case p.Clipper.NodeType.ntOpen:return;case p.Clipper.NodeType.ntClosed:i=!e.IsOpen;break;default:break}e.m_polygon.length>0&&i&&r.push(e.m_polygon);for(var n=0,o=e.Childs(),a=o.length,l=o[n];n<a;n++,l=o[n])p.Clipper.AddPolyNodeToPaths(l,t,r)};p.Clipper.OpenPathsFromPolyTree=function(e){for(var t=new p.Paths,r=0,i=e.ChildCount();r<i;r++)e.Childs()[r].IsOpen&&t.push(e.Childs()[r].m_polygon);return t};p.Clipper.ClosedPathsFromPolyTree=function(e){var t=new p.Paths;return p.Clipper.AddPolyNodeToPaths(e,p.Clipper.NodeType.ntClosed,t),t};Wl(p.Clipper,p.ClipperBase);p.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2};p.ClipperOffset=function(e,t){typeof e>"u"&&(e=2),typeof t>"u"&&(t=p.ClipperOffset.def_arc_tolerance),this.m_destPolys=new p.Paths,this.m_srcPoly=new p.Path,this.m_destPoly=new p.Path,this.m_normals=new Array,this.m_delta=0,this.m_sinA=0,this.m_sin=0,this.m_cos=0,this.m_miterLim=0,this.m_StepsPerRad=0,this.m_lowest=new p.IntPoint,this.m_polyNodes=new p.PolyNode,this.MiterLimit=e,this.ArcTolerance=t,this.m_lowest.X=-1};p.ClipperOffset.two_pi=6.28318530717959;p.ClipperOffset.def_arc_tolerance=.25;p.ClipperOffset.prototype.Clear=function(){p.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1};p.ClipperOffset.Round=p.Clipper.Round;p.ClipperOffset.prototype.AddPath=function(e,t,r){var i=e.length-1;if(!(i<0)){var n=new p.PolyNode;if(n.m_jointype=t,n.m_endtype=r,r==p.EndType.etClosedLine||r==p.EndType.etClosedPolygon)for(;i>0&&p.IntPoint.op_Equality(e[0],e[i]);)i--;n.m_polygon.push(e[0]);for(var o=0,a=0,l=1;l<=i;l++)p.IntPoint.op_Inequality(n.m_polygon[o],e[l])&&(o++,n.m_polygon.push(e[l]),(e[l].Y>n.m_polygon[a].Y||e[l].Y==n.m_polygon[a].Y&&e[l].X<n.m_polygon[a].X)&&(a=o));if(!(r==p.EndType.etClosedPolygon&&o<2||r!=p.EndType.etClosedPolygon&&o<0)&&(this.m_polyNodes.AddChild(n),r==p.EndType.etClosedPolygon))if(this.m_lowest.X<0)this.m_lowest=new p.IntPoint(0,a);else{var c=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];(n.m_polygon[a].Y>c.Y||n.m_polygon[a].Y==c.Y&&n.m_polygon[a].X<c.X)&&(this.m_lowest=new p.IntPoint(this.m_polyNodes.ChildCount()-1,a))}}};p.ClipperOffset.prototype.AddPaths=function(e,t,r){for(var i=0,n=e.length;i<n;i++)this.AddPath(e[i],t,r)};p.ClipperOffset.prototype.FixOrientations=function(){if(this.m_lowest.X>=0&&!p.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var e=0;e<this.m_polyNodes.ChildCount();e++){var t=this.m_polyNodes.Childs()[e];(t.m_endtype==p.EndType.etClosedPolygon||t.m_endtype==p.EndType.etClosedLine&&p.Clipper.Orientation(t.m_polygon))&&t.m_polygon.reverse()}else for(var e=0;e<this.m_polyNodes.ChildCount();e++){var t=this.m_polyNodes.Childs()[e];t.m_endtype==p.EndType.etClosedLine&&!p.Clipper.Orientation(t.m_polygon)&&t.m_polygon.reverse()}};p.ClipperOffset.GetUnitNormal=function(e,t){var r=t.X-e.X,i=t.Y-e.Y;if(r==0&&i==0)return new p.DoublePoint(0,0);var n=1/Math.sqrt(r*r+i*i);return r*=n,i*=n,new p.DoublePoint(i,-r)};p.ClipperOffset.prototype.DoOffset=function(e){if(this.m_destPolys=new Array,this.m_delta=e,p.ClipperBase.near_zero(e)){for(var t=0;t<this.m_polyNodes.ChildCount();t++){var r=this.m_polyNodes.Childs()[t];r.m_endtype==p.EndType.etClosedPolygon&&this.m_destPolys.push(r.m_polygon)}return}this.MiterLimit>2?this.m_miterLim=2/(this.MiterLimit*this.MiterLimit):this.m_miterLim=.5;var i;this.ArcTolerance<=0?i=p.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(e)*p.ClipperOffset.def_arc_tolerance?i=Math.abs(e)*p.ClipperOffset.def_arc_tolerance:i=this.ArcTolerance;var n=3.14159265358979/Math.acos(1-i/Math.abs(e));this.m_sin=Math.sin(p.ClipperOffset.two_pi/n),this.m_cos=Math.cos(p.ClipperOffset.two_pi/n),this.m_StepsPerRad=n/p.ClipperOffset.two_pi,e<0&&(this.m_sin=-this.m_sin);for(var t=0;t<this.m_polyNodes.ChildCount();t++){var r=this.m_polyNodes.Childs()[t];this.m_srcPoly=r.m_polygon;var o=this.m_srcPoly.length;if(!(o==0||e<=0&&(o<3||r.m_endtype!=p.EndType.etClosedPolygon))){if(this.m_destPoly=new Array,o==1){if(r.m_jointype==p.JoinType.jtRound)for(var a=1,l=0,c=1;c<=n;c++){this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+a*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+l*e)));var h=a;a=a*this.m_cos-this.m_sin*l,l=h*this.m_sin+l*this.m_cos}else for(var a=-1,l=-1,c=0;c<4;++c)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+a*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+l*e))),a<0?a=1:l<0?l=1:a=-1;this.m_destPolys.push(this.m_destPoly);continue}this.m_normals.length=0;for(var c=0;c<o-1;c++)this.m_normals.push(p.ClipperOffset.GetUnitNormal(this.m_srcPoly[c],this.m_srcPoly[c+1]));if(r.m_endtype==p.EndType.etClosedLine||r.m_endtype==p.EndType.etClosedPolygon?this.m_normals.push(p.ClipperOffset.GetUnitNormal(this.m_srcPoly[o-1],this.m_srcPoly[0])):this.m_normals.push(new p.DoublePoint(this.m_normals[o-2])),r.m_endtype==p.EndType.etClosedPolygon){for(var d=o-1,c=0;c<o;c++)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly)}else if(r.m_endtype==p.EndType.etClosedLine){for(var d=o-1,c=0;c<o;c++)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly),this.m_destPoly=new Array;for(var y=this.m_normals[o-1],c=o-1;c>0;c--)this.m_normals[c]=new p.DoublePoint(-this.m_normals[c-1].X,-this.m_normals[c-1].Y);this.m_normals[0]=new p.DoublePoint(-y.X,-y.Y),d=0;for(var c=o-1;c>=0;c--)d=this.OffsetPoint(c,d,r.m_jointype);this.m_destPolys.push(this.m_destPoly)}else{for(var d=0,c=1;c<o-1;++c)d=this.OffsetPoint(c,d,r.m_jointype);var m;if(r.m_endtype==p.EndType.etOpenButt){var c=o-1;m=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[c].X+this.m_normals[c].X*e),p.ClipperOffset.Round(this.m_srcPoly[c].Y+this.m_normals[c].Y*e)),this.m_destPoly.push(m),m=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[c].X-this.m_normals[c].X*e),p.ClipperOffset.Round(this.m_srcPoly[c].Y-this.m_normals[c].Y*e)),this.m_destPoly.push(m)}else{var c=o-1;d=o-2,this.m_sinA=0,this.m_normals[c]=new p.DoublePoint(-this.m_normals[c].X,-this.m_normals[c].Y),r.m_endtype==p.EndType.etOpenSquare?this.DoSquare(c,d):this.DoRound(c,d)}for(var c=o-1;c>0;c--)this.m_normals[c]=new p.DoublePoint(-this.m_normals[c-1].X,-this.m_normals[c-1].Y);this.m_normals[0]=new p.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y),d=o-1;for(var c=d-1;c>0;--c)d=this.OffsetPoint(c,d,r.m_jointype);r.m_endtype==p.EndType.etOpenButt?(m=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*e)),this.m_destPoly.push(m),m=new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*e),p.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*e)),this.m_destPoly.push(m)):(d=1,this.m_sinA=0,r.m_endtype==p.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1)),this.m_destPolys.push(this.m_destPoly)}}}};p.ClipperOffset.prototype.Execute=function(){var e=arguments,t=e[0]instanceof p.PolyTree;if(t){var r=e[0],i=e[1];r.Clear(),this.FixOrientations(),this.DoOffset(i);var n=new p.Clipper(0);if(n.AddPaths(this.m_destPolys,p.PolyType.ptSubject,!0),i>0)n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftPositive,p.PolyFillType.pftPositive);else{var o=p.Clipper.GetBounds(this.m_destPolys),a=new p.Path;if(a.push(new p.IntPoint(o.left-10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.top-10)),a.push(new p.IntPoint(o.left-10,o.top-10)),n.AddPath(a,p.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftNegative,p.PolyFillType.pftNegative),r.ChildCount()==1&&r.Childs()[0].ChildCount()>0){var l=r.Childs()[0];r.Childs()[0]=l.Childs()[0];for(var c=1;c<l.ChildCount();c++)r.AddChild(l.Childs()[c])}else r.Clear()}}else{var r=e[0],i=e[1];p.Clear(r),this.FixOrientations(),this.DoOffset(i);var n=new p.Clipper(0);if(n.AddPaths(this.m_destPolys,p.PolyType.ptSubject,!0),i>0)n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftPositive,p.PolyFillType.pftPositive);else{var o=p.Clipper.GetBounds(this.m_destPolys),a=new p.Path;a.push(new p.IntPoint(o.left-10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.bottom+10)),a.push(new p.IntPoint(o.right+10,o.top-10)),a.push(new p.IntPoint(o.left-10,o.top-10)),n.AddPath(a,p.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(p.ClipType.ctUnion,r,p.PolyFillType.pftNegative,p.PolyFillType.pftNegative),r.length>0&&r.splice(0,1)}}};p.ClipperOffset.prototype.OffsetPoint=function(e,t,r){if(this.m_sinA=this.m_normals[t].X*this.m_normals[e].Y-this.m_normals[e].X*this.m_normals[t].Y,this.m_sinA<5e-5&&this.m_sinA>-5e-5)return t;if(this.m_sinA>1?this.m_sinA=1:this.m_sinA<-1&&(this.m_sinA=-1),this.m_sinA*this.m_delta<0)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[t].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[t].Y*this.m_delta))),this.m_destPoly.push(new p.IntPoint(this.m_srcPoly[e])),this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[e].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[e].Y*this.m_delta)));else switch(r){case p.JoinType.jtMiter:{var i=1+(this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y);i>=this.m_miterLim?this.DoMiter(e,t,i):this.DoSquare(e,t);break}case p.JoinType.jtSquare:this.DoSquare(e,t);break;case p.JoinType.jtRound:this.DoRound(e,t);break}return t=e,t};p.ClipperOffset.prototype.DoSquare=function(e,t){var r=Math.tan(Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y)/4);this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_delta*(this.m_normals[t].X-this.m_normals[t].Y*r)),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_delta*(this.m_normals[t].Y+this.m_normals[t].X*r)))),this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_delta*(this.m_normals[e].X+this.m_normals[e].Y*r)),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_delta*(this.m_normals[e].Y-this.m_normals[e].X*r))))};p.ClipperOffset.prototype.DoMiter=function(e,t,r){var i=this.m_delta/r;this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+(this.m_normals[t].X+this.m_normals[e].X)*i),p.ClipperOffset.Round(this.m_srcPoly[e].Y+(this.m_normals[t].Y+this.m_normals[e].Y)*i)))};p.ClipperOffset.prototype.DoRound=function(e,t){for(var r=Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y),i=p.Cast_Int32(p.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(r))),n=this.m_normals[t].X,o=this.m_normals[t].Y,a,l=0;l<i;++l)this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+n*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+o*this.m_delta))),a=n,n=n*this.m_cos-this.m_sin*o,o=a*this.m_sin+o*this.m_cos;this.m_destPoly.push(new p.IntPoint(p.ClipperOffset.Round(this.m_srcPoly[e].X+this.m_normals[e].X*this.m_delta),p.ClipperOffset.Round(this.m_srcPoly[e].Y+this.m_normals[e].Y*this.m_delta)))};p.Error=function(e){try{throw new Error(e)}catch(t){alert(t.message)}};p.JS={};p.JS.AreaOfPolygon=function(e,t){return t||(t=1),p.Clipper.Area(e)/(t*t)};p.JS.AreaOfPolygons=function(e,t){t||(t=1);for(var r=0,i=0;i<e.length;i++)r+=p.Clipper.Area(e[i]);return r/(t*t)};p.JS.BoundsOfPath=function(e,t){return p.JS.BoundsOfPaths([e],t)};p.JS.BoundsOfPaths=function(e,t){t||(t=1);var r=p.Clipper.GetBounds(e);return r.left/=t,r.bottom/=t,r.right/=t,r.top/=t,r};p.JS.Clean=function(i,t){if(!(i instanceof Array))return[];var r=i[0]instanceof Array,i=p.JS.Clone(i);if(typeof t!="number"||t===null)return p.Error("Delta is not a number in Clean()."),i;if(i.length===0||i.length==1&&i[0].length===0||t<0)return i;r||(i=[i]);for(var n=i.length,o,a,l,c,h,d,y,m=[],x=0;x<n;x++)if(a=i[x],o=a.length,o!==0){if(o<3){l=a,m.push(l);continue}for(l=a,c=t*t,h=a[0],d=1,y=1;y<o;y++)(a[y].X-h.X)*(a[y].X-h.X)+(a[y].Y-h.Y)*(a[y].Y-h.Y)<=c||(l[d]=a[y],h=a[y],d++);h=a[d-1],(a[0].X-h.X)*(a[0].X-h.X)+(a[0].Y-h.Y)*(a[0].Y-h.Y)<=c&&d--,d<o&&l.splice(d,o-d),l.length&&m.push(l)}return!r&&m.length?m=m[0]:!r&&m.length===0?m=[]:r&&m.length===0&&(m=[[]]),m};p.JS.Clone=function(e){if(!(e instanceof Array))return[];if(e.length===0)return[];if(e.length==1&&e[0].length===0)return[[]];var t=e[0]instanceof Array;t||(e=[e]);var r=e.length,i,n,o,a,l=new Array(r);for(n=0;n<r;n++){for(i=e[n].length,a=new Array(i),o=0;o<i;o++)a[o]={X:e[n][o].X,Y:e[n][o].Y};l[n]=a}return t||(l=l[0]),l};p.JS.Lighten=function(e,t){if(!(e instanceof Array))return[];if(typeof t!="number"||t===null)return p.Error("Tolerance is not a number in Lighten()."),p.JS.Clone(e);if(e.length===0||e.length==1&&e[0].length===0||t<0)return p.JS.Clone(e);e[0]instanceof Array||(e=[e]);var r,i,n,o,a,l,c,h,d,y,m,x,S,P,g,C,M,T=e.length,w=t*t,E=[];for(r=0;r<T;r++)if(n=e[r],l=n.length,l!=0){for(o=0;o<1e6;o++){for(a=[],l=n.length,n[l-1].X!=n[0].X||n[l-1].Y!=n[0].Y?(x=1,n.push({X:n[0].X,Y:n[0].Y}),l=n.length):x=0,m=[],i=0;i<l-2;i++)c=n[i],d=n[i+1],h=n[i+2],C=c.X,M=c.Y,S=h.X-C,P=h.Y-M,(S!==0||P!==0)&&(g=((d.X-C)*S+(d.Y-M)*P)/(S*S+P*P),g>1?(C=h.X,M=h.Y):g>0&&(C+=S*g,M+=P*g)),S=d.X-C,P=d.Y-M,y=S*S+P*P,y<=w&&(m[i+1]=1,i++);for(a.push({X:n[0].X,Y:n[0].Y}),i=1;i<l-1;i++)m[i]||a.push({X:n[i].X,Y:n[i].Y});if(a.push({X:n[l-1].X,Y:n[l-1].Y}),x&&n.pop(),m.length)n=a;else break}l=a.length,a[l-1].X==a[0].X&&a[l-1].Y==a[0].Y&&a.pop(),a.length>2&&E.push(a)}return!e[0]instanceof Array&&(E=E[0]),typeof E>"u"&&(E=[[]]),E};p.JS.PerimeterOfPath=function(e,t,r){if(typeof e>"u")return 0;var i=Math.sqrt,n=0,o,a,l=0,c=0,h=0,d=0,y=e.length;if(y<2)return 0;for(t&&(e[y]=e[0],y++);--y;)o=e[y],l=o.X,c=o.Y,a=e[y-1],h=a.X,d=a.Y,n+=i((l-h)*(l-h)+(c-d)*(c-d));return t&&e.pop(),n/r};p.JS.PerimeterOfPaths=function(e,t,r){r||(r=1);for(var i=0,n=0;n<e.length;n++)i+=p.JS.PerimeterOfPath(e[n],t,r);return i};p.JS.ScaleDownPath=function(e,t){var r,i;for(t||(t=1),r=e.length;r--;)i=e[r],i.X=i.X/t,i.Y=i.Y/t};p.JS.ScaleDownPaths=function(e,t){var r,i,n,o=Math.round;for(t||(t=1),r=e.length;r--;)for(i=e[r].length;i--;)n=e[r][i],n.X=n.X/t,n.Y=n.Y/t};p.JS.ScaleUpPath=function(e,t){var r,i,n=Math.round;for(t||(t=1),r=e.length;r--;)i=e[r],i.X=n(i.X*t),i.Y=n(i.Y*t)};p.JS.ScaleUpPaths=function(e,t){var r,i,n,o=Math.round;for(t||(t=1),r=e.length;r--;)for(i=e[r].length;i--;)n=e[r][i],n.X=o(n.X*t),n.Y=o(n.Y*t)};p.ExPolygons=function(){return[]};p.ExPolygon=function(){this.outer=null,this.holes=null};p.JS.AddOuterPolyNodeToExPolygons=function(e,t){var r=new p.ExPolygon;r.outer=e.Contour();var i=e.Childs(),n=i.length;r.holes=new Array(n);var o,a,l,c,h,d;for(l=0;l<n;l++)for(o=i[l],r.holes[l]=o.Contour(),c=0,h=o.Childs(),d=h.length;c<d;c++)a=h[c],p.JS.AddOuterPolyNodeToExPolygons(a,t);t.push(r)};p.JS.ExPolygonsToPaths=function(e){var t,r,i,n,o=new p.Paths;for(t=0,i=e.length;t<i;t++)for(o.push(e[t].outer),r=0,n=e[t].holes.length;r<n;r++)o.push(e[t].holes[r]);return o};p.JS.PolyTreeToExPolygons=function(e){var t=new p.ExPolygons,r,i,n,o;for(i=0,n=e.Childs(),o=n.length;i<o;i++)r=n[i],p.JS.AddOuterPolyNodeToExPolygons(r,t);return t};ua.exports=p});var Fn=N((bf,Cf)=>{f();var xf=s(function(){this._tweens={},this._tweensAddedDuringUpdate={}},"_Group");xf.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var r=Object.keys(this._tweens);if(r.length===0)return!1;for(e=e!==void 0?e:it.now();r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var n=this._tweens[r[i]];n&&n.update(e)===!1&&(n._isPlaying=!1,t||delete this._tweens[r[i]])}r=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var it=new xf;it.Group=xf;it._nextId=0;it.nextId=function(){return it._nextId++};typeof self>"u"&&typeof b<"u"&&b.hrtime?it.now=function(){var e=b.hrtime();return e[0]*1e3+e[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?it.now=self.performance.now.bind(self.performance):Date.now!==void 0?it.now=Date.now:it.now=function(){return new Date().getTime()};it.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=it.Easing.Linear.None,this._interpolationFunction=it.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||it,this._id=it.nextId()};it.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,t!==void 0&&(this._duration=t),this},duration:s(function(t){return this._duration=t,this},"duration"),start:function(e){this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=e!==void 0?typeof e=="string"?it.now()+parseFloat(e):e:it.now(),this._startTime+=this._delayTime;for(var t in this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(this._valuesEnd[t].length===0)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}this._object[t]!==void 0&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array||(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._onStopCallback!==null&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onRepeat:s(function(t){return this._onRepeatCallback=t,this},"onRepeat"),onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,r,i;if(e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback!==null&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=this._duration===0||r>1?1:r,i=this._easingFunction(r);for(t in this._valuesEnd)if(this._valuesStart[t]!==void 0){var n=this._valuesStart[t]||0,o=this._valuesEnd[t];o instanceof Array?this._object[t]=this._interpolationFunction(o,i):(typeof o=="string"&&(o.charAt(0)==="+"||o.charAt(0)==="-"?o=n+parseFloat(o):o=parseFloat(o)),typeof o=="number"&&(this._object[t]=n+(o-n)*i))}if(this._onUpdateCallback!==null&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(t in this._valuesStartRepeat){if(typeof this._valuesEnd[t]=="string"&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var a=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=a}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback!==null&&this._onRepeatCallback(this._object),!0}else{this._onCompleteCallback!==null&&this._onCompleteCallback(this._object);for(var l=0,c=this._chainedTweens.length;l<c;l++)this._chainedTweens[l].start(this._startTime+this._duration);return!1}return!0}};it.Easing={Linear:{None:function(e){return e}},Quadratic:{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:{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:{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:{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:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.cos(Math.PI*e))}},Exponential:{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:{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:{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:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-it.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?it.Easing.Bounce.In(e*2)*.5:it.Easing.Bounce.Out(e*2-1)*.5+.5}}};it.Interpolation={Linear:function(e,t){var r=e.length-1,i=r*t,n=Math.floor(i),o=it.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],i):t>1?o(e[r],e[r-1],r-i):o(e[n],e[n+1>r?r:n+1],i-n)},Bezier:function(e,t){for(var r=0,i=e.length-1,n=Math.pow,o=it.Interpolation.Utils.Bernstein,a=0;a<=i;a++)r+=n(1-t,i-a)*n(t,a)*e[a]*o(i,a);return r},CatmullRom:function(e,t){var r=e.length-1,i=r*t,n=Math.floor(i),o=it.Interpolation.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(n=Math.floor(i=r*(1+t))),o(e[(n-1+r)%r],e[n],e[(n+1)%r],e[(n+2)%r],i-n)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[n?n-1:0],e[n],e[r<n+1?r:n+1],e[r<n+2?r:n+2],i-n)},Utils:{Linear:function(e,t,r){return(t-e)*r+e},Bernstein:function(e,t){var r=it.Interpolation.Utils.Factorial;return r(e)/r(t)/r(e-t)},Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var i=t;i>1;i--)r*=i;return e[t]=r,r}}(),CatmullRom:function(e,t,r,i,n){var o=(r-e)*.5,a=(i-t)*.5,l=n*n,c=n*l;return(2*t-2*r+o+a)*c+(-3*t+3*r-2*o-a)*l+o*n+t}}};(function(e){typeof define=="function"&&define.amd?define([],function(){return it}):typeof Cf<"u"&&typeof bf=="object"?Cf.exports=it:e!==void 0&&(e.TWEEN=it)})(bf)});f();f();var jc=new WeakMap,Bt,Uc=class Uc{constructor(t){I(this,Bt,void 0);_(this,Bt,t),jc.set(this,t)}get mapName(){return u(this,Bt).mapName}get mapCenter(){return u(this,Bt).mapCenter}get organizationId(){return u(this,Bt).organizationId}get outdoorViewToken(){return u(this,Bt).outdoorViewToken}getByType(t){switch(t){case"space":return u(this,Bt).spaces;case"door":return u(this,Bt).doors;case"floor":return u(this,Bt).floors;case"connection":return u(this,Bt).connections;case"object":return u(this,Bt).objects;case"point-of-interest":return u(this,Bt).pointsOfInterest;case"annotation":return u(this,Bt).annotations;default:return[]}}getById(t,r){return u(this,Bt).getById(t,r)}};Bt=new WeakMap,s(Uc,"MapData");var Yc=Uc,zc=Yc;f();f();f();var x3={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},X=x3;f();var um=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];var pm=globalThis.fetch,hm,S3=(hm=b==null?void 0:b.env)==null?void 0:hm.npm_package_version;function Wc(){if(pm==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return pm}s(Wc,"isomorphicFetch");var P3={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function Zc(e){var r;let t={...P3,...e};return t.headers={...t.headers,"mappedin-sdk-version":S3},t.things=[],"platformString"in e&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization=`Bearer ${t.accessToken}`:t.clientId&&t.clientSecret&&(t.authorization=`Basic ${globalThis.btoa(`${t.clientId}:${t.clientSecret}`)}`)),t.language=(r=t.language)==null?void 0:r.toLowerCase(),t}s(Zc,"parseOptions");async function qc(e,t){return new Promise(async(r,i)=>{try{let{url:n}=await M3(e,t),o=await Wc()(n).then(l=>l.arrayBuffer()),a=new Uint8Array(o);r(a)}catch(n){i(n)}})}s(qc,"downloadMVF");function fm(e){return e.endsWith("/")?e:`${e}/`}s(fm,"normalizeUrl");async function M3(e,t){let r=`${e.bundleBaseUri?fm(e.bundleBaseUri):"https://app.mappedin.com/"}api/venue/${e.mapId}/mvf`,i=await Wc()(r,{headers:{Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);return i.json()}s(M3,"getMakerBundleURL");async function ps(e){let t=`${e.authBaseUri?fm(e.authBaseUri):"https://auth-maker.mappedin.com/"}api-key/token`,r=await Wc()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);return r.json()}s(ps,"getMakerAccessToken");function $c(e){let t=new TextDecoder,r=t.decode.bind(t);try{let i={"connection.json":JSON.parse(r(e["connection.json"])),"manifest.geojson":JSON.parse(r(e["manifest.geojson"])),"styles.json":JSON.parse(r(e["styles.json"])),"map.geojson":JSON.parse(r(e["map.geojson"])),"mapstack.geojson":JSON.parse(r(e["mapstack.geojson"])),"node.geojson":JSON.parse(r(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(e.annotation!=null){let l=Object.keys(e.annotation);for(let c of l){let h=c.replace(/\.json|\.geojson/g,"");i.annotation[h]=JSON.parse(r(e.annotation[c]))}}let n=Object.keys(e.space);for(let l of n){let c=l.replace(/\.json|\.geojson/g,"");i.space[c]=JSON.parse(r(e.space[l]))}let o=Object.keys(e.obstruction);for(let l of o){let c=l.replace(/\.json|\.geojson/g,"");i.obstruction[c]=JSON.parse(r(e.obstruction[l]))}let a=Object.keys(e.entrance);for(let l of a){let c=l.replace(/\.json|\.geojson/g,"");i.entrance[c]=JSON.parse(r(e.entrance[l]))}return i}catch(i){throw X.error(i),new Error("MVF parsing failed! Probably encountered a bad file.")}}s($c,"parseMVF");function w3(e){if(e==null||typeof e!="object")return!1;for(let t of um)if(e[t][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}s(w3,"validateStaticMVFFiles");async function Jc(e){return new Promise(async(t,r)=>{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=(await import("./browser-6UWSUWG3.js")).unzipSync(e);if(!w3(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},a=Object.keys(n);for(let l of a){if(n[l].length===0)continue;let c=l.split("/");if(c.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(c.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(c.length!==1)if(c[0]==="image"){X.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[c[0]]==null&&(o[c[0]]={}),o[c[0]][c[1]]=n[l]}t(o)}catch(i){r(i)}})}s(Jc,"unzipMVF");f();f();f();f();var zt=63710088e-1,dm={centimeters:zt*100,centimetres:zt*100,degrees:zt/111325,feet:zt*3.28084,inches:zt*39.37,kilometers:zt/1e3,kilometres:zt/1e3,meters:zt,metres:zt,miles:zt/1609.344,millimeters:zt*1e3,millimetres:zt*1e3,nauticalmiles:zt/1852,radians:1,yards:zt*1.0936},CM={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/zt,yards:1.0936133};function wr(e,t,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}s(wr,"feature");function xe(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Kc(e[0])||!Kc(e[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:e};return wr(i,t,r)}s(xe,"point");function Ke(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:e};return wr(i,t,r)}s(Ke,"lineString");function io(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}s(io,"featureCollection");function mm(e,t){t===void 0&&(t="kilometers");var r=dm[t];if(!r)throw new Error(t+" units is invalid");return e*r}s(mm,"radiansToLength");function ym(e,t){t===void 0&&(t="kilometers");var r=dm[t];if(!r)throw new Error(t+" units is invalid");return e/r}s(ym,"lengthToRadians");function no(e){var t=e%(2*Math.PI);return t*180/Math.PI}s(no,"radiansToDegrees");function te(e){var t=e%360;return t*Math.PI/180}s(te,"degreesToRadians");function Kc(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}s(Kc,"isNumber");function Fe(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")}s(Fe,"getCoord");function se(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")}s(se,"getCoords");function gm(e,t){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}s(gm,"getType");function T3(e,t,r){r===void 0&&(r={});for(var i=Fe(e),n=se(t),o=0;o<n.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(o===0&&(a="start"),o===n.length-2&&(a="end"),o===0&&o+1===n.length-1&&(a="both")),I3(n[o],n[o+1],i,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}s(T3,"booleanPointOnLine");function I3(e,t,r,i,n){var o=r[0],a=r[1],l=e[0],c=e[1],h=t[0],d=t[1],y=r[0]-l,m=r[1]-c,x=h-l,S=d-c,P=y*S-m*x;if(n!==null){if(Math.abs(P)>n)return!1}else if(P!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(S)?x>0?l<o&&o<=h:h<=o&&o<l:S>0?c<a&&a<=d:d<=a&&a<c;if(i==="end")return Math.abs(x)>=Math.abs(S)?x>0?l<=o&&o<h:h<o&&o<=l:S>0?c<=a&&a<d:d<a&&a<=c;if(i==="both")return Math.abs(x)>=Math.abs(S)?x>0?l<o&&o<h:h<o&&o<l:S>0?c<a&&a<d:d<a&&a<c}else return Math.abs(x)>=Math.abs(S)?x>0?l<=o&&o<=h:h<=o&&o<=l:S>0?c<=a&&a<=d:d<=a&&a<=c;return!1}s(I3,"isPointOnLineSegment");var vm=T3;f();f();f();function hs(e,t,r){if(e!==null)for(var i,n,o,a,l,c,h,d=0,y=0,m,x=e.type,S=x==="FeatureCollection",P=x==="Feature",g=S?e.features.length:1,C=0;C<g;C++){h=S?e.features[C].geometry:P?e.geometry:e,m=h?h.type==="GeometryCollection":!1,l=m?h.geometries.length:1;for(var M=0;M<l;M++){var T=0,w=0;if(a=m?h.geometries[M]:h,a!==null){c=a.coordinates;var E=a.type;switch(d=r&&(E==="Polygon"||E==="MultiPolygon")?1:0,E){case null:break;case"Point":if(t(c,y,C,T,w)===!1)return!1;y++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(t(c[i],y,C,T,w)===!1)return!1;y++,E==="MultiPoint"&&T++}E==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(n=0;n<c[i].length-d;n++){if(t(c[i][n],y,C,T,w)===!1)return!1;y++}E==="MultiLineString"&&T++,E==="Polygon"&&w++}E==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(w=0,n=0;n<c[i].length;n++){for(o=0;o<c[i][n].length-d;o++){if(t(c[i][n][o],y,C,T,w)===!1)return!1;y++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(hs(a.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}s(hs,"coordEach");function Qc(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}s(Qc,"featureEach");function E3(e,t){var r,i,n,o,a,l,c,h,d,y,m=0,x=e.type==="FeatureCollection",S=e.type==="Feature",P=x?e.features.length:1;for(r=0;r<P;r++){for(l=x?e.features[r].geometry:S?e.geometry:e,h=x?e.features[r].properties:S?e.properties:{},d=x?e.features[r].bbox:S?e.bbox:void 0,y=x?e.features[r].id:S?e.id:void 0,c=l?l.type==="GeometryCollection":!1,a=c?l.geometries.length:1,n=0;n<a;n++){if(o=c?l.geometries[n]:l,o===null){if(t(null,m,h,d,y)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,m,h,d,y)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],m,h,d,y)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}m++}}s(E3,"geomEach");function oo(e,t){E3(e,function(r,i,n,o,a){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return t(wr(r,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var h=0;h<r.coordinates.length;h++){var d=r.coordinates[h],y={type:c,coordinates:d};if(t(wr(y,n),i,h)===!1)return!1}})}s(oo,"flattenEach");function _3(e,t){oo(e,function(r,i,n){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,c=0,h=0,d=0;if(hs(r,function(y,m,x,S,P){if(l===void 0||i>c||S>h||P>d){l=y,c=i,h=S,d=P,o=0;return}var g=Ke([l,y],r.properties);if(t(g,i,n,P,o)===!1)return!1;o++,l=y})===!1)return!1}}})}s(_3,"segmentEach");function bm(e,t,r){var i=r,n=!1;return _3(e,function(o,a,l,c,h){n===!1&&r===void 0?i=o:i=t(i,o,a,l,c,h),n=!0}),i}s(bm,"segmentReduce");function tu(e){var t=[1/0,1/0,-1/0,-1/0];return hs(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}s(tu,"bbox");tu.default=tu;var Cm=tu;function L3(e,t){t===void 0&&(t={});var r=Cm(e),i=(r[0]+r[2])/2,n=(r[1]+r[3])/2;return xe([i,n],t.properties,t)}s(L3,"center");var xm=L3;f();f();function O3(e,t,r){r===void 0&&(r={});var i=Fe(e),n=Fe(t),o=te(n[1]-i[1]),a=te(n[0]-i[0]),l=te(i[1]),c=te(n[1]),h=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(c);return mm(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),r.units)}s(O3,"distance");var Tr=O3;function fs(e,t){return t===void 0&&(t={}),bm(e,function(r,i){var n=i.geometry.coordinates;return r+Tr(n[0],n[1],t)},0)}s(fs,"length");f();f();f();function ds(e,t,r){if(r===void 0&&(r={}),r.final===!0)return D3(e,t);var i=Fe(e),n=Fe(t),o=te(i[0]),a=te(n[0]),l=te(i[1]),c=te(n[1]),h=Math.sin(a-o)*Math.cos(c),d=Math.cos(l)*Math.sin(c)-Math.sin(l)*Math.cos(c)*Math.cos(a-o);return no(Math.atan2(h,d))}s(ds,"bearing");function D3(e,t){var r=ds(t,e);return r=(r+180)%360,r}s(D3,"calculateFinalBearing");f();function ms(e,t,r,i){i===void 0&&(i={});var n=Fe(e),o=te(n[0]),a=te(n[1]),l=te(r),c=ym(t,i.units),h=Math.asin(Math.sin(a)*Math.cos(c)+Math.cos(a)*Math.sin(c)*Math.cos(l)),d=o+Math.atan2(Math.sin(l)*Math.sin(c)*Math.cos(a),Math.cos(c)-Math.sin(a)*Math.sin(h)),y=no(d),m=no(h);return xe([y,m],i.properties)}s(ms,"destination");f();f();function A3(e){if(!e)throw new Error("geojson is required");var t=[];return oo(e,function(r){N3(r,t)}),io(t)}s(A3,"lineSegment");function N3(e,t){var r=[],i=e.geometry;if(i!==null){switch(i.type){case"Polygon":r=se(i);break;case"LineString":r=[se(i)]}r.forEach(function(n){var o=k3(n,e.properties);o.forEach(function(a){a.id=t.length,t.push(a)})})}}s(N3,"lineSegmentFeature");function k3(e,t){var r=[];return e.reduce(function(i,n){var o=Ke([i,n],t);return o.bbox=R3(i,n),r.push(o),n}),r}s(k3,"createSegments");function R3(e,t){var r=e[0],i=e[1],n=t[0],o=t[1],a=r<n?r:n,l=i<o?i:o,c=r>n?r:n,h=i>o?i:o;return[a,l,c,h]}s(R3,"bbox");var eu=A3;var L2=Cr(E2(),1);function o6(e,t){var r={},i=[];if(e.type==="LineString"&&(e=wr(e)),t.type==="LineString"&&(t=wr(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var n=_2(e,t);return n&&i.push(n),io(i)}var o=(0,L2.default)();return o.load(eu(t)),Qc(eu(e),function(a){Qc(o.search(a),function(l){var c=_2(a,l);if(c){var h=se(c).join(",");r[h]||(r[h]=!0,i.push(c))}})}),io(i)}s(o6,"lineIntersect");function _2(e,t){var r=se(e),i=se(t);if(r.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=r[0][0],o=r[0][1],a=r[1][0],l=r[1][1],c=i[0][0],h=i[0][1],d=i[1][0],y=i[1][1],m=(y-h)*(a-n)-(d-c)*(l-o),x=(d-c)*(o-h)-(y-h)*(n-c),S=(a-n)*(o-h)-(l-o)*(n-c);if(m===0)return null;var P=x/m,g=S/m;if(P>=0&&P<=1&&g>=0&&g<=1){var C=n+P*(a-n),M=o+P*(l-o);return xe([C,M])}return null}s(_2,"intersects");var O2=o6;function a6(e,t,r){r===void 0&&(r={});var i=xe([1/0,1/0],{dist:1/0}),n=0;return oo(e,function(o){for(var a=se(o),l=0;l<a.length-1;l++){var c=xe(a[l]);c.properties.dist=Tr(t,c,r);var h=xe(a[l+1]);h.properties.dist=Tr(t,h,r);var d=Tr(c,h,r),y=Math.max(c.properties.dist,h.properties.dist),m=ds(c,h),x=ms(t,y,m+90,r),S=ms(t,y,m-90,r),P=O2(Ke([x.geometry.coordinates,S.geometry.coordinates]),Ke([c.geometry.coordinates,h.geometry.coordinates])),g=null;P.features.length>0&&(g=P.features[0],g.properties.dist=Tr(t,g,r),g.properties.location=n+Tr(c,g,r)),c.properties.dist<i.properties.dist&&(i=c,i.properties.index=l,i.properties.location=n),h.properties.dist<i.properties.dist&&(i=h,i.properties.index=l+1,i.properties.location=n+d),g&&g.properties.dist<i.properties.dist&&(i=g,i.properties.index=l),n+=d}}),i}s(a6,"nearestPointOnLine");var Mo=a6;function s6(e,t,r){var i=se(r);if(gm(r)!=="LineString")throw new Error("line must be a LineString");var n=Mo(r,e),o=Mo(r,t),a;n.properties.index<=o.properties.index?a=[n,o]:a=[o,n];for(var l=[a[0].geometry.coordinates],c=a[0].properties.index+1;c<a[1].properties.index+1;c++)l.push(i[c]);return l.push(a[1].geometry.coordinates),Ke(l,r.properties)}s(s6,"lineSlice");var Xp=s6;var l6=1e-7;function Yp(e){return{type:"Point",coordinates:e}}s(Yp,"point");function c6(e,t){let{coordinates:r}=t.geometry,{coordinates:i}=e.geometry,n=r.map(o=>Mo(e,Yp(o)));return i.reduce((o,a)=>{let l=Xp(Yp(a),n[0],e),c=Xp(Yp(a),n[1],e),h=fs(l)<fs(c)?l:c;return h.properties={...e.properties,entrances:[]},o.concat([h])},[])}s(c6,"splitObstructionByEntrance");function jp(e,t){return t.reduce((r,i)=>{let n={epsilon:l6},o=r.findIndex(l=>vm(xm(i),l,n)),a=r[o];if(a){let[l,c]=c6(a,i);r.splice(o,1,l,c)}return r},[e])}s(jp,"splitObstructionByAllEntrances");f();f();f();f();var zp=[0,4,6,8,10],vt=s(()=>{let e=new Array(16).fill(0),t=Math.random()*4294967296;for(let i=0;i<e.length;i++)i>0&&!(i&3)&&(t=Math.random()*4294967296),e[i]=t>>>((i&3)<<3)&255;let r=e.map(i=>i.toString(16).padStart(2,"0"));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],zp.map((i,n)=>r.slice(i,n===zp.length-1?void 0:zp[n+1]).join("")).join("-")},"randomId");var pn=class pn{__type=pn.__type;id=vt();latitude;longitude;floorId;static is(t){return t.__type===pn.__type}constructor(t,r,i){this.latitude=t,this.longitude=r,this.floorId=i}isEqual(t){return this.latitude===t.latitude&&this.longitude===t.longitude&&this.floorId===t.floorId}toJSON(){return{latitude:this.latitude,longitude:this.longitude,floor:this.floorId}}destroy(){}};s(pn,"Coordinate"),v(pn,"__type","coordinate");var Up=pn,$=Up;f();f();f();f();var Wp=class Wp{id;constructor(t){this.id=t}};s(Wp,"BaseMetaData");var ni=Wp;var To,hn,wo=class wo extends ni{constructor(r){super(String(vt()));I(this,To,{});I(this,hn,void 0);_(this,hn,r.mvfData)}static is(r){return r.__type===wo.__type}get url(){return u(this,hn).url}get name(){return u(this,hn).displayName}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let r of globalThis.Object.keys(u(this,To)))delete u(this,To)[r]}};To=new WeakMap,hn=new WeakMap,s(wo,"Hyperlink"),v(wo,"__type","hyperlink");var Zp=wo,hl=Zp;var qp=class qp{id;constructor(t,r){var n;this.id=t;let i=(n=r==null?void 0:r.links)!=null?n:[];i.length>0&&(this.links=i.map(o=>new hl({mvfData:o})))}links=[]};s(qp,"BaseMapData");var It=qp;var oi,rr,ai,Ar,fn=class fn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",fn.__type);I(this,oi,void 0);I(this,rr,void 0);I(this,ai,void 0);I(this,Ar,void 0);_(this,rr,{}),_(this,Ar,i.mvfData),_(this,oi,r),_(this,ai,i.floorId)}static is(r){return r.__type===fn.__type}get name(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,Ar).properties.details)==null?void 0:r.images)!=null?i:[]}get floor(){let r=u(this,oi).getById("floor",u(this,ai));if(r==null)throw new Error(`Floor ${u(this,ai)} not found!`);return r}get center(){if(u(this,rr).center==null){let[[r,i],[n,o]]=u(this,Ar).geometry.coordinates,a=(r+n)/2,l=(i+o)/2;u(this,rr).center=new $(l,a,u(this,ai))}return u(this,rr).center}get isExterior(){var n;let r=u(this,oi).obstructionIdByEntranceId[this.id],i=u(this,oi).getMVFFeatureById("obstruction",r);return(n=i==null?void 0:i.properties.footprintComponent)!=null?n:!1}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of Object.keys(u(this,rr)))delete u(this,rr)[r]}};oi=new WeakMap,rr=new WeakMap,ai=new WeakMap,Ar=new WeakMap,s(fn,"Door"),v(fn,"__type","door");var $p=fn,Nr=$p;f();var Io,si,kr,nr,dn=class dn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",dn.__type);I(this,Io,void 0);I(this,si,void 0);I(this,kr,{});I(this,nr,void 0);_(this,Io,r),_(this,si,i.floorId),_(this,nr,i.mvfData)}static is(r){return r.__type===dn.__type}get name(){var i,n;let{properties:r}=u(this,nr);return(n=(i=r.details)==null?void 0:i.name)!=null?n:r.externalId}get type(){return p6(u(this,nr).properties.kind)}get description(){var r,i;return(i=(r=u(this,nr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,nr).properties.details)==null?void 0:r.images)!=null?i:[]}get floor(){let r=u(this,Io).getById("floor",u(this,si));if(r==null)throw new Error(`Floor ${u(this,si)} not found!`);return r}get center(){var r;if(u(this,kr).center==null){let[i,n]=(r=u(this,nr).properties.center)!=null?r:[0,0];u(this,kr).center=new $(n,i,u(this,si))}return u(this,kr).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of Object.keys(u(this,kr)))delete u(this,kr)[r]}};Io=new WeakMap,si=new WeakMap,kr=new WeakMap,nr=new WeakMap,s(dn,"Space"),v(dn,"__type","space");var Jp=dn,u6=["room","hallway","exterior","void","connection.stairs","connection.elevator","poi"];function p6(e){if(e==null||e==="default")return"room";let t=e.toLowerCase();return u6.includes(t)?t:"room"}s(p6,"validateSpaceType");var Me=Jp;f();var He,ft,yn,mn=class mn extends It{constructor(r,i){super(i.mvfData.id);v(this,"__type",mn.__type);I(this,He,void 0);I(this,ft,{});I(this,yn,void 0);_(this,He,r),_(this,yn,i.mvfData)}static is(r){return r.__type===mn.__type}get name(){return u(this,yn).externalId}get elevation(){return u(this,yn).elevation}get spaces(){if(u(this,ft).spaces==null){let r=u(this,He).spaces.filter(i=>i.floor.id===this.id);u(this,ft).spaces=r}return u(this,ft).spaces}get objects(){if(u(this,ft).objects==null){let r=u(this,He).objects.filter(i=>i.floor.id===this.id);u(this,ft).objects=r}return u(this,ft).objects}get connections(){if(u(this,ft).connections==null){let r=u(this,He).connections.filter(i=>i.floors.includes(this));u(this,ft).connections=r}return u(this,ft).connections}get doors(){if(u(this,ft).doors==null){let r=u(this,He).doors.filter(i=>i.floor.id===this.id);u(this,ft).doors=r}return u(this,ft).doors}get annotations(){if(u(this,ft).annotations==null){let r=u(this,He).annotations.filter(i=>i.floor.id===this.id);u(this,ft).annotations=r}return u(this,ft).annotations}get pois(){if(u(this,ft).pois==null){let r=u(this,He).pointsOfInterest.filter(i=>i.floor.id===this.id);u(this,ft).pois=r}return u(this,ft).pois}toJSON(){return{id:this.id,name:this.name,elevation:this.elevation,spaces:this.spaces.map(r=>r.id),objects:this.objects.map(r=>r.id),connections:this.connections.map(r=>r.id),doors:this.doors.map(r=>r.id),annotations:this.annotations.map(r=>r.id),pois:this.pois.map(r=>r.id)}}destroy(){for(let r of globalThis.Object.keys(u(this,ft)))delete u(this,ft)[r]}};He=new WeakMap,ft=new WeakMap,yn=new WeakMap,s(mn,"Floor"),v(mn,"__type","floor");var Kp=mn,fl=Kp;f();f();f();var Qp=s(e=>e!=null,"notNull");f();function Rr(e){let t;if(Me.is(e)||Nr.is(e)||we.is(e))t=e.center;else if(Fr.is(e))t=e.coordinate;else if($.is(e))t=e;else return;return t}s(Rr,"getCoordinateFromStuffs");var Eo,or,ar,gn=class gn extends It{constructor(r,i){let n=Object.values(i.mvfDataByFloorId)[0];super(n.properties.id,n.properties.details);v(this,"__type",gn.__type);I(this,Eo,void 0);I(this,or,void 0);I(this,ar,void 0);_(this,or,{}),_(this,Eo,r),_(this,ar,i.mvfDataByFloorId)}static is(r){return r.__type===gn.__type}get name(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.details)==null?void 0:r.images)!=null?i:[]}get type(){var r,i;return(i=(r=Object.values(u(this,ar))[0].properties.kind)==null?void 0:r.split(".")[1])!=null?i:"unknown"}get coordinates(){return u(this,or).coordinates==null&&(u(this,or).coordinates=Object.entries(u(this,ar)).map(([r,i])=>new $(i.geometry.coordinates[1],i.geometry.coordinates[0],r))),u(this,or).coordinates}get floors(){return this.coordinates.map(r=>r.floorId?u(this,Eo).getById("floor",r.floorId):void 0).filter(Qp)}toJSON(){return{id:this.id,name:this.name,type:this.type,coordinates:this.coordinates.map(r=>r.toJSON()),floors:this.floors.map(r=>r.id)}}destroy(){for(let r of Object.keys(u(this,or)))delete u(this,or)[r]}};Eo=new WeakMap,or=new WeakMap,ar=new WeakMap,s(gn,"Connection"),v(gn,"__type","connection");var th=gn,Br=th;f();var _o,li,Gr,sr,vn=class vn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",vn.__type);I(this,_o,void 0);I(this,li,void 0);I(this,Gr,{});I(this,sr,void 0);_(this,_o,r),_(this,li,i.floorId),_(this,sr,i.mvfData)}static is(r){return r.__type===vn.__type}get name(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;return(i=(r=u(this,sr).properties.details)==null?void 0:r.images)!=null?i:[]}get type(){let r=u(this,sr).properties.kind;return r==null&&(r="object"),r==="Desks"&&(r="desk"),r.toLowerCase()}get floor(){let r=u(this,_o).getById("floor",u(this,li));if(r==null)throw new Error(`Floor ${u(this,li)} not found!`);return r}get center(){var r;if(u(this,Gr).center==null){let[i,n]=(r=u(this,sr).properties.center)!=null?r:[0,0];u(this,Gr).center=new $(n,i,u(this,li))}return u(this,Gr).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let r of globalThis.Object.keys(u(this,Gr)))u(this,Gr)[r]=null}};_o=new WeakMap,li=new WeakMap,Gr=new WeakMap,sr=new WeakMap,s(vn,"MapObject"),v(vn,"__type","object");var eh=vn,we=eh;f();f();var Oo,bn,Lo=class Lo extends ni{constructor(r){super(String(vt()));I(this,Oo,{});I(this,bn,void 0);_(this,bn,r.mvfData)}static is(r){return r.__type===Lo.__type}get url(){return u(this,bn).url}get name(){return u(this,bn).altText}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let r of globalThis.Object.keys(u(this,Oo)))delete u(this,Oo)[r]}};Oo=new WeakMap,bn=new WeakMap,s(Lo,"Image"),v(Lo,"__type","image");var rh=Lo,dl=rh;var Do,ci,Te,Vr,Cn=class Cn extends It{constructor(r,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",Cn.__type);I(this,Do,void 0);I(this,ci,void 0);I(this,Te,{});I(this,Vr,void 0);_(this,Do,r),_(this,Vr,i.mvfData),_(this,ci,i.floorId)}static is(r){return r.__type===Cn.__type}get name(){var r,i;return(i=(r=u(this,Vr).properties.details)==null?void 0:r.name)!=null?i:""}get description(){var r,i;return(i=(r=u(this,Vr).properties.details)==null?void 0:r.description)!=null?i:""}get images(){var r,i;if(u(this,Te).images==null){let n=(i=(r=u(this,Vr).properties.details)==null?void 0:r.images)!=null?i:[];u(this,Te).images=n.map(o=>new dl({mvfData:o}))}return u(this,Te).images}get floor(){let r=u(this,Do).getById("floor",u(this,ci));if(r==null)throw new Error(`Floor ${u(this,ci)} not found!`);return r}get coordinate(){var r;if(u(this,Te).coordinate==null){let[i,n]=(r=u(this,Vr).geometry.coordinates)!=null?r:[0,0];u(this,Te).coordinate=new $(n,i,u(this,ci))}return u(this,Te).coordinate}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let r in u(this,Te))u(this,Te)[r]=null}};Do=new WeakMap,ci=new WeakMap,Te=new WeakMap,Vr=new WeakMap,s(Cn,"PointOfInterest"),v(Cn,"__type","point-of-interest");var ih=Cn,Fr=ih;f();var Ao,ui,Hr,Sn,No,oh,xn=class xn extends It{constructor(r,i){super(i.mvfData.properties.id);I(this,No);v(this,"__type",xn.__type);I(this,Ao,void 0);I(this,ui,void 0);I(this,Hr,{});I(this,Sn,void 0);_(this,Ao,r),_(this,ui,i.floorId),_(this,Sn,i.mvfData)}static is(r){return r.__type===xn.__type}get group(){return j(this,No,oh).call(this).group}get type(){return j(this,No,oh).call(this).type}get coordinate(){if(u(this,Hr).coordinate==null){let[r,i]=u(this,Sn).geometry.coordinates;u(this,Hr).coordinate=new $(i,r,u(this,ui))}return u(this,Hr).coordinate}get floor(){let r=u(this,Ao).getById("floor",u(this,ui));if(r==null)throw new Error(`Floor ${u(this,ui)} not found!`);return r}toJSON(){return{id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let r of Object.keys(u(this,Hr)))delete u(this,Hr)[r]}};Ao=new WeakMap,ui=new WeakMap,Hr=new WeakMap,Sn=new WeakMap,No=new WeakSet,oh=s(function(){let[r,i]=u(this,Sn).properties.symbolId.split("--");return{group:r,type:i}},"#getGroupAndTypeFromSymbolId"),s(xn,"Annotation"),v(xn,"__type","annotation");var nh=xn,ml=nh;f();f();var Mn,Ie,pi,wn,Pn=class Pn extends It{constructor(r,i){super(i.mvfData.properties.id);v(this,"__type",Pn.__type);I(this,Mn,void 0);I(this,Ie,{});I(this,pi,void 0);I(this,wn,void 0);_(this,Mn,r),_(this,pi,i.floorId),_(this,wn,i.mvfData)}static is(r){return r.__type===Pn.__type}get floor(){let r=u(this,Mn).getById("floor",u(this,pi));if(r==null)throw new Error(`Floor ${u(this,pi)} not found!`);return r}get coordinate(){if(u(this,Ie).coordinate==null){let[r,i]=u(this,wn).geometry.coordinates;u(this,Ie).coordinate=new $(i,r,u(this,pi))}return u(this,Ie).coordinate}get neighbors(){if(u(this,Ie).neighbours==null){let r=u(this,wn).properties.neighbors.map(i=>{let n=u(this,Mn).getById("node",i.id);if(n==null)throw new Error(`Node ${i.id} not found!`);return n});u(this,Ie).neighbours=r}return u(this,Ie).neighbours}toJSON(){return{id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(r=>r.id)}}destroy(){for(let r of Object.keys(u(this,Ie)))delete u(this,Ie)[r]}};Mn=new WeakMap,Ie=new WeakMap,pi=new WeakMap,wn=new WeakMap,s(Pn,"Node"),v(Pn,"__type","node");var ah=Pn,D2=ah;var h6=s((e,t)=>{var y,m;let r={},i={},n={},o={},a={},l={},c={},h={},d=globalThis.Object.keys(e.space);for(let x of d){let S=e.space[x];if(S!=null)for(let P of S.features){h[P.properties.id]=x,a[P.properties.id]=P;for(let g of P.properties.destinationNodes)n[g]==null&&(n[g]=[]),n[g].push(P.properties.id);if(P.properties.kind==="desk-entrance"&&(o[P.properties.externalId]==null&&(o[P.properties.externalId]=[]),o[P.properties.externalId].push(...P.properties.destinationNodes)),!["void","desk-entrance"].includes((y=P.properties.kind)!=null?y:"")){if((m=P.properties.kind)!=null&&m.includes("connection")){let g=`${P.geometry.coordinates[1]}-${P.geometry.coordinates[0]}`;l[g]==null&&(l[g]=[]),l[g].push(P.properties.id);continue}if(P.properties.kind==="poi"){let g=new Fr(t,{floorId:x,mvfData:P});i[P.properties.id]=g}else{let g=new Me(t,{floorId:x,mvfData:P});r[P.properties.id]=g}}}}for(let x in l){let S=l[x],P={};for(let C of S){let M=h[C],T=a[C];P[M]=T}let g=new Br(t,{mvfDataByFloorId:P});c[g.id]=g}return{spacesById:r,poisById:i,connectionsById:c,spaceIdsByDestinationNodeId:n,objectEntranceNodeIdsByObstructionId:o,mvfSpacesById:a,connectionIdsByLatLon:l}},"processMVFSpaces"),f6=s((e,t)=>{let r={},i={};for(let n of e["node.geojson"].features){i[n.properties.id]=n;let o=new D2(t,{mvfData:n,floorId:n.properties.map});r[n.properties.id]=o}return{nodesById:r,mvfNodesById:i}},"processMVFNodes"),d6=s((e,t)=>{let r={},i={},n={},o=globalThis.Object.keys(e.obstruction);for(let a of o){let l=e.obstruction[a];if(l!=null)for(let c of l.features){i[c.properties.id]=c;for(let d of c.properties.entrances)n[d]=c.properties.id;if(c.properties.kind==="Wall")continue;let h=new we(t,{floorId:a,mvfData:c});r[c.properties.id]=h}}return{objectsById:r,mvfObstructionById:i,obstructionIdByEntranceId:n}},"processMVFObstructions"),m6=s((e,t)=>{let r={},i={};for(let n of e["map.geojson"]){i[n.id]=n;let o=new fl(t,{mvfData:n});r[n.id]=o}return{floorsById:r,mvfMapsById:i}},"processMVFMaps"),y6=s((e,t)=>{let r={},i=e["connection.json"].reduce((n,o)=>(o.nodes.forEach(a=>n[a]=o),r[o.id]=o,n),{});return{mvfConnectionsById:r,mvfConnectionsByNodeId:i}},"processMVFConnections"),g6=s((e,t)=>{let r={},i={},n=globalThis.Object.keys(e.entrance);for(let o of n){let a=e.entrance[o];if(a!=null)for(let l of a.features){i[l.properties.id]=l;let c=new Nr(t,{floorId:o,mvfData:l});r[l.properties.id]=c}}return{doorsById:r,mvfEntrancesById:i}},"processMVFEntrances"),v6=s((e,t)=>{let r={},i={};if(e.annotation==null)return{annotationsById:r,mvfAnnotationsById:i};let n=globalThis.Object.keys(e.annotation);for(let o of n){let a=e.annotation[o];if(a!=null)for(let l of a.features){i[l.properties.id]=l;let c=new ml(t,{floorId:o,mvfData:l});r[l.properties.id]=c}}return{annotationsById:r,mvfAnnotationsById:i}},"processMVFAnnotations"),A2=s((e,t)=>{let{spacesById:r,spaceIdsByDestinationNodeId:i,poisById:n,mvfSpacesById:o,objectEntranceNodeIdsByObstructionId:a,connectionsById:l,connectionIdsByLatLon:c}=h6(e,t),{nodesById:h,mvfNodesById:d}=f6(e,t),{objectsById:y,mvfObstructionById:m,obstructionIdByEntranceId:x}=d6(e,t),{floorsById:S,mvfMapsById:P}=m6(e,t),{mvfConnectionsById:g,mvfConnectionsByNodeId:C}=y6(e,t),{doorsById:M,mvfEntrancesById:T}=g6(e,t),{annotationsById:w,mvfAnnotationsById:E}=v6(e,t);return{spacesById:r,nodesById:h,objectsById:y,floorsById:S,connectionsById:l,doorsById:M,poisById:n,annotationsById:w,spaceIdsByDestinationNodeId:i,objectEntranceNodeIdsByObstructionId:a,obstructionIdByEntranceId:x,connectionIdsByLatLon:c,mvfSpacesById:o,mvfNodesById:d,mvfObstructionById:m,mvfMapsById:P,mvfConnectionsById:g,mvfConnectionsByNodeId:C,mvfEntrancesById:T,mvfAnnotationsById:E}},"createDataFromMVF");var rt,hi,fi,di,mi,yi,gi,vi,bi,Ro,Fo,Bo,Go,Vo,Ho,Xo,Yo,sh=class sh{constructor(t,r){I(this,rt,{});v(this,"mvf");v(this,"outdoorViewToken");v(this,"spaceIdsByDestinationNodeId");v(this,"objectEntranceNodeIdsByObstructionId");v(this,"obstructionIdByEntranceId");I(this,hi,void 0);I(this,fi,void 0);I(this,di,void 0);I(this,mi,void 0);I(this,yi,void 0);I(this,gi,void 0);I(this,vi,void 0);I(this,bi,void 0);I(this,Ro,void 0);I(this,Fo,void 0);I(this,Bo,void 0);I(this,Go,void 0);I(this,Vo,void 0);I(this,Ho,void 0);I(this,Xo,void 0);I(this,Yo,void 0);this.mvf=t,this.outdoorViewToken=r;let i=A2(t,this);_(this,hi,i.nodesById),_(this,fi,i.spacesById),_(this,di,i.floorsById),_(this,mi,i.connectionsById),_(this,yi,i.objectsById),_(this,gi,i.doorsById),_(this,vi,i.poisById),_(this,bi,i.annotationsById),_(this,Ro,i.mvfAnnotationsById),_(this,Fo,i.mvfConnectionsById),_(this,Bo,i.mvfConnectionsByNodeId),_(this,Go,i.mvfEntrancesById),_(this,Vo,i.mvfNodesById),_(this,Ho,i.mvfObstructionById),_(this,Xo,i.mvfSpacesById),_(this,Yo,i.mvfMapsById),this.spaceIdsByDestinationNodeId=i.spaceIdsByDestinationNodeId,this.objectEntranceNodeIdsByObstructionId=i.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=i.obstructionIdByEntranceId}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 new $(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])}get spaces(){return u(this,rt).spaces==null&&(u(this,rt).spaces=globalThis.Object.values(u(this,fi))),u(this,rt).spaces}get objects(){return u(this,rt).objects==null&&(u(this,rt).objects=globalThis.Object.values(u(this,yi))),u(this,rt).objects}get connections(){return u(this,rt).connections==null&&(u(this,rt).connections=globalThis.Object.values(u(this,mi))),u(this,rt).connections}get floors(){return u(this,rt).floors==null&&(u(this,rt).floors=globalThis.Object.values(u(this,di))),u(this,rt).floors}get doors(){return u(this,rt).doors==null&&(u(this,rt).doors=globalThis.Object.values(u(this,gi))),u(this,rt).doors}get pointsOfInterest(){return u(this,rt).pointsOfInterest==null&&(u(this,rt).pointsOfInterest=globalThis.Object.values(u(this,vi))),u(this,rt).pointsOfInterest}get annotations(){return u(this,rt).annotations==null&&(u(this,rt).annotations=globalThis.Object.values(u(this,bi))),u(this,rt).annotations}get nodes(){return u(this,rt).nodes==null&&(u(this,rt).nodes=globalThis.Object.values(u(this,hi))),u(this,rt).nodes}getById(t,r){switch(t){case"space":return u(this,fi)[r];case"floor":return u(this,di)[r];case"node":return u(this,hi)[r];case"door":return u(this,gi)[r];case"connection":return u(this,mi)[r];case"object":return u(this,yi)[r];case"point-of-interest":return u(this,vi)[r];case"annotation":return u(this,bi)[r];default:throw new Error(`Unknown type: ${t}`)}}getMapDataById(t){var r,i,n,o,a,l,c;return(c=(l=(a=(o=(n=(i=(r=u(this,fi)[t])!=null?r:u(this,di)[t])!=null?i:u(this,hi)[t])!=null?n:u(this,gi)[t])!=null?o:u(this,mi)[t])!=null?a:u(this,yi)[t])!=null?l:u(this,vi)[t])!=null?c:u(this,bi)[t]}getMVFFeatureById(t,r){switch(t){case"space":return u(this,Xo)[r];case"node":return u(this,Vo)[r];case"obstruction":return u(this,Ho)[r];case"map":return u(this,Yo)[r];case"connection":return u(this,Fo)[r];case"entrance":return u(this,Go)[r];case"annotation":return u(this,Ro)[r];default:throw new Error(`Unknown MVF feature type: ${t}`)}}getMVFFeatureByNodeId(t,r){switch(t){case"connection":return u(this,Bo)[r];default:throw new Error(`Unsupported MVF feature type: ${t}`)}}destroy(){for(let t of globalThis.Object.keys(u(this,rt)))u(this,rt)[t]=null}};rt=new WeakMap,hi=new WeakMap,fi=new WeakMap,di=new WeakMap,mi=new WeakMap,yi=new WeakMap,gi=new WeakMap,vi=new WeakMap,bi=new WeakMap,Ro=new WeakMap,Fo=new WeakMap,Bo=new WeakMap,Go=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Xo=new WeakMap,Yo=new WeakMap,s(sh,"MapDataInternal");var ko=sh;f();f();f();f();var lh=class lh{_subscribers={};publish(t,r){!this._subscribers||!this._subscribers[t]||this._subscribers[t].forEach(function(i){typeof i=="function"&&i(r)})}on(t,r){this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(r)}off(t,r){if(!this._subscribers||this._subscribers[t]==null)return;let i=this._subscribers[t].indexOf(r);i!==-1&&this._subscribers[t].splice(i,1)}destroy(){this._subscribers={}}};s(lh,"PubSub");var st=lh;f();f();f();f();f();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();f();f();var ch=class ch extends Ce{visible=!0;type="geometry-group";userData={entityId:"",entities3D:new Set,opacity:1,dirty:!0};setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}getOpacity(){return this.userData.opacity}setOpacity(t){this.userData.opacity=t}constructor(t){super(),this.userData.entityId=t}};s(ch,"GeometryGroupObject3D");var fe=ch;f();var uh=class uh extends Ce{};s(uh,"Geometry2DObject3D");var Tn=uh,ph=class ph{id;get type(){return this.components[0].type}get parent(){return this.object3d.parent}positionDirty=!0;object3d=new Tn;components;disposed=!1;constructor(t,r){this.id=t.id||vt(),this.components=[t],this.object3d=new Tn,this.object3d.position.copy(r),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}worldPosition=new Y;get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}};s(ph,"Geometry2D");var Ee=ph;f();var hh=class hh extends Ce{userData={entityId:"",type:"geometry"}};s(hh,"Geometry3DObject3D");var Xe=hh,fh=class fh{id=vt();components;get object3d(){return this.components[0].mesh}get parent(){var t;return(t=this.components[0].mesh)==null?void 0:t.parent}get type(){return this.components[0].type}constructor(t,r){this.components=[t,r]}};s(fh,"Geometry3D");var St=fh;var jo=class jo extends Ce{childrenIds=new Set;type="group-container";userData={entityId:"",entities2D:new Set,dirty:!0};components=[];constructor(t){super(),this.userData.entityId=t}addEntity(t){t instanceof jo?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Ee?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id)):t instanceof fe?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof St&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof jo?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Ee?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof fe?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof St&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}setAltitude(t){this.position.z=t,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};s(jo,"GroupContainerObject3D");var re=jo;f();var N2=!1;function k2(){N2=!0}s(k2,"enableTestMode");var dh=class dh{backgroundAlpha=1;backgroundColor=new Mt;width=0;height=0;options={};renderer;constructor(t,r=2){try{this.options=t;let i={canvas:t.canvas,alpha:t.alpha||!1,stencil:!1,antialias:typeof t.antialias=="boolean"?t.antialias:!0,outputColorSpace:Zi,powerPreference:"high-performance",preserveDrawingBuffer:!0};N2?(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}}}),setRenderTarget:()=>{},setClearColor:()=>{},clear:()=>{},render:()=>{},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=r===2?new Qd(i):new tm(i),this.backgroundColor=new Mt,this.backgroundAlpha=1}catch(i){X.error(i),t.onWebGLRendererError&&t.onWebGLRendererError(i)}}destroy(){this.renderer&&this.renderer.dispose()}render(t,r){this.renderer&&(this.renderer.state.reset(),r.layers.enable(0),r.layers.enable(1),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,r),this.renderer.state.reset())}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){b.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};s(dh,"Renderer");var yl=dh;f();f();var mh=class mh{percentExpanded=0;activeId="";gap=20;dirty=!0};s(mh,"StackComponent");var In=mh;f();var Xr=63710088e-1,R2=-85.051129,F2=85.051129,gl=1e4,yh={chain:"chain",cancel:"cancel"},gh=Math.PI*2,zo=100,B2=1e4,vh=0,bh=22;var Ch=["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"];f();var Uo="mappedin";f();function Yr(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}s(Yr,"getPixelRatio");function vl(e,t,r,i){let n=e*(Math.PI/180),o=i/Xr,a=e+o*180/Math.PI,l=r/Xr/Math.cos(n),c=t+l*180/Math.PI;return{lat:a,lon:c}}s(vl,"cartesianToGeographic");function bl(e,t,r,i){let n=r*(Math.PI/180),o=i*(Math.PI/180),a=e*(Math.PI/180),l=t*(Math.PI/180),c=n-a,h=o-l,d=Xr*h*Math.cos(a),y=Xr*c;return{x:d,y}}s(bl,"geographicToCartesian");var xh=s((e,t=[])=>{var r;if(e.children&&e.visible)for(let i of e.children){if(i.visible)if((r=i.userData)!=null&&r.entities3D&&i.type==="geometry-group"){t.push(i.userData.entityId);for(let n of i.userData.entities3D.values())t.push(n)}else(i.type==="group-container"&&i.components[0]instanceof In||i.type==="custom-geometry"||i instanceof Xe)&&t.push(i.userData.entityId);xh(i,t)}return t},"extract3DEntitiesFromTree"),Sh=s((e,t)=>{var r;if(e.children&&e.visible&&!((r=e.userData)!=null&&r.hidden))for(let i of e.children)i.visible&&i instanceof Tn&&t.add(i.userData.entityId),Sh(i,t);return t},"extractEntitiesFromTree");function Ph(e,t){for(let r in t){if(t[r]==null){e[r]=void 0;continue}typeof t[r]=="object"?Ph(e[r],t[r]):e[r]=t[r]}return e}s(Ph,"mergeObjects");function V2(e,t,r,i){let n={translateX:e.x,translateY:e.y,translateZ:e.z,scale:e.meterInMercatorCoordinateUnits()},o=new ti,a=new Y(n.scale,-n.scale,n.scale),l=new ti().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(a);return{id:Uo,type:"custom",renderingMode:"3d",render:(c,h)=>{if(o.fromArray(h),r.elevation>0){let d=cm.fromLngLat(e.toLngLat(),r.elevation);l.makeTranslation(n.translateX,n.translateY,-d.z).scale(a)}t.projectionMatrix=o.multiply(l),i()}}}s(V2,"createCustomLayer");function b6(e){return fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}s(b6,"fetchToken");async function H2(e){let t=await b6(e),{access_token:r}=await t.json();return{"x-mappedin-tiles-key":r}}s(H2,"getRequestHeaders");function X2(e,t=0){let r=3735928559^t,i=1103547991^t;for(let n=0,o;n<e.length;n++)o=e.charCodeAt(n),r=Math.imul(r^o,2654435761),i=Math.imul(i^o,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&i)+(r>>>0)}s(X2,"cyrb53");var C6=s(e=>e,"linearEase");function Ut(e,t,r,i,n,o=C6){e=Math.max(t,Math.min(e,r));let a=(e-Math.min(t,r))/Math.abs(r-t),l=o(a);return i+l*(n-i)}s(Ut,"interpolate");function Mh(e,t,r){let i=e*(Math.PI/180)/2,n=t/2;return r*Math.tan(i)/n}s(Mh,"getProjectionScaleFactor");function Cl(e,t){let r;return typeof t=="string"||typeof t=="number"?(r=e.entity2DMap.get(t),r==null&&(r=e.entity3DMap.get(t))):typeof(t==null?void 0:t.id)=="string"||typeof(t==null?void 0:t.id)=="number"?(r=e.entity2DMap.get(t.id),r==null&&(r=e.entity3DMap.get(t.id))):r=t,r}s(Cl,"getGeometryByGeometryId");f();f();var Y2=`"use strict";(()=>{function q(i,e){return e.x+e.w<i.x+i.w&&e.x>i.x&&e.y>i.y&&e.y+e.h<i.y+i.h}function z(i,e){let[t,o]=e;return t>=i.x&&t<=i.x+i.w&&o>=i.y&&o<=i.y+i.h}function E(i,e){let t=e.x,o=e.y,n=e.x+e.w,l=e.y+e.h,d=i.x,m=i.y,v=i.x+i.w,C=i.y+i.h;return t<v&&d<n&&o<C&&m<l}function a(i,e){for(let t=0;t<e.length;t++)i.push(e[t])}var T=4,s=class{x;y;w;h;userData;constructor(e,t,o,n,l){let d=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof l>"u"?null:l,this.x=e-T,this.y=t-T,this.w=o+T*Math.min(d,2),this.h=n+T*Math.min(d,2)}contains(e){return e===this?!1:q(this,e)}intersects(e){return E(this,e)}intersectsPoint(e){return z(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.5)",e.fillRect(this.x,this.y,this.w,this.h)}};var x=class i{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,t){this.parent=t,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:t,w:o,h:n}=this.boundary;this.topLeft=new i(new s(e,t,o/2,n/2),this),this.topRight=new i(new s(e+o/2,t,o/2,n/2),this),this.bottomLeft=new i(new s(e,t+n/2,o/2,n/2),this),this.bottomRight=new i(new s(e+o/2,t+n/2,o/2,n/2),this),this.divided=!0}queryRect(e){let t=[];if(this.boundary.intersects(e))t.push(...this.objects);else return[];return this.divided&&(a(t,this.topLeft.queryRect(e)),a(t,this.topRight.queryRect(e)),a(t,this.bottomLeft.queryRect(e)),a(t,this.bottomRight.queryRect(e))),t}queryPoint(e){let t=[];if(this.boundary.intersectsPoint(e))t.push(...this.objects);else return[];return this.divided&&(a(t,this.topLeft.queryPoint(e)),a(t,this.topRight.queryPoint(e)),a(t,this.bottomLeft.queryPoint(e)),a(t,this.bottomRight.queryPoint(e))),t}insert(e){return this.boundary.contains(e)?this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0):!1}drawObjects(e){this.objects.forEach(t=>t.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};var c=200,P=10;function O(i,e,t,o="-1"){let n=1/0,l=1/0,d=-1/0,m=-1/0,v=new s(-P,0,5,t),C=new s(-P,0,e,5),F=new s(e-5,0,e+P,t),N=new s(0,t-5,e,t+P),A=[v,C,F,N],M=new s(-c,-c,e+c*2,t+c*2);for(let r of i)for(let h=0;h<r.bboxes.length;h++){let{boundingBox:R}=r.bboxes[h],[b,w,u,p]=R,[B,f,D,W]=[r.y-b,r.y+w,r.x-u,r.x+p],S=D,L=B,I=W-D,j=f-B;n=Math.min(n,S)-c,l=Math.min(l,L)-c,d=Math.max(d,S+I)+c,m=Math.max(m,L+j)+c,r.bboxes[h].boundingRect=new s(S,L,I,j)}let y={msgId:o,colliders:new Array(i.length),debug:[]},k=new x(new s(n,l,d-n,m-l)),g;for(let r=0;r<i.length;r++)if(g=i[r],y.colliders[r]=[-1,!1],g.enabled){let[h,R,b]=[1/0,-1,void 0];for(let{index:w,boundingRect:u}of g.bboxes){let p=[];if(p=k.queryRect(u).filter(f=>u.intersects(f)),g.shouldCollideWithScreenEdges&&A.forEach(f=>{u.intersects(f)&&p.push(f)}),p.length<=h&&(b=u,R=w,h=p.length),p.length===0){k.insert(u),y.colliders[r]=[w,!M.contains(u),u];break}}g.rank===4&&b!=null&&(k.insert(b),y.colliders[r]=[R,!M.contains(b),b])}else y.colliders[r]=[-1,!1];return y}function Q(i){let e=i[0].map(t=>{let o=t[0].map((n,l)=>({index:l,boundingBox:[n[0],n[1],n[2],n[3]]}));return{enabled:t[1]===1,rank:t[2]===1?4:0,x:t[3],y:t[4],bboxes:o}});return{msgId:"-1",totalWidth:i[3],totalHeight:i[2],colliders:e,devicePixelRatio:i[1]}}self.onmessage=i=>{let e=Q(i.data);self.postMessage(O(e.colliders,e.totalWidth,e.totalHeight,e.msgId))};})();
5
+ `;f();f();f();f();f();function j2(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}s(j2,"contains");f();function z2(e,t){let[r,i]=t;return r>=e.x&&r<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}s(z2,"intersectPoint");f();function U2(e,t){let r=t.x,i=t.y,n=t.x+t.w,o=t.y+t.h,a=e.x,l=e.y,c=e.x+e.w,h=e.y+e.h;return r<c&&a<n&&i<h&&l<o}s(U2,"intersects");f();function lr(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}s(lr,"appendItems");f();var xl=4,wh=class wh{x;y;w;h;userData;constructor(t,r,i,n,o){let a=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof o>"u"?null:o,this.x=t-xl,this.y=r-xl,this.w=i+xl*Math.min(a,2),this.h=n+xl*Math.min(a,2)}contains(t){return t===this?!1:j2(this,t)}intersects(t){return U2(this,t)}intersectsPoint(t){return z2(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.5)",t.fillRect(this.x,this.y,this.w,this.h)}};s(wh,"Rectangle");var Et=wh;var Ci=class Ci{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(t,r){this.parent=r,this.boundary=t}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:t,y:r,w:i,h:n}=this.boundary;this.topLeft=new Ci(new Et(t,r,i/2,n/2),this),this.topRight=new Ci(new Et(t+i/2,r,i/2,n/2),this),this.bottomLeft=new Ci(new Et(t,r+n/2,i/2,n/2),this),this.bottomRight=new Ci(new Et(t+i/2,r+n/2,i/2,n/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(lr(r,this.topLeft.queryRect(t)),lr(r,this.topRight.queryRect(t)),lr(r,this.bottomLeft.queryRect(t)),lr(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(lr(r,this.topLeft.queryPoint(t)),lr(r,this.topRight.queryPoint(t)),lr(r,this.bottomLeft.queryPoint(t)),lr(r,this.bottomRight.queryPoint(t))),r}insert(t){return this.boundary.contains(t)?this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0):!1}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};s(Ci,"QuadTree");var Ye=Ci;f();function W2(e,t,r){let i,n,o,a=null,l=0;r||(r={});let c=s(function(){l=r.leading===!1?0:Date.now(),a=null,o=e.apply(i,n),a||(i=n=null)},"later");return function(){let h=Date.now();!l&&r.leading===!1&&(l=h);let d=t-(h-l);return i=globalThis,n=arguments,d<=0||d>t?(a&&(clearTimeout(a),a=null),l=h,o=e.apply(i,n),a||(i=n=null)):!a&&r.trailing!==!1&&(a=setTimeout(c,d)),o}}s(W2,"throttle");function Z2(e){return[e.bboxes.map(r=>[r.boundingBox[0],r.boundingBox[1],r.boundingBox[2],r.boundingBox[3]]),e.enabled?1:0,e.rank===4?1:0,e.x,e.y]}s(Z2,"packCollider");var xi=!1,x6=150,Th=class Th extends st{worker;debugContext;debugCanvas;dirty=!0;packedMessage=[[],0,0,0];visibleCollidersQTree=new Ye(new Et(0,0,0,0));interactiveCollidersQTree=new Ye(new Et(0,0,0,0));coreState;constructor(t,r,i=new Worker(URL.createObjectURL(new Blob([Y2],{type:"text/javascript"})))){super(),this.coreState=r,this.debugCanvas=t,this.debugContext=t.getContext("2d"),this.worker=i,this.worker.onmessage=n=>this.resolve(n),this.postMessage=W2(this._postMessage,x6,!1),xi?this.showCollisionBoxes():this.hideCollisionBoxes()}postMessage;showCollisionBoxes=()=>{xi=!0,this.debugCanvas.style.display="block"};hideCollisionBoxes=()=>{xi=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"};currentMsgId="";working=!1;_postMessage=()=>{this.worker.postMessage(this.packedMessage)};componentArray=[];update=()=>{if(this.dirty){this.packedMessage=[[],0,0,0],this.componentArray=new Array(this.coreState.entity2DIds.size);let t=0,r;for(let i of this.coreState.entity2DIds){let n=this.coreState.entity2DMap.get(i);n&&(r=n.components[0],this.componentArray[t]=r),t++}this.resize(),this.dirty=!1,this.componentArray.sort((i,n)=>n.rank-i.rank)}else this.componentArray.filter(r=>r.collisionDirty===!0).length>0&&this.componentArray.sort((r,i)=>i.rank-r.rank);for(let t=0;t<this.componentArray.length;t++)this.packedMessage&&(this.componentArray[t].collisionDirty||this.packedMessage[0][t]==null?(this.packedMessage[0][t]=Z2(this.componentArray[t].toJSON()),this.componentArray[t].collisionDirty=!1):(this.packedMessage[0][t][1]=this.componentArray[t].enabled?1:0,this.packedMessage[0][t][2]=this.componentArray[t].rank===4?1:0,this.packedMessage[0][t][3]=this.componentArray[t].projection.x,this.packedMessage[0][t][4]=this.componentArray[t].projection.y));this.working||this.postMessage()};resize(){this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}resolve=t=>{if(this.working=!1,this.dirty||!t.data)return;let r=t.data.colliders,i=-1,n=!1,o,a,l;xi&&(this.visibleCollidersQTree=new Ye(new Et(0,0,this.debugCanvas.width,this.debugCanvas.height))),this.interactiveCollidersQTree=new Ye(new Et(0,0,this.debugCanvas.width,this.debugCanvas.height));for(let c=0;c<this.componentArray.length;c++){let h=this.componentArray[c];r[c]==null||!h.enabled||([i,n,o]=r[c],i!==-1&&!n&&o!=null?(l=new Et(o.x,o.y,o.w,o.h,{entityId:h.id}),xi&&this.visibleCollidersQTree.insert(l),a=this.coreState.entity2DMap.get(h.id),(a==null?void 0:a.components[1])!=null&&this.interactiveCollidersQTree.insert(new Et(o.x,o.y,o.w,o.h,{entityId:h.id})),h.visible===!1&&(h.visible=!0,"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate=!0)),i!==-1&&i!==h.activeStrategyIndex&&(h.activeBoundingBox=l,h.onStrategySelected(i))):(h.visible===!0&&(h.visible=!1,"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate=!0)),i!==-1&&i!==h.activeStrategyIndex&&h.onStrategySelected(i)))}xi&&this.drawDebug(),this.publish("visibility-changed")};drawDebug=()=>{xi&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))};destroy=()=>{this.worker.terminate()}};s(Th,"CollisionSystem");var Sl=Th;f();f();f();f();var Eh=class Eh{type;event;constructor(t){this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};s(Eh,"Tap");var Pl=Eh,_h=class _h{taps=[];add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};s(_h,"TapsController");var Ml=_h;var En,Lh=class Lh extends st{constructor(r,i,n,o){super();v(this,"raycaster",new Pr);v(this,"state",{hovered3DEntity:void 0,hovered2DEntity:void 0,lastHover:void 0,containerOffset:[0,0],interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});v(this,"coreState");v(this,"camera");v(this,"cameraPlane");v(this,"_quadtree",new Ye(new Et(0,0,0,0)));v(this,"_container");v(this,"cursor","grab");v(this,"hasTouched",!1);I(this,En,void 0);v(this,"onPointerMoveRaf",r=>{u(this,En)&&cancelAnimationFrame(u(this,En)),_(this,En,requestAnimationFrame(()=>{this.onPointerMove(r)}))});v(this,"onPointerMove",r=>{r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor()});v(this,"tapsControl",new Ml);v(this,"onPointerDown",r=>{r.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:r.timeStamp,clientX:r.clientX,clientY:r.clientY},this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&this.tapsControl.add(new Pl(r)))});v(this,"clickTimeout");v(this,"onPointerUp",r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1),this.updateInteractionStateIfPanning(r);let{mouseDownStart:i}=this.state.interaction;!i||this.state.interaction.distanceFromMouseDown==null||(Date.now()<i.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(r.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())});v(this,"dirty3D",!0);v(this,"cachedHitBoxes",[]);v(this,"ndcPoint",new z);v(this,"debugPanel");this.raycaster.layers.enableAll();let{top:a,left:l}=r.getBoundingClientRect();this.state.containerOffset=[a,l],this.camera=n,this._container=r,this.coreState=i,this.cameraPlane=o,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){if(this.state.interaction.mouseDownStart)return;let{entity3D:i,entity2D:n,position:o}=this.intersect(r);(this.handle3DEntityHover(i)||this.handle2DEntityHover(n))&&this.publish("hover",{entity2D:this.state.hovered2DEntity,entity3D:this.state.hovered3DEntity,position:o}),this.handleCursor()}handleCursor(){let r=!!(this.state.hovered3DEntity||this.state.hovered2DEntity),i=!!this.state.interaction.mouseDownStart,n=this.state.interaction.isPanning,o=M6(r,n,i);this.cursor!==o&&(this.cursor=o,o==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}handle2DEntityHover(r){let i=this.state.hovered2DEntity!==r;return this.state.hovered2DEntity=r,i}handleClick(r){let i=this.intersect(r);this.publish("click",{entity2D:i.entity2D,entity3D:i.entity3D,position:i.position,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes=[];let r;for(let i of this.coreState.threeDEntities)r=this.coreState.entity3DMap.get(i),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model")&&r.components[2]&&r.components[0].mesh&&!this.cachedHitBoxes.includes(r.components[0].mesh)&&this.cachedHitBoxes.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var m,x;let i=[r.offsetX,r.offsetY],n=this._quadtree.queryPoint(i),[o]=n.filter(S=>S.intersectsPoint(i)),a=this.state.containerOffset[0],l=this.state.containerOffset[1];this.ndcPoint.x=(r.clientX-l)/this._container.clientWidth*2-1,this.ndcPoint.y=-((r.clientY-a)/this._container.clientHeight)*2+1,this.raycaster.setFromCamera(this.ndcPoint,this.camera),this.raycaster.layers.enable(0);let[c]=this.getMouseRayIntersects(),h=this.raycaster.intersectObjects(this._hitBoxes,!0).filter(S=>S.object.visible),[d]=h,y=(m=d==null?void 0:d.instanceId)!=null?m:d==null?void 0:d.batchId;return{entity2D:((x=o==null?void 0:o.userData)==null?void 0:x.entityId)==="watermark"?{id:"watermark"}:this.coreState.entity2DMap.get(o==null?void 0:o.userData.entityId),entity3D:y!=null?this.coreState.entity3DMap.get(d==null?void 0:d.object.userData.entities[y]):this.coreState.entity3DMap.get(d==null?void 0:d.object.userData.entityId),position:c==null?void 0:c.point}}handle3DEntityHover(r){this.state.lastHover!==r&&(this.state.lastHover&&$2(this.state.lastHover,!1),r&&$2(r,!0));let i=this.state.hovered3DEntity!==r;return this.state.hovered3DEntity=r,this.state.lastHover=r,i}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.clientX-this.state.interaction.mouseDownStart.clientX,2)+Math.pow(r.clientY-this.state.interaction.mouseDownStart.clientY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.cameraPlane],!1)}destroy(){this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.zIndex="1",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",i=>{var n,o,a;this.queueDebugMessage(`CLICK
444
6
  3D: ${(n=i.entity3D)==null?void 0:n.id}
445
7
  2D: ${(o=i.entity2D)==null?void 0:o.id}
446
8
  Pos: ${(a=i.position)==null?void 0:a.toArray().join(", ")}`,"#fdffb6")}),this.on("hover",i=>{var n,o,a;this.queueDebugMessage(`HOVER
447
9
  3D: ${(n=i.entity3D)==null?void 0:n.id}
448
10
  2D: ${(o=i.entity2D)==null?void 0:o.id}
449
- Pos: ${(a=i.position)==null?void 0:a.toArray().join(", ")}`,"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,i){var o;let n=document.createElement("pre");n.style.maxWidth="300px",n.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",n.style.backgroundColor=i,n.textContent=r,(o=this.debugPanel)==null||o.prepend(n),setTimeout(()=>{n.style.opacity="0",setTimeout(()=>{n.remove()},500)},2500)}getCursor(){return this.cursor}};kn=new WeakMap,s(yf,"InteractionSystem");var na=yf;function bv(e,t){let r=e.components[2];r&&(r.hover=t,r.dirty=!0)}s(bv,"updateHover");function N6(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}s(N6,"processCursor");f();f();f();function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}s(Gl,"_typeof");var k6=/^\s+/,R6=/\s+$/;function B(e,t){if(e=e||"",t=t||{},e instanceof B)return e;if(!(this instanceof B))return new B(e,t);var r=F6(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}s(B,"tinycolor");B.prototype={isDark:s(function(){return this.getBrightness()<128},"isDark"),isLight:s(function(){return!this.isDark()},"isLight"),isValid:s(function(){return this._ok},"isValid"),getOriginalInput:s(function(){return this._originalInput},"getOriginalInput"),getFormat:s(function(){return this._format},"getFormat"),getAlpha:s(function(){return this._a},"getAlpha"),getBrightness:s(function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},"getBrightness"),getLuminance:s(function(){var t=this.toRgb(),r,i,n,o,a,l;return r=t.r/255,i=t.g/255,n=t.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*o+.7152*a+.0722*l},"getLuminance"),setAlpha:s(function(t){return this._a=Tv(t),this._roundA=Math.round(100*this._a)/100,this},"setAlpha"),toHsv:s(function(){var t=xv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},"toHsv"),toHsvString:s(function(){var t=xv(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+n+"%)":"hsva("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHsvString"),toHsl:s(function(){var t=Cv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},"toHsl"),toHslString:s(function(){var t=Cv(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+n+"%)":"hsla("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHslString"),toHex:s(function(t){return Sv(this._r,this._g,this._b,t)},"toHex"),toHexString:s(function(t){return"#"+this.toHex(t)},"toHexString"),toHex8:s(function(t){return H6(this._r,this._g,this._b,this._a,t)},"toHex8"),toHex8String:s(function(t){return"#"+this.toHex8(t)},"toHex8String"),toRgb:s(function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},"toRgb"),toRgbString:s(function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},"toRgbString"),toPercentageRgb:s(function(){return{r:Math.round(pt(this._r,255)*100)+"%",g:Math.round(pt(this._g,255)*100)+"%",b:Math.round(pt(this._b,255)*100)+"%",a:this._a}},"toPercentageRgb"),toPercentageRgbString:s(function(){return this._a==1?"rgb("+Math.round(pt(this._r,255)*100)+"%, "+Math.round(pt(this._g,255)*100)+"%, "+Math.round(pt(this._b,255)*100)+"%)":"rgba("+Math.round(pt(this._r,255)*100)+"%, "+Math.round(pt(this._g,255)*100)+"%, "+Math.round(pt(this._b,255)*100)+"%, "+this._roundA+")"},"toPercentageRgbString"),toName:s(function(){return this._a===0?"transparent":this._a<1?!1:Q6[Sv(this._r,this._g,this._b,!0)]||!1},"toName"),toFilter:s(function(t){var r="#"+Pv(this._r,this._g,this._b,this._a),i=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var o=B(t);i="#"+Pv(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+i+")"},"toFilter"),toString:s(function(t){var r=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,o=!r&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},"toString"),clone:s(function(){return B(this.toString())},"clone"),_applyModification:s(function(t,r){var i=t.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},"_applyModification"),lighten:s(function(){return this._applyModification(z6,arguments)},"lighten"),brighten:s(function(){return this._applyModification(U6,arguments)},"brighten"),darken:s(function(){return this._applyModification(W6,arguments)},"darken"),desaturate:s(function(){return this._applyModification(X6,arguments)},"desaturate"),saturate:s(function(){return this._applyModification(Y6,arguments)},"saturate"),greyscale:s(function(){return this._applyModification(j6,arguments)},"greyscale"),spin:s(function(){return this._applyModification(Z6,arguments)},"spin"),_applyCombination:s(function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},"_applyCombination"),analogous:s(function(){return this._applyCombination(J6,arguments)},"analogous"),complement:s(function(){return this._applyCombination(q6,arguments)},"complement"),monochromatic:s(function(){return this._applyCombination(K6,arguments)},"monochromatic"),splitcomplement:s(function(){return this._applyCombination($6,arguments)},"splitcomplement"),triad:s(function(){return this._applyCombination(Mv,[3])},"triad"),tetrad:s(function(){return this._applyCombination(Mv,[4])},"tetrad")};B.fromRatio=function(e,t){if(Gl(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=oa(e[i]));e=r}return B(e,t)};function F6(e){var t={r:0,g:0,b:0},r=1,i=null,n=null,o=null,a=!1,l=!1;return typeof e=="string"&&(e=i8(e)),Gl(e)=="object"&&(fr(e.r)&&fr(e.g)&&fr(e.b)?(t=B6(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):fr(e.h)&&fr(e.s)&&fr(e.v)?(i=oa(e.s),n=oa(e.v),t=V6(e.h,i,n),a=!0,l="hsv"):fr(e.h)&&fr(e.s)&&fr(e.l)&&(i=oa(e.s),o=oa(e.l),t=G6(e.h,i,o),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Tv(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}s(F6,"inputToRGB");function B6(e,t,r){return{r:pt(e,255)*255,g:pt(t,255)*255,b:pt(r,255)*255}}s(B6,"rgbToRgb");function Cv(e,t,r){e=pt(e,255),t=pt(t,255),r=pt(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),o,a,l=(i+n)/2;if(i==n)o=a=0;else{var c=i-n;switch(a=l>.5?c/(2-i-n):c/(i+n),i){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,l}}s(Cv,"rgbToHsl");function G6(e,t,r){var i,n,o;e=pt(e,360),t=pt(t,100),r=pt(r,100);function a(h,d,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?h+(d-h)*6*m:m<1/2?d:m<2/3?h+(d-h)*(2/3-m)*6:h}if(s(a,"hue2rgb"),t===0)i=n=o=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=a(c,l,e+1/3),n=a(c,l,e),o=a(c,l,e-1/3)}return{r:i*255,g:n*255,b:o*255}}s(G6,"hslToRgb");function xv(e,t,r){e=pt(e,255),t=pt(t,255),r=pt(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),o,a,l=i,c=i-n;if(a=i===0?0:c/i,i==n)o=0;else{switch(i){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,v:l}}s(xv,"rgbToHsv");function V6(e,t,r){e=pt(e,360)*6,t=pt(t,100),r=pt(r,100);var i=Math.floor(e),n=e-i,o=r*(1-t),a=r*(1-n*t),l=r*(1-(1-n)*t),c=i%6,h=[r,a,o,o,l,r][c],d=[l,r,r,a,o,o][c],m=[o,o,l,r,r,a][c];return{r:h*255,g:d*255,b:m*255}}s(V6,"hsvToRgb");function Sv(e,t,r,i){var n=[Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}s(Sv,"rgbToHex");function H6(e,t,r,i,n){var o=[Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16)),Le(Iv(i))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}s(H6,"rgbaToHex");function Pv(e,t,r,i){var n=[Le(Iv(i)),Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16))];return n.join("")}s(Pv,"rgbaToArgbHex");B.equals=function(e,t){return!e||!t?!1:B(e).toRgbString()==B(t).toRgbString()};B.random=function(){return B.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function X6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s-=t/100,r.s=Vl(r.s),B(r)}s(X6,"_desaturate");function Y6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s+=t/100,r.s=Vl(r.s),B(r)}s(Y6,"_saturate");function j6(e){return B(e).desaturate(100)}s(j6,"_greyscale");function z6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l+=t/100,r.l=Vl(r.l),B(r)}s(z6,"_lighten");function U6(e,t){t=t===0?0:t||10;var r=B(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),B(r)}s(U6,"_brighten");function W6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l-=t/100,r.l=Vl(r.l),B(r)}s(W6,"_darken");function Z6(e,t){var r=B(e).toHsl(),i=(r.h+t)%360;return r.h=i<0?360+i:i,B(r)}s(Z6,"_spin");function q6(e){var t=B(e).toHsl();return t.h=(t.h+180)%360,B(t)}s(q6,"_complement");function Mv(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=B(e).toHsl(),i=[B(e)],n=360/t,o=1;o<t;o++)i.push(B({h:(r.h+o*n)%360,s:r.s,l:r.l}));return i}s(Mv,"polyad");function $6(e){var t=B(e).toHsl(),r=t.h;return[B(e),B({h:(r+72)%360,s:t.s,l:t.l}),B({h:(r+216)%360,s:t.s,l:t.l})]}s($6,"_splitcomplement");function J6(e,t,r){t=t||6,r=r||30;var i=B(e).toHsl(),n=360/r,o=[B(e)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,o.push(B(i));return o}s(J6,"_analogous");function K6(e,t){t=t||6;for(var r=B(e).toHsv(),i=r.h,n=r.s,o=r.v,a=[],l=1/t;t--;)a.push(B({h:i,s:n,v:o})),o=(o+l)%1;return a}s(K6,"_monochromatic");B.mix=function(e,t,r){r=r===0?0:r||50;var i=B(e).toRgb(),n=B(t).toRgb(),o=r/100,a={r:(n.r-i.r)*o+i.r,g:(n.g-i.g)*o+i.g,b:(n.b-i.b)*o+i.b,a:(n.a-i.a)*o+i.a};return B(a)};B.readability=function(e,t){var r=B(e),i=B(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};B.isReadable=function(e,t,r){var i=B.readability(e,t),n,o;switch(o=!1,n=n8(r),n.level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};B.mostReadable=function(e,t,r){var i=null,n=0,o,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var h=0;h<t.length;h++)o=B.readability(e,t[h]),o>n&&(n=o,i=B(t[h]));return B.isReadable(e,i,{level:l,size:c})||!a?i:(r.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],r))};var gf=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Q6=B.hexNames=t8(gf);function t8(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}s(t8,"flip");function Tv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}s(Tv,"boundAlpha");function pt(e,t){e8(e)&&(e="100%");var r=r8(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}s(pt,"bound01");function Vl(e){return Math.min(1,Math.max(0,e))}s(Vl,"clamp01");function ce(e){return parseInt(e,16)}s(ce,"parseIntFromHex");function e8(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}s(e8,"isOnePointZero");function r8(e){return typeof e=="string"&&e.indexOf("%")!=-1}s(r8,"isPercentage");function Le(e){return e.length==1?"0"+e:""+e}s(Le,"pad2");function oa(e){return e<=1&&(e=e*100+"%"),e}s(oa,"convertToPercentage");function Iv(e){return Math.round(parseFloat(e)*255).toString(16)}s(Iv,"convertDecimalToHex");function wv(e){return ce(e)/255}s(wv,"convertHexToDecimal");var _e=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function fr(e){return!!_e.CSS_UNIT.exec(e)}s(fr,"isValidCSSUnit");function i8(e){e=e.replace(k6,"").replace(R6,"").toLowerCase();var t=!1;if(gf[e])e=gf[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=_e.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=_e.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=_e.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=_e.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=_e.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=_e.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=_e.hex8.exec(e))?{r:ce(r[1]),g:ce(r[2]),b:ce(r[3]),a:wv(r[4]),format:t?"name":"hex8"}:(r=_e.hex6.exec(e))?{r:ce(r[1]),g:ce(r[2]),b:ce(r[3]),format:t?"name":"hex"}:(r=_e.hex4.exec(e))?{r:ce(r[1]+""+r[1]),g:ce(r[2]+""+r[2]),b:ce(r[3]+""+r[3]),a:wv(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=_e.hex3.exec(e))?{r:ce(r[1]+""+r[1]),g:ce(r[2]+""+r[2]),b:ce(r[3]+""+r[3]),format:t?"name":"hex"}:!1}s(i8,"stringInputToObject");function n8(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}s(n8,"validateWCAG2Parms");var _f=Cr(nb());var Gn={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},$9={lightOnDark:{...Gn,text:{...Gn.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...Gn.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...Gn,text:{...Gn.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...Gn.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},J9="LOW_PRIORITY",lb=["","","medium","high","always-visible"];function pa(e){return lb.indexOf(e)}s(pa,"convertCollisionRankingTeirToNumber");function ha(e){return lb[e]}s(ha,"convertRankToCollisionRankingTier");var ob=4,K9=6,Q9=20,tx=2.5,ex=2,rx="cover",ab=.5,ix=6.5,sb={heightAbovePolygon:0,appearance:$9.darkOnLight};var Ei=class Ei{lines=0;id;rank;type="label";initialRank;contextConfigured=!1;fillText=void 0;newStyle={};opacity=0;visibilityNeedsUpdate=!0;activeStrategyIndex=-1;text;style={top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"};projection=new z;_cache={};appearance;options;visible=!1;enabled=!0;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};currentStrategyIndex=-1;totalMarkerSize=0;dirty=!0;collisionDirty=!0;lastTextAlign;imageHash;markerSize=0;iconVisible=!1;zoomProportion=0;dp;setEntity(){}constructor(t,r,i){var o,a;if(this.id=(o=r.id)!=null?o:ft(),this.options=(0,_f.default)({},r,sb),this.text=t,this.dp=(l=1)=>l*i.pixelRatio,typeof r.rank=="string")this.rank=pa(r.rank),this.initialRank=this.rank;else if(r.rank!=null&&r.rank>0)this.rank=r.rank,this.initialRank=r.rank;else{let l=Math.trunc(b.env.NODE_ENV==="test"?Ei.testId:Ei.testId*10)/10;Ei.testId+=.001,this.rank=l,this.initialRank=l}let n=(0,_f.default)({},this.options.appearance,sb.appearance);this.appearance={margin:n.margin,text:{lineHeight:n.text.lineHeight,numLines:n.text.numLines,size:n.text.size,maxWidth:n.text.maxWidth,foregroundColor:n.text.foregroundColor,backgroundColor:n.text.backgroundColor},marker:{foregroundColor:{active:n.marker.foregroundColor.active,inactive:n.marker.foregroundColor.inactive||B(n.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:n.marker.backgroundColor.active,inactive:n.marker.backgroundColor.inactive||B(n.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:n.marker.icon,iconSize:n.marker.iconSize||Q9,iconPadding:(a=n.marker.iconPadding)!=null?a:ex,iconFit:n.marker.iconFit||rx,iconVisibilityThreshold:n.marker.iconVisibilityThreshold==null?ab:n.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}calculateMarkerSize(){let{iconVisibilityThreshold:t=ab}=this.appearance.marker,r=this.dp();this.zoomProportion<=t&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(ix)),this.totalMarkerSize=Math.ceil((this.markerSize+tx)/r)}get strategies(){let{width:t,height:r}=this.dimensions,{margin:i}=this.appearance;this.calculateMarkerSize();let n=Math.max(K9,i),o=this.iconVisible?n/2:0,a=[{name:"RIGHT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+n,l/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+t+n]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=this.totalMarkerSize/2+ob,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+n,l/2+n,this.totalMarkerSize/2+t+n,this.totalMarkerSize/2+n]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=-t-this.totalMarkerSize/2-ob,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let l=this.dp();return[r+this.totalMarkerSize/2/l+n,this.totalMarkerSize/2+n,t/2+n,t/2+n]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-this.totalMarkerSize-r/2,this.newStyle.left=-t/2}},{name:J9,getBoundingBox:()=>[this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:a}onStrategySelected=t=>{if(this.currentStrategyIndex===t)return;let r=this.strategies[t];r&&r.onStrategySelected(this),this.currentStrategyIndex=t;let i=this.style;this.style=this.newStyle,this.newStyle=i,this.opacity=0,this.visibilityNeedsUpdate=!0};updatePosition(){}disable(){this.visible=!1}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,r)=>({index:r,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};s(Ei,"LabelComponent"),v(Ei,"testId",0);var Lf=Ei,Ue=Lf;f();var fa,da,Of=class Of{constructor(t){v(this,"mesh");v(this,"outline");v(this,"type","geometry");v(this,"instanceIndex",-1);v(this,"geometry");v(this,"material");v(this,"feature");v(this,"color",new Mt);v(this,"topColor",new Mt);v(this,"position",new X);I(this,fa,0);I(this,da,1);this.feature=t}get visible(){return this.mesh?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(t){this.mesh&&this.mesh.setVisibleAt(this.instanceIndex,t)}setOpacity(t){this.mesh&&(this.material&&(this.material.opacity=t,this.material.transparent=t<1),this.outline&&(t<.5?this.outline.visible=!1:this.outline.visible=!0),t===0?this.mesh.visible=!1:this.mesh.visible=!0)}setOutlineColor(t){if(!this.outline||!this.outline.material)return;let r=Array.isArray(this.outline.material)?this.outline.material:[this.outline.material];for(let i of r)i.color.set(t),i.needsUpdate=!0}setColor(t,r){this.color.set(t),this.topColor.set(r),this.material&&(this.material.setColor(this.instanceIndex,this.color,this.topColor),this.material.needsColorUpdate=!0)}get altitude(){return u(this,fa)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,fa,t))}get opacity(){return u(this,da)}set opacity(t){var r,i;if(this.material){((r=this.material.userData)==null?void 0:r.originalOpacity)===void 0&&(this.material.userData={...this.material.userData,originalOpacity:this.material.opacity});let n=Zt(t,0,(i=this.material.userData)==null?void 0:i.originalOpacity,0,1);this.material.opacity=n,this.material.transparent=n<1,this.outline&&(this.outline.visible=n>.5),this.material.needsUpdate=!0}_(this,da,t)}};fa=new WeakMap,da=new WeakMap,s(Of,"MeshComponent");var We=Of;var Df=class Df extends st{constructor(){super()}interpolators=new Map;addEntity3D(t,r){let[i,n,o,a]=r[1];this.interpolators.set(t,l=>Zt(l,i,n,o,a))}addEntity2D(t,r){let[i,n,o]=r[1];this.interpolators.set(t,a=>a<i?n:o)}addAny(t,r){this.interpolators.set(t,r)}update=t=>{for(let[r,i]of this.interpolators)r instanceof We?r.setOpacity(i(t)):r instanceof Ue?r.enabled=i(t):i(t)};destroy(){this.interpolators.clear()}};s(Df,"ZoomInterpolationSystem");var ql=Df;f();var _i=class _i{id;type="marker";rank=0;initialRank=0;options={};projection=new z;enabled=!0;activeStrategyIndex=-1;strategyIndex=-1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};containerEl;contentEl=null;contentHtml="";style={top:"0px",left:"0px"};dirty=!1;collisionDirty=!0;visibilityNeedsUpdate=!0;constructor(t,r={}){if(this.id=(r==null?void 0:r.id)||ft(),this.options=r,typeof r.rank=="string")this.rank=pa(r.rank);else if(r.rank!=null&&r.rank>0)this.rank=r.rank;else{let n=Math.trunc(b.env.NODE_ENV==="test"?_i.testId:_i.testId*10)/10;_i.testId+=.001,this.rank=n}this.contentHtml=t,this.initialRank=this.rank;let i=document.createElement("div");i.style.opacity="0",i.innerHTML=`<div class="mappedin-marker">${this.contentHtml}</div>`,this.containerEl=i.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(t,r){if(t!=null&&r!=null)this.dimensions={width:t,height:r};else{let{width:i,height:n}=this.containerEl.getBoundingClientRect();this.dimensions={width:i,height:n}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"})}visible=!1;animation=null;currentStrategyIndex=-1;onStrategySelected=(t,r=!1)=>{if(this.currentStrategyIndex===t||r)return;let{width:i,height:n}=this.dimensions,o=-n/2+"px",a=-i/2+"px";switch(this.style.top=o,this.style.left=a,this.options.anchor){case"top":{this.style.top=-n+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-i+"px";break}case"right":{this.style.left="0px";break}default:this.style.top=o,this.style.left=a}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left};get strategies(){let{width:t,height:r}=this.dimensions;return[{name:"center",getBoundingBox:()=>{let i=r/2,n=r/2,o=t/2,a=t/2;switch(this.options.anchor){case"top":{i=r,n=0;break}case"bottom":{i=0,n=r;break}case"left":{o=t,a=0;break}case"right":{o=0,a=t;break}}return[i,n,o,a]}}]}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,r)=>({index:r,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};s(_i,"MarkerComponent"),v(_i,"testId",0);var me=_i;f();f();f();f();f();var Af=class Af{hover=!1;dirty=!1};s(Af,"InteractionComponent");var ma=Af;function Ze(e,t,r){if(t!==void 0){if(e.type==="model"||e.type==="path"||e.type==="marker"||e.type==="label"||e.type==="geometry")return t===!0?(e instanceof Ee&&e.components[1]===void 0&&(e.components[1]=new ma,e.components[1].dirty=!0),e instanceof Pt&&e.components[2]===void 0&&(e.components[2]=new ma,e.components[2].dirty=!0),!0):(e instanceof Ee?e.components[1]=void 0:e instanceof Pt&&(e.components[2]=void 0),!0);if(e.type==="geometry-group"){let i;for(let n of e.userData.entities3D.values())i=r.entity3DMap.get(n),Ze(i,t,r);return!0}}return!1}s(Ze,"updateInteractivity");function cb(e,t){t!==void 0&&(e.type==="path"||e.type==="geometry")&&(t.color!==void 0&&(e.components[1].color=t.color),t.topColor!==void 0&&(e.components[1].topColor=t.topColor),e.components[1].dirty=!0)}s(cb,"updateColor");function Nf(e,t,r){t!==void 0&&(e.type==="label"||e.type==="marker"?(e.object3d.position.copy(r(t[1],t[0],t[2]||0)),e.positionDirty=!0):e.type==="custom-geometry"&&e.components[0].position.copy(r(t[1],t[0],t[2]||0)))}s(Nf,"updatePosition");function kf(e,t){var r;return t!==void 0&&(e.type==="marker"||e.type==="label"||e.type==="custom-geometry")&&e.parent!==t?((r=e.parent)==null||r.removeEntity(e),t.addEntity(e),!0):!1}s(kf,"updateParent");function ub(e,t){t!==void 0&&(e.type==="marker"||e.type==="label")&&(e.components[0].enabled=t)}s(ub,"updateEnabled");function pb(e,t){if(t!==void 0&&e.type==="path"){let r=e.components[0];t.completeFraction!==void 0&&(r.completeFraction=t.completeFraction)}}s(pb,"updatePath");function hb(e,t){if(t!==void 0&&e.type==="marker"){let r=e.components[0];if(t.contentHTML!==void 0)return r.containerEl.innerHTML=t.contentHTML,!0}return!1}s(hb,"updateMarker");function fb(e,t){return t!==void 0&&(e.type==="marker"||e.type==="label")?(e.components[0].rank=pa(t),!0):!1}s(fb,"updateRank");function db(e,t){var r,i,n;if(t!==void 0&&e.type==="label"){let o=e.components[0];t.text!==void 0&&(o.text=t.text,o.dirty=!0),((r=t.options)==null?void 0:r.appearance)!==void 0&&Object.keys((i=t.options)==null?void 0:i.appearance).length>0&&(cf(o.appearance,((n=t.options)==null?void 0:n.appearance)||{}),o.dirty=!0)}}s(db,"updateLabel");function mb(e,t){t!==void 0&&e.type==="geometry"&&(e.components[1].hoverColor=t,e.components[1].dirty=!0)}s(mb,"updateHoverColor");function Vn(e,t){return t!==void 0?(e.type==="model"||e.type==="path"||e.type==="geometry"||e.type==="custom-geometry"?(e.components[1].visible=t,e.components[1].dirty=!0):(e.type==="group-container"||e.type==="geometry-group")&&e.setVisible(t),!0):!1}s(Vn,"updateVisibility");function yb(e,t,r){if(r!==void 0&&e.type==="geometry-group"){e.setOpacity(r);for(let i of e.userData.entities3D.values()){let n=t.entity3DMap.get(i);((n==null?void 0:n.type)==="geometry"||(n==null?void 0:n.type)==="model")&&(n.components[1].opacity=r,n.components[1].dirty=!0)}}}s(yb,"updateOpacity");function Rf(e,t){t!==void 0&&(e.type==="model"||e.type==="path"||e.type==="geometry"||e.type==="custom-geometry"?(e.components[1].altitude=t,e.components[1].dirty=!0):e.type==="group-container"&&e.setAltitude(t))}s(Rf,"updateAltitude");var Li,qe,$l,Jl,gb,ga,Kl,Ql,vb,tc,bb,va,ec,ba,Ca,rc,Bf=class Bf{constructor(t){I(this,Jl);I(this,Ql);I(this,tc);I(this,Li,null);I(this,qe,void 0);v(this,"getCurrentSceneGLTF",async t=>{let r={onlyVisible:!0,binary:!0,light:!0,scale:1,...t},i=await j(this,Jl,gb).call(this),n=u(this,$l).call(this,r),o=await i.parseAsync(n,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),a;if(o instanceof ArrayBuffer)a=new Blob([o],{type:"application/octet-stream"});else{let l=JSON.stringify(o,null,2);a=new Blob([l],{type:"text/plain"})}return a});I(this,$l,s(t=>{let{scale:r,light:i,onlyVisible:n}=t,o=new as,a=new Ne().setFromObject(u(this,qe).entityScene);if(u(this,ga).call(this,u(this,qe).entityScene,o,n),i){let l=new cs(16777215,.3*Math.PI);l.position.set(0,Math.max(a.max.x,a.max.y)*r*.5,a.max.y*r*4),l.lookAt(0,0,-1),l.target.position.set(0,0,-1),l.add(l.target),o.add(l)}return o},"#getExportedScene"));I(this,ga,s((t,r,i)=>{t.material&&(t instanceof ls?j(this,Ql,vb).call(this,t).forEach(n=>r.add(n)):t instanceof ro&&r.add(j(this,tc,bb).call(this,t))),t.children.forEach(n=>{(!i||n.visible)&&u(this,ga).call(this,n,r,i)})},"#processObject3D"));I(this,Kl,s((t,r,i)=>{let n=new om({color:new Mt(t),metalness:0});return n.opacity=r,n.transparent=i,n},"#createStandardMaterial"));I(this,va,s(t=>{let{geometry:r,material:i,position:n,rotation:o,quaternion:a,scale:l}=t;if(!(r!=null&&r.isBufferGeometry))return t;let c=r.attributes.position,h=r.attributes.normal,d=r.attributes.uv;return u(this,ec).call(this,c,h),u(this,Ca).call(this,n,l,o,a),d&&u(this,rc).call(this,d),i!=null&&i.map&&r.type==="PlaneGeometry"&&(t.side=Kn),t},"#convertGeometry"));I(this,ec,s((t,r)=>{let i=new X,n=new X;for(let o=0;o<t.count;o++)i.fromBufferAttribute(t,o),u(this,ba).call(this,i),t.setXYZ(o,i.x,i.y,i.z),r&&(n.fromBufferAttribute(r,o),u(this,ba).call(this,n),r.setXYZ(o,n.x,n.y,n.z))},"#convertAttributes"));I(this,ba,s(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));I(this,Ca,s((t,r,i,n)=>{let o=t.y;t.y=t.z,t.z=-o;let a=r.y;if(r.y=r.z,r.z=a,i instanceof Zi)i.order="YXZ",i.set(i.x,i.y,i.z,i.order);else{let l=n.y;n.set(n.x,n.z,-l,n.w)}},"#convertObjectProperties"));I(this,rc,s(t=>{for(let r=0;r<t.count;r++){let i=t.getX(r),n=t.getY(r);t.setXY(r,i,n)}},"#convertUVs"));_(this,qe,t),u(this,qe).entityScene=t.entityScene,u(this,qe).entity3DMap=t.entity3DMap}destroy(){_(this,Li,null)}};Li=new WeakMap,qe=new WeakMap,$l=new WeakMap,Jl=new WeakSet,gb=s(async function(){if(!u(this,Li)){let{GLTFExporter:t}=await import("./GLTFExporter-WETOTCQY.js");_(this,Li,new t)}return u(this,Li)},"#getGLTFExporter"),ga=new WeakMap,Kl=new WeakMap,Ql=new WeakSet,vb=s(function(t){var a,l;let r=[],n=((a=t.userData)!=null&&a.entities?Object.values((l=t.userData)==null?void 0:l.entities):[]).map(c=>u(this,qe).entity3DMap.get(c)),o=new Map;return n.forEach(c=>{var x;if(!c||!(c instanceof Pt))return;let h=c.components[1],d=c.components[2];if(!h.visible||h.opacity===0)return;let y=`${d!=null&&d.hover?h.hoverColor||u(this,qe).hoverColor:h.color}-${h.opacity}-${Number(h.visible)}`;o.has(y)||o.set(y,[]),(x=o.get(y))==null||x.push(c)}),o.forEach((c,h)=>{let[d,m,y]=h.split("-"),x=c.reduce((C,M)=>{let T=M.components[0];if(T.type==="custom-geometry")return C;let w=T==null?void 0:T.geometry;return w&&C.push(w),C},[]),S=u(this,Kl).call(this,d,Number(m),t.material.transparent),P=Mr(x,!0),g=new Ft(P,S);g.position.copy(t.position),g.rotation.copy(t.rotation),g.scale.copy(t.scale),g.visible=!!y,u(this,Ca).call(this,g.position,g.scale,g.rotation,g.quaternion),r.push(u(this,va).call(this,g))}),r},"#processBatchedMesh"),tc=new WeakSet,bb=s(function(t){let r=t.geometry.clone(),i=t.material,n=new xr({color:i.color,side:Kn});n.opacity=i.opacity,n.transparent=i.transparent;let o=new ro(r,n);return o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),o.visible=t.visible,u(this,va).call(this,o)},"#processLineSegments"),va=new WeakMap,ec=new WeakMap,ba=new WeakMap,Ca=new WeakMap,rc=new WeakMap,s(Bf,"ExporterSystem");var ya=Bf;f();var Cb="#ffffff";var Gf=class Gf{initialColor=Cb;color=Cb;topColor;hoverColor;dirty=!0;visible=!0;opacity=1;width=.1;height=.1;altitude=0;join="round";cap="round";constructor(t={}){this.color=(t==null?void 0:t.color)!==void 0?t.color:this.color,this.initialColor=this.color,this.width=(t==null?void 0:t.width)!==void 0?t.width:this.width,this.opacity=(t==null?void 0:t.opacity)!==void 0?t.opacity:this.opacity,this.visible=(t==null?void 0:t.visible)!==void 0?t.visible:this.visible,this.height=(t==null?void 0:t.height)!==void 0?t.height:this.height,this.altitude=(t==null?void 0:t.altitude)!==void 0?t.altitude:this.altitude,this.join=(t==null?void 0:t.join)!==void 0?t.join:this.join,this.cap=(t==null?void 0:t.cap)!==void 0?t.cap:this.cap,this.topColor=t==null?void 0:t.topColor}};s(Gf,"StyleComponent");var Wr=Gf;f();f();f();f();var ic={top:0,bottom:0,left:0,right:0};f();f();f();f();var Vf=class Vf extends tm{_width;_height;constructor(t){let i=t;super(new Float32Array(t*8),2,t,jd,Yd),this._width=8,this._height=i}setColor(t,r,i){let n=this.image.data,o=t*8;n[o]=r.r,n[o+1]=r.g,n[o+2]=r.b,n[o+4]=i.r,n[o+5]=i.g,n[o+6]=i.b,this.needsUpdate=!0}};s(Vf,"BatchedPropertiesTexture");var nc=Vf;var xb=`#define LAMBERT
11
+ Pos: ${(a=i.position)==null?void 0:a.toArray().join(", ")}`,"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,i){var o;let n=document.createElement("pre");n.style.maxWidth="300px",n.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",n.style.backgroundColor=i,n.textContent=r,(o=this.debugPanel)==null||o.prepend(n),setTimeout(()=>{n.style.opacity="0",setTimeout(()=>{n.remove()},500)},2500)}getCursor(){return this.cursor}};En=new WeakMap,s(Lh,"InteractionSystem");var Wo=Lh;function $2(e,t){let r=e.components[2];r&&(r.hover=t,r.dirty=!0)}s($2,"updateHover");function M6(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}s(M6,"processCursor");f();f();f();function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}s(wl,"_typeof");var w6=/^\s+/,T6=/\s+$/;function B(e,t){if(e=e||"",t=t||{},e instanceof B)return e;if(!(this instanceof B))return new B(e,t);var r=I6(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}s(B,"tinycolor");B.prototype={isDark:s(function(){return this.getBrightness()<128},"isDark"),isLight:s(function(){return!this.isDark()},"isLight"),isValid:s(function(){return this._ok},"isValid"),getOriginalInput:s(function(){return this._originalInput},"getOriginalInput"),getFormat:s(function(){return this._format},"getFormat"),getAlpha:s(function(){return this._a},"getAlpha"),getBrightness:s(function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},"getBrightness"),getLuminance:s(function(){var t=this.toRgb(),r,i,n,o,a,l;return r=t.r/255,i=t.g/255,n=t.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*o+.7152*a+.0722*l},"getLuminance"),setAlpha:s(function(t){return this._a=iv(t),this._roundA=Math.round(100*this._a)/100,this},"setAlpha"),toHsv:s(function(){var t=K2(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},"toHsv"),toHsvString:s(function(){var t=K2(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+n+"%)":"hsva("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHsvString"),toHsl:s(function(){var t=J2(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},"toHsl"),toHslString:s(function(){var t=J2(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+n+"%)":"hsla("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHslString"),toHex:s(function(t){return Q2(this._r,this._g,this._b,t)},"toHex"),toHexString:s(function(t){return"#"+this.toHex(t)},"toHexString"),toHex8:s(function(t){return O6(this._r,this._g,this._b,this._a,t)},"toHex8"),toHex8String:s(function(t){return"#"+this.toHex8(t)},"toHex8String"),toRgb:s(function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},"toRgb"),toRgbString:s(function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},"toRgbString"),toPercentageRgb:s(function(){return{r:Math.round(pt(this._r,255)*100)+"%",g:Math.round(pt(this._g,255)*100)+"%",b:Math.round(pt(this._b,255)*100)+"%",a:this._a}},"toPercentageRgb"),toPercentageRgbString:s(function(){return this._a==1?"rgb("+Math.round(pt(this._r,255)*100)+"%, "+Math.round(pt(this._g,255)*100)+"%, "+Math.round(pt(this._b,255)*100)+"%)":"rgba("+Math.round(pt(this._r,255)*100)+"%, "+Math.round(pt(this._g,255)*100)+"%, "+Math.round(pt(this._b,255)*100)+"%, "+this._roundA+")"},"toPercentageRgbString"),toName:s(function(){return this._a===0?"transparent":this._a<1?!1:Y6[Q2(this._r,this._g,this._b,!0)]||!1},"toName"),toFilter:s(function(t){var r="#"+tv(this._r,this._g,this._b,this._a),i=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var o=B(t);i="#"+tv(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+i+")"},"toFilter"),toString:s(function(t){var r=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,o=!r&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},"toString"),clone:s(function(){return B(this.toString())},"clone"),_applyModification:s(function(t,r){var i=t.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},"_applyModification"),lighten:s(function(){return this._applyModification(k6,arguments)},"lighten"),brighten:s(function(){return this._applyModification(R6,arguments)},"brighten"),darken:s(function(){return this._applyModification(F6,arguments)},"darken"),desaturate:s(function(){return this._applyModification(D6,arguments)},"desaturate"),saturate:s(function(){return this._applyModification(A6,arguments)},"saturate"),greyscale:s(function(){return this._applyModification(N6,arguments)},"greyscale"),spin:s(function(){return this._applyModification(B6,arguments)},"spin"),_applyCombination:s(function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},"_applyCombination"),analogous:s(function(){return this._applyCombination(H6,arguments)},"analogous"),complement:s(function(){return this._applyCombination(G6,arguments)},"complement"),monochromatic:s(function(){return this._applyCombination(X6,arguments)},"monochromatic"),splitcomplement:s(function(){return this._applyCombination(V6,arguments)},"splitcomplement"),triad:s(function(){return this._applyCombination(ev,[3])},"triad"),tetrad:s(function(){return this._applyCombination(ev,[4])},"tetrad")};B.fromRatio=function(e,t){if(wl(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=Zo(e[i]));e=r}return B(e,t)};function I6(e){var t={r:0,g:0,b:0},r=1,i=null,n=null,o=null,a=!1,l=!1;return typeof e=="string"&&(e=W6(e)),wl(e)=="object"&&(pr(e.r)&&pr(e.g)&&pr(e.b)?(t=E6(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):pr(e.h)&&pr(e.s)&&pr(e.v)?(i=Zo(e.s),n=Zo(e.v),t=L6(e.h,i,n),a=!0,l="hsv"):pr(e.h)&&pr(e.s)&&pr(e.l)&&(i=Zo(e.s),o=Zo(e.l),t=_6(e.h,i,o),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=iv(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}s(I6,"inputToRGB");function E6(e,t,r){return{r:pt(e,255)*255,g:pt(t,255)*255,b:pt(r,255)*255}}s(E6,"rgbToRgb");function J2(e,t,r){e=pt(e,255),t=pt(t,255),r=pt(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),o,a,l=(i+n)/2;if(i==n)o=a=0;else{var c=i-n;switch(a=l>.5?c/(2-i-n):c/(i+n),i){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,l}}s(J2,"rgbToHsl");function _6(e,t,r){var i,n,o;e=pt(e,360),t=pt(t,100),r=pt(r,100);function a(h,d,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?h+(d-h)*6*y:y<1/2?d:y<2/3?h+(d-h)*(2/3-y)*6:h}if(s(a,"hue2rgb"),t===0)i=n=o=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=a(c,l,e+1/3),n=a(c,l,e),o=a(c,l,e-1/3)}return{r:i*255,g:n*255,b:o*255}}s(_6,"hslToRgb");function K2(e,t,r){e=pt(e,255),t=pt(t,255),r=pt(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),o,a,l=i,c=i-n;if(a=i===0?0:c/i,i==n)o=0;else{switch(i){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,v:l}}s(K2,"rgbToHsv");function L6(e,t,r){e=pt(e,360)*6,t=pt(t,100),r=pt(r,100);var i=Math.floor(e),n=e-i,o=r*(1-t),a=r*(1-n*t),l=r*(1-(1-n)*t),c=i%6,h=[r,a,o,o,l,r][c],d=[l,r,r,a,o,o][c],y=[o,o,l,r,r,a][c];return{r:h*255,g:d*255,b:y*255}}s(L6,"hsvToRgb");function Q2(e,t,r,i){var n=[Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}s(Q2,"rgbToHex");function O6(e,t,r,i,n){var o=[Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16)),Le(nv(i))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}s(O6,"rgbaToHex");function tv(e,t,r,i){var n=[Le(nv(i)),Le(Math.round(e).toString(16)),Le(Math.round(t).toString(16)),Le(Math.round(r).toString(16))];return n.join("")}s(tv,"rgbaToArgbHex");B.equals=function(e,t){return!e||!t?!1:B(e).toRgbString()==B(t).toRgbString()};B.random=function(){return B.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function D6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s-=t/100,r.s=Tl(r.s),B(r)}s(D6,"_desaturate");function A6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s+=t/100,r.s=Tl(r.s),B(r)}s(A6,"_saturate");function N6(e){return B(e).desaturate(100)}s(N6,"_greyscale");function k6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l+=t/100,r.l=Tl(r.l),B(r)}s(k6,"_lighten");function R6(e,t){t=t===0?0:t||10;var r=B(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),B(r)}s(R6,"_brighten");function F6(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l-=t/100,r.l=Tl(r.l),B(r)}s(F6,"_darken");function B6(e,t){var r=B(e).toHsl(),i=(r.h+t)%360;return r.h=i<0?360+i:i,B(r)}s(B6,"_spin");function G6(e){var t=B(e).toHsl();return t.h=(t.h+180)%360,B(t)}s(G6,"_complement");function ev(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=B(e).toHsl(),i=[B(e)],n=360/t,o=1;o<t;o++)i.push(B({h:(r.h+o*n)%360,s:r.s,l:r.l}));return i}s(ev,"polyad");function V6(e){var t=B(e).toHsl(),r=t.h;return[B(e),B({h:(r+72)%360,s:t.s,l:t.l}),B({h:(r+216)%360,s:t.s,l:t.l})]}s(V6,"_splitcomplement");function H6(e,t,r){t=t||6,r=r||30;var i=B(e).toHsl(),n=360/r,o=[B(e)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,o.push(B(i));return o}s(H6,"_analogous");function X6(e,t){t=t||6;for(var r=B(e).toHsv(),i=r.h,n=r.s,o=r.v,a=[],l=1/t;t--;)a.push(B({h:i,s:n,v:o})),o=(o+l)%1;return a}s(X6,"_monochromatic");B.mix=function(e,t,r){r=r===0?0:r||50;var i=B(e).toRgb(),n=B(t).toRgb(),o=r/100,a={r:(n.r-i.r)*o+i.r,g:(n.g-i.g)*o+i.g,b:(n.b-i.b)*o+i.b,a:(n.a-i.a)*o+i.a};return B(a)};B.readability=function(e,t){var r=B(e),i=B(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};B.isReadable=function(e,t,r){var i=B.readability(e,t),n,o;switch(o=!1,n=Z6(r),n.level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};B.mostReadable=function(e,t,r){var i=null,n=0,o,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var h=0;h<t.length;h++)o=B.readability(e,t[h]),o>n&&(n=o,i=B(t[h]));return B.isReadable(e,i,{level:l,size:c})||!a?i:(r.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],r))};var Oh=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Y6=B.hexNames=j6(Oh);function j6(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}s(j6,"flip");function iv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}s(iv,"boundAlpha");function pt(e,t){z6(e)&&(e="100%");var r=U6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}s(pt,"bound01");function Tl(e){return Math.min(1,Math.max(0,e))}s(Tl,"clamp01");function ce(e){return parseInt(e,16)}s(ce,"parseIntFromHex");function z6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}s(z6,"isOnePointZero");function U6(e){return typeof e=="string"&&e.indexOf("%")!=-1}s(U6,"isPercentage");function Le(e){return e.length==1?"0"+e:""+e}s(Le,"pad2");function Zo(e){return e<=1&&(e=e*100+"%"),e}s(Zo,"convertToPercentage");function nv(e){return Math.round(parseFloat(e)*255).toString(16)}s(nv,"convertDecimalToHex");function rv(e){return ce(e)/255}s(rv,"convertHexToDecimal");var _e=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function pr(e){return!!_e.CSS_UNIT.exec(e)}s(pr,"isValidCSSUnit");function W6(e){e=e.replace(w6,"").replace(T6,"").toLowerCase();var t=!1;if(Oh[e])e=Oh[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=_e.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=_e.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=_e.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=_e.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=_e.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=_e.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=_e.hex8.exec(e))?{r:ce(r[1]),g:ce(r[2]),b:ce(r[3]),a:rv(r[4]),format:t?"name":"hex8"}:(r=_e.hex6.exec(e))?{r:ce(r[1]),g:ce(r[2]),b:ce(r[3]),format:t?"name":"hex"}:(r=_e.hex4.exec(e))?{r:ce(r[1]+""+r[1]),g:ce(r[2]+""+r[2]),b:ce(r[3]+""+r[3]),a:rv(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=_e.hex3.exec(e))?{r:ce(r[1]+""+r[1]),g:ce(r[2]+""+r[2]),b:ce(r[3]+""+r[3]),format:t?"name":"hex"}:!1}s(W6,"stringInputToObject");function Z6(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}s(Z6,"validateWCAG2Parms");var Yh=Cr(kv());var Dn={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},V9={lightOnDark:{...Dn,text:{...Dn.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...Dn.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...Dn,text:{...Dn.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...Dn.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},H9="LOW_PRIORITY",Gv=["","","medium","high","always-visible"];function ta(e){return Gv.indexOf(e)}s(ta,"convertCollisionRankingTeirToNumber");function ea(e){return Gv[e]}s(ea,"convertRankToCollisionRankingTier");var Rv=4,X9=6,Y9=20,j9=2.5,z9=2,U9="cover",Fv=.5,W9=6.5,Bv={heightAbovePolygon:0,appearance:V9.darkOnLight};var Mi=class Mi{lines=0;id;rank;type="label";initialRank;contextConfigured=!1;fillText=void 0;newStyle={};opacity=0;visibilityNeedsUpdate=!0;activeStrategyIndex=-1;text;style={top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"};projection=new z;_cache={};appearance;options;visible=!1;enabled=!0;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};currentStrategyIndex=-1;totalMarkerSize=0;dirty=!0;collisionDirty=!0;lastTextAlign;imageHash;markerSize=0;iconVisible=!1;zoomProportion=0;dp;setEntity(){}constructor(t,r,i){var o,a;if(this.id=(o=r.id)!=null?o:vt(),this.options=(0,Yh.default)({},r,Bv),this.text=t,this.dp=(l=1)=>l*i.pixelRatio,typeof r.rank=="string")this.rank=ta(r.rank),this.initialRank=this.rank;else if(r.rank!=null&&r.rank>0)this.rank=r.rank,this.initialRank=r.rank;else{let l=Math.trunc(b.env.NODE_ENV==="test"?Mi.testId:Mi.testId*10)/10;Mi.testId+=.001,this.rank=l,this.initialRank=l}let n=(0,Yh.default)({},this.options.appearance,Bv.appearance);this.appearance={margin:n.margin,text:{lineHeight:n.text.lineHeight,numLines:n.text.numLines,size:n.text.size,maxWidth:n.text.maxWidth,foregroundColor:n.text.foregroundColor,backgroundColor:n.text.backgroundColor},marker:{foregroundColor:{active:n.marker.foregroundColor.active,inactive:n.marker.foregroundColor.inactive||B(n.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:n.marker.backgroundColor.active,inactive:n.marker.backgroundColor.inactive||B(n.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:n.marker.icon,iconSize:n.marker.iconSize||Y9,iconPadding:(a=n.marker.iconPadding)!=null?a:z9,iconFit:n.marker.iconFit||U9,iconVisibilityThreshold:n.marker.iconVisibilityThreshold==null?Fv:n.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}calculateMarkerSize(){let{iconVisibilityThreshold:t=Fv}=this.appearance.marker,r=this.dp();this.zoomProportion<=t&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(W9)),this.totalMarkerSize=Math.ceil((this.markerSize+j9)/r)}get strategies(){let{width:t,height:r}=this.dimensions,{margin:i}=this.appearance;this.calculateMarkerSize();let n=Math.max(X9,i),o=this.iconVisible?n/2:0,a=[{name:"RIGHT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+n,l/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+t+n]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=this.totalMarkerSize/2+Rv,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+n,l/2+n,this.totalMarkerSize/2+t+n,this.totalMarkerSize/2+n]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=-t-this.totalMarkerSize/2-Rv,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let l=this.dp();return[r+this.totalMarkerSize/2/l+n,this.totalMarkerSize/2+n,t/2+n,t/2+n]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-this.totalMarkerSize-r/2,this.newStyle.left=-t/2}},{name:H9,getBoundingBox:()=>[this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:a}onStrategySelected=t=>{if(this.currentStrategyIndex===t)return;let r=this.strategies[t];r&&r.onStrategySelected(this),this.currentStrategyIndex=t;let i=this.style;this.style=this.newStyle,this.newStyle=i,this.opacity=0,this.visibilityNeedsUpdate=!0};updatePosition(){}disable(){this.visible=!1}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,r)=>({index:r,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};s(Mi,"LabelComponent"),v(Mi,"testId",0);var jh=Mi,je=jh;f();var ra,ia,zh=class zh{constructor(t){v(this,"mesh");v(this,"outline");v(this,"type","geometry");v(this,"instanceIndex",-1);v(this,"geometry");v(this,"material");v(this,"feature");v(this,"color",new Mt);v(this,"topColor",new Mt);v(this,"position",new Y);I(this,ra,0);I(this,ia,1);this.feature=t}get visible(){return this.mesh?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(t){this.mesh&&this.mesh.setVisibleAt(this.instanceIndex,t)}setOpacity(t){this.mesh&&(this.material&&(this.material.opacity=t,this.material.transparent=t<1),this.outline&&(t<.5?this.outline.visible=!1:this.outline.visible=!0),t===0?this.mesh.visible=!1:this.mesh.visible=!0)}setOutlineColor(t){if(!this.outline||!this.outline.material)return;let r=Array.isArray(this.outline.material)?this.outline.material:[this.outline.material];for(let i of r)i.color.set(t),i.needsUpdate=!0}setColor(t,r){this.color.set(t),this.topColor.set(r),this.material&&(this.material.setColor(this.instanceIndex,this.color,this.topColor),this.material.needsColorUpdate=!0)}get altitude(){return u(this,ra)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,ra,t))}get opacity(){return u(this,ia)}set opacity(t){var r,i;if(this.material){((r=this.material.userData)==null?void 0:r.originalOpacity)===void 0&&(this.material.userData={...this.material.userData,originalOpacity:this.material.opacity});let n=Ut(t,0,(i=this.material.userData)==null?void 0:i.originalOpacity,0,1);this.material.opacity=n,this.material.transparent=n<1,this.outline&&(this.outline.visible=n>.5),this.material.needsUpdate=!0}_(this,ia,t)}};ra=new WeakMap,ia=new WeakMap,s(zh,"MeshComponent");var ze=zh;var Uh=class Uh extends st{constructor(){super()}interpolators=new Map;addEntity3D(t,r){let[i,n,o,a]=r[1];this.interpolators.set(t,l=>Ut(l,i,n,o,a))}addEntity2D(t,r){let[i,n,o]=r[1];this.interpolators.set(t,a=>a<i?n:o)}addAny(t,r){this.interpolators.set(t,r)}update=t=>{for(let[r,i]of this.interpolators)r instanceof ze?r.setOpacity(i(t)):r instanceof je?r.enabled=i(t):i(t)};destroy(){this.interpolators.clear()}};s(Uh,"ZoomInterpolationSystem");var kl=Uh;f();var wi=class wi{id;type="marker";rank=0;initialRank=0;options={};projection=new z;enabled=!0;activeStrategyIndex=-1;strategyIndex=-1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};containerEl;contentEl=null;contentHtml="";style={top:"0px",left:"0px"};dirty=!1;collisionDirty=!0;visibilityNeedsUpdate=!0;constructor(t,r={}){if(this.id=(r==null?void 0:r.id)||vt(),this.options=r,typeof r.rank=="string")this.rank=ta(r.rank);else if(r.rank!=null&&r.rank>0)this.rank=r.rank;else{let n=Math.trunc(b.env.NODE_ENV==="test"?wi.testId:wi.testId*10)/10;wi.testId+=.001,this.rank=n}this.contentHtml=t,this.initialRank=this.rank;let i=document.createElement("div");i.style.opacity="0",i.innerHTML=`<div class="mappedin-marker">${this.contentHtml}</div>`,this.containerEl=i.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(t,r){if(t!=null&&r!=null)this.dimensions={width:t,height:r};else{let{width:i,height:n}=this.containerEl.getBoundingClientRect();this.dimensions={width:i,height:n}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"})}visible=!1;animation=null;currentStrategyIndex=-1;onStrategySelected=(t,r=!1)=>{if(this.currentStrategyIndex===t||r)return;let{width:i,height:n}=this.dimensions,o=-n/2+"px",a=-i/2+"px";switch(this.style.top=o,this.style.left=a,this.options.anchor){case"top":{this.style.top=-n+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-i+"px";break}case"right":{this.style.left="0px";break}default:this.style.top=o,this.style.left=a}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left};get strategies(){let{width:t,height:r}=this.dimensions;return[{name:"center",getBoundingBox:()=>{let i=r/2,n=r/2,o=t/2,a=t/2;switch(this.options.anchor){case"top":{i=r,n=0;break}case"bottom":{i=0,n=r;break}case"left":{o=t,a=0;break}case"right":{o=0,a=t;break}}return[i,n,o,a]}}]}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,r)=>({index:r,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};s(wi,"MarkerComponent"),v(wi,"testId",0);var de=wi;f();f();f();f();f();var Wh=class Wh{hover=!1;dirty=!1};s(Wh,"InteractionComponent");var na=Wh;function Ue(e,t,r){if(t!==void 0){if(e.type==="model"||e.type==="path"||e.type==="marker"||e.type==="label"||e.type==="geometry")return t===!0?(e instanceof Ee&&e.components[1]===void 0&&(e.components[1]=new na,e.components[1].dirty=!0),e instanceof St&&e.components[2]===void 0&&(e.components[2]=new na,e.components[2].dirty=!0),!0):(e instanceof Ee?e.components[1]=void 0:e instanceof St&&(e.components[2]=void 0),!0);if(e.type==="geometry-group"){let i;for(let n of e.userData.entities3D.values())i=r.entity3DMap.get(n),Ue(i,t,r);return!0}}return!1}s(Ue,"updateInteractivity");function Vv(e,t){t!==void 0&&(e.type==="path"||e.type==="geometry")&&(t.color!==void 0&&(e.components[1].color=t.color),t.topColor!==void 0&&(e.components[1].topColor=t.topColor),e.components[1].dirty=!0)}s(Vv,"updateColor");function Zh(e,t,r){t!==void 0&&(e.type==="label"||e.type==="marker"?(e.object3d.position.copy(r(t[1],t[0],t[2]||0)),e.positionDirty=!0):e.type==="custom-geometry"&&e.components[0].position.copy(r(t[1],t[0],t[2]||0)))}s(Zh,"updatePosition");function qh(e,t){var r;return t!==void 0&&(e.type==="marker"||e.type==="label"||e.type==="custom-geometry")&&e.parent!==t?((r=e.parent)==null||r.removeEntity(e),t.addEntity(e),!0):!1}s(qh,"updateParent");function Hv(e,t){t!==void 0&&(e.type==="marker"||e.type==="label")&&(e.components[0].enabled=t)}s(Hv,"updateEnabled");function Xv(e,t){if(t!==void 0&&e.type==="path"){let r=e.components[0];t.completeFraction!==void 0&&(r.completeFraction=t.completeFraction)}}s(Xv,"updatePath");function Yv(e,t){if(t!==void 0&&e.type==="marker"){let r=e.components[0];if(t.contentHTML!==void 0)return r.containerEl.innerHTML=t.contentHTML,!0}return!1}s(Yv,"updateMarker");function jv(e,t){return t!==void 0&&(e.type==="marker"||e.type==="label")?(e.components[0].rank=ta(t),!0):!1}s(jv,"updateRank");function zv(e,t){var r,i,n;if(t!==void 0&&e.type==="label"){let o=e.components[0];t.text!==void 0&&(o.text=t.text,o.dirty=!0),((r=t.options)==null?void 0:r.appearance)!==void 0&&Object.keys((i=t.options)==null?void 0:i.appearance).length>0&&(Ph(o.appearance,((n=t.options)==null?void 0:n.appearance)||{}),o.dirty=!0)}}s(zv,"updateLabel");function Uv(e,t){t!==void 0&&e.type==="geometry"&&(e.components[1].hoverColor=t,e.components[1].dirty=!0)}s(Uv,"updateHoverColor");function An(e,t){return t!==void 0?(e.type==="model"||e.type==="path"||e.type==="geometry"||e.type==="custom-geometry"?(e.components[1].visible=t,e.components[1].dirty=!0):(e.type==="group-container"||e.type==="geometry-group")&&e.setVisible(t),!0):!1}s(An,"updateVisibility");function Wv(e,t,r){if(r!==void 0&&e.type==="geometry-group"){e.setOpacity(r);for(let i of e.userData.entities3D.values()){let n=t.entity3DMap.get(i);((n==null?void 0:n.type)==="geometry"||(n==null?void 0:n.type)==="model")&&(n.components[1].opacity=r,n.components[1].dirty=!0)}}}s(Wv,"updateOpacity");function $h(e,t){t!==void 0&&(e.type==="model"||e.type==="path"||e.type==="geometry"||e.type==="custom-geometry"?(e.components[1].altitude=t,e.components[1].dirty=!0):e.type==="group-container"&&e.setAltitude(t))}s($h,"updateAltitude");var Ti,We,Rl,Fl,Zv,aa,Bl,Gl,qv,Vl,$v,sa,Hl,la,ca,Xl,Kh=class Kh{constructor(t){I(this,Fl);I(this,Gl);I(this,Vl);I(this,Ti,null);I(this,We,void 0);v(this,"getCurrentSceneGLTF",async t=>{let r={onlyVisible:!0,binary:!0,light:!0,scale:1,...t},i=await j(this,Fl,Zv).call(this),n=u(this,Rl).call(this,r),o=await i.parseAsync(n,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),a;if(o instanceof ArrayBuffer)a=new Blob([o],{type:"application/octet-stream"});else{let l=JSON.stringify(o,null,2);a=new Blob([l],{type:"text/plain"})}return a});I(this,Rl,s(t=>{let{scale:r,light:i,onlyVisible:n}=t,o=new ss,a=new Ne().setFromObject(u(this,We).entityScene);if(u(this,aa).call(this,u(this,We).entityScene,o,n),i){let l=new us(16777215,.3*Math.PI);l.position.set(0,Math.max(a.max.x,a.max.y)*r*.5,a.max.y*r*4),l.lookAt(0,0,-1),l.target.position.set(0,0,-1),l.add(l.target),o.add(l)}return o},"#getExportedScene"));I(this,aa,s((t,r,i)=>{t.material&&(t instanceof cs?j(this,Gl,qv).call(this,t).forEach(n=>r.add(n)):t instanceof ro&&r.add(j(this,Vl,$v).call(this,t))),t.children.forEach(n=>{(!i||n.visible)&&u(this,aa).call(this,n,r,i)})},"#processObject3D"));I(this,Bl,s((t,r,i)=>{let n=new am({color:new Mt(t),metalness:0});return n.opacity=r,n.transparent=i,n},"#createStandardMaterial"));I(this,sa,s(t=>{let{geometry:r,material:i,position:n,rotation:o,quaternion:a,scale:l}=t;if(!(r!=null&&r.isBufferGeometry))return t;let c=r.attributes.position,h=r.attributes.normal,d=r.attributes.uv;return u(this,Hl).call(this,c,h),u(this,ca).call(this,n,l,o,a),d&&u(this,Xl).call(this,d),i!=null&&i.map&&r.type==="PlaneGeometry"&&(t.side=Kn),t},"#convertGeometry"));I(this,Hl,s((t,r)=>{let i=new Y,n=new Y;for(let o=0;o<t.count;o++)i.fromBufferAttribute(t,o),u(this,la).call(this,i),t.setXYZ(o,i.x,i.y,i.z),r&&(n.fromBufferAttribute(r,o),u(this,la).call(this,n),r.setXYZ(o,n.x,n.y,n.z))},"#convertAttributes"));I(this,la,s(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));I(this,ca,s((t,r,i,n)=>{let o=t.y;t.y=t.z,t.z=-o;let a=r.y;if(r.y=r.z,r.z=a,i instanceof qi)i.order="YXZ",i.set(i.x,i.y,i.z,i.order);else{let l=n.y;n.set(n.x,n.z,-l,n.w)}},"#convertObjectProperties"));I(this,Xl,s(t=>{for(let r=0;r<t.count;r++){let i=t.getX(r),n=t.getY(r);t.setXY(r,i,n)}},"#convertUVs"));_(this,We,t),u(this,We).entityScene=t.entityScene,u(this,We).entity3DMap=t.entity3DMap}destroy(){_(this,Ti,null)}};Ti=new WeakMap,We=new WeakMap,Rl=new WeakMap,Fl=new WeakSet,Zv=s(async function(){if(!u(this,Ti)){let{GLTFExporter:t}=await import("./GLTFExporter-2MRGEV2R.js");_(this,Ti,new t)}return u(this,Ti)},"#getGLTFExporter"),aa=new WeakMap,Bl=new WeakMap,Gl=new WeakSet,qv=s(function(t){var a,l;let r=[],n=((a=t.userData)!=null&&a.entities?Object.values((l=t.userData)==null?void 0:l.entities):[]).map(c=>u(this,We).entity3DMap.get(c)),o=new Map;return n.forEach(c=>{var x;if(!c||!(c instanceof St))return;let h=c.components[1],d=c.components[2];if(!h.visible||h.opacity===0)return;let m=`${d!=null&&d.hover?h.hoverColor||u(this,We).hoverColor:h.color}-${h.opacity}-${Number(h.visible)}`;o.has(m)||o.set(m,[]),(x=o.get(m))==null||x.push(c)}),o.forEach((c,h)=>{let[d,y,m]=h.split("-"),x=c.reduce((C,M)=>{let T=M.components[0];if(T.type==="custom-geometry")return C;let w=T==null?void 0:T.geometry;return w&&C.push(w),C},[]),S=u(this,Bl).call(this,d,Number(y),t.material.transparent),P=Mr(x,!0),g=new Ft(P,S);g.position.copy(t.position),g.rotation.copy(t.rotation),g.scale.copy(t.scale),g.visible=!!m,u(this,ca).call(this,g.position,g.scale,g.rotation,g.quaternion),r.push(u(this,sa).call(this,g))}),r},"#processBatchedMesh"),Vl=new WeakSet,$v=s(function(t){let r=t.geometry.clone(),i=t.material,n=new xr({color:i.color,side:Kn});n.opacity=i.opacity,n.transparent=i.transparent;let o=new ro(r,n);return o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),o.visible=t.visible,u(this,sa).call(this,o)},"#processLineSegments"),sa=new WeakMap,Hl=new WeakMap,la=new WeakMap,ca=new WeakMap,Xl=new WeakMap,s(Kh,"ExporterSystem");var oa=Kh;f();var Jv="#ffffff";var Qh=class Qh{initialColor=Jv;color=Jv;topColor;hoverColor;dirty=!0;visible=!0;opacity=1;width=.1;height=.1;altitude=0;join="round";cap="round";constructor(t={}){this.color=(t==null?void 0:t.color)!==void 0?t.color:this.color,this.initialColor=this.color,this.width=(t==null?void 0:t.width)!==void 0?t.width:this.width,this.opacity=(t==null?void 0:t.opacity)!==void 0?t.opacity:this.opacity,this.visible=(t==null?void 0:t.visible)!==void 0?t.visible:this.visible,this.height=(t==null?void 0:t.height)!==void 0?t.height:this.height,this.altitude=(t==null?void 0:t.altitude)!==void 0?t.altitude:this.altitude,this.join=(t==null?void 0:t.join)!==void 0?t.join:this.join,this.cap=(t==null?void 0:t.cap)!==void 0?t.cap:this.cap,this.topColor=t==null?void 0:t.topColor}};s(Qh,"StyleComponent");var jr=Qh;f();f();f();f();var Yl={top:0,bottom:0,left:0,right:0};f();f();f();f();var tf=class tf extends em{_width;_height;constructor(t){let i=t;super(new Float32Array(t*8),2,t,zd,jd),this._width=8,this._height=i}setColor(t,r,i){let n=this.image.data,o=t*8;n[o]=r.r,n[o+1]=r.g,n[o+2]=r.b,n[o+4]=i.r,n[o+5]=i.g,n[o+6]=i.b,this.needsUpdate=!0}};s(tf,"BatchedPropertiesTexture");var jl=tf;var Kv=`#define LAMBERT
450
12
  varying vec3 vViewPosition;
451
13
  varying vec4 vPosition;
452
14
  varying vec4 finalPosition;
@@ -495,7 +57,7 @@ void main() {
495
57
  worldNormal = normal;
496
58
  // world position
497
59
  vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;
498
- }`;var Sb=`#define LAMBERT
60
+ }`;var Qv=`#define LAMBERT
499
61
  uniform vec3 diffuse;
500
62
  uniform vec3 emissive;
501
63
  uniform float opacity;
@@ -592,7 +154,7 @@ void main() {
592
154
  #include <premultiplied_alpha_fragment>
593
155
  #include <dithering_fragment>
594
156
  }
595
- `;var ax=.15,sx=.4,lx=-.05,cx=1,ux=.1,Hf=class Hf extends $i{needsColorUpdate=!0;propertiesTex;constructor(t,r){super(t);let i=new nc(r);this.propertiesTex=i,this.onBeforeCompile=n=>{n.vertexShader=xb,n.fragmentShader=Sb,n.uniforms.uPercentToDarkenGradient={value:sx},n.uniforms.uTopOfGradient={value:ax},n.uniforms.uMinSideAlpha={value:lx},n.uniforms.uMaxSideAlpha={value:cx},n.uniforms.uFullGradientStart={value:ux},n.uniforms.propertiesTex={value:i}}}setColor(t,r,i){this.propertiesTex.setColor(t,r,i)}dispose(){super.dispose(),this.propertiesTex.dispose()}};s(Hf,"BatchedStandardMaterial");var oc=Hf;var px=80;function Pb(e,t){var l,c;let r=0;for(let h of e)r+=((c=(l=h.components[0])==null?void 0:l.geometry)==null?void 0:c.attributes.position.count)||0;let i=new Mt(t.color),n=new oc({color:i,side:Kn,opacity:t.opacity||1,transparent:t.opacity!==void 0?t.opacity<1:!1},e.length),o=new ls(e.length,r,0,n);o.userData={entities:{}};let a;for(let h of e)a=h.components[0],a.mesh=o,a.material=n,a.instanceIndex=o.addGeometry(a.geometry),o.userData.entities[a.instanceIndex]=h.id,n.setColor(a.instanceIndex,i,t.topColor?new Mt(t.topColor):i);return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}s(Pb,"batchGeometries");function Mb(e,t){t.polygonOffset=!0,t.polygonOffsetFactor=1,t.polygonOffsetUnits=1;let r=new im(e,px),i=new em({linewidth:2,color:t.color,userData:{initialColor:t.color.getHexString()}});return new ro(r,i)}s(Mb,"createOutlines");f();var hx="gray",fx=.1;function wb(e,t,r){let{color:i=hx,opacity:n=1,altitude:o=0,height:a=fx}=r||{};Array.isArray(n)&&(n=1);let l={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o}},c=new ke,h=e.geometry.coordinates[0].map(x=>{let S=t(x[1],x[0]);return l.min.x=Math.min(l.min.x,S.x),l.min.y=Math.min(l.min.y,S.y),l.max.x=Math.max(l.max.x,S.x),l.max.y=Math.max(l.max.y,S.y),S});c.moveTo(h[0].x,h[0].y),h.slice(1).forEach(x=>c.lineTo(x.x,x.y)),c.lineTo(h[0].x,h[0].y);let d=e.geometry.coordinates.slice(1);c.holes=d.map(x=>{let S=x.map(g=>t(g[1],g[0])),P=new Sr;return P.moveTo(S[0].x,S[0].y),S.slice(1).forEach(g=>P.lineTo(g.x,g.y)),P.lineTo(S[0].x,S[0].y),P});let m={bevelEnabled:!1,depth:a},y=new Re(c,m);return y.translate(0,0,o||0),y.userData={style:{color:i,opacity:n}},y}s(wb,"renderPolygonGeometry");f();var dx="gray",mx=.1;function Tb(e,t,r){let{color:i=dx,opacity:n=1,altitude:o=0,height:a=mx}=r||{};Array.isArray(n)&&(n=1);let l={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o}},c={bevelEnabled:!1,depth:a},h=[];e.geometry.coordinates.forEach(m=>{let y=new ke,x=m[0].map(g=>{let C=t(g[1],g[0]);return l.min.x=Math.min(l.min.x,C.x),l.min.y=Math.min(l.min.y,C.y),l.max.x=Math.max(l.max.x,C.x),l.max.y=Math.max(l.max.y,C.y),C});y.moveTo(x[0].x,x[0].y),x.slice(1).forEach(g=>y.lineTo(g.x,g.y)),y.lineTo(x[0].x,x[0].y);let S=m.slice(1);y.holes=S.map(g=>{let C=g.map(T=>t(T[1],T[0])),M=new Sr;return M.moveTo(C[0].x,C[0].y),C.slice(1).forEach(T=>M.lineTo(T.x,T.y)),M.lineTo(C[0].x,C[0].y),M});let P=new Re(y,c);h.push(P)});let d=Mr(h);return d.translate(0,0,o||0),d.userData={style:{color:i,opacity:n}},d}s(Tb,"renderMultiPolygonGeometry");f();f();var jf=Cr(Rb());function Fb(e){this.name="JSClipperError",this.message=e,this.stack=new Error().stack}s(Fb,"JSClipperError");Fb.prototype=Error.prototype;jf.default.Error=function(e){throw new Fb(e)};var ie=jf.default;var lP="gray",zf=new ie.ClipperOffset,$t=100;function Bb(e,t,r){let{color:i=lP,opacity:n=1,width:o=1,join:a="round",cap:l="round",height:c=.01,altitude:h=0}=r||{};Array.isArray(n)&&(n=0);let d=[];for(let P=0;P<e.geometry.coordinates.length-1;P++){let g=t(e.geometry.coordinates[P][1],e.geometry.coordinates[P][0]),C=t(e.geometry.coordinates[P+1][1],e.geometry.coordinates[P+1][0]);d.push([g,C])}zf.AddPaths(d.map(P=>P.map(g=>({X:g.x*$t,Y:g.y*$t}))),a==="round"?ie.JoinType.jsRound:a==="miter"?ie.JoinType.jsMiter:ie.JoinType.jsSquare,l==="round"?ie.EndType.etOpenRound:l==="butt"?ie.EndType.etOpenButt:ie.EndType.etOpenSquare);let m=new ie.PolyTree;zf.Execute(m,o/2*$t);let y=[],x={bevelEnabled:!1,depth:c};for(let P of m.m_AllPolys){let g=new ke;if(P.IsHole())continue;let C=P.m_polygon;g.moveTo(C[0].X/$t,C[0].Y/$t),C.slice(1).forEach(M=>g.lineTo(M.X/$t,M.Y/$t)),g.lineTo(C[0].X/$t,C[0].Y/$t),g.holes=P.m_Childs.map(M=>{let T=new Sr,w=M.m_polygon;return T.moveTo(w[0].X/$t,w[0].Y/$t),w.slice(1).forEach(E=>T.lineTo(E.X/$t,E.Y/$t)),T.lineTo(w[0].X/$t,w[0].Y/$t),T}),y.push(new Re(g,x))}let S=Mr(y);return S.translate(0,0,h||0),S.userData={style:{color:i,opacity:n}},zf.Clear(),S}s(Bb,"renderLineStringGeometry");f();var Jt=100,cP=.22,uP=.01;function Gb(e,t,r={}){let{width:i=cP,height:n=uP,color:o="gray",opacity:a=1,altitude:l=0}=r,c={min:{x:1/0,y:1/0,z:l},max:{x:-1/0,y:-1/0,z:l+n}},h={bevelEnabled:!1,depth:n},d=new ie.ClipperOffset,m=e.geometry.coordinates.map(P=>P.map(g=>t(g[1],g[0])));d.AddPaths(m.map(P=>P.map(g=>({X:g.x*Jt,Y:g.y*Jt}))),ie.JoinType.jsMiter,ie.EndType.etOpenRound);let y=new ie.PolyTree;d.Execute(y,i/2*Jt);let x=[];for(let P of y.m_AllPolys){let g=new ke;if(P.IsHole())continue;c.min.x=Math.min(c.min.x,P.m_polygon[0].X),c.min.y=Math.min(c.min.y,P.m_polygon[0].Y),c.max.x=Math.max(c.max.x,P.m_polygon[0].X),c.max.y=Math.max(c.max.y,P.m_polygon[0].Y);let C=P.m_polygon;g.moveTo(C[0].X/Jt,C[0].Y/Jt),C.slice(1).forEach(M=>g.lineTo(M.X/Jt,M.Y/Jt)),g.lineTo(C[0].X/Jt,C[0].Y/Jt),g.holes=P.m_Childs.map(M=>{let T=new Sr,w=M.m_polygon;return T.moveTo(w[0].X/Jt,w[0].Y/Jt),w.slice(1).forEach(E=>T.lineTo(E.X/Jt,E.Y/Jt)),T.lineTo(w[0].X/Jt,w[0].Y/Jt),T}),x.push(new Re(g,h))}let S=Mr(x);return S.translate(0,0,l||0),S.userData={style:{color:o,opacity:a}},d.Clear(),S}s(Gb,"renderMultiLineStringGeometry");f();var Pa,Ma,Uf=class Uf{constructor(t){v(this,"mesh");v(this,"type","model");v(this,"outline");v(this,"geometry");v(this,"material");v(this,"feature");v(this,"instanceIndex",-1);v(this,"visible",!0);v(this,"color",new Mt);v(this,"position",new X);I(this,Pa,0);I(this,Ma,1);this.feature=t}setOpacity(){}setColor(){}get altitude(){return u(this,Pa)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,Pa,t))}get opacity(){return u(this,Ma)}set opacity(t){var r,i;if(this.mesh){for(let n of this.mesh.children)if(n instanceof ss){((r=n.userData)==null?void 0:r.originalOpacity)===void 0&&(n.userData.originalOpacity=n.material.opacity);let o=Zt(t,0,(i=n.userData)==null?void 0:i.originalOpacity,0,1);n.material.opacity=o,n.material.transparent=o<1,n.material.needsUpdate=!0}}_(this,Ma,t)}};Pa=new WeakMap,Ma=new WeakMap,s(Uf,"ModelComponent");var uc=Uf;function pP(e){let{color:t,opacity:r,topColor:i}=e;return`${t}${r}${i||""}`}s(pP,"generateIndex");var hP=1e4,Wf=class Wf{state;convertTo3DMapPosition;loader;constructor(t,r){this.state=t,this.convertTo3DMapPosition=r}async getGLTFLoader(){if(this.loader)return;let{GLTFLoader:t}=await import("./GLTFLoader-MLVN3ICM.js");this.loader=new t}createEntityFromFeature(t,r,i){let n=new We(r),o=new Pt(n,new Wr(i));return o.id=t,o}createModelFromFeature(t,r,i){let n=new uc(r),o=new Pt(n,new Wr(i));return o.id=t,o}populateEntityMesh(t,r){let i=t.components[0];i.geometry=r}async populateModelGroup(t,r,i){let n=new ti,o=new Zi,a=new Wd,l=new X,c=new je;return this.loader||await this.getGLTFLoader(),this.loader.load(r,h=>{var y,x,S,P,g,C;h.scene.traverse(M=>{let T=M;if("isMesh"in T&&T.isMesh===!0){let w=new ss(T.geometry,T.material,t.size);w.userData={entities:{}},c.add(w),i.add(c)}});let d=0,m;for(let M of t.values()){m=this.state.entity3DMap.get(M);let T=m.components[0],w=m.components[0].feature;T.mesh=c,T.instanceIndex=d;let{x:E,y:L,z:R}=this.convertTo3DMapPosition(w.geometry.coordinates[1],w.geometry.coordinates[0],0);T.position.set(E,L,R),o.set(((y=w.properties.rotation)==null?void 0:y[0])||0,((x=w.properties.rotation)==null?void 0:x[1])||0,((S=w.properties.rotation)==null?void 0:S[2])||0),l.set(((P=w.properties.scale)==null?void 0:P[0])||1,((g=w.properties.scale)==null?void 0:g[1])||1,((C=w.properties.scale)==null?void 0:C[2])||1),a.setFromEuler(o),n.compose(T.position,a,l),c.children.forEach(F=>{let k=F;k.setMatrixAt(d,n),k.userData.entities[d]=m.id}),d++}}),c}populateEntityGroup(t){let r,i,n,o;for(let a of t.values())o=this.state.entity3DMap.get(a),o.components[0]instanceof We&&(i=o.components[0].feature,n=o.components[1],i.geometry.type==="Polygon"?(r=wb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="MultiPolygon"?(r=Tb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="LineString"?(r=Bb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="MultiLineString"&&(r=Gb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)));return t}optimize(t){if(t.visible&&(t instanceof de||t instanceof re)){for(let n of t.children)this.optimize(n);if(t instanceof re||t.userData.dirty===!1)return;let r={};if(!t.userData.modelURL&&t.userData.dirty)try{this.populateEntityGroup(t.userData.entities3D)}catch(n){Y.warn(n)}else t.userData.modelURL&&t.userData.dirty&&(this.populateModelGroup(t.userData.entities3D,t.userData.modelURL,t),t.userData.dirty=!1);let i=0;if(t.userData.dirty){let n=0,o;for(let a of t.userData.entities3D.values()){o=this.state.entity3DMap.get(a);let l=o.components[0],c=o.components[1];if(l instanceof We){n++,n>=hP&&(n=0,i++);let h=pP(c)+i;r[h]===void 0&&(r[h]={style:c,entities:[]}),r[h].entities.push(o)}else l.mesh&&l.mesh.parent!==t&&t.add(l.mesh)}for(let a in r){let l=Pb(r[a].entities,r[a].style),c=Mb(l.geometry,l.material);for(let h of r[a].entities)h.components[0].outline=c;t.add(l),t.add(c),t.userData.dirty=!1}}}}update(){this.optimize(this.state.entityScene)}};s(Wf,"MeshCreationAndOptimizationSystem");var pc=Wf;f();var Zf=class Zf{state;dirty=!0;domTree;constructor(t,r){this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.entity2DMap.get(r.userData.entityId),t){let i=t.components[0];(!i.enabled||!i.visible||!this.state.entity2DIds.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.entity2DIds)if(t=this.state.entity2DMap.get(r),t){let i=t.components[0];i instanceof me&&i.enabled&&i.containerEl&&!this.domTree.contains(i.containerEl)&&(i.containerEl.userData={entityId:t.id},this.domTree.appendChild(i.containerEl),i.updateDimensions())}this.dirty=!1}}};s(Zf,"DOMVisibilitySystem");var hc=Zf;f();var qf=class qf{state;project;constructor(t,r){this.state=t,this.project=r}update(){let t;for(let r of this.state.entity2DIds)t=this.state.entity2DMap.get(r),t&&this.project(t.components[0].projection,t.position)}};s(qf,"TwoDProjectionSystem");var fc=qf;f();f();var fP=s(function(){let t,r;return i=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*i,t.height=500*i,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),Vb=s(({text:e,size:t,maxWidth:r,pixelRatio:i,maxLines:n=2,lineHeight:o=1.2,options:a={strokeText:!0}})=>{let l=`bold ${t*i}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,{measureCanvasContext:c}=fP(i);c.font=l;let h=[],d=e.split(" "),m=0,y=0,x=0;for(;y<d.length;){let C=d[y];if(m===n&&m>0){h[m-1]+="...";break}if(h[m]==null&&(h[m]=C,y++),d.length===1){h[m]=C;break}if(d[y]==null)break;let{width:M}=c.measureText(h[m]+" "+d[y]);M<=r*i?(h[m]+=" "+d[y],y++):m++}h.forEach(C=>{let{width:M}=c.measureText(C);x=Math.max(M,x)});let S=t*i*o,P=h.length*S;return{maxWidth:x,maxHeight:P,lines:h.length,draw:(C,M,T)=>{h.length===1?(a.strokeText&&C.strokeText(h[0],M,T),C.fillText(h[0],M,T)):(a.strokeText&&(C.strokeText(h[0],M,T-S/2),C.strokeText(h[1],M,T+S/2)),C.fillText(h[0],M,T-S/2),C.fillText(h[1],M,T+S/2))}}},"shaveText");var dP=4.5,mP=2.5,yP=2,gP=5,wa=2.5;var $f=class $f{dirty=!1;state;colliderContext;colliderCanvas;constructor(t,r){this.state=t,this.colliderCanvas=r,this.colliderContext=r.getContext("2d")}pinCache={};imagePromiseCache={};imageDimensionsCache={};textCache={};update=(t,r,i)=>{let n=(t-r)/(i-r),o=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let a,l,c,h,d,m;for(let y of this.state.entity2DIds)if(m=this.state.entity2DMap.get(y),m!=null&&m.components[0]instanceof Ue&&!m.disposed){if(d=m.components[0],l=d.appearance.marker.foregroundColor,c=d.appearance.marker.backgroundColor,h=d.markerSize,a=`${l.active}-${l.inactive}-${c.active}-${c.inactive}-${h}`,this.pinCache[a]||this.prepare(d,a,this.colliderContext),d.appearance.marker.icon&&!d.imageHash&&this.cacheImage(d),this.textCache[d.id]==null||d.dirty||this.dirty){d.dirty=!1,d.collisionDirty=!0,this.textCache[d.id]={};let{textDrawFn:x,width:S,height:P}=this.processText(d.text,d.appearance.text.size,d.appearance.text.maxWidth,d.appearance.text.numLines,d.appearance.text.lineHeight);["left","center","right"].forEach(C=>{this.textCache[d.id][C]=this.textToCanvas(x,d.appearance.text.size,C,S,P,d.appearance.text.foregroundColor,d.appearance.text.backgroundColor)}),d.dimensions={width:Math.ceil(S/o),height:Math.ceil(P/o)},d.currentStrategyIndex===-1&&(d.currentStrategyIndex=0);let g=d.strategies[d.currentStrategyIndex];if(g){g.onStrategySelected(d);let C=d.style;d.style=d.newStyle,d.newStyle=C}}d.visible&&d.enabled&&(d.zoomProportion=n,this.draw(d,a,this.colliderContext))}this.dirty=!1};processText=(t,r,i,n,o)=>{let a=this.state.pixelRatio,{draw:l,maxWidth:c,maxHeight:h}=Vb({text:t,size:r,pixelRatio:a,maxWidth:i,maxLines:n,lineHeight:o});return{textDrawFn:l,width:c+wa*a*2,height:h+wa*a*2}};textToCanvas=(t,r,i,n,o,a,l)=>{let c=this.state.pixelRatio,h,d=n,m=o;window.OffscreenCanvas!=null?h=new OffscreenCanvas(d,m):(h=document.createElement("canvas"),h.width=d,h.height=m,h.style.width=d+"px",h.style.height=m+"px");let y=h.getContext("2d");if(!y)return;y.textAlign=i,y.font=`bold ${r*c}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,y.textBaseline="middle",y.lineJoin="miter",y.miterLimit=2,y.strokeStyle="white",y.lineWidth=wa*c,y.fillStyle=a,y.strokeStyle=l;let x=i==="left"?0:i==="center"?d/2:d-wa*c/2;return t(y,x,(m+wa*c/2)/2),h};cacheImage=t=>{if(!t.appearance.marker.icon)return;let r=pv(t.appearance.marker.icon);if(t.imageHash=r,!this.imagePromiseCache[r]){let i=["png","jpg","jpeg"],n=t.appearance.marker.icon.split("?")[0],o=i.some(l=>n.endsWith(l)),a=new Image;o?a.src=t.appearance.marker.icon:a.src=`data:image/svg+xml;base64, ${btoa(t.appearance.marker.icon)}`,a.onload=()=>{this.imagePromiseCache[r]=a}}};createPinCanvas=(t,r,i,n)=>{let o,a=this.state.pixelRatio,l=t.totalMarkerSize*2*a;window.OffscreenCanvas!=null?o=new OffscreenCanvas(l,l):(o=document.createElement("canvas"),o.width=l,o.height=l,o.style.width=l/a+"px",o.style.height=l/a+"px");let c=o.getContext("2d");return c.shadowColor="rgba(0,0,0,0.3)",c.shadowOffsetY=yP*a,c.shadowBlur=gP*a,c.beginPath(),c.arc(l/2,l/2,r/2+mP*a/2,0,2*Math.PI),c.fillStyle=i,c.fill(),c.beginPath(),c.arc(l/2,l/2,r/2,0,2*Math.PI),c.shadowColor="transparent",c.fillStyle=n,c.fill(),o};prepare=(t,r,i)=>{let n=this.state.pixelRatio;i.lineWidth=4*n;let o=this.createPinCanvas(t,t.markerSize,t.appearance.marker.backgroundColor.active,t.appearance.marker.foregroundColor.active),a=this.createPinCanvas(t,t.iconVisible?t.markerSize:dP*n,t.appearance.marker.backgroundColor.inactive,t.appearance.marker.foregroundColor.inactive);this.pinCache[r]=[o,a]};draw(t,r,i){if(!t.visible)return;i.save(),i.globalAlpha=t.opacity;let n=this.state.pixelRatio,o=t.projection.x*n,a=t.projection.y*n,l=t.style.pinVisibility===1?this.pinCache[r][0]:this.pinCache[r][1];if(i.drawImage(l,o-t.totalMarkerSize*n,a-t.totalMarkerSize*n),t.appearance.marker.icon&&t.iconVisible&&t.imageHash&&t.appearance.marker.iconSize&&this.imagePromiseCache[t.imageHash]){let c=this.imagePromiseCache[t.imageHash],h=(t.appearance.marker.iconSize-t.appearance.marker.iconPadding)*n,{iconFit:d}=t.appearance.marker,m=h,y=h,x=`${t.imageHash}_${d}`;if(this.imageDimensionsCache[x])m=this.imageDimensionsCache[x].width,y=this.imageDimensionsCache[x].height;else{let S=c.width*n,P=c.height*n;if(d==="contain"){let g=Math.sqrt(S**2+P**2),C=h/g;m=S*C,y=P*C}if(d==="cover"){let g=h/S,C=h/P,M=Math.max(g,C);m=S*M,y=P*M}}i.save(),i.beginPath(),i.arc(o,a,h/2,0,2*Math.PI),i.closePath(),i.clip(),i.drawImage(c,o-m/2,a-y/2,m,y),i.restore()}t.style.textLabelVisible&&t.style.textAlign!=null&&t.style.left&&t.style.top&&i.drawImage(this.textCache[t.id][t.style.textAlign],o+t.style.left*n,a+t.style.top*n),i.restore()}};s($f,"TwoDDrawSystem");var dc=$f;f();function vP(e,t){let r=e.components[2],i=e.components[1];return r!=null&&r.hover?[i.hoverColor||t,i.hoverColor||t]:[i.color,i.topColor||i.color]}s(vP,"processColor");var Jf=class Jf{state;constructor(t){this.state=t}update(){var n,o,a;let t,r,i;for(let l of this.state.threeDEntities)if(i=this.state.entity3DMap.get(l),i instanceof Pt&&(i.type==="geometry"||i.type==="custom-geometry")&&((n=i.components[1])!=null&&n.dirty||(o=i.components[2])!=null&&o.dirty)){t=i.components[0],r=i.components[1];let c=vP(i,this.state.hoverColor);t.setColor(c[0],c[1]),r.visible!==t.visible&&(t.visible=r.visible),r.altitude!==t.altitude&&(t.altitude=r.altitude),r.opacity!==t.opacity&&(t.opacity=r.opacity),r.dirty=!1,i.components[2]&&(i.components[2].dirty=!1)}else(i==null?void 0:i.type)==="model"&&((a=i.components[1])!=null&&a.dirty)&&(t=i.components[0],r=i.components[1],r.opacity!==t.opacity&&(t.opacity=r.opacity),r.dirty=!1)}};s(Jf,"DrawSystem");var mc=Jf;f();var Kf=class Kf extends st{state;constructor(t){super(),this.state=t,this.playAnimations=this._playAnimations}animating=new Map;isAnimating=!1;startTime=-1;duration=500;update=()=>{this.animating.clear();let t,r;for(let i of this.state.entity2DIds)t=this.state.entity2DMap.get(i),t&&(r=t.components[0],r instanceof Ue&&r.visibilityNeedsUpdate&&(r.visible?this.animating.set(r,r.opacity):(r.opacity=0,r.visibilityNeedsUpdate=!1)));this.startTime=performance.now(),this.publish("animate:2d")};playAnimations;_playAnimations(){let t=performance.now();for(let[r,i]of this.animating.entries()){let n=(t-this.startTime)/this.duration;r.opacity=Zt(n,0,1,i,1),t-this.startTime>=this.duration&&(r.visible=!0,r.visibilityNeedsUpdate=!1,this.animating.delete(r))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};s(Kf,"TwoDVisibilitySystem");var yc=Kf;f();var Qf=class Qf extends st{state;renderer;mode;scene;cameraObject;viewCamera;systems;constructor(t,r,i,n,o,a,l){super(),this.renderer=t,this.state=r,this.mode=i,this.scene=n,this.cameraObject=o,this.viewCamera=a,this.systems=l,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D)}twoDdirty=!0;threeDdirty=!0;frameId=null;twoDFrameId=null;animationFrameId=null;nextFrame=null;update=(t=!1)=>{var r;if(((r=this.renderer)==null?void 0:r.renderer)!=null)if(t)this.commitRenderState(),this.paint();else{if(this.frameId)return;this.frameId=requestAnimationFrame(()=>{var i;((i=this.renderer)==null?void 0:i.renderer)!=null&&this.mode==="standalone"&&(this.commitRenderState(),this.paint())})}};paint(){var t;(t=this.renderer)!=null&&t.renderer&&(this.mode==="standalone"?(this.renderer.clear(),this.renderer.render(this.scene,this.cameraObject)):this.renderer.render(this.scene,this.viewCamera))}animate2D=()=>{this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})};drawEntities2D=()=>{this.twoDFrameId||(this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax())}))};updateEntities2D=()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})};commitRenderState=()=>{this.frameId=null,(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.scene.updateMatrixWorld(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.entity2DIds.clear(),lf(this.state.entityScene,this.state.entity2DIds),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.threeDEntities=[],sf(this.state.entityScene,this.state.threeDEntities),this.threeDdirty=!1,this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0),this.systems.meshOptimizationSystem.update(),this.systems.customGeometrySystem.update(),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.panBoundsSystem.update(),this.systems.stackSystem.update(),this.systems.drawSystem.update(),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.nextFrame=requestAnimationFrame(()=>{this.systems.collisionSystem.update()}),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1};destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.entity2DIds.clear(),this.state.threeDEntities=[],this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};s(Qf,"RenderSystem");var gc=Qf;f();function Yn(e,t,r=!1){let i=null,n=0;return function(...o){n++,n===1&&r===!0&&e.apply(this,o);let a=s(()=>{(!r||n>1)&&e.apply(this,o),i=null,n=0},"later");clearTimeout(i),i=setTimeout(a,t)}}s(Yn,"debounce");f();var td=`attribute float pathDistance;
157
+ `;var $9=.15,J9=.4,K9=-.05,Q9=1,tx=.1,ef=class ef extends Ji{needsColorUpdate=!0;propertiesTex;constructor(t,r){super(t);let i=new jl(r);this.propertiesTex=i,this.onBeforeCompile=n=>{n.vertexShader=Kv,n.fragmentShader=Qv,n.uniforms.uPercentToDarkenGradient={value:J9},n.uniforms.uTopOfGradient={value:$9},n.uniforms.uMinSideAlpha={value:K9},n.uniforms.uMaxSideAlpha={value:Q9},n.uniforms.uFullGradientStart={value:tx},n.uniforms.propertiesTex={value:i}}}setColor(t,r,i){this.propertiesTex.setColor(t,r,i)}dispose(){super.dispose(),this.propertiesTex.dispose()}};s(ef,"BatchedStandardMaterial");var zl=ef;var ex=80;function tb(e,t){var l,c;let r=0;for(let h of e)r+=((c=(l=h.components[0])==null?void 0:l.geometry)==null?void 0:c.attributes.position.count)||0;let i=new Mt(t.color),n=new zl({color:i,side:Kn,opacity:t.opacity||1,transparent:t.opacity!==void 0?t.opacity<1:!1},e.length),o=new cs(e.length,r,0,n);o.userData={entities:{}};let a;for(let h of e)a=h.components[0],a.mesh=o,a.material=n,a.instanceIndex=o.addGeometry(a.geometry),o.userData.entities[a.instanceIndex]=h.id,n.setColor(a.instanceIndex,i,t.topColor?new Mt(t.topColor):i);return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}s(tb,"batchGeometries");function eb(e,t){t.polygonOffset=!0,t.polygonOffsetFactor=1,t.polygonOffsetUnits=1;let r=new nm(e,ex),i=new rm({linewidth:2,color:t.color,userData:{initialColor:t.color.getHexString()}});return new ro(r,i)}s(eb,"createOutlines");f();var rx="gray",ix=.1;function rb(e,t,r){let{color:i=rx,opacity:n=1,altitude:o=0,height:a=ix}=r||{};Array.isArray(n)&&(n=1);let l={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o}},c=new ke,h=e.geometry.coordinates[0].map(x=>{let S=t(x[1],x[0]);return l.min.x=Math.min(l.min.x,S.x),l.min.y=Math.min(l.min.y,S.y),l.max.x=Math.max(l.max.x,S.x),l.max.y=Math.max(l.max.y,S.y),S});c.moveTo(h[0].x,h[0].y),h.slice(1).forEach(x=>c.lineTo(x.x,x.y)),c.lineTo(h[0].x,h[0].y);let d=e.geometry.coordinates.slice(1);c.holes=d.map(x=>{let S=x.map(g=>t(g[1],g[0])),P=new Sr;return P.moveTo(S[0].x,S[0].y),S.slice(1).forEach(g=>P.lineTo(g.x,g.y)),P.lineTo(S[0].x,S[0].y),P});let y={bevelEnabled:!1,depth:a},m=new Re(c,y);return m.translate(0,0,o||0),m.userData={style:{color:i,opacity:n}},m}s(rb,"renderPolygonGeometry");f();var nx="gray",ox=.1;function ib(e,t,r){let{color:i=nx,opacity:n=1,altitude:o=0,height:a=ox}=r||{};Array.isArray(n)&&(n=1);let l={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o}},c={bevelEnabled:!1,depth:a},h=[];e.geometry.coordinates.forEach(y=>{let m=new ke,x=y[0].map(g=>{let C=t(g[1],g[0]);return l.min.x=Math.min(l.min.x,C.x),l.min.y=Math.min(l.min.y,C.y),l.max.x=Math.max(l.max.x,C.x),l.max.y=Math.max(l.max.y,C.y),C});m.moveTo(x[0].x,x[0].y),x.slice(1).forEach(g=>m.lineTo(g.x,g.y)),m.lineTo(x[0].x,x[0].y);let S=y.slice(1);m.holes=S.map(g=>{let C=g.map(T=>t(T[1],T[0])),M=new Sr;return M.moveTo(C[0].x,C[0].y),C.slice(1).forEach(T=>M.lineTo(T.x,T.y)),M.lineTo(C[0].x,C[0].y),M});let P=new Re(m,c);h.push(P)});let d=Mr(h);return d.translate(0,0,o||0),d.userData={style:{color:i,opacity:n}},d}s(ib,"renderMultiPolygonGeometry");f();f();var of=Cr(fb());function db(e){this.name="JSClipperError",this.message=e,this.stack=new Error().stack}s(db,"JSClipperError");db.prototype=Error.prototype;of.default.Error=function(e){throw new db(e)};var ie=of.default;var KS="gray",af=new ie.ClipperOffset,Zt=100;function mb(e,t,r){let{color:i=KS,opacity:n=1,width:o=1,join:a="round",cap:l="round",height:c=.01,altitude:h=0}=r||{};Array.isArray(n)&&(n=0);let d=[];for(let P=0;P<e.geometry.coordinates.length-1;P++){let g=t(e.geometry.coordinates[P][1],e.geometry.coordinates[P][0]),C=t(e.geometry.coordinates[P+1][1],e.geometry.coordinates[P+1][0]);d.push([g,C])}af.AddPaths(d.map(P=>P.map(g=>({X:g.x*Zt,Y:g.y*Zt}))),a==="round"?ie.JoinType.jsRound:a==="miter"?ie.JoinType.jsMiter:ie.JoinType.jsSquare,l==="round"?ie.EndType.etOpenRound:l==="butt"?ie.EndType.etOpenButt:ie.EndType.etOpenSquare);let y=new ie.PolyTree;af.Execute(y,o/2*Zt);let m=[],x={bevelEnabled:!1,depth:c};for(let P of y.m_AllPolys){let g=new ke;if(P.IsHole())continue;let C=P.m_polygon;g.moveTo(C[0].X/Zt,C[0].Y/Zt),C.slice(1).forEach(M=>g.lineTo(M.X/Zt,M.Y/Zt)),g.lineTo(C[0].X/Zt,C[0].Y/Zt),g.holes=P.m_Childs.map(M=>{let T=new Sr,w=M.m_polygon;return T.moveTo(w[0].X/Zt,w[0].Y/Zt),w.slice(1).forEach(E=>T.lineTo(E.X/Zt,E.Y/Zt)),T.lineTo(w[0].X/Zt,w[0].Y/Zt),T}),m.push(new Re(g,x))}let S=Mr(m);return S.translate(0,0,h||0),S.userData={style:{color:i,opacity:n}},af.Clear(),S}s(mb,"renderLineStringGeometry");f();var qt=100,QS=.22,tP=.01;function yb(e,t,r={}){let{width:i=QS,height:n=tP,color:o="gray",opacity:a=1,altitude:l=0}=r,c={min:{x:1/0,y:1/0,z:l},max:{x:-1/0,y:-1/0,z:l+n}},h={bevelEnabled:!1,depth:n},d=new ie.ClipperOffset,y=e.geometry.coordinates.map(P=>P.map(g=>t(g[1],g[0])));d.AddPaths(y.map(P=>P.map(g=>({X:g.x*qt,Y:g.y*qt}))),ie.JoinType.jsMiter,ie.EndType.etOpenRound);let m=new ie.PolyTree;d.Execute(m,i/2*qt);let x=[];for(let P of m.m_AllPolys){let g=new ke;if(P.IsHole())continue;c.min.x=Math.min(c.min.x,P.m_polygon[0].X),c.min.y=Math.min(c.min.y,P.m_polygon[0].Y),c.max.x=Math.max(c.max.x,P.m_polygon[0].X),c.max.y=Math.max(c.max.y,P.m_polygon[0].Y);let C=P.m_polygon;g.moveTo(C[0].X/qt,C[0].Y/qt),C.slice(1).forEach(M=>g.lineTo(M.X/qt,M.Y/qt)),g.lineTo(C[0].X/qt,C[0].Y/qt),g.holes=P.m_Childs.map(M=>{let T=new Sr,w=M.m_polygon;return T.moveTo(w[0].X/qt,w[0].Y/qt),w.slice(1).forEach(E=>T.lineTo(E.X/qt,E.Y/qt)),T.lineTo(w[0].X/qt,w[0].Y/qt),T}),x.push(new Re(g,h))}let S=Mr(x);return S.translate(0,0,l||0),S.userData={style:{color:o,opacity:a}},d.Clear(),S}s(yb,"renderMultiLineStringGeometry");f();var ha,fa,sf=class sf{constructor(t){v(this,"mesh");v(this,"type","model");v(this,"outline");v(this,"geometry");v(this,"material");v(this,"feature");v(this,"instanceIndex",-1);v(this,"visible",!0);v(this,"color",new Mt);v(this,"position",new Y);I(this,ha,0);I(this,fa,1);this.feature=t}setOpacity(){}setColor(){}get altitude(){return u(this,ha)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,ha,t))}get opacity(){return u(this,fa)}set opacity(t){var r,i;if(this.mesh){for(let n of this.mesh.children)if(n instanceof ls){((r=n.userData)==null?void 0:r.originalOpacity)===void 0&&(n.userData.originalOpacity=n.material.opacity);let o=Ut(t,0,(i=n.userData)==null?void 0:i.originalOpacity,0,1);n.material.opacity=o,n.material.transparent=o<1,n.material.needsUpdate=!0}}_(this,fa,t)}};ha=new WeakMap,fa=new WeakMap,s(sf,"ModelComponent");var $l=sf;function eP(e){let{color:t,opacity:r,topColor:i}=e;return`${t}${r}${i||""}`}s(eP,"generateIndex");var rP=1e4,lf=class lf{state;convertTo3DMapPosition;loader;constructor(t,r){this.state=t,this.convertTo3DMapPosition=r}async getGLTFLoader(){if(this.loader)return;let{GLTFLoader:t}=await import("./GLTFLoader-5DKJA4CT.js");this.loader=new t}createEntityFromFeature(t,r,i){let n=new ze(r),o=new St(n,new jr(i));return o.id=t,o}createModelFromFeature(t,r,i){let n=new $l(r),o=new St(n,new jr(i));return o.id=t,o}populateEntityMesh(t,r){let i=t.components[0];i.geometry=r}async populateModelGroup(t,r,i){let n=new ti,o=new qi,a=new Zd,l=new Y,c=new Xe;return this.loader||await this.getGLTFLoader(),this.loader.load(r,h=>{var m,x,S,P,g,C;h.scene.traverse(M=>{let T=M;if("isMesh"in T&&T.isMesh===!0){let w=new ls(T.geometry,T.material,t.size);w.userData={entities:{}},c.add(w),i.add(c)}});let d=0,y;for(let M of t.values()){y=this.state.entity3DMap.get(M);let T=y.components[0],w=y.components[0].feature;T.mesh=c,T.instanceIndex=d;let{x:E,y:L,z:R}=this.convertTo3DMapPosition(w.geometry.coordinates[1],w.geometry.coordinates[0],0);T.position.set(E,L,R),o.set(((m=w.properties.rotation)==null?void 0:m[0])||0,((x=w.properties.rotation)==null?void 0:x[1])||0,((S=w.properties.rotation)==null?void 0:S[2])||0),l.set(((P=w.properties.scale)==null?void 0:P[0])||1,((g=w.properties.scale)==null?void 0:g[1])||1,((C=w.properties.scale)==null?void 0:C[2])||1),a.setFromEuler(o),n.compose(T.position,a,l),c.children.forEach(F=>{let k=F;k.setMatrixAt(d,n),k.userData.entities[d]=y.id}),d++}}),c}populateEntityGroup(t){let r,i,n,o;for(let a of t.values())o=this.state.entity3DMap.get(a),o.components[0]instanceof ze&&(i=o.components[0].feature,n=o.components[1],i.geometry.type==="Polygon"?(r=rb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="MultiPolygon"?(r=ib(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="LineString"?(r=mb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)):i.geometry.type==="MultiLineString"&&(r=yb(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,r)));return t}optimize(t){if(t.visible&&(t instanceof fe||t instanceof re)){for(let n of t.children)this.optimize(n);if(t instanceof re||t.userData.dirty===!1)return;let r={};if(!t.userData.modelURL&&t.userData.dirty)try{this.populateEntityGroup(t.userData.entities3D)}catch(n){X.warn(n)}else t.userData.modelURL&&t.userData.dirty&&(this.populateModelGroup(t.userData.entities3D,t.userData.modelURL,t),t.userData.dirty=!1);let i=0;if(t.userData.dirty){let n=0,o;for(let a of t.userData.entities3D.values()){o=this.state.entity3DMap.get(a);let l=o.components[0],c=o.components[1];if(l instanceof ze){n++,n>=rP&&(n=0,i++);let h=eP(c)+i;r[h]===void 0&&(r[h]={style:c,entities:[]}),r[h].entities.push(o)}else l.mesh&&l.mesh.parent!==t&&t.add(l.mesh)}for(let a in r){let l=tb(r[a].entities,r[a].style),c=eb(l.geometry,l.material);for(let h of r[a].entities)h.components[0].outline=c;t.add(l),t.add(c),t.userData.dirty=!1}}}}update(){this.optimize(this.state.entityScene)}};s(lf,"MeshCreationAndOptimizationSystem");var Jl=lf;f();var cf=class cf{state;dirty=!0;domTree;constructor(t,r){this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.entity2DMap.get(r.userData.entityId),t){let i=t.components[0];(!i.enabled||!i.visible||!this.state.entity2DIds.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.entity2DIds)if(t=this.state.entity2DMap.get(r),t){let i=t.components[0];i instanceof de&&i.enabled&&i.containerEl&&!this.domTree.contains(i.containerEl)&&(i.containerEl.userData={entityId:t.id},this.domTree.appendChild(i.containerEl),i.updateDimensions())}this.dirty=!1}}};s(cf,"DOMVisibilitySystem");var Kl=cf;f();var uf=class uf{state;project;constructor(t,r){this.state=t,this.project=r}update(){let t;for(let r of this.state.entity2DIds)t=this.state.entity2DMap.get(r),t&&this.project(t.components[0].projection,t.position)}};s(uf,"TwoDProjectionSystem");var Ql=uf;f();f();var iP=s(function(){let t,r;return i=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*i,t.height=500*i,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),gb=s(({text:e,size:t,maxWidth:r,pixelRatio:i,maxLines:n=2,lineHeight:o=1.2,options:a={strokeText:!0}})=>{let l=`bold ${t*i}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,{measureCanvasContext:c}=iP(i);c.font=l;let h=[],d=e.split(" "),y=0,m=0,x=0;for(;m<d.length;){let C=d[m];if(y===n&&y>0){h[y-1]+="...";break}if(h[y]==null&&(h[y]=C,m++),d.length===1){h[y]=C;break}if(d[m]==null)break;let{width:M}=c.measureText(h[y]+" "+d[m]);M<=r*i?(h[y]+=" "+d[m],m++):y++}h.forEach(C=>{let{width:M}=c.measureText(C);x=Math.max(M,x)});let S=t*i*o,P=h.length*S;return{maxWidth:x,maxHeight:P,lines:h.length,draw:(C,M,T)=>{h.length===1?(a.strokeText&&C.strokeText(h[0],M,T),C.fillText(h[0],M,T)):(a.strokeText&&(C.strokeText(h[0],M,T-S/2),C.strokeText(h[1],M,T+S/2)),C.fillText(h[0],M,T-S/2),C.fillText(h[1],M,T+S/2))}}},"shaveText");var nP=4.5,oP=2.5,aP=2,sP=5,da=2.5;var pf=class pf{dirty=!1;state;colliderContext;colliderCanvas;constructor(t,r){this.state=t,this.colliderCanvas=r,this.colliderContext=r.getContext("2d")}pinCache={};imagePromiseCache={};imageDimensionsCache={};textCache={};update=(t,r,i)=>{let n=(t-r)/(i-r),o=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let a,l,c,h,d,y;for(let m of this.state.entity2DIds)if(y=this.state.entity2DMap.get(m),y!=null&&y.components[0]instanceof je&&!y.disposed){if(d=y.components[0],l=d.appearance.marker.foregroundColor,c=d.appearance.marker.backgroundColor,h=d.markerSize,a=`${l.active}-${l.inactive}-${c.active}-${c.inactive}-${h}`,this.pinCache[a]||this.prepare(d,a,this.colliderContext),d.appearance.marker.icon&&!d.imageHash&&this.cacheImage(d),this.textCache[d.id]==null||d.dirty||this.dirty){d.dirty=!1,d.collisionDirty=!0,this.textCache[d.id]={};let{textDrawFn:x,width:S,height:P}=this.processText(d.text,d.appearance.text.size,d.appearance.text.maxWidth,d.appearance.text.numLines,d.appearance.text.lineHeight);["left","center","right"].forEach(C=>{this.textCache[d.id][C]=this.textToCanvas(x,d.appearance.text.size,C,S,P,d.appearance.text.foregroundColor,d.appearance.text.backgroundColor)}),d.dimensions={width:Math.ceil(S/o),height:Math.ceil(P/o)},d.currentStrategyIndex===-1&&(d.currentStrategyIndex=0);let g=d.strategies[d.currentStrategyIndex];if(g){g.onStrategySelected(d);let C=d.style;d.style=d.newStyle,d.newStyle=C}}d.visible&&d.enabled&&(d.zoomProportion=n,this.draw(d,a,this.colliderContext))}this.dirty=!1};processText=(t,r,i,n,o)=>{let a=this.state.pixelRatio,{draw:l,maxWidth:c,maxHeight:h}=gb({text:t,size:r,pixelRatio:a,maxWidth:i,maxLines:n,lineHeight:o});return{textDrawFn:l,width:c+da*a*2,height:h+da*a*2}};textToCanvas=(t,r,i,n,o,a,l)=>{let c=this.state.pixelRatio,h,d=n,y=o;window.OffscreenCanvas!=null?h=new OffscreenCanvas(d,y):(h=document.createElement("canvas"),h.width=d,h.height=y,h.style.width=d+"px",h.style.height=y+"px");let m=h.getContext("2d");if(!m)return;m.textAlign=i,m.font=`bold ${r*c}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,m.textBaseline="middle",m.lineJoin="miter",m.miterLimit=2,m.strokeStyle="white",m.lineWidth=da*c,m.fillStyle=a,m.strokeStyle=l;let x=i==="left"?0:i==="center"?d/2:d-da*c/2;return t(m,x,(y+da*c/2)/2),h};cacheImage=t=>{if(!t.appearance.marker.icon)return;let r=X2(t.appearance.marker.icon);if(t.imageHash=r,!this.imagePromiseCache[r]){let i=["png","jpg","jpeg"],n=t.appearance.marker.icon.split("?")[0],o=i.some(l=>n.endsWith(l)),a=new Image;o?a.src=t.appearance.marker.icon:a.src=`data:image/svg+xml;base64, ${btoa(t.appearance.marker.icon)}`,a.onload=()=>{this.imagePromiseCache[r]=a}}};createPinCanvas=(t,r,i,n)=>{let o,a=this.state.pixelRatio,l=t.totalMarkerSize*2*a;window.OffscreenCanvas!=null?o=new OffscreenCanvas(l,l):(o=document.createElement("canvas"),o.width=l,o.height=l,o.style.width=l/a+"px",o.style.height=l/a+"px");let c=o.getContext("2d");return c.shadowColor="rgba(0,0,0,0.3)",c.shadowOffsetY=aP*a,c.shadowBlur=sP*a,c.beginPath(),c.arc(l/2,l/2,r/2+oP*a/2,0,2*Math.PI),c.fillStyle=i,c.fill(),c.beginPath(),c.arc(l/2,l/2,r/2,0,2*Math.PI),c.shadowColor="transparent",c.fillStyle=n,c.fill(),o};prepare=(t,r,i)=>{let n=this.state.pixelRatio;i.lineWidth=4*n;let o=this.createPinCanvas(t,t.markerSize,t.appearance.marker.backgroundColor.active,t.appearance.marker.foregroundColor.active),a=this.createPinCanvas(t,t.iconVisible?t.markerSize:nP*n,t.appearance.marker.backgroundColor.inactive,t.appearance.marker.foregroundColor.inactive);this.pinCache[r]=[o,a]};draw(t,r,i){if(!t.visible)return;i.save(),i.globalAlpha=t.opacity;let n=this.state.pixelRatio,o=t.projection.x*n,a=t.projection.y*n,l=t.style.pinVisibility===1?this.pinCache[r][0]:this.pinCache[r][1];if(i.drawImage(l,o-t.totalMarkerSize*n,a-t.totalMarkerSize*n),t.appearance.marker.icon&&t.iconVisible&&t.imageHash&&t.appearance.marker.iconSize&&this.imagePromiseCache[t.imageHash]){let c=this.imagePromiseCache[t.imageHash],h=(t.appearance.marker.iconSize-t.appearance.marker.iconPadding)*n,{iconFit:d}=t.appearance.marker,y=h,m=h,x=`${t.imageHash}_${d}`;if(this.imageDimensionsCache[x])y=this.imageDimensionsCache[x].width,m=this.imageDimensionsCache[x].height;else{let S=c.width*n,P=c.height*n;if(d==="contain"){let g=Math.sqrt(S**2+P**2),C=h/g;y=S*C,m=P*C}if(d==="cover"){let g=h/S,C=h/P,M=Math.max(g,C);y=S*M,m=P*M}}i.save(),i.beginPath(),i.arc(o,a,h/2,0,2*Math.PI),i.closePath(),i.clip(),i.drawImage(c,o-y/2,a-m/2,y,m),i.restore()}t.style.textLabelVisible&&t.style.textAlign!=null&&t.style.left&&t.style.top&&i.drawImage(this.textCache[t.id][t.style.textAlign],o+t.style.left*n,a+t.style.top*n),i.restore()}};s(pf,"TwoDDrawSystem");var tc=pf;f();function lP(e,t){let r=e.components[2],i=e.components[1];return r!=null&&r.hover?[i.hoverColor||t,i.hoverColor||t]:[i.color,i.topColor||i.color]}s(lP,"processColor");var hf=class hf{state;constructor(t){this.state=t}update(){var n,o,a;let t,r,i;for(let l of this.state.threeDEntities)if(i=this.state.entity3DMap.get(l),i instanceof St&&(i.type==="geometry"||i.type==="custom-geometry")&&((n=i.components[1])!=null&&n.dirty||(o=i.components[2])!=null&&o.dirty)){t=i.components[0],r=i.components[1];let c=lP(i,this.state.hoverColor);t.setColor(c[0],c[1]),r.visible!==t.visible&&(t.visible=r.visible),r.altitude!==t.altitude&&(t.altitude=r.altitude),r.opacity!==t.opacity&&(t.opacity=r.opacity),r.dirty=!1,i.components[2]&&(i.components[2].dirty=!1)}else(i==null?void 0:i.type)==="model"&&((a=i.components[1])!=null&&a.dirty)&&(t=i.components[0],r=i.components[1],r.opacity!==t.opacity&&(t.opacity=r.opacity),r.dirty=!1)}};s(hf,"DrawSystem");var ec=hf;f();var ff=class ff extends st{state;constructor(t){super(),this.state=t,this.playAnimations=this._playAnimations}animating=new Map;isAnimating=!1;startTime=-1;duration=500;update=()=>{this.animating.clear();let t,r;for(let i of this.state.entity2DIds)t=this.state.entity2DMap.get(i),t&&(r=t.components[0],r instanceof je&&r.visibilityNeedsUpdate&&(r.visible?this.animating.set(r,r.opacity):(r.opacity=0,r.visibilityNeedsUpdate=!1)));this.startTime=performance.now(),this.publish("animate:2d")};playAnimations;_playAnimations(){let t=performance.now();for(let[r,i]of this.animating.entries()){let n=(t-this.startTime)/this.duration;r.opacity=Ut(n,0,1,i,1),t-this.startTime>=this.duration&&(r.visible=!0,r.visibilityNeedsUpdate=!1,this.animating.delete(r))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};s(ff,"TwoDVisibilitySystem");var rc=ff;f();var df=class df extends st{state;renderer;mode;scene;cameraObject;viewCamera;systems;constructor(t,r,i,n,o,a,l){super(),this.renderer=t,this.state=r,this.mode=i,this.scene=n,this.cameraObject=o,this.viewCamera=a,this.systems=l,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D)}twoDdirty=!0;threeDdirty=!0;frameId=null;twoDFrameId=null;animationFrameId=null;nextFrame=null;update=(t=!1)=>{var r;if(((r=this.renderer)==null?void 0:r.renderer)!=null)if(t)this.commitRenderState(),this.paint();else{if(this.frameId)return;this.frameId=requestAnimationFrame(()=>{var i;((i=this.renderer)==null?void 0:i.renderer)!=null&&this.mode==="standalone"&&(this.commitRenderState(),this.paint())})}};paint(){var t;(t=this.renderer)!=null&&t.renderer&&(this.mode==="standalone"?(this.renderer.clear(),this.renderer.render(this.scene,this.cameraObject)):this.renderer.render(this.scene,this.viewCamera))}animate2D=()=>{this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})};drawEntities2D=()=>{this.twoDFrameId||(this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax())}))};updateEntities2D=()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})};commitRenderState=()=>{this.frameId=null,(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.scene.updateMatrixWorld(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.entity2DIds.clear(),Sh(this.state.entityScene,this.state.entity2DIds),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.threeDEntities=[],xh(this.state.entityScene,this.state.threeDEntities),this.threeDdirty=!1,this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0),this.systems.meshOptimizationSystem.update(),this.systems.customGeometrySystem.update(),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.panBoundsSystem.update(),this.systems.stackSystem.update(),this.systems.drawSystem.update(),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.nextFrame=requestAnimationFrame(()=>{this.systems.collisionSystem.update()}),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1};destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.entity2DIds.clear(),this.state.threeDEntities=[],this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};s(df,"RenderSystem");var ic=df;f();function Rn(e,t,r=!1){let i=null,n=0;return function(...o){n++,n===1&&r===!0&&e.apply(this,o);let a=s(()=>{(!r||n>1)&&e.apply(this,o),i=null,n=0},"later");clearTimeout(i),i=setTimeout(a,t)}}s(Rn,"debounce");f();var mf=`attribute float pathDistance;
596
158
  attribute vec3 pathNormal;
597
159
  attribute vec3 pathTangent;
598
160
 
@@ -676,7 +238,7 @@ void main() {
676
238
 
677
239
  radius = mix(nearRadius, farRadius, zoomLevel);
678
240
  }
679
- `;var ed=`#define ARROW_FADING_POINT 0.15
241
+ `;var yf=`#define ARROW_FADING_POINT 0.15
680
242
 
681
243
  uniform float complete;
682
244
  uniform float nearRadius;
@@ -897,7 +459,7 @@ void main(void) {
897
459
  gl_FragColor = vec4(color, opacity * opacityMultiplier);
898
460
  }
899
461
  #include <colorspace_fragment>
900
- }`;var Hb="data:image/png;base64,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";var SP=new Ji,$r,Ta,rd=class rd{constructor(t,r){v(this,"points");v(this,"type","path");v(this,"mesh",new je);v(this,"material");v(this,"geometry");v(this,"outline");v(this,"feature");v(this,"options");v(this,"altitudeAdjustment",1);I(this,$r,1);v(this,"position",new X);I(this,Ta,0);var Yi,ji,zi;this.points=t;let i=(Yi=r==null?void 0:r.nearRadius)!=null?Yi:.18,n=!0,o=(ji=r==null?void 0:r.farRadius)!=null?ji:.2,a=375,l=1e4,c=(zi=r==null?void 0:r.color)!=null?zi:"#ff834c",h="blue",d=!1,m=!0,y=!0,x=!1;this.options={nearRadius:i,farRadius:o,color:c};let P=i/2+.15,g=0;this.points[0].z+=P;for(let J=1;J<this.points.length;++J){this.points[J].z+=P;let xt=this.points[J].x-this.points[J-1].x,vt=this.points[J].y-this.points[J-1].y,pe=this.points[J].z-this.points[J-1].z;g+=Math.sqrt(xt*xt+vt*vt+pe*pe)}let C=P-.1;this.points.push(this.points[this.points.length-1].clone().setZ(C)),this.points.unshift(this.points[0].clone().setZ(C));let M=new zd;x&&(M=SP.load(Hb),M.colorSpace=Wi);let T=new Mt(c),w=new Mt(h),E={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new z(1,1)},cameraParameters:{type:"v2",value:new z(1e3,0)},complete:{type:"f",value:n?0:1},color:{type:"c",value:T},pathLength:{type:"f",value:g},nearRadius:{type:"f",value:i},farRadius:{type:"f",value:o},nearZoom:{type:"f",value:a},farZoom:{type:"f",value:l},pulseColor:{type:"c",value:w},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:!1},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:M},displayArrowsOnPath:{type:"b",value:d},flattenFactor:{type:"f",value:m?.05:1},showPulse:{type:"b",value:y},opacityMultiplier:{type:"f",value:1}},L=new rm(this.points);L.curveType="catmullrom",L.tension=0;let R=30,F=8,k=R*this.points.length,G=new nm(L,k,i,F,!1),H=new Float32Array(G.attributes.position.count);for(let J=this.points.length;J<H.length;J++)H[J]=J;G.setAttribute("vertexIndex",new to(H,1));let Q=new Float32Array(G.attributes.position.count),lt=new to(Q,1);for(let J=0;J<=k;J++)for(let xt=0;xt<=F;++xt)lt.setX(J*(F+1)+xt,J/k);G.setAttribute("pathDistance",lt);let ht=new Float32Array(G.attributes.normal.count*3),gt=new to(ht,3);for(let J=0;J<k;J++){let xt=G.tangents[J];for(let vt=0;vt<=F;++vt)gt.setXYZ(J*(F+1)+vt,xt.x,xt.y,xt.z)}G.setAttribute("pathTangent",gt);let At=new Float32Array(G.attributes.normal.count*3),ve=new to(At,3);for(let J=0;J<k;J++){let xt=G.tangents[J];var Rt,ut,Ct;Rt=-xt.x*xt.z,ut=-xt.y*xt.z,Ct=1-xt.z*xt.z;let vt=Math.sqrt(Rt*Rt+ut*ut+Ct*Ct);vt===0&&(vt=1);let pe=Rt/vt,Ui=ut/vt,qn=Ct/vt;for(let Kr=0;Kr<=F;++Kr)ve.setXYZ(J*(F+1)+Kr,pe,Ui,qn)}G.setAttribute("pathNormal",ve),this.geometry=G;let Je=new eo({uniforms:E,vertexShader:td,fragmentShader:ed});Je.transparent=!0,Je.alphaTest=.5,E.resolution.value.x=1,E.resolution.value.y=1,E.vertexes.value=H.length,E.arrowTexture.value.wrapS=Qn,E.arrowTexture.value.wrapT=Qn,E.arrowTexture.value.anisotropy=16,E.complete.value=u(this,$r);let be=new Ft(G,Je),ae=be.clone(),jt={...E,opacityMultiplier:{type:"f",value:.25}};jt.complete.value=1,ae.material=new eo({uniforms:jt,vertexShader:td,fragmentShader:ed}),ae.material.transparent=!0,ae.material.alphaTest=.5,ae.material.depthWrite=!1,ae.material.depthTest=!1,ae.renderOrder=1,jt.resolution.value.x=1,jt.resolution.value.y=1,jt.vertexes.value=H.length,jt.arrowTexture.value.wrapS=Qn,jt.arrowTexture.value.wrapT=Qn,jt.arrowTexture.value.anisotropy=16,jt.complete.value=u(this,$r),this.mesh.add(be),this.mesh.add(ae),G.computeBoundingBox(),G.boundingBox.getCenter(this.position),this.material=Je}setColor(){}setOpacity(){}set completeFraction(t){_(this,$r,t),this.mesh.children.forEach(r=>{r.material.uniforms.complete.value=u(this,$r),r.material.needsUpdate=!0})}get completeFraction(){return u(this,$r)}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return u(this,Ta)}set altitude(t){this.mesh.position.z=t,_(this,Ta,t)}set complete(t){this.material.uniforms.complete.value=t,this.material.needsUpdate=!0}};$r=new WeakMap,Ta=new WeakMap,s(rd,"PathComponent");var vc=rd;f();var id=class id{rendererState;constructor(t){this.rendererState=t}update(){let t;for(let r of this.rendererState.threeDEntities)if(t=this.rendererState.entity3DMap.get(r),t instanceof re&&t.components[0]){let i=t.components[0];if(i.dirty){for(let n of t.children)(n instanceof de||n instanceof re)&&(n.userData.entityId!==t.components[0].activeId?n.setVisible(!1):n.setVisible(!0));i.dirty=!1}}}};s(id,"StackSystem");var bc=id;f();f();var _a=Cr(On());f();f();f();var Xb=s((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),Yb=s((e,t)=>new z(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),nd=s((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),Ia=s((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),od=s((e,t)=>new z((e.x+t.x)/2,(e.y+t.y)/2),"average"),ad=s(e=>{let t=0,{wheelDelta:r,detail:i}=e;return r!==void 0?t=r:i!==void 0&&(t=-i),t},"getScrollDelta");var sd=class sd{input1;input2;lastAngle;lastDistance;totalDistance;first;second;constructor(t,r){this.input1=t,this.input2=r,this.lastAngle=nd(t,r),this.lastDistance=Ia(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let i=Ia(t,r);this.input1=t,this.input2=r;let n=nd(t,r);this.lastAngle=n,this.lastDistance=i,this.totalDistance+=(Ia(this.first,t)+Ia(this.second,r))/2,this.first=od(this.first,t),this.second=od(this.second,r)}};s(sd,"InputSet");var Cc=sd;f();var ld=class ld{touch;camera;cameraPlane;viewCoordinate;snapHolderMatrix;snapCamera;cameraPosition;raycaster;worldCoordinate;snapshotted=!1;constructor(t,r,i){this.touch=t,this.camera=r,this.cameraPlane=i,this.viewCoordinate={x:t.x,y:t.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let t=new z(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Pr,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var i,n;let t=new z(this.viewCoordinate.x,this.viewCoordinate.y);(i=this.raycaster)==null||i.setFromCamera(t,this.snapCamera);let r=(n=this.raycaster)==null?void 0:n.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};s(ld,"TouchAnchor");var Ea=ld;var Ni,xc,cd=class cd extends st{constructor(r,i,n,o,a){super();v(this,"dirty",!1);v(this,"zoomDirty",!1);v(this,"zoomSpeed",5);v(this,"rotateSpeed",100);v(this,"enabled",!0);v(this,"enableZoom",!0);v(this,"enablePan",!0);v(this,"enablePedestal",!1);v(this,"maxPedestal",1/0);v(this,"minPedestal",0);v(this,"enableRotate",!0);v(this,"minZoomAltitude",5);v(this,"maxZoomAltitude",1e4);v(this,"initialMinZoom",5);v(this,"initialMaxZoom",1e4);v(this,"ignoreZoomLimits",!1);v(this,"minExpandedZoom",5);v(this,"maxExpandedZoom",1e5);v(this,"zoomFactor",1);v(this,"panBounds",{min:new X(1/0,1/0),max:new X(-1/0,-1/0),center:new X(0,0,0),radius:1/0});v(this,"minTilt",0);v(this,"maxTilt",1.2);v(this,"MOUSE_BUTTONS",{ORBIT:os.RIGHT,ZOOM:os.MIDDLE,PAN:os.LEFT});v(this,"camera");v(this,"scene");v(this,"renderer");v(this,"elevation");v(this,"orbit");v(this,"cameraPlane");v(this,"raycaster",new Pr);v(this,"rendererState");v(this,"options");v(this,"state",-1);v(this,"intersection");v(this,"viewState",null);v(this,"tweens",new Set);v(this,"clock",new sm(!0));v(this,"coords",{mouse:new z,rotateStart:new z,rotateEnd:new z,rotateDelta:new z,panStart:new X,panCameraStart:new X,panEnd:new X,panDelta:new X,initialShiftPos:new z,initialPedestal:0,floorAnchor:new X});v(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});v(this,"scrollTimer",null);v(this,"lastWheelTime",0);v(this,"resetZoom",!1);v(this,"zoomStart");v(this,"pedestalScaleFactor",1);v(this,"isUserZooming",!1);v(this,"stayInsideBounds",!0);v(this,"userInteracting",!1);v(this,"raycastToFloor",r=>{this.raycaster.setFromCamera(r,this.camera);let i=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return i?i.point:new X});v(this,"isUserInteracting",()=>this.userInteracting);v(this,"getPosition",()=>new X(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));v(this,"getPedestal",()=>this.orbit.position.z);v(this,"pan",(r,i)=>{isNaN(r)||isNaN(i)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+i),this.publish("position-updated"))});v(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"))});v(this,"isAnimating",()=>_a.default.getAll().some(r=>r._mMapAnimation));v(this,"isCameraMoving",()=>this.state!==-1);v(this,"setPosition",(r,i)=>{if(isNaN(r)||isNaN(i))return;this.state===-1&&this.publish("pan-start");let n=r-this.panBounds.center.x,o=i-this.panBounds.center.y,a=Math.sqrt(n*n+o*o);if(this.stayInsideBounds&&a>this.panBounds.radius){let l=Math.atan2(o,n),c={x:Math.cos(l)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(l)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=c.x,this.orbit.position.y=c.y}else this.orbit.position.x=r,this.orbit.position.y=i;this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0});v(this,"tilt",r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+this.getTilt();i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"zoomIn",(r,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o/1.5},r,i,n)});v(this,"zoomOut",(r,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o*1.5},r,i,n)});v(this,"getRotation",()=>this.orbit.rotation.z);v(this,"cancelAnimation",()=>{let r=Array.from(this.tweens),i=r[r.length-1];i.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(i)});v(this,"animateCamera",(r,i,n,o,a,l)=>{let c={mode:ef.cancel,...l},h={},d={},m=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(h.x=m.x,d.x=r.position.x),r.position.y!==void 0&&(h.y=m.y,d.y=r.position.y),r.position.z!==void 0&&(h.z=m.z,d.z=r.position.z)),r.zoom!==void 0&&(h.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.zoom=r.zoom:d.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let T=h.rotation=this.getRotation(),w=r.rotation%(2*Math.PI),E=w-T;if(Math.abs(E)>Math.PI){let L=E<0?1:-1;d.rotation=w+2*Math.PI*L}else d.rotation=w}r.tilt!==void 0&&(h.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.tilt=r.tilt:d.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let y=h.zoom!==d.zoom,x=h.rotation!==d.rotation,S=h.tilt!==d.tilt,P=new _a.default.Tween(h).to(d,b.env.TESTING?0:i).onUpdate(T=>{this.setMulti({x:T.x,y:T.y,z:T.z},T.zoom,T.rotation,T.tilt)}).onComplete(()=>{this.completeTween(P),this.publish("multi-end",{zooming:y,rotating:x,tilting:S}),o&&o()}).onStart(()=>{this.state!==7&&(this.state=7,P.state=7,this.publish("multi-start",{zooming:y,rotating:x,tilting:S})),this.publish("change")}),g=Array.from(this.tweens),C=g[g.length-1],M=!1;return C!=null&&(c.mode===ef.chain?(M=!0,C.chain(P)):(this.completeTween(C),typeof a=="function"&&a(),C=null)),this.tweens.add(P),n?P.easing(n):P.easing(_a.default.Easing.Quadratic.In),!r.doNotAutoStart&&!M&&(P.start(),this.publish("change")),P._mMapAnimation=!0,P});v(this,"setMulti",(r,i,n,o,a=!0)=>{this.state===-1&&this.publish("multi-start");let l=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&(this.orbit.position.x=r.x,l=!0),r.y!==void 0&&!isNaN(r.y)&&(this.orbit.position.y=r.y,l=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0),l=!0)),l&&this.publish("position-updated");let c={zooming:!1,tilting:!!i,rotating:!1};if(i!==void 0&&!isNaN(i)){let h=this.stayInsideBounds?Math.min(Math.max(i,this.getZoomScaledMin()),this.getZoomScaledMax()):i;h!==this.camera.position.z&&(c.zooming=!0,this.camera.position.z=h,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?i>Ol&&(this.camera.near=i-Ol,this.camera.far=i+Ol):(this.camera.near=i/ia,this.camera.far=i*ia),this.camera.updateProjectionMatrix())}if(n!==void 0&&!isNaN(n)&&n!==this.orbit.rotation.z&&(c.rotating=!0,this.orbit.rotation.z=n,this.publish("rotation-updated")),o!==void 0&&!isNaN(o)){let h=this.stayInsideBounds?Math.max(Math.min(o,this.maxTilt),this.minTilt):o;h!==this.elevation.rotation.x&&(c.tilting=!0,this.elevation.rotation.x=h,this.publish("tilt-updated"))}a&&this.publish("change"),this.state===-1&&this.publish("multi-end",c)});v(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);v(this,"getZoomScaledMax",()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)});v(this,"setRotation",(r,i)=>{if(isNaN(r))return;this.state===-1&&!i&&this.publish("rotate-start");let n=r%rf;n!==this.orbit.rotation.z&&(this.orbit.rotation.z=n,i||this.publish("rotation-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"setZoomAltitude",r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let i=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;i!==this.camera.position.z&&(this.camera.position.z=i,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=i/ia,this.camera.far=i*ia,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0});v(this,"setZoomLevel",r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))});v(this,"getZoomAltitude",()=>this.camera.position.z);v(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));v(this,"rotate",r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let i=(this.orbit.rotation.z+r)%rf;i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,this.publish("rotation-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"setTilt",(r,i)=>{if(isNaN(r))return;this.state===-1&&!i&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,i||this.publish("tilt-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"getTilt",()=>this.elevation.rotation.x);v(this,"setCameraPlaneElevation",r=>{this.cameraPlane.position.z=r});v(this,"zoom",r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let i=this.getZoomAltitude()-r;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(i,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):i,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end")});v(this,"expandZoomLimits",(r,i)=>{i||(i=1.2),r*i>this.maxZoomAltitude&&(this.maxZoomAltitude=Math.min(r*i,this.maxExpandedZoom)),r/i<this.minZoomAltitude&&(this.minZoomAltitude=Math.max(r/i,this.minExpandedZoom))});v(this,"restrictZoomLimits",(r,i)=>{i||(i=1.2),r*i>this.initialMaxZoom&&r*i<this.maxZoomAltitude&&(this.maxZoomAltitude=Math.max(this.getZoomAltitude(),r*i)),r/i<this.initialMinZoom&&r/i>this.minZoomAltitude&&(this.minZoomAltitude=Math.min(this.getZoomAltitude(),r/i))});v(this,"getProjectionScaleFactor",(r,i,n)=>uf(r,i,n));v(this,"update",()=>{_a.default.update(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())});v(this,"setPedestal",(r,i=!1)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,i&&(this.publishPedestalChangeEvent(r),this.publish("change")),this.dirty=!0)});v(this,"dispose",()=>{for(let r of af)r.endsWith("start")?this.off(r,this.setUserInteracting):r.endsWith("end")&&this.off(r,this.unsetUserInteracting);this.removeEventListeners(),this.scene.remove(this.cameraPlane)});v(this,"createCameraPlane",()=>{let r=new qi(1e10,1e10),i=new xr({color:0,visible:!1}),n=new Ft(r,i);return this.scene.add(n),n});v(this,"addEventListeners",()=>{let{domElement:r}=this.renderer;for(let i of af)i.endsWith("start")?this.on(i,this.setUserInteracting):i.endsWith("end")&&this.on(i,this.unsetUserInteracting);r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)});v(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)});v(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeEventListeners",()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"removeMouseUpEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"onContextMenu",r=>{r.preventDefault()});v(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}});v(this,"onMouseMove",r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(r)});v(this,"onTouchStart",r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new Cc(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});v(this,"onTouchMove",r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let i={...this.touch.inputs.first},n={...this.touch.inputs.second},o=new z(this.touch.touches[0].x,this.touch.touches[0].y),a=new z(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let l=i.y<o.y&&n.y<a.y,c=i.y>o.y&&n.y>a.y;this.enableRotate&&this.state!==4&&(c||l)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}});v(this,"onTouchEnd",()=>{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}this.state=-1}});v(this,"handleTouchMovePan",r=>{let i=Object.hasOwn(r,"x")?new z(r.x,r.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panEnd.set(n.x,n.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")});v(this,"handleTouchStartDolly",()=>{let r=this.touch.touches[0].x-this.touch.touches[1].x,i=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let n=new z(this.touch.touches[0].x-r/2,this.touch.touches[0].y-i/2);this.coords.floorAnchor=this.raycastToFloor(n),this.orbit.updateMatrixWorld(),this.touch.anchor1=new Ea(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new Ea(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("multi-start")});v(this,"handleMouseMovePan",()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change")});v(this,"handleTouchStartTilt",r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});v(this,"handleTouchMovePedestal",r=>{this.handleMouseMovePedestal(r.touches[0])});v(this,"handleTouchMoveTilt",r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)});v(this,"handleTouchMoveDolly",()=>{let r=this.touch.inputs.first,i=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:i.x,y:i.y};let n=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);n&&this.setCameraFromTransformMatrix(n),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,i)});v(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end")});v(this,"handleTouchStartPan",r=>{let i=Object.hasOwn(r,"x")?new z(r.x,r.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panStart.set(n.x,n.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")});v(this,"handleTouchStartPedestal",r=>{this.handleMouseDownPedestal(r.touches[0])});v(this,"onMouseDown",r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});v(this,"onMouseWheel",r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(r))});v(this,"handleMouseWheel",r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let i=this.getZoomAltitude(),n=i-ad(r)*i/sv*this.zoomSpeed;this.setZoomAltitude(n);let o=n/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-o),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y),this.publish("change")});v(this,"setCameraFromTransformMatrix",r=>{this.orbit.updateMatrixWorld();let i=new Zi;i.setFromRotationMatrix(r,"ZYX");let n=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(i.x),o=i.z,a=new X(0,0,1);a.applyEuler(i),a.setLength(n);let l=new X;l.setFromMatrixPosition(r),l.sub(a),this.enablePan&&this.setPosition(l.x,l.y),this.enableZoom&&this.setZoomAltitude(n),this.enableRotate&&this.setRotation(o)});v(this,"makeTransformFromTouchAnchors",(r,i)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let n=this.camera.projectionMatrix.clone(),o=r.worldCoordinate,a=i.worldCoordinate,l=r.reUnproject(),c=i.reUnproject();if(!l||!c||!o||!a)return null;let h=r.viewCoordinate,d=i.viewCoordinate,m=a.x-o.x,y=a.y-o.y,x=Math.atan2(y,m),S=c.x-l.x,P=c.y-l.y,g=Math.atan2(P,S),C=Xb(x,g),M=new ti;M.makeRotationZ(-C);let T=M.clone();T.multiply(r.snapHolderMatrix);let w=s((g3,v3,b3)=>g3.elements[(v3-1)*4+b3-1],"m"),E=w(n,1,1)*w(T,1,1)-h.x*w(n,3,4)*w(T,3,1),L=w(n,1,1)*w(T,1,2)-h.x*w(n,3,4)*w(T,3,2),R=w(n,1,1)*w(T,1,3)-h.x*w(n,3,4)*w(T,3,3),F=o.x*E+o.y*L+o.z*R,k=w(n,2,2)*w(T,2,1)-h.y*w(n,3,4)*w(T,3,1),G=w(n,2,2)*w(T,2,2)-h.y*w(n,3,4)*w(T,3,2),H=w(n,2,2)*w(T,2,3)-h.y*w(n,3,4)*w(T,3,3),Q=o.x*k+o.y*G+o.z*H,lt=w(n,1,1)*w(T,1,1)-d.x*w(n,3,4)*w(T,3,1),ht=w(n,1,1)*w(T,1,2)-d.x*w(n,3,4)*w(T,3,2),gt=w(n,1,1)*w(T,1,3)-d.x*w(n,3,4)*w(T,3,3),At=a.x*lt+a.y*ht+a.z*gt,ve=w(n,2,2)*w(T,2,1)-d.y*w(n,3,4)*w(T,3,1),Rt=w(n,2,2)*w(T,2,2)-d.y*w(n,3,4)*w(T,3,2),ut=w(n,2,2)*w(T,2,3)-d.y*w(n,3,4)*w(T,3,3),Ct=a.x*ve+a.y*Rt+a.z*ut,Je=Math.abs(lt-E),be=Math.abs(ht-L),ae=Math.abs(gt-R),jt=Math.abs(lt-k),Yi=Math.abs(ht-G),ji=Math.abs(gt-H),zi=Math.abs(ve-E),J=Math.abs(Rt-L),xt=Math.abs(ut-R),vt=Math.abs(ve-k),pe=Math.abs(Rt-G),Ui=Math.abs(ut-H),qn=Math.min(Je+be+ae,jt+Yi+ji),Kr=Math.min(zi+J+xt,vt+pe+Ui);qn<Kr&&(lt=ve,ht=Rt,gt=ut,At=Ct);let Nt=k*R-E*H,Qr=G*R-L*H,rs=Q*R-F*H,$n=lt*H-k*gt,Jn=ht*H-G*gt,is=At*H-Q*gt,h3=(is*Qr-rs*Jn)/($n*Qr-Nt*Jn),f3=(is*Nt-rs*$n)/(Jn*Nt-Qr*$n),Vd=G*E-L*k,d3=H*E-R*k,m3=Q*E-F*k,Hd=ht*k-G*lt,y3=gt*k-H*lt,Xd=((At*k-Q*lt)*Vd-m3*Hd)/(y3*Vd-d3*Hd),ns=T.clone();return ns.elements[12]=h3,ns.elements[13]=f3,ns.elements[14]=Xd,Xd>0?ns:null});v(this,"updateTouchOrigin",()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top});v(this,"touchToScene",r=>{this.touch.touches=[];for(let i=0,n=r.touches.length;i<n;i++){let o=r.touches[i],a=Yb(o,this.touch.origin);this.touch.touches.push(new z(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]});v(this,"canScrollZoom",r=>{let i=ad(r),n=this.getZoomAltitude();return!(i<0&&n===this.getZoomScaledMax()||i>0&&n===this.getZoomScaledMin())});v(this,"mouseToScene",r=>{let i=this.getMousePos(r);return this.coords.mouse.x=i.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(i.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse});v(this,"getMousePos",r=>({x:r.offsetX,y:r.offsetY}));v(this,"handleMouseDownRotate",r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});v(this,"handleMouseDownPan",()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")});v(this,"handleMouseDownPedestal",r=>{let i=new z(r.clientX,r.clientY);this.coords.initialShiftPos=i,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=uf(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});v(this,"handleMouseMovePedestal",r=>{let i={x:r.clientX,y:r.clientY},n=this.coords.initialPedestal+this.pedestalScaleFactor*(i.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(n<this.minPedestal?n=Math.max(n,this.minPedestal):n>this.maxPedestal&&(n=Math.min(n,this.maxPedestal))),n!==this.getPedestal()&&this.setPedestal(n,!0)});v(this,"handleMouseMoveRotate",r=>{this.coords.rotateEnd.set(r.clientX,r.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.rotate(-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")});v(this,"publishUserZoomDebounced",Yn(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));v(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});v(this,"setUserInteracting",()=>{this.userInteracting=!0});v(this,"unsetUserInteracting",()=>{this.userInteracting=!1});v(this,"publishPedestalChangeEvent",r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});v(this,"convertAltitudeToZoomLevel",r=>{let[,i]=this.center,o=r*2*Math.tan(at.degToRad(this.camera.fov)/2)/this.options.canvasHeight,a=Math.cos(at.degToRad(i))*2*Math.PI*zr/o;return at.clamp(Math.log2(a/512),nf,of)});v(this,"convertZoomLevelToAltitude",r=>{let[,i]=this.center,n=at.clamp(r,nf,of),o=Math.pow(2,n),a=at.clamp(i,ov,av),l=o*512;return Math.cos(at.degToRad(a))*Math.PI*2*zr/l*this.options.canvasHeight/2/Math.tan(at.degToRad(this.camera.fov)/2)});v(this,"completeTween",r=>{r.isPlaying?r.stop():r.end(),this.tweens.delete(r)});I(this,Ni,{PIXELS:"pixels",PORTIONS:"portions"});I(this,xc,["top","bottom","left","right"]);v(this,"getCameraFrameForPoints",(r,i,n,o,a=!0,{canvasWidth:l,canvasHeight:c},h=this.minZoomAltitude,d=this.maxZoomAltitude)=>{Number.isFinite(n)&&(n=1),Number.isFinite(i)&&(i=1),h=Math.max(this.cameraPlane.position.z,h);let m={position:this.getPosition(),zoom:h};if(r==null||r.length===0)return m;o||(o={top:0,bottom:0,left:0,right:0,type:u(this,Ni).PIXELS});for(let Nt of u(this,xc))typeof o[Nt]!="number"&&(o[Nt]=0);if(o.type||(o.type=u(this,Ni).PIXELS),o.type===u(this,Ni).PORTIONS&&(o={top:o.top*c,bottom:o.bottom*c,left:o.left*l,right:o.right*l,type:u(this,Ni).PIXELS}),o.left+o.right>=l||o.top+o.bottom>=c)return m;this.orbit.updateMatrixWorld();let y=this.camera.matrixWorldInverse,x=this.camera.fov*(Math.PI/180)/2,S=x*n,g=Math.atan(Math.tan(x)*(l/c))*i;if(r.length===1){let Nt=r[0].clone();Nt.applyMatrix4(y);let Qr=h*Math.tan(g)*2,rs=h*Math.tan(S)*2,$n=(o.left-o.right)/2/l,Jn=(o.top-o.bottom)/2/c,is=new X(-$n*Qr,Jn*rs,0);return Nt.add(is),Nt.applyMatrix4(this.camera.matrixWorld),m.position.x=Nt.x,m.position.y=Nt.y,m.position.z=Nt.z,m.zoom=Math.max(m.zoom,m.position.z),m}let C=new X(1/0,1/0,1/0),M=new X(-1/0,-1/0,-1/0),T=new Ne().setFromPoints(r),w;for(let Nt=0,Qr=r.length;Nt<Qr;Nt++)w=r[Nt].clone(),w.applyMatrix4(y),C.min(w),M.max(w);let E=M.x-C.x,L=M.y-C.y,R=l-o.left-o.right,F=c-o.top-o.bottom,k=(M.x+C.x)/2,G=(M.y+C.y)/2,H=E/R,Q=L/F,lt=h,ht=d,gt=lt*Math.tan(g)*2,At=ht*Math.tan(g)*2,ve=gt/l,Rt=At/l,ut=Math.max(H,Q);a&&(ut=Math.min(Math.max(ut,ve),Rt));let Ct=R*ut,Je=F*ut,be={min:{x:k-Ct/2-o.left*ut,y:G-Je/2-o.bottom*ut},max:{x:k+Ct/2+o.right*ut,y:G+Je/2+o.top*ut}},ae=(be.min.x+be.max.x)/2,jt=(be.min.y+be.max.y)/2,Yi=T.getCenter(new X),ji=Math.abs(ae-be.min.x),zi=Math.abs(jt-be.min.y),J=ji/Math.tan(g),xt=zi/Math.tan(S),vt=new X;vt.set(ae,jt,M.z+Math.max(J,xt)),vt.applyMatrix4(this.camera.matrixWorld);let pe=new X;pe.set(ae,jt,M.z),pe.applyMatrix4(this.camera.matrixWorld);let Ui=new X().subVectors(pe,vt),qn=(Yi.z-vt.z)/Ui.z,Kr=new X().copy(vt).add(Ui.clone().multiplyScalar(qn));return m.position=Kr,pe.set(m.position.x,m.position.y,m.position.z),vt.sub(pe),m.zoom=vt.length(),m});this.camera=r,this.renderer=n,this.rendererState=o,this.scene=i,this.options=a,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,a.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r)}get scrollPercent(){let r=this.minPedestal,i=this.maxPedestal,n=this.getPedestal();return n=Math.min(n,i),n=Math.max(n,r),(n-r)/(i-r)*100}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 o,a,l,c;let r=this.getPosition(),{lat:i,lon:n}=Dl((a=(o=this.rendererState.center)==null?void 0:o[1])!=null?a:0,(c=(l=this.rendererState.center)==null?void 0:l[0])!=null?c:0,r.x,r.y);return[n,i]}setCenter(r,i,n=0){var l,c,h,d;let{x:o,y:a}=Al((c=(l=this.rendererState.center)==null?void 0:l[1])!=null?c:0,(d=(h=this.rendererState.center)==null?void 0:h[0])!=null?d:0,i,r);return new X(o,a,n)}focusOn(r,{insetsPadding:i},n={}){var g;let o=(g=n.changeZoom)!=null?g:!0,a=n.curve,l=1,c=1,h=n.callback,d=n.cancelledCallback,m=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,y=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,x=this.options.canvasWidth,S=this.options.canvasHeight,P;if(n.duration!==void 0?P=n.duration:b.env.TESTING==="true"?P=0:P=200,i.top!==0||i.bottom!==0||i.left!==0||i.right!==0)if(n.tilt!==void 0&&n.tilt!==this.getTilt()||n.rotation!==void 0&&n.rotation!==this.getRotation())this.animateCamera({position:this.getPosition(),tilt:n.tilt,rotation:n.rotation},P,a,()=>{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasWidth:x,canvasHeight:S},m,y);this.animateCamera({position:M.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:M.zoom},P,a,h,d)});else{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasWidth:x,canvasHeight:S},m,y);this.animateCamera({position:M.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:M.zoom},P,a,h,d)}else{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasHeight:S,canvasWidth:x},m,y);this.animateCamera({position:M.position,tilt:n.tilt,rotation:n.rotation,zoom:M.zoom},P,a,h,d)}}resize(r,i){this.options.canvasWidth=r,this.options.canvasHeight=i}};Ni=new WeakMap,xc=new WeakMap,s(cd,"CameraSystem");var La=cd;f();var MP=300,ud=class ud{state;constructor(t){this.state=t}update(t){var o;let r,i,n;for(let a of this.state.entity2DIds)r=this.state.entity2DMap.get(a),r&&(i=r.components[0],n=r.components[1],i instanceof me&&i.containerEl!=null&&((i.visible===!0||((o=i.animation)==null?void 0:o.pending)===!0)&&(i.containerEl.style.transform=`translate3D(${i.projection.x}px, ${i.projection.y}px, ${i.projection.y}px)`),i.visible===!0?i.containerEl.style.pointerEvents=t||n!=null?"none":"auto":i.containerEl.style.pointerEvents="none",i.visibilityNeedsUpdate&&(i.animation&&i.animation.cancel(),i.animation=i.containerEl.animate([{opacity:i.visible?"1":"0"}],{duration:MP,easing:"ease-in-out",fill:"forwards"}),i.visibilityNeedsUpdate=!1)))}};s(ud,"DOMDrawSystem");var Sc=ud;f();var pd=class pd extends st{state;dirty=!0;domTree;observers=new Map;constructor(t,r){super(),this.state=t,this.domTree=r}setupObserver(){var r;if(this.observers){for(let i of this.observers.values())i.disconnect();this.observers.clear()}let t;for(let i of this.domTree.children){let n=i.getAttribute("data-marker-id");if(n!=null&&(t=this.state.entity2DMap.get(n),(r=t.components[0].options)!=null&&r.dynamicResize)){let o=new ResizeObserver(this.updateDimensions);o.observe(i),this.observers.set(i.userData.entityId,o)}}}updateDimensions=t=>{t.forEach(r=>{let i=r.target,n=i.getAttribute("data-marker-id");if(n){let o=this.state.entity2DMap.get(n);if(o&&o.components[0]instanceof me&&i.firstElementChild){let{width:a,height:l}=i.firstElementChild.getBoundingClientRect();o.components[0].updateDimensions(a,l)}}}),this.publish("dimensions-update")};update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let t of this.observers.values())t.disconnect();this.observers.clear()}};s(pd,"DOMResizeSystem");var Pc=pd;f();var Oa=Cr(On());var wP=0,TP=22,IP=0,EP=90,zb={linear:Oa.default.Easing.Linear.None,"ease-in":Oa.default.Easing.Quadratic.In,"ease-out":Oa.default.Easing.Quadratic.Out,"ease-in-out":Oa.default.Easing.Quadratic.InOut},ne,tt,ki,Da,hd=class hd{constructor(t,r,i,n){I(this,ne,void 0);I(this,tt,void 0);I(this,ki,void 0);I(this,Da,void 0);_(this,ne,t),_(this,tt,r),_(this,ki,i),_(this,Da,n),u(this,tt).cameraSystem.on("pedestal-change",({pedestal:o})=>{u(this,ne).map&&(u(this,ne).map.transform.elevation=o,u(this,ne).map.transform.minElevationForCurrentTile=o,u(this,ne).map.triggerRepaint()),u(this,tt).cameraSystem.setCameraPlaneElevation(o),u(this,Da).position.z=o})}get center(){return u(this,tt).cameraSystem.center}setCenter(t){let r=u(this,tt).cameraSystem.setCenter(t[0],t[1]);u(this,tt).cameraSystem.setPosition(r.x,r.y)}get zoomLevel(){return u(this,tt).cameraSystem.getZoomLevel()}setZoomLevel(t){u(this,tt).cameraSystem.setZoomLevel(t)}get maxZoomLevel(){return u(this,tt).cameraSystem.maxZoomLevel}get minZoomLevel(){return u(this,tt).cameraSystem.minZoomLevel}setMinZoomLevel(t){var i;let r=Math.max(wP,t);u(this,tt).cameraSystem.setMinZoomLevel(r),(i=u(this,ne).map)==null||i.setMinZoom(r)}setMaxZoomLevel(t){var i;let r=Math.min(TP,t);(i=u(this,ne).map)==null||i.setMaxZoom(r),u(this,tt).cameraSystem.setMaxZoomLevel(r)}get maxPitch(){return at.radToDeg(u(this,tt).cameraSystem.maxTilt)}get minPitch(){return at.radToDeg(u(this,tt).cameraSystem.minTilt)}setMinPitch(t){var i;let r=Math.max(IP,t);(i=u(this,ne).map)==null||i.setMinPitch(r),u(this,tt).cameraSystem.minTilt=at.degToRad(r)}setMaxPitch(t){var i;let r=Math.min(EP,t);(i=u(this,ne).map)==null||i.setMaxPitch(r),u(this,tt).cameraSystem.maxTilt=at.degToRad(r)}get bearing(){return at.radToDeg(u(this,tt).cameraSystem.getRotation())}setBearing(t){u(this,tt).cameraSystem.setRotation(at.degToRad(t))}get pitch(){return at.radToDeg(u(this,tt).cameraSystem.getTilt())}setPitch(t){u(this,tt).cameraSystem.setTilt(at.degToRad(t))}get elevation(){return u(this,tt).cameraSystem.getPedestal()}setElevation(t){u(this,tt).cameraSystem.setPedestal(t,!0)}get insetsPadding(){return u(this,ki).insetsPadding}setInsetPadding(t){u(this,ki).center&&(u(this,ki).insetsPadding=t?{...t}:ic)}animateTo(t){let r=t.center?u(this,ne).convertTo3DMapPosition(t.center[1],t.center[0],0):void 0,i=t.zoomLevel!==void 0?u(this,tt).cameraSystem.convertZoomLevelToAltitude(t.zoomLevel):void 0,n=t.bearing!==void 0?at.degToRad(t.bearing):void 0,o=t.pitch!==void 0?at.degToRad(t.pitch):void 0;return new Promise(a=>{u(this,tt).cameraSystem.animateCamera({position:r,zoom:i,rotation:n,tilt:o},t.duration||0,zb[t.easing||"ease-in-out"],a,a)})}focusOn(t,r){return new Promise(i=>{u(this,tt).cameraSystem.focusOn(t.map(n=>u(this,ne).convertTo3DMapPosition(n[1],n[0],n[2]||0)),{insetsPadding:(r==null?void 0:r.padding)||this.insetsPadding},{changeZoom:!0,updateZoomLimits:r==null?void 0:r.updateZoomLimits,minZoom:(r==null?void 0:r.maxZoomLevel)===void 0?void 0:u(this,tt).cameraSystem.convertZoomLevelToAltitude(r.maxZoomLevel),maxZoom:(r==null?void 0:r.minZoomLevel)===void 0?void 0:u(this,tt).cameraSystem.convertZoomLevelToAltitude(r.minZoomLevel),padding:(r==null?void 0:r.padding)||{top:0,left:0,bottom:0,right:0},curve:zb[(r==null?void 0:r.easing)||"ease-in-out"],rotation:r!=null&&r.bearing?at.degToRad(r.bearing):void 0,tilt:r!=null&&r.pitch?at.degToRad(r.pitch):void 0,duration:r==null?void 0:r.duration,callback:i,cancelledCallback:i})})}};ne=new WeakMap,tt=new WeakMap,ki=new WeakMap,Da=new WeakMap,s(hd,"Camera");var Mc=hd;f();function Ub(e){e&&(e.map&&(e.map.dispose(),e.map=void 0),e.dispose())}s(Ub,"scrubMaterial");function gr(e){for(let t=e.children.length-1;t>=0;t--)gr(e.children[t]);"geometry"in e&&e.geometry&&e.geometry.dispose(),e.parent&&e.parent.remove(e),"material"in e&&Array.isArray(e.material)?e.material.forEach(function(t){Ub(t)}):"material"in e&&typeof e.material<"u"&&Ub(e.material)}s(gr,"destroyObject3D");f();var Wb="data:image/png;base64,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";var Zb="data:image/png;base64,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";var qb=`uniform vec4 uSize;
462
+ }`;var vb="data:image/png;base64,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";var hP=new Ki,Wr,ma,gf=class gf{constructor(t,r){v(this,"points");v(this,"type","path");v(this,"mesh",new Xe);v(this,"material");v(this,"geometry");v(this,"outline");v(this,"feature");v(this,"options");v(this,"altitudeAdjustment",1);I(this,Wr,1);v(this,"position",new Y);I(this,ma,0);var ji,zi,Ui;this.points=t;let i=(ji=r==null?void 0:r.nearRadius)!=null?ji:.18,n=!0,o=(zi=r==null?void 0:r.farRadius)!=null?zi:.2,a=375,l=1e4,c=(Ui=r==null?void 0:r.color)!=null?Ui:"#ff834c",h="blue",d=!1,y=!0,m=!0,x=!1;this.options={nearRadius:i,farRadius:o,color:c};let P=i/2+.15,g=0;this.points[0].z+=P;for(let J=1;J<this.points.length;++J){this.points[J].z+=P;let xt=this.points[J].x-this.points[J-1].x,gt=this.points[J].y-this.points[J-1].y,pe=this.points[J].z-this.points[J-1].z;g+=Math.sqrt(xt*xt+gt*gt+pe*pe)}let C=P-.1;this.points.push(this.points[this.points.length-1].clone().setZ(C)),this.points.unshift(this.points[0].clone().setZ(C));let M=new Ud;x&&(M=hP.load(vb),M.colorSpace=Zi);let T=new Mt(c),w=new Mt(h),E={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new z(1,1)},cameraParameters:{type:"v2",value:new z(1e3,0)},complete:{type:"f",value:n?0:1},color:{type:"c",value:T},pathLength:{type:"f",value:g},nearRadius:{type:"f",value:i},farRadius:{type:"f",value:o},nearZoom:{type:"f",value:a},farZoom:{type:"f",value:l},pulseColor:{type:"c",value:w},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:!1},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:M},displayArrowsOnPath:{type:"b",value:d},flattenFactor:{type:"f",value:y?.05:1},showPulse:{type:"b",value:m},opacityMultiplier:{type:"f",value:1}},L=new im(this.points);L.curveType="catmullrom",L.tension=0;let R=30,F=8,k=R*this.points.length,G=new om(L,k,i,F,!1),H=new Float32Array(G.attributes.position.count);for(let J=this.points.length;J<H.length;J++)H[J]=J;G.setAttribute("vertexIndex",new to(H,1));let Q=new Float32Array(G.attributes.position.count),lt=new to(Q,1);for(let J=0;J<=k;J++)for(let xt=0;xt<=F;++xt)lt.setX(J*(F+1)+xt,J/k);G.setAttribute("pathDistance",lt);let ht=new Float32Array(G.attributes.normal.count*3),yt=new to(ht,3);for(let J=0;J<k;J++){let xt=G.tangents[J];for(let gt=0;gt<=F;++gt)yt.setXYZ(J*(F+1)+gt,xt.x,xt.y,xt.z)}G.setAttribute("pathTangent",yt);let At=new Float32Array(G.attributes.normal.count*3),ve=new to(At,3);for(let J=0;J<k;J++){let xt=G.tangents[J];var Rt,ut,Ct;Rt=-xt.x*xt.z,ut=-xt.y*xt.z,Ct=1-xt.z*xt.z;let gt=Math.sqrt(Rt*Rt+ut*ut+Ct*Ct);gt===0&&(gt=1);let pe=Rt/gt,Wi=ut/gt,qn=Ct/gt;for(let Kr=0;Kr<=F;++Kr)ve.setXYZ(J*(F+1)+Kr,pe,Wi,qn)}G.setAttribute("pathNormal",ve),this.geometry=G;let Je=new eo({uniforms:E,vertexShader:mf,fragmentShader:yf});Je.transparent=!0,Je.alphaTest=.5,E.resolution.value.x=1,E.resolution.value.y=1,E.vertexes.value=H.length,E.arrowTexture.value.wrapS=Qn,E.arrowTexture.value.wrapT=Qn,E.arrowTexture.value.anisotropy=16,E.complete.value=u(this,Wr);let be=new Ft(G,Je),ae=be.clone(),jt={...E,opacityMultiplier:{type:"f",value:.25}};jt.complete.value=1,ae.material=new eo({uniforms:jt,vertexShader:mf,fragmentShader:yf}),ae.material.transparent=!0,ae.material.alphaTest=.5,ae.material.depthWrite=!1,ae.material.depthTest=!1,ae.renderOrder=1,jt.resolution.value.x=1,jt.resolution.value.y=1,jt.vertexes.value=H.length,jt.arrowTexture.value.wrapS=Qn,jt.arrowTexture.value.wrapT=Qn,jt.arrowTexture.value.anisotropy=16,jt.complete.value=u(this,Wr),this.mesh.add(be),this.mesh.add(ae),G.computeBoundingBox(),G.boundingBox.getCenter(this.position),this.material=Je}setColor(){}setOpacity(){}set completeFraction(t){_(this,Wr,t),this.mesh.children.forEach(r=>{r.material.uniforms.complete.value=u(this,Wr),r.material.needsUpdate=!0})}get completeFraction(){return u(this,Wr)}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return u(this,ma)}set altitude(t){this.mesh.position.z=t,_(this,ma,t)}set complete(t){this.material.uniforms.complete.value=t,this.material.needsUpdate=!0}};Wr=new WeakMap,ma=new WeakMap,s(gf,"PathComponent");var nc=gf;f();var vf=class vf{rendererState;constructor(t){this.rendererState=t}update(){let t;for(let r of this.rendererState.threeDEntities)if(t=this.rendererState.entity3DMap.get(r),t instanceof re&&t.components[0]){let i=t.components[0];if(i.dirty){for(let n of t.children)(n instanceof fe||n instanceof re)&&(n.userData.entityId!==t.components[0].activeId?n.setVisible(!1):n.setVisible(!0));i.dirty=!1}}}};s(vf,"StackSystem");var oc=vf;f();f();var va=Cr(Fn());f();f();f();var bb=s((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),Cb=s((e,t)=>new z(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),Sf=s((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),ya=s((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),Pf=s((e,t)=>new z((e.x+t.x)/2,(e.y+t.y)/2),"average"),Mf=s(e=>{let t=0,{wheelDelta:r,detail:i}=e;return r!==void 0?t=r:i!==void 0&&(t=-i),t},"getScrollDelta");var wf=class wf{input1;input2;lastAngle;lastDistance;totalDistance;first;second;constructor(t,r){this.input1=t,this.input2=r,this.lastAngle=Sf(t,r),this.lastDistance=ya(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let i=ya(t,r);this.input1=t,this.input2=r;let n=Sf(t,r);this.lastAngle=n,this.lastDistance=i,this.totalDistance+=(ya(this.first,t)+ya(this.second,r))/2,this.first=Pf(this.first,t),this.second=Pf(this.second,r)}};s(wf,"InputSet");var ac=wf;f();var Tf=class Tf{touch;camera;cameraPlane;viewCoordinate;snapHolderMatrix;snapCamera;cameraPosition;raycaster;worldCoordinate;snapshotted=!1;constructor(t,r,i){this.touch=t,this.camera=r,this.cameraPlane=i,this.viewCoordinate={x:t.x,y:t.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let t=new z(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Pr,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var i,n;let t=new z(this.viewCoordinate.x,this.viewCoordinate.y);(i=this.raycaster)==null||i.setFromCamera(t,this.snapCamera);let r=(n=this.raycaster)==null?void 0:n.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};s(Tf,"TouchAnchor");var ga=Tf;var Li,sc,If=class If extends st{constructor(r,i,n,o,a){super();v(this,"dirty",!1);v(this,"zoomDirty",!1);v(this,"zoomSpeed",5);v(this,"rotateSpeed",100);v(this,"enabled",!0);v(this,"enableZoom",!0);v(this,"enablePan",!0);v(this,"enablePedestal",!1);v(this,"maxPedestal",1/0);v(this,"minPedestal",0);v(this,"enableRotate",!0);v(this,"minZoomAltitude",5);v(this,"maxZoomAltitude",1e4);v(this,"initialMinZoom",5);v(this,"initialMaxZoom",1e4);v(this,"ignoreZoomLimits",!1);v(this,"minExpandedZoom",5);v(this,"maxExpandedZoom",1e5);v(this,"zoomFactor",1);v(this,"panBounds",{min:new Y(1/0,1/0),max:new Y(-1/0,-1/0),center:new Y(0,0,0),radius:1/0});v(this,"minTilt",0);v(this,"maxTilt",1.2);v(this,"MOUSE_BUTTONS",{ORBIT:as.RIGHT,ZOOM:as.MIDDLE,PAN:as.LEFT});v(this,"camera");v(this,"scene");v(this,"renderer");v(this,"elevation");v(this,"orbit");v(this,"cameraPlane");v(this,"raycaster",new Pr);v(this,"rendererState");v(this,"options");v(this,"state",-1);v(this,"intersection");v(this,"viewState",null);v(this,"tweens",new Set);v(this,"clock",new lm(!0));v(this,"coords",{mouse:new z,rotateStart:new z,rotateEnd:new z,rotateDelta:new z,panStart:new Y,panCameraStart:new Y,panEnd:new Y,panDelta:new Y,initialShiftPos:new z,initialPedestal:0,floorAnchor:new Y});v(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});v(this,"scrollTimer",null);v(this,"lastWheelTime",0);v(this,"resetZoom",!1);v(this,"zoomStart");v(this,"pedestalScaleFactor",1);v(this,"isUserZooming",!1);v(this,"stayInsideBounds",!0);v(this,"userInteracting",!1);v(this,"raycastToFloor",r=>{this.raycaster.setFromCamera(r,this.camera);let i=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return i?i.point:new Y});v(this,"isUserInteracting",()=>this.userInteracting);v(this,"getPosition",()=>new Y(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));v(this,"getPedestal",()=>this.orbit.position.z);v(this,"pan",(r,i)=>{isNaN(r)||isNaN(i)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+i),this.publish("position-updated"))});v(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"))});v(this,"isAnimating",()=>va.default.getAll().some(r=>r._mMapAnimation));v(this,"isCameraMoving",()=>this.state!==-1);v(this,"setPosition",(r,i)=>{if(isNaN(r)||isNaN(i))return;this.state===-1&&this.publish("pan-start");let n=r-this.panBounds.center.x,o=i-this.panBounds.center.y,a=Math.sqrt(n*n+o*o);if(this.stayInsideBounds&&a>this.panBounds.radius){let l=Math.atan2(o,n),c={x:Math.cos(l)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(l)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=c.x,this.orbit.position.y=c.y}else this.orbit.position.x=r,this.orbit.position.y=i;this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0});v(this,"tilt",r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+this.getTilt();i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"zoomIn",(r,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o/1.5},r,i,n)});v(this,"zoomOut",(r,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o*1.5},r,i,n)});v(this,"getRotation",()=>this.orbit.rotation.z);v(this,"cancelAnimation",()=>{let r=Array.from(this.tweens),i=r[r.length-1];i.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(i)});v(this,"animateCamera",(r,i,n,o,a,l)=>{let c={mode:yh.cancel,...l},h={},d={},y=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(h.x=y.x,d.x=r.position.x),r.position.y!==void 0&&(h.y=y.y,d.y=r.position.y),r.position.z!==void 0&&(h.z=y.z,d.z=r.position.z)),r.zoom!==void 0&&(h.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.zoom=r.zoom:d.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let T=h.rotation=this.getRotation(),w=r.rotation%(2*Math.PI),E=w-T;if(Math.abs(E)>Math.PI){let L=E<0?1:-1;d.rotation=w+2*Math.PI*L}else d.rotation=w}r.tilt!==void 0&&(h.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.tilt=r.tilt:d.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let m=h.zoom!==d.zoom,x=h.rotation!==d.rotation,S=h.tilt!==d.tilt,P=new va.default.Tween(h).to(d,b.env.TESTING?0:i).onUpdate(T=>{this.setMulti({x:T.x,y:T.y,z:T.z},T.zoom,T.rotation,T.tilt)}).onComplete(()=>{this.completeTween(P),this.publish("multi-end",{zooming:m,rotating:x,tilting:S}),o&&o()}).onStart(()=>{this.state!==7&&(this.state=7,P.state=7,this.publish("multi-start",{zooming:m,rotating:x,tilting:S})),this.publish("change")}),g=Array.from(this.tweens),C=g[g.length-1],M=!1;return C!=null&&(c.mode===yh.chain?(M=!0,C.chain(P)):(this.completeTween(C),typeof a=="function"&&a(),C=null)),this.tweens.add(P),n?P.easing(n):P.easing(va.default.Easing.Quadratic.In),!r.doNotAutoStart&&!M&&(P.start(),this.publish("change")),P._mMapAnimation=!0,P});v(this,"setMulti",(r,i,n,o,a=!0)=>{this.state===-1&&this.publish("multi-start");let l=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&(this.orbit.position.x=r.x,l=!0),r.y!==void 0&&!isNaN(r.y)&&(this.orbit.position.y=r.y,l=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0),l=!0)),l&&this.publish("position-updated");let c={zooming:!1,tilting:!!i,rotating:!1};if(i!==void 0&&!isNaN(i)){let h=this.stayInsideBounds?Math.min(Math.max(i,this.getZoomScaledMin()),this.getZoomScaledMax()):i;h!==this.camera.position.z&&(c.zooming=!0,this.camera.position.z=h,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?i>gl&&(this.camera.near=i-gl,this.camera.far=i+gl):(this.camera.near=i/zo,this.camera.far=i*zo),this.camera.updateProjectionMatrix())}if(n!==void 0&&!isNaN(n)&&n!==this.orbit.rotation.z&&(c.rotating=!0,this.orbit.rotation.z=n,this.publish("rotation-updated")),o!==void 0&&!isNaN(o)){let h=this.stayInsideBounds?Math.max(Math.min(o,this.maxTilt),this.minTilt):o;h!==this.elevation.rotation.x&&(c.tilting=!0,this.elevation.rotation.x=h,this.publish("tilt-updated"))}a&&this.publish("change"),this.state===-1&&this.publish("multi-end",c)});v(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);v(this,"getZoomScaledMax",()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)});v(this,"setRotation",(r,i)=>{if(isNaN(r))return;this.state===-1&&!i&&this.publish("rotate-start");let n=r%gh;n!==this.orbit.rotation.z&&(this.orbit.rotation.z=n,i||this.publish("rotation-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"setZoomAltitude",r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let i=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;i!==this.camera.position.z&&(this.camera.position.z=i,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=i/zo,this.camera.far=i*zo,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0});v(this,"setZoomLevel",r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))});v(this,"getZoomAltitude",()=>this.camera.position.z);v(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));v(this,"rotate",r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let i=(this.orbit.rotation.z+r)%gh;i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,this.publish("rotation-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"setTilt",(r,i)=>{if(isNaN(r))return;this.state===-1&&!i&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,i||this.publish("tilt-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"getTilt",()=>this.elevation.rotation.x);v(this,"setCameraPlaneElevation",r=>{this.cameraPlane.position.z=r});v(this,"zoom",r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let i=this.getZoomAltitude()-r;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(i,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):i,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end")});v(this,"expandZoomLimits",(r,i)=>{i||(i=1.2),r*i>this.maxZoomAltitude&&(this.maxZoomAltitude=Math.min(r*i,this.maxExpandedZoom)),r/i<this.minZoomAltitude&&(this.minZoomAltitude=Math.max(r/i,this.minExpandedZoom))});v(this,"restrictZoomLimits",(r,i)=>{i||(i=1.2),r*i>this.initialMaxZoom&&r*i<this.maxZoomAltitude&&(this.maxZoomAltitude=Math.max(this.getZoomAltitude(),r*i)),r/i<this.initialMinZoom&&r/i>this.minZoomAltitude&&(this.minZoomAltitude=Math.min(this.getZoomAltitude(),r/i))});v(this,"getProjectionScaleFactor",(r,i,n)=>Mh(r,i,n));v(this,"update",()=>{va.default.update(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())});v(this,"setPedestal",(r,i=!1)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,i&&(this.publishPedestalChangeEvent(r),this.publish("change")),this.dirty=!0)});v(this,"dispose",()=>{for(let r of Ch)r.endsWith("start")?this.off(r,this.setUserInteracting):r.endsWith("end")&&this.off(r,this.unsetUserInteracting);this.removeEventListeners(),this.scene.remove(this.cameraPlane)});v(this,"createCameraPlane",()=>{let r=new $i(1e10,1e10),i=new xr({color:0,visible:!1}),n=new Ft(r,i);return this.scene.add(n),n});v(this,"addEventListeners",()=>{let{domElement:r}=this.renderer;for(let i of Ch)i.endsWith("start")?this.on(i,this.setUserInteracting):i.endsWith("end")&&this.on(i,this.unsetUserInteracting);r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)});v(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)});v(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeEventListeners",()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"removeMouseUpEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"onContextMenu",r=>{r.preventDefault()});v(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}});v(this,"onMouseMove",r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(r)});v(this,"onTouchStart",r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new ac(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});v(this,"onTouchMove",r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let i={...this.touch.inputs.first},n={...this.touch.inputs.second},o=new z(this.touch.touches[0].x,this.touch.touches[0].y),a=new z(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let l=i.y<o.y&&n.y<a.y,c=i.y>o.y&&n.y>a.y;this.enableRotate&&this.state!==4&&(c||l)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}});v(this,"onTouchEnd",()=>{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}this.state=-1}});v(this,"handleTouchMovePan",r=>{let i=Object.hasOwn(r,"x")?new z(r.x,r.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panEnd.set(n.x,n.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")});v(this,"handleTouchStartDolly",()=>{let r=this.touch.touches[0].x-this.touch.touches[1].x,i=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let n=new z(this.touch.touches[0].x-r/2,this.touch.touches[0].y-i/2);this.coords.floorAnchor=this.raycastToFloor(n),this.orbit.updateMatrixWorld(),this.touch.anchor1=new ga(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new ga(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("multi-start")});v(this,"handleMouseMovePan",()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change")});v(this,"handleTouchStartTilt",r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});v(this,"handleTouchMovePedestal",r=>{this.handleMouseMovePedestal(r.touches[0])});v(this,"handleTouchMoveTilt",r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)});v(this,"handleTouchMoveDolly",()=>{let r=this.touch.inputs.first,i=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:i.x,y:i.y};let n=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);n&&this.setCameraFromTransformMatrix(n),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,i)});v(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end")});v(this,"handleTouchStartPan",r=>{let i=Object.hasOwn(r,"x")?new z(r.x,r.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panStart.set(n.x,n.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")});v(this,"handleTouchStartPedestal",r=>{this.handleMouseDownPedestal(r.touches[0])});v(this,"onMouseDown",r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});v(this,"onMouseWheel",r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(r))});v(this,"handleMouseWheel",r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let i=this.getZoomAltitude(),n=i-Mf(r)*i/B2*this.zoomSpeed;this.setZoomAltitude(n);let o=n/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-o),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y),this.publish("change")});v(this,"setCameraFromTransformMatrix",r=>{this.orbit.updateMatrixWorld();let i=new qi;i.setFromRotationMatrix(r,"ZYX");let n=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(i.x),o=i.z,a=new Y(0,0,1);a.applyEuler(i),a.setLength(n);let l=new Y;l.setFromMatrixPosition(r),l.sub(a),this.enablePan&&this.setPosition(l.x,l.y),this.enableZoom&&this.setZoomAltitude(n),this.enableRotate&&this.setRotation(o)});v(this,"makeTransformFromTouchAnchors",(r,i)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let n=this.camera.projectionMatrix.clone(),o=r.worldCoordinate,a=i.worldCoordinate,l=r.reUnproject(),c=i.reUnproject();if(!l||!c||!o||!a)return null;let h=r.viewCoordinate,d=i.viewCoordinate,y=a.x-o.x,m=a.y-o.y,x=Math.atan2(m,y),S=c.x-l.x,P=c.y-l.y,g=Math.atan2(P,S),C=bb(x,g),M=new ti;M.makeRotationZ(-C);let T=M.clone();T.multiply(r.snapHolderMatrix);let w=s((v3,b3,C3)=>v3.elements[(b3-1)*4+C3-1],"m"),E=w(n,1,1)*w(T,1,1)-h.x*w(n,3,4)*w(T,3,1),L=w(n,1,1)*w(T,1,2)-h.x*w(n,3,4)*w(T,3,2),R=w(n,1,1)*w(T,1,3)-h.x*w(n,3,4)*w(T,3,3),F=o.x*E+o.y*L+o.z*R,k=w(n,2,2)*w(T,2,1)-h.y*w(n,3,4)*w(T,3,1),G=w(n,2,2)*w(T,2,2)-h.y*w(n,3,4)*w(T,3,2),H=w(n,2,2)*w(T,2,3)-h.y*w(n,3,4)*w(T,3,3),Q=o.x*k+o.y*G+o.z*H,lt=w(n,1,1)*w(T,1,1)-d.x*w(n,3,4)*w(T,3,1),ht=w(n,1,1)*w(T,1,2)-d.x*w(n,3,4)*w(T,3,2),yt=w(n,1,1)*w(T,1,3)-d.x*w(n,3,4)*w(T,3,3),At=a.x*lt+a.y*ht+a.z*yt,ve=w(n,2,2)*w(T,2,1)-d.y*w(n,3,4)*w(T,3,1),Rt=w(n,2,2)*w(T,2,2)-d.y*w(n,3,4)*w(T,3,2),ut=w(n,2,2)*w(T,2,3)-d.y*w(n,3,4)*w(T,3,3),Ct=a.x*ve+a.y*Rt+a.z*ut,Je=Math.abs(lt-E),be=Math.abs(ht-L),ae=Math.abs(yt-R),jt=Math.abs(lt-k),ji=Math.abs(ht-G),zi=Math.abs(yt-H),Ui=Math.abs(ve-E),J=Math.abs(Rt-L),xt=Math.abs(ut-R),gt=Math.abs(ve-k),pe=Math.abs(Rt-G),Wi=Math.abs(ut-H),qn=Math.min(Je+be+ae,jt+ji+zi),Kr=Math.min(Ui+J+xt,gt+pe+Wi);qn<Kr&&(lt=ve,ht=Rt,yt=ut,At=Ct);let Nt=k*R-E*H,Qr=G*R-L*H,is=Q*R-F*H,$n=lt*H-k*yt,Jn=ht*H-G*yt,ns=At*H-Q*yt,f3=(ns*Qr-is*Jn)/($n*Qr-Nt*Jn),d3=(ns*Nt-is*$n)/(Jn*Nt-Qr*$n),Hd=G*E-L*k,m3=H*E-R*k,y3=Q*E-F*k,Xd=ht*k-G*lt,g3=yt*k-H*lt,Yd=((At*k-Q*lt)*Hd-y3*Xd)/(g3*Hd-m3*Xd),os=T.clone();return os.elements[12]=f3,os.elements[13]=d3,os.elements[14]=Yd,Yd>0?os:null});v(this,"updateTouchOrigin",()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top});v(this,"touchToScene",r=>{this.touch.touches=[];for(let i=0,n=r.touches.length;i<n;i++){let o=r.touches[i],a=Cb(o,this.touch.origin);this.touch.touches.push(new z(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]});v(this,"canScrollZoom",r=>{let i=Mf(r),n=this.getZoomAltitude();return!(i<0&&n===this.getZoomScaledMax()||i>0&&n===this.getZoomScaledMin())});v(this,"mouseToScene",r=>{let i=this.getMousePos(r);return this.coords.mouse.x=i.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(i.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse});v(this,"getMousePos",r=>({x:r.offsetX,y:r.offsetY}));v(this,"handleMouseDownRotate",r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});v(this,"handleMouseDownPan",()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")});v(this,"handleMouseDownPedestal",r=>{let i=new z(r.clientX,r.clientY);this.coords.initialShiftPos=i,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=Mh(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});v(this,"handleMouseMovePedestal",r=>{let i={x:r.clientX,y:r.clientY},n=this.coords.initialPedestal+this.pedestalScaleFactor*(i.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(n<this.minPedestal?n=Math.max(n,this.minPedestal):n>this.maxPedestal&&(n=Math.min(n,this.maxPedestal))),n!==this.getPedestal()&&this.setPedestal(n,!0)});v(this,"handleMouseMoveRotate",r=>{this.coords.rotateEnd.set(r.clientX,r.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.rotate(-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")});v(this,"publishUserZoomDebounced",Rn(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));v(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});v(this,"setUserInteracting",()=>{this.userInteracting=!0});v(this,"unsetUserInteracting",()=>{this.userInteracting=!1});v(this,"publishPedestalChangeEvent",r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});v(this,"convertAltitudeToZoomLevel",r=>{let[,i]=this.center,o=r*2*Math.tan(at.degToRad(this.camera.fov)/2)/this.options.canvasHeight,a=Math.cos(at.degToRad(i))*2*Math.PI*Xr/o;return at.clamp(Math.log2(a/512),vh,bh)});v(this,"convertZoomLevelToAltitude",r=>{let[,i]=this.center,n=at.clamp(r,vh,bh),o=Math.pow(2,n),a=at.clamp(i,R2,F2),l=o*512;return Math.cos(at.degToRad(a))*Math.PI*2*Xr/l*this.options.canvasHeight/2/Math.tan(at.degToRad(this.camera.fov)/2)});v(this,"completeTween",r=>{r.isPlaying?r.stop():r.end(),this.tweens.delete(r)});I(this,Li,{PIXELS:"pixels",PORTIONS:"portions"});I(this,sc,["top","bottom","left","right"]);v(this,"getCameraFrameForPoints",(r,i,n,o,a=!0,{canvasWidth:l,canvasHeight:c},h=this.minZoomAltitude,d=this.maxZoomAltitude)=>{Number.isFinite(n)&&(n=1),Number.isFinite(i)&&(i=1),h=Math.max(this.cameraPlane.position.z,h);let y={position:this.getPosition(),zoom:h};if(r==null||r.length===0)return y;o||(o={top:0,bottom:0,left:0,right:0,type:u(this,Li).PIXELS});for(let Nt of u(this,sc))typeof o[Nt]!="number"&&(o[Nt]=0);if(o.type||(o.type=u(this,Li).PIXELS),o.type===u(this,Li).PORTIONS&&(o={top:o.top*c,bottom:o.bottom*c,left:o.left*l,right:o.right*l,type:u(this,Li).PIXELS}),o.left+o.right>=l||o.top+o.bottom>=c)return y;this.orbit.updateMatrixWorld();let m=this.camera.matrixWorldInverse,x=this.camera.fov*(Math.PI/180)/2,S=x*n,g=Math.atan(Math.tan(x)*(l/c))*i;if(r.length===1){let Nt=r[0].clone();Nt.applyMatrix4(m);let Qr=h*Math.tan(g)*2,is=h*Math.tan(S)*2,$n=(o.left-o.right)/2/l,Jn=(o.top-o.bottom)/2/c,ns=new Y(-$n*Qr,Jn*is,0);return Nt.add(ns),Nt.applyMatrix4(this.camera.matrixWorld),y.position.x=Nt.x,y.position.y=Nt.y,y.position.z=Nt.z,y.zoom=Math.max(y.zoom,y.position.z),y}let C=new Y(1/0,1/0,1/0),M=new Y(-1/0,-1/0,-1/0),T=new Ne().setFromPoints(r),w;for(let Nt=0,Qr=r.length;Nt<Qr;Nt++)w=r[Nt].clone(),w.applyMatrix4(m),C.min(w),M.max(w);let E=M.x-C.x,L=M.y-C.y,R=l-o.left-o.right,F=c-o.top-o.bottom,k=(M.x+C.x)/2,G=(M.y+C.y)/2,H=E/R,Q=L/F,lt=h,ht=d,yt=lt*Math.tan(g)*2,At=ht*Math.tan(g)*2,ve=yt/l,Rt=At/l,ut=Math.max(H,Q);a&&(ut=Math.min(Math.max(ut,ve),Rt));let Ct=R*ut,Je=F*ut,be={min:{x:k-Ct/2-o.left*ut,y:G-Je/2-o.bottom*ut},max:{x:k+Ct/2+o.right*ut,y:G+Je/2+o.top*ut}},ae=(be.min.x+be.max.x)/2,jt=(be.min.y+be.max.y)/2,ji=T.getCenter(new Y),zi=Math.abs(ae-be.min.x),Ui=Math.abs(jt-be.min.y),J=zi/Math.tan(g),xt=Ui/Math.tan(S),gt=new Y;gt.set(ae,jt,M.z+Math.max(J,xt)),gt.applyMatrix4(this.camera.matrixWorld);let pe=new Y;pe.set(ae,jt,M.z),pe.applyMatrix4(this.camera.matrixWorld);let Wi=new Y().subVectors(pe,gt),qn=(ji.z-gt.z)/Wi.z,Kr=new Y().copy(gt).add(Wi.clone().multiplyScalar(qn));return y.position=Kr,pe.set(y.position.x,y.position.y,y.position.z),gt.sub(pe),y.zoom=gt.length(),y});this.camera=r,this.renderer=n,this.rendererState=o,this.scene=i,this.options=a,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,a.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r)}get scrollPercent(){let r=this.minPedestal,i=this.maxPedestal,n=this.getPedestal();return n=Math.min(n,i),n=Math.max(n,r),(n-r)/(i-r)*100}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 o,a,l,c;let r=this.getPosition(),{lat:i,lon:n}=vl((a=(o=this.rendererState.center)==null?void 0:o[1])!=null?a:0,(c=(l=this.rendererState.center)==null?void 0:l[0])!=null?c:0,r.x,r.y);return[n,i]}setCenter(r,i,n=0){var l,c,h,d;let{x:o,y:a}=bl((c=(l=this.rendererState.center)==null?void 0:l[1])!=null?c:0,(d=(h=this.rendererState.center)==null?void 0:h[0])!=null?d:0,i,r);return new Y(o,a,n)}focusOn(r,{insetsPadding:i},n={}){var g;let o=(g=n.changeZoom)!=null?g:!0,a=n.curve,l=1,c=1,h=n.callback,d=n.cancelledCallback,y=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,x=this.options.canvasWidth,S=this.options.canvasHeight,P;if(n.duration!==void 0?P=n.duration:b.env.TESTING==="true"?P=0:P=200,i.top!==0||i.bottom!==0||i.left!==0||i.right!==0)if(n.tilt!==void 0&&n.tilt!==this.getTilt()||n.rotation!==void 0&&n.rotation!==this.getRotation())this.animateCamera({position:this.getPosition(),tilt:n.tilt,rotation:n.rotation},P,a,()=>{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasWidth:x,canvasHeight:S},y,m);this.animateCamera({position:M.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:M.zoom},P,a,h,d)});else{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasWidth:x,canvasHeight:S},y,m);this.animateCamera({position:M.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:M.zoom},P,a,h,d)}else{let C=n.padding||i,M=this.getCameraFrameForPoints(r,l,c,C,o,{canvasHeight:S,canvasWidth:x},y,m);this.animateCamera({position:M.position,tilt:n.tilt,rotation:n.rotation,zoom:M.zoom},P,a,h,d)}}resize(r,i){this.options.canvasWidth=r,this.options.canvasHeight=i}};Li=new WeakMap,sc=new WeakMap,s(If,"CameraSystem");var ba=If;f();var dP=300,Ef=class Ef{state;constructor(t){this.state=t}update(t){var o;let r,i,n;for(let a of this.state.entity2DIds)r=this.state.entity2DMap.get(a),r&&(i=r.components[0],n=r.components[1],i instanceof de&&i.containerEl!=null&&((i.visible===!0||((o=i.animation)==null?void 0:o.pending)===!0)&&(i.containerEl.style.transform=`translate3D(${i.projection.x}px, ${i.projection.y}px, ${i.projection.y}px)`),i.visible===!0?i.containerEl.style.pointerEvents=t||n!=null?"none":"auto":i.containerEl.style.pointerEvents="none",i.visibilityNeedsUpdate&&(i.animation&&i.animation.cancel(),i.animation=i.containerEl.animate([{opacity:i.visible?"1":"0"}],{duration:dP,easing:"ease-in-out",fill:"forwards"}),i.visibilityNeedsUpdate=!1)))}};s(Ef,"DOMDrawSystem");var lc=Ef;f();var _f=class _f extends st{state;dirty=!0;domTree;observers=new Map;constructor(t,r){super(),this.state=t,this.domTree=r}setupObserver(){var r;if(this.observers){for(let i of this.observers.values())i.disconnect();this.observers.clear()}let t;for(let i of this.domTree.children){let n=i.getAttribute("data-marker-id");if(n!=null&&(t=this.state.entity2DMap.get(n),(r=t.components[0].options)!=null&&r.dynamicResize)){let o=new ResizeObserver(this.updateDimensions);o.observe(i),this.observers.set(i.userData.entityId,o)}}}updateDimensions=t=>{t.forEach(r=>{let i=r.target,n=i.getAttribute("data-marker-id");if(n){let o=this.state.entity2DMap.get(n);if(o&&o.components[0]instanceof de&&i.firstElementChild){let{width:a,height:l}=i.firstElementChild.getBoundingClientRect();o.components[0].updateDimensions(a,l)}}}),this.publish("dimensions-update")};update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let t of this.observers.values())t.disconnect();this.observers.clear()}};s(_f,"DOMResizeSystem");var cc=_f;f();var Ca=Cr(Fn());var mP=0,yP=22,gP=0,vP=90,Sb={linear:Ca.default.Easing.Linear.None,"ease-in":Ca.default.Easing.Quadratic.In,"ease-out":Ca.default.Easing.Quadratic.Out,"ease-in-out":Ca.default.Easing.Quadratic.InOut},ne,tt,Oi,xa,Lf=class Lf{constructor(t,r,i,n){I(this,ne,void 0);I(this,tt,void 0);I(this,Oi,void 0);I(this,xa,void 0);_(this,ne,t),_(this,tt,r),_(this,Oi,i),_(this,xa,n),u(this,tt).cameraSystem.on("pedestal-change",({pedestal:o})=>{u(this,ne).map&&(u(this,ne).map.transform.elevation=o,u(this,ne).map.transform.minElevationForCurrentTile=o,u(this,ne).map.triggerRepaint()),u(this,tt).cameraSystem.setCameraPlaneElevation(o),u(this,xa).position.z=o})}get center(){return u(this,tt).cameraSystem.center}setCenter(t){let r=u(this,tt).cameraSystem.setCenter(t[0],t[1]);u(this,tt).cameraSystem.setPosition(r.x,r.y)}get zoomLevel(){return u(this,tt).cameraSystem.getZoomLevel()}setZoomLevel(t){u(this,tt).cameraSystem.setZoomLevel(t)}get maxZoomLevel(){return u(this,tt).cameraSystem.maxZoomLevel}get minZoomLevel(){return u(this,tt).cameraSystem.minZoomLevel}setMinZoomLevel(t){var i;let r=Math.max(mP,t);u(this,tt).cameraSystem.setMinZoomLevel(r),(i=u(this,ne).map)==null||i.setMinZoom(r)}setMaxZoomLevel(t){var i;let r=Math.min(yP,t);(i=u(this,ne).map)==null||i.setMaxZoom(r),u(this,tt).cameraSystem.setMaxZoomLevel(r)}get maxPitch(){return at.radToDeg(u(this,tt).cameraSystem.maxTilt)}get minPitch(){return at.radToDeg(u(this,tt).cameraSystem.minTilt)}setMinPitch(t){var i;let r=Math.max(gP,t);(i=u(this,ne).map)==null||i.setMinPitch(r),u(this,tt).cameraSystem.minTilt=at.degToRad(r)}setMaxPitch(t){var i;let r=Math.min(vP,t);(i=u(this,ne).map)==null||i.setMaxPitch(r),u(this,tt).cameraSystem.maxTilt=at.degToRad(r)}get bearing(){return at.radToDeg(u(this,tt).cameraSystem.getRotation())}setBearing(t){u(this,tt).cameraSystem.setRotation(at.degToRad(t))}get pitch(){return at.radToDeg(u(this,tt).cameraSystem.getTilt())}setPitch(t){u(this,tt).cameraSystem.setTilt(at.degToRad(t))}get elevation(){return u(this,tt).cameraSystem.getPedestal()}setElevation(t){u(this,tt).cameraSystem.setPedestal(t,!0)}get insetsPadding(){return u(this,Oi).insetsPadding}setInsetPadding(t){u(this,Oi).center&&(u(this,Oi).insetsPadding=t?{...t}:Yl)}animateTo(t){let r=t.center?u(this,ne).convertTo3DMapPosition(t.center[1],t.center[0],0):void 0,i=t.zoomLevel!==void 0?u(this,tt).cameraSystem.convertZoomLevelToAltitude(t.zoomLevel):void 0,n=t.bearing!==void 0?at.degToRad(t.bearing):void 0,o=t.pitch!==void 0?at.degToRad(t.pitch):void 0;return new Promise(a=>{u(this,tt).cameraSystem.animateCamera({position:r,zoom:i,rotation:n,tilt:o},t.duration||0,Sb[t.easing||"ease-in-out"],a,a)})}focusOn(t,r){return new Promise(i=>{u(this,tt).cameraSystem.focusOn(t.map(n=>u(this,ne).convertTo3DMapPosition(n[1],n[0],n[2]||0)),{insetsPadding:(r==null?void 0:r.padding)||this.insetsPadding},{changeZoom:!0,updateZoomLimits:r==null?void 0:r.updateZoomLimits,minZoom:(r==null?void 0:r.maxZoomLevel)===void 0?void 0:u(this,tt).cameraSystem.convertZoomLevelToAltitude(r.maxZoomLevel),maxZoom:(r==null?void 0:r.minZoomLevel)===void 0?void 0:u(this,tt).cameraSystem.convertZoomLevelToAltitude(r.minZoomLevel),padding:(r==null?void 0:r.padding)||{top:0,left:0,bottom:0,right:0},curve:Sb[(r==null?void 0:r.easing)||"ease-in-out"],rotation:r!=null&&r.bearing?at.degToRad(r.bearing):void 0,tilt:r!=null&&r.pitch?at.degToRad(r.pitch):void 0,duration:r==null?void 0:r.duration,callback:i,cancelledCallback:i})})}};ne=new WeakMap,tt=new WeakMap,Oi=new WeakMap,xa=new WeakMap,s(Lf,"Camera");var uc=Lf;f();function Pb(e){e&&(e.map&&(e.map.dispose(),e.map=void 0),e.dispose())}s(Pb,"scrubMaterial");function mr(e){for(let t=e.children.length-1;t>=0;t--)mr(e.children[t]);"geometry"in e&&e.geometry&&e.geometry.dispose(),e.parent&&e.parent.remove(e),"material"in e&&Array.isArray(e.material)?e.material.forEach(function(t){Pb(t)}):"material"in e&&typeof e.material<"u"&&Pb(e.material)}s(mr,"destroyObject3D");f();var Mb="data:image/png;base64,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";var wb="data:image/png;base64,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";var Tb=`uniform vec4 uSize;
901
463
  varying vec2 vUv;
902
464
  void main() {
903
465
  vUv = uv;
@@ -909,7 +471,7 @@ void main() {
909
471
  // Apply left .w and top .z offset
910
472
  transformed += vec2(uSize.w, -uSize.z) * 2.0;
911
473
  gl_Position = vec4(transformed, 1.0, 1.0);
912
- }`;var $b=`varying vec2 vUv;
474
+ }`;var Ib=`varying vec2 vUv;
913
475
  uniform sampler2D uTexture;
914
476
  uniform float uOpacity;
915
477
  void main() {
@@ -919,7 +481,445 @@ void main() {
919
481
  #else
920
482
  gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
921
483
  #endif
922
- }`;f();var Jb=!1,Aa={padding:16,scale:1,iconOnly:!1,position:"bottom-left",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")}},vr,Ri,Yt,Tc,Fi,Na,ka,fd=class fd{constructor(t,r,i,n){v(this,"options");I(this,vr,new Ft);I(this,Ri,void 0);I(this,Yt,void 0);I(this,Tc,{logo:Wb,"logo-icon-slate":Zb});I(this,Fi,void 0);I(this,Na,0);I(this,ka,0);v(this,"getPositionAlignedCanvasCoordinates",(t,r)=>({"top-left":{x:0,y:0},"top-right":{x:t,y:0},"bottom-left":{x:0,y:r},"bottom-right":{x:t,y:r},center:{x:t/2,y:r/2},top:{x:t/2,y:0},bottom:{x:t/2,y:r},left:{x:0,y:r/2},right:{x:t,y:r/2}})[this.options.position]);v(this,"getPositionAlignedPadding",()=>{var i,n,o,a;let t=this.options.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}}[this.options.position];let r={top:(i=t.top)!=null?i:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(a=t.left)!=null?a:0};return{x:r.left-r.right,y:r.top-r.bottom}});var a,l,c,h,d;this.options={position:(a=n==null?void 0:n.position)!=null?a:Aa.position,padding:(l=n==null?void 0:n.padding)!=null?l:Aa.padding,scale:(c=n==null?void 0:n.scale)!=null?c:Aa.scale,iconOnly:(h=n==null?void 0:n.iconOnly)!=null?h:Aa.iconOnly,onClick:(d=n==null?void 0:n.onClick)!=null?d:Aa.onClick};let o=this.options.iconOnly?"logo-icon-slate":"logo";new Ji().load(u(this,Tc)[o],m=>{m.colorSpace=Wi,_(this,Ri,m);let y=new qi(2,2,1,1);_(this,Yt,new eo({uniforms:{uTexture:{value:m},uSize:{value:new Ud(1,1,0,0)},uOpacity:{value:.6}},vertexShader:qb,fragmentShader:$b,depthWrite:!1,depthTest:!1,defines:{debug:Jb},wireframe:Jb,transparent:!0,visible:!0})),_(this,vr,new Ft(y,u(this,Yt))),u(this,vr).position.set(0,0,-1),u(this,vr).frustumCulled=!1,u(this,vr).renderOrder=-1;let x=new qd(1,1,1),S=new Ft(x,new xr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));S.layers.set(1),u(this,vr).add(S),t.add(u(this,vr)),this.resize(r,i)})}setSize(t,r){u(this,Yt)&&(u(this,Yt).uniforms.uSize.value.x=t,u(this,Yt).uniforms.uSize.value.y=r)}setXY(t,r){u(this,Yt)&&(u(this,Yt).uniforms.uSize.value.w=t,u(this,Yt).uniforms.uSize.value.z=r)}getPositionAlignedOffset(t,r){return{"top-left":{x:0,y:0},"top-right":{x:-t,y:0},"bottom-left":{x:0,y:-r},"bottom-right":{x:-t,y:-r},center:{x:-(t/2),y:-(r/2)},top:{x:-(t/2),y:0},bottom:{x:-(t/2),y:-r},left:{x:0,y:-(r/2)},right:{x:-t,y:-(r/2)}}[this.options.position]}clampWithWarning(t,r,i,n){return r>=i?(Y.warn(`Watermark ${n} does not fit within given space.`),r):t<r||t>i?(Y.warn(`Watermark ${n} must be between ${r} and ${i}.`),at.clamp(t,r,i)):t}show(){if(!u(this,Yt)){Y.warn("Watermark material is not initialized.");return}u(this,Yt).visible=!0,this.resize(u(this,Na),u(this,ka))}hide(){if(!u(this,Yt)){Y.warn("Watermark material is not initialized.");return}u(this,Yt).visible=!1,_(this,Fi,void 0)}insertIntoQuadTree(t){u(this,Fi)!=null&&typeof this.options.onClick=="function"&&t.insert(u(this,Fi))}resize(t,r){if(!u(this,Ri)||!u(this,Yt)){Y.warn("Cannot resize Watermark. It is not initialized.");return}_(this,Na,t),_(this,ka,r);let i=this.options.scale,n=u(this,Ri).image.width/u(this,Ri).image.height,o=this.options.iconOnly?15:75,a=this.options.iconOnly?25:150,l=this.clampWithWarning(a*i,o,t,"width"),c=l/n,h=this.getPositionAlignedCanvasCoordinates(t,r),d=this.getPositionAlignedPadding(),m=this.getPositionAlignedOffset(l,c),y=this.clampWithWarning(h.x+d.x+m.x,0,t-l,"x"),x=this.clampWithWarning(h.y+d.y+m.y,0,r-c,"y");this.setSize(l/t,c/r),this.setXY(y/t,x/r),_(this,Fi,new _t(y,x,l,c,{entityId:"watermark"}))}};vr=new WeakMap,Ri=new WeakMap,Yt=new WeakMap,Tc=new WeakMap,Fi=new WeakMap,Na=new WeakMap,ka=new WeakMap,s(fd,"WatermarkSystem");var wc=fd;f();var dd=100,md=class md{currentTotalBoundingBox;state;cameraSystem;dirty=!1;constructor(t,r){this.state=t,this.cameraSystem=r}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Ne,this.state.entityScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new X(0,0,0),new X(dd*2,dd*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.entityScene),this.currentTotalBoundingBox.expandByScalar(dd))),this.currentTotalBoundingBox.expandByObject(this.state.entityScene);for(let t of this.state.entity2DMap.values())t.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(t.position),t.positionDirty=!1);this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new X),min:this.currentTotalBoundingBox.min,max:this.currentTotalBoundingBox.max,radius:this.currentTotalBoundingBox.getBoundingSphere(new Zd).radius},this.cameraSystem.dirty=!0,this.dirty=!1}}};s(md,"PanBoundsSystem");var Ic=md;f();var yd="\xA9 Mappedin",gd=["top-left","top-right","bottom-left","bottom-right"],FP=640,BP=s(()=>`<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>
484
+ }`;f();var Eb=!1,Sa={padding:16,scale:1,iconOnly:!1,position:"bottom-left",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")}},yr,Di,Xt,hc,Ai,Pa,Ma,Of=class Of{constructor(t,r,i,n){v(this,"options");I(this,yr,new Ft);I(this,Di,void 0);I(this,Xt,void 0);I(this,hc,{logo:Mb,"logo-icon-slate":wb});I(this,Ai,void 0);I(this,Pa,0);I(this,Ma,0);v(this,"getPositionAlignedCanvasCoordinates",(t,r)=>({"top-left":{x:0,y:0},"top-right":{x:t,y:0},"bottom-left":{x:0,y:r},"bottom-right":{x:t,y:r},center:{x:t/2,y:r/2},top:{x:t/2,y:0},bottom:{x:t/2,y:r},left:{x:0,y:r/2},right:{x:t,y:r/2}})[this.options.position]);v(this,"getPositionAlignedPadding",()=>{var i,n,o,a;let t=this.options.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}}[this.options.position];let r={top:(i=t.top)!=null?i:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(a=t.left)!=null?a:0};return{x:r.left-r.right,y:r.top-r.bottom}});var a,l,c,h,d;this.options={position:(a=n==null?void 0:n.position)!=null?a:Sa.position,padding:(l=n==null?void 0:n.padding)!=null?l:Sa.padding,scale:(c=n==null?void 0:n.scale)!=null?c:Sa.scale,iconOnly:(h=n==null?void 0:n.iconOnly)!=null?h:Sa.iconOnly,onClick:(d=n==null?void 0:n.onClick)!=null?d:Sa.onClick};let o=this.options.iconOnly?"logo-icon-slate":"logo";new Ki().load(u(this,hc)[o],y=>{y.colorSpace=Zi,_(this,Di,y);let m=new $i(2,2,1,1);_(this,Xt,new eo({uniforms:{uTexture:{value:y},uSize:{value:new Wd(1,1,0,0)},uOpacity:{value:.6}},vertexShader:Tb,fragmentShader:Ib,depthWrite:!1,depthTest:!1,defines:{debug:Eb},wireframe:Eb,transparent:!0,visible:!0})),_(this,yr,new Ft(m,u(this,Xt))),u(this,yr).position.set(0,0,-1),u(this,yr).frustumCulled=!1,u(this,yr).renderOrder=-1;let x=new $d(1,1,1),S=new Ft(x,new xr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));S.layers.set(1),u(this,yr).add(S),t.add(u(this,yr)),this.resize(r,i)})}setSize(t,r){u(this,Xt)&&(u(this,Xt).uniforms.uSize.value.x=t,u(this,Xt).uniforms.uSize.value.y=r)}setXY(t,r){u(this,Xt)&&(u(this,Xt).uniforms.uSize.value.w=t,u(this,Xt).uniforms.uSize.value.z=r)}getPositionAlignedOffset(t,r){return{"top-left":{x:0,y:0},"top-right":{x:-t,y:0},"bottom-left":{x:0,y:-r},"bottom-right":{x:-t,y:-r},center:{x:-(t/2),y:-(r/2)},top:{x:-(t/2),y:0},bottom:{x:-(t/2),y:-r},left:{x:0,y:-(r/2)},right:{x:-t,y:-(r/2)}}[this.options.position]}clampWithWarning(t,r,i,n){return r>=i?(X.warn(`Watermark ${n} does not fit within given space.`),r):t<r||t>i?(X.warn(`Watermark ${n} must be between ${r} and ${i}.`),at.clamp(t,r,i)):t}show(){if(!u(this,Xt)){X.warn("Watermark material is not initialized.");return}u(this,Xt).visible=!0,this.resize(u(this,Pa),u(this,Ma))}hide(){if(!u(this,Xt)){X.warn("Watermark material is not initialized.");return}u(this,Xt).visible=!1,_(this,Ai,void 0)}insertIntoQuadTree(t){u(this,Ai)!=null&&typeof this.options.onClick=="function"&&t.insert(u(this,Ai))}resize(t,r){if(!u(this,Di)||!u(this,Xt)){X.warn("Cannot resize Watermark. It is not initialized.");return}_(this,Pa,t),_(this,Ma,r);let i=this.options.scale,n=u(this,Di).image.width/u(this,Di).image.height,o=this.options.iconOnly?15:75,a=this.options.iconOnly?25:150,l=this.clampWithWarning(a*i,o,t,"width"),c=l/n,h=this.getPositionAlignedCanvasCoordinates(t,r),d=this.getPositionAlignedPadding(),y=this.getPositionAlignedOffset(l,c),m=this.clampWithWarning(h.x+d.x+y.x,0,t-l,"x"),x=this.clampWithWarning(h.y+d.y+y.y,0,r-c,"y");this.setSize(l/t,c/r),this.setXY(m/t,x/r),_(this,Ai,new Et(m,x,l,c,{entityId:"watermark"}))}};yr=new WeakMap,Di=new WeakMap,Xt=new WeakMap,hc=new WeakMap,Ai=new WeakMap,Pa=new WeakMap,Ma=new WeakMap,s(Of,"WatermarkSystem");var pc=Of;f();var Df=100,Af=class Af{currentTotalBoundingBox;state;cameraSystem;dirty=!1;constructor(t,r){this.state=t,this.cameraSystem=r}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Ne,this.state.entityScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new Y(0,0,0),new Y(Df*2,Df*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.entityScene),this.currentTotalBoundingBox.expandByScalar(Df))),this.currentTotalBoundingBox.expandByObject(this.state.entityScene);for(let t of this.state.entity2DMap.values())t.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(t.position),t.positionDirty=!1);this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new Y),min:this.currentTotalBoundingBox.min,max:this.currentTotalBoundingBox.max,radius:this.currentTotalBoundingBox.getBoundingSphere(new qd).radius},this.cameraSystem.dirty=!0,this.dirty=!1}}};s(Af,"PanBoundsSystem");var fc=Af;f();var Nf="\xA9 Mappedin",kf=["top-left","top-right","bottom-left","bottom-right"],IP=640,EP=s(()=>`<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>
923
485
  <circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/>
924
486
  <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'/>
925
- </svg>`,"getAttributionButtonIcon"),Kb={position:"bottom-right"},vd=class vd{controlContainerEl;controlPositions;compact=void 0;attribContainerEl;attribInnerEl;attribButtonEl;attribHTML=yd;constructor(t){this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=gd.reduce((r,i)=>{let n=document.createElement("div");return n.classList.add(`mappedin-ctrl-${i}`),this.controlContainerEl.appendChild(n),r[i]=n,r},{})}addAttributionControl(t=Kb){let r=gd.includes(t.position)?t.position:Kb.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib",`mappedin-ctrl-attrib-${r}`),this.attribContainerEl.open=!0,this.attribContainerEl.tabIndex=0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=BP(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribInnerEl.innerHTML=yd,this.attribContainerEl.appendChild(this.attribInnerEl)}toggleAttribution=t=>{this.attribContainerEl!=null&&(t.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))};updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=[yd],i=t.style.sourceCaches;for(let o in i){let a=i[o];if(a.used||a.usedForTerrain){let l=a.getSource();l.attribution&&r.indexOf(l.attribution)<0&&r.push(l.attribution)}}r=r.filter(o=>String(o).trim()),r.sort((o,a)=>o.length-a.length),r=r.filter((o,a)=>{for(let l=a+1;l<r.length;l++)if(r[l].indexOf(o)>=0)return!1;return!0});let n=r.join(" ");n!==this.attribHTML&&(this.attribHTML=n,r.length?(this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.classList.remove("outdoor-attrib-empty")):this.attribContainerEl.classList.add("mappedin-attrib-empty"),this.resizeAttribution(t.getCanvasContainer().offsetWidth))}resizeAttribution(t){this.attribContainerEl&&(t<=FP||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};s(vd,"HTMLControlsSystem");var Ec=vd;f();var Fa,bd=class bd{constructor(t,r){v(this,"mesh");v(this,"type","custom-geometry");v(this,"dirty",!0);v(this,"feature");v(this,"builder");v(this,"outline");v(this,"color",new Mt);I(this,Fa,0);this.mesh=new je,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}setOpacity(){}setColor(){}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return u(this,Fa)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,Fa,t))}};Fa=new WeakMap,s(bd,"CustomGeometryComponent");var Ra=bd;f();var Cd=class Cd{state;constructor(t){this.state=t}update(){let t,r;for(let i of this.state.threeDEntities){let n=this.state.entity3DMap.get(i);(n==null?void 0:n.type)==="custom-geometry"&&(t=n.components[0],r=n.components[1],t.dirty&&r.visible!==!1&&(t.builder.setup(t.mesh),t.mesh.traverse(o=>{o.userData={entityId:i,type:"custom-geometry"}}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}}};s(Cd,"CustomGeometrySystem");var _c=Cd;f();f();var xd=class xd{rendererState;dirty=!0;constructor(t){this.rendererState=t}update(t,r=!1){if((r&&t>=16&&t<=19||this.dirty)&&this.rendererState.threeDEntities.length>0){let n=Zt(t,16,19,0,30),o;for(let a of this.rendererState.threeDEntities)if(o=this.rendererState.entity3DMap.get(a),(o==null?void 0:o.type)==="geometry-group"){let l=o.userData.entities3D.values().next().value,c=this.rendererState.entity3DMap.get(l);if((c==null?void 0:c.type)==="geometry"){let h=c.components[0],d=c.components[1];if(d.visible!==!1&&h.outline&&h.outline.visible){let m=B(d.initialColor).darken(n).toRgbString();h.setOutlineColor(m)}}}}this.dirty=!1}};s(xd,"OutlineInterpolationSystem");var Lc=xd;var e3=new Pr,wd=18,Td=0,Id=0;var VP=at.radToDeg(.698132),oe,Dt,Ba,jn,Jr,Bi,Gi,Vi,zn,Ga,Pd,N,nt,De,mt,$e,ge,D,Va,bt,yt,Oc,r3,Dc,i3,Ac,n3,Hi,Ha,Xa,Un,Nc,Ya,ja,za,Wn,ue,Oe,Ua,Md,Kt,Qt,_d=class _d extends st{constructor(r,i={}){var y,x,S,P,g,C,M,T,w,E;super();I(this,Ga);I(this,Oc);I(this,Dc);I(this,Ac);I(this,ue);I(this,Ua);v(this,"options");v(this,"container");I(this,oe,void 0);I(this,Dt,void 0);I(this,Ba,void 0);I(this,jn,void 0);I(this,Jr,void 0);I(this,Bi,void 0);I(this,Gi,void 0);I(this,Vi,void 0);I(this,zn,void 0);v(this,"rendererDomElement");I(this,N,{entity3DMap:new Map,entity2DMap:new Map,entity2DIds:new Set,threeDEntities:[],entityScene:new re("__scene"),hoverColor:"red",insetsPadding:ic,shouldMeasureCanvas:!0,pixelRatio:Ur()});v(this,"camera");I(this,nt,void 0);I(this,De,void 0);I(this,mt,void 0);I(this,$e,void 0);I(this,ge,void 0);I(this,D,{});I(this,Va,window.matchMedia("screen and (min-resolution: 2dppx)"));v(this,"map");I(this,bt,s(()=>{u(this,D).renderSystem.twoDdirty=!0},"#invalidate2DEntities"));I(this,yt,s(()=>{u(this,D).renderSystem.threeDdirty=!0},"#invalidate3DEntities"));I(this,Hi,"standalone");I(this,Ha,s(r=>Math.trunc(r*10)/10,"#round10"));I(this,Xa,s(()=>{u(this,D).twoDDrawSystem.dirty=!0,j(this,Ga,Pd).call(this,Ur()),this.render()},"#handlePixelRatioChange"));I(this,Un,s(()=>{_(this,Bi,this.rendererDomElement.clientWidth),_(this,Gi,this.rendererDomElement.clientHeight),j(this,Ga,Pd).call(this,Ur()),u(this,Wn).call(this),j(this,Ac,n3).call(this),u(this,D).cameraSystem.resize(this.canvasWidth,this.canvasHeight),u(this,D).cameraSystem.dirty=!0,u(this,D).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),u(this,D).htmlControlsSystem.resize(this.canvasWidth),this.render()},"#handleWindowResize"));I(this,Nc,s(()=>{this.renderSync()},"#renderFull"));I(this,Ya,new X);I(this,ja,s((r,i)=>{let n=this.mode==="standalone"?u(this,Dt):this.viewCamera;if(u(this,Dt).position.z+this.camera.elevation>i.z){u(this,Ya).copy(i);let o=u(this,Ya).project(n),a=(o.x+1)/2*this.canvasWidth-0/2,l=(-o.y+1)/2*this.canvasHeight-0/2,c=u(this,Ha).call(this,a),h=u(this,Ha).call(this,l);r.x=c,r.y=h}else r.x=-1e3,r.y=-1e3},"#project"));I(this,za,s((r,i)=>{u(this,ge).setBufferSize(r,i),u(this,Dt).aspect=r/i,u(this,Dt).updateProjectionMatrix(),u(this,Dt).updateMatrixWorld(!0),u(this,jn).x=r,u(this,jn).y=i},"#setBufferSize"));I(this,Wn,s(()=>{var a;let r=_(this,Bi,this.rendererDomElement.clientWidth),i=_(this,Gi,this.rendererDomElement.clientHeight),n=Math.floor(r*this.resolutionScale),o=Math.floor(i*this.resolutionScale);u(this,za).call(this,n,o),(a=this.map)==null||a.resize(),u(this,N).shouldMeasureCanvas=!1},"#measureCanvas"));v(this,"showCollisionBoxes",()=>{u(this,D).collisionSystem.showCollisionBoxes(),this.render()});v(this,"hideCollisionBoxes",()=>{u(this,D).collisionSystem.hideCollisionBoxes(),this.render()});v(this,"projectScreenXYToCoordinate",(r,i)=>{var c;let n=r/this.canvasWidth*2-1,o=-(i/this.canvasHeight)*2+1,a=new z(n,o);e3.setFromCamera(a,u(this,Dt).clone());let l=(c=e3.intersectObject(u(this,Jr),!1)[0])==null?void 0:c.point;return l!=null?this.convert3DMapPositionToCoordinate(l):void 0});v(this,"projectCoordinateToScreenXY",r=>{let i=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),n=new z;return u(this,ja).call(this,n,i),{x:n.x,y:n.y}});v(this,"convertTo3DMapPosition",(r,i,n=0,o)=>{var c,h,d,m;let{x:a,y:l}=Al((h=(c=u(this,N).center)==null?void 0:c[1])!=null?h:0,(m=(d=u(this,N).center)==null?void 0:d[0])!=null?m:0,r,i);return o?(o.set(a,l,n),o):new X(a,l,n)});v(this,"convert3DMapPositionToCoordinate",r=>{var o,a,l,c;let{lat:i,lon:n}=Dl((a=(o=u(this,N).center)==null?void 0:o[1])!=null?a:0,(c=(l=u(this,N).center)==null?void 0:l[0])!=null?c:0,r.x,r.y);return[n,i]});v(this,"setBackgroundColor",(r,i)=>{u(this,ge).setBackgroundColor(r,i)});v(this,"render",()=>{u(this,D).renderSystem!=null&&(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay")?this.map.triggerRepaint():u(this,D).renderSystem.update())});v(this,"renderSync",()=>{u(this,D).renderSystem.update(!0)});I(this,Kt,Yn(()=>{this.publish("user-interaction-start",void 0)},0,!0));I(this,Qt,Yn(()=>{this.publish("user-interaction-end",void 0)},0,!0));v(this,"on",(r,i)=>{super.on(r,i),r==="outdoor-view-loaded"&&this.mode==="standalone"&&(Y.warn('"outdoor-view-loaded" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.'),this.publish("outdoor-view-loaded"))});v(this,"off",(r,i)=>{super.off(r,i)});v(this,"getCursor",()=>u(this,D).interactionSystem.getCursor());v(this,"destroy",()=>{u(this,D).cameraSystem.off("user-dolly-start",u(this,Kt)),u(this,D).cameraSystem.off("user-pan-start",u(this,Kt)),u(this,D).cameraSystem.off("user-rotate-start",u(this,Kt)),u(this,D).cameraSystem.off("user-zoom-start",u(this,Kt)),u(this,D).cameraSystem.off("user-tilt-start",u(this,Kt)),u(this,D).cameraSystem.off("user-pedestal-start",u(this,Kt)),u(this,D).cameraSystem.off("user-dolly-end",u(this,Qt)),u(this,D).cameraSystem.off("user-pan-end",u(this,Qt)),u(this,D).cameraSystem.off("user-rotate-end",u(this,Qt)),u(this,D).cameraSystem.off("user-zoom-end",u(this,Qt)),u(this,D).cameraSystem.off("user-tilt-end",u(this,Qt)),u(this,D).cameraSystem.off("user-pedestal-end",u(this,Qt)),u(this,D).renderSystem.off("measure-canvas",u(this,Wn)),this.remove("__scene"),u(this,bt).call(this),u(this,yt).call(this),this.renderSync(),u(this,D).renderSystem.destroy(),u(this,D).zoomInterpolationSystem.destroy(),u(this,D).renderSystem.destroy(),u(this,D).cameraSystem.off("change",this.render),u(this,D).cameraSystem.dispose(),u(this,D).exporterSystem.destroy(),window.removeEventListener("resize",u(this,Un),!1),u(this,Va).removeEventListener("change",u(this,Xa)),u(this,Vi)&&u(this,Vi).disconnect(),this._subscribers={},u(this,ge).destroy(),u(this,oe).traverse(r=>{gr(r),"dispose"in r&&typeof r.dispose=="function"&&r.dispose()}),_(this,oe,void 0),u(this,D).htmlControlsSystem.destroy(),u(this,D).collisionSystem.destroy(),u(this,D).domMutationSystem.destroy(),_(this,D,void 0),this.map&&(this.map.transform.getElevation=void 0,this.map.remove()),this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement),this.container.removeChild(u(this,$e)),this.container.removeChild(u(this,nt)),_(this,ge,void 0)});(i.mode==="outdoors-interleaved"||i.mode==="outdoors-overlay")&&i.map&&(_(this,Hi,i.mode),this.map=i.map),u(this,N).entityScene.addEventListener("childadded",()=>{u(this,yt).call(this),u(this,bt).call(this)}),u(this,N).entityScene.addEventListener("childremoved",()=>{u(this,yt).call(this),u(this,bt).call(this)}),u(this,N).entity3DMap.set(u(this,N).entityScene.userData.entityId,u(this,N).entityScene),i.center&&(u(this,N).center=i.center?[...i.center]:[0,0]),this.options=i,this.container=r,j(this,Oc,r3).call(this),j(this,Dc,i3).call(this),u(this,D).htmlControlsSystem=new Ec(this.container),u(this,Hi)!=="outdoors-overlay"&&u(this,D).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),b.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),_(this,ge,new Ll({antialias:typeof i.antialias=="boolean"?i.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(y=i.gl)==null?void 0:y.canvas:void 0,onWebGLContextCreationError:i.onWebGLContextCreationError,onWebGLContextLost:()=>{typeof i.onWebGLContextLost=="function"&&i.onWebGLContextLost()},onWebGLContextRestored:()=>{i.onWebGLContextRestored&&i.onWebGLContextRestored(),u(this,bt).call(this),u(this,yt).call(this),this.render()},onWebGLRendererError:i.onWebGLRendererError,backgroundColor:i.backgroundColor||"#ffffff",backgroundAlpha:(x=i.backgroundAlpha)!=null?x:1})),_(this,oe,new as),u(this,oe).add(u(this,N).entityScene);let n=window.__THREE_DEVTOOLS__;b.env.NODE_ENV==="dev"&&typeof n<"u"&&(n.dispatchEvent(new CustomEvent("observe",{detail:u(this,oe)})),n.dispatchEvent(new CustomEvent("observe",{detail:u(this,ge)}))),_(this,Dt,new Jd(VP,this.aspect,50,1e5)),_(this,Ba,new $d),u(this,Dt).renderOrder=999;let o=new Ce;o.add(u(this,Dt)),_(this,zn,new Ce),u(this,zn).add(o),u(this,oe).add(u(this,zn)),u(this,Dt).updateProjectionMatrix(),u(this,Dt).updateMatrixWorld(!0),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=u(this,ge).domElement(),_(this,jn,new z);let a=new qi(1e6,1e6),l=new xr({color:0,visible:!1});_(this,Jr,new Ft(a,l)),u(this,oe).add(u(this,Jr)),(S=i.gl)!=null&&S.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",u(this,Un),!1),u(this,Va).addEventListener("change",u(this,Xa)),typeof ResizeObserver=="function"&&((P=b.env)==null?void 0:P.NODE_ENV)!=="test"&&(_(this,Vi,new ResizeObserver(Yn(()=>{u(this,Un).call(this)},0))),(g=u(this,Vi))==null||g.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(C=globalThis.MappedinDebug)!=null&&C.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(M=globalThis.MappedinDebug)!=null&&M.TEST_IOS?"1920px":"100%",_(this,Bi,this.rendererDomElement.clientWidth),_(this,Gi,this.rendererDomElement.clientHeight),this.rendererDomElement.style.touchAction="manipulation";let c=this.canvasWidth,h=this.canvasHeight;u(this,D).watermarkSystem=new wc(u(this,Dt),c,h,i==null?void 0:i.watermark),u(this,N).shouldMeasureCanvas=!0,u(this,N).pixelRatio=this.resolutionScale,u(this,za).call(this,Math.floor(c*this.resolutionScale),Math.floor(h*this.resolutionScale));let d=new cs(16777215,.3*Math.PI);d.position.set(-150,-150,350),u(this,oe).add(d);let m=new am(16777215,.741*Math.PI);u(this,oe).add(m),u(this,D).cameraSystem=new La(u(this,Dt),u(this,oe),u(this,ge).renderer,u(this,N),{mode:this.mode,canvasHeight:h,canvasWidth:c}),u(this,D).cameraSystem.on("user-dolly-start",u(this,Kt)),u(this,D).cameraSystem.on("user-pan-start",u(this,Kt)),u(this,D).cameraSystem.on("user-rotate-start",u(this,Kt)),u(this,D).cameraSystem.on("user-zoom-start",u(this,Kt)),u(this,D).cameraSystem.on("user-tilt-start",u(this,Kt)),u(this,D).cameraSystem.on("user-pedestal-start",u(this,Kt)),u(this,D).cameraSystem.on("user-dolly-end",u(this,Qt)),u(this,D).cameraSystem.on("user-pan-end",u(this,Qt)),u(this,D).cameraSystem.on("user-rotate-end",u(this,Qt)),u(this,D).cameraSystem.on("user-zoom-end",u(this,Qt)),u(this,D).cameraSystem.on("user-tilt-end",u(this,Qt)),u(this,D).cameraSystem.on("user-pedestal-end",u(this,Qt)),u(this,D).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),this.render()}),u(this,D).panBoundsSystem=new Ic(u(this,N),u(this,D).cameraSystem),this.camera=new Mc(this,u(this,D),u(this,N),u(this,Jr)),this.camera.setZoomLevel((T=i.zoomLevel)!=null?T:wd),this.camera.setBearing((w=i.bearing)!=null?w:Id),this.camera.setPitch((E=i.pitch)!=null?E:Td),this.camera.setMaxZoomLevel(22),u(this,D).domVisiblitySystem=new hc(u(this,N),u(this,$e)),u(this,D).domMutationSystem=new Pc(u(this,N),u(this,$e)),u(this,D).domMutationSystem.on("dimensions-update",()=>{u(this,D).collisionSystem.dirty=!0,this.render()}),u(this,D).domDrawSystem=new Sc(u(this,N)),u(this,D).collisionSystem=new Rl(u(this,De),u(this,N)),u(this,D).twoDDrawSystem=new dc(u(this,N),u(this,mt)),u(this,D).interactionSystem=new na(this.rendererDomElement,u(this,N),u(this,Dt),u(this,Jr)),u(this,D).interactionSystem.on("hover",this.render),u(this,D).interactionSystem.on("click",L=>{var R,F,k,G;if(((R=L.entity2D)==null?void 0:R.id)==="watermark"&&typeof u(this,D).watermarkSystem.options.onClick=="function"){u(this,D).watermarkSystem.options.onClick();return}this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(L.position),geometry:L.entity3D?[(F=L.entity3D)==null?void 0:F.id]:[],markers:((k=L.entity2D)==null?void 0:k.components[0])instanceof me?[L.entity2D.id]:[],labels:((G=L.entity2D)==null?void 0:G.components[0])instanceof Ue?[L.entity2D.id]:[],pointerEvent:L.pointerEvent})}),u(this,D).interactionSystem.on("hover",L=>{var R,F,k,G;L.position&&((R=L.entity2D)==null?void 0:R.id)!=="watermark"&&this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(L.position),geometry:L.entity3D?[(F=L.entity3D)==null?void 0:F.id]:[],markers:((k=L.entity2D)==null?void 0:k.components[0])instanceof me?[L.entity2D.id]:[],labels:((G=L.entity2D)==null?void 0:G.components[0])instanceof Ue?[L.entity2D.id]:[]})}),u(this,D).twoDVisiblitySystem=new yc(u(this,N)),u(this,D).drawSystem=new mc(u(this,N)),u(this,D).stackSystem=new bc(u(this,N)),u(this,D).twoDProjectionSystem=new fc(u(this,N),u(this,ja)),u(this,D).zoomInterpolationSystem=new ql,u(this,D).exporterSystem=new ya(u(this,N)),u(this,D).meshOptimizationSystem=new pc(u(this,N),this.convertTo3DMapPosition),u(this,D).customGeometrySystem=new _c(u(this,N)),u(this,D).outlineInterpolationSystem=new Lc(u(this,N)),u(this,D).renderSystem=new gc(u(this,ge),u(this,N),this.mode,u(this,oe),u(this,Dt),this.viewCamera,u(this,D)),u(this,D).renderSystem.on("measure-canvas",u(this,Wn)),u(this,Nc).call(this)}get viewCamera(){return u(this,Ba)}get canvasWidth(){return u(this,Bi)}get canvasHeight(){return u(this,Gi)}get resolutionScale(){var r,i;return(i=(r=this.map)==null?void 0:r.getPixelRatio())!=null?i:Ur()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return u(this,Hi)}addGroupContainer(r,i,n){var a;let o=new re(r);return o.addEventListener("childadded",()=>{u(this,yt).call(this),u(this,bt).call(this)}),o.addEventListener("childremoved",()=>{u(this,yt).call(this),u(this,bt).call(this)}),(i==null?void 0:i.visible)!==void 0&&(o.visible=i.visible),(i==null?void 0:i.altitude)!==void 0&&o.setAltitude(i.altitude),u(this,N).entity3DMap.set(r,o),(a=j(this,ue,Oe).call(this,n))==null||a.addEntity(o),u(this,yt).call(this),this.render(),{id:r,type:"group-container"}}addStackContainer(r,i,n){var a;let o=new re(r);return o.addEventListener("childadded",()=>{u(this,yt).call(this),u(this,bt).call(this)}),o.addEventListener("childremoved",()=>{u(this,yt).call(this),u(this,bt).call(this)}),o.components[0]=new An,(i==null?void 0:i.visible)!==void 0&&(o.visible=i.visible),u(this,N).entity3DMap.set(r,o),(a=j(this,ue,Oe).call(this,n))==null||a.addEntity(o),{id:r,type:"stack-container"}}addCustomGeometry(r,i,n,o,a){var h;let l=new Ra(i,n),c=new Pt(l,new Wr(o));return c.id=r||ft(),l.mesh.userData={entityId:c.id,type:"custom-geometry"},u(this,N).entity3DMap.set(c.id,c),(h=j(this,ue,Oe).call(this,a))==null||h.addEntity(c),this.render(),{id:c.id,type:"custom-geometry"}}addGeometryGroup(r,i,n,o){var l,c;let a=new de(r);a.addEventListener("childadded",()=>{u(this,yt).call(this),u(this,bt).call(this)}),a.addEventListener("childremoved",()=>{u(this,yt).call(this),u(this,bt).call(this)}),a.userData.dirty=!0,u(this,N).entity3DMap.set(r,a);for(let h of i.features){if(!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(h.geometry.type))continue;let d=h.id||h.properties.id||ft(),m=u(this,D).meshOptimizationSystem.createEntityFromFeature(d,h,n);u(this,N).entity3DMap.set(d,m),a.userData.entities3D.add(d)}return a.setVisible((l=n==null?void 0:n.visible)!=null?l:!0),(c=j(this,ue,Oe).call(this,o))==null||c.addEntity(a),u(this,yt).call(this),this.render(),{id:r,type:"geometry-group"}}addModelGroup(r,i,n,o){var l;let a=new de(r);a.addEventListener("childadded",()=>{u(this,yt).call(this),u(this,bt).call(this)}),a.addEventListener("childremoved",()=>{u(this,yt).call(this),u(this,bt).call(this)}),a.userData.dirty=!0,a.userData.modelURL=n.url;for(let c of i.features){let h=c.id||c.properties.id||ft(),d=u(this,D).meshOptimizationSystem.createModelFromFeature(h,c,n);u(this,N).entity3DMap.set(h,d),a.userData.entities3D.add(h)}return u(this,N).entity3DMap.set(r,a),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(a),u(this,yt).call(this),this.render(),{id:r,type:"geometry-group"}}addMarker2D(r,i,n,o){var l;let a=j(this,Ua,Md).call(this,r,new me(i,n));return(n==null?void 0:n.interactive)!=null&&Ze(a,n==null?void 0:n.interactive,u(this,N)),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(a),this.render(),{id:a.id,type:"marker"}}addLabel2D(r,i,n,o){var l;if(n!=null&&n.id&&u(this,N).entity2DIds.has(n==null?void 0:n.id))return{id:n.id};let a=j(this,Ua,Md).call(this,r,new Ue(i,n||{},u(this,N)));return a.id=(n==null?void 0:n.id)||a.id,(n==null?void 0:n.interactive)!=null&&Ze(a,n==null?void 0:n.interactive,u(this,N)),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(a),u(this,bt).call(this),this.render(),{id:a.id,type:"label"}}addPath(r,i={},n){var l;let o=new vc(r.features.map(c=>c.geometry.coordinates).map(c=>this.convertTo3DMapPosition(c[1],c[0],c[2]||0)),i),a=new Pt(o,new Wr);return a.id=(i==null?void 0:i.id)||ft(),o.mesh.userData={entityId:a.id,type:"path"},u(this,N).entity3DMap.set(a.id,a),(i==null?void 0:i.interactive)!=null&&Ze(a,i==null?void 0:i.interactive,u(this,N)),(l=j(this,ue,Oe).call(this,n))==null||l.addEntity(a),u(this,yt).call(this),this.render(),{id:a.id,type:"path"}}updateStackState(r,i){let n;(typeof r=="string"||typeof r=="number")&&(n=u(this,N).entity3DMap.get(r)),n!=null&&n.components[0]&&(typeof i.activeId<"u"&&(n.components[0].activeId=i.activeId),typeof i.expandedFactor<"u"&&(n.components[0].percentExpanded=i.expandedFactor),n.components[0].dirty=!0,this.render())}remove(r){let i;if(typeof r=="string"||typeof r=="number"?(i=u(this,N).entity2DMap.get(r),i==null&&(i=u(this,N).entity3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(i=u(this,N).entity2DMap.get(r.id),i==null&&(i=u(this,N).entity3DMap.get(r.id))):i=r,i!=null){if(i.type==="custom-geometry")u(this,N).entity3DMap.delete(i.id),i.object3d&&gr(i.object3d);else if(i.type==="group-container"){u(this,N).entity3DMap.delete(i.userData.entityId);for(let n of i.childrenIds.values())this.remove(n),i.userData.entities2D.delete(n);gr(i)}else if(i.type==="geometry-group"){u(this,N).entity3DMap.delete(i.userData.entityId);for(let n of i.userData.entities3D.values())this.remove(n),i.userData.entities3D.delete(n);gr(i)}else i.type==="geometry"||i.type==="model"||i.type==="path"?(i.object3d&&gr(i.object3d),i.components[0].outline&&gr(i.components[0].outline),u(this,N).entity3DMap.delete(i.id)):(i.type==="marker"||i.type==="label")&&(i.object3d&&gr(i.object3d),i.type==="label"&&delete u(this,D).twoDDrawSystem.textCache[i.id],u(this,N).entity2DMap.delete(i.id));u(this,yt).call(this),u(this,bt).call(this),this.render()}}getScene(){return this.getState("__scene")}getCurrentSceneGLTF(r){return u(this,D).exporterSystem.getCurrentSceneGLTF(r)}getBoundingBox(r){if(this.renderSync(),r==null){let n=new Ne;n.setFromObject(u(this,N).entityScene);let o=n.min,a=n.max;return[this.convert3DMapPositionToCoordinate(o),this.convert3DMapPositionToCoordinate(a)]}let i=Nl(u(this,N),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let n=new Ne;return n.setFromObject(i.object3d),[this.convert3DMapPositionToCoordinate(n.min),this.convert3DMapPositionToCoordinate(n.max)]}else if(((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null){let n=new Ne;return n.setFromObject(i),[this.convert3DMapPositionToCoordinate(n.min),this.convert3DMapPositionToCoordinate(n.max)]}}getState(r){var n;if(r==null)return{type:"map-view",hoverColor:u(this,N).hoverColor};let i=Nl(u(this,N),r);if((i==null?void 0:i.type)==="custom-geometry"){let o=i.components[0],a=i.components[1];return{id:i.id,type:"custom-geometry",visible:a.visible,altitude:a.altitude,parent:(n=i.parent)==null?void 0:n.userData.entityId,position:this.convert3DMapPositionToCoordinate(o.position)}}else if((i==null?void 0:i.type)==="geometry-group"){let o=[];for(let a of i.userData.entities3D.values()){let l=this.getState(a);(l.type==="geometry"||l.type==="model")&&o.push(l)}return{id:i.userData.entityId,type:"geometry-group",visible:i.visible,opacity:i.getOpacity(),interactive:Array.from(i.userData.entities3D.values()).map(a=>u(this,N).entity3DMap.get(a)).every(a=>a.components[2]!=null),children:Array.from(i.userData.entities3D.values()).map(a=>this.getState(a)).filter(Boolean)}}else{if((i==null?void 0:i.type)==="group-container")return{id:i.userData.entityId,type:"group-container",visible:i.visible,altitude:i.altitude,children:Array.from(i.childrenIds.values()).map(o=>this.getState(o)).filter(Boolean)};if((i==null?void 0:i.type)==="label"){let o=i.components[0],a=i.object3d.parent,l=a==null?void 0:a.userData.entityId;return{id:i.id,type:"label",text:o.text||"",parent:{id:l,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),enabled:o.enabled,initialRank:ha(o.initialRank),options:{rank:ha(o.rank),appearance:o.appearance,interactive:i.components[1]!=null}}}else if((i==null?void 0:i.type)==="marker"){let o=i.components[0],a=i.object3d.parent,l=a==null?void 0:a.userData.entityId;return{id:i.id,type:"marker",enabled:o.enabled,parent:{id:l,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),element:o.containerEl,initialRank:ha(o.initialRank),options:{rank:ha(o.rank),interactive:i.components[1]!=null||!1}}}else if((i==null?void 0:i.type)==="geometry"){let{color:o,hoverColor:a,initialColor:l,topColor:c}=i.components[1],h=i.components[0],d=i.components[1];return{id:i.id,type:"geometry",color:o,topColor:c,initialColor:l,hoverColor:a,visible:d.visible,position:this.convert3DMapPositionToCoordinate(h.position),interactive:i.components[2]!=null}}else if((i==null?void 0:i.type)==="model"){let o=i.components[0],a=i.components[2];return{id:i.id,type:"model",position:this.convert3DMapPositionToCoordinate(o.position),interactive:a!=null}}else if((i==null?void 0:i.type)==="path"){let o=i.components[0],a=i.components[2],l=i.components[1];return{id:i.id,type:"path",position:this.convert3DMapPositionToCoordinate(o.position),visible:l.visible,interactive:a!=null,completeFraction:o.completeFraction}}else return}}setState(r,i){var o,a,l;if(typeof r=="object"&&"hoverColor"in r&&i==null){u(this,N).hoverColor=(o=r.hoverColor)!=null?o:u(this,N).hoverColor;return}let n=Nl(u(this,N),r);if(n!=null){if(n.type==="custom-geometry"){let c=u(this,N).entity3DMap.get(n.id);if(c instanceof Pt&&c.components[0]instanceof Ra){let h=i;Vn(n,h.visible),Rf(n,h.altitude),Nf(n,h.position,this.convertTo3DMapPosition),kf(n,j(this,ue,Oe).call(this,h.parent,!1))}}else if(n.type==="model"||n.type==="path"){let c=i;Ze(n,c.interactive,u(this,N))&&u(this,yt).call(this),n.type==="path"&&(c=c,pb(n,c),Vn(n,c.visible))}else if(n.type==="group-container"){let c=i;Vn(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),Rf(n,c.altitude)}else if(n.type==="geometry-group"){let c=i;Vn(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),yb(n,u(this,N),c.opacity),Ze(n,c.interactive,u(this,N))&&(u(this,yt).call(this),u(this,bt).call(this))}else if(n.type==="geometry"){if(n.components[0]instanceof We){let c=i;Vn(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),cb(n,c),mb(n,c.hoverColor),Ze(n,c.interactive,u(this,N))}u(this,yt).call(this)}else if(n.type==="label"||n.type==="marker"){let c=i;db(n,i),hb(n,i)&&u(this,bt).call(this),fb(n,(a=c.options)==null?void 0:a.rank)&&u(this,bt).call(this),Nf(n,c.position,this.convertTo3DMapPosition),kf(n,j(this,ue,Oe).call(this,c.parent,!1))&&(u(this,bt).call(this),u(this,D).panBoundsSystem.dirty=!0),ub(n,c.enabled),Ze(n,(l=c.options)==null?void 0:l.interactive,u(this,N))&&u(this,bt).call(this)}this.render()}}getSystems(){return u(this,D)}getInternalState(){return u(this,N)}};oe=new WeakMap,Dt=new WeakMap,Ba=new WeakMap,jn=new WeakMap,Jr=new WeakMap,Bi=new WeakMap,Gi=new WeakMap,Vi=new WeakMap,zn=new WeakMap,Ga=new WeakSet,Pd=s(function(r){var i;u(this,Hi)!=="outdoors-overlay"&&((i=this.map)==null||i.setPixelRatio(r)),u(this,N).pixelRatio=this.resolutionScale},"#setResolutionScale"),N=new WeakMap,nt=new WeakMap,De=new WeakMap,mt=new WeakMap,$e=new WeakMap,ge=new WeakMap,D=new WeakMap,Va=new WeakMap,bt=new WeakMap,yt=new WeakMap,Oc=new WeakSet,r3=s(function(){_(this,nt,document.createElement("div")),u(this,nt).classList.add("mappedin__smart-collision-engine__container"),_(this,De,document.createElement("canvas")),u(this,De).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(u(this,nt)),_(this,mt,document.createElement("canvas")),u(this,mt).classList.add("mappedin__smart-collision-engine__container"),u(this,mt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,mt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,mt).style.width=u(this,nt).clientWidth+"px",u(this,mt).style.height=u(this,nt).clientHeight+"px",u(this,nt).appendChild(u(this,De)),u(this,nt).appendChild(u(this,mt)),u(this,De).width=u(this,nt).clientWidth,u(this,De).height=u(this,nt).clientHeight,u(this,mt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,mt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,mt).style.width=u(this,nt).clientWidth+"px",u(this,mt).style.height=u(this,nt).clientHeight+"px"},"#renderEntity2DContainer"),Dc=new WeakSet,i3=s(function(){_(this,$e,document.createElement("div")),u(this,$e).classList.add("mappedin-2d-entities"),Object.assign(u(this,$e).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none"}),this.container.appendChild(u(this,$e))},"#renderEntityDOMContainer"),Ac=new WeakSet,n3=s(function(){u(this,mt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,mt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,mt).style.width=u(this,nt).clientWidth+"px",u(this,mt).style.height=u(this,nt).clientHeight+"px",u(this,De).width=u(this,nt).clientWidth,u(this,De).height=u(this,nt).clientHeight,u(this,mt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,mt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,mt).style.width=u(this,nt).clientWidth+"px",u(this,mt).style.height=u(this,nt).clientHeight+"px",u(this,D).collisionSystem.dirty=!0},"#resizeCollisionCanvas"),Hi=new WeakMap,Ha=new WeakMap,Xa=new WeakMap,Un=new WeakMap,Nc=new WeakMap,Ya=new WeakMap,ja=new WeakMap,za=new WeakMap,Wn=new WeakMap,ue=new WeakSet,Oe=s(function(r,i=!0){if(!r)return i?u(this,N).entityScene:void 0;if(typeof r=="string"||typeof r=="number"){let n=u(this,N).entity3DMap.get(r);return n instanceof re?n:(Y.warn("Parent is not a valid container, adding to scene"),i?u(this,N).entityScene:void 0)}else if(r.type==="group-container"){let n=u(this,N).entity3DMap.get(r.id);if(n instanceof re)return n}return i?u(this,N).entityScene:void 0},"#getParentContainer"),Ua=new WeakSet,Md=s(function(r,i,n){let o=new Ee(i,this.convertTo3DMapPosition(r[1],r[0],r[2]||n||0));return u(this,N).entity2DMap.set(o.id,o),o},"#createEntity2D"),Kt=new WeakMap,Qt=new WeakMap,s(_d,"Core");var Sd=_d,Ed=Sd;f();var HP="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",XP="https://auth.mappedin.com/oauth2/token";async function o3(e,t){var r,i,n,o,a;if((r=t==null?void 0:t.outdoorView)!=null&&r.enabled&&((i=t==null?void 0:t.outdoorView)!=null&&i.headers)){let l=t.outdoorView.layersHiddenByGeometry||["building","building-top"],{Map:c,MercatorCoordinate:h}=await import("./outdoor-context-v4-UJEGG27Y.js"),d=t.outdoorView.headers;d==null&&(d=await uv(XP));let m=t.center||[0,0],y=new c({container:e,style:t.outdoorView.style||HP,center:m,attributionControl:!1,zoom:(n=t.zoomLevel)!=null?n:wd,pitch:(o=t.pitch)!=null?o:Td,bearing:(a=t.bearing)!=null?a:Id,transformRequest:E=>{var L;return{url:E,headers:(L=t.outdoorView)==null?void 0:L.headers}},trackResize:!1,pixelRatio:Ur(),antialias:typeof t.antialias=="boolean"?t.antialias:!0});y.touchZoomRotate.disable(),y.doubleClickZoom.disable(),y.scrollZoom.disable(),y.dragPan.disable(),y.keyboard.disable(),y.boxZoom.disable(),y.dragRotate.disable();let x=y.painter.context.gl,S=new Ed(e,{center:y.getCenter().toArray(),zoomLevel:y.getZoom(),pitch:y.getPitch(),bearing:y.getBearing(),gl:x,map:y,mode:"outdoors-interleaved",watermark:t.watermark,attribution:t.attribution,antialias:t.antialias}),P=!1;y.on("render",async()=>{if(!y||P||l.length===0||!y.getLayer(l[0]))return;let E=[],L=y.project(y.getCenter().toArray()),R=y.queryRenderedFeatures([L.x,L.y],{layers:l});for(var F of R)E.push(["!=",["id"],F.id]);E.length>0&&(l.forEach(k=>{y.setFilter(k,["all",...E])}),P=!0)});let g={center:y.getCenter().toArray(),zoom:y.getZoom(),bearing:y.getBearing(),pitch:y.getPitch()};y.setMinZoom(S.camera.minZoomLevel),y.setMaxZoom(S.camera.maxZoomLevel),S.on("camera-change",E=>{g.center=E.center,g.zoom=E.zoomLevel,g.bearing=-E.bearing,g.pitch=E.pitch,y.jumpTo(g)});let C=h.fromLngLat(m,0),M=cv(C,S.viewCamera,S.camera,()=>{S.renderSync()}),T=!1;y.on("style.load",async()=>{y&&(y.addLayer(M),S.renderSync())}),y.on("idle",()=>{y&&(T||(S.publish("outdoor-view-loaded"),T=!0))});let w=s(E=>{E&&(E.sourceDataType==="metadata"||E.sourceDataType==="visibility"||E.dataType==="style"||E.type==="terrain")&&S.getSystems().htmlControlsSystem.updateData(y)},"updateData");return y.on("styledata",w),y.on("sourcedata",w),y.on("terrain",w),y.on("error",E=>{Y.warn(E)}),S}else return new Ed(e,t)}s(o3,"createRenderer");var Wa=Cr(On());var kc=30,YP=1e3,Zn,Za,Ld=class Ld extends st{constructor(r,i){super();this.api=r;this.core=i;I(this,Zn,void 0);I(this,Za,0);v(this,"includedFloors",[]);v(this,"expanded",!1);i.on("camera-change",n=>{var l;let o=Math.floor(n.elevation/kc),a=(l=this.includedFloors[o])==null?void 0:l.id;this.expanded&&a&&a!==this.api.currentFloorId&&(this.api.currentFloorId=this.includedFloors[o].id,this.api.publish("floor-change",{reason:"elevation-change",floorId:this.api.currentFloorId}))})}get percentExpanded(){return u(this,Za)}set percentExpanded(r){let i=Zt(r,0,1,0,kc);this.includedFloors.forEach((n,o)=>{this.core.setState(n.containerId,{visible:!0,altitude:i*o})}),_(this,Za,r)}animateToCurrentFloor(){let r=this.includedFloors.indexOf(this.api.currentFloor)*kc;new Wa.default.Tween({elevation:this.core.camera.elevation}).to({elevation:r},1e3).easing(Wa.default.Easing.Quadratic.Out).onUpdate(({elevation:i})=>{this.core.camera.setElevation(i),this.core.render()}).onComplete(()=>{this.api.publish("floor-change",{reason:"",floorId:this.api.currentFloorId})}).start(),this.core.render()}expand(r){return this.includedFloors=this.api.floors.filter(i=>!(r!=null&&r.excludeFloorIds.includes(i.id))),this.includedFloors.length<=1?Promise.resolve():this.animate("expand")}collapse(){return this.expanded===!0?this.animate("collapse"):Promise.resolve()}animate(r){u(this,Zn)&&u(this,Zn).stop();let i=this.includedFloors.indexOf(this.api.currentFloor)*kc;return new Promise(n=>{_(this,Zn,new Wa.default.Tween({percentExpanded:this.percentExpanded}).to({percentExpanded:r==="expand"?1:"0"},YP).easing(Wa.default.Easing.Quadratic.Out).onUpdate(({percentExpanded:o})=>{this.core.camera.setElevation(i*o),this.percentExpanded=o,this.core.render()}).onComplete(()=>{this.expanded=r==="expand",this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:r==="collapse"?o.id===this.api.currentFloorId:!0})}),this.core.getSystems().cameraSystem.enablePedestal=r==="expand",this.core.getSystems().cameraSystem.enablePan=r==="collapse",n(),this.publish(r==="expand"?"expanded":"collapsed")}).onStart(()=>{this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:!0})})}).start()),this.core.render()})}};Zn=new WeakMap,Za=new WeakMap,s(Ld,"StackedMaps");var Rc=Ld;var jP={linear:Xi.default.Easing.Linear.None,"ease-in":Xi.default.Easing.Quadratic.In,"ease-out":Xi.default.Easing.Quadratic.Out,"ease-in-out":Xi.default.Easing.Quadratic.InOut},Od=class Od extends st{floors;currentFloorId="";id;renderer;mvf;styleMap;StackedMaps;animations=new Map;get currentFloor(){return this.floors.find(t=>t.id===this.currentFloorId)}setFloor(t,r){if(this.currentFloorId!==t){if(this.publish("floor-change-start",{floorId:t}),this.currentFloorId=t,this.StackedMaps.expanded)return this.StackedMaps.animateToCurrentFloor();this.floors.forEach(i=>{i.id===t?this.renderer.setState(i.containerId,{visible:!0}):this.renderer.setState(i.containerId,{visible:!1})}),this.publish("floor-change",{reason:r,floorId:this.currentFloor.id})}}cancelAnimation(t){let r=this.animations.get(t);r&&(r.tween.stop(),r.resolver(),this.animations.delete(t))}Markers={add:(t,r,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(l=>l.id===i.floorId):this.floors[0];return this.renderer.addMarker2D(t,r,o,a.id)},remove:t=>{this.renderer.remove(t)},getContentEl:t=>{let r=this.renderer.getState(t);if((r==null?void 0:r.type)==="marker")return r.element},removeAll:()=>{},setPosition:(t,r,i)=>{let n=this.renderer.getState(t);if(!n){Y.error(`Failed to retrieve state for Marker with id "${t}".`);return}if(n.type!=="marker"){Y.error(`Geometry with id "${t}" is not of type "marker".`);return}this.renderer.setState(n,{position:r,parent:i!=null?i:this.currentFloorId})},animateTo:(t,r,i,n)=>{let o=this.renderer.getState(t);if(!o)return Y.error(`Failed to retrieve state for Marker with id "${t}".`),Promise.resolve();if(o.type!=="marker")return Y.error(`Geometry with id "${t}" is not of type "marker".`),Promise.resolve();let a={duration:1e3,easing:"ease-in-out",...n};this.cancelAnimation(t);let l;new Xi.default.Tween({lon:o.position[0],lat:o.position[1]}).to({lon:r[0],lat:r[1]},a.duration).easing(jP[a.easing]).onUpdate(({lon:h,lat:d})=>{this.Markers.setPosition(t,[h,d],i),this.renderer.render()}).onComplete(()=>{l()}).start();let c=new Promise(h=>{l=h});return this.renderer.render(),c}};Exporter={getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)};Labels={all:({onCreate:t})=>{let r=0;for(let i of Object.entries(this.mvf.space)){let[n,o]=i;o&&(o.features.forEach(a=>{var d,m;let l=(d=this.styleMap[a.properties.id])==null?void 0:d.showImage,c=(m=a.properties.details)==null?void 0:m.images,h;if(l&&c&&c.length>0&&(h={marker:{icon:c[0].url}}),a.properties.center&&a.properties.externalId!==""){let y=this.renderer.addLabel2D(a.properties.center,a.properties.externalId,{id:a.properties.id,appearance:h},n);t(y.id,a.properties.externalId)}}),r++)}},add:(t,r,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(c=>c.id===(i==null?void 0:i.floorId)):this.floors[0],l=this.renderer.addLabel2D(t,r,o,a.containerId);if(!l)throw new Error("label creating failed");return l},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}};Paths={add:(t,r)=>{let i=t.reduce((o,{floorId:a,longitude:l,latitude:c})=>(a&&!o[a]&&(o[a]=[]),a?o[a].push([l,c]):(o.root===void 0&&(o.root=[]),o.root.push([l,c])),o),{}),n=Object.entries(i).map(([o,a])=>this.renderer.addPath({type:"FeatureCollection",features:a.map(l=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}))},r,o));return new Xi.default.Tween({fraction:0}).to({fraction:1},1e3).onUpdate(({fraction:o})=>{n.forEach(a=>{this.renderer.setState(a.id,{completeFraction:o})})}).start(),n},remove:t=>{t.forEach(r=>{this.renderer.remove(r)})}};constructor(t,r,i,n={},o){super(),this.renderer=o,this.id=t,this.renderer.addGroupContainer(t,{},"root"),this.StackedMaps=new Rc(this,this.renderer),this.mvf=r,this.styleMap=i,this.floors=this.mvf["map.geojson"].sort((a,l)=>a.elevation-l.elevation).map(a=>{var c,h;if(t!=="outdoors-container"&&((c=r.space[a.id])==null?void 0:c.features.length)===0&&((h=r.obstruction[a.id])==null?void 0:h.features.length)===0)return;let l=new _l(t,a,this.renderer,n,r,i);return l.load(),l}).filter(Boolean),this.setFloor(this.floors[0].id)}};s(Od,"GeojsonApiMapObject");var qa=Od;f();var Ae,Ja,Dd=class Dd{constructor({currentMapGetter:t}){I(this,Ae,new Map);I(this,Ja,void 0);_(this,Ja,t)}get currentMap(){return u(this,Ja).call(this)}getById(t){return u(this,Ae).get(t)}add(t,r,i){let n=Rr(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let{id:a}=o.Markers.add(_n(n),r,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium",dynamicResize:(i==null?void 0:i.dynamicResize)||!1}),l=o.Markers.getContentEl(a.toString());if(!l)throw new Error("marker compoent should exist");let c=new Ci(a.toString(),l,()=>{});return u(this,Ae).set(c.id,{marker:c,entityId:a.toString()}),c}remove(t){var i;let r=u(this,Ae).get(t.id);r&&((i=this.currentMap)==null||i.Markers.remove(r.entityId),u(this,Ae).delete(t.id.toString()))}removeAll(){let t=[];return u(this,Ae).forEach(({marker:r})=>{this.remove(r),t.push(r),u(this,Ae).delete(r.id.toString())}),t}setPosition(t,r){var a;let i=Rr(r);if(!i){Y.error("Cannot determine coordinate from target.");return}let n=this.currentMap;if(!n){Y.error("Cannot determine the current map.");return}let o=u(this,Ae).get(t.id);if(!o){Y.error(`Cannot find the Marker with id "${t.id}".`);return}n.Markers.setPosition(o.entityId,_n(i),(a=i.floorId)!=null?a:n.currentFloorId)}animateTo(t,r,i){var l;let n=Rr(r);if(!n)return Y.error("Cannot determine coordinate from target."),Promise.resolve();let o=this.currentMap;if(!o)return Y.error("Cannot determine the current map."),Promise.resolve();let a=u(this,Ae).get(t.id);return a?o.Markers.animateTo(a.entityId,_n(n),(l=n.floorId)!=null?l:o.currentFloorId,i):(Y.error(`Cannot find the Marker with id "${t.id}".`),Promise.resolve())}};Ae=new WeakMap,Ja=new WeakMap,s(Dd,"Markers");var $a=Dd;f();var br,Qa,Ad=class Ad{constructor({currentMapGetter:t}){I(this,br,new Map);I(this,Qa,void 0);_(this,Qa,t)}get currentMap(){return u(this,Qa).call(this)}getById(t){return u(this,br).get(t)}add(t,r){let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let n=i.Paths.add(t,r),o=new jo(ft());return u(this,br).set(o.id,{path:o,entityIds:n.map(a=>a.id.toString())}),o}remove(t){var i;let r=u(this,br).get(t.id);r&&((i=this.currentMap)==null||i.Paths.remove(r.entityIds),u(this,br).delete(t.id.toString()))}removeAll(){let t=[];return u(this,br).forEach(({path:r})=>{this.remove(r),t.push(r),u(this,br).delete(r.id.toString())}),t}};br=new WeakMap,Qa=new WeakMap,s(Ad,"Paths");var Ka=Ad;f();var Fc=Cr(On());f();var a3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAkklEQVRoge3awQ3AIAxD0VAMYf+F0yUixbL8JshXuLSwIqJCwDc9QBeZEOy9p2doAQDTM7TQ2cg5Z3qGFjpHS2YjDiGDe+/0DC0cwkYpJKdnaIFMkY1kymzEIVQcwsYhbPDem56hhc5GHELGIWwcwsYhbJS+2R1CxSFsdH5iO4SMr97Y6FxPqxytVVV+HcTEIWx+9mcIqHSOm9QAAAAASUVORK5CYII=";f();var s3=s((e,t,r=0)=>{if(Math.abs(e)>=Math.PI)throw new Error("Sector angle too wide!");let i=r/Math.tan(e/2),n=r/Math.sin(e/2),o=n+t,a=10,l=new ke;l.moveTo(n*Math.cos(e/2)-i,n*Math.sin(e/2));for(let c=0;c<a;c++)l.lineTo(o*Math.cos(e/2-e/a*c)-i,o*Math.sin(e/2-e/a*c));for(let c=0;c<a;c++)l.lineTo(r*Math.cos(Math.PI/-2+Math.PI/a*c),r*Math.sin(Math.PI/-2+Math.PI/a*c));return new Re(l,{depth:.1,bevelEnabled:!1,UVGenerator:UP(t)})},"createSectorGeometry"),Nd=s((e,t,r)=>{let n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/r;return n>1?n=1:n<0&&(n=0),new z(0,n)},"generateRadialUV"),UP=s(e=>({generateTopUV:(t,r,i,n,o)=>{let a=r[i*3],l=r[i*3+1],c=r[n*3],h=r[n*3+1],d=r[o*3],m=r[o*3+1];return[Nd(a,l,e),Nd(c,h,e),Nd(d,m,e)]},generateSideWallUV:()=>[new z(0,1),new z(0,1),new z(0,1),new z(0,1)]}),"radialUVGenerator");var kd="#2266ff",WP=.7,ZP=.3;function l3(){let e=new $i({color:kd,opacity:WP,transparent:!0,depthTest:!1,depthWrite:!1}),t=s3(Math.PI/6,p3,u3);new Ji().load(a3,i=>{e.alphaMap=i,e.needsUpdate=!0});let r=new Ft(t,e);return r.position.z=-.05,r.renderOrder=3,r}s(l3,"createBearingCone");var c3=s(()=>{let e=new Hc(.5,.5,.05,32),t=new $i({transparent:!0,color:kd,opacity:ZP,depthTest:!1,depthWrite:!1}),r=new Ft(e,t);r.scale.set(0,0,.05),r.renderOrder=2;let i=new Hc(Rd,Rd,.05,32),n=new $i({transparent:!0,color:kd,depthTest:!1,depthWrite:!1}),o=new Ft(i,n);return o.renderOrder=3,r.rotation.x=Math.PI/2,o.rotation.x=Math.PI/2,{baseMesh:r,middleMesh:o}},"createBlueDot");var qP={enableHighAccuracy:!0},$P=500,JP=150,KP=150,QP=0,tM=5,eM=5,rM=30,u3=.4,p3=1.25,Rd=.35,Fd=class Fd extends st{constructor(r,i){super();this.core=r;this.geoJSONApi=i}watcherId=null;geometry;currentGeolocation;positionAnimation;scaleAnimation;rotationAnimation;enable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry=this.core.addCustomGeometry("blue-dot",{type:"Feature",properties:{},geometry:{type:"Point",coordinates:[-79.3935,43.6532]}},{setup:r=>{let{baseMesh:i,middleMesh:n}=c3(),o=l3();r.add(i),r.add(n),r.add(o)},update:this.updateGeometryPerFrame},{visible:!1},"outdoors-container"),this.watcherId=navigator.geolocation.watchPosition(this.onPositionUpdate,this.onPositionError,qP)}updateGeometryPerFrame=r=>{var c;let[i,n,o]=r.children,{accuracy:a,heading:l}=((c=this.currentGeolocation)==null?void 0:c.coords)||{};a!=null&&(this.scaleAnimation&&this.scaleAnimation.stop(),this.scaleAnimation=new Fc.default.Tween({scale:i.scale.x}).to({scale:Zt(a,eM,rM,QP,tM)},JP).onUpdate(({scale:h})=>{i.scale.set(h,1,h)}).start()),l!=null?(o.visible=!0,this.rotationAnimation&&this.rotationAnimation.stop(),this.rotationAnimation=new Fc.default.Tween({rotation:i.scale.x}).to({rotation:at.degToRad(l)},KP).onUpdate(({rotation:h})=>{o.rotation.z=h}).start()):o.visible=!1};onPositionUpdate=r=>{var i;if(this.currentGeolocation=r,this.geometry){let n=this.core.getState(this.geometry);n.visible===!1&&this.core.setState(this.geometry,{position:[r.coords.longitude,r.coords.latitude],visible:!0}),this.positionAnimation&&this.positionAnimation.stop(),n=this.core.getState(this.geometry);let o;if(r.coords.floorLevel!==void 0){let a=(i=this.geoJSONApi.currentMap)==null?void 0:i.floors[r.coords.floorLevel];o=a==null?void 0:a.id}this.positionAnimation=new Fc.default.Tween(n.position).to([r.coords.longitude,r.coords.latitude],$P).onUpdate(a=>{if(this.geometry){let l={position:a};o==null&&n.parent!=="outdoors-container"?l.parent="outdoors-container":n.parent!==o&&(l.parent=o,this.publish("floor-change",{reason:"blue-dot-floor-change",floorId:o})),this.core.setState(this.geometry,l)}}).start(),this.core.render()}};onPositionError=r=>{switch(r.code){case r.PERMISSION_DENIED:Y.error("Geolocation permission denied by the user.",r);break;case r.POSITION_UNAVAILABLE:Y.error("Geolocation position unavailable.",r);break;case r.TIMEOUT:Y.error("Geolocation request timed out.",r);break;default:Y.error("An unknown geolocation error occurred.",r);break}this.disable()};disable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry&&(this.core.remove(this.geometry.id),this.geometry=void 0),this.currentGeolocation=void 0}};s(Fd,"BlueDot");var Bc=Fd;var Bd=class Bd{core;outdoors;mapObjects=[];id;mapDataExternal={};mapsByFloorId={};mapData;currentMap;directions;mapView;Camera;Labels;Markers;Paths;Exporter;Navigation;BlueDot;constructor(t,r){var l;this.core=t,this.mapView=r,this.Camera=new qo(this.core),this.id=this.core.addGroupContainer("root").id.toString(),this.outdoors=new qa("outdoors-container",{"map.geojson":[{id:"outdoors",externalId:"outdoors",elevation:0}],"styles.json":{},space:{},entrance:{},obstruction:{}},{},{},this.core),this.mapObjects.push(this.outdoors);let i=new zo(this.Camera);this.core.on("camera-change",()=>{this.mapView.publish("camera-change",i)});let n=s(c=>h=>{var P,g;let d=[],m=[];h.labels.forEach(C=>{let M=this.Labels.getById(C.toString());M&&d.push(M.label)}),h.markers.forEach(C=>{let M=this.Markers.getById(C.toString());M&&m.push(M.marker)});let y=h.geometry[0],x;y&&(x=(P=this.getMapData())==null?void 0:P.getById("space",y)),x||(x=(g=this.getMapData())==null?void 0:g.getById("object",y));let S={coordinate:new $(h.coordinate[1],h.coordinate[0]),spaces:x&&Me.is(x)?[x]:[],objects:x&&we.is(x)?[x]:[],markers:m,labels:d,floors:[]};"pointerEvent"in h&&(S.pointerEvent=h.pointerEvent),this.mapView.publish(c,S)},"createHandler");this.core.on("hover",n("hover")),this.core.on("click",n("click")),(l=this.core.options.outdoorView)!=null&&l.enabled&&this.core.on("outdoor-view-loaded",()=>{this.mapView.publish("outdoor-view-loaded")}),this.core.on("user-interaction-start",()=>{this.mapView.publish("user-interaction-start")}),this.core.on("user-interaction-end",()=>{this.mapView.publish("user-interaction-end")});let o=s(()=>this.currentMap,"currentMapGetter");this.Markers=new $a({currentMapGetter:o}),this.Labels=new ta({currentMapGetter:o}),this.Exporter=new Qo({currentMapGetter:o}),this.Paths=new Ka({currentMapGetter:o}),this.Navigation=new yl(r),this.BlueDot=new Bc(this.core,this),this.BlueDot.on("floor-change",c=>{this.setFloor(c.floorId,"blue-dot-floor-change")});let a=new Sl(r,this.mapDataExternal);this.auto=a.auto}updateState(t,r){var n;if(t==="walls"){(n=this.currentMap)==null||n.floors.forEach(o=>{var c,h;let a=o.layers.get("Walls"),l=o.layers.get("ExteriorWalls");a&&((c=this.core.getState(a))==null||c.children.forEach(d=>{this.core.setState(d.id,r)})),l&&((h=this.core.getState(l))==null||h.children.forEach(d=>{this.core.setState(d.id,r)}))});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(Xr.is(i))return this.core.setState(i.id,Z2({...r,type:"label"},this.core.getState(i.id)));if(Ci.is(i))return this.core.setState(i.id,q2({...r,type:"marker"},this.core.getState(i.id)));(Me.is(i)||we.is(i))&&this.core.setState(i.id,$2({...r,type:"geometry"},this.core.getState(i.id)))}}getMapDataObject(t){var r;return(r=this.getMapData())==null?void 0:r.getMapDataById(t)}update=()=>{this.core.render()};getMapData(){return this.mapData}expand(t){var r;return(r=this.currentMap)==null?void 0:r.StackedMaps.expand({excludeFloorIds:(t==null?void 0:t.excludeFloors.map(i=>i.id))||[]})}collapse(){var t;return(t=this.currentMap)==null?void 0:t.StackedMaps.collapse()}addMap(t,r){return new Promise(async i=>{let n=Yc.get(t);if(!n){Y.error("error exists"),i(t);return}this.mapDataExternal[t.mapName]=t;let{mvf:o}=n,a=o["manifest.geojson"].features[0].geometry.coordinates;this.Camera.set({center:new $(a[1],a[0])});let l=Q2(o["styles.json"]||{}),c=o["manifest.geojson"].features[0].properties.name,h=new qa(`mapObject-${c}`,o,l,r,this.core);this.mapObjects.push(h),o["map.geojson"].forEach(d=>{this.mapsByFloorId[d.id]=h}),h.StackedMaps.on("expanded",()=>{this.mapView.publish("expanded")}),h.StackedMaps.on("collapsed",()=>{this.mapView.publish("collapsed")}),h.on("floor-change-start",()=>{this.mapView.publish("floor-change-start",{floor:this.currentFloor})}),h.on("floor-change",d=>{this.mapView.publish("floor-change",{reason:d.reason,floor:this.currentFloor})}),this.currentMap=h,this.mapData=n,this.directions=new Tl({nodes:this.currentMap.mvf["node.geojson"],obstructions:this.currentMap.mvf.obstruction,connections:this.currentMap.mvf["connection.json"],groupBy:"map"}),i(t)})}setFloor(t,r){if(!this.currentMap)throw new Error("mappObject should exist atm");this.currentMap.setFloor(typeof t=="string"?t:t.id,r)}get currentFloor(){var i,n;let t=(i=this.currentMap)==null?void 0:i.currentFloor.id;if(!t)throw new Error("Missing currentFloor object from GeoJsonApi");let r=(n=this.mapData)==null?void 0:n.getById("floor",t);if(!r)throw new Error("Missing currentFloor");return r}getState(t){var n;let r=typeof t=="string"?t:t.id,i=this.core.getState(r);if(i){if(i.type==="geometry")return{type:"geometry",interactive:i.interactive,hoverColor:i.hoverColor,color:i.color};if(i.type==="label"&&i.options.appearance&&i.options.rank!==void 0&&i.options.interactive!==void 0)return{type:"label",appearance:i.options.appearance,rank:i.options.rank,enabled:i.enabled,interactive:i.options.interactive};if(i.type==="marker"&&((n=i.options)==null?void 0:n.rank)!==void 0&&i.options.interactive!==void 0){let o=typeof i.parent=="object"?i.parent.id:i.parent;return{type:"marker",rank:i.options.rank,interactive:i.options.interactive,enabled:i.enabled,element:i.element,coordinate:new $(i.position[1],i.position[0],o.toString())}}}}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}getDirections=(t,r,i)=>{if(!this.directions)throw new Error("You have to call .addMap() before you can get directions");let{accessible:n=!1,smoothing:o=!0}=i||{},a=Array.isArray(t)?t:[t],l=Array.isArray(r)?r:[r],c=typeof o=="object"?o.enabled:o,h=typeof o=="object"?o.radius:void 0,d={accessible:n,smoothing:{enabled:c!=null?c:!0,radius:h!=null?h:.75}};return this.directions.getDirections(a,l,d,this.mapData)};createCoordinate(t,r,i){return new $(t,r,(i==null?void 0:i.id)||this.currentFloor.id)}createCoordinateFromScreenCoordinate(t,r,i){let n=this.core.projectScreenXYToCoordinate(t,r);return n?new $(n[1],n[0],(i==null?void 0:i.id)||this.currentFloor.id):void 0}auto(){this.Labels.all()}Outdoor={setStyle:t=>{var r;(r=this.core.map)==null||r.setStyle(t)}};get __core(){return this.core}destroy(){this.core.destroy()}};s(Bd,"GeoJsonApi");var ts=Bd;var es,ot,Gd=class Gd extends st{constructor(r){super();I(this,es,{});I(this,ot,void 0);v(this,"Camera");v(this,"Labels");v(this,"Markers");v(this,"Paths");v(this,"Exporter");v(this,"Navigation");v(this,"BlueDot");v(this,"update",()=>{u(this,ot).core.render()});v(this,"getDirections",(r,i,n)=>u(this,ot).getDirections(r,i,n));v(this,"Outdoor",{setStyle:r=>{u(this,ot).Outdoor.setStyle(r)}});v(this,"on",(r,i)=>{super.on(r,i)});v(this,"off",(r,i)=>{super.off(r,i)});_(this,ot,new ts(r,this)),this.Camera=u(this,ot).Camera,_(this,es,u(this,ot).mapDataExternal),this.Markers=u(this,ot).Markers,this.Labels=u(this,ot).Labels,this.Exporter=u(this,ot).Exporter,this.Paths=u(this,ot).Paths,this.Navigation=u(this,ot).Navigation,this.BlueDot=u(this,ot).BlueDot,this.auto=u(this,ot).auto}updateState(r,i){return u(this,ot).updateState(r,i)}getMapData(){return u(this,es)}expand(r){return u(this,ot).expand(r)}collapse(){return u(this,ot).collapse()}addMap(r,i){return u(this,ot).addMap(r,i)}setFloor(r){u(this,ot).setFloor(r)}get currentFloor(){return u(this,ot).currentFloor}getState(r){return u(this,ot).getState(r)}setHoverColor(r){u(this,ot).setHoverColor(r)}getHoverColor(){return u(this,ot).getHoverColor()}createCoordinate(r,i,n){return u(this,ot).createCoordinate(r,i,n)}createCoordinateFromScreenCoordinate(r,i,n){return u(this,ot).createCoordinateFromScreenCoordinate(r,i,n)}auto(){this.Labels.all()}get __core(){return u(this,ot).core}destroy(){u(this,ot).destroy()}};es=new WeakMap,ot=new WeakMap,s(Gd,"MapView");var Gc=Gd;var iM={auto:!0,debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0}},Vc=.05,Hz=s(async(e,t)=>{let r;if(t){let{access_token:o}=await us(t);r=o}let i=new ko(e,r);return new jc(i)},"hydrateMapDataFromMVF"),Xz=s(async e=>{let t={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,...e},r=Wc({...t}),{access_token:i}=await us(e),n=await Zc(r,i),o=await $c(n),a=qc(o);typeof e.onMVFParsed=="function"&&e.onMVFParsed(a);let l=new ko(a,i);return new jc(l)},"getMapData"),nM=s(async(e,t,r)=>{var a,l,c,h,d;let i={...iM,...r!=null?r:{},outdoorView:{token:t.outdoorViewToken,...r==null?void 0:r.outdoorView}},n=await o3(e,{center:[t.mapCenter.longitude,t.mapCenter.latitude],bearing:i.bearing,pitch:i.pitch,zoomLevel:i.zoomLevel,outdoorView:(a=i.outdoorView)!=null&&a.token?{headers:{"x-mappedin-tiles-key":(l=i.outdoorView)==null?void 0:l.token},style:(c=i.outdoorView)==null?void 0:c.style,enabled:!0,layersHiddenByGeometry:(h=i.outdoorView)==null?void 0:h.layersHiddenByGeometry}:void 0,watermark:i.watermark,attribution:i.attribution,antialias:typeof i.antialiasing=="boolean"?i.antialiasing:!!((d=i.antialiasing)!=null&&d.enabled)}),o=new Gc(n);if(await o.addMap(t,i),!(i!=null&&i.zoomLevel)){let m=n.getBoundingBox(o.currentFloor.id);await n.camera.focusOn(m,{duration:0,padding:{top:Vc*n.canvasHeight,left:Vc*n.canvasWidth,right:Vc*n.canvasWidth,bottom:Vc*n.canvasHeight}})}return o},"show3dMapGeojson"),Yz=nM;export{dl as Annotation,Br as Connection,$ as Coordinate,Nr as Door,hl as Floor,pl as Hyperlink,fl as Image,we as MapObject,Fr as PointOfInterest,Me as Space,nv as enableTestMode,Xz as getMapData,Hz as hydrateMapDataFromMVF,qc as parseMVF,Yz as show3dMap,nM as show3dMapGeojson,$c as unzipMVF};
487
+ </svg>`,"getAttributionButtonIcon"),_b={position:"bottom-right"},Rf=class Rf{controlContainerEl;controlPositions;compact=void 0;attribContainerEl;attribInnerEl;attribButtonEl;attribHTML=Nf;constructor(t){this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=kf.reduce((r,i)=>{let n=document.createElement("div");return n.classList.add(`mappedin-ctrl-${i}`),this.controlContainerEl.appendChild(n),r[i]=n,r},{})}addAttributionControl(t=_b){let r=kf.includes(t.position)?t.position:_b.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib",`mappedin-ctrl-attrib-${r}`),this.attribContainerEl.open=!0,this.attribContainerEl.tabIndex=0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=EP(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribInnerEl.innerHTML=Nf,this.attribContainerEl.appendChild(this.attribInnerEl)}toggleAttribution=t=>{this.attribContainerEl!=null&&(t.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))};updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=[Nf],i=t.style.sourceCaches;for(let o in i){let a=i[o];if(a.used||a.usedForTerrain){let l=a.getSource();l.attribution&&r.indexOf(l.attribution)<0&&r.push(l.attribution)}}r=r.filter(o=>String(o).trim()),r.sort((o,a)=>o.length-a.length),r=r.filter((o,a)=>{for(let l=a+1;l<r.length;l++)if(r[l].indexOf(o)>=0)return!1;return!0});let n=r.join(" ");n!==this.attribHTML&&(this.attribHTML=n,r.length?(this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.classList.remove("outdoor-attrib-empty")):this.attribContainerEl.classList.add("mappedin-attrib-empty"),this.resizeAttribution(t.getCanvasContainer().offsetWidth))}resizeAttribution(t){this.attribContainerEl&&(t<=IP||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};s(Rf,"HTMLControlsSystem");var dc=Rf;f();var Ta,Ff=class Ff{constructor(t,r){v(this,"mesh");v(this,"type","custom-geometry");v(this,"dirty",!0);v(this,"feature");v(this,"builder");v(this,"outline");v(this,"color",new Mt);I(this,Ta,0);this.mesh=new Xe,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}setOpacity(){}setColor(){}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return u(this,Ta)}set altitude(t){this.mesh&&(this.mesh.position.z=t,_(this,Ta,t))}};Ta=new WeakMap,s(Ff,"CustomGeometryComponent");var wa=Ff;f();var Bf=class Bf{state;constructor(t){this.state=t}update(){let t,r;for(let i of this.state.threeDEntities){let n=this.state.entity3DMap.get(i);(n==null?void 0:n.type)==="custom-geometry"&&(t=n.components[0],r=n.components[1],t.dirty&&r.visible!==!1&&(t.builder.setup(t.mesh),t.mesh.traverse(o=>{o.userData={entityId:i,type:"custom-geometry"}}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}}};s(Bf,"CustomGeometrySystem");var mc=Bf;f();f();var Gf=class Gf{rendererState;dirty=!0;constructor(t){this.rendererState=t}update(t,r=!1){if((r&&t>=16&&t<=19||this.dirty)&&this.rendererState.threeDEntities.length>0){let n=Ut(t,16,19,0,30),o;for(let a of this.rendererState.threeDEntities)if(o=this.rendererState.entity3DMap.get(a),(o==null?void 0:o.type)==="geometry-group"){let l=o.userData.entities3D.values().next().value,c=this.rendererState.entity3DMap.get(l);if((c==null?void 0:c.type)==="geometry"){let h=c.components[0],d=c.components[1];if(d.visible!==!1&&h.outline&&h.outline.visible){let y=B(d.initialColor).darken(n).toRgbString();h.setOutlineColor(y)}}}}this.dirty=!1}};s(Gf,"OutlineInterpolationSystem");var yc=Gf;var Db=new Pr,Yf=18,jf=0,zf=0;var LP=at.radToDeg(.698132),oe,Dt,Ia,Bn,Zr,Ni,ki,Ri,Gn,Ea,Hf,A,nt,De,dt,Ze,ye,D,_a,bt,mt,gc,Ab,vc,Nb,bc,kb,Fi,La,Oa,Vn,Cc,Da,Aa,Na,Hn,ue,Oe,ka,Xf,$t,Jt,Wf=class Wf extends st{constructor(r,i={}){var m,x,S,P,g,C,M,T,w,E;super();I(this,Ea);I(this,gc);I(this,vc);I(this,bc);I(this,ue);I(this,ka);v(this,"options");v(this,"container");I(this,oe,void 0);I(this,Dt,void 0);I(this,Ia,void 0);I(this,Bn,void 0);I(this,Zr,void 0);I(this,Ni,void 0);I(this,ki,void 0);I(this,Ri,void 0);I(this,Gn,void 0);v(this,"rendererDomElement");I(this,A,{entity3DMap:new Map,entity2DMap:new Map,entity2DIds:new Set,threeDEntities:[],entityScene:new re("__scene"),hoverColor:"red",insetsPadding:Yl,shouldMeasureCanvas:!0,pixelRatio:Yr()});v(this,"camera");I(this,nt,void 0);I(this,De,void 0);I(this,dt,void 0);I(this,Ze,void 0);I(this,ye,void 0);I(this,D,{});I(this,_a,window.matchMedia("screen and (min-resolution: 2dppx)"));v(this,"map");I(this,bt,s(()=>{u(this,D).renderSystem.twoDdirty=!0},"#invalidate2DEntities"));I(this,mt,s(()=>{u(this,D).renderSystem.threeDdirty=!0},"#invalidate3DEntities"));I(this,Fi,"standalone");I(this,La,s(r=>Math.trunc(r*10)/10,"#round10"));I(this,Oa,s(()=>{u(this,D).twoDDrawSystem.dirty=!0,j(this,Ea,Hf).call(this,Yr()),this.render()},"#handlePixelRatioChange"));I(this,Vn,s(()=>{_(this,Ni,this.rendererDomElement.clientWidth),_(this,ki,this.rendererDomElement.clientHeight),j(this,Ea,Hf).call(this,Yr()),u(this,Hn).call(this),j(this,bc,kb).call(this),u(this,D).cameraSystem.resize(this.canvasWidth,this.canvasHeight),u(this,D).cameraSystem.dirty=!0,u(this,D).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),u(this,D).htmlControlsSystem.resize(this.canvasWidth),this.render()},"#handleWindowResize"));I(this,Cc,s(()=>{this.renderSync()},"#renderFull"));I(this,Da,new Y);I(this,Aa,s((r,i)=>{let n=this.mode==="standalone"?u(this,Dt):this.viewCamera;if(u(this,Dt).position.z+this.camera.elevation>i.z){u(this,Da).copy(i);let o=u(this,Da).project(n),a=(o.x+1)/2*this.canvasWidth-0/2,l=(-o.y+1)/2*this.canvasHeight-0/2,c=u(this,La).call(this,a),h=u(this,La).call(this,l);r.x=c,r.y=h}else r.x=-1e3,r.y=-1e3},"#project"));I(this,Na,s((r,i)=>{u(this,ye).setBufferSize(r,i),u(this,Dt).aspect=r/i,u(this,Dt).updateProjectionMatrix(),u(this,Dt).updateMatrixWorld(!0),u(this,Bn).x=r,u(this,Bn).y=i},"#setBufferSize"));I(this,Hn,s(()=>{var a;let r=_(this,Ni,this.rendererDomElement.clientWidth),i=_(this,ki,this.rendererDomElement.clientHeight),n=Math.floor(r*this.resolutionScale),o=Math.floor(i*this.resolutionScale);u(this,Na).call(this,n,o),(a=this.map)==null||a.resize(),u(this,A).shouldMeasureCanvas=!1},"#measureCanvas"));v(this,"showCollisionBoxes",()=>{u(this,D).collisionSystem.showCollisionBoxes(),this.render()});v(this,"hideCollisionBoxes",()=>{u(this,D).collisionSystem.hideCollisionBoxes(),this.render()});v(this,"projectScreenXYToCoordinate",(r,i)=>{var c;let n=r/this.canvasWidth*2-1,o=-(i/this.canvasHeight)*2+1,a=new z(n,o);Db.setFromCamera(a,u(this,Dt).clone());let l=(c=Db.intersectObject(u(this,Zr),!1)[0])==null?void 0:c.point;return l!=null?this.convert3DMapPositionToCoordinate(l):void 0});v(this,"projectCoordinateToScreenXY",r=>{let i=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),n=new z;return u(this,Aa).call(this,n,i),{x:n.x,y:n.y}});v(this,"convertTo3DMapPosition",(r,i,n=0,o)=>{var c,h,d,y;let{x:a,y:l}=bl((h=(c=u(this,A).center)==null?void 0:c[1])!=null?h:0,(y=(d=u(this,A).center)==null?void 0:d[0])!=null?y:0,r,i);return o?(o.set(a,l,n),o):new Y(a,l,n)});v(this,"convert3DMapPositionToCoordinate",r=>{var o,a,l,c;let{lat:i,lon:n}=vl((a=(o=u(this,A).center)==null?void 0:o[1])!=null?a:0,(c=(l=u(this,A).center)==null?void 0:l[0])!=null?c:0,r.x,r.y);return[n,i]});v(this,"setBackgroundColor",(r,i)=>{u(this,ye).setBackgroundColor(r,i)});v(this,"render",()=>{u(this,D).renderSystem!=null&&(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay")?this.map.triggerRepaint():u(this,D).renderSystem.update())});v(this,"renderSync",()=>{u(this,D).renderSystem.update(!0)});I(this,$t,Rn(()=>{this.publish("user-interaction-start",void 0)},0,!0));I(this,Jt,Rn(()=>{this.publish("user-interaction-end",void 0)},0,!0));v(this,"on",(r,i)=>{super.on(r,i),r==="outdoor-view-loaded"&&this.mode==="standalone"&&(X.warn('"outdoor-view-loaded" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.'),this.publish("outdoor-view-loaded"))});v(this,"off",(r,i)=>{super.off(r,i)});v(this,"getCursor",()=>u(this,D).interactionSystem.getCursor());v(this,"destroy",()=>{u(this,D).cameraSystem.off("user-dolly-start",u(this,$t)),u(this,D).cameraSystem.off("user-pan-start",u(this,$t)),u(this,D).cameraSystem.off("user-rotate-start",u(this,$t)),u(this,D).cameraSystem.off("user-zoom-start",u(this,$t)),u(this,D).cameraSystem.off("user-tilt-start",u(this,$t)),u(this,D).cameraSystem.off("user-pedestal-start",u(this,$t)),u(this,D).cameraSystem.off("user-dolly-end",u(this,Jt)),u(this,D).cameraSystem.off("user-pan-end",u(this,Jt)),u(this,D).cameraSystem.off("user-rotate-end",u(this,Jt)),u(this,D).cameraSystem.off("user-zoom-end",u(this,Jt)),u(this,D).cameraSystem.off("user-tilt-end",u(this,Jt)),u(this,D).cameraSystem.off("user-pedestal-end",u(this,Jt)),u(this,D).renderSystem.off("measure-canvas",u(this,Hn)),this.remove("__scene"),u(this,bt).call(this),u(this,mt).call(this),this.renderSync(),u(this,D).renderSystem.destroy(),u(this,D).zoomInterpolationSystem.destroy(),u(this,D).renderSystem.destroy(),u(this,D).cameraSystem.off("change",this.render),u(this,D).cameraSystem.dispose(),u(this,D).exporterSystem.destroy(),window.removeEventListener("resize",u(this,Vn),!1),u(this,_a).removeEventListener("change",u(this,Oa)),u(this,Ri)&&u(this,Ri).disconnect(),this._subscribers={},u(this,ye).destroy(),u(this,oe).traverse(r=>{mr(r),"dispose"in r&&typeof r.dispose=="function"&&r.dispose()}),_(this,oe,void 0),u(this,D).htmlControlsSystem.destroy(),u(this,D).collisionSystem.destroy(),u(this,D).domMutationSystem.destroy(),_(this,D,void 0),this.map&&(this.map.transform.getElevation=void 0,this.map.remove()),this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement),this.container.removeChild(u(this,Ze)),this.container.removeChild(u(this,nt)),_(this,ye,void 0)});(i.mode==="outdoors-interleaved"||i.mode==="outdoors-overlay")&&i.map&&(_(this,Fi,i.mode),this.map=i.map),u(this,A).entityScene.addEventListener("childadded",()=>{u(this,mt).call(this),u(this,bt).call(this)}),u(this,A).entityScene.addEventListener("childremoved",()=>{u(this,mt).call(this),u(this,bt).call(this)}),u(this,A).entity3DMap.set(u(this,A).entityScene.userData.entityId,u(this,A).entityScene),i.center&&(u(this,A).center=i.center?[...i.center]:[0,0]),this.options=i,this.container=r,j(this,gc,Ab).call(this),j(this,vc,Nb).call(this),u(this,D).htmlControlsSystem=new dc(this.container),u(this,Fi)!=="outdoors-overlay"&&u(this,D).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),b.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),_(this,ye,new yl({antialias:typeof i.antialias=="boolean"?i.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(m=i.gl)==null?void 0:m.canvas:void 0,onWebGLContextCreationError:i.onWebGLContextCreationError,onWebGLContextLost:()=>{typeof i.onWebGLContextLost=="function"&&i.onWebGLContextLost()},onWebGLContextRestored:()=>{i.onWebGLContextRestored&&i.onWebGLContextRestored(),u(this,bt).call(this),u(this,mt).call(this),this.render()},onWebGLRendererError:i.onWebGLRendererError,backgroundColor:i.backgroundColor||"#ffffff",backgroundAlpha:(x=i.backgroundAlpha)!=null?x:1})),_(this,oe,new ss),u(this,oe).add(u(this,A).entityScene);let n=window.__THREE_DEVTOOLS__;b.env.NODE_ENV==="dev"&&typeof n<"u"&&(n.dispatchEvent(new CustomEvent("observe",{detail:u(this,oe)})),n.dispatchEvent(new CustomEvent("observe",{detail:u(this,ye)}))),_(this,Dt,new Kd(LP,this.aspect,50,1e5)),_(this,Ia,new Jd),u(this,Dt).renderOrder=999;let o=new Ce;o.add(u(this,Dt)),_(this,Gn,new Ce),u(this,Gn).add(o),u(this,oe).add(u(this,Gn)),u(this,Dt).updateProjectionMatrix(),u(this,Dt).updateMatrixWorld(!0),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=u(this,ye).domElement(),_(this,Bn,new z);let a=new $i(1e6,1e6),l=new xr({color:0,visible:!1});_(this,Zr,new Ft(a,l)),u(this,oe).add(u(this,Zr)),(S=i.gl)!=null&&S.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",u(this,Vn),!1),u(this,_a).addEventListener("change",u(this,Oa)),typeof ResizeObserver=="function"&&((P=b.env)==null?void 0:P.NODE_ENV)!=="test"&&(_(this,Ri,new ResizeObserver(Rn(()=>{u(this,Vn).call(this)},0))),(g=u(this,Ri))==null||g.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(C=globalThis.MappedinDebug)!=null&&C.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(M=globalThis.MappedinDebug)!=null&&M.TEST_IOS?"1920px":"100%",_(this,Ni,this.rendererDomElement.clientWidth),_(this,ki,this.rendererDomElement.clientHeight),this.rendererDomElement.style.touchAction="manipulation";let c=this.canvasWidth,h=this.canvasHeight;u(this,D).watermarkSystem=new pc(u(this,Dt),c,h,i==null?void 0:i.watermark),u(this,A).shouldMeasureCanvas=!0,u(this,A).pixelRatio=this.resolutionScale,u(this,Na).call(this,Math.floor(c*this.resolutionScale),Math.floor(h*this.resolutionScale));let d=new us(16777215,.3*Math.PI);d.position.set(-150,-150,350),u(this,oe).add(d);let y=new sm(16777215,.741*Math.PI);u(this,oe).add(y),u(this,D).cameraSystem=new ba(u(this,Dt),u(this,oe),u(this,ye).renderer,u(this,A),{mode:this.mode,canvasHeight:h,canvasWidth:c}),u(this,D).cameraSystem.on("user-dolly-start",u(this,$t)),u(this,D).cameraSystem.on("user-pan-start",u(this,$t)),u(this,D).cameraSystem.on("user-rotate-start",u(this,$t)),u(this,D).cameraSystem.on("user-zoom-start",u(this,$t)),u(this,D).cameraSystem.on("user-tilt-start",u(this,$t)),u(this,D).cameraSystem.on("user-pedestal-start",u(this,$t)),u(this,D).cameraSystem.on("user-dolly-end",u(this,Jt)),u(this,D).cameraSystem.on("user-pan-end",u(this,Jt)),u(this,D).cameraSystem.on("user-rotate-end",u(this,Jt)),u(this,D).cameraSystem.on("user-zoom-end",u(this,Jt)),u(this,D).cameraSystem.on("user-tilt-end",u(this,Jt)),u(this,D).cameraSystem.on("user-pedestal-end",u(this,Jt)),u(this,D).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),this.render()}),u(this,D).panBoundsSystem=new fc(u(this,A),u(this,D).cameraSystem),this.camera=new uc(this,u(this,D),u(this,A),u(this,Zr)),this.camera.setZoomLevel((T=i.zoomLevel)!=null?T:Yf),this.camera.setBearing((w=i.bearing)!=null?w:zf),this.camera.setPitch((E=i.pitch)!=null?E:jf),this.camera.setMaxZoomLevel(22),u(this,D).domVisiblitySystem=new Kl(u(this,A),u(this,Ze)),u(this,D).domMutationSystem=new cc(u(this,A),u(this,Ze)),u(this,D).domMutationSystem.on("dimensions-update",()=>{u(this,D).collisionSystem.dirty=!0,this.render()}),u(this,D).domDrawSystem=new lc(u(this,A)),u(this,D).collisionSystem=new Sl(u(this,De),u(this,A)),u(this,D).twoDDrawSystem=new tc(u(this,A),u(this,dt)),u(this,D).interactionSystem=new Wo(this.rendererDomElement,u(this,A),u(this,Dt),u(this,Zr)),u(this,D).interactionSystem.on("hover",this.render),u(this,D).interactionSystem.on("click",L=>{var R,F,k,G;if(((R=L.entity2D)==null?void 0:R.id)==="watermark"&&typeof u(this,D).watermarkSystem.options.onClick=="function"){u(this,D).watermarkSystem.options.onClick();return}this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(L.position),geometry:L.entity3D?[(F=L.entity3D)==null?void 0:F.id]:[],markers:((k=L.entity2D)==null?void 0:k.components[0])instanceof de?[L.entity2D.id]:[],labels:((G=L.entity2D)==null?void 0:G.components[0])instanceof je?[L.entity2D.id]:[],pointerEvent:L.pointerEvent})}),u(this,D).interactionSystem.on("hover",L=>{var R,F,k,G;L.position&&((R=L.entity2D)==null?void 0:R.id)!=="watermark"&&this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(L.position),geometry:L.entity3D?[(F=L.entity3D)==null?void 0:F.id]:[],markers:((k=L.entity2D)==null?void 0:k.components[0])instanceof de?[L.entity2D.id]:[],labels:((G=L.entity2D)==null?void 0:G.components[0])instanceof je?[L.entity2D.id]:[]})}),u(this,D).twoDVisiblitySystem=new rc(u(this,A)),u(this,D).drawSystem=new ec(u(this,A)),u(this,D).stackSystem=new oc(u(this,A)),u(this,D).twoDProjectionSystem=new Ql(u(this,A),u(this,Aa)),u(this,D).zoomInterpolationSystem=new kl,u(this,D).exporterSystem=new oa(u(this,A)),u(this,D).meshOptimizationSystem=new Jl(u(this,A),this.convertTo3DMapPosition),u(this,D).customGeometrySystem=new mc(u(this,A)),u(this,D).outlineInterpolationSystem=new yc(u(this,A)),u(this,D).renderSystem=new ic(u(this,ye),u(this,A),this.mode,u(this,oe),u(this,Dt),this.viewCamera,u(this,D)),u(this,D).renderSystem.on("measure-canvas",u(this,Hn)),u(this,Cc).call(this)}get viewCamera(){return u(this,Ia)}get canvasWidth(){return u(this,Ni)}get canvasHeight(){return u(this,ki)}get resolutionScale(){var r,i;return(i=(r=this.map)==null?void 0:r.getPixelRatio())!=null?i:Yr()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return u(this,Fi)}addGroupContainer(r,i,n){var o;if(u(this,A).entity3DMap.has(r))X.error(`Group container with ID '${r}' already exists. The group container cannot be added.`);else{let a=new re(r);a.addEventListener("childadded",()=>{u(this,mt).call(this),u(this,bt).call(this)}),a.addEventListener("childremoved",()=>{u(this,mt).call(this),u(this,bt).call(this)}),(i==null?void 0:i.visible)!==void 0&&(a.visible=i.visible),(i==null?void 0:i.altitude)!==void 0&&a.setAltitude(i.altitude),u(this,A).entity3DMap.set(r,a),(o=j(this,ue,Oe).call(this,n))==null||o.addEntity(a),u(this,mt).call(this),this.render()}return{id:r,type:"group-container"}}addStackContainer(r,i,n){var o;if(u(this,A).entity3DMap.has(r))X.error(`Stack container with ID '${r}' already exists. The group container cannot be added.`);else{let a=new re(r);a.addEventListener("childadded",()=>{u(this,mt).call(this),u(this,bt).call(this)}),a.addEventListener("childremoved",()=>{u(this,mt).call(this),u(this,bt).call(this)}),a.components[0]=new In,(i==null?void 0:i.visible)!==void 0&&(a.visible=i.visible),u(this,A).entity3DMap.set(r,a),(o=j(this,ue,Oe).call(this,n))==null||o.addEntity(a)}return{id:r,type:"stack-container"}}addCustomGeometry(r,i,n,o,a){var l;if(u(this,A).entity3DMap.has(r))X.error(`Custom geometry with ID '${r}' already exists. The group container cannot be added.`);else{let c=new wa(i,n),h=new St(c,new jr(o));h.id=r,c.mesh.userData={entityId:r,type:"custom-geometry"},u(this,A).entity3DMap.set(h.id,h),(l=j(this,ue,Oe).call(this,a))==null||l.addEntity(h),this.render()}return{id:r,type:"custom-geometry"}}addGeometryGroup(r,i,n,o){var a,l;if(u(this,A).entity3DMap.has(r))X.error(`Geometry group with ID '${r}' already exists. The group container cannot be added.`);else{let c=new fe(r);c.addEventListener("childadded",()=>{u(this,mt).call(this),u(this,bt).call(this)}),c.addEventListener("childremoved",()=>{u(this,mt).call(this),u(this,bt).call(this)}),c.userData.dirty=!0,u(this,A).entity3DMap.set(r,c);for(let h of i.features){if(!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(h.geometry.type))continue;let d=h.id||h.properties.id||vt(),y=u(this,D).meshOptimizationSystem.createEntityFromFeature(d,h,n);u(this,A).entity3DMap.set(d,y),c.userData.entities3D.add(d)}c.setVisible((a=n==null?void 0:n.visible)!=null?a:!0),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(c),u(this,mt).call(this),this.render()}return{id:r,type:"geometry-group"}}addModelGroup(r,i,n,o){var a;if(u(this,A).entity3DMap.has(r))X.error(`Model group with ID '${r}' already exists. The group container cannot be added.`);else{let l=new fe(r);l.addEventListener("childadded",()=>{u(this,mt).call(this),u(this,bt).call(this)}),l.addEventListener("childremoved",()=>{u(this,mt).call(this),u(this,bt).call(this)}),l.userData.dirty=!0,l.userData.modelURL=n.url;for(let c of i.features){let h=c.id||c.properties.id||vt(),d=u(this,D).meshOptimizationSystem.createModelFromFeature(h,c,n);u(this,A).entity3DMap.set(h,d),l.userData.entities3D.add(h)}u(this,A).entity3DMap.set(r,l),(a=j(this,ue,Oe).call(this,o))==null||a.addEntity(l),u(this,mt).call(this),this.render()}return{id:r,type:"geometry-group"}}addMarker2D(r,i,n,o){var l;let a=j(this,ka,Xf).call(this,r,new de(i,n));return(n==null?void 0:n.interactive)!=null&&Ue(a,n==null?void 0:n.interactive,u(this,A)),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(a),this.render(),{id:a.id,type:"marker"}}addLabel2D(r,i,n,o){var l;if(n!=null&&n.id&&u(this,A).entity2DIds.has(n==null?void 0:n.id))return{id:n.id};let a=j(this,ka,Xf).call(this,r,new je(i,n||{},u(this,A)));return a.id=(n==null?void 0:n.id)||a.id,(n==null?void 0:n.interactive)!=null&&Ue(a,n==null?void 0:n.interactive,u(this,A)),(l=j(this,ue,Oe).call(this,o))==null||l.addEntity(a),u(this,bt).call(this),this.render(),{id:a.id,type:"label"}}addPath(r,i={},n){var l;let o=new nc(r.features.map(c=>c.geometry.coordinates).map(c=>this.convertTo3DMapPosition(c[1],c[0],c[2]||0)),i),a=new St(o,new jr);return a.id=(i==null?void 0:i.id)||vt(),o.mesh.userData={entityId:a.id,type:"path"},u(this,A).entity3DMap.set(a.id,a),(i==null?void 0:i.interactive)!=null&&Ue(a,i==null?void 0:i.interactive,u(this,A)),(l=j(this,ue,Oe).call(this,n))==null||l.addEntity(a),u(this,mt).call(this),this.render(),{id:a.id,type:"path"}}updateStackState(r,i){let n;(typeof r=="string"||typeof r=="number")&&(n=u(this,A).entity3DMap.get(r)),n!=null&&n.components[0]&&(typeof i.activeId<"u"&&(n.components[0].activeId=i.activeId),typeof i.expandedFactor<"u"&&(n.components[0].percentExpanded=i.expandedFactor),n.components[0].dirty=!0,this.render())}remove(r){let i;if(typeof r=="string"||typeof r=="number"?(i=u(this,A).entity2DMap.get(r),i==null&&(i=u(this,A).entity3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(i=u(this,A).entity2DMap.get(r.id),i==null&&(i=u(this,A).entity3DMap.get(r.id))):i=r,i!=null){if(i.type==="custom-geometry")u(this,A).entity3DMap.delete(i.id),i.object3d&&mr(i.object3d);else if(i.type==="group-container"){u(this,A).entity3DMap.delete(i.userData.entityId);for(let n of i.childrenIds.values())this.remove(n),i.userData.entities2D.delete(n);mr(i)}else if(i.type==="geometry-group"){u(this,A).entity3DMap.delete(i.userData.entityId);for(let n of i.userData.entities3D.values())this.remove(n),i.userData.entities3D.delete(n);mr(i)}else i.type==="geometry"||i.type==="model"||i.type==="path"?(i.object3d&&mr(i.object3d),i.components[0].outline&&mr(i.components[0].outline),u(this,A).entity3DMap.delete(i.id)):(i.type==="marker"||i.type==="label")&&(i.object3d&&mr(i.object3d),i.type==="label"&&delete u(this,D).twoDDrawSystem.textCache[i.id],u(this,A).entity2DMap.delete(i.id));u(this,mt).call(this),u(this,bt).call(this),this.render()}}getScene(){return this.getState("__scene")}getCurrentSceneGLTF(r){return u(this,D).exporterSystem.getCurrentSceneGLTF(r)}getBoundingBox(r){if(this.renderSync(),r==null){let n=new Ne;n.setFromObject(u(this,A).entityScene);let o=n.min,a=n.max;return[this.convert3DMapPositionToCoordinate(o),this.convert3DMapPositionToCoordinate(a)]}let i=Cl(u(this,A),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let n=new Ne;return n.setFromObject(i.object3d),[this.convert3DMapPositionToCoordinate(n.min),this.convert3DMapPositionToCoordinate(n.max)]}else if(((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null){let n=new Ne;return n.setFromObject(i),[this.convert3DMapPositionToCoordinate(n.min),this.convert3DMapPositionToCoordinate(n.max)]}}getState(r){var n;if(r==null)return{type:"map-view",hoverColor:u(this,A).hoverColor};let i=Cl(u(this,A),r);if((i==null?void 0:i.type)==="custom-geometry"){let o=i.components[0],a=i.components[1];return{id:i.id,type:"custom-geometry",visible:a.visible,altitude:a.altitude,parent:(n=i.parent)==null?void 0:n.userData.entityId,position:this.convert3DMapPositionToCoordinate(o.position)}}else if((i==null?void 0:i.type)==="geometry-group"){let o=[];for(let a of i.userData.entities3D.values()){let l=this.getState(a);(l.type==="geometry"||l.type==="model")&&o.push(l)}return{id:i.userData.entityId,type:"geometry-group",visible:i.visible,opacity:i.getOpacity(),interactive:Array.from(i.userData.entities3D.values()).map(a=>u(this,A).entity3DMap.get(a)).every(a=>a.components[2]!=null),children:Array.from(i.userData.entities3D.values()).map(a=>this.getState(a)).filter(Boolean)}}else{if((i==null?void 0:i.type)==="group-container")return{id:i.userData.entityId,type:"group-container",visible:i.visible,altitude:i.altitude,children:Array.from(i.childrenIds.values()).map(o=>this.getState(o)).filter(Boolean)};if((i==null?void 0:i.type)==="label"){let o=i.components[0],a=i.object3d.parent,l=a==null?void 0:a.userData.entityId;return{id:i.id,type:"label",text:o.text||"",parent:{id:l,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),enabled:o.enabled,initialRank:ea(o.initialRank),options:{rank:ea(o.rank),appearance:o.appearance,interactive:i.components[1]!=null}}}else if((i==null?void 0:i.type)==="marker"){let o=i.components[0],a=i.object3d.parent,l=a==null?void 0:a.userData.entityId;return{id:i.id,type:"marker",enabled:o.enabled,parent:{id:l,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),element:o.containerEl,initialRank:ea(o.initialRank),options:{rank:ea(o.rank),interactive:i.components[1]!=null||!1}}}else if((i==null?void 0:i.type)==="geometry"){let{color:o,hoverColor:a,initialColor:l,topColor:c}=i.components[1],h=i.components[0],d=i.components[1];return{id:i.id,type:"geometry",color:o,topColor:c,initialColor:l,hoverColor:a,visible:d.visible,position:this.convert3DMapPositionToCoordinate(h.position),interactive:i.components[2]!=null}}else if((i==null?void 0:i.type)==="model"){let o=i.components[0],a=i.components[2];return{id:i.id,type:"model",position:this.convert3DMapPositionToCoordinate(o.position),interactive:a!=null}}else if((i==null?void 0:i.type)==="path"){let o=i.components[0],a=i.components[2],l=i.components[1];return{id:i.id,type:"path",position:this.convert3DMapPositionToCoordinate(o.position),visible:l.visible,interactive:a!=null,completeFraction:o.completeFraction}}else return}}setState(r,i){var o,a,l;if(typeof r=="object"&&"hoverColor"in r&&i==null){u(this,A).hoverColor=(o=r.hoverColor)!=null?o:u(this,A).hoverColor;return}let n=Cl(u(this,A),r);if(n!=null){if(n.type==="custom-geometry"){let c=u(this,A).entity3DMap.get(n.id);if(c instanceof St&&c.components[0]instanceof wa){let h=i;An(n,h.visible),$h(n,h.altitude),Zh(n,h.position,this.convertTo3DMapPosition),qh(n,j(this,ue,Oe).call(this,h.parent,!1))}}else if(n.type==="model"||n.type==="path"){let c=i;Ue(n,c.interactive,u(this,A))&&u(this,mt).call(this),n.type==="path"&&(c=c,Xv(n,c),An(n,c.visible))}else if(n.type==="group-container"){let c=i;An(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),$h(n,c.altitude)}else if(n.type==="geometry-group"){let c=i;An(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),Wv(n,u(this,A),c.opacity),Ue(n,c.interactive,u(this,A))&&(u(this,mt).call(this),u(this,bt).call(this))}else if(n.type==="geometry"){if(n.components[0]instanceof ze){let c=i;An(n,c.visible)&&(u(this,D).outlineInterpolationSystem.dirty=!0),Vv(n,c),Uv(n,c.hoverColor),Ue(n,c.interactive,u(this,A))}u(this,mt).call(this)}else if(n.type==="label"||n.type==="marker"){let c=i;zv(n,i),Yv(n,i)&&u(this,bt).call(this),jv(n,(a=c.options)==null?void 0:a.rank)&&u(this,bt).call(this),Zh(n,c.position,this.convertTo3DMapPosition),qh(n,j(this,ue,Oe).call(this,c.parent,!1))&&(u(this,bt).call(this),u(this,D).panBoundsSystem.dirty=!0),Hv(n,c.enabled),Ue(n,(l=c.options)==null?void 0:l.interactive,u(this,A))&&u(this,bt).call(this)}this.render()}}getSystems(){return u(this,D)}getInternalState(){return u(this,A)}};oe=new WeakMap,Dt=new WeakMap,Ia=new WeakMap,Bn=new WeakMap,Zr=new WeakMap,Ni=new WeakMap,ki=new WeakMap,Ri=new WeakMap,Gn=new WeakMap,Ea=new WeakSet,Hf=s(function(r){var i;u(this,Fi)!=="outdoors-overlay"&&((i=this.map)==null||i.setPixelRatio(r)),u(this,A).pixelRatio=this.resolutionScale},"#setResolutionScale"),A=new WeakMap,nt=new WeakMap,De=new WeakMap,dt=new WeakMap,Ze=new WeakMap,ye=new WeakMap,D=new WeakMap,_a=new WeakMap,bt=new WeakMap,mt=new WeakMap,gc=new WeakSet,Ab=s(function(){_(this,nt,document.createElement("div")),u(this,nt).classList.add("mappedin__smart-collision-engine__container"),_(this,De,document.createElement("canvas")),u(this,De).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(u(this,nt)),_(this,dt,document.createElement("canvas")),u(this,dt).classList.add("mappedin__smart-collision-engine__container"),u(this,dt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,dt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,dt).style.width=u(this,nt).clientWidth+"px",u(this,dt).style.height=u(this,nt).clientHeight+"px",u(this,nt).appendChild(u(this,De)),u(this,nt).appendChild(u(this,dt)),u(this,De).width=u(this,nt).clientWidth,u(this,De).height=u(this,nt).clientHeight,u(this,dt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,dt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,dt).style.width=u(this,nt).clientWidth+"px",u(this,dt).style.height=u(this,nt).clientHeight+"px"},"#renderEntity2DContainer"),vc=new WeakSet,Nb=s(function(){_(this,Ze,document.createElement("div")),u(this,Ze).classList.add("mappedin-2d-entities"),Object.assign(u(this,Ze).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none"}),this.container.appendChild(u(this,Ze))},"#renderEntityDOMContainer"),bc=new WeakSet,kb=s(function(){u(this,dt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,dt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,dt).style.width=u(this,nt).clientWidth+"px",u(this,dt).style.height=u(this,nt).clientHeight+"px",u(this,De).width=u(this,nt).clientWidth,u(this,De).height=u(this,nt).clientHeight,u(this,dt).width=u(this,nt).clientWidth*this.resolutionScale,u(this,dt).height=u(this,nt).clientHeight*this.resolutionScale,u(this,dt).style.width=u(this,nt).clientWidth+"px",u(this,dt).style.height=u(this,nt).clientHeight+"px",u(this,D).collisionSystem.dirty=!0},"#resizeCollisionCanvas"),Fi=new WeakMap,La=new WeakMap,Oa=new WeakMap,Vn=new WeakMap,Cc=new WeakMap,Da=new WeakMap,Aa=new WeakMap,Na=new WeakMap,Hn=new WeakMap,ue=new WeakSet,Oe=s(function(r,i=!0){if(!r)return i?u(this,A).entityScene:void 0;if(typeof r=="string"||typeof r=="number"){let n=u(this,A).entity3DMap.get(r);return n instanceof re?n:(X.warn("Parent is not a valid container, adding to scene"),i?u(this,A).entityScene:void 0)}else if(r.type==="group-container"){let n=u(this,A).entity3DMap.get(r.id);if(n instanceof re)return n}return i?u(this,A).entityScene:void 0},"#getParentContainer"),ka=new WeakSet,Xf=s(function(r,i,n){let o=new Ee(i,this.convertTo3DMapPosition(r[1],r[0],r[2]||n||0));return u(this,A).entity2DMap.set(o.id,o),o},"#createEntity2D"),$t=new WeakMap,Jt=new WeakMap,s(Wf,"Core");var Vf=Wf,Uf=Vf;f();var OP="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",DP="https://auth.mappedin.com/oauth2/token";async function Rb(e,t){var r,i,n,o,a;if((r=t==null?void 0:t.outdoorView)!=null&&r.enabled&&((i=t==null?void 0:t.outdoorView)!=null&&i.headers)){let l=t.outdoorView.layersHiddenByGeometry||["building","building-top"],{Map:c,MercatorCoordinate:h}=await import("./outdoor-context-v4-RDGUV55W.js"),d=t.outdoorView.headers;d==null&&(d=await H2(DP));let y=t.center||[0,0],m=new c({container:e,style:t.outdoorView.style||OP,center:y,attributionControl:!1,zoom:(n=t.zoomLevel)!=null?n:Yf,pitch:(o=t.pitch)!=null?o:jf,bearing:(a=t.bearing)!=null?a:zf,transformRequest:E=>{var L;return{url:E,headers:(L=t.outdoorView)==null?void 0:L.headers}},trackResize:!1,pixelRatio:Yr(),antialias:typeof t.antialias=="boolean"?t.antialias:!0});m.touchZoomRotate.disable(),m.doubleClickZoom.disable(),m.scrollZoom.disable(),m.dragPan.disable(),m.keyboard.disable(),m.boxZoom.disable(),m.dragRotate.disable();let x=m.painter.context.gl,S=new Uf(e,{center:m.getCenter().toArray(),zoomLevel:m.getZoom(),pitch:m.getPitch(),bearing:m.getBearing(),gl:x,map:m,mode:"outdoors-interleaved",watermark:t.watermark,attribution:t.attribution,antialias:t.antialias}),P=!1;m.on("render",async()=>{if(!m||P||l.length===0||!m.getLayer(l[0]))return;let E=[],L=m.project(m.getCenter().toArray()),R=m.queryRenderedFeatures([L.x,L.y],{layers:l});for(var F of R)E.push(["!=",["id"],F.id]);E.length>0&&(l.forEach(k=>{m.setFilter(k,["all",...E])}),P=!0)});let g={center:m.getCenter().toArray(),zoom:m.getZoom(),bearing:m.getBearing(),pitch:m.getPitch()};m.setMinZoom(S.camera.minZoomLevel),m.setMaxZoom(S.camera.maxZoomLevel),S.on("camera-change",E=>{g.center=E.center,g.zoom=E.zoomLevel,g.bearing=-E.bearing,g.pitch=E.pitch,m.jumpTo(g)});let C=h.fromLngLat(y,0),M=V2(C,S.viewCamera,S.camera,()=>{S.renderSync()}),T=!1;m.on("style.load",async()=>{m&&(m.addLayer(M),S.renderSync())}),m.on("idle",()=>{m&&(T||(S.publish("outdoor-view-loaded"),T=!0))});let w=s(E=>{E&&(E.sourceDataType==="metadata"||E.sourceDataType==="visibility"||E.dataType==="style"||E.type==="terrain")&&S.getSystems().htmlControlsSystem.updateData(m)},"updateData");return m.on("styledata",w),m.on("sourcedata",w),m.on("terrain",w),m.on("error",E=>{X.warn(E)}),S}else return new Uf(e,t)}s(Rb,"createRenderer");f();f();var Xn=class Xn{id;text;__type=Xn.__type;static is(t){return t.__type===Xn.__type}constructor(t,r){this.id=t,this.text=r}};s(Xn,"Label"),v(Xn,"__type","Label");var qr=Xn;f();var Yn=class Yn{id;__type=Yn.__type;contentEl;update;static is(t){return t.__type===Yn.__type}constructor(t,r,i){this.id=t,this.contentEl=r,this.update=i}};s(Yn,"Marker"),v(Yn,"__type","Marker");var Bi=Yn;f();var Zf=class Zf{id;__type;constructor(t){this.id=t,this.__type="Path"}};s(Zf,"Path");var Ra=Zf;f();var $r,qf=class qf{constructor(t){I(this,$r,void 0);_(this,$r,t)}get center(){return u(this,$r).center}get bearing(){return u(this,$r).bearing}get pitch(){return u(this,$r).pitch}get zoomLevel(){return u(this,$r).zoomLevel}};$r=new WeakMap,s(qf,"CameraTransform");var Fa=qf;f();f();f();var AP=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
488
+ <path
489
+ fillRule="evenodd"
490
+ clipRule="evenodd"
491
+ 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"
492
+ stroke="none"
493
+ />
494
+ </svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
495
+ <path
496
+ 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"
497
+ stroke="none"
498
+ />
499
+ <path
500
+ 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"
501
+ stroke="none"
502
+ />
503
+ </svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
504
+ <g>
505
+ <g clipPath="url(#clip0_499_175492)">
506
+ <path
507
+ 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"
508
+ stroke="none"
509
+ fill="#F5F5F5"
510
+ />
511
+ <path
512
+ 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"
513
+ fill="none"
514
+ />
515
+ <path
516
+ 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"
517
+ fill="#FAFAFA"
518
+ />
519
+ </g>
520
+ <defs>
521
+ <clipPath id="clip0_499_175492">
522
+ <rect width="64" height="40" fill="white" />
523
+ </clipPath>
524
+ </defs>
525
+ </g>
526
+ </svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
527
+ <path
528
+ stroke="none"
529
+ 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"
530
+ />
531
+ </svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
532
+ <path
533
+ 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"
534
+ stroke="none"
535
+ />
536
+ </svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
537
+ <g stroke="none">
538
+ <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" />
539
+ <path
540
+ fillRule="evenodd"
541
+ clipRule="evenodd"
542
+ 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"
543
+ />
544
+ <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" />
545
+ </g>
546
+ </svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
547
+ <path
548
+ 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"
549
+ stroke="none"
550
+ />
551
+ </svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
552
+ <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" />
553
+ <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" />
554
+ <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" />
555
+ <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" />
556
+ </svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
557
+ <path
558
+ fillRule="evenodd"
559
+ clipRule="evenodd"
560
+ 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"
561
+ stroke="none"
562
+ />
563
+ </svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
564
+ <path
565
+ fillRule="evenodd"
566
+ clipRule="evenodd"
567
+ 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"
568
+ stroke="none"
569
+ />
570
+ </svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
571
+ <path
572
+ fillRule="evenodd"
573
+ clipRule="evenodd"
574
+ 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"
575
+ stroke="none"
576
+ />
577
+ </svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
578
+ <path
579
+ fillRule="evenodd"
580
+ clipRule="evenodd"
581
+ 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"
582
+ stroke="none"
583
+ />
584
+ </svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
585
+ <g stroke="none">
586
+ <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" />
587
+ <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
588
+ <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
589
+ <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" />
590
+ </g>
591
+ </svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
592
+ <path
593
+ 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"
594
+ stroke="none"
595
+ />
596
+ </svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
597
+ <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" />
598
+ <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" />
599
+ <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" />
600
+ <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" />
601
+ </svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
602
+ <g stroke="none">
603
+ <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" />
604
+ <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
605
+ <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" />
606
+ </g>
607
+ </svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
608
+ <path
609
+ 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"
610
+ stroke="none"
611
+ />
612
+ <path
613
+ 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"
614
+ stroke="none"
615
+ />
616
+ </svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
617
+ <g stroke="none">
618
+ <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" />
619
+ <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" />
620
+ <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
621
+ <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
622
+ </g>
623
+ </svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
624
+ <path
625
+ 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"
626
+ stroke="none"
627
+ />
628
+ <path
629
+ 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"
630
+ stroke="none"
631
+ />
632
+ <path
633
+ 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"
634
+ stroke="none"
635
+ />
636
+ </svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
637
+ <circle cx="1.9375" cy="4.4375" r="0.9375" />
638
+ <circle cx="1.9375" cy="7.5625" r="0.9375" />
639
+ <path
640
+ fillRule="evenodd"
641
+ clipRule="evenodd"
642
+ 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"
643
+ />
644
+ </svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
645
+ <g stroke="none">
646
+ <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" />
647
+ <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" />
648
+ </g>
649
+ </svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
650
+ <g stroke="none">
651
+ <path
652
+ id="Vector"
653
+ 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"
654
+ />
655
+ </g>
656
+ </svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
657
+ <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" />
658
+ <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" />
659
+ <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" />
660
+ <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" />
661
+ <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" />
662
+ </svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
663
+ <path
664
+ stroke="none"
665
+ id="Subtract"
666
+ // Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs
667
+ fill-rule="evenodd"
668
+ clip-rule="evenodd"
669
+ 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"
670
+ />
671
+ </svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
672
+ <path
673
+ 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"
674
+ stroke="none"
675
+ />
676
+ </svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
677
+ <path
678
+ 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"
679
+ stroke="none"
680
+ />
681
+ </svg>`]]),NP=/<svg([^>]*)>/g;function Fb(e,t,r){let i=AP.get(e);return i?i.replace(NP,`<svg$1 style="fill:${t}; width:${r}px; height:${r}px">`):""}s(Fb,"getStyledIcon");var kP=s(e=>`
682
+ <div class="pin-shadow" style="background: ${e}"></div>
683
+ <svg width="${20*.9}px" height="${48*.9}px" viewBox="0 0 20 48">
684
+ <path
685
+ 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"
686
+ fill={color}
687
+ stroke="white"
688
+ strokeWidth="2"
689
+ />
690
+ </svg>
691
+ `,"getDeparturePin"),RP=s(e=>`
692
+ <div class="pin-shadow" style="background: ${e}"></div>
693
+ <svg width="36" height="42" viewBox="-2 -2 40 46">
694
+ <path
695
+ 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"
696
+ fill="none"
697
+ stroke="white"
698
+ strokeWidth="4"
699
+ />
700
+ <path
701
+ 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"
702
+ fill={color}
703
+ />
704
+ </svg>
705
+ `,"getDestinationPin"),$f="#722ED1",Jf="#1890FF",Kf=s(({type:e="departure",destinationColor:t=$f,departureColor:r=Jf})=>`<div class="dropped-pin-wrapper">
706
+ ${e==="departure"?kP(r):RP(t)}
707
+ </div>`,"DroppedPin"),FP=s(e=>{switch(e){case"default":return 28;case"selection":return 28;case"navigation":return 32}},"getSize"),Bb=s(({type:e="stairs",color:t="#722ED1",direction:r="up"})=>{let i=FP("default"),n=i/2+2;return`<div style="position: relative; width: 56px;" class="mappedin-connection-marker">
708
+ ${r!=null?`<div style="position: absolute; top: 0px; left:${i*.9}px; zIndex: -1">
709
+ <div class="bouncey">
710
+ <div class="connection-circle"
711
+ role="button"
712
+ style="background: #595959; width: ${i}px; height: ${i}px;">
713
+ <div class="${r==="up"?"":"arrow--down"}">
714
+ <svg viewBox="0 0 16 16" style="fill: white; width: ${n}px; height: ${n}px">
715
+ <path
716
+ fillRule="evenodd"
717
+ clipRule="evenodd"
718
+ 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"
719
+ stroke="none"
720
+ />
721
+ </svg>
722
+ </div>
723
+ </div>
724
+ </div>
725
+ </div>`:""}
726
+ <div class="connection-circle"
727
+ role="button"
728
+ style="background:${t}; width:${i}px; height:${i}px;"
729
+ >
730
+ ${Fb("connection-"+e+"-16x16","white",n)||""}
731
+ </div>
732
+ </div>`},"ConnectionMarker");f();var Qf=s(async e=>new Promise(t=>setTimeout(t,e)),"ms");var xc={createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:{color:"#40A9FF",nearRadius:.25,farRadius:.25*4,displayArrowsOnPath:!1},polygons:{departure:"#40A9FF"}},gr,vr,Gi,Yt,Jr,Pc,Gb,Ba,td=class td{constructor(t){I(this,Pc);I(this,gr,void 0);I(this,vr,new Map);I(this,Gi,void 0);I(this,Yt,void 0);I(this,Jr,xc);v(this,"draw",async(t,r={})=>{var l,c,h;if(t.coordinates.length<2){X.warn("Directions must have at least 2 coordinates");return}u(this,gr)&&this.clear();let i={pathOptions:{...xc.pathOptions,...r.pathOptions},createMarkers:{...xc.createMarkers,...r.createMarkers},polygons:{...xc.polygons,...r.polygons}};_(this,Jr,i),_(this,gr,t);let n=t.coordinates[0],o=t.coordinates[t.coordinates.length-1],a=u(this,Yt).getMapData()[Object.keys(u(this,Yt).getMapData())[0]];if(n.floorId&&u(this,Yt).setFloor(a.getById("floor",n.floorId)),(l=u(this,Jr).createMarkers)!=null&&l.departure){let d=u(this,Yt).Markers.add(n,Kf({type:"departure"}),{anchor:"top",rank:"always-visible"});u(this,vr).set(d,void 0)}if(await Qf(500),!!u(this,gr)&&(_(this,Gi,u(this,Yt).Paths.add(t.coordinates,u(this,Jr).pathOptions)),await Qf(1e3),!!u(this,gr))){if((c=u(this,Jr).createMarkers)!=null&&c.destination){let d=u(this,Yt).Markers.add(o,Kf({type:"destination"}),{anchor:"top",rank:"always-visible"});u(this,vr).set(d,void 0)}(h=u(this,Jr).createMarkers)!=null&&h.connection&&(t.instructions.filter(y=>j(this,Pc,Gb).call(this,y.action)).forEach(y=>{let m=u(this,Yt).Markers.add(y.coordinate,Bb({type:y.action.connectionType,color:y.action.type==="ExitConnection"?Jf:$f,direction:y.action.direction}),{interactive:!0,anchor:"top",rank:"always-visible"});u(this,vr).set(m,y)}),u(this,Yt).on("click",u(this,Ba)))}});I(this,Ba,s(t=>{if(t.markers.length>0){let r=u(this,vr).get(t.markers[0]);r!=null&&r.action.toFloor&&u(this,Yt).setFloor(r.action.toFloor)}},"#handleClick"));v(this,"clear",()=>{u(this,gr)&&(u(this,vr).forEach((t,r)=>{u(this,Yt).Markers.remove(r)}),u(this,vr).clear(),u(this,Gi)&&(u(this,Yt).Paths.remove(u(this,Gi)),_(this,Gi,void 0)),u(this,Yt).off("click",u(this,Ba)),_(this,gr,void 0))});_(this,Yt,t)}};gr=new WeakMap,vr=new WeakMap,Gi=new WeakMap,Yt=new WeakMap,Jr=new WeakMap,Pc=new WeakSet,Gb=s(function(t){return t!=null&&["TakeConnection","ExitConnection"].includes(t.type)},"#isVortexAction"),Ba=new WeakMap,s(td,"Navigation");var Sc=td;f();f();f();var BP=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
733
+ <path
734
+ fillRule="evenodd"
735
+ clipRule="evenodd"
736
+ 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"
737
+ stroke="none"
738
+ />
739
+ </svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
740
+ <path
741
+ 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"
742
+ stroke="none"
743
+ />
744
+ <path
745
+ 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"
746
+ stroke="none"
747
+ />
748
+ </svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
749
+ <g>
750
+ <g clipPath="url(#clip0_499_175492)">
751
+ <path
752
+ 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"
753
+ stroke="none"
754
+ fill="#F5F5F5"
755
+ />
756
+ <path
757
+ 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"
758
+ fill="none"
759
+ />
760
+ <path
761
+ 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"
762
+ fill="#FAFAFA"
763
+ />
764
+ </g>
765
+ <defs>
766
+ <clipPath id="clip0_499_175492">
767
+ <rect width="64" height="40" fill="white" />
768
+ </clipPath>
769
+ </defs>
770
+ </g>
771
+ </svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
772
+ <path
773
+ stroke="none"
774
+ 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"
775
+ />
776
+ </svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
777
+ <path
778
+ 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"
779
+ stroke="none"
780
+ />
781
+ </svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
782
+ <g stroke="none">
783
+ <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" />
784
+ <path
785
+ fillRule="evenodd"
786
+ clipRule="evenodd"
787
+ 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"
788
+ />
789
+ <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" />
790
+ </g>
791
+ </svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
792
+ <path
793
+ 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"
794
+ stroke="none"
795
+ />
796
+ </svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
797
+ <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" />
798
+ <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" />
799
+ <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" />
800
+ <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" />
801
+ </svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
802
+ <path
803
+ fillRule="evenodd"
804
+ clipRule="evenodd"
805
+ 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"
806
+ stroke="none"
807
+ />
808
+ </svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
809
+ <path
810
+ fillRule="evenodd"
811
+ clipRule="evenodd"
812
+ 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"
813
+ stroke="none"
814
+ />
815
+ </svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
816
+ <path
817
+ fillRule="evenodd"
818
+ clipRule="evenodd"
819
+ 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"
820
+ stroke="none"
821
+ />
822
+ </svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
823
+ <path
824
+ fillRule="evenodd"
825
+ clipRule="evenodd"
826
+ 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"
827
+ stroke="none"
828
+ />
829
+ </svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
830
+ <g stroke="none">
831
+ <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" />
832
+ <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
833
+ <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
834
+ <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" />
835
+ </g>
836
+ </svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
837
+ <path
838
+ 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"
839
+ stroke="none"
840
+ />
841
+ </svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
842
+ <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" />
843
+ <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" />
844
+ <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" />
845
+ <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" />
846
+ </svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
847
+ <g stroke="none">
848
+ <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" />
849
+ <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
850
+ <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" />
851
+ </g>
852
+ </svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
853
+ <path
854
+ 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"
855
+ stroke="none"
856
+ />
857
+ <path
858
+ 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"
859
+ stroke="none"
860
+ />
861
+ </svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
862
+ <g stroke="none">
863
+ <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" />
864
+ <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" />
865
+ <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
866
+ <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
867
+ </g>
868
+ </svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
869
+ <path
870
+ 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"
871
+ stroke="none"
872
+ />
873
+ <path
874
+ 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"
875
+ stroke="none"
876
+ />
877
+ <path
878
+ 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"
879
+ stroke="none"
880
+ />
881
+ </svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
882
+ <circle cx="1.9375" cy="4.4375" r="0.9375" />
883
+ <circle cx="1.9375" cy="7.5625" r="0.9375" />
884
+ <path
885
+ fillRule="evenodd"
886
+ clipRule="evenodd"
887
+ 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"
888
+ />
889
+ </svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
890
+ <g stroke="none">
891
+ <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" />
892
+ <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" />
893
+ </g>
894
+ </svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
895
+ <g stroke="none">
896
+ <path
897
+ id="Vector"
898
+ 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"
899
+ />
900
+ </g>
901
+ </svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
902
+ <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" />
903
+ <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" />
904
+ <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" />
905
+ <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" />
906
+ <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" />
907
+ </svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
908
+ <path
909
+ stroke="none"
910
+ id="Subtract"
911
+ fill-rule="evenodd"
912
+ clip-rule="evenodd"
913
+ 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"
914
+ />
915
+ </svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
916
+ <path
917
+ 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"
918
+ stroke="none"
919
+ />
920
+ </svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
921
+ <path
922
+ 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"
923
+ stroke="none"
924
+ />
925
+ </svg>`]]),GP=/<svg([^>]*)>/g;function Vb(e,t,r){let i=BP.get(e);return i?i.replace(GP,`<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:${t}; width:${r}px; height:${r}px">`):""}s(Vb,"getStyledIcon");var Vi,jn,Ga,ed,wc,Hb,Tc,Xb,Va,rd,Ic,Yb,id=class id{constructor(t,r){I(this,Ga);I(this,wc);I(this,Tc);I(this,Va);I(this,Ic);I(this,Vi,void 0);I(this,jn,void 0);v(this,"colors",{default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F"});_(this,Vi,t),_(this,jn,r)}auto(){let t=u(this,jn)[Object.keys(u(this,jn))[0]];[...t.getByType("connection"),...t.getByType("point-of-interest"),...t.getByType("space")].forEach(r=>{r.__type==="connection"?r.coordinates.forEach(i=>{u(this,Vi).Labels.add(i,r.name,j(this,Ga,ed).call(this,r))}):(r.__type==="space"&&r.name!==""&&u(this,Vi).updateState(r,{interactive:!0,hoverColor:"#F0F0F0"}),u(this,Vi).Labels.add(r,r.name,j(this,Ga,ed).call(this,r)))})}};Vi=new WeakMap,jn=new WeakMap,Ga=new WeakSet,ed=s(function(t){let r=Vb(j(this,wc,Hb).call(this,t),"white",12);return{appearance:{text:{foregroundColor:j(this,Va,rd).call(this,t)},marker:{foregroundColor:{active:j(this,Va,rd).call(this,t)},icon:r,iconSize:12}},interactive:!0,rank:j(this,Ic,Yb).call(this,t)}},"#generatLabelAppearance"),wc=new WeakSet,Hb=s(function(t){return t.__type==="connection"?j(this,Tc,Xb).call(this,t.type):t.name.includes("Washroom")?"washroom-14x14":t.__type==="point-of-interest"?"point-of-interest-12x12":""},"#getIconName"),Tc=new WeakSet,Xb=s(function(t){let r="";switch(t){case"elevator":r="connection-elevator-12x12";break;case"escalator":r="connection-escalator-12x12";break;case"stairs":r="connection-stairs-12x12";break}return r},"#attemptIconNameForConnection"),Va=new WeakSet,rd=s(function(t){return t.__type==="connection"?this.colors.connection:t.__type==="point-of-interest"?this.colors.point:"name"in t&&t.name.includes("Washroom")?this.colors.washroom:this.colors.default},"#getLabelColor"),Ic=new WeakSet,Yb=s(function(t){return t.__type==="connection"?"high":(t.__type==="point-of-interest","medium")},"#getDefaultLabelRank"),s(id,"Labels");var Mc=id;var nd=class nd{Labels;constructor(t,r){this.Labels=new Mc(t,r)}auto=()=>{this.Labels.auto()}};s(nd,"DefaultTheme");var Ec=nd;f();var Pt,od=class od{constructor(t){I(this,Pt,void 0);v(this,"setMinZoomLevel",t=>{u(this,Pt).camera.setMinZoomLevel(t)});v(this,"setMaxZoomLevel",t=>{u(this,Pt).camera.setMaxZoomLevel(t)});_(this,Pt,t)}setScreenOffsets(t){u(this,Pt).camera.setInsetPadding(t)}focusOn(t,r){var o;let i=[],n=Array.isArray(t)?t:[t];for(let a of n)if(Br.is(a)){let l;for(l of a.coordinates)i.push([l.longitude,l.latitude])}else{let l=Rr(a);if(l){let c=0;l.floorId&&(c=((o=u(this,Pt).getState(l.floorId))==null?void 0:o.altitude)||0),i.push([l.longitude,l.latitude,c])}}return u(this,Pt).camera.focusOn(i,{pitch:r==null?void 0:r.pitch,bearing:r==null?void 0:r.bearing,padding:r==null?void 0:r.screenOffsets,maxZoomLevel:r==null?void 0:r.maxZoomLevel,minZoomLevel:r==null?void 0:r.minZoomLevel,duration:r==null?void 0:r.duration,updateZoomLimits:!1,easing:r==null?void 0:r.easing})}animateTo(t,r){var h;let{center:i,zoomLevel:n,bearing:o,pitch:a}=t,l=i!=null?i:this.center,c=[l.longitude,l.latitude];return u(this,Pt).camera.animateTo({center:c,zoomLevel:n!=null?n:this.zoomLevel,bearing:o!=null?o:this.bearing,pitch:a!=null?a:this.pitch,duration:(h=r==null?void 0:r.duration)!=null?h:600,easing:r==null?void 0:r.easing})}set(t){let{center:r=this.center,zoomLevel:i=this.zoomLevel,bearing:n=this.bearing,pitch:o=this.pitch}=t,a=[r.longitude,r.latitude];u(this,Pt).camera.setCenter(a),u(this,Pt).camera.setZoomLevel(i),u(this,Pt).camera.setBearing(n),u(this,Pt).camera.setPitch(o)}get center(){let t=u(this,Pt).camera.center;return new $(t[1],t[0],void 0)}get zoomLevel(){return u(this,Pt).camera.zoomLevel}get pitch(){return u(this,Pt).camera.pitch}get bearing(){let t=u(this,Pt).camera.bearing;return(t<0?t+360:t)%360}get minZoomLevel(){return u(this,Pt).camera.minZoomLevel}get maxZoomLevel(){return u(this,Pt).camera.maxZoomLevel}};Pt=new WeakMap,s(od,"Camera");var Ha=od;f();f();f();f();f();f();f();f();function ad(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return jb(this.cover(t,r),t,r,e)}s(ad,"default");function jb(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,o=e._root,a={data:i},l=e._x0,c=e._y0,h=e._x1,d=e._y1,y,m,x,S,P,g,C,M;if(!o)return e._root=a,e;for(;o.length;)if((P=t>=(y=(l+h)/2))?l=y:h=y,(g=r>=(m=(c+d)/2))?c=m:d=m,n=o,!(o=o[C=g<<1|P]))return n[C]=a,e;if(x=+e._x.call(null,o.data),S=+e._y.call(null,o.data),t===x&&r===S)return a.next=o,n?n[C]=a:e._root=a,e;do n=n?n[C]=new Array(4):e._root=new Array(4),(P=t>=(y=(l+h)/2))?l=y:h=y,(g=r>=(m=(c+d)/2))?c=m:d=m;while((C=g<<1|P)===(M=(S>=m)<<1|x>=y));return n[M]=o,n[C]=a,e}s(jb,"add");function zb(e){var t,r,i=e.length,n,o,a=new Array(i),l=new Array(i),c=1/0,h=1/0,d=-1/0,y=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,l[r]=o,n<c&&(c=n),n>d&&(d=n),o<h&&(h=o),o>y&&(y=o));if(c>d||h>y)return this;for(this.cover(c,h).cover(d,y),r=0;r<i;++r)jb(this,a[r],l[r],e[r]);return this}s(zb,"addAll");f();function sd(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,i=this._y0,n=this._x1,o=this._y1;if(isNaN(r))n=(r=Math.floor(e))+1,o=(i=Math.floor(t))+1;else{for(var a=n-r||1,l=this._root,c,h;r>e||e>=n||i>t||t>=o;)switch(h=(t<i)<<1|e<r,c=new Array(4),c[h]=l,l=c,a*=2,h){case 0:n=r+a,o=i+a;break;case 1:r=n-a,o=i+a;break;case 2:n=r+a,i=o-a;break;case 3:r=n-a,i=o-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=i,this._x1=n,this._y1=o,this}s(sd,"default");f();function ld(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}s(ld,"default");f();function cd(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]]}s(cd,"default");f();f();function Lt(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}s(Lt,"default");function ud(e,t,r){var i,n=this._x0,o=this._y0,a,l,c,h,d=this._x1,y=this._y1,m=[],x=this._root,S,P;for(x&&m.push(new Lt(x,n,o,d,y)),r==null?r=1/0:(n=e-r,o=t-r,d=e+r,y=t+r,r*=r);S=m.pop();)if(!(!(x=S.node)||(a=S.x0)>d||(l=S.y0)>y||(c=S.x1)<n||(h=S.y1)<o))if(x.length){var g=(a+c)/2,C=(l+h)/2;m.push(new Lt(x[3],g,C,c,h),new Lt(x[2],a,C,g,h),new Lt(x[1],g,l,c,C),new Lt(x[0],a,l,g,C)),(P=(t>=C)<<1|e>=g)&&(S=m[m.length-1],m[m.length-1]=m[m.length-1-P],m[m.length-1-P]=S)}else{var M=e-+this._x.call(null,x.data),T=t-+this._y.call(null,x.data),w=M*M+T*T;if(w<r){var E=Math.sqrt(r=w);n=e-E,o=t-E,d=e+E,y=t+E,i=x.data}}return i}s(ud,"default");f();function pd(e){if(isNaN(d=+this._x.call(null,e))||isNaN(y=+this._y.call(null,e)))return this;var t,r=this._root,i,n,o,a=this._x0,l=this._y0,c=this._x1,h=this._y1,d,y,m,x,S,P,g,C;if(!r)return this;if(r.length)for(;;){if((S=d>=(m=(a+c)/2))?a=m:c=m,(P=y>=(x=(l+h)/2))?l=x:h=x,t=r,!(r=r[g=P<<1|S]))return this;if(!r.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(i=t,C=g)}for(;r.data!==e;)if(n=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,n?(o?n.next=o:delete n.next,this):t?(o?t[g]=o:delete t[g],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(i?i[C]=r:this._root=r),this):(this._root=o,this)}s(pd,"default");function Ub(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}s(Ub,"removeAll");f();function hd(){return this._root}s(hd,"default");f();function fd(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}s(fd,"default");f();function dd(e){var t=[],r,i=this._root,n,o,a,l,c;for(i&&t.push(new Lt(i,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(i=r.node,o=r.x0,a=r.y0,l=r.x1,c=r.y1)&&i.length){var h=(o+l)/2,d=(a+c)/2;(n=i[3])&&t.push(new Lt(n,h,d,l,c)),(n=i[2])&&t.push(new Lt(n,o,d,h,c)),(n=i[1])&&t.push(new Lt(n,h,a,l,d)),(n=i[0])&&t.push(new Lt(n,o,a,h,d))}return this}s(dd,"default");f();function md(e){var t=[],r=[],i;for(this._root&&t.push(new Lt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var n=i.node;if(n.length){var o,a=i.x0,l=i.y0,c=i.x1,h=i.y1,d=(a+c)/2,y=(l+h)/2;(o=n[0])&&t.push(new Lt(o,a,l,d,y)),(o=n[1])&&t.push(new Lt(o,d,l,c,y)),(o=n[2])&&t.push(new Lt(o,a,y,d,h)),(o=n[3])&&t.push(new Lt(o,d,y,c,h))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}s(md,"default");f();function Wb(e){return e[0]}s(Wb,"defaultX");function yd(e){return arguments.length?(this._x=e,this):this._x}s(yd,"default");f();function Zb(e){return e[1]}s(Zb,"defaultY");function gd(e){return arguments.length?(this._y=e,this):this._y}s(gd,"default");function Xa(e,t,r){var i=new vd(t==null?Wb:t,r==null?Zb:r,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}s(Xa,"quadtree");function vd(e,t,r,i,n,o){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=o,this._root=void 0}s(vd,"Quadtree");function qb(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}s(qb,"leaf_copy");var Kt=Xa.prototype=vd.prototype;Kt.copy=function(){var e=new vd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,i;if(!t)return e;if(!t.length)return e._root=qb(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var n=0;n<4;++n)(i=t.source[n])&&(i.length?r.push({source:i,target:t.target[n]=new Array(4)}):t.target[n]=qb(i));return e};Kt.add=ad;Kt.addAll=zb;Kt.cover=sd;Kt.data=ld;Kt.extent=cd;Kt.find=ud;Kt.remove=pd;Kt.removeAll=Ub;Kt.root=hd;Kt.size=fd;Kt.visit=dd;Kt.visitAfter=md;Kt.x=yd;Kt.y=gd;f();f();var bd=class bd{origin;destination;distance;angle;weight;constructor({origin:t,destination:r,distance:i=0,angle:n=0,pathWeight:o=0}){this.origin=t,this.destination=r,this.distance=i,this.angle=n;let a=o||0;if(this.weight=a>=0?this.distance+a:0,isNaN(this.angle))throw new Error("nan angle")}};s(bd,"Edge");var Hi=bd;f();f();f();f();function zn([e,t],[r,i]){let n=t-i,o=e-r;return(Math.atan2(o,n)+Math.PI*3)%(Math.PI*2)}s(zn,"getAngle");f();var VP=63710088e-1;function Xi(e,t){let[r,i]=e.map(d=>d*Math.PI/180),[n,o]=t.map(d=>d*Math.PI/180),a=o-i,l=n-r,c=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),h=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return VP*h}s(Xi,"getDistance");f();f();function _c(e,t,r,i){let[n,o]=e,[a,l]=t,[c,h]=r,[d,y]=i;if(o===l&&n===a||h===y&&c===d)return null;let m=(d-c)*(l-o)-(y-h)*(a-n);if(m===0)return null;let x=((y-h)*(n-c)-(d-c)*(o-h))/m,S=((l-o)*(n-c)-(a-n)*(o-h))/m;if(x<0||x>1||S<0||S>1)return null;let P=o+x*(l-o);return[n+x*(a-n),P]}s(_c,"getLineIntersection");f();function Cd(e,t,r){if(e[1]===t[1])return[[e[0],e[1]+r],[t[0],t[1]+r]];if(e[0]===t[0])return[[e[0]+r,e[1]],[t[0]+r,t[1]]];let n=-1/((t[1]-e[1])/(t[0]-e[0])),o=r*Math.sqrt(1/(1+n*n)),a=n*o;return[[e[0]+a,e[1]+o],[t[0]+a,t[1]+o]]}s(Cd,"getOffsetLine");function $b(e,t,r=[],i=0){let n=!0;return r.forEach(o=>{let a=e.geometry.coordinates,l=t.geometry.coordinates;if(i>0){let c=Cd(a,l,-i),h=Cd(a,l,i);if(_c(c[0],c[1],o[0],o[1])||_c(h[0],h[1],o[0],o[1])){n=!1;return}}else if(_c(a,l,o[0],o[1])){n=!1;return}}),n}s($b,"hasLineOfSight");f();var HP=63710088e-1;function Jb(e,t){let r=1/HP,i=t*Math.PI/180;return e*r*(180/Math.PI)/Math.cos(i)}s(Jb,"metersToDegreesLongitude");var xd=class xd{edges;nodesById;nodesByGroup=new Map;constructor({nodes:t,groupBy:r}){this.edges={};let{features:i}=t;this.nodesById=i.reduce((n,o)=>(n[o.properties.id]=o,n),{});for(let n in this.nodesById)this.nodesById.hasOwnProperty(n)&&(this.nodesById[n].properties.neighbors=this.nodesById[n].properties.neighbors.filter(({id:o})=>!!this.nodesById[o]));i.forEach(n=>{let o=r==="default"?r:n.properties[r];this.nodesByGroup.has(o)||this.nodesByGroup.set(o,[]),this.nodesByGroup.get(o).push(n),this.edges[n.properties.id]=n.properties.neighbors.map(({id:a,weight:l})=>{let c=this.nodesById[a];return new Hi({origin:n,destination:c,distance:Xi(n.geometry.coordinates,c.geometry.coordinates),angle:zn(n.geometry.coordinates,c.geometry.coordinates),pathWeight:l})})})}aStar({originIds:t,destinationNodeIds:r,excludedNodeIds:i}){let n=t.map(h=>this.nodesById[h]).filter(h=>h),o=r.map(h=>this.nodesById[h]).filter(h=>h);if(n.length===0||o.length===0)return[];let a=[],l={},c={};for(n.forEach(h=>{let d=this.getShortestEuclideanDistance(h,o);a.push({origin:h,priority:d}),l[h.properties.id]=null,c[h.properties.id]=0}),a.sort((h,d)=>h.priority-d.priority);a.length>0;){let h=a[0];if(o.includes(h.origin)){let d=[],y=l[h.origin.properties.id];for(;y!=null;){d.push(y);let m=l[y.origin.properties.id];m!=null?y=m:y=null}return d.reverse()}for(let d of this.edges[h.origin.properties.id]){if(i&&i.has(d.destination.properties.id))continue;let y=c[h.origin.properties.id]+d.weight;if(c[d.destination.properties.id]==null||y<c[d.destination.properties.id]){c[d.destination.properties.id]=y;let m=y+this.getShortestEuclideanDistance(d.destination,o);a.push({origin:d.destination,priority:m}),l[d.destination.properties.id]=d}}a.splice(0,1),a.sort((d,y)=>d.priority-y.priority)}return[]}getShortestEuclideanDistance(t,r){return r.reduce((i,n)=>{let o=Xi(t.geometry.coordinates,n.geometry.coordinates);return Math.min(i,o)},Number.MAX_VALUE)}};s(xd,"NavigationGraph");var Lc=xd;var XP=.75,Sd=class Sd{groupBy;graph;geometryEdgesByMapId=new Map;cache={nodeTreesByGroup:new Map};constructor({nodes:t,obstructions:r,groupBy:i="default"}){this.groupBy=i,this.graph=new Lc({nodes:t,groupBy:this.groupBy}),r&&r.features.forEach(n=>{let o=n.geometry.coordinates.length===1?n.geometry.coordinates[0]:n.geometry.coordinates,a=this.groupBy==="default"?this.groupBy:n.properties[this.groupBy];this.geometryEdgesByMapId.has(a)||this.geometryEdgesByMapId.set(a,[]),o.forEach((l,c)=>{this.geometryEdgesByMapId.get(a).push([l,o[c+1]||o[0]])})})}findNearestNode=t=>{var n;let r=this.groupBy==="default"?this.groupBy:t.properties[this.groupBy];if(!this.cache.nodeTreesByGroup.has(r)){let o=(n=this.graph.nodesByGroup.get(r))!=null?n:[],a=Xa();a.x(l=>l.geometry.coordinates[1]),a.y(l=>l.geometry.coordinates[0]),a.addAll(o),this.cache.nodeTreesByGroup.set(r,a)}return this.cache.nodeTreesByGroup.get(r).find(t.geometry.coordinates[1],t.geometry.coordinates[0])||null};getDirections({originIds:t,destinationNodeIds:r,excludedNodeIds:i,simplify:n}){var l,c;let o=(l=n==null?void 0:n.enabled)!=null?l:!0,a=this.graph.aStar({originIds:t,destinationNodeIds:r,excludedNodeIds:new Set(i)});if(a.length===0)return{type:"FeatureCollection",features:[]};if(o){let h=Jb((c=n==null?void 0:n.bufferRadius)!=null?c:XP,a[0].origin.geometry.coordinates[1]);a=this.simplifyAllSteps(a,h)}return this.generatePath(a)}generatePath=t=>{let{destination:r}=t[t.length-1],i={type:"FeatureCollection",features:[]};for(let o=0;o<t.length;o++){let{origin:a}=t[o],l={id:a.properties.id,angle:t[o].angle,distance:t[o].distance};this.groupBy!=="default"&&(l.groupBy=a.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[a.geometry.coordinates[0],a.geometry.coordinates[1]]},properties:l})}let n={id:r.properties.id};return this.groupBy!=="default"&&(n.groupBy=r.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[r.geometry.coordinates[0],r.geometry.coordinates[1]]},properties:n}),i};simplifyAllSteps(t,r){var c,h;let i=[],n=[t[0]];for(let d=1;d<t.length;d++){if(this.groupBy!=="default"&&t[d].origin.properties[this.groupBy]!==t[d-1].origin.properties[this.groupBy]){let y=t[d-1].origin.properties[this.groupBy],m=(c=this.geometryEdgesByMapId.get(y))!=null?c:[];i.push(...this.simplifySteps(n,m,r)),n=[t[d]]}n.push(t[d])}let o=t[t.length-1],a=this.groupBy==="default"?this.groupBy:o.origin.properties[this.groupBy],l=(h=this.geometryEdgesByMapId.get(a))!=null?h:[];return i.push(...this.simplifySteps(n,l,r)),i}simplifySteps(t,r,i){if(t.length<3)return t;let n=[t[0]],o=1;for(let a=o+2;a<t.length;a++)if(!$b(t[o].origin,t[a].origin,r,i)){let l=a-1;n.push(new Hi({...t[o],destination:t[l].origin,distance:Xi(t[o].origin.geometry.coordinates,t[l].origin.geometry.coordinates),angle:zn(t[o].origin.geometry.coordinates,t[l].origin.geometry.coordinates)})),o=l}return n.push(new Hi({...t[o],destination:t[t.length-1].origin,distance:Xi(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates),angle:zn(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates)}),t[t.length-1]),n}getDistance=(t,r)=>Xi(t,r);getAngle=(t,r)=>zn(t,r)};s(Sd,"Navigator");var Ya=Sd;f();function Un(e){return[e.longitude,e.latitude]}s(Un,"convertCoordinateToPosition");function YP(e){return new Map(e.map(t=>{let{properties:r}=t,{id:i}=r;return[i,t]}))}s(YP,"getEntranceMap");var Pd=s((e,t)=>{let r=YP(t),i={type:"Feature",properties:{},geometry:{type:"MultiLineString",coordinates:[]}};for(let n of e){let o=[n.geometry.coordinates],a=(n.properties.entrances||[]).reduce((l,c)=>(r.has(c)&&l.push(r.get(c)),l),[]);a.length&&(o=jp(n,a).map(l=>l.geometry.coordinates)),i.geometry.coordinates.push(...o)}return i},"cutEntracesFromLineStrings");function Kb(e,t){let r={options:{}};if(!r.options)throw new Error("options should exist");return e.appearance&&(r.options.appearance=e.appearance),e.rank!=null&&(e.rank==="initial"?r.options.rank=t.initialRank||2:r.options.rank=e.rank),e.enabled!==void 0&&(r.enabled=e.enabled),e.interactive!==null&&(r.options.interactive=e.interactive),r}s(Kb,"translateLabelStateToGeojsonCore");function Qb(e,t){let r={options:{}};if(!r.options)throw new Error("options should exist");return e.rank!=null&&(e.rank==="initial"?r.options.rank=t.initialRank||2:r.options.rank=e.rank),e.enabled!==void 0&&(r.enabled=e.enabled),e.interactive!==null&&(r.options.interactive=e.interactive),r}s(Qb,"translateMarkerStateToGeojsonCore");function t3(e,t){let r={};return t==null||(e.color&&(e.color==="initial"?r.color=t.initialColor:r.color=e.color),e.hoverColor&&(r.hoverColor=e.hoverColor),e.interactive!==void 0&&(r.interactive=e.interactive)),r}s(t3,"translateSpaceStateToGeojsonCore");function e3(e,t){return((t-e+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}s(e3,"differenceBetweenAngles");function r3(e,t){let r="Left";return e<=-Math.PI/4?r="Right":e<=-t?r="SlightRight":e<=t?r="Straight":e<=Math.PI/4?r="SlightLeft":r="Left",r}s(r3,"getRelativeBearing");function i3(e){let t={};for(let r in e){let i=e[r];if(i!=null){if("polygons"in i)for(let n of i.polygons)t[n]=i;else if("lineStrings"in i)for(let n of i.lineStrings)t[n]=i;else if("points"in i)for(let n of i.points)t[n]=i}}return t}s(i3,"extractStyleMap");function Md(e,t){return e.reduce((r,i)=>{let n=t[i.properties.id];return n==null||(r.has(n)||r.set(n,[]),r.get(n).push(i)),r},new Map)}s(Md,"groupGeometryByStyle");var n3=Math.PI*.1,Qt,qe,ge,Ac,o3,ja,wd,Nc,a3,Td=class Td{constructor(t,r){I(this,Ac);I(this,ja);I(this,Nc);I(this,Qt,{});I(this,qe,void 0);I(this,ge,void 0);_(this,qe,r),_(this,ge,t.features),_(this,qe,r),_(this,ge,t.features)}get coordinates(){return u(this,Qt).coordinates?u(this,Qt).coordinates:(u(this,Qt).coordinates=u(this,ge).map(t=>new $(t.geometry.coordinates[1],t.geometry.coordinates[0],t.properties.groupBy)),u(this,Qt).coordinates)}get distance(){return u(this,Qt).distance?u(this,Qt).distance:(u(this,Qt).distance=u(this,ge).reduce((t,r)=>t+(r.properties.distance||0),0),u(this,Qt).distance)}get instructions(){if(u(this,ge).length<2)return[];if(u(this,Qt).instructions)return u(this,Qt).instructions;let t=[],r=0;for(let i=0;i<u(this,ge).length;i++){let n=u(this,ge)[i],o=u(this,ge)[i-1],a=u(this,ge)[i+1],l=new $(n.geometry.coordinates[1],n.geometry.coordinates[0],n.properties.groupBy),c=j(this,Ac,o3).call(this,{prevDirection:o,direction:n,nextDirection:a});r+=(o==null?void 0:o.properties.distance)||0;for(let h of c)h&&(t.push({action:h,distance:r,coordinate:l}),r=0)}return u(this,Qt).instructions=t,u(this,Qt).instructions}};Qt=new WeakMap,qe=new WeakMap,ge=new WeakMap,Ac=new WeakSet,o3=s(function(t){let{prevDirection:r,direction:i,nextDirection:n}=t,o=r&&u(this,qe).getById("floor",r.properties.groupBy),a=u(this,qe).getById("floor",i.properties.groupBy),l=n&&u(this,qe).getById("floor",n.properties.groupBy),c=[];if(r||c.push({type:"Departure"}),l&&a.id!==l.id){let h=u(this,qe).getMVFFeatureByNodeId("connection",i.properties.id);c.push(j(this,ja,wd).call(this,"TakeConnection",a,l,h==null?void 0:h.type))}else if(o&&o.id!==a.id){let h=u(this,qe).getMVFFeatureByNodeId("connection",i.properties.id);c.push(j(this,ja,wd).call(this,"ExitConnection",a,o,h==null?void 0:h.type))}else c.push(j(this,Nc,a3).call(this,r,i));return n||c.push({type:"Arrival"}),c},"#getActions"),ja=new WeakSet,wd=s(function(t,r,i,n){let o=r.elevation-i.elevation,a="none";return o>0?a="down":o<0&&(a="up"),{type:t,fromFloor:r,toFloor:i,direction:a,connectionType:n!=null?n:"stairs"}},"#createConnectionAction"),Nc=new WeakSet,a3=s(function(t,r){let i=t?-e3(t.properties.angle,r.properties.angle):0;return Math.abs(i)>=n3?{type:"Turn",bearing:r3(i,n3),referencePosition:"At"}:null},"#createTurnAction"),s(Td,"Directions");var Oc=Td,Id=class Id{navigator;connections;constructor({nodes:t,obstructions:r,connections:i,groupBy:n}){this.navigator=new Ya({nodes:t,obstructions:this.createObstructionCollection(r),groupBy:n}),this.connections=i}getDirections=(t,r,i,n)=>{let{accessible:o,smoothing:{enabled:a,radius:l}}=i,c=t.flatMap(x=>this.getNodesFromTarget(x,n)),h=r.flatMap(x=>this.getNodesFromTarget(x,n)),d=this.getExcludedNodeIds(o).filter(x=>!c.includes(x)&&!h.includes(x)),y=this.navigator.getDirections({originIds:c,destinationNodeIds:h,excludedNodeIds:d,simplify:{enabled:a,bufferRadius:l}});this.addCoordinateDirections(y,t,r);let m=new Oc(y,n);if(!(m.distance===0&&new Set([...c,...h]).size===c.length+h.length))return m};getExcludedNodeIds=t=>t?this.connections.reduce((r,i)=>i.accessible?r:r.concat(i.nodes),[]):[];addCoordinateDirections=(t,[r],[i])=>{if(t.features.length){if($.is(r)){let n=this.createDirectionFeature(r,this.navigator.getAngle([r.longitude,r.latitude],t.features[0].geometry.coordinates),this.navigator.getDistance([r.longitude,r.latitude],t.features[0].geometry.coordinates));t.features.splice(0,0,n)}if($.is(i)){let n=this.createDirectionFeature(i,0,0),o=t.features[t.features.length-1];o.properties.distance=this.navigator.getDistance(o.geometry.coordinates,[i.longitude,i.latitude]),o.properties.angle=this.navigator.getAngle(o.geometry.coordinates,[i.longitude,i.latitude]),t.features.push(n)}}};getNodesFromTarget=(t,r)=>{if($.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t));return i?[i.properties.id]:[]}else if(Fr.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.coordinate));return i?[i.properties.id]:[]}else if(Nr.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.center));return i?[i.properties.id]:[]}else if(Me.is(t)){let i=r==null?void 0:r.getMVFFeatureById("space",t.id);return i==null?[]:i.properties.destinationNodes}else{if(Br.is(t))return t.coordinates.reduce((i,n)=>{let o=this.navigator.findNearestNode(this.createCoordinateFeature(n));return o&&i.push(o.properties.id),i},[]);if(we.is(t)){let i=r==null?void 0:r.objectEntranceNodeIdsByObstructionId[t.id];return i!=null?i:[]}else return[]}};createObstructionCollection(t){return{type:"FeatureCollection",features:Object.entries(t).reduce((r,[i,n])=>r.concat(n.features.map(o=>(o.properties.map=i,o))),[])}}createCoordinateFeature=t=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{map:t.floorId}});createDirectionFeature=(t,r,i)=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{groupBy:t.floorId,id:t.id,angle:r,distance:i}})};s(Id,"DirectionsInternal");var Dc=Id;f();var Wn,Ed=class Ed{constructor({currentMapGetter:t}){I(this,Wn,void 0);_(this,Wn,t)}get currentMap(){return u(this,Wn).call(this)}async getCurrentSceneGLTF(t){let r=u(this,Wn).call(this);return r?r==null?void 0:r.Exporter.getCurrentSceneGLTF(t):(X.error("There is no map to export. Please load a map first."),new Blob)}};Wn=new WeakMap,s(Ed,"Exporter");var za=Ed;f();var $e,Wa,_d=class _d{constructor({currentMapGetter:t}){I(this,$e,new Map);I(this,Wa,void 0);_(this,Wa,t)}get currentMap(){return u(this,Wa).call(this)}getById(t){return u(this,$e).get(t)}add(t,r,i){let n=Rr(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let a=o.Labels.add(Un(n),r,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium"}),l=new qr(a.id.toString(),r);return u(this,$e).set(l.id,{label:l,entityId:l.id}),l}all(){var r;let t=[];return(r=this.currentMap)==null||r.Labels.all({onCreate:(i,n)=>{let o=new qr(i.toString(),n);u(this,$e).set(o.id,{label:o,entityId:o.id}),t.push(o)}}),t}remove(t){var i;let r=u(this,$e).get(t.id);r&&((i=this.currentMap)==null||i.Labels.remove(r.entityId),u(this,$e).delete(t.id.toString()))}removeAll(){let t=[];return u(this,$e).forEach(({label:r})=>{this.remove(r),t.push(r),u(this,$e).delete(r.id.toString())}),t}};$e=new WeakMap,Wa=new WeakMap,s(_d,"Labels");var Ua=_d;f();f();var Ld=class Ld{id;name;elevation;containerId;loaded=!1;styleMap={};obstructions;entrances;spaces;renderer;options;layers=new Map;constructor(t,r,i,n,o,a){this.id=r.id,this.options=n;let l=i.addGroupContainer(this.id,{visible:!1},t);this.containerId=l.id.toString(),this.name=r.externalId,this.elevation=r.elevation,o!=null&&a!=null&&(this.styleMap=a,this.spaces=o.space[this.id],this.entrances=o.entrance[this.id],this.obstructions=o.obstruction[this.id]),this.renderer=i}load=()=>{if(this.loaded||this.obstructions==null&&this.spaces==null)return this;if(this.loaded=!0,this.spaces!=null&&this.spaces.features.length>0){let t=this.spaces.features.filter(o=>{var a;return o.geometry.type==="Polygon"&&((a=o.properties.kind)==null?void 0:a.toLowerCase())!=="void"}),r=Md(t,this.styleMap),i=this.renderer.addGroupContainer(`spaces-${this.id}`,{},this.id),n=0;for(let[o,a]of r)this.renderer.addGeometryGroup(`Spaces-${this.id}-${n}`,{features:a},o,i),n++;this.layers.set("Spaces",i.id.toString())}if(this.obstructions!=null&&this.obstructions.features.length>0){let t=this.obstructions.features.filter(m=>m.geometry.type==="Polygon"&&m.properties.kind==="object"),r=Md(t,this.styleMap),i=this.renderer.addGroupContainer(`objects-${this.id}`,{},this.id),n=0;for(let[m,x]of r)this.renderer.addGeometryGroup(`Objects-${this.id}-${n}`,{features:x},m,i),n++;this.layers.set("Objects",i.id.toString());let o=this.obstructions.features.filter(m=>m.geometry.type==="LineString"&&m.properties.kind==="Wall"&&m.properties.footprintComponent===!1),a=this.obstructions.features.filter(m=>m.geometry.type==="LineString"&&m.properties.kind==="Wall"&&m.properties.footprintComponent===!0),l={...this.styleMap[o[0].properties.id]},c=l;if(a.length>0){let m=this.styleMap[a[0].properties.id];m!=null&&(c={...m})}this.options.wallTopColor!=null&&(l.topColor=this.options.wallTopColor,c.topColor=this.options.wallTopColor);let h=this.entrances,d=this.renderer.addGeometryGroup(`Walls-${this.id}`,{features:[Pd(o,(h==null?void 0:h.features)||[])]},l,this.id),y=this.renderer.addGeometryGroup(`ExteriorWalls-${this.id}`,{features:[Pd(a,(h==null?void 0:h.features)||[])]},c,this.id);this.layers.set("Walls",d.id.toString()),this.layers.set("ExteriorWalls",y.id.toString())}return this.renderer.render(),this}};s(Ld,"FloorObject");var kc=Ld;var Yi=Cr(Fn());f();var Za=Cr(Fn());var Rc=30,jP=1e3,Zn,qa,Od=class Od extends st{constructor(r,i){super();this.api=r;this.core=i;I(this,Zn,void 0);I(this,qa,0);v(this,"includedFloors",[]);v(this,"expanded",!1);i.on("camera-change",n=>{var l;let o=Math.floor(n.elevation/Rc),a=(l=this.includedFloors[o])==null?void 0:l.id;this.expanded&&a&&a!==this.api.currentFloorId&&(this.api.currentFloorId=this.includedFloors[o].id,this.api.publish("floor-change",{reason:"elevation-change",floorId:this.api.currentFloorId}))})}get percentExpanded(){return u(this,qa)}set percentExpanded(r){let i=Ut(r,0,1,0,Rc);this.includedFloors.forEach((n,o)=>{this.core.setState(n.containerId,{visible:!0,altitude:i*o})}),_(this,qa,r)}animateToCurrentFloor(){let r=this.includedFloors.indexOf(this.api.currentFloor)*Rc;new Za.default.Tween({elevation:this.core.camera.elevation}).to({elevation:r},1e3).easing(Za.default.Easing.Quadratic.Out).onUpdate(({elevation:i})=>{this.core.camera.setElevation(i),this.core.render()}).onComplete(()=>{this.api.publish("floor-change",{reason:"",floorId:this.api.currentFloorId})}).start(),this.core.render()}expand(r){return this.includedFloors=this.api.floors.filter(i=>!(r!=null&&r.excludeFloorIds.includes(i.id))),this.includedFloors.length<=1?Promise.resolve():this.animate("expand")}collapse(){return this.expanded===!0?this.animate("collapse"):Promise.resolve()}animate(r){u(this,Zn)&&u(this,Zn).stop();let i=this.includedFloors.indexOf(this.api.currentFloor)*Rc;return new Promise(n=>{_(this,Zn,new Za.default.Tween({percentExpanded:this.percentExpanded}).to({percentExpanded:r==="expand"?1:"0"},jP).easing(Za.default.Easing.Quadratic.Out).onUpdate(({percentExpanded:o})=>{this.core.camera.setElevation(i*o),this.percentExpanded=o,this.core.render()}).onComplete(()=>{this.expanded=r==="expand",this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:r==="collapse"?o.id===this.api.currentFloorId:!0})}),this.core.getSystems().cameraSystem.enablePedestal=r==="expand",this.core.getSystems().cameraSystem.enablePan=r==="collapse",n(),this.publish(r==="expand"?"expanded":"collapsed")}).onStart(()=>{this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:!0})})}).start()),this.core.render()})}};Zn=new WeakMap,qa=new WeakMap,s(Od,"StackedMaps");var Fc=Od;var zP={linear:Yi.default.Easing.Linear.None,"ease-in":Yi.default.Easing.Quadratic.In,"ease-out":Yi.default.Easing.Quadratic.Out,"ease-in-out":Yi.default.Easing.Quadratic.InOut},Dd=class Dd extends st{floors;currentFloorId="";id;renderer;mvf;styleMap;StackedMaps;animations=new Map;get currentFloor(){return this.floors.find(t=>t.id===this.currentFloorId)}setFloor(t,r){if(this.currentFloorId!==t){if(this.publish("floor-change-start",{floorId:t}),this.currentFloorId=t,this.StackedMaps.expanded)return this.StackedMaps.animateToCurrentFloor();this.floors.forEach(i=>{i.id===t?this.renderer.setState(i.containerId,{visible:!0}):this.renderer.setState(i.containerId,{visible:!1})}),this.publish("floor-change",{reason:r,floorId:this.currentFloor.id})}}cancelAnimation(t){let r=this.animations.get(t);r&&(r.tween.stop(),r.resolver(),this.animations.delete(t))}Markers={add:(t,r,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(l=>l.id===i.floorId):this.floors[0];return this.renderer.addMarker2D(t,r,o,a.id)},remove:t=>{this.renderer.remove(t)},getContentEl:t=>{let r=this.renderer.getState(t);if((r==null?void 0:r.type)==="marker")return r.element},removeAll:()=>{},setPosition:(t,r,i)=>{let n=this.renderer.getState(t);if(!n){X.error(`Failed to retrieve state for Marker with id "${t}".`);return}if(n.type!=="marker"){X.error(`Geometry with id "${t}" is not of type "marker".`);return}this.renderer.setState(n,{position:r,parent:i!=null?i:this.currentFloorId})},animateTo:(t,r,i,n)=>{let o=this.renderer.getState(t);if(!o)return X.error(`Failed to retrieve state for Marker with id "${t}".`),Promise.resolve();if(o.type!=="marker")return X.error(`Geometry with id "${t}" is not of type "marker".`),Promise.resolve();let a={duration:1e3,easing:"ease-in-out",...n};this.cancelAnimation(t);let l;new Yi.default.Tween({lon:o.position[0],lat:o.position[1]}).to({lon:r[0],lat:r[1]},a.duration).easing(zP[a.easing]).onUpdate(({lon:h,lat:d})=>{this.Markers.setPosition(t,[h,d],i),this.renderer.render()}).onComplete(()=>{l()}).start();let c=new Promise(h=>{l=h});return this.renderer.render(),c}};Exporter={getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)};Labels={all:({onCreate:t})=>{let r=0;for(let i of Object.entries(this.mvf.space)){let[n,o]=i;o&&(o.features.forEach(a=>{var d,y;let l=(d=this.styleMap[a.properties.id])==null?void 0:d.showImage,c=(y=a.properties.details)==null?void 0:y.images,h;if(l&&c&&c.length>0&&(h={marker:{icon:c[0].url}}),a.properties.center&&a.properties.externalId!==""){let m=this.renderer.addLabel2D(a.properties.center,a.properties.externalId,{id:a.properties.id,appearance:h},n);t(m.id,a.properties.externalId)}}),r++)}},add:(t,r,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(c=>c.id===(i==null?void 0:i.floorId)):this.floors[0],l=this.renderer.addLabel2D(t,r,o,a.containerId);if(!l)throw new Error("label creating failed");return l},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}};Paths={add:(t,r)=>{let i=t.reduce((o,{floorId:a,longitude:l,latitude:c})=>(a&&!o[a]&&(o[a]=[]),a?o[a].push([l,c]):(o.root===void 0&&(o.root=[]),o.root.push([l,c])),o),{}),n=Object.entries(i).map(([o,a])=>this.renderer.addPath({type:"FeatureCollection",features:a.map(l=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}))},r,o));return new Yi.default.Tween({fraction:0}).to({fraction:1},1e3).onUpdate(({fraction:o})=>{n.forEach(a=>{this.renderer.setState(a.id,{completeFraction:o})})}).start(),n},remove:t=>{t.forEach(r=>{this.renderer.remove(r)})}};constructor(t,r,i,n={},o){super(),this.renderer=o,this.id=t,this.renderer.addGroupContainer(t,{},"root"),this.StackedMaps=new Fc(this,this.renderer),this.mvf=r,this.styleMap=i,this.floors=this.mvf["map.geojson"].sort((a,l)=>a.elevation-l.elevation).map(a=>{var c,h;if(t!=="outdoors-container"&&((c=r.space[a.id])==null?void 0:c.features.length)===0&&((h=r.obstruction[a.id])==null?void 0:h.features.length)===0)return;let l=new kc(t,a,this.renderer,n,r,i);return l.load(),l}).filter(Boolean),this.setFloor(this.floors[0].id)}};s(Dd,"GeojsonApiMapObject");var $a=Dd;f();var Ae,Ka,Ad=class Ad{constructor({currentMapGetter:t}){I(this,Ae,new Map);I(this,Ka,void 0);_(this,Ka,t)}get currentMap(){return u(this,Ka).call(this)}getById(t){return u(this,Ae).get(t)}add(t,r,i){let n=Rr(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let{id:a}=o.Markers.add(Un(n),r,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium",dynamicResize:(i==null?void 0:i.dynamicResize)||!1}),l=o.Markers.getContentEl(a.toString());if(!l)throw new Error("marker compoent should exist");let c=new Bi(a.toString(),l,()=>{});return u(this,Ae).set(c.id,{marker:c,entityId:a.toString()}),c}remove(t){var i;let r=u(this,Ae).get(t.id);r&&((i=this.currentMap)==null||i.Markers.remove(r.entityId),u(this,Ae).delete(t.id.toString()))}removeAll(){let t=[];return u(this,Ae).forEach(({marker:r})=>{this.remove(r),t.push(r),u(this,Ae).delete(r.id.toString())}),t}setPosition(t,r){var a;let i=Rr(r);if(!i){X.error("Cannot determine coordinate from target.");return}let n=this.currentMap;if(!n){X.error("Cannot determine the current map.");return}let o=u(this,Ae).get(t.id);if(!o){X.error(`Cannot find the Marker with id "${t.id}".`);return}n.Markers.setPosition(o.entityId,Un(i),(a=i.floorId)!=null?a:n.currentFloorId)}animateTo(t,r,i){var l;let n=Rr(r);if(!n)return X.error("Cannot determine coordinate from target."),Promise.resolve();let o=this.currentMap;if(!o)return X.error("Cannot determine the current map."),Promise.resolve();let a=u(this,Ae).get(t.id);return a?o.Markers.animateTo(a.entityId,Un(n),(l=n.floorId)!=null?l:o.currentFloorId,i):(X.error(`Cannot find the Marker with id "${t.id}".`),Promise.resolve())}};Ae=new WeakMap,Ka=new WeakMap,s(Ad,"Markers");var Ja=Ad;f();var br,ts,Nd=class Nd{constructor({currentMapGetter:t}){I(this,br,new Map);I(this,ts,void 0);_(this,ts,t)}get currentMap(){return u(this,ts).call(this)}getById(t){return u(this,br).get(t)}add(t,r){let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let n=i.Paths.add(t,r),o=new Ra(vt());return u(this,br).set(o.id,{path:o,entityIds:n.map(a=>a.id.toString())}),o}remove(t){var i;let r=u(this,br).get(t.id);r&&((i=this.currentMap)==null||i.Paths.remove(r.entityIds),u(this,br).delete(t.id.toString()))}removeAll(){let t=[];return u(this,br).forEach(({path:r})=>{this.remove(r),t.push(r),u(this,br).delete(r.id.toString())}),t}};br=new WeakMap,ts=new WeakMap,s(Nd,"Paths");var Qa=Nd;f();var Bc=Cr(Fn());f();var s3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAkklEQVRoge3awQ3AIAxD0VAMYf+F0yUixbL8JshXuLSwIqJCwDc9QBeZEOy9p2doAQDTM7TQ2cg5Z3qGFjpHS2YjDiGDe+/0DC0cwkYpJKdnaIFMkY1kymzEIVQcwsYhbPDem56hhc5GHELGIWwcwsYhbJS+2R1CxSFsdH5iO4SMr97Y6FxPqxytVVV+HcTEIWx+9mcIqHSOm9QAAAAASUVORK5CYII=";f();var l3=s((e,t,r=0)=>{if(Math.abs(e)>=Math.PI)throw new Error("Sector angle too wide!");let i=r/Math.tan(e/2),n=r/Math.sin(e/2),o=n+t,a=10,l=new ke;l.moveTo(n*Math.cos(e/2)-i,n*Math.sin(e/2));for(let c=0;c<a;c++)l.lineTo(o*Math.cos(e/2-e/a*c)-i,o*Math.sin(e/2-e/a*c));for(let c=0;c<a;c++)l.lineTo(r*Math.cos(Math.PI/-2+Math.PI/a*c),r*Math.sin(Math.PI/-2+Math.PI/a*c));return new Re(l,{depth:.1,bevelEnabled:!1,UVGenerator:WP(t)})},"createSectorGeometry"),kd=s((e,t,r)=>{let n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/r;return n>1?n=1:n<0&&(n=0),new z(0,n)},"generateRadialUV"),WP=s(e=>({generateTopUV:(t,r,i,n,o)=>{let a=r[i*3],l=r[i*3+1],c=r[n*3],h=r[n*3+1],d=r[o*3],y=r[o*3+1];return[kd(a,l,e),kd(c,h,e),kd(d,y,e)]},generateSideWallUV:()=>[new z(0,1),new z(0,1),new z(0,1),new z(0,1)]}),"radialUVGenerator");var Rd="#2266ff",ZP=.7,qP=.3;function c3(){let e=new Ji({color:Rd,opacity:ZP,transparent:!0,depthTest:!1,depthWrite:!1}),t=l3(Math.PI/6,h3,p3);new Ki().load(s3,i=>{e.alphaMap=i,e.needsUpdate=!0});let r=new Ft(t,e);return r.position.z=-.05,r.renderOrder=3,r}s(c3,"createBearingCone");var u3=s(()=>{let e=new Xc(.5,.5,.05,32),t=new Ji({transparent:!0,color:Rd,opacity:qP,depthTest:!1,depthWrite:!1}),r=new Ft(e,t);r.scale.set(0,0,.05),r.renderOrder=2;let i=new Xc(Fd,Fd,.05,32),n=new Ji({transparent:!0,color:Rd,depthTest:!1,depthWrite:!1}),o=new Ft(i,n);return o.renderOrder=3,r.rotation.x=Math.PI/2,o.rotation.x=Math.PI/2,{baseMesh:r,middleMesh:o}},"createBlueDot");var $P={enableHighAccuracy:!0},JP=500,KP=150,QP=150,tM=0,eM=5,rM=5,iM=30,p3=.4,h3=1.25,Fd=.35,Bd=class Bd extends st{constructor(r,i){super();this.core=r;this.geoJSONApi=i}watcherId=null;geometry;currentGeolocation;positionAnimation;scaleAnimation;rotationAnimation;enable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry=this.core.addCustomGeometry("blue-dot",{type:"Feature",properties:{},geometry:{type:"Point",coordinates:[-79.3935,43.6532]}},{setup:r=>{let{baseMesh:i,middleMesh:n}=u3(),o=c3();r.add(i),r.add(n),r.add(o)},update:this.updateGeometryPerFrame},{visible:!1},"outdoors-container"),this.watcherId=navigator.geolocation.watchPosition(this.onPositionUpdate,this.onPositionError,$P)}updateGeometryPerFrame=r=>{var c;let[i,n,o]=r.children,{accuracy:a,heading:l}=((c=this.currentGeolocation)==null?void 0:c.coords)||{};a!=null&&(this.scaleAnimation&&this.scaleAnimation.stop(),this.scaleAnimation=new Bc.default.Tween({scale:i.scale.x}).to({scale:Ut(a,rM,iM,tM,eM)},KP).onUpdate(({scale:h})=>{i.scale.set(h,1,h)}).start()),l!=null?(o.visible=!0,this.rotationAnimation&&this.rotationAnimation.stop(),this.rotationAnimation=new Bc.default.Tween({rotation:i.scale.x}).to({rotation:at.degToRad(l)},QP).onUpdate(({rotation:h})=>{o.rotation.z=h}).start()):o.visible=!1};onPositionUpdate=r=>{var i;if(this.currentGeolocation=r,this.geometry){let n=this.core.getState(this.geometry);n.visible===!1&&this.core.setState(this.geometry,{position:[r.coords.longitude,r.coords.latitude],visible:!0}),this.positionAnimation&&this.positionAnimation.stop(),n=this.core.getState(this.geometry);let o;if(r.coords.floorLevel!==void 0){let a=(i=this.geoJSONApi.currentMap)==null?void 0:i.floors[r.coords.floorLevel];o=a==null?void 0:a.id}this.positionAnimation=new Bc.default.Tween(n.position).to([r.coords.longitude,r.coords.latitude],JP).onUpdate(a=>{if(this.geometry){let l={position:a};o==null&&n.parent!=="outdoors-container"?l.parent="outdoors-container":n.parent!==o&&(l.parent=o,this.publish("floor-change",{reason:"blue-dot-floor-change",floorId:o})),this.core.setState(this.geometry,l)}}).start(),this.core.render()}};onPositionError=r=>{switch(r.code){case r.PERMISSION_DENIED:X.error("Geolocation permission denied by the user.",r);break;case r.POSITION_UNAVAILABLE:X.error("Geolocation position unavailable.",r);break;case r.TIMEOUT:X.error("Geolocation request timed out.",r);break;default:X.error("An unknown geolocation error occurred.",r);break}this.disable()};disable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry&&(this.core.remove(this.geometry.id),this.geometry=void 0),this.currentGeolocation=void 0}};s(Bd,"BlueDot");var Gc=Bd;var Gd=class Gd{core;outdoors;mapObjects=[];id;mapDataExternal={};mapsByFloorId={};mapData;currentMap;directions;mapView;Camera;Labels;Markers;Paths;Exporter;Navigation;BlueDot;constructor(t,r){var l;this.core=t,this.mapView=r,this.Camera=new Ha(this.core),this.id=this.core.addGroupContainer("root").id.toString(),this.outdoors=new $a("outdoors-container",{"map.geojson":[{id:"outdoors",externalId:"outdoors",elevation:0}],"styles.json":{},space:{},entrance:{},obstruction:{}},{},{},this.core),this.mapObjects.push(this.outdoors);let i=new Fa(this.Camera);this.core.on("camera-change",()=>{this.mapView.publish("camera-change",i)});let n=s(c=>h=>{var P,g;let d=[],y=[];h.labels.forEach(C=>{let M=this.Labels.getById(C.toString());M&&d.push(M.label)}),h.markers.forEach(C=>{let M=this.Markers.getById(C.toString());M&&y.push(M.marker)});let m=h.geometry[0],x;m&&(x=(P=this.getMapData())==null?void 0:P.getById("space",m)),x||(x=(g=this.getMapData())==null?void 0:g.getById("object",m));let S={coordinate:new $(h.coordinate[1],h.coordinate[0]),spaces:x&&Me.is(x)?[x]:[],objects:x&&we.is(x)?[x]:[],markers:y,labels:d,floors:[]};"pointerEvent"in h&&(S.pointerEvent=h.pointerEvent),this.mapView.publish(c,S)},"createHandler");this.core.on("hover",n("hover")),this.core.on("click",n("click")),(l=this.core.options.outdoorView)!=null&&l.enabled&&this.core.on("outdoor-view-loaded",()=>{this.mapView.publish("outdoor-view-loaded")}),this.core.on("user-interaction-start",()=>{this.mapView.publish("user-interaction-start")}),this.core.on("user-interaction-end",()=>{this.mapView.publish("user-interaction-end")});let o=s(()=>this.currentMap,"currentMapGetter");this.Markers=new Ja({currentMapGetter:o}),this.Labels=new Ua({currentMapGetter:o}),this.Exporter=new za({currentMapGetter:o}),this.Paths=new Qa({currentMapGetter:o}),this.Navigation=new Sc(r),this.BlueDot=new Gc(this.core,this),this.BlueDot.on("floor-change",c=>{this.setFloor(c.floorId,"blue-dot-floor-change")});let a=new Ec(r,this.mapDataExternal);this.auto=a.auto}updateState(t,r){var n;if(t==="walls"){(n=this.currentMap)==null||n.floors.forEach(o=>{var c,h;let a=o.layers.get("Walls"),l=o.layers.get("ExteriorWalls");a&&((c=this.core.getState(a))==null||c.children.forEach(d=>{this.core.setState(d.id,r)})),l&&((h=this.core.getState(l))==null||h.children.forEach(d=>{this.core.setState(d.id,r)}))});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(qr.is(i))return this.core.setState(i.id,Kb({...r,type:"label"},this.core.getState(i.id)));if(Bi.is(i))return this.core.setState(i.id,Qb({...r,type:"marker"},this.core.getState(i.id)));(Me.is(i)||we.is(i))&&this.core.setState(i.id,t3({...r,type:"geometry"},this.core.getState(i.id)))}}getMapDataObject(t){var r;return(r=this.getMapData())==null?void 0:r.getMapDataById(t)}update=()=>{this.core.render()};getMapData(){return this.mapData}expand(t){var r;return(r=this.currentMap)==null?void 0:r.StackedMaps.expand({excludeFloorIds:(t==null?void 0:t.excludeFloors.map(i=>i.id))||[]})}collapse(){var t;return(t=this.currentMap)==null?void 0:t.StackedMaps.collapse()}addMap(t,r){return new Promise(async i=>{let n=jc.get(t);if(!n){X.error("error exists"),i(t);return}this.mapDataExternal[t.mapName]=t;let{mvf:o}=n,a=o["manifest.geojson"].features[0].geometry.coordinates;this.Camera.set({center:new $(a[1],a[0])});let l=i3(o["styles.json"]||{}),c=o["manifest.geojson"].features[0].properties.name,h=new $a(`mapObject-${c}`,o,l,r,this.core);this.mapObjects.push(h),o["map.geojson"].forEach(d=>{this.mapsByFloorId[d.id]=h}),h.StackedMaps.on("expanded",()=>{this.mapView.publish("expanded")}),h.StackedMaps.on("collapsed",()=>{this.mapView.publish("collapsed")}),h.on("floor-change-start",()=>{this.mapView.publish("floor-change-start",{floor:this.currentFloor})}),h.on("floor-change",d=>{this.mapView.publish("floor-change",{reason:d.reason,floor:this.currentFloor})}),this.currentMap=h,this.mapData=n,this.directions=new Dc({nodes:this.currentMap.mvf["node.geojson"],obstructions:this.currentMap.mvf.obstruction,connections:this.currentMap.mvf["connection.json"],groupBy:"map"}),i(t)})}setFloor(t,r){if(!this.currentMap)throw new Error("mappObject should exist atm");this.currentMap.setFloor(typeof t=="string"?t:t.id,r)}get currentFloor(){var i,n;let t=(i=this.currentMap)==null?void 0:i.currentFloor.id;if(!t)throw new Error("Missing currentFloor object from GeoJsonApi");let r=(n=this.mapData)==null?void 0:n.getById("floor",t);if(!r)throw new Error("Missing currentFloor");return r}getState(t){var n;let r=typeof t=="string"?t:t.id,i=this.core.getState(r);if(i){if(i.type==="geometry")return{type:"geometry",interactive:i.interactive,hoverColor:i.hoverColor,color:i.color};if(i.type==="label"&&i.options.appearance&&i.options.rank!==void 0&&i.options.interactive!==void 0)return{type:"label",appearance:i.options.appearance,rank:i.options.rank,enabled:i.enabled,interactive:i.options.interactive};if(i.type==="marker"&&((n=i.options)==null?void 0:n.rank)!==void 0&&i.options.interactive!==void 0){let o=typeof i.parent=="object"?i.parent.id:i.parent;return{type:"marker",rank:i.options.rank,interactive:i.options.interactive,enabled:i.enabled,element:i.element,coordinate:new $(i.position[1],i.position[0],o.toString())}}}}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}getDirections=(t,r,i)=>{if(!this.directions)throw new Error("You have to call .addMap() before you can get directions");let{accessible:n=!1,smoothing:o=!0}=i||{},a=Array.isArray(t)?t:[t],l=Array.isArray(r)?r:[r],c=typeof o=="object"?o.enabled:o,h=typeof o=="object"?o.radius:void 0,d={accessible:n,smoothing:{enabled:c!=null?c:!0,radius:h!=null?h:.75}};return this.directions.getDirections(a,l,d,this.mapData)};createCoordinate(t,r,i){return new $(t,r,(i==null?void 0:i.id)||this.currentFloor.id)}createCoordinateFromScreenCoordinate(t,r,i){let n=this.core.projectScreenXYToCoordinate(t,r);return n?new $(n[1],n[0],(i==null?void 0:i.id)||this.currentFloor.id):void 0}auto(){this.Labels.all()}Outdoor={setStyle:t=>{var r,i;(r=this.core.map)==null||r.setStyle(t),(i=this.core.map)==null||i.moveLayer(Uo)}};get __core(){return this.core}destroy(){this.core.destroy()}};s(Gd,"GeoJsonApi");var es=Gd;var rs,ot,Vd=class Vd extends st{constructor(r){super();I(this,rs,{});I(this,ot,void 0);v(this,"Camera");v(this,"Labels");v(this,"Markers");v(this,"Paths");v(this,"Exporter");v(this,"Navigation");v(this,"BlueDot");v(this,"update",()=>{u(this,ot).core.render()});v(this,"getDirections",(r,i,n)=>u(this,ot).getDirections(r,i,n));v(this,"Outdoor",{setStyle:r=>{u(this,ot).Outdoor.setStyle(r)}});v(this,"on",(r,i)=>{super.on(r,i)});v(this,"off",(r,i)=>{super.off(r,i)});_(this,ot,new es(r,this)),this.Camera=u(this,ot).Camera,_(this,rs,u(this,ot).mapDataExternal),this.Markers=u(this,ot).Markers,this.Labels=u(this,ot).Labels,this.Exporter=u(this,ot).Exporter,this.Paths=u(this,ot).Paths,this.Navigation=u(this,ot).Navigation,this.BlueDot=u(this,ot).BlueDot,this.auto=u(this,ot).auto}updateState(r,i){return u(this,ot).updateState(r,i)}getMapData(){return u(this,rs)}expand(r){return u(this,ot).expand(r)}collapse(){return u(this,ot).collapse()}addMap(r,i){return u(this,ot).addMap(r,i)}setFloor(r){u(this,ot).setFloor(r)}get currentFloor(){return u(this,ot).currentFloor}getState(r){return u(this,ot).getState(r)}setHoverColor(r){u(this,ot).setHoverColor(r)}getHoverColor(){return u(this,ot).getHoverColor()}createCoordinate(r,i,n){return u(this,ot).createCoordinate(r,i,n)}createCoordinateFromScreenCoordinate(r,i,n){return u(this,ot).createCoordinateFromScreenCoordinate(r,i,n)}auto(){this.Labels.all()}get __core(){return u(this,ot).core}destroy(){u(this,ot).destroy()}};rs=new WeakMap,ot=new WeakMap,s(Vd,"MapView");var Vc=Vd;var nM={auto:!0,debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0}},Hc=.05,jz=s(async(e,t)=>{let r;if(t){let{access_token:o}=await ps(t);r=o}let i=new ko(e,r);return new zc(i)},"hydrateMapDataFromMVF"),zz=s(async e=>{let t={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,...e},r=Zc({...t}),{access_token:i}=await ps(e),n=await qc(r,i),o=await Jc(n),a=$c(o);typeof e.onMVFParsed=="function"&&e.onMVFParsed(a);let l=new ko(a,i);return new zc(l)},"getMapData"),oM=s(async(e,t,r)=>{var a,l,c,h,d;let i={...nM,...r!=null?r:{},outdoorView:{token:t.outdoorViewToken,...r==null?void 0:r.outdoorView}},n=await Rb(e,{center:[t.mapCenter.longitude,t.mapCenter.latitude],bearing:i.bearing,pitch:i.pitch,zoomLevel:i.zoomLevel,outdoorView:(a=i.outdoorView)!=null&&a.token?{headers:{"x-mappedin-tiles-key":(l=i.outdoorView)==null?void 0:l.token},style:(c=i.outdoorView)==null?void 0:c.style,enabled:!0,layersHiddenByGeometry:(h=i.outdoorView)==null?void 0:h.layersHiddenByGeometry}:void 0,watermark:i.watermark,attribution:i.attribution,antialias:typeof i.antialiasing=="boolean"?i.antialiasing:!!((d=i.antialiasing)!=null&&d.enabled)}),o=new Vc(n);if(await o.addMap(t,i),!(i!=null&&i.zoomLevel)){let y=n.getBoundingBox(o.currentFloor.id);await n.camera.focusOn(y,{duration:0,padding:{top:Hc*n.canvasHeight,left:Hc*n.canvasWidth,right:Hc*n.canvasWidth,bottom:Hc*n.canvasHeight}})}return o},"show3dMapGeojson"),Uz=oM;export{ml as Annotation,Br as Connection,$ as Coordinate,Nr as Door,fl as Floor,hl as Hyperlink,dl as Image,we as MapObject,Fr as PointOfInterest,Me as Space,k2 as enableTestMode,zz as getMapData,jz as hydrateMapDataFromMVF,$c as parseMVF,Uz as show3dMap,oM as show3dMapGeojson,Jc as unzipMVF};