@mappedin/mappedin-js 5.29.4 → 5.30.1

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/node/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var G,OT=Object.create,Ml=Object.defineProperty,NT=Object.getOwnPropertyDescriptor,TT=Object.getOwnPropertyNames,AT=Object.getPrototypeOf,LT=Object.prototype.hasOwnProperty,RT=(t,e,n)=>e in t?Ml(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a=(t,e)=>Ml(t,"name",{value:e,configurable:!0}),xd=(t,e)=>()=>(t&&(e=t(t=0)),e),Oe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Md=(t,e)=>{for(var n in e)Ml(t,n,{get:e[n],enumerable:!0})},Tx=(t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of TT(e))!LT.call(t,i)&&i!==n&&Ml(t,i,{get:()=>e[i],enumerable:!(r=NT(e,i))||r.enumerable});return t},wr=(t,e,n)=>(n=null!=t?OT(AT(t)):{},Tx(!e&&t&&t.__esModule?n:Ml(n,"default",{value:t,enumerable:!0}),t)),zr=t=>Tx(Ml({},"__esModule",{value:!0}),t),A=(t,e,n)=>(RT(t,"symbol"!=typeof e?e+"":e,n),n),jm=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},B=(t,e,n)=>(jm(t,e,"read from private field"),n?n.call(t):e.get(t)),Ne=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},De=(t,e,n,r)=>(jm(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),zm=(t,e,n,r)=>({set _(r){De(t,e,r,n)},get _(){return B(t,e,r)}}),Hr=(t,e,n)=>(jm(t,e,"access private method"),n),m=xd((()=>{G={env:{NODE_ENV:"production",npm_package_version:"5.29.4"}}})),Ax=Oe(((t,e)=>{m(),function(n){var r="object"==typeof t&&t,i="object"==typeof e&&e&&e.exports==r&&e,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var s=a((function(t){this.message=t}),"InvalidCharacterError");s.prototype=new Error,s.prototype.name="InvalidCharacterError";var u=a((function(t){throw new s(t)}),"error"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,p=a((function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a<e;)r=l.indexOf(t.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),h={encode:a((function(t){t=String(t),/[^\0-\xFF]/.test(t)&&u("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,o=t.length%3,a="",s=-1,c=t.length-o;++s<c;)e=t.charCodeAt(s)<<16,n=t.charCodeAt(++s)<<8,r=t.charCodeAt(++s),a+=l.charAt((i=e+n+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==o?(e=t.charCodeAt(s)<<8,n=t.charCodeAt(++s),a+=l.charAt((i=e+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(s),a+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),a}),"encode"),decode:p,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(r&&!r.nodeType)if(i)i.exports=h;else for(var f in h)h.hasOwnProperty(f)&&(r[f]=h[f]);else n.base64=h}(t)})),Lx=Oe(((t,e)=>{var n,r;m(),n=typeof self<"u"?self:t,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return a(n,"r"),n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){n.r(e),n.d(e,"computeDestinationPoint",(function(){return D})),n.d(e,"convertArea",(function(){return F})),n.d(e,"convertDistance",(function(){return k})),n.d(e,"convertSpeed",(function(){return B})),n.d(e,"decimalToSexagesimal",(function(){return U})),n.d(e,"findNearest",(function(){return Y})),n.d(e,"getAreaOfPolygon",(function(){return W})),n.d(e,"getBounds",(function(){return H})),n.d(e,"getBoundsOfDistance",(function(){return J})),n.d(e,"getCenter",(function(){return K})),n.d(e,"getCenterOfBounds",(function(){return Z})),n.d(e,"getCompassDirection",(function(){return Q})),n.d(e,"getCoordinateKey",(function(){return y})),n.d(e,"getCoordinateKeys",(function(){return E})),n.d(e,"getDistance",(function(){return z})),n.d(e,"getDistanceFromLine",(function(){return tt})),n.d(e,"getGreatCircleBearing",(function(){return et})),n.d(e,"getLatitude",(function(){return P})),n.d(e,"getLongitude",(function(){return L})),n.d(e,"getPathLength",(function(){return rt})),n.d(e,"getPreciseDistance",(function(){return it})),n.d(e,"getRhumbLineBearing",(function(){return $})),n.d(e,"getRoughCompassDirection",(function(){return ot})),n.d(e,"getSpeed",(function(){return at})),n.d(e,"isDecimal",(function(){return v})),n.d(e,"isPointInLine",(function(){return st})),n.d(e,"isPointInPolygon",(function(){return ut})),n.d(e,"isPointNearLine",(function(){return lt})),n.d(e,"isPointWithinRadius",(function(){return ct})),n.d(e,"isSexagesimal",(function(){return m})),n.d(e,"isValidCoordinate",(function(){return C})),n.d(e,"isValidLatitude",(function(){return I})),n.d(e,"isValidLongitude",(function(){return S})),n.d(e,"orderByDistance",(function(){return X})),n.d(e,"sexagesimalToDecimal",(function(){return _})),n.d(e,"toDecimal",(function(){return O})),n.d(e,"toRad",(function(){return T})),n.d(e,"toDeg",(function(){return R})),n.d(e,"wktToPolygon",(function(){return ft})),n.d(e,"sexagesimalPattern",(function(){return r})),n.d(e,"earthRadius",(function(){return i})),n.d(e,"MINLAT",(function(){return o})),n.d(e,"MAXLAT",(function(){return s})),n.d(e,"MINLON",(function(){return u})),n.d(e,"MAXLON",(function(){return l})),n.d(e,"longitudeKeys",(function(){return c})),n.d(e,"latitudeKeys",(function(){return p})),n.d(e,"altitudeKeys",(function(){return h})),n.d(e,"distanceConversion",(function(){return f})),n.d(e,"timeConversion",(function(){return d})),n.d(e,"areaConversion",(function(){return g}));var r=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,o=-90,s=90,u=-180,l=180,c=["lng","lon","longitude",0],p=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],f={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144},d={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var y=a((function(t,e){return e.reduce((function(e,n){if(null==t)throw new Error("'".concat(t,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(t,n)&&void 0!==n&&void 0===e?(e=n,n):e}),void 0)}),"m"),v=a((function(t){var e=t.toString().trim();return!isNaN(parseFloat(e))&&parseFloat(e)===Number(e)}),"v"),m=a((function(t){return r.test(t.toString().trim())}),"p"),_=a((function(t){var e=new RegExp(r).exec(t);if(null==e)throw new Error("Given value is not in sexagesimal format");var n=Number(e[2])/60||0,i=Number(e[4])/3600||0,o=parseFloat(e[1])+n+i;return["S","W"].includes(e[7])?-o:o}),"y");function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a(b,"b"),a(w,"M"),a(x,"O");var E=a((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:p,altitude:h},n=y(t,e.longitude),r=y(t,e.latitude),i=y(t,e.altitude);return w({latitude:r,longitude:n},i?{altitude:i}:{})}),"S"),I=a((function t(e){return v(e)?!(parseFloat(e)>s||e<o):!!m(e)&&t(_(e))}),"t"),S=a((function t(e){return v(e)?!(parseFloat(e)>l||e<u):!!m(e)&&t(_(e))}),"t"),C=a((function(t){var e=E(t),n=e.latitude,r=e.longitude;if(Array.isArray(t)&&t.length>=2)return S(t[0])&&I(t[1]);if(void 0===n||void 0===r)return!1;var i=t[r],o=t[n];return void 0!==o&&void 0!==i&&!1!==I(o)&&!1!==S(i)}),"j");function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a(M,"w"),a(N,"x"),a(A,"E");var O=a((function t(e){if(v(e))return Number(e);if(m(e))return _(e);if(C(e)){var n=E(e);return Array.isArray(e)?e.map((function(e,n){return[0,1].includes(n)?t(e):e})):N(N(N({},e),n.latitude&&A({},n.latitude,t(e[n.latitude]))),n.longitude&&A({},n.longitude,t(e[n.longitude])))}return Array.isArray(e)?e.map((function(e){return C(e)?t(e):e})):e}),"t"),P=a((function(t,e){var n=y(t,p);if(null!=n){var r=t[n];return!0===e?r:O(r)}}),"A"),L=a((function(t,e){var n=y(t,c);if(null!=n){var r=t[n];return!0===e?r:O(r)}}),"I"),T=a((function(t){return t*Math.PI/180}),"W"),R=a((function(t){return 180*t/Math.PI}),"D"),D=a((function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=P(t),o=L(t),a=e/r,s=T(n),c=T(i),p=T(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),f=p+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),d=R(f);return(d<u||d>l)&&(f=(f+3*Math.PI)%(2*Math.PI)-Math.PI,d=R(f)),{latitude:R(h),longitude:d}}),"F"),F=a((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=g[e];if(n)return t*n;throw new Error("Invalid unit used for area conversion.")}),"C"),k=a((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=f[e];if(n)return t*n;throw new Error("Invalid unit used for distance conversion.")}),"k"),B=a((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(e){case"kmh":return t*d.h*f.km;case"mph":return t*d.h*f.mi;default:return t}}),"T");function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}a(j,"q"),a(G,"$");var q=a((function(t){var e=Math.pow(10,12);return Math.round(t*e)/e}),"B"),U=a((function(t){var e=j(t.toString().split("."),2),n=e[0],r=e[1],i=Math.abs(Number(n)),o=q(60*+("0."+(r||0))),a=Math.floor(o),s=q(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+'"'}),"R"),V=a((function(t){return t>1?1:t<-1?-1:t}),"X"),z=a((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n=void 0===n||isNaN(n)?1:n;var r=P(t),o=L(t),a=P(e),s=L(e),u=Math.acos(V(Math.sin(T(a))*Math.sin(T(r))+Math.cos(T(a))*Math.cos(T(r))*Math.cos(T(o)-T(s))))*i;return Math.round(u/n)*n}),"_"),X=a((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;return n="function"==typeof n?n:z,e.slice().sort((function(e,r){return n(t,e)-n(t,r)}))}),"K"),Y=a((function(t,e){return X(t,e)[0]}),"Y"),W=a((function(t){var e=0;if(t.length>2){for(var n,r,o,a=0;a<t.length;a++){a===t.length-2?(n=t.length-2,r=t.length-1,o=0):a===t.length-1?(n=t.length-1,r=0,o=1):(n=a,r=a+1,o=a+2);var s=L(t[n]),u=P(t[r]),l=L(t[o]);e+=(T(l)-T(s))*Math.sin(T(u))}e=e*i*i/2}return Math.abs(e)}),"Z"),H=a((function(t){if(!1===Array.isArray(t)||0===t.length)throw new Error("No points were given.");return t.reduce((function(t,e){var n=P(e),r=L(e);return{maxLat:Math.max(n,t.maxLat),minLat:Math.min(n,t.minLat),maxLng:Math.max(r,t.maxLng),minLng:Math.min(r,t.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),J=a((function(t,e){var n,r,a=P(t),c=L(t),p=T(a),h=T(c),f=e/i,d=p-f,g=p+f,y=T(s),v=T(o),m=T(l),_=T(u);if(d>v&&g<y){var b=Math.asin(Math.sin(f)/Math.cos(p));(n=h-b)<_&&(n+=2*Math.PI),(r=h+b)>m&&(r-=2*Math.PI)}else d=Math.max(d,v),g=Math.min(g,y),n=_,r=m;return[{latitude:R(d),longitude:R(n)},{latitude:R(g),longitude:R(r)}]}),"V"),K=a((function(t){if(!1===Array.isArray(t)||0===t.length)return!1;var e=t.length,n=t.reduce((function(t,e){var n=T(P(e)),r=T(L(e));return{X:t.X+Math.cos(n)*Math.cos(r),Y:t.Y+Math.cos(n)*Math.sin(r),Z:t.Z+Math.sin(n)}}),{X:0,Y:0,Z:0}),r=n.X/e,i=n.Y/e,o=n.Z/e;return{longitude:R(Math.atan2(i,r)),latitude:R(Math.atan2(o,Math.sqrt(r*r+i*i)))}}),"U"),Z=a((function(t){var e=H(t),n=e.minLat+(e.maxLat-e.minLat)/2,r=e.minLng+(e.maxLng-e.minLng)/2;return{latitude:parseFloat(n.toFixed(6)),longitude:parseFloat(r.toFixed(6))}}),"z"),$=a((function(t,e){var n=T(L(e))-T(L(t)),r=Math.log(Math.tan(T(P(e))/2+Math.PI/4)/Math.tan(T(P(t))/2+Math.PI/4));return Math.abs(n)>Math.PI&&(n=n>0?-1*(2*Math.PI-n):2*Math.PI+n),(R(Math.atan2(n,r))+360)%360}),"H"),Q=a((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$,r="function"==typeof n?n(t,e):$(t,e);if(isNaN(r))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(r/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}),"J"),tt=a((function(t,e,n){var r=z(e,t),i=z(t,n),o=z(e,n),a=Math.acos(V((r*r+o*o-i*i)/(2*r*o))),s=Math.acos(V((i*i+o*o-r*r)/(2*i*o)));return a>Math.PI/2?r:s>Math.PI/2?i:Math.sin(a)*r}),"Q"),et=a((function(t,e){var n=P(e),r=L(e),i=P(t),o=L(t);return(R(Math.atan2(Math.sin(T(r)-T(o))*Math.cos(T(n)),Math.cos(T(i))*Math.sin(T(n))-Math.sin(T(i))*Math.cos(T(n))*Math.cos(T(r)-T(o))))+360)%360}),"tt");function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a(nt,"nt");var rt=a((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return t.reduce((function(t,n){return"object"===nt(t)&&null!==t.last&&(t.distance+=e(n,t.last)),t.last=n,t}),{last:null,distance:0}).distance}),"rt"),it=a((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n=void 0===n||isNaN(n)?1:n;var r,o,a,s,u,l,c,p=P(t),h=L(t),f=P(e),d=L(e),g=6356752.314245,y=1/298.257223563,v=T(d-h),m=Math.atan((1-y)*Math.tan(T(parseFloat(p)))),_=Math.atan((1-y)*Math.tan(T(parseFloat(f)))),b=Math.sin(m),w=Math.cos(m),x=Math.sin(_),E=Math.cos(_),I=v,S=100;do{var C=Math.sin(I),M=Math.cos(I);if(0===(l=Math.sqrt(E*C*(E*C)+(w*x-b*E*M)*(w*x-b*E*M))))return 0;r=b*x+w*E*M,o=Math.atan2(l,r),u=r-2*b*x/(s=1-(a=w*E*C/l)*a),isNaN(u)&&(u=0);var N=y/16*s*(4+y*(4-3*s));c=I,I=v+(1-N)*y*a*(o+N*l*(u+N*r*(2*u*u-1)))}while(Math.abs(I-c)>1e-12&&--S>0);if(0===S)return NaN;var A=s*(i*i-g*g)/(g*g),O=1+A/16384*(4096+A*(A*(320-175*A)-768)),R=A/1024*(256+A*(A*(74-47*A)-128)),D=R*l*(u+R/4*(r*(2*u*u-1)-R/6*u*(4*l*l-3)*(4*u*u-3))),F=g*O*(o-D);return Math.round(F/n)*n}),"et"),ot=a((function(t){return/^NNE|NE|NNW|N$/.test(t)?"N":/^ENE|E|ESE|SE$/.test(t)?"E":/^SSE|S|SSW|SW$/.test(t)?"S":/^WSW|W|WNW|NW$/.test(t)?"W":void 0}),"it"),at=a((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z,r=n(t,e),i=Number(e.time)-Number(t.time),o=r/i*1e3;return o}),"ot"),st=a((function(t,e,n){return z(e,t)+z(t,n)===z(e,n)}),"ut"),ut=a((function(t,e){for(var n=!1,r=e.length,i=-1,o=r-1;++i<r;o=i)(L(e[i])<=L(t)&&L(t)<L(e[o])||L(e[o])<=L(t)&&L(t)<L(e[i]))&&P(t)<(P(e[o])-P(e[i]))*(L(t)-L(e[i]))/(L(e[o])-L(e[i]))+P(e[i])&&(n=!n);return n}),"at"),lt=a((function(t,e,n,r){return tt(t,e,n)<r}),"ct"),ct=a((function(t,e,n){return z(t,e)<n}),"ft");function pt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ht(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}a(pt,"st"),a(ht,"lt");var ft=a((function(t){if(!t.startsWith("POLYGON"))throw new Error("Invalid wkt.");return t.slice(t.indexOf("(")+2,t.indexOf(")")).split(", ").map((function(t){var e=pt(t.split(" "),2),n=e[0],r=e[1];return{longitude:parseFloat(n),latitude:parseFloat(r)}}))}),"dt")}])},"object"==typeof t&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof t?t.geolib=r():n.geolib=r()})),ns={};function GT(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ty(t,e),a(n,"__"),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function qT(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function UT(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function VT(t,e){return function(n,r){e(n,r,t)}}function XT(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function YT(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return a(i,"adopt"),new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function u(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,u)}a(s,"fulfilled"),a(u,"rejected"),a(l,"step"),l((r=r.apply(t,e||[])).next())}))}function WT(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function HT(t,e){for(var n in t)"default"!==n&&!Object.prototype.hasOwnProperty.call(e,n)&&iy(e,t,n)}function ny(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gx(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function KT(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Gx(arguments[e]));return t}function JT(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function ZT(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function vf(t){return this instanceof vf?(this.v=t,this):new vf(t)}function QT(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{!function(t){t.value instanceof vf?Promise.resolve(t.value.v).then(u,l):c(o[0][2],t)}(i[t](e))}catch(t){c(o[0][3],t)}}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function $T(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:vf(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function eA(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof ny?ny(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function tA(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function nA(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&iy(e,t,n);return rA(e,t),e}function iA(t){return t&&t.__esModule?t:{default:t}}function aA(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function oA(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function sA(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}Md(ns,{__assign:()=>ry,__asyncDelegator:()=>$T,__asyncGenerator:()=>QT,__asyncValues:()=>eA,__await:()=>vf,__awaiter:()=>YT,__classPrivateFieldGet:()=>aA,__classPrivateFieldIn:()=>sA,__classPrivateFieldSet:()=>oA,__createBinding:()=>iy,__decorate:()=>UT,__exportStar:()=>HT,__extends:()=>GT,__generator:()=>WT,__importDefault:()=>iA,__importStar:()=>nA,__makeTemplateObject:()=>tA,__metadata:()=>XT,__param:()=>VT,__read:()=>Gx,__rest:()=>qT,__spread:()=>KT,__spreadArray:()=>ZT,__spreadArrays:()=>JT,__values:()=>ny});var ty,ry,iy,rA,is=xd((()=>{m(),ty=a((function(t,e){return(ty=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}),"extendStatics"),a(GT,"__extends"),ry=a((function(){return ry=Object.assign||a((function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}),"__assign"),ry.apply(this,arguments)}),"__assign"),a(qT,"__rest"),a(UT,"__decorate"),a(VT,"__param"),a(XT,"__metadata"),a(YT,"__awaiter"),a(WT,"__generator"),iy=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]},a(HT,"__exportStar"),a(ny,"__values"),a(Gx,"__read"),a(KT,"__spread"),a(JT,"__spreadArrays"),a(ZT,"__spreadArray"),a(vf,"__await"),a(QT,"__asyncGenerator"),a($T,"__asyncDelegator"),a(eA,"__asyncValues"),a(tA,"__makeTemplateObject"),rA=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},a(nA,"__importStar"),a(iA,"__importDefault"),a(aA,"__classPrivateFieldGet"),a(oA,"__classPrivateFieldSet"),a(sA,"__classPrivateFieldIn")})),Xa={};function uA(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ay(t,e),a(n,"__"),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function lA(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function cA(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function fA(t,e){return function(n,r){e(n,r,t)}}function pA(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function hA(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return a(i,"adopt"),new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function u(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,u)}a(s,"fulfilled"),a(u,"rejected"),a(l,"step"),l((r=r.apply(t,e||[])).next())}))}function dA(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function gA(t,e){for(var n in t)"default"!==n&&!Object.prototype.hasOwnProperty.call(e,n)&&uy(e,t,n)}function sy(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function qx(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function vA(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(qx(arguments[e]));return t}function mA(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function yA(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function mf(t){return this instanceof mf?(this.v=t,this):new mf(t)}function _A(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{!function(t){t.value instanceof mf?Promise.resolve(t.value.v).then(u,l):c(o[0][2],t)}(i[t](e))}catch(t){c(o[0][3],t)}}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function bA(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:mf(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function wA(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof sy?sy(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function EA(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function MA(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&uy(e,t,n);return xA(e,t),e}function SA(t){return t&&t.__esModule?t:{default:t}}function IA(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function PA(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function CA(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}Md(Xa,{__assign:()=>oy,__asyncDelegator:()=>bA,__asyncGenerator:()=>_A,__asyncValues:()=>wA,__await:()=>mf,__awaiter:()=>hA,__classPrivateFieldGet:()=>IA,__classPrivateFieldIn:()=>CA,__classPrivateFieldSet:()=>PA,__createBinding:()=>uy,__decorate:()=>cA,__exportStar:()=>gA,__extends:()=>uA,__generator:()=>dA,__importDefault:()=>SA,__importStar:()=>MA,__makeTemplateObject:()=>EA,__metadata:()=>pA,__param:()=>fA,__read:()=>qx,__rest:()=>lA,__spread:()=>vA,__spreadArray:()=>yA,__spreadArrays:()=>mA,__values:()=>sy});var ay,oy,uy,xA,Ya=xd((()=>{m(),ay=a((function(t,e){return(ay=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}),"extendStatics"),a(uA,"__extends"),oy=a((function(){return oy=Object.assign||a((function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}),"__assign"),oy.apply(this,arguments)}),"__assign"),a(lA,"__rest"),a(cA,"__decorate"),a(fA,"__param"),a(pA,"__metadata"),a(hA,"__awaiter"),a(dA,"__generator"),uy=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]},a(gA,"__exportStar"),a(sy,"__values"),a(qx,"__read"),a(vA,"__spread"),a(mA,"__spreadArrays"),a(yA,"__spreadArray"),a(mf,"__await"),a(_A,"__asyncGenerator"),a(bA,"__asyncDelegator"),a(wA,"__asyncValues"),a(EA,"__makeTemplateObject"),xA=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},a(MA,"__importStar"),a(SA,"__importDefault"),a(IA,"__classPrivateFieldGet"),a(PA,"__classPrivateFieldSet"),a(CA,"__classPrivateFieldIn")})),Ux=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.ServerZone=void 0,(e=t.ServerZone||(t.ServerZone={})).US="US",e.EU="EU"})),Vx=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialEventType=t.RevenueProperty=t.IdentifyOperation=void 0,(e=t.IdentifyOperation||(t.IdentifyOperation={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE="$revenue"}(t.RevenueProperty||(t.RevenueProperty={})),function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"}(t.SpecialEventType||(t.SpecialEventType={}))})),Xx=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(e=t.LogLevel||(t.LogLevel={}))[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"})),Yx=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.PluginType=void 0,(e=t.PluginType||(t.PluginType={})).BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"})),Wx=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Status=void 0,(e=t.Status||(t.Status={})).Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"})),Hx=Oe((t=>{var e;m(),Object.defineProperty(t,"__esModule",{value:!0}),t.TransportType=void 0,(e=t.TransportType||(t.TransportType={})).XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"})),Mi=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.TransportType=t.Status=t.PluginType=t.LogLevel=t.RevenueProperty=t.IdentifyOperation=t.SpecialEventType=t.ServerZone=void 0;var e=Ux();Object.defineProperty(t,"ServerZone",{enumerable:!0,get:function(){return e.ServerZone}});var n=Vx();Object.defineProperty(t,"SpecialEventType",{enumerable:!0,get:function(){return n.SpecialEventType}}),Object.defineProperty(t,"IdentifyOperation",{enumerable:!0,get:function(){return n.IdentifyOperation}}),Object.defineProperty(t,"RevenueProperty",{enumerable:!0,get:function(){return n.RevenueProperty}});var r=Xx();Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}});var i=Yx();Object.defineProperty(t,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=Wx();Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return o.Status}});var a=Hx();Object.defineProperty(t,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),xf=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.EU_AMPLITUDE_BATCH_SERVER_URL=t.AMPLITUDE_BATCH_SERVER_URL=t.EU_AMPLITUDE_SERVER_URL=t.AMPLITUDE_SERVER_URL=t.STORAGE_PREFIX=t.AMPLITUDE_PREFIX=t.UNSET_VALUE=void 0,t.UNSET_VALUE="-",t.AMPLITUDE_PREFIX="AMP",t.STORAGE_PREFIX="".concat(t.AMPLITUDE_PREFIX,"_unsent"),t.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",t.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",t.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",t.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),cy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.isValidProperties=t.isValidObject=void 0;var e=(Ya(),zr(Xa)),n=a((function(e){if(Object.keys(e).length>1e3)return!1;for(var n in e){var r=e[n];if(!(0,t.isValidProperties)(n,r))return!1}return!0}),"isValidObject");t.isValidObject=n;var r=a((function(n,r){var i,o;if("string"!=typeof n)return!1;if(Array.isArray(r)){var a=!0;try{for(var s=e.__values(r),u=s.next();!u.done;u=s.next()){var l=u.value;if(Array.isArray(l))return!1;if("object"==typeof l)a=a&&(0,t.isValidObject)(l);else if(!["number","string"].includes(typeof l))return!1;if(!a)return!1}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==r)return!1;if("object"==typeof r)return(0,t.isValidObject)(r);if(!["number","string","boolean"].includes(typeof r))return!1}return!0}),"isValidProperties");t.isValidProperties=r})),fy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Identify=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=xf(),i=cy(),o=function(){function t(){this._propertySet=new Set,this._properties={}}return a(t,"Identify"),t.prototype.getUserProperties=function(){return e.__assign({},this._properties)},t.prototype.set=function(t,e){return this._safeSet(n.IdentifyOperation.SET,t,e),this},t.prototype.setOnce=function(t,e){return this._safeSet(n.IdentifyOperation.SET_ONCE,t,e),this},t.prototype.append=function(t,e){return this._safeSet(n.IdentifyOperation.APPEND,t,e),this},t.prototype.prepend=function(t,e){return this._safeSet(n.IdentifyOperation.PREPEND,t,e),this},t.prototype.postInsert=function(t,e){return this._safeSet(n.IdentifyOperation.POSTINSERT,t,e),this},t.prototype.preInsert=function(t,e){return this._safeSet(n.IdentifyOperation.PREINSERT,t,e),this},t.prototype.remove=function(t,e){return this._safeSet(n.IdentifyOperation.REMOVE,t,e),this},t.prototype.add=function(t,e){return this._safeSet(n.IdentifyOperation.ADD,t,e),this},t.prototype.unset=function(t){return this._safeSet(n.IdentifyOperation.UNSET,t,r.UNSET_VALUE),this},t.prototype.clearAll=function(){return this._properties={},this._properties[n.IdentifyOperation.CLEAR_ALL]=r.UNSET_VALUE,this},t.prototype._safeSet=function(t,e,n){if(this._validate(t,e,n)){var r=this._properties[t];return void 0===r&&(r={},this._properties[t]=r),r[e]=n,this._propertySet.add(e),!0}return!1},t.prototype._validate=function(t,e,r){return void 0===this._properties[n.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(e)&&(t===n.IdentifyOperation.ADD?"number"==typeof r:t===n.IdentifyOperation.UNSET||t===n.IdentifyOperation.REMOVE||(0,i.isValidProperties)(e,r))},t}();t.Identify=o})),py=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.createRevenueEvent=t.createGroupEvent=t.createGroupIdentifyEvent=t.createIdentifyEvent=t.createTrackEvent=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=fy(),i=a((function(t,n,r){var i="string"==typeof t?{event_type:t}:t;return e.__assign(e.__assign(e.__assign({},i),r),n&&{event_properties:n})}),"createTrackEvent");t.createTrackEvent=i;var o=a((function(t,r){return e.__assign(e.__assign({},r),{event_type:n.SpecialEventType.IDENTIFY,user_properties:t.getUserProperties()})}),"createIdentifyEvent");t.createIdentifyEvent=o;var s=a((function(t,r,i,o){var a;return e.__assign(e.__assign({},o),{event_type:n.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[t]=r,a)})}),"createGroupIdentifyEvent");t.createGroupIdentifyEvent=s;var u=a((function(t,i,o){var a,s=new r.Identify;return s.set(t,i),e.__assign(e.__assign({},o),{event_type:n.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[t]=i,a)})}),"createGroupEvent");t.createGroupEvent=u;var l=a((function(t,r){return e.__assign(e.__assign({},r),{event_type:n.SpecialEventType.REVENUE,event_properties:t.getEventProperties()})}),"createRevenueEvent");t.createRevenueEvent=l})),Ad=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.buildResult=void 0;var e=Mi(),n=a((function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=e.Status.Unknown),{event:t,code:n,message:r}}),"buildResult");t.buildResult=n})),Jx=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Timeline=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=Ad(),i=function(){function t(){this.queue=[],this.applying=!1,this.plugins=[]}return a(t,"Timeline"),t.prototype.register=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.setup(n)];case 1:return e.sent(),this.plugins.push(t),[2]}}))}))},t.prototype.deregister=function(t){return this.plugins.splice(this.plugins.findIndex((function(e){return e.name===t})),1),Promise.resolve()},t.prototype.reset=function(){this.applying=!1,this.plugins=[]},t.prototype.push=function(t){var e=this;return new Promise((function(n){e.queue.push([t,n]),e.scheduleApply(0)}))},t.prototype.scheduleApply=function(t){var e=this;this.applying||(this.applying=!0,setTimeout((function(){e.apply(e.queue.shift()).then((function(){e.applying=!1,e.queue.length>0&&e.scheduleApply(0)}))}),t))},t.prototype.apply=function(t){return e.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u,l,c,p,h,f,d,g,y,v,m,_,b,w;return e.__generator(this,(function(x){switch(x.label){case 0:if(!t)return[2];i=e.__read(t,1),o=i[0],a=e.__read(t,2),s=a[1],u=this.plugins.filter((function(t){return t.type===n.PluginType.BEFORE})),x.label=1;case 1:x.trys.push([1,6,7,8]),l=e.__values(u),c=l.next(),x.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(e.__assign({},o))];case 3:o=x.sent(),x.label=4;case 4:return c=l.next(),[3,2];case 5:return[3,8];case 6:return p=x.sent(),m={error:p},[3,8];case 7:try{c&&!c.done&&(_=l.return)&&_.call(l)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(t){return t.type===n.PluginType.ENRICHMENT})),x.label=9;case 9:x.trys.push([9,14,15,16]),f=e.__values(h),d=f.next(),x.label=10;case 10:return d.done?[3,13]:[4,d.value.execute(e.__assign({},o))];case 11:o=x.sent(),x.label=12;case 12:return d=f.next(),[3,10];case 13:return[3,16];case 14:return g=x.sent(),b={error:g},[3,16];case 15:try{d&&!d.done&&(w=f.return)&&w.call(f)}finally{if(b)throw b.error}return[7];case 16:return y=this.plugins.filter((function(t){return t.type===n.PluginType.DESTINATION})),v=y.map((function(t){var n=e.__assign({},o);return t.execute(n).catch((function(t){return(0,r.buildResult)(n,0,String(t))}))})),Promise.all(v).then((function(t){var n=e.__read(t,1)[0];s(n)})),[2]}}))}))},t.prototype.flush=function(){return e.__awaiter(this,void 0,void 0,(function(){var t,r,i,o=this;return e.__generator(this,(function(e){switch(e.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map((function(t){return o.apply(t)})))];case 1:return e.sent(),r=this.plugins.filter((function(t){return t.type===n.PluginType.DESTINATION})),i=r.map((function(t){return t.flush&&t.flush()})),[4,Promise.all(i)];case 2:return e.sent(),[2]}}))}))},t}();t.Timeline=i})),hy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.CLIENT_NOT_INITIALIZED=t.INVALID_API_KEY=t.MISSING_API_KEY_MESSAGE=t.OPT_OUT_MESSAGE=t.MAX_RETRIES_EXCEEDED_MESSAGE=t.UNEXPECTED_ERROR_MESSAGE=t.SUCCESS_MESSAGE=void 0,t.SUCCESS_MESSAGE="Event tracked successfully",t.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",t.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",t.OPT_OUT_MESSAGE="Event skipped due to optOut config",t.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",t.INVALID_API_KEY="Invalid API key",t.CLIENT_NOT_INITIALIZED="Client not initialized"})),Qx=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.AmplitudeCore=void 0;var e=(Ya(),zr(Xa)),n=py(),r=Jx(),i=Ad(),o=hy(),s=function(){function t(t){void 0===t&&(t="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new r.Timeline,this.name=t}return a(t,"AmplitudeCore"),t.prototype._init=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return this.config=t,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return e.sent(),[2]}}))}))},t.prototype.runQueuedFunctions=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s;return e.__generator(this,(function(u){switch(u.label){case 0:n=this[t],this[t]=[],u.label=1;case 1:u.trys.push([1,6,7,8]),r=e.__values(n),i=r.next(),u.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:u.sent(),u.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},t.prototype.track=function(t,e,r){var i=(0,n.createTrackEvent)(t,e,r);return this.dispatch(i)},t.prototype.identify=function(t,e){var r=(0,n.createIdentifyEvent)(t,e);return this.dispatch(r)},t.prototype.groupIdentify=function(t,e,r,i){var o=(0,n.createGroupIdentifyEvent)(t,e,r,i);return this.dispatch(o)},t.prototype.setGroup=function(t,e,r){var i=(0,n.createGroupEvent)(t,e,r);return this.dispatch(i)},t.prototype.revenue=function(t,e){var r=(0,n.createRevenueEvent)(t,e);return this.dispatch(r)},t.prototype.add=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return this.config?[2,this.timeline.register(t,this.config)]:(this.q.push(this.add.bind(this,t)),[2])}))}))},t.prototype.remove=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return this.config?[2,this.timeline.deregister(t)]:(this.q.push(this.remove.bind(this,t)),[2])}))}))},t.prototype.dispatchWithCallback=function(t,e){if(!this.config)return e((0,i.buildResult)(t,0,o.CLIENT_NOT_INITIALIZED));this.process(t).then(e)},t.prototype.dispatch=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n=this;return e.__generator(this,(function(e){return this.config?[2,this.process(t)]:[2,new Promise((function(e){n.dispatchQ.push(n.dispatchWithCallback.bind(n,t,e))}))]}))}))},t.prototype.process=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n,r,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(t,0,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(t)];case 1:return 200===(a=e.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return n=e.sent(),r=String(n),this.config.loggerProvider.error(r),[2,a=(0,i.buildResult)(t,0,r)];case 3:return[2]}}))}))},t.prototype.setOptOut=function(t){this.config?this.config.optOut=!!t:this.q.push(this.setOptOut.bind(this,!!t))},t.prototype.flush=function(){return this.timeline.flush()},t}();t.AmplitudeCore=s})),$x=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Revenue=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=cy(),i=function(){function t(){this.productId="",this.quantity=1,this.price=0}return a(t,"Revenue"),t.prototype.setProductId=function(t){return this.productId=t,this},t.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},t.prototype.setPrice=function(t){return this.price=t,this},t.prototype.setRevenueType=function(t){return this.revenueType=t,this},t.prototype.setRevenue=function(t){return this.revenue=t,this},t.prototype.setEventProperties=function(t){return(0,r.isValidObject)(t)&&(this.properties=t),this},t.prototype.getEventProperties=function(){var t=this.properties?e.__assign({},this.properties):{};return t[n.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,t[n.RevenueProperty.REVENUE_QUANTITY]=this.quantity,t[n.RevenueProperty.REVENUE_PRICE]=this.price,t[n.RevenueProperty.REVENUE_TYPE]=this.revenueType,t[n.RevenueProperty.REVENUE]=this.revenue,t},t}();t.Revenue=i})),eM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.chunk=void 0;var e=a((function(t,e){var n=Math.max(e,1);return t.reduce((function(t,e,r){var i=Math.floor(r/n);return t[i]||(t[i]=[]),t[i].push(e),t}),[])}),"chunk");t.chunk=e})),gy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var e=Mi(),n="Amplitude Logger ",r=function(){function t(){this.logLevel=e.LogLevel.None}return a(t,"Logger"),t.prototype.disable=function(){this.logLevel=e.LogLevel.None},t.prototype.enable=function(t){void 0===t&&(t=e.LogLevel.Warn),this.logLevel=t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<e.LogLevel.Verbose||console.log("".concat(n,"[Log]: ").concat(t.join(" ")))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<e.LogLevel.Warn||console.warn("".concat(n,"[Warn]: ").concat(t.join(" ")))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<e.LogLevel.Error||console.error("".concat(n,"[Error]: ").concat(t.join(" ")))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<e.LogLevel.Debug||console.log("".concat(n,"[Debug]: ").concat(t.join(" ")))},t}();t.Logger=r})),vy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.createServerConfig=t.getServerUrl=t.Config=t.getDefaultConfig=void 0;var e=Mi(),n=xf(),r=gy(),i=a((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:e.LogLevel.Warn,loggerProvider:new r.Logger,optOut:!1,serverUrl:n.AMPLITUDE_SERVER_URL,serverZone:e.ServerZone.US,useBatch:!1}}),"getDefaultConfig");t.getDefaultConfig=i;var o=function(){function e(e){var n,r,i;this._optOut=!1;var o=(0,t.getDefaultConfig)();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(n=e.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(r=e.optOut)&&void 0!==r?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,t.createServerConfig)(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return a(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(t){this._optOut=t},enumerable:!1,configurable:!0}),e}();t.Config=o;var s=a((function(t,r){return t===e.ServerZone.EU?r?n.EU_AMPLITUDE_BATCH_SERVER_URL:n.EU_AMPLITUDE_SERVER_URL:r?n.AMPLITUDE_BATCH_SERVER_URL:n.AMPLITUDE_SERVER_URL}),"getServerUrl");t.getServerUrl=s;var u=a((function(n,r,i){if(void 0===n&&(n=""),void 0===r&&(r=(0,t.getDefaultConfig)().serverZone),void 0===i&&(i=(0,t.getDefaultConfig)().useBatch),n)return{serverUrl:n,serverZone:void 0};var o=[e.ServerZone.US,e.ServerZone.EU].includes(r)?r:(0,t.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,t.getServerUrl)(o,i)}}),"createServerConfig");t.createServerConfig=u})),tM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Destination=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=hy(),i=xf(),o=eM(),s=Ad(),u=vy(),l=function(){function t(){this.name="amplitude",this.type=n.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return a(t,"Destination"),t.prototype.setup=function(t){var n;return e.__awaiter(this,void 0,void 0,(function(){var r,o=this;return e.__generator(this,(function(e){switch(e.label){case 0:return this.config=t,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(n=this.config.storageProvider)||void 0===n?void 0:n.get(this.storageKey)];case 1:return r=e.sent(),this.saveEvents(),r&&r.length>0&&Promise.all(r.map((function(t){return o.execute(t)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},t.prototype.execute=function(t){var e=this;return new Promise((function(n){var r={event:t,attempts:0,callback:function(t){return n(t)},timeout:0};e.addToQueue(r)}))},t.prototype.addToQueue=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=e.filter((function(e){return e.attempts<t.config.flushMaxRetries?(e.attempts+=1,!0):(t.fulfillRequest([e],500,r.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.forEach((function(e){t.queue=t.queue.concat(e),0!==e.timeout?setTimeout((function(){e.timeout=0,t.schedule(0)}),e.timeout):t.schedule(t.config.flushIntervalMillis)})),this.saveEvents()},t.prototype.schedule=function(t){var e=this;this.scheduled||(this.scheduled=setTimeout((function(){e.flush(!0).then((function(){e.queue.length>0&&e.schedule(t)}))}),t))},t.prototype.flush=function(t){return void 0===t&&(t=!1),e.__awaiter(this,void 0,void 0,(function(){var n,r,i,a=this;return e.__generator(this,(function(e){switch(e.label){case 0:return n=[],r=[],this.queue.forEach((function(t){return 0===t.timeout?n.push(t):r.push(t)})),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,o.chunk)(n,this.config.flushQueueSize),[4,Promise.all(i.map((function(e){return a.send(e,t)})))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(t,n){return void 0===n&&(n=!0),e.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l;return e.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,r.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:t.map((function(t){var n=t.event;n.extra;return e.__rest(n,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,u.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(t,0,r.UNEXPECTED_ERROR_MESSAGE),[2];if(!n){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch{}this.fulfillRequest(t,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(t,a.statusCode,a.status);return[2]}return this.handleReponse(a,t),[3,4];case 3:return l=c.sent(),this.fulfillRequest(t,0,String(l)),[3,4];case 4:return[2]}}))}))},t.prototype.handleReponse=function(t,e){switch(t.status){case n.Status.Success:this.handleSuccessResponse(t,e);break;case n.Status.Invalid:this.handleInvalidResponse(t,e);break;case n.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(t,e);break;case n.Status.RateLimit:this.handleRateLimitResponse(t,e);break;default:this.handleOtherReponse(e)}},t.prototype.handleSuccessResponse=function(t,e){this.fulfillRequest(e,t.statusCode,r.SUCCESS_MESSAGE)},t.prototype.handleInvalidResponse=function(t,n){var i=this;if(t.body.missingField||t.body.error.startsWith(r.INVALID_API_KEY))this.fulfillRequest(n,t.statusCode,t.body.error);else{var o=e.__spreadArray(e.__spreadArray(e.__spreadArray(e.__spreadArray([],e.__read(Object.values(t.body.eventsWithInvalidFields)),!1),e.__read(Object.values(t.body.eventsWithMissingFields)),!1),e.__read(Object.values(t.body.eventsWithInvalidIdLengths)),!1),e.__read(t.body.silencedEvents),!1).flat(),a=new Set(o),s=n.filter((function(e,n){if(!a.has(n))return!0;i.fulfillRequest([e],t.statusCode,t.body.error)}));this.addToQueue.apply(this,e.__spreadArray([],e.__read(s),!1))}},t.prototype.handlePayloadTooLargeResponse=function(t,n){1!==n.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,e.__spreadArray([],e.__read(n),!1))):this.fulfillRequest(n,t.statusCode,t.body.error)},t.prototype.handleRateLimitResponse=function(t,n){var r=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),a=t.body.throttledEvents,s=new Set(i),u=new Set(o),l=new Set(a),c=n.filter((function(e,n){if(!(e.event.user_id&&s.has(e.event.user_id)||e.event.device_id&&u.has(e.event.device_id)))return l.has(n)&&(e.timeout=r.throttleTimeout),!0;r.fulfillRequest([e],t.statusCode,t.body.error)}));this.addToQueue.apply(this,e.__spreadArray([],e.__read(c),!1))},t.prototype.handleOtherReponse=function(t){var n=this;this.addToQueue.apply(this,e.__spreadArray([],e.__read(t.map((function(t){return t.timeout=t.attempts*n.retryTimeout,t}))),!1))},t.prototype.fulfillRequest=function(t,e,n){this.saveEvents(),t.forEach((function(t){return t.callback((0,s.buildResult)(t.event,e,n))}))},t.prototype.saveEvents=function(){if(this.config.storageProvider){var t=Array.from(this.queue.map((function(t){return t.event})));this.config.storageProvider.set(this.storageKey,t)}},t}();t.Destination=l})),nM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.returnWrapper=void 0;var e=(Ya(),zr(Xa)),n=a((function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{promise:t.apply(void 0,e.__spreadArray([],e.__read(n),!1))}}}),"returnWrapper");t.returnWrapper=n})),iM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.debugWrapper=t.getClientStates=t.getValueByStringPath=t.getClientLogConfig=t.getStacktrace=void 0;var e=(Ya(),zr(Xa)),n=Mi(),r=a((function(t){return void 0===t&&(t=0),((new Error).stack||"").split("\n").slice(2+t).map((function(t){return t.trim()}))}),"getStacktrace");t.getStacktrace=r;var i=a((function(t){return function(){var n=e.__assign({},t.config);return{logger:n.loggerProvider,logLevel:n.logLevel}}}),"getClientLogConfig");t.getClientLogConfig=i;var o=a((function(t,n){var r,i;n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=e.__values(n.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in t))return;t=t[s]}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t}),"getValueByStringPath");t.getValueByStringPath=o;var s=a((function(n,r){return function(){var i,o,a={};try{for(var s=e.__values(r),u=s.next();!u.done;u=s.next()){var l=u.value;a[l]=(0,t.getValueByStringPath)(n,l)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");t.getClientStates=s;var u=a((function(e,r,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var l=i(),c=l.logger,p=l.logLevel;if(p&&p<n.LogLevel.Debug||!p||!c)return e.apply(a,s);var h={type:"invoke public method",name:r,args:s,stacktrace:(0,t.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var f=e.apply(a,s);return f&&f.promise?f.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),f}}),"debugWrapper");t.debugWrapper=u})),aM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var e=a((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,t.UUID)}),"UUID");t.UUID=e})),oM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=void 0;var e=(Ya(),zr(Xa)),n=function(){function t(){this.memoryStorage=new Map}return a(t,"MemoryStorage"),t.prototype.isEnabled=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,!0]}))}))},t.prototype.get=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,this.memoryStorage.get(t)]}))}))},t.prototype.getRaw=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.get(t)];case 1:return[2,(n=e.sent())?JSON.stringify(n):void 0]}}))}))},t.prototype.set=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return this.memoryStorage.set(t,n),[2]}))}))},t.prototype.remove=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return this.memoryStorage.delete(t),[2]}))}))},t.prototype.reset=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return this.memoryStorage.clear(),[2]}))}))},t}();t.MemoryStorage=n})),sM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransport=void 0;var e=Mi(),n=function(){function t(){}return a(t,"BaseTransport"),t.prototype.send=function(t,e){return Promise.resolve(null)},t.prototype.buildResponse=function(t){var n,r,i,o,a,s,u,l,c,p,h,f,d,g,y,v,m,_,b,w,x,E;if("object"!=typeof t)return null;var I=t.code||0,S=this.buildStatus(I);switch(S){case e.Status.Success:return{status:S,statusCode:I,body:{eventsIngested:null!==(n=t.events_ingested)&&void 0!==n?n:0,payloadSizeBytes:null!==(r=t.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(i=t.server_upload_time)&&void 0!==i?i:0}};case e.Status.Invalid:return{status:S,statusCode:I,body:{error:null!==(o=t.error)&&void 0!==o?o:"",missingField:null!==(a=t.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=t.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(u=t.events_with_missing_fields)&&void 0!==u?u:{},eventsWithInvalidIdLengths:null!==(l=t.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=t.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(p=t.exceeded_daily_quota_devices)&&void 0!==p?p:{},silencedDevices:null!==(h=t.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(f=t.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(d=t.throttled_devices)&&void 0!==d?d:{},throttledEvents:null!==(g=t.throttled_events)&&void 0!==g?g:[]}};case e.Status.PayloadTooLarge:return{status:S,statusCode:I,body:{error:null!==(y=t.error)&&void 0!==y?y:""}};case e.Status.RateLimit:return{status:S,statusCode:I,body:{error:null!==(v=t.error)&&void 0!==v?v:"",epsThreshold:null!==(m=t.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(_=t.throttled_devices)&&void 0!==_?_:{},throttledUsers:null!==(b=t.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=t.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(x=t.exceeded_daily_quota_users)&&void 0!==x?x:{},throttledEvents:null!==(E=t.throttled_events)&&void 0!==E?E:[]}};case e.Status.Timeout:default:return{status:S,statusCode:I}}},t.prototype.buildStatus=function(t){return t>=200&&t<300?e.Status.Success:429===t?e.Status.RateLimit:413===t?e.Status.PayloadTooLarge:408===t?e.Status.Timeout:t>=400&&t<500?e.Status.Invalid:t>=500?e.Status.Failed:e.Status.Unknown},t}();t.BaseTransport=n})),wo=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.createIdentifyEvent=t.BaseTransport=t.MemoryStorage=t.UUID=t.getClientStates=t.getClientLogConfig=t.debugWrapper=t.returnWrapper=t.AMPLITUDE_PREFIX=t.Logger=t.Config=t.Destination=t.Revenue=t.Identify=t.AmplitudeCore=void 0;var e=Qx();Object.defineProperty(t,"AmplitudeCore",{enumerable:!0,get:function(){return e.AmplitudeCore}});var n=fy();Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return n.Identify}});var r=$x();Object.defineProperty(t,"Revenue",{enumerable:!0,get:function(){return r.Revenue}});var i=tM();Object.defineProperty(t,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=vy();Object.defineProperty(t,"Config",{enumerable:!0,get:function(){return o.Config}});var a=gy();Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=xf();Object.defineProperty(t,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var u=nM();Object.defineProperty(t,"returnWrapper",{enumerable:!0,get:function(){return u.returnWrapper}});var l=iM();Object.defineProperty(t,"debugWrapper",{enumerable:!0,get:function(){return l.debugWrapper}}),Object.defineProperty(t,"getClientLogConfig",{enumerable:!0,get:function(){return l.getClientLogConfig}}),Object.defineProperty(t,"getClientStates",{enumerable:!0,get:function(){return l.getClientStates}});var c=aM();Object.defineProperty(t,"UUID",{enumerable:!0,get:function(){return c.UUID}});var p=oM();Object.defineProperty(t,"MemoryStorage",{enumerable:!0,get:function(){return p.MemoryStorage}});var h=sM();Object.defineProperty(t,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var f=py();Object.defineProperty(t,"createIdentifyEvent",{enumerable:!0,get:function(){return f.createIdentifyEvent}})})),Su={};function VL(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_y(t,e),a(n,"__"),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function XL(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function YL(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function WL(t,e){return function(n,r){e(n,r,t)}}function HL(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function KL(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return a(i,"adopt"),new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function u(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,u)}a(s,"fulfilled"),a(u,"rejected"),a(l,"step"),l((r=r.apply(t,e||[])).next())}))}function JL(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function ZL(t,e){for(var n in t)"default"!==n&&!Object.prototype.hasOwnProperty.call(e,n)&&Ey(e,t,n)}function wy(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uM(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function QL(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(uM(arguments[e]));return t}function $L(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function eR(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function Nf(t){return this instanceof Nf?(this.v=t,this):new Nf(t)}function tR(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{!function(t){t.value instanceof Nf?Promise.resolve(t.value.v).then(u,l):c(o[0][2],t)}(i[t](e))}catch(t){c(o[0][3],t)}}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function rR(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:Nf(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function nR(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof wy?wy(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function iR(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function oR(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&Ey(e,t,n);return aR(e,t),e}function sR(t){return t&&t.__esModule?t:{default:t}}function uR(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function lR(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function cR(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}Md(Su,{__assign:()=>by,__asyncDelegator:()=>rR,__asyncGenerator:()=>tR,__asyncValues:()=>nR,__await:()=>Nf,__awaiter:()=>KL,__classPrivateFieldGet:()=>uR,__classPrivateFieldIn:()=>cR,__classPrivateFieldSet:()=>lR,__createBinding:()=>Ey,__decorate:()=>YL,__exportStar:()=>ZL,__extends:()=>VL,__generator:()=>JL,__importDefault:()=>sR,__importStar:()=>oR,__makeTemplateObject:()=>iR,__metadata:()=>HL,__param:()=>WL,__read:()=>uM,__rest:()=>XL,__spread:()=>QL,__spreadArray:()=>eR,__spreadArrays:()=>$L,__values:()=>wy});var _y,by,Ey,aR,Iu=xd((()=>{m(),_y=a((function(t,e){return(_y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}),"extendStatics"),a(VL,"__extends"),by=a((function(){return by=Object.assign||a((function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}),"__assign"),by.apply(this,arguments)}),"__assign"),a(XL,"__rest"),a(YL,"__decorate"),a(WL,"__param"),a(HL,"__metadata"),a(KL,"__awaiter"),a(JL,"__generator"),Ey=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]},a(ZL,"__exportStar"),a(wy,"__values"),a(uM,"__read"),a(QL,"__spread"),a($L,"__spreadArrays"),a(eR,"__spreadArray"),a(Nf,"__await"),a(tR,"__asyncGenerator"),a(rR,"__asyncDelegator"),a(nR,"__asyncValues"),a(iR,"__makeTemplateObject"),aR=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},a(oR,"__importStar"),a(sR,"__importDefault"),a(uR,"__classPrivateFieldGet"),a(lR,"__classPrivateFieldSet"),a(cR,"__classPrivateFieldIn")})),Yd=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalScope=void 0;var e=a((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope");t.getGlobalScope=e})),xy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.tryDecodeURIComponent=t.getQueryParams=void 0;var e=Yd(),n=a((function(){var n,r=(0,e.getGlobalScope)();return null!==(n=null==r?void 0:r.location)&&void 0!==n&&n.search?r.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,n){var r=n.split("=",2),i=(0,t.tryDecodeURIComponent)(r[0]),o=(0,t.tryDecodeURIComponent)(r[1]);return o&&(e[i]=o),e}),{}):{}}),"getQueryParams");t.getQueryParams=n;var r=a((function(t){void 0===t&&(t="");try{return decodeURIComponent(t)}catch{return""}}),"tryDecodeURIComponent");t.tryDecodeURIComponent=r})),Wd=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.MKTG=t.BASE_CAMPAIGN=t.EMPTY_VALUE=t.WBRAID=t.TWCLID=t.TTCLID=t.MSCLKID=t.KO_CLICK_ID=t.GCLID=t.GBRAID=t.FBCLID=t.DCLID=t.UTM_TERM=t.UTM_SOURCE=t.UTM_MEDIUM=t.UTM_ID=t.UTM_CONTENT=t.UTM_CAMPAIGN=void 0,t.UTM_CAMPAIGN="utm_campaign",t.UTM_CONTENT="utm_content",t.UTM_ID="utm_id",t.UTM_MEDIUM="utm_medium",t.UTM_SOURCE="utm_source",t.UTM_TERM="utm_term",t.DCLID="dclid",t.FBCLID="fbclid",t.GBRAID="gbraid",t.GCLID="gclid",t.KO_CLICK_ID="ko_click_id",t.MSCLKID="msclkid",t.TTCLID="ttclid",t.TWCLID="twclid",t.WBRAID="wbraid",t.EMPTY_VALUE="EMPTY",t.BASE_CAMPAIGN={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},t.MKTG="MKTG"})),My=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignParser=void 0;var e=(Iu(),zr(Su)),n=xy(),r=Wd(),i=function(){function t(){}return a(t,"CampaignParser"),t.prototype.parse=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,e.__assign(e.__assign(e.__assign(e.__assign({},r.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},t.prototype.getUtmParam=function(){var t=(0,n.getQueryParams)();return{utm_campaign:t[r.UTM_CAMPAIGN],utm_content:t[r.UTM_CONTENT],utm_id:t[r.UTM_ID],utm_medium:t[r.UTM_MEDIUM],utm_source:t[r.UTM_SOURCE],utm_term:t[r.UTM_TERM]}},t.prototype.getReferrer=function(){var t,e,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(e=null===(t=n.referrer)||void 0===t?void 0:t.split("/")[2])&&void 0!==e?e:void 0}catch{}return n},t.prototype.getClickIds=function(){var t,e=(0,n.getQueryParams)();return(t={})[r.DCLID]=e[r.DCLID],t[r.FBCLID]=e[r.FBCLID],t[r.GBRAID]=e[r.GBRAID],t[r.GCLID]=e[r.GCLID],t[r.KO_CLICK_ID]=e[r.KO_CLICK_ID],t[r.MSCLKID]=e[r.MSCLKID],t[r.TTCLID]=e[r.TTCLID],t[r.TWCLID]=e[r.TWCLID],t[r.WBRAID]=e[r.WBRAID],t},t}();t.CampaignParser=i})),Kd=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.getOldCookieName=t.getCookieName=void 0;var e=wo(),n=a((function(t,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[e.AMPLITUDE_PREFIX,n,t.substring(0,r)].filter(Boolean).join("_")}),"getCookieName");t.getCookieName=n;var r=a((function(t){return"".concat(e.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(t.substring(0,6))}),"getOldCookieName");t.getOldCookieName=r})),hM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignTracker=void 0;var e=(Iu(),zr(Su)),n=wo(),r=Kd(),i=My(),o=Wd(),s=function(){function t(t,e){var n,a;this.storage=e.storage,this.storageKey=(0,r.getCookieName)(t,o.MKTG),this.parser=new i.CampaignParser,this.track=e.track,this.onNewCampaign=e.onNewCampaign,this.disabled=!!e.disabled,this.trackNewCampaigns=!!e.trackNewCampaigns,this.trackPageViews=!!e.trackPageViews,this.excludeReferrers=null!==(n=e.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=e.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return a(t,"CampaignTracker"),t.prototype.isNewCampaign=function(t,n,r){void 0===r&&(r=!1);t.referrer;var i=t.referring_domain,o=e.__rest(t,["referrer","referring_domain"]),a=n||{},s=(a.referrer,a.referring_domain),l=e.__rest(a,["referrer","referring_domain"]);if(t.referring_domain&&this.excludeReferrers.includes(t.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(l),p=r?u(i||"")!==u(s||""):i!==s;return!n||c||p},t.prototype.saveCampaignToStorage=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.storage.set(this.storageKey,t)];case 1:return e.sent(),[2]}}))}))},t.prototype.getCampaignFromStorage=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,t.sent()]}}))}))},t.prototype.createCampaignEvent=function(t){var r=this,i=e.__assign(e.__assign({},o.BASE_CAMPAIGN),t),a=Object.entries(i).reduce((function(t,n){var i=e.__read(n,2),o=i[0],a=i[1];return t.setOnce("initial_".concat(o),a||r.initialEmptyValue),a?t.set(o,a):t.unset(o)}),new n.Identify),s={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return e.__assign(e.__assign({},(0,n.createIdentifyEvent)(a)),this.trackPageViews&&s)},t.prototype.send=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n,r;return e.__generator(this,(function(e){switch(e.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return n=e.sent(),[4,this.getCampaignFromStorage()];case 2:if(r=e.sent(),!t){if(!this.trackNewCampaigns||!this.isNewCampaign(n,r))return[2];this.onNewCampaign(n)}return[4,this.track(this.createCampaignEvent(n))];case 3:return e.sent(),[4,this.saveCampaignToStorage(n)];case 4:return e.sent(),[2]}}))}))},t}();t.CampaignTracker=s;var u=a((function(t){var e=t.split(".");return e.length<=2?t:e.slice(e.length-2,e.length).join(".")}),"domainWithoutSubdomain")})),dM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var e=(Iu(),zr(Su)),n=Yd(),r=function(){function t(t){this.options=e.__assign({},t)}return a(t,"CookieStorage"),t.prototype.isEnabled=function(){return e.__awaiter(this,void 0,void 0,(function(){var r,i,o;return e.__generator(this,(function(e){switch(e.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=String(Date.now()),i=new t(this.options),o="AMP_TEST",e.label=1;case 1:return e.trys.push([1,4,5,7]),[4,i.set(o,r)];case 2:return e.sent(),[4,i.get(o)];case 3:return[2,e.sent()===r];case 4:return e.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return e.sent(),[7];case 7:return[2]}}))}))},t.prototype.get=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.getRaw(t)];case 1:if(!(n=e.sent()))return[2,void 0];try{try{n=decodeURIComponent(atob(n))}catch{}return[2,JSON.parse(n)]}catch{return[2,void 0]}return[2]}}))}))},t.prototype.getRaw=function(t){var r;return e.__awaiter(this,void 0,void 0,(function(){var i,o,a;return e.__generator(this,(function(e){return i=(0,n.getGlobalScope)(),o=null!==(r=null==i?void 0:i.document.cookie.split("; "))&&void 0!==r?r:[],(a=o.find((function(e){return 0===e.indexOf(t+"=")})))?[2,a.substring(t.length+1)]:[2,void 0]}))}))},t.prototype.set=function(t,r){var i;return e.__awaiter(this,void 0,void 0,(function(){var o,a,s,u,l,c;return e.__generator(this,(function(e){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==r?o:-1)&&((u=new Date).setTime(u.getTime()+24*a*60*60*1e3),s=u),l="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),s&&(l+="; expires=".concat(s.toUTCString())),l+="; path=/",this.options.domain&&(l+="; domain=".concat(this.options.domain)),this.options.secure&&(l+="; Secure"),this.options.sameSite&&(l+="; SameSite=".concat(this.options.sameSite)),(c=(0,n.getGlobalScope)())&&(c.document.cookie=l)}catch{}return[2]}))}))},t.prototype.remove=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.set(t,null)];case 1:return e.sent(),[2]}}))}))},t.prototype.reset=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2]}))}))},t}();t.CookieStorage=r})),gM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.SessionManager=void 0;var e=(Iu(),zr(Su)),n=Kd(),r=function(){function t(t,e){this.storage=t,this.storageKey=(0,n.getCookieName)(e),this.cache={optOut:!1}}return a(t,"SessionManager"),t.prototype.load=function(){var t;return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return n=this,[4,this.storage.get(this.storageKey)];case 1:return n.cache=null!==(t=e.sent())&&void 0!==t?t:{optOut:!1},[2,this]}}))}))},t.prototype.setSession=function(t){this.cache=e.__assign(e.__assign({},this.cache),t),this.storage.set(this.storageKey,this.cache)},t.prototype.getSessionId=function(){return this.cache.sessionId},t.prototype.setSessionId=function(t){this.setSession({sessionId:t})},t.prototype.getDeviceId=function(){return this.cache.deviceId},t.prototype.setDeviceId=function(t){this.setSession({deviceId:t})},t.prototype.getUserId=function(){return this.cache.userId},t.prototype.setUserId=function(t){this.setSession({userId:t})},t.prototype.getLastEventTime=function(){return this.cache.lastEventTime},t.prototype.setLastEventTime=function(t){this.setSession({lastEventTime:t})},t.prototype.getOptOut=function(){return this.cache.optOut},t.prototype.setOptOut=function(t){this.setSession({optOut:t})},t.prototype.getLastEventId=function(){return this.cache.lastEventId},t.prototype.setLastEventId=function(t){this.setSession({lastEventId:t})},t}();t.SessionManager=r})),vM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.FetchTransport=void 0;var e=(Iu(),zr(Su)),n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(n,t),a(n,"FetchTransport"),n.prototype.send=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){var r,i;return e.__generator(this,(function(e){switch(e.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return r={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(t,r)];case 1:return[4,e.sent().json()];case 2:return i=e.sent(),[2,this.buildResponse(i)]}}))}))},n}(wo().BaseTransport);t.FetchTransport=n})),yM=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){var e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return r(null==e&&n.path)}},n.exports),n.exports}function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}a(n,"createCommonjsModule"),a(r,"commonjsRequire");var i=n((function(t,n){!function(e,r){var i="function",o="undefined",s="object",u="string",l="model",c="name",p="type",h="vendor",f="version",d="architecture",g="console",y="mobile",v="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",x="Apple",E="ASUS",I="BlackBerry",S="Browser",C="Chrome",M="Firefox",N="Google",A="Huawei",O="LG",P="Microsoft",L="Motorola",T="Opera",R="Samsung",D="Sony",F="Xiaomi",k="Zebra",B="Facebook",j=a((function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}),"extend"),G=a((function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e}),"enumerize"),q=a((function(t,e){return typeof t===u&&-1!==U(e).indexOf(U(t))}),"has"),U=a((function(t){return t.toLowerCase()}),"lowerize"),V=a((function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),z=a((function(t,e){if(typeof t===u)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e===o?t:t.substring(0,275)}),"trim"),X=a((function(t,e){for(var n,o,a,u,l,c,p=0;p<e.length&&!l;){var h=e[p],f=e[p+1];for(n=o=0;n<h.length&&!l;)if(l=h[n++].exec(t))for(a=0;a<f.length;a++)c=l[++o],typeof(u=f[a])===s&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):r:this[u[0]]=c?u[1].call(this,c,u[2]):r:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):r):this[u]=c||r;p+=2}}),"rgxMapper"),Y=a((function(t,e){for(var n in e)if(typeof e[n]===s&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(q(e[n][i],t))return"?"===n?r:n}else if(q(e[n],t))return"?"===n?r:n;return t}),"strMapper"),W={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,f],[/opios[\/ ]+([\w\.]+)/i],[f,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[f,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],f],[/\bfocus\/([\w\.]+)/i],[f,[c,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[f,[c,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,f],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[f,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[f,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[c,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,U]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[h,R],[p,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,R],[p,y]],[/((ipod|iphone)\d+,\d+)/i],[l,[h,x],[p,y]],[/(ipad\d+,\d+)/i],[l,[h,x],[p,v]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,x],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,x],[p,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,A],[p,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,A],[p,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[h,F],[p,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,F],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[p,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[h,L],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,L],[p,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,O],[p,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,O],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[p,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[p,y]],[/(pixel c)\b/i],[l,[h,N],[p,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,N],[p,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[h,D],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,D],[p,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,w],[p,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,w],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[p,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,I],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,E],[p,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,E],[p,y]],[/(nexus 9)/i],[l,[h,"HTC"],[p,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[p,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[p,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[p,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,"Sharp"],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[p,y]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,l,[p,v]],[/(surface duo)/i],[l,[h,P],[p,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[p,y]],[/(u304aa)/i],[l,[h,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[p,v]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[p,v]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[p,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[p,v]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[p,v]],[/\b(k88) b/i],[l,[h,"ZTE"],[p,v]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[p,v]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[p,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[p,v]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[p,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[p,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[p,y]],[/\b(ph-1) /i],[l,[h,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[p,v]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[p,v]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[p,v]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[p,v]],[/(sprint) (\w+)/i],[h,l,[p,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,P],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,k],[p,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,k],[p,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[p,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[p,g]],[/(playstation [345portablevi]+)/i],[l,[h,D],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,P],[p,g]],[/smart-tv.+(samsung)/i],[h,[p,m]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,R],[p,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,O],[p,m]],[/(apple) ?tv/i],[h,[l,x+" TV"],[p,m]],[/crkey/i],[[l,C+"cast"],[h,N],[p,m]],[/droid.+aft(\w)( bui|\))/i],[l,[h,w],[p,m]],[/\(dtv[\);].+(aquos)/i],[l,[h,"Sharp"],[p,m]],[/(bravia[\w- ]+) bui/i],[l,[h,D],[p,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[l,z],[p,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,m]],[/((pebble))app/i],[h,l,[p,_]],[/droid.+; (glass) \d/i],[l,[h,N],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,k],[p,_]],[/(quest( 2)?)/i],[l,[h,B],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[p,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,v]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[f,Y,W]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[f,Y,W]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[f,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,f],[/\(bb(10);/i],[f,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[c,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[c,C+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,f],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,f]]},J=a((function(t,n){if(typeof t===s&&(n=t,t=r),!(this instanceof J))return new J(t,n).getResult();var i=t||(typeof e!==o&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),a=n?j(H,n):H;return this.getBrowser=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.browser),t.major=V(t.version),t},this.getCPU=function(){var t={};return t[d]=r,X.call(t,i,a.cpu),t},this.getDevice=function(){var t={};return t[h]=r,t[l]=r,t[p]=r,X.call(t,i,a.device),t},this.getEngine=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.engine),t},this.getOS=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(t){return i=typeof t===u&&t.length>275?z(t,275):t,this},this.setUA(i),this}),"UAParser");J.VERSION="0.7.31",J.BROWSER=G([c,f,"major"]),J.CPU=G([d]),J.DEVICE=G([l,h,p,g,y,m,v,_,b]),J.ENGINE=J.OS=G([c,f]),t.exports&&(n=t.exports=J),n.UAParser=J;var K=typeof e!==o&&(e.jQuery||e.Zepto);if(K&&!K.ua){var Z=new J;K.ua=Z.getResult(),K.ua.get=function(){return Z.getUA()},K.ua.set=function(t){Z.setUA(t);var e=Z.getResult();for(var n in e)K.ua[n]=e[n]}}}("object"==typeof window?window:e)})),o=function(){function t(){this.ua=new i.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return a(t,"ApplicationContextProviderImpl"),t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:l(),platform:"Web",os:s(this.ua),deviceModel:u(this.ua)}},t}(),s=a((function(t){var e,n;return[null===(e=t.browser)||void 0===e?void 0:e.name,null===(n=t.browser)||void 0===n?void 0:n.major].filter((function(t){return null!=t})).join(" ")}),"getOs"),u=a((function(t){var e;return null===(e=t.os)||void 0===e?void 0:e.name}),"getDeviceModel"),l=a((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=function(){function t(){this.queue=[]}return a(t,"EventBridgeImpl"),t.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},t.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach((function(e){t(e)})),this.queue=[])},t}(),p=a((function(){return p=Object.assign||a((function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}),"__assign"),p.apply(this,arguments)}),"__assign"),h=a((function(t,e){var n=typeof t;if(n!==typeof e)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++)if(i[r]===n)return t===e;if(null==t&&null==e)return!0;if(null==t||null==e||t.length!==e.length)return!1;var o=Array.isArray(t),a=Array.isArray(e);if(o!==a)return!1;if(!o||!a){var s=Object.keys(t).sort(),u=Object.keys(e).sort();if(!h(s,u))return!1;var l=!0;return Object.keys(t).forEach((function(n){h(t[n],e[n])||(l=!1)})),l}for(var c=0;c<t.length;c++)if(!h(t[c],e[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r});var f=function(){function t(){this.identity={userProperties:{}},this.listeners=new Set}return a(t,"IdentityStoreImpl"),t.prototype.editIdentity=function(){var t=this,e=p({},this.identity.userProperties),n=p(p({},this.identity),{userProperties:e});return{setUserId:function(t){return n.userId=t,this},setDeviceId:function(t){return n.deviceId=t,this},setUserProperties:function(t){return n.userProperties=t,this},updateUserProperties:function(t){for(var e=n.userProperties||{},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],s=o[1];switch(a){case"$set":for(var u=0,l=Object.entries(s);u<l.length;u++){var c=l[u],p=c[0],h=c[1];e[p]=h}break;case"$unset":for(var f=0,d=Object.keys(s);f<d.length;f++)delete e[p=d[f]];break;case"$clearAll":e={}}}return n.userProperties=e,this},commit:function(){return t.setIdentity(n),this}}},t.prototype.getIdentity=function(){return p({},this.identity)},t.prototype.setIdentity=function(t){var e=p({},this.identity);this.identity=p({},t),h(e,this.identity)||this.listeners.forEach((function(e){e(t)}))},t.prototype.addIdentityListener=function(t){this.listeners.add(t)},t.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},t}(),d=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,g=function(){function t(){this.identityStore=new f,this.eventBridge=new c,this.applicationContextProvider=new o}return a(t,"AnalyticsConnector"),t.getInstance=function(e){return d.analyticsConnectorInstances||(d.analyticsConnectorInstances={}),d.analyticsConnectorInstances[e]||(d.analyticsConnectorInstances[e]=new t),d.analyticsConnectorInstances[e]},t}();t.AnalyticsConnector=g,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).Experiment={})})),Cy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.getAnalyticsConnector=void 0;var e=yM(),n=a((function(){return e.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");t.getAnalyticsConnector=n})),bM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityEventSender=void 0;var e=(Iu(),zr(Su)),n=Mi(),r=Cy(),i=function(){function t(){this.name="identity",this.type=n.PluginType.BEFORE,this.identityStore=(0,r.getAnalyticsConnector)().identityStore}return a(t,"IdentityEventSender"),t.prototype.execute=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){return(n=t.user_properties)&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,t]}))}))},t.prototype.setup=function(t){return Promise.resolve(void 0)},t}();t.IdentityEventSender=i})),wM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguage=void 0;var e=a((function(){var t,e,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(e=null===(t=navigator.languages)||void 0===t?void 0:t[0])&&void 0!==e?e:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");t.getLanguage=e})),Pu=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalScope=t.BASE_CAMPAIGN=t.getLanguage=t.IdentityEventSender=t.getAnalyticsConnector=t.FetchTransport=t.SessionManager=t.CookieStorage=t.getOldCookieName=t.getCookieName=t.getQueryParams=t.CampaignTracker=t.CampaignParser=void 0;var e=My();Object.defineProperty(t,"CampaignParser",{enumerable:!0,get:function(){return e.CampaignParser}});var n=hM();Object.defineProperty(t,"CampaignTracker",{enumerable:!0,get:function(){return n.CampaignTracker}});var r=xy();Object.defineProperty(t,"getQueryParams",{enumerable:!0,get:function(){return r.getQueryParams}});var i=Kd();Object.defineProperty(t,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(t,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=dM();Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=gM();Object.defineProperty(t,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=vM();Object.defineProperty(t,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var u=Cy();Object.defineProperty(t,"getAnalyticsConnector",{enumerable:!0,get:function(){return u.getAnalyticsConnector}});var l=bM();Object.defineProperty(t,"IdentityEventSender",{enumerable:!0,get:function(){return l.IdentityEventSender}});var c=wM();Object.defineProperty(t,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var p=Wd();Object.defineProperty(t,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return p.BASE_CAMPAIGN}});var h=Yd();Object.defineProperty(t,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),ky=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.isInstanceProxy=t.convertProxyObjectToRealObject=t.runQueuedFunctions=void 0;var e=a((function(e,n){(0,t.convertProxyObjectToRealObject)(e,n)}),"runQueuedFunctions");t.runQueuedFunctions=e;var n=a((function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=r.name,o=r.args,a=r.resolve,s=t&&t[i];if("function"==typeof s){var u=s.apply(t,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return t}),"convertProxyObjectToRealObject");t.convertProxyObjectToRealObject=n;var r=a((function(t){return t&&void 0!==t._q}),"isInstanceProxy");t.isInstanceProxy=r})),xM=Oe(((t,e)=>{m(),function(n,r){var i="function",o="undefined",s="object",u="string",l="model",c="name",p="type",h="vendor",f="version",d="architecture",g="console",y="mobile",v="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",x="Apple",E="ASUS",I="BlackBerry",S="Browser",C="Chrome",M="Firefox",N="Google",A="Huawei",O="LG",P="Microsoft",L="Motorola",T="Opera",R="Samsung",D="Sony",F="Xiaomi",k="Zebra",B="Facebook",j=a((function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}),"extend"),G=a((function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e}),"enumerize"),q=a((function(t,e){return typeof t===u&&-1!==U(e).indexOf(U(t))}),"has"),U=a((function(t){return t.toLowerCase()}),"lowerize"),V=a((function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),z=a((function(t,e){if(typeof t===u)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e===o?t:t.substring(0,275)}),"trim"),X=a((function(t,e){for(var n,o,a,u,l,c,p=0;p<e.length&&!l;){var h=e[p],f=e[p+1];for(n=o=0;n<h.length&&!l;)if(l=h[n++].exec(t))for(a=0;a<f.length;a++)c=l[++o],typeof(u=f[a])===s&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):r:this[u[0]]=c?u[1].call(this,c,u[2]):r:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):r):this[u]=c||r;p+=2}}),"rgxMapper"),Y=a((function(t,e){for(var n in e)if(typeof e[n]===s&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(q(e[n][i],t))return"?"===n?r:n}else if(q(e[n],t))return"?"===n?r:n;return t}),"strMapper"),W={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,f],[/opios[\/ ]+([\w\.]+)/i],[f,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[f,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],f],[/\bfocus\/([\w\.]+)/i],[f,[c,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[f,[c,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,f],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[f,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[f,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[c,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,U]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[h,R],[p,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,R],[p,y]],[/((ipod|iphone)\d+,\d+)/i],[l,[h,x],[p,y]],[/(ipad\d+,\d+)/i],[l,[h,x],[p,v]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,x],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,x],[p,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,A],[p,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,A],[p,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[h,F],[p,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,F],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[p,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[h,L],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,L],[p,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,O],[p,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,O],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[p,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[p,y]],[/(pixel c)\b/i],[l,[h,N],[p,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,N],[p,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[h,D],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,D],[p,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,w],[p,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,w],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[p,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,I],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,E],[p,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,E],[p,y]],[/(nexus 9)/i],[l,[h,"HTC"],[p,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[p,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[p,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[p,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,"Sharp"],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[p,y]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,l,[p,v]],[/(surface duo)/i],[l,[h,P],[p,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[p,y]],[/(u304aa)/i],[l,[h,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[p,v]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[p,v]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[p,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[p,v]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[p,v]],[/\b(k88) b/i],[l,[h,"ZTE"],[p,v]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[p,v]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[p,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[p,v]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[p,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[p,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[p,y]],[/\b(ph-1) /i],[l,[h,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[p,v]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[p,v]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[p,v]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[p,v]],[/(sprint) (\w+)/i],[h,l,[p,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,P],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,k],[p,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,k],[p,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[p,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[p,g]],[/(playstation [345portablevi]+)/i],[l,[h,D],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,P],[p,g]],[/smart-tv.+(samsung)/i],[h,[p,m]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,R],[p,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,O],[p,m]],[/(apple) ?tv/i],[h,[l,x+" TV"],[p,m]],[/crkey/i],[[l,C+"cast"],[h,N],[p,m]],[/droid.+aft(\w)( bui|\))/i],[l,[h,w],[p,m]],[/\(dtv[\);].+(aquos)/i],[l,[h,"Sharp"],[p,m]],[/(bravia[\w- ]+) bui/i],[l,[h,D],[p,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[l,z],[p,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,m]],[/((pebble))app/i],[h,l,[p,_]],[/droid.+; (glass) \d/i],[l,[h,N],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,k],[p,_]],[/(quest( 2)?)/i],[l,[h,B],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[p,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,v]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[f,Y,W]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[f,Y,W]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[f,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,f],[/\(bb(10);/i],[f,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[c,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[c,C+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,f],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,f]]},J=a((function(t,e){if(typeof t===s&&(e=t,t=r),!(this instanceof J))return new J(t,e).getResult();var i=t||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),a=e?j(H,e):H;return this.getBrowser=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.browser),t.major=V(t.version),t},this.getCPU=function(){var t={};return t[d]=r,X.call(t,i,a.cpu),t},this.getDevice=function(){var t={};return t[h]=r,t[l]=r,t[p]=r,X.call(t,i,a.device),t},this.getEngine=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.engine),t},this.getOS=function(){var t={};return t[c]=r,t[f]=r,X.call(t,i,a.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(t){return i=typeof t===u&&t.length>275?z(t,275):t,this},this.setUA(i),this}),"UAParser");J.VERSION="0.7.31",J.BROWSER=G([c,f,"major"]),J.CPU=G([d]),J.DEVICE=G([l,h,p,g,y,m,v,_,b]),J.ENGINE=J.OS=G([c,f]),typeof t!==o?(typeof e!==o&&e.exports&&(t=e.exports=J),t.UAParser=J):typeof define===i&&define.amd?define((function(){return J})):typeof n!==o&&(n.UAParser=J);var K=typeof n!==o&&(n.jQuery||n.Zepto);if(K&&!K.ua){var Z=new J;K.ua=Z.getResult(),K.ua.get=function(){return Z.getUA()},K.ua.set=function(t){Z.setUA(t);var e=Z.getResult();for(var n in e)K.ua[n]=e[n]}}}("object"==typeof window?window:t)})),MM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="1.6.8"})),SM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;var e=(is(),zr(ns)),n=Mi(),r=e.__importDefault(xM()),i=wo(),o=Pu(),s=MM(),u=function(){function t(){var t;this.name="context",this.type=n.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(s.VERSION),typeof navigator<"u"&&(t=navigator.userAgent),this.uaResult=new r.default(t).getResult()}return a(t,"Context"),t.prototype.setup=function(t){return this.config=t,Promise.resolve(void 0)},t.prototype.execute=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n,r,a,s,u;return e.__generator(this,(function(l){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),n=(new Date).getTime(),r=this.uaResult.browser.name,a=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,u=this.uaResult.device.vendor,[2,e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign(e.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:r}),this.config.trackingOptions.osVersion&&{os_version:a}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:u}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,o.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),t),{event_id:this.eventId++,library:this.library})]}))}))},t.prototype.isSessionValid=function(){var t=this.config.lastEventTime||Date.now();return Date.now()-t<this.config.sessionTimeout},t}();t.Context=u})),Oy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorage=void 0;var e=(is(),zr(ns)),n=Pu(),r=function(){function t(){}return a(t,"LocalStorage"),t.prototype.isEnabled=function(){return e.__awaiter(this,void 0,void 0,(function(){var r,i,o;return e.__generator(this,(function(e){switch(e.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=String(Date.now()),i=new t,o="AMP_TEST",e.label=1;case 1:return e.trys.push([1,4,5,7]),[4,i.set(o,r)];case 2:return e.sent(),[4,i.get(o)];case 3:return[2,e.sent()===r];case 4:return e.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return e.sent(),[7];case 7:return[2]}}))}))},t.prototype.get=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getRaw(t)];case 1:return(n=e.sent())?[2,JSON.parse(n)]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}}))}))},t.prototype.getRaw=function(t){var r;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,(null===(r=(0,n.getGlobalScope)())||void 0===r?void 0:r.localStorage.getItem(t))||void 0]}))}))},t.prototype.set=function(t,r){var i;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){try{null===(i=(0,n.getGlobalScope)())||void 0===i||i.localStorage.setItem(t,JSON.stringify(r))}catch{}return[2]}))}))},t.prototype.remove=function(t){var r;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){try{null===(r=(0,n.getGlobalScope)())||void 0===r||r.localStorage.removeItem(t)}catch{}return[2]}))}))},t.prototype.reset=function(){var t;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){try{null===(t=(0,n.getGlobalScope)())||void 0===t||t.localStorage.clear()}catch{}return[2]}))}))},t}();t.LocalStorage=r})),IM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.XHRTransport=void 0;var e=(is(),zr(ns)),n=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={done:4},e}return e.__extends(n,t),a(n,"XHRTransport"),n.prototype.send=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){var r=this;return e.__generator(this,(function(e){return[2,new Promise((function(e,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",t,!0),o.onreadystatechange=function(){if(o.readyState===r.state.done)try{var t=o.responseText,n=JSON.parse(t),a=r.buildResponse(n);e(a)}catch(t){i(t)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(n))}))]}))}))},n}(wo().BaseTransport);t.XHRTransport=n})),PM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.SendBeaconTransport=void 0;var e=(is(),zr(ns)),n=Pu(),r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),a(r,"SendBeaconTransport"),r.prototype.send=function(t,r){return e.__awaiter(this,void 0,void 0,(function(){var i=this;return e.__generator(this,(function(e){return[2,new Promise((function(e,o){var a=(0,n.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(r);return e(a.navigator.sendBeacon(t,JSON.stringify(r))?i.buildResponse({code:200,events_ingested:r.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(t){o(t)}}))]}))}))},r}(wo().BaseTransport);t.SendBeaconTransport=r})),OM=Oe((t=>{m();var e=t;Object.defineProperty(t,"__esModule",{value:!0}),t.getTopLevelDomain=t.createTransport=t.createDeviceId=t.createEventsStorage=t.createFlexibleStorage=t.createCookieStorage=t.useBrowserConfig=t.BrowserConfig=t.getDefaultConfig=void 0;var n=(is(),zr(ns)),r=Mi(),i=wo(),o=Pu(),s=Oy(),u=IM(),l=PM(),c=a((function(){var t=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:t,disableCookies:!1,domain:"",sessionManager:new o.SessionManager(t,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new o.FetchTransport}}),"getDefaultConfig");t.getDefaultConfig=c;var p=function(e){function r(r,i,o){var a,s,u,l,c,p,h,f,d,g,y,v,m=this,_=(0,t.getDefaultConfig)();return(m=e.call(this,n.__assign(n.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:r,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:_.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:_.transportProvider}))||this).cookieStorage=null!==(u=null==o?void 0:o.cookieStorage)&&void 0!==u?u:_.cookieStorage,m.sessionManager=null!==(l=null==o?void 0:o.sessionManager)&&void 0!==l?l:_.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:_.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(p=null==o?void 0:o.cookieExpiration)&&void 0!==p?p:_.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:_.cookieSameSite,m.cookieSecure=null!==(f=null==o?void 0:o.cookieSecure)&&void 0!==f?f:_.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(d=null==o?void 0:o.disableCookies)&&void 0!==d?d:_.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:_.domain,m.lastEventTime=null!==(y=m.lastEventTime)&&void 0!==y?y:null==o?void 0:o.lastEventTime,m.optOut=!(null==o||!o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(v=null==o?void 0:o.trackingOptions)&&void 0!==v?v:_.trackingOptions,m.userId=i,m}return n.__extends(r,e),a(r,"BrowserConfig"),Object.defineProperty(r.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(t){this.sessionManager.setDeviceId(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(t){this.sessionManager.setUserId(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(t){this.sessionManager.setSessionId(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(t){var e;null===(e=this.sessionManager)||void 0===e||e.setOptOut(!!t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(t){this.sessionManager.setLastEventTime(t)},enumerable:!1,configurable:!0}),r}(i.Config);t.BrowserConfig=p;var h=a((function(r,i,a){return n.__awaiter(e,void 0,void 0,(function(){var e,s,u,l,c,h,f,d,g,y,v,m,_,b,w,x,E;return n.__generator(this,(function(I){switch(I.label){case 0:return e=(0,t.getDefaultConfig)(),null!==(_=null==a?void 0:a.domain)&&void 0!==_?(u=_,[3,3]):[3,1];case 1:return[4,(0,t.getTopLevelDomain)()];case 2:u=I.sent(),I.label=3;case 3:return s=u,[4,(0,t.createCookieStorage)(n.__assign(n.__assign({},a),{domain:s}))];case 4:return l=I.sent(),c=(0,o.getCookieName)(r),[4,l.get(c)];case 5:return h=I.sent(),f=(0,o.getQueryParams)(),[4,new o.SessionManager(l,r).load()];case 6:return d=I.sent(),g=p.bind,y=[void 0,r,null!=i?i:null==h?void 0:h.userId],v=[n.__assign({},a)],m={cookieStorage:l,sessionManager:d,deviceId:(0,t.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,f.deviceId),domain:s,optOut:null!==(b=null==a?void 0:a.optOut)&&void 0!==b?b:!(null==h||!h.optOut)},[4,l.get(c)];case 7:return m.sessionId=null!==(x=null===(w=I.sent())||void 0===w?void 0:w.sessionId)&&void 0!==x?x:null==a?void 0:a.sessionId,[4,(0,t.createEventsStorage)(a)];case 8:return[2,new(g.apply(p,y.concat([n.__assign.apply(void 0,v.concat([(m.storageProvider=I.sent(),m.trackingOptions=n.__assign(n.__assign({},e.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(E=null==a?void 0:a.transportProvider)&&void 0!==E?E:(0,t.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");t.useBrowserConfig=h;var f=a((function(r,i){return void 0===i&&(i=(0,t.getDefaultConfig)()),n.__awaiter(e,void 0,void 0,(function(){var e,o,a;return n.__generator(this,(function(s){switch(s.label){case 0:return e=n.__assign(n.__assign({},i),r),o=null==r?void 0:r.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,t.createFlexibleStorage)(e)]:[2,o]}}))}))}),"createCookieStorage");t.createCookieStorage=f;var d=a((function(t){return n.__awaiter(e,void 0,void 0,(function(){var e,r;return n.__generator(this,(function(n){switch(n.label){case 0:return e=new o.CookieStorage({domain:t.domain,expirationDays:t.cookieExpiration,sameSite:t.cookieSameSite,secure:t.cookieSecure}),(r=t.disableCookies)?[3,2]:[4,e.isEnabled()];case 1:r=!n.sent(),n.label=2;case 2:return r?[4,(e=new s.LocalStorage).isEnabled()]:[3,4];case 3:n.sent()||(e=new i.MemoryStorage),n.label=4;case 4:return[2,e]}}))}))}),"createFlexibleStorage");t.createFlexibleStorage=d;var g=a((function(t){return n.__awaiter(e,void 0,void 0,(function(){var e,r,i,o,a,u,l;return n.__generator(this,(function(c){switch(c.label){case 0:if(t&&Object.prototype.hasOwnProperty.call(t,"storageProvider")&&!t.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),e=n.__values([null==t?void 0:t.storageProvider,new s.LocalStorage]),r=e.next(),c.label=2;case 2:return r.done?[3,6]:(i=r.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return r=e.next(),[3,2];case 6:return[3,9];case 7:return a=c.sent(),u={error:a},[3,9];case 8:try{r&&!r.done&&(l=e.return)&&l.call(e)}finally{if(u)throw u.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");t.createEventsStorage=g;var y=a((function(t,e,n){return e||n||t||(0,i.UUID)()}),"createDeviceId");t.createDeviceId=y;var v=a((function(e){return e===r.TransportType.XHR?new u.XHRTransport:e===r.TransportType.SendBeacon?new l.SendBeaconTransport:(0,t.getDefaultConfig)().transportProvider}),"createTransport");t.createTransport=v;var _=a((function(t){return n.__awaiter(e,void 0,void 0,(function(){var e,r,i,a,s,u,l,c;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!n.sent()||!t&&typeof location>"u")return[2,""];for(e=null!=t?t:location.hostname,r=e.split("."),i=[],a="AMP_TLDTEST",s=r.length-2;s>=0;--s)i.push(r.slice(s).join("."));s=0,n.label=2;case 2:return s<i.length?(u=i[s],l={domain:"."+u},[4,(c=new o.CookieStorage(l)).set(a,1)]):[3,7];case 3:return n.sent(),[4,c.get(a)];case 4:return n.sent()?[4,c.remove(a)]:[3,6];case 5:return n.sent(),[2,"."+u];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");t.getTopLevelDomain=_})),TM=Oe((t=>{m();var e=t;Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.parseTime=t.parseOldCookies=void 0;var n=(is(),zr(ns)),r=Pu(),i=Oy(),o=a((function(o,a){return n.__awaiter(e,void 0,void 0,(function(){var e,s,u,l,c,p,h,f,d;return n.__generator(this,(function(g){switch(g.label){case 0:return[4,(e=new r.CookieStorage).isEnabled()];case 1:return(!g.sent()||null!=a&&a.disableCookies)&&(e=new i.LocalStorage),[4,e.isEnabled()];case 2:return g.sent()?(s=(0,r.getOldCookieName)(o),[4,e.getRaw(s)]):[2,{optOut:!1}];case 3:return(u=g.sent())?[4,e.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),l=n.__read(u.split("."),5),c=l[0],p=l[1],h=l[2],f=l[3],d=l[4],[2,{deviceId:c,userId:(0,t.decode)(p),sessionId:(0,t.parseTime)(f),lastEventTime:(0,t.parseTime)(d),optOut:!!h}]}}))}))}),"parseOldCookies");t.parseOldCookies=o;var s=a((function(t){var e=parseInt(t,32);if(!isNaN(e))return e}),"parseTime");t.parseTime=s;var u=a((function(t){if(atob&&escape&&t)try{return decodeURIComponent(escape(atob(t)))}catch{return}}),"decode");t.decode=u})),Fy=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.createInstance=t.AmplitudeBrowser=void 0;var e=(is(),zr(ns)),n=wo(),r=Pu(),i=ky(),o=SM(),s=OM(),u=TM(),l=function(t){function l(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(l,t),a(l,"AmplitudeBrowser"),l.prototype.init=function(i,a,l){var c,p,h;return void 0===i&&(i=""),e.__awaiter(this,void 0,void 0,(function(){var f,d,g,y,v=this;return e.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,u.parseOldCookies)(i,l)]);case 1:return f=m.sent(),[4,(0,s.useBrowserConfig)(i,a||f.userId,e.__assign(e.__assign({},l),{deviceId:null!==(c=f.deviceId)&&void 0!==c?c:null==l?void 0:l.deviceId,sessionId:null!==(p=f.sessionId)&&void 0!==p?p:null==l?void 0:l.sessionId,optOut:null!==(h=null==l?void 0:l.optOut)&&void 0!==h?h:f.optOut,lastEventTime:f.lastEventTime}))];case 2:return d=m.sent(),[4,t.prototype._init.call(this,d)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(y=(0,r.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(t){v.track(t.eventType,t.eventProperties)})),y.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new o.Context)];case 4:return m.sent(),[4,this.add(new r.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new n.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(d.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},l.prototype.runAttributionStrategy=function(t,n){return void 0===n&&(n=!1),e.__awaiter(this,void 0,void 0,(function(){var i,o,a;return e.__generator(this,(function(u){switch(u.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,s.createFlexibleStorage)(this.config)];case 1:return a=u.sent(),[4,new r.CampaignTracker(this.config.apiKey,e.__assign(e.__assign({},t),{storage:a,track:i,onNewCampaign:o})).send(n)];case 2:return u.sent(),[2]}}))}))},l.prototype.getUserId=function(){var t;return null===(t=this.config)||void 0===t?void 0:t.userId},l.prototype.setUserId=function(t){this.config?this.config.userId=t:this.q.push(this.setUserId.bind(this,t))},l.prototype.getDeviceId=function(){var t;return null===(t=this.config)||void 0===t?void 0:t.deviceId},l.prototype.setDeviceId=function(t){this.config?this.config.deviceId=t:this.q.push(this.setDeviceId.bind(this,t))},l.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,n.UUID)())},l.prototype.getSessionId=function(){var t;return null===(t=this.config)||void 0===t?void 0:t.sessionId},l.prototype.setSessionId=function(t){this.config?(this.config.sessionId=t,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,t))},l.prototype.setTransport=function(t){this.config?this.config.transportProvider=(0,s.createTransport)(t):this.q.push(this.setTransport.bind(this,t))},l.prototype.identify=function(e,r){if((0,i.isInstanceProxy)(e)){var o=e._q;e._q=[],e=(0,i.convertProxyObjectToRealObject)(new n.Identify,o)}return null!=r&&r.user_id&&this.setUserId(r.user_id),null!=r&&r.device_id&&this.setDeviceId(r.device_id),t.prototype.identify.call(this,e,r)},l.prototype.groupIdentify=function(e,r,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new n.Identify,s)}return t.prototype.groupIdentify.call(this,e,r,o,a)},l.prototype.revenue=function(e,r){if((0,i.isInstanceProxy)(e)){var o=e._q;e._q=[],e=(0,i.convertProxyObjectToRealObject)(new n.Revenue,o)}return t.prototype.revenue.call(this,e,r)},l}(n.AmplitudeCore);t.AmplitudeBrowser=l;var c=a((function(){var t=new l;return{init:(0,n.debugWrapper)((0,n.returnWrapper)(t.init.bind(t)),"init",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config"])),add:(0,n.debugWrapper)((0,n.returnWrapper)(t.add.bind(t)),"add",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.plugins"])),remove:(0,n.debugWrapper)((0,n.returnWrapper)(t.remove.bind(t)),"remove",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.plugins"])),track:(0,n.debugWrapper)((0,n.returnWrapper)(t.track.bind(t)),"track",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),logEvent:(0,n.debugWrapper)((0,n.returnWrapper)(t.logEvent.bind(t)),"logEvent",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),identify:(0,n.debugWrapper)((0,n.returnWrapper)(t.identify.bind(t)),"identify",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,n.debugWrapper)((0,n.returnWrapper)(t.groupIdentify.bind(t)),"groupIdentify",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),setGroup:(0,n.debugWrapper)((0,n.returnWrapper)(t.setGroup.bind(t)),"setGroup",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),revenue:(0,n.debugWrapper)((0,n.returnWrapper)(t.revenue.bind(t)),"revenue",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),flush:(0,n.debugWrapper)((0,n.returnWrapper)(t.flush.bind(t)),"flush",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config.apiKey","timeline.queue.length"])),getUserId:(0,n.debugWrapper)(t.getUserId.bind(t),"getUserId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config","config.userId"])),setUserId:(0,n.debugWrapper)(t.setUserId.bind(t),"setUserId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config","config.userId"])),getDeviceId:(0,n.debugWrapper)(t.getDeviceId.bind(t),"getDeviceId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config","config.deviceId"])),setDeviceId:(0,n.debugWrapper)(t.setDeviceId.bind(t),"setDeviceId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config","config.deviceId"])),reset:(0,n.debugWrapper)(t.reset.bind(t),"reset",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config","config.userId","config.deviceId"])),getSessionId:(0,n.debugWrapper)(t.getSessionId.bind(t),"getSessionId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config"])),setSessionId:(0,n.debugWrapper)(t.setSessionId.bind(t),"setSessionId",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config"])),setOptOut:(0,n.debugWrapper)(t.setOptOut.bind(t),"setOptOut",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config"])),setTransport:(0,n.debugWrapper)(t.setTransport.bind(t),"setTransport",(0,n.getClientLogConfig)(t),(0,n.getClientStates)(t,["config"]))}}),"createInstance");t.createInstance=c,t.default=(0,t.createInstance)()})),DM=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),t.Types=t.Identify=t.Revenue=t.runQueuedFunctions=t.track=t.setUserId=t.setTransport=t.setSessionId=t.setOptOut=t.setGroup=t.setDeviceId=t.revenue=t.reset=t.remove=t.logEvent=t.init=t.identify=t.groupIdentify=t.getUserId=t.getSessionId=t.getDeviceId=t.flush=t.add=t.createInstance=void 0;var e=(is(),zr(ns)),n=e.__importDefault(Fy()),r=Fy();Object.defineProperty(t,"createInstance",{enumerable:!0,get:function(){return r.createInstance}}),t.add=n.default.add,t.flush=n.default.flush,t.getDeviceId=n.default.getDeviceId,t.getSessionId=n.default.getSessionId,t.getUserId=n.default.getUserId,t.groupIdentify=n.default.groupIdentify,t.identify=n.default.identify,t.init=n.default.init,t.logEvent=n.default.logEvent,t.remove=n.default.remove,t.reset=n.default.reset,t.revenue=n.default.revenue,t.setDeviceId=n.default.setDeviceId,t.setGroup=n.default.setGroup,t.setOptOut=n.default.setOptOut,t.setSessionId=n.default.setSessionId,t.setTransport=n.default.setTransport,t.setUserId=n.default.setUserId,t.track=n.default.track;var i=ky();Object.defineProperty(t,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=wo();Object.defineProperty(t,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}}),t.Types=e.__importStar(Mi())})),mS=Oe(((t,e)=>{m();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",s="[object Boolean]",u="[object Date]",l="[object Error]",c="[object Function]",p="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",g="[object RegExp]",y="[object Set]",v="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[i]=I[o]=I[b]=I[s]=I[w]=I[u]=I[l]=I[c]=I[p]=I[h]=I[f]=I[g]=I[y]=I[v]=I[_]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,C="object"==typeof self&&self&&self.Object===Object&&self,M=S||C||Function("return this")(),N="object"==typeof t&&t&&!t.nodeType&&t,A=N&&"object"==typeof e&&e&&!e.nodeType&&e,O=A&&A.exports===N,P=O&&S.process,L=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),T=L&&L.isTypedArray;function R(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function D(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function F(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function k(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function B(t){return function(e){return t(e)}}function j(t,e){return t.has(e)}function G(t,e){return null==t?void 0:t[e]}function q(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function U(t,e){return function(n){return t(e(n))}}function V(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}a(R,"arrayFilter"),a(D,"arrayPush"),a(F,"arraySome"),a(k,"baseTimes"),a(B,"baseUnary"),a(j,"cacheHas"),a(G,"getValue"),a(q,"mapToArray"),a(U,"overArg"),a(V,"setToArray");var z,X=Array.prototype,Y=Function.prototype,W=Object.prototype,H=M["__core-js_shared__"],J=Y.toString,K=W.hasOwnProperty,Z=(z=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",$=W.toString,Q=RegExp("^"+J.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tt=O?M.Buffer:void 0,et=M.Symbol,nt=M.Uint8Array,rt=W.propertyIsEnumerable,it=X.splice,ot=et?et.toStringTag:void 0,at=Object.getOwnPropertySymbols,st=tt?tt.isBuffer:void 0,ut=U(Object.keys,Object),lt=ce(M,"DataView"),ct=ce(M,"Map"),pt=ce(M,"Promise"),ht=ce(M,"Set"),ft=ce(M,"WeakMap"),dt=ce(Object,"create"),gt=_e(lt),yt=_e(ct),vt=_e(pt),mt=_e(ht),_t=_e(ft),bt=et?et.prototype:void 0,wt=bt?bt.valueOf:void 0;function xt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Et(){this.__data__=dt?dt(null):{},this.size=0}function It(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function St(t){var e=this.__data__;if(dt){var r=e[t];return r===n?void 0:r}return K.call(e,t)?e[t]:void 0}function Ct(t){var e=this.__data__;return dt?void 0!==e[t]:K.call(e,t)}function Mt(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dt&&void 0===e?n:e,this}function Nt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function At(){this.__data__=[],this.size=0}function Ot(t){var e=this.__data__,n=Kt(e,t);return!(n<0)&&(n==e.length-1?e.pop():it.call(e,n,1),--this.size,!0)}function Pt(t){var e=this.__data__,n=Kt(e,t);return n<0?void 0:e[n][1]}function Lt(t){return Kt(this.__data__,t)>-1}function Tt(t,e){var n=this.__data__,r=Kt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Dt(){this.size=0,this.__data__={hash:new xt,map:new(ct||Nt),string:new xt}}function Ft(t){var e=le(this,t).delete(t);return this.size-=e?1:0,e}function kt(t){return le(this,t).get(t)}function Bt(t){return le(this,t).has(t)}function jt(t,e){var n=le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Gt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Rt;++e<n;)this.add(t[e])}function qt(t){return this.__data__.set(t,n),this}function Ut(t){return this.__data__.has(t)}function Vt(t){var e=this.__data__=new Nt(t);this.size=e.size}function zt(){this.__data__=new Nt,this.size=0}function Xt(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Yt(t){return this.__data__.get(t)}function Wt(t){return this.__data__.has(t)}function Ht(t,e){var n=this.__data__;if(n instanceof Nt){var r=n.__data__;if(!ct||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Rt(r)}return n.set(t,e),this.size=n.size,this}function Jt(t,e){var n=xe(t),r=!n&&we(t),i=!n&&!r&&Ie(t),o=!n&&!r&&!i&&Oe(t),a=n||r||i||o,s=a?k(t.length,String):[],u=s.length;for(var l in t)(e||K.call(t,l))&&(!a||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||de(l,u)))&&s.push(l);return s}function Kt(t,e){for(var n=t.length;n--;)if(be(t[n][0],e))return n;return-1}function Zt(t,e,n){var r=e(t);return xe(t)?r:D(r,n(t))}function $t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ot&&ot in Object(t)?pe(t):me(t)}function Qt(t){return Ae(t)&&$t(t)==i}function te(t,e,n,r,i){return t===e||(null==t||null==e||!Ae(t)&&!Ae(e)?t!=t&&e!=e:ee(t,e,n,r,te,i))}function ee(t,e,n,r,a,s){var u=xe(t),l=xe(e),c=u?o:fe(t),p=l?o:fe(e),h=(c=c==i?f:c)==f,d=(p=p==i?f:p)==f,g=c==p;if(g&&Ie(t)){if(!Ie(e))return!1;u=!0,h=!1}if(g&&!h)return s||(s=new Vt),u||Oe(t)?oe(t,e,n,r,a,s):ae(t,e,c,n,r,a,s);if(!(1&n)){var y=h&&K.call(t,"__wrapped__"),v=d&&K.call(e,"__wrapped__");if(y||v){var m=y?t.value():t,_=v?e.value():e;return s||(s=new Vt),a(m,_,n,r,s)}}return!!g&&(s||(s=new Vt),se(t,e,n,r,a,s))}function ne(t){return!(!Ne(t)||ye(t))&&(Ce(t)?Q:x).test(_e(t))}function re(t){return Ae(t)&&Me(t.length)&&!!I[$t(t)]}function ie(t){if(!ve(t))return ut(t);var e=[];for(var n in Object(t))K.call(t,n)&&"constructor"!=n&&e.push(n);return e}function oe(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,p=!0,h=2&n?new Gt:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var f=t[c],d=e[c];if(r)var g=a?r(d,f,c,e,t,o):r(f,d,c,t,e,o);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!F(e,(function(t,e){if(!j(h,e)&&(f===t||i(f,t,n,r,o)))return h.push(e)}))){p=!1;break}}else if(f!==d&&!i(f,d,n,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function ae(t,e,n,r,i,o,a){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case b:return!(t.byteLength!=e.byteLength||!o(new nt(t),new nt(e)));case s:case u:case h:return be(+t,+e);case l:return t.name==e.name&&t.message==e.message;case g:case v:return t==e+"";case p:var c=q;case y:var f=1&r;if(c||(c=V),t.size!=e.size&&!f)return!1;var d=a.get(t);if(d)return d==e;r|=2,a.set(t,e);var m=oe(c(t),c(e),r,i,o,a);return a.delete(t),m;case"[object Symbol]":if(wt)return wt.call(t)==wt.call(e)}return!1}function se(t,e,n,r,i,o){var a=1&n,s=ue(t),u=s.length;if(u!=ue(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:K.call(e,c)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var h=!0;o.set(t,e),o.set(e,t);for(var f=a;++l<u;){var d=t[c=s[l]],g=e[c];if(r)var y=a?r(g,d,c,e,t,o):r(d,g,c,t,e,o);if(!(void 0===y?d===g||i(d,g,n,r,o):y)){h=!1;break}f||(f="constructor"==c)}if(h&&!f){var v=t.constructor,m=e.constructor;v!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof m&&m instanceof m)&&(h=!1)}return o.delete(t),o.delete(e),h}function ue(t){return Zt(t,Pe,he)}function le(t,e){var n=t.__data__;return ge(e)?n["string"==typeof e?"string":"hash"]:n.map}function ce(t,e){var n=G(t,e);return ne(n)?n:void 0}function pe(t){var e=K.call(t,ot),n=t[ot];try{t[ot]=void 0;var r=!0}catch{}var i=$.call(t);return r&&(e?t[ot]=n:delete t[ot]),i}a(xt,"Hash"),a(Et,"hashClear"),a(It,"hashDelete"),a(St,"hashGet"),a(Ct,"hashHas"),a(Mt,"hashSet"),xt.prototype.clear=Et,xt.prototype.delete=It,xt.prototype.get=St,xt.prototype.has=Ct,xt.prototype.set=Mt,a(Nt,"ListCache"),a(At,"listCacheClear"),a(Ot,"listCacheDelete"),a(Pt,"listCacheGet"),a(Lt,"listCacheHas"),a(Tt,"listCacheSet"),Nt.prototype.clear=At,Nt.prototype.delete=Ot,Nt.prototype.get=Pt,Nt.prototype.has=Lt,Nt.prototype.set=Tt,a(Rt,"MapCache"),a(Dt,"mapCacheClear"),a(Ft,"mapCacheDelete"),a(kt,"mapCacheGet"),a(Bt,"mapCacheHas"),a(jt,"mapCacheSet"),Rt.prototype.clear=Dt,Rt.prototype.delete=Ft,Rt.prototype.get=kt,Rt.prototype.has=Bt,Rt.prototype.set=jt,a(Gt,"SetCache"),a(qt,"setCacheAdd"),a(Ut,"setCacheHas"),Gt.prototype.add=Gt.prototype.push=qt,Gt.prototype.has=Ut,a(Vt,"Stack"),a(zt,"stackClear"),a(Xt,"stackDelete"),a(Yt,"stackGet"),a(Wt,"stackHas"),a(Ht,"stackSet"),Vt.prototype.clear=zt,Vt.prototype.delete=Xt,Vt.prototype.get=Yt,Vt.prototype.has=Wt,Vt.prototype.set=Ht,a(Jt,"arrayLikeKeys"),a(Kt,"assocIndexOf"),a(Zt,"baseGetAllKeys"),a($t,"baseGetTag"),a(Qt,"baseIsArguments"),a(te,"baseIsEqual"),a(ee,"baseIsEqualDeep"),a(ne,"baseIsNative"),a(re,"baseIsTypedArray"),a(ie,"baseKeys"),a(oe,"equalArrays"),a(ae,"equalByTag"),a(se,"equalObjects"),a(ue,"getAllKeys"),a(le,"getMapData"),a(ce,"getNative"),a(pe,"getRawTag");var he=at?function(t){return null==t?[]:(t=Object(t),R(at(t),(function(e){return rt.call(t,e)})))}:Le,fe=$t;function de(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||E.test(t))&&t>-1&&t%1==0&&t<e}function ge(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ye(t){return!!Z&&Z in t}function ve(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||W)}function me(t){return $.call(t)}function _e(t){if(null!=t){try{return J.call(t)}catch{}try{return t+""}catch{}}return""}function be(t,e){return t===e||t!=t&&e!=e}(lt&&fe(new lt(new ArrayBuffer(1)))!=w||ct&&fe(new ct)!=p||pt&&fe(pt.resolve())!=d||ht&&fe(new ht)!=y||ft&&fe(new ft)!=_)&&(fe=a((function(t){var e=$t(t),n=e==f?t.constructor:void 0,r=n?_e(n):"";if(r)switch(r){case gt:return w;case yt:return p;case vt:return d;case mt:return y;case _t:return _}return e}),"getTag")),a(de,"isIndex"),a(ge,"isKeyable"),a(ye,"isMasked"),a(ve,"isPrototype"),a(me,"objectToString"),a(_e,"toSource"),a(be,"eq");var we=Qt(function(){return arguments}())?Qt:function(t){return Ae(t)&&K.call(t,"callee")&&!rt.call(t,"callee")},xe=Array.isArray;function Ee(t){return null!=t&&Me(t.length)&&!Ce(t)}a(Ee,"isArrayLike");var Ie=st||Te;function Se(t,e){return te(t,e)}function Ce(t){if(!Ne(t))return!1;var e=$t(t);return e==c||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Me(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}function Ne(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ae(t){return null!=t&&"object"==typeof t}a(Se,"isEqual"),a(Ce,"isFunction"),a(Me,"isLength"),a(Ne,"isObject"),a(Ae,"isObjectLike");var Oe=T?B(T):re;function Pe(t){return Ee(t)?Jt(t):ie(t)}function Le(){return[]}function Te(){return!1}a(Pe,"keys"),a(Le,"stubArray"),a(Te,"stubFalse"),e.exports=Se})),YS=Oe(((t,e)=>{m();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",u=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var p="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),d="object"==typeof t&&t&&!t.nodeType&&t,g=d&&"object"==typeof e&&e&&!e.nodeType&&e,y=g&&g.exports===d,v=y&&p.process,_=function(){try{return g&&g.require&&g.require("util").types||v&&v.binding&&v.binding("util")}catch{}}(),b=_&&_.isTypedArray;function w(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function x(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function E(t){return function(e){return t(e)}}function I(t,e){return null==t?void 0:t[e]}function S(t,e){return function(n){return t(e(n))}}a(w,"apply"),a(x,"baseTimes"),a(E,"baseUnary"),a(I,"getValue"),a(S,"overArg");var C,M=Array.prototype,N=Function.prototype,A=Object.prototype,O=f["__core-js_shared__"],P=N.toString,L=A.hasOwnProperty,T=(C=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",R=A.toString,D=P.call(Object),F=RegExp("^"+P.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=y?f.Buffer:void 0,B=f.Symbol,j=f.Uint8Array,G=k?k.allocUnsafe:void 0,q=S(Object.getPrototypeOf,Object),U=Object.create,V=A.propertyIsEnumerable,z=M.splice,X=B?B.toStringTag:void 0,Y=function(){try{var t=Yt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),W=k?k.isBuffer:void 0,H=Math.max,J=Date.now,K=Yt(f,"Map"),Z=Yt(Object,"create"),$=function(){function t(){}return a(t,"object"),function(e){if(!ge(e))return{};if(U)return U(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function tt(){this.__data__=Z?Z(null):{},this.size=0}function et(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function nt(t){var e=this.__data__;if(Z){var r=e[t];return r===n?void 0:r}return L.call(e,t)?e[t]:void 0}function rt(t){var e=this.__data__;return Z?void 0!==e[t]:L.call(e,t)}function it(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Z&&void 0===e?n:e,this}function ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function at(){this.__data__=[],this.size=0}function st(t){var e=this.__data__,n=Ct(e,t);return!(n<0)&&(n==e.length-1?e.pop():z.call(e,n,1),--this.size,!0)}function ut(t){var e=this.__data__,n=Ct(e,t);return n<0?void 0:e[n][1]}function lt(t){return Ct(this.__data__,t)>-1}function ct(t,e){var n=this.__data__,r=Ct(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function pt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ht(){this.size=0,this.__data__={hash:new Q,map:new(K||ot),string:new Q}}function ft(t){var e=Xt(this,t).delete(t);return this.size-=e?1:0,e}function dt(t){return Xt(this,t).get(t)}function gt(t){return Xt(this,t).has(t)}function yt(t,e){var n=Xt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function vt(t){var e=this.__data__=new ot(t);this.size=e.size}function mt(){this.__data__=new ot,this.size=0}function _t(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function bt(t){return this.__data__.get(t)}function wt(t){return this.__data__.has(t)}function xt(t,e){var n=this.__data__;if(n instanceof ot){var r=n.__data__;if(!K||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pt(r)}return n.set(t,e),this.size=n.size,this}function Et(t,e){var n=le(t),r=!n&&ue(t),i=!n&&!r&&he(t),o=!n&&!r&&!i&&me(t),a=n||r||i||o,s=a?x(t.length,String):[],u=s.length;for(var l in t)(e||L.call(t,l))&&(!a||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Jt(l,u)))&&s.push(l);return s}function It(t,e,n){(void 0!==n&&!se(t[e],n)||void 0===n&&!(e in t))&&Mt(t,e,n)}function St(t,e,n){var r=t[e];(!L.call(t,e)||!se(r,n)||void 0===n&&!(e in t))&&Mt(t,e,n)}function Ct(t,e){for(var n=t.length;n--;)if(se(t[n][0],e))return n;return-1}function Mt(t,e,n){"__proto__"==e&&Y?Y(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}a(Q,"Hash"),a(tt,"hashClear"),a(et,"hashDelete"),a(nt,"hashGet"),a(rt,"hashHas"),a(it,"hashSet"),Q.prototype.clear=tt,Q.prototype.delete=et,Q.prototype.get=nt,Q.prototype.has=rt,Q.prototype.set=it,a(ot,"ListCache"),a(at,"listCacheClear"),a(st,"listCacheDelete"),a(ut,"listCacheGet"),a(lt,"listCacheHas"),a(ct,"listCacheSet"),ot.prototype.clear=at,ot.prototype.delete=st,ot.prototype.get=ut,ot.prototype.has=lt,ot.prototype.set=ct,a(pt,"MapCache"),a(ht,"mapCacheClear"),a(ft,"mapCacheDelete"),a(dt,"mapCacheGet"),a(gt,"mapCacheHas"),a(yt,"mapCacheSet"),pt.prototype.clear=ht,pt.prototype.delete=ft,pt.prototype.get=dt,pt.prototype.has=gt,pt.prototype.set=yt,a(vt,"Stack"),a(mt,"stackClear"),a(_t,"stackDelete"),a(bt,"stackGet"),a(wt,"stackHas"),a(xt,"stackSet"),vt.prototype.clear=mt,vt.prototype.delete=_t,vt.prototype.get=bt,vt.prototype.has=wt,vt.prototype.set=xt,a(Et,"arrayLikeKeys"),a(It,"assignMergeValue"),a(St,"assignValue"),a(Ct,"assocIndexOf"),a(Mt,"baseAssignValue");var Nt=zt();function At(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":X&&X in Object(t)?Wt(t):ee(t)}function Ot(t){return ye(t)&&At(t)==i}function Pt(t){return!(!ge(t)||$t(t))&&(fe(t)?F:u).test(ae(t))}function Lt(t){return ye(t)&&de(t.length)&&!!c[At(t)]}function Tt(t){if(!ge(t))return te(t);var e=Qt(t),n=[];for(var r in t)"constructor"==r&&(e||!L.call(t,r))||n.push(r);return n}function Rt(t,e,n,r,i){t!==e&&Nt(e,(function(o,a){if(i||(i=new vt),ge(o))Dt(t,e,a,n,Rt,r,i);else{var s=r?r(re(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),It(t,a,s)}}),be)}function Dt(t,e,n,r,i,o,a){var s=re(t,n),u=re(e,n),l=a.get(u);if(l)It(t,n,l);else{var c=o?o(s,u,n+"",t,e,a):void 0,p=void 0===c;if(p){var h=le(u),f=!h&&he(u),d=!h&&!f&&me(u);c=u,h||f||d?le(s)?c=s:pe(s)?c=qt(s):f?(p=!1,c=Bt(u,!0)):d?(p=!1,c=Gt(u,!0)):c=[]:ve(u)||ue(u)?(c=s,ue(s)?c=_e(s):(!ge(s)||fe(s))&&(c=Ht(u))):p=!1}p&&(a.set(u,c),i(c,u,r,o,a),a.delete(u)),It(t,n,c)}}function Ft(t,e){return ie(ne(t,e,Ee),t+"")}a(At,"baseGetTag"),a(Ot,"baseIsArguments"),a(Pt,"baseIsNative"),a(Lt,"baseIsTypedArray"),a(Tt,"baseKeysIn"),a(Rt,"baseMerge"),a(Dt,"baseMergeDeep"),a(Ft,"baseRest");var kt=Y?function(t,e){return Y(t,"toString",{configurable:!0,enumerable:!1,value:xe(e),writable:!0})}:Ee;function Bt(t,e){if(e)return t.slice();var n=t.length,r=G?G(n):new t.constructor(n);return t.copy(r),r}function jt(t){var e=new t.constructor(t.byteLength);return new j(e).set(new j(t)),e}function Gt(t,e){var n=e?jt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function qt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Ut(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Mt(n,s,u):St(n,s,u)}return n}function Vt(t){return Ft((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Kt(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e}))}function zt(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Xt(t,e){var n=t.__data__;return Zt(e)?n["string"==typeof e?"string":"hash"]:n.map}function Yt(t,e){var n=I(t,e);return Pt(n)?n:void 0}function Wt(t){var e=L.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch{}var i=R.call(t);return r&&(e?t[X]=n:delete t[X]),i}function Ht(t){return"function"!=typeof t.constructor||Qt(t)?{}:$(q(t))}function Jt(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&l.test(t))&&t>-1&&t%1==0&&t<e}function Kt(t,e,n){if(!ge(n))return!1;var r=typeof e;return!!("number"==r?ce(n)&&Jt(e,n.length):"string"==r&&e in n)&&se(n[e],t)}function Zt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function $t(t){return!!T&&T in t}function Qt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||A)}function te(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}function ee(t){return R.call(t)}function ne(t,e,n){return e=H(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=H(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),w(t,this,s)}}function re(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}a(Bt,"cloneBuffer"),a(jt,"cloneArrayBuffer"),a(Gt,"cloneTypedArray"),a(qt,"copyArray"),a(Ut,"copyObject"),a(Vt,"createAssigner"),a(zt,"createBaseFor"),a(Xt,"getMapData"),a(Yt,"getNative"),a(Wt,"getRawTag"),a(Ht,"initCloneObject"),a(Jt,"isIndex"),a(Kt,"isIterateeCall"),a(Zt,"isKeyable"),a($t,"isMasked"),a(Qt,"isPrototype"),a(te,"nativeKeysIn"),a(ee,"objectToString"),a(ne,"overRest"),a(re,"safeGet");var ie=oe(kt);function oe(t){var e=0,n=0;return function(){var r=J(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ae(t){if(null!=t){try{return P.call(t)}catch{}try{return t+""}catch{}}return""}function se(t,e){return t===e||t!=t&&e!=e}a(oe,"shortOut"),a(ae,"toSource"),a(se,"eq");var ue=Ot(function(){return arguments}())?Ot:function(t){return ye(t)&&L.call(t,"callee")&&!V.call(t,"callee")},le=Array.isArray;function ce(t){return null!=t&&de(t.length)&&!fe(t)}function pe(t){return ye(t)&&ce(t)}a(ce,"isArrayLike"),a(pe,"isArrayLikeObject");var he=W||Ie;function fe(t){if(!ge(t))return!1;var e=At(t);return e==o||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function de(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}function ge(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ye(t){return null!=t&&"object"==typeof t}function ve(t){if(!ye(t)||At(t)!=s)return!1;var e=q(t);if(null===e)return!0;var n=L.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==D}a(fe,"isFunction"),a(de,"isLength"),a(ge,"isObject"),a(ye,"isObjectLike"),a(ve,"isPlainObject");var me=b?E(b):Lt;function _e(t){return Ut(t,be(t))}function be(t){return ce(t)?Et(t,!0):Tt(t)}a(_e,"toPlainObject"),a(be,"keysIn");var we=Vt((function(t,e,n){Rt(t,e,n)}));function xe(t){return function(){return t}}function Ee(t){return t}function Ie(){return!1}a(xe,"constant"),a(Ee,"identity"),a(Ie,"stubFalse"),e.exports=we})),WS=Oe(((t,e)=>{m(),function(n,r){var i="function",o="undefined",s="object",u="string",l="model",c="name",p="type",h="vendor",f="version",d="architecture",g="console",y="mobile",v="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",x="Apple",E="ASUS",I="BlackBerry",S="Browser",C="Chrome",M="Firefox",N="Google",A="Huawei",O="LG",P="Microsoft",L="Motorola",T="Opera",R="Samsung",D="Sharp",F="Sony",k="Xiaomi",B="Zebra",j="Facebook",G=a((function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}),"extend"),q=a((function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e}),"enumerize"),U=a((function(t,e){return typeof t===u&&-1!==V(e).indexOf(V(t))}),"has"),V=a((function(t){return t.toLowerCase()}),"lowerize"),z=a((function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),X=a((function(t,e){if(typeof t===u)return t=t.replace(/^\s\s*/,""),typeof e===o?t:t.substring(0,350)}),"trim"),Y=a((function(t,e){for(var n,o,a,u,l,c,p=0;p<e.length&&!l;){var h=e[p],f=e[p+1];for(n=o=0;n<h.length&&!l;)if(l=h[n++].exec(t))for(a=0;a<f.length;a++)c=l[++o],typeof(u=f[a])===s&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):r:this[u[0]]=c?u[1].call(this,c,u[2]):r:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):r):this[u]=c||r;p+=2}}),"rgxMapper"),W=a((function(t,e){for(var n in e)if(typeof e[n]===s&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(U(e[n][i],t))return"?"===n?r:n}else if(U(e[n],t))return"?"===n?r:n;return t}),"strMapper"),H={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,f],[/opios[\/ ]+([\w\.]+)/i],[f,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],f],[/\bfocus\/([\w\.]+)/i],[f,[c,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[f,[c,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,j],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[f,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[c,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,f],[/(cobalt)\/([\w\.]+)/i],[c,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,V]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[h,R],[p,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,R],[p,y]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,x],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,x],[p,v]],[/(macintosh);/i],[l,[h,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,A],[p,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,A],[p,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[h,k],[p,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,k],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[p,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[h,L],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,L],[p,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,O],[p,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,O],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[p,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[p,y]],[/(pixel c)\b/i],[l,[h,N],[p,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,N],[p,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[h,F],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,F],[p,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,w],[p,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,w],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[p,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,I],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,E],[p,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,E],[p,y]],[/(nexus 9)/i],[l,[h,"HTC"],[p,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[p,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[p,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[p,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,D],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[p,y]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,l,[p,v]],[/(surface duo)/i],[l,[h,P],[p,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[p,y]],[/(u304aa)/i],[l,[h,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[p,v]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[p,v]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[p,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[p,v]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[p,v]],[/\b(k88) b/i],[l,[h,"ZTE"],[p,v]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[p,v]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[p,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[p,v]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[p,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[p,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[p,y]],[/\b(ph-1) /i],[l,[h,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[p,v]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[p,v]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[p,v]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[p,v]],[/(sprint) (\w+)/i],[h,l,[p,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,P],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,B],[p,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,B],[p,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[p,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[p,g]],[/(playstation [345portablevi]+)/i],[l,[h,F],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,P],[p,g]],[/smart-tv.+(samsung)/i],[h,[p,m]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,R],[p,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,O],[p,m]],[/(apple) ?tv/i],[h,[l,x+" TV"],[p,m]],[/crkey/i],[[l,C+"cast"],[h,N],[p,m]],[/droid.+aft(\w)( bui|\))/i],[l,[h,w],[p,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[h,D],[p,m]],[/(bravia[\w ]+)( bui|\))/i],[l,[h,F],[p,m]],[/(mitv-\w{5}) bui/i],[l,[h,k],[p,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,X],[l,X],[p,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,m]],[/((pebble))app/i],[h,l,[p,_]],[/droid.+; (glass) \d/i],[l,[h,N],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,B],[p,_]],[/(quest( 2)?)/i],[l,[h,j],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[p,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[f,W,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[f,W,H]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,f],[/\(bb(10);/i],[f,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[c,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[c,C+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,f],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,f]]},K=a((function(t,e){if(typeof t===s&&(e=t,t=r),!(this instanceof K))return new K(t,e).getResult();var i=t||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),a=e?G(J,e):J;return this.getBrowser=function(){var t={};return t[c]=r,t[f]=r,Y.call(t,i,a.browser),t.major=z(t.version),t},this.getCPU=function(){var t={};return t[d]=r,Y.call(t,i,a.cpu),t},this.getDevice=function(){var t={};return t[h]=r,t[l]=r,t[p]=r,Y.call(t,i,a.device),t},this.getEngine=function(){var t={};return t[c]=r,t[f]=r,Y.call(t,i,a.engine),t},this.getOS=function(){var t={};return t[c]=r,t[f]=r,Y.call(t,i,a.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(t){return i=typeof t===u&&t.length>350?X(t,350):t,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.33",K.BROWSER=q([c,f,"major"]),K.CPU=q([d]),K.DEVICE=q([l,h,p,g,y,m,v,_,b]),K.ENGINE=K.OS=q([c,f]),typeof t!==o?(typeof e!==o&&e.exports&&(t=e.exports=K),t.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof n!==o&&(n.UAParser=K);var Z=typeof n!==o&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var $=new K;Z.ua=$.getResult(),Z.ua.get=function(){return $.getUA()},Z.ua.set=function(t){$.setUA(t);var e=$.getResult();for(var n in e)Z.ua[n]=e[n]}}}("object"==typeof window?window:t)})),Ug=Oe(((t,e)=>{m();var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function s(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch{return!1}}a(o,"toObject"),a(s,"shouldUseNative"),e.exports=s()?Object.assign:function(t,e){for(var a,s,u=o(t),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))r.call(a,c)&&(u[c]=a[c]);if(n){s=n(a);for(var p=0;p<s.length;p++)i.call(a,s[p])&&(u[s[p]]=a[s[p]])}}return u}})),EI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-u*c/s+p)),Math.min(o,Math.floor(r+(s-u)*c/s+p)),a)}var h=t[r],f=i,d=o;for(n(t,i,r),a(t[o],h)>0&&n(t,i,o);f<d;){for(n(t,f,d),f++,d--;a(t[f],h)<0;)f++;for(;a(t[d],h)>0;)d--}0===a(t[i],h)?n(t,i,d):n(t,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}a(t,"quickselect"),a(e,"quickselectStep"),a(n,"swap"),a(r,"defaultCompare");var i=a((function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"RBush");function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function s(t,e){u(t,0,t.children.length,e,t)}function u(t,e,n,r,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var a=t.children[o];l(i,t.leaf?r(a):a)}return i}function l(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function c(t,e){return t.minX-e.minX}function p(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function g(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=a((function(){return this._all(this.data,[])}),"all"),i.prototype.search=a((function(t){var e=this.data,n=[];if(!v(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?r(a):a;v(t,s)&&(e.leaf?n.push(a):y(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}),"search"),i.prototype.collides=a((function(t){var e=this.data;if(!v(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(v(t,o)){if(e.leaf||y(t,o))return!0;n.push(i)}}e=n.pop()}return!1}),"collides"),i.prototype.load=a((function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this}),"load"),i.prototype.insert=a((function(t){return t&&this._insert(t,this.data.height-1),this}),"insert"),i.prototype.clear=a((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=a((function(t,e){if(!t)return this;for(var n,r,i,a=this.data,s=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=l.pop(),i=!0),a.leaf){var c=o(t,a.children,e);if(-1!==c)return a.children.splice(c,1),u.push(a),this._condense(u),this}i||a.leaf||!y(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(u.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this}),"remove"),i.prototype.toBBox=a((function(t){return t}),"toBBox"),i.prototype.compareMinX=a((function(t,e){return t.minX-e.minX}),"compareMinX"),i.prototype.compareMinY=a((function(t,e){return t.minY-e.minY}),"compareMinY"),i.prototype.toJSON=a((function(){return this.data}),"toJSON"),i.prototype.fromJSON=a((function(t){return this.data=t,this}),"fromJSON"),i.prototype._all=a((function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e}),"_all"),i.prototype._build=a((function(t,e,n,r){var i,o=n-e+1,a=this._maxEntries;if(o<=a)return s(i=m(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),(i=m([])).leaf=!1,i.height=r;var u=Math.ceil(o/a),l=u*Math.ceil(Math.sqrt(a));_(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var p=Math.min(c+l-1,n);_(t,c,p,u,this.compareMinY);for(var h=c;h<=p;h+=u){var f=Math.min(h+u-1,p);i.children.push(this._build(t,h,f,r-1))}}return s(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=a((function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var u=e.children[s],l=h(u),c=d(t,u)-l;c<o?(o=c,i=l<i?l:i,a=u):c===o&&l<i&&(i=l,a=u)}e=a||e.children[0]}return e}),"_chooseSubtree"),i.prototype._insert=a((function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),l(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}),"_insert"),i.prototype._split=a((function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}),"_split"),i.prototype._splitRoot=a((function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=a((function(t,e,n){for(var r,i=1/0,o=1/0,a=e;a<=n-e;a++){var s=u(t,0,a,this.toBBox),l=u(t,a,n,this.toBBox),c=g(s,l),p=h(s)+h(l);c<i?(i=c,r=a,o=p<o?p:o):c===i&&p<o&&(o=p,r=a)}return r||n-e}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=a((function(t,e,n){var r=t.leaf?this.compareMinX:c,i=t.leaf?this.compareMinY:p;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}),"_chooseSplitAxis"),i.prototype._allDistMargin=a((function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=u(t,0,e,i),a=u(t,n-e,n,i),s=f(o)+f(a),c=e;c<n-e;c++){var p=t.children[c];l(o,t.leaf?i(p):p),s+=f(o)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];l(a,t.leaf?i(d):d),s+=f(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=a((function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)}),"_adjustParentBBoxes"),i.prototype._condense=a((function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)}),"_condense"),a(o,"findItem"),a(s,"calcBBox"),a(u,"distBBox"),a(l,"extend"),a(c,"compareNodeMinX"),a(p,"compareNodeMinY"),a(h,"bboxArea"),a(f,"bboxMargin"),a(d,"enlargedArea"),a(g,"intersectionArea"),a(y,"contains"),a(v,"intersects"),a(m,"createNode"),a(_,"multiSelect"),i},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),xI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){var t=a((function(t,n){if(void 0===t&&(t=[]),void 0===n&&(n=e),this.data=t,this.length=this.data.length,this.compare=n,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}),"TinyQueue");function e(t,e){return t<e?-1:t>e?1:0}return t.prototype.push=a((function(t){this.data.push(t),this.length++,this._up(this.length-1)}),"push"),t.prototype.pop=a((function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}}),"pop"),t.prototype.peek=a((function(){return this.data[0]}),"peek"),t.prototype._up=a((function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}),"_up"),t.prototype._down=a((function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&n(e[s],a)<0&&(o=s,a=e[s]),n(a,i)>=0)break;e[t]=a,t=o}e[t]=i}),"_down"),a(e,"defaultCompare"),t},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).TinyQueue=r()})),SI=Oe(((t,e)=>{m(),e.exports=a((function(t,e,n,r){var i=t[0],o=t[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var s=(r-n)/2,u=0,l=s-1;u<s;l=u++){var c=e[n+2*u+0],p=e[n+2*u+1],h=e[n+2*l+0],f=e[n+2*l+1];p>o!=f>o&&i<(h-c)*(o-p)/(f-p)+c&&(a=!a)}return a}),"pointInPolygonFlat")})),PI=Oe(((t,e)=>{m(),e.exports=a((function(t,e,n,r){var i=t[0],o=t[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var s=r-n,u=0,l=s-1;u<s;l=u++){var c=e[u+n][0],p=e[u+n][1],h=e[l+n][0],f=e[l+n][1];p>o!=f>o&&i<(h-c)*(o-p)/(f-p)+c&&(a=!a)}return a}),"pointInPolygonNested")})),OI=Oe(((t,e)=>{m();var n=SI(),r=PI();e.exports=a((function(t,e,i,o){return e.length>0&&Array.isArray(e[0])?r(t,e,i,o):n(t,e,i,o)}),"pointInPolygon"),e.exports.nested=r,e.exports.flat=n})),TI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){function e(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],p=0,h=0;c>l==c>-l?(o=l,l=e[++p]):(o=c,c=r[++h]);let f=0;if(p<t&&h<n)for(c>l==c>-l?(s=o-((a=l+o)-l),l=e[++p]):(s=o-((a=c+o)-c),c=r[++h]),o=a,0!==s&&(i[f++]=s);p<t&&h<n;)c>l==c>-l?(s=o-((a=o+l)-(u=a-o))+(l-u),l=e[++p]):(s=o-((a=o+c)-(u=a-o))+(c-u),c=r[++h]),o=a,0!==s&&(i[f++]=s);for(;p<t;)s=o-((a=o+l)-(u=a-o))+(l-u),l=e[++p],o=a,0!==s&&(i[f++]=s);for(;h<n;)s=o-((a=o+c)-(u=a-o))+(c-u),c=r[++h],o=a,0!==s&&(i[f++]=s);return 0===o&&0!==f||(i[f++]=o),f}function n(t){return new Float64Array(t)}a(e,"r"),a(n,"o");let r=n(4),i=n(8),o=n(12),s=n(16),u=n(4);t.orient2d=function(t,n,a,l,c,p){let h=(n-p)*(a-c),f=(t-c)*(l-p),d=h-f;if(0===h||0===f||h>0!=f>0)return d;let g=Math.abs(h+f);return Math.abs(d)>=33306690738754716e-32*g?d:-function(t,n,a,l,c,p,h){let f,d,g,y,v,m,_,b,w,x,E,I,S,C,M,N,A,O,P=t-c,L=a-c,T=n-p,R=l-p;v=(M=(b=P-(_=(m=134217729*P)-(m-P)))*(x=R-(w=(m=134217729*R)-(m-R)))-((C=P*R)-_*w-b*w-_*x))-(E=M-(A=(b=T-(_=(m=134217729*T)-(m-T)))*(x=L-(w=(m=134217729*L)-(m-L)))-((N=T*L)-_*w-b*w-_*x))),r[0]=M-(E+v)+(v-A),v=(S=C-((I=C+E)-(v=I-C))+(E-v))-(E=S-N),r[1]=S-(E+v)+(v-N),v=(O=I+E)-I,r[2]=I-(O-v)+(E-v),r[3]=O;let D=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,r),F=22204460492503146e-32*h;if(D>=F||-D>=F||(f=t-(P+(v=t-P))+(v-c),g=a-(L+(v=a-L))+(v-c),d=n-(T+(v=n-T))+(v-p),y=l-(R+(v=l-R))+(v-p),0===f&&0===d&&0===g&&0===y)||(F=11093356479670487e-47*h+33306690738754706e-32*Math.abs(D),(D+=P*y+R*f-(T*g+L*d))>=F||-D>=F))return D;v=(M=(b=f-(_=(m=134217729*f)-(m-f)))*(x=R-(w=(m=134217729*R)-(m-R)))-((C=f*R)-_*w-b*w-_*x))-(E=M-(A=(b=d-(_=(m=134217729*d)-(m-d)))*(x=L-(w=(m=134217729*L)-(m-L)))-((N=d*L)-_*w-b*w-_*x))),u[0]=M-(E+v)+(v-A),v=(S=C-((I=C+E)-(v=I-C))+(E-v))-(E=S-N),u[1]=S-(E+v)+(v-N),v=(O=I+E)-I,u[2]=I-(O-v)+(E-v),u[3]=O;let k=e(4,r,4,u,i);v=(M=(b=P-(_=(m=134217729*P)-(m-P)))*(x=y-(w=(m=134217729*y)-(m-y)))-((C=P*y)-_*w-b*w-_*x))-(E=M-(A=(b=T-(_=(m=134217729*T)-(m-T)))*(x=g-(w=(m=134217729*g)-(m-g)))-((N=T*g)-_*w-b*w-_*x))),u[0]=M-(E+v)+(v-A),v=(S=C-((I=C+E)-(v=I-C))+(E-v))-(E=S-N),u[1]=S-(E+v)+(v-N),v=(O=I+E)-I,u[2]=I-(O-v)+(E-v),u[3]=O;let B=e(k,i,4,u,o);v=(M=(b=f-(_=(m=134217729*f)-(m-f)))*(x=y-(w=(m=134217729*y)-(m-y)))-((C=f*y)-_*w-b*w-_*x))-(E=M-(A=(b=d-(_=(m=134217729*d)-(m-d)))*(x=g-(w=(m=134217729*g)-(m-g)))-((N=d*g)-_*w-b*w-_*x))),u[0]=M-(E+v)+(v-A),v=(S=C-((I=C+E)-(v=I-C))+(E-v))-(E=S-N),u[1]=S-(E+v)+(v-N),v=(O=I+E)-I,u[2]=I-(O-v)+(E-v),u[3]=O;let j=e(B,o,4,u,s);return s[j-1]}(t,n,a,l,c,p,g)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).predicates={})})),BI=Oe(((t,e)=>{m();var n=EI(),r=xI(),i=OI(),o=TI().orient2d;function s(t,e,r){e=Math.max(0,void 0===e?2:e),r=r||0;var i=y(t),o=new n(16);o.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},o.compareMinX=function(t,e){return t[0]-e[0]},o.compareMinY=function(t,e){return t[1]-e[1]},o.load(t);for(var a,s=[],l=0;l<i.length;l++){var c=i[l];o.remove(c),a=v(c,a),s.push(a)}var p=new n(16);for(l=0;l<s.length;l++)p.insert(g(s[l]));for(var h=e*e,f=r*r;s.length;){var d=s.shift(),m=d.p,b=d.next.p,w=_(m,b);if(!(w<f)){var x=w/h;(c=u(o,d.prev.p,m,b,d.next.next.p,x,p))&&Math.min(_(c,m),_(c,b))<=x&&(s.push(d),s.push(v(c,d)),o.remove(c),p.remove(d),p.insert(g(d)),p.insert(g(d.next)))}}d=a;var E=[];do{E.push(d.p),d=d.next}while(d!==a);return E.push(d.p),E}function u(t,e,n,i,o,a,s){for(var u=new r([],l),p=t.data;p;){for(var f=0;f<p.children.length;f++){var d=p.children[f],g=p.leaf?b(d,n,i):c(n,i,d);g>a||u.push({node:d,dist:g})}for(;u.length&&!u.peek().node.children;){var y=u.pop(),v=y.node,m=b(v,e,n),_=b(v,i,o);if(y.dist<m&&y.dist<_&&h(n,v,s)&&h(i,v,s))return v}(p=u.pop())&&(p=p.node)}return null}function l(t,e){return t.dist-e.dist}function c(t,e,n){if(p(t,n)||p(e,n))return 0;var r=w(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=w(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=w(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var a=w(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===a?0:Math.min(r,i,o,a)}function p(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function h(t,e,n){for(var r=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),a=Math.max(t[1],e[1]),s=n.search({minX:r,minY:i,maxX:o,maxY:a}),u=0;u<s.length;u++)if(d(s[u].p,s[u].next.p,t,e))return!1;return!0}function f(t,e,n){return o(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t,e,n,r){return t!==r&&e!==n&&f(t,e,n)>0!=f(t,e,r)>0&&f(n,r,t)>0!=f(n,r,e)>0}function g(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function y(t){for(var e=t[0],n=t[0],r=t[0],o=t[0],a=0;a<t.length;a++){var s=t[a];s[0]<e[0]&&(e=s),s[0]>r[0]&&(r=s),s[1]<n[1]&&(n=s),s[1]>o[1]&&(o=s)}var u=[e,n,r,o],l=u.slice();for(a=0;a<t.length;a++)i(t[a],u)||l.push(t[a]);return E(l)}function v(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function _(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function b(t,e,n){var r=e[0],i=e[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function w(t,e,n,r,i,o,a,s){var u,l,c,p,h=n-t,f=r-e,d=a-i,g=s-o,y=t-i,v=e-o,m=h*h+f*f,_=h*d+f*g,b=d*d+g*g,w=h*y+f*v,x=d*y+g*v,E=m*b-_*_,I=E,S=E;0===E?(l=0,I=1,p=x,S=b):(p=m*x-_*w,(l=_*x-b*w)<0?(l=0,p=x,S=b):l>I&&(l=I,p=x+_,S=b)),p<0?(p=0,-w<0?l=0:-w>m?l=I:(l=-w,I=m)):p>S&&(p=S,-w+_<0?l=0:-w+_>m?l=I:(l=-w+_,I=m));var C=(1-(c=0===p?0:p/S))*i+c*a-((1-(u=0===l?0:l/I))*t+u*n),M=(1-c)*o+c*s-((1-u)*e+u*r);return C*C+M*M}function x(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}function E(t){t.sort(x);for(var e=[],n=0;n<t.length;n++){for(;e.length>=2&&f(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&f(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}r.default&&(r=r.default),e.exports=s,e.exports.default=s,a(s,"concaveman"),a(u,"findCandidate"),a(l,"compareDist"),a(c,"sqSegBoxDist"),a(p,"inside"),a(h,"noIntersections"),a(f,"cross"),a(d,"intersects"),a(g,"updateBBox"),a(y,"fastConvexHull"),a(v,"insertNode"),a(_,"getSqDist"),a(b,"sqSegDist"),a(w,"sqSegSegDist"),a(x,"compareByX"),a(E,"convexHull")})),GI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){function e(t){return t}function n(t){if(null==t)return e;var n,r,i=t.scale[0],o=t.scale[1],a=t.translate[0],s=t.translate[1];return function(t,e){e||(n=r=0);var u=2,l=t.length,c=new Array(l);for(c[0]=(n+=t[0])*i+a,c[1]=(r+=t[1])*o+s;u<l;)c[u]=t[u],++u;return c}}function r(t){var e,r=n(t.transform),i=1/0,o=i,s=-i,u=-i;function l(t){(t=r(t))[0]<i&&(i=t[0]),t[0]>s&&(s=t[0]),t[1]<o&&(o=t[1]),t[1]>u&&(u=t[1])}function c(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}for(e in a(l,"bboxPoint"),a(c,"bboxGeometry"),t.arcs.forEach((function(t){for(var e,n=-1,a=t.length;++n<a;)(e=r(t[n],n))[0]<i&&(i=e[0]),e[0]>s&&(s=e[0]),e[1]<o&&(o=e[1]),e[1]>u&&(u=e[1])})),t.objects)c(t.objects[e]);return[i,o,s,u]}function i(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}function o(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return s(t,e)}))}:s(t,e)}function s(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=u(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function u(t,e){var r=n(t.transform),o=t.arcs;function s(t,e){e.length&&e.pop();for(var n=o[t<0?~t:t],a=0,s=n.length;a<s;++a)e.push(r(n[a],a));t<0&&i(e,s)}function u(t){return r(t)}function l(t){for(var e=[],n=0,r=t.length;n<r;++n)s(t[n],e);return e.length<2&&e.push(e[0]),e}function c(t){for(var e=l(t);e.length<4;)e.push(e[0]);return e}function p(t){return t.map(c)}function h(t){var e,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(h)};case"Point":e=u(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(u);break;case"LineString":e=l(t.arcs);break;case"MultiLineString":e=t.arcs.map(l);break;case"Polygon":e=p(t.arcs);break;case"MultiPolygon":e=t.arcs.map(p);break;default:return null}return{type:n,coordinates:e}}return a(s,"arc"),a(u,"point"),a(l,"line"),a(c,"ring"),a(p,"polygon"),a(h,"geometry"),h(e)}function l(t,e){var n={},r={},i={},o=[],s=-1;function u(e){var n,r=t.arcs[e<0?~e:e],i=r[0];return t.transform?(n=[0,0],r.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=r[r.length-1],e<0?[n,i]:[i,n]}function l(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach((function(t){n[t<0?~t:t]=1})),o.push(i)}}return e.forEach((function(n,r){var i,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=e[++s],e[s]=n,e[r]=i)})),e.forEach((function(t){var e,n,o=u(t),a=o[0],s=o[1];if(e=i[a])if(delete i[e.end],e.push(t),e.end=s,n=r[s]){delete r[n.start];var l=n===e?e:e.concat(n);r[l.start=e.start]=i[l.end=n.end]=l}else r[e.start]=i[e.end]=e;else if(e=r[s])if(delete r[e.start],e.unshift(t),e.start=a,n=i[a]){delete i[n.end];var c=n===e?e:n.concat(e);r[c.start=n.start]=i[c.end=e.end]=c}else r[e.start]=i[e.end]=e;else r[(e=[t]).start=a]=i[e.end=s]=e})),a(u,"ends"),a(l,"flush"),l(i,r),l(r,i),e.forEach((function(t){n[t<0?~t:t]||o.push([t])})),o}function c(t){return u(t,p.apply(this,arguments))}function p(t,e,n){var r,i,o;if(arguments.length>1)r=h(0,e,n);else for(i=0,r=new Array(o=t.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:l(t,r)}}function h(t,e,n){var r,i=[],o=[];function s(t){var e=t<0?~t:t;(o[e]||(o[e]=[])).push({i:t,g:r})}function u(t){t.forEach(s)}function l(t){t.forEach(u)}function c(t){t.forEach(l)}function p(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(p);break;case"LineString":u(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":c(t.arcs)}}return a(s,"extract0"),a(u,"extract1"),a(l,"extract2"),a(c,"extract3"),a(p,"geometry"),p(e),o.forEach(null==n?function(t){i.push(t[0].i)}:function(t){n(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}function f(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[0]*i[1]-e[1]*i[0];return Math.abs(o)}function d(t){return u(t,g.apply(this,arguments))}function g(t,e){var n={},r=[],i=[];function o(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(o);break;case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}}function s(t){t.forEach((function(e){e.forEach((function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)}))})),r.push(t)}function c(e){return f(u(t,{type:"Polygon",arcs:[e]}).coordinates[0])}return e.forEach(o),a(o,"geometry"),a(s,"extract"),a(c,"area"),r.forEach((function(t){if(!t._){var e=[],r=[t];for(t._=1,i.push(e);t=r.pop();)e.push(t),t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].forEach((function(t){t._||(t._=1,r.push(t))}))}))}))}})),r.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:i.map((function(e){var r,i=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].length<2&&i.push(t)}))}))})),(r=(i=l(t,i)).length)>1)for(var o,a,s=1,u=c(i[0]);s<r;++s)(o=c(i[s]))>u&&(a=i[0],i[0]=i[s],i[s]=a,u=o);return i})).filter((function(t){return t.length>0}))}}function y(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;t[i]<e?n=i+1:r=i}return n}function v(t){var e={},n=t.map((function(){return[]}));function r(t,n){t.forEach((function(t){t<0&&(t=~t);var r=e[t];r?r.push(n):e[t]=[n]}))}function i(t,e){t.forEach((function(t){r(t,e)}))}function o(t,e){"GeometryCollection"===t.type?t.geometries.forEach((function(t){o(t,e)})):t.type in s&&s[t.type](t.arcs,e)}a(r,"line"),a(i,"polygon"),a(o,"geometry");var s={LineString:r,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach((function(t){i(t,e)}))}};for(var u in t.forEach(o),e)for(var l=e[u],c=l.length,p=0;p<c;++p)for(var h=p+1;h<c;++h){var f,d=l[p],g=l[h];(f=n[d])[u=y(f,g)]!==g&&f.splice(u,0,g),(f=n[g])[u=y(f,d)]!==d&&f.splice(u,0,d)}return n}function m(t){if(null==t)return e;var n,r,i=t.scale[0],o=t.scale[1],a=t.translate[0],s=t.translate[1];return function(t,e){e||(n=r=0);var u=2,l=t.length,c=new Array(l),p=Math.round((t[0]-a)/i),h=Math.round((t[1]-s)/o);for(c[0]=p-n,n=p,c[1]=h-r,r=h;u<l;)c[u]=t[u],++u;return c}}function _(t,e){if(t.transform)throw new Error("already quantized");if(e&&e.scale)l=t.bbox;else{if(!((n=Math.floor(e))>=2))throw new Error("n must be ≥2");var n,i=(l=t.bbox||r(t))[0],o=l[1],s=l[2],u=l[3];e={scale:[s-i?(s-i)/(n-1):1,u-o?(u-o)/(n-1):1],translate:[i,o]}}var l,c,p=m(e),h=t.objects,f={};function d(t){return p(t)}function g(t){var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(g)};break;case"Point":e={type:"Point",coordinates:d(t.coordinates)};break;case"MultiPoint":e={type:"MultiPoint",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}function y(t){var e,n=0,r=1,i=t.length,o=new Array(i);for(o[0]=p(t[0],0);++n<i;)((e=p(t[n],n))[0]||e[1])&&(o[r++]=e);return 1===r&&(o[r++]=[0,0]),o.length=r,o}for(c in a(d,"quantizePoint"),a(g,"quantizeGeometry"),a(y,"quantizeArc"),h)f[c]=g(h[c]);return{type:"Topology",bbox:l,transform:e,objects:f,arcs:t.arcs.map(y)}}a(e,"identity"),a(n,"transform"),a(r,"bbox"),a(i,"reverse"),a(o,"feature"),a(s,"feature$1"),a(u,"object"),a(l,"stitch"),a(c,"mesh"),a(p,"meshArcs"),a(h,"extractArcs"),a(f,"planarRingArea"),a(d,"merge"),a(g,"mergeArcs"),a(y,"bisect"),a(v,"neighbors"),a(m,"untransform"),a(_,"quantize"),t.bbox=r,t.feature=o,t.merge=d,t.mergeArcs=g,t.mesh=c,t.meshArcs=p,t.neighbors=v,t.quantize=_,t.transform=n,t.untransform=m,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).topojson=n.topojson||{})})),UI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){var e=Object.prototype.hasOwnProperty;function n(t){var n=1/0,r=1/0,i=-1/0,o=-1/0;function s(t){null!=t&&e.call(u,t.type)&&u[t.type](t)}a(s,"boundGeometry");var u={GeometryCollection:function(t){t.geometries.forEach(s)},Point:function(t){l(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(l)},LineString:function(t){c(t.arcs)},MultiLineString:function(t){t.arcs.forEach(c)},Polygon:function(t){t.arcs.forEach(c)},MultiPolygon:function(t){t.arcs.forEach(p)}};function l(t){var e=t[0],a=t[1];e<n&&(n=e),e>i&&(i=e),a<r&&(r=a),a>o&&(o=a)}function c(t){t.forEach(l)}function p(t){t.forEach(c)}for(var h in a(l,"boundPoint"),a(c,"boundLine"),a(p,"boundMultiLine"),t)s(t[h]);return i>=n&&o>=r?[n,r,i,o]:void 0}function r(t,e,n,r,i){3===arguments.length&&(r=Array,i=null);for(var o=new r(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),s=t-1,u=0;u<t;++u)o[u]=i;function l(r){for(var a=e(r)&s,u=o[a],l=0;u!=i;){if(n(u,r))return!0;if(++l>=t)throw new Error("full hashset");u=o[a=a+1&s]}return o[a]=r,!0}function c(r){for(var a=e(r)&s,u=o[a],l=0;u!=i;){if(n(u,r))return!0;if(++l>=t)break;u=o[a=a+1&s]}return!1}function p(){for(var t=[],e=0,n=o.length;e<n;++e){var r=o[e];r!=i&&t.push(r)}return t}return a(l,"add"),a(c,"has"),a(p,"values"),{add:l,has:c,values:p}}function i(t,e,n,r,i,o){3===arguments.length&&(r=o=Array,i=null);for(var s=new r(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),u=new o(t),l=t-1,c=0;c<t;++c)s[c]=i;function p(r,o){for(var a=e(r)&l,c=s[a],p=0;c!=i;){if(n(c,r))return u[a]=o;if(++p>=t)throw new Error("full hashmap");c=s[a=a+1&l]}return s[a]=r,u[a]=o,o}function h(r,o){for(var a=e(r)&l,c=s[a],p=0;c!=i;){if(n(c,r))return u[a];if(++p>=t)throw new Error("full hashmap");c=s[a=a+1&l]}return s[a]=r,u[a]=o,o}function f(r,o){for(var a=e(r)&l,c=s[a],p=0;c!=i;){if(n(c,r))return u[a];if(++p>=t)break;c=s[a=a+1&l]}return o}function d(){for(var t=[],e=0,n=s.length;e<n;++e){var r=s[e];r!=i&&t.push(r)}return t}return a(p,"set"),a(h,"maybeSet"),a(f,"get"),a(d,"keys"),{set:p,maybeSet:h,get:f,keys:d}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}a(n,"bounds"),a(r,"hashset"),a(i,"hashmap"),a(o,"equalPoint");var s=new ArrayBuffer(16),u=new Float64Array(s),l=new Uint32Array(s);function c(t){u[0]=t[0],u[1]=t[1];var e=l[0]^l[1];return 2147483647&(e=e<<5^e>>7^l[2]^l[3])}function p(t){var e,n,s,u,l=t.coordinates,p=t.lines,h=t.rings,f=C(),d=new Int32Array(l.length),g=new Int32Array(l.length),y=new Int32Array(l.length),v=new Int8Array(l.length),m=0;for(e=0,n=l.length;e<n;++e)d[e]=g[e]=y[e]=-1;for(e=0,n=p.length;e<n;++e){var _=p[e],b=_[0],w=_[1];for(s=f[b],u=f[++b],++m,v[s]=1;++b<=w;)S(e,s,s=u,u=f[b]);++m,v[u]=1}for(e=0,n=l.length;e<n;++e)d[e]=-1;for(e=0,n=h.length;e<n;++e){var x=h[e],E=x[0]+1,I=x[1];for(S(e,f[I-1],s=f[E-1],u=f[E]);++E<=I;)S(e,s,s=u,u=f[E])}function S(t,e,n,r){if(d[n]!==t){d[n]=t;var i=g[n];if(i>=0){var o=y[n];(i!==e||o!==r)&&(i!==r||o!==e)&&(++m,v[n]=1)}else g[n]=e,y[n]=r}}function C(){for(var t=i(1.4*l.length,M,N,Int32Array,-1,Int32Array),e=new Int32Array(l.length),n=0,r=l.length;n<r;++n)e[n]=t.maybeSet(n,n);return e}function M(t){return c(l[t])}function N(t,e){return o(l[t],l[e])}a(S,"sequence"),a(C,"index"),a(M,"hashIndex"),a(N,"equalIndex"),d=g=y=null;var A,O=r(1.4*m,c,o);for(e=0,n=l.length;e<n;++e)v[A=f[e]]&&O.add(l[A]);return O}function h(t){var e,n,r,i=p(t),o=t.coordinates,a=t.lines,s=t.rings;for(n=0,r=a.length;n<r;++n)for(var u=a[n],l=u[0],c=u[1];++l<c;)i.has(o[l])&&(e={0:l,1:u[1]},u[1]=l,u=u.next=e);for(n=0,r=s.length;n<r;++n)for(var h=s[n],d=h[0],g=d,y=h[1],v=i.has(o[d]);++g<y;)i.has(o[g])&&(v?(e={0:g,1:h[1]},h[1]=g,h=h.next=e):(f(o,d,y,y-g),o[y]=o[d],v=!0,g=d));return t}function f(t,e,n,r){d(t,e,n),d(t,e,e+r),d(t,e+r,n)}function d(t,e,n){for(var r,i=e+(n---e>>1);e<i;++e,--n)r=t[e],t[e]=t[n],t[n]=r}function g(t){var e,n,r,s,u=t.coordinates,l=t.lines,p=t.rings,h=l.length+p.length;for(delete t.lines,delete t.rings,r=0,s=l.length;r<s;++r)for(e=l[r];e=e.next;)++h;for(r=0,s=p.length;r<s;++r)for(n=p[r];n=n.next;)++h;var f=i(2*h*1.4,c,o),d=t.arcs=[];for(r=0,s=l.length;r<s;++r){e=l[r];do{g(e)}while(e=e.next)}for(r=0,s=p.length;r<s;++r)if((n=p[r]).next)do{g(n)}while(n=n.next);else y(n);function g(t){var e,n,r,i,o,a,s,l;if(r=f.get(e=u[t[0]]))for(s=0,l=r.length;s<l;++s)if(v(i=r[s],t))return t[0]=i[0],void(t[1]=i[1]);if(o=f.get(n=u[t[1]]))for(s=0,l=o.length;s<l;++s)if(m(a=o[s],t))return t[1]=a[0],void(t[0]=a[1]);r?r.push(t):f.set(e,[t]),o?o.push(t):f.set(n,[t]),d.push(t)}function y(t){var e,n,r,i,o;if(n=f.get(u[t[0]]))for(i=0,o=n.length;i<o;++i){if(_(r=n[i],t))return t[0]=r[0],void(t[1]=r[1]);if(b(r,t))return t[0]=r[1],void(t[1]=r[0])}if(n=f.get(e=u[t[0]+w(t)]))for(i=0,o=n.length;i<o;++i){if(_(r=n[i],t))return t[0]=r[0],void(t[1]=r[1]);if(b(r,t))return t[0]=r[1],void(t[1]=r[0])}n?n.push(t):f.set(e,[t]),d.push(t)}function v(t,e){var n=t[0],r=e[0],i=t[1];if(n-i!=r-e[1])return!1;for(;n<=i;++n,++r)if(!o(u[n],u[r]))return!1;return!0}function m(t,e){var n=t[0],r=e[0],i=t[1],a=e[1];if(n-i!=r-a)return!1;for(;n<=i;++n,--a)if(!o(u[n],u[a]))return!1;return!0}function _(t,e){var n=t[0],r=e[0],i=t[1]-n;if(i!==e[1]-r)return!1;for(var a=w(t),s=w(e),l=0;l<i;++l)if(!o(u[n+(l+a)%i],u[r+(l+s)%i]))return!1;return!0}function b(t,e){var n=t[0],r=e[0],i=t[1],a=e[1],s=i-n;if(s!==a-r)return!1;for(var l=w(t),c=s-w(e),p=0;p<s;++p)if(!o(u[n+(p+l)%s],u[a-(p+c)%s]))return!1;return!0}function w(t){for(var e=t[0],n=t[1],r=e,i=r,o=u[r];++r<n;){var a=u[r];(a[0]<o[0]||a[0]===o[0]&&a[1]<o[1])&&(i=r,o=a)}return i-e}return a(g,"dedupLine"),a(y,"dedupRing"),a(v,"equalLine"),a(m,"reverseEqualLine"),a(_,"equalRing"),a(b,"reverseEqualRing"),a(w,"findMinimumOffset"),t}function y(t){for(var e=-1,n=t.length;++e<n;){for(var r,i,o=t[e],a=0,s=1,u=o.length,l=o[0],c=l[0],p=l[1];++a<u;)r=(l=o[a])[0],i=l[1],(r!==c||i!==p)&&(o[s++]=[r-c,i-p],c=r,p=i);1===s&&(o[s++]=[0,0]),o.length=s}return t}function v(t){var n=-1,r=[],i=[],o=[];function s(t){t&&e.call(u,t.type)&&u[t.type](t)}a(s,"extractGeometry");var u={GeometryCollection:function(t){t.geometries.forEach(s)},LineString:function(t){t.arcs=l(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(l)},Polygon:function(t){t.arcs=t.arcs.map(c)},MultiPolygon:function(t){t.arcs=t.arcs.map(p)}};function l(t){for(var e=0,i=t.length;e<i;++e)o[++n]=t[e];var a={0:n-i+1,1:n};return r.push(a),a}function c(t){for(var e=0,r=t.length;e<r;++e)o[++n]=t[e];var a={0:n-r+1,1:n};return i.push(a),a}function p(t){return t.map(c)}for(var h in a(l,"extractLine"),a(c,"extractRing"),a(p,"extractMultiRing"),t)s(t[h]);return{type:"Topology",coordinates:o,lines:r,rings:i,objects:t}}function m(t){var e,n={};for(e in t)n[e]=_(t[e]);return n}function _(t){return null==t?{type:null}:("FeatureCollection"===t.type?b:"Feature"===t.type?w:x)(t)}function b(t){var e={type:"GeometryCollection",geometries:t.features.map(w)};return null!=t.bbox&&(e.bbox=t.bbox),e}function w(t){var e,n=x(t.geometry);for(e in null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),t.properties){n.properties=t.properties;break}return n}function x(t){if(null==t)return{type:null};var e="GeometryCollection"===t.type?{type:"GeometryCollection",geometries:t.geometries.map(x)}:"Point"===t.type||"MultiPoint"===t.type?{type:t.type,coordinates:t.coordinates}:{type:t.type,arcs:t.coordinates};return null!=t.bbox&&(e.bbox=t.bbox),e}function E(t,n,r){var i=n[0],o=n[1],s=n[2],u=n[3],l=s-i?(r-1)/(s-i):1,c=u-o?(r-1)/(u-o):1;function p(t){return[Math.round((t[0]-i)*l),Math.round((t[1]-o)*c)]}function h(t,e){for(var n,r,a,s,u,p=-1,h=0,f=t.length,d=new Array(f);++p<f;)n=t[p],s=Math.round((n[0]-i)*l),u=Math.round((n[1]-o)*c),(s!==r||u!==a)&&(d[h++]=[r=s,a=u]);for(d.length=h;h<e;)h=d.push([d[0][0],d[0][1]]);return d}function f(t){return h(t,2)}function d(t){return h(t,4)}function g(t){return t.map(d)}function y(t){null!=t&&e.call(v,t.type)&&v[t.type](t)}a(p,"quantizePoint"),a(h,"quantizePoints"),a(f,"quantizeLine"),a(d,"quantizeRing"),a(g,"quantizePolygon"),a(y,"quantizeGeometry");var v={GeometryCollection:function(t){t.geometries.forEach(y)},Point:function(t){t.coordinates=p(t.coordinates)},MultiPoint:function(t){t.coordinates=t.coordinates.map(p)},LineString:function(t){t.arcs=f(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(f)},Polygon:function(t){t.arcs=g(t.arcs)},MultiPolygon:function(t){t.arcs=t.arcs.map(g)}};for(var m in t)y(t[m]);return{scale:[1/l,1/c],translate:[i,o]}}function I(t,r){var o=n(t=m(t)),s=r>0&&o&&E(t,o,r),u=g(h(v(t))),l=u.coordinates,c=i(1.4*u.arcs.length,S,C);function p(t){t&&e.call(f,t.type)&&f[t.type](t)}t=u.objects,u.bbox=o,u.arcs=u.arcs.map((function(t,e){return c.set(t,e),l.slice(t[0],t[1]+1)})),delete u.coordinates,l=null,a(p,"indexGeometry");var f={GeometryCollection:function(t){t.geometries.forEach(p)},LineString:function(t){t.arcs=d(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(d)},Polygon:function(t){t.arcs=t.arcs.map(d)},MultiPolygon:function(t){t.arcs=t.arcs.map(_)}};function d(t){var e=[];do{var n=c.get(t);e.push(t[0]<t[1]?n:~n)}while(t=t.next);return e}function _(t){return t.map(d)}for(var b in a(d,"indexArcs"),a(_,"indexMultiArcs"),t)p(t[b]);return s&&(u.transform=s,u.arcs=y(u.arcs)),u}function S(t){var e,n=t[0],r=t[1];return r<n&&(e=n,n=r,r=e),n+31*r}function C(t,e){var n,r=t[0],i=t[1],o=e[0],a=e[1];return i<r&&(n=r,r=i,i=n),a<o&&(n=o,o=a,a=n),r===o&&i===a}a(c,"hashPoint"),a(p,"join"),a(h,"cut"),a(f,"rotateArray"),a(d,"reverse"),a(g,"dedup"),a(y,"delta"),a(v,"extract"),a(m,"geometry"),a(_,"geomifyObject"),a(b,"geomifyFeatureCollection"),a(w,"geomifyFeature"),a(x,"geomifyGeometry"),a(E,"prequantize"),a(I,"topology"),a(S,"hashArc"),a(C,"equalArc"),t.topology=I,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).topojson=n.topojson||{})})),VI=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-u*c/s+p)),Math.min(o,Math.floor(r+(s-u)*c/s+p)),a)}var h=t[r],f=i,d=o;for(n(t,i,r),a(t[o],h)>0&&n(t,i,o);f<d;){for(n(t,f,d),f++,d--;a(t[f],h)<0;)f++;for(;a(t[d],h)>0;)d--}0===a(t[i],h)?n(t,i,d):n(t,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}return a(t,"quickselect"),a(e,"quickselectStep"),a(n,"swap"),a(r,"defaultCompare"),t},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):n.quickselect=r()})),Ab=Oe(((t,e)=>{m(),e.exports=r,e.exports.default=r;var n=VI();function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],u(i,t.leaf?r(o):o);return i}function u(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function d(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,r,i,o){for(var a,s=[e,r];s.length;)!((r=s.pop())-(e=s.pop())<=i)&&(a=e+Math.ceil((r-e)/i/2)*i,n(t,a,e,r,o),s.push(e,a,a,r))}a(r,"rbush"),r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!y(t,e))return n;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i<o;i++)a=e.children[i],y(t,s=e.leaf?r(a):a)&&(e.leaf?n.push(a):g(t,s)?this._all(a,n):u.push(a));e=u.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!y(t,e))return!1;for(var r,i,o,a,s=[];e;){for(r=0,i=e.children.length;r<i;r++)if(o=e.children[r],y(t,a=e.leaf?n(o):o)){if(e.leaf||g(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=v([]),this},remove:function(t,e){if(!t)return this;for(var n,r,o,a,s=this.data,u=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),a=!0),s.leaf&&-1!==(o=i(t,s.children,e)))return s.children.splice(o,1),l.push(s),this._condense(l),this;a||s.leaf||!g(s,u)?r?(n++,s=r.children[n],a=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,r){var i,a=n-e+1,s=this._maxEntries;if(a<=s)return o(i=v(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=v([])).leaf=!1,i.height=r;var u,l,c,p,h=Math.ceil(a/s),f=h*Math.ceil(Math.sqrt(s));for(_(t,e,n,f,this.compareMinX),u=e;u<=n;u+=f)for(_(t,u,c=Math.min(u+f-1,n),h,this.compareMinY),l=u;l<=c;l+=h)p=Math.min(l+h-1,c),i.children.push(this._build(t,l,p,r-1));return o(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){for(var i,o,a,s,u,l,c,h;r.push(e),!e.leaf&&r.length-1!==n;){for(c=h=1/0,i=0,o=e.children.length;i<o;i++)u=p(a=e.children[i]),(l=f(t,a)-u)<h?(h=l,c=u<c?u:c,s=a):l===h&&u<c&&(c=u,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var r=this.toBBox,i=n?t:r(t),o=[],a=this._chooseSubtree(i,this.data,e,o);for(a.children.push(t),u(a,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=v(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,u,l,c,h;for(l=c=1/0,r=e;r<=n-e;r++)a=d(i=s(t,0,r,this.toBBox),o=s(t,r,n,this.toBBox)),u=p(i)+p(o),a<l?(l=a,h=r,c=u<c?u:c):a===l&&u<c&&(c=u,h=r);return h},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,o,a=this.toBBox,l=s(t,0,e,a),c=s(t,n-e,n,a),p=h(l)+h(c);for(i=e;i<n-e;i++)o=t.children[i],u(l,t.leaf?a(o):o),p+=h(l);for(i=n-e-1;i>=e;i--)o=t.children[i],u(c,t.leaf?a(o):o),p+=h(c);return p},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)u(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},a(i,"findItem"),a(o,"calcBBox"),a(s,"distBBox"),a(u,"extend"),a(l,"compareNodeMinX"),a(c,"compareNodeMinY"),a(p,"bboxArea"),a(h,"bboxMargin"),a(f,"enlargedArea"),a(d,"intersectionArea"),a(g,"contains"),a(y,"intersects"),a(v,"createNode"),a(_,"multiSelect")})),QI=Oe(((t,e)=>{function n(t,e,n){n=n||2;var i,a,s,u,l,c,h,f=e&&e.length,d=f?e[0]*n:t.length,g=r(t,0,d,n,!0),y=[];if(!g||g.next===g.prev)return y;if(f&&(g=p(t,e,g,n)),t.length>80*n){i=s=t[0],a=u=t[1];for(var v=n;v<d;v+=n)(l=t[v])<i&&(i=l),(c=t[v+1])<a&&(a=c),l>s&&(s=l),c>u&&(u=c);h=0!==(h=Math.max(s-i,u-a))?32767/h:0}return o(g,y,n,i,a,h,0),y}function r(t,e,n,r,i){var o,a;if(i===D(t,e,n,r)>0)for(o=e;o<n;o+=r)a=L(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=L(o,t[o],t[o+1],a);return a&&I(a,a.next)&&(T(a),a=a.next),a}function i(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!I(r,r.next)&&0!==E(r.prev,r,r.next))r=r.next;else{if(T(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function o(t,e,n,r,a,p,h){if(t){!h&&p&&y(t,r,a,p);for(var f,d,g=t;t.prev!==t.next;)if(f=t.prev,d=t.next,p?u(t,r,a,p):s(t))e.push(f.i/n|0),e.push(t.i/n|0),e.push(d.i/n|0),T(t),t=d.next,g=d.next;else if((t=d)===g){h?1===h?o(t=l(i(t),e,n),e,n,r,a,p,2):2===h&&c(t,e,n,r,a,p):o(i(t),e,n,r,a,p,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(E(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,l=r.y,c=i<o?i<a?i:a:o<a?o:a,p=s<u?s<l?s:l:u<l?u:l,h=i>o?i>a?i:a:o>a?o:a,f=s>u?s>l?s:l:u>l?u:l,d=r.next;d!==e;){if(d.x>=c&&d.x<=h&&d.y>=p&&d.y<=f&&w(i,s,o,u,a,l,d.x,d.y)&&E(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(E(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,p=o.y,h=a.y,f=s<u?s<l?s:l:u<l?u:l,d=c<p?c<h?c:h:p<h?p:h,g=s>u?s>l?s:l:u>l?u:l,y=c>p?c>h?c:h:p>h?p:h,v=_(f,d,e,n,r),m=_(g,y,e,n,r),b=t.prevZ,x=t.nextZ;b&&b.z>=v&&x&&x.z<=m;){if(b.x>=f&&b.x<=g&&b.y>=d&&b.y<=y&&b!==i&&b!==a&&w(s,c,u,p,l,h,b.x,b.y)&&E(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=f&&x.x<=g&&x.y>=d&&x.y<=y&&x!==i&&x!==a&&w(s,c,u,p,l,h,x.x,x.y)&&E(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=v;){if(b.x>=f&&b.x<=g&&b.y>=d&&b.y<=y&&b!==i&&b!==a&&w(s,c,u,p,l,h,b.x,b.y)&&E(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=m;){if(x.x>=f&&x.x<=g&&x.y>=d&&x.y<=y&&x!==i&&x!==a&&w(s,c,u,p,l,h,x.x,x.y)&&E(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function l(t,e,n){var r=t;do{var o=r.prev,a=r.next.next;!I(o,a)&&S(o,r,r.next,a)&&A(o,a)&&A(a,o)&&(e.push(o.i/n|0),e.push(r.i/n|0),e.push(a.i/n|0),T(r),T(r.next),r=t=a),r=r.next}while(r!==t);return i(r)}function c(t,e,n,r,a,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&x(u,l)){var c=P(u,l);return u=i(u,u.next),c=i(c,c.next),o(u,e,n,r,a,s,0),void o(c,e,n,r,a,s,0)}l=l.next}u=u.next}while(u!==t)}function p(t,e,n,i){var o,a,s,u=[];for(o=0,a=e.length;o<a;o++)(s=r(t,e[o]*i,o<a-1?e[o+1]*i:t.length,i,!1))===s.next&&(s.steiner=!0),u.push(b(s));for(u.sort(h),o=0;o<u.length;o++)n=f(u[o],n);return n}function h(t,e){return t.x-e.x}function f(t,e){var n=d(t,e);if(!n)return e;var r=P(n,t);return i(r,r.next),i(n,n.next)}function d(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,p=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&w(o<p?i:a,o,c,p,o<p?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),A(r,t)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,h=u)),r=r.next}while(r!==l);return n}function g(t,e){return E(t.prev,t,e.prev)<0&&E(e.next,t,t.next)<0}function y(t,e,n,r){var i=t;do{0===i.z&&(i.z=_(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,v(i)}function v(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1);return t}function _(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function b(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function w(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!N(t,e)&&(A(t,e)&&A(e,t)&&O(t,e)&&(E(t.prev,t,e.prev)||E(t,e.prev,e))||I(t,e)&&E(t.prev,t,t.next)>0&&E(e.prev,e,e.next)>0)}function E(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function I(t,e){return t.x===e.x&&t.y===e.y}function S(t,e,n,r){var i=M(E(t,e,n)),o=M(E(t,e,r)),a=M(E(n,r,t)),s=M(E(n,r,e));return!!(i!==o&&a!==s||0===i&&C(t,n,e)||0===o&&C(t,r,e)||0===a&&C(n,t,r)||0===s&&C(n,e,r))}function C(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function M(t){return t>0?1:t<0?-1:0}function N(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&S(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function A(t,e){return E(t.prev,t,t.next)<0?E(t,e,t.next)>=0&&E(t,t.prev,e)>=0:E(t,e,t.prev)<0||E(t,t.next,e)<0}function O(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}function P(t,e){var n=new R(t.i,t.x,t.y),r=new R(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function L(t,e,n,r){var i=new R(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}m(),e.exports=n,e.exports.default=n,a(n,"earcut"),a(r,"linkedList"),a(i,"filterPoints"),a(o,"earcutLinked"),a(s,"isEar"),a(u,"isEarHashed"),a(l,"cureLocalIntersections"),a(c,"splitEarcut"),a(p,"eliminateHoles"),a(h,"compareX"),a(f,"eliminateHole"),a(d,"findHoleBridge"),a(g,"sectorContainsSector"),a(y,"indexCurve"),a(v,"sortLinked"),a(_,"zOrder"),a(b,"getLeftmost"),a(w,"pointInTriangle"),a(x,"isValidDiagonal"),a(E,"area"),a(I,"equals"),a(S,"intersects"),a(C,"onSegment"),a(M,"sign"),a(N,"intersectsPolygon"),a(A,"locallyInside"),a(O,"middleInside"),a(P,"splitPolygon"),a(L,"insertNode"),a(T,"removeNode"),a(R,"Node"),n.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(D(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(D(t,l,c,n))}var p=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,f=r[s+1]*n,d=r[s+2]*n;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},a(D,"signedArea"),n.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}})),$I=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-u*c/s+p)),Math.min(o,Math.floor(r+(s-u)*c/s+p)),a)}var h=t[r],f=i,d=o;for(n(t,i,r),a(t[o],h)>0&&n(t,i,o);f<d;){for(n(t,f,d),f++,d--;a(t[f],h)<0;)f++;for(;a(t[d],h)>0;)d--}0===a(t[i],h)?n(t,i,d):n(t,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}a(t,"quickselect"),a(e,"quickselectStep"),a(n,"swap"),a(r,"defaultCompare");var i=a((function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"RBush");function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function s(t,e){u(t,0,t.children.length,e,t)}function u(t,e,n,r,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var a=t.children[o];l(i,t.leaf?r(a):a)}return i}function l(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function c(t,e){return t.minX-e.minX}function p(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function g(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=a((function(){return this._all(this.data,[])}),"all"),i.prototype.search=a((function(t){var e=this.data,n=[];if(!v(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?r(a):a;v(t,s)&&(e.leaf?n.push(a):y(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}),"search"),i.prototype.collides=a((function(t){var e=this.data;if(!v(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(v(t,o)){if(e.leaf||y(t,o))return!0;n.push(i)}}e=n.pop()}return!1}),"collides"),i.prototype.load=a((function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this}),"load"),i.prototype.insert=a((function(t){return t&&this._insert(t,this.data.height-1),this}),"insert"),i.prototype.clear=a((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=a((function(t,e){if(!t)return this;for(var n,r,i,a=this.data,s=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=l.pop(),i=!0),a.leaf){var c=o(t,a.children,e);if(-1!==c)return a.children.splice(c,1),u.push(a),this._condense(u),this}i||a.leaf||!y(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(u.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this}),"remove"),i.prototype.toBBox=a((function(t){return t}),"toBBox"),i.prototype.compareMinX=a((function(t,e){return t.minX-e.minX}),"compareMinX"),i.prototype.compareMinY=a((function(t,e){return t.minY-e.minY}),"compareMinY"),i.prototype.toJSON=a((function(){return this.data}),"toJSON"),i.prototype.fromJSON=a((function(t){return this.data=t,this}),"fromJSON"),i.prototype._all=a((function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e}),"_all"),i.prototype._build=a((function(t,e,n,r){var i,o=n-e+1,a=this._maxEntries;if(o<=a)return s(i=m(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),(i=m([])).leaf=!1,i.height=r;var u=Math.ceil(o/a),l=u*Math.ceil(Math.sqrt(a));_(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var p=Math.min(c+l-1,n);_(t,c,p,u,this.compareMinY);for(var h=c;h<=p;h+=u){var f=Math.min(h+u-1,p);i.children.push(this._build(t,h,f,r-1))}}return s(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=a((function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var u=e.children[s],l=h(u),c=d(t,u)-l;c<o?(o=c,i=l<i?l:i,a=u):c===o&&l<i&&(i=l,a=u)}e=a||e.children[0]}return e}),"_chooseSubtree"),i.prototype._insert=a((function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),l(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}),"_insert"),i.prototype._split=a((function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}),"_split"),i.prototype._splitRoot=a((function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=a((function(t,e,n){for(var r,i=1/0,o=1/0,a=e;a<=n-e;a++){var s=u(t,0,a,this.toBBox),l=u(t,a,n,this.toBBox),c=g(s,l),p=h(s)+h(l);c<i?(i=c,r=a,o=p<o?p:o):c===i&&p<o&&(o=p,r=a)}return r||n-e}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=a((function(t,e,n){var r=t.leaf?this.compareMinX:c,i=t.leaf?this.compareMinY:p;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}),"_chooseSplitAxis"),i.prototype._allDistMargin=a((function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=u(t,0,e,i),a=u(t,n-e,n,i),s=f(o)+f(a),c=e;c<n-e;c++){var p=t.children[c];l(o,t.leaf?i(p):p),s+=f(o)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];l(a,t.leaf?i(d):d),s+=f(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=a((function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)}),"_adjustParentBBoxes"),i.prototype._condense=a((function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)}),"_condense"),a(o,"findItem"),a(s,"calcBBox"),a(u,"distBBox"),a(l,"extend"),a(c,"compareNodeMinX"),a(p,"compareNodeMinY"),a(h,"bboxArea"),a(f,"bboxMargin"),a(d,"enlargedArea"),a(g,"intersectionArea"),a(y,"contains"),a(v,"intersects"),a(m,"createNode"),a(_,"multiSelect"),i},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),Xb=Oe((t=>{function e(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function n(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return r(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return o(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return p(e).geometry;case"MultiPolygon":return f(e).geometry;default:throw new Error(t+" is invalid")}}function r(t,n,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!S(t[0])||!S(t[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:t},n,r)}function i(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return r(t,e)})),n)}function o(t,n,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:t},n,r)}function s(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return o(t,e)})),n)}function u(t,n,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:t},n,r)}function l(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return u(t,e)})),n)}function c(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function p(t,n,r){return void 0===r&&(r={}),e({type:"MultiLineString",coordinates:t},n,r)}function h(t,n,r){return void 0===r&&(r={}),e({type:"MultiPoint",coordinates:t},n,r)}function f(t,n,r){return void 0===r&&(r={}),e({type:"MultiPolygon",coordinates:t},n,r)}function d(t,n,r){return void 0===r&&(r={}),e({type:"GeometryCollection",geometries:t},n,r)}function g(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function y(e,n){void 0===n&&(n="kilometers");var r=t.factors[n];if(!r)throw new Error(n+" units is invalid");return e*r}function v(e,n){void 0===n&&(n="kilometers");var r=t.factors[n];if(!r)throw new Error(n+" units is invalid");return e/r}function _(t,e){return w(v(t,e))}function b(t){var e=t%360;return e<0&&(e+=360),e}function w(t){return 180*(t%(2*Math.PI))/Math.PI}function x(t){return t%360*Math.PI/180}function E(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return y(v(t,e),n)}function I(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var o=t.areaFactors[r];if(!o)throw new Error("invalid final units");return e/i*o}function S(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function C(t){return!!t&&t.constructor===Object}function M(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!S(t))throw new Error("bbox must only contain numbers")}))}function N(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}m(),Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.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},a(e,"feature"),t.feature=e,a(n,"geometry"),t.geometry=n,a(r,"point"),t.point=r,a(i,"points"),t.points=i,a(o,"polygon"),t.polygon=o,a(s,"polygons"),t.polygons=s,a(u,"lineString"),t.lineString=u,a(l,"lineStrings"),t.lineStrings=l,a(c,"featureCollection"),t.featureCollection=c,a(p,"multiLineString"),t.multiLineString=p,a(h,"multiPoint"),t.multiPoint=h,a(f,"multiPolygon"),t.multiPolygon=f,a(d,"geometryCollection"),t.geometryCollection=d,a(g,"round"),t.round=g,a(y,"radiansToLength"),t.radiansToLength=y,a(v,"lengthToRadians"),t.lengthToRadians=v,a(_,"lengthToDegrees"),t.lengthToDegrees=_,a(b,"bearingToAzimuth"),t.bearingToAzimuth=b,a(w,"radiansToDegrees"),t.radiansToDegrees=w,a(x,"degreesToRadians"),t.degreesToRadians=x,a(E,"convertLength"),t.convertLength=E,a(I,"convertArea"),t.convertArea=I,a(S,"isNumber"),t.isNumber=S,a(C,"isObject"),t.isObject=C,a(M,"validateBBox"),t.validateBBox=M,a(N,"validateId"),t.validateId=N})),Wb=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0});var e=Xb();function n(t,e,r){if(null!==t)for(var i,o,a,s,u,l,c,p,h=0,f=0,d=t.type,g="FeatureCollection"===d,y="Feature"===d,v=g?t.features.length:1,m=0;m<v;m++){u=(p=!!(c=g?t.features[m].geometry:y?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<u;_++){var b=0,w=0;if(null!==(s=p?c.geometries[_]:c)){l=s.coordinates;var x=s.type;switch(h=!r||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(l,f,m,b,w))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(!1===e(l[i],f,m,b,w))return!1;f++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(o=0;o<l[i].length-h;o++){if(!1===e(l[i][o],f,m,b,w))return!1;f++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(w=0,o=0;o<l[i].length;o++){for(a=0;a<l[i][o].length-h;a++){if(!1===e(l[i][o][a],f,m,b,w))return!1;f++}w++}b++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===n(s.geometries[i],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(t,e,r,i){var o=r;return n(t,(function(t,n,i,a,s){o=0===n&&void 0===r?t:e(o,t,n,i,a,s)}),i),o}function i(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function o(t,e,n){var r=n;return i(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function u(t,e,n){var r=n;return s(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function l(t){var e=[];return n(t,(function(t){e.push(t)})),e}function c(t,e){var n,r,i,o,a,s,u,l,c,p,h=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(s=f?t.features[n].geometry:d?t.geometry:t,l=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,p=f?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,p))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,p))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,p))return!1;h++}}function p(t,e,n){var r=n;return c(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r}function h(t,n){c(t,(function(t,r,i,o,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==n(e.feature(t,i,{bbox:o,id:a}),r,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:s,coordinates:t.coordinates[l]};if(!1===n(e.feature(c,i),r,l))return!1}}))}function f(t,e,n){var r=n;return h(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function d(t,r){h(t,(function(t,i,o){var a=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var u,l=0,c=0,p=0;if(!1===n(t,(function(n,s,h,f,d){if(void 0===u||i>l||f>c||d>p)return u=n,l=i,c=f,p=d,void(a=0);var g=e.lineString([u,n],t.properties);if(!1===r(g,i,o,d,a))return!1;a++,u=n})))return!1}}}))}function g(t,e,n){var r=n,i=!1;return d(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function y(t,n){if(!t)throw new Error("geojson is required");h(t,(function(t,r,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===n(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===n(e.lineString(a[s],t.properties),r,i,s))return!1}}}))}function v(t,e,n){var r=n;return y(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r}function _(t,n){if(n=n||{},!e.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,a=n.geometryIndex||0,s=n.segmentIndex||0,u=n.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":u=u||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var l=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),e.lineString([l[s],l[s+1]],u,n);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s-1),e.lineString([l[a][s],l[a][s+1]],u,n);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),e.lineString([l[o][s],l[o][s+1]],u,n);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s-1),e.lineString([l[o][a][s],l[o][a][s+1]],u,n)}throw new Error("geojson is invalid")}function b(t,n){if(n=n||{},!e.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,a=n.geometryIndex||0,s=n.coordIndex||0,u=n.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":u=u||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var l=r.coordinates;switch(r.type){case"Point":return e.point(l,u,n);case"MultiPoint":return o<0&&(o=l.length+o),e.point(l[o],u,n);case"LineString":return s<0&&(s=l.length+s),e.point(l[s],u,n);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s),e.point(l[a][s],u,n);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),e.point(l[o][s],u,n);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s),e.point(l[o][a][s],u,n)}throw new Error("geojson is invalid")}a(n,"coordEach"),a(r,"coordReduce"),a(i,"propEach"),a(o,"propReduce"),a(s,"featureEach"),a(u,"featureReduce"),a(l,"coordAll"),a(c,"geomEach"),a(p,"geomReduce"),a(h,"flattenEach"),a(f,"flattenReduce"),a(d,"segmentEach"),a(g,"segmentReduce"),a(y,"lineEach"),a(v,"lineReduce"),a(_,"findSegment"),a(b,"findPoint"),t.coordAll=l,t.coordEach=n,t.coordReduce=r,t.featureEach=s,t.featureReduce=u,t.findPoint=b,t.findSegment=_,t.flattenEach=h,t.flattenReduce=f,t.geomEach=c,t.geomReduce=p,t.lineEach=y,t.lineReduce=v,t.propEach=i,t.propReduce=o,t.segmentEach=d,t.segmentReduce=g})),lP=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0});var e=Wb();function n(t){var n=[1/0,1/0,-1/0,-1/0];return e.coordEach(t,(function(t){n[0]>t[0]&&(n[0]=t[0]),n[1]>t[1]&&(n[1]=t[1]),n[2]<t[0]&&(n[2]=t[0]),n[3]<t[1]&&(n[3]=t[1])})),n}a(n,"bbox"),n.default=n,t.default=n})),sv=Oe(((t,e)=>{m();var n=$I(),r=Xb(),i=Wb(),o=lP().default,s=i.featureEach,u=(i.coordEach,r.polygon,r.featureCollection);function l(t){var e=new n(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),n.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})):s(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})),n.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),n.prototype.remove.call(this,t,e)},e.clear=function(){return n.prototype.clear.call(this)},e.search=function(t){var e=n.prototype.search.call(this,this.toBBox(t));return u(e)},e.collides=function(t){return n.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=n.prototype.all.call(this);return u(t)},e.toJSON=function(){return n.prototype.toJSON.call(this)},e.fromJSON=function(t){return n.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}a(l,"geojsonRbush"),e.exports=l,e.exports.default=l})),tw=Oe(((t,e)=>{m();var n=Object.prototype.toString;e.exports=a((function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}),"isArguments")})),TP=Oe(((t,e)=>{var n,r,i,o,s,u,l,c,p,h,f,d;m(),Object.keys||(r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=tw(),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),l=s.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=a((function(t){var e=t.constructor;return e&&e.prototype===t}),"equalsConstructorPrototype"),h={$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},f=function(){if(typeof window>"u")return!1;for(var t in window)try{if(!h["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{p(window[t])}catch{return!0}}catch{return!0}return!1}(),d=a((function(t){if(typeof window>"u"||!f)return p(t);try{return p(t)}catch{return!1}}),"equalsConstructorPrototypeIfNotBuggy"),n=a((function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),a=o(t),s=e&&"[object String]"===i.call(t),p=[];if(!e&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var h=l&&n;if(s&&t.length>0&&!r.call(t,0))for(var f=0;f<t.length;++f)p.push(String(f));if(a&&t.length>0)for(var g=0;g<t.length;++g)p.push(String(g));else for(var y in t)(!h||"prototype"!==y)&&r.call(t,y)&&p.push(String(y));if(u)for(var v=d(t),m=0;m<c.length;++m)(!v||"constructor"!==c[m])&&r.call(t,c[m])&&p.push(c[m]);return p}),"keys")),e.exports=n})),pv=Oe(((t,e)=>{m();var n=Array.prototype.slice,r=tw(),i=Object.keys,o=i?a((function(t){return i(t)}),"keys"):TP(),s=Object.keys;o.shim=a((function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=a((function(t){return r(t)?s(n.call(t)):s(t)}),"keys"))}else Object.keys=o;return Object.keys||o}),"shimObjectKeys"),e.exports=o})),FP=Oe(((t,e)=>{m(),e.exports=a((function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}),"hasSymbols")})),iw=Oe(((t,e)=>{m();var n=FP();e.exports=a((function(){return n()&&!!Symbol.toStringTag}),"hasToStringTagShams")})),zP=Oe(((t,e)=>{m(),e.exports=a((function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}),"hasSymbols")})),UP=Oe(((t,e)=>{m();var n=typeof Symbol<"u"&&Symbol,r=zP();e.exports=a((function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&r()}),"hasNativeSymbols")})),XP=Oe(((t,e)=>{m();var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";e.exports=a((function(t){var e=this;if("function"!=typeof e||i.call(e)!==o)throw new TypeError(n+e);for(var s,u=r.call(arguments,1),l=a((function(){if(this instanceof s){var n=e.apply(this,u.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,u.concat(r.call(arguments)))}),"binder"),c=Math.max(0,e.length-u.length),p=[],h=0;h<c;h++)p.push("$"+h);if(s=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(l),e.prototype){var f=a((function(){}),"Empty");f.prototype=e.prototype,s.prototype=new f,f.prototype=null}return s}),"bind")})),dh=Oe(((t,e)=>{m();var n=XP();e.exports=Function.prototype.bind||n})),ow=Oe(((t,e)=>{m();var n=dh();e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)})),lw=Oe(((t,e)=>{m();var n,r=SyntaxError,i=Function,o=TypeError,s=a((function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch{}}),"getEvalledConstructor"),u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var l=a((function(){throw new o}),"throwTypeError"),c=u?function(){try{return l}catch{try{return u(arguments,"callee").get}catch{return l}}}():l,p=UP()(),h=Object.getPrototypeOf||function(t){return t.__proto__},f={},d=typeof Uint8Array>"u"?n:h(Uint8Array),g={"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":p?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?n:h((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?n:h((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?h(""[Symbol.iterator]()):n,"%Symbol%":p?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet},y=a((function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return g[e]=n,n}),"doEval"),v={"%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"]},_=dh(),b=ow(),w=_.call(Function.call,Array.prototype.concat),x=_.call(Function.apply,Array.prototype.splice),E=_.call(Function.call,String.prototype.replace),I=_.call(Function.call,String.prototype.slice),S=_.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,N=a((function(t){var e=I(t,0,1),n=I(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return E(t,C,(function(t,e,n,r){i[i.length]=n?E(r,M,"$1"):e||t})),i}),"stringToPath"),A=a((function(t,e){var n,i=t;if(b(v,i)&&(i="%"+(n=v[i])[0]+"%"),b(g,i)){var a=g[i];if(a===f&&(a=y(i)),typeof a>"u"&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+t+" does not exist!")}),"getBaseIntrinsic");e.exports=a((function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/g,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(t),i=n.length>0?n[0]:"",a=A("%"+i+"%",e),s=a.name,l=a.value,c=!1,p=a.alias;p&&(i=p[0],x(n,w([0,1],p)));for(var h=1,f=!0;h<n.length;h+=1){var d=n[h],y=I(d,0,1),v=I(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===v||"'"===v||"`"===v)&&y!==v)throw new r("property names with quotes must have matching quotes");if(("constructor"===d||!f)&&(c=!0),b(g,s="%"+(i+="."+d)+"%"))l=g[s];else if(null!=l){if(!(d in l)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&h+1>=n.length){var m=u(l,d);l=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:l[d]}else f=b(l,d),l=l[d];f&&!c&&(g[s]=l)}}return l}),"GetIntrinsic")})),vv=Oe(((t,e)=>{m();var n=dh(),r=lw(),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||n.call(o,i),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=a((function(t){var e=s(n,o,arguments);if(u&&l){var r=u(e,"length");r.configurable&&l(e,"length",{value:1+c(0,t.length-(arguments.length-1))})}return e}),"callBind");var p=a((function(){return s(n,i,arguments)}),"applyBind");l?l(e.exports,"apply",{value:p}):e.exports.apply=p})),fw=Oe(((t,e)=>{m();var n=lw(),r=vv(),i=r(n("String.prototype.indexOf"));e.exports=a((function(t,e){var o=n(t,!!e);return"function"==typeof o&&i(t,".prototype.")>-1?r(o):o}),"callBoundIntrinsic")})),uC=Oe(((t,e)=>{m();var n=iw()(),r=fw()("Object.prototype.toString"),i=a((function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===r(t)}),"isArguments"),o=a((function(t){return!!i(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==r(t)&&"[object Function]"===r(t.callee)}),"isArguments"),s=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=s?i:o})),dw=Oe(((t,e)=>{m();var n=pv(),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,u=a((function(t){return"function"==typeof t&&"[object Function]"===i.call(t)}),"isFunction"),l=a((function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch{return!1}}),"arePropertyDescriptorsSupported"),c=s&&l(),p=a((function(t,e,n,r){e in t&&(!u(r)||!r())||(c?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)}),"defineProperty"),h=a((function(t,e){var i=arguments.length>2?arguments[2]:{},a=n(e);r&&(a=o.call(a,Object.getOwnPropertySymbols(e)));for(var s=0;s<a.length;s+=1)p(t,a[s],e[a[s]],i[a[s]])}),"defineProperties");h.supportsDescriptors=!!c,e.exports=h})),gw=Oe(((t,e)=>{m();var n=a((function(t){return t!=t}),"numberIsNaN");e.exports=a((function(t,e){return 0===t&&0===e?1/t==1/e:!!(t===e||n(t)&&n(e))}),"is")})),vw=Oe(((t,e)=>{m();var n=gw();e.exports=a((function(){return"function"==typeof Object.is?Object.is:n}),"getPolyfill")})),vC=Oe(((t,e)=>{m();var n=vw(),r=dw();e.exports=a((function(){var t=n();return r(Object,{is:t},{is:a((function(){return Object.is!==t}),"testObjectIs")}),t}),"shimObjectIs")})),bC=Oe(((t,e)=>{m();var n=dw(),r=vv(),i=gw(),o=vw(),a=vC(),s=r(o(),Object);n(s,{getPolyfill:o,implementation:i,shim:a}),e.exports=s})),SC=Oe(((t,e)=>{m();var n,r,i,o,s=fw(),u=iw()();u&&(n=s("Object.prototype.hasOwnProperty"),r=s("RegExp.prototype.exec"),i={},l=a((function(){throw i}),"throwRegexMarker"),o={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(o[Symbol.toPrimitive]=l));var l,c=s("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=a(u?function(t){if(!t||"object"!=typeof t)return!1;var e=p(t,"lastIndex");if(!(e&&n(e,"value")))return!1;try{r(t,o)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===c(t)},"isRegex")})),PC=Oe(((t,e)=>{m(),e.exports=a((function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}),"hasSymbols")})),OC=Oe(((t,e)=>{m();var n=typeof Symbol<"u"&&Symbol,r=PC();e.exports=a((function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&r()}),"hasNativeSymbols")})),RC=Oe(((t,e)=>{m();var n,r=SyntaxError,i=Function,o=TypeError,s=a((function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch{}}),"getEvalledConstructor"),u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var l=a((function(){throw new o}),"throwTypeError"),c=u?function(){try{return l}catch{try{return u(arguments,"callee").get}catch{return l}}}():l,p=OC()(),h=Object.getPrototypeOf||function(t){return t.__proto__},f={},d=typeof Uint8Array>"u"?n:h(Uint8Array),g={"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":p?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?n:h((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?n:h((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?h(""[Symbol.iterator]()):n,"%Symbol%":p?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet},y=a((function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return g[e]=n,n}),"doEval"),v={"%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"]},_=dh(),b=ow(),w=_.call(Function.call,Array.prototype.concat),x=_.call(Function.apply,Array.prototype.splice),E=_.call(Function.call,String.prototype.replace),I=_.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,M=a((function(t){var e=I(t,0,1),n=I(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return E(t,S,(function(t,e,n,r){i[i.length]=n?E(r,C,"$1"):e||t})),i}),"stringToPath"),N=a((function(t,e){var n,i=t;if(b(v,i)&&(i="%"+(n=v[i])[0]+"%"),b(g,i)){var a=g[i];if(a===f&&(a=y(i)),typeof a>"u"&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+t+" does not exist!")}),"getBaseIntrinsic");e.exports=a((function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');var n=M(t),i=n.length>0?n[0]:"",a=N("%"+i+"%",e),s=a.name,l=a.value,c=!1,p=a.alias;p&&(i=p[0],x(n,w([0,1],p)));for(var h=1,f=!0;h<n.length;h+=1){var d=n[h],y=I(d,0,1),v=I(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===v||"'"===v||"`"===v)&&y!==v)throw new r("property names with quotes must have matching quotes");if(("constructor"===d||!f)&&(c=!0),b(g,s="%"+(i+="."+d)+"%"))l=g[s];else if(null!=l){if(!(d in l)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&h+1>=n.length){var m=u(l,d);l=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:l[d]}else f=b(l,d),l=l[d];f&&!c&&(g[s]=l)}}return l}),"GetIntrinsic")})),FC=Oe(((t,e)=>{m();var n=RC()("%Object.defineProperty%",!0),r=a((function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1}),"hasPropertyDescriptors");r.hasArrayLengthDefineBug=a((function(){if(!r())return null;try{return 1!==n([],"length",{value:1}).length}catch{return!0}}),"hasArrayLengthDefineBug"),e.exports=r})),Ev=Oe(((t,e)=>{m();var n=pv(),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,u=a((function(t){return"function"==typeof t&&"[object Function]"===i.call(t)}),"isFunction"),l=FC()(),c=s&&l,p=a((function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if(!u(r)||!r())return;c?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n}),"defineProperty"),h=a((function(t,e){var i=arguments.length>2?arguments[2]:{},a=n(e);r&&(a=o.call(a,Object.getOwnPropertySymbols(e)));for(var s=0;s<a.length;s+=1)p(t,a[s],e[a[s]],i[a[s]])}),"defineProperties");h.supportsDescriptors=!!c,e.exports=h})),UC=Oe(((t,e)=>{m();var n=a((function(){return"string"==typeof a((function(){}),"f").name}),"functionsHaveNames"),r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch{r=null}n.functionsHaveConfigurableNames=a((function(){if(!n()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable}),"functionsHaveConfigurableNames");var i=Function.prototype.bind;n.boundFunctionsHaveNames=a((function(){return n()&&"function"==typeof i&&""!==a((function(){}),"f").bind().name}),"boundFunctionsHaveNames"),e.exports=n})),Sw=Oe(((t,e)=>{m();var n=UC().functionsHaveConfigurableNames(),r=Object,i=TypeError;e.exports=a((function(){if(null!=this&&this!==r(this))throw new i("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"),n&&Object.defineProperty&&Object.defineProperty(e.exports,"name",{value:"get flags"})})),Iw=Oe(((t,e)=>{m();var n=Sw(),r=Ev().supportsDescriptors,i=Object.getOwnPropertyDescriptor;e.exports=a((function(){if(r&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",o={};if(Object.defineProperty(o,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(o,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}),"getPolyfill")})),WC=Oe(((t,e)=>{m();var n=Ev().supportsDescriptors,r=Iw(),i=Object.getOwnPropertyDescriptor,o=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,l=/a/;e.exports=a((function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=r(),e=u(l),a=i(e,"flags");return(!a||a.get!==t)&&o(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}),"shimFlags")})),ZC=Oe(((t,e)=>{m();var n=Ev(),r=vv(),i=Sw(),o=Iw(),a=WC(),s=r(o());n(s,{getPolyfill:o,implementation:i,shim:a}),e.exports=s})),$C=Oe(((t,e)=>{m();var n=Date.prototype.getDay,r=a((function(t){try{return n.call(t),!0}catch{return!1}}),"tryDateGetDayCall"),i=Object.prototype.toString,o="function"==typeof Symbol&&!!Symbol.toStringTag;e.exports=a((function(t){return"object"==typeof t&&null!==t&&(o?r(t):"[object Date]"===i.call(t))}),"isDateObject")})),Pw=Oe(((t,e)=>{m();var n=pv(),r=uC(),i=bC(),o=SC(),s=ZC(),u=$C(),l=Date.prototype.getTime;function c(t,e,n){var r=n||{};return!!(r.strict?i(t,e):t===e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?i(t,e):t==e:f(t,e,r))}function p(t){return null==t}function h(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}function f(t,e,i){var a,f;if(typeof t!=typeof e||p(t)||p(e)||t.prototype!==e.prototype||r(t)!==r(e))return!1;var d=o(t),g=o(e);if(d!==g)return!1;if(d||g)return t.source===e.source&&s(t)===s(e);if(u(t)&&u(e))return l.call(t)===l.call(e);var y=h(t),v=h(e);if(y!==v)return!1;if(y||v){if(t.length!==e.length)return!1;for(a=0;a<t.length;a++)if(t[a]!==e[a])return!1;return!0}if(typeof t!=typeof e)return!1;try{var m=n(t),_=n(e)}catch{return!1}if(m.length!==_.length)return!1;for(m.sort(),_.sort(),a=m.length-1;a>=0;a--)if(m[a]!=_[a])return!1;for(a=m.length-1;a>=0;a--)if(!c(t[f=m[a]],e[f],i))return!1;return!0}a(c,"deepEqual"),a(p,"isUndefinedOrNull"),a(h,"isBuffer"),a(f,"objEquiv"),e.exports=c})),jw=Oe(((t,e)=>{m();var n=Pw(),r=a((function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:s}),"Equality");function i(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function o(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function s(t,e){return n(t,e,{strict:!0})}r.prototype.compare=function(t,e){if(t.type!==e.type||!o(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,r=i(t),a=i(e);return r.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),a)}}return!1},a(i,"explode"),a(o,"sameLength"),r.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n].toFixed(this.precision)!==e[n].toFixed(this.precision))return!1;return!0},r.prototype.compareLine=function(t,e,n,r){if(!o(t,e))return!1;var i=this.pseudoNode?t:this.removePseudo(t),a=this.pseudoNode?e:this.removePseudo(e);if(!r||this.compareCoord(i[0],a[0])||(a=this.fixStartIndex(a,i))){var s=this.compareCoord(i[n],a[n]);return this.direction||s?this.comparePath(i,a):!!this.compareCoord(i[n],a[a.length-(1+n)])&&this.comparePath(i.slice().reverse(),a)}},r.prototype.fixStartIndex=function(t,e){for(var n,r=-1,i=0;i<t.length;i++)if(this.compareCoord(t[i],e[0])){r=i;break}return r>=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n},r.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},r.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),r=e.coordinates.slice(1,e.coordinates.length),i=this;return n.every((function(t){return this.some((function(e){return i.compareLine(t,e,1,!0)}))}),r)}return!1},r.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},r.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},r.prototype.removePseudo=function(t){return t},a(s,"objectComparator"),e.exports=r})),yk=Oe(((t,e)=>{function n(t,e,n,r){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,r)}m(),a(n,"DBSCAN"),n.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var i=0;i<this._datasetLength;i++)if(1!==this._visited[i]){this._visited[i]=1;var o=this._regionQuery(i);if(o.length<this.minPts)this.noise.push(i);else{var a=this.clusters.length;this.clusters.push([]),this._addToCluster(i,a),this._expandCluster(a,o)}}return this.clusters},n.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},n.prototype._expandCluster=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(1!==this._visited[r]){this._visited[r]=1;var i=this._regionQuery(r);i.length>=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[r]&&this._addToCluster(r,t)}},n.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},n.prototype._regionQuery=function(t){for(var e=[],n=0;n<this._datasetLength;n++){this.distance(this.dataset[t],this.dataset[n])<this.epsilon&&e.push(n)}return e},n.prototype._mergeArrays=function(t,e){for(var n=e.length,r=0;r<n;r++){var i=e[r];t.indexOf(i)<0&&t.push(i)}return t},n.prototype._euclideanDistance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},typeof e<"u"&&e.exports&&(e.exports=n)})),_k=Oe(((t,e)=>{function n(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}m(),a(n,"KMEANS"),n.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],typeof t<"u"&&(this.dataset=t),typeof e<"u"&&(this.k=e),typeof n<"u"&&(this.distance=n)},n.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,r=0;r<this.k;r++)this.centroids[r]=this.randomCentroid();for(var i=!0;i;){i=this.assign();for(var o=0;o<this.k;o++){for(var a=new Array(c),s=0,u=0;u<c;u++)a[u]=0;for(var l=0;l<n;l++){var c=this.dataset[l].length;if(o===this.assignments[l]){for(u=0;u<c;u++)a[u]+=this.dataset[l][u];s++}}if(s>0){for(u=0;u<c;u++)a[u]/=s;this.centroids[o]=a}else this.centroids[o]=this.randomCentroid(),i=!0}}return this.getClusters()},n.prototype.randomCentroid=function(){var t,e,n=this.dataset.length-1;do{e=Math.round(Math.random()*n),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},n.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,r=0;r<n;r++)(t=this.argmin(this.dataset[r],this.centroids,this.distance))!=this.assignments[r]&&(this.assignments[r]=t,e=!0);return e},n.prototype.getClusters=function(){for(var t,e=new Array(this.k),n=0;n<this.assignments.length;n++)typeof e[t=this.assignments[n]]>"u"&&(e[t]=[]),e[t].push(n);return e},n.prototype.argmin=function(t,e,n){for(var r,i=Number.MAX_VALUE,o=0,a=e.length,s=0;s<a;s++)(r=n(t,e[s]))<i&&(i=r,o=s);return o},n.prototype.distance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;){var i=t[r]-e[r];n+=i*i}return Math.sqrt(n)},typeof e<"u"&&e.exports&&(e.exports=n)})),zw=Oe(((t,e)=>{function n(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}m(),a(n,"PriorityQueue"),n.prototype.insert=function(t,e){for(var n=this._queue.length,r=n;r--;){var i=this._priorities[r];"desc"===this._sorting?e>i&&(n=r):e<i&&(n=r)}this._insertAt(t,e,n)},n.prototype.remove=function(t){for(var e=this._queue.length;e--;){if(t===this._queue[e]){this._queue.splice(e,1),this._priorities.splice(e,1);break}}},n.prototype.forEach=function(t){this._queue.forEach(t)},n.prototype.getElements=function(){return this._queue},n.prototype.getElementPriority=function(t){return this._priorities[t]},n.prototype.getPriorities=function(){return this._priorities},n.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,n=this._queue.length;e<n;e++)t.push([this._queue[e],this._priorities[e]]);return t},n.prototype._init=function(t,e,n){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var r=0;r<t.length;r++)this.insert(t[r],e[r])}n&&(this._sorting=n)},n.prototype._insertAt=function(t,e,n){this._queue.length===n?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(n,0,t),this._priorities.splice(n,0,e))},typeof e<"u"&&e.exports&&(e.exports=n)})),wk=Oe(((t,e)=>{var n;function r(t,e,n,r){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,r)}m(),typeof e<"u"&&e.exports&&(n=zw()),a(r,"OPTICS"),r.prototype.run=function(t,e,r,i){this._init(t,e,r,i);for(var o=0,a=this.dataset.length;o<a;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var s=this.clusters.length-1;this._orderedList.push(o);var u=new n(null,null,"asc"),l=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,l,u),this._expandCluster(s,u))}return this.clusters},r.prototype.getReachabilityPlot=function(){for(var t=[],e=0,n=this._orderedList.length;e<n;e++){var r=this._orderedList[e],i=this._reachability[r];t.push([r,i])}return t},r.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},r.prototype._updateQueue=function(t,e,n){var r=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===r._processed[e]){var i=r.distance(r.dataset[t],r.dataset[e]),o=Math.max(r._coreDistance,i);void 0===r._reachability[e]?(r._reachability[e]=o,n.insert(e,o)):o<r._reachability[e]&&(r._reachability[e]=o,n.remove(e),n.insert(e,o))}}))},r.prototype._expandCluster=function(t,e){for(var n=e.getElements(),r=0,i=n.length;r<i;r++){var o=n[r];if(void 0===this._processed[o]){var a=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,a,e),this._expandCluster(t,e))}}},r.prototype._distanceToCore=function(t){for(var e=this.epsilon,n=0;n<e;n++){if(this._regionQuery(t,n).length>=this.minPts)return n}},r.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],r=0,i=this.dataset.length;r<i;r++)this.distance(this.dataset[t],this.dataset[r])<e&&n.push(r);return n},r.prototype._euclideanDistance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},typeof e<"u"&&e.exports&&(e.exports=r)})),Ek=Oe(((t,e)=>{m(),typeof e<"u"&&e.exports&&(e.exports={DBSCAN:yk(),KMEANS:_k(),OPTICS:wk(),PriorityQueue:zw()})})),Gw=Oe(((t,e)=>{m(),e.exports={eudist:a((function(t,e,n){for(var r=t.length,i=0,o=0;o<r;o++){var a=(t[o]||0)-(e[o]||0);i+=a*a}return n?Math.sqrt(i):i}),"eudist"),mandist:a((function(t,e,n){for(var r=t.length,i=0,o=0;o<r;o++)i+=Math.abs((t[o]||0)-(e[o]||0));return n?Math.sqrt(i):i}),"mandist"),dist:a((function(t,e,n){var r=Math.abs(t-e);return n?r:r*r}),"dist")}})),Pk=Oe(((t,e)=>{m();var n=Gw(),r=n.eudist,i=n.dist;e.exports={kmrand:a((function(t,e){for(var n={},r=[],i=e<<2,o=t.length,a=t[0].length>0;r.length<e&&i-- >0;){var s=t[Math.floor(Math.random()*o)],u=a?s.join("_"):""+s;n[u]||(n[u]=!0,r.push(s))}if(r.length<e)throw new Error("Error initializating clusters");return r}),"kmrand"),kmpp:a((function(t,e){var n=t[0].length?r:i,o=[],a=t.length,s=t[0].length>0,u=t[Math.floor(Math.random()*a)];s&&u.join("_");for(o.push(u);o.length<e;){for(var l=[],c=o.length,p=0,h=[],f=0;f<a;f++){for(var d=1/0,g=0;g<c;g++){var y=n(t[f],o[g]);y<=d&&(d=y)}l[f]=d}for(var v=0;v<a;v++)p+=l[v];for(var m=0;m<a;m++)h[m]={i:m,v:t[m],pr:l[m]/p,cs:0};h.sort((function(t,e){return t.pr-e.pr})),h[0].cs=h[0].pr;for(var _=1;_<a;_++)h[_].cs=h[_-1].cs+h[_].pr;for(var b=Math.random(),w=0;w<a-1&&h[w++].cs<b;);o.push(h[w-1].v)}return o}),"kmpp")}})),Tk=Oe(((t,e)=>{m();var n=Gw(),r=Pk(),i=n.eudist,o=(n.mandist,n.dist,r.kmrand),s=r.kmpp;function u(t,e,n){n=n||[];for(var r=0;r<t;r++)n[r]=e;return n}function l(t,e,n,r){var a=[],l=[],c=[],p=[],h=!1,f=r||1e4,d=t.length,g=t[0].length,y=g>0,v=[];if(n)a="kmrand"==n?o(t,e):"kmpp"==n?s(t,e):n;else for(var m={};a.length<e;){var _=Math.floor(Math.random()*d);m[_]||(m[_]=!0,a.push(t[_]))}do{u(e,0,v);for(var b=0;b<d;b++){for(var w=1/0,x=0,E=0;E<e;E++){(p=y?i(t[b],a[E]):Math.abs(t[b]-a[E]))<=w&&(w=p,x=E)}c[b]=x,v[x]++}for(var I=[],S=(l=[],0);S<e;S++)I[S]=y?u(g,0,I[S]):0,l[S]=a[S];if(y){for(var C=0;C<e;C++)a[C]=[];for(var M=0;M<d;M++)for(var N=I[c[M]],A=t[M],O=0;O<g;O++)N[O]+=A[O];h=!0;for(var P=0;P<e;P++){for(var L=a[P],T=I[P],R=l[P],D=v[P],F=0;F<g;F++)L[F]=T[F]/D||0;if(h)for(var k=0;k<g;k++)if(R[k]!=L[k]){h=!1;break}}}else{for(var B=0;B<d;B++){I[c[B]]+=t[B]}for(var j=0;j<e;j++)a[j]=I[j]/v[j]||0;h=!0;for(var G=0;G<e;G++)if(l[G]!=a[G]){h=!1;break}}h=h||--f<=0}while(!h);return{it:1e4-f,k:e,idxs:c,centroids:a}}a(u,"init"),a(l,"skmeans"),e.exports=l})),Fk=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){var e=a((function(t){return function(){return t}}),"constant");function n(t){return t[0]}function r(t){return t[1]}function i(){this._=null}function o(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function s(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function u(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function l(t){for(;t.L;)t=t.L;return t}function c(t,e,n,r){var i=[null,null],o=B.push(i)-1;return i.left=t,i.right=e,n&&h(i,t,e,n),r&&h(i,e,t,r),F[t.index].halfedges.push(o),F[e.index].halfedges.push(o),i}function p(t,e,n){var r=[e,n];return r.left=t,r}function h(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function f(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],l=a[1],c=0,p=1,h=s[0]-u,f=s[1]-l;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<p&&(p=o)}else if(h>0){if(o>p)return;o>c&&(c=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>p)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<p&&(p=o)}if(o=n-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<p&&(p=o)}else if(f>0){if(o>p)return;o>c&&(c=o)}if(o=i-l,f||!(o<0)){if(o/=f,f<0){if(o>p)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<p&&(p=o)}return!(c>0)&&!(p<1)||(c>0&&(t[0]=[u+c*h,l+c*f]),p<1&&(t[1]=[u+p*h,l+p*f])),!0}}}}}function d(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],l=t.left,c=t.right,p=l[0],h=l[1],f=c[0],d=c[1],g=(p+f)/2,y=(h+d)/2;if(d===h){if(g<e||g>=r)return;if(p>f){if(u){if(u[1]>=i)return}else u=[g,n];o=[g,i]}else{if(u){if(u[1]<n)return}else u=[g,i];o=[g,n]}}else if(s=y-(a=(p-f)/(d-h))*g,a<-1||a>1)if(p>f){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function g(t,e,n,r){for(var i,o=B.length;o--;)d(i=B[o],t,e,n,r)&&f(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>j||Math.abs(i[0][1]-i[1][1])>j)||delete B[o]}function y(t){return F[t.index]={site:t,halfedges:[]}}function v(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function m(t,e){return e[+(e.left!==t.site)]}function _(t,e){return e[+(e.left===t.site)]}function b(){for(var t,e,n,r,i=0,o=F.length;i<o;++i)if((t=F[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=v(t,B[e[n]]);for(a.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}function w(t,e,n,r){var i,o,a,s,u,l,c,h,f,d,g,y,v=F.length,b=!0;for(i=0;i<v;++i)if(o=F[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)B[u[s]]||u.splice(s,1);for(s=0,l=u.length;s<l;)g=(d=_(o,B[u[s]]))[0],y=d[1],h=(c=m(o,B[u[++s%l]]))[0],f=c[1],(Math.abs(g-h)>j||Math.abs(y-f)>j)&&(u.splice(s,0,B.push(p(a,d,Math.abs(g-t)<j&&r-y>j?[t,Math.abs(h-t)<j?f:r]:Math.abs(y-r)<j&&n-g>j?[Math.abs(f-r)<j?h:n,r]:Math.abs(g-n)<j&&y-e>j?[n,Math.abs(h-n)<j?f:e]:Math.abs(y-e)<j&&g-t>j?[Math.abs(f-e)<j?h:t,e]:null))-1),++l);l&&(b=!1)}if(b){var w,x,E,I=1/0;for(i=0,b=null;i<v;++i)(o=F[i])&&(E=(w=(a=o.site)[0]-t)*w+(x=a[1]-e)*x)<I&&(I=E,b=o);if(b){var S=[t,e],C=[t,r],M=[n,r],N=[n,e];b.halfedges.push(B.push(p(a=b.site,S,C))-1,B.push(p(a,C,M))-1,B.push(p(a,M,N))-1,B.push(p(a,N,S))-1)}}for(i=0;i<v;++i)(o=F[i])&&(o.halfedges.length||delete F[i])}a(n,"x"),a(r,"y"),a(i,"RedBlackTree"),a(o,"RedBlackNode"),i.prototype={constructor:i,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=l(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(s(this,n),n=(t=n).U),n.C=!1,r.C=!0,u(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(u(this,n),n=(t=n).U),n.C=!1,r.C=!0,s(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?l(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,s(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){(!e.R||!e.R.C)&&(e.L.C=!1,e.C=!0,u(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,s(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,u(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){(!e.L||!e.L.C)&&(e.R.C=!1,e.C=!0,s(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,u(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},a(s,"RedBlackRotateLeft"),a(u,"RedBlackRotateRight"),a(l,"RedBlackFirst"),a(c,"createEdge"),a(p,"createBorderEdge"),a(h,"setEdgeEnd"),a(f,"clipEdge"),a(d,"connectEdge"),a(g,"clipEdges"),a(y,"createCell"),a(v,"cellHalfedgeAngle"),a(m,"cellHalfedgeStart"),a(_,"cellHalfedgeEnd"),a(b,"sortCellHalfedges"),a(w,"clipCells");var x,E=[];function I(){o(this),this.x=this.y=this.arc=this.site=this.cy=null}function S(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,l=r[1]-s,c=o[0]-a,p=o[1]-s,h=2*(u*p-l*c);if(!(h>=-G)){var f=u*u+l*l,d=c*c+p*p,g=(p*f-l*d)/h,y=(u*d-c*f)/h,v=E.pop()||new I;v.arc=t,v.site=i,v.x=g+a,v.y=(v.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=v;for(var m=null,_=k._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){m=_.P;break}_=_.L}else{if(!_.R){m=_;break}_=_.R}k.insert(m,v),m||(x=v)}}}}function C(t){var e=t.circle;e&&(e.P||(x=e.N),k.remove(e),E.push(e),o(e),t.circle=null)}a(I,"Circle"),a(S,"attachCircle"),a(C,"detachCircle");var M=[];function N(){o(this),this.edge=this.site=this.circle=null}function A(t){var e=M.pop()||new N;return e.site=t,e}function O(t){C(t),D.remove(t),M.push(t),o(t)}function P(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];O(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<j&&Math.abs(r-u.circle.cy)<j;)o=u.P,s.unshift(u),O(u),u=o;s.unshift(u),C(u);for(var l=a;l.circle&&Math.abs(n-l.circle.x)<j&&Math.abs(r-l.circle.cy)<j;)a=l.N,s.push(l),O(l),l=a;s.push(l),C(l);var p,f=s.length;for(p=1;p<f;++p)l=s[p],u=s[p-1],h(l.edge,u.site,l.site,i);u=s[0],(l=s[f-1]).edge=c(u.site,l.site,null,i),S(u),S(l)}function L(t){for(var e,n,r,i,o=t[0],a=t[1],s=D._;s;)if((r=T(s,a)-o)>j)s=s.L;else{if(!((i=o-R(s,a))>j)){r>-j?(e=s.P,n=s):i>-j?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}y(t);var u=A(t);if(D.insert(e,u),e||n){if(e===n)return C(e),n=A(e.site),D.insert(u,n),u.edge=n.edge=c(e.site,u.site),S(e),void S(n);if(!n)return void(u.edge=c(e.site,u.site));C(e),C(n);var l=e.site,p=l[0],f=l[1],d=t[0]-p,g=t[1]-f,v=n.site,m=v[0]-p,_=v[1]-f,b=2*(d*_-g*m),w=d*d+g*g,x=m*m+_*_,E=[(_*w-g*x)/b+p,(d*x-m*w)/b+f];h(n.edge,l,v,E),u.edge=c(l,t,null,E),n.edge=c(t,v,null,E),S(e),S(n)}}function T(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],l=u-e;if(!l)return s;var c=s-r,p=1/o-1/l,h=c/l;return p?(-h+Math.sqrt(h*h-2*p*(c*c/(-2*l)-u+l/2+i-o/2)))/p+r:(r+s)/2}function R(t,e){var n=t.N;if(n)return T(n,e);var r=t.site;return r[1]===e?r[0]:1/0}a(N,"Beach"),a(A,"createBeach"),a(O,"detachBeach"),a(P,"removeBeach"),a(L,"addBeach"),a(T,"leftBreakPoint"),a(R,"rightBreakPoint");var D,F,k,B,j=1e-6,G=1e-12;function q(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function U(t,e){return e[1]-t[1]||e[0]-t[0]}function V(t,e){var n,r,o,a=t.sort(U).pop();for(B=[],F=new Array(t.length),D=new i,k=new i;;)if(o=x,a&&(!o||a[1]<o.y||a[1]===o.y&&a[0]<o.x))(a[0]!==n||a[1]!==r)&&(L(a),n=a[0],r=a[1]),a=t.pop();else{if(!o)break;P(o.arc)}if(b(),e){var s=+e[0][0],u=+e[0][1],l=+e[1][0],c=+e[1][1];g(s,u,l,c),w(s,u,l,c)}this.edges=B,this.cells=F,D=k=B=F=null}a(q,"triangleArea"),a(U,"lexicographic"),a(V,"Diagram"),V.prototype={constructor:V,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return m(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s=n.site,u=-1,l=e[i[o-1]],c=l.left===s?l.right:l.left;++u<o;)a=c,c=(l=e[i[u]]).left===s?l.right:l.left,a&&c&&r<a.index&&r<c.index&&q(s,a,c)<0&&t.push([s.data,a.data,c.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],l=e-i.site[1],c=u*u+l*l;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],l=e-s[1],p=u*u+l*l;p<c&&(c=p,a=s.index)}}))}while(null!==a);return o._found=r,null==n||c<=n*n?i.site:null}};var z=a((function(){var t=n,i=r,o=null;function s(e){return new V(e.map((function(n,r){var o=[Math.round(t(n,r,e)/j)*j,Math.round(i(n,r,e)/j)*j];return o.index=r,o.data=n,o})),o)}return a(s,"voronoi"),s.polygons=function(t){return s(t).polygons()},s.links=function(t){return s(t).links()},s.triangles=function(t){return s(t).triangles()},s.x=function(n){return arguments.length?(t="function"==typeof n?n:e(+n),s):t},s.y=function(t){return arguments.length?(i="function"==typeof t?t:e(+t),s):i},s.extent=function(t){return arguments.length?(o=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],s):o&&[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},s.size=function(t){return arguments.length?(o=null==t?null:[[0,0],[+t[0],+t[1]]],s):o&&[o[1][0]-o[0][0],o[1][1]-o[0][1]]},s}),"voronoi");t.voronoi=z,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r(n.d3=n.d3||{})})),zk=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){function t(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}a(t,"__generator");var e=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return a(t,"Node"),t}();function n(t,e){return t>e?1:t<e?-1:0}function r(t,n,r){for(var i=new e(null,null),o=i,a=i;;){var s=r(t,n.key);if(s<0){if(null===n.left)break;if(r(t,n.left.key)<0){var u=n.left;if(n.left=u.right,u.right=n,null===(n=u).left)break}a.left=n,a=n,n=n.left}else{if(!(s>0))break;if(null===n.right)break;if(r(t,n.right.key)>0&&(u=n.right,n.right=u.left,u.left=n,null===(n=u).right))break;o.right=n,o=n,n=n.right}}return o.right=n.left,a.left=n.right,n.left=i.right,n.right=i.left,n}function i(t,n,i,o){var a=new e(t,n);if(null===i)return a.left=a.right=null,a;var s=o(t,(i=r(t,i,o)).key);return s<0?(a.left=i.left,a.right=i,i.left=null):s>=0&&(a.right=i.right,a.left=i,i.right=null),a}function o(t,e,n){var i=null,o=null;if(e){var a=n((e=r(t,e,n)).key,t);0===a?(i=e.left,o=e.right):a<0?(o=e.right,e.right=null,i=e):(i=e.left,e.left=null,o=e)}return{left:i,right:o}}function s(t,e,n){return null===e?t:(null===t||((e=r(t.key,e,n)).left=t),e)}function u(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&u(t.left,o,!1,r,i),t.right&&u(t.right,o,!0,r,i)}}a(n,"DEFAULT_COMPARE"),a(r,"splay"),a(i,"insert"),a(o,"split"),a(s,"merge"),a(u,"printRow");var l=function(){function l(t){void 0===t&&(t=n),this._root=null,this._size=0,this._comparator=t}return a(l,"Tree"),l.prototype.insert=function(t,e){return this._size++,this._root=i(t,e,this._root,this._comparator)},l.prototype.add=function(t,n){var i=new e(t,n);null===this._root&&(i.left=i.right=null,this._size++,this._root=i);var o=this._comparator,a=r(t,this._root,o),s=o(t,a.key);return 0===s?this._root=a:(s<0?(i.left=a.left,i.right=a,a.left=null):s>0&&(i.right=a.right,i.left=a,a.right=null),this._size++,this._root=i),this._root},l.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},l.prototype._remove=function(t,e,n){var i;return null===e?null:0===n(t,(e=r(t,e,n)).key)?(null===e.left?i=e.right:(i=r(t,e.left,n)).right=e.right,this._size--,i):e},l.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=r(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},l.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},l.prototype.find=function(t){return this._root&&(this._root=r(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},l.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},l.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},l.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,e)>0)break;if(o(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},l.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},l.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},l.prototype.min=function(){return this._root?this.minNode(this._root).key:null},l.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},l.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},l.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},l.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},l.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},l.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},l.prototype.clear=function(){return this._root=null,this._size=0,this},l.prototype.toList=function(){return h(this._root)},l.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&g(t,e,0,r-1,i),null===this._root)this._root=c(t,e,0,r),this._size=r;else{var o=d(this.toList(),p(t,e),i);r=this._size+r,this._root=f({head:o},0,r)}return this},l.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),l.prototype.toString=function(t){void 0===t&&(t=a((function(t){return String(t.key)}),"printNode"));var e=[];return u(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},l.prototype.update=function(t,e,n){var r=this._comparator,a=o(t,this._root,r),u=a.left,l=a.right;r(t,e)<0?l=i(e,n,l,r):u=i(e,n,u,r),this._root=s(u,l,r)},l.prototype.split=function(t){return o(t,this._root,this._comparator)},l.prototype[Symbol.iterator]=function(){var e,n,r;return t(this,(function(t){switch(t.label){case 0:e=this._root,n=[],r=!1,t.label=1;case 1:return r?[3,6]:null===e?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return 0===n.length?[3,4]:[4,e=n.pop()];case 3:return t.sent(),e=e.right,[3,5];case 4:r=!0,t.label=5;case 5:return[3,1];case 6:return[2]}}))},l}();function c(t,n,r,i){var o=i-r;if(o>0){var a=r+Math.floor(o/2),s=t[a],u=n[a],l=new e(s,u);return l.left=c(t,n,r,a),l.right=c(t,n,a+1,i),l}return null}function p(t,n){for(var r=new e(null,null),i=r,o=0;o<t.length;o++)i=i.next=new e(t[o],n[o]);return i.next=null,r.next}function h(t){for(var n=t,r=[],i=!1,o=new e(null,null),a=o;!i;)n?(r.push(n),n=n.left):r.length>0?n=(n=a=a.next=r.pop()).right:i=!0;return a.next=null,o.next}function f(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=f(t,e,i),a=t.head;return a.left=o,t.head=t.head.next,a.right=f(t,i+1,n),a}return null}function d(t,n,r){for(var i=new e(null,null),o=i,a=t,s=n;null!==a&&null!==s;)r(a.key,s.key)<0?(o.next=a,a=a.next):(o.next=s,s=s.next),o=o.next;return null!==a?o.next=a:null!==s&&(o.next=s),i.next}function g(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],a=n-1,s=r+1;;){do{a++}while(i(t[a],o)<0);do{s--}while(i(t[s],o)>0);if(a>=s)break;var u=t[a];t[a]=t[s],t[s]=u,u=e[a],e[a]=e[s],e[s]=u}g(t,e,n,s,i),g(t,e,s+1,r,i)}}return a(c,"loadRecursive"),a(p,"createList"),a(h,"toList"),a(f,"sortedListToBST"),a(d,"mergeLists"),a(g,"sort"),l},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):n.SplayTree=r()})),fc=Oe(((t,e)=>{m();var n=zk();function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}a(r,"_interopDefaultLegacy");var i=r(n);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}a(o,"_classCallCheck"),a(s,"_defineProperties"),a(u,"_createClass");var l=a((function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y}),"isInBbox"),c=a((function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}}),"getBboxOverlap"),p=Number.EPSILON;void 0===p&&(p=Math.pow(2,-52));var h=p*p,f=a((function(t,e){if(-p<t&&t<p&&-p<e&&e<p)return 0;var n=t-e;return n*n<h*t*e?0:t<e?-1:1}),"cmp"),d=function(){function t(){o(this,t),this.reset()}return a(t,"PtRounder"),u(t,[{key:"reset",value:a((function(){this.xRounder=new g,this.yRounder=new g}),"reset")},{key:"round",value:a((function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}),"round")}]),t}(),g=function(){function t(){o(this,t),this.tree=new i.default,this.round(0)}return a(t,"CoordRounder"),u(t,[{key:"round",value:a((function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===f(e.key,n.key))return this.tree.remove(t),n.key;var r=this.tree.next(e);return null!==r&&0===f(e.key,r.key)?(this.tree.remove(t),r.key):t}),"round")}]),t}(),y=new d,v=a((function(t,e){return t.x*e.y-t.y*e.x}),"crossProduct"),_=a((function(t,e){return t.x*e.x+t.y*e.y}),"dotProduct"),b=a((function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y},o=v(r,i);return f(o,0)}),"compareVectorAngles"),w=a((function(t){return Math.sqrt(_(t,t))}),"length"),x=a((function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return v(i,r)/w(i)/w(r)}),"sineOfAngle"),E=a((function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return _(i,r)/w(i)/w(r)}),"cosineOfAngle"),I=a((function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}}),"horizontalIntersection"),S=a((function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}}),"verticalIntersection"),C=a((function(t,e,n,r){if(0===e.x)return S(n,r,t.x);if(0===r.x)return S(t,e,n.x);if(0===e.y)return I(n,r,t.y);if(0===r.y)return I(t,e,n.y);var i=v(e,r);if(0==i)return null;var o={x:n.x-t.x,y:n.y-t.y},a=v(o,e)/i,s=v(o,r)/i;return{x:(t.x+s*e.x+(n.x+a*r.x))/2,y:(t.y+s*e.y+(n.y+a*r.y))/2}}),"intersection"),M=function(){function t(e,n){o(this,t),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return u(t,null,[{key:"compare",value:a((function(e,n){var r=t.comparePoints(e.point,n.point);return 0!==r?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:A.compare(e.segment,n.segment))}),"compare")},{key:"comparePoints",value:a((function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}),"comparePoints")}]),a(t,"SweepEvent"),u(t,[{key:"link",value:a((function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}),"link")},{key:"checkForConsuming",value:a((function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment)}}}),"checkForConsuming")},{key:"getAvailableLinkedEvents",value:a((function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}),"getAvailableLinkedEvents")},{key:"getLeftmostComparator",value:a((function(t){var e=this,n=new Map,r=a((function(r){var i=r.otherSE;n.set(r,{sine:x(e.point,t.point,i.point),cosine:E(e.point,t.point,i.point)})}),"fillCache");return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,a=i.cosine,s=n.get(e),u=s.sine,l=s.cosine;return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}),"getLeftmostComparator")}]),t}(),N=0,A=function(){function t(e,n,r,i){o(this,t),this.id=++N,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return u(t,null,[{key:"compare",value:a((function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;var a=t.leftSE.point.y,s=e.leftSE.point.y,u=t.rightSE.point.y,l=e.rightSE.point.y;if(n<r){if(s<a&&s<u)return 1;if(s>a&&s>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var p=e.comparePoint(t.rightSE.point);return 0!==p?p:-1}if(n>r){if(a<s&&a<l)return-1;if(a>s&&a>l)return 1;var h=e.comparePoint(t.leftSE.point);if(0!==h)return h;var f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(a<s)return-1;if(a>s)return 1;if(i<o){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i>o){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var y=u-a,v=i-n,m=l-s,_=o-r;if(y>v&&m<_)return 1;if(y<v&&m>_)return-1}return i>o?1:i<o||u<l?-1:u>l?1:t.id<e.id?-1:t.id>e.id?1:0}),"compare")}]),a(t,"Segment"),u(t,[{key:"replaceRightSE",value:a((function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}),"replaceRightSE")},{key:"bbox",value:a((function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}),"bbox")},{key:"vector",value:a((function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}),"vector")},{key:"isAnEndpoint",value:a((function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}),"isAnEndpoint")},{key:"comparePoint",value:a((function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;var a=(t.x-e.x)/r.x,s=e.y+a*r.y;return t.y===s?0:t.y<s?-1:1}),"comparePoint")},{key:"getIntersection",value:a((function(t){var e=this.bbox(),n=t.bbox(),r=c(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,s=t.rightSE.point,u=l(e,a)&&0===this.comparePoint(a),p=l(n,i)&&0===t.comparePoint(i),h=l(e,s)&&0===this.comparePoint(s),f=l(n,o)&&0===t.comparePoint(o);if(p&&u)return f&&!h?o:!f&&h?s:null;if(p)return h&&i.x===s.x&&i.y===s.y?null:i;if(u)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&h)return null;if(f)return o;if(h)return s;var d=C(i,this.vector(),a,t.vector());return null!==d&&l(r,d)?y.round(d.x,d.y):null}),"getIntersection")},{key:"split",value:a((function(e){var n=[],r=void 0!==e.events,i=new M(e,!0),o=new M(e,!1),a=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var s=new t(i,a,this.rings.slice(),this.windings.slice());return M.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),M.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}),"split")},{key:"swapEvents",value:a((function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}),"swapEvents")},{key:"consume",value:a((function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=t.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,u=r.rings.length;s<u;s++){var l=r.rings[s],c=r.windings[s],p=n.rings.indexOf(l);-1===p?(n.rings.push(l),n.windings.push(c)):n.windings[p]+=c}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}),"consume")},{key:"prevInResult",value:a((function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}),"prevInResult")},{key:"beforeState",value:a((function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}),"beforeState")},{key:"afterState",value:a((function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var a=this.rings[i],s=this.windings[i],u=e.indexOf(a);-1===u?(e.push(a),n.push(s)):n[u]+=s}for(var l=[],c=[],p=0,h=e.length;p<h;p++)if(0!==n[p]){var f=e[p],d=f.poly;if(-1===c.indexOf(d))if(f.isExterior)l.push(d);else{-1===c.indexOf(d)&&c.push(d);var g=l.indexOf(f.poly);-1!==g&&l.splice(g,1)}}for(var y=0,v=l.length;y<v;y++){var m=l[y].multiPoly;-1===r.indexOf(m)&&r.push(m)}return this._afterState}),"afterState")},{key:"isInResult",value:a((function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(j.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===j.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var u=a((function(t){return 1===t.length&&t[0].isSubject}),"isJustSubject");this._isInResult=u(t)!==u(e);break;default:throw new Error("Unrecognized operation type found ".concat(j.type))}return this._isInResult}),"isInResult")}],[{key:"fromRing",value:a((function(e,n,r){var i,o,a,s=M.comparePoints(e,n);if(s<0)i=e,o=n,a=1;else{if(!(s>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,a=-1}return new t(new M(i,!0),new M(o,!1),[r],[a])}),"fromRing")}]),t}(),O=function(){function t(e,n,r){if(o(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=y.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var a=i,s=1,u=e.length;s<u;s++){if("number"!=typeof e[s][0]||"number"!=typeof e[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=y.round(e[s][0],e[s][1]);l.x===a.x&&l.y===a.y||(this.segments.push(A.fromRing(a,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),a=l)}(i.x!==a.x||i.y!==a.y)&&this.segments.push(A.fromRing(a,i,this))}return a(t,"RingIn"),u(t,[{key:"getSweepEvents",value:a((function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}),"getSweepEvents")}]),t}(),P=function(){function t(e,n){if(o(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new O(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var r=1,i=e.length;r<i;r++){var a=new O(e[r],this,!1);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=n}return a(t,"PolyIn"),u(t,[{key:"getSweepEvents",value:a((function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}),"getSweepEvents")}]),t}(),L=function(){function t(e,n){if(o(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,i=e.length;r<i;r++){var a=new P(e[r],this);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=n}return a(t,"MultiPolyIn"),u(t,[{key:"getSweepEvents",value:a((function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}),"getSweepEvents")}]),t}(),T=function(){function t(e){o(this,t),this.events=e;for(var n=0,r=e.length;n<r;n++)e[n].segment.ringOut=this;this.poly=null}return u(t,null,[{key:"factory",value:a((function(e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];if(o.isInResult()&&!o.ringOut){for(var a=null,s=o.leftSE,u=o.rightSE,l=[s],c=s.point,p=[];a=s,s=u,l.push(s),s.point!==c;)for(;;){var h=s.getAvailableLinkedEvents();if(0===h.length){var f=l[0].point,d=l[l.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(f.x,",")+" ".concat(f.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===h.length){u=h[0].otherSE;break}for(var g=null,y=0,v=p.length;y<v;y++)if(p[y].point===s.point){g=y;break}if(null===g){p.push({index:l.length,point:s.point});var m=s.getLeftmostComparator(a);u=h.sort(m)[0].otherSE;break}var _=p.splice(g)[0],b=l.splice(_.index);b.unshift(b[0].otherSE),n.push(new t(b.reverse()))}n.push(new t(l))}}return n}),"factory")}]),a(t,"RingOut"),u(t,[{key:"getGeom",value:a((function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==b(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var a=e[0],s=e[1];0===b(a,t,s)&&e.shift(),e.push(e[0]);for(var u=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:e.length-1,c=this.isExteriorRing()?e.length:-1,p=[],h=l;h!=c;h+=u)p.push([e[h].x,e[h].y]);return p}),"getGeom")},{key:"isExteriorRing",value:a((function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}),"isExteriorRing")},{key:"enclosingRing",value:a((function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}),"enclosingRing")},{key:"_calcEnclosingRing",value:a((function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];M.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}),"_calcEnclosingRing")}]),t}(),R=function(){function t(e){o(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return a(t,"PolyOut"),u(t,[{key:"addInterior",value:a((function(t){this.interiorRings.push(t),t.poly=this}),"addInterior")},{key:"getGeom",value:a((function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var r=this.interiorRings[e].getGeom();null!==r&&t.push(r)}return t}),"getGeom")}]),t}(),D=function(){function t(e){o(this,t),this.rings=e,this.polys=this._composePolys(e)}return a(t,"MultiPolyOut"),u(t,[{key:"getGeom",value:a((function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}),"getGeom")},{key:"_composePolys",value:a((function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new R(i));else{var o=i.enclosingRing();o.poly||e.push(new R(o)),o.poly.addInterior(i)}}return e}),"_composePolys")}]),t}(),F=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.compare;o(this,t),this.queue=e,this.tree=new i.default(n),this.segments=[]}return a(t,"SweepLine"),u(t,[{key:"process",value:a((function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(t.isLeft){var u=null;if(a){var l=a.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!a.isAnEndpoint(l)))for(var c=this._splitSafely(a,l),p=0,h=c.length;p<h;p++)n.push(c[p])}var f=null;if(s){var d=s.getIntersection(e);if(null!==d&&(e.isAnEndpoint(d)||(f=d),!s.isAnEndpoint(d)))for(var g=this._splitSafely(s,d),y=0,v=g.length;y<v;y++)n.push(g[y])}if(null!==u||null!==f){var m=null;if(null===u)m=f;else if(null===f)m=u;else{m=M.comparePoints(u,f)<=0?u:f}this.queue.remove(e.rightSE),n.push(e.rightSE);for(var _=e.split(m),b=0,w=_.length;b<w;b++)n.push(_[b])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&s){var x=a.getIntersection(s);if(null!==x){if(!a.isAnEndpoint(x))for(var E=this._splitSafely(a,x),I=0,S=E.length;I<S;I++)n.push(E[I]);if(!s.isAnEndpoint(x))for(var C=this._splitSafely(s,x),N=0,A=C.length;N<A;N++)n.push(C[N])}}this.tree.remove(e)}return n}),"process")},{key:"_splitSafely",value:a((function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.insert(t),r}),"_splitSafely")}]),t}(),k=typeof G<"u"&&G.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,B=typeof G<"u"&&G.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,j=new(function(){function t(){o(this,t)}return a(t,"Operation"),u(t,[{key:"run",value:a((function(t,e,n){j.type=t,y.reset();for(var r=[new L(e,!0)],o=0,a=n.length;o<a;o++)r.push(new L(n[o],!1));if(j.numMultiPolys=r.length,"difference"===j.type)for(var s=r[0],u=1;u<r.length;)null!==c(r[u].bbox,s.bbox)?u++:r.splice(u,1);if("intersection"===j.type)for(var l=0,p=r.length;l<p;l++)for(var h=r[l],f=l+1,d=r.length;f<d;f++)if(null===c(h.bbox,r[f].bbox))return[];for(var g=new i.default(M.compare),v=0,m=r.length;v<m;v++)for(var _=r[v].getSweepEvents(),b=0,w=_.length;b<w;b++)if(g.insert(_[b]),g.size>k)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var x=new F(g),E=g.size,I=g.pop();I;){var S=I.key;if(g.size===E){var C=S.segment;throw new Error("Unable to pop() ".concat(S.isLeft?"left":"right"," SweepEvent ")+"[".concat(S.point.x,", ").concat(S.point.y,"] from segment #").concat(C.id," ")+"[".concat(C.leftSE.point.x,", ").concat(C.leftSE.point.y,"] -> ")+"[".concat(C.rightSE.point.x,", ").concat(C.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(g.size>k)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>B)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var N=x.process(S),A=0,O=N.length;A<O;A++){var P=N[A];void 0===P.consumedBy&&g.insert(P)}E=g.size,I=g.pop()}y.reset();var R=T.factory(x.segments);return new D(R).getGeom()}),"run")}]),t}()),q={union:a((function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return j.run("union",t,n)}),"union"),intersection:a((function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return j.run("intersection",t,n)}),"intersection"),xor:a((function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return j.run("xor",t,n)}),"xor"),difference:a((function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return j.run("difference",t,n)}),"difference")};e.exports=q})),kO=Oe((t=>{m(),Object.defineProperty(t,"__esModule",{value:!0}),"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:a((function(t){if(null==this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)e[r]=t,++r;return e}),"fill"),writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var e=a((function(){}),"NumberUtil");e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.prototype.equalsWithTolerance=a((function(t,e,n){return Math.abs(t-e)<=n}),"equalsWithTolerance");var n=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return a(e,"IllegalArgumentException"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),r=a((function(){}),"Double"),i={MAX_VALUE:{configurable:!0}};r.isNaN=a((function(t){return Number.isNaN(t)}),"isNaN"),r.doubleToLongBits=a((function(t){return t}),"doubleToLongBits"),r.longBitsToDouble=a((function(t){return t}),"longBitsToDouble"),r.isInfinite=a((function(t){return!Number.isFinite(t)}),"isInfinite"),i.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(r,i);var o=a((function(){}),"Comparable"),s=a((function(){}),"Clonable"),u=a((function(){}),"Comparator");function l(){}a(l,"Serializable");var c=a((function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])}),"Coordinate"),p={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};c.prototype.setOrdinate=a((function(t,e){switch(t){case c.X:this.x=e;break;case c.Y:this.y=e;break;case c.Z:this.z=e;break;default:throw new n("Invalid ordinate index: "+t)}}),"setOrdinate"),c.prototype.equals2D=a((function(){if(1===arguments.length){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return!(!e.equalsWithTolerance(this.x,n.x,r)||!e.equalsWithTolerance(this.y,n.y,r))}}),"equals2D"),c.prototype.getOrdinate=a((function(t){switch(t){case c.X:return this.x;case c.Y:return this.y;case c.Z:return this.z}throw new n("Invalid ordinate index: "+t)}),"getOrdinate"),c.prototype.equals3D=a((function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||r.isNaN(this.z))&&r.isNaN(t.z)}),"equals3D"),c.prototype.equals=a((function(t){return t instanceof c&&this.equals2D(t)}),"equals"),c.prototype.equalInZ=a((function(t,n){return e.equalsWithTolerance(this.z,t.z,n)}),"equalInZ"),c.prototype.compareTo=a((function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0}),"compareTo"),c.prototype.clone=a((function(){}),"clone"),c.prototype.copy=a((function(){return new c(this)}),"copy"),c.prototype.toString=a((function(){return"("+this.x+", "+this.y+", "+this.z+")"}),"toString"),c.prototype.distance3D=a((function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)}),"distance3D"),c.prototype.distance=a((function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)}),"distance"),c.prototype.hashCode=a((function(){var t=17;return t=37*(t=37*t+c.hashCode(this.x))+c.hashCode(this.y)}),"hashCode"),c.prototype.setCoordinate=a((function(t){this.x=t.x,this.y=t.y,this.z=t.z}),"setCoordinate"),c.prototype.interfaces_=a((function(){return[o,s,l]}),"interfaces_"),c.prototype.getClass=a((function(){return c}),"getClass"),c.hashCode=a((function(){if(1===arguments.length){var t=arguments[0],e=r.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}}),"hashCode"),p.DimensionalComparator.get=function(){return h},p.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},p.NULL_ORDINATE.get=function(){return r.NaN},p.X.get=function(){return 0},p.Y.get=function(){return 1},p.Z.get=function(){return 2},Object.defineProperties(c,p);var h=a((function(t){if(this._dimensionsToTest=2,0!==arguments.length&&1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new n("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}),"DimensionalComparator");h.prototype.compare=a((function(t,e){var n=t,r=e,i=h.compare(n.x,r.x);if(0!==i)return i;var o=h.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:h.compare(n.z,r.z)}),"compare"),h.prototype.interfaces_=a((function(){return[u]}),"interfaces_"),h.prototype.getClass=a((function(){return h}),"getClass"),h.compare=a((function(t,e){return t<e?-1:t>e?1:r.isNaN(t)?r.isNaN(e)?0:-1:r.isNaN(e)?1:0}),"compare");var f=a((function(){}),"CoordinateSequenceFactory");f.prototype.create=a((function(){}),"create"),f.prototype.interfaces_=a((function(){return[]}),"interfaces_"),f.prototype.getClass=a((function(){return f}),"getClass");var d=a((function(){}),"Location"),g={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};d.prototype.interfaces_=a((function(){return[]}),"interfaces_"),d.prototype.getClass=a((function(){return d}),"getClass"),d.toLocationSymbol=a((function(t){switch(t){case d.EXTERIOR:return"e";case d.BOUNDARY:return"b";case d.INTERIOR:return"i";case d.NONE:return"-"}throw new n("Unknown location value: "+t)}),"toLocationSymbol"),g.INTERIOR.get=function(){return 0},g.BOUNDARY.get=function(){return 1},g.EXTERIOR.get=function(){return 2},g.NONE.get=function(){return-1},Object.defineProperties(d,g);var y=a((function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1}),"hasInterface"),v=a((function(){}),"MathUtil"),_={LOG_10:{configurable:!0}};v.prototype.interfaces_=a((function(){return[]}),"interfaces_"),v.prototype.getClass=a((function(){return v}),"getClass"),v.log10=a((function(t){var e=Math.log(t);return r.isInfinite(e)||r.isNaN(e)?e:e/v.LOG_10}),"log10"),v.min=a((function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i}),"min"),v.clamp=a((function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}}),"clamp"),v.wrap=a((function(t,e){return t<0?e- -t%e:t%e}),"wrap"),v.max=a((function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=i;return o>u&&(u=o),a>u&&(u=a),s>u&&(u=s),u}}),"max"),v.average=a((function(t,e){return(t+e)/2}),"average"),_.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(v,_);var b=a((function(t){this.str=t}),"StringBuffer");b.prototype.append=a((function(t){this.str+=t}),"append"),b.prototype.setCharAt=a((function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)}),"setCharAt"),b.prototype.toString=a((function(t){return this.str}),"toString");var w=a((function(t){this.value=t}),"Integer");w.prototype.intValue=a((function(){return this.value}),"intValue"),w.prototype.compareTo=a((function(t){return this.value<t?-1:this.value>t?1:0}),"compareTo"),w.isNaN=a((function(t){return Number.isNaN(t)}),"isNaN");var x=a((function(){}),"Character");x.isWhitespace=a((function(t){return t<=32&&t>=0||127===t}),"isWhitespace"),x.toUpperCase=a((function(t){return t.toUpperCase()}),"toUpperCase");var E=a((function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}}),"DD"),I={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};E.prototype.le=a((function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo}),"le"),E.prototype.extractSignificantDigits=a((function(t,e){var n=this.abs(),r=E.magnitude(n._hi),i=E.TEN.pow(r);(n=n.divide(i)).gt(E.TEN)?(n=n.divide(E.TEN),r+=1):n.lt(E.ONE)&&(n=n.multiply(E.TEN),r-=1);for(var o=r+1,a=new b,s=E.MAX_PRINT_DIGITS-1,u=0;u<=s;u++){t&&u===o&&a.append(".");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,p=0;l>9?(c=!0,p="9"):p="0"+l,a.append(p),n=n.subtract(E.valueOf(l)).multiply(E.TEN),c&&n.selfAdd(E.TEN);var h=!0,f=E.magnitude(n._hi);if(f<0&&Math.abs(f)>=s-u&&(h=!1),!h)break}return e[0]=r,a.toString()}),"extractSignificantDigits"),E.prototype.sqr=a((function(){return this.multiply(this)}),"sqr"),E.prototype.doubleValue=a((function(){return this._hi+this._lo}),"doubleValue"),E.prototype.subtract=a((function(){if(arguments[0]instanceof E){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}}),"subtract"),E.prototype.equals=a((function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}}),"equals"),E.prototype.isZero=a((function(){return 0===this._hi&&0===this._lo}),"isZero"),E.prototype.selfSubtract=a((function(){if(arguments[0]instanceof E){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}}),"selfSubtract"),E.prototype.getSpecialNumberString=a((function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}),"getSpecialNumberString"),E.prototype.min=a((function(t){return this.le(t)?this:t}),"min"),E.prototype.selfDivide=a((function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null,c=null,p=null;return u=this._hi/n,p=(i=(l=E.SPLIT*u)-(i=l-u))*(a=(p=E.SPLIT*n)-(a=p-n))-(c=u*n)+i*(s=n-a)+(o=u-i)*a+o*s,p=u+(l=(this._hi-c-p+this._lo-u*r)/n),this._hi=p,this._lo=u-p+l,this}}),"selfDivide"),E.prototype.dump=a((function(){return"DD<"+this._hi+", "+this._lo+">"}),"dump"),E.prototype.divide=a((function(){if(arguments[0]instanceof E){var t=arguments[0],e=null,n=null,i=null,o=null,a=null,s=null,u=null,l=null;n=(a=this._hi/t._hi)-(e=(s=E.SPLIT*a)-(e=s-a)),l=e*(i=(l=E.SPLIT*t._hi)-(i=l-t._hi))-(u=a*t._hi)+e*(o=t._hi-i)+n*i+n*o;var c=l=a+(s=(this._hi-u-l+this._lo-a*t._lo)/t._hi),p=a-l+s;return new E(c,p)}if("number"==typeof arguments[0]){var h=arguments[0];return r.isNaN(h)?E.createNaN():E.copy(this).selfDivide(h,0)}}),"divide"),E.prototype.ge=a((function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo}),"ge"),E.prototype.pow=a((function(t){if(0===t)return E.valueOf(1);var e=new E(this),n=E.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n}),"pow"),E.prototype.ceil=a((function(){if(this.isNaN())return E.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new E(t,e)}),"ceil"),E.prototype.compareTo=a((function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0}),"compareTo"),E.prototype.rint=a((function(){return this.isNaN()?this:this.add(.5).floor()}),"rint"),E.prototype.setValue=a((function(){if(arguments[0]instanceof E){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}}),"setValue"),E.prototype.max=a((function(t){return this.ge(t)?this:t}),"max"),E.prototype.sqrt=a((function(){if(this.isZero())return E.valueOf(0);if(this.isNegative())return E.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=E.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)}),"sqrt"),E.prototype.selfAdd=a((function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+e)-(a=i-this._hi),r=(s=(o=e-a+(this._hi-o))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,p=null,h=null,f=null,d=null,g=null,y=null;f=this._hi+u,p=this._lo+l,d=f-(g=f-this._hi),h=p-(y=p-this._lo);var v=(c=f+(g=(d=u-g+(this._hi-d))+p))+(g=(h=l-y+(this._lo-h))+(g+(f-c))),m=g+(c-v);return this._hi=v,this._lo=m,this}}),"selfAdd"),E.prototype.selfMultiply=a((function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null;i=(u=E.SPLIT*this._hi)-this._hi,l=E.SPLIT*n,i=u-i,o=this._hi-i,a=l-n;var c=(u=this._hi*n)+(l=i*(a=l-a)-u+i*(s=n-a)+o*a+o*s+(this._hi*r+this._lo*n)),p=l+(i=u-c);return this._hi=c,this._lo=p,this}}),"selfMultiply"),E.prototype.selfSqr=a((function(){return this.selfMultiply(this)}),"selfSqr"),E.prototype.floor=a((function(){if(this.isNaN())return E.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new E(t,e)}),"floor"),E.prototype.negate=a((function(){return this.isNaN()?this:new E(-this._hi,-this._lo)}),"negate"),E.prototype.clone=a((function(){}),"clone"),E.prototype.multiply=a((function(){if(arguments[0]instanceof E){var t=arguments[0];return t.isNaN()?E.createNaN():E.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return r.isNaN(e)?E.createNaN():E.copy(this).selfMultiply(e,0)}}),"multiply"),E.prototype.isNaN=a((function(){return r.isNaN(this._hi)}),"isNaN"),E.prototype.intValue=a((function(){return Math.trunc(this._hi)}),"intValue"),E.prototype.toString=a((function(){var t=E.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()}),"toString"),E.prototype.toStandardNotation=a((function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+E.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+E.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i}),"toStandardNotation"),E.prototype.reciprocal=a((function(){var t,e,n,r,i=null,o=null,a=null,s=null;t=(n=1/this._hi)-(i=(a=E.SPLIT*n)-(i=a-n)),o=(s=E.SPLIT*this._hi)-this._hi;var u=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(e=this._hi-o)+t*o+t*e)-n*this._lo)/this._hi);return new E(u,n-u+a)}),"reciprocal"),E.prototype.toSciNotation=a((function(){if(this.isZero())return E.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=E.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r}),"toSciNotation"),E.prototype.abs=a((function(){return this.isNaN()?E.NaN:this.isNegative()?this.negate():new E(this)}),"abs"),E.prototype.isPositive=a((function(){return(this._hi>0||0===this._hi)&&this._lo>0}),"isPositive"),E.prototype.lt=a((function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo}),"lt"),E.prototype.add=a((function(){if(arguments[0]instanceof E){var t=arguments[0];return E.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return E.copy(this).selfAdd(e)}}),"add"),E.prototype.init=a((function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof E){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}}),"init"),E.prototype.gt=a((function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo}),"gt"),E.prototype.isNegative=a((function(){return(this._hi<0||0===this._hi)&&this._lo<0}),"isNegative"),E.prototype.trunc=a((function(){return this.isNaN()?E.NaN:this.isPositive()?this.floor():this.ceil()}),"trunc"),E.prototype.signum=a((function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}),"signum"),E.prototype.interfaces_=a((function(){return[l,o,s]}),"interfaces_"),E.prototype.getClass=a((function(){return E}),"getClass"),E.sqr=a((function(t){return E.valueOf(t).selfMultiply(t)}),"sqr"),E.valueOf=a((function(){if("string"==typeof arguments[0]){var t=arguments[0];return E.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new E(e)}}),"valueOf"),E.sqrt=a((function(t){return E.valueOf(t).sqrt()}),"sqrt"),E.parse=a((function(t){for(var e=0,n=t.length;x.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var i=t.charAt(e);("-"===i||"+"===i)&&(e++,"-"===i&&(r=!0))}for(var o=new E,a=0,s=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,x.isDigit(l)){var c=l-"0";o.selfMultiply(E.TEN),o.selfAdd(c),a++}else{if("."!==l){if("e"===l||"E"===l){var p=t.substring(e);try{u=w.parseInt(p)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+p+" in string "+t):e}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}s=a}}var h=o,f=a-s-u;if(0===f)h=o;else if(f>0){var d=E.TEN.pow(f);h=o.divide(d)}else if(f<0){var g=E.TEN.pow(-f);h=o.multiply(g)}return r?h.negate():h}),"parse"),E.createNaN=a((function(){return new E(r.NaN,r.NaN)}),"createNaN"),E.copy=a((function(t){return new E(t)}),"copy"),E.magnitude=a((function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r}),"magnitude"),E.stringOfChar=a((function(t,e){for(var n=new b,r=0;r<e;r++)n.append(t);return n.toString()}),"stringOfChar"),I.PI.get=function(){return new E(3.141592653589793,12246467991473532e-32)},I.TWO_PI.get=function(){return new E(6.283185307179586,24492935982947064e-32)},I.PI_2.get=function(){return new E(1.5707963267948966,6123233995736766e-32)},I.E.get=function(){return new E(2.718281828459045,14456468917292502e-32)},I.NaN.get=function(){return new E(r.NaN,r.NaN)},I.EPS.get=function(){return 123259516440783e-46},I.SPLIT.get=function(){return 134217729},I.MAX_PRINT_DIGITS.get=function(){return 32},I.TEN.get=function(){return E.valueOf(10)},I.ONE.get=function(){return E.valueOf(1)},I.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},I.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(E,I);var S=a((function(){}),"CGAlgorithmsDD"),C={DP_SAFE_EPSILON:{configurable:!0}};S.prototype.interfaces_=a((function(){return[]}),"interfaces_"),S.prototype.getClass=a((function(){return S}),"getClass"),S.orientationIndex=a((function(t,e,n){var r=S.orientationIndexFilter(t,e,n);if(r<=1)return r;var i=E.valueOf(e.x).selfAdd(-t.x),o=E.valueOf(e.y).selfAdd(-t.y),a=E.valueOf(n.x).selfAdd(-e.x),s=E.valueOf(n.y).selfAdd(-e.y);return i.selfMultiply(s).selfSubtract(o.selfMultiply(a)).signum()}),"orientationIndex"),S.signOfDet2x2=a((function(t,e,n,r){return t.multiply(r).selfSubtract(e.multiply(n)).signum()}),"signOfDet2x2"),S.intersection=a((function(t,e,n,r){var i=E.valueOf(r.y).selfSubtract(n.y).selfMultiply(E.valueOf(e.x).selfSubtract(t.x)),o=E.valueOf(r.x).selfSubtract(n.x).selfMultiply(E.valueOf(e.y).selfSubtract(t.y)),a=i.subtract(o),s=E.valueOf(r.x).selfSubtract(n.x).selfMultiply(E.valueOf(t.y).selfSubtract(n.y)),u=E.valueOf(r.y).selfSubtract(n.y).selfMultiply(E.valueOf(t.x).selfSubtract(n.x)),l=s.subtract(u).selfDivide(a).doubleValue(),p=E.valueOf(t.x).selfAdd(E.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),h=E.valueOf(e.x).selfSubtract(t.x).selfMultiply(E.valueOf(t.y).selfSubtract(n.y)),f=E.valueOf(e.y).selfSubtract(t.y).selfMultiply(E.valueOf(t.x).selfSubtract(n.x)),d=h.subtract(f).selfDivide(a).doubleValue(),g=E.valueOf(n.y).selfAdd(E.valueOf(r.y).selfSubtract(n.y).selfMultiply(d)).doubleValue();return new c(p,g)}),"intersection"),S.orientationIndexFilter=a((function(t,e,n){var r=null,i=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=i-o;if(i>0){if(o<=0)return S.signum(a);r=i+o}else{if(!(i<0))return S.signum(a);if(o>=0)return S.signum(a);r=-i-o}var s=S.DP_SAFE_EPSILON*r;return a>=s||-a>=s?S.signum(a):2}),"orientationIndexFilter"),S.signum=a((function(t){return t>0?1:t<0?-1:0}),"signum"),C.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(S,C);var M=a((function(){}),"CoordinateSequence"),N={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};N.X.get=function(){return 0},N.Y.get=function(){return 1},N.Z.get=function(){return 2},N.M.get=function(){return 3},M.prototype.setOrdinate=a((function(t,e,n){}),"setOrdinate"),M.prototype.size=a((function(){}),"size"),M.prototype.getOrdinate=a((function(t,e){}),"getOrdinate"),M.prototype.getCoordinate=a((function(){}),"getCoordinate"),M.prototype.getCoordinateCopy=a((function(t){}),"getCoordinateCopy"),M.prototype.getDimension=a((function(){}),"getDimension"),M.prototype.getX=a((function(t){}),"getX"),M.prototype.clone=a((function(){}),"clone"),M.prototype.expandEnvelope=a((function(t){}),"expandEnvelope"),M.prototype.copy=a((function(){}),"copy"),M.prototype.getY=a((function(t){}),"getY"),M.prototype.toCoordinateArray=a((function(){}),"toCoordinateArray"),M.prototype.interfaces_=a((function(){return[s]}),"interfaces_"),M.prototype.getClass=a((function(){return M}),"getClass"),Object.defineProperties(M,N);var A=a((function(){}),"Exception"),O=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return a(e,"NotRepresentableException"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(A),P=a((function(){}),"System");P.arraycopy=a((function(t,e,n,r,i){for(var o=0,a=e;a<e+i;a++)n[r+o]=t[a],o++}),"arraycopy"),P.getProperty=a((function(t){return{"line.separator":"\n"}[t]}),"getProperty");var L=a((function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof c&&arguments[1]instanceof c){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],p=arguments[2];this.x=u,this.y=l,this.w=p}else if(4===arguments.length){var h=arguments[0],f=arguments[1],d=arguments[2],g=arguments[3],y=h.y-f.y,v=f.x-h.x,m=h.x*f.y-f.x*h.y,_=d.y-g.y,b=g.x-d.x,w=d.x*g.y-g.x*d.y;this.x=v*w-b*m,this.y=_*m-y*w,this.w=y*b-_*v}}),"HCoordinate");L.prototype.getY=a((function(){var t=this.y/this.w;if(r.isNaN(t)||r.isInfinite(t))throw new O;return t}),"getY"),L.prototype.getX=a((function(){var t=this.x/this.w;if(r.isNaN(t)||r.isInfinite(t))throw new O;return t}),"getX"),L.prototype.getCoordinate=a((function(){var t=new c;return t.x=this.getX(),t.y=this.getY(),t}),"getCoordinate"),L.prototype.interfaces_=a((function(){return[]}),"interfaces_"),L.prototype.getClass=a((function(){return L}),"getClass"),L.intersection=a((function(t,e,n,i){var o=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,u=n.y-i.y,l=i.x-n.x,p=n.x*i.y-i.x*n.y,h=o*l-u*a,f=(a*p-l*s)/h,d=(u*s-o*p)/h;if(r.isNaN(f)||r.isInfinite(f)||r.isNaN(d)||r.isInfinite(d))throw new O;return new c(f,d)}),"intersection");var T=a((function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof c){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this.init(o,a,s,u)}}),"Envelope"),R={serialVersionUID:{configurable:!0}};T.prototype.getArea=a((function(){return this.getWidth()*this.getHeight()}),"getArea"),T.prototype.equals=a((function(t){if(!(t instanceof T))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()}),"equals"),T.prototype.intersection=a((function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new T;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,i=this._maxy<t._maxy?this._maxy:t._maxy;return new T(e,r,n,i)}),"intersection"),T.prototype.isNull=a((function(){return this._maxx<this._minx}),"isNull"),T.prototype.getMaxX=a((function(){return this._maxx}),"getMaxX"),T.prototype.covers=a((function(){if(1===arguments.length){if(arguments[0]instanceof c){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof T){var e=arguments[0];return!this.isNull()&&!e.isNull()&&(e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&(n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy)}}),"covers"),T.prototype.intersects=a((function(){if(1===arguments.length){if(arguments[0]instanceof T){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof c){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}}),"intersects"),T.prototype.getMinY=a((function(){return this._miny}),"getMinY"),T.prototype.getMinX=a((function(){return this._minx}),"getMinX"),T.prototype.expandToInclude=a((function(){if(1===arguments.length){if(arguments[0]instanceof c){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof T){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}}),"expandToInclude"),T.prototype.minExtent=a((function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e}),"minExtent"),T.prototype.getWidth=a((function(){return this.isNull()?0:this._maxx-this._minx}),"getWidth"),T.prototype.compareTo=a((function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0}),"compareTo"),T.prototype.translate=a((function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)}),"translate"),T.prototype.toString=a((function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}),"toString"),T.prototype.setToNull=a((function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}),"setToNull"),T.prototype.getHeight=a((function(){return this.isNull()?0:this._maxy-this._miny}),"getHeight"),T.prototype.maxExtent=a((function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e}),"maxExtent"),T.prototype.expandBy=a((function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}),"expandBy"),T.prototype.contains=a((function(){if(1===arguments.length){if(arguments[0]instanceof T){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof c){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}}),"contains"),T.prototype.centre=a((function(){return this.isNull()?null:new c((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}),"centre"),T.prototype.init=a((function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof c){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof T){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),a<s?(this._miny=a,this._maxy=s):(this._miny=s,this._maxy=a)}}),"init"),T.prototype.getMaxY=a((function(){return this._maxy}),"getMaxY"),T.prototype.distance=a((function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)}),"distance"),T.prototype.hashCode=a((function(){var t=17;return t=37*(t=37*(t=37*(t=37*t+c.hashCode(this._minx))+c.hashCode(this._maxx))+c.hashCode(this._miny))+c.hashCode(this._maxy)}),"hashCode"),T.prototype.interfaces_=a((function(){return[o,l]}),"interfaces_"),T.prototype.getClass=a((function(){return T}),"getClass"),T.intersects=a((function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),u=Math.max(o.x,a.x),l=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(l>u||c<s||(s=Math.min(o.y,a.y),u=Math.max(o.y,a.y),l=Math.min(r.y,i.y),c=Math.max(r.y,i.y),l>u)||c<s)}}),"intersects"),R.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(T,R);var D={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},F=a((function(t){this.geometryFactory=t||new we}),"WKTParser");F.prototype.read=a((function(t){var e,n,r;t=t.replace(/[\n\r]/g," ");var i=D.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((i=D.emptyTypeStr.exec(t))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],B[n]&&(e=B[n].apply(this,[r]))),void 0===e)throw new Error("Could not parse WKT "+t);return e}),"read"),F.prototype.write=a((function(t){return this.extractGeometry(t)}),"write"),F.prototype.extractGeometry=a((function(t){var e=t.getGeometryType().toLowerCase();if(!k[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+k[e].apply(this,[t])+")"}),"extractGeometry");var k={coordinate:a((function(t){return t.x+" "+t.y}),"coordinate"),point:a((function(t){return k.coordinate.call(this,t._coordinates._coordinates[0])}),"point"),multipoint:a((function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+k.point.apply(this,[t._geometries[n]])+")");return e.join(",")}),"multipoint"),linestring:a((function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(k.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")}),"linestring"),linearring:a((function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(k.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")}),"linearring"),multilinestring:a((function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+k.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")}),"multilinestring"),polygon:a((function(t){var e=[];e.push("("+k.linestring.apply(this,[t._shell])+")");for(var n=0,r=t._holes.length;n<r;++n)e.push("("+k.linestring.apply(this,[t._holes[n]])+")");return e.join(",")}),"polygon"),multipolygon:a((function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+k.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")}),"multipolygon"),geometrycollection:a((function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}),"geometrycollection")},B={point:a((function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(D.spaces);return this.geometryFactory.createPoint(new c(Number.parseFloat(e[0]),Number.parseFloat(e[1])))}),"point"),multipoint:a((function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(D.trimParens,"$1"),r.push(B.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(r)}),"multipoint"),linestring:a((function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(D.spaces),r.push(new c(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(r)}),"linestring"),linearring:a((function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(D.spaces),r.push(new c(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(r)}),"linearring"),multilinestring:a((function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(D.parenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(D.trimParens,"$1"),r.push(B.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(r)}),"multilinestring"),polygon:a((function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,r,i,o=t.trim().split(D.parenComma),a=[],s=0,u=o.length;s<u;++s)e=o[s].replace(D.trimParens,"$1"),n=B.linestring.apply(this,[e]),r=this.geometryFactory.createLinearRing(n._points),0===s?i=r:a.push(r);return this.geometryFactory.createPolygon(i,a)}),"polygon"),multipolygon:a((function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(D.doubleParenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(D.trimParens,"$1"),r.push(B.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(r)}),"multipolygon"),geometrycollection:a((function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=e.length;r<i;++r)n.push(this.read(e[r]));return this.geometryFactory.createGeometryCollection(n)}),"geometrycollection")},j=a((function(t){this.parser=new F(t)}),"WKTWriter");j.prototype.write=a((function(t){return this.parser.write(t)}),"write"),j.toLineString=a((function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"}),"toLineString");var G=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return a(e,"RuntimeException"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),q=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return a(e,"AssertionFailedException"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(G),U=a((function(){}),"Assert");U.prototype.interfaces_=a((function(){return[]}),"interfaces_"),U.prototype.getClass=a((function(){return U}),"getClass"),U.shouldNeverReachHere=a((function(){if(0===arguments.length)U.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new q("Should never reach here"+(null!==t?": "+t:""))}}),"shouldNeverReachHere"),U.isTrue=a((function(){var t,e;if(1===arguments.length)t=arguments[0],U.isTrue(t,null);else if(2===arguments.length&&(e=arguments[1],!(t=arguments[0])))throw null===e?new q:new q(e)}),"isTrue"),U.equals=a((function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],U.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],n=arguments[2],!(e=arguments[1]).equals(t)))throw new q("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))}),"equals");var V=a((function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new c,this._intPt[1]=new c,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}),"LineIntersector"),z={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};V.prototype.getIndexAlongSegment=a((function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]}),"getIndexAlongSegment"),V.prototype.getTopologySummary=a((function(){var t=new b;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()}),"getTopologySummary"),V.prototype.computeIntersection=a((function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)}),"computeIntersection"),V.prototype.getIntersectionNum=a((function(){return this._result}),"getIntersectionNum"),V.prototype.computeIntLineIndex=a((function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}}),"computeIntLineIndex"),V.prototype.isProper=a((function(){return this.hasIntersection()&&this._isProper}),"isProper"),V.prototype.setPrecisionModel=a((function(t){this._precisionModel=t}),"setPrecisionModel"),V.prototype.isInteriorIntersection=a((function(){var t=this;if(0===arguments.length)return!(!this.isInteriorIntersection(0)&&!this.isInteriorIntersection(1));if(1===arguments.length){for(var e=arguments[0],n=0;n<this._result;n++)if(!t._intPt[n].equals2D(t._inputLines[e][0])&&!t._intPt[n].equals2D(t._inputLines[e][1]))return!0;return!1}}),"isInteriorIntersection"),V.prototype.getIntersection=a((function(t){return this._intPt[t]}),"getIntersection"),V.prototype.isEndPoint=a((function(){return this.hasIntersection()&&!this._isProper}),"isEndPoint"),V.prototype.hasIntersection=a((function(){return this._result!==V.NO_INTERSECTION}),"hasIntersection"),V.prototype.getEdgeDistance=a((function(t,e){return V.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])}),"getEdgeDistance"),V.prototype.isCollinear=a((function(){return this._result===V.COLLINEAR_INTERSECTION}),"isCollinear"),V.prototype.toString=a((function(){return j.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+j.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()}),"toString"),V.prototype.getEndpoint=a((function(t,e){return this._inputLines[t][e]}),"getEndpoint"),V.prototype.isIntersection=a((function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1}),"isIntersection"),V.prototype.getIntersectionAlongSegment=a((function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]}),"getIntersectionAlongSegment"),V.prototype.interfaces_=a((function(){return[]}),"interfaces_"),V.prototype.getClass=a((function(){return V}),"getClass"),V.computeEdgeDistance=a((function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0===(o=r>i?a:s)&&!t.equals(e)&&(o=Math.max(a,s))}return U.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o}),"computeEdgeDistance"),V.nonRobustComputeEdgeDistance=a((function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return U.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o}),"nonRobustComputeEdgeDistance"),z.DONT_INTERSECT.get=function(){return 0},z.DO_INTERSECT.get=function(){return 1},z.COLLINEAR.get=function(){return 2},z.NO_INTERSECTION.get=function(){return 0},z.POINT_INTERSECTION.get=function(){return 1},z.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(V,z);var X=function(t){function e(){t.apply(this,arguments)}return a(e,"RobustLineIntersector"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=a((function(t){var e=new T(this._inputLines[0][0],this._inputLines[0][1]),n=new T(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)}),"isInSegmentEnvelopes"),e.prototype.computeIntersection=a((function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,T.intersects(n,r,e)&&0===H.orientationIndex(n,r,e)&&0===H.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}),"computeIntersection"),e.prototype.normalizeToMinimum=a((function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y}),"normalizeToMinimum"),e.prototype.safeHCoordinateIntersection=a((function(t,n,r,i){var o=null;try{o=L.intersection(t,n,r,i)}catch(a){if(!(a instanceof O))throw a;o=e.nearestEndpoint(t,n,r,i)}return o}),"safeHCoordinateIntersection"),e.prototype.intersection=a((function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new c(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o}),"intersection"),e.prototype.smallestInAbsValue=a((function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)<o&&(i=e,o=Math.abs(e)),Math.abs(n)<o&&(i=n,o=Math.abs(n)),Math.abs(r)<o&&(i=r),i}),"smallestInAbsValue"),e.prototype.checkDD=a((function(t,e,n,r,i){var o=S.intersection(t,e,n,r),a=this.isInSegmentEnvelopes(o);P.out.println("DD in env = "+a+" --------------------- "+o),i.distance(o)>1e-4&&P.out.println("Distance = "+i.distance(o))}),"checkDD"),e.prototype.intersectionWithNormalization=a((function(t,e,n,r){var i=new c(t),o=new c(e),a=new c(n),s=new c(r),u=new c;this.normalizeToEnvCentre(i,o,a,s,u);var l=this.safeHCoordinateIntersection(i,o,a,s);return l.x+=u.x,l.y+=u.y,l}),"intersectionWithNormalization"),e.prototype.computeCollinearIntersection=a((function(e,n,r,i){var o=T.intersects(e,n,r),a=T.intersects(e,n,i),s=T.intersects(r,i,e),u=T.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||a||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION}),"computeCollinearIntersection"),e.prototype.normalizeToEnvCentre=a((function(t,e,n,r,i){var o=t.x<e.x?t.x:e.x,a=t.y<e.y?t.y:e.y,s=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,p=n.x>r.x?n.x:r.x,h=n.y>r.y?n.y:r.y,f=((o>l?o:l)+(s<p?s:p))/2,d=((a>c?a:c)+(u<h?u:h))/2;i.x=f,i.y=d,t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y}),"normalizeToEnvCentre"),e.prototype.computeIntersect=a((function(e,n,r,i){if(this._isProper=!1,!T.intersects(e,n,r,i))return t.NO_INTERSECTION;var o=H.orientationIndex(e,n,r),a=H.orientationIndex(e,n,i);if(o>0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=H.orientationIndex(r,i,e),u=H.orientationIndex(r,i,n);return s>0&&u>0||s<0&&u<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(e,n,r,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new c(r):0===a?this._intPt[0]=new c(i):0===s?this._intPt[0]=new c(e):0===u&&(this._intPt[0]=new c(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)}),"computeIntersect"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.nearestEndpoint=a((function(t,e,n,r){var i=t,o=H.distancePointLine(t,n,r),a=H.distancePointLine(e,n,r);return a<o&&(o=a,i=e),(a=H.distancePointLine(n,t,e))<o&&(o=a,i=n),(a=H.distancePointLine(r,t,e))<o&&(o=a,i=r),i}),"nearestEndpoint"),e}(V),Y=a((function(){}),"RobustDeterminant");Y.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Y.prototype.getClass=a((function(){return Y}),"getClass"),Y.orientationIndex=a((function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return Y.signOfDet2x2(r,i,o,a)}),"orientationIndex"),Y.signOfDet2x2=a((function(t,e,n,r){var i=null,o=null,a=null;if(i=1,0===t||0===r)return 0===e||0===n?0:e>0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if((r-=(a=Math.floor(n/t))*e)<0)return-i;if(r>e)return i;if(t>(n-=a*t)+n){if(e<r+r)return i}else{if(e>r+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n||(t-=(a=Math.floor(t/n))*n,(e-=a*r)<0))return i;if(e>r)return-i;if(n>t+t){if(r<e+e)return-i}else{if(r>e+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}}),"signOfDet2x2");var W=a((function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t}),"RayCrossingCounter");W.prototype.countSegment=a((function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,u=Y.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s<o&&(u=-u),u>0&&this._crossingCount++}}),"countSegment"),W.prototype.isPointInPolygon=a((function(){return this.getLocation()!==d.EXTERIOR}),"isPointInPolygon"),W.prototype.getLocation=a((function(){return this._isPointOnSegment?d.BOUNDARY:this._crossingCount%2==1?d.INTERIOR:d.EXTERIOR}),"getLocation"),W.prototype.isOnSegment=a((function(){return this._isPointOnSegment}),"isOnSegment"),W.prototype.interfaces_=a((function(){return[]}),"interfaces_"),W.prototype.getClass=a((function(){return W}),"getClass"),W.locatePointInRing=a((function(){if(arguments[0]instanceof c&&y(arguments[1],M)){for(var t=arguments[0],e=arguments[1],n=new W(t),r=new c,i=new c,o=1;o<e.size();o++)if(e.getCoordinate(o,r),e.getCoordinate(o-1,i),n.countSegment(r,i),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof c&&arguments[1]instanceof Array){for(var a=arguments[0],s=arguments[1],u=new W(a),l=1;l<s.length;l++){var p=s[l],h=s[l-1];if(u.countSegment(p,h),u.isOnSegment())return u.getLocation()}return u.getLocation()}}),"locatePointInRing");var H=a((function(){}),"CGAlgorithms"),J={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};H.prototype.interfaces_=a((function(){return[]}),"interfaces_"),H.prototype.getClass=a((function(){return H}),"getClass"),H.orientationIndex=a((function(t,e,n){return S.orientationIndex(t,e,n)}),"orientationIndex"),H.signedArea=a((function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y,a=t[r-1].y;e+=i*(a-o)}return e/2}if(y(arguments[0],M)){var s=arguments[0],u=s.size();if(u<3)return 0;var l=new c,p=new c,h=new c;s.getCoordinate(0,p),s.getCoordinate(1,h);var f=p.x;h.x-=f;for(var d=0,g=1;g<u-1;g++)l.y=p.y,p.x=h.x,p.y=h.y,s.getCoordinate(g+1,h),h.x-=f,d+=p.x*(l.y-h.y);return d/2}}),"signedArea"),H.distanceLineLine=a((function(t,e,n,r){if(t.equals(e))return H.distancePointLine(t,n,r);if(n.equals(r))return H.distancePointLine(r,t,e);var i=!1;if(T.intersects(t,e,n,r)){var o=(e.x-t.x)*(r.y-n.y)-(e.y-t.y)*(r.x-n.x);if(0===o)i=!0;else{var a=(t.y-n.y)*(r.x-n.x)-(t.x-n.x)*(r.y-n.y),s=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,u=a/o;(u<0||u>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?v.min(H.distancePointLine(t,n,r),H.distancePointLine(e,n,r),H.distancePointLine(n,t,e),H.distancePointLine(r,t,e)):0}),"distanceLineLine"),H.isPointInRing=a((function(t,e){return H.locatePointInRing(t,e)!==d.EXTERIOR}),"isPointInRing"),H.computeLength=a((function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new c;t.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;a<e;a++){t.getCoordinate(a,r);var s=r.x,u=r.y,l=s-i,p=u-o;n+=Math.sqrt(l*l+p*p),i=s,o=u}return n}),"computeLength"),H.isCCW=a((function(t){var e=t.length-1;if(e<3)throw new n("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,o=1;o<=e;o++){var a=t[o];a.y>r.y&&(r=a,i=o)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(r)&&s!==i);var u=i;do{u=(u+1)%e}while(t[u].equals2D(r)&&u!==i);var l=t[s],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var p=H.computeOrientation(l,r,c);return 0===p?l.x>c.x:p>0}),"isCCW"),H.locatePointInRing=a((function(t,e){return W.locatePointInRing(t,e)}),"locatePointInRing"),H.distancePointLinePerpendicular=a((function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)}),"distancePointLinePerpendicular"),H.computeOrientation=a((function(t,e,n){return H.orientationIndex(t,e,n)}),"computeOrientation"),H.distancePointLine=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new n("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var o=H.distancePointLine(t,e[i],e[i+1]);o<r&&(r=o)}return r}if(3===arguments.length){var a=arguments[0],s=arguments[1],u=arguments[2];if(s.x===u.x&&s.y===u.y)return a.distance(s);var l=(u.x-s.x)*(u.x-s.x)+(u.y-s.y)*(u.y-s.y),c=((a.x-s.x)*(u.x-s.x)+(a.y-s.y)*(u.y-s.y))/l;if(c<=0)return a.distance(s);if(c>=1)return a.distance(u);var p=((s.y-a.y)*(u.x-s.x)-(s.x-a.x)*(u.y-s.y))/l;return Math.abs(p)*Math.sqrt(l)}}),"distancePointLine"),H.isOnLine=a((function(t,e){for(var n=new X,r=1;r<e.length;r++){var i=e[r-1],o=e[r];if(n.computeIntersection(t,i,o),n.hasIntersection())return!0}return!1}),"isOnLine"),J.CLOCKWISE.get=function(){return-1},J.RIGHT.get=function(){return H.CLOCKWISE},J.COUNTERCLOCKWISE.get=function(){return 1},J.LEFT.get=function(){return H.COUNTERCLOCKWISE},J.COLLINEAR.get=function(){return 0},J.STRAIGHT.get=function(){return H.COLLINEAR},Object.defineProperties(H,J);var K=a((function(){}),"GeometryComponentFilter");K.prototype.filter=a((function(t){}),"filter"),K.prototype.interfaces_=a((function(){return[]}),"interfaces_"),K.prototype.getClass=a((function(){return K}),"getClass");var Z=a((function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()}),"Geometry"),$={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};Z.prototype.isGeometryCollection=a((function(){return this.getSortIndex()===Z.SORTINDEX_GEOMETRYCOLLECTION}),"isGeometryCollection"),Z.prototype.getFactory=a((function(){return this._factory}),"getFactory"),Z.prototype.getGeometryN=a((function(t){return this}),"getGeometryN"),Z.prototype.getArea=a((function(){return 0}),"getArea"),Z.prototype.isRectangle=a((function(){return!1}),"isRectangle"),Z.prototype.equals=a((function(){if(arguments[0]instanceof Z){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof Z))return!1;var n=e;return this.equalsExact(n)}}),"equals"),Z.prototype.equalsExact=a((function(t){return this===t||this.equalsExact(t,0)}),"equalsExact"),Z.prototype.geometryChanged=a((function(){this.apply(Z.geometryChangedFilter)}),"geometryChanged"),Z.prototype.geometryChangedAction=a((function(){this._envelope=null}),"geometryChangedAction"),Z.prototype.equalsNorm=a((function(t){return null!==t&&this.norm().equalsExact(t.norm())}),"equalsNorm"),Z.prototype.getLength=a((function(){return 0}),"getLength"),Z.prototype.getNumGeometries=a((function(){return 1}),"getNumGeometries"),Z.prototype.compareTo=a((function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}}),"compareTo"),Z.prototype.getUserData=a((function(){return this._userData}),"getUserData"),Z.prototype.getSRID=a((function(){return this._SRID}),"getSRID"),Z.prototype.getEnvelope=a((function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}),"getEnvelope"),Z.prototype.checkNotGeometryCollection=a((function(t){if(t.getSortIndex()===Z.SORTINDEX_GEOMETRYCOLLECTION)throw new n("This method does not support GeometryCollection arguments")}),"checkNotGeometryCollection"),Z.prototype.equal=a((function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n}),"equal"),Z.prototype.norm=a((function(){var t=this.copy();return t.normalize(),t}),"norm"),Z.prototype.getPrecisionModel=a((function(){return this._factory.getPrecisionModel()}),"getPrecisionModel"),Z.prototype.getEnvelopeInternal=a((function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new T(this._envelope)}),"getEnvelopeInternal"),Z.prototype.setSRID=a((function(t){this._SRID=t}),"setSRID"),Z.prototype.setUserData=a((function(t){this._userData=t}),"setUserData"),Z.prototype.compare=a((function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),a=i.compareTo(o);if(0!==a)return a}return n.hasNext()?1:r.hasNext()?-1:0}),"compare"),Z.prototype.hashCode=a((function(){return this.getEnvelopeInternal().hashCode()}),"hashCode"),Z.prototype.isGeometryCollectionOrDerived=a((function(){return this.getSortIndex()===Z.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===Z.SORTINDEX_MULTIPOINT||this.getSortIndex()===Z.SORTINDEX_MULTILINESTRING||this.getSortIndex()===Z.SORTINDEX_MULTIPOLYGON}),"isGeometryCollectionOrDerived"),Z.prototype.interfaces_=a((function(){return[s,o,l]}),"interfaces_"),Z.prototype.getClass=a((function(){return Z}),"getClass"),Z.hasNonEmptyElements=a((function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1}),"hasNonEmptyElements"),Z.hasNullElements=a((function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1}),"hasNullElements"),$.serialVersionUID.get=function(){return 0x799ea46522854c00},$.SORTINDEX_POINT.get=function(){return 0},$.SORTINDEX_MULTIPOINT.get=function(){return 1},$.SORTINDEX_LINESTRING.get=function(){return 2},$.SORTINDEX_LINEARRING.get=function(){return 3},$.SORTINDEX_MULTILINESTRING.get=function(){return 4},$.SORTINDEX_POLYGON.get=function(){return 5},$.SORTINDEX_MULTIPOLYGON.get=function(){return 6},$.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},$.geometryChangedFilter.get=function(){return Q},Object.defineProperties(Z,$);var Q=a((function(){}),"geometryChangedFilter");Q.interfaces_=a((function(){return[K]}),"interfaces_"),Q.filter=a((function(t){t.geometryChangedAction()}),"filter");var tt=a((function(){}),"CoordinateFilter");tt.prototype.filter=a((function(t){}),"filter"),tt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),tt.prototype.getClass=a((function(){return tt}),"getClass");var et=a((function(){}),"BoundaryNodeRule"),nt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};et.prototype.isInBoundary=a((function(t){}),"isInBoundary"),et.prototype.interfaces_=a((function(){return[]}),"interfaces_"),et.prototype.getClass=a((function(){return et}),"getClass"),nt.Mod2BoundaryNodeRule.get=function(){return rt},nt.EndPointBoundaryNodeRule.get=function(){return it},nt.MultiValentEndPointBoundaryNodeRule.get=function(){return ot},nt.MonoValentEndPointBoundaryNodeRule.get=function(){return at},nt.MOD2_BOUNDARY_RULE.get=function(){return new rt},nt.ENDPOINT_BOUNDARY_RULE.get=function(){return new it},nt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ot},nt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new at},nt.OGC_SFS_BOUNDARY_RULE.get=function(){return et.MOD2_BOUNDARY_RULE},Object.defineProperties(et,nt);var rt=a((function(){}),"Mod2BoundaryNodeRule");rt.prototype.isInBoundary=a((function(t){return t%2==1}),"isInBoundary"),rt.prototype.interfaces_=a((function(){return[et]}),"interfaces_"),rt.prototype.getClass=a((function(){return rt}),"getClass");var it=a((function(){}),"EndPointBoundaryNodeRule");it.prototype.isInBoundary=a((function(t){return t>0}),"isInBoundary"),it.prototype.interfaces_=a((function(){return[et]}),"interfaces_"),it.prototype.getClass=a((function(){return it}),"getClass");var ot=a((function(){}),"MultiValentEndPointBoundaryNodeRule");ot.prototype.isInBoundary=a((function(t){return t>1}),"isInBoundary"),ot.prototype.interfaces_=a((function(){return[et]}),"interfaces_"),ot.prototype.getClass=a((function(){return ot}),"getClass");var at=a((function(){}),"MonoValentEndPointBoundaryNodeRule");at.prototype.isInBoundary=a((function(t){return 1===t}),"isInBoundary"),at.prototype.interfaces_=a((function(){return[et]}),"interfaces_"),at.prototype.getClass=a((function(){return at}),"getClass");var st=a((function(){}),"Collection");function ut(t){this.message=t||""}st.prototype.add=a((function(){}),"add"),st.prototype.addAll=a((function(){}),"addAll"),st.prototype.isEmpty=a((function(){}),"isEmpty"),st.prototype.iterator=a((function(){}),"iterator"),st.prototype.size=a((function(){}),"size"),st.prototype.toArray=a((function(){}),"toArray"),st.prototype.remove=a((function(){}),"remove"),a(ut,"IndexOutOfBoundsException"),ut.prototype=new Error,ut.prototype.name="IndexOutOfBoundsException";var lt=a((function(){}),"Iterator");lt.prototype.hasNext=a((function(){}),"hasNext"),lt.prototype.next=a((function(){}),"next"),lt.prototype.remove=a((function(){}),"remove");var ct=function(t){function e(){t.apply(this,arguments)}return a(e,"List"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=a((function(){}),"get"),e.prototype.set=a((function(){}),"set"),e.prototype.isEmpty=a((function(){}),"isEmpty"),e}(st);function pt(t){this.message=t||""}a(pt,"NoSuchElementException"),pt.prototype=new Error,pt.prototype.name="NoSuchElementException";var ht=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}return a(e,"ArrayList"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=a((function(){}),"ensureCapacity"),e.prototype.interfaces_=a((function(){return[t,st]}),"interfaces_"),e.prototype.add=a((function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0}),"add"),e.prototype.clear=a((function(){this.array_=[]}),"clear"),e.prototype.addAll=a((function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0}),"addAll"),e.prototype.set=a((function(t,e){var n=this.array_[t];return this.array_[t]=e,n}),"set"),e.prototype.iterator=a((function(){return new ft(this)}),"iterator"),e.prototype.get=a((function(t){if(t<0||t>=this.size())throw new ut;return this.array_[t]}),"get"),e.prototype.isEmpty=a((function(){return 0===this.array_.length}),"isEmpty"),e.prototype.size=a((function(){return this.array_.length}),"size"),e.prototype.toArray=a((function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t}),"toArray"),e.prototype.remove=a((function(t){for(var e=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e}),"remove"),e}(ct),ft=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return a(e,"Iterator_"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=a((function(){if(this.position_===this.arrayList_.size())throw new pt;return this.arrayList_.get(this.position_++)}),"next"),e.prototype.hasNext=a((function(){return this.position_<this.arrayList_.size()}),"hasNext"),e.prototype.set=a((function(t){return this.arrayList_.set(this.position_-1,t)}),"set"),e.prototype.remove=a((function(){this.arrayList_.remove(this.arrayList_.get(this.position_))}),"remove"),e}(lt),dt=function(t){function e(){if(t.call(this),0!==arguments.length)if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}a(e,"CoordinateList"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=a((function(t){return this.get(t)}),"getCoordinate"),e.prototype.addAll=a((function(){var e=this;if(2===arguments.length){for(var n=arguments[0],r=arguments[1],i=!1,o=n.iterator();o.hasNext();)e.add(o.next(),r),i=!0;return i}return t.prototype.addAll.apply(this,arguments)}),"addAll"),e.prototype.clone=a((function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e}),"clone"),e.prototype.toCoordinateArray=a((function(){return this.toArray(e.coordArrayType)}),"toCoordinateArray"),e.prototype.add=a((function(){var e=this;if(1===arguments.length){var n=arguments[0];t.prototype.add.call(this,n)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var r=arguments[0],i=arguments[1];return this.add(r,i,!0),!0}if(arguments[0]instanceof c&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];if(!a&&this.size()>=1){var s=this.get(this.size()-1);if(s.equals2D(o))return null}t.prototype.add.call(this,o)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var u=arguments[0],l=arguments[1];return this.add(u,l),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var p=arguments[0],h=arguments[1],f=arguments[2];if(f)for(var d=0;d<p.length;d++)e.add(p[d],h);else for(var g=p.length-1;g>=0;g--)e.add(p[g],h);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof c){var y=arguments[0],v=arguments[1],m=arguments[2];if(!m){var _=this.size();if(_>0){if(y>0){var b=this.get(y-1);if(b.equals2D(v))return null}if(y<_){var w=this.get(y);if(w.equals2D(v))return null}}}t.prototype.add.call(this,y,v)}}else if(4===arguments.length){var x=arguments[0],E=arguments[1],I=arguments[2],S=arguments[3],C=1;I>S&&(C=-1);for(var M=I;M!==S;M+=C)e.add(x[M],E);return!0}}),"add"),e.prototype.closeRing=a((function(){this.size()>0&&this.add(new c(this.get(0)),!1)}),"closeRing"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),Object.defineProperties(e,n),e}(ht),gt=a((function(){}),"CoordinateArrays"),yt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};yt.ForwardComparator.get=function(){return vt},yt.BidirectionalComparator.get=function(){return mt},yt.coordArrayType.get=function(){return new Array(0).fill(null)},gt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),gt.prototype.getClass=a((function(){return gt}),"getClass"),gt.isRing=a((function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))}),"isRing"),gt.ptNotInList=a((function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(gt.indexOf(r,e)<0)return r}return null}),"ptNotInList"),gt.scroll=a((function(t,e){var n=gt.indexOf(e,t);if(n<0)return null;var r=new Array(t.length).fill(null);P.arraycopy(t,n,r,0,t.length-n),P.arraycopy(t,0,r,t.length-n,n),P.arraycopy(r,0,t,0,t.length)}),"scroll"),gt.equals=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i||r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(0!==o.compare(r[a],i[a]))return!1;return!0}}),"equals"),gt.intersection=a((function(t,e){for(var n=new dt,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()}),"intersection"),gt.hasRepeatedPoints=a((function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1}),"hasRepeatedPoints"),gt.removeRepeatedPoints=a((function(t){return gt.hasRepeatedPoints(t)?new dt(t,!1).toCoordinateArray():t}),"removeRepeatedPoints"),gt.reverse=a((function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}}),"reverse"),gt.removeNull=a((function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r}),"removeNull"),gt.copyDeep=a((function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new c(t[n]);return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],u=0;u<s;u++)o[a+u]=new c(r[i+u])}),"copyDeep"),gt.isEqualReversed=a((function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0}),"isEqualReversed"),gt.envelope=a((function(t){for(var e=new T,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e}),"envelope"),gt.toCoordinateArray=a((function(t){return t.toArray(gt.coordArrayType)}),"toCoordinateArray"),gt.atLeastNCoordinatesOrNothing=a((function(t,e){return e.length>=t?e:[]}),"atLeastNCoordinatesOrNothing"),gt.indexOf=a((function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1}),"indexOf"),gt.increasingDirection=a((function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1}),"increasingDirection"),gt.compare=a((function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0}),"compare"),gt.minCoordinate=a((function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e}),"minCoordinate"),gt.extract=a((function(t,e,n){e=v.clamp(e,0,t.length);var r=(n=v.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,a=e;a<=n;a++)i[o++]=t[a];return i}),"extract"),Object.defineProperties(gt,yt);var vt=a((function(){}),"ForwardComparator");vt.prototype.compare=a((function(t,e){var n=t,r=e;return gt.compare(n,r)}),"compare"),vt.prototype.interfaces_=a((function(){return[u]}),"interfaces_"),vt.prototype.getClass=a((function(){return vt}),"getClass");var mt=a((function(){}),"BidirectionalComparator");mt.prototype.compare=a((function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=gt.compare(n,r);return gt.isEqualReversed(n,r)?0:i}),"compare"),mt.prototype.OLDcompare=a((function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=gt.increasingDirection(n),o=gt.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[a].compareTo(r[s]);if(0!==l)return l;a+=i,s+=o}return 0}),"OLDcompare"),mt.prototype.interfaces_=a((function(){return[u]}),"interfaces_"),mt.prototype.getClass=a((function(){return mt}),"getClass");var _t=a((function(){}),"Map");_t.prototype.get=a((function(){}),"get"),_t.prototype.put=a((function(){}),"put"),_t.prototype.size=a((function(){}),"size"),_t.prototype.values=a((function(){}),"values"),_t.prototype.entrySet=a((function(){}),"entrySet");var bt=function(t){function e(){t.apply(this,arguments)}return a(e,"SortedMap"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_t);function wt(t){this.message=t||""}function xt(){}a(wt,"OperationNotSupported"),wt.prototype=new Error,wt.prototype.name="OperationNotSupported",a(xt,"Set"),xt.prototype=new st,xt.prototype.contains=function(){};var Et=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}return a(e,"HashSet"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=a((function(t){for(var e=0,n=this.array_.length;e<n;e++){if(this.array_[e]===t)return!0}return!1}),"contains"),e.prototype.add=a((function(t){return!this.contains(t)&&(this.array_.push(t),!0)}),"add"),e.prototype.addAll=a((function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0}),"addAll"),e.prototype.remove=a((function(t){throw new Error}),"remove"),e.prototype.size=a((function(){return this.array_.length}),"size"),e.prototype.isEmpty=a((function(){return 0===this.array_.length}),"isEmpty"),e.prototype.toArray=a((function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t}),"toArray"),e.prototype.iterator=a((function(){return new It(this)}),"iterator"),e}(xt),It=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return a(e,"Iterator_"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=a((function(){if(this.position_===this.hashSet_.size())throw new pt;return this.hashSet_.array_[this.position_++]}),"next"),e.prototype.hasNext=a((function(){return this.position_<this.hashSet_.size()}),"hasNext"),e.prototype.remove=a((function(){throw new wt}),"remove"),e}(lt);function St(t){return null===t?0:t.color}function Ct(t){return null===t?null:t.parent}function Mt(t,e){null!==t&&(t.color=e)}function Nt(t){return null===t?null:t.left}function At(t){return null===t?null:t.right}function Ot(){this.root_=null,this.size_=0}a(St,"colorOf"),a(Ct,"parentOf"),a(Mt,"setColor"),a(Nt,"leftOf"),a(At,"rightOf"),a(Ot,"TreeMap"),Ot.prototype=new bt,Ot.prototype.get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},Ot.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:0,getValue:a((function(){return this.value}),"getValue"),getKey:a((function(){return this.key}),"getKey")},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var s={key:t,left:null,right:null,value:e,parent:n,color:0,getValue:a((function(){return this.value}),"getValue"),getKey:a((function(){return this.key}),"getKey")};return r<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},Ot.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(Ct(t)===Nt(Ct(Ct(t)))){var n=At(Ct(Ct(t)));1===St(n)?(Mt(Ct(t),0),Mt(n,0),Mt(Ct(Ct(t)),1),t=Ct(Ct(t))):(t===At(Ct(t))&&(t=Ct(t),e.rotateLeft(t)),Mt(Ct(t),0),Mt(Ct(Ct(t)),1),e.rotateRight(Ct(Ct(t))))}else{var r=Nt(Ct(Ct(t)));1===St(r)?(Mt(Ct(t),0),Mt(r,0),Mt(Ct(Ct(t)),1),t=Ct(Ct(t))):(t===Nt(Ct(t))&&(t=Ct(t),e.rotateRight(t)),Mt(Ct(t),0),Mt(Ct(Ct(t)),1),e.rotateLeft(Ct(Ct(t))))}this.root_.color=0},Ot.prototype.values=function(){var t=new ht,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=Ot.successor(e));)t.add(e.value);return t},Ot.prototype.entrySet=function(){var t=new Et,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=Ot.successor(e));)t.add(e);return t},Ot.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},Ot.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},Ot.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},Ot.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},Ot.prototype.size=function(){return this.size_};var Pt=a((function(){}),"Lineal");function Lt(){}function Tt(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}Pt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Pt.prototype.getClass=a((function(){return Pt}),"getClass"),a(Lt,"SortedSet"),Lt.prototype=new xt,a(Tt,"TreeSet"),Tt.prototype=new Lt,Tt.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(0===this.array_[e].compareTo(t))return!0}return!1},Tt.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++){if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0}return this.array_.push(t),!0},Tt.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},Tt.prototype.remove=function(t){throw new wt},Tt.prototype.size=function(){return this.array_.length},Tt.prototype.isEmpty=function(){return 0===this.array_.length},Tt.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},Tt.prototype.iterator=function(){return new Rt(this)};var Rt=a((function(t){this.treeSet_=t,this.position_=0}),"Iterator_$2");Rt.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new pt;return this.treeSet_.array_[this.position_++]},Rt.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Rt.prototype.remove=function(){throw new wt};var Dt=a((function(){}),"Arrays");Dt.sort=a((function(){var t,e,n,r,i=arguments[0];if(1===arguments.length)r=a((function(t,e){return t.compareTo(e)}),"compare"),i.sort(r);else if(2===arguments.length)n=arguments[1],r=a((function(t,e){return n.compare(t,e)}),"compare"),i.sort(r);else if(3===arguments.length){(e=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length));for(i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}else if(4===arguments.length)for(e=i.slice(arguments[1],arguments[2]),n=arguments[3],r=a((function(t,e){return n.compare(t,e)}),"compare"),e.sort(r),o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length)),i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}),"sort"),Dt.asList=a((function(t){for(var e=new ht,n=0,r=t.length;n<r;n++)e.add(t[n]);return e}),"asList");var Ft=a((function(){}),"Dimension"),kt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};kt.P.get=function(){return 0},kt.L.get=function(){return 1},kt.A.get=function(){return 2},kt.FALSE.get=function(){return-1},kt.TRUE.get=function(){return-2},kt.DONTCARE.get=function(){return-3},kt.SYM_FALSE.get=function(){return"F"},kt.SYM_TRUE.get=function(){return"T"},kt.SYM_DONTCARE.get=function(){return"*"},kt.SYM_P.get=function(){return"0"},kt.SYM_L.get=function(){return"1"},kt.SYM_A.get=function(){return"2"},Ft.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ft.prototype.getClass=a((function(){return Ft}),"getClass"),Ft.toDimensionSymbol=a((function(t){switch(t){case Ft.FALSE:return Ft.SYM_FALSE;case Ft.TRUE:return Ft.SYM_TRUE;case Ft.DONTCARE:return Ft.SYM_DONTCARE;case Ft.P:return Ft.SYM_P;case Ft.L:return Ft.SYM_L;case Ft.A:return Ft.SYM_A}throw new n("Unknown dimension value: "+t)}),"toDimensionSymbol"),Ft.toDimensionValue=a((function(t){switch(x.toUpperCase(t)){case Ft.SYM_FALSE:return Ft.FALSE;case Ft.SYM_TRUE:return Ft.TRUE;case Ft.SYM_DONTCARE:return Ft.DONTCARE;case Ft.SYM_P:return Ft.P;case Ft.SYM_L:return Ft.L;case Ft.SYM_A:return Ft.A}throw new n("Unknown dimension symbol: "+t)}),"toDimensionValue"),Object.defineProperties(Ft,kt);var Bt=a((function(){}),"GeometryFilter");Bt.prototype.filter=a((function(t){}),"filter"),Bt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Bt.prototype.getClass=a((function(){return Bt}),"getClass");var jt=a((function(){}),"CoordinateSequenceFilter");jt.prototype.filter=a((function(t,e){}),"filter"),jt.prototype.isDone=a((function(){}),"isDone"),jt.prototype.isGeometryChanged=a((function(){}),"isGeometryChanged"),jt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),jt.prototype.getClass=a((function(){return jt}),"getClass");var Gt=function(t){function e(e,r){if(t.call(this,r),this._geometries=e||[],t.hasNullElements(this._geometries))throw new n("geometries must not contain null elements")}a(e,"GeometryCollection"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=a((function(){for(var t=new T,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t}),"computeEnvelopeInternal"),e.prototype.getGeometryN=a((function(t){return this._geometries[t]}),"getGeometryN"),e.prototype.getSortIndex=a((function(){return t.SORTINDEX_GEOMETRYCOLLECTION}),"getSortIndex"),e.prototype.getCoordinates=a((function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t}),"getCoordinates"),e.prototype.getArea=a((function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t}),"getArea"),e.prototype.equalsExact=a((function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n;if(this._geometries.length!==i._geometries.length)return!1;for(var o=0;o<this._geometries.length;o++)if(!e._geometries[o].equalsExact(i._geometries[o],r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.normalize=a((function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Dt.sort(this._geometries)}),"normalize"),e.prototype.getCoordinate=a((function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()}),"getCoordinate"),e.prototype.getBoundaryDimension=a((function(){for(var t=Ft.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t}),"getBoundaryDimension"),e.prototype.getDimension=a((function(){for(var t=Ft.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t}),"getDimension"),e.prototype.getLength=a((function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t}),"getLength"),e.prototype.getNumPoints=a((function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t}),"getNumPoints"),e.prototype.getNumGeometries=a((function(){return this._geometries.length}),"getNumGeometries"),e.prototype.reverse=a((function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)}),"reverse"),e.prototype.compareToSameClass=a((function(){var t=this;if(1===arguments.length){var e=arguments[0],n=new Tt(Dt.asList(this._geometries)),r=new Tt(Dt.asList(e._geometries));return this.compare(n,r)}if(2===arguments.length){for(var i=arguments[0],o=arguments[1],a=i,s=this.getNumGeometries(),u=a.getNumGeometries(),l=0;l<s&&l<u;){var c=t.getGeometryN(l),p=a.getGeometryN(l),h=c.compareToSameClass(p,o);if(0!==h)return h;l++}return l<s?1:l<u?-1:0}}),"compareToSameClass"),e.prototype.apply=a((function(){var t=this;if(y(arguments[0],tt))for(var e=arguments[0],n=0;n<this._geometries.length;n++)t._geometries[n].apply(e);else if(y(arguments[0],jt)){var r=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(t._geometries[i].apply(r),!r.isDone());i++);r.isGeometryChanged()&&this.geometryChanged()}else if(y(arguments[0],Bt)){var o=arguments[0];o.filter(this);for(var a=0;a<this._geometries.length;a++)t._geometries[a].apply(o)}else if(y(arguments[0],K)){var s=arguments[0];s.filter(this);for(var u=0;u<this._geometries.length;u++)t._geometries[u].apply(s)}}),"apply"),e.prototype.getBoundary=a((function(){return this.checkNotGeometryCollection(this),U.shouldNeverReachHere(),null}),"getBoundary"),e.prototype.clone=a((function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e}),"clone"),e.prototype.getGeometryType=a((function(){return"GeometryCollection"}),"getGeometryType"),e.prototype.copy=a((function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)}),"copy"),e.prototype.isEmpty=a((function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0}),"isEmpty"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),r.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,r),e}(Z),qt=function(t){function e(){t.apply(this,arguments)}a(e,"MultiLineString"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=a((function(){return Z.SORTINDEX_MULTILINESTRING}),"getSortIndex"),e.prototype.equalsExact=a((function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.getBoundaryDimension=a((function(){return this.isClosed()?Ft.FALSE:0}),"getBoundaryDimension"),e.prototype.isClosed=a((function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0}),"isClosed"),e.prototype.getDimension=a((function(){return 1}),"getDimension"),e.prototype.reverse=a((function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)}),"reverse"),e.prototype.getBoundary=a((function(){return new Ut(this).getBoundary()}),"getBoundary"),e.prototype.getGeometryType=a((function(){return"MultiLineString"}),"getGeometryType"),e.prototype.copy=a((function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)}),"copy"),e.prototype.interfaces_=a((function(){return[Pt]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Gt),Ut=a((function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=et.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}}),"BoundaryOp");Ut.prototype.boundaryMultiLineString=a((function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)}),"boundaryMultiLineString"),Ut.prototype.getBoundary=a((function(){return this._geom instanceof Qt?this.boundaryLineString(this._geom):this._geom instanceof qt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()}),"getBoundary"),Ut.prototype.boundaryLineString=a((function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])}),"boundaryLineString"),Ut.prototype.getEmptyMultiPoint=a((function(){return this._geomFact.createMultiPoint()}),"getEmptyMultiPoint"),Ut.prototype.computeBoundaryCoordinates=a((function(t){var e=this,n=new ht;this._endpointMap=new Ot;for(var r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);0!==i.getNumPoints()&&(e.addEndpoint(i.getCoordinateN(0)),e.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),s=a.getValue().count;e._bnRule.isInBoundary(s)&&n.add(a.getKey())}return gt.toCoordinateArray(n)}),"computeBoundaryCoordinates"),Ut.prototype.addEndpoint=a((function(t){var e=this._endpointMap.get(t);null===e&&(e=new Vt,this._endpointMap.put(t,e)),e.count++}),"addEndpoint"),Ut.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ut.prototype.getClass=a((function(){return Ut}),"getClass"),Ut.getBoundary=a((function(){if(1===arguments.length){var t=arguments[0],e=new Ut(t);return e.getBoundary()}if(2===arguments.length){var n=arguments[0],r=arguments[1],i=new Ut(n,r);return i.getBoundary()}}),"getBoundary");var Vt=a((function(){this.count=null}),"Counter");function zt(){}function Xt(){}Vt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Vt.prototype.getClass=a((function(){return Vt}),"getClass"),a(zt,"PrintStream"),a(Xt,"StringReader");var Yt=a((function(){}),"DecimalFormat");function Wt(){}function Ht(){}function Jt(){}a(Wt,"ByteArrayOutputStream"),a(Ht,"IOException"),a(Jt,"LineNumberReader");var Kt=a((function(){}),"StringUtil"),Zt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Kt.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Kt.prototype.getClass=a((function(){return Kt}),"getClass"),Kt.chars=a((function(t,e){for(var n=new Array(e).fill(null),r=0;r<e;r++)n[r]=t;return String(n)}),"chars"),Kt.getStackTrace=a((function(){if(1===arguments.length){var t=arguments[0],e=new Wt,n=new zt(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o="",a=new Xt(Kt.getStackTrace(r)),s=new Jt(a),u=0;u<i;u++)try{o+=s.readLine()+Kt.NEWLINE}catch(t){if(!(t instanceof Ht))throw t;U.shouldNeverReachHere()}return o}}),"getStackTrace"),Kt.split=a((function(t,e){for(var n=e.length,r=new ht,i=""+t,o=i.indexOf(e);o>=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),u=0;u<s.length;u++)s[u]=r.get(u);return s}),"split"),Kt.toString=a((function(){if(1===arguments.length){var t=arguments[0];return Kt.SIMPLE_ORDINATE_FORMAT.format(t)}}),"toString"),Kt.spaces=a((function(t){return Kt.chars(" ",t)}),"spaces"),Zt.NEWLINE.get=function(){return P.getProperty("line.separator")},Zt.SIMPLE_ORDINATE_FORMAT.get=function(){return new Yt("0.#")},Object.defineProperties(Kt,Zt);var $t=a((function(){}),"CoordinateSequences");$t.prototype.interfaces_=a((function(){return[]}),"interfaces_"),$t.prototype.getClass=a((function(){return $t}),"getClass"),$t.copyCoord=a((function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))}),"copyCoord"),$t.isRing=a((function(t){var e=t.size();return 0===e||!(e<=3)&&(t.getOrdinate(0,M.X)===t.getOrdinate(e-1,M.X)&&t.getOrdinate(0,M.Y)===t.getOrdinate(e-1,M.Y))}),"isRing"),$t.isEqual=a((function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),o=0;o<n;o++)for(var a=0;a<i;a++){var s=t.getOrdinate(o,a),u=e.getOrdinate(o,a);if(!(t.getOrdinate(o,a)===e.getOrdinate(o,a)||r.isNaN(s)&&r.isNaN(u)))return!1}return!0}),"isEqual"),$t.extend=a((function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();if($t.copy(e,0,r,0,i),i>0)for(var o=i;o<n;o++)$t.copy(e,i-1,r,o,1);return r}),"extend"),$t.reverse=a((function(t){for(var e=t.size()-1,n=Math.trunc(e/2),r=0;r<=n;r++)$t.swap(t,r,e-r)}),"reverse"),$t.swap=a((function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}}),"swap"),$t.copy=a((function(t,e,n,r,i){for(var o=0;o<i;o++)$t.copyCoord(t,e+o,n,r+o)}),"copy"),$t.toString=a((function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),r=new b;r.append("(");for(var i=0;i<e;i++){i>0&&r.append(" ");for(var o=0;o<n;o++)o>0&&r.append(","),r.append(Kt.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}}),"toString"),$t.ensureValidRing=a((function(t,e){var n=e.size();return 0===n?e:n<=3?$t.createClosedRing(t,e,4):e.getOrdinate(0,M.X)===e.getOrdinate(n-1,M.X)&&e.getOrdinate(0,M.Y)===e.getOrdinate(n-1,M.Y)?e:$t.createClosedRing(t,e,n+1)}),"ensureValidRing"),$t.createClosedRing=a((function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();$t.copy(e,0,r,0,i);for(var o=i;o<n;o++)$t.copy(e,0,r,o,1);return r}),"createClosedRing");var Qt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}a(e,"LineString"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=a((function(){return this.isEmpty()?new T:this._points.expandEnvelope(new T)}),"computeEnvelopeInternal"),e.prototype.isRing=a((function(){return this.isClosed()&&this.isSimple()}),"isRing"),e.prototype.getSortIndex=a((function(){return t.SORTINDEX_LINESTRING}),"getSortIndex"),e.prototype.getCoordinates=a((function(){return this._points.toCoordinateArray()}),"getCoordinates"),e.prototype.equalsExact=a((function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n;if(this._points.size()!==i._points.size())return!1;for(var o=0;o<this._points.size();o++)if(!e.equal(e._points.getCoordinate(o),i._points.getCoordinate(o),r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.normalize=a((function(){for(var t=this,e=0;e<Math.trunc(this._points.size()/2);e++){var n=t._points.size()-1-e;if(!t._points.getCoordinate(e).equals(t._points.getCoordinate(n)))return t._points.getCoordinate(e).compareTo(t._points.getCoordinate(n))>0&&$t.reverse(t._points),null}}),"normalize"),e.prototype.getCoordinate=a((function(){return this.isEmpty()?null:this._points.getCoordinate(0)}),"getCoordinate"),e.prototype.getBoundaryDimension=a((function(){return this.isClosed()?Ft.FALSE:0}),"getBoundaryDimension"),e.prototype.isClosed=a((function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}),"isClosed"),e.prototype.getEndPoint=a((function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}),"getEndPoint"),e.prototype.getDimension=a((function(){return 1}),"getDimension"),e.prototype.getLength=a((function(){return H.computeLength(this._points)}),"getLength"),e.prototype.getNumPoints=a((function(){return this._points.size()}),"getNumPoints"),e.prototype.reverse=a((function(){var t=this._points.copy();return $t.reverse(t),this.getFactory().createLineString(t)}),"reverse"),e.prototype.compareToSameClass=a((function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=e,r=0,i=0;r<this._points.size()&&i<n._points.size();){var o=t._points.getCoordinate(r).compareTo(n._points.getCoordinate(i));if(0!==o)return o;r++,i++}return r<this._points.size()?1:i<n._points.size()?-1:0}if(2===arguments.length){var a=arguments[0],s=arguments[1],u=a;return s.compare(this._points,u._points)}}),"compareToSameClass"),e.prototype.apply=a((function(){var t=this;if(y(arguments[0],tt))for(var e=arguments[0],n=0;n<this._points.size();n++)e.filter(t._points.getCoordinate(n));else if(y(arguments[0],jt)){var r=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(r.filter(t._points,i),!r.isDone());i++);r.isGeometryChanged()&&this.geometryChanged()}else if(y(arguments[0],Bt)){var o=arguments[0];o.filter(this)}else if(y(arguments[0],K)){var a=arguments[0];a.filter(this)}}),"apply"),e.prototype.getBoundary=a((function(){return new Ut(this).getBoundary()}),"getBoundary"),e.prototype.isEquivalentClass=a((function(t){return t instanceof e}),"isEquivalentClass"),e.prototype.clone=a((function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e}),"clone"),e.prototype.getCoordinateN=a((function(t){return this._points.getCoordinate(t)}),"getCoordinateN"),e.prototype.getGeometryType=a((function(){return"LineString"}),"getGeometryType"),e.prototype.copy=a((function(){return new e(this._points.copy(),this._factory)}),"copy"),e.prototype.getCoordinateSequence=a((function(){return this._points}),"getCoordinateSequence"),e.prototype.isEmpty=a((function(){return 0===this._points.size()}),"isEmpty"),e.prototype.init=a((function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new n("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t}),"init"),e.prototype.isCoordinate=a((function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1}),"isCoordinate"),e.prototype.getStartPoint=a((function(){return this.isEmpty()?null:this.getPointN(0)}),"getStartPoint"),e.prototype.getPointN=a((function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))}),"getPointN"),e.prototype.interfaces_=a((function(){return[Pt]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),r.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,r),e}(Z),te=a((function(){}),"Puntal");te.prototype.interfaces_=a((function(){return[]}),"interfaces_"),te.prototype.getClass=a((function(){return te}),"getClass");var ee=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}a(e,"Point"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=a((function(){if(this.isEmpty())return new T;var t=new T;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t}),"computeEnvelopeInternal"),e.prototype.getSortIndex=a((function(){return t.SORTINDEX_POINT}),"getSortIndex"),e.prototype.getCoordinates=a((function(){return this.isEmpty()?[]:[this.getCoordinate()]}),"getCoordinates"),e.prototype.equalsExact=a((function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.normalize=a((function(){}),"normalize"),e.prototype.getCoordinate=a((function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null}),"getCoordinate"),e.prototype.getBoundaryDimension=a((function(){return Ft.FALSE}),"getBoundaryDimension"),e.prototype.getDimension=a((function(){return 0}),"getDimension"),e.prototype.getNumPoints=a((function(){return this.isEmpty()?0:1}),"getNumPoints"),e.prototype.reverse=a((function(){return this.copy()}),"reverse"),e.prototype.getX=a((function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x}),"getX"),e.prototype.compareToSameClass=a((function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getCoordinate().compareTo(e.getCoordinate())}if(2===arguments.length){var n=arguments[0],r=arguments[1],i=n;return r.compare(this._coordinates,i._coordinates)}}),"compareToSameClass"),e.prototype.apply=a((function(){if(y(arguments[0],tt)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(y(arguments[0],jt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(y(arguments[0],Bt)){var n=arguments[0];n.filter(this)}else if(y(arguments[0],K)){var r=arguments[0];r.filter(this)}}),"apply"),e.prototype.getBoundary=a((function(){return this.getFactory().createGeometryCollection(null)}),"getBoundary"),e.prototype.clone=a((function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e}),"clone"),e.prototype.getGeometryType=a((function(){return"Point"}),"getGeometryType"),e.prototype.copy=a((function(){return new e(this._coordinates.copy(),this._factory)}),"copy"),e.prototype.getCoordinateSequence=a((function(){return this._coordinates}),"getCoordinateSequence"),e.prototype.getY=a((function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y}),"getY"),e.prototype.isEmpty=a((function(){return 0===this._coordinates.size()}),"isEmpty"),e.prototype.init=a((function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),U.isTrue(t.size()<=1),this._coordinates=t}),"init"),e.prototype.isSimple=a((function(){return!0}),"isSimple"),e.prototype.interfaces_=a((function(){return[te]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(Z),ne=a((function(){}),"Polygonal");ne.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ne.prototype.getClass=a((function(){return ne}),"getClass");var re=function(t){function e(e,r,i){if(t.call(this,i),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===r&&(r=[]),t.hasNullElements(r))throw new n("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(r))throw new n("shell is empty but holes are not");this._shell=e,this._holes=r}a(e,"Polygon"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=a((function(){return this._shell.getEnvelopeInternal()}),"computeEnvelopeInternal"),e.prototype.getSortIndex=a((function(){return t.SORTINDEX_POLYGON}),"getSortIndex"),e.prototype.getCoordinates=a((function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),a=0;a<o.length;a++)t[++e]=o[a];return t}),"getCoordinates"),e.prototype.getArea=a((function(){var t=0;t+=Math.abs(H.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(H.signedArea(this._holes[e].getCoordinateSequence()));return t}),"getArea"),e.prototype.isRectangle=a((function(){if(0!==this.getNumInteriorRing()||null===this._shell||5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),a=t.getY(0),s=1;s<=4;s++){var u=t.getX(s),l=t.getY(s);if(u!==o===(l!==a))return!1;o=u,a=l}return!0}),"isRectangle"),e.prototype.equalsExact=a((function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n,o=this._shell,a=i._shell;if(!o.equalsExact(a,r)||this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!e._holes[s].equalsExact(i._holes[s],r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.normalize=a((function(){var t=this;if(0===arguments.length){this.normalize(this._shell,!0);for(var e=0;e<this._holes.length;e++)t.normalize(t._holes[e],!1);Dt.sort(this._holes)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];if(n.isEmpty())return null;var i=new Array(n.getCoordinates().length-1).fill(null);P.arraycopy(n.getCoordinates(),0,i,0,i.length);var o=gt.minCoordinate(n.getCoordinates());gt.scroll(i,o),P.arraycopy(i,0,n.getCoordinates(),0,i.length),n.getCoordinates()[i.length]=i[0],H.isCCW(n.getCoordinates())===r&&gt.reverse(n.getCoordinates())}}),"normalize"),e.prototype.getCoordinate=a((function(){return this._shell.getCoordinate()}),"getCoordinate"),e.prototype.getNumInteriorRing=a((function(){return this._holes.length}),"getNumInteriorRing"),e.prototype.getBoundaryDimension=a((function(){return 1}),"getBoundaryDimension"),e.prototype.getDimension=a((function(){return 2}),"getDimension"),e.prototype.getLength=a((function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t}),"getLength"),e.prototype.getNumPoints=a((function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t}),"getNumPoints"),e.prototype.reverse=a((function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t}),"reverse"),e.prototype.convexHull=a((function(){return this.getExteriorRing().convexHull()}),"convexHull"),e.prototype.compareToSameClass=a((function(){var t=this;if(1===arguments.length){var e=arguments[0],n=this._shell,r=e._shell;return n.compareToSameClass(r)}if(2===arguments.length){var i=arguments[0],o=arguments[1],a=i,s=this._shell,u=a._shell,l=s.compareToSameClass(u,o);if(0!==l)return l;for(var c=this.getNumInteriorRing(),p=a.getNumInteriorRing(),h=0;h<c&&h<p;){var f=t.getInteriorRingN(h),d=a.getInteriorRingN(h),g=f.compareToSameClass(d,o);if(0!==g)return g;h++}return h<c?1:h<p?-1:0}}),"compareToSameClass"),e.prototype.apply=a((function(t){var e=this;if(y(t,tt)){this._shell.apply(t);for(var n=0;n<this._holes.length;n++)e._holes[n].apply(t)}else if(y(t,jt)){if(this._shell.apply(t),!t.isDone())for(var r=0;r<this._holes.length&&(e._holes[r].apply(t),!t.isDone());r++);t.isGeometryChanged()&&this.geometryChanged()}else if(y(t,Bt))t.filter(this);else if(y(t,K)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)e._holes[i].apply(t)}}),"apply"),e.prototype.getBoundary=a((function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)}),"getBoundary"),e.prototype.clone=a((function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e}),"clone"),e.prototype.getGeometryType=a((function(){return"Polygon"}),"getGeometryType"),e.prototype.copy=a((function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new e(t,n,this._factory)}),"copy"),e.prototype.getExteriorRing=a((function(){return this._shell}),"getExteriorRing"),e.prototype.isEmpty=a((function(){return this._shell.isEmpty()}),"isEmpty"),e.prototype.getInteriorRingN=a((function(t){return this._holes[t]}),"getInteriorRingN"),e.prototype.interfaces_=a((function(){return[ne]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),r.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,r),e}(Z),ie=function(t){function e(){t.apply(this,arguments)}a(e,"MultiPoint"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=a((function(){return Z.SORTINDEX_MULTIPOINT}),"getSortIndex"),e.prototype.isValid=a((function(){return!0}),"isValid"),e.prototype.equalsExact=a((function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.getCoordinate=a((function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)}),"getCoordinate"),e.prototype.getBoundaryDimension=a((function(){return Ft.FALSE}),"getBoundaryDimension"),e.prototype.getDimension=a((function(){return 0}),"getDimension"),e.prototype.getBoundary=a((function(){return this.getFactory().createGeometryCollection(null)}),"getBoundary"),e.prototype.getGeometryType=a((function(){return"MultiPoint"}),"getGeometryType"),e.prototype.copy=a((function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)}),"copy"),e.prototype.interfaces_=a((function(){return[te]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Gt),oe=function(t){function e(e,n){e instanceof c&&n instanceof we&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}a(e,"LinearRing"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=a((function(){return Z.SORTINDEX_LINEARRING}),"getSortIndex"),e.prototype.getBoundaryDimension=a((function(){return Ft.FALSE}),"getBoundaryDimension"),e.prototype.isClosed=a((function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)}),"isClosed"),e.prototype.reverse=a((function(){var t=this._points.copy();return $t.reverse(t),this.getFactory().createLinearRing(t)}),"reverse"),e.prototype.validateConstruction=a((function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new n("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new n("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")}),"validateConstruction"),e.prototype.getGeometryType=a((function(){return"LinearRing"}),"getGeometryType"),e.prototype.copy=a((function(){return new e(this._points.copy(),this._factory)}),"copy"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),r.MINIMUM_VALID_SIZE.get=function(){return 4},r.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,r),e}(Qt),ae=function(t){function e(){t.apply(this,arguments)}a(e,"MultiPolygon"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=a((function(){return Z.SORTINDEX_MULTIPOLYGON}),"getSortIndex"),e.prototype.equalsExact=a((function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)}),"equalsExact"),e.prototype.getBoundaryDimension=a((function(){return 1}),"getBoundaryDimension"),e.prototype.getDimension=a((function(){return 2}),"getDimension"),e.prototype.reverse=a((function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)}),"reverse"),e.prototype.getBoundary=a((function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new ht,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))}),"getBoundary"),e.prototype.getGeometryType=a((function(){return"MultiPolygon"}),"getGeometryType"),e.prototype.copy=a((function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)}),"copy"),e.prototype.interfaces_=a((function(){return[ne]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Gt),se=a((function(t){this._factory=t||null,this._isUserDataCopied=!1}),"GeometryEditor"),ue={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};se.prototype.setCopyUserData=a((function(t){this._isUserDataCopied=t}),"setCopyUserData"),se.prototype.edit=a((function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n}),"edit"),se.prototype.editInternal=a((function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Gt?this.editGeometryCollection(t,e):t instanceof re?this.editPolygon(t,e):t instanceof ee||t instanceof Qt?e.edit(t,this._factory):(U.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)}),"editInternal"),se.prototype.editGeometryCollection=a((function(t,e){for(var n=e.edit(t,this._factory),r=new ht,i=0;i<n.getNumGeometries();i++){var o=this.edit(n.getGeometryN(i),e);null===o||o.isEmpty()||r.add(o)}return n.getClass()===ie?this._factory.createMultiPoint(r.toArray([])):n.getClass()===qt?this._factory.createMultiLineString(r.toArray([])):n.getClass()===ae?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))}),"editGeometryCollection"),se.prototype.editPolygon=a((function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),e);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new ht,o=0;o<n.getNumInteriorRing();o++){var a=this.edit(n.getInteriorRingN(o),e);null===a||a.isEmpty()||i.add(a)}return this._factory.createPolygon(r,i.toArray([]))}),"editPolygon"),se.prototype.interfaces_=a((function(){return[]}),"interfaces_"),se.prototype.getClass=a((function(){return se}),"getClass"),se.GeometryEditorOperation=a((function(){}),"GeometryEditorOperation"),ue.NoOpGeometryOperation.get=function(){return le},ue.CoordinateOperation.get=function(){return ce},ue.CoordinateSequenceOperation.get=function(){return pe},Object.defineProperties(se,ue);var le=a((function(){}),"NoOpGeometryOperation");le.prototype.edit=a((function(t,e){return t}),"edit"),le.prototype.interfaces_=a((function(){return[se.GeometryEditorOperation]}),"interfaces_"),le.prototype.getClass=a((function(){return le}),"getClass");var ce=a((function(){}),"CoordinateOperation");ce.prototype.edit=a((function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof oe?e.createLinearRing(n):t instanceof Qt?e.createLineString(n):t instanceof ee?n.length>0?e.createPoint(n[0]):e.createPoint():t}),"edit"),ce.prototype.interfaces_=a((function(){return[se.GeometryEditorOperation]}),"interfaces_"),ce.prototype.getClass=a((function(){return ce}),"getClass");var pe=a((function(){}),"CoordinateSequenceOperation");pe.prototype.edit=a((function(t,e){return t instanceof oe?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Qt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof ee?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t}),"edit"),pe.prototype.interfaces_=a((function(){return[se.GeometryEditorOperation]}),"interfaces_"),pe.prototype.getClass=a((function(){return pe}),"getClass");var he=a((function(){var t=this;if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new c}else if(y(arguments[0],M)){var r=arguments[0];if(null===r)return this._coordinates=new Array(0).fill(null),null;this._dimension=r.getDimension(),this._coordinates=new Array(r.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)t._coordinates[i]=r.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,null===o&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],u=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=u;for(var l=0;l<s;l++)t._coordinates[l]=new c}}),"CoordinateArraySequence"),fe={serialVersionUID:{configurable:!0}};he.prototype.setOrdinate=a((function(t,e,r){switch(e){case M.X:this._coordinates[t].x=r;break;case M.Y:this._coordinates[t].y=r;break;case M.Z:this._coordinates[t].z=r;break;default:throw new n("invalid ordinateIndex")}}),"setOrdinate"),he.prototype.size=a((function(){return this._coordinates.length}),"size"),he.prototype.getOrdinate=a((function(t,e){switch(e){case M.X:return this._coordinates[t].x;case M.Y:return this._coordinates[t].y;case M.Z:return this._coordinates[t].z}return r.NaN}),"getOrdinate"),he.prototype.getCoordinate=a((function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}}),"getCoordinate"),he.prototype.getCoordinateCopy=a((function(t){return new c(this._coordinates[t])}),"getCoordinateCopy"),he.prototype.getDimension=a((function(){return this._dimension}),"getDimension"),he.prototype.getX=a((function(t){return this._coordinates[t].x}),"getX"),he.prototype.clone=a((function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new he(t,this._dimension)}),"clone"),he.prototype.expandEnvelope=a((function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t}),"expandEnvelope"),he.prototype.copy=a((function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new he(t,this._dimension)}),"copy"),he.prototype.toString=a((function(){if(this._coordinates.length>0){var t=new b(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"}),"toString"),he.prototype.getY=a((function(t){return this._coordinates[t].y}),"getY"),he.prototype.toCoordinateArray=a((function(){return this._coordinates}),"toCoordinateArray"),he.prototype.interfaces_=a((function(){return[M,l]}),"interfaces_"),he.prototype.getClass=a((function(){return he}),"getClass"),fe.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(he,fe);var de=a((function(){}),"CoordinateArraySequenceFactory"),ge={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};de.prototype.readResolve=a((function(){return de.instance()}),"readResolve"),de.prototype.create=a((function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new he(t)}if(y(arguments[0],M)){var e=arguments[0];return new he(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return r>3&&(r=3),r<2?new he(n):new he(n,r)}}),"create"),de.prototype.interfaces_=a((function(){return[f,l]}),"interfaces_"),de.prototype.getClass=a((function(){return de}),"getClass"),de.instance=a((function(){return de.instanceObject}),"instance"),ge.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},ge.instanceObject.get=function(){return new de},Object.defineProperties(de,ge);var ye=function(t){function e(){t.call(this),this.map_=new Map}return a(e,"HashMap"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=a((function(t){return this.map_.get(t)||null}),"get"),e.prototype.put=a((function(t,e){return this.map_.set(t,e),e}),"put"),e.prototype.values=a((function(){for(var t=new ht,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t}),"values"),e.prototype.entrySet=a((function(){var t=new Et;return this.map_.entries().forEach((function(e){return t.add(e)})),t}),"entrySet"),e.prototype.size=a((function(){return this.map_.size()}),"size"),e}(_t),ve=a((function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof _e){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}),"PrecisionModel"),me={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};ve.prototype.equals=a((function(t){if(!(t instanceof ve))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale}),"equals"),ve.prototype.compareTo=a((function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new w(n).compareTo(new w(r))}),"compareTo"),ve.prototype.getScale=a((function(){return this._scale}),"getScale"),ve.prototype.isFloating=a((function(){return this._modelType===ve.FLOATING||this._modelType===ve.FLOATING_SINGLE}),"isFloating"),ve.prototype.getType=a((function(){return this._modelType}),"getType"),ve.prototype.toString=a((function(){var t="UNKNOWN";return this._modelType===ve.FLOATING?t="Floating":this._modelType===ve.FLOATING_SINGLE?t="Floating-Single":this._modelType===ve.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t}),"toString"),ve.prototype.makePrecise=a((function(){if("number"==typeof arguments[0]){var t=arguments[0];if(r.isNaN(t))return t;if(this._modelType===ve.FLOATING_SINGLE){return t}return this._modelType===ve.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof c){var e=arguments[0];if(this._modelType===ve.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}}),"makePrecise"),ve.prototype.getMaximumSignificantDigits=a((function(){var t=16;return this._modelType===ve.FLOATING?t=16:this._modelType===ve.FLOATING_SINGLE?t=6:this._modelType===ve.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t}),"getMaximumSignificantDigits"),ve.prototype.setScale=a((function(t){this._scale=Math.abs(t)}),"setScale"),ve.prototype.interfaces_=a((function(){return[l,o]}),"interfaces_"),ve.prototype.getClass=a((function(){return ve}),"getClass"),ve.mostPrecise=a((function(t,e){return t.compareTo(e)>=0?t:e}),"mostPrecise"),me.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},me.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(ve,me);var _e=a((function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)}),"Type"),be={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};_e.prototype.readResolve=a((function(){return _e.nameToTypeMap.get(this._name)}),"readResolve"),_e.prototype.toString=a((function(){return this._name}),"toString"),_e.prototype.interfaces_=a((function(){return[l]}),"interfaces_"),_e.prototype.getClass=a((function(){return _e}),"getClass"),be.serialVersionUID.get=function(){return-552860263173159e4},be.nameToTypeMap.get=function(){return new ye},Object.defineProperties(_e,be),ve.Type=_e,ve.FIXED=new _e("FIXED"),ve.FLOATING=new _e("FLOATING"),ve.FLOATING_SINGLE=new _e("FLOATING SINGLE");var we=a((function t(){this._precisionModel=new ve,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?y(arguments[0],f)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof ve&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))}),"GeometryFactory"),xe={serialVersionUID:{configurable:!0}};we.prototype.toGeometry=a((function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new c(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new c(t.getMinX(),t.getMinY()),new c(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new c(t.getMinX(),t.getMinY()),new c(t.getMinX(),t.getMaxY()),new c(t.getMaxX(),t.getMaxY()),new c(t.getMaxX(),t.getMinY()),new c(t.getMinX(),t.getMinY())]),null)}),"toGeometry"),we.prototype.createLineString=a((function(t){return t?t instanceof Array?new Qt(this.getCoordinateSequenceFactory().create(t),this):y(t,M)?new Qt(t,this):void 0:new Qt(this.getCoordinateSequenceFactory().create([]),this)}),"createLineString"),we.prototype.createMultiLineString=a((function(){if(0===arguments.length)return new qt(null,this);if(1===arguments.length){var t=arguments[0];return new qt(t,this)}}),"createMultiLineString"),we.prototype.buildGeometry=a((function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(we.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof re)return this.createMultiPolygon(we.toPolygonArray(t));if(s instanceof Qt)return this.createMultiLineString(we.toLineStringArray(t));if(s instanceof ee)return this.createMultiPoint(we.toPointArray(t));U.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s}),"buildGeometry"),we.prototype.createMultiPointFromCoords=a((function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}),"createMultiPointFromCoords"),we.prototype.createPoint=a((function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof c){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(y(arguments[0],M)){var e=arguments[0];return new ee(e,this)}}}),"createPoint"),we.prototype.getCoordinateSequenceFactory=a((function(){return this._coordinateSequenceFactory}),"getCoordinateSequenceFactory"),we.prototype.createPolygon=a((function(){if(0===arguments.length)return new re(null,null,this);if(1===arguments.length){if(y(arguments[0],M)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof oe){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new re(r,i,this)}}),"createPolygon"),we.prototype.getSRID=a((function(){return this._SRID}),"getSRID"),we.prototype.createGeometryCollection=a((function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}}),"createGeometryCollection"),we.prototype.createGeometry=a((function(t){return new se(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})}),"createGeometry"),we.prototype.getPrecisionModel=a((function(){return this._precisionModel}),"getPrecisionModel"),we.prototype.createLinearRing=a((function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(y(arguments[0],M)){var e=arguments[0];return new oe(e,this)}}}),"createLinearRing"),we.prototype.createMultiPolygon=a((function(){if(0===arguments.length)return new ae(null,this);if(1===arguments.length){var t=arguments[0];return new ae(t,this)}}),"createMultiPolygon"),we.prototype.createMultiPoint=a((function(){var t=this;if(0===arguments.length)return new ie(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new ie(e,this)}if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(null!==n?this.getCoordinateSequenceFactory().create(n):null)}if(y(arguments[0],M)){var r=arguments[0];if(null===r)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),o=0;o<r.size();o++){var a=t.getCoordinateSequenceFactory().create(1,r.getDimension());$t.copy(r,o,a,0,1),i[o]=t.createPoint(a)}return this.createMultiPoint(i)}}}),"createMultiPoint"),we.prototype.interfaces_=a((function(){return[l]}),"interfaces_"),we.prototype.getClass=a((function(){return we}),"getClass"),we.toMultiPolygonArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toMultiPolygonArray"),we.toGeometryArray=a((function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toGeometryArray"),we.getDefaultCoordinateSequenceFactory=a((function(){return de.instance()}),"getDefaultCoordinateSequenceFactory"),we.toMultiLineStringArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toMultiLineStringArray"),we.toLineStringArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toLineStringArray"),we.toMultiPointArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toMultiPointArray"),we.toLinearRingArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toLinearRingArray"),we.toPointArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toPointArray"),we.toPolygonArray=a((function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}),"toPolygonArray"),we.createPointFromInternalCoord=a((function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)}),"createPointFromInternalCoord"),xe.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(we,xe);var Ee=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Ie=a((function(t){this.geometryFactory=t||new we}),"GeoJSONParser");Ie.prototype.read=a((function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!Se[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==Ee.indexOf(n)?Se[n].apply(this,[e.coordinates]):"GeometryCollection"===n?Se[n].apply(this,[e.geometries]):Se[n].apply(this,[e])}),"read"),Ie.prototype.write=a((function(t){var e=t.getGeometryType();if(!Ce[e])throw new Error("Geometry is not supported");return Ce[e].apply(this,[t])}),"write");var Se={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!Se[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Se.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(new c(r[0],r[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new c(t[0],t[1]),new c(t[2],t[1]),new c(t[2],t[3]),new c(t[0],t[3]),new c(t[0],t[1])])},Point:function(t){var e=new c(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Se.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Se.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Se.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Se.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],a=Se.coordinates.apply(this,[o]),s=this.geometryFactory.createLinearRing(a);r.push(s)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(Se.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},Ce={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:Ce.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Ce.Point.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(Ce.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Ce.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=Ce.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=Ce.LineString.apply(this,[i]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Ce.Polygon.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(Ce[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:e}}},Me=a((function(t){this.geometryFactory=t||new we,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ie(this.geometryFactory)}),"GeoJSONReader");Me.prototype.read=a((function(t){var e=this.parser.read(t);return this.precisionModel.getType()===ve.FIXED&&this.reducePrecision(e),e}),"read"),Me.prototype.reducePrecision=a((function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])}),"reducePrecision");var Ne=a((function(){this.parser=new Ie(this.geometryFactory)}),"GeoJSONWriter");Ne.prototype.write=a((function(t){return this.parser.write(t)}),"write");var Ae=a((function(){}),"Position"),Oe={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};function Pe(t){this.message=t||""}function Le(){this.array_=[]}Ae.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ae.prototype.getClass=a((function(){return Ae}),"getClass"),Ae.opposite=a((function(t){return t===Ae.LEFT?Ae.RIGHT:t===Ae.RIGHT?Ae.LEFT:t}),"opposite"),Oe.ON.get=function(){return 0},Oe.LEFT.get=function(){return 1},Oe.RIGHT.get=function(){return 2},Object.defineProperties(Ae,Oe),a(Pe,"EmptyStackException"),Pe.prototype=new Error,Pe.prototype.name="EmptyStackException",a(Le,"Stack"),Le.prototype=new ct,Le.prototype.add=function(t){return this.array_.push(t),!0},Le.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},Le.prototype.push=function(t){return this.array_.push(t),t},Le.prototype.pop=function(t){if(0===this.array_.length)throw new Pe;return this.array_.pop()},Le.prototype.peek=function(){if(0===this.array_.length)throw new Pe;return this.array_[this.array_.length-1]},Le.prototype.empty=function(){return 0===this.array_.length},Le.prototype.isEmpty=function(){return this.empty()},Le.prototype.search=function(t){return this.array_.indexOf(t)},Le.prototype.size=function(){return this.array_.length},Le.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Te=a((function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}),"RightmostEdgeFinder");Te.prototype.getCoordinate=a((function(){return this._minCoord}),"getCoordinate"),Te.prototype.getRightmostSide=a((function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n}),"getRightmostSide"),Te.prototype.findRightmostEdgeAtVertex=a((function(){var t=this._minDe.getEdge().getCoordinates();U.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=H.computeOrientation(this._minCoord,n,e),i=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===H.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===H.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)}),"findRightmostEdgeAtVertex"),Te.prototype.getRightmostSideOfSegment=a((function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length||n[e].y===n[e+1].y)return-1;var r=Ae.LEFT;return n[e].y<n[e+1].y&&(r=Ae.RIGHT),r}),"getRightmostSideOfSegment"),Te.prototype.getEdge=a((function(){return this._orientedDe}),"getEdge"),Te.prototype.checkForRightmostCoordinate=a((function(t){for(var e=this,n=t.getEdge().getCoordinates(),r=0;r<n.length-1;r++)(null===e._minCoord||n[r].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])}),"checkForRightmostCoordinate"),Te.prototype.findRightmostEdgeAtNode=a((function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}),"findRightmostEdgeAtNode"),Te.prototype.findEdge=a((function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}U.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Ae.LEFT&&(this._orientedDe=this._minDe.getSym())}),"findEdge"),Te.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Te.prototype.getClass=a((function(){return Te}),"getClass");var Re=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new c(r):null,this.name="TopologyException"}return a(e,"TopologyException"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=a((function(){return this.pt}),"getCoordinate"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.msgWithCoord=a((function(t,e){return e?t:t+" [ "+e+" ]"}),"msgWithCoord"),e}(G),De=a((function(){this.array_=[]}),"LinkedList");De.prototype.addLast=a((function(t){this.array_.push(t)}),"addLast"),De.prototype.removeFirst=a((function(){return this.array_.shift()}),"removeFirst"),De.prototype.isEmpty=a((function(){return 0===this.array_.length}),"isEmpty");var Fe=a((function(){this._finder=null,this._dirEdgeList=new ht,this._nodes=new ht,this._rightMostCoord=null,this._env=null,this._finder=new Te}),"BufferSubgraph");Fe.prototype.clearVisitedEdges=a((function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){t.next().setVisited(!1)}}),"clearVisitedEdges"),Fe.prototype.getRightmostCoordinate=a((function(){return this._rightMostCoord}),"getRightmostCoordinate"),Fe.prototype.computeNodeDepth=a((function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Re("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}}),"computeNodeDepth"),Fe.prototype.computeDepth=a((function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ae.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)}),"computeDepth"),Fe.prototype.create=a((function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}),"create"),Fe.prototype.findResultEdges=a((function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ae.RIGHT)>=1&&e.getDepth(Ae.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}}),"findResultEdges"),Fe.prototype.computeDepths=a((function(t){var e=new Et,n=new De,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}}),"computeDepths"),Fe.prototype.compareTo=a((function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0}),"compareTo"),Fe.prototype.getEnvelope=a((function(){if(null===this._env){for(var t=new T,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env}),"getEnvelope"),Fe.prototype.addReachable=a((function(t){var e=new Le;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}}),"addReachable"),Fe.prototype.copySymDepths=a((function(t){var e=t.getSym();e.setDepth(Ae.LEFT,t.getDepth(Ae.RIGHT)),e.setDepth(Ae.RIGHT,t.getDepth(Ae.LEFT))}),"copySymDepths"),Fe.prototype.add=a((function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}}),"add"),Fe.prototype.getNodes=a((function(){return this._nodes}),"getNodes"),Fe.prototype.getDirectedEdges=a((function(){return this._dirEdgeList}),"getDirectedEdges"),Fe.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),Fe.prototype.getClass=a((function(){return Fe}),"getClass");var ke=a((function t(){var e=this;if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var n=arguments[0];this.init(n.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[Ae.ON]=r}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var o=0;o<this.location.length;o++)e.location[o]=i.location[o]}}else if(3===arguments.length){var a=arguments[0],s=arguments[1],u=arguments[2];this.init(3),this.location[Ae.ON]=a,this.location[Ae.LEFT]=s,this.location[Ae.RIGHT]=u}}),"TopologyLocation");ke.prototype.setAllLocations=a((function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t}),"setAllLocations"),ke.prototype.isNull=a((function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==d.NONE)return!1;return!0}),"isNull"),ke.prototype.setAllLocationsIfNull=a((function(t){for(var e=0;e<this.location.length;e++)this.location[e]===d.NONE&&(this.location[e]=t)}),"setAllLocationsIfNull"),ke.prototype.isLine=a((function(){return 1===this.location.length}),"isLine"),ke.prototype.merge=a((function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Ae.ON]=this.location[Ae.ON],e[Ae.LEFT]=d.NONE,e[Ae.RIGHT]=d.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===d.NONE&&n<t.location.length&&(this.location[n]=t.location[n])}),"merge"),ke.prototype.getLocations=a((function(){return this.location}),"getLocations"),ke.prototype.flip=a((function(){if(this.location.length<=1)return null;var t=this.location[Ae.LEFT];this.location[Ae.LEFT]=this.location[Ae.RIGHT],this.location[Ae.RIGHT]=t}),"flip"),ke.prototype.toString=a((function(){var t=new b;return this.location.length>1&&t.append(d.toLocationSymbol(this.location[Ae.LEFT])),t.append(d.toLocationSymbol(this.location[Ae.ON])),this.location.length>1&&t.append(d.toLocationSymbol(this.location[Ae.RIGHT])),t.toString()}),"toString"),ke.prototype.setLocations=a((function(t,e,n){this.location[Ae.ON]=t,this.location[Ae.LEFT]=e,this.location[Ae.RIGHT]=n}),"setLocations"),ke.prototype.get=a((function(t){return t<this.location.length?this.location[t]:d.NONE}),"get"),ke.prototype.isArea=a((function(){return this.location.length>1}),"isArea"),ke.prototype.isAnyNull=a((function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===d.NONE)return!0;return!1}),"isAnyNull"),ke.prototype.setLocation=a((function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Ae.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}}),"setLocation"),ke.prototype.init=a((function(t){this.location=new Array(t).fill(null),this.setAllLocations(d.NONE)}),"init"),ke.prototype.isEqualOnSide=a((function(t,e){return this.location[e]===t.location[e]}),"isEqualOnSide"),ke.prototype.allPositionsEqual=a((function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0}),"allPositionsEqual"),ke.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ke.prototype.getClass=a((function(){return ke}),"getClass");var Be=a((function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new ke(e),this.elt[1]=new ke(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new ke(n.elt[0]),this.elt[1]=new ke(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new ke(d.NONE),this.elt[1]=new ke(d.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new ke(o,a,s),this.elt[1]=new ke(o,a,s)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],p=arguments[3];this.elt[0]=new ke(d.NONE,d.NONE,d.NONE),this.elt[1]=new ke(d.NONE,d.NONE,d.NONE),this.elt[u].setLocations(l,c,p)}}),"Label");Be.prototype.getGeometryCount=a((function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t}),"getGeometryCount"),Be.prototype.setAllLocations=a((function(t,e){this.elt[t].setAllLocations(e)}),"setAllLocations"),Be.prototype.isNull=a((function(t){return this.elt[t].isNull()}),"isNull"),Be.prototype.setAllLocationsIfNull=a((function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}}),"setAllLocationsIfNull"),Be.prototype.isLine=a((function(t){return this.elt[t].isLine()}),"isLine"),Be.prototype.merge=a((function(t){for(var e=this,n=0;n<2;n++)null===e.elt[n]&&null!==t.elt[n]?e.elt[n]=new ke(t.elt[n]):e.elt[n].merge(t.elt[n])}),"merge"),Be.prototype.flip=a((function(){this.elt[0].flip(),this.elt[1].flip()}),"flip"),Be.prototype.getLocation=a((function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Ae.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}}),"getLocation"),Be.prototype.toString=a((function(){var t=new b;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()}),"toString"),Be.prototype.isArea=a((function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}}),"isArea"),Be.prototype.isAnyNull=a((function(t){return this.elt[t].isAnyNull()}),"isAnyNull"),Be.prototype.setLocation=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Ae.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}}),"setLocation"),Be.prototype.isEqualOnSide=a((function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)}),"isEqualOnSide"),Be.prototype.allPositionsEqual=a((function(t,e){return this.elt[t].allPositionsEqual(e)}),"allPositionsEqual"),Be.prototype.toLine=a((function(t){this.elt[t].isArea()&&(this.elt[t]=new ke(this.elt[t].location[0]))}),"toLine"),Be.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Be.prototype.getClass=a((function(){return Be}),"getClass"),Be.toLineLabel=a((function(t){for(var e=new Be(d.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e}),"toLineLabel");var je=a((function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new ht,this._pts=new ht,this._label=new Be(d.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new ht,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()}),"EdgeRing");je.prototype.computeRing=a((function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=H.isCCW(this._ring.getCoordinates())}),"computeRing"),je.prototype.isIsolated=a((function(){return 1===this._label.getGeometryCount()}),"isIsolated"),je.prototype.computePoints=a((function(t){var e=this;this._startDe=t;var n=t,r=!0;do{if(null===n)throw new Re("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new Re("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var i=n.getLabel();U.isTrue(i.isArea()),e.mergeLabel(i),e.addPoints(n.getEdge(),n.isForward(),r),r=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)}),"computePoints"),je.prototype.getLinearRing=a((function(){return this._ring}),"getLinearRing"),je.prototype.getCoordinate=a((function(t){return this._pts.get(t)}),"getCoordinate"),je.prototype.computeMaxNodeDegree=a((function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode().getEdges().getOutgoingDegree(t);n>t._maxNodeDegree&&(t._maxNodeDegree=n),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2}),"computeMaxNodeDegree"),je.prototype.addPoints=a((function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var a=r.length-2;n&&(a=r.length-1);for(var s=a;s>=0;s--)this._pts.add(r[s])}}),"addPoints"),je.prototype.isHole=a((function(){return this._isHole}),"isHole"),je.prototype.setInResult=a((function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)}),"setInResult"),je.prototype.containsPoint=a((function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t)||!H.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();){if(n.next().containsPoint(t))return!1}return!0}),"containsPoint"),je.prototype.addHole=a((function(t){this._holes.add(t)}),"addHole"),je.prototype.isShell=a((function(){return null===this._shell}),"isShell"),je.prototype.getLabel=a((function(){return this._label}),"getLabel"),je.prototype.getEdges=a((function(){return this._edges}),"getEdges"),je.prototype.getMaxNodeDegree=a((function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}),"getMaxNodeDegree"),je.prototype.getShell=a((function(){return this._shell}),"getShell"),je.prototype.mergeLabel=a((function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=e.getLocation(n,Ae.RIGHT);if(r===d.NONE)return null;if(this._label.getLocation(n)===d.NONE)return this._label.setLocation(n,r),null}}),"mergeLabel"),je.prototype.setShell=a((function(t){this._shell=t,null!==t&&t.addHole(this)}),"setShell"),je.prototype.toPolygon=a((function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)}),"toPolygon"),je.prototype.interfaces_=a((function(){return[]}),"interfaces_"),je.prototype.getClass=a((function(){return je}),"getClass");var Ge=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return a(e,"MinimalEdgeRing"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=a((function(t,e){t.setMinEdgeRing(e)}),"setEdgeRing"),e.prototype.getNext=a((function(t){return t.getNextMin()}),"getNext"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(je),qe=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return a(e,"MaximalEdgeRing"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=a((function(){var t=new ht,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Ge(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t}),"buildMinimalRings"),e.prototype.setEdgeRing=a((function(t,e){t.setEdgeRing(e)}),"setEdgeRing"),e.prototype.linkDirectedEdgesForMinimalEdgeRings=a((function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)}),"linkDirectedEdgesForMinimalEdgeRings"),e.prototype.getNext=a((function(t){return t.getNext()}),"getNext"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(je),Ue=a((function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0!==arguments.length&&1===arguments.length){var t=arguments[0];this._label=t}}),"GraphComponent");Ue.prototype.setVisited=a((function(t){this._isVisited=t}),"setVisited"),Ue.prototype.setInResult=a((function(t){this._isInResult=t}),"setInResult"),Ue.prototype.isCovered=a((function(){return this._isCovered}),"isCovered"),Ue.prototype.isCoveredSet=a((function(){return this._isCoveredSet}),"isCoveredSet"),Ue.prototype.setLabel=a((function(t){this._label=t}),"setLabel"),Ue.prototype.getLabel=a((function(){return this._label}),"getLabel"),Ue.prototype.setCovered=a((function(t){this._isCovered=t,this._isCoveredSet=!0}),"setCovered"),Ue.prototype.updateIM=a((function(t){U.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)}),"updateIM"),Ue.prototype.isInResult=a((function(){return this._isInResult}),"isInResult"),Ue.prototype.isVisited=a((function(){return this._isVisited}),"isVisited"),Ue.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ue.prototype.getClass=a((function(){return Ue}),"getClass");var Ve=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Be(0,d.NONE)}return a(e,"Node"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=a((function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){if(t.next().getEdge().isInResult())return!0}return!1}),"isIncidentEdgeInResult"),e.prototype.isIsolated=a((function(){return 1===this._label.getGeometryCount()}),"isIsolated"),e.prototype.getCoordinate=a((function(){return this._coord}),"getCoordinate"),e.prototype.print=a((function(t){t.println("node "+this._coord+" lbl: "+this._label)}),"print"),e.prototype.computeIM=a((function(t){}),"computeIM"),e.prototype.computeMergedLocation=a((function(t,e){var n=d.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==d.BOUNDARY&&(n=r)}return n}),"computeMergedLocation"),e.prototype.setLabel=a((function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Be(e,n):this._label.setLocation(e,n)}),"setLabel"),e.prototype.getEdges=a((function(){return this._edges}),"getEdges"),e.prototype.mergeLabel=a((function(){var t=this;if(arguments[0]instanceof e){var n=arguments[0];this.mergeLabel(n._label)}else if(arguments[0]instanceof Be)for(var r=arguments[0],i=0;i<2;i++){var o=t.computeMergedLocation(r,i),a=t._label.getLocation(i);a===d.NONE&&t._label.setLocation(i,o)}}),"mergeLabel"),e.prototype.add=a((function(t){this._edges.insert(t),t.setNode(this)}),"add"),e.prototype.setLabelBoundary=a((function(t){if(null===this._label)return null;var e=d.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case d.BOUNDARY:n=d.INTERIOR;break;case d.INTERIOR:default:n=d.BOUNDARY}this._label.setLocation(t,n)}),"setLabelBoundary"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(Ue),ze=a((function(){this.nodeMap=new Ot,this.nodeFact=null;var t=arguments[0];this.nodeFact=t}),"NodeMap");ze.prototype.find=a((function(t){return this.nodeMap.get(t)}),"find"),ze.prototype.addNode=a((function(){if(arguments[0]instanceof c){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ve){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}}),"addNode"),ze.prototype.print=a((function(t){for(var e=this.iterator();e.hasNext();){e.next().print(t)}}),"print"),ze.prototype.iterator=a((function(){return this.nodeMap.values().iterator()}),"iterator"),ze.prototype.values=a((function(){return this.nodeMap.values()}),"values"),ze.prototype.getBoundaryNodes=a((function(t){for(var e=new ht,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===d.BOUNDARY&&e.add(r)}return e}),"getBoundaryNodes"),ze.prototype.add=a((function(t){var e=t.getCoordinate();this.addNode(e).add(t)}),"add"),ze.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ze.prototype.getClass=a((function(){return ze}),"getClass");var Xe=a((function(){}),"Quadrant"),Ye={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Xe.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Xe.prototype.getClass=a((function(){return Xe}),"getClass"),Xe.isNorthern=a((function(t){return t===Xe.NE||t===Xe.NW}),"isNorthern"),Xe.isOpposite=a((function(t,e){return t!==e&&2===(t-e+4)%4}),"isOpposite"),Xe.commonHalfPlane=a((function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n}),"commonHalfPlane"),Xe.isInHalfPlane=a((function(t,e){return e===Xe.SE?t===Xe.SE||t===Xe.SW:t===e||t===e+1}),"isInHalfPlane"),Xe.quadrant=a((function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new n("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Xe.NE:Xe.SE:e>=0?Xe.NW:Xe.SW}if(arguments[0]instanceof c&&arguments[1]instanceof c){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new n("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?Xe.NE:Xe.SE:i.y>=r.y?Xe.NW:Xe.SW}}),"quadrant"),Ye.NE.get=function(){return 0},Ye.NW.get=function(){return 1},Ye.SW.get=function(){return 2},Ye.SE.get=function(){return 3},Object.defineProperties(Xe,Ye);var We=a((function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this._edge=o,this.init(a,s),this._label=u}}),"EdgeEnd");We.prototype.compareDirection=a((function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:H.computeOrientation(t._p0,t._p1,this._p1)}),"compareDirection"),We.prototype.getDy=a((function(){return this._dy}),"getDy"),We.prototype.getCoordinate=a((function(){return this._p0}),"getCoordinate"),We.prototype.setNode=a((function(t){this._node=t}),"setNode"),We.prototype.print=a((function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print(" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)}),"print"),We.prototype.compareTo=a((function(t){var e=t;return this.compareDirection(e)}),"compareTo"),We.prototype.getDirectedCoordinate=a((function(){return this._p1}),"getDirectedCoordinate"),We.prototype.getDx=a((function(){return this._dx}),"getDx"),We.prototype.getLabel=a((function(){return this._label}),"getLabel"),We.prototype.getEdge=a((function(){return this._edge}),"getEdge"),We.prototype.getQuadrant=a((function(){return this._quadrant}),"getQuadrant"),We.prototype.getNode=a((function(){return this._node}),"getNode"),We.prototype.toString=a((function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return" "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label}),"toString"),We.prototype.computeLabel=a((function(t){}),"computeLabel"),We.prototype.init=a((function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Xe.quadrant(this._dx,this._dy),U.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")}),"init"),We.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),We.prototype.getClass=a((function(){return We}),"getClass");var He=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return a(e,"DirectedEdge"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=a((function(){return this._nextMin}),"getNextMin"),e.prototype.getDepth=a((function(t){return this._depth[t]}),"getDepth"),e.prototype.setVisited=a((function(t){this._isVisited=t}),"setVisited"),e.prototype.computeDirectedLabel=a((function(){this._label=new Be(this._edge.getLabel()),this._isForward||this._label.flip()}),"computeDirectedLabel"),e.prototype.getNext=a((function(){return this._next}),"getNext"),e.prototype.setDepth=a((function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Re("assigned depths do not match",this.getCoordinate());this._depth[t]=e}),"setDepth"),e.prototype.isInteriorAreaEdge=a((function(){for(var t=this,e=!0,n=0;n<2;n++)t._label.isArea(n)&&t._label.getLocation(n,Ae.LEFT)===d.INTERIOR&&t._label.getLocation(n,Ae.RIGHT)===d.INTERIOR||(e=!1);return e}),"isInteriorAreaEdge"),e.prototype.setNextMin=a((function(t){this._nextMin=t}),"setNextMin"),e.prototype.print=a((function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Ae.LEFT]+"/"+this._depth[Ae.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")}),"print"),e.prototype.setMinEdgeRing=a((function(t){this._minEdgeRing=t}),"setMinEdgeRing"),e.prototype.isLineEdge=a((function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,d.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,d.EXTERIOR);return t&&e&&n}),"isLineEdge"),e.prototype.setEdgeRing=a((function(t){this._edgeRing=t}),"setEdgeRing"),e.prototype.getMinEdgeRing=a((function(){return this._minEdgeRing}),"getMinEdgeRing"),e.prototype.getDepthDelta=a((function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t}),"getDepthDelta"),e.prototype.setInResult=a((function(t){this._isInResult=t}),"setInResult"),e.prototype.getSym=a((function(){return this._sym}),"getSym"),e.prototype.isForward=a((function(){return this._isForward}),"isForward"),e.prototype.getEdge=a((function(){return this._edge}),"getEdge"),e.prototype.printEdge=a((function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)}),"printEdge"),e.prototype.setSym=a((function(t){this._sym=t}),"setSym"),e.prototype.setVisitedEdge=a((function(t){this.setVisited(t),this._sym.setVisited(t)}),"setVisitedEdge"),e.prototype.setEdgeDepths=a((function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===Ae.LEFT&&(r=-1);var i=Ae.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)}),"setEdgeDepths"),e.prototype.getEdgeRing=a((function(){return this._edgeRing}),"getEdgeRing"),e.prototype.isInResult=a((function(){return this._isInResult}),"isInResult"),e.prototype.setNext=a((function(t){this._next=t}),"setNext"),e.prototype.isVisited=a((function(){return this._isVisited}),"isVisited"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.depthFactor=a((function(t,e){return t===d.EXTERIOR&&e===d.INTERIOR?1:t===d.INTERIOR&&e===d.EXTERIOR?-1:0}),"depthFactor"),e}(We),Je=a((function(){}),"NodeFactory");Je.prototype.createNode=a((function(t){return new Ve(t,null)}),"createNode"),Je.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Je.prototype.getClass=a((function(){return Je}),"getClass");var Ke=a((function(){if(this._edges=new ht,this._nodes=null,this._edgeEndList=new ht,0===arguments.length)this._nodes=new ze(new Je);else if(1===arguments.length){var t=arguments[0];this._nodes=new ze(t)}}),"PlanarGraph");Ke.prototype.printEdges=a((function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}}),"printEdges"),Ke.prototype.find=a((function(t){return this._nodes.find(t)}),"find"),Ke.prototype.addNode=a((function(){if(arguments[0]instanceof Ve){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof c){var e=arguments[0];return this._nodes.addNode(e)}}),"addNode"),Ke.prototype.getNodeIterator=a((function(){return this._nodes.iterator()}),"getNodeIterator"),Ke.prototype.linkResultDirectedEdges=a((function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkResultDirectedEdges()}}),"linkResultDirectedEdges"),Ke.prototype.debugPrintln=a((function(t){P.out.println(t)}),"debugPrintln"),Ke.prototype.isBoundaryNode=a((function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===d.BOUNDARY}),"isBoundaryNode"),Ke.prototype.linkAllDirectedEdges=a((function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkAllDirectedEdges()}}),"linkAllDirectedEdges"),Ke.prototype.matchInSameDirection=a((function(t,e,n,r){return!!t.equals(n)&&(H.computeOrientation(t,e,r)===H.COLLINEAR&&Xe.quadrant(t,e)===Xe.quadrant(n,r))}),"matchInSameDirection"),Ke.prototype.getEdgeEnds=a((function(){return this._edgeEndList}),"getEdgeEnds"),Ke.prototype.debugPrint=a((function(t){P.out.print(t)}),"debugPrint"),Ke.prototype.getEdgeIterator=a((function(){return this._edges.iterator()}),"getEdgeIterator"),Ke.prototype.findEdgeInSameDirection=a((function(t,e){for(var n=this,r=0;r<this._edges.size();r++){var i=n._edges.get(r),o=i.getCoordinates();if(n.matchInSameDirection(t,e,o[0],o[1])||n.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return i}return null}),"findEdgeInSameDirection"),Ke.prototype.insertEdge=a((function(t){this._edges.add(t)}),"insertEdge"),Ke.prototype.findEdgeEnd=a((function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null}),"findEdgeEnd"),Ke.prototype.addEdges=a((function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();e._edges.add(r);var i=new He(r,!0),o=new He(r,!1);i.setSym(o),o.setSym(i),e.add(i),e.add(o)}}),"addEdges"),Ke.prototype.add=a((function(t){this._nodes.add(t),this._edgeEndList.add(t)}),"add"),Ke.prototype.getNodes=a((function(){return this._nodes.values()}),"getNodes"),Ke.prototype.findEdge=a((function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null}),"findEdge"),Ke.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ke.prototype.getClass=a((function(){return Ke}),"getClass"),Ke.linkResultDirectedEdges=a((function(t){for(var e=t.iterator();e.hasNext();){e.next().getEdges().linkResultDirectedEdges()}}),"linkResultDirectedEdges");var Ze=a((function(){this._geometryFactory=null,this._shellList=new ht;var t=arguments[0];this._geometryFactory=t}),"PolygonBuilder");Ze.prototype.sortShellsAndHoles=a((function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}}),"sortShellsAndHoles"),Ze.prototype.computePolygons=a((function(t){for(var e=new ht,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e}),"computePolygons"),Ze.prototype.placeFreeHoles=a((function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,t);if(null===i)throw new Re("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}}),"placeFreeHoles"),Ze.prototype.buildMinimalEdgeRings=a((function(t,e,n){for(var r=new ht,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):n.addAll(a)}else r.add(o)}return r}),"buildMinimalEdgeRings"),Ze.prototype.containsPoint=a((function(t){for(var e=this._shellList.iterator();e.hasNext();){if(e.next().containsPoint(t))return!0}return!1}),"containsPoint"),Ze.prototype.buildMaximalEdgeRings=a((function(t){for(var e=new ht,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new qe(r,this._geometryFactory);e.add(i),i.setInResult()}}return e}),"buildMaximalEdgeRings"),Ze.prototype.placePolygonHoles=a((function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}}),"placePolygonHoles"),Ze.prototype.getPolygons=a((function(){return this.computePolygons(this._shellList)}),"getPolygons"),Ze.prototype.findEdgeRingContaining=a((function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var u=s.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(r)&&H.isPointInRing(i,l.getCoordinates())&&(p=!0),p&&(null===o||a.contains(c))&&(o=u)}return o}),"findEdgeRingContaining"),Ze.prototype.findShell=a((function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return U.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n}),"findShell"),Ze.prototype.add=a((function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ke.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new ht,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}}),"add"),Ze.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ze.prototype.getClass=a((function(){return Ze}),"getClass");var $e=a((function(){}),"Boundable");$e.prototype.getBounds=a((function(){}),"getBounds"),$e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),$e.prototype.getClass=a((function(){return $e}),"getClass");var Qe=a((function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e}),"ItemBoundable");Qe.prototype.getItem=a((function(){return this._item}),"getItem"),Qe.prototype.getBounds=a((function(){return this._bounds}),"getBounds"),Qe.prototype.interfaces_=a((function(){return[$e,l]}),"interfaces_"),Qe.prototype.getClass=a((function(){return Qe}),"getClass");var tn=a((function(){this._size=null,this._items=null,this._size=0,this._items=new ht,this._items.add(null)}),"PriorityQueue");tn.prototype.poll=a((function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t}),"poll"),tn.prototype.size=a((function(){return this._size}),"size"),tn.prototype.reorder=a((function(t){for(var e=this,n=null,r=this._items.get(t);2*t<=this._size&&((n=2*t)!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)}),"reorder"),tn.prototype.clear=a((function(){this._size=0,this._items.clear()}),"clear"),tn.prototype.isEmpty=a((function(){return 0===this._size}),"isEmpty"),tn.prototype.add=a((function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)}),"add"),tn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),tn.prototype.getClass=a((function(){return tn}),"getClass");var en=a((function(){}),"ItemVisitor");en.prototype.visitItem=a((function(t){}),"visitItem"),en.prototype.interfaces_=a((function(){return[]}),"interfaces_"),en.prototype.getClass=a((function(){return en}),"getClass");var nn=a((function(){}),"SpatialIndex");nn.prototype.insert=a((function(t,e){}),"insert"),nn.prototype.remove=a((function(t,e){}),"remove"),nn.prototype.query=a((function(){}),"query"),nn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),nn.prototype.getClass=a((function(){return nn}),"getClass");var rn=a((function(){if(this._childBoundables=new ht,this._bounds=null,this._level=null,0!==arguments.length&&1===arguments.length){var t=arguments[0];this._level=t}}),"AbstractNode"),on={serialVersionUID:{configurable:!0}};rn.prototype.getLevel=a((function(){return this._level}),"getLevel"),rn.prototype.size=a((function(){return this._childBoundables.size()}),"size"),rn.prototype.getChildBoundables=a((function(){return this._childBoundables}),"getChildBoundables"),rn.prototype.addChildBoundable=a((function(t){U.isTrue(null===this._bounds),this._childBoundables.add(t)}),"addChildBoundable"),rn.prototype.isEmpty=a((function(){return this._childBoundables.isEmpty()}),"isEmpty"),rn.prototype.getBounds=a((function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds}),"getBounds"),rn.prototype.interfaces_=a((function(){return[$e,l]}),"interfaces_"),rn.prototype.getClass=a((function(){return rn}),"getClass"),on.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(rn,on);var an=a((function(){}),"Collections");an.reverseOrder=a((function(){return{compare:a((function(t,e){return e.compareTo(t)}),"compare")}}),"reverseOrder"),an.min=a((function(t){return an.sort(t),t.get(0)}),"min"),an.sort=a((function(t,e){var n=t.toArray();e?Dt.sort(n,e):Dt.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])}),"sort"),an.singletonList=a((function(t){var e=new ht;return e.add(t),e}),"singletonList");var sn=a((function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()}),"BoundablePair");sn.prototype.expandToQueue=a((function(t,e){var r=sn.isComposite(this._boundable1),i=sn.isComposite(this._boundable2);if(r&&i)return sn.area(this._boundable1)>sn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new n("neither boundable is composite")}),"expandToQueue"),sn.prototype.isLeaves=a((function(){return!(sn.isComposite(this._boundable1)||sn.isComposite(this._boundable2))}),"isLeaves"),sn.prototype.compareTo=a((function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0}),"compareTo"),sn.prototype.expand=a((function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new sn(o,e,this._itemDistance);a.getDistance()<r&&n.add(a)}}),"expand"),sn.prototype.getBoundable=a((function(t){return 0===t?this._boundable1:this._boundable2}),"getBoundable"),sn.prototype.getDistance=a((function(){return this._distance}),"getDistance"),sn.prototype.distance=a((function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())}),"distance"),sn.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),sn.prototype.getClass=a((function(){return sn}),"getClass"),sn.area=a((function(t){return t.getBounds().getArea()}),"area"),sn.isComposite=a((function(t){return t instanceof rn}),"isComposite");var un=a((function t(){if(this._root=null,this._built=!1,this._itemBoundables=new ht,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];U.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}}),"AbstractSTRtree"),ln={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};un.prototype.getNodeCapacity=a((function(){return this._nodeCapacity}),"getNodeCapacity"),un.prototype.lastNode=a((function(t){return t.get(t.size()-1)}),"lastNode"),un.prototype.size=a((function(){var t=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof rn?n+=t.size(i):i instanceof Qe&&(n+=1)}return n}}),"size"),un.prototype.removeItem=a((function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Qe&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)}),"removeItem"),un.prototype.itemsTree=a((function(){var t=this;if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new ht:e}if(1===arguments.length){for(var n=arguments[0],r=new ht,i=n.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof rn){var a=t.itemsTree(o);null!==a&&r.add(a)}else o instanceof Qe?r.add(o.getItem()):U.shouldNeverReachHere()}return r.size()<=0?null:r}}),"itemsTree"),un.prototype.insert=a((function(t,e){U.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Qe(t,e))}),"insert"),un.prototype.boundablesAtLevel=a((function(){var t=this;if(1===arguments.length){var e=arguments[0],n=new ht;return this.boundablesAtLevel(e,this._root,n),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(U.isTrue(r>-2),i.getLevel()===r)return o.add(i),null;for(var a=i.getChildBoundables().iterator();a.hasNext();){var s=a.next();s instanceof rn?t.boundablesAtLevel(r,s,o):(U.isTrue(s instanceof Qe),-1===r&&o.add(s))}return null}}),"boundablesAtLevel"),un.prototype.query=a((function(){var t=this;if(1===arguments.length){var e=arguments[0];this.build();var n=new ht;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}if(2===arguments.length){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(3===arguments.length)if(y(arguments[2],en)&&arguments[0]instanceof Object&&arguments[1]instanceof rn)for(var o=arguments[0],a=arguments[1],s=arguments[2],u=a.getChildBoundables(),l=0;l<u.size();l++){var c=u.get(l);t.getIntersectsOp().intersects(c.getBounds(),o)&&(c instanceof rn?t.query(o,c,s):c instanceof Qe?s.visitItem(c.getItem()):U.shouldNeverReachHere())}else if(y(arguments[2],ct)&&arguments[0]instanceof Object&&arguments[1]instanceof rn)for(var p=arguments[0],h=arguments[1],f=arguments[2],d=h.getChildBoundables(),g=0;g<d.size();g++){var v=d.get(g);t.getIntersectsOp().intersects(v.getBounds(),p)&&(v instanceof rn?t.query(p,v,f):v instanceof Qe?f.add(v.getItem()):U.shouldNeverReachHere())}}),"query"),un.prototype.build=a((function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}),"build"),un.prototype.getRoot=a((function(){return this.build(),this._root}),"getRoot"),un.prototype.remove=a((function(){var t=this;if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,n)}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=this.removeItem(i,o);if(a)return!0;for(var s=null,u=i.getChildBoundables().iterator();u.hasNext();){var l=u.next();if(t.getIntersectsOp().intersects(l.getBounds(),r)&&l instanceof rn&&(a=t.remove(r,l,o))){s=l;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),a}}),"remove"),un.prototype.createHigherLevels=a((function(t,e){U.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)}),"createHigherLevels"),un.prototype.depth=a((function(){var t=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof rn){var o=t.depth(i);o>n&&(n=o)}}return n+1}}),"depth"),un.prototype.createParentBoundables=a((function(t,e){var n=this;U.isTrue(!t.isEmpty());var r=new ht;r.add(this.createNode(e));var i=new ht(t);an.sort(i,this.getComparator());for(var o=i.iterator();o.hasNext();){var a=o.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(a)}return r}),"createParentBoundables"),un.prototype.isEmpty=a((function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}),"isEmpty"),un.prototype.interfaces_=a((function(){return[l]}),"interfaces_"),un.prototype.getClass=a((function(){return un}),"getClass"),un.compareDoubles=a((function(t,e){return t>e?1:t<e?-1:0}),"compareDoubles"),ln.IntersectsOp.get=function(){return cn},ln.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},ln.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(un,ln);var cn=a((function(){}),"IntersectsOp"),pn=a((function(){}),"ItemDistance");pn.prototype.distance=a((function(t,e){}),"distance"),pn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),pn.prototype.getClass=a((function(){return pn}),"getClass");var hn=function(t){function e(n){n=n||e.DEFAULT_NODE_CAPACITY,t.call(this,n)}a(e,"STRtree"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return e.prototype.createParentBoundablesFromVerticalSlices=a((function(t,e){U.isTrue(t.length>0);for(var n=new ht,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n}),"createParentBoundablesFromVerticalSlices"),e.prototype.createNode=a((function(t){return new fn(t)}),"createNode"),e.prototype.size=a((function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)}),"size"),e.prototype.insert=a((function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)}),"insert"),e.prototype.getIntersectsOp=a((function(){return e.intersectsOp}),"getIntersectsOp"),e.prototype.verticalSlices=a((function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new ht;for(var a=0;i.hasNext()&&a<n;){var s=i.next();r[o].add(s),a++}}return r}),"verticalSlices"),e.prototype.query=a((function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];t.prototype.query.call(this,n,r)}else if(3===arguments.length)if(y(arguments[2],en)&&arguments[0]instanceof Object&&arguments[1]instanceof rn){var i=arguments[0],o=arguments[1],a=arguments[2];t.prototype.query.call(this,i,o,a)}else if(y(arguments[2],ct)&&arguments[0]instanceof Object&&arguments[1]instanceof rn){var s=arguments[0],u=arguments[1],l=arguments[2];t.prototype.query.call(this,s,u,l)}}),"query"),e.prototype.getComparator=a((function(){return e.yComparator}),"getComparator"),e.prototype.createParentBoundablesFromVerticalSlice=a((function(e,n){return t.prototype.createParentBoundables.call(this,e,n)}),"createParentBoundablesFromVerticalSlice"),e.prototype.remove=a((function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)}),"remove"),e.prototype.depth=a((function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)}),"depth"),e.prototype.createParentBoundables=a((function(t,n){U.isTrue(!t.isEmpty());var r=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new ht(t);an.sort(i,e.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(o,n)}),"createParentBoundables"),e.prototype.nearestNeighbour=a((function(){if(1===arguments.length){if(y(arguments[0],pn)){var t=arguments[0],n=new sn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(n)}if(arguments[0]instanceof sn){var i=arguments[0];return this.nearestNeighbour(i,r.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof e&&y(arguments[1],pn)){var o=arguments[0],a=arguments[1],s=new sn(this.getRoot(),o.getRoot(),a);return this.nearestNeighbour(s)}if(arguments[0]instanceof sn&&"number"==typeof arguments[1]){var u=arguments[0],l=arguments[1],c=l,p=null,h=new tn;for(h.add(u);!h.isEmpty()&&c>0;){var f=h.poll(),d=f.getDistance();if(d>=c)break;f.isLeaves()?(c=d,p=f):f.expandToQueue(h,c)}return[p.getBoundable(0).getItem(),p.getBoundable(1).getItem()]}}else if(3===arguments.length){var g=arguments[0],v=arguments[1],m=arguments[2],_=new Qe(g,v),b=new sn(this.getRoot(),_,m);return this.nearestNeighbour(b)[0]}}),"nearestNeighbour"),e.prototype.interfaces_=a((function(){return[nn,l]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.centreX=a((function(t){return e.avg(t.getMinX(),t.getMaxX())}),"centreX"),e.avg=a((function(t,e){return(t+e)/2}),"avg"),e.centreY=a((function(t){return e.avg(t.getMinY(),t.getMaxY())}),"centreY"),n.STRtreeNode.get=function(){return fn},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[u]},compare:function(n,r){return t.compareDoubles(e.centreX(n.getBounds()),e.centreX(r.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[u]},compare:function(n,r){return t.compareDoubles(e.centreY(n.getBounds()),e.centreY(r.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(un),fn=function(t){function e(){var e=arguments[0];t.call(this,e)}return a(e,"STRtreeNode"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=a((function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new T(n.getBounds()):t.expandToInclude(n.getBounds())}return t}),"computeBounds"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(rn),dn=a((function(){}),"SegmentPointComparator");dn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),dn.prototype.getClass=a((function(){return dn}),"getClass"),dn.relativeSign=a((function(t,e){return t<e?-1:t>e?1:0}),"relativeSign"),dn.compare=a((function(t,e,n){if(e.equals2D(n))return 0;var r=dn.relativeSign(e.x,n.x),i=dn.relativeSign(e.y,n.y);switch(t){case 0:return dn.compareValue(r,i);case 1:return dn.compareValue(i,r);case 2:return dn.compareValue(i,-r);case 3:return dn.compareValue(-r,i);case 4:return dn.compareValue(-r,-i);case 5:return dn.compareValue(-i,-r);case 6:return dn.compareValue(-i,r);case 7:return dn.compareValue(r,-i)}return U.shouldNeverReachHere("invalid octant value"),0}),"compare"),dn.compareValue=a((function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0}),"compareValue");var gn=a((function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new c(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))}),"SegmentNode");gn.prototype.getCoordinate=a((function(){return this.coord}),"getCoordinate"),gn.prototype.print=a((function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)}),"print"),gn.prototype.compareTo=a((function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:dn.compare(this._segmentOctant,this.coord,e.coord)}),"compareTo"),gn.prototype.isEndPoint=a((function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t}),"isEndPoint"),gn.prototype.isInterior=a((function(){return this._isInterior}),"isInterior"),gn.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),gn.prototype.getClass=a((function(){return gn}),"getClass");var yn=a((function(){this._nodeMap=new Ot,this._edge=null;var t=arguments[0];this._edge=t}),"SegmentNodeList");yn.prototype.getSplitCoordinates=a((function(){var t=new dt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()}),"getSplitCoordinates"),yn.prototype.addCollapsedNodes=a((function(){var t=new ht;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}}),"addCollapsedNodes"),yn.prototype.print=a((function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){e.next().print(t)}}),"print"),yn.prototype.findCollapsesFromExistingVertices=a((function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(new w(e+1))}}),"findCollapsesFromExistingVertices"),yn.prototype.addEdgeCoordinates=a((function(t,e,n){var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);n.add(new c(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));i&&n.add(new c(e.coord))}),"addEdgeCoordinates"),yn.prototype.iterator=a((function(){return this._nodeMap.values().iterator()}),"iterator"),yn.prototype.addSplitEdges=a((function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}}),"addSplitEdges"),yn.prototype.findCollapseIndex=a((function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)}),"findCollapseIndex"),yn.prototype.findCollapsesFromInsertedNodes=a((function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(new w(e[0])),r=i}}),"findCollapsesFromInsertedNodes"),yn.prototype.getEdge=a((function(){return this._edge}),"getEdge"),yn.prototype.addEndpoints=a((function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)}),"addEndpoints"),yn.prototype.createSplitEdge=a((function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new c(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this._edge.getCoordinate(s);return i&&(o[a]=new c(e.coord)),new bn(o,this._edge.getData())}),"createSplitEdge"),yn.prototype.add=a((function(t,e){var n=new gn(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(U.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)}),"add"),yn.prototype.checkSplitEdgesCorrectness=a((function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new G("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new G("bad split edge end point at "+i)}),"checkSplitEdgesCorrectness"),yn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),yn.prototype.getClass=a((function(){return yn}),"getClass");var vn=a((function(){}),"Octant");vn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),vn.prototype.getClass=a((function(){return vn}),"getClass"),vn.octant=a((function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new n("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}if(arguments[0]instanceof c&&arguments[1]instanceof c){var o=arguments[0],a=arguments[1],s=a.x-o.x,u=a.y-o.y;if(0===s&&0===u)throw new n("Cannot compute the octant for two identical points "+o);return vn.octant(s,u)}}),"octant");var mn=a((function(){}),"SegmentString");mn.prototype.getCoordinates=a((function(){}),"getCoordinates"),mn.prototype.size=a((function(){}),"size"),mn.prototype.getCoordinate=a((function(t){}),"getCoordinate"),mn.prototype.isClosed=a((function(){}),"isClosed"),mn.prototype.setData=a((function(t){}),"setData"),mn.prototype.getData=a((function(){}),"getData"),mn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),mn.prototype.getClass=a((function(){return mn}),"getClass");var _n=a((function(){}),"NodableSegmentString");_n.prototype.addIntersection=a((function(t,e){}),"addIntersection"),_n.prototype.interfaces_=a((function(){return[mn]}),"interfaces_"),_n.prototype.getClass=a((function(){return _n}),"getClass");var bn=a((function(){this._nodeList=new yn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e}),"NodedSegmentString");bn.prototype.getCoordinates=a((function(){return this._pts}),"getCoordinates"),bn.prototype.size=a((function(){return this._pts.length}),"size"),bn.prototype.getCoordinate=a((function(t){return this._pts[t]}),"getCoordinate"),bn.prototype.isClosed=a((function(){return this._pts[0].equals(this._pts[this._pts.length-1])}),"isClosed"),bn.prototype.getSegmentOctant=a((function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))}),"getSegmentOctant"),bn.prototype.setData=a((function(t){this._data=t}),"setData"),bn.prototype.safeOctant=a((function(t,e){return t.equals2D(e)?0:vn.octant(t,e)}),"safeOctant"),bn.prototype.getData=a((function(){return this._data}),"getData"),bn.prototype.addIntersection=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new c(n.getIntersection(i));this.addIntersection(o,r)}}),"addIntersection"),bn.prototype.toString=a((function(){return j.toLineString(new he(this._pts))}),"toString"),bn.prototype.getNodeList=a((function(){return this._nodeList}),"getNodeList"),bn.prototype.addIntersectionNode=a((function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)}),"addIntersectionNode"),bn.prototype.addIntersections=a((function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)}),"addIntersections"),bn.prototype.interfaces_=a((function(){return[_n]}),"interfaces_"),bn.prototype.getClass=a((function(){return bn}),"getClass"),bn.getNodedSubstrings=a((function(){if(1===arguments.length){var t=arguments[0],e=new ht;return bn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();){var o=i.next();o.getNodeList().addSplitEdges(r)}}),"getNodedSubstrings");var wn=a((function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new c,this.p1=new c;else if(1===arguments.length){var t=arguments[0];this.p0=new c(t.p0),this.p1=new c(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new c(e,n),this.p1=new c(r,i)}}),"LineSegment"),xn={serialVersionUID:{configurable:!0}};wn.prototype.minX=a((function(){return Math.min(this.p0.x,this.p1.x)}),"minX"),wn.prototype.orientationIndex=a((function(){if(arguments[0]instanceof wn){var t=arguments[0],e=H.orientationIndex(this.p0,this.p1,t.p0),n=H.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof c){var r=arguments[0];return H.orientationIndex(this.p0,this.p1,r)}}),"orientationIndex"),wn.prototype.toGeometry=a((function(t){return t.createLineString([this.p0,this.p1])}),"toGeometry"),wn.prototype.isVertical=a((function(){return this.p0.x===this.p1.x}),"isVertical"),wn.prototype.equals=a((function(t){if(!(t instanceof wn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)}),"equals"),wn.prototype.intersection=a((function(t){var e=new X;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null}),"intersection"),wn.prototype.project=a((function(){if(arguments[0]instanceof c){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new c(t);var e=this.projectionFactor(t),n=new c;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof wn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1||i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new wn(a,s)}}),"project"),wn.prototype.normalize=a((function(){this.p1.compareTo(this.p0)<0&&this.reverse()}),"normalize"),wn.prototype.angle=a((function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}),"angle"),wn.prototype.getCoordinate=a((function(t){return 0===t?this.p0:this.p1}),"getCoordinate"),wn.prototype.distancePerpendicular=a((function(t){return H.distancePointLinePerpendicular(t,this.p0,this.p1)}),"distancePerpendicular"),wn.prototype.minY=a((function(){return Math.min(this.p0.y,this.p1.y)}),"minY"),wn.prototype.midPoint=a((function(){return wn.midPoint(this.p0,this.p1)}),"midPoint"),wn.prototype.projectionFactor=a((function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?r.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i}),"projectionFactor"),wn.prototype.closestPoints=a((function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=r.MAX_VALUE,o=null,a=this.closestPoint(t.p0);i=a.distance(t.p0),n[0]=a,n[1]=t.p0;var s=this.closestPoint(t.p1);(o=s.distance(t.p1))<i&&(i=o,n[0]=s,n[1]=t.p1);var u=t.closestPoint(this.p0);(o=u.distance(this.p0))<i&&(i=o,n[0]=this.p0,n[1]=u);var l=t.closestPoint(this.p1);return(o=l.distance(this.p1))<i&&(i=o,n[0]=this.p1,n[1]=l),n}),"closestPoints"),wn.prototype.closestPoint=a((function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1}),"closestPoint"),wn.prototype.maxX=a((function(){return Math.max(this.p0.x,this.p1.x)}),"maxX"),wn.prototype.getLength=a((function(){return this.p0.distance(this.p1)}),"getLength"),wn.prototype.compareTo=a((function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)}),"compareTo"),wn.prototype.reverse=a((function(){var t=this.p0;this.p0=this.p1,this.p1=t}),"reverse"),wn.prototype.equalsTopo=a((function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)}),"equalsTopo"),wn.prototype.lineIntersection=a((function(t){try{return L.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof O))throw t}return null}),"lineIntersection"),wn.prototype.maxY=a((function(){return Math.max(this.p0.y,this.p1.y)}),"maxY"),wn.prototype.pointAlongOffset=a((function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(i*i+o*o),s=0,u=0;if(0!==e){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");s=e*i/a,u=e*o/a}return new c(n-u,r+s)}),"pointAlongOffset"),wn.prototype.setCoordinates=a((function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}}),"setCoordinates"),wn.prototype.segmentFraction=a((function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||r.isNaN(e))&&(e=1),e}),"segmentFraction"),wn.prototype.toString=a((function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}),"toString"),wn.prototype.isHorizontal=a((function(){return this.p0.y===this.p1.y}),"isHorizontal"),wn.prototype.distance=a((function(){if(arguments[0]instanceof wn){var t=arguments[0];return H.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof c){var e=arguments[0];return H.distancePointLine(e,this.p0,this.p1)}}),"distance"),wn.prototype.pointAlong=a((function(t){var e=new c;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e}),"pointAlong"),wn.prototype.hashCode=a((function(){var t=r.doubleToLongBits(this.p0.x);t^=31*r.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=r.doubleToLongBits(this.p1.x);return n^=31*r.doubleToLongBits(this.p1.y),e^(Math.trunc(n)^Math.trunc(n>>32))}),"hashCode"),wn.prototype.interfaces_=a((function(){return[o,l]}),"interfaces_"),wn.prototype.getClass=a((function(){return wn}),"getClass"),wn.midPoint=a((function(t,e){return new c((t.x+e.x)/2,(t.y+e.y)/2)}),"midPoint"),xn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(wn,xn);var En=a((function(){this.tempEnv1=new T,this.tempEnv2=new T,this._overlapSeg1=new wn,this._overlapSeg2=new wn}),"MonotoneChainOverlapAction");En.prototype.overlap=a((function(){if(2!==arguments.length&&4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}),"overlap"),En.prototype.interfaces_=a((function(){return[]}),"interfaces_"),En.prototype.getClass=a((function(){return En}),"getClass");var In=a((function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r}),"MonotoneChain");In.prototype.getLineSegment=a((function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]}),"getLineSegment"),In.prototype.computeSelect=a((function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,r),a<n&&this.computeSelect(t,a,n,r)}),"computeSelect"),In.prototype.getCoordinates=a((function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t}),"getCoordinates"),In.prototype.computeOverlaps=a((function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)}),"computeOverlaps"),In.prototype.setId=a((function(t){this._id=t}),"setId"),In.prototype.select=a((function(t,e){this.computeSelect(t,this._start,this._end,e)}),"select"),In.prototype.getEnvelope=a((function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new T(t,e)}return this._env}),"getEnvelope"),In.prototype.getEndIndex=a((function(){return this._end}),"getEndIndex"),In.prototype.getStartIndex=a((function(){return this._start}),"getStartIndex"),In.prototype.getContext=a((function(){return this._context}),"getContext"),In.prototype.getId=a((function(){return this._id}),"getId"),In.prototype.computeOverlapsInternal=a((function(t,e,n,r,i,o){var a=this._pts[t],s=this._pts[e],u=n._pts[r],l=n._pts[i];if(e-t==1&&i-r==1)return o.overlap(this,t,n,r),null;if(o.tempEnv1.init(a,s),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),p=Math.trunc((r+i)/2);t<c&&(r<p&&this.computeOverlapsInternal(t,c,n,r,p,o),p<i&&this.computeOverlapsInternal(t,c,n,p,i,o)),c<e&&(r<p&&this.computeOverlapsInternal(c,e,n,r,p,o),p<i&&this.computeOverlapsInternal(c,e,n,p,i,o))}),"computeOverlapsInternal"),In.prototype.interfaces_=a((function(){return[]}),"interfaces_"),In.prototype.getClass=a((function(){return In}),"getClass");var Sn=a((function(){}),"MonotoneChainBuilder");Sn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Sn.prototype.getClass=a((function(){return Sn}),"getClass"),Sn.getChainStartIndices=a((function(t){var e=0,n=new ht;n.add(new w(e));do{var r=Sn.findChainEnd(t,e);n.add(new w(r)),e=r}while(e<t.length-1);return Sn.toIntArray(n)}),"getChainStartIndices"),Sn.findChainEnd=a((function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=Xe.quadrant(t[n],t[n+1]),i=e+1;i<t.length;){if(!t[i-1].equals2D(t[i]))if(Xe.quadrant(t[i-1],t[i])!==r)break;i++}return i-1}),"findChainEnd"),Sn.getChains=a((function(){if(1===arguments.length){var t=arguments[0];return Sn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=new ht,i=Sn.getChainStartIndices(e),o=0;o<i.length-1;o++){var a=new In(e,i[o],i[o+1],n);r.add(a)}return r}}),"getChains"),Sn.toIntArray=a((function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e}),"toIntArray");var Cn=a((function(){}),"Noder");Cn.prototype.computeNodes=a((function(t){}),"computeNodes"),Cn.prototype.getNodedSubstrings=a((function(){}),"getNodedSubstrings"),Cn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Cn.prototype.getClass=a((function(){return Cn}),"getClass");var Mn=a((function(){if(this._segInt=null,0!==arguments.length&&1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}}),"SinglePassNoder");Mn.prototype.setSegmentIntersector=a((function(t){this._segInt=t}),"setSegmentIntersector"),Mn.prototype.interfaces_=a((function(){return[Cn]}),"interfaces_"),Mn.prototype.getClass=a((function(){return Mn}),"getClass");var Nn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new ht,this._index=new hn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}a(e,"MCIndexNoder"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=a((function(){return this._monoChains}),"getMonotoneChains"),e.prototype.getNodedSubstrings=a((function(){return bn.getNodedSubstrings(this._nodedSegStrings)}),"getNodedSubstrings"),e.prototype.getIndex=a((function(){return this._index}),"getIndex"),e.prototype.add=a((function(t){for(var e=this,n=Sn.getChains(t.getCoordinates(),t).iterator();n.hasNext();){var r=n.next();r.setId(e._idCounter++),e._index.insert(r.getEnvelope(),r),e._monoChains.add(r)}}),"add"),e.prototype.computeNodes=a((function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()}),"computeNodes"),e.prototype.intersectChains=a((function(){for(var t=this,e=new An(this._segInt),n=this._monoChains.iterator();n.hasNext();)for(var r=n.next(),i=t._index.query(r.getEnvelope()).iterator();i.hasNext();){var o=i.next();if(o.getId()>r.getId()&&(r.computeOverlaps(o,e),t._nOverlaps++),t._segInt.isDone())return null}}),"intersectChains"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),n.SegmentOverlapAction.get=function(){return An},Object.defineProperties(e,n),e}(Mn),An=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return a(e,"SegmentOverlapAction"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=a((function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=e.getContext(),a=r.getContext();this._si.processIntersections(o,n,a,i)}),"overlap"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(En),On=a((function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0!==arguments.length)if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}}),"BufferParameters"),Pn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};On.prototype.getEndCapStyle=a((function(){return this._endCapStyle}),"getEndCapStyle"),On.prototype.isSingleSided=a((function(){return this._isSingleSided}),"isSingleSided"),On.prototype.setQuadrantSegments=a((function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=On.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=On.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==On.JOIN_ROUND&&(this._quadrantSegments=On.DEFAULT_QUADRANT_SEGMENTS)}),"setQuadrantSegments"),On.prototype.getJoinStyle=a((function(){return this._joinStyle}),"getJoinStyle"),On.prototype.setJoinStyle=a((function(t){this._joinStyle=t}),"setJoinStyle"),On.prototype.setSimplifyFactor=a((function(t){this._simplifyFactor=t<0?0:t}),"setSimplifyFactor"),On.prototype.getSimplifyFactor=a((function(){return this._simplifyFactor}),"getSimplifyFactor"),On.prototype.getQuadrantSegments=a((function(){return this._quadrantSegments}),"getQuadrantSegments"),On.prototype.setEndCapStyle=a((function(t){this._endCapStyle=t}),"setEndCapStyle"),On.prototype.getMitreLimit=a((function(){return this._mitreLimit}),"getMitreLimit"),On.prototype.setMitreLimit=a((function(t){this._mitreLimit=t}),"setMitreLimit"),On.prototype.setSingleSided=a((function(t){this._isSingleSided=t}),"setSingleSided"),On.prototype.interfaces_=a((function(){return[]}),"interfaces_"),On.prototype.getClass=a((function(){return On}),"getClass"),On.bufferDistanceError=a((function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)}),"bufferDistanceError"),Pn.CAP_ROUND.get=function(){return 1},Pn.CAP_FLAT.get=function(){return 2},Pn.CAP_SQUARE.get=function(){return 3},Pn.JOIN_ROUND.get=function(){return 1},Pn.JOIN_MITRE.get=function(){return 2},Pn.JOIN_BEVEL.get=function(){return 3},Pn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Pn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Pn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(On,Pn);var Ln=a((function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=H.COUNTERCLOCKWISE,this._inputLine=t||null}),"BufferInputLineSimplifier"),Tn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ln.prototype.isDeletable=a((function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!(!this.isConcave(i,o,a)||!this.isShallow(i,o,a,r))&&this.isShallowSampled(i,o,t,n,r)}),"isDeletable"),Ln.prototype.deleteShallowConcavities=a((function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r<this._inputLine.length;){var o=!1;t.isDeletable(e,n,r,t._distanceTol)&&(t._isDeleted[n]=Ln.DELETE,o=!0,i=!0),e=o?r:n,n=t.findNextNonDeletedIndex(e),r=t.findNextNonDeletedIndex(n)}return i}),"deleteShallowConcavities"),Ln.prototype.isShallowConcavity=a((function(t,e,n,r){return H.computeOrientation(t,e,n)===this._angleOrientation&&H.distancePointLine(e,t,n)<r}),"isShallowConcavity"),Ln.prototype.isShallowSampled=a((function(t,e,n,r,i){var o=Math.trunc((r-n)/Ln.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var a=n;a<r;a+=o)if(!this.isShallow(t,e,this._inputLine[a],i))return!1;return!0}),"isShallowSampled"),Ln.prototype.isConcave=a((function(t,e,n){return H.computeOrientation(t,e,n)===this._angleOrientation}),"isConcave"),Ln.prototype.simplify=a((function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=H.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()}),"simplify"),Ln.prototype.findNextNonDeletedIndex=a((function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Ln.DELETE;)e++;return e}),"findNextNonDeletedIndex"),Ln.prototype.isShallow=a((function(t,e,n,r){return H.distancePointLine(e,t,n)<r}),"isShallow"),Ln.prototype.collapseLine=a((function(){for(var t=new dt,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Ln.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()}),"collapseLine"),Ln.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ln.prototype.getClass=a((function(){return Ln}),"getClass"),Ln.simplify=a((function(t,e){return new Ln(t).simplify(e)}),"simplify"),Tn.INIT.get=function(){return 0},Tn.DELETE.get=function(){return 1},Tn.KEEP.get=function(){return 1},Tn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Ln,Tn);var Rn=a((function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new ht}),"OffsetSegmentString"),Dn={COORDINATE_ARRAY_TYPE:{configurable:!0}};Rn.prototype.getCoordinates=a((function(){return this._ptList.toArray(Rn.COORDINATE_ARRAY_TYPE)}),"getCoordinates"),Rn.prototype.setPrecisionModel=a((function(t){this._precisionModel=t}),"setPrecisionModel"),Rn.prototype.addPt=a((function(t){var e=new c(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)}),"addPt"),Rn.prototype.revere=a((function(){}),"revere"),Rn.prototype.addPts=a((function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])}),"addPts"),Rn.prototype.isRedundant=a((function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance}),"isRedundant"),Rn.prototype.toString=a((function(){return(new we).createLineString(this.getCoordinates()).toString()}),"toString"),Rn.prototype.closeRing=a((function(){if(this._ptList.size()<1)return null;var t=new c(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)}),"closeRing"),Rn.prototype.setMinimumVertexDistance=a((function(t){this._minimimVertexDistance=t}),"setMinimumVertexDistance"),Rn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Rn.prototype.getClass=a((function(){return Rn}),"getClass"),Dn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Rn,Dn);var Fn=a((function(){}),"Angle"),kn={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Fn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Fn.prototype.getClass=a((function(){return Fn}),"getClass"),Fn.toDegrees=a((function(t){return 180*t/Math.PI}),"toDegrees"),Fn.normalize=a((function(t){for(;t>Math.PI;)t-=Fn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Fn.PI_TIMES_2;return t}),"normalize"),Fn.angle=a((function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}}),"angle"),Fn.isAcute=a((function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0}),"isAcute"),Fn.isObtuse=a((function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0}),"isObtuse"),Fn.interiorAngle=a((function(t,e,n){var r=Fn.angle(e,t),i=Fn.angle(e,n);return Math.abs(i-r)}),"interiorAngle"),Fn.normalizePositive=a((function(t){if(t<0){for(;t<0;)t+=Fn.PI_TIMES_2;t>=Fn.PI_TIMES_2&&(t=0)}else{for(;t>=Fn.PI_TIMES_2;)t-=Fn.PI_TIMES_2;t<0&&(t=0)}return t}),"normalizePositive"),Fn.angleBetween=a((function(t,e,n){var r=Fn.angle(e,t),i=Fn.angle(e,n);return Fn.diff(r,i)}),"angleBetween"),Fn.diff=a((function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n}),"diff"),Fn.toRadians=a((function(t){return t*Math.PI/180}),"toRadians"),Fn.getTurn=a((function(t,e){var n=Math.sin(e-t);return n>0?Fn.COUNTERCLOCKWISE:n<0?Fn.CLOCKWISE:Fn.NONE}),"getTurn"),Fn.angleBetweenOriented=a((function(t,e,n){var r=Fn.angle(e,t),i=Fn.angle(e,n)-r;return i<=-Math.PI?i+Fn.PI_TIMES_2:i>Math.PI?i-Fn.PI_TIMES_2:i}),"angleBetweenOriented"),kn.PI_TIMES_2.get=function(){return 2*Math.PI},kn.PI_OVER_2.get=function(){return Math.PI/2},kn.PI_OVER_4.get=function(){return Math.PI/4},kn.COUNTERCLOCKWISE.get=function(){return H.COUNTERCLOCKWISE},kn.CLOCKWISE.get=function(){return H.CLOCKWISE},kn.NONE.get=function(){return H.COLLINEAR},Object.defineProperties(Fn,kn);var Bn=a((function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new wn,this._seg1=new wn,this._offset0=new wn,this._offset1=new wn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new X,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===On.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)}),"OffsetSegmentGenerator"),jn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Bn.prototype.addNextSegment=a((function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=H.computeOrientation(this._s0,this._s1,this._s2),r=n===H.CLOCKWISE&&this._side===Ae.LEFT||n===H.COUNTERCLOCKWISE&&this._side===Ae.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)}),"addNextSegment"),Bn.prototype.addLineEndCap=a((function(t,e){var n=new wn(t,e),r=new wn;this.computeOffsetSegment(n,Ae.LEFT,this._distance,r);var i=new wn;this.computeOffsetSegment(n,Ae.RIGHT,this._distance,i);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case On.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,H.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case On.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case On.CAP_SQUARE:var u=new c;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var l=new c(r.p1.x+u.x,r.p1.y+u.y),p=new c(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(p)}}),"addLineEndCap"),Bn.prototype.getCoordinates=a((function(){return this._segList.getCoordinates()}),"getCoordinates"),Bn.prototype.addMitreJoin=a((function(t,e,n,r){var i=!0,o=null;try{o=L.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof O))throw t;o=new c(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())}),"addMitreJoin"),Bn.prototype.addFilletCorner=a((function(t,e,n,r,i){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);r===H.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,c,r,i),this._segList.addPt(n)}),"addFilletCorner"),Bn.prototype.addOutsideTurn=a((function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Bn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===On.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===On.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))}),"addOutsideTurn"),Bn.prototype.createSquare=a((function(t){this._segList.addPt(new c(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new c(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new c(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new c(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()}),"createSquare"),Bn.prototype.addSegments=a((function(t,e){this._segList.addPts(t,e)}),"addSegments"),Bn.prototype.addFirstSegment=a((function(){this._segList.addPt(this._offset1.p0)}),"addFirstSegment"),Bn.prototype.addLastSegment=a((function(){this._segList.addPt(this._offset1.p1)}),"addLastSegment"),Bn.prototype.initSideSegments=a((function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)}),"initSideSegments"),Bn.prototype.addLimitedMitreJoin=a((function(t,e,n,r){var i=this._seg0.p1,o=Fn.angle(i,this._seg0.p0),a=Fn.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=Fn.normalize(o+a),u=Fn.normalize(s+Math.PI),l=r*n,p=n-l*Math.abs(Math.sin(a)),h=i.x+l*Math.cos(u),f=i.y+l*Math.sin(u),d=new c(h,f),g=new wn(i,d),y=g.pointAlongOffset(1,p),v=g.pointAlongOffset(1,-p);this._side===Ae.LEFT?(this._segList.addPt(y),this._segList.addPt(v)):(this._segList.addPt(v),this._segList.addPt(y))}),"addLimitedMitreJoin"),Bn.prototype.computeOffsetSegment=a((function(t,e,n,r){var i=e===Ae.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,s=Math.sqrt(o*o+a*a),u=i*n*o/s,l=i*n*a/s;r.p0.x=t.p0.x-l,r.p0.y=t.p0.y+u,r.p1.x=t.p1.x-l,r.p1.y=t.p1.y+u}),"computeOffsetSegment"),Bn.prototype.addFilletArc=a((function(t,e,n,r,i){var o=r===H.CLOCKWISE?-1:1,a=Math.abs(e-n),s=Math.trunc(a/this._filletAngleQuantum+.5);if(s<1)return null;for(var u=a/s,l=0,p=new c;l<a;){var h=e+o*l;p.x=t.x+i*Math.cos(h),p.y=t.y+i*Math.sin(h),this._segList.addPt(p),l+=u}}),"addFilletArc"),Bn.prototype.addInsideTurn=a((function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Bn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new c((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new c((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}),"addInsideTurn"),Bn.prototype.createCircle=a((function(t){var e=new c(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}),"createCircle"),Bn.prototype.addBevelJoin=a((function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)}),"addBevelJoin"),Bn.prototype.init=a((function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Rn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Bn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}),"init"),Bn.prototype.addCollinear=a((function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===On.JOIN_BEVEL||this._bufParams.getJoinStyle()===On.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,H.CLOCKWISE,this._distance))}),"addCollinear"),Bn.prototype.closeRing=a((function(){this._segList.closeRing()}),"closeRing"),Bn.prototype.hasNarrowConcaveAngle=a((function(){return this._hasNarrowConcaveAngle}),"hasNarrowConcaveAngle"),Bn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Bn.prototype.getClass=a((function(){return Bn}),"getClass"),jn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},jn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},jn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},jn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Bn,jn);var Gn=a((function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e}),"OffsetCurveBuilder");Gn.prototype.getOffsetCurve=a((function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&gt.reverse(o),o}),"getOffsetCurve"),Gn.prototype.computeSingleSidedBufferCurve=a((function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Ln.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ae.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(t,!1);var s=Ln.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Ae.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment(),n.closeRing()}),"computeSingleSidedBufferCurve"),Gn.prototype.computeRingBufferCurve=a((function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Ae.RIGHT&&(r=-r);var i=Ln.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()}),"computeRingBufferCurve"),Gn.prototype.computeLineBufferCurve=a((function(t,e){var n=this.simplifyTolerance(this._distance),r=Ln.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Ae.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var a=Ln.simplify(t,-n),s=a.length-1;e.initSideSegments(a[s],a[s-1],Ae.LEFT);for(var u=s-2;u>=0;u--)e.addNextSegment(a[u],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()}),"computeLineBufferCurve"),Gn.prototype.computePointCurve=a((function(t,e){switch(this._bufParams.getEndCapStyle()){case On.CAP_ROUND:e.createCircle(t);break;case On.CAP_SQUARE:e.createSquare(t)}}),"computePointCurve"),Gn.prototype.getLineCurve=a((function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()}),"getLineCurve"),Gn.prototype.getBufferParameters=a((function(){return this._bufParams}),"getBufferParameters"),Gn.prototype.simplifyTolerance=a((function(t){return t*this._bufParams.getSimplifyFactor()}),"simplifyTolerance"),Gn.prototype.getRingCurve=a((function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Gn.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()}),"getRingCurve"),Gn.prototype.computeOffsetCurve=a((function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Ln.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ae.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=Ln.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Ae.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment()}),"computeOffsetCurve"),Gn.prototype.getSegGen=a((function(t){return new Bn(this._precisionModel,this._bufParams,t)}),"getSegGen"),Gn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Gn.prototype.getClass=a((function(){return Gn}),"getClass"),Gn.copyCoordinates=a((function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new c(t[n]);return e}),"copyCoordinates");var qn=a((function(){this._subgraphs=null,this._seg=new wn,this._cga=new H;var t=arguments[0];this._subgraphs=t}),"SubgraphDepthLocater"),Un={DepthSegment:{configurable:!0}};qn.prototype.findStabbedSegments=a((function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=new ht,r=this._subgraphs.iterator();r.hasNext();){var i=r.next(),o=i.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}if(3===arguments.length)if(y(arguments[2],ct)&&arguments[0]instanceof c&&arguments[1]instanceof He)for(var a=arguments[0],s=arguments[1],u=arguments[2],l=s.getEdge().getCoordinates(),p=0;p<l.length-1;p++){t._seg.p0=l[p],t._seg.p1=l[p+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var h=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(h<a.x||t._seg.isHorizontal()||a.y<t._seg.p0.y||a.y>t._seg.p1.y||H.computeOrientation(t._seg.p0,t._seg.p1,a)===H.RIGHT)){var f=s.getDepth(Ae.LEFT);t._seg.p0.equals(l[p])||(f=s.getDepth(Ae.RIGHT));var d=new Vn(t._seg,f);u.add(d)}}else if(y(arguments[2],ct)&&arguments[0]instanceof c&&y(arguments[1],ct))for(var g=arguments[0],v=arguments[1],m=arguments[2],_=v.iterator();_.hasNext();){var b=_.next();b.isForward()&&t.findStabbedSegments(g,b,m)}}),"findStabbedSegments"),qn.prototype.getDepth=a((function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:an.min(e)._leftDepth}),"getDepth"),qn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),qn.prototype.getClass=a((function(){return qn}),"getClass"),Un.DepthSegment.get=function(){return Vn},Object.defineProperties(qn,Un);var Vn=a((function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new wn(t),this._leftDepth=e}),"DepthSegment");Vn.prototype.compareTo=a((function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!==(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)}),"compareTo"),Vn.prototype.compareX=a((function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)}),"compareX"),Vn.prototype.toString=a((function(){return this._upwardSeg.toString()}),"toString"),Vn.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),Vn.prototype.getClass=a((function(){return Vn}),"getClass");var zn=a((function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null}),"Triangle");zn.prototype.area=a((function(){return zn.area(this.p0,this.p1,this.p2)}),"area"),zn.prototype.signedArea=a((function(){return zn.signedArea(this.p0,this.p1,this.p2)}),"signedArea"),zn.prototype.interpolateZ=a((function(t){if(null===t)throw new n("Supplied point is null.");return zn.interpolateZ(t,this.p0,this.p1,this.p2)}),"interpolateZ"),zn.prototype.longestSideLength=a((function(){return zn.longestSideLength(this.p0,this.p1,this.p2)}),"longestSideLength"),zn.prototype.isAcute=a((function(){return zn.isAcute(this.p0,this.p1,this.p2)}),"isAcute"),zn.prototype.circumcentre=a((function(){return zn.circumcentre(this.p0,this.p1,this.p2)}),"circumcentre"),zn.prototype.area3D=a((function(){return zn.area3D(this.p0,this.p1,this.p2)}),"area3D"),zn.prototype.centroid=a((function(){return zn.centroid(this.p0,this.p1,this.p2)}),"centroid"),zn.prototype.inCentre=a((function(){return zn.inCentre(this.p0,this.p1,this.p2)}),"inCentre"),zn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),zn.prototype.getClass=a((function(){return zn}),"getClass"),zn.area=a((function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)}),"area"),zn.signedArea=a((function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2}),"signedArea"),zn.det=a((function(t,e,n,r){return t*r-e*n}),"det"),zn.interpolateZ=a((function(t,e,n,r){var i=e.x,o=e.y,a=n.x-i,s=r.x-i,u=n.y-o,l=r.y-o,c=a*l-s*u,p=t.x-i,h=t.y-o,f=(l*p-s*h)/c,d=(-u*p+a*h)/c;return e.z+f*(n.z-e.z)+d*(r.z-e.z)}),"interpolateZ"),zn.longestSideLength=a((function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),a=r;return i>a&&(a=i),o>a&&(a=o),a}),"longestSideLength"),zn.isAcute=a((function(t,e,n){return!(!Fn.isAcute(t,e,n)||!Fn.isAcute(e,n,t)||!Fn.isAcute(n,t,e))}),"isAcute"),zn.circumcentre=a((function(t,e,n){var r=n.x,i=n.y,o=t.x-r,a=t.y-i,s=e.x-r,u=e.y-i,l=2*zn.det(o,a,s,u),p=zn.det(a,o*o+a*a,u,s*s+u*u),h=zn.det(o,o*o+a*a,s,s*s+u*u);return new c(r-p/l,i+h/l)}),"circumcentre"),zn.perpendicularBisector=a((function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new L(t.x+n/2,t.y+r/2,1),o=new L(t.x-r+n/2,t.y+n+r/2,1);return new L(i,o)}),"perpendicularBisector"),zn.angleBisector=a((function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,a=n.y-t.y;return new c(t.x+i*o,t.y+i*a)}),"angleBisector"),zn.area3D=a((function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,a=n.x-t.x,s=n.y-t.y,u=n.z-t.z,l=i*u-o*s,c=o*a-r*u,p=r*s-i*a,h=l*l+c*c+p*p;return Math.sqrt(h)/2}),"area3D"),zn.centroid=a((function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new c(r,i)}),"centroid"),zn.inCentre=a((function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),a=r+i+o,s=(r*t.x+i*e.x+o*n.x)/a,u=(r*t.y+i*e.y+o*n.y)/a;return new c(s,u)}),"inCentre");var Xn=a((function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new ht;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n}),"OffsetCurveSetBuilder");Xn.prototype.addPoint=a((function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,d.EXTERIOR,d.INTERIOR)}),"addPoint"),Xn.prototype.addPolygon=a((function(t){var e=this,n=this._distance,r=Ae.LEFT;this._distance<0&&(n=-this._distance,r=Ae.RIGHT);var i=t.getExteriorRing(),o=gt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,r,d.EXTERIOR,d.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var s=t.getInteriorRingN(a),u=gt.removeRepeatedPoints(s.getCoordinates());e._distance>0&&e.isErodedCompletely(s,-e._distance)||e.addPolygonRing(u,n,Ae.opposite(r),d.INTERIOR,d.EXTERIOR)}}),"addPolygon"),Xn.prototype.isTriangleErodedCompletely=a((function(t,e){var n=new zn(t[0],t[1],t[2]),r=n.inCentre();return H.distancePointLine(r,n.p0,n.p1)<Math.abs(e)}),"isTriangleErodedCompletely"),Xn.prototype.addLineString=a((function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=gt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,d.EXTERIOR,d.INTERIOR)}),"addLineString"),Xn.prototype.addCurve=a((function(t,e,n){if(null===t||t.length<2)return null;var r=new bn(t,new Be(0,d.BOUNDARY,e,n));this._curveList.add(r)}),"addCurve"),Xn.prototype.getCurves=a((function(){return this.add(this._inputGeom),this._curveList}),"getCurves"),Xn.prototype.addPolygonRing=a((function(t,e,n,r,i){if(0===e&&t.length<oe.MINIMUM_VALID_SIZE)return null;var o=r,a=i;t.length>=oe.MINIMUM_VALID_SIZE&&H.isCCW(t)&&(o=i,a=r,n=Ae.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)}),"addPolygonRing"),Xn.prototype.add=a((function(t){if(t.isEmpty())return null;t instanceof re?this.addPolygon(t):t instanceof Qt?this.addLineString(t):t instanceof ee?this.addPoint(t):(t instanceof ie||t instanceof qt||t instanceof ae||t instanceof Gt)&&this.addCollection(t)}),"add"),Xn.prototype.isErodedCompletely=a((function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i}),"isErodedCompletely"),Xn.prototype.addCollection=a((function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}}),"addCollection"),Xn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Xn.prototype.getClass=a((function(){return Xn}),"getClass");var Yn=a((function(){}),"PointOnGeometryLocator");Yn.prototype.locate=a((function(t){}),"locate"),Yn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Yn.prototype.getClass=a((function(){return Yn}),"getClass");var Wn=a((function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()}),"GeometryCollectionIterator");Wn.prototype.next=a((function(){if(this._atStart)return this._atStart=!1,Wn.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new pt;var t=this._parent.getGeometryN(this._index++);return t instanceof Gt?(this._subcollectionIterator=new Wn(t),this._subcollectionIterator.next()):t}),"next"),Wn.prototype.remove=a((function(){throw new Error(this.getClass().getName())}),"remove"),Wn.prototype.hasNext=a((function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}),"hasNext"),Wn.prototype.interfaces_=a((function(){return[lt]}),"interfaces_"),Wn.prototype.getClass=a((function(){return Wn}),"getClass"),Wn.isAtomic=a((function(t){return!(t instanceof Gt)}),"isAtomic");var Hn=a((function(){this._geom=null;var t=arguments[0];this._geom=t}),"SimplePointInAreaLocator");Hn.prototype.locate=a((function(t){return Hn.locate(t,this._geom)}),"locate"),Hn.prototype.interfaces_=a((function(){return[Yn]}),"interfaces_"),Hn.prototype.getClass=a((function(){return Hn}),"getClass"),Hn.isPointInRing=a((function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&H.isPointInRing(t,e.getCoordinates())}),"isPointInRing"),Hn.containsPointInPolygon=a((function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Hn.isPointInRing(t,n))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r);if(Hn.isPointInRing(t,i))return!1}return!0}),"containsPointInPolygon"),Hn.containsPoint=a((function(t,e){if(e instanceof re)return Hn.containsPointInPolygon(t,e);if(e instanceof Gt)for(var n=new Wn(e);n.hasNext();){var r=n.next();if(r!==e&&Hn.containsPoint(t,r))return!0}return!1}),"containsPoint"),Hn.locate=a((function(t,e){return e.isEmpty()?d.EXTERIOR:Hn.containsPoint(t,e)?d.INTERIOR:d.EXTERIOR}),"locate");var Jn=a((function(){this._edgeMap=new Ot,this._edgeList=null,this._ptInAreaLocation=[d.NONE,d.NONE]}),"EdgeEndStar");Jn.prototype.getNextCW=a((function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)}),"getNextCW"),Jn.prototype.propagateSideLabels=a((function(t){for(var e=d.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,Ae.LEFT)!==d.NONE&&(e=r.getLocation(t,Ae.LEFT))}if(e===d.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getLabel();if(s.getLocation(t,Ae.ON)===d.NONE&&s.setLocation(t,Ae.ON,i),s.isArea(t)){var u=s.getLocation(t,Ae.LEFT),l=s.getLocation(t,Ae.RIGHT);if(l!==d.NONE){if(l!==i)throw new Re("side location conflict",a.getCoordinate());u===d.NONE&&U.shouldNeverReachHere("found single null side (at "+a.getCoordinate()+")"),i=u}else U.isTrue(s.getLocation(t,Ae.LEFT)===d.NONE,"found single null side"),s.setLocation(t,Ae.RIGHT,i),s.setLocation(t,Ae.LEFT,i)}}}),"propagateSideLabels"),Jn.prototype.getCoordinate=a((function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null}),"getCoordinate"),Jn.prototype.print=a((function(t){P.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){e.next().print(t)}}),"print"),Jn.prototype.isAreaLabelsConsistent=a((function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)}),"isAreaLabelsConsistent"),Jn.prototype.checkAreaLabelsConsistent=a((function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,Ae.LEFT);U.isTrue(r!==d.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var a=o.next().getLabel();U.isTrue(a.isArea(t),"Found non-area edge");var s=a.getLocation(t,Ae.LEFT),u=a.getLocation(t,Ae.RIGHT);if(s===u||u!==i)return!1;i=s}return!0}),"checkAreaLabelsConsistent"),Jn.prototype.findIndex=a((function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++){if(this._edgeList.get(e)===t)return e}return-1}),"findIndex"),Jn.prototype.iterator=a((function(){return this.getEdges().iterator()}),"iterator"),Jn.prototype.getEdges=a((function(){return null===this._edgeList&&(this._edgeList=new ht(this._edgeMap.values())),this._edgeList}),"getEdges"),Jn.prototype.getLocation=a((function(t,e,n){return this._ptInAreaLocation[t]===d.NONE&&(this._ptInAreaLocation[t]=Hn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]}),"getLocation"),Jn.prototype.toString=a((function(){var t=new b;t.append("EdgeEndStar: "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()}),"toString"),Jn.prototype.computeEdgeEndLabels=a((function(t){for(var e=this.iterator();e.hasNext();){e.next().computeLabel(t)}}),"computeEdgeEndLabels"),Jn.prototype.computeLabelling=a((function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===d.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel(),u=0;u<2;u++)if(s.isAnyNull(u)){var l=d.NONE;if(e[u])l=d.EXTERIOR;else{var c=a.getCoordinate();l=this.getLocation(u,c,t)}s.setAllLocationsIfNull(u,l)}}),"computeLabelling"),Jn.prototype.getDegree=a((function(){return this._edgeMap.size()}),"getDegree"),Jn.prototype.insertEdgeEnd=a((function(t,e){this._edgeMap.put(t,e),this._edgeList=null}),"insertEdgeEnd"),Jn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Jn.prototype.getClass=a((function(){return Jn}),"getClass");var Kn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return a(e,"DirectedEdgeStar"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=a((function(){var t=this;this.getResultAreaEdges();for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var o=t._resultAreaEdgeList.get(i),a=o.getSym();if(o.getLabel().isArea())switch(null===e&&o.isInResult()&&(e=o),r){case t._SCANNING_FOR_INCOMING:if(!a.isInResult())continue;n=a,r=t._LINKING_TO_OUTGOING;break;case t._LINKING_TO_OUTGOING:if(!o.isInResult())continue;n.setNext(o),r=t._SCANNING_FOR_INCOMING}}if(r===this._LINKING_TO_OUTGOING){if(null===e)throw new Re("no outgoing dirEdge found",this.getCoordinate());U.isTrue(e.isInResult(),"unable to link last incoming dirEdge"),n.setNext(e)}}),"linkResultDirectedEdges"),e.prototype.insert=a((function(t){var e=t;this.insertEdgeEnd(e,e)}),"insert"),e.prototype.getRightmostEdge=a((function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return Xe.isNorthern(i)&&Xe.isNorthern(o)?n:Xe.isNorthern(i)||Xe.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(U.shouldNeverReachHere("found two horizontal edges incident on node"),null):r}),"getRightmostEdge"),e.prototype.print=a((function(t){P.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}}),"print"),e.prototype.getResultAreaEdges=a((function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new ht;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList}),"getResultAreaEdges"),e.prototype.updateLabelling=a((function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}}),"updateLabelling"),e.prototype.linkAllDirectedEdges=a((function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)}),"linkAllDirectedEdges"),e.prototype.computeDepths=a((function(){var t=this;if(1===arguments.length){var e=arguments[0],n=this.findIndex(e),r=e.getDepth(Ae.LEFT),i=e.getDepth(Ae.RIGHT),o=this.computeDepths(n+1,this._edgeList.size(),r),a=this.computeDepths(0,n,o);if(a!==i)throw new Re("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var s=arguments[0],u=arguments[1],l=arguments[2],c=l,p=s;p<u;p++){var h=t._edgeList.get(p);h.setEdgeDepths(Ae.RIGHT,c),c=h.getDepth(Ae.LEFT)}return c}}),"computeDepths"),e.prototype.mergeSymLabels=a((function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}}),"mergeSymLabels"),e.prototype.linkMinimalDirectedEdges=a((function(t){for(var e=this,n=null,r=null,i=this._SCANNING_FOR_INCOMING,o=this._resultAreaEdgeList.size()-1;o>=0;o--){var a=e._resultAreaEdgeList.get(o),s=a.getSym();switch(null===n&&a.getEdgeRing()===t&&(n=a),i){case e._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;r=s,i=e._LINKING_TO_OUTGOING;break;case e._LINKING_TO_OUTGOING:if(a.getEdgeRing()!==t)continue;r.setNextMin(a),i=e._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(U.isTrue(null!==n,"found null for first outgoing dirEdge"),U.isTrue(n.getEdgeRing()===t,"unable to link last incoming dirEdge"),r.setNextMin(n))}),"linkMinimalDirectedEdges"),e.prototype.getOutgoingDegree=a((function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();){var n=e.next();n.isInResult()&&t++}return t}if(1===arguments.length){for(var r=arguments[0],i=0,o=this.iterator();o.hasNext();){var a=o.next();a.getEdgeRing()===r&&i++}return i}}),"getOutgoingDegree"),e.prototype.getLabel=a((function(){return this._label}),"getLabel"),e.prototype.findCoveredLineEdges=a((function(){for(var t=d.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=d.INTERIOR;break}if(r.isInResult()){t=d.EXTERIOR;break}}}if(t===d.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===d.INTERIOR):(a.isInResult()&&(i=d.EXTERIOR),s.isInResult()&&(i=d.INTERIOR))}}),"findCoveredLineEdges"),e.prototype.computeLabelling=a((function(e){t.prototype.computeLabelling.call(this,e),this._label=new Be(d.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);(o===d.INTERIOR||o===d.BOUNDARY)&&this._label.setLocation(i,d.INTERIOR)}}),"computeLabelling"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(Jn),Zn=function(t){function e(){t.apply(this,arguments)}return a(e,"OverlayNodeFactory"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=a((function(t){return new Ve(t,new Kn)}),"createNode"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(Je),$n=a((function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)}),"OrientedCoordinateArray");$n.prototype.compareTo=a((function(t){var e=t;return $n.compareOriented(this._pts,this._orientation,e._pts,e._orientation)}),"compareTo"),$n.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),$n.prototype.getClass=a((function(){return $n}),"getClass"),$n.orientation=a((function(t){return 1===gt.increasingDirection(t)}),"orientation"),$n.compareOriented=a((function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,a=e?t.length:-1,s=r?n.length:-1,u=e?0:t.length-1,l=r?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=i)===a,h=(l+=o)===s;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}}),"compareOriented");var Qn=a((function(){this._edges=new ht,this._ocaMap=new Ot}),"EdgeList");Qn.prototype.print=a((function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(") ")}),"print"),Qn.prototype.addAll=a((function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())}),"addAll"),Qn.prototype.findEdgeIndex=a((function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1}),"findEdgeIndex"),Qn.prototype.iterator=a((function(){return this._edges.iterator()}),"iterator"),Qn.prototype.getEdges=a((function(){return this._edges}),"getEdges"),Qn.prototype.get=a((function(t){return this._edges.get(t)}),"get"),Qn.prototype.findEqualEdge=a((function(t){var e=new $n(t.getCoordinates());return this._ocaMap.get(e)}),"findEqualEdge"),Qn.prototype.add=a((function(t){this._edges.add(t);var e=new $n(t.getCoordinates());this._ocaMap.put(e,t)}),"add"),Qn.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Qn.prototype.getClass=a((function(){return Qn}),"getClass");var tr=a((function(){}),"SegmentIntersector");tr.prototype.processIntersections=a((function(t,e,n,r){}),"processIntersections"),tr.prototype.isDone=a((function(){}),"isDone"),tr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),tr.prototype.getClass=a((function(){return tr}),"getClass");var er=a((function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t}),"IntersectionAdder");er.prototype.isTrivialIntersection=a((function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(er.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.size()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1}),"isTrivialIntersection"),er.prototype.getProperIntersectionPoint=a((function(){return this._properIntersectionPoint}),"getProperIntersectionPoint"),er.prototype.hasProperInteriorIntersection=a((function(){return this._hasProperInterior}),"hasProperInteriorIntersection"),er.prototype.getLineIntersector=a((function(){return this._li}),"getLineIntersector"),er.prototype.hasProperIntersection=a((function(){return this._hasProper}),"hasProperIntersection"),er.prototype.processIntersections=a((function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))}),"processIntersections"),er.prototype.hasIntersection=a((function(){return this._hasIntersection}),"hasIntersection"),er.prototype.isDone=a((function(){return!1}),"isDone"),er.prototype.hasInteriorIntersection=a((function(){return this._hasInterior}),"hasInteriorIntersection"),er.prototype.interfaces_=a((function(){return[tr]}),"interfaces_"),er.prototype.getClass=a((function(){return er}),"getClass"),er.isAdjacentSegments=a((function(t,e){return 1===Math.abs(t-e)}),"isAdjacentSegments");var nr=a((function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new c(t),this.segmentIndex=e,this.dist=n}),"EdgeIntersection");nr.prototype.getSegmentIndex=a((function(){return this.segmentIndex}),"getSegmentIndex"),nr.prototype.getCoordinate=a((function(){return this.coord}),"getCoordinate"),nr.prototype.print=a((function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)}),"print"),nr.prototype.compareTo=a((function(t){var e=t;return this.compare(e.segmentIndex,e.dist)}),"compareTo"),nr.prototype.isEndPoint=a((function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t}),"isEndPoint"),nr.prototype.toString=a((function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist}),"toString"),nr.prototype.getDistance=a((function(){return this.dist}),"getDistance"),nr.prototype.compare=a((function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0}),"compare"),nr.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),nr.prototype.getClass=a((function(){return nr}),"getClass");var rr=a((function(){this._nodeMap=new Ot,this.edge=null;var t=arguments[0];this.edge=t}),"EdgeIntersectionList");rr.prototype.print=a((function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){e.next().print(t)}}),"print"),rr.prototype.iterator=a((function(){return this._nodeMap.values().iterator()}),"iterator"),rr.prototype.addSplitEdges=a((function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}}),"addSplitEdges"),rr.prototype.addEndpoints=a((function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)}),"addEndpoints"),rr.prototype.createSplitEdge=a((function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new c(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=e.coord),new ur(o,new Be(this.edge._label))}),"createSplitEdge"),rr.prototype.add=a((function(t,e,n){var r=new nr(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)}),"add"),rr.prototype.isIntersection=a((function(t){for(var e=this.iterator();e.hasNext();){if(e.next().coord.equals(t))return!0}return!1}),"isIntersection"),rr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),rr.prototype.getClass=a((function(){return rr}),"getClass");var ir=a((function(){}),"MonotoneChainIndexer");ir.prototype.getChainStartIndices=a((function(t){var e=0,n=new ht;n.add(new w(e));do{var r=this.findChainEnd(t,e);n.add(new w(r)),e=r}while(e<t.length-1);return ir.toIntArray(n)}),"getChainStartIndices"),ir.prototype.findChainEnd=a((function(t,e){for(var n=Xe.quadrant(t[e],t[e+1]),r=e+1;r<t.length;){if(Xe.quadrant(t[r-1],t[r])!==n)break;r++}return r-1}),"findChainEnd"),ir.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ir.prototype.getClass=a((function(){return ir}),"getClass"),ir.toIntArray=a((function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e}),"toIntArray");var or=a((function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new T,this.env2=new T;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new ir;this.startIndex=e.getChainStartIndices(this.pts)}),"MonotoneChainEdge");or.prototype.getCoordinates=a((function(){return this.pts}),"getCoordinates"),or.prototype.getMaxX=a((function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n}),"getMaxX"),or.prototype.getMinX=a((function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n}),"getMinX"),or.prototype.computeIntersectsForChain=a((function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[i],p=this.pts[o],h=a.pts[s],f=a.pts[u];if(o-i==1&&u-s==1)return l.addIntersections(this.e,i,a.e,s),null;if(this.env1.init(c,p),this.env2.init(h,f),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),g=Math.trunc((s+u)/2);i<d&&(s<g&&this.computeIntersectsForChain(i,d,a,s,g,l),g<u&&this.computeIntersectsForChain(i,d,a,g,u,l)),d<o&&(s<g&&this.computeIntersectsForChain(d,o,a,s,g,l),g<u&&this.computeIntersectsForChain(d,o,a,g,u,l))}}),"computeIntersectsForChain"),or.prototype.getStartIndexes=a((function(){return this.startIndex}),"getStartIndexes"),or.prototype.computeIntersects=a((function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)}),"computeIntersects"),or.prototype.interfaces_=a((function(){return[]}),"interfaces_"),or.prototype.getClass=a((function(){return or}),"getClass");var ar=a((function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE}),"Depth"),sr={NULL_VALUE:{configurable:!0}};ar.prototype.getDepth=a((function(t,e){return this._depth[t][e]}),"getDepth"),ar.prototype.setDepth=a((function(t,e,n){this._depth[t][e]=n}),"setDepth"),ar.prototype.isNull=a((function(){var t=this;if(0===arguments.length){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==ar.NULL_VALUE)return!1;return!0}if(1===arguments.length){var r=arguments[0];return this._depth[r][1]===ar.NULL_VALUE}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._depth[i][o]===ar.NULL_VALUE}}),"isNull"),ar.prototype.normalize=a((function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var r=1;r<3;r++){var i=0;t._depth[e][r]>n&&(i=1),t._depth[e][r]=i}}}),"normalize"),ar.prototype.getDelta=a((function(t){return this._depth[t][Ae.RIGHT]-this._depth[t][Ae.LEFT]}),"getDelta"),ar.prototype.getLocation=a((function(t,e){return this._depth[t][e]<=0?d.EXTERIOR:d.INTERIOR}),"getLocation"),ar.prototype.toString=a((function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}),"toString"),ar.prototype.add=a((function(){var t=this;if(1===arguments.length)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);(i===d.EXTERIOR||i===d.INTERIOR)&&(t.isNull(n,r)?t._depth[n][r]=ar.depthAtLocation(i):t._depth[n][r]+=ar.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];s===d.INTERIOR&&this._depth[o][a]++}}),"add"),ar.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ar.prototype.getClass=a((function(){return ar}),"getClass"),ar.depthAtLocation=a((function(t){return t===d.EXTERIOR?0:t===d.INTERIOR?1:ar.NULL_VALUE}),"depthAtLocation"),sr.NULL_VALUE.get=function(){return-1},Object.defineProperties(ar,sr);var ur=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new rr(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ar,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return a(e,"Edge"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=a((function(){return this._depth}),"getDepth"),e.prototype.getCollapsedEdge=a((function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Be.toLineLabel(this._label))}),"getCollapsedEdge"),e.prototype.isIsolated=a((function(){return this._isIsolated}),"isIsolated"),e.prototype.getCoordinates=a((function(){return this.pts}),"getCoordinates"),e.prototype.setIsolated=a((function(t){this._isIsolated=t}),"setIsolated"),e.prototype.setName=a((function(t){this._name=t}),"setName"),e.prototype.equals=a((function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a<this.pts.length;a++)if(this.pts[a].equals2D(n.pts[a])||(r=!1),this.pts[a].equals2D(n.pts[--o])||(i=!1),!r&&!i)return!1;return!0}),"equals"),e.prototype.getCoordinate=a((function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}}),"getCoordinate"),e.prototype.print=a((function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)}),"print"),e.prototype.computeIM=a((function(t){e.updateIM(this._label,t)}),"computeIM"),e.prototype.isCollapsed=a((function(){return!(!this._label.isArea()||3!==this.pts.length)&&!!this.pts[0].equals(this.pts[2])}),"isCollapsed"),e.prototype.isClosed=a((function(){return this.pts[0].equals(this.pts[this.pts.length-1])}),"isClosed"),e.prototype.getMaximumSegmentIndex=a((function(){return this.pts.length-1}),"getMaximumSegmentIndex"),e.prototype.getDepthDelta=a((function(){return this._depthDelta}),"getDepthDelta"),e.prototype.getNumPoints=a((function(){return this.pts.length}),"getNumPoints"),e.prototype.printReverse=a((function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")}),"printReverse"),e.prototype.getMonotoneChainEdge=a((function(){return null===this._mce&&(this._mce=new or(this)),this._mce}),"getMonotoneChainEdge"),e.prototype.getEnvelope=a((function(){if(null===this._env){this._env=new T;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env}),"getEnvelope"),e.prototype.addIntersection=a((function(t,e,n,r){var i=new c(t.getIntersection(r)),o=e,a=t.getEdgeDistance(n,r),s=o+1;if(s<this.pts.length){var u=this.pts[s];i.equals2D(u)&&(o=s,a=0)}this.eiList.add(i,o,a)}),"addIntersection"),e.prototype.toString=a((function(){var t=new b;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()}),"toString"),e.prototype.isPointwiseEqual=a((function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0}),"isPointwiseEqual"),e.prototype.setDepthDelta=a((function(t){this._depthDelta=t}),"setDepthDelta"),e.prototype.getEdgeIntersectionList=a((function(){return this.eiList}),"getEdgeIntersectionList"),e.prototype.addIntersections=a((function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)}),"addIntersections"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.updateIM=a((function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Ae.ON),e.getLocation(1,Ae.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Ae.LEFT),e.getLocation(1,Ae.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Ae.RIGHT),e.getLocation(1,Ae.RIGHT),2))}),"updateIM"),e}(Ue),lr=a((function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Qn,this._bufParams=t||null}),"BufferBuilder");lr.prototype.setWorkingPrecisionModel=a((function(t){this._workingPrecisionModel=t}),"setWorkingPrecisionModel"),lr.prototype.insertUniqueEdge=a((function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Be(t.getLabel())).flip(),n.merge(r);var i=lr.depthDelta(r),o=e.getDepthDelta()+i;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(lr.depthDelta(t.getLabel()))}),"insertUniqueEdge"),lr.prototype.buildSubgraphs=a((function(t,e){for(var n=new ht,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),a=new qn(n).getDepth(o);i.computeDepth(a),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}}),"buildSubgraphs"),lr.prototype.createSubgraphs=a((function(t){for(var e=new ht,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new Fe;i.create(r),e.add(i)}}return an.sort(e,an.reverseOrder()),e}),"createSubgraphs"),lr.prototype.createEmptyResultGeometry=a((function(){return this._geomFact.createPolygon()}),"createEmptyResultGeometry"),lr.prototype.getNoder=a((function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new Nn,n=new X;return n.setPrecisionModel(t),e.setSegmentIntersector(new er(n)),e}),"getNoder"),lr.prototype.buffer=a((function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new Gn(n,this._bufParams),i=new Xn(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new Ke(new Zn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),a=new Ze(this._geomFact);this.buildSubgraphs(o,a);var s=a.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)}),"buffer"),lr.prototype.computeNodedEdges=a((function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var a=i.getData(),s=new ur(i.getCoordinates(),new Be(a));this.insertUniqueEdge(s)}}}),"computeNodedEdges"),lr.prototype.setNoder=a((function(t){this._workingNoder=t}),"setNoder"),lr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),lr.prototype.getClass=a((function(){return lr}),"getClass"),lr.depthDelta=a((function(t){var e=t.getLocation(0,Ae.LEFT),n=t.getLocation(0,Ae.RIGHT);return e===d.INTERIOR&&n===d.EXTERIOR?1:e===d.EXTERIOR&&n===d.INTERIOR?-1:0}),"depthDelta"),lr.convertSegStrings=a((function(t){for(var e=new we,n=new ht;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)}),"convertSegStrings");var cr=a((function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}}),"ScaledNoder");cr.prototype.rescale=a((function(){var t=this;if(y(arguments[0],st))for(var e=arguments[0],n=e.iterator();n.hasNext();){var r=n.next();t.rescale(r.getCoordinates())}else if(arguments[0]instanceof Array){for(var i=arguments[0],o=0;o<i.length;o++)i[o].x=i[o].x/t._scaleFactor+t._offsetX,i[o].y=i[o].y/t._scaleFactor+t._offsetY;2===i.length&&i[0].equals2D(i[1])&&P.out.println(i)}}),"rescale"),cr.prototype.scale=a((function(){var t=this;if(y(arguments[0],st)){for(var e=arguments[0],n=new ht,r=e.iterator();r.hasNext();){var i=r.next();n.add(new bn(t.scale(i.getCoordinates()),i.getData()))}return n}if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),s=0;s<o.length;s++)a[s]=new c(Math.round((o[s].x-t._offsetX)*t._scaleFactor),Math.round((o[s].y-t._offsetY)*t._scaleFactor),o[s].z);var u=gt.removeRepeatedPoints(a);return u}}),"scale"),cr.prototype.isIntegerPrecision=a((function(){return 1===this._scaleFactor}),"isIntegerPrecision"),cr.prototype.getNodedSubstrings=a((function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t}),"getNodedSubstrings"),cr.prototype.computeNodes=a((function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)}),"computeNodes"),cr.prototype.interfaces_=a((function(){return[Cn]}),"interfaces_"),cr.prototype.getClass=a((function(){return cr}),"getClass");var pr=a((function(){this._li=new X,this._segStrings=null;var t=arguments[0];this._segStrings=t}),"NodingValidator"),hr={fact:{configurable:!0}};pr.prototype.checkEndPtVertexIntersections=a((function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next(),r=n.getCoordinates();t.checkEndPtVertexIntersections(r[0],t._segStrings),t.checkEndPtVertexIntersections(r[r.length-1],t._segStrings)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var s=a.next(),u=s.getCoordinates(),l=1;l<u.length-1;l++)if(u[l].equals(i))throw new G("found endpt/interior pt intersection at index "+l+" :pt "+i)}),"checkEndPtVertexIntersections"),pr.prototype.checkInteriorIntersections=a((function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),r=this._segStrings.iterator();r.hasNext();){var i=r.next();t.checkInteriorIntersections(n,i)}else if(2===arguments.length)for(var o=arguments[0],a=arguments[1],s=o.getCoordinates(),u=a.getCoordinates(),l=0;l<s.length-1;l++)for(var c=0;c<u.length-1;c++)t.checkInteriorIntersections(o,l,a,c);else if(4===arguments.length){var p=arguments[0],h=arguments[1],f=arguments[2],d=arguments[3];if(p===f&&h===d)return null;var g=p.getCoordinates()[h],y=p.getCoordinates()[h+1],v=f.getCoordinates()[d],m=f.getCoordinates()[d+1];if(this._li.computeIntersection(g,y,v,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,g,y)||this.hasInteriorIntersection(this._li,v,m)))throw new G("found non-noded intersection at "+g+"-"+y+" and "+v+"-"+m)}}),"checkInteriorIntersections"),pr.prototype.checkValid=a((function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()}),"checkValid"),pr.prototype.checkCollapses=a((function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(1===arguments.length)for(var r=arguments[0],i=r.getCoordinates(),o=0;o<i.length-2;o++)t.checkCollapse(i[o],i[o+1],i[o+2])}),"checkCollapses"),pr.prototype.hasInteriorIntersection=a((function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1}),"hasInteriorIntersection"),pr.prototype.checkCollapse=a((function(t,e,n){if(t.equals(n))throw new G("found non-noded collapse at "+pr.fact.createLineString([t,e,n]))}),"checkCollapse"),pr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),pr.prototype.getClass=a((function(){return pr}),"getClass"),hr.fact.get=function(){return new we},Object.defineProperties(pr,hr);var fr=a((function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new n("Scale factor must be non-zero");1!==e&&(this._pt=new c(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new c,this._p1Scaled=new c),this.initCorners(this._pt)}),"HotPixel"),dr={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};fr.prototype.intersectsScaled=a((function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return U.isTrue(!(a&&s),"Found bad envelope test"),s}),"intersectsScaled"),fr.prototype.initCorners=a((function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new c(this._maxx,this._maxy),this._corner[1]=new c(this._minx,this._maxy),this._corner[2]=new c(this._minx,this._miny),this._corner[3]=new c(this._maxx,this._miny)}),"initCorners"),fr.prototype.intersects=a((function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}),"intersects"),fr.prototype.scale=a((function(t){return Math.round(t*this._scaleFactor)}),"scale"),fr.prototype.getCoordinate=a((function(){return this._originalPt}),"getCoordinate"),fr.prototype.copyScaled=a((function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)}),"copyScaled"),fr.prototype.getSafeEnvelope=a((function(){if(null===this._safeEnv){var t=fr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new T(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv}),"getSafeEnvelope"),fr.prototype.intersectsPixelClosure=a((function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))}),"intersectsPixelClosure"),fr.prototype.intersectsToleranceSquare=a((function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&r||t.equals(this._pt)||e.equals(this._pt))}),"intersectsToleranceSquare"),fr.prototype.addSnappedNode=a((function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)}),"addSnappedNode"),fr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),fr.prototype.getClass=a((function(){return fr}),"getClass"),dr.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(fr,dr);var gr=a((function(){this.tempEnv1=new T,this.selectedSegment=new wn}),"MonotoneChainSelectAction");gr.prototype.select=a((function(){if(1!==arguments.length&&2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}),"select"),gr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),gr.prototype.getClass=a((function(){return gr}),"getClass");var yr=a((function(){this._index=null;var t=arguments[0];this._index=t}),"MCIndexPointSnapper"),vr={HotPixelSnapAction:{configurable:!0}};yr.prototype.snap=a((function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new mr(e,n,r);return this._index.query(i,{interfaces_:function(){return[en]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}}),"snap"),yr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),yr.prototype.getClass=a((function(){return yr}),"getClass"),vr.HotPixelSnapAction.get=function(){return mr},Object.defineProperties(yr,vr);var mr=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return a(e,"HotPixelSnapAction"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=a((function(){return this._isNodeAdded}),"isNodeAdded"),e.prototype.select=a((function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],r=e.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)}),"select"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(gr),_r=a((function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new ht}),"InteriorIntersectionFinderAdder");_r.prototype.processIntersections=a((function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}}),"processIntersections"),_r.prototype.isDone=a((function(){return!1}),"isDone"),_r.prototype.getInteriorIntersections=a((function(){return this._interiorIntersections}),"getInteriorIntersections"),_r.prototype.interfaces_=a((function(){return[tr]}),"interfaces_"),_r.prototype.getClass=a((function(){return _r}),"getClass");var br=a((function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new X,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()}),"MCIndexSnapRounder");br.prototype.checkCorrectness=a((function(t){var e=bn.getNodedSubstrings(t),n=new pr(e);try{n.checkValid()}catch(t){if(!(t instanceof A))throw t;t.printStackTrace()}}),"checkCorrectness"),br.prototype.getNodedSubstrings=a((function(){return bn.getNodedSubstrings(this._nodedSegStrings)}),"getNodedSubstrings"),br.prototype.snapRound=a((function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)}),"snapRound"),br.prototype.findInteriorIntersections=a((function(t,e){var n=new _r(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()}),"findInteriorIntersections"),br.prototype.computeVertexSnaps=a((function(){var t=this;if(y(arguments[0],st))for(var e=arguments[0],n=e.iterator();n.hasNext();){var r=n.next();t.computeVertexSnaps(r)}else if(arguments[0]instanceof bn)for(var i=arguments[0],o=i.getCoordinates(),a=0;a<o.length;a++){var s=new fr(o[a],t._scaleFactor,t._li),u=t._pointSnapper.snap(s,i,a);u&&i.addIntersection(o[a],a)}}),"computeVertexSnaps"),br.prototype.computeNodes=a((function(t){this._nodedSegStrings=t,this._noder=new Nn,this._pointSnapper=new yr(this._noder.getIndex()),this.snapRound(t,this._li)}),"computeNodes"),br.prototype.computeIntersectionSnaps=a((function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next(),i=new fr(r,e._scaleFactor,e._li);e._pointSnapper.snap(i)}}),"computeIntersectionSnaps"),br.prototype.interfaces_=a((function(){return[Cn]}),"interfaces_"),br.prototype.getClass=a((function(){return br}),"getClass");var wr=a((function(){if(this._argGeom=null,this._distance=null,this._bufParams=new On,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}}),"BufferOp"),xr={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};wr.prototype.bufferFixedPrecision=a((function(t){var e=new cr(new br(new ve(1)),t.getScale()),n=new lr(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)}),"bufferFixedPrecision"),wr.prototype.bufferReducedPrecision=a((function(){var t=this;if(0===arguments.length){for(var e=wr.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Re))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=wr.precisionScaleFactor(this._argGeom,this._distance,n),i=new ve(r);this.bufferFixedPrecision(i)}}),"bufferReducedPrecision"),wr.prototype.computeGeometry=a((function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===ve.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()}),"computeGeometry"),wr.prototype.setQuadrantSegments=a((function(t){this._bufParams.setQuadrantSegments(t)}),"setQuadrantSegments"),wr.prototype.bufferOriginalPrecision=a((function(){try{var t=new lr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof G))throw t;this._saveException=t}}),"bufferOriginalPrecision"),wr.prototype.getResultGeometry=a((function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry}),"getResultGeometry"),wr.prototype.setEndCapStyle=a((function(t){this._bufParams.setEndCapStyle(t)}),"setEndCapStyle"),wr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),wr.prototype.getClass=a((function(){return wr}),"getClass"),wr.bufferOp=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new wr(t),r=n.getResultGeometry(e);return r}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Z&&"number"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=arguments[2],s=new wr(i);s.setQuadrantSegments(a);var u=s.getResultGeometry(o);return u}if(arguments[2]instanceof On&&arguments[0]instanceof Z&&"number"==typeof arguments[1]){var l=arguments[0],c=arguments[1],p=arguments[2],h=new wr(l,p),f=h.getResultGeometry(c);return f}}else if(4===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],v=arguments[3],m=new wr(d);m.setQuadrantSegments(y),m.setEndCapStyle(v);var _=m.getResultGeometry(g);return _}}),"bufferOp"),wr.precisionScaleFactor=a((function(t,e,n){var r=t.getEnvelopeInternal(),i=v.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)}),"precisionScaleFactor"),xr.CAP_ROUND.get=function(){return On.CAP_ROUND},xr.CAP_BUTT.get=function(){return On.CAP_FLAT},xr.CAP_FLAT.get=function(){return On.CAP_FLAT},xr.CAP_SQUARE.get=function(){return On.CAP_SQUARE},xr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(wr,xr);var Er=a((function(){this._pt=[new c,new c],this._distance=r.NaN,this._isNull=!0}),"PointPairDistance");Er.prototype.getCoordinates=a((function(){return this._pt}),"getCoordinates"),Er.prototype.getCoordinate=a((function(t){return this._pt[t]}),"getCoordinate"),Er.prototype.setMinimum=a((function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}}),"setMinimum"),Er.prototype.initialize=a((function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}}),"initialize"),Er.prototype.getDistance=a((function(){return this._distance}),"getDistance"),Er.prototype.setMaximum=a((function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}}),"setMaximum"),Er.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Er.prototype.getClass=a((function(){return Er}),"getClass");var Ir=a((function(){}),"DistanceToPointFinder");Ir.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ir.prototype.getClass=a((function(){return Ir}),"getClass"),Ir.computeDistance=a((function(){if(arguments[2]instanceof Er&&arguments[0]instanceof Qt&&arguments[1]instanceof c)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new wn,o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var a=i.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Er&&arguments[0]instanceof re&&arguments[1]instanceof c){var s=arguments[0],u=arguments[1],l=arguments[2];Ir.computeDistance(s.getExteriorRing(),u,l);for(var p=0;p<s.getNumInteriorRing();p++)Ir.computeDistance(s.getInteriorRingN(p),u,l)}else if(arguments[2]instanceof Er&&arguments[0]instanceof Z&&arguments[1]instanceof c){var h=arguments[0],f=arguments[1],d=arguments[2];if(h instanceof Qt)Ir.computeDistance(h,f,d);else if(h instanceof re)Ir.computeDistance(h,f,d);else if(h instanceof Gt)for(var g=h,y=0;y<g.getNumGeometries();y++){var v=g.getGeometryN(y);Ir.computeDistance(v,f,d)}else d.setMinimum(h.getCoordinate(),f)}else if(arguments[2]instanceof Er&&arguments[0]instanceof wn&&arguments[1]instanceof c){var m=arguments[0],_=arguments[1],b=arguments[2],w=m.closestPoint(_);b.setMinimum(w,_)}}),"computeDistance");var Sr=a((function(t){this._maxPtDist=new Er,this._inputGeom=t||null}),"BufferCurveMaximumDistanceFinder"),Cr={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Sr.prototype.computeMaxMidpointDistance=a((function(t){var e=new Nr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())}),"computeMaxMidpointDistance"),Sr.prototype.computeMaxVertexDistance=a((function(t){var e=new Mr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())}),"computeMaxVertexDistance"),Sr.prototype.findDistance=a((function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()}),"findDistance"),Sr.prototype.getDistancePoints=a((function(){return this._maxPtDist}),"getDistancePoints"),Sr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Sr.prototype.getClass=a((function(){return Sr}),"getClass"),Cr.MaxPointDistanceFilter.get=function(){return Mr},Cr.MaxMidpointDistanceFilter.get=function(){return Nr},Object.defineProperties(Sr,Cr);var Mr=a((function(t){this._maxPtDist=new Er,this._minPtDist=new Er,this._geom=t||null}),"MaxPointDistanceFilter");Mr.prototype.filter=a((function(t){this._minPtDist.initialize(),Ir.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}),"filter"),Mr.prototype.getMaxPointDistance=a((function(){return this._maxPtDist}),"getMaxPointDistance"),Mr.prototype.interfaces_=a((function(){return[tt]}),"interfaces_"),Mr.prototype.getClass=a((function(){return Mr}),"getClass");var Nr=a((function(t){this._maxPtDist=new Er,this._minPtDist=new Er,this._geom=t||null}),"MaxMidpointDistanceFilter");Nr.prototype.filter=a((function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=new c((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),Ir.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}),"filter"),Nr.prototype.isDone=a((function(){return!1}),"isDone"),Nr.prototype.isGeometryChanged=a((function(){return!1}),"isGeometryChanged"),Nr.prototype.getMaxPointDistance=a((function(){return this._maxPtDist}),"getMaxPointDistance"),Nr.prototype.interfaces_=a((function(){return[jt]}),"interfaces_"),Nr.prototype.getClass=a((function(){return Nr}),"getClass");var Ar=a((function(t){this._comps=t||null}),"PolygonExtracter");Ar.prototype.filter=a((function(t){t instanceof re&&this._comps.add(t)}),"filter"),Ar.prototype.interfaces_=a((function(){return[Bt]}),"interfaces_"),Ar.prototype.getClass=a((function(){return Ar}),"getClass"),Ar.getPolygons=a((function(){if(1===arguments.length){var t=arguments[0];return Ar.getPolygons(t,new ht)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof re?n.add(e):e instanceof Gt&&e.apply(new Ar(n)),n}}),"getPolygons");var Or=a((function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}}),"LinearComponentExtracter");Or.prototype.filter=a((function(t){if(this._isForcedToLineString&&t instanceof oe){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Qt&&this._lines.add(t)}),"filter"),Or.prototype.setForceToLineString=a((function(t){this._isForcedToLineString=t}),"setForceToLineString"),Or.prototype.interfaces_=a((function(){return[K]}),"interfaces_"),Or.prototype.getClass=a((function(){return Or}),"getClass"),Or.getGeometry=a((function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Or.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Or.getLines(e,n))}}),"getGeometry"),Or.getLines=a((function(){if(1===arguments.length){var t=arguments[0];return Or.getLines(t,!1)}if(2===arguments.length){if(y(arguments[0],st)&&y(arguments[1],st)){for(var e=arguments[0],n=arguments[1],r=e.iterator();r.hasNext();){var i=r.next();Or.getLines(i,n)}return n}if(arguments[0]instanceof Z&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1],s=new ht;return o.apply(new Or(s,a)),s}if(arguments[0]instanceof Z&&y(arguments[1],st)){var u=arguments[0],l=arguments[1];return u instanceof Qt?l.add(u):u.apply(new Or(l)),l}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&y(arguments[0],st)&&y(arguments[1],st)){for(var c=arguments[0],p=arguments[1],h=arguments[2],f=c.iterator();f.hasNext();){var d=f.next();Or.getLines(d,p,h)}return p}if("boolean"==typeof arguments[2]&&arguments[0]instanceof Z&&y(arguments[1],st)){var g=arguments[0],v=arguments[1],m=arguments[2];return g.apply(new Or(v,m)),v}}}),"getLines");var Pr=a((function(){if(this._boundaryRule=et.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0!==arguments.length&&1===arguments.length){var t=arguments[0];if(null===t)throw new n("Rule must be non-null");this._boundaryRule=t}}),"PointLocator");Pr.prototype.locateInternal=a((function(){var t=this;if(arguments[0]instanceof c&&arguments[1]instanceof re){var e=arguments[0],n=arguments[1];if(n.isEmpty())return d.EXTERIOR;var r=n.getExteriorRing(),i=this.locateInPolygonRing(e,r);if(i===d.EXTERIOR)return d.EXTERIOR;if(i===d.BOUNDARY)return d.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),s=t.locateInPolygonRing(e,a);if(s===d.INTERIOR)return d.EXTERIOR;if(s===d.BOUNDARY)return d.BOUNDARY}return d.INTERIOR}if(arguments[0]instanceof c&&arguments[1]instanceof Qt){var u=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(u))return d.EXTERIOR;var p=l.getCoordinates();return l.isClosed()||!u.equals(p[0])&&!u.equals(p[p.length-1])?H.isOnLine(u,p)?d.INTERIOR:d.EXTERIOR:d.BOUNDARY}if(arguments[0]instanceof c&&arguments[1]instanceof ee){var h=arguments[0],f=arguments[1],g=f.getCoordinate();return g.equals2D(h)?d.INTERIOR:d.EXTERIOR}}),"locateInternal"),Pr.prototype.locateInPolygonRing=a((function(t,e){return e.getEnvelopeInternal().intersects(t)?H.locatePointInRing(t,e.getCoordinates()):d.EXTERIOR}),"locateInPolygonRing"),Pr.prototype.intersects=a((function(t,e){return this.locate(t,e)!==d.EXTERIOR}),"intersects"),Pr.prototype.updateLocationInfo=a((function(t){t===d.INTERIOR&&(this._isIn=!0),t===d.BOUNDARY&&this._numBoundaries++}),"updateLocationInfo"),Pr.prototype.computeLocation=a((function(t,e){var n=this;if(e instanceof ee&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof re)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof qt)for(var r=e,i=0;i<r.getNumGeometries();i++){var o=r.getGeometryN(i);n.updateLocationInfo(n.locateInternal(t,o))}else if(e instanceof ae)for(var a=e,s=0;s<a.getNumGeometries();s++){var u=a.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,u))}else if(e instanceof Gt)for(var l=new Wn(e);l.hasNext();){var c=l.next();c!==e&&n.computeLocation(t,c)}}),"computeLocation"),Pr.prototype.locate=a((function(t,e){return e.isEmpty()?d.EXTERIOR:e instanceof Qt||e instanceof re?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?d.BOUNDARY:this._numBoundaries>0||this._isIn?d.INTERIOR:d.EXTERIOR)}),"locate"),Pr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Pr.prototype.getClass=a((function(){return Pr}),"getClass");var Lr=a((function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}}),"GeometryLocation"),Tr={INSIDE_AREA:{configurable:!0}};Lr.prototype.isInsideArea=a((function(){return this._segIndex===Lr.INSIDE_AREA}),"isInsideArea"),Lr.prototype.getCoordinate=a((function(){return this._pt}),"getCoordinate"),Lr.prototype.getGeometryComponent=a((function(){return this._component}),"getGeometryComponent"),Lr.prototype.getSegmentIndex=a((function(){return this._segIndex}),"getSegmentIndex"),Lr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Lr.prototype.getClass=a((function(){return Lr}),"getClass"),Tr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Lr,Tr);var Rr=a((function(t){this._pts=t||null}),"PointExtracter");Rr.prototype.filter=a((function(t){t instanceof ee&&this._pts.add(t)}),"filter"),Rr.prototype.interfaces_=a((function(){return[Bt]}),"interfaces_"),Rr.prototype.getClass=a((function(){return Rr}),"getClass"),Rr.getPoints=a((function(){if(1===arguments.length){var t=arguments[0];return t instanceof ee?an.singletonList(t):Rr.getPoints(t,new ht)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof ee?n.add(e):e instanceof Gt&&e.apply(new Rr(n)),n}}),"getPoints");var Dr=a((function(){this._locations=null;var t=arguments[0];this._locations=t}),"ConnectedElementLocationFilter");Dr.prototype.filter=a((function(t){(t instanceof ee||t instanceof Qt||t instanceof re)&&this._locations.add(new Lr(t,0,t.getCoordinate()))}),"filter"),Dr.prototype.interfaces_=a((function(){return[Bt]}),"interfaces_"),Dr.prototype.getClass=a((function(){return Dr}),"getClass"),Dr.getLocations=a((function(t){var e=new ht;return t.apply(new Dr(e)),e}),"getLocations");var Fr=a((function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Pr,this._minDistanceLocation=null,this._minDistance=r.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=o}}),"DistanceOp");Fr.prototype.computeContainmentDistance=a((function(){var t=this;if(0===arguments.length){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=1-n,o=Ar.getPolygons(this._geom[n]);if(o.size()>0){var a=Dr.getLocations(this._geom[i]);if(this.computeContainmentDistance(a,o,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&y(arguments[0],ct)&&y(arguments[1],ct)){for(var s=arguments[0],u=arguments[1],l=arguments[2],c=0;c<s.size();c++)for(var p=s.get(c),h=0;h<u.size();h++)if(t.computeContainmentDistance(p,u.get(h),l),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Lr&&arguments[1]instanceof re){var f=arguments[0],g=arguments[1],v=arguments[2],m=f.getCoordinate();if(d.EXTERIOR!==this._ptLocator.locate(m,g))return this._minDistance=0,v[0]=f,v[1]=new Lr(g,m),null}}),"computeContainmentDistance"),Fr.prototype.computeMinDistanceLinesPoints=a((function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a);if(r.computeMinDistance(o,s,n),r._minDistance<=r._terminateDistance)return null}}),"computeMinDistanceLinesPoints"),Fr.prototype.computeFacetDistance=a((function(){var t=new Array(2).fill(null),e=Or.getLines(this._geom[0]),n=Or.getLines(this._geom[1]),r=Rr.getPoints(this._geom[0]),i=Rr.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(r,i,t),this.updateMinDistance(t,!1)}),"computeFacetDistance"),Fr.prototype.nearestLocations=a((function(){return this.computeMinDistance(),this._minDistanceLocation}),"nearestLocations"),Fr.prototype.updateMinDistance=a((function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])}),"updateMinDistance"),Fr.prototype.nearestPoints=a((function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]}),"nearestPoints"),Fr.prototype.computeMinDistance=a((function(){var t=this;if(0===arguments.length){if(null!==this._minDistanceLocation||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Qt&&arguments[1]instanceof ee){var e=arguments[0],n=arguments[1],r=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var i=e.getCoordinates(),o=n.getCoordinate(),a=0;a<i.length-1;a++){var s=H.distancePointLine(o,i[a],i[a+1]);if(s<t._minDistance){t._minDistance=s;var u=new wn(i[a],i[a+1]),l=u.closestPoint(o);r[0]=new Lr(e,a,l),r[1]=new Lr(n,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Qt&&arguments[1]instanceof Qt){var c=arguments[0],p=arguments[1],h=arguments[2];if(c.getEnvelopeInternal().distance(p.getEnvelopeInternal())>this._minDistance)return null;for(var f=c.getCoordinates(),d=p.getCoordinates(),g=0;g<f.length-1;g++)for(var y=0;y<d.length-1;y++){var v=H.distanceLineLine(f[g],f[g+1],d[y],d[y+1]);if(v<t._minDistance){t._minDistance=v;var m=new wn(f[g],f[g+1]),_=new wn(d[y],d[y+1]),b=m.closestPoints(_);h[0]=new Lr(c,g,b[0]),h[1]=new Lr(p,y,b[1])}if(t._minDistance<=t._terminateDistance)return null}}}),"computeMinDistance"),Fr.prototype.computeMinDistancePoints=a((function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a),u=o.getCoordinate().distance(s.getCoordinate());if(u<r._minDistance&&(r._minDistance=u,n[0]=new Lr(o,0,o.getCoordinate()),n[1]=new Lr(s,0,s.getCoordinate())),r._minDistance<=r._terminateDistance)return null}}),"computeMinDistancePoints"),Fr.prototype.distance=a((function(){if(null===this._geom[0]||null===this._geom[1])throw new n("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)}),"distance"),Fr.prototype.computeMinDistanceLines=a((function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a);if(r.computeMinDistance(o,s,n),r._minDistance<=r._terminateDistance)return null}}),"computeMinDistanceLines"),Fr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Fr.prototype.getClass=a((function(){return Fr}),"getClass"),Fr.distance=a((function(t,e){return new Fr(t,e).distance()}),"distance"),Fr.isWithinDistance=a((function(t,e,n){return new Fr(t,e,n).distance()<=n}),"isWithinDistance"),Fr.nearestPoints=a((function(t,e){return new Fr(t,e).nearestPoints()}),"nearestPoints");var kr=a((function(){this._pt=[new c,new c],this._distance=r.NaN,this._isNull=!0}),"PointPairDistance");kr.prototype.getCoordinates=a((function(){return this._pt}),"getCoordinates"),kr.prototype.getCoordinate=a((function(t){return this._pt[t]}),"getCoordinate"),kr.prototype.setMinimum=a((function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}}),"setMinimum"),kr.prototype.initialize=a((function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}}),"initialize"),kr.prototype.toString=a((function(){return j.toLineString(this._pt[0],this._pt[1])}),"toString"),kr.prototype.getDistance=a((function(){return this._distance}),"getDistance"),kr.prototype.setMaximum=a((function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}}),"setMaximum"),kr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),kr.prototype.getClass=a((function(){return kr}),"getClass");var Br=a((function(){}),"DistanceToPoint");Br.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Br.prototype.getClass=a((function(){return Br}),"getClass"),Br.computeDistance=a((function(){if(arguments[2]instanceof kr&&arguments[0]instanceof Qt&&arguments[1]instanceof c)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new wn,i=t.getCoordinates(),o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var a=r.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof kr&&arguments[0]instanceof re&&arguments[1]instanceof c){var s=arguments[0],u=arguments[1],l=arguments[2];Br.computeDistance(s.getExteriorRing(),u,l);for(var p=0;p<s.getNumInteriorRing();p++)Br.computeDistance(s.getInteriorRingN(p),u,l)}else if(arguments[2]instanceof kr&&arguments[0]instanceof Z&&arguments[1]instanceof c){var h=arguments[0],f=arguments[1],d=arguments[2];if(h instanceof Qt)Br.computeDistance(h,f,d);else if(h instanceof re)Br.computeDistance(h,f,d);else if(h instanceof Gt)for(var g=h,y=0;y<g.getNumGeometries();y++){var v=g.getGeometryN(y);Br.computeDistance(v,f,d)}else d.setMinimum(h.getCoordinate(),f)}else if(arguments[2]instanceof kr&&arguments[0]instanceof wn&&arguments[1]instanceof c){var m=arguments[0],_=arguments[1],b=arguments[2],w=m.closestPoint(_);b.setMinimum(w,_)}}),"computeDistance");var jr=a((function(){this._g0=null,this._g1=null,this._ptDist=new kr,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e}),"DiscreteHausdorffDistance"),Gr={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};jr.prototype.getCoordinates=a((function(){return this._ptDist.getCoordinates()}),"getCoordinates"),jr.prototype.setDensifyFraction=a((function(t){if(t>1||t<=0)throw new n("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t}),"setDensifyFraction"),jr.prototype.compute=a((function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)}),"compute"),jr.prototype.distance=a((function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()}),"distance"),jr.prototype.computeOrientedDistance=a((function(t,e,n){var r=new qr(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Ur(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}}),"computeOrientedDistance"),jr.prototype.orientedDistance=a((function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()}),"orientedDistance"),jr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),jr.prototype.getClass=a((function(){return jr}),"getClass"),jr.distance=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new jr(t,e);return n.distance()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new jr(r,i);return a.setDensifyFraction(o),a.distance()}}),"distance"),Gr.MaxPointDistanceFilter.get=function(){return qr},Gr.MaxDensifiedByFractionDistanceFilter.get=function(){return Ur},Object.defineProperties(jr,Gr);var qr=a((function(){this._maxPtDist=new kr,this._minPtDist=new kr,this._euclideanDist=new Br,this._geom=null;var t=arguments[0];this._geom=t}),"MaxPointDistanceFilter");qr.prototype.filter=a((function(t){this._minPtDist.initialize(),Br.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}),"filter"),qr.prototype.getMaxPointDistance=a((function(){return this._maxPtDist}),"getMaxPointDistance"),qr.prototype.interfaces_=a((function(){return[tt]}),"interfaces_"),qr.prototype.getClass=a((function(){return qr}),"getClass");var Ur=a((function(){this._maxPtDist=new kr,this._minPtDist=new kr,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))}),"MaxDensifiedByFractionDistanceFilter");Ur.prototype.filter=a((function(t,e){var n=this;if(0===e)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),o=(i.x-r.x)/this._numSubSegs,a=(i.y-r.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var u=r.x+s*o,l=r.y+s*a,p=new c(u,l);n._minPtDist.initialize(),Br.computeDistance(n._geom,p,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}}),"filter"),Ur.prototype.isDone=a((function(){return!1}),"isDone"),Ur.prototype.isGeometryChanged=a((function(){return!1}),"isGeometryChanged"),Ur.prototype.getMaxPointDistance=a((function(){return this._maxPtDist}),"getMaxPointDistance"),Ur.prototype.interfaces_=a((function(){return[jt]}),"interfaces_"),Ur.prototype.getClass=a((function(){return Ur}),"getClass");var Vr=a((function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null}),"BufferDistanceValidator"),zr={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Vr.prototype.checkMaximumDistance=a((function(t,e,n){var r=new jr(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+j.toLineString(i[0],i[1])+")"}}),"checkMaximumDistance"),Vr.prototype.isValid=a((function(){var t=Math.abs(this._bufDistance),e=Vr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Vr.VERBOSE&&P.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)}),"isValid"),Vr.prototype.checkNegativeValid=a((function(){if(!(this._input instanceof re||this._input instanceof ae||this._input instanceof Gt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)}),"checkNegativeValid"),Vr.prototype.getErrorIndicator=a((function(){return this._errorIndicator}),"getErrorIndicator"),Vr.prototype.checkMinimumDistance=a((function(t,e,n){var r=new Fr(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+j.toLineString(i[0],i[1])+" )"}}),"checkMinimumDistance"),Vr.prototype.checkPositiveValid=a((function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)}),"checkPositiveValid"),Vr.prototype.getErrorLocation=a((function(){return this._errorLocation}),"getErrorLocation"),Vr.prototype.getPolygonLines=a((function(t){for(var e=new ht,n=new Or(e),r=Ar.getPolygons(t).iterator();r.hasNext();){r.next().apply(n)}return t.getFactory().buildGeometry(e)}),"getPolygonLines"),Vr.prototype.getErrorMessage=a((function(){return this._errMsg}),"getErrorMessage"),Vr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Vr.prototype.getClass=a((function(){return Vr}),"getClass"),zr.VERBOSE.get=function(){return!1},zr.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Vr,zr);var Xr=a((function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null}),"BufferResultValidator"),Yr={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Xr.prototype.isValid=a((function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid}),"isValid"),Xr.prototype.checkEnvelope=a((function(){if(this._distance<0)return null;var t=this._distance*Xr.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new T(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new T(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")}),"checkEnvelope"),Xr.prototype.checkDistance=a((function(){var t=new Vr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")}),"checkDistance"),Xr.prototype.checkArea=a((function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")}),"checkArea"),Xr.prototype.checkPolygonal=a((function(){this._result instanceof re||this._result instanceof ae||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")}),"checkPolygonal"),Xr.prototype.getErrorIndicator=a((function(){return this._errorIndicator}),"getErrorIndicator"),Xr.prototype.getErrorLocation=a((function(){return this._errorLocation}),"getErrorLocation"),Xr.prototype.checkExpectedEmpty=a((function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")}),"checkExpectedEmpty"),Xr.prototype.report=a((function(t){if(!Xr.VERBOSE)return null;P.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))}),"report"),Xr.prototype.getErrorMessage=a((function(){return this._errorMsg}),"getErrorMessage"),Xr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Xr.prototype.getClass=a((function(){return Xr}),"getClass"),Xr.isValidMsg=a((function(t,e,n){var r=new Xr(t,e,n);return r.isValid()?null:r.getErrorMessage()}),"isValidMsg"),Xr.isValid=a((function(t,e,n){return!!new Xr(t,e,n).isValid()}),"isValid"),Yr.VERBOSE.get=function(){return!1},Yr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Xr,Yr);var Wr=a((function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e}),"BasicSegmentString");Wr.prototype.getCoordinates=a((function(){return this._pts}),"getCoordinates"),Wr.prototype.size=a((function(){return this._pts.length}),"size"),Wr.prototype.getCoordinate=a((function(t){return this._pts[t]}),"getCoordinate"),Wr.prototype.isClosed=a((function(){return this._pts[0].equals(this._pts[this._pts.length-1])}),"isClosed"),Wr.prototype.getSegmentOctant=a((function(t){return t===this._pts.length-1?-1:vn.octant(this.getCoordinate(t),this.getCoordinate(t+1))}),"getSegmentOctant"),Wr.prototype.setData=a((function(t){this._data=t}),"setData"),Wr.prototype.getData=a((function(){return this._data}),"getData"),Wr.prototype.toString=a((function(){return j.toLineString(new he(this._pts))}),"toString"),Wr.prototype.interfaces_=a((function(){return[mn]}),"interfaces_"),Wr.prototype.getClass=a((function(){return Wr}),"getClass");var Hr=a((function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new ht,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null}),"InteriorIntersectionFinder");Hr.prototype.getInteriorIntersection=a((function(){return this._interiorIntersection}),"getInteriorIntersection"),Hr.prototype.setCheckEndSegmentsOnly=a((function(t){this._isCheckEndSegmentsOnly=t}),"setCheckEndSegmentsOnly"),Hr.prototype.getIntersectionSegments=a((function(){return this._intSegments}),"getIntersectionSegments"),Hr.prototype.count=a((function(){return this._intersectionCount}),"count"),Hr.prototype.getIntersections=a((function(){return this._intersections}),"getIntersections"),Hr.prototype.setFindAllIntersections=a((function(t){this._findAllIntersections=t}),"setFindAllIntersections"),Hr.prototype.setKeepIntersections=a((function(t){this._keepIntersections=t}),"setKeepIntersections"),Hr.prototype.processIntersections=a((function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!(this.isEndSegment(t,e)||this.isEndSegment(n,r)))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)}),"processIntersections"),Hr.prototype.isEndSegment=a((function(t,e){return 0===e||e>=t.size()-2}),"isEndSegment"),Hr.prototype.hasIntersection=a((function(){return null!==this._interiorIntersection}),"hasIntersection"),Hr.prototype.isDone=a((function(){return!this._findAllIntersections&&null!==this._interiorIntersection}),"isDone"),Hr.prototype.interfaces_=a((function(){return[tr]}),"interfaces_"),Hr.prototype.getClass=a((function(){return Hr}),"getClass"),Hr.createAllIntersectionsFinder=a((function(t){var e=new Hr(t);return e.setFindAllIntersections(!0),e}),"createAllIntersectionsFinder"),Hr.createAnyIntersectionFinder=a((function(t){return new Hr(t)}),"createAnyIntersectionFinder"),Hr.createIntersectionCounter=a((function(t){var e=new Hr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e}),"createIntersectionCounter");var Jr=a((function(){this._li=new X,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t}),"FastNodingValidator");Jr.prototype.execute=a((function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()}),"execute"),Jr.prototype.getIntersections=a((function(){return this._segInt.getIntersections()}),"getIntersections"),Jr.prototype.isValid=a((function(){return this.execute(),this._isValid}),"isValid"),Jr.prototype.setFindAllIntersections=a((function(t){this._findAllIntersections=t}),"setFindAllIntersections"),Jr.prototype.checkInteriorIntersections=a((function(){this._isValid=!0,this._segInt=new Hr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Nn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null}),"checkInteriorIntersections"),Jr.prototype.checkValid=a((function(){if(this.execute(),!this._isValid)throw new Re(this.getErrorMessage(),this._segInt.getInteriorIntersection())}),"checkValid"),Jr.prototype.getErrorMessage=a((function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+j.toLineString(t[0],t[1])+" and "+j.toLineString(t[2],t[3])}),"getErrorMessage"),Jr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Jr.prototype.getClass=a((function(){return Jr}),"getClass"),Jr.computeIntersections=a((function(t){var e=new Jr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()}),"computeIntersections");var Kr=a((function t(){this._nv=null;var e=arguments[0];this._nv=new Jr(t.toSegmentStrings(e))}),"EdgeNodingValidator");Kr.prototype.checkValid=a((function(){this._nv.checkValid()}),"checkValid"),Kr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Kr.prototype.getClass=a((function(){return Kr}),"getClass"),Kr.toSegmentStrings=a((function(t){for(var e=new ht,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Wr(r.getCoordinates(),r))}return e}),"toSegmentStrings"),Kr.checkValid=a((function(t){new Kr(t).checkValid()}),"checkValid");var Zr=a((function(t){this._mapOp=t}),"GeometryCollectionMapper");Zr.prototype.map=a((function(t){for(var e=new ht,n=0;n<t.getNumGeometries();n++){var r=this._mapOp.map(t.getGeometryN(n));r.isEmpty()||e.add(r)}return t.getFactory().createGeometryCollection(we.toGeometryArray(e))}),"map"),Zr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Zr.prototype.getClass=a((function(){return Zr}),"getClass"),Zr.map=a((function(t,e){return new Zr(e).map(t)}),"map");var $r=a((function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new ht,this._resultLineList=new ht;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n}),"LineBuilder");$r.prototype.collectLines=a((function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var r=n.next();e.collectLineEdge(r,t,e._lineEdgesList),e.collectBoundaryTouchEdge(r,t,e._lineEdgesList)}}),"collectLines"),$r.prototype.labelIsolatedLine=a((function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)}),"labelIsolatedLine"),$r.prototype.build=a((function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList}),"build"),$r.prototype.collectLineEdge=a((function(t,e,n){var r=t.getLabel(),i=t.getEdge();t.isLineEdge()&&!t.isVisited()&&Li.isResultOfOp(r,e)&&!i.isCovered()&&(n.add(i),t.setVisitedEdge(!0))}),"collectLineEdge"),$r.prototype.findCoveredLineEdges=a((function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){t.next().getEdges().findCoveredLineEdges()}for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}}),"findCoveredLineEdges"),$r.prototype.labelIsolatedLines=a((function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}}),"labelIsolatedLines"),$r.prototype.buildLines=a((function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}}),"buildLines"),$r.prototype.collectBoundaryTouchEdge=a((function(t,e,n){var r=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;U.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),Li.isResultOfOp(r,e)&&e===Li.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))}),"collectBoundaryTouchEdge"),$r.prototype.interfaces_=a((function(){return[]}),"interfaces_"),$r.prototype.getClass=a((function(){return $r}),"getClass");var Qr=a((function(){this._op=null,this._geometryFactory=null,this._resultPointList=new ht;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e}),"PointBuilder");Qr.prototype.filterCoveredNodeToPoint=a((function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}}),"filterCoveredNodeToPoint"),Qr.prototype.extractNonCoveredResultNodes=a((function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!(n.isInResult()||n.isIncidentEdgeInResult()||0!==n.getEdges().getDegree()&&t!==Li.INTERSECTION)){var r=n.getLabel();Li.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}}),"extractNonCoveredResultNodes"),Qr.prototype.build=a((function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList}),"build"),Qr.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Qr.prototype.getClass=a((function(){return Qr}),"getClass");var ti=a((function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1}),"GeometryTransformer");ti.prototype.transformPoint=a((function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))}),"transformPoint"),ti.prototype.transformPolygon=a((function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);(null===r||!(r instanceof oe)||r.isEmpty())&&(n=!1);for(var i=new ht,o=0;o<t.getNumInteriorRing();o++){var a=this.transformLinearRing(t.getInteriorRingN(o),t);null===a||a.isEmpty()||(a instanceof oe||(n=!1),i.add(a))}if(n)return this._factory.createPolygon(r,i.toArray([]));var s=new ht;return null!==r&&s.add(r),s.addAll(i),this._factory.buildGeometry(s)}),"transformPolygon"),ti.prototype.createCoordinateSequence=a((function(t){return this._factory.getCoordinateSequenceFactory().create(t)}),"createCoordinateSequence"),ti.prototype.getInputGeometry=a((function(){return this._inputGeom}),"getInputGeometry"),ti.prototype.transformMultiLineString=a((function(t,e){for(var n=new ht,r=0;r<t.getNumGeometries();r++){var i=this.transformLineString(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)}),"transformMultiLineString"),ti.prototype.transformCoordinates=a((function(t,e){return this.copy(t)}),"transformCoordinates"),ti.prototype.transformLineString=a((function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))}),"transformLineString"),ti.prototype.transformMultiPoint=a((function(t,e){for(var n=new ht,r=0;r<t.getNumGeometries();r++){var i=this.transformPoint(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)}),"transformMultiPoint"),ti.prototype.transformMultiPolygon=a((function(t,e){for(var n=new ht,r=0;r<t.getNumGeometries();r++){var i=this.transformPolygon(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)}),"transformMultiPolygon"),ti.prototype.copy=a((function(t){return t.copy()}),"copy"),ti.prototype.transformGeometryCollection=a((function(t,e){for(var n=new ht,r=0;r<t.getNumGeometries();r++){var i=this.transform(t.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(we.toGeometryArray(n)):this._factory.buildGeometry(n)}),"transformGeometryCollection"),ti.prototype.transform=a((function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof ee)return this.transformPoint(t,null);if(t instanceof ie)return this.transformMultiPoint(t,null);if(t instanceof oe)return this.transformLinearRing(t,null);if(t instanceof Qt)return this.transformLineString(t,null);if(t instanceof qt)return this.transformMultiLineString(t,null);if(t instanceof re)return this.transformPolygon(t,null);if(t instanceof ae)return this.transformMultiPolygon(t,null);if(t instanceof Gt)return this.transformGeometryCollection(t,null);throw new n("Unknown Geometry subtype: "+t.getClass().getName())}),"transform"),ti.prototype.transformLinearRing=a((function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)}),"transformLinearRing"),ti.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ti.prototype.getClass=a((function(){return ti}),"getClass");var ei=a((function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new wn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Qt&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}}),"LineStringSnapper");ei.prototype.snapVertices=a((function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r<n;r++){var i=t.get(r),o=this.findSnapForVertex(i,e);null!==o&&(t.set(r,new c(o)),0===r&&this._isClosed&&t.set(t.size()-1,new c(o)))}}),"snapVertices"),ei.prototype.findSnapForVertex=a((function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null}),"findSnapForVertex"),ei.prototype.snapTo=a((function(t){var e=new dt(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()}),"snapTo"),ei.prototype.snapSegments=a((function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var r=0;r<n;r++){var i=e[r],o=this.findSegmentIndexToSnap(i,t);o>=0&&t.add(o+1,new c(i),!1)}}),"snapSegments"),ei.prototype.findSegmentIndexToSnap=a((function(t,e){for(var n=this,i=r.MAX_VALUE,o=-1,a=0;a<e.size()-1;a++){if(n._seg.p0=e.get(a),n._seg.p1=e.get(a+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var s=n._seg.distance(t);s<n._snapTolerance&&s<i&&(i=s,o=a)}return o}),"findSegmentIndexToSnap"),ei.prototype.setAllowSnappingToSourceVertices=a((function(t){this._allowSnappingToSourceVertices=t}),"setAllowSnappingToSourceVertices"),ei.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ei.prototype.getClass=a((function(){return ei}),"getClass"),ei.isClosed=a((function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])}),"isClosed");var ni=a((function(t){this._srcGeom=t||null}),"GeometrySnapper"),ri={SNAP_PRECISION_FACTOR:{configurable:!0}};ni.prototype.snapTo=a((function(t,e){var n=this.extractTargetCoordinates(t);return new ii(e,n).transform(this._srcGeom)}),"snapTo"),ni.prototype.snapToSelf=a((function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),r=new ii(t,n,!0).transform(this._srcGeom),i=r;return e&&y(i,ne)&&(i=r.buffer(0)),i}),"snapToSelf"),ni.prototype.computeSnapTolerance=a((function(t){return this.computeMinimumSegmentLength(t)/10}),"computeSnapTolerance"),ni.prototype.extractTargetCoordinates=a((function(t){for(var e=new Tt,n=t.getCoordinates(),r=0;r<n.length;r++)e.add(n[r]);return e.toArray(new Array(0).fill(null))}),"extractTargetCoordinates"),ni.prototype.computeMinimumSegmentLength=a((function(t){for(var e=r.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e}),"computeMinimumSegmentLength"),ni.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ni.prototype.getClass=a((function(){return ni}),"getClass"),ni.snap=a((function(t,e,n){var r=new Array(2).fill(null),i=new ni(t);r[0]=i.snapTo(e,n);var o=new ni(e);return r[1]=o.snapTo(r[0],n),r}),"snap"),ni.computeOverlaySnapTolerance=a((function(){if(1===arguments.length){var t=arguments[0],e=ni.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===ve.FIXED){var r=1/n.getScale()*2/1.415;r>e&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(ni.computeOverlaySnapTolerance(i),ni.computeOverlaySnapTolerance(o))}}),"computeOverlaySnapTolerance"),ni.computeSizeBasedSnapTolerance=a((function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*ni.SNAP_PRECISION_FACTOR}),"computeSizeBasedSnapTolerance"),ni.snapToSelf=a((function(t,e,n){return new ni(t).snapToSelf(e,n)}),"snapToSelf"),ri.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(ni,ri);var ii=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return a(e,"SnapTransformer"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=a((function(t,e){var n=new ei(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)}),"snapLine"),e.prototype.transformCoordinates=a((function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)}),"transformCoordinates"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(ti),oi=a((function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null}),"CommonBits");oi.prototype.getCommon=a((function(){return r.longBitsToDouble(this._commonBits)}),"getCommon"),oi.prototype.add=a((function(t){var e=r.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=oi.signExpBits(this._commonBits),this._isFirst=!1,null):oi.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=oi.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=oi.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))}),"add"),oi.prototype.toString=a((function(){if(1===arguments.length){var t=arguments[0],e=r.longBitsToDouble(t),n=r.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+n,o=i.substring(i.length-64),a=o.substring(0,1)+" "+o.substring(1,12)+"(exp) "+o.substring(12)+" [ "+e+" ]";return a}}),"toString"),oi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),oi.prototype.getClass=a((function(){return oi}),"getClass"),oi.getBit=a((function(t,e){return t&1<<e?1:0}),"getBit"),oi.signExpBits=a((function(t){return t>>52}),"signExpBits"),oi.zeroLowerBits=a((function(t,e){return t&~((1<<e)-1)}),"zeroLowerBits"),oi.numCommonMostSigMantissaBits=a((function(t,e){for(var n=0,r=52;r>=0;r--){if(oi.getBit(t,r)!==oi.getBit(e,r))return n;n++}return 52}),"numCommonMostSigMantissaBits");var ai=a((function(){this._commonCoord=null,this._ccFilter=new ui}),"CommonBitsRemover"),si={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ai.prototype.addCommonBits=a((function(t){var e=new li(this._commonCoord);t.apply(e),t.geometryChanged()}),"addCommonBits"),ai.prototype.removeCommonBits=a((function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new c(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new li(e);return t.apply(n),t.geometryChanged(),t}),"removeCommonBits"),ai.prototype.getCommonCoordinate=a((function(){return this._commonCoord}),"getCommonCoordinate"),ai.prototype.add=a((function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()}),"add"),ai.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ai.prototype.getClass=a((function(){return ai}),"getClass"),si.CommonCoordinateFilter.get=function(){return ui},si.Translater.get=function(){return li},Object.defineProperties(ai,si);var ui=a((function(){this._commonBitsX=new oi,this._commonBitsY=new oi}),"CommonCoordinateFilter");ui.prototype.filter=a((function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)}),"filter"),ui.prototype.getCommonCoordinate=a((function(){return new c(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())}),"getCommonCoordinate"),ui.prototype.interfaces_=a((function(){return[tt]}),"interfaces_"),ui.prototype.getClass=a((function(){return ui}),"getClass");var li=a((function(){this.trans=null;var t=arguments[0];this.trans=t}),"Translater");li.prototype.filter=a((function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)}),"filter"),li.prototype.isDone=a((function(){return!1}),"isDone"),li.prototype.isGeometryChanged=a((function(){return!0}),"isGeometryChanged"),li.prototype.interfaces_=a((function(){return[jt]}),"interfaces_"),li.prototype.getClass=a((function(){return li}),"getClass");var ci=a((function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()}),"SnapOverlayOp");ci.prototype.selfSnap=a((function(t){return new ni(t).snapTo(t,this._snapTolerance)}),"selfSnap"),ci.prototype.removeCommonBits=a((function(t){this._cbr=new ai,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e}),"removeCommonBits"),ci.prototype.prepareResult=a((function(t){return this._cbr.addCommonBits(t),t}),"prepareResult"),ci.prototype.getResultGeometry=a((function(t){var e=this.snap(this._geom),n=Li.overlayOp(e[0],e[1],t);return this.prepareResult(n)}),"getResultGeometry"),ci.prototype.checkValid=a((function(t){t.isValid()||P.out.println("Snapped geometry is invalid")}),"checkValid"),ci.prototype.computeSnapTolerance=a((function(){this._snapTolerance=ni.computeOverlaySnapTolerance(this._geom[0],this._geom[1])}),"computeSnapTolerance"),ci.prototype.snap=a((function(t){var e=this.removeCommonBits(t);return ni.snap(e[0],e[1],this._snapTolerance)}),"snap"),ci.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ci.prototype.getClass=a((function(){return ci}),"getClass"),ci.overlayOp=a((function(t,e,n){return new ci(t,e).getResultGeometry(n)}),"overlayOp"),ci.union=a((function(t,e){return ci.overlayOp(t,e,Li.UNION)}),"union"),ci.intersection=a((function(t,e){return ci.overlayOp(t,e,Li.INTERSECTION)}),"intersection"),ci.symDifference=a((function(t,e){return ci.overlayOp(t,e,Li.SYMDIFFERENCE)}),"symDifference"),ci.difference=a((function(t,e){return ci.overlayOp(t,e,Li.DIFFERENCE)}),"difference");var pi=a((function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e}),"SnapIfNeededOverlayOp");pi.prototype.getResultGeometry=a((function(t){var e=null,n=!1,r=null;try{e=Li.overlayOp(this._geom[0],this._geom[1],t);n=!0}catch(t){if(!(t instanceof G))throw t;r=t}if(!n)try{e=ci.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof G?r:t}return e}),"getResultGeometry"),pi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),pi.prototype.getClass=a((function(){return pi}),"getClass"),pi.overlayOp=a((function(t,e,n){return new pi(t,e).getResultGeometry(n)}),"overlayOp"),pi.union=a((function(t,e){return pi.overlayOp(t,e,Li.UNION)}),"union"),pi.intersection=a((function(t,e){return pi.overlayOp(t,e,Li.INTERSECTION)}),"intersection"),pi.symDifference=a((function(t,e){return pi.overlayOp(t,e,Li.SYMDIFFERENCE)}),"symDifference"),pi.difference=a((function(t,e){return pi.overlayOp(t,e,Li.DIFFERENCE)}),"difference");var hi=a((function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e}),"MonotoneChain");hi.prototype.computeIntersections=a((function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)}),"computeIntersections"),hi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),hi.prototype.getClass=a((function(){return hi}),"getClass");var fi=a((function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}}),"SweepLineEvent"),di={INSERT:{configurable:!0},DELETE:{configurable:!0}};fi.prototype.isDelete=a((function(){return this._eventType===fi.DELETE}),"isDelete"),fi.prototype.setDeleteEventIndex=a((function(t){this._deleteEventIndex=t}),"setDeleteEventIndex"),fi.prototype.getObject=a((function(){return this._obj}),"getObject"),fi.prototype.compareTo=a((function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0}),"compareTo"),fi.prototype.getInsertEvent=a((function(){return this._insertEvent}),"getInsertEvent"),fi.prototype.isInsert=a((function(){return this._eventType===fi.INSERT}),"isInsert"),fi.prototype.isSameLabel=a((function(t){return null!==this._label&&this._label===t._label}),"isSameLabel"),fi.prototype.getDeleteEventIndex=a((function(){return this._deleteEventIndex}),"getDeleteEventIndex"),fi.prototype.interfaces_=a((function(){return[o]}),"interfaces_"),fi.prototype.getClass=a((function(){return fi}),"getClass"),di.INSERT.get=function(){return 1},di.DELETE.get=function(){return 2},Object.defineProperties(fi,di);var gi=a((function(){}),"EdgeSetIntersector");gi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),gi.prototype.getClass=a((function(){return gi}),"getClass");var yi=a((function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n}),"SegmentIntersector");yi.prototype.isTrivialIntersection=a((function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(yi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1}),"isTrivialIntersection"),yi.prototype.getProperIntersectionPoint=a((function(){return this._properIntersectionPoint}),"getProperIntersectionPoint"),yi.prototype.setIsDoneIfProperInt=a((function(t){this._isDoneWhenProperInt=t}),"setIsDoneIfProperInt"),yi.prototype.hasProperInteriorIntersection=a((function(){return this._hasProperInterior}),"hasProperInteriorIntersection"),yi.prototype.isBoundaryPointInternal=a((function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1}),"isBoundaryPointInternal"),yi.prototype.hasProperIntersection=a((function(){return this._hasProper}),"hasProperIntersection"),yi.prototype.hasIntersection=a((function(){return this._hasIntersection}),"hasIntersection"),yi.prototype.isDone=a((function(){return this._isDone}),"isDone"),yi.prototype.isBoundaryPoint=a((function(t,e){return null!==e&&!(!this.isBoundaryPointInternal(t,e[0])&&!this.isBoundaryPointInternal(t,e[1]))}),"isBoundaryPoint"),yi.prototype.setBoundaryNodes=a((function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e}),"setBoundaryNodes"),yi.prototype.addIntersections=a((function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))}),"addIntersections"),yi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),yi.prototype.getClass=a((function(){return yi}),"getClass"),yi.isAdjacentSegments=a((function(t,e){return 1===Math.abs(t-e)}),"isAdjacentSegments");var vi=function(t){function e(){t.call(this),this.events=new ht,this.nOverlaps=null}return a(e,"SimpleMCSweepLineIntersector"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=a((function(){an.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}}),"prepareEvents"),e.prototype.computeIntersections=a((function(){var t=this;if(1===arguments.length){var e=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var n=0;n<this.events.size();n++){var r=t.events.get(n);if(r.isInsert()&&t.processOverlaps(n,r.getDeleteEventIndex(),r,e),e.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof yi&&y(arguments[0],ct)&&y(arguments[1],ct)){var i=arguments[0],o=arguments[1],a=arguments[2];this.addEdges(i,i),this.addEdges(o,o),this.computeIntersections(a)}else if("boolean"==typeof arguments[2]&&y(arguments[0],ct)&&arguments[1]instanceof yi){var s=arguments[0],u=arguments[1],l=arguments[2];l?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(u)}}),"computeIntersections"),e.prototype.addEdge=a((function(t,e){for(var n=t.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var o=new hi(n,i),a=new fi(e,n.getMinX(i),o);this.events.add(a),this.events.add(new fi(n.getMaxX(i),a))}}),"addEdge"),e.prototype.processOverlaps=a((function(t,e,n,r){for(var i=n.getObject(),o=t;o<e;o++){var a=this.events.get(o);if(a.isInsert()){var s=a.getObject();n.isSameLabel(a)||(i.computeIntersections(s,r),this.nOverlaps++)}}}),"processOverlaps"),e.prototype.addEdges=a((function(){var t=this;if(1===arguments.length)for(var e=arguments[0],n=e.iterator();n.hasNext();){var r=n.next();t.addEdge(r,r)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=i.iterator();a.hasNext();){var s=a.next();t.addEdge(s,o)}}),"addEdges"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(gi),mi=a((function(){this._min=r.POSITIVE_INFINITY,this._max=r.NEGATIVE_INFINITY}),"IntervalRTreeNode"),_i={NodeComparator:{configurable:!0}};mi.prototype.getMin=a((function(){return this._min}),"getMin"),mi.prototype.intersects=a((function(t,e){return!(this._min>e||this._max<t)}),"intersects"),mi.prototype.getMax=a((function(){return this._max}),"getMax"),mi.prototype.toString=a((function(){return j.toLineString(new c(this._min,0),new c(this._max,0))}),"toString"),mi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),mi.prototype.getClass=a((function(){return mi}),"getClass"),_i.NodeComparator.get=function(){return bi},Object.defineProperties(mi,_i);var bi=a((function(){}),"NodeComparator");bi.prototype.compare=a((function(t,e){var n=t,r=e,i=(n._min+n._max)/2,o=(r._min+r._max)/2;return i<o?-1:i>o?1:0}),"compare"),bi.prototype.interfaces_=a((function(){return[u]}),"interfaces_"),bi.prototype.getClass=a((function(){return bi}),"getClass");var wi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return a(e,"IntervalRTreeLeafNode"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=a((function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)}),"query"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(mi),xi=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return a(e,"IntervalRTreeBranchNode"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=a((function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)}),"buildExtent"),e.prototype.query=a((function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)}),"query"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(mi),Ei=a((function(){this._leaves=new ht,this._root=null,this._level=0}),"SortedPackedIntervalRTree");Ei.prototype.buildTree=a((function(){an.sort(this._leaves,new mi.NodeComparator);for(var t=this._leaves,e=null,n=new ht;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}}),"buildTree"),Ei.prototype.insert=a((function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new wi(t,e,n))}),"insert"),Ei.prototype.query=a((function(t,e,n){this.init(),this._root.query(t,e,n)}),"query"),Ei.prototype.buildRoot=a((function(){if(null!==this._root)return null;this._root=this.buildTree()}),"buildRoot"),Ei.prototype.printNode=a((function(t){P.out.println(j.toLineString(new c(t._min,this._level),new c(t._max,this._level)))}),"printNode"),Ei.prototype.init=a((function(){if(null!==this._root)return null;this.buildRoot()}),"init"),Ei.prototype.buildLevel=a((function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var r=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(r);else{var i=new xi(t.get(n),t.get(n+1));e.add(i)}}}),"buildLevel"),Ei.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ei.prototype.getClass=a((function(){return Ei}),"getClass");var Ii=a((function(){this._items=new ht}),"ArrayListVisitor");Ii.prototype.visitItem=a((function(t){this._items.add(t)}),"visitItem"),Ii.prototype.getItems=a((function(){return this._items}),"getItems"),Ii.prototype.interfaces_=a((function(){return[en]}),"interfaces_"),Ii.prototype.getClass=a((function(){return Ii}),"getClass");var Si=a((function(){this._index=null;var t=arguments[0];if(!y(t,ne))throw new n("Argument must be Polygonal");this._index=new Ni(t)}),"IndexedPointInAreaLocator"),Ci={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Si.prototype.locate=a((function(t){var e=new W(t),n=new Mi(e);return this._index.query(t.y,t.y,n),e.getLocation()}),"locate"),Si.prototype.interfaces_=a((function(){return[Yn]}),"interfaces_"),Si.prototype.getClass=a((function(){return Si}),"getClass"),Ci.SegmentVisitor.get=function(){return Mi},Ci.IntervalIndexedGeometry.get=function(){return Ni},Object.defineProperties(Si,Ci);var Mi=a((function(){this._counter=null;var t=arguments[0];this._counter=t}),"SegmentVisitor");Mi.prototype.visitItem=a((function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))}),"visitItem"),Mi.prototype.interfaces_=a((function(){return[en]}),"interfaces_"),Mi.prototype.getClass=a((function(){return Mi}),"getClass");var Ni=a((function(){this._index=new Ei;var t=arguments[0];this.init(t)}),"IntervalIndexedGeometry");Ni.prototype.init=a((function(t){for(var e=Or.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}}),"init"),Ni.prototype.addLine=a((function(t){for(var e=1;e<t.length;e++){var n=new wn(t[e-1],t[e]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}}),"addLine"),Ni.prototype.query=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Ii;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._index.query(r,i,o)}}),"query"),Ni.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ni.prototype.getClass=a((function(){return Ni}),"getClass");var Ai=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new ye,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Pr,2===arguments.length){var e=arguments[0],n=arguments[1],r=et.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=a,null!==o&&this.add(o)}}return a(e,"GeometryGraph"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=a((function(t,n){var r=this._nodes.addNode(n).getLabel(),i=1;d.NONE;r.getLocation(t,Ae.ON)===d.BOUNDARY&&i++;var o=e.determineBoundary(this._boundaryNodeRule,i);r.setLocation(t,o)}),"insertBoundaryPoint"),e.prototype.computeSelfNodes=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new yi(n,!0,!1);o.setIsDoneIfProperInt(i);var a=this.createEdgeSetIntersector(),s=this._parentGeom instanceof oe||this._parentGeom instanceof re||this._parentGeom instanceof ae,u=r||!s;return a.computeIntersections(this._edges,o,u),this.addSelfIntersectionNodes(this._argIndex),o}}),"computeSelfNodes"),e.prototype.computeSplitEdges=a((function(t){for(var e=this._edges.iterator();e.hasNext();){e.next().eiList.addSplitEdges(t)}}),"computeSplitEdges"),e.prototype.computeEdgeIntersections=a((function(t,e,n){var r=new yi(e,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,r),r}),"computeEdgeIntersections"),e.prototype.getGeometry=a((function(){return this._parentGeom}),"getGeometry"),e.prototype.getBoundaryNodeRule=a((function(){return this._boundaryNodeRule}),"getBoundaryNodeRule"),e.prototype.hasTooFewPoints=a((function(){return this._hasTooFewPoints}),"hasTooFewPoints"),e.prototype.addPoint=a((function(){if(arguments[0]instanceof ee){var t=arguments[0],e=t.getCoordinate();this.insertPoint(this._argIndex,e,d.INTERIOR)}else if(arguments[0]instanceof c){var n=arguments[0];this.insertPoint(this._argIndex,n,d.INTERIOR)}}),"addPoint"),e.prototype.addPolygon=a((function(t){this.addPolygonRing(t.getExteriorRing(),d.EXTERIOR,d.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,d.INTERIOR,d.EXTERIOR)}}),"addPolygon"),e.prototype.addEdge=a((function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],d.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],d.BOUNDARY)}),"addEdge"),e.prototype.addLineString=a((function(t){var e=gt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ur(e,new Be(this._argIndex,d.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),U.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])}),"addLineString"),e.prototype.getInvalidPoint=a((function(){return this._invalidPoint}),"getInvalidPoint"),e.prototype.getBoundaryPoints=a((function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e}),"getBoundaryPoints"),e.prototype.getBoundaryNodes=a((function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes}),"getBoundaryNodes"),e.prototype.addSelfIntersectionNode=a((function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===d.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)}),"addSelfIntersectionNode"),e.prototype.addPolygonRing=a((function(t,e,n){if(t.isEmpty())return null;var r=gt.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;H.isCCW(r)&&(i=n,o=e);var a=new ur(r,new Be(this._argIndex,d.BOUNDARY,i,o));this._lineEdgeMap.put(t,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],d.BOUNDARY)}),"addPolygonRing"),e.prototype.insertPoint=a((function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Be(t,n):i.setLocation(t,n)}),"insertPoint"),e.prototype.createEdgeSetIntersector=a((function(){return new vi}),"createEdgeSetIntersector"),e.prototype.addSelfIntersectionNodes=a((function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}}),"addSelfIntersectionNodes"),e.prototype.add=a((function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ae&&(this._useBoundaryDeterminationRule=!1),e instanceof re)this.addPolygon(e);else if(e instanceof Qt)this.addLineString(e);else if(e instanceof ee)this.addPoint(e);else if(e instanceof ie)this.addCollection(e);else if(e instanceof qt)this.addCollection(e);else if(e instanceof ae)this.addCollection(e);else{if(!(e instanceof Gt))throw new Error(e.getClass().getName());this.addCollection(e)}}),"add"),e.prototype.addCollection=a((function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}}),"addCollection"),e.prototype.locate=a((function(t){return y(this._parentGeom,ne)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new Si(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)}),"locate"),e.prototype.findEdge=a((function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)}),"findEdge"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e.determineBoundary=a((function(t,e){return t.isInBoundary(e)?d.BOUNDARY:d.INTERIOR}),"determineBoundary"),e}(Ke),Oi=a((function(){if(this._li=new X,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ai(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=et.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ai(0,e,r),this._arg[1]=new Ai(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ai(0,i,a),this._arg[1]=new Ai(1,o,a)}}),"GeometryGraphOp");Oi.prototype.getArgGeometry=a((function(t){return this._arg[t].getGeometry()}),"getArgGeometry"),Oi.prototype.setComputationPrecision=a((function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)}),"setComputationPrecision"),Oi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Oi.prototype.getClass=a((function(){return Oi}),"getClass");var Pi=a((function(){}),"GeometryMapper");Pi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Pi.prototype.getClass=a((function(){return Pi}),"getClass"),Pi.map=a((function(){if(arguments[0]instanceof Z&&y(arguments[1],Pi.MapOp)){for(var t=arguments[0],e=arguments[1],n=new ht,r=0;r<t.getNumGeometries();r++){var i=e.map(t.getGeometryN(r));null!==i&&n.add(i)}return t.getFactory().buildGeometry(n)}if(y(arguments[0],st)&&y(arguments[1],Pi.MapOp)){for(var o=arguments[0],a=arguments[1],s=new ht,u=o.iterator();u.hasNext();){var l=u.next(),c=a.map(l);null!==c&&s.add(c)}return s}}),"map"),Pi.MapOp=a((function(){}),"MapOp");var Li=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Pr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Qn,this._resultPolyList=new ht,this._resultLineList=new ht,this._resultPointList=new ht,this._graph=new Ke(new Zn),this._geomFact=e.getFactory()}return a(e,"OverlayOp"),t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=a((function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Be(t.getLabel())).flip();var i=e.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(t)}),"insertUniqueEdge"),e.prototype.getGraph=a((function(){return this._graph}),"getGraph"),e.prototype.cancelDuplicateResultEdges=a((function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}}),"cancelDuplicateResultEdges"),e.prototype.isCoveredByLA=a((function(t){return!(!this.isCovered(t,this._resultLineList)&&!this.isCovered(t,this._resultPolyList))}),"isCoveredByLA"),e.prototype.computeGeometry=a((function(t,n,r,i){var o=new ht;return o.addAll(t),o.addAll(n),o.addAll(r),o.isEmpty()?e.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)}),"computeGeometry"),e.prototype.mergeSymLabels=a((function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().mergeSymLabels()}}),"mergeSymLabels"),e.prototype.isCovered=a((function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(t,r)!==d.EXTERIOR)return!0}return!1}),"isCovered"),e.prototype.replaceCollapsedEdges=a((function(){for(var t=new ht,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)}),"replaceCollapsedEdges"),e.prototype.updateNodeLabelling=a((function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}}),"updateNodeLabelling"),e.prototype.getResultGeometry=a((function(t){return this.computeOverlay(t),this._resultGeom}),"getResultGeometry"),e.prototype.insertUniqueEdges=a((function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}}),"insertUniqueEdges"),e.prototype.computeOverlay=a((function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new ht;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Kr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new Ze(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new $r(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(t);var i=new Qr(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)}),"computeOverlay"),e.prototype.labelIncompleteNode=a((function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)}),"labelIncompleteNode"),e.prototype.copyPoints=a((function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}}),"copyPoints"),e.prototype.findResultAreaEdges=a((function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&e.isResultOfOp(i.getLocation(0,Ae.RIGHT),i.getLocation(1,Ae.RIGHT),t)&&r.setInResult(!0)}}),"findResultAreaEdges"),e.prototype.computeLabelsFromDepths=a((function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),r=e.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)!n.isNull(i)&&n.isArea()&&!r.isNull(i)&&(0===r.getDelta(i)?n.toLine(i):(U.isTrue(!r.isNull(i,Ae.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,Ae.LEFT,r.getLocation(i,Ae.LEFT)),U.isTrue(!r.isNull(i,Ae.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,Ae.RIGHT,r.getLocation(i,Ae.RIGHT))))}}}),"computeLabelsFromDepths"),e.prototype.computeLabelling=a((function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()}),"computeLabelling"),e.prototype.labelIncompleteNodes=a((function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}}),"labelIncompleteNodes"),e.prototype.isCoveredByA=a((function(t){return!!this.isCovered(t,this._resultPolyList)}),"isCoveredByA"),e.prototype.interfaces_=a((function(){return[]}),"interfaces_"),e.prototype.getClass=a((function(){return e}),"getClass"),e}(Oi);Li.overlayOp=function(t,e,n){return new Li(t,e).getResultGeometry(n)},Li.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Li.createEmptyResult(Li.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return Zr.map(t,{interfaces_:function(){return[Pi.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),pi.overlayOp(t,e,Li.INTERSECTION)},Li.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Li.createEmptyResult(Li.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),pi.overlayOp(t,e,Li.SYMDIFFERENCE)},Li.resultDimension=function(t,e,n){var r=e.getDimension(),i=n.getDimension(),o=-1;switch(t){case Li.INTERSECTION:o=Math.min(r,i);break;case Li.UNION:o=Math.max(r,i);break;case Li.DIFFERENCE:o=r;break;case Li.SYMDIFFERENCE:o=Math.max(r,i)}return o},Li.createEmptyResult=function(t,e,n,r){var i=null;switch(Li.resultDimension(t,e,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},Li.difference=function(t,e){return t.isEmpty()?Li.createEmptyResult(Li.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),pi.overlayOp(t,e,Li.DIFFERENCE))},Li.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),r=t.getLocation(1);return Li.isResultOfOp(n,r,e)}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===d.BOUNDARY&&(i=d.INTERIOR),o===d.BOUNDARY&&(o=d.INTERIOR),a){case Li.INTERSECTION:return i===d.INTERIOR&&o===d.INTERIOR;case Li.UNION:return i===d.INTERIOR||o===d.INTERIOR;case Li.DIFFERENCE:return i===d.INTERIOR&&o!==d.INTERIOR;case Li.SYMDIFFERENCE:return i===d.INTERIOR&&o!==d.INTERIOR||i!==d.INTERIOR&&o===d.INTERIOR}return!1}},Li.INTERSECTION=1,Li.UNION=2,Li.DIFFERENCE=3,Li.SYMDIFFERENCE=4;var Ti=a((function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Pr,this._seg=new wn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)}),"FuzzyPointLocator");Ti.prototype.isWithinToleranceOfBoundary=a((function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var r=e._linework.getGeometryN(n).getCoordinateSequence(),i=0;i<r.size()-1;i++){if(r.getCoordinate(i,e._seg.p0),r.getCoordinate(i+1,e._seg.p1),e._seg.distance(t)<=e._boundaryDistanceTolerance)return!0}return!1}),"isWithinToleranceOfBoundary"),Ti.prototype.getLocation=a((function(t){return this.isWithinToleranceOfBoundary(t)?d.BOUNDARY:this._ptLocator.locate(t,this._g)}),"getLocation"),Ti.prototype.extractLinework=a((function(t){var e=new Ri;t.apply(e);var n=e.getLinework(),r=we.toLineStringArray(n);return t.getFactory().createMultiLineString(r)}),"extractLinework"),Ti.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Ti.prototype.getClass=a((function(){return Ti}),"getClass");var Ri=a((function(){this._linework=null,this._linework=new ht}),"PolygonalLineworkExtracter");Ri.prototype.getLinework=a((function(){return this._linework}),"getLinework"),Ri.prototype.filter=a((function(t){if(t instanceof re){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}}),"filter"),Ri.prototype.interfaces_=a((function(){return[Bt]}),"interfaces_"),Ri.prototype.getClass=a((function(){return Ri}),"getClass");var Di=a((function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t}),"OffsetPointGenerator");Di.prototype.extractPoints=a((function(t,e,n){for(var r=t.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],e,n)}),"extractPoints"),Di.prototype.setSidesToGenerate=a((function(t,e){this._doLeft=t,this._doRight=e}),"setSidesToGenerate"),Di.prototype.getPoints=a((function(t){for(var e=new ht,n=Or.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,t,e)}return e}),"getPoints"),Di.prototype.computeOffsetPoints=a((function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=Math.sqrt(i*i+o*o),s=n*i/a,u=n*o/a,l=(e.x+t.x)/2,p=(e.y+t.y)/2;if(this._doLeft){var h=new c(l-u,p+s);r.add(h)}if(this._doRight){var f=new c(l+u,p-s);r.add(f)}}),"computeOffsetPoints"),Di.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Di.prototype.getClass=a((function(){return Di}),"getClass");var Fi=a((function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new ht;var e=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,r],this._locFinder=[new Ti(this._geom[0],this._boundaryDistanceTolerance),new Ti(this._geom[1],this._boundaryDistanceTolerance),new Ti(this._geom[2],this._boundaryDistanceTolerance)]}),"OverlayResultValidator"),ki={TOLERANCE:{configurable:!0}};Fi.prototype.reportResult=a((function(t,e,n){P.out.println("Overlay result invalid - A:"+d.toLocationSymbol(e[0])+" B:"+d.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+d.toLocationSymbol(e[2]))}),"reportResult"),Fi.prototype.isValid=a((function(t){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(t)}),"isValid"),Fi.prototype.checkValid=a((function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var r=t._testCoords.get(n);if(!t.checkValid(e,r))return t._invalidLocation=r,!1}return!0}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),!!Fi.hasLocation(this._location,d.BOUNDARY)||this.isValidResult(i,this._location)}}),"checkValid"),Fi.prototype.addTestPts=a((function(t){var e=new Di(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))}),"addTestPts"),Fi.prototype.isValidResult=a((function(t,e){var n=Li.isResultOfOp(e[0],e[1],t),r=!(n^e[2]===d.INTERIOR);return r||this.reportResult(t,e,n),r}),"isValidResult"),Fi.prototype.getInvalidLocation=a((function(){return this._invalidLocation}),"getInvalidLocation"),Fi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Fi.prototype.getClass=a((function(){return Fi}),"getClass"),Fi.hasLocation=a((function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1}),"hasLocation"),Fi.computeBoundaryDistanceTolerance=a((function(t,e){return Math.min(ni.computeSizeBasedSnapTolerance(t),ni.computeSizeBasedSnapTolerance(e))}),"computeBoundaryDistanceTolerance"),Fi.isValid=a((function(t,e,n,r){return new Fi(t,e,r).isValid(n)}),"isValid"),ki.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Fi,ki);var Bi=a((function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e}),"GeometryCombiner");Bi.prototype.extractElements=a((function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);this._skipEmpty&&r.isEmpty()||e.add(r)}}),"extractElements"),Bi.prototype.combine=a((function(){for(var t=new ht,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)}),"combine"),Bi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),Bi.prototype.getClass=a((function(){return Bi}),"getClass"),Bi.combine=a((function(){if(1===arguments.length){var t=arguments[0],e=new Bi(t);return e.combine()}if(2===arguments.length){var n=arguments[0],r=arguments[1],i=new Bi(Bi.createList(n,r));return i.combine()}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=new Bi(Bi.createList(o,a,s));return u.combine()}}),"combine"),Bi.extractFactory=a((function(t){return t.isEmpty()?null:t.iterator().next().getFactory()}),"extractFactory"),Bi.createList=a((function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new ht;return n.add(t),n.add(e),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new ht;return a.add(r),a.add(i),a.add(o),a}}),"createList");var ji=a((function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new ht)}),"CascadedPolygonUnion"),Gi={STRTREE_NODE_CAPACITY:{configurable:!0}};ji.prototype.reduceToGeometries=a((function(t){for(var e=new ht,n=t.iterator();n.hasNext();){var r=n.next(),i=null;y(r,ct)?i=this.unionTree(r):r instanceof Z&&(i=r),e.add(i)}return e}),"reduceToGeometries"),ji.prototype.extractByEnvelope=a((function(t,e,n){for(var r=new ht,i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getEnvelopeInternal().intersects(t)?r.add(o):n.add(o)}return this._geomFactory.buildGeometry(r)}),"extractByEnvelope"),ji.prototype.unionOptimized=a((function(t,e){var n=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!n.intersects(r))return Bi.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,i)}),"unionOptimized"),ji.prototype.union=a((function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new hn(ji.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=t.itemsTree();return this.unionTree(r)}),"union"),ji.prototype.binaryUnion=a((function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=ji.getGeometry(e,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(ji.getGeometry(e,n),ji.getGeometry(e,n+1));var o=Math.trunc((r+n)/2),a=this.binaryUnion(e,n,o),s=this.binaryUnion(e,o,r);return this.unionSafe(a,s)}}),"binaryUnion"),ji.prototype.repeatedUnion=a((function(t){for(var e=null,n=t.iterator();n.hasNext();){var r=n.next();e=null===e?r.copy():e.union(r)}return e}),"repeatedUnion"),ji.prototype.unionSafe=a((function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)}),"unionSafe"),ji.prototype.unionActual=a((function(t,e){return ji.restrictToPolygons(t.union(e))}),"unionActual"),ji.prototype.unionTree=a((function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)}),"unionTree"),ji.prototype.unionUsingEnvelopeIntersection=a((function(t,e,n){var r=new ht,i=this.extractByEnvelope(n,t,r),o=this.extractByEnvelope(n,e,r),a=this.unionActual(i,o);return r.add(a),Bi.combine(r)}),"unionUsingEnvelopeIntersection"),ji.prototype.bufferUnion=a((function(){if(1===arguments.length){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),r=n.buffer(0);return r}if(2===arguments.length){var i=arguments[0],o=arguments[1],a=i.getFactory(),s=a.createGeometryCollection([i,o]),u=s.buffer(0);return u}}),"bufferUnion"),ji.prototype.interfaces_=a((function(){return[]}),"interfaces_"),ji.prototype.getClass=a((function(){return ji}),"getClass"),ji.restrictToPolygons=a((function(t){if(y(t,ne))return t;var e=Ar.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(we.toPolygonArray(e))}),"restrictToPolygons"),ji.getGeometry=a((function(t,e){return e>=t.size()?null:t.get(e)}),"getGeometry"),ji.union=a((function(t){return new ji(t).union()}),"union"),Gi.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(ji,Gi);var qi=a((function(){}),"UnionOp");qi.prototype.interfaces_=a((function(){return[]}),"interfaces_"),qi.prototype.getClass=a((function(){return qi}),"getClass"),qi.union=a((function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Li.createEmptyResult(Li.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),pi.overlayOp(t,e,Li.UNION)}),"union"),t.GeoJSONReader=Me,t.GeoJSONWriter=Ne,t.OverlayOp=Li,t.UnionOp=qi,t.BufferOp=wr})),NO=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t){function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function n(t){return 1===t.length&&(t=r(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function r(t){return function(n,r){return e(t(n),r)}}a(e,"ascending"),a(n,"bisector"),a(r,"ascendingComparator");var i=n(e),o=i.right,s=i.left;function u(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o}function l(t,e){return[t,e]}function c(t,e,n){var r,i,o,a,s=t.length,u=e.length,c=new Array(s*u);for(null==n&&(n=l),r=o=0;r<s;++r)for(a=t[r],i=0;i<u;++i,++o)c[o]=n(a,e[i]);return c}function p(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function h(t){return null===t?NaN:+t}function f(t,e){var n,r,i=t.length,o=0,a=-1,s=0,u=0;if(null==e)for(;++a<i;)isNaN(n=h(t[a]))||(u+=(r=n-s)*(n-(s+=r/++o)));else for(;++a<i;)isNaN(n=h(e(t[a],a,t)))||(u+=(r=n-s)*(n-(s+=r/++o)));if(o>1)return u/(o-1)}function d(t,e){var n=f(t,e);return n&&Math.sqrt(n)}function g(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}a(u,"pairs"),a(l,"pair"),a(c,"cross"),a(p,"descending"),a(h,"number"),a(f,"variance"),a(d,"deviation"),a(g,"extent");var y=Array.prototype,v=y.slice,m=y.map;function _(t){return function(){return t}}function b(t){return t}function w(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}a(_,"constant"),a(b,"identity"),a(w,"range");var x=Math.sqrt(50),E=Math.sqrt(10),I=Math.sqrt(2);function S(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=C(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function C(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=x?10:o>=E?5:o>=I?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=x?10:o>=E?5:o>=I?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=x?i*=10:o>=E?i*=5:o>=I&&(i*=2),e<t?-i:i}function N(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function A(){var t=b,e=g,n=N;function r(r){var i,a,s=r.length,u=new Array(s);for(i=0;i<s;++i)u[i]=t(r[i],i,r);var l=e(u),c=l[0],p=l[1],h=n(u,c,p);Array.isArray(h)||(h=M(c,p,h),h=w(Math.ceil(c/h)*h,p,h));for(var f=h.length;h[0]<=c;)h.shift(),--f;for(;h[f-1]>p;)h.pop(),--f;var d,g=new Array(f+1);for(i=0;i<=f;++i)(d=g[i]=[]).x0=i>0?h[i-1]:c,d.x1=i<f?h[i]:p;for(i=0;i<s;++i)c<=(a=u[i])&&a<=p&&g[o(h,a,0,f)].push(r[i]);return g}return a(r,"histogram"),r.value=function(e){return arguments.length?(t="function"==typeof e?e:_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?_(v.call(t)):_(t),r):n},r}function O(t,e,n){if(null==n&&(n=h),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function P(t,n,r){return t=m.call(t,h).sort(e),Math.ceil((r-n)/(2*(O(t,.75)-O(t,.25))*Math.pow(t.length,-1/3)))}function L(t,e,n){return Math.ceil((n-e)/(3.5*d(t)*Math.pow(t.length,-1/3)))}function T(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function R(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=h(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=h(e(t[o],o,t)))?--i:a+=n;if(i)return a/i}function D(t,n){var r,i=t.length,o=-1,a=[];if(null==n)for(;++o<i;)isNaN(r=h(t[o]))||a.push(r);else for(;++o<i;)isNaN(r=h(n(t[o],o,t)))||a.push(r);return O(a.sort(e),.5)}function F(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n}function k(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}function B(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function j(t,n){if(r=t.length){var r,i,o=0,a=0,s=t[a];for(null==n&&(n=e);++o<r;)(n(i=t[o],s)<0||0!==n(s,s))&&(s=i,a=o);if(0===n(s,s))return a}}function G(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t}function q(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}function U(t){if(!(i=t.length))return[];for(var e=-1,n=k(t,V),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r}function V(t){return t.length}function z(){return U(arguments)}a(S,"ticks"),a(C,"tickIncrement"),a(M,"tickStep"),a(N,"sturges"),a(A,"histogram"),a(O,"quantile"),a(P,"freedmanDiaconis"),a(L,"scott"),a(T,"max"),a(R,"mean"),a(D,"median"),a(F,"merge"),a(k,"min"),a(B,"permute"),a(j,"scan"),a(G,"shuffle"),a(q,"sum"),a(U,"transpose"),a(V,"length"),a(z,"zip"),t.bisect=o,t.bisectRight=o,t.bisectLeft=s,t.ascending=e,t.bisector=n,t.cross=c,t.descending=p,t.deviation=d,t.extent=g,t.histogram=A,t.thresholdFreedmanDiaconis=P,t.thresholdScott=L,t.thresholdSturges=N,t.max=T,t.mean=R,t.median=D,t.merge=F,t.min=k,t.pairs=u,t.permute=B,t.quantile=O,t.range=w,t.scan=j,t.shuffle=G,t.sum=q,t.ticks=S,t.tickIncrement=C,t.tickStep=M,t.transpose=U,t.variance=f,t.zip=z,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r(n.d3=n.d3||{})})),AO=Oe(((t,e)=>{var n,r;m(),n=t,r=function(t,e){var n=a((function(){return new r}),"adder");function r(){this.reset()}a(r,"Adder"),r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}a(o,"add");var s=1e-6,u=Math.PI,l=u/2,c=u/4,p=2*u,h=180/u,f=u/180,d=Math.abs,g=Math.atan,y=Math.atan2,v=Math.cos,m=Math.ceil,_=Math.exp,b=Math.log,w=Math.pow,x=Math.sin,E=Math.sign||function(t){return t>0?1:t<0?-1:0},I=Math.sqrt,S=Math.tan;function C(t){return t>1?0:t<-1?u:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function N(t){return(t=x(t/2))*t}function A(){}function O(t,e){t&&L.hasOwnProperty(t.type)&&L[t.type](t,e)}a(C,"acos"),a(M,"asin"),a(N,"haversin"),a(A,"noop"),a(O,"streamGeometry");var P={Feature:function(t,e){O(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)O(n[r].geometry,e)}},L={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){T(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)T(n[r],e,0)},Polygon:function(t,e){R(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)R(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)O(n[r],e)}};function T(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function R(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)T(t[n],e,1);e.polygonEnd()}a(T,"streamLine"),a(R,"streamPolygon");var D,F,k,B,j,G=a((function(t,e){t&&P.hasOwnProperty(t.type)?P[t.type](t,e):O(t,e)}),"geoStream"),q=n(),U=n(),V={point:A,lineStart:A,lineEnd:A,polygonStart:function(){q.reset(),V.lineStart=z,V.lineEnd=X},polygonEnd:function(){var t=+q;U.add(t<0?p+t:t),this.lineStart=this.lineEnd=this.point=A},sphere:function(){U.add(p)}};function z(){V.point=Y}function X(){W(D,F)}function Y(t,e){V.point=W,D=t,F=e,k=t*=f,B=v(e=(e*=f)/2+c),j=x(e)}function W(t,e){var n=(t*=f)-k,r=n>=0?1:-1,i=r*n,o=v(e=(e*=f)/2+c),a=x(e),s=j*a,u=B*o+s*v(i),l=s*r*x(i);q.add(y(l,u)),k=t,B=o,j=a}a(z,"areaRingStart"),a(X,"areaRingEnd"),a(Y,"areaPointFirst"),a(W,"areaPoint");var H=a((function(t){return U.reset(),G(t,V),2*U}),"area");function J(t){return[y(t[1],t[0]),M(t[2])]}function K(t){var e=t[0],n=t[1],r=v(n);return[r*v(e),r*x(e),x(n)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function $(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Q(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function tt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function et(t){var e=I(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}a(J,"spherical"),a(K,"cartesian"),a(Z,"cartesianDot"),a($,"cartesianCross"),a(Q,"cartesianAddInPlace"),a(tt,"cartesianScale"),a(et,"cartesianNormalizeInPlace");var nt,rt,it,ot,at,st,ut,lt,ct,pt,ht=n(),ft={point:dt,lineStart:yt,lineEnd:vt,polygonStart:function(){ft.point=mt,ft.lineStart=_t,ft.lineEnd=bt,ht.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),ft.point=dt,ft.lineStart=yt,ft.lineEnd=vt,q<0?(nt=-(it=180),rt=-(ot=90)):ht>s?ot=90:ht<-s&&(rt=-90),pt[0]=nt,pt[1]=it}};function dt(t,e){ct.push(pt=[nt=t,it=t]),e<rt&&(rt=e),e>ot&&(ot=e)}function gt(t,e){var n=K([t*f,e*f]);if(lt){var r=$(lt,n),i=$([r[1],-r[0],0],r);et(i),i=J(i);var o,a=t-at,s=a>0?1:-1,u=i[0]*h*s,l=d(a)>180;l^(s*at<u&&u<s*t)?(o=i[1]*h)>ot&&(ot=o):l^(s*at<(u=(u+360)%360-180)&&u<s*t)?(o=-i[1]*h)<rt&&(rt=o):(e<rt&&(rt=e),e>ot&&(ot=e)),l?t<at?wt(nt,t)>wt(nt,it)&&(it=t):wt(t,it)>wt(nt,it)&&(nt=t):it>=nt?(t<nt&&(nt=t),t>it&&(it=t)):t>at?wt(nt,t)>wt(nt,it)&&(it=t):wt(t,it)>wt(nt,it)&&(nt=t)}else ct.push(pt=[nt=t,it=t]);e<rt&&(rt=e),e>ot&&(ot=e),lt=n,at=t}function yt(){ft.point=gt}function vt(){pt[0]=nt,pt[1]=it,ft.point=dt,lt=null}function mt(t,e){if(lt){var n=t-at;ht.add(d(n)>180?n+(n>0?360:-360):n)}else st=t,ut=e;V.point(t,e),gt(t,e)}function _t(){V.lineStart()}function bt(){mt(st,ut),V.lineEnd(),d(ht)>s&&(nt=-(it=180)),pt[0]=nt,pt[1]=it,lt=null}function wt(t,e){return(e-=t)<0?e+360:e}function xt(t,e){return t[0]-e[0]}function Et(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}a(dt,"boundsPoint"),a(gt,"linePoint"),a(yt,"boundsLineStart"),a(vt,"boundsLineEnd"),a(mt,"boundsRingPoint"),a(_t,"boundsRingStart"),a(bt,"boundsRingEnd"),a(wt,"angle"),a(xt,"rangeCompare"),a(Et,"rangeContains");var It,St,Ct,Mt,Nt,At,Ot,Pt,Lt,Tt,Rt,Dt,Ft,kt,Bt,jt,Gt=a((function(t){var e,n,r,i,o,a,s;if(ot=it=-(nt=rt=1/0),ct=[],G(t,ft),n=ct.length){for(ct.sort(xt),e=1,o=[r=ct[0]];e<n;++e)Et(r,(i=ct[e])[0])||Et(r,i[1])?(wt(r[0],i[1])>wt(r[0],r[1])&&(r[1]=i[1]),wt(i[0],r[1])>wt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=wt(r[1],i[0]))>a&&(a=s,nt=i[0],it=r[1])}return ct=pt=null,nt===1/0||rt===1/0?[[NaN,NaN],[NaN,NaN]]:[[nt,rt],[it,ot]]}),"bounds"),qt={sphere:A,point:Ut,lineStart:zt,lineEnd:Wt,polygonStart:function(){qt.lineStart=Ht,qt.lineEnd=Jt},polygonEnd:function(){qt.lineStart=zt,qt.lineEnd=Wt}};function Ut(t,e){t*=f;var n=v(e*=f);Vt(n*v(t),n*x(t),x(e))}function Vt(t,e,n){++It,Ct+=(t-Ct)/It,Mt+=(e-Mt)/It,Nt+=(n-Nt)/It}function zt(){qt.point=Xt}function Xt(t,e){t*=f;var n=v(e*=f);kt=n*v(t),Bt=n*x(t),jt=x(e),qt.point=Yt,Vt(kt,Bt,jt)}function Yt(t,e){t*=f;var n=v(e*=f),r=n*v(t),i=n*x(t),o=x(e),a=y(I((a=Bt*o-jt*i)*a+(a=jt*r-kt*o)*a+(a=kt*i-Bt*r)*a),kt*r+Bt*i+jt*o);St+=a,At+=a*(kt+(kt=r)),Ot+=a*(Bt+(Bt=i)),Pt+=a*(jt+(jt=o)),Vt(kt,Bt,jt)}function Wt(){qt.point=Ut}function Ht(){qt.point=Kt}function Jt(){Zt(Dt,Ft),qt.point=Ut}function Kt(t,e){Dt=t,Ft=e,t*=f,e*=f,qt.point=Zt;var n=v(e);kt=n*v(t),Bt=n*x(t),jt=x(e),Vt(kt,Bt,jt)}function Zt(t,e){t*=f;var n=v(e*=f),r=n*v(t),i=n*x(t),o=x(e),a=Bt*o-jt*i,s=jt*r-kt*o,u=kt*i-Bt*r,l=I(a*a+s*s+u*u),c=M(l),p=l&&-c/l;Lt+=p*a,Tt+=p*s,Rt+=p*u,St+=c,At+=c*(kt+(kt=r)),Ot+=c*(Bt+(Bt=i)),Pt+=c*(jt+(jt=o)),Vt(kt,Bt,jt)}a(Ut,"centroidPoint"),a(Vt,"centroidPointCartesian"),a(zt,"centroidLineStart"),a(Xt,"centroidLinePointFirst"),a(Yt,"centroidLinePoint"),a(Wt,"centroidLineEnd"),a(Ht,"centroidRingStart"),a(Jt,"centroidRingEnd"),a(Kt,"centroidRingPointFirst"),a(Zt,"centroidRingPoint");var $t=a((function(t){It=St=Ct=Mt=Nt=At=Ot=Pt=Lt=Tt=Rt=0,G(t,qt);var e=Lt,n=Tt,r=Rt,i=e*e+n*n+r*r;return i<1e-12&&(e=At,n=Ot,r=Pt,St<s&&(e=Ct,n=Mt,r=Nt),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[y(n,e)*h,M(r/I(i))*h]}),"centroid"),Qt=a((function(t){return function(){return t}}),"constant"),te=a((function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return a(n,"compose"),t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}),"compose");function ee(t,e){return[t>u?t-p:t<-u?t+p:t,e]}function ne(t,e,n){return(t%=p)?e||n?te(ie(t),oe(e,n)):ie(t):e||n?oe(e,n):ee}function re(t){return function(e,n){return[(e+=t)>u?e-p:e<-u?e+p:e,n]}}function ie(t){var e=re(t);return e.invert=re(-t),e}function oe(t,e){var n=v(t),r=x(t),i=v(e),o=x(e);function s(t,e){var a=v(e),s=v(t)*a,u=x(t)*a,l=x(e),c=l*n+s*r;return[y(u*i-c*o,s*n-l*r),M(c*i+u*o)]}return a(s,"rotation"),s.invert=function(t,e){var a=v(e),s=v(t)*a,u=x(t)*a,l=x(e),c=l*i-u*o;return[y(u*i+l*o,s*n+c*r),M(c*n-s*r)]},s}a(ee,"rotationIdentity"),ee.invert=ee,a(ne,"rotateRadians"),a(re,"forwardRotationLambda"),a(ie,"rotationLambda"),a(oe,"rotationPhiGamma");var ae=a((function(t){function e(e){return(e=t(e[0]*f,e[1]*f))[0]*=h,e[1]*=h,e}return t=ne(t[0]*f,t[1]*f,t.length>2?t[2]*f:0),a(e,"forward"),e.invert=function(e){return(e=t.invert(e[0]*f,e[1]*f))[0]*=h,e[1]*=h,e},e}),"rotation");function se(t,e,n,r,i,o){if(n){var a=v(e),s=x(e),u=r*n;null==i?(i=e+r*p,o=e-u/2):(i=ue(a,i),o=ue(a,o),(r>0?i<o:i>o)&&(i+=r*p));for(var l,c=i;r>0?c>o:c<o;c-=u)l=J([a,-s*v(c),-s*x(c)]),t.point(l[0],l[1])}}function ue(t,e){(e=K(e))[0]-=t,et(e);var n=C(-e[1]);return((-e[2]<0?-n:n)+p-s)%p}a(se,"circleStream"),a(ue,"circleRadius");var le=a((function(){var t,e,n=Qt([0,0]),r=Qt(90),i=Qt(6),o={point:s};function s(n,r){t.push(n=e(n,r)),n[0]*=h,n[1]*=h}function u(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*f,u=i.apply(this,arguments)*f;return t=[],e=ne(-a[0]*f,-a[1]*f,0).invert,se(o,s,u,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a(s,"point"),a(u,"circle"),u.center=function(t){return arguments.length?(n="function"==typeof t?t:Qt([+t[0],+t[1]]),u):n},u.radius=function(t){return arguments.length?(r="function"==typeof t?t:Qt(+t),u):r},u.precision=function(t){return arguments.length?(i="function"==typeof t?t:Qt(+t),u):i},u}),"circle"),ce=a((function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:A,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}),"clipBuffer"),pe=a((function(t,e,n,r,i,o){var a,s=t[0],u=t[1],l=0,c=1,p=e[0]-s,h=e[1]-u;if(a=n-s,p||!(a>0)){if(a/=p,p<0){if(a<l)return;a<c&&(c=a)}else if(p>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,p||!(a<0)){if(a/=p,p<0){if(a>c)return;a>l&&(l=a)}else if(p>0){if(a<l)return;a<c&&(c=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(t[0]=s+l*p,t[1]=u+l*h),c<1&&(e[0]=s+c*p,e[1]=u+c*h),!0}}}}}),"clipLine"),he=a((function(t,e){return d(t[0]-e[0])<s&&d(t[1]-e[1])<s}),"pointEqual");function fe(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}a(fe,"Intersection");var de=a((function(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(he(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}s.push(n=new fe(r,t,null,!0)),u.push(n.o=new fe(r,null,n,!1)),s.push(n=new fe(a,t,null,!1)),u.push(n.o=new fe(a,null,n,!0))}})),s.length){for(u.sort(e),ge(s),ge(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var l,c,p=s[0];;){for(var h=p,f=!0;h.v;)if((h=h.n)===p)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,f=!f}while(!h.v);i.lineEnd()}}}),"clipPolygon");function ge(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}a(ge,"link");var ye=1e9,ve=-ye;function me(t,n,r,i){function o(e,o){return t<=e&&e<=r&&n<=o&&o<=i}function u(e,o,a,s){var u=0,c=0;if(null==e||(u=l(e,a))!==(c=l(o,a))||p(e,o)<0^a>0)do{s.point(0===u||3===u?t:r,u>1?i:n)}while((u=(u+a+4)%4)!==c);else s.point(o[0],o[1])}function l(e,i){return d(e[0]-t)<s?i>0?0:3:d(e[0]-r)<s?i>0?2:1:d(e[1]-n)<s?i>0?1:0:i>0?3:2}function c(t,e){return p(t.x,e.x)}function p(t,e){var n=l(t,1),r=l(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return a(o,"visible"),a(u,"interpolate"),a(l,"corner"),a(c,"compareIntersection"),a(p,"comparePoint"),function(s){var l,p,h,f,d,g,y,v,m,_,b,w=s,x=ce(),E={point:I,lineStart:N,lineEnd:A,polygonStart:C,polygonEnd:M};function I(t,e){o(t,e)&&w.point(t,e)}function S(){for(var e=0,n=0,r=p.length;n<r;++n)for(var o,a,s=p[n],u=1,l=s.length,c=s[0],h=c[0],f=c[1];u<l;++u)o=h,a=f,h=(c=s[u])[0],f=c[1],a<=i?f>i&&(h-o)*(i-a)>(f-a)*(t-o)&&++e:f<=i&&(h-o)*(i-a)<(f-a)*(t-o)&&--e;return e}function C(){w=x,l=[],p=[],b=!0}function M(){var t=S(),n=b&&t,r=(l=e.merge(l)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),r&&de(l,c,t,u,s),s.polygonEnd()),w=s,l=p=h=null}function N(){E.point=O,p&&p.push(h=[]),_=!0,m=!1,y=v=NaN}function A(){l&&(O(f,d),g&&m&&x.rejoin(),l.push(x.result())),E.point=I,m&&w.lineEnd()}function O(e,a){var s=o(e,a);if(p&&h.push([e,a]),_)f=e,d=a,g=s,_=!1,s&&(w.lineStart(),w.point(e,a));else if(s&&m)w.point(e,a);else{var u=[y=Math.max(ve,Math.min(ye,y)),v=Math.max(ve,Math.min(ye,v))],l=[e=Math.max(ve,Math.min(ye,e)),a=Math.max(ve,Math.min(ye,a))];pe(u,l,t,n,r,i)?(m||(w.lineStart(),w.point(u[0],u[1])),w.point(l[0],l[1]),s||w.lineEnd(),b=!1):s&&(w.lineStart(),w.point(e,a),b=!1)}y=e,v=a,m=s}return a(I,"point"),a(S,"polygonInside"),a(C,"polygonStart"),a(M,"polygonEnd"),a(N,"lineStart"),a(A,"lineEnd"),a(O,"linePoint"),E}}a(me,"clipExtent");var _e,be,we,xe=a((function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=me(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}}),"extent"),Ee=n(),Ie=a((function(t,e){var n=e[0],r=e[1],i=[x(n),-v(n),0],o=0,a=0;Ee.reset();for(var l=0,h=t.length;l<h;++l)if(d=(f=t[l]).length)for(var f,d,g=f[d-1],m=g[0],_=g[1]/2+c,b=x(_),w=v(_),E=0;E<d;++E,m=S,b=N,w=A,g=I){var I=f[E],S=I[0],C=I[1]/2+c,N=x(C),A=v(C),O=S-m,P=O>=0?1:-1,L=P*O,T=L>u,R=b*N;if(Ee.add(y(R*P*x(L),w*A+R*v(L))),o+=T?O+P*p:O,T^m>=n^S>=n){var D=$(K(g),K(I));et(D);var F=$(i,D);et(F);var k=(T^O>=0?-1:1)*M(F[2]);(r>k||r===k&&(D[0]||D[1]))&&(a+=T^O>=0?1:-1)}}return(o<-s||o<s&&Ee<-s)^1&a}),"polygonContains"),Se=n(),Ce={sphere:A,point:A,lineStart:Me,lineEnd:A,polygonStart:A,polygonEnd:A};function Me(){Ce.point=Ae,Ce.lineEnd=Ne}function Ne(){Ce.point=Ce.lineEnd=A}function Ae(t,e){_e=t*=f,be=x(e*=f),we=v(e),Ce.point=Oe}function Oe(t,e){t*=f;var n=x(e*=f),r=v(e),i=d(t-_e),o=v(i),a=r*x(i),s=we*n-be*r*o,u=be*n+we*r*o;Se.add(y(I(a*a+s*s),u)),_e=t,be=n,we=r}a(Me,"lengthLineStart"),a(Ne,"lengthLineEnd"),a(Ae,"lengthPointFirst"),a(Oe,"lengthPoint");var Pe=a((function(t){return Se.reset(),G(t,Ce),+Se}),"length"),Le=[null,null],Te={type:"LineString",coordinates:Le},Re=a((function(t,e){return Le[0]=t,Le[1]=e,Pe(Te)}),"distance"),De={Feature:function(t,e){return ke(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ke(n[r].geometry,e))return!0;return!1}},Fe={Sphere:function(){return!0},Point:function(t,e){return Be(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Be(n[r],e))return!0;return!1},LineString:function(t,e){return je(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(je(n[r],e))return!0;return!1},Polygon:function(t,e){return Ge(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ge(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ke(n[r],e))return!0;return!1}};function ke(t,e){return!(!t||!Fe.hasOwnProperty(t.type))&&Fe[t.type](t,e)}function Be(t,e){return 0===Re(t,e)}function je(t,e){var n=Re(t[0],t[1]);return Re(t[0],e)+Re(e,t[1])<=n+s}function Ge(t,e){return!!Ie(t.map(qe),Ue(e))}function qe(t){return(t=t.map(Ue)).pop(),t}function Ue(t){return[t[0]*f,t[1]*f]}a(ke,"containsGeometry"),a(Be,"containsPoint"),a(je,"containsLine"),a(Ge,"containsPolygon"),a(qe,"ringRadians"),a(Ue,"pointRadians");var Ve=a((function(t,e){return(t&&De.hasOwnProperty(t.type)?De[t.type]:ke)(t,e)}),"contains");function ze(t,n,r){var i=e.range(t,n-s,r).concat(n);return function(t){return i.map((function(e){return[t,e]}))}}function Xe(t,n,r){var i=e.range(t,n-s,r).concat(n);return function(t){return i.map((function(e){return[e,t]}))}}function Ye(){var t,n,r,i,o,u,l,c,p,h,f,g,y=10,v=y,_=90,b=360,w=2.5;function x(){return{type:"MultiLineString",coordinates:E()}}function E(){return e.range(m(i/_)*_,r,_).map(f).concat(e.range(m(c/b)*b,l,b).map(g)).concat(e.range(m(n/y)*y,t,y).filter((function(t){return d(t%_)>s})).map(p)).concat(e.range(m(u/v)*v,o,v).filter((function(t){return d(t%b)>s})).map(h))}return a(x,"graticule"),a(E,"lines"),x.lines=function(){return E().map((function(t){return{type:"LineString",coordinates:t}}))},x.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(g(l).slice(1),f(r).reverse().slice(1),g(c).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.extentMajor(t).extentMinor(t):x.extentMinor()},x.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],c=+t[0][1],l=+t[1][1],i>r&&(t=i,i=r,r=t),c>l&&(t=c,c=l,l=t),x.precision(w)):[[i,c],[r,l]]},x.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),u>o&&(e=u,u=o,o=e),x.precision(w)):[[n,u],[t,o]]},x.step=function(t){return arguments.length?x.stepMajor(t).stepMinor(t):x.stepMinor()},x.stepMajor=function(t){return arguments.length?(_=+t[0],b=+t[1],x):[_,b]},x.stepMinor=function(t){return arguments.length?(y=+t[0],v=+t[1],x):[y,v]},x.precision=function(e){return arguments.length?(w=+e,p=ze(u,o,90),h=Xe(n,t,w),f=ze(c,l,90),g=Xe(i,r,w),x):w},x.extentMajor([[-180,-90+s],[180,90-s]]).extentMinor([[-180,-80-s],[180,80+s]])}function We(){return Ye()()}a(ze,"graticuleX"),a(Xe,"graticuleY"),a(Ye,"graticule"),a(We,"graticule10");var He,Je,Ke,Ze,$e=a((function(t,e){var n=t[0]*f,r=t[1]*f,i=e[0]*f,o=e[1]*f,a=v(r),s=x(r),u=v(o),l=x(o),c=a*v(n),p=a*x(n),d=u*v(i),g=u*x(i),m=2*M(I(N(o-r)+a*u*N(i-n))),_=x(m),b=m?function(t){var e=x(t*=m)/_,n=x(m-t)/_,r=n*c+e*d,i=n*p+e*g,o=n*s+e*l;return[y(i,r)*h,y(o,I(r*r+i*i))*h]}:function(){return[n*h,r*h]};return b.distance=m,b}),"interpolate"),Qe=a((function(t){return t}),"identity"),tn=n(),en=n(),nn={point:A,lineStart:A,lineEnd:A,polygonStart:function(){nn.lineStart=rn,nn.lineEnd=sn},polygonEnd:function(){nn.lineStart=nn.lineEnd=nn.point=A,tn.add(d(en)),en.reset()},result:function(){var t=tn/2;return tn.reset(),t}};function rn(){nn.point=on}function on(t,e){nn.point=an,He=Ke=t,Je=Ze=e}function an(t,e){en.add(Ze*t-Ke*e),Ke=t,Ze=e}function sn(){an(He,Je)}a(rn,"areaRingStart$1"),a(on,"areaPointFirst$1"),a(an,"areaPoint$1"),a(sn,"areaRingEnd$1");var un=1/0,ln=un,cn=-un,pn=cn,hn={point:fn,lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A,result:function(){var t=[[un,ln],[cn,pn]];return cn=pn=-(ln=un=1/0),t}};function fn(t,e){t<un&&(un=t),t>cn&&(cn=t),e<ln&&(ln=e),e>pn&&(pn=e)}a(fn,"boundsPoint$1");var dn,gn,yn,vn,mn=0,_n=0,bn=0,wn=0,xn=0,En=0,In=0,Sn=0,Cn=0,Mn={point:Nn,lineStart:An,lineEnd:Ln,polygonStart:function(){Mn.lineStart=Tn,Mn.lineEnd=Rn},polygonEnd:function(){Mn.point=Nn,Mn.lineStart=An,Mn.lineEnd=Ln},result:function(){var t=Cn?[In/Cn,Sn/Cn]:En?[wn/En,xn/En]:bn?[mn/bn,_n/bn]:[NaN,NaN];return mn=_n=bn=wn=xn=En=In=Sn=Cn=0,t}};function Nn(t,e){mn+=t,_n+=e,++bn}function An(){Mn.point=On}function On(t,e){Mn.point=Pn,Nn(yn=t,vn=e)}function Pn(t,e){var n=t-yn,r=e-vn,i=I(n*n+r*r);wn+=i*(yn+t)/2,xn+=i*(vn+e)/2,En+=i,Nn(yn=t,vn=e)}function Ln(){Mn.point=Nn}function Tn(){Mn.point=Dn}function Rn(){Fn(dn,gn)}function Dn(t,e){Mn.point=Fn,Nn(dn=yn=t,gn=vn=e)}function Fn(t,e){var n=t-yn,r=e-vn,i=I(n*n+r*r);wn+=i*(yn+t)/2,xn+=i*(vn+e)/2,En+=i,In+=(i=vn*t-yn*e)*(yn+t),Sn+=i*(vn+e),Cn+=3*i,Nn(yn=t,vn=e)}function kn(t){this._context=t}a(Nn,"centroidPoint$1"),a(An,"centroidLineStart$1"),a(On,"centroidPointFirstLine"),a(Pn,"centroidPointLine"),a(Ln,"centroidLineEnd$1"),a(Tn,"centroidRingStart$1"),a(Rn,"centroidRingEnd$1"),a(Dn,"centroidPointFirstRing"),a(Fn,"centroidPointRing"),a(kn,"PathContext"),kn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,p)}},result:A};var Bn,jn,Gn,qn,Un,Vn=n(),zn={point:A,lineStart:function(){zn.point=Xn},lineEnd:function(){Bn&&Yn(jn,Gn),zn.point=A},polygonStart:function(){Bn=!0},polygonEnd:function(){Bn=null},result:function(){var t=+Vn;return Vn.reset(),t}};function Xn(t,e){zn.point=Yn,jn=qn=t,Gn=Un=e}function Yn(t,e){qn-=t,Un-=e,Vn.add(I(qn*qn+Un*Un)),qn=t,Un=e}function Wn(){this._string=[]}function Hn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}a(Xn,"lengthPointFirst$1"),a(Yn,"lengthPoint$1"),a(Wn,"PathString"),Wn.prototype={_radius:4.5,_circle:Hn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Hn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},a(Hn,"circle$1");var Jn=a((function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),G(t,n(r))),r.result()}return a(o,"path"),o.area=function(t){return G(t,n(nn)),nn.result()},o.measure=function(t){return G(t,n(zn)),zn.result()},o.bounds=function(t){return G(t,n(hn)),hn.result()},o.centroid=function(t){return G(t,n(Mn)),Mn.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Qe):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Wn):new kn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}),"index"),Kn=a((function(t,n,r,i){return function(o,s){var u,l,c,p=n(s),h=o.invert(i[0],i[1]),f=ce(),d=n(f),g=!1,y={point:v,lineStart:_,lineEnd:b,polygonStart:function(){y.point=w,y.lineStart=x,y.lineEnd=E,l=[],u=[]},polygonEnd:function(){y.point=v,y.lineStart=_,y.lineEnd=b,l=e.merge(l);var t=Ie(u,h);l.length?(g||(s.polygonStart(),g=!0),de(l,$n,t,r,s)):t&&(g||(s.polygonStart(),g=!0),s.lineStart(),r(null,null,1,s),s.lineEnd()),g&&(s.polygonEnd(),g=!1),l=u=null},sphere:function(){s.polygonStart(),s.lineStart(),r(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function v(e,n){var r=o(e,n);t(e=r[0],n=r[1])&&s.point(e,n)}function m(t,e){var n=o(t,e);p.point(n[0],n[1])}function _(){y.point=m,p.lineStart()}function b(){y.point=v,p.lineEnd()}function w(t,e){c.push([t,e]);var n=o(t,e);d.point(n[0],n[1])}function x(){d.lineStart(),c=[]}function E(){w(c[0][0],c[0][1]),d.lineEnd();var t,e,n,r,i=d.clean(),o=f.result(),a=o.length;if(c.pop(),u.push(c),c=null,a){if(1&i){if((e=(n=o[0]).length-1)>0){for(g||(s.polygonStart(),g=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}return}a>1&&2&i&&o.push(o.pop().concat(o.shift())),l.push(o.filter(Zn))}}return a(v,"point"),a(m,"pointLine"),a(_,"lineStart"),a(b,"lineEnd"),a(w,"pointRing"),a(x,"ringStart"),a(E,"ringEnd"),y}}),"clip");function Zn(t){return t.length>1}function $n(t,e){return((t=t.x)[0]<0?t[1]-l-s:l-t[1])-((e=e.x)[0]<0?e[1]-l-s:l-e[1])}a(Zn,"validSegment"),a($n,"compareIntersection");var Qn=Kn((function(){return!0}),tr,nr,[-u,-l]);function tr(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var c=o>0?u:-u,p=d(o-n);d(p-u)<s?(t.point(n,r=(r+a)/2>0?l:-l),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(o,r),e=0):i!==c&&p>=u&&(d(n-i)<s&&(n-=i*s),d(o-c)<s&&(o-=c*s),r=er(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),e=0),t.point(n=o,r=a),i=c},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}function er(t,e,n,r){var i,o,a=x(t-n);return d(a)>s?g((x(e)*(o=v(r))*x(n)-x(r)*(i=v(e))*x(t))/(i*o*a)):(e+r)/2}function nr(t,e,n,r){var i;if(null==t)i=n*l,r.point(-u,i),r.point(0,i),r.point(u,i),r.point(u,0),r.point(u,-i),r.point(0,-i),r.point(-u,-i),r.point(-u,0),r.point(-u,i);else if(d(t[0]-e[0])>s){var o=t[0]<e[0]?u:-u;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}a(tr,"clipAntimeridianLine"),a(er,"clipAntimeridianIntersect"),a(nr,"clipAntimeridianInterpolate");var rr=a((function(t,e){var n=v(t),r=n>0,i=d(n)>s;function o(n,r,i,o){se(o,t,e,i,n,r)}function l(t,e){return v(t)*v(e)>n}function c(t){var e,n,o,a,c;return{lineStart:function(){a=o=!1,c=1},point:function(f,d){var g,y=[f,d],v=l(f,d),m=r?v?0:h(f,d):v?h(f+(f<0?u:-u),d):0;if(!e&&(a=o=v)&&t.lineStart(),v!==o&&(!(g=p(e,y))||he(e,g)||he(y,g))&&(y[0]+=s,y[1]+=s,v=l(y[0],y[1])),v!==o)c=0,v?(t.lineStart(),g=p(y,e),t.point(g[0],g[1])):(g=p(e,y),t.point(g[0],g[1]),t.lineEnd()),e=g;else if(i&&e&&r^v){var _;!(m&n)&&(_=p(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}v&&(!e||!he(e,y))&&t.point(y[0],y[1]),e=y,o=v,n=m},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return c|(a&&o)<<1}}}function p(t,e,r){var i=[1,0,0],o=$(K(t),K(e)),a=Z(o,o),l=o[0],c=a-l*l;if(!c)return!r&&t;var p=n*a/c,h=-n*l/c,f=$(i,o),g=tt(i,p);Q(g,tt(o,h));var y=f,v=Z(g,y),m=Z(y,y),_=v*v-m*(Z(g,g)-1);if(!(_<0)){var b=I(_),w=tt(y,(-v-b)/m);if(Q(w,g),w=J(w),!r)return w;var x,E=t[0],S=e[0],C=t[1],M=e[1];S<E&&(x=E,E=S,S=x);var N=S-E,A=d(N-u)<s;if(!A&&M<C&&(x=C,C=M,M=x),A||N<s?A?C+M>0^w[1]<(d(w[0]-E)<s?C:M):C<=w[1]&&w[1]<=M:N>u^(E<=w[0]&&w[0]<=S)){var O=tt(y,(-v+b)/m);return Q(O,g),[w,J(O)]}}}function h(e,n){var i=r?t:u-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return a(o,"interpolate"),a(l,"visible"),a(c,"clipLine"),a(p,"intersect"),a(h,"code"),Kn(l,c,o,r?[0,-t]:[-u,t-u])}),"clipCircle"),ir=a((function(t){return{stream:or(t)}}),"transform");function or(t){return function(e){var n=new ar;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ar(){}function sr(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),G(n,t.stream(hn));var a=hn.result(),s=Math.min(r/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),u=+e[0][0]+(r-s*(a[1][0]+a[0][0]))/2,l=+e[0][1]+(i-s*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*s).translate([u,l])}function ur(t,e,n){return sr(t,[[0,0],e],n)}a(or,"transformer"),a(ar,"TransformStream"),ar.prototype={constructor:ar,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},a(sr,"fitExtent"),a(ur,"fitSize");var lr=v(30*f),cr=a((function(t,e){return+e?hr(t,e):pr(t)}),"resample");function pr(t){return or({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function hr(t,e){function n(r,i,o,a,u,l,c,p,h,f,g,v,m,_){var b=c-r,w=p-i,x=b*b+w*w;if(x>4*e&&m--){var E=a+f,S=u+g,C=l+v,N=I(E*E+S*S+C*C),A=M(C/=N),O=d(d(C)-1)<s||d(o-h)<s?(o+h)/2:y(S,E),P=t(O,A),L=P[0],T=P[1],R=L-r,D=T-i,F=w*R-b*D;(F*F/x>e||d((b*R+w*D)/x-.5)>.3||a*f+u*g+l*v<lr)&&(n(r,i,o,a,u,l,L,T,O,E/=N,S/=N,C,m,_),_.point(L,T),n(L,T,O,E,S,C,c,p,h,f,g,v,m,_))}}return a(n,"resampleLineTo"),function(e){var r,i,o,s,u,l,c,p,h,f,d,g,y={point:v,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=w},polygonEnd:function(){e.polygonEnd(),y.lineStart=m}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){p=NaN,y.point=_,e.lineStart()}function _(r,i){var o=K([r,i]),a=t(r,i);n(p,h,c,f,d,g,p=a[0],h=a[1],c=r,f=o[0],d=o[1],g=o[2],16,e),e.point(p,h)}function b(){y.point=v,e.lineEnd()}function w(){m(),y.point=x,y.lineEnd=E}function x(t,e){_(r=t,e),i=p,o=h,s=f,u=d,l=g,y.point=_}function E(){n(p,h,c,f,d,g,i,o,r,s,u,l,16,e),y.lineEnd=b,b()}return a(v,"point"),a(m,"lineStart"),a(_,"linePoint"),a(b,"lineEnd"),a(w,"ringStart"),a(x,"ringPoint"),a(E,"ringEnd"),y}}a(pr,"resampleNone"),a(hr,"resample$1");var fr=or({point:function(t,e){this.stream.point(t*f,e*f)}});function dr(t){return gr((function(){return t}))()}function gr(t){var e,n,r,i,o,s,u,l,c,p,d=150,g=480,y=250,v=0,m=0,_=0,b=0,w=0,x=null,E=Qn,S=null,C=Qe,M=.5,N=cr(P,M);function A(t){return[(t=o(t[0]*f,t[1]*f))[0]*d+n,r-t[1]*d]}function O(t){return(t=o.invert((t[0]-n)/d,(r-t[1])/d))&&[t[0]*h,t[1]*h]}function P(t,i){return[(t=e(t,i))[0]*d+n,r-t[1]*d]}function L(){o=te(i=ne(_,b,w),e);var t=e(v,m);return n=g-t[0]*d,r=y+t[1]*d,T()}function T(){return c=p=null,A}return a(A,"projection"),a(O,"invert"),a(P,"projectTransform"),A.stream=function(t){return c&&p===t?c:c=fr(E(i,N(C(p=t))))},A.clipAngle=function(t){return arguments.length?(E=+t?rr(x=t*f,6*f):(x=null,Qn),T()):x*h},A.clipExtent=function(t){return arguments.length?(C=null==t?(S=s=u=l=null,Qe):me(S=+t[0][0],s=+t[0][1],u=+t[1][0],l=+t[1][1]),T()):null==S?null:[[S,s],[u,l]]},A.scale=function(t){return arguments.length?(d=+t,L()):d},A.translate=function(t){return arguments.length?(g=+t[0],y=+t[1],L()):[g,y]},A.center=function(t){return arguments.length?(v=t[0]%360*f,m=t[1]%360*f,L()):[v*h,m*h]},A.rotate=function(t){return arguments.length?(_=t[0]%360*f,b=t[1]%360*f,w=t.length>2?t[2]%360*f:0,L()):[_*h,b*h,w*h]},A.precision=function(t){return arguments.length?(N=cr(P,M=t*t),T()):I(M)},A.fitExtent=function(t,e){return sr(A,t,e)},A.fitSize=function(t,e){return ur(A,t,e)},a(L,"recenter"),a(T,"reset"),function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,L()}}function yr(t){var e=0,n=u/3,r=gr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*f,n=t[1]*f):[e*h,n*h]},i}function vr(t){var e=v(t);function n(t,n){return[t*e,x(n)/e]}return a(n,"forward"),n.invert=function(t,n){return[t/e,M(n*e)]},n}function mr(t,e){var n=x(t),r=(n+x(e))/2;if(d(r)<s)return vr(t);var i=1+n*(2*r-n),o=I(i)/r;function u(t,e){var n=I(i-2*r*x(e))/r;return[n*x(t*=r),o-n*v(t)]}return a(u,"project"),u.invert=function(t,e){var n=o-e;return[y(t,d(n))/r*E(n),M((i-(t*t+n*n)*r*r)/(2*r))]},u}a(dr,"projection"),a(gr,"projectionMutator"),a(yr,"conicProjection"),a(vr,"cylindricalEqualAreaRaw"),a(mr,"conicEqualAreaRaw");var _r=a((function(){return yr(mr).scale(155.424).center([0,33.6442])}),"conicEqualArea"),br=a((function(){return _r().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}),"albers");function wr(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}a(wr,"multiplex");var xr=a((function(){var t,e,n,r,i,o,u=br(),l=_r().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=_r().rotate([157,0]).center([-3,19.9]).parallels([8,18]),p={point:function(t,e){o=[t,e]}};function h(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,h}return a(h,"albersUsa"),h.invert=function(t){var e=u.scale(),n=u.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:u).invert(t)},h.stream=function(n){return t&&e===n?t:t=wr([u.stream(e=n),l.stream(n),c.stream(n)])},h.precision=function(t){return arguments.length?(u.precision(t),l.precision(t),c.precision(t),f()):u.precision()},h.scale=function(t){return arguments.length?(u.scale(t),l.scale(.35*t),c.scale(t),h.translate(u.translate())):u.scale()},h.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),o=+t[0],a=+t[1];return n=u.translate(t).clipExtent([[o-.455*e,a-.238*e],[o+.455*e,a+.238*e]]).stream(p),r=l.translate([o-.307*e,a+.201*e]).clipExtent([[o-.425*e+s,a+.12*e+s],[o-.214*e-s,a+.234*e-s]]).stream(p),i=c.translate([o-.205*e,a+.212*e]).clipExtent([[o-.214*e+s,a+.166*e+s],[o-.115*e-s,a+.234*e-s]]).stream(p),f()},h.fitExtent=function(t,e){return sr(h,t,e)},h.fitSize=function(t,e){return ur(h,t,e)},a(f,"reset"),h.scale(1070)}),"albersUsa");function Er(t){return function(e,n){var r=v(e),i=v(n),o=t(r*i);return[o*i*x(e),o*x(n)]}}function Ir(t){return function(e,n){var r=I(e*e+n*n),i=t(r),o=x(i),a=v(i);return[y(e*o,r*a),M(r&&n*o/r)]}}a(Er,"azimuthalRaw"),a(Ir,"azimuthalInvert");var Sr=Er((function(t){return I(2/(1+t))}));Sr.invert=Ir((function(t){return 2*M(t/2)}));var Cr=a((function(){return dr(Sr).scale(124.75).clipAngle(179.999)}),"azimuthalEqualArea"),Mr=Er((function(t){return(t=C(t))&&t/x(t)}));Mr.invert=Ir((function(t){return t}));var Nr=a((function(){return dr(Mr).scale(79.4188).clipAngle(179.999)}),"azimuthalEquidistant");function Ar(t,e){return[t,b(S((l+e)/2))]}a(Ar,"mercatorRaw"),Ar.invert=function(t,e){return[t,2*g(_(e))-l]};var Or=a((function(){return Pr(Ar).scale(961/p)}),"mercator");function Pr(t){var e,n,r,i=dr(t),o=i.center,s=i.scale,l=i.translate,c=i.clipExtent,p=null;function h(){var o=u*s(),a=i(ae(i.rotate()).invert([0,0]));return c(null==p?[[a[0]-o,a[1]-o],[a[0]+o,a[1]+o]]:t===Ar?[[Math.max(a[0]-o,p),e],[Math.min(a[0]+o,n),r]]:[[p,Math.max(a[1]-o,e)],[n,Math.min(a[1]+o,r)]])}return i.scale=function(t){return arguments.length?(s(t),h()):s()},i.translate=function(t){return arguments.length?(l(t),h()):l()},i.center=function(t){return arguments.length?(o(t),h()):o()},i.clipExtent=function(t){return arguments.length?(null==t?p=e=n=r=null:(p=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==p?null:[[p,e],[n,r]]},a(h,"reclip"),h()}function Lr(t){return S((l+t)/2)}function Tr(t,e){var n=v(t),r=t===e?x(t):b(n/v(e))/b(Lr(e)/Lr(t)),i=n*w(Lr(t),r)/r;if(!r)return Ar;function o(t,e){i>0?e<-l+s&&(e=-l+s):e>l-s&&(e=l-s);var n=i/w(Lr(e),r);return[n*x(r*t),i-n*v(r*t)]}return a(o,"project"),o.invert=function(t,e){var n=i-e,o=E(r)*I(t*t+n*n);return[y(t,d(n))/r*E(n),2*g(w(i/o,1/r))-l]},o}a(Pr,"mercatorProjection"),a(Lr,"tany"),a(Tr,"conicConformalRaw");var Rr=a((function(){return yr(Tr).scale(109.5).parallels([30,30])}),"conicConformal");function Dr(t,e){return[t,e]}a(Dr,"equirectangularRaw"),Dr.invert=Dr;var Fr=a((function(){return dr(Dr).scale(152.63)}),"equirectangular");function kr(t,e){var n=v(t),r=t===e?x(t):(n-v(e))/(e-t),i=n/r+t;if(d(r)<s)return Dr;function o(t,e){var n=i-e,o=r*t;return[n*x(o),i-n*v(o)]}return a(o,"project"),o.invert=function(t,e){var n=i-e;return[y(t,d(n))/r*E(n),i-E(r)*I(t*t+n*n)]},o}a(kr,"conicEquidistantRaw");var Br=a((function(){return yr(kr).scale(131.154).center([0,13.9389])}),"conicEquidistant");function jr(t,e){var n=v(e),r=v(t)*n;return[n*x(t)/r,x(e)/r]}a(jr,"gnomonicRaw"),jr.invert=Ir(g);var Gr=a((function(){return dr(jr).scale(144.049).clipAngle(60)}),"gnomonic");function qr(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?Qe:or({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}a(qr,"scaleTranslate");var Ur=a((function(){var t,e,n,r,i,o,s=1,u=0,l=0,c=1,p=1,h=Qe,f=null,d=Qe;function g(){return r=i=null,o}return a(g,"reset"),o={stream:function(t){return r&&i===t?r:r=h(d(i=t))},clipExtent:function(r){return arguments.length?(d=null==r?(f=t=e=n=null,Qe):me(f=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),g()):null==f?null:[[f,t],[e,n]]},scale:function(t){return arguments.length?(h=qr((s=+t)*c,s*p,u,l),g()):s},translate:function(t){return arguments.length?(h=qr(s*c,s*p,u=+t[0],l=+t[1]),g()):[u,l]},reflectX:function(t){return arguments.length?(h=qr(s*(c=t?-1:1),s*p,u,l),g()):c<0},reflectY:function(t){return arguments.length?(h=qr(s*c,s*(p=t?-1:1),u,l),g()):p<0},fitExtent:function(t,e){return sr(o,t,e)},fitSize:function(t,e){return ur(o,t,e)}}}),"identity$1");function Vr(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}a(Vr,"naturalEarth1Raw"),Vr.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(d(n)>s&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var zr=a((function(){return dr(Vr).scale(175.295)}),"naturalEarth1");function Xr(t,e){return[v(e)*x(t),x(e)]}a(Xr,"orthographicRaw"),Xr.invert=Ir(M);var Yr=a((function(){return dr(Xr).scale(249.5).clipAngle(90+s)}),"orthographic");function Wr(t,e){var n=v(e),r=1+v(t)*n;return[n*x(t)/r,x(e)/r]}a(Wr,"stereographicRaw"),Wr.invert=Ir((function(t){return 2*g(t)}));var Hr=a((function(){return dr(Wr).scale(250).clipAngle(142)}),"stereographic");function Jr(t,e){return[b(S((l+e)/2)),-t]}a(Jr,"transverseMercatorRaw"),Jr.invert=function(t,e){return[-e,2*g(_(t))-l]};var Kr=a((function(){var t=Pr(Jr),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}),"transverseMercator");t.geoArea=H,t.geoBounds=Gt,t.geoCentroid=$t,t.geoCircle=le,t.geoClipExtent=xe,t.geoContains=Ve,t.geoDistance=Re,t.geoGraticule=Ye,t.geoGraticule10=We,t.geoInterpolate=$e,t.geoLength=Pe,t.geoPath=Jn,t.geoAlbers=br,t.geoAlbersUsa=xr,t.geoAzimuthalEqualArea=Cr,t.geoAzimuthalEqualAreaRaw=Sr,t.geoAzimuthalEquidistant=Nr,t.geoAzimuthalEquidistantRaw=Mr,t.geoConicConformal=Rr,t.geoConicConformalRaw=Tr,t.geoConicEqualArea=_r,t.geoConicEqualAreaRaw=mr,t.geoConicEquidistant=Br,t.geoConicEquidistantRaw=kr,t.geoEquirectangular=Fr,t.geoEquirectangularRaw=Dr,t.geoGnomonic=Gr,t.geoGnomonicRaw=jr,t.geoIdentity=Ur,t.geoProjection=dr,t.geoProjectionMutator=gr,t.geoMercator=Or,t.geoMercatorRaw=Ar,t.geoNaturalEarth1=zr,t.geoNaturalEarth1Raw=Vr,t.geoOrthographic=Yr,t.geoOrthographicRaw=Xr,t.geoStereographic=Hr,t.geoStereographicRaw=Wr,t.geoTransverseMercator=Kr,t.geoTransverseMercatorRaw=Jr,t.geoRotation=ae,t.geoStream=G,t.geoTransform=ir,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&typeof e<"u"?r(t,NO()):"function"==typeof define&&define.amd?define(["exports","d3-array"],r):r(n.d3=n.d3||{},n.d3)})),QO=Oe(((t,e)=>{m(),e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>"%".concat(t.charCodeAt(0).toString(16).toUpperCase())))})),nN=Oe(((t,e)=>{m();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],o(n),o(r))}function s(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(r)||[],n=1;n<e.length;n++)e=(t=o(e,n).join("")).match(r)||[];return t}}function u(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=i.exec(t)}e["%C2"]="�";for(var o=Object.keys(e),a=0;a<o.length;a++){var u=o[a];t=t.replace(new RegExp(u,"g"),e[u])}return t}a(o,"decodeComponents"),a(s,"decode"),a(u,"customDecodeURIComponent"),e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return u(t)}}})),aN=Oe(((t,e)=>{m(),e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];let n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}})),sN=Oe(((t,e)=>{m(),e.exports=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),o=0;o<r.length;o++){var a=r[o],s=t[a];(i?-1!==e.indexOf(a):e(a,s,t))&&(n[a]=s)}return n}})),gN=Oe((t=>{m();var e=QO(),n=nN(),r=aN(),i=sN(),o=a((t=>null==t),"isNullOrUndefined"),s=Symbol("encodeFragmentIdentifier");function u(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{let i=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[p(e,t),"[",i,"]"].join("")]:[...n,[p(e,t),"[",p(i,t),"]=",p(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[p(e,t),"[]"].join("")]:[...n,[p(e,t),"[]=",p(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[p(n,t),e,p(i,t)].join("")]:[[r,p(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,p(e,t)]:[...n,[p(e,t),"=",p(r,t)].join("")]}}function l(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{let i="string"==typeof n&&n.includes(t.arrayFormatSeparator),o="string"==typeof n&&!i&&h(n,t).includes(t.arrayFormatSeparator);n=o?h(n,t):n;let a=i||o?n.split(t.arrayFormatSeparator).map((e=>h(e,t))):null===n?n:h(n,t);r[e]=a};case"bracket-separator":return(e,n,r)=>{let i=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!i)return void(r[e]=n&&h(n,t));let o=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>h(e,t)));void 0!==r[e]?r[e]=[].concat(r[e],o):r[e]=o};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}function c(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function p(t,n){return n.encode?n.strict?e(t):encodeURIComponent(t):t}function h(t,e){return e.decode?n(t):t}function f(t){return Array.isArray(t)?t.sort():"object"==typeof t?f(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function d(t){let e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function g(t){let e="",n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}function y(t){let e=(t=d(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function v(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):e.parseBooleans&&null!==t&&("true"===t.toLowerCase()||"false"===t.toLowerCase())&&(t="true"===t.toLowerCase()),t}function _(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);let n=l(e),i=Object.create(null);if("string"!=typeof t||!(t=t.trim().replace(/^[?#&]/,"")))return i;for(let o of t.split("&")){if(""===o)continue;let[t,a]=r(e.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:h(a,e),n(h(t,e),a,i)}for(let t of Object.keys(i)){let n=i[t];if("object"==typeof n&&null!==n)for(let t of Object.keys(n))n[t]=v(n[t],e);else i[t]=v(n,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce(((t,e)=>{let n=i[e];return n&&"object"==typeof n&&!Array.isArray(n)?t[e]=f(n):t[e]=n,t}),Object.create(null))}a(u,"encoderForArrayFormat"),a(l,"parserForArrayFormat"),a(c,"validateArrayFormatSeparator"),a(p,"encode"),a(h,"decode"),a(f,"keysSorter"),a(d,"removeHash"),a(g,"getHash"),a(y,"extract"),a(v,"parseValue"),a(_,"parse"),t.extract=y,t.parse=_,t.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);let n=a((n=>e.skipNull&&o(t[n])||e.skipEmptyString&&""===t[n]),"shouldFilter"),r=u(e),i={};for(let e of Object.keys(t))n(e)||(i[e]=t[e]);let s=Object.keys(i);return!1!==e.sort&&s.sort(e.sort),s.map((n=>{let i=t[n];return void 0===i?"":null===i?p(n,e):Array.isArray(i)?0===i.length&&"bracket-separator"===e.arrayFormat?p(n,e)+"[]":i.reduce(r(n),[]).join("&"):p(n,e)+"="+p(i,e)})).filter((t=>t.length>0)).join("&")},t.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[n,i]=r(t,"#");return Object.assign({url:n.split("?")[0]||"",query:_(y(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,e)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);let r=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query),u=t.stringify(a,n);u&&(u="?".concat(u));let l=g(e.url);return e.fragmentIdentifier&&(l="#".concat(n[s]?p(e.fragmentIdentifier,n):e.fragmentIdentifier)),"".concat(r).concat(u).concat(l)},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);let{url:o,query:a,fragmentIdentifier:u}=t.parseUrl(e,r);return t.stringifyUrl({url:o,query:i(a,n),fragmentIdentifier:u},r)},t.exclude=(e,n,r)=>{let i=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return t.pick(e,i,r)}})),EN=Oe(((t,e)=>{var n,r;m(),n=t,r=function(){var t=a((function(){return t=Object.assign||a((function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}),"__assign"),t.apply(this,arguments)}),"__assign");function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}a(e,"__values"),a(n,"__read");var r,i="KEYS",o="VALUES",s="",u=function(){function t(t,e){var n=t._tree,r=Array.from(n.keys());this.set=t,this._type=e,this._path=r.length>0?[{node:n,keys:r}]:[]}return a(t,"TreeIterator"),t.prototype.next=function(){var t=this.dive();return this.backtrack(),t},t.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var t=l(this._path),e=t.node,n=t.keys;if(l(n)===s)return{done:!1,value:this.result()};var r=e.get(l(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},t.prototype.backtrack=function(){if(0!==this._path.length){var t=l(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}},t.prototype.key=function(){return this.set._prefix+this._path.map((function(t){var e=t.keys;return l(e)})).filter((function(t){return t!==s})).join("")},t.prototype.value=function(){return l(this._path).node.get(s)},t.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},t.prototype[Symbol.iterator]=function(){return this},t}(),l=a((function(t){return t[t.length-1]}),"last$1"),c=a((function(t,e,n){var r=new Map;if(void 0===e)return r;for(var i=e.length+1,o=i+n,a=new Uint8Array(o*i).fill(n+1),s=0;s<i;++s)a[s]=s;for(var u=1;u<o;++u)a[u*i]=u;return p(t,e,n,r,a,1,i,""),r}),"fuzzySearch"),p=a((function(t,n,r,i,o,a,u,l){var c,h,f=a*u;try{t:for(var d=e(t.keys()),g=d.next();!g.done;g=d.next()){var y=g.value;if(y===s){var v=o[f-1];v<=r&&i.set(l,[t.get(y),v])}else{for(var m=a,_=0;_<y.length;++_,++m){for(var b=y[_],w=u*m,x=w-u,E=o[w],I=Math.max(0,m-r-1),S=Math.min(u-1,m+r),C=I;C<S;++C){var M=b!==n[C],N=o[x+C]+ +M,A=o[x+C+1]+1,O=o[w+C]+1,P=o[w+C+1]=Math.min(N,A,O);P<E&&(E=P)}if(E>r)continue t}p(t.get(y),n,r,i,o,m,u,l+y)}}}catch(t){c={error:t}}finally{try{g&&!g.done&&(h=d.return)&&h.call(d)}finally{if(c)throw c.error}}}),"recurse"),h=function(){function t(t,e){void 0===t&&(t=new Map),void 0===e&&(e=""),this._size=void 0,this._tree=t,this._prefix=e}return a(t,"SearchableMap"),t.prototype.atPrefix=function(r){var i,o;if(!r.startsWith(this._prefix))throw new Error("Mismatched prefix");var a=n(f(this._tree,r.slice(this._prefix.length)),2),u=a[0],l=a[1];if(void 0===u){var c=n(_(l),2),p=c[0],h=c[1];try{for(var d=e(p.keys()),g=d.next();!g.done;g=d.next()){var y=g.value;if(y!==s&&y.startsWith(h)){var v=new Map;return v.set(y.slice(h.length),p.get(y)),new t(v,r)}}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}return new t(u,r)},t.prototype.clear=function(){this._size=void 0,this._tree.clear()},t.prototype.delete=function(t){return this._size=void 0,y(this._tree,t)},t.prototype.entries=function(){return new u(this,"ENTRIES")},t.prototype.forEach=function(t){var r,i;try{for(var o=e(this),a=o.next();!a.done;a=o.next()){var s=n(a.value,2);t(s[0],s[1],this)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.fuzzyGet=function(t,e){return c(this._tree,t,e)},t.prototype.get=function(t){var e=d(this._tree,t);return void 0!==e?e.get(s):void 0},t.prototype.has=function(t){var e=d(this._tree,t);return void 0!==e&&e.has(s)},t.prototype.keys=function(){return new u(this,i)},t.prototype.set=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");return this._size=void 0,g(this._tree,t).set(s,e),this},Object.defineProperty(t.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var t=this.entries();!t.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=g(this._tree,t);return n.set(s,e(n.get(s))),this},t.prototype.fetch=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=g(this._tree,t),r=n.get(s);return void 0===r&&n.set(s,r=e()),r},t.prototype.values=function(){return new u(this,o)},t.prototype[Symbol.iterator]=function(){return this.entries()},t.from=function(r){var i,o,a=new t;try{for(var s=e(r),u=s.next();!u.done;u=s.next()){var l=n(u.value,2),c=l[0],p=l[1];a.set(c,p)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},t.fromObject=function(e){return t.from(Object.entries(e))},t}(),f=a((function(t,n,r){var i,o;if(void 0===r&&(r=[]),0===n.length||null==t)return[t,r];try{for(var a=e(t.keys()),u=a.next();!u.done;u=a.next()){var l=u.value;if(l!==s&&n.startsWith(l))return r.push([t,l]),f(t.get(l),n.slice(l.length),r)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return r.push([t,n]),f(void 0,"",r)}),"trackDown"),d=a((function(t,n){var r,i;if(0===n.length||null==t)return t;try{for(var o=e(t.keys()),a=o.next();!a.done;a=o.next()){var u=a.value;if(u!==s&&n.startsWith(u))return d(t.get(u),n.slice(u.length))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"lookup"),g=a((function(t,n){var r,i,o=n.length;t:for(var a=0;t&&a<o;){try{for(var u=(r=void 0,e(t.keys())),l=u.next();!l.done;l=u.next()){var c=l.value;if(c!==s&&n[a]===c[0]){for(var p=Math.min(o-a,c.length),h=1;h<p&&n[a+h]===c[h];)++h;var f=t.get(c);if(h===c.length)t=f;else{var d=new Map;d.set(c.slice(h),f),t.set(n.slice(a,a+h),d),t.delete(c),t=d}a+=h;continue t}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}var g=new Map;return t.set(n.slice(a),g),g}return t}),"createPath"),y=a((function(t,e){var r=n(f(t,e),2),i=r[0],o=r[1];if(void 0!==i)if(i.delete(s),0===i.size)v(o);else if(1===i.size){var a=n(i.entries().next().value,2),u=a[0],l=a[1];m(o,u,l)}}),"remove"),v=a((function(t){if(0!==t.length){var e=n(_(t),2),r=e[0],i=e[1];if(r.delete(i),0===r.size)v(t.slice(0,-1));else if(1===r.size){var o=n(r.entries().next().value,2),a=o[0],u=o[1];a!==s&&m(t.slice(0,-1),a,u)}}}),"cleanup"),m=a((function(t,e,r){if(0!==t.length){var i=n(_(t),2),o=i[0],a=i[1];o.set(a+e,r),o.delete(a)}}),"merge"),_=a((function(t){return t[t.length-1]}),"last"),b="or",w=function(){function r(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=t(t(t({},C),e),{searchOptions:t(t({},M),e.searchOptions||{})}),this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return a(r,"MiniSearch"),r.prototype.add=function(t){var n,r,i,o,a=this._options,s=a.extractField,u=a.tokenize,l=a.processTerm,c=a.fields,p=a.idField,h=s(t,p);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(p,'"'));var f=this.addDocumentId(h);this.saveStoredFields(f,t);try{for(var d=e(c),g=d.next();!g.done;g=d.next()){var y=g.value,v=s(t,y);if(null!=v){var m=u(v.toString(),y),_=this._fieldIds[y],b=new Set(m).size;this.addFieldLength(f,_,this._documentCount-1,b);try{for(var w=(i=void 0,e(m)),x=w.next();!x.done;x=w.next()){var E=l(x.value,y);E&&this.addTerm(_,f,E)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(t){n={error:t}}finally{try{g&&!g.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}},r.prototype.addAll=function(t){var n,r;try{for(var i=e(t),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},r.prototype.addAllAsync=function(t,e){var n=this;void 0===e&&(e={});var r=e.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},a=t.reduce((function(t,e,r){var o=t.chunk,a=t.promise;return o.push(e),(r+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(t){return setTimeout(t,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return n.addAll(s)}))},r.prototype.remove=function(t){var r,i,o,a,s,u,l=this._options,c=l.tokenize,p=l.processTerm,h=l.extractField,f=l.fields,d=l.idField,g=h(t,d);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var y=e(this._documentIds),v=y.next();!v.done;v=y.next()){var m=n(v.value,2),_=m[0];if(g===m[1]){try{for(var b=(o=void 0,e(f)),w=b.next();!w.done;w=b.next()){var x=w.value,E=h(t,x);if(null!=E){var I=c(E.toString(),x),S=this._fieldIds[x],C=new Set(I).size;this.removeFieldLength(_,S,this._documentCount,C);try{for(var M=(s=void 0,e(I)),N=M.next();!N.done;N=M.next()){var A=p(N.value,x);A&&this.removeTerm(S,_,A)}}catch(t){s={error:t}}finally{try{N&&!N.done&&(u=M.return)&&u.call(M)}finally{if(s)throw s.error}}}}}catch(t){o={error:t}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return this._storedFields.delete(_),this._documentIds.delete(_),this._fieldLength.delete(_),void(this._documentCount-=1)}}}catch(t){r={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},r.prototype.removeAll=function(t){var n,r;if(t)try{for(var i=e(t),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},r.prototype.search=function(t,r){var i,o;void 0===r&&(r={});var a=this.executeQuery(t,r),s=[];try{for(var u=e(a),l=u.next();!l.done;l=u.next()){var c=n(l.value,2),p=c[0],h=c[1],f=h.score,d=h.terms,g=h.match,y=d.length,v={id:this._documentIds.get(p),score:f*y,terms:Object.keys(g),match:g};Object.assign(v,this._storedFields.get(p)),(null==r.filter||r.filter(v))&&s.push(v)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return s.sort(P),s},r.prototype.autoSuggest=function(r,i){var o,a,s,u;void 0===i&&(i={}),i=t(t({},N),i);var l=new Map;try{for(var c=e(this.search(r,i)),p=c.next();!p.done;p=c.next()){var h=p.value,f=h.score,d=(w=h.terms).join(" ");null!=(_=l.get(d))?(_.score+=f,_.count+=1):l.set(d,{score:f,terms:w,count:1})}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var y=e(l),v=y.next();!v.done;v=y.next()){var m=n(v.value,2),_=m[0],b=m[1],w=(f=b.score,b.terms),x=b.count;g.push({suggestion:_,terms:w,score:f/x})}}catch(t){s={error:t}}finally{try{v&&!v.done&&(u=y.return)&&u.call(y)}finally{if(s)throw s.error}}return g.sort(P),g},Object.defineProperty(r.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),r.loadJSON=function(t,e){if(null==e)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return r.loadJS(JSON.parse(t),e)},r.getDefault=function(t){if(C.hasOwnProperty(t))return x(C,t);throw new Error('MiniSearch: unknown option "'.concat(t,'"'))},r.loadJS=function(t,i){var o,a,s,u,l=t.index,c=t.documentCount,p=t.nextId,f=t.documentIds,d=t.fieldIds,g=t.fieldLength,y=t.averageFieldLength,v=t.storedFields,m=t.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var _=new r(i);_._documentCount=c,_._nextId=p,_._documentIds=T(f),_._fieldIds=d,_._fieldLength=T(g),_._avgFieldLength=y,_._storedFields=T(v),_._index=new h;try{for(var b=e(l),w=b.next();!w.done;w=b.next()){var x=n(w.value,2),E=x[0],I=x[1],S=new Map;try{for(var C=(s=void 0,e(Object.keys(I))),M=C.next();!M.done;M=C.next()){var N=M.value,A=I[N];1===m&&(A=A.ds),S.set(parseInt(N,10),T(A))}}catch(t){s={error:t}}finally{try{M&&!M.done&&(u=C.return)&&u.call(C)}finally{if(s)throw s.error}}_._index.set(E,S)}}catch(t){o={error:t}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return _},r.prototype.executeQuery=function(e,n){var r=this;if(void 0===n&&(n={}),"string"!=typeof e){var i=t(t(t({},n),e),{queries:void 0}),o=e.queries.map((function(t){return r.executeQuery(t,i)}));return this.combineResults(o,e.combineWith)}var a=this._options,s=a.tokenize,u=a.processTerm,l=a.searchOptions,c=t(t({tokenize:s,processTerm:u},l),n),p=c.tokenize,h=c.processTerm,f=p(e).map((function(t){return h(t)})).filter((function(t){return!!t})).map(S(c)).map((function(t){return r.executeQuerySpec(t,c)}));return this.combineResults(f,c.combineWith)},r.prototype.executeQuerySpec=function(r,i){var o,a,s,u,l,c,p=t(t({},this._options.searchOptions),i),h=(p.fields||this._options.fields).reduce((function(e,n){var r;return t(t({},e),((r={})[n]=x(e,n)||1,r))}),p.boost||{}),f=p.boostDocument,d=p.weights,g=p.maxFuzzy,y=t(t({},M.weights),d),v=y.fuzzy,m=y.prefix,_=this._index.get(r.term),b=this.termResults(r.term,r.term,1,_,h,f);if(r.prefix&&(l=this._index.atPrefix(r.term)),r.fuzzy){var w=!0===r.fuzzy?.2:r.fuzzy,E=w<1?Math.min(g,Math.round(r.term.length*w)):w;E&&(c=this._index.fuzzyGet(r.term,E))}if(l)try{for(var I=e(l),S=I.next();!S.done;S=I.next()){var C=n(S.value,2),N=C[0],A=C[1];if(T=N.length-r.term.length){null==c||c.delete(N);var O=m*N.length/(N.length+.3*T);this.termResults(r.term,N,O,A,h,f,b)}}}catch(t){o={error:t}}finally{try{S&&!S.done&&(a=I.return)&&a.call(I)}finally{if(o)throw o.error}}if(c)try{for(var P=e(c.keys()),L=P.next();!L.done;L=P.next()){N=L.value;var T,R=n(c.get(N),2),D=R[0];(T=R[1])&&(O=v*N.length/(N.length+T),this.termResults(r.term,N,O,D,h,f,b))}}catch(t){s={error:t}}finally{try{L&&!L.done&&(u=P.return)&&u.call(P)}finally{if(s)throw s.error}}return b},r.prototype.combineResults=function(t,e){if(void 0===e&&(e=b),0===t.length)return new Map;var n=e.toLowerCase();return t.reduce(E[n])||new Map},r.prototype.toJSON=function(){var t,r,i,o,a=[];try{for(var s=e(this._index),u=s.next();!u.done;u=s.next()){var l=n(u.value,2),c=l[0],p=l[1],h={};try{for(var f=(i=void 0,e(p)),d=f.next();!d.done;d=f.next()){var g=n(d.value,2),y=g[0],v=g[1];h[y]=Object.fromEntries(v)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}a.push([c,h])}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:a,serializationVersion:2}},r.prototype.termResults=function(t,n,r,i,o,a,s){var u,l,c,p,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var f=e(Object.keys(o)),d=f.next();!d.done;d=f.next()){var g=d.value,y=o[g],v=this._fieldIds[g],m=i.get(v);if(null!=m){var _=m.size,b=this._avgFieldLength[v];try{for(var w=(c=void 0,e(m.keys())),E=w.next();!E.done;E=w.next()){var S=E.value,C=a?a(this._documentIds.get(S),n):1;if(C){var M=m.get(S),N=this._fieldLength.get(S)[v],O=r*y*C*I(M,_,this._documentCount,N,b),P=s.get(S);if(P){P.score+=O,A(P.terms,t);var L=x(P.match,n);L?L.push(g):P.match[n]=[g]}else s.set(S,{score:O,terms:[t],match:(h={},h[n]=[g],h)})}}}catch(t){c={error:t}}finally{try{E&&!E.done&&(p=w.return)&&p.call(w)}finally{if(c)throw c.error}}}}}catch(t){u={error:t}}finally{try{d&&!d.done&&(l=f.return)&&l.call(f)}finally{if(u)throw u.error}}return s},r.prototype.addTerm=function(t,e,n){var r=this._index.fetch(n,L),i=r.get(t);if(null==i)(i=new Map).set(e,1),r.set(t,i);else{var o=i.get(e);i.set(e,(o||0)+1)}},r.prototype.removeTerm=function(t,e,n){if(this._index.has(n)){var r=this._index.fetch(n,L),i=r.get(t);null==i||null==i.get(e)?this.warnDocumentChanged(e,t,n):i.get(e)<=1?i.size<=1?r.delete(t):i.delete(e):i.set(e,i.get(e)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(e,t,n)},r.prototype.warnDocumentChanged=function(t,n,r){var i,o;if(null!=console&&null!=console.warn)try{for(var a=e(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var u=s.value;if(this._fieldIds[u]===n)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(t),' has changed before removal: term "').concat(r,'" was not present in field "').concat(u,'". Removing a document after it has changed can corrupt the index!'))}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},r.prototype.addDocumentId=function(t){var e=this._nextId;return this._documentIds.set(e,t),this._documentCount+=1,this._nextId+=1,e},r.prototype.addFields=function(t){for(var e=0;e<t.length;e++)this._fieldIds[t[e]]=e},r.prototype.addFieldLength=function(t,e,n,r){var i=this._fieldLength.get(t);null==i&&this._fieldLength.set(t,i=[]),i[e]=r;var o=(this._avgFieldLength[e]||0)*n+r;this._avgFieldLength[e]=o/(n+1)},r.prototype.removeFieldLength=function(t,e,n,r){var i=this._avgFieldLength[e]*n-r;this._avgFieldLength[e]=i/(n-1)},r.prototype.saveStoredFields=function(t,n){var r,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var u=this._storedFields.get(t);null==u&&this._storedFields.set(t,u={});try{for(var l=e(a),c=l.next();!c.done;c=l.next()){var p=c.value,h=s(n,p);void 0!==h&&(u[p]=h)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}},r}(),x=a((function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}),"getOwnProperty"),E=((r={}).or=function(t,n){var r,i;try{for(var o=e(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,u=t.get(s);if(null==u)t.set(s,n.get(s));else{var l=n.get(s),c=l.score,p=l.terms,h=l.match;u.score=u.score+c,u.match=Object.assign(u.match,h),O(u.terms,p)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t},r.and=function(t,n){var r,i,o=new Map;try{for(var a=e(n.keys()),s=a.next();!s.done;s=a.next()){var u=s.value,l=t.get(u);if(null!=l){var c=n.get(u),p=c.score,h=c.terms,f=c.match;O(l.terms,h),o.set(u,{score:l.score+p,terms:l.terms,match:Object.assign(l.match,f)})}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},r.and_not=function(t,n){var r,i;try{for(var o=e(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;t.delete(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t},r),I=a((function(t,e,n,r,i){return Math.log(1+(n-e+.5)/(e+.5))*(.5+2.2*t/(t+1.2*(1-.7+.7*r/i)))}),"calcBM25Score"),S=a((function(t){return function(e,n,r){return{term:e,fuzzy:"function"==typeof t.fuzzy?t.fuzzy(e,n,r):t.fuzzy||!1,prefix:"function"==typeof t.prefix?t.prefix(e,n,r):!0===t.prefix}}}),"termToQuerySpec"),C={idField:"id",extractField:function(t,e){return t[e]},tokenize:function(t,e){return t.split(R)},processTerm:function(t,e){return t.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},M={combineWith:b,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},N={prefix:function(t,e,n){return e===n.length-1}},A=a((function(t,e){t.includes(e)||t.push(e)}),"assignUniqueTerm"),O=a((function(t,n){var r,i;try{for(var o=e(n),a=o.next();!a.done;a=o.next()){var s=a.value;t.includes(s)||t.push(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"assignUniqueTerms"),P=a((function(t,e){var n=t.score;return e.score-n}),"byScore"),L=a((function(){return new Map}),"createMap"),T=a((function(t){var n,r,i=new Map;try{for(var o=e(Object.keys(t)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),t[s])}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}),"objectToNumericMap"),R=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;return w},"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self).MiniSearch=r()})),P4={};Md(P4,{Mappedin:()=>ms,MappedinDestinationSet:()=>Bi,OfflineSearch:()=>Zh,getVenue:()=>FE,getVenueBundle:()=>BE,initialize:()=>I4,setFetchFn:()=>CN}),module.exports=zr(P4),m(),m();var PN=wr(Ax());m(),m(),m();var Dx=wr(Lx());m();var Um=class{constructor({origin:t,destination:e,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,u;if(A(this,"origin"),A(this,"destination"),A(this,"vortex"),A(this,"distance"),A(this,"angle"),A(this,"weight"),this.origin=t,this.destination=e,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,s=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,u=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*u+s;else{let t=a||e.weight;s=t&&t>=0?t:0,u=e.multiplier&&e.multiplier>=1?e.multiplier:1,this.weight=this.distance*u+s}if(isNaN(this.angle))throw new Error("nan angle")}};a(Um,"Edge");var qm=Um,Eu=qm;m();var Rx="mi-debug",FT={logState:0,log(...t){this.logState<=0&&console.log("[MappedInJS]",...t)},warn(...t){this.logState<=1&&console.warn("[MappedInJS]",...t)},error(...t){this.logState<=2&&console.error("[MappedInJS]",...t)},assert(...t){console.assert(...t)},time(t){console.time(t)},timeEnd(t){console.timeEnd(t)}},He=FT;function BT(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale||1);try{if(!t.georeference)throw new Error("map ".concat(t.name||t.shortName||t.id," does not have a georeference field"));if(t.georeference.length<3)throw new Error("map ".concat(t.name||t.shortName||t.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let e=t.georeference[0],n=t.georeference[2],r=(0,Dx.getDistance)({latitude:e.target.x,longitude:e.target.y},{latitude:n.target.x,longitude:n.target.y}),i=e.control.x-n.control.x,o=e.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(t){return He.error(t),1}}function Id(t,e){let n=t.x-e.x,r=t.y-e.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}a(BT,"getMapScale"),a(Id,"getAngle");var Ym=class{constructor({nodes:t,vortexes:e,maps:n,showVortexNames:r=!1}){A(this,"edges"),A(this,"nodesById"),A(this,"mapsById"),this.edges={},this.mapsById=n.map((t=>({...t,_scale:BT(t)}))).reduce(((t,e)=>(t[e.id]=e,t)),{});let i=t.filter((t=>!!this.mapsById[t.map])).map((t=>({...t,paths:t.paths?t.paths.filter((({map:e})=>e===t.map)):[]})));this.nodesById=i.reduce(((t,e)=>(t[e.id]=e,t)),{});for(let t in this.nodesById)this.nodesById.hasOwnProperty(t)&&(this.nodesById[t].paths=this.nodesById[t].paths.filter((({node:t})=>!!this.nodesById[t])));let o=e.map((t=>({...t,name:r?t.name:t.type,nodes:t.nodes?t.nodes.filter((t=>!!this.nodesById[t])):[]})));i.forEach((t=>{this.edges[t.id]=t.paths.map((({node:e,weight:n})=>{let r=this.nodesById[e];return new Eu({angle:Id(t,r),destination:r,distance:this.getDistance(t,r),origin:t,pathWeight:n})}))})),o.forEach((t=>{if(null==t.nodes||0===t.nodes.length)return;let e=0;for(;e<t.nodes.length-1;){let n=this.nodesById[t.nodes[e]];if(e++,null==n)continue;let r=e;for(;r<t.nodes.length;){let e=this.nodesById[t.nodes[r]];if(r++,null==e)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[e.map].elevation||0,a=Math.abs(i-o);this.edges[n.id].push(new Eu({destination:e,elevationDelta:a,origin:n,vortex:t})),this.edges[e.id].push(new Eu({destination:n,elevationDelta:a,origin:e,vortex:t}))}}}))}aStar({originIds:t,destinationNodeIds:e,accessible:n,includedVortexIds:r,excludedVortexIds:i}){let o=t.map((t=>this.nodesById[t])).filter((t=>t)),a=e.map((t=>this.nodesById[t])).filter((t=>t));if(0===o.length||0===a.length)return[];let s=[],u={},l={};for(o.forEach((t=>{let e=this.getShortestEuclideanDistance(t,a);s.push({origin:t,priority:e}),u[t.id]=null,l[t.id]=0})),s.sort(((t,e)=>t.priority-e.priority));s.length>0;){let t=s[0];if(a.includes(t.origin)){let e=[],n=u[t.origin.id];for(;null!=n;){e.push(n);let t=u[n.origin.id];n=null!=t?t:null}return e.reverse()}for(let e of this.edges[t.origin.id]){let o=e.vortex&&!1===e.vortex.accessible||!1===e.origin.accessible||!1===e.destination.accessible,c=e.vortex&&(r&&!r.has(e.vortex.id)||i&&i.has(e.vortex.id));if(n&&o||c)continue;let p=l[t.origin.id]+e.weight;if(null==l[e.destination.id]||p<l[e.destination.id]){l[e.destination.id]=p;let t=p+this.getShortestEuclideanDistance(e.destination,a);s.push({origin:e.destination,priority:t}),u[e.destination.id]=e}}s.splice(0,1),s.sort(((t,e)=>t.priority-e.priority))}return[]}getDistance(t,e){let n,r=t.x-e.x,i=t.y-e.y,o=r*r+i*i;return n=null==this.mapsById[t.map]?1:this.mapsById[t.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(t,e){return e.reduce(((e,n)=>{let r=this.getDistance(t,n);return Math.min(e,r)}),Number.MAX_VALUE)}};a(Ym,"NavigationGraph");var Vm=Ym,Xm=Vm;function jT(t){switch(t){case"down":case"up":return"".concat(t," ");default:return""}}m(),m(),a(jT,"vortexDirectionTest");var Hm=class{constructor({origin:t,action:e,distance:n,atLocation:r,instruction:i}){A(this,"node"),A(this,"instruction"),A(this,"action"),A(this,"atLocation"),A(this,"type"),A(this,"distance",0),this.node=t,this.action=e,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=e&&"Departure"===e.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=e&&"Arrival"===e.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=e&&"TakeVortex"===e.type?this.instruction="Take ".concat(r&&r.name," ").concat(jT(e.direction),"to ").concat(e.toMap.name):null!=e&&"ExitVortex"===e.type?this.instruction="Exit ".concat(r&&r.name," at ").concat(e.toMap.name):null!=e&&"bearing"in e&&"Right"===e.bearing?this.instruction="Turn right":null!=e&&"bearing"in e&&"SlightRight"===e.bearing?this.instruction="Turn slightly right":null!=e&&"bearing"in e&&"Straight"===e.bearing?this.instruction="Head straight":null!=e&&"bearing"in e&&"SlightLeft"===e.bearing?this.instruction="Turn slightly left":null!=e&&"bearing"in e&&"Left"===e.bearing&&(this.instruction="Turn left"),null!=e&&"Turn"===e.type&&r&&(this.instruction+=" at ".concat(r.name)))}};a(Hm,"Directive");var Wm=Hm,qs=Wm;function Km(t,e,n,r){if(!(t&&e&&n&&r))return null;let i=t.x,o=t.y,a=e.x,s=e.y,u=n.x,l=n.y,c=r.x,p=r.y;if(i===a&&o===s||u===c&&l===p)return null;let h=(p-l)*(a-i)-(c-u)*(s-o);if(0===h)return null;let f=((c-u)*(o-l)-(p-l)*(i-u))/h,d=((a-i)*(o-l)-(s-o)*(i-u))/h;return f<0||f>1||d<0||d>1?null:{x:i+f*(a-i),y:o+f*(s-o)}}function Fx(t,e,n){if(t.x===e.x)return[{x:t.x+n,y:t.y},{x:e.x+n,y:e.y}];if(t.y===e.y)return[{x:t.x,y:t.y+n},{x:e.x,y:e.y+n}];let r=-1/((e.y-t.y)/(e.x-t.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:t.x+i,y:t.y+o},{x:e.x+i,y:e.y+o}]}function Bx(t,e,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Fx(t,e,-r),a=Fx(t,e,r);if(Km(o[0],o[1],n[0],n[1])||Km(a[0],a[1],n[0],n[1]))return void(i=!1)}else if(Km(t,e,n[0],n[1]))return void(i=!1)})),i}m(),a(Km,"getLineIntersection"),a(Fx,"getOffsetLine"),a(Bx,"hasLineOfSight");var Pd=.1*Math.PI;function Cd(t,e){return((e-t+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}a(Cd,"differenceBetweenAngles");var Qm=class{constructor({locations:t,nodes:e,vortexes:n,maps:r,polygons:i,showVortexNames:o}){A(this,"graph"),A(this,"locationsByNodeId"),A(this,"geometryEdgesByMapId",new Map),this.graph=new Xm({maps:r,nodes:e,showVortexNames:o,vortexes:n}),this.locationsByNodeId=t.reduce(((t,e)=>(e.nodes&&e.nodes.forEach((n=>{t[n.node]=e})),e.polygons&&e.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{t[n]=e}))})),t)),{}),i&&i.forEach((t=>{this.geometryEdgesByMapId.has(t.map)||this.geometryEdgesByMapId.set(t.map,[]),t.vertexes.forEach(((e,n)=>{t.vertexes[n+1]?this.geometryEdgesByMapId.get(t.map).push([e,t.vertexes[n+1]]):this.geometryEdgesByMapId.get(t.map).push([e,t.vertexes[0]])}))}))}getClosestLocationInRay(t,e=.5*Math.PI,n=10){let r=0,i=0,o=t;for(;Math.abs(r)<e&&i<n;){let t=this.graph.edges[o.destination.id],a=null,s=0;for(let e of t)if(e.distance>0)if(null!=a){let t=-Cd(o.angle,e.angle);Math.abs(t)<Math.abs(s)&&(a=e,s=t)}else a=e,s=-Cd(o.angle,e.angle);if(null==a)return null;{if(Math.abs(s)>=e||(r+=s,i+=a.distance,Math.abs(r)>=e||i>n))return null;let t=this.locationsByNodeId[a.destination.id];if(null!=t)return t;o=a}}return null}getDirections({originIds:t,destinationNodeIds:e,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,simplify:s}){var u,l,c;let p=this.graph.aStar({originIds:t,destinationNodeIds:e,accessible:n,includedVortexIds:o,excludedVortexIds:a});if(0===p.length)return{distance:0,instructions:[new qs({distance:0,instruction:"No Valid Path Available"})],path:[]};let h=0,f=[],d=[];if(null!=s&&s.enabled){let t=null!=(u=null==s?void 0:s.bufferRadius)?u:1.8,e=[p[0]];for(let n=1;n<p.length;n++){if(p[n].origin.map!==p[n-1].origin.map){let r=null!=(l=this.geometryEdgesByMapId.get(p[n-1].origin.map))?l:[];d.push(...this.simplifySteps(e,r,t)),e=[p[n]]}e.push(p[n])}let n=p[p.length-1],r=null!=(c=this.geometryEdgesByMapId.get(n.origin.map))?c:[];d.push(...this.simplifySteps(e,r,t)),p=d}for(let t=0;t<p.length;t++)f.push(p[t].origin);f.push(p[p.length-1].destination);let g=[],y=null,v=null,m=0,_=0;for(let t=0;t<p.length;t++){let e=p[t],n=e.origin,o=e.destination;if(h+=e.distance,m+=(null==v?void 0:v.distance)||0,0===t&&g.push(new qs({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=e.vortex){let t=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=t.elevation&&null!=r.elevation){let e=t.elevation-r.elevation;e>0?i="down":e<0&&(i="up")}g.push(new qs({action:{direction:i,fromMap:t,toMap:r,type:"TakeVortex"},atLocation:e.vortex,distance:m,origin:n})),_+=m,m=0}else if(null!=y&&null!=v)if(null!=v.vortex){let t=this.graph.mapsById[y.map],e=this.graph.mapsById[v.destination.map];g.push(new qs({action:{fromMap:t,toMap:e,type:"ExitVortex"},atLocation:v.vortex,distance:m,origin:n})),_+=m,m=0}else{let t=this.graph.edges[n.id].filter((t=>t.destination!==y&&t.destination!==e.destination));if(t.length>0){let r=-Cd(v.angle,e.angle),i=t.reduce(((t,n)=>{let r=-Cd(e.angle,n.angle);return Math.min(t,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Pd||Math.abs(i)<=Pd){let t;t=r<=-Math.PI/4?"Right":r<=-Pd?"SlightRight":r<=Pd?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let e=this.locationsByNodeId[n.id];if(e||(e=this.getClosestLocationInRay(v,.5*Math.PI,10)),null!=e){let r=new qs({action:{bearing:t,referencePosition:"At",type:"Turn"},atLocation:e,distance:m,origin:n});r.type=t,g.push(r)}else g.push(new qs({action:{bearing:t,referencePosition:"At",type:"Turn"},distance:m,origin:n}));_+=m,m=0}}}t===p.length-1&&(g.push(new qs({action:{type:"Arrival"},atLocation:i,distance:h-_<0?0:h-_,origin:e.destination})),_+=m,m=0),y=n,v=e}let b=[],w=null;for(let t=g.length-1;t>=0;t--){let e=g[t],{action:n}=e;n&&"TakeVortex"===n.type?(w=e.node,b.unshift(e)):n&&"Turn"===n.type&&null!=w?this.graph.getDistance(e.node,w)>5&&b.unshift(e):b.unshift(e)}return{distance:h,instructions:b,path:f}}simplifySteps(t,e,n){if(t.length<3)return t;let r=[t[0]],i=1;for(let o=i+2;o<t.length;o++)if(!Bx(t[i].origin,t[o].origin,e,n)){let e=o-1;r.push(new Eu({...t[i],destination:t[e].origin,distance:this.graph.getDistance(t[i].origin,t[e].origin),angle:Id(t[i].origin,t[e].origin)})),i=e}return r.push(new Eu({...t[i],destination:t[t.length-1].origin,distance:this.graph.getDistance(t[i].origin,t[t.length-1].origin),angle:Id(t[i].origin,t[t.length-1].origin)}),t[t.length-1]),r}};a(Qm,"Navigator");var Jm=Qm,Zm=Jm;m(),m();var rs,gf,$m,kd,zx,ey=class{constructor(t){Ne(this,gf),Ne(this,kd),Ne(this,rs,void 0),De(this,rs,t)}directionsTo(t,e){let n=B(this,rs).analytics;return t instanceof Bi?0===t.destinations.length?[]:(n.getDirections(this,t.destinations[t.destinations.length-1]),Hr(this,kd,zx).call(this,t,e)):(n.getDirections(this,t),Hr(this,gf,$m).call(this,t,e))}distanceTo(t,e){let n=Hr(this,gf,$m).call(this,t,e);return(null==n?void 0:n.distance)||0}};rs=new WeakMap,gf=new WeakSet,$m=a((function(t,e){let n=df(this),r=df(t),i=B(this,rs).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==e?void 0:e.accessible)||!1,includedVortexIds:null!=e&&e.includedVortexIds?new Set(e.includedVortexIds):void 0,excludedVortexIds:null!=e&&e.excludedVortexIds?new Set(e.excludedVortexIds):void 0,simplify:null==e?void 0:e.simplify});return new xu(B(this,rs),i)}),"#directionsToSingleDestination"),kd=new WeakSet,zx=a((function(t,e){let n,r=[],i=df(this);for(let o=0;o<t.destinations.length;o++){n=df(t.destinations[o]);let a=B(this,rs).navigator.getDirections({originIds:i,destinationNodeIds:n,includedVortexIds:null!=e&&e.includedVortexIds?new Set(e.includedVortexIds):void 0,excludedVortexIds:null!=e&&e.excludedVortexIds?new Set(e.excludedVortexIds):void 0,accessible:(null==e?void 0:e.accessible)||!1,simplify:null==e?void 0:e.simplify}),s=new xu(B(this,rs),a);r.push(s),i=0===s.path.length?n:[s.path[s.path.length-1].id]}return r}),"#directionsToDestinationSet"),a(ey,"MappedinNavigatable");var bo=ey;m(),m();var hg=wr(DM()),K0={production:"40ead723d18886045e302513245edb27",development:""},Cl={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},J0=class{constructor(t){this.event_properties=t,A(this,"event_type","Analytics:categorySelected-call"),this.event_properties=t}};a(J0,"AnalyticsCategorySelectedCall");var Df=J0,Z0=class{constructor(t){this.event_properties=t,A(this,"event_type","Analytics:locationSelected-call"),this.event_properties=t}};a(Z0,"AnalyticsLocationSelectedCall");var Ff=Z0,Q0=class{constructor(t){this.event_properties=t,A(this,"event_type","BlueDot:disable-call"),this.event_properties=t}};a(Q0,"BlueDotDisableCall");var By=Q0,$0=class{constructor(t){this.event_properties=t,A(this,"event_type","BlueDot:enable-call"),this.event_properties=t}};a($0,"BlueDotEnableCall");var jy=$0,e_=class{constructor(t){this.event_properties=t,A(this,"event_type","BlueDot:off-call"),this.event_properties=t}};a(e_,"BlueDotOffCall");var zy=e_,t_=class{constructor(t){this.event_properties=t,A(this,"event_type","BlueDot:on-call"),this.event_properties=t}};a(t_,"BlueDotOnCall");var Gy=t_,r_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:animate-call"),this.event_properties=t}};a(r_,"CameraAnimateCall");var qy=r_,n_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=t}};a(n_,"CameraCancelAnimationCall");var Uy=n_,i_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:focusOn-call"),this.event_properties=t}};a(i_,"CameraFocusOnCall");var Vy=i_,a_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=t}};a(a_,"CameraGetSafeAreaInsetsCall");var Xy=a_,o_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:interaction.disable-call"),this.event_properties=t}};a(o_,"CameraInteractionDisableCall");var Yy=o_,s_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:interaction.enable-call"),this.event_properties=t}};a(s_,"CameraInteractionEnableCall");var Wy=s_,u_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:set-call"),this.event_properties=t}};a(u_,"CameraSetCall");var Hy=u_,l_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=t}};a(l_,"CameraSetSafeAreaInsetsCall");var Ky=l_,c_=class{constructor(t){this.event_properties=t,A(this,"event_type","Camera:translate-call"),this.event_properties=t}};a(c_,"CameraTranslateCall");var Jy=c_,f_=class{constructor(t){this.event_properties=t,A(this,"event_type","FlatLabels:add-call"),this.event_properties=t}};a(f_,"FlatLabelsAddCall");var Zy=f_,p_=class{constructor(t){this.event_properties=t,A(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=t}};a(p_,"FlatLabelsLabelAllLocationsCall");var Qy=p_,h_=class{constructor(t){this.event_properties=t,A(this,"event_type","FlatLabels:remove-call"),this.event_properties=t}};a(h_,"FlatLabelsRemoveCall");var $y=h_,d_=class{constructor(t){this.event_properties=t,A(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=t}};a(d_,"FlatLabelsRemoveAllCall");var e0=d_,g_=class{constructor(t){this.event_properties=t,A(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=t}};a(g_,"FlatLabelsSetAppearanceCall");var t0=g_,v_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:add-call"),this.event_properties=t}};a(v_,"FloatingLabelsAddCall");var r0=v_,m_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=t}};a(m_,"FloatingLabelsLabelAllLocationsCall");var n0=m_,y_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:remove-call"),this.event_properties=t}};a(y_,"FloatingLabelsRemoveCall");var i0=y_,__=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=t}};a(__,"FloatingLabelsRemoveAllCall");var a0=__,b_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=t}};a(b_,"FloatingLabelsResetPriorityCall");var o0=b_,w_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=t}};a(w_,"FloatingLabelsSetAppearanceCall");var s0=w_,E_=class{constructor(t){this.event_properties=t,A(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=t}};a(E_,"FloatingLabelsSetPriorityCall");var u0=E_,x_=class{constructor(t){this.event_properties=t,A(this,"event_type","global:getVenue-call"),this.event_properties=t}};a(x_,"GlobalGetVenueCall");var Bf=x_,M_=class{constructor(t){this.event_properties=t,A(this,"event_type","global:getVenueMVF-call"),this.event_properties=t}};a(M_,"GlobalGetVenueMvfCall");var pg=M_,S_=class{constructor(t){this.event_properties=t,A(this,"event_type","global:showVenue-call"),this.event_properties=t}};a(S_,"GlobalShowVenueCall");var l0=S_,I_=class{constructor(t){this.event_properties=t,A(this,"event_type","Journey:clear-call"),this.event_properties=t}};a(I_,"JourneyClearCall");var c0=I_,P_=class{constructor(t){this.event_properties=t,A(this,"event_type","Journey:draw-call"),this.event_properties=t}};a(P_,"JourneyDrawCall");var f0=P_,C_=class{constructor(t){this.event_properties=t,A(this,"event_type","Journey:setStep-call"),this.event_properties=t}};a(C_,"JourneySetStepCall");var p0=C_,k_=class{constructor(t){this.event_properties=t,A(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=t}};a(k_,"MappedinGetCollectionItemByIdCall");var h0=k_,O_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=t}};a(O_,"MappedinCoordinateAbsoluteDistanceToCall");var d0=O_,N_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=t}};a(N_,"MappedinCoordinateNearestNodeCall");var g0=N_,T_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinLocation:clone-call"),this.event_properties=t}};a(T_,"MappedinLocationCloneCall");var jf=T_,A_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=t}};a(A_,"MappedinLocationDirectionsToCall");var zf=A_,L_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=t}};a(L_,"MappedinLocationDistanceToCall");var Gf=L_,R_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=t}};a(R_,"MappedinMapCreateCoordinateCall");var v0=R_,D_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=t}};a(D_,"MappedinMapCreateCoordinateByXyCall");var m0=D_,F_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=t}};a(F_,"MappedinMapGetNorthCall");var y0=F_,B_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=t}};a(B_,"MappedinNodeDirectionsToCall");var qf=B_,j_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=t}};a(j_,"MappedinNodeDistanceToCall");var Uf=j_,z_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=t}};a(z_,"MappedinPolygonDirectionsToCall");var Vf=z_,G_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=t}};a(G_,"MappedinPolygonDistanceToCall");var Xf=G_,q_=class{constructor(t){this.event_properties=t,A(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=t}};a(q_,"MappedinVenueMetadataRead");var Yf=q_,U_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=t}};a(U_,"MapViewAddInteractivePolygonCall");var _0=U_,V_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=t}};a(V_,"MapViewAddInteractivePolygonsForAllLocationsCall");var b0=V_,X_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=t}};a(X_,"MapViewClearPolygonColorCall");var w0=X_,Y_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=t}};a(Y_,"MapViewCreateCustomTooltipCall");var E0=Y_,W_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:createMarker-call"),this.event_properties=t}};a(W_,"MapViewCreateMarkerCall");var x0=W_,H_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:createTooltip-call"),this.event_properties=t}};a(H_,"MapViewCreateTooltipCall");var M0=H_,K_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:destroy-call"),this.event_properties=t}};a(K_,"MapViewDestroyCall");var S0=K_,J_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=t}};a(J_,"MapViewDisableImageFlippingForAllPolygonsCall");var I0=J_,Z_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:drawPath-call"),this.event_properties=t}};a(Z_,"MapViewDrawPathCall");var P0=Z_,Q_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=t}};a(Q_,"MapViewEnableImageFlippingForAllLocationsCall");var C0=Q_,$_=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=t}};a($_,"MapViewEnableImageFlippingForPolygonCall");var k0=$_,e1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=t}};a(e1,"MapViewGetNearestNodeByScreenCoordinatesCall");var O0=e1,t1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=t}};a(t1,"MapViewGetPolygonAtCoordinateCall");var N0=t1,r1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=t}};a(r1,"MapViewGetPrimaryLocationForPolygonCall");var T0=r1,n1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=t}};a(n1,"MapViewLabelAllLocationsCall");var A0=n1,i1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=t}};a(i1,"MapViewRemoveAllInteractivePolygonsCall");var L0=i1,a1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=t}};a(a1,"MapViewRemoveAllMarkersCall");var R0=a1,o1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=t}};a(o1,"MapViewRemoveAllPathsCall");var D0=o1,s1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=t}};a(s1,"MapViewRemoveAllTooltipsCall");var F0=s1,u1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=t}};a(u1,"MapViewRemoveInteractivePolygonCall");var B0=u1,l1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeMarker-call"),this.event_properties=t}};a(l1,"MapViewRemoveMarkerCall");var j0=l1,c1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removePath-call"),this.event_properties=t}};a(c1,"MapViewRemovePathCall");var z0=c1,f1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:removeTooltip-call"),this.event_properties=t}};a(f1,"MapViewRemoveTooltipCall");var G0=f1,p1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=t}};a(p1,"MapViewSetBackgroundColorCall");var q0=p1,h1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:setHoverColor-call"),this.event_properties=t}};a(h1,"MapViewSetHoverColorCall");var U0=h1,d1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:setMap-call"),this.event_properties=t}};a(d1,"MapViewSetMapCall");var V0=d1,g1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=t}};a(g1,"MapViewSetPolygonColorCall");var X0=g1,v1=class{constructor(t){this.event_properties=t,A(this,"event_type","MapView:setState-call"),this.event_properties=t}};a(v1,"MapViewSetStateCall");var Y0=v1,m1=class{constructor(t){this.event_properties=t,A(this,"event_type","metrics:mapLoad-event"),this.event_properties=t}};a(m1,"MetricsMapLoadEvent");var W0=m1,y1=class{constructor(t){this.event_properties=t,A(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=t}};a(y1,"OfflineSearchAddQueryCall");var Wf=y1,_1=class{constructor(t){this.event_properties=t,A(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=t}};a(_1,"OfflineSearchConstructorCall");var Hf=_1,b1=class{constructor(t){this.event_properties=t,A(this,"event_type","OfflineSearch:search-call"),this.event_properties=t}};a(b1,"OfflineSearchSearchCall");var Kf=b1,w1=class{constructor(t){this.event_properties=t,A(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=t}};a(w1,"OfflineSearchSuggestCall");var Jf=w1,fg=a((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),E1=class{constructor(){A(this,"disabled",!1),A(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(t){var e,n;if(this.disabled=null!=(e=t.disabled)&&e,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),fg();let r=null;if(t.client&&"apiKey"in t.client?r=t.client.apiKey:"environment"in t&&(r=K0[t.environment]),t.client&&"instance"in t.client)this.amplitude=t.client.instance;else{if(r)return this.amplitude=hg.createInstance(),this.amplitude.init(r,void 0,{...Cl,...null!=(null==t?void 0:t.client)&&"configuration"in t.client?null==(n=t.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return fg()}identify(t,e,n){if(!this.isInitializedAndEnabled())return fg();t&&(n={...n,user_id:t});let r=new hg.Identify,i=e;if(null!=i)for(let[t,e]of Object.entries(i))r.set(t,e);return this.amplitude.identify(r,n)}track(t,e){return this.isInitializedAndEnabled()?this.amplitude.track(t,void 0,e):fg()}analyticsCategorySelectedCall(t,e){return this.track(new Df(t),e)}analyticsLocationSelectedCall(t,e){return this.track(new Ff(t),e)}blueDotDisableCall(t,e){return this.track(new By(t),e)}blueDotEnableCall(t,e){return this.track(new jy(t),e)}blueDotOffCall(t,e){return this.track(new zy(t),e)}blueDotOnCall(t,e){return this.track(new Gy(t),e)}cameraAnimateCall(t,e){return this.track(new qy(t),e)}cameraCancelAnimationCall(t,e){return this.track(new Uy(t),e)}cameraFocusOnCall(t,e){return this.track(new Vy(t),e)}cameraGetSafeAreaInsetsCall(t,e){return this.track(new Xy(t),e)}cameraInteractionDisableCall(t,e){return this.track(new Yy(t),e)}cameraInteractionEnableCall(t,e){return this.track(new Wy(t),e)}cameraSetCall(t,e){return this.track(new Hy(t),e)}cameraSetSafeAreaInsetsCall(t,e){return this.track(new Ky(t),e)}cameraTranslateCall(t,e){return this.track(new Jy(t),e)}flatLabelsAddCall(t,e){return this.track(new Zy(t),e)}flatLabelsLabelAllLocationsCall(t,e){return this.track(new Qy(t),e)}flatLabelsRemoveCall(t,e){return this.track(new $y(t),e)}flatLabelsRemoveAllCall(t,e){return this.track(new e0(t),e)}flatLabelsSetAppearanceCall(t,e){return this.track(new t0(t),e)}floatingLabelsAddCall(t,e){return this.track(new r0(t),e)}floatingLabelsLabelAllLocationsCall(t,e){return this.track(new n0(t),e)}floatingLabelsRemoveCall(t,e){return this.track(new i0(t),e)}floatingLabelsRemoveAllCall(t,e){return this.track(new a0(t),e)}floatingLabelsResetPriorityCall(t,e){return this.track(new o0(t),e)}floatingLabelsSetAppearanceCall(t,e){return this.track(new s0(t),e)}floatingLabelsSetPriorityCall(t,e){return this.track(new u0(t),e)}globalGetVenueCall(t,e){return this.track(new Bf(t),e)}globalGetVenueMvfCall(t,e){return this.track(new pg(t),e)}globalShowVenueCall(t,e){return this.track(new l0(t),e)}journeyClearCall(t,e){return this.track(new c0(t),e)}journeyDrawCall(t,e){return this.track(new f0(t),e)}journeySetStepCall(t,e){return this.track(new p0(t),e)}mappedinGetCollectionItemByIdCall(t,e){return this.track(new h0(t),e)}mappedinCoordinateAbsoluteDistanceToCall(t,e){return this.track(new d0(t),e)}mappedinCoordinateNearestNodeCall(t,e){return this.track(new g0(t),e)}mappedinLocationCloneCall(t,e){return this.track(new jf(t),e)}mappedinLocationDirectionsToCall(t,e){return this.track(new zf(t),e)}mappedinLocationDistanceToCall(t,e){return this.track(new Gf(t),e)}mappedinMapCreateCoordinateCall(t,e){return this.track(new v0(t),e)}mappedinMapCreateCoordinateByXyCall(t,e){return this.track(new m0(t),e)}mappedinMapGetNorthCall(t,e){return this.track(new y0(t),e)}mappedinNodeDirectionsToCall(t,e){return this.track(new qf(t),e)}mappedinNodeDistanceToCall(t,e){return this.track(new Uf(t),e)}mappedinPolygonDirectionsToCall(t,e){return this.track(new Vf(t),e)}mappedinPolygonDistanceToCall(t,e){return this.track(new Xf(t),e)}mappedinVenueMetadataRead(t,e){return this.track(new Yf(t),e)}mapViewAddInteractivePolygonCall(t,e){return this.track(new _0(t),e)}mapViewAddInteractivePolygonsForAllLocationsCall(t,e){return this.track(new b0(t),e)}mapViewClearPolygonColorCall(t,e){return this.track(new w0(t),e)}mapViewCreateCustomTooltipCall(t,e){return this.track(new E0(t),e)}mapViewCreateMarkerCall(t,e){return this.track(new x0(t),e)}mapViewCreateTooltipCall(t,e){return this.track(new M0(t),e)}mapViewDestroyCall(t,e){return this.track(new S0(t),e)}mapViewDisableImageFlippingForAllPolygonsCall(t,e){return this.track(new I0(t),e)}mapViewDrawPathCall(t,e){return this.track(new P0(t),e)}mapViewEnableImageFlippingForAllLocationsCall(t,e){return this.track(new C0(t),e)}mapViewEnableImageFlippingForPolygonCall(t,e){return this.track(new k0(t),e)}mapViewGetNearestNodeByScreenCoordinatesCall(t,e){return this.track(new O0(t),e)}mapViewGetPolygonAtCoordinateCall(t,e){return this.track(new N0(t),e)}mapViewGetPrimaryLocationForPolygonCall(t,e){return this.track(new T0(t),e)}mapViewLabelAllLocationsCall(t,e){return this.track(new A0(t),e)}mapViewRemoveAllInteractivePolygonsCall(t,e){return this.track(new L0(t),e)}mapViewRemoveAllMarkersCall(t,e){return this.track(new R0(t),e)}mapViewRemoveAllPathsCall(t,e){return this.track(new D0(t),e)}mapViewRemoveAllTooltipsCall(t,e){return this.track(new F0(t),e)}mapViewRemoveInteractivePolygonCall(t,e){return this.track(new B0(t),e)}mapViewRemoveMarkerCall(t,e){return this.track(new j0(t),e)}mapViewRemovePathCall(t,e){return this.track(new z0(t),e)}mapViewRemoveTooltipCall(t,e){return this.track(new G0(t),e)}mapViewSetBackgroundColorCall(t,e){return this.track(new q0(t),e)}mapViewSetHoverColorCall(t,e){return this.track(new U0(t),e)}mapViewSetMapCall(t,e){return this.track(new V0(t),e)}mapViewSetPolygonColorCall(t,e){return this.track(new X0(t),e)}mapViewSetStateCall(t,e){return this.track(new Y0(t),e)}metricsMapLoadEvent(t,e){return this.track(new W0(t),e)}offlineSearchAddQueryCall(t,e){return this.track(new Wf(t),e)}offlineSearchConstructorCall(t,e){return this.track(new Hf(t),e)}offlineSearchSearchCall(t,e){return this.track(new Kf(t),e)}offlineSearchSuggestCall(t,e){return this.track(new Jf(t),e)}};a(E1,"Ampli");var H0=E1,Zf=new H0;m();var ps,Ru,Ka,Rl,xo,Lg,QS,Rg,$S,lp,Y1,cp,W1,Ja,KS=wr(mS()),JS=wr(YS()),ZS=wr(WS()),HS="5.29.4",KB="https://api2.amplitude.com/2/httpapi",JB="https://api2.amplitude.com/batch",ZB="__unspecified__",V1={branch:"main",version:"0",source:"websdk"},Ii=class t{constructor(){Ne(this,Lg),Ne(this,Rg),Ne(this,lp),Ne(this,cp),Ne(this,Ka,{}),Ne(this,Rl,!1),Ne(this,xo,void 0),Ne(this,Ja,a((async t=>{$B(t.type)&&(window.removeEventListener("visibilitychange",B(this,Ja)),window.removeEventListener("pagehide",B(this,Ja)),window.removeEventListener("beforeunload",B(this,Ja)),window.removeEventListener("unload",B(this,Ja)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==B(t,Ru)&&De(t,Ru,HS),typeof navigator<"u"&&null!=navigator.userAgent&&De(this,xo,new ZS.UAParser(navigator.userAgent).getResult())}static setContext(e){De(t,ps,e)}static setVersion(e){De(t,Ru,e)}addPendingEvent(e){var n;if(null==B(t,ps))return;let r=e.event_type;if(!Hr(this,Rg,$S).call(this,e))return;null==e.event_properties&&(e.event_properties={});let i=B(this,Ka)[r];(0,JS.default)(e.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),B(this,Ka)[r]=e}async sendAllPendingEvents(){if(null==B(t,ps)||Object.keys(B(this,Ka)).length<1)return;if(B(this,Rl))return void He.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let e=[];for(let t in B(this,Ka)){let n=B(this,Ka)[t],r=Hr(this,lp,Y1).call(this,n);null!=r&&e.push(r)}if(!(e.length<1))try{De(this,Rl,!0),200===(await Hr(this,cp,W1).call(this,JB,e)).status&&De(this,Ka,{})}catch(t){He.warn("Error sending batch product analytics!",t)}finally{De(this,Rl,!1)}}async load(){if(!Zf.isLoaded){let{promise:t}=Zf.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});t.then((()=>{window.addEventListener("pagehide",B(this,Ja)),window.addEventListener("beforeunload",B(this,Ja)),window.addEventListener("unload",B(this,Ja)),window.addEventListener("visibilitychange",B(this,Ja))}))}}async sendEventNow(e){if(null==B(t,ps))return;let n=Hr(this,lp,Y1).call(this,e);if(null!=n)try{await Hr(this,cp,W1).call(this,KB,[n])}catch(t){He.warn("Error sending single product analytics event!",t)}}};ps=new WeakMap,Ru=new WeakMap,Ka=new WeakMap,Rl=new WeakMap,xo=new WeakMap,Lg=new WeakSet,QS=a((function(t){let e=t.event_type;return null!=B(this,Ka)[e]}),"#isEventTypePending"),Rg=new WeakSet,$S=a((function(t){if(!Hr(this,Lg,QS).call(this,t))return!0;let e=t.event_type,n=B(this,Ka)[e];return!(0,KS.default)(n.event_properties,t.event_properties)}),"#didEventPropertiesChange"),lp=new WeakSet,Y1=a((function(t){var e,n,r,i,o,a,s,u,l,c,p,h,f,d,g,y,v;if(null!=B(Ii,ps))return null==(null==(e=t.event_properties)?void 0:e.venue)&&He.warn("Error processing product analytics event! Unspecified venue slug",t),null==Cl.plan&&He.warn("Error processing product analytics event! Unknown coinfiguration plan",t),{event_type:t.event_type,session_id:null!=(n=Zf.client.getSessionId())?n:Fg(),device_id:null!=(r=Zf.client.getDeviceId())?r:Dg(),plan:{branch:null!=(o=null==(i=Cl.plan)?void 0:i.branch)?o:V1.branch,version:null!=(s=null==(a=Cl.plan)?void 0:a.version)?s:V1.version,source:null!=(l=null==(u=Cl.plan)?void 0:u.source)?l:V1.source},os_name:null==(c=B(this,xo))?void 0:c.browser.name,os_version:null==(p=B(this,xo))?void 0:p.browser.version,device_manufacturer:null==(h=B(this,xo))?void 0:h.device.vendor,device_model:null==(f=B(this,xo))?void 0:f.device.model,event_properties:{...t.event_properties,context:B(Ii,ps),sdk_version:B(Ii,Ru),browser_name:null==(d=B(this,xo))?void 0:d.browser.name,browser_version:null==(g=B(this,xo))?void 0:g.browser.version,venue:null!=(v=null==(y=t.event_properties)?void 0:y.venue)?v:ZB},time:t.time}}),"#makeBatchFormattedEvent"),cp=new WeakSet,W1=a((async function(t,e){return await hs()(t,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:K0.production,events:e})})}),"#batchSend"),Ja=new WeakMap,a(Ii,"ProductAnalytics"),Ne(Ii,ps,void 0),Ne(Ii,Ru,void 0);var X1=Ii,QB=new X1,cn=QB;function $B(t){return"beforeunload"===t||"pagehide"===t||"unload"===t||"hidden"===document.visibilityState}a($B,"areWeLeavingThePage");var Ma,Dl,ai,hp,fp=class t extends bo{constructor(t,e){super(t),Ne(this,Ma,void 0),Ne(this,Dl,void 0),Ne(this,ai,{}),A(this,"id",""),A(this,"x",0),A(this,"y",0),A(this,"operationHours"),A(this,"externalId"),Ne(this,hp,void 0),De(this,Ma,t),De(this,Dl,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=B(this,ai).map;if(typeof t<"u")return t;let e=B(this,Ma).getCollectionItemById("maps",B(this,Dl).map);return B(this,ai).map=e,e}get lat(){var t;let e=B(this,ai).cachedLatLon;if(null!=e)return e.lat;let n=null==(t=B(this,Ma)._mapsById)?void 0:t[this.map.id];if(null==n)throw new Error("Map not found");return B(this,ai).cachedLatLon=n.createCoordinateByXY(this.x,this.y),B(this,ai).cachedLatLon.lat}get lon(){var t;let e=B(this,ai).cachedLatLon;if(null!=e)return e.lon;let n=null==(t=B(this,Ma)._mapsById)?void 0:t[this.map.id];if(null==n)throw new Error("Map not found");return B(this,ai).cachedLatLon=n.createCoordinateByXY(this.x,this.y),B(this,ai).cachedLatLon.lon}get paths(){let t=B(this,ai).paths;if(typeof t<"u")return t;let e=[],n=B(this,Ma)._nodesById,r=B(this,hp);if(Array.isArray(r))for(let t=0,i=r.length;t<i;++t){let i=n[r[t].node];null!=i&&e.push(i)}return B(this,ai).paths=e,e}set paths(t){De(this,hp,t)}get locations(){var t,e,n;let r=B(this,ai).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(e=null==(t=di.instances.get(B(this,Ma)))?void 0:t.locationsByMapId)?void 0:e.get(this.map.id))?n:[],a=this.id;for(let t=0,e=o.length;t<e;++t){let e=o[t],n=e.nodes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t)if(n[t].id===a){i.push(e);break}}return B(this,ai).locations=i,i}get polygon(){var t,e,n;let r=B(this,ai).polygon;if(typeof r<"u")return r;let i,o=null!=(n=null==(e=null==(t=di.instances.get(B(this,Ma)))?void 0:t.polygonsByMapId)?void 0:e.get(this.map.id))?n:[],a=this.id;for(let t=0,e=o.length;t<e;++t){let e=o[t];e.entrances.map((t=>t.id)).includes(a)&&(i=e)}return B(this,ai).polygon=i,i}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n=e.options.things.nodes.slice();e.options.things.maps&&fn(n,"map"),["weight","multiplier","accessible"].forEach((function(t){fn(n,t)}));let r={fields:n,venue:e.options.venue};try{return(await pn(e.options,"node",r)).map((n=>new t(e,n)))}catch(t){return He.error("Fetch Nodes:",t),[]}}directionsTo(t,e){let n=t instanceof Bi,r=B(this,Ma).venue.slug,i=new qf({with_destination_set:n||void 0,venue:r});return cn.addPendingEvent(i),super.directionsTo(t,e)}distanceTo(t,e){let n=B(this,Ma).venue.slug;return cn.addPendingEvent(new Uf({venue:n})),super.distanceTo(t,e)}toJSON(){return B(this,Dl)}};Ma=new WeakMap,Dl=new WeakMap,ai=new WeakMap,hp=new WeakMap,a(fp,"MappedinNode");var pp=fp;m();var Mo,Fl,Sa,gp,dp=class t extends bo{constructor(t,e){super(t),Ne(this,Mo,void 0),Ne(this,Fl,void 0),Ne(this,Sa,{}),A(this,"geometry"),A(this,"perspectives"),A(this,"image"),A(this,"holes"),A(this,"textures"),A(this,"material"),A(this,"label"),A(this,"id",""),A(this,"layer"),A(this,"layerId"),A(this,"name"),A(this,"externalId"),A(this,"vertexes"),A(this,"center"),A(this,"canvasBounds"),A(this,"categoryRank"),Ne(this,gp,void 0),De(this,Mo,t),De(this,Fl,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=B(this,Sa).map;if(typeof t<"u")return t;let e=B(this,Mo).getCollectionItemById("maps",B(this,Fl).map);return B(this,Sa).map=e,e}get locations(){var t,e;let n=B(this,Sa).locations;if(typeof n<"u")return n;let r=[],i=null!=(e=null==(t=di.instances.get(B(this,Mo)))?void 0:t.locationsByMapId.get(this.map.id))?e:[],{id:o}=this;for(let t=0,e=i.length;t<e;++t){let e=i[t],n=e.polygons;if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t)if(n[t].id===o){r.push(e);break}}return B(this,Sa).locations=r,r}get entrances(){let t=B(this,Sa).entrances;if(typeof t<"u")return t;let e=[],n=B(this,gp),r=B(this,Mo)._nodesById;if(Array.isArray(n)){for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&e.push(i)}return B(this,Sa).entrances=e,e}return[]}set entrances(t){De(this,gp,t)}get rank(){let t=B(this,Sa).rank;if(typeof t<"u")return t;let{rankings:e}=B(this,Mo);if(!e||!e.polygons)return null;let n=e.polygons.find((t=>t.polygonId===this.id));return n?(B(this,Sa).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(B(this,Sa).rank=null,null)}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n=e.options.things.polygons.slice();e.options.things.maps&&fn(n,"map"),e.options.things.nodes&&fn(n,"entrances");let r={fields:n,venue:e.options.venue};try{return(await pn(e.options,"polygon",r)).map((n=>new t(e,n)))}catch(t){return He.error("Fetch Polygons:",t),[]}}directionsTo(t,e){let n=t instanceof Bi,r=B(this,Mo).venue.slug,i=new Vf({with_destination_set:n||void 0,venue:r});return cn.addPendingEvent(i),super.directionsTo(t,e)}distanceTo(t,e){let n=B(this,Mo).venue.slug;return cn.addPendingEvent(new Xf({venue:n})),super.distanceTo(t,e)}toJSON(){return B(this,Fl)}};Mo=new WeakMap,Fl=new WeakMap,Sa=new WeakMap,gp=new WeakMap,a(dp,"MappedinPolygon");var Du=dp;m();var e3=0,t3="9999-12-31T00:00:00.000Z";function r3(t,e,n=new Date){if(!t.states)return;let r=n||new Date,i=t.states.find((t=>{let e=new Date(t.start||e3),n=new Date(t.end||t3);return e<r&&n>r}));return i?e.find((t=>t.value===i.type)):void 0}a(r3,"getCurrentLocationState");var ra,Hs,na,vp,mp,yp,Bl=class t extends bo{constructor(t,e){super(t),Ne(this,ra,void 0),Ne(this,Hs,void 0),Ne(this,na,{}),A(this,"states"),A(this,"id",""),A(this,"name",""),A(this,"type",""),A(this,"description"),A(this,"sortOrder"),A(this,"logo"),A(this,"phone"),A(this,"social"),A(this,"color"),A(this,"shortName"),A(this,"detailsUrl"),A(this,"tags"),A(this,"toMap"),A(this,"externalId"),A(this,"showLabelWhenImagePresent"),A(this,"showSmartLabelWhenImagePresent"),A(this,"picture"),A(this,"operationHours"),A(this,"siblingGroups"),A(this,"gallery"),A(this,"amenity"),Ne(this,vp,void 0),Ne(this,mp,[]),Ne(this,yp,void 0),De(this,ra,t),De(this,Hs,e);let n=Object.assign({},e);delete n.categories,Object.assign(this,n)}get polygons(){let t=B(this,na).polygons;if(typeof t<"u")return t;let e=[],n=B(this,vp),r=B(this,ra)._polygonsById;if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&e.push(i)}return B(this,na).polygons=e,e}set polygons(t){De(this,vp,t)}get nodes(){let t=B(this,na).nodes;if(typeof t<"u")return t;let e=[],n=B(this,mp),r=B(this,ra)._nodesById;if(n&&n.length)for(let t=0,i=n.length;t<i;++t){let i=r[n[t].node];null!=i&&e.push(i)}return B(this,na).nodes=e,e}set nodes(t){De(this,mp,t)}get parent(){let t=B(this,na).parent;if(typeof t<"u")return t;let e,n=B(this,ra)._locationsById,r=B(this,yp);return void 0!==r&&(e=n[r]),B(this,na).parent=e,e}set parent(t){De(this,yp,t)}get categories(){let t=B(this,na).categories;if(typeof t<"u")return t;let e=[];return B(this,Hs).categories.forEach((t=>{let n=B(this,ra).getCollectionItemById("categories",t);n&&e.push(n)})),B(this,na).categories=e,e}get state(){return r3(this,B(this,ra).locationStates)}clone(){let e=B(this,ra).venue.slug;return cn.addPendingEvent(new jf({venue:e})),new t(B(this,ra),B(this,Hs))}get nodeOperationHours(){let t=B(this,na).nodeOperationHours;if(typeof t<"u")return t;if(null==this.nodes)return{};let e=B(this,Hs).nodes.reduce(((t,e)=>(null!=e.operationHours&&(t[e.node]=e.operationHours),t)),{});return B(this,na).nodeOperationHours=e,e}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n=e.options.things.locations.slice();e.options.things.categories&&fn(n,"categories"),e.options.things.nodes&&fn(n,"nodes"),e.options.things.polygons&&fn(n,"polygons"),e.options.things.locationStates&&fn(n,"states");let r={fields:n,venue:e.options.venue};try{let n=await pn(e.options,"location",r);return e.options.includeHidden||(n=n.filter((t=>!t.hidden))),n.map((n=>new t(e,n)))}catch(t){return He.error("Fetch Locations:",t),[]}}directionsTo(t,e){let n=t instanceof Bi,r=B(this,ra).venue.slug,i=new zf({with_destination_set:n||void 0,venue:r});return cn.addPendingEvent(i),super.directionsTo(t,e)}distanceTo(t,e){let n=B(this,ra).venue.slug;return cn.addPendingEvent(new Gf({venue:n})),super.distanceTo(t,e)}toJSON(){let t=B(this,Hs);return delete t.color,t}};ra=new WeakMap,Hs=new WeakMap,na=new WeakMap,vp=new WeakMap,mp=new WeakMap,yp=new WeakMap,a(Bl,"MappedinLocation");var ds=Bl;m();var jl,Fu,bp,_p=class t{constructor(t,e){Ne(this,jl,void 0),Ne(this,Fu,{}),Ne(this,bp,void 0),A(this,"name"),A(this,"externalId"),A(this,"parents"),A(this,"id"),A(this,"icon"),A(this,"iconFromDefaultList"),A(this,"sortOrder"),this.id=e.id,De(this,bp,e),De(this,jl,t),Object.assign(this,e)}get locations(){var t;let e=B(this,Fu).locations;if(typeof e<"u")return e;let n=[],{locations:r}=B(this,jl),{id:i}=this;for(let e=0,o=r.length;e<o;++e){let o=r[e],a=o.categories;if(Array.isArray(a))for(let e=0,r=a.length;e<r;++e)if((null==(t=a[e])?void 0:t.id)===i){n.push(o);break}}return B(this,Fu).locations=n,n}get children(){var t;let e=B(this,Fu).children;if(typeof e<"u")return e;let{categories:n}=B(this,jl),{id:r}=this,i=[];for(let e=0;e<n.length;e++)r&&null!=(t=n[e].parents)&&t.includes(r)&&i.push(n[e]);return B(this,Fu).children=i,i}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n={fields:e.options.things.categories,venue:e.options.venue};try{return(await pn(e.options,"category",n)).map((n=>new t(e,n)))}catch(t){return He.error("Fetch Categories:",t),[]}}toJSON(){return B(this,bp)}};jl=new WeakMap,Fu=new WeakMap,bp=new WeakMap,a(_p,"MappedinCategory");var Bu=_p;m();var wp,gs,K1=class{constructor(t,e){Ne(this,wp,void 0),Ne(this,gs,void 0),A(this,"distance",0),A(this,"path",[]),A(this,"instructions",[]),De(this,gs,t),De(this,wp,e),this.distance=e.distance,this.instructions=e.instructions.map((t=>{var e,n,r,i,o,a,s,u,l,c,p,h;let f={...t,action:{...t.action},atLocation:null!=(e=t.atLocation)&&e.id?null==(r=null==(n=B(this,gs))?void 0:n._vortexesById)?void 0:r[t.atLocation.id]:void 0,node:null!=(i=t.node)&&i.id?null==(a=null==(o=B(this,gs))?void 0:o._nodesById)?void 0:a[t.node.id]:void 0};if("TakeVortex"===(null==(s=f.action)?void 0:s.type)||"ExitVortex"===(null==(u=f.action)?void 0:u.type)){let t=null==(c=B(this,gs)._mapsById)?void 0:c[null==(l=f.action)?void 0:l.fromMap.id],e=null==(h=B(this,gs)._mapsById)?void 0:h[null==(p=f.action)?void 0:p.toMap.id];t&&e&&(f.action.fromMap=t,f.action.toMap=e)}return f})),this.path=e.path.reduce(((t,{id:e})=>{var n,r;let i=null==(r=null==(n=B(this,gs))?void 0:n._nodesById)?void 0:r[e];return i&&t.push(i),t}),[])}toJSON(){return B(this,wp)}};wp=new WeakMap,gs=new WeakMap,a(K1,"MappedinDirections");var xu=K1;m();var J1=class{constructor(t){A(this,"destinations",[]),this.destinations=t}};a(J1,"MappedinDestinationSet");var Bi=J1;m();var Mp,Ep=class t{constructor(t){A(this,"id",""),Ne(this,Mp,void 0),A(this,"accessible"),A(this,"name"),A(this,"type"),A(this,"weight"),A(this,"multiplier"),A(this,"nodes"),De(this,Mp,t),Object.assign(this,t)}static hydrate(e){return e.map((e=>new t(e)))}static async fetch(e){let n=e.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(t){fn(n,t)}));let r={fields:n,venue:e.options.venue};try{return(await pn(e.options,"vortex",r)).map((e=>new t(e)))}catch(t){return He.error("Fetch Vortexes:",t),[]}}toJSON(){return B(this,Mp)}};Mp=new WeakMap,a(Ep,"MappedinVortex");var xp=Ep;m();var Ip,Pp,Cp,zl,Sp=class t{constructor(t,e){Ne(this,Ip,void 0),Ne(this,Pp,void 0),Ne(this,Cp,void 0),Ne(this,zl,{}),A(this,"defaultMap",""),A(this,"address",""),A(this,"city",""),A(this,"countrycode",""),A(this,"externalId",""),A(this,"id",""),A(this,"latitude"),A(this,"logo"),A(this,"longitude"),A(this,"name",""),A(this,"operationHours"),A(this,"postal",""),A(this,"slug",""),A(this,"state",""),A(this,"telephone",""),A(this,"tzid",""),A(this,"tzidOverride",""),A(this,"utcOffset",""),A(this,"website",""),A(this,"secureContentStorage",!1),A(this,"defaultLanguage"),A(this,"languages",[]),A(this,"topLocations",[]),De(this,Pp,t),De(this,Ip,e),Object.assign(this,e)}get metadata(){return cn.addPendingEvent(new Yf({venue:this.slug})),B(this,Cp)}set metadata(t){De(this,Cp,t)}static hydrate(e,n){return new t(n,e)}static async fetch(e){let n={fields:e.options.things.venue,slug:e.options.venue,limit:1};try{let r=await pn(e.options,"venue",n);return new t(e,Array.isArray(r)?r[0]:r)}catch(t){return He.error("Fetch Venue:",t),{}}}get isMultiBuilding(){if(null==B(this,zl).isMultiBuilding){let t=B(this,Pp).maps,e=t.reduce(((t,e)=>t.add(e.elevation)),new Set),n=t.length!==e.size;B(this,zl).isMultiBuilding=n}return B(this,zl).isMultiBuilding}toJSON(){return B(this,Ip)}};Ip=new WeakMap,Pp=new WeakMap,Cp=new WeakMap,zl=new WeakMap,a(Sp,"MappedinVenue");var Gl=Sp;m();var Op,kp=class t{constructor(t){A(this,"id",""),Ne(this,Op,void 0),De(this,Op,t),Object.assign(this,t)}static hydrate(e){return e.map((e=>new t(e)))}static async fetch(e){let n={fields:e.options.things.themes.slice(),venue:e.options.venue};try{return(await pn(e.options,"apollo-theme",n)).map((e=>new t(e)))}catch(t){return He.error("Fetch Theme:",t),[]}}toJSON(){return B(this,Op)}};Op=new WeakMap,a(kp,"MappedinTheme");var Bg=kp;m();var Ap,Np=class t{constructor(t){Ne(this,Ap,void 0),A(this,"polygons",[]),De(this,Ap,t),Object.assign(this,t)}static hydrate(e){return new t(e)}static async fetch(e){try{let n=await ql({...e.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:e.options.venue},!0);return new t(n)}catch(t){return He.error("Fetch Rankings:",t),null}}toJSON(){return B(this,Ap)}};Ap=new WeakMap,a(Np,"MappedinRankings");var Tp=Np;m(),m();var Dp,Ul,Fp,Lp=class t{constructor(t,e){Ne(this,Dp,void 0),Ne(this,Ul,void 0),Ne(this,Fp,{}),A(this,"id",""),A(this,"type",""),A(this,"name",""),A(this,"description"),A(this,"image"),A(this,"startDate"),A(this,"endDate"),A(this,"showDate"),De(this,Ul,e),De(this,Dp,t),Object.assign(this,e)}location(){let t=B(this,Fp).location;if(typeof t<"u")return t;let e,n=B(this,Dp)._locationsById,r=B(this,Ul).location;if(null!=r){let t=n[r];null!=t&&(e=t)}return B(this,Fp).location=e,e}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n=e.options.things.events.slice();e.options.things.locations&&fn(n,"location");let r={fields:n,venue:e.options.venue,activeAtOrAfter:Date.now()};try{return(await pn(e.options,"event",r)).map((n=>new t(e,n)))}catch(t){return He.error("Fetch Events:",t),[]}}toJSON(){return B(this,Ul)}};Dp=new WeakMap,Ul=new WeakMap,Fp=new WeakMap,a(Lp,"MappedinEvent");var Rp=Lp;m();var zp,Bp=class t{constructor(t){Ne(this,zp,void 0),A(this,"id",""),A(this,"name",""),A(this,"value",""),De(this,zp,t),Object.assign(this,t)}static hydrate(e){return e.map((e=>new t(e)))}static async fetch(e){let n={fields:e.options.things.locationStates.slice(),venue:e.options.venue};try{return(await pn(e.options,"location-state",n)).map((e=>new t(e)))}catch(t){return He.error("Fetch Location States:",t),[]}}toJSON(){return B(this,zp)}};zp=new WeakMap,a(Bp,"MappedinLocationState");var jp=Bp;m(),m(),m();var eI=" ",Pi=class t{static get separator(){return eI}static set separator(t){eI=t}static parse(t){if(!isNaN(parseFloat(t))&&isFinite(t))return Number(t);let e=String(t).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==e[e.length-1]&&e.splice(e.length-1),""==e)return NaN;let n=null;switch(e.length){case 3:n=e[0]/1+e[1]/60+e[2]/3600;break;case 2:n=e[0]/1+e[1]/60;break;case 1:n=e[0];break;default:return NaN}return/^-|[WS]$/i.test(t.trim())&&(n=-n),Number(n)}static toDms(e,n="d",r){if(isNaN(e)||"string"==typeof e&&""==e.trim()||"boolean"==typeof e||e==1/0||null==e)return null;if(void 0===r)switch(n){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:n="d",r=4}e=Math.abs(e);let i=null,o=null,a=null,s=null;switch(n){default:case"d":case"deg":o=e.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(e),a=(60*e%60).toFixed(r),60==a&&(a=(0).toFixed(r),o++),o=("000"+o).slice(-3),a<10&&(a="0"+a),i=o+"°"+t.separator+a+"′";break;case"dms":case"deg+min+sec":o=Math.floor(e),a=Math.floor(3600*e/60)%60,s=(3600*e%60).toFixed(r),60==s&&(s=(0).toFixed(r),a++),60==a&&(a=0,o++),o=("000"+o).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),i=o+"°"+t.separator+a+"′"+t.separator+s+"″"}return i}static toLat(e,n,r){let i=t.toDms(t.wrap90(e),n,r);return null===i?"–":i.slice(1)+t.separator+(e<0?"S":"N")}static toLon(e,n,r){let i=t.toDms(t.wrap180(e),n,r);return null===i?"–":i+t.separator+(e<0?"W":"E")}static toBrng(e,n,r){let i=t.toDms(t.wrap360(e),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(e,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));e=t.wrap360(e);let r=4*2**(n-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(e*r/360)%r*16/r]}static wrap360(t){return 0<=t&&t<360?t:(t%360+360)%360}static wrap180(t){return-180<t&&t<=180?t:(t+540)%360-180}static wrap90(t){return-90<=t&&t<=90?t:Math.abs((t%360+270)%360-180)-90}};a(Pi,"Dms");var Z1=Pi;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var nr=Z1,en=Math.PI,wt=class t{constructor(t,e){if(isNaN(t))throw new TypeError("invalid lat ‘".concat(t,"’"));if(isNaN(e))throw new TypeError("invalid lon ‘".concat(e,"’"));this._lat=nr.wrap90(Number(t)),this._lon=nr.wrap180(Number(e))}get lat(){return this._lat}get latitude(){return this._lat}set lat(t){if(this._lat=isNaN(t)?nr.wrap90(nr.parse(t)):nr.wrap90(Number(t)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(t,"’"))}set latitude(t){if(this._lat=isNaN(t)?nr.wrap90(nr.parse(t)):nr.wrap90(Number(t)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(t,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(t){if(this._lon=isNaN(t)?nr.wrap180(nr.parse(t)):nr.wrap180(Number(t)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(t,"’"))}set lng(t){if(this._lon=isNaN(t)?nr.wrap180(nr.parse(t)):nr.wrap180(Number(t)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(t,"’"))}set longitude(t){if(this._lon=isNaN(t)?nr.wrap180(nr.parse(t)):nr.wrap180(Number(t)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(t,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...e){if(0==e.length)throw new TypeError("invalid (empty) point");if(null===e[0]||null===e[1])throw new TypeError("invalid (null) point");let n,r;if(2==e.length&&([n,r]=e,n=nr.wrap90(nr.parse(n)),r=nr.wrap180(nr.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(e.toString(),"’"));if(1==e.length&&"string"==typeof e[0]&&([n,r]=e[0].split(","),n=nr.wrap90(nr.parse(n)),r=nr.wrap180(nr.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(e[0],"’"));if(1==e.length&&"object"==typeof e[0]){let t=e[0];if("Point"==t.type&&Array.isArray(t.coordinates)?[r,n]=t.coordinates:(null!=t.latitude&&(n=t.latitude),null!=t.lat&&(n=t.lat),null!=t.longitude&&(r=t.longitude),null!=t.lng&&(r=t.lng),null!=t.lon&&(r=t.lon),n=nr.wrap90(nr.parse(n)),r=nr.wrap180(nr.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(e[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(e.toString(),"’"));return new t(n,r)}distanceTo(e,n=6371e3){if(e instanceof t||(e=t.parse(e)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,i=this.lat.toRadians(),o=this.lon.toRadians(),a=e.lat.toRadians(),s=a-i,u=e.lon.toRadians()-o,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(i)*Math.cos(a)*Math.sin(u/2)*Math.sin(u/2);return r*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}initialBearingTo(e){if(e instanceof t||(e=t.parse(e)),this.equals(e))return NaN;let n=this.lat.toRadians(),r=e.lat.toRadians(),i=(e.lon-this.lon).toRadians(),o=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),a=Math.sin(i)*Math.cos(r),s=Math.atan2(a,o).toDegrees();return nr.wrap360(s)}finalBearingTo(e){e instanceof t||(e=t.parse(e));let n=e.initialBearingTo(this)+180;return nr.wrap360(n)}midpointTo(e){e instanceof t||(e=t.parse(e));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=e.lat.toRadians(),o=(e.lon-this.lon).toRadians(),a=Math.cos(n),s=0,u=Math.sin(n),l={x:a+Math.cos(i)*Math.cos(o),y:s+Math.cos(i)*Math.sin(o),z:u+Math.sin(i)},c=Math.atan2(l.z,Math.sqrt(l.x*l.x+l.y*l.y)),p=r+Math.atan2(l.y,l.x),h=c.toDegrees(),f=p.toDegrees();return new t(h,f)}intermediatePointTo(e,n){if(e instanceof t||(e=t.parse(e)),this.equals(e))return new t(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=e.lat.toRadians(),a=e.lon.toRadians(),s=o-r,u=a-i,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*Math.cos(o)*Math.sin(u/2)*Math.sin(u/2),c=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),p=Math.sin((1-n)*c)/Math.sin(c),h=Math.sin(n*c)/Math.sin(c),f=p*Math.cos(r)*Math.cos(i)+h*Math.cos(o)*Math.cos(a),d=p*Math.cos(r)*Math.sin(i)+h*Math.cos(o)*Math.sin(a),g=p*Math.sin(r)+h*Math.sin(o),y=Math.atan2(g,Math.sqrt(f*f+d*d)),v=Math.atan2(d,f),m=y.toDegrees(),_=v.toDegrees();return new t(m,_)}destinationPoint(e,n,r=6371e3){let i=e/r,o=Number(n).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),u=Math.sin(a)*Math.cos(i)+Math.cos(a)*Math.sin(i)*Math.cos(o),l=Math.asin(u),c=Math.sin(o)*Math.sin(i)*Math.cos(a),p=Math.cos(i)-Math.sin(a)*u,h=s+Math.atan2(c,p),f=l.toDegrees(),d=h.toDegrees();return new t(f,d)}static intersection(e,n,r,i){if(e instanceof t||(e=t.parse(e)),r instanceof t||(r=t.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=e.lat.toRadians(),a=e.lon.toRadians(),s=r.lat.toRadians(),u=r.lon.toRadians(),l=Number(n).toRadians(),c=Number(i).toRadians(),p=s-o,h=u-a,f=2*Math.asin(Math.sqrt(Math.sin(p/2)*Math.sin(p/2)+Math.cos(o)*Math.cos(s)*Math.sin(h/2)*Math.sin(h/2)));if(Math.abs(f)<Number.EPSILON)return new t(e.lat,e.lon);let d=(Math.sin(s)-Math.sin(o)*Math.cos(f))/(Math.sin(f)*Math.cos(o)),g=(Math.sin(o)-Math.sin(s)*Math.cos(f))/(Math.sin(f)*Math.cos(s)),y=Math.acos(Math.min(Math.max(d,-1),1)),v=Math.acos(Math.min(Math.max(g,-1),1)),m=l-(Math.sin(u-a)>0?y:2*en-y),_=(Math.sin(u-a)>0?2*en-v:v)-c;if(0==Math.sin(m)&&0==Math.sin(_)||Math.sin(m)*Math.sin(_)<0)return null;let b=-Math.cos(m)*Math.cos(_)+Math.sin(m)*Math.sin(_)*Math.cos(f),w=Math.atan2(Math.sin(f)*Math.sin(m)*Math.sin(_),Math.cos(_)+Math.cos(m)*b),x=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(l),-1),1)),E=a+Math.atan2(Math.sin(l)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(x)),I=x.toDegrees(),S=E.toDegrees();return new t(I,S)}crossTrackDistanceTo(e,n,r=6371e3){e instanceof t||(e=t.parse(e)),n instanceof t||(n=t.parse(n));let i=r;if(this.equals(e))return 0;let o=e.distanceTo(this,i)/i,a=e.initialBearingTo(this).toRadians(),s=e.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(e,n,r=6371e3){e instanceof t||(e=t.parse(e)),n instanceof t||(n=t.parse(n));let i=r;if(this.equals(e))return 0;let o=e.distanceTo(this,i)/i,a=e.initialBearingTo(this).toRadians(),s=e.initialBearingTo(n).toRadians(),u=Math.asin(Math.sin(o)*Math.sin(a-s));return Math.acos(Math.cos(o)/Math.abs(Math.cos(u)))*Math.sign(Math.cos(s-a))*i}maxLatitude(t){let e=Number(t).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(e)*Math.cos(n))).toDegrees()}static crossingParallels(t,e,n){if(t.equals(e))return null;let r=Number(n).toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians(),a=e.lat.toRadians(),s=e.lon.toRadians()-o,u=Math.sin(i)*Math.cos(a)*Math.cos(r)*Math.sin(s),l=Math.sin(i)*Math.cos(a)*Math.cos(r)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(r),c=Math.cos(i)*Math.cos(a)*Math.sin(r)*Math.sin(s);if(c*c>u*u+l*l)return null;let p=Math.atan2(-l,u),h=Math.acos(c/Math.sqrt(u*u+l*l)),f=o+p+h,d=(o+p-h).toDegrees(),g=f.toDegrees();return{lon1:nr.wrap180(d),lon2:nr.wrap180(g)}}rhumbDistanceTo(e,n=6371e3){e instanceof t||(e=t.parse(e));let r=n,i=this.lat.toRadians(),o=e.lat.toRadians(),a=o-i,s=Math.abs(e.lon-this.lon).toRadians();Math.abs(s)>en&&(s=s>0?-(2*en-s):2*en+s);let u=Math.log(Math.tan(o/2+en/4)/Math.tan(i/2+en/4)),l=Math.abs(u)>1e-11?a/u:Math.cos(i);return Math.sqrt(a*a+l*l*s*s)*r}rhumbBearingTo(e){if(e instanceof t||(e=t.parse(e)),this.equals(e))return NaN;let n=this.lat.toRadians(),r=e.lat.toRadians(),i=(e.lon-this.lon).toRadians();Math.abs(i)>en&&(i=i>0?-(2*en-i):2*en+i);let o=Math.log(Math.tan(r/2+en/4)/Math.tan(n/2+en/4)),a=Math.atan2(i,o).toDegrees();return nr.wrap360(a)}rhumbDestinationPoint(e,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(n).toRadians(),s=e/r,u=s*Math.cos(a),l=i+u;Math.abs(l)>en/2&&(l=l>0?en-l:-en-l);let c=Math.log(Math.tan(l/2+en/4)/Math.tan(i/2+en/4)),p=Math.abs(c)>1e-11?u/c:Math.cos(i),h=o+s*Math.sin(a)/p,f=l.toDegrees(),d=h.toDegrees();return new t(f,d)}rhumbMidpointTo(e){e instanceof t||(e=t.parse(e));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians();Math.abs(o-r)>en&&(r+=2*en);let a=(n+i)/2,s=Math.tan(en/4+n/2),u=Math.tan(en/4+i/2),l=Math.tan(en/4+a/2),c=((o-r)*Math.log(l)+r*Math.log(u)-o*Math.log(s))/Math.log(u/s);isFinite(c)||(c=(r+o)/2);let p=a.toDegrees(),h=c.toDegrees();return new t(p,h)}static areaOf(t,e=6371e3){let n=e,r=t[0].equals(t[t.length-1]);r||t.push(t[0]);let i=t.length-1,o=0;for(let e=0;e<i;e++){let n=t[e].lat.toRadians(),r=t[e+1].lat.toRadians(),i=(t[e+1].lon-t[e].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}s(t)&&(o=Math.abs(o)-2*en);let a=Math.abs(o*n*n);return r||t.pop(),a;function s(t){let e=0,n=t[0].initialBearingTo(t[1]);for(let r=0;r<t.length-1;r++){let i=t[r].initialBearingTo(t[r+1]),o=t[r].finalBearingTo(t[r+1]);e+=(i-n+540)%360-180,e+=(o-i+540)%360-180,n=o}return e+=(t[0].initialBearingTo(t[1])-n+540)%360-180,Math.abs(e)<90}}equals(e){return e instanceof t||(e=t.parse(e)),!(Math.abs(this.lat-e.lat)>Number.EPSILON||Math.abs(this.lon-e.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(t="d",e){if(!["d","dm","dms","n"].includes(t))throw new RangeError("invalid format ‘".concat(t,"’"));if("n"==t)return null==e&&(e=4),"".concat(this.lat.toFixed(e),",").concat(this.lon.toFixed(e));let n=nr.toLat(this.lat,t,e),r=nr.toLon(this.lon,t,e);return"".concat(n,", ").concat(r)}};a(wt,"LatLonSpherical");var So,Ks,Up,vn=wt,Gp=class t{constructor(t,e){Ne(this,So,void 0),Ne(this,Ks,{}),Ne(this,Up,void 0),A(this,"id",""),A(this,"group",""),A(this,"name",""),A(this,"shortName",""),A(this,"elevation",0),A(this,"subtitle"),A(this,"scale",0),A(this,"layers"),A(this,"x_scale"),A(this,"perspectiveId"),A(this,"scene"),A(this,"width",0),A(this,"height",0),A(this,"georeference",[]),A(this,"_scale",0),De(this,So,t),De(this,Up,e),Object.assign(this,e),this._scale=tI(this),this.scale=this.x_scale||1/this._scale}get polygons(){var t,e,n;return null!=(n=null==(e=null==(t=di.instances.get(B(this,So)))?void 0:t.polygonsByMapId)?void 0:e.get(this.id))?n:[]}get locations(){var t,e,n;return null!=(n=null==(e=null==(t=di.instances.get(B(this,So)))?void 0:t.locationsByMapId)?void 0:e.get(this.id))?n:[]}get nodes(){var t,e,n;return null!=(n=null==(e=null==(t=di.instances.get(B(this,So)))?void 0:t.nodesByMapId)?void 0:e.get(this.id))?n:[]}get mapGroup(){let t=B(this,Ks).mapGroup;if(typeof t<"u")return t;let e=this.group,n=e&&B(this,So)._mapGroupsById[e]||null;return B(this,Ks).mapGroup=n,n}createCoordinateByXY(t,e){return new ju({x:t,y:e,map:this,mappedin:B(this,So)})}createCoordinate(t,e){return new ju({lat:t,lon:e,map:this,mappedin:B(this,So)})}getNorth(){let t;try{let e=this.georeference[0],n=this.georeference[2],r=new vn(e.target.x,e.target.y),i=new vn(n.target.x,n.target.y);t=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-e.control.y,n.control.x-e.control.x)-Math.PI/2)}catch(e){t=0,He.warn(e),He.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return t}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){var n;let r=e.options.things.maps.slice();e.options.perspective&&fn(r,"perspectives"),e.options.things.mapGroups&&fn(r,"group"),fn(r,"elevation"),fn(r,"x_scale"),fn(r,"scale"),fn(r,"georeference");let i={fields:r,perspective:e.options.perspective,venue:e.options.venue};try{let s=await pn(e.options,"map",i),u=a((t=>{let e=o.layers.find((e=>e.id===t));e?e.visible=!0:o.layers.push({id:t,visible:!0})}),"setVisibleLayer");for(let i=0,a=s.length;i<a;++i){var o=s[i];if(o){let t=o.perspective;null!=t&&(o.perspectiveId=t.id,r.indexOf("scene")>-1&&(o.scene=t.scene),t.layers?(o.layers.forEach((t=>{t.visible=!1})),t.layers.forEach(u)):o.layers.forEach((t=>{t.visible=!0}))),delete o.perspective}if(e.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let t=await hs()(o.scene.polygons);o.scene.polygons=await t.json()}s[i]=new t(e,o)}return s}catch(t){return He.error("Fetch Maps:",t),[]}}get center(){if(B(this,Ks).center)return B(this,Ks).center;let[t,e]=[this.georeference[0].control.x,this.georeference[0].control.y],[n,r]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(t,e),{lat:a,lon:s}=this.createCoordinateByXY(n,r),u=new vn(i,o),l=new vn(a,s),c=u.midPointTo(l);return B(this,Ks).center=c,c}toJSON(){return B(this,Up)}};So=new WeakMap,Ks=new WeakMap,Up=new WeakMap,a(Gp,"MappedinMap");var qp=Gp;m();var Vp,Q1,Xp,$1,Yp,Wp,jg,rI,zg,nI,Io,Po,Co,ko,eb=class{constructor(t){Ne(this,Vp),Ne(this,Xp),Ne(this,jg),Ne(this,zg),A(this,"map"),Ne(this,Yp,{}),Ne(this,Wp,void 0),Ne(this,Io,void 0),Ne(this,Po,void 0),Ne(this,Co,void 0),Ne(this,ko,void 0);let{map:e,mappedin:n}=t;null!=t.lat&&null!=t.lon&&(De(this,Io,t.lat),De(this,Po,t.lon)),null!=t.x&&null!=t.y&&(De(this,Co,t.x),De(this,ko,t.y)),this.map=e,De(this,Wp,n)}get x(){return Hr(this,Xp,$1).call(this,"x")}get y(){return Hr(this,Xp,$1).call(this,"y")}get lat(){return Hr(this,Vp,Q1).call(this,"lat")}get lon(){return Hr(this,Vp,Q1).call(this,"lon")}absoluteDistanceTo(t){return iI([t.lat,t.lon],[this.lat,this.lon])}get nearestNode(){let t=B(this,Yp).nearestNode;if(typeof t<"u")return t;let e=di.instances.get(B(this,Wp)).findNearestNodeOnMap(this.map.id,this);return B(this,Yp).nearestNode=e,e}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Vp=new WeakSet,Q1=a((function(t){if(typeof B(this,Io)<"u"&&typeof B(this,Po)<"u")return B(this,"lat"===t?Io:Po);if(typeof B(this,Co)<"u"&&typeof B(this,ko)<"u"){let[e,n]=Hr(this,zg,nI).call(this,B(this,Co),B(this,ko));return De(this,Io,e),De(this,Po,n),B(this,"lat"===t?Io:Po)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Xp=new WeakSet,$1=a((function(t){if(B(this,Co)&&B(this,ko))return B(this,"x"===t?Co:ko);if(null!=B(this,Io)&&null!=B(this,Po)){let[e,n]=Hr(this,jg,rI).call(this,B(this,Io),B(this,Po));return De(this,Co,e),De(this,ko,n),B(this,"x"===t?Co:ko)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Yp=new WeakMap,Wp=new WeakMap,jg=new WeakSet,rI=a((function(t,e){let n=this.map.georeference[0],r=new vn(n.target.x,n.target.y),i=new vn(t,e),o=r.distanceTo(i),a=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),u=a+this.map.getNorth(),l=Math.sin(u)*s,c=Math.cos(u)*s;return[n.control.x+l,n.control.y-c]}),"#latLonToXY"),zg=new WeakSet,nI=a((function(t,e){let n,r=this.map.georeference[0],i=new vn(r.target.x,r.target.y),o=t-r.control.x,a=r.control.y-e,s=Math.atan2(o,a);n=0===o&&0===a?0:0===o?a:o/Math.sin(s);let u=s-this.map.getNorth(),l=n/this.map._scale,c=i.destinationPoint(l,180*u/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),Io=new WeakMap,Po=new WeakMap,Co=new WeakMap,ko=new WeakMap,a(eb,"MappedinCoordinate");var ju=eb;m();var Jp,Vl,Zp,Hp=class t{constructor(t,e){Ne(this,Jp,void 0),Ne(this,Vl,void 0),Ne(this,Zp,{}),A(this,"id",""),A(this,"name",""),De(this,Vl,e),De(this,Jp,t),Object.assign(this,e)}get maps(){let t=B(this,Zp).maps;if(typeof t<"u")return t;let e=[],{maps:n}=B(this,Jp),{id:r}=B(this,Vl);for(let t=0,i=n.length;t<i;++t){let i=n[t];i.group===r&&e.push(i)}return B(this,Zp).maps=e,e}static hydrate(e,n){return e.map((e=>new t(n,e)))}static async fetch(e){let n={fields:e.options.things.mapGroups.slice(),venue:e.options.venue};try{return(await pn(e.options,"map-group",n)).map((n=>new t(e,n)))}catch(t){return He.error("Fetch Map Groups:",t),[]}}toJSON(){return B(this,Vl)}};Jp=new WeakMap,Vl=new WeakMap,Zp=new WeakMap,a(Hp,"MappedinMapGroup");var Kp=Hp;m(),m(),m();var zu,Za,Qa,tb=[0,4,6,8,10],vs=a((()=>{let t=new Array(16).fill(0),e=4294967296*Math.random();for(let n=0;n<t.length;n++)n>0&&!(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;let n=t.map((t=>t.toString(16).padStart(2,"0")));return n[6]="4"+n[6][1],n[8]=["8","9","a","b"].includes(n[7][0])?n[7]:"a"+n[7][1],tb.map(((t,e)=>n.slice(t,e===tb.length-1?void 0:tb[e+1]).join(""))).join("-")}),"randomId"),aI="mi-session-data",oI="mi-local-data",Qp=class t{constructor(){Ne(this,Za,void 0),Ne(this,Qa,void 0);try{let t=sessionStorage.getItem(aI);De(this,Za,t?JSON.parse(t):{id:vs()})}catch{De(this,Za,{id:vs()})}try{let t=localStorage.getItem(oI);De(this,Qa,t?JSON.parse(t):{deviceId:vs()})}catch{De(this,Qa,{deviceId:vs()})}B(this,Za).id||(B(this,Za).id=vs()),B(this,Qa).deviceId||(B(this,Qa).deviceId=vs())}static getInstance(){return B(this,zu)||De(this,zu,new t),B(this,zu)}static ___clearInstance(){De(this,zu,void 0)}saveSessionData(t,e){B(this,Za)[t]=e;try{return sessionStorage.setItem(aI,JSON.stringify(B(this,Za))),!0}catch{return!1}}loadSessionData(t){let e=B(this,Za)[t];if(null!=e)return e}saveLocalData(t,e){B(this,Qa)[t]=e;try{return localStorage.setItem(oI,JSON.stringify(B(this,Qa))),!0}catch{return!1}}loadLocalData(t){let e=B(this,Qa)[t];if(null!=e)return e}};zu=new WeakMap,Za=new WeakMap,Qa=new WeakMap,a(Qp,"SafeStorage"),Ne(Qp,zu,void 0);var $p=Qp;function Gg(t){return/^[\da-f]{24}$/i.test(t)}function sI(t,e=!1){let n="";if(null!=t){let r="?",i=e?Object.keys(t).filter((t=>!["slug","venue"].includes(t))):Object.keys(t);for(let e=0,o=i.length;e<o;++e){let o=i[e],a=t[o];null!=a&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),r="&")}}return n}function n3(t,e,n,r=!1){var i,o;return r?"".concat(t.supplementaryUrl).concat(e,"?venue=").concat(n.venue||n.slug):null!=(i=t.baseUrl)&&i.includes("gateway")?"".concat(t.baseUrl).concat(e,"/").concat(n.venue||n.slug).concat(sI(n,null==(o=t.baseUrl)?void 0:o.includes("gateway"))):t.baseUrl+e+sI(n)}async function pn(t,e,n,r=!1){return ql(t,e,n,r,!0)}async function ql(t,e,n,r=!1,i=!1){let o=n3(t,e,n,r),a=await rb(t,o,r);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function i3(t,e,n=!1){let r={language:t.language,clientId:t.clientId,clientSecret:t.clientSecret};n&&delete r.language,r.language&&(e+="&lang=".concat(encodeURIComponent(r.language)));let{headers:i}=t;i["Content-Type"]=i["Content-Type"]||"text/json",t.accessToken?i.Authorization="Bearer ".concat(t.accessToken):t.noAuth||t.clientId&&t.clientSecret&&(i["x-mappedin-key"]=btoa(t.clientId),i["x-mappedin-secret"]=btoa(t.clientSecret)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return t.secure&&(e+="&withcdntoken"),{req:o,url:e}}async function rb(t,e,n=!1){let r=i3(t,e,n),i=await hs()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function fn(t,e){t.indexOf(e)<0&&t.push(e)}function iI([t,e],[n,r]){let i=new vn(t,e),o=new vn(n,r);return i.distanceTo(o)}function tI(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale);let e;try{let n=t.georeference[0],r=t.georeference[2],i=new vn(n.target.x,n.target.y),o=new vn(r.target.x,r.target.y),a=i.distanceTo(o),s=n.control.x-r.control.x,u=n.control.y-r.control.y;e=Math.sqrt(s*s+u*u)/a}catch(n){e=1,He.warn(n),He.warn("Couldn't georeference ".concat(t.name||t.shortName||t.id,". Probably not enough geocoordinates."))}return e}function df(t){var e;return t instanceof Du?t.entrances.map((t=>t.id)):t instanceof ds?(null==(e=t.nodes)?void 0:e.map((t=>t.id)))||[]:[t.id]}async function uI(t){let e={},{maps:n,images:r,scenes:i,polygons:o}=t;if(null!=r)try{let t=Object.keys(r).map((t=>fetch("data:image/png;base64,".concat(r[t])).then((t=>t.blob())).then((n=>{e[t]=n})).catch((t=>{He.error(t)}))));await Promise.all(t)}catch(t){He.error(t)}return n.forEach((t=>{var n;(null!=(n=t.scene)&&n.polygons||i[t.id])&&(null!=i&&i[t.id]&&(t.scene||(t.scene={}),Object.defineProperty(t.scene,"polygons",{get:()=>i[t.id]})),null!=r&&(t.scene.images=t.scene.images.map((({filename:t})=>({filename:t,url:e[t]}))),t.scene.polygons.forEach((t=>{var n,r;if(null!=(n=null==t?void 0:t.image)&&n.url&&null!=(r=null==t?void 0:t.image)&&r.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}}))))})),null!=r&&o.forEach((t=>{var n;if(null!=(n=null==t?void 0:t.image)&&n.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}})),null!=t.images&&delete t.images,null!=t.scenes&&delete t.scenes,t}function Xl(t,e,n){let r;return function(...i){let o=this,s=a((function(){r=null,n||t.apply(o,i)}),"later"),u=n&&!r;clearTimeout(r),r=setTimeout(s,e),u&&t.apply(o,i)}}function lI(t,e,n,r=0){if(!t||t<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,a=1+(n-t)/(n-e)+i;return Math.max(1+o,Math.min(2-o,a))}function Dg(){return $p.getInstance().loadLocalData("deviceId")}function Fg(){return $p.getInstance().loadSessionData("id")}a(Gg,"isGatewayKey"),a(sI,"stringifyQuery"),a(n3,"buildUrl"),a(pn,"getArray"),a(ql,"getObject"),a(i3,"constructParamsForRequest"),a(rb,"generateAPIRequest"),a(fn,"addToSet"),a(iI,"getDistanceBetweenLatLon"),a(tI,"getMapScale"),a(df,"getNodesForNavigatable"),a(uI,"populateBundledImagesAsBlobs"),a(Xl,"debounce"),a(lI,"normalizeCategoryRank"),a(Dg,"getDeviceID"),a(Fg,"getSessionID");var cI=a(((t,e)=>{if("string"==typeof t){if(void 0===e||!Array.isArray(e.polygons))return null;t=e.polygons.find((function(e){return e.id===t}))}let n=null;if(null!=t&&void 0!==t.locations&&t.locations.length>0){n=t.locations[0];for(let e=0,r=t.locations.length;e<r;e++){let r=t.locations[e];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(t)&&(n=r);if(void 0===r.parent&&r.polygons.includes(t))return r}}return n}),"getPrimaryLocationForPolygon");function nb(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return fI(this.cover(e,n),e,n,t)}function fI(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,l,c,p,h,f=t._root,d={data:r},g=t._x0,y=t._y0,v=t._x1,m=t._y1;if(!f)return t._root=d,t;for(;f.length;)if((l=e>=(o=(g+v)/2))?g=o:v=o,(c=n>=(a=(y+m)/2))?y=a:m=a,i=f,!(f=f[p=c<<1|l]))return i[p]=d,t;if(s=+t._x.call(null,f.data),u=+t._y.call(null,f.data),e===s&&n===u)return d.next=f,i?i[p]=d:t._root=d,t;do{i=i?i[p]=new Array(4):t._root=new Array(4),(l=e>=(o=(g+v)/2))?g=o:v=o,(c=n>=(a=(y+m)/2))?y=a:m=a}while((p=c<<1|l)==(h=(u>=a)<<1|s>=o));return i[h]=f,i[p]=d,t}function pI(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,l=1/0,c=-1/0,p=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<u&&(u=r),r>c&&(c=r),i<l&&(l=i),i>p&&(p=i));if(u>c||l>p)return this;for(this.cover(u,l).cover(c,p),n=0;n<o;++n)fI(this,a[n],s[n],t[n]);return this}function ib(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,u=i-n||1,l=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,a=new Array(4),a[s]=l,l=a,u*=2,s){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function ab(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t}function ob(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ln(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function sb(t,e,n){var r,i,o,a,s,u,l,c=this._x0,p=this._y0,h=this._x1,f=this._y1,d=[],g=this._root;for(g&&d.push(new Ln(g,c,p,h,f)),null==n?n=1/0:(c=t-n,p=e-n,h=t+n,f=e+n,n*=n);u=d.pop();)if(!(!(g=u.node)||(i=u.x0)>h||(o=u.y0)>f||(a=u.x1)<c||(s=u.y1)<p))if(g.length){var y=(i+a)/2,v=(o+s)/2;d.push(new Ln(g[3],y,v,a,s),new Ln(g[2],i,v,y,s),new Ln(g[1],y,o,a,v),new Ln(g[0],i,o,y,v)),(l=(e>=v)<<1|t>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-l],d[d.length-1-l]=u)}else{var m=t-+this._x.call(null,g.data),_=e-+this._y.call(null,g.data),b=m*m+_*_;if(b<n){var w=Math.sqrt(n=b);c=t-w,p=e-w,h=t+w,f=e+w,r=g.data}}return r}function ub(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,l,c,p,h,f=this._root,d=this._x0,g=this._y0,y=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((l=o>=(s=(d+y)/2))?d=s:y=s,(c=a>=(u=(g+v)/2))?g=u:v=u,e=f,!(f=f[p=c<<1|l]))return this;if(!f.length)break;(e[p+1&3]||e[p+2&3]||e[p+3&3])&&(n=e,h=p)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[p]=i:delete e[p],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f),this):(this._root=i,this)}function hI(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function lb(){return this._root}function cb(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t}function fb(t){var e,n,r,i,o,a,s=[],u=this._root;for(u&&s.push(new Ln(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&u.length){var l=(r+o)/2,c=(i+a)/2;(n=u[3])&&s.push(new Ln(n,l,c,o,a)),(n=u[2])&&s.push(new Ln(n,r,c,l,a)),(n=u[1])&&s.push(new Ln(n,l,i,o,c)),(n=u[0])&&s.push(new Ln(n,r,i,l,c))}return this}function pb(t){var e,n=[],r=[];for(this._root&&n.push(new Ln(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,u=e.x1,l=e.y1,c=(a+u)/2,p=(s+l)/2;(o=i[0])&&n.push(new Ln(o,a,s,c,p)),(o=i[1])&&n.push(new Ln(o,c,s,u,p)),(o=i[2])&&n.push(new Ln(o,a,p,c,l)),(o=i[3])&&n.push(new Ln(o,c,p,u,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this}function dI(t){return t[0]}function hb(t){return arguments.length?(this._x=t,this):this._x}function gI(t){return t[1]}function db(t){return arguments.length?(this._y=t,this):this._y}function eh(t,e,n){var r=new gb(null==e?dI:e,null==n?gI:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function gb(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function vI(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}m(),m(),m(),m(),a(nb,"default"),a(fI,"add"),a(pI,"addAll"),m(),a(ib,"default"),m(),a(ab,"default"),m(),a(ob,"default"),m(),m(),a(Ln,"default"),a(sb,"default"),m(),a(ub,"default"),a(hI,"removeAll"),m(),a(lb,"default"),m(),a(cb,"default"),m(),a(fb,"default"),m(),a(pb,"default"),m(),a(dI,"defaultX"),a(hb,"default"),m(),a(gI,"defaultY"),a(db,"default"),a(eh,"quadtree"),a(gb,"Quadtree"),a(vI,"leaf_copy");var Ci=eh.prototype=gb.prototype;Ci.copy=function(){var t,e,n=new gb(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=vI(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=vI(e));return n},Ci.add=nb,Ci.addAll=pI,Ci.cover=ib,Ci.data=ab,Ci.extent=ob,Ci.find=sb,Ci.remove=ub,Ci.removeAll=hI,Ci.root=lb,Ci.size=cb,Ci.visit=fb,Ci.visitAfter=pb,Ci.x=hb,Ci.y=db;var Oo,wn,$a=class t{constructor(t){Ne(this,Oo,void 0),A(this,"categories"),A(this,"locations"),A(this,"vortexes"),A(this,"maps"),A(this,"nodes"),A(this,"polygons"),A(this,"events"),A(this,"mapGroups"),A(this,"locationStates"),A(this,"rankings"),A(this,"languages",{}),Ne(this,wn,{}),De(this,Oo,t)}get polygonsByMapId(){if(B(this,wn).polygonsByMapId)return B(this,wn).polygonsByMapId;let t,e={};for(let n=0,r=B(this,Oo).polygons.length;n<r;++n)t=B(this,Oo).polygons[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return B(this,wn).polygonsByMapId=n,B(this,wn).polygonsByMapId}get nodesByMapId(){if(B(this,wn).nodesByMapId)return B(this,wn).nodesByMapId;let t,e={};for(let n=0,r=B(this,Oo).nodes.length;n<r;++n)t=B(this,Oo).nodes[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return B(this,wn).nodesByMapId=n,B(this,wn).nodesByMapId}findNearestNodeOnMap(t,e){var n;if(B(this,wn).nodeTreesByMap||(B(this,wn).nodeTreesByMap=new Map),!B(this,wn).nodeTreesByMap.has(t)){let e=null!=(n=this.nodesByMapId.get(t))?n:[],r=eh();r.x((t=>t.x)),r.y((t=>t.y)),r.addAll(e),B(this,wn).nodeTreesByMap.set(t,r)}return B(this,wn).nodeTreesByMap.get(t).find(e.x,e.y)}get locationsByMapId(){if(B(this,wn).locationsByMapId)return B(this,wn).locationsByMapId;let t,e={};for(let n=0,r=B(this,Oo).locations.length;n<r;++n){t=B(this,Oo).locations[n];for(let n=0,r=t.polygons.length;n<r;++n)e[t.polygons[n].map.id]||(e[t.polygons[n].map.id]=[]),-1===e[t.polygons[n].map.id].indexOf(t)&&e[t.polygons[n].map.id].push(t);for(let n=0,r=t.nodes.length;n<r;++n){let r=t.nodes[n];e[r.map.id]||(e[r.map.id]=[]),-1===e[r.map.id].indexOf(t)&&e[r.map.id].push(t)}}let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return B(this,wn).locationsByMapId=n,B(this,wn).locationsByMapId}static create(e){return t.instances.has(e)||t.instances.set(e,new t(e)),t.instances.get(e)}static clear(){t.instances.clear()}static clearInstance(e){t.instances.has(e)&&t.instances.delete(e)}};Oo=new WeakMap,wn=new WeakMap,a($a,"MappedinCache"),A($a,"instances",new Map);var vb=$a,di=vb,Gu={categories:Bu,locations:ds,vortexes:xp,maps:qp,nodes:pp,polygons:Du,venue:Gl,events:Rp,mapGroups:Kp,themes:Bg,locationStates:jp,rankings:Tp};m(),m(),m(),m();var Rn=6371008.8,mI={centimeters:100*Rn,centimetres:100*Rn,degrees:Rn/111325,feet:3.28084*Rn,inches:39.37*Rn,kilometers:Rn/1e3,kilometres:Rn/1e3,meters:Rn,metres:Rn,miles:Rn/1609.344,millimeters:1e3*Rn,millimetres:1e3*Rn,nauticalmiles:Rn/1852,radians:1,yards:1.0936*Rn},b7={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Rn,yards:1.0936133};function Dn(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function mr(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!No(t[0])||!No(t[1]))throw new Error("coordinates must contain numbers");return Dn({type:"Point",coordinates:t},e,n)}function Rr(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];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.")}return Dn({type:"Polygon",coordinates:t},e,n)}function tn(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return Dn({type:"LineString",coordinates:t},e,n)}function Et(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function qu(t,e,n){return void 0===n&&(n={}),Dn({type:"MultiLineString",coordinates:t},e,n)}function mb(t,e,n){return void 0===n&&(n={}),Dn({type:"MultiPoint",coordinates:t},e,n)}function th(t,e){void 0===e&&(e="kilometers");var n=mI[e];if(!n)throw new Error(e+" units is invalid");return t*n}function rh(t,e){void 0===e&&(e="kilometers");var n=mI[e];if(!n)throw new Error(e+" units is invalid");return t/n}function Uu(t){return 180*(t%(2*Math.PI))/Math.PI}function Yn(t){return t%360*Math.PI/180}function No(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function En(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,p=0,h=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,y=d?t.features.length:1,v=0;v<y;v++){s=(c=!!(l=d?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var m=0;m<s;m++){var _=0,b=0;if(null!==(a=c?l.geometries[m]:l)){u=a.coordinates;var w=a.type;switch(p=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,h,v,_,b))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,v,_,b))return!1;h++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-p;i++){if(!1===e(u[r][i],h,v,_,b))return!1;h++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(b=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-p;o++){if(!1===e(u[r][i][o],h,v,_,b))return!1;h++}b++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===En(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function yI(t,e,n,r){var i=n;return En(t,(function(t,r,o,a,s){i=0===r&&void 0===n?t:e(i,t,r,o,a,s)}),r),i}function Or(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function To(t,e){var n,r,i,o,a,s,u,l,c,p,h=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(s=f?t.features[n].geometry:d?t.geometry:t,l=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,p=f?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,p))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,p))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,p))return!1;h++}}function gi(t,e){To(t,(function(t,n,r,i,o){var a,s=null===t?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Dn(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<t.coordinates.length;u++){var l=t.coordinates[u];if(!1===e(Dn({type:a,coordinates:l},r),n,u))return!1}}))}function qg(t,e){gi(t,(function(t,n,r){var i=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,u=0,l=0;if(!1===En(t,(function(o,c,p,h,f){if(void 0===a||n>s||h>u||f>l)return a=o,s=n,u=h,l=f,void(i=0);var d=tn([a,o],t.properties);if(!1===e(d,n,r,f,i))return!1;i++,a=o})))return!1}}}))}function _I(t,e,n){var r=n,i=!1;return qg(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function yb(t){var e=[1/0,1/0,-1/0,-1/0];return En(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}a(Dn,"feature"),a(mr,"point"),a(Rr,"polygon"),a(tn,"lineString"),a(Et,"featureCollection"),a(qu,"multiLineString"),a(mb,"multiPoint"),a(th,"radiansToLength"),a(rh,"lengthToRadians"),a(Uu,"radiansToDegrees"),a(Yn,"degreesToRadians"),a(No,"isNumber"),a(En,"coordEach"),a(yI,"coordReduce"),a(Or,"featureEach"),a(To,"geomEach"),a(gi,"flattenEach"),a(qg,"segmentEach"),a(_I,"segmentReduce"),a(yb,"bbox"),yb.default=yb;var Wn=yb;function nn(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Nr(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function _b(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function oi(t){return"Feature"===t.type?t.geometry:t}function ia(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}m(),m(),m(),m(),a(nn,"getCoord"),a(Nr,"getCoords"),a(_b,"featureOf"),a(oi,"getGeom"),a(ia,"getType");var p3=wr(Ug(),1);m();var E3=wr(BI(),1);function Hn(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=nn(t),i=oi(e),o=i.type,a=e.bbox,s=i.coordinates;if(a&&!1===x3(r,a))return!1;"Polygon"===o&&(s=[s]);for(var u=!1,l=0;l<s.length&&!u;l++)if(jI(r,s[l][0],n.ignoreBoundary)){for(var c=!1,p=1;p<s[l].length&&!c;)jI(r,s[l][p],!n.ignoreBoundary)&&(c=!0),p++;c||(u=!0)}return u}function jI(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],u=e[o][0],l=e[o][1];if(t[1]*(a-u)+s*(u-t[0])+l*(t[0]-a)==0&&(a-t[0])*(u-t[0])<=0&&(s-t[1])*(l-t[1])<=0)return!n;s>t[1]!=l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(r=!r)}return r}function x3(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function M3(t,e,n){void 0===n&&(n={});var r=nn(t),i=nn(e),o=Yn(i[1]-r[1]),a=Yn(i[0]-r[0]),s=Yn(r[1]),u=Yn(i[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(u);return th(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),n.units)}m(),m(),a(Hn,"booleanPointInPolygon"),a(jI,"inRing"),a(x3,"inBBox"),m(),m(),a(M3,"distance");var Kr=M3;m();var CW=function(){function t(t,e,n){this.a=t,this.b=e,this.c=n;var r,i,o=e.x-t.x,a=e.y-t.y,s=n.x-t.x,u=n.y-t.y,l=o*(t.x+e.x)+a*(t.y+e.y),c=s*(t.x+n.x)+u*(t.y+n.y),p=2*(o*(n.y-e.y)-a*(n.x-e.x));this.x=(u*l-a*c)/p,this.y=(o*c-s*l)/p,r=this.x-t.x,i=this.y-t.y,this.r=r*r+i*i}return a(t,"Triangle"),t}();m(),m(),m(),m();var S3=wr(GI(),1),I3=wr(UI(),1);m();var T3=wr(Ab(),1);m(),m(),m(),m(),m();var KH=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var n=this.points[e],r=this.points[e+1];this.centers.push({x:(n.x+r.x)/2,y:(n.y+r.y)/2,z:(n.z+r.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(e=0;e<this.centers.length-1;e++){var i=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,a=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+a)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+a)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}return a(t,"Spline"),t.prototype.cacheSteps=function(t){var e=[],n=this.pos(0);e.push(0);for(var r=0;r<this.duration;r+=10){var i=this.pos(r);Math.sqrt((i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y)+(i.z-n.z)*(i.z-n.z))>t&&(e.push(r),n=i)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var r=Math.floor((this.points.length-1)*n);return A3((this.length-1)*n-r,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])},t}();function A3(t,e,n,r,i){var o=L3(t);return{x:i.x*o[0]+r.x*o[1]+n.x*o[2]+e.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+e.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+e.z*o[3]}}function L3(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function oh(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),i=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r];return Rr([[a,[i,r],[i,o],[n,o],a]],e.properties,{bbox:t,id:e.id})}function R3(t){return oh(Wn(t))}a(A3,"bezier"),a(L3,"B"),m(),m(),m(),m(),a(oh,"bboxPolygon"),a(R3,"envelope");var Lb=R3;function Ao(t,e,n,r){void 0===r&&(r={});var i=nn(t),o=Yn(i[0]),a=Yn(i[1]),s=Yn(n),u=rh(e,r.units),l=Math.asin(Math.sin(a)*Math.cos(u)+Math.cos(a)*Math.sin(u)*Math.cos(s));return mr([Uu(o+Math.atan2(Math.sin(s)*Math.sin(u)*Math.cos(a),Math.cos(u)-Math.sin(a)*Math.sin(l))),Uu(l)],r.properties)}function ys(t,e,n){if(void 0===n&&(n={}),!0===n.final)return D3(t,e);var r=nn(t),i=nn(e),o=Yn(r[0]),a=Yn(i[0]),s=Yn(r[1]),u=Yn(i[1]),l=Math.sin(a-o)*Math.cos(u),c=Math.cos(s)*Math.sin(u)-Math.sin(s)*Math.cos(u)*Math.cos(a-o);return Uu(Math.atan2(l,c))}function D3(t,e){var n=ys(e,t);return n=(n+180)%360}function F3(t,e){void 0===e&&(e={});var n=Wn(t);return mr([(n[0]+n[2])/2,(n[1]+n[3])/2],e.properties,e)}m(),m(),m(),a(Ao,"destination"),m(),m(),a(ys,"bearing"),a(D3,"calculateFinalBearing"),m(),a(F3,"center");var Vu=F3;m(),m(),m(),m(),m();var ej=wr(QI(),1);function tj(t){if(!t)throw new Error("geojson is required");var e=[];return gi(t,(function(t){rj(t,e)})),Et(e)}function rj(t,e){var n=[],r=t.geometry;if(null!==r){switch(r.type){case"Polygon":n=Nr(r);break;case"LineString":n=[Nr(r)]}n.forEach((function(n){nj(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}}function nj(t,e){var n=[];return t.reduce((function(t,r){var i=tn([t,r],e);return i.bbox=ij(t,r),n.push(i),r})),n}function ij(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}m(),m(),m(),m(),a(tj,"lineSegment"),a(rj,"lineSegmentFeature"),a(nj,"createSegments"),a(ij,"bbox");var Yu=tj,gP=wr(sv(),1);function Nj(t,e){var n={},r=[];if("LineString"===t.type&&(t=Dn(t)),"LineString"===e.type&&(e=Dn(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=dP(t,e);return i&&r.push(i),Et(r)}var o=(0,gP.default)();return o.load(Yu(e)),Or(Yu(t),(function(t){Or(o.search(t),(function(e){var i=dP(t,e);if(i){var o=Nr(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Et(r)}function dP(t,e){var n=Nr(t),r=Nr(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],a=n[1][0],s=n[1][1],u=r[0][0],l=r[0][1],c=r[1][0],p=r[1][1],h=(p-l)*(a-i)-(c-u)*(s-o);if(0===h)return null;var f=((c-u)*(o-l)-(p-l)*(i-u))/h,d=((a-i)*(o-l)-(s-o)*(i-u))/h;return f>=0&&f<=1&&d>=0&&d<=1?mr([i+f*(a-i),o+f*(s-o)]):null}a(Nj,"lineIntersect"),a(dP,"intersects");var Wu=Nj;function Tj(t,e,n){void 0===n&&(n={});var r=mr([1/0,1/0],{dist:1/0}),i=0;return gi(t,(function(t){for(var o=Nr(t),a=0;a<o.length-1;a++){var s=mr(o[a]);s.properties.dist=Kr(e,s,n);var u=mr(o[a+1]);u.properties.dist=Kr(e,u,n);var l=Kr(s,u,n),c=Math.max(s.properties.dist,u.properties.dist),p=ys(s,u),h=Ao(e,c,p+90,n),f=Ao(e,c,p-90,n),d=Wu(tn([h.geometry.coordinates,f.geometry.coordinates]),tn([s.geometry.coordinates,u.geometry.coordinates])),g=null;d.features.length>0&&((g=d.features[0]).properties.dist=Kr(e,g,n),g.properties.location=i+Kr(s,g,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),u.properties.dist<r.properties.dist&&((r=u).properties.index=a+1,r.properties.location=i+l),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=a),i+=l}})),r}a(Tj,"nearestPointOnLine");var _s=Tj;m(),m(),m();var Lj=wr(Ug(),1);function Hu(t,e){return void 0===e&&(e={}),_I(t,(function(t,n){var r=n.geometry.coordinates;return t+Kr(r[0],r[1],e)}),0)}function Rj(t,e,n){var r=Nr(n);if("LineString"!==ia(n))throw new Error("line must be a LineString");for(var i,o=_s(n,t),a=_s(n,e),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],u=i[0].properties.index+1;u<i[1].properties.index+1;u++)s.push(r[u]);return s.push(i[1].geometry.coordinates),tn(s,n.properties)}m(),m(),m(),m(),m(),m(),a(Hu,"length"),m(),a(Rj,"lineSlice");var lv=Rj;function Dj(t,e,n){void 0===n&&(n={});for(var r=nn(t),i=Nr(e),o=0;o<i.length-1;o++){var a=!1;if(n.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),Fj(i[o],i[o+1],r,a,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function Fj(t,e,n,r,i){var o=n[0],a=n[1],s=t[0],u=t[1],l=e[0],c=e[1],p=l-s,h=c-u,f=(n[0]-s)*h-(n[1]-u)*p;if(null!==i){if(Math.abs(f)>i)return!1}else if(0!==f)return!1;return r?"start"===r?Math.abs(p)>=Math.abs(h)?p>0?s<o&&o<=l:l<=o&&o<s:h>0?u<a&&a<=c:c<=a&&a<u:"end"===r?Math.abs(p)>=Math.abs(h)?p>0?s<=o&&o<l:l<o&&o<=s:h>0?u<=a&&a<c:c<a&&a<=u:"both"===r&&(Math.abs(p)>=Math.abs(h)?p>0?s<o&&o<l:l<o&&o<s:h>0?u<a&&a<c:c<a&&a<u):Math.abs(p)>=Math.abs(h)?p>0?s<=o&&o<=l:l<=o&&o<=s:h>0?u<=a&&a<=c:c<=a&&a<=u}m(),m(),m(),m(),a(Dj,"booleanPointOnLine"),a(Fj,"isPointOnLineSegment");var Ql=Dj;m(),m(),m(),m();var zj=wr(Ab(),1);m();var mP=Math.PI/180,yP=180/Math.PI,fh=a((function(t,e){this.lon=t,this.lat=e,this.x=mP*t,this.y=mP*e}),"Coord");fh.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},fh.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new fh(e,t)};var _P=a((function(){this.coords=[],this.length=0}),"LineString");_P.prototype.move_to=function(t){this.length++,this.coords.push(t)};var ew=a((function(t){this.properties=t||{},this.geometries=[]}),"Arc");ew.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},ew.prototype.wkt=function(){for(var t="",e="LINESTRING(",n=a((function(t){e+=t[0]+" "+t[1]+","}),"collect"),r=0;r<this.geometries.length;r++){if(0===this.geometries[r].coords.length)return"LINESTRING(empty)";this.geometries[r].coords.forEach(n),t+=e.substring(0,e.length-1)+")"}return t};var bP=a((function(t,e,n){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new fh(t.x,t.y),this.end=new fh(e.x,e.y),this.properties=n||{};var r=this.start.x-this.end.x,i=this.start.y-this.end.y,o=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(r/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)}),"GreatCircle");bP.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),r=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),a=yP*Math.atan2(o,Math.sqrt(Math.pow(r,2)+Math.pow(i,2)));return[yP*Math.atan2(i,r),a]},bP.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var r=1/(t-1),i=0;i<t;++i){var o=r*i,a=this.interpolate(o);n.push(a)}for(var s=!1,u=0,l=e&&e.offset?e.offset:10,c=180-l,p=-180+l,h=360-l,f=1;f<n.length;++f){var d=n[f-1][0],g=n[f][0],y=Math.abs(g-d);y>h&&(g>c&&d<p||d>c&&g<p)?s=!0:y>u&&(u=y)}var v=[];if(s&&u<l){var m=[];v.push(m);for(var _=0;_<n.length;++_){var b=parseFloat(n[_][0]);if(_>0&&Math.abs(b-n[_-1][0])>h){var w=parseFloat(n[_-1][0]),x=parseFloat(n[_-1][1]),E=parseFloat(n[_][0]),I=parseFloat(n[_][1]);if(w>-180&&w<p&&180===E&&_+1<n.length&&n[_-1][0]>-180&&n[_-1][0]<p){m.push([-180,n[_][1]]),_++,m.push([n[_][0],n[_][1]]);continue}if(w>c&&w<180&&-180===E&&_+1<n.length&&n[_-1][0]>c&&n[_-1][0]<180){m.push([180,n[_][1]]),_++,m.push([n[_][0],n[_][1]]);continue}if(w<p&&E>c){var S=w;w=E,E=S;var C=x;x=I,I=C}if(w>c&&E<p&&(E+=360),w<=180&&E>=180&&w<E){var M=(180-w)/(E-w),N=M*I+(1-M)*x;m.push([n[_-1][0]>c?180:-180,N]),(m=[]).push([n[_-1][0]>c?-180:180,N]),v.push(m)}else m=[],v.push(m);m.push([b,n[_][1]])}else m.push([n[_][0],n[_][1]])}}else{var A=[];v.push(A);for(var O=0;O<n.length;++O)A.push([n[O][0],n[O][1]])}for(var P=new ew(this.properties),L=0;L<v.length;++L){var T=new _P;P.geometries.push(T);for(var R=v[L],D=0;D<R.length;++D)T.move_to(R[D])}return P},m();var Uj=wr(sv(),1);m(),m(),m(),m(),m(),m();var y6=wr(sv(),1),_6=wr(Pw(),1);m(),m(),m(),m(),m(),m(),m();var E6=wr(Ug(),1),Tt=[],At=[],Lt=[],Rt=[],Dt=[],Ft=[],Bt=[],jt=[],zt=[],Gt=[],qt=[],Ut=[],Vt=[],Xt=[],Yt=[],Wt=[],Ht=[],Kt=[],Jt=[],Zt=[],Qt=[],$t=[],er=[],tr=[];Bt[85]=Gt[85]=-1,jt[85]=qt[85]=0,zt[85]=Ut[85]=1,Jt[85]=$t[85]=1,Zt[85]=er[85]=0,Qt[85]=tr[85]=1,Tt[85]=Rt[85]=0,At[85]=Dt[85]=-1,Lt[85]=Yt[85]=0,Wt[85]=Vt[85]=0,Ht[85]=Xt[85]=1,Ft[85]=Kt[85]=1,$t[1]=$t[169]=0,er[1]=er[169]=-1,tr[1]=tr[169]=0,Vt[1]=Vt[169]=-1,Xt[1]=Xt[169]=0,Yt[1]=Yt[169]=0,Gt[4]=Gt[166]=0,qt[4]=qt[166]=-1,Ut[4]=Ut[166]=1,Wt[4]=Wt[166]=1,Ht[4]=Ht[166]=0,Kt[4]=Kt[166]=0,Bt[16]=Bt[154]=0,jt[16]=jt[154]=1,zt[16]=zt[154]=1,Rt[16]=Rt[154]=1,Dt[16]=Dt[154]=0,Ft[16]=Ft[154]=1,Jt[64]=Jt[106]=0,Zt[64]=Zt[106]=1,Qt[64]=Qt[106]=0,Tt[64]=Tt[106]=-1,At[64]=At[106]=0,Lt[64]=Lt[106]=1,Jt[2]=Jt[168]=0,Zt[2]=Zt[168]=-1,Qt[2]=Qt[168]=1,$t[2]=$t[168]=0,er[2]=er[168]=-1,tr[2]=tr[168]=0,Vt[2]=Vt[168]=-1,Xt[2]=Xt[168]=0,Yt[2]=Yt[168]=0,Wt[2]=Wt[168]=-1,Ht[2]=Ht[168]=0,Kt[2]=Kt[168]=1,Bt[8]=Bt[162]=0,jt[8]=jt[162]=-1,zt[8]=zt[162]=0,Gt[8]=Gt[162]=0,qt[8]=qt[162]=-1,Ut[8]=Ut[162]=1,Vt[8]=Vt[162]=1,Xt[8]=Xt[162]=0,Yt[8]=Yt[162]=1,Wt[8]=Wt[162]=1,Ht[8]=Ht[162]=0,Kt[8]=Kt[162]=0,Bt[32]=Bt[138]=0,jt[32]=jt[138]=1,zt[32]=zt[138]=1,Gt[32]=Gt[138]=0,qt[32]=qt[138]=1,Ut[32]=Ut[138]=0,Tt[32]=Tt[138]=1,At[32]=At[138]=0,Lt[32]=Lt[138]=0,Rt[32]=Rt[138]=1,Dt[32]=Dt[138]=0,Ft[32]=Ft[138]=1,$t[128]=$t[42]=0,er[128]=er[42]=1,tr[128]=tr[42]=1,Jt[128]=Jt[42]=0,Zt[128]=Zt[42]=1,Qt[128]=Qt[42]=0,Tt[128]=Tt[42]=-1,At[128]=At[42]=0,Lt[128]=Lt[42]=1,Rt[128]=Rt[42]=-1,Dt[128]=Dt[42]=0,Ft[128]=Ft[42]=0,Gt[5]=Gt[165]=-1,qt[5]=qt[165]=0,Ut[5]=Ut[165]=0,$t[5]=$t[165]=1,er[5]=er[165]=0,tr[5]=tr[165]=0,Wt[20]=Wt[150]=0,Ht[20]=Ht[150]=1,Kt[20]=Kt[150]=1,Rt[20]=Rt[150]=0,Dt[20]=Dt[150]=-1,Ft[20]=Ft[150]=1,Bt[80]=Bt[90]=-1,jt[80]=jt[90]=0,zt[80]=zt[90]=1,Jt[80]=Jt[90]=1,Zt[80]=Zt[90]=0,Qt[80]=Qt[90]=1,Vt[65]=Vt[105]=0,Xt[65]=Xt[105]=1,Yt[65]=Yt[105]=0,Tt[65]=Tt[105]=0,At[65]=At[105]=-1,Lt[65]=Lt[105]=0,Bt[160]=Bt[10]=-1,jt[160]=jt[10]=0,zt[160]=zt[10]=1,Gt[160]=Gt[10]=-1,qt[160]=qt[10]=0,Ut[160]=Ut[10]=0,$t[160]=$t[10]=1,er[160]=er[10]=0,tr[160]=tr[10]=0,Jt[160]=Jt[10]=1,Zt[160]=Zt[10]=0,Qt[160]=Qt[10]=1,Wt[130]=Wt[40]=0,Ht[130]=Ht[40]=1,Kt[130]=Kt[40]=1,Vt[130]=Vt[40]=0,Xt[130]=Xt[40]=1,Yt[130]=Yt[40]=0,Tt[130]=Tt[40]=0,At[130]=At[40]=-1,Lt[130]=Lt[40]=0,Rt[130]=Rt[40]=0,Dt[130]=Dt[40]=-1,Ft[130]=Ft[40]=1,Gt[37]=Gt[133]=0,qt[37]=qt[133]=1,Ut[37]=Ut[133]=1,$t[37]=$t[133]=0,er[37]=er[133]=1,tr[37]=tr[133]=0,Tt[37]=Tt[133]=-1,At[37]=At[133]=0,Lt[37]=Lt[133]=0,Rt[37]=Rt[133]=1,Dt[37]=Dt[133]=0,Ft[37]=Ft[133]=0,Wt[148]=Wt[22]=-1,Ht[148]=Ht[22]=0,Kt[148]=Kt[22]=0,$t[148]=$t[22]=0,er[148]=er[22]=-1,tr[148]=tr[22]=1,Jt[148]=Jt[22]=0,Zt[148]=Zt[22]=1,Qt[148]=Qt[22]=1,Rt[148]=Rt[22]=-1,Dt[148]=Dt[22]=0,Ft[148]=Ft[22]=1,Bt[82]=Bt[88]=0,jt[82]=jt[88]=-1,zt[82]=zt[88]=1,Wt[82]=Wt[88]=1,Ht[82]=Ht[88]=0,Kt[82]=Kt[88]=1,Vt[82]=Vt[88]=-1,Xt[82]=Xt[88]=0,Yt[82]=Yt[88]=1,Jt[82]=Jt[88]=0,Zt[82]=Zt[88]=-1,Qt[82]=Qt[88]=0,Bt[73]=Bt[97]=0,jt[73]=jt[97]=1,zt[73]=zt[97]=0,Gt[73]=Gt[97]=0,qt[73]=qt[97]=-1,Ut[73]=Ut[97]=0,Vt[73]=Vt[97]=1,Xt[73]=Xt[97]=0,Yt[73]=Yt[97]=0,Tt[73]=Tt[97]=1,At[73]=At[97]=0,Lt[73]=Lt[97]=1,Bt[145]=Bt[25]=0,jt[145]=jt[25]=-1,zt[145]=zt[25]=0,Vt[145]=Vt[25]=1,Xt[145]=Xt[25]=0,Yt[145]=Yt[25]=1,$t[145]=$t[25]=0,er[145]=er[25]=1,tr[145]=tr[25]=1,Rt[145]=Rt[25]=-1,Dt[145]=Dt[25]=0,Ft[145]=Ft[25]=0,Gt[70]=Gt[100]=0,qt[70]=qt[100]=1,Ut[70]=Ut[100]=0,Wt[70]=Wt[100]=-1,Ht[70]=Ht[100]=0,Kt[70]=Kt[100]=1,Jt[70]=Jt[100]=0,Zt[70]=Zt[100]=-1,Qt[70]=Qt[100]=1,Tt[70]=Tt[100]=1,At[70]=At[100]=0,Lt[70]=Lt[100]=0,Gt[101]=Gt[69]=0,qt[101]=qt[69]=1,Ut[101]=Ut[69]=0,Tt[101]=Tt[69]=1,At[101]=At[69]=0,Lt[101]=Lt[69]=0,$t[149]=$t[21]=0,er[149]=er[21]=1,tr[149]=tr[21]=1,Rt[149]=Rt[21]=-1,Dt[149]=Dt[21]=0,Ft[149]=Ft[21]=0,Wt[86]=Wt[84]=-1,Ht[86]=Ht[84]=0,Kt[86]=Kt[84]=1,Jt[86]=Jt[84]=0,Zt[86]=Zt[84]=-1,Qt[86]=Qt[84]=1,Bt[89]=Bt[81]=0,jt[89]=jt[81]=-1,zt[89]=zt[81]=0,Vt[89]=Vt[81]=1,Xt[89]=Xt[81]=0,Yt[89]=Yt[81]=1,Bt[96]=Bt[74]=0,jt[96]=jt[74]=1,zt[96]=zt[74]=0,Gt[96]=Gt[74]=-1,qt[96]=qt[74]=0,Ut[96]=Ut[74]=1,Jt[96]=Jt[74]=1,Zt[96]=Zt[74]=0,Qt[96]=Qt[74]=0,Tt[96]=Tt[74]=1,At[96]=At[74]=0,Lt[96]=Lt[74]=1,Bt[24]=Bt[146]=0,jt[24]=jt[146]=-1,zt[24]=zt[146]=1,Wt[24]=Wt[146]=1,Ht[24]=Ht[146]=0,Kt[24]=Kt[146]=1,Vt[24]=Vt[146]=0,Xt[24]=Xt[146]=1,Yt[24]=Yt[146]=1,Rt[24]=Rt[146]=0,Dt[24]=Dt[146]=-1,Ft[24]=Ft[146]=0,Gt[6]=Gt[164]=-1,qt[6]=qt[164]=0,Ut[6]=Ut[164]=1,Wt[6]=Wt[164]=-1,Ht[6]=Ht[164]=0,Kt[6]=Kt[164]=0,$t[6]=$t[164]=0,er[6]=er[164]=-1,tr[6]=tr[164]=1,Jt[6]=Jt[164]=1,Zt[6]=Zt[164]=0,Qt[6]=Qt[164]=0,Vt[129]=Vt[41]=0,Xt[129]=Xt[41]=1,Yt[129]=Yt[41]=1,$t[129]=$t[41]=0,er[129]=er[41]=1,tr[129]=tr[41]=0,Tt[129]=Tt[41]=-1,At[129]=At[41]=0,Lt[129]=Lt[41]=0,Rt[129]=Rt[41]=0,Dt[129]=Dt[41]=-1,Ft[129]=Ft[41]=0,Wt[66]=Wt[104]=0,Ht[66]=Ht[104]=1,Kt[66]=Kt[104]=0,Vt[66]=Vt[104]=-1,Xt[66]=Xt[104]=0,Yt[66]=Yt[104]=1,Jt[66]=Jt[104]=0,Zt[66]=Zt[104]=-1,Qt[66]=Qt[104]=0,Tt[66]=Tt[104]=0,At[66]=At[104]=-1,Lt[66]=Lt[104]=1,Bt[144]=Bt[26]=-1,jt[144]=jt[26]=0,zt[144]=zt[26]=0,$t[144]=$t[26]=1,er[144]=er[26]=0,tr[144]=tr[26]=1,Jt[144]=Jt[26]=0,Zt[144]=Zt[26]=1,Qt[144]=Qt[26]=1,Rt[144]=Rt[26]=-1,Dt[144]=Dt[26]=0,Ft[144]=Ft[26]=1,Gt[36]=Gt[134]=0,qt[36]=qt[134]=1,Ut[36]=Ut[134]=1,Wt[36]=Wt[134]=0,Ht[36]=Ht[134]=1,Kt[36]=Kt[134]=0,Tt[36]=Tt[134]=0,At[36]=At[134]=-1,Lt[36]=Lt[134]=1,Rt[36]=Rt[134]=1,Dt[36]=Dt[134]=0,Ft[36]=Ft[134]=0,Bt[9]=Bt[161]=-1,jt[9]=jt[161]=0,zt[9]=zt[161]=0,Gt[9]=Gt[161]=0,qt[9]=qt[161]=-1,Ut[9]=Ut[161]=0,Vt[9]=Vt[161]=1,Xt[9]=Xt[161]=0,Yt[9]=Yt[161]=0,$t[9]=$t[161]=1,er[9]=er[161]=0,tr[9]=tr[161]=1,Bt[136]=0,jt[136]=1,zt[136]=1,Gt[136]=0,qt[136]=1,Ut[136]=0,Wt[136]=-1,Ht[136]=0,Kt[136]=1,Vt[136]=-1,Xt[136]=0,Yt[136]=0,$t[136]=0,er[136]=-1,tr[136]=0,Jt[136]=0,Zt[136]=-1,Qt[136]=1,Tt[136]=1,At[136]=0,Lt[136]=0,Rt[136]=1,Dt[136]=0,Ft[136]=1,Bt[34]=0,jt[34]=-1,zt[34]=0,Gt[34]=0,qt[34]=-1,Ut[34]=1,Wt[34]=1,Ht[34]=0,Kt[34]=0,Vt[34]=1,Xt[34]=0,Yt[34]=1,$t[34]=0,er[34]=1,tr[34]=1,Jt[34]=0,Zt[34]=1,Qt[34]=0,Tt[34]=-1,At[34]=0,Lt[34]=1,Rt[34]=-1,Dt[34]=0,Ft[34]=0,Bt[35]=0,jt[35]=1,zt[35]=1,Gt[35]=0,qt[35]=-1,Ut[35]=1,Wt[35]=1,Ht[35]=0,Kt[35]=0,Vt[35]=-1,Xt[35]=0,Yt[35]=0,$t[35]=0,er[35]=-1,tr[35]=0,Jt[35]=0,Zt[35]=1,Qt[35]=0,Tt[35]=-1,At[35]=0,Lt[35]=1,Rt[35]=1,Dt[35]=0,Ft[35]=1,Bt[153]=0,jt[153]=1,zt[153]=1,Vt[153]=-1,Xt[153]=0,Yt[153]=0,$t[153]=0,er[153]=-1,tr[153]=0,Rt[153]=1,Dt[153]=0,Ft[153]=1,Gt[102]=0,qt[102]=-1,Ut[102]=1,Wt[102]=1,Ht[102]=0,Kt[102]=0,Jt[102]=0,Zt[102]=1,Qt[102]=0,Tt[102]=-1,At[102]=0,Lt[102]=1,Bt[155]=0,jt[155]=-1,zt[155]=0,Vt[155]=1,Xt[155]=0,Yt[155]=1,$t[155]=0,er[155]=1,tr[155]=1,Rt[155]=-1,Dt[155]=0,Ft[155]=0,Gt[103]=0,qt[103]=1,Ut[103]=0,Wt[103]=-1,Ht[103]=0,Kt[103]=1,Jt[103]=0,Zt[103]=-1,Qt[103]=1,Tt[103]=1,At[103]=0,Lt[103]=0,Bt[152]=0,jt[152]=1,zt[152]=1,Wt[152]=-1,Ht[152]=0,Kt[152]=1,Vt[152]=-1,Xt[152]=0,Yt[152]=0,$t[152]=0,er[152]=-1,tr[152]=0,Jt[152]=0,Zt[152]=-1,Qt[152]=1,Rt[152]=1,Dt[152]=0,Ft[152]=1,Bt[156]=0,jt[156]=-1,zt[156]=1,Wt[156]=1,Ht[156]=0,Kt[156]=1,Vt[156]=-1,Xt[156]=0,Yt[156]=0,$t[156]=0,er[156]=-1,tr[156]=0,Jt[156]=0,Zt[156]=1,Qt[156]=1,Rt[156]=-1,Dt[156]=0,Ft[156]=1,Bt[137]=0,jt[137]=1,zt[137]=1,Gt[137]=0,qt[137]=1,Ut[137]=0,Vt[137]=-1,Xt[137]=0,Yt[137]=0,$t[137]=0,er[137]=-1,tr[137]=0,Tt[137]=1,At[137]=0,Lt[137]=0,Rt[137]=1,Dt[137]=0,Ft[137]=1,Bt[139]=0,jt[139]=1,zt[139]=1,Gt[139]=0,qt[139]=-1,Ut[139]=0,Vt[139]=1,Xt[139]=0,Yt[139]=0,$t[139]=0,er[139]=1,tr[139]=0,Tt[139]=-1,At[139]=0,Lt[139]=0,Rt[139]=1,Dt[139]=0,Ft[139]=1,Bt[98]=0,jt[98]=-1,zt[98]=0,Gt[98]=0,qt[98]=-1,Ut[98]=1,Wt[98]=1,Ht[98]=0,Kt[98]=0,Vt[98]=1,Xt[98]=0,Yt[98]=1,Jt[98]=0,Zt[98]=1,Qt[98]=0,Tt[98]=-1,At[98]=0,Lt[98]=1,Bt[99]=0,jt[99]=1,zt[99]=0,Gt[99]=0,qt[99]=-1,Ut[99]=1,Wt[99]=1,Ht[99]=0,Kt[99]=0,Vt[99]=-1,Xt[99]=0,Yt[99]=1,Jt[99]=0,Zt[99]=-1,Qt[99]=0,Tt[99]=1,At[99]=0,Lt[99]=1,Gt[38]=0,qt[38]=-1,Ut[38]=1,Wt[38]=1,Ht[38]=0,Kt[38]=0,$t[38]=0,er[38]=1,tr[38]=1,Jt[38]=0,Zt[38]=1,Qt[38]=0,Tt[38]=-1,At[38]=0,Lt[38]=1,Rt[38]=-1,Dt[38]=0,Ft[38]=0,Gt[39]=0,qt[39]=1,Ut[39]=1,Wt[39]=-1,Ht[39]=0,Kt[39]=0,$t[39]=0,er[39]=-1,tr[39]=1,Jt[39]=0,Zt[39]=1,Qt[39]=0,Tt[39]=-1,At[39]=0,Lt[39]=1,Rt[39]=1,Dt[39]=0,Ft[39]=0;var Cw=a((function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]}),"p00"),kw=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]}),"p01"),Ow=a((function(t){return[[t.topright,1],[1,1],[1,t.righttop]]}),"p02"),Nw=a((function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]}),"p03"),Tw=a((function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]}),"p04"),Aw=a((function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]}),"p05"),Lw=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]}),"p06"),Rw=a((function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]}),"p07"),x6=a((function(t){return[[0,0],[0,t.leftbottom],[1,t.rightbottom],[1,0]]}),"p08"),M6=a((function(t){return[[1,0],[t.bottomright,0],[t.topright,1],[1,1]]}),"p09"),S6=a((function(t){return[[1,1],[1,t.righttop],[0,t.lefttop],[0,1]]}),"p10"),I6=a((function(t){return[[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]}),"p11"),P6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.leftbottom],[0,t.lefttop]]}),"p12"),C6=a((function(t){return[[t.topleft,1],[t.topright,1],[t.bottomright,0],[t.bottomleft,0]]}),"p13"),k6=a((function(){return[[0,0],[0,1],[1,1],[1,0]]}),"p14"),O6=a((function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,1],[t.topleft,1]]}),"p15"),N6=a((function(t){return[[t.topright,1],[1,1],[1,0],[0,0],[0,t.leftbottom]]}),"p16"),T6=a((function(t){return[[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[1,1]]}),"p17"),A6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,1]]}),"p18"),L6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.lefttop],[0,1],[t.topleft,1]]}),"p19"),R6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[t.topright,1]]}),"p20"),D6=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop]]}),"p21"),F6=a((function(t){return[[t.topright,1],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1]]}),"p22"),B6=a((function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]}),"p23"),j6=a((function(t){return[[1,1],[1,t.righttop],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]}),"p24"),z6=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[t.topleft,1],[t.topright,1]]}),"p25"),G6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom]]}),"p26"),q6=a((function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]}),"p27"),U6=a((function(t){return[[1,1],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]}),"p28"),V6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1]]}),"p29"),X6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]}),"p30"),Y6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]}),"p31"),W6=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]}),"p32"),H6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]}),"p33"),K6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]}),"p34"),J6=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]}),"p35"),Z6=a((function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]}),"p36"),Q6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]}),"p37"),$6=a((function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]}),"p38"),eG=a((function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]}),"p39"),ir=[],ar=[],or=[],sr=[],ur=[],lr=[],cr=[],fr=[];sr[1]=ur[1]=18,sr[169]=ur[169]=18,or[4]=ar[4]=12,or[166]=ar[166]=12,ir[16]=fr[16]=4,ir[154]=fr[154]=4,lr[64]=cr[64]=22,lr[106]=cr[106]=22,or[2]=lr[2]=17,sr[2]=ur[2]=18,or[168]=lr[168]=17,sr[168]=ur[168]=18,ir[8]=sr[8]=9,ar[8]=or[8]=12,ir[162]=sr[162]=9,ar[162]=or[162]=12,ir[32]=fr[32]=4,ar[32]=cr[32]=1,ir[138]=fr[138]=4,ar[138]=cr[138]=1,ur[128]=fr[128]=21,lr[128]=cr[128]=22,ur[42]=fr[42]=21,lr[42]=cr[42]=22,ar[5]=ur[5]=14,ar[165]=ur[165]=14,or[20]=fr[20]=6,or[150]=fr[150]=6,ir[80]=lr[80]=11,ir[90]=lr[90]=11,sr[65]=cr[65]=3,sr[105]=cr[105]=3,ir[160]=lr[160]=11,ar[160]=ur[160]=14,ir[10]=lr[10]=11,ar[10]=ur[10]=14,or[130]=fr[130]=6,sr[130]=cr[130]=3,or[40]=fr[40]=6,sr[40]=cr[40]=3,ar[101]=cr[101]=1,ar[69]=cr[69]=1,ur[149]=fr[149]=21,ur[21]=fr[21]=21,or[86]=lr[86]=17,or[84]=lr[84]=17,ir[89]=sr[89]=9,ir[81]=sr[81]=9,ir[96]=cr[96]=0,ar[96]=lr[96]=15,ir[74]=cr[74]=0,ar[74]=lr[74]=15,ir[24]=or[24]=8,sr[24]=fr[24]=7,ir[146]=or[146]=8,sr[146]=fr[146]=7,ar[6]=lr[6]=15,or[6]=ur[6]=16,ar[164]=lr[164]=15,or[164]=ur[164]=16,sr[129]=fr[129]=7,ur[129]=cr[129]=20,sr[41]=fr[41]=7,ur[41]=cr[41]=20,or[66]=cr[66]=2,sr[66]=lr[66]=19,or[104]=cr[104]=2,sr[104]=lr[104]=19,ir[144]=ur[144]=10,lr[144]=fr[144]=23,ir[26]=ur[26]=10,lr[26]=fr[26]=23,ar[36]=fr[36]=5,or[36]=cr[36]=2,ar[134]=fr[134]=5,or[134]=cr[134]=2,ir[9]=ur[9]=10,ar[9]=sr[9]=13,ir[161]=ur[161]=10,ar[161]=sr[161]=13,ar[37]=fr[37]=5,ur[37]=cr[37]=20,ar[133]=fr[133]=5,ur[133]=cr[133]=20,or[148]=ur[148]=16,lr[148]=fr[148]=23,or[22]=ur[22]=16,lr[22]=fr[22]=23,ir[82]=or[82]=8,sr[82]=lr[82]=19,ir[88]=or[88]=8,sr[88]=lr[88]=19,ir[73]=cr[73]=0,ar[73]=sr[73]=13,ir[97]=cr[97]=0,ar[97]=sr[97]=13,ir[145]=sr[145]=9,ur[145]=fr[145]=21,ir[25]=sr[25]=9,ur[25]=fr[25]=21,ar[70]=cr[70]=1,or[70]=lr[70]=17,ar[100]=cr[100]=1,or[100]=lr[100]=17,ir[34]=sr[34]=9,ar[34]=or[34]=12,ur[34]=fr[34]=21,lr[34]=cr[34]=22,ir[136]=fr[136]=4,ar[136]=cr[136]=1,or[136]=lr[136]=17,sr[136]=ur[136]=18,ir[35]=fr[35]=4,ar[35]=or[35]=12,sr[35]=ur[35]=18,lr[35]=cr[35]=22,ir[153]=fr[153]=4,sr[153]=ur[153]=18,ar[102]=or[102]=12,lr[102]=cr[102]=22,ir[155]=sr[155]=9,ur[155]=fr[155]=23,ar[103]=cr[103]=1,or[103]=lr[103]=17,ir[152]=fr[152]=4,or[152]=lr[152]=17,sr[152]=ur[152]=18,ir[156]=or[156]=8,sr[156]=ur[156]=18,lr[156]=fr[156]=23,ir[137]=fr[137]=4,ar[137]=cr[137]=1,sr[137]=ur[137]=18,ir[139]=fr[139]=4,ar[139]=sr[139]=13,ur[139]=cr[139]=20,ir[98]=sr[98]=9,ar[98]=or[98]=12,lr[98]=cr[98]=22,ir[99]=cr[99]=0,ar[99]=or[99]=12,sr[99]=lr[99]=19,ar[38]=or[38]=12,ur[38]=fr[38]=21,lr[38]=cr[38]=22,ar[39]=fr[39]=5,or[39]=ur[39]=16,lr[39]=cr[39]=22;var Ve=[];function rG(t){return(t>0)-(t<0)||+t}function lc(t,e,n){var r=e[0]-t[0],i=e[1]-t[1],o=n[0]-e[0];return rG(r*(n[1]-e[1])-o*i)}function fk(t,e){var n=t.geometry.coordinates[0].map((function(t){return t[0]})),r=t.geometry.coordinates[0].map((function(t){return t[1]})),i=e.geometry.coordinates[0].map((function(t){return t[0]})),o=e.geometry.coordinates[0].map((function(t){return t[1]}));return Math.max.apply(null,n)===Math.max.apply(null,i)&&Math.max.apply(null,r)===Math.max.apply(null,o)&&Math.min.apply(null,n)===Math.min.apply(null,i)&&Math.min.apply(null,r)===Math.min.apply(null,o)}function Dw(t,e){return e.geometry.coordinates[0].every((function(e){return Hn(mr(e),t)}))}function pk(t,e){return t[0]===e[0]&&t[1]===e[1]}Ve[1]=Ve[169]=Cw,Ve[4]=Ve[166]=kw,Ve[16]=Ve[154]=Ow,Ve[64]=Ve[106]=Nw,Ve[168]=Ve[2]=Tw,Ve[162]=Ve[8]=Aw,Ve[138]=Ve[32]=Lw,Ve[42]=Ve[128]=Rw,Ve[5]=Ve[165]=x6,Ve[20]=Ve[150]=M6,Ve[80]=Ve[90]=S6,Ve[65]=Ve[105]=I6,Ve[160]=Ve[10]=P6,Ve[130]=Ve[40]=C6,Ve[85]=k6,Ve[101]=Ve[69]=O6,Ve[149]=Ve[21]=N6,Ve[86]=Ve[84]=T6,Ve[89]=Ve[81]=A6,Ve[96]=Ve[74]=L6,Ve[24]=Ve[146]=R6,Ve[6]=Ve[164]=D6,Ve[129]=Ve[41]=F6,Ve[66]=Ve[104]=B6,Ve[144]=Ve[26]=j6,Ve[36]=Ve[134]=z6,Ve[9]=Ve[161]=G6,Ve[37]=Ve[133]=q6,Ve[148]=Ve[22]=U6,Ve[82]=Ve[88]=V6,Ve[73]=Ve[97]=X6,Ve[145]=Ve[25]=Y6,Ve[70]=Ve[100]=W6,Ve[34]=function(t){return[Rw(t),Aw(t)]},Ve[35]=H6,Ve[136]=function(t){return[Lw(t),Tw(t)]},Ve[153]=function(t){return[Ow(t),Cw(t)]},Ve[102]=function(t){return[kw(t),Nw(t)]},Ve[155]=K6,Ve[103]=J6,Ve[152]=function(t){return[Ow(t),Tw(t)]},Ve[156]=Z6,Ve[137]=function(t){return[Lw(t),Cw(t)]},Ve[139]=Q6,Ve[98]=function(t){return[Aw(t),Nw(t)]},Ve[99]=$6,Ve[38]=function(t){return[kw(t),Rw(t)]},Ve[39]=eG,m(),m(),m(),m(),m(),m(),m(),m(),a(rG,"mathSign"),a(lc,"orientationIndex"),a(fk,"envelopeIsEqual"),a(Dw,"envelopeContains"),a(pk,"coordinatesEqual");var nG=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return a(t,"Node"),t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,n){var r=e.to,i=n.to;if(r.coordinates[0]-t.coordinates[0]>=0&&i.coordinates[0]-t.coordinates[0]<0)return 1;if(r.coordinates[0]-t.coordinates[0]<0&&i.coordinates[0]-t.coordinates[0]>=0)return-1;if(r.coordinates[0]-t.coordinates[0]==0&&i.coordinates[0]-t.coordinates[0]==0)return r.coordinates[1]-t.coordinates[1]>=0||i.coordinates[1]-t.coordinates[1]>=0?r.coordinates[1]-i.coordinates[1]:i.coordinates[1]-r.coordinates[1];var o=lc(t.coordinates,r.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(r.coordinates[0]-t.coordinates[0],2)+Math.pow(r.coordinates[1]-t.coordinates[1],2)-(Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2))})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}(),Fw=nG;m();var iG=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return a(t,"Edge"),t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return tn([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return lc(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}(),hk=iG;m();var aG=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return a(t,"EdgeRing"),t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,n,r){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=r),e}),0),n=(0===e?this.length:e)-1,r=(e+1)%this.length,i=lc(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[r].from.coordinates);return 0===i?this.edges[n].from.coordinates[0]>this.edges[r].from.coordinates[0]:i>0},t.prototype.toMultiPoint=function(){return mb(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=Rr([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=Lb(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,r,i=t.getEnvelope();return e.forEach((function(e){var o=e.getEnvelope();if(r&&(n=r.getEnvelope()),!fk(o,i)&&Dw(o,i)){for(var s=t.map((function(t){return t.from.coordinates})),u=void 0,l=a((function(t){e.some((function(e){return pk(t,e.from.coordinates)}))||(u=t)}),"_loop_1"),c=0,p=s;c<p.length;c++){l(p[c])}u&&e.inside(mr(u))&&(!r||Dw(n,o))&&(r=e)}})),r},t.prototype.inside=function(t){return Hn(t,this.toPolygon())},t}(),Bw=aG;function oG(t){if(!t)throw new Error("No geojson passed");if("FeatureCollection"!==t.type&&"GeometryCollection"!==t.type&&"MultiLineString"!==t.type&&"LineString"!==t.type&&"Feature"!==t.type)throw new Error("Invalid input type '"+t.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}a(oG,"validateGeoJson");var lie=function(){function t(){this.edges=[],this.nodes={}}return a(t,"Graph"),t.fromGeoJson=function(e){oG(e);var n=new t;return gi(e,(function(t){_b(t,"LineString","Graph::fromGeoJson"),yI(t,(function(t,e){if(t){var r=n.getNode(t),i=n.getNode(e);n.addEdge(r,i)}return e}))})),n},t.prototype.getNode=function(t){var e=Fw.buildId(t),n=this.nodes[e];return n||(n=this.nodes[e]=new Fw(t)),n},t.prototype.addEdge=function(t,e){var n=new hk(t,e),r=n.getSymetric();this.edges.push(n),this.edges.push(r)},t.prototype.deleteDangles=function(){var t=this;Object.keys(this.nodes).map((function(e){return t.nodes[e]})).forEach((function(e){return t._removeIfDangle(e)}))},t.prototype._removeIfDangle=function(t){var e=this;if(t.innerEdges.length<=1){var n=t.getOuterEdges().map((function(t){return t.to}));this.removeNode(t),n.forEach((function(t){return e._removeIfDangle(t)}))}},t.prototype.deleteCutEdges=function(){var t=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEach((function(e){e.label===e.symetric.label&&(t.removeEdge(e.symetric),t.removeEdge(e))}))},t.prototype._computeNextCWEdges=function(t){var e=this;typeof t>"u"?Object.keys(this.nodes).forEach((function(t){return e._computeNextCWEdges(e.nodes[t])})):t.getOuterEdges().forEach((function(e,n){t.getOuterEdge((0===n?t.getOuterEdges().length:n)-1).symetric.next=e}))},t.prototype._computeNextCCWEdges=function(t,e){for(var n,r,i=t.getOuterEdges(),o=i.length-1;o>=0;--o){var a=i[o],s=a.symetric,u=void 0,l=void 0;a.label===e&&(u=a),s.label===e&&(l=s),u&&l&&(l&&(r=l),u&&(r&&(r.next=u,r=void 0),n||(n=u)))}r&&(r.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(n){if(!(n.label>=0)){t.push(n);var r=n;do{r.label=e,r=r.next}while(!n.isEqual(r));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(n){t._computeNextCCWEdges(n,e.label)}))}));var e=[];return this.edges.forEach((function(n){n.ring||e.push(t._findEdgeRing(n))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,r=a((function(){var r=0;n.from.getOuterEdges().forEach((function(e){e.label===t.label&&++r})),r>1&&e.push(n.from),n=n.next}),"_loop_1");do{r()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new Bw;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()},t}();m(),m(),m(),m();var cG=wr(jw(),1);m();var fG=wr(jw(),1);m(),m();var hG=wr(Ek(),1);m();var bG=wr(Tk(),1);function Lk(t){for(var e=t,n=[];e.parent;)n.unshift(e),e=e.parent;return n}function EG(){return new Rk((function(t){return t.f}))}m(),m(),a(Lk,"pathTo"),a(EG,"getHeap");var Uw={search:function(t,e,n,r){t.cleanDirty();var i=(r=r||{}).heuristic||Uw.heuristics.manhattan,o=r.closest||!1,a=EG(),s=e;for(e.h=i(e,n),a.push(e);a.size()>0;){var u=a.pop();if(u===n)return Lk(u);u.closed=!0;for(var l=t.neighbors(u),c=0,p=l.length;c<p;++c){var h=l[c];if(!h.closed&&!h.isWall()){var f=u.g+h.getCost(u),d=h.visited;(!d||f<h.g)&&(h.visited=!0,h.parent=u,h.h=h.h||i(h,n),h.g=f,h.f=h.g+h.h,t.markDirty(h),o&&(h.h<s.h||h.h===s.h&&h.g<s.g)&&(s=h),d?a.rescoreElement(h):a.push(h))}}}return o?Lk(s):[]},heuristics:{manhattan:function(t,e){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},diagonal:function(t,e){var n=Math.sqrt(2),r=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return 1*(r+i)+(n-2)*Math.min(r,i)}},cleanNode:function(t){t.f=0,t.g=0,t.h=0,t.visited=!1,t.closed=!1,t.parent=null}};function _h(t,e){e=e||{},this.nodes=[],this.diagonal=!!e.diagonal,this.grid=[];for(var n=0;n<t.length;n++){this.grid[n]=[];for(var r=0,i=t[n];r<i.length;r++){var o=new kv(n,r,i[r]);this.grid[n][r]=o,this.nodes.push(o)}}this.init()}function kv(t,e,n){this.x=t,this.y=e,this.weight=n}function Rk(t){this.content=[],this.scoreFunction=t}a(_h,"Graph"),_h.prototype.init=function(){this.dirtyNodes=[];for(var t=0;t<this.nodes.length;t++)Uw.cleanNode(this.nodes[t])},_h.prototype.cleanDirty=function(){for(var t=0;t<this.dirtyNodes.length;t++)Uw.cleanNode(this.dirtyNodes[t]);this.dirtyNodes=[]},_h.prototype.markDirty=function(t){this.dirtyNodes.push(t)},_h.prototype.neighbors=function(t){var e=[],n=t.x,r=t.y,i=this.grid;return i[n-1]&&i[n-1][r]&&e.push(i[n-1][r]),i[n+1]&&i[n+1][r]&&e.push(i[n+1][r]),i[n]&&i[n][r-1]&&e.push(i[n][r-1]),i[n]&&i[n][r+1]&&e.push(i[n][r+1]),this.diagonal&&(i[n-1]&&i[n-1][r-1]&&e.push(i[n-1][r-1]),i[n+1]&&i[n+1][r-1]&&e.push(i[n+1][r-1]),i[n-1]&&i[n-1][r+1]&&e.push(i[n-1][r+1]),i[n+1]&&i[n+1][r+1]&&e.push(i[n+1][r+1])),e},_h.prototype.toString=function(){for(var t,e,n,r,i=[],o=this.grid,a=0,s=o.length;a<s;a++){for(t=[],n=0,r=(e=o[a]).length;n<r;n++)t.push(e[n].weight);i.push(t.join(" "))}return i.join("\n")},a(kv,"GridNode"),kv.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},kv.prototype.getCost=function(t){return t&&t.x!==this.x&&t.y!==this.y?1.41421*this.weight:this.weight},kv.prototype.isWall=function(){return 0===this.weight},a(Rk,"BinaryHeap"),Rk.prototype={push:function(t){this.content.push(t),this.sinkDown(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)<this.scoreFunction(t)?this.sinkDown(e):this.bubbleUp(e))},size:function(){return this.content.length},rescoreElement:function(t){this.sinkDown(this.content.indexOf(t))},sinkDown:function(t){for(var e=this.content[t];t>0;){var n=(t+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(e)<this.scoreFunction(r)))break;this.content[n]=e,this.content[t]=r,t=n}},bubbleUp:function(t){for(var e=this.content.length,n=this.content[t],r=this.scoreFunction(n);;){var i,o=t+1<<1,a=o-1,s=null;if(a<e){var u=this.content[a];(i=this.scoreFunction(u))<r&&(s=a)}if(o<e){var l=this.content[o];this.scoreFunction(l)<(null===s?r:i)&&(s=o)}if(null===s)break;this.content[t]=this.content[s],this.content[s]=n,t=s}}},m();var xG=wr(Fk(),1);m(),m(),m(),m(),m(),m(),m(),m(),m(),m(),m(),m();var KG=wr(fc(),1);m();var Rc=wr(kO(),1),LO=wr(AO(),1);function hq(t,e,n){var r=(n=n||{}).units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var o=[];switch(t.type){case"GeometryCollection":return To(t,(function(t){var n=Zv(t,e,r,i);n&&o.push(n)})),Et(o);case"FeatureCollection":return Or(t,(function(t){var n=Zv(t,e,r,i);n&&Or(n,(function(t){t&&o.push(t)}))})),Et(o)}return Zv(t,e,r,i)}function Zv(t,e,n,r){var i=t.properties||{},o="Feature"===t.type?t.geometry:t;if("GeometryCollection"===o.type){var a=[];return To(t,(function(t){var i=Zv(t,e,n,r);i&&a.push(i)})),Et(a)}var s=dq(o),u={type:o.type,coordinates:DO(o.coordinates,s)},l=(new Rc.GeoJSONReader).read(u),c=th(rh(e,n),"meters"),p=Rc.BufferOp.bufferOp(l,c,r);if(!RO((p=(new Rc.GeoJSONWriter).write(p)).coordinates))return Dn({type:p.type,coordinates:FO(p.coordinates,s)},i)}function RO(t){return Array.isArray(t[0])?RO(t[0]):isNaN(t[0])}function DO(t,e){return"object"!=typeof t[0]?e(t):t.map((function(t){return DO(t,e)}))}function FO(t,e){return"object"!=typeof t[0]?e.invert(t):t.map((function(t){return FO(t,e)}))}function dq(t){var e=Vu(t).geometry.coordinates,n=[-e[0],-e[1]];return(0,LO.geoAzimuthalEquidistant)().rotate(n).scale(Rn)}a(hq,"buffer"),a(Zv,"bufferFeature"),a(RO,"coordsIsNaN"),a(DO,"projectCoords"),a(FO,"unprojectCoords"),a(dq,"defineProjection");var hE=hq;m();var gq=wr(fc(),1);m();var vq=wr(fc(),1);m();var yq=wr(fc(),1);m(),m();var _q=wr(fc(),1);m(),m(),m(),m();var Cq=1e-7,kq=.22,Oq=.2,jO=.005;function dE(t,e,n){let r=Lq(e),[i,o]=t.features.reduce(((t,e)=>{let[i,o]=t,a=[e],{properties:s}=e,u=(s.entrances||[]).reduce(((t,e)=>(r.has(e)&&t.push(r.get(e)),t)),[]);if(u.length&&(a=Nq(e,u)),n&&"LineString"===a[0].geometry.type){let t=n.get(a[0].properties.id).type;i.has(t)||i.set(t,[]),i.get(t).push(...a)}else o.push(...a);return t}),[new Map,[]]),a=1;return i.forEach((t=>{var e;let r={kind:t[0].properties.kind,id:t[0].properties.id,externalId:t[0].properties.externalId},s=((null==(e=null==n?void 0:n.get(t[0].properties.id))?void 0:e.width)||kq)/2,u=a/i.size*s*Oq;if(t.length){let e=hE(qu(t.map((({geometry:t})=>t.coordinates))),s+u,{units:"meters",steps:3});e.properties={...r,...e.properties};let n=[];n="MultiPolygon"===e.geometry.type?e.geometry.coordinates.map((t=>({...Rr(t),properties:r}))):[e],o=o.concat(n)}a++})),Et(o)}function Nq(t,e){return e.reduce(((t,e)=>{let n={epsilon:Cq},r=t.findIndex((t=>Ql(Vu(e),t,n))),i=t[r];if(i){let[n,o]=Aq(i,e);t.splice(r,1,n,o)}return t}),[t])}function Tq(t){return null!=t&&(null!=t.polygons||null!=t.lineStrings)}function Aq(t,e){let{coordinates:n}=e.geometry,{coordinates:r}=t.geometry,i=n.map((e=>_s(t,mr(e))));return r.reduce(((e,n)=>{let r=lv(mr(n),i[0],t),o=lv(mr(n),i[1],t),a=Hu(r)<Hu(o)?r:o;return a.properties={...t.properties,entrances:[]},e.concat([a])}),[])}function zO(t){let e=new Map;for(let n in t){let r=t[n];if(!Tq(r))continue;let{altitude:i,color:o,width:a,height:s,opacity:u}=r;(r.polygons||r.lineStrings).forEach((t=>{e.set(t,{altitude:i,color:o,width:a,height:s,opacity:u,type:n})}))}return e}function Lq(t){return new Map(t.features.map((t=>{let{properties:e}=t,{id:n}=e;return[n,t]})))}function GO(t){if(0===t.length)return;let e;for(let n of t)if("number"==typeof n.elevation){if(!e){e=n;continue}"number"==typeof e.elevation&&(e=Math.abs(n.elevation)===Math.abs(e.elevation)?n.elevation>e.elevation?n:e:Math.abs(n.elevation)<Math.abs(e.elevation)?n:e)}return e}function VO(t){let[e,n,r,i]=Wn(t);return{minLat:n,minLong:e,maxLat:i,maxLong:r}}function Rq(t,e,n){let r=n.createGeoreferences(),i=new Set;e.forEach((t=>{t.layer&&i.add(t.layer)}));let o=t.id||"",a=t.externalId||o||"",s=t.elevation||0,u=[...i].map((t=>({id:t,visible:!0}))),l=1/n.mapScale;return{id:o,georeference:r,name:a,shortName:a,scene:{polygons:e},elevation:s,scale:l,x_scale:l,layers:u,width:n.widthInMapUnits,height:n.heightInMapUnits}}a(dE,"processObstructions"),a(Nq,"splitObstructionByAllEntrances"),a(Tq,"isPolygonStyle"),a(Aq,"splitObstructionByEntrance"),a(zO,"getStylesMap"),a(Lq,"getEntranceMap"),m(),m(),a(GO,"findMapWithElevationClosestToZero"),a(VO,"getMapExtent"),a(Rq,"convertMap");var vE=class{constructor(t){A(this,"mapExtent"),A(this,"stretchRatio"),A(this,"midLat"),A(this,"midLong"),A(this,"mapUnitRatio",1e6),A(this,"latDistance"),A(this,"longDistance"),A(this,"mapScale"),A(this,"widthInMapUnits"),A(this,"heightInMapUnits"),this.mapExtent=t;let{minLat:e,minLong:n,maxLat:r,maxLong:i}=t,o=(e+r)/2,a=(n+i)/2,s=new vn(o,i),u=new vn(o,n),l=new vn(e,a),c=new vn(r,a);this.latDistance=l.distanceTo(c),this.longDistance=s.distanceTo(u);let p=this.latDistance/this.longDistance,h=(r-e)/(i-n);this.stretchRatio=p/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-e)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(t){let e=t[1],n=(t[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-e)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:t,minLong:e,maxLat:n,maxLong:r}=this.mapExtent;return[[t,e],[t,r],[n,r],[n,e]].map((t=>({target:{x:t[0],y:t[1]},control:this.convert([t[1],t[0]])})))}};a(vE,"CoordinateConverter");var Qv=vE;function Dq(t,e){let n=new Map,r=[];return t.features.forEach((t=>{let e=t.properties.id;e&&!n.has(e)&&n.set(e,t)})),n.forEach(((t,i)=>{let o=t.properties.map||"",a=e.get(o);if(a){let e=a.convert(t.geometry.coordinates),s=t.properties.externalId||"",u=[];t.properties.neighbors.forEach((t=>{var e;let r=null!=(e=t.weight)?e:0,i=n.get(t.id);i&&i.properties.map===o&&u.push({node:i.properties.id,map:i.properties.map,weight:r})})),r.push({id:i,map:o,externalId:s,paths:u,...e})}})),r}function Fq(t,e,n){let r=[];return t.features.forEach((t=>{let i=n.convert(t.geometry.coordinates);r.push({id:t.properties.id,x:i.x,y:i.y,map:e,paths:t.properties.neighbors.map((t=>({node:t,map:e})))})})),r}a(Dq,"convertNodes"),a(Fq,"convertNodes_MVFv1");var qO=a(((t,e,n,r,i)=>{let o=[];return e.features.forEach(((a,s)=>{var u;if("Point"===a.geometry.type)return;let l="desk-entrance"===(null==(u=a.properties.kind)?void 0:u.toLowerCase()),c=(l?a.properties.externalId:a.properties.id)||"",p=a.properties.externalId||"",h=n.get(c)||[];if("destinationNodes"in a.properties&&a.properties.destinationNodes.forEach((e=>{h.push({map:t,id:e})})),l&&n.set(p,h),"LineString"===a.geometry.type)return;let f=r.get(a.properties.id),d=a.geometry.coordinates[0].map((t=>i.convert(t))),g=a.properties.center?i.convert(a.properties.center):void 0,y=a.geometry.coordinates.slice(1).map((t=>t.map((t=>i.convert(t))))),v=Math.max(i.widthInMapUnits,i.heightInMapUnits)/1e3,m=a.properties.kind||"",_="void"===m.toLowerCase(),b=1-(s+1)/e.features.length*jO;o.push({entrances:h,map:t,id:c,externalId:p,layer:m,geometry:{visible:!_,position:{x:0,y:0,z:((null==f?void 0:f.altitude)||0)*i.mapScale/v},scale:{x:1,y:1,z:((null==f?void 0:f.height)||1)*i.mapScale/v*b}},material:{color:(null==f?void 0:f.color)||"#000000"},vertexes:d,center:g,holes:y})})),o}),"generateMappedinPolygons"),UO=a(((t,e,n)=>{let r=[];return e.features.forEach((e=>{if(!e.geometry.coordinates[0].forEach)return;let i=e.properties,o=e.geometry.coordinates[0].map((t=>n.convert(t))),a=e.geometry.coordinates.slice(1).map((t=>t.map((t=>n.convert(t))))),s=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,u=[];"entrances"in e.properties&&e.properties.entrances.forEach((t=>u.push({id:"n_"+t.id,map:t.level}))),r.push({entrances:null!=u?u:[],map:t,id:e.properties.id||"",externalId:e.properties.externalId||"",layer:e.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*n.mapScale/s},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/s}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:a})})),r}),"generateMappedinPolygons_MVFv1");function Bq(t,e,n,r,i,o){let a=qO(t,n,r,i,o),s=qO(t,e,r,i,o);return a.concat(s)}function jq(t){let e=[];return t.forEach((t=>{var n;e.push({id:t.id||"",name:t.externalId||"",type:t.type||"",weight:1e3,multiplier:1,nodes:t.nodes||[],accessible:null!=(n=t.accessible)&&n})})),e}function zq(t){let e=new Map;return t.features.forEach((t=>{var n,r,i,o,a,s,u;let l="",c=["n_".concat(t.properties.id)];t.properties.destinations.forEach((t=>{let e=t.split("-");l=e[0],c.push("n_".concat(e[1]))}));let p=null!=(r=null==(n=e.get(l))?void 0:n.nodes)?r:[],h=new Set([...p,...c]);e.set(l,{id:l,name:null!=(i=t.properties.name)?i:"",type:null!=(o=t.properties.type)?o:"",weight:null!=(a=t.properties.weight)?a:1e3,multiplier:null!=(s=t.properties.multiplier)?s:1,nodes:Array.from(h),accessible:null!=(u=t.properties.accessible)&&u})})),Array.from(e.values())}function XO(t,e){var n;let r=null!=(n=e.properties.externalId)?n:"";return 0===r.length&&(r=e.properties.id),"location-".concat(t,"-").concat(r.toLowerCase().replace(" ","-"))}function YO(t,e){var n;let r=new Set;if("entrance"===t)r.add("Entrance");else if("obstruction"===t){let t=e.properties.kind;null!=t&&t.length>0&&r.add(t),e.properties.footprintComponent&&r.add("Exterior")}else if("space"===t){let t=e.properties.kind;null!=t&&t.length>0&&r.add("default"===t?"Room":t);let i=null!=(n=e.properties.tags)?n:[];if(i.length>0)for(let t of i)r.add(t)}return Array.from(r).filter((t=>t.length>0))}function WO(t){return"category-".concat(t.toLowerCase().replace(" ","-"))}function gE(t,e,n){let r=YO(t,e);for(let t of r){let e=WO(t);null==n[e]&&(n[e]={id:e,name:t})}}function HO(t){var e,n,r;return null!=(r=null==(n=null==(e=null==t?void 0:t.properties)?void 0:e.kind)?void 0:n.startsWith("connection"))&&r}function Gq(t){var e;let n=null!=(e=t.properties.externalId)?e:"";return HO(t)&&0===n.length&&(n="unnamed-connection-"+t.properties.id),n}function Xh(t,e,n,r){var i;if((null==e.properties.externalId||0===e.properties.externalId.length)&&!HO(e)||"obstruction"===t&&"desks"!==(null==(i=e.properties.kind)?void 0:i.toLowerCase()))return;let o=Gq(e),a=XO(t,e);if(null==r[a]){let t={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};r[a]=t}if("space"===t||"obstruction"===t){let t={map:n.id,id:e.properties.id};r[a].polygons.push(t)}if("destinationNodes"in e.properties&&e.properties.destinationNodes.forEach((t=>{let e={map:n.id,node:t};r[a].nodes.push(e)})),"node"in e.properties&&e.properties.node){let t={map:n.id,node:e.properties.node};r[a].nodes.push(t)}let s=YO(t,e);for(let t of s){let e=WO(t);r[a].categories.push(e)}}function qq(t,e=new Map){var n,r,i,o,a,s,u,l,c;let p={},h={},{space:f,"map.geojson":d,entrance:g,obstruction:y}=t;for(let t of d){let d=null!=(r=null==(n=f[t.id])?void 0:n.features)?r:[],v=null!=(o=null==(i=g[t.id])?void 0:i.features)?o:[],m=null!=(s=null==(a=y[t.id])?void 0:a.features)?s:[];for(let e of d)["Polygon","Point"].includes(e.geometry.type)&&"hallway"!==(null==(u=e.properties.kind)?void 0:u.toLowerCase())&&(gE("space",e,h),Xh("space",e,t,p));let _=new Map;for(let e of v)_.set(e.properties.id,e),e.properties.externalId&&(gE("entrance",e,h),Xh("entrance",e,t,p));let b={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};Xh("entrance",b,t,p);for(let n of m){if(gE("obstruction",n,h),Xh("obstruction",n,t,p),n.properties.footprintComponent){let e=n.properties.entrances;for(let n of e){let e=_.get(n);e&&Xh("entrance",{...e,properties:{...e.properties,externalId:b.properties.externalId}},t,p)}}if("desks"===(null==(l=n.properties.kind)?void 0:l.toLowerCase())&&n.properties.externalId.length>0){let t=null!=(c=e.get(n.properties.id))?c:[];for(let e of t){let t=XO("obstruction",n);null!=p[t]&&p[t].nodes.push({map:e.map,node:e.id})}}}}return{locations:Object.values(p),categories:Object.values(h)}}function KO(t){var e,n,r,i,o,a,s,u,l,c;let p=null!=(e=t.obstruction)?e:[],h=null!=(n=t.space)?n:[],f=null!=(r=t.entrance)?r:[],d=null!=(i=t["mapstack.geojson"])?i:[],g=null!=(o=t["map.geojson"])?o:[],y=null!=(a=t["styles.json"])?a:{},v=null!=(s=t["manifest.geojson"])?s:{},m=null!=(u=t["node.geojson"])?u:[],_=null!=(l=t["connection.json"])?l:[],b={},w=new Map,x=[],E=zO(y),I=new Map,S=new Map;g.forEach((t=>{let e=t.id;e&&!S.has(e)&&S.set(e,t)})),d.forEach((({maps:t})=>{t.forEach((t=>{if(!S.has(t))return;let e=dE(p[t],f[t],E);if(e.features.length){let n=VO(e),r=new Qv(n);w.set(t,r),b[t]=Bq(t,e,h[t],I,E,r),x.push(Rq(S.get(t),b[t],r))}}))})),x.sort(((t,e)=>"number"==typeof t.elevation&&"number"==typeof e.elevation?t.elevation-e.elevation:0));let C=Object.values(b).flat(),M=jq(_),N=Dq(m,w),A=v.features[0],O=A.properties.name,P=A.geometry.coordinates[0],L=A.geometry.coordinates[1],T=(null==(c=GO(x))?void 0:c.id)||"",{locations:R,categories:D}=qq(t,I);return{polygons:C,venue:{name:O,latitude:L,longitude:P,defaultMap:T},maps:x,vortexes:M,nodes:N,locations:R,mapGroups:[],locationStates:[],categories:D,themes:[],imageBinaries:new Map}}function JO(t){var e,n,r,i,o,a,s;let u=null!=(e=t.obstruction)?e:{},l=null!=(n=t.space)?n:{},c=null!=(r=t.node)?r:{},p=null!=(i=t.level)?i:{},h=null!=(o=t["manifest.geojson"])?o:{},f=null!=(a=t.connection)?a:{},d={},g=new Map,y=[],v=[],m=[];Object.keys(p).forEach((t=>{let e=dE(u[t],{type:"FeatureCollection",features:[]});if(e.features.length){let n=VO(e),r=new Qv(n);g.set(t,r);let i=UO(t,l[t],r),o=UO(t,e,r);d[t]=i.concat(o),v=v.concat(Fq(c[t],t,r)),y.push(Uq(p[t],d[t],r))}m=m.concat(zq(f[t]))}));let _=Object.values(d).flat(),b=h.features[0],w=b.properties.name,x=b.geometry.coordinates[0],E=b.geometry.coordinates[1],I=(null==(s=y[0])?void 0:s.id)||"",S=new Map;_.forEach((t=>S.set(t.id,t)));let C=[],M=t["location.geojson"].features.map((t=>{if(t.properties.spaces){let e=t.properties.spaces.map((t=>t.id)).map((t=>S.get(t))).filter((t=>t));if(e){let t=[];e.forEach((e=>{t.push(...e.entrances.map((t=>({node:t.id,map:t.level}))))})),C=t}}return{...t.properties,nodes:C,polygons:t.properties.spaces}})),N=t["category.geojson"].features.map((t=>t.properties));return{polygons:_,venue:{name:w,latitude:E,longitude:x,defaultMap:I},maps:y,vortexes:m,nodes:v,locations:M,mapGroups:[],locationStates:[],categories:N,themes:[],imageBinaries:new Map}}function Uq(t,e,n){let r=n.createGeoreferences(),i=new Set,o=t.features[0].properties;e.forEach((t=>{t.layer&&i.add(t.layer)}));let a=[...i].map((t=>({id:t,visible:!0}))),s=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:e},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:n.widthInMapUnits,height:n.heightInMapUnits}}a(Bq,"convertPolygons"),a(jq,"convertVortexes"),a(zq,"convertVortexes_MVFv1"),a(XO,"getLocationId"),a(YO,"getFeatureCategories"),a(WO,"getCategoryIdFromName"),a(gE,"mutateCategoriesWithNewFeature"),a(HO,"isFeatureConnection"),a(Gq,"getLocationLabel"),a(Xh,"mutateLocationsWithNewFeature"),a(qq,"createMetaDataFromMVF"),a(KO,"convertMVFToMappedin"),a(JO,"convertMVFv1ToMappedin"),a(Uq,"convertMap_MVFv1"),m();var vN,Yh,Dc,Fc,Wh,Bc,jc,zc,vu,Gc,qc,Uc,Hh,Vc,vl,mN=wr(gN()),$q=null==(vN=null==G?void 0:G.env)?void 0:vN.npm_package_version,$v=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],_E=$v[0],e4=!1,go=class t{constructor(t){var e;Ne(this,Yh,void 0),Ne(this,Dc,void 0),Ne(this,Fc,void 0),Ne(this,Wh,void 0),Ne(this,Bc,void 0),Ne(this,jc,void 0),Ne(this,zc,void 0),Ne(this,vu,void 0),Ne(this,Gc,void 0),Ne(this,qc,void 0),Ne(this,Uc,void 0),Ne(this,Hh,void 0),Ne(this,Vc,void 0),Ne(this,vl,void 0),De(this,vu,t.clientId),De(this,Gc,t.clientSecret),De(this,qc,t.accessToken),De(this,zc,t.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!B(this,zc)&&B(this,vu)&&!Gg(B(this,vu))&&(n="https://web-proxy.mappedin.com/a/"),De(this,Fc,n),De(this,Fc,B(this,Fc)+(t.venue+"/")),De(this,Vc,t.venue),De(this,Dc,!1),De(this,Yh,"boolean"==typeof t.testMode?t.testMode:"true"===(null==(e=t.testMode)?void 0:e.toLowerCase())),De(this,Wh,$v.find((e=>e===t.context))||$v[0]),De(this,Bc,Dg()),De(this,jc,Fg()),De(this,Uc,new Set),De(this,Hh,t.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Xl(this.getDirections.bind(this),2500)}static create(e){return t.instance||(t.instance=new t(e)),t.instance}track(t,e){let n={...e,g:B(this,Dc)};B(this,vl)&&(n={...n,...B(this,vl)});let r=B(this,Fc)+t+"?"+mN.default.stringify(n,{skipEmptyString:!0,skipNull:!0});if(e4&&He.log("Analytics.track",r),B(this,Yh))return;let i={"mi-context":_E||B(this,Wh),"mi-session":B(this,jc),"mi-device":B(this,Bc),"mappedin-sdk-version":$q,"mappedin-platform-version":B(this,Hh)};B(this,qc)?i.Authorization="Bearer ".concat(B(this,qc)):B(this,zc)||B(this,Gc)&&B(this,vu)&&(i["x-mappedin-key"]=btoa(B(this,vu)),i["x-mappedin-secret"]=btoa(B(this,Gc))),hs()(r,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(t){De(this,vl,t?{...t,bluedotTimestamp:Date.now()}:void 0)}locationSelected(t){let e=t.id||t;cn.addPendingEvent(new Ff({venue:B(this,Vc)})),this.track("select-location",{id:e})}categorySelected(t){let e=t.id||t;cn.addPendingEvent(new Df({venue:B(this,Vc)})),this.track("select-category",{id:e})}mapViewLoaded(t,e,n,r){this.track("load-mapview",{type:t,force:e,benchmark:n||-1,reason:r||"success"})}getDirections(t,e){let n={start:t.id,end:e.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return B(this,jc)}getDeviceID(){return B(this,Bc)}setGeolocationMode(t){De(this,Dc,t)}trackBlueDotEvent(e){e&&Object.values(t.BLUEDOT_EVENT).includes(e)&&!B(this,Uc).has(e)&&(this.track(e),B(this,Uc).add(e))}trackSearch(t){null!=t&&this.track("query-search",t)}trackSearchSuggest(t){null!=t&&this.track("query-suggest",t)}static setContext(t){let e=$v.find((e=>e===t));e&&(_E=e)}static clearContext(){_E=void 0}static destroy(){t.instance=null}};Yh=new WeakMap,Dc=new WeakMap,Fc=new WeakMap,Wh=new WeakMap,Bc=new WeakMap,jc=new WeakMap,zc=new WeakMap,vu=new WeakMap,Gc=new WeakMap,qc=new WeakMap,Uc=new WeakMap,Hh=new WeakMap,Vc=new WeakMap,vl=new WeakMap,a(go,"Analytics"),A(go,"instance",null),A(go,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var bE=go,Kh=bE;m();var wE=class{constructor(){A(this,"_subscribers",{})}publish(t,e){!this._subscribers||!this._subscribers[t]||this._subscribers[t].forEach((function(t){"function"==typeof t&&t(e)}))}on(t,e){this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(e)}off(t,e){if(!this._subscribers||null==this._subscribers[t])return;let n=this._subscribers[t].indexOf(e);-1!==n&&this._subscribers[t].splice(n,1)}destroy(){this._subscribers={}}};a(wE,"PubSub");var Ls,Xc,ml,Yc,Jh,EE,tm,bN,em=wE,_N={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",things:{},venue:""},xE=class extends em{constructor(t){super(),Ne(this,Jh),Ne(this,tm),A(this,"perspective"),A(this,"things"),A(this,"options"),Ne(this,Ls,void 0),Ne(this,Xc,""),A(this,"updatedAt"),A(this,"categories",[]),A(this,"locations",[]),A(this,"vortexes",[]),A(this,"maps",[]),A(this,"nodes",[]),A(this,"polygons",[]),A(this,"venue",{}),A(this,"events",[]),A(this,"mapGroups",[]),A(this,"themes",[]),A(this,"locationStates",[]),A(this,"rankings"),A(this,"currentLanguage"),Ne(this,ml,{}),A(this,"_categoriesById"),A(this,"_locationsById"),A(this,"_vortexesById"),A(this,"_mapsById"),A(this,"_nodesById"),A(this,"_polygonsById"),A(this,"_eventsById"),A(this,"_mapGroupsById"),A(this,"_locationStatesById"),A(this,"_locationRankingsById"),A(this,"_rankingsById"),A(this,"_categoriesByExternalId"),A(this,"_locationsByExternalId"),A(this,"_vortexesByExternalId"),A(this,"_mapsByExternalId"),A(this,"_nodesByExternalId"),A(this,"_polygonsByExternalId"),A(this,"_eventsByExternalId"),A(this,"_mapGroupsByExternalId"),A(this,"_locationStatesByExternalId"),A(this,"_locationRankingsByExternalId"),A(this,"_rankingsByExternalId"),Ne(this,Yc,void 0),A(this,"images"),A(this,"imageBinaries"),A(this,"scenes"),A(this,"analytics"),A(this,"navigator"),this.options=t,De(this,Ls,di.create(this));let e=Kh.create({...t,testMode:!(null!=t&&t.emitAnalyticsEvents)});this.analytics={locationSelected:e.locationSelected,categorySelected:e.categorySelected,getDirections:e.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Rx,"true")}})}generateGetters(t){try{for(let e=0,n=t.length;e<n;++e){let n=t[e];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let t=B(this,Ls)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.externalId]=t)),B(this,Ls)[n]=e,e}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let t=B(this,Ls)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.id]=t)),B(this,Ls)[n]=e,e}}))}return this}catch(t){throw new Error("Unable to generate getters, "+t)}}getCollectionItemById(t,e){let n="_".concat(t,"ById"),r="_".concat(t,"ByExternalId"),i=this[n];return null!=i&&null!=i[e]||(i=this[r],null!=i&&null!=i[e])?i[e]:null}async hydrateFromMVF(t){let e=KO(t);return this.hydrate(e)}async hydrateFromMVFv1(t){let e=JO(t);return this.hydrate(e)}async changeLanguage(t,e=!0){var n;if(this.currentLanguage.code!==t){if(null==(n=this.venue.languages)||!n.find((e=>e.code===t)))return void He.error("Language ".concat(t," not found in venue ").concat(this.venue.slug));if(e&&!B(this,ml)[this.currentLanguage.code]&&(B(this,ml)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),di.clearInstance(this),De(this,Ls,di.create(this)),this.currentLanguage=this.venue.languages.find((e=>e.code===t)),null!=B(this,ml)[t]){let e=JSON.parse(B(this,ml)[t]);await this.hydrate(e)}else this.options.language=this.currentLanguage.code,await this.fetch();this.publish(0,this.currentLanguage)}}async hydrate(t,e){let n;if("string"==typeof t)try{De(this,Xc,t),n=JSON.parse(t)}catch(t){return void He.error("Unable to parse JSON",t)}else n=t,De(this,Xc,JSON.stringify(n));let r=Object.keys(n);for(let t=0,e=r.length;t<e;++t){let e=r[t],i=n[e];null!=Gu[e]&&"function"==typeof Gu[e].hydrate&&(this[e]=Gu[e].hydrate(i,this))}e&&await uI(n);let{images:i,scenes:o,imageBinaries:a}=n;this.images=i,this.scenes=o,this.imageBinaries=a,this.generateGetters(r),Hr(this,Jh,EE).call(this),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Gg(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,e=[],n=Object.keys(t);for(let t=0,r=n.length;t<r;++t){let r=n[t];Gu[r]&&e.push(Gu[r].fetch(this).then((t=>(this[r]=t,Promise.resolve()))))}return e.push(ql(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((t=>De(this,Yc,t.token)),(()=>Promise.resolve()))),this.generateGetters(n),Promise.all(e).then((()=>{var t;this.currentLanguage=this.currentLanguage||(null==(t=this.venue.languages)?void 0:t.find((t=>t.code===this.options.language)))||this.venue.defaultLanguage,Hr(this,Jh,EE).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Zm({locations:this.locations.map((t=>t.toJSON())),nodes:this.nodes.map((t=>t.toJSON())),vortexes:this.vortexes.map((t=>t.toJSON())),maps:this.maps.map((t=>t.toJSON())),polygons:this.polygons.map((t=>t.toJSON()))})}toJSON(){var t;let e={};for(let t in Gu)Array.isArray(this[t])&&(e[t]=this[t].map((t=>t.toJSON())));let n={...e,venue:this.venue.toJSON()};return null!=this.rankings&&(n.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete n.locationRankings,n}toString(){return B(this,Xc)||JSON.stringify(this.toJSON())}};Ls=new WeakMap,Xc=new WeakMap,ml=new WeakMap,Yc=new WeakMap,Jh=new WeakSet,EE=a((function(){B(this,Yc)&&this.maps.forEach((t=>{var e;null!=(e=t.scene)&&e.polygons&&(t.scene.polygons+="?".concat(B(this,Yc)))})),Hr(this,tm,bN).call(this)}),"#transformData"),tm=new WeakSet,bN=a((function(){let t=this.categories.filter((t=>t.sortOrder)).map((t=>t.sortOrder));if(t.length<=0)return;let e=Math.min(...t),n=Math.max(...t);this.polygons.forEach((t=>{var r,i;let o=cI(t,this);if(o){let a=o.categories.filter((t=>t.sortOrder)).map((t=>t.sortOrder));if(a.length>0){let o=Math.min(...a);t.categoryRank=lI(o,e,n,null!=(i=null==(r=t.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),a(xE,"Mappedin");var ms=xE;m();var wN={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};m();var yl=wr(EN());m();var t4=["0","1","2","3","4","5","6","7","8","9"],r4=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],n4=["0","1","2","3","4","5","6","7","8","9"],i4=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],ohe=[...t4,...r4,...n4,...i4],xN=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];m();var a4=32,Zi=!1,o4=120,IE=0,CE=class{constructor(t){A(this,"_callback"),A(this,"_frameCount"),A(this,"_ordering"),A(this,"_supersededBy"),A(this,"name"),A(this,"_remainingFrameCount"),A(this,"_lastFrameTime"),A(this,"userdata"),this._callback=t.callback,this._frameCount=null!=t.frameCount?t.frameCount:1,this._ordering=null!=t.ordering?t.ordering:0,this._supersededBy=null!=t.supersededBy?new Set(t.supersededBy):new Set,this.name=t.name,this.userdata=t.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,Zi&&He.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};a(CE,"FrameUpdate");var rm=CE,kE=class{constructor(t){if(A(this,"_postponed"),A(this,"userdata"),A(this,"_priority"),A(this,"_group"),A(this,"name"),A(this,"_lastFrameTime"),A(this,"_callback"),A(this,"_complete"),A(this,"_scheduled"),A(this,"_cancelled"),null!=t.group&&null!=t.priority)throw new Error("cannot specify task priority individually within group");if(null!=t.group&&null!=t.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=t.callback,this._group=null!=t.group?t.group:null,this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,Zi&&He.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};a(kE,"FrameTask");var Rs=kE,OE=class{constructor(t){A(this,"_postponed"),A(this,"_onComplete"),A(this,"_priority"),A(this,"userdata"),A(this,"name"),A(this,"_tasks"),A(this,"_scheduledTasks"),A(this,"_scheduled"),A(this,"_cancelled"),this._onComplete=null!=t.onComplete?t.onComplete:()=>{},this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,Zi&&He.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let t of this._scheduledTasks)return this._scheduledTasks.delete(t),t}};a(OE,"FrameTaskGroup");var nm=OE,NE=class{constructor(t){A(this,"_maxMillisecondsPerFrame"),A(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==t?void 0:t.maxMillisecondsPerFrame)?t.maxMillisecondsPerFrame:a4,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};a(NE,"RealTimeTimer");var PE=NE,TE=class{constructor(t){var e;A(this,"_raf"),A(this,"options"),A(this,"_timer"),A(this,"_performance"),A(this,"_scheduledUpdatesByOrdering"),A(this,"_scheduledTasksByPriority"),A(this,"_postponedTasks"),A(this,"_requestAnimationFrameHandle"),A(this,"_updatesToRunThisFrame"),A(this,"_lastFrameTime",0),A(this,"_updatesRunLastFrame"),this.options=t,this._timer=null!=(null==t?void 0:t.timer)?t.timer:new PE,this._performance=null!=(null==t?void 0:t.performance)&&t.performance,this._scheduledUpdatesByOrdering=new Wc,this._scheduledTasksByPriority=new Wc,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),Zi&&He.log("task scheduler instantiated"),null!=(e=globalThis.MappedinDebug)&&e.TEST_IOS&&(this._raf=t=>setTimeout(t,16))}clear(){for(let t of this._scheduledTasksByPriority.values())t._cancelled=!0;for(let t of this._postponedTasks.values())t._cancelled=!0;this._scheduledUpdatesByOrdering=new Wc,this._scheduledTasksByPriority=new Wc,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),Zi&&He.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(t){var e;let n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;Zi&&(0===IE&&(r=!0),++IE,IE%=o4);let i=this._scheduledUpdatesByOrdering.keys();for(let t=i.length-1;t>=0;--t){let e=i[t];for(let t of this._scheduledUpdatesByOrdering.get(e).values())this._updatesToRunThisFrame.push(t),r&&He.log("update scheduled to run this frame",t.name)}for(let t of this._updatesToRunThisFrame){--t._remainingFrameCount,t._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(t._ordering,t),t._superseded=!1;for(let e of this._updatesToRunThisFrame)t._supersededBy.has(e)&&(t._superseded=!0,r&&He.log("update superseded",t.name,e.name))}for(let t=0;t<this._updatesToRunThisFrame.length;++t)this._updatesToRunThisFrame[t]._superseded&&(this._updatesToRunThisFrame.splice(t,1),--t);for(let e of this._updatesToRunThisFrame){let n;this._performance&&(n=performance.now()),e._callback(t),this._performance&&(e._lastFrameTime=performance.now()-n),r&&He.log("update completed",e.name)}this._updatesRunLastFrame.clear();for(let t of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(t);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(t)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-n),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(e=this.options)&&e.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(t){let e,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;He.assert(void 0!==n),Object.getPrototypeOf(n)===nm.prototype&&(r=n,n=r._popTask()),He.assert(void 0!==n),He.assert(Object.getPrototypeOf(n)===Rs.prototype),this._performance&&(e=performance.now()),n._callback(t),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-e),Zi&&He.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),Zi&&He.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(t){t._remainingFrameCount=t._frameCount,this._scheduledUpdatesByOrdering.insert(t._ordering,t),this.requestAnimationFrame()}scheduleTask(t){if(Object.getPrototypeOf(t)===nm)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+t.name);if(t._scheduled)throw new Error("cannot schedule already scheduled task: "+t.name);if(t._cancelled)throw new Error("cannot schedule cancelled task: "+t.name);let e=t;"_group"in t&&null!=t._group&&(t._group._tasks.add(t),t._group._scheduledTasks.add(t),e=t._group),e._postponed?this._postponedTasks.add(e):this._scheduledTasksByPriority.insert(e._priority,e),t._scheduled=!0,e._scheduled=!0,Zi&&He.log("task scheduled",t.name),this.requestAnimationFrame()}cancelUpdate(t){this._scheduledUpdatesByOrdering.delete(t._ordering,t),Zi&&He.log("update cancelled",t.name)}cancelTask(t){if(!t._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+t.name);if(t._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+t.name);if("_group"in t&&null!=t._group){let e=t._group.isComplete();t._group._tasks.delete(t),t._group._scheduledTasks.delete(t),t._group.isComplete()&&(this._scheduledTasksByPriority.delete(t._group._priority,t._group),e||t._group._onComplete())}else this._scheduledTasksByPriority.delete(t._priority,t),this._postponedTasks.delete(t);Object.getPrototypeOf(t)===Rs.prototype?t._cancelled=!0:"clear"in t&&t.clear(),Zi&&He.log("task cancelled",t.name)}postponeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot postpone individual tasks in group: "+t.name);if(t._cancelled)throw new Error("cannot postpone cancelled task: "+t.name);if(!t._postponed){if(Object.getPrototypeOf(t)===Rs.prototype){if("_complete"in t)return;if(!t._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+t.name)}this._scheduledTasksByPriority.delete(t._priority,t),(Object.getPrototypeOf(t)===Rs.prototype||!t.isComplete())&&this._postponedTasks.add(t),t._postponed=!0,Zi&&He.log("task postponed",t.name)}}resumeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot resume individual tasks in groups");if(t._cancelled)throw new Error("cannot resume cancelled task");if(t._postponed){if(Object.getPrototypeOf(t)===Rs.prototype){if("_complete"in t&&t._complete)return;if(!t._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(t),(Object.getPrototypeOf(t)===Rs.prototype||!t.isComplete())&&this._scheduledTasksByPriority.insert(t._priority,t),t._postponed=!1,this.requestAnimationFrame(),Zi&&He.log("task resumed",t.name)}}setTaskPriority(t,e){if(Object.getPrototypeOf(t)===Rs.prototype&&!t._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(t._priority,t)&&(this._scheduledTasksByPriority.delete(t._priority,t),this._scheduledTasksByPriority.insert(e,t)),t._priority=e,Zi&&He.log("task priority changed",t.name,e)}};a(TE,"TaskScheduler");var im=TE,AE=class{constructor(){A(this,"_map"),A(this,"_size"),A(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(t,e){return null!=this._map.get(t)&&this._map.get(t).has(e)}get(t){return this._map.get(t)}insert(t,e){if(He.assert("number"==typeof t&&Number.isFinite(t)),null==this._map.get(t)){this._map.set(t,new Set);for(let e=0;e<=this._sortedKeys.length;++e)if(e===this._sortedKeys.length||t<this._sortedKeys[e]){this._sortedKeys.splice(e,0,t);break}}this._map.get(t).has(e)||(this._map.get(t).add(e),++this._size)}delete(t,e){null!=this._map.get(t)&&this._map.get(t).has(e)&&(this._map.get(t).delete(e),--this._size,0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)))}pop(t){if(null!=this._map.get(t)){let e;for(e of this._map.get(t).values()){this._map.get(t).delete(e),--this._size;break}return 0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)),e}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let t=this._map.keys(),e=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==e){let n=t.next();if(n.done)return n;e=this._map.get(n.value).values()}let n=e.next();for(;n.done;){let r=t.next();if(r.done)return r;e=this._map.get(r.value).values(),n=e.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let t=0;for(let e of this._map.values())t+=e.size;return He.assert(t===this._size),t}};a(AE,"Multimap");var Wc=AE,Ds=a((t=>t.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),s4=/([!-/:-@])|(?:[\n\r [-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+)/u;function u4(t){return t.split(s4).filter(Boolean)}a(u4,"tokenizeAndCaptureDelimiters");var Fs,Va,mu,Jo,hn,Qh,$h,Kc,ed,td,rd,nd,Jc,Bs,am,om,yu,id,sm,um,lm,SN,Hc="",l4=.09,c4=1,f4=.025,p4=.5,h4=5e-4,d4=5e-4,g4=.01,v4=.05,MN=1,m4=.01,y4=.2,_4={MappedinCategory:"categories",MappedinLocation:"locations"},b4={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:xN,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===G.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:l4,PRIMARY_INDEX_WEIGHT:c4,SECONDARY_INDEX_WEIGHT:f4,CATEGORY_NAME_WEIGHT:p4,LOCATION_NAME_WEIGHT:MN,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:h4,CATEGORY_LOCATION_TAGS_WEIGHT:d4,CATEGORY_LOCATION_NAME_WEIGHT:g4,PRIMARY_INDEX_TAGS_NAME_WEIGHT:v4,LOCATION_DEFAULT_RANK:MN,RATIO_OF_FUZZY_TO_EXACT:m4,RATIO_OF_PREFIX_TO_EXACT:y4}},LE=class{constructor(t,e){var n;Ne(this,lm),Ne(this,Fs,void 0),Ne(this,Va,void 0),Ne(this,mu,void 0),Ne(this,Jo,void 0),Ne(this,hn,void 0),Ne(this,Qh,new im({performance:!0})),Ne(this,$h,void 0),Ne(this,Kc,void 0),Ne(this,ed,new Map),Ne(this,td,void 0),Ne(this,rd,void 0),Ne(this,nd,void 0),A(this,"buildIndices",a((()=>{var t,e;De(this,yu,new Promise((t=>{De(this,id,t)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:a,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=B(this,hn).constants,u=["object","query","weight","tag","rank"],l={fields:["query","name","tag"],storeFields:u,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:s},weights:{fuzzy:o,prefix:a},boostDocument:t=>t.includes("MappedinLocation")?r:t.includes("MappedinCategory")?i:r,tokenize:u4},c={fields:["description"],storeFields:u,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(t,e)=>{var n;return null!=(n=B(this,$h))&&n.has(t.toLowerCase())?null:t.toLowerCase()}},p={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...u,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(null!=(t=B(this,hn))&&t.jsonIndex){let{primary:t,secondary:n,extra:r}=JSON.parse(null==(e=B(this,hn))?void 0:e.jsonIndex);De(this,Va,yl.default.loadJS(t,l)),De(this,mu,yl.default.loadJS(n,c)),De(this,Jo,yl.default.loadJS(r,p))}else De(this,Va,new yl.default(l)),De(this,mu,new yl.default(c)),De(this,Jo,new yl.default(p)),B(this,Fs).locations.forEach(B(this,am)),B(this,Fs).categories.forEach(B(this,om));B(this,Qh).update(performance.now())}),"buildIndices")),Ne(this,Jc,0),Ne(this,Bs,a((t=>{zm(this,Jc)._++,B(this,Qh).scheduleUpdate(new rm({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{t(),zm(this,Jc)._--,0===B(this,Jc)&&B(this,id).call(this)}}))}),"#addTask")),Ne(this,am,a((t=>{var e,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=B(this,hn).constants,s=o;null!=(e=B(this,hn))&&e.useLocationRank&&(s=Array.isArray(t.polygons)?Math.max(...t.polygons.map((t=>{var e,n;return null!=(e=t.rank)&&e.score?null==(n=t.rank)?void 0:n.score:o})),o):o),B(this,Bs).call(this,(()=>{B(this,Va).add({name:Ds(t.name),tags:"",id:"MappedinLocation_"+t.id,weight:o,rank:s})})),null!=(n=B(this,hn))&&n.searchTags&&Array.isArray(t.tags)&&t.tags.forEach((e=>{B(this,Va).add({name:"",tag:Ds(e),id:"MappedinLocation_"+t.id,weight:a,rank:s})})),null!=(r=B(this,hn))&&r.searchDescriptions&&B(this,Bs).call(this,(()=>B(this,mu).add({description:Ds(t.description||""),id:"MappedinLocation_"+t.id,weight:i,rank:s})))}),"#processLocation")),Ne(this,om,a((t=>{var e,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=B(this,hn).constants;B(this,Bs).call(this,(()=>B(this,Va).add({name:Ds(t.name||""),description:"",id:"MappedinCategory_"+t.id,weight:a})));let s=t.locations.reduce(((t,e)=>t+" ".concat(Hc," ")+e.name),"")+" ".concat(Hc);if(null!=(e=B(this,hn))&&e.searchDescriptionsInCategories&&t.locations.forEach((e=>{null!=e.description&&B(this,Bs).call(this,(()=>B(this,Jo).add({id:"MappedinCategory_"+t.id,"category.locations.description":Ds(e.description),ref:e.name,weight:r})))})),null!=(n=B(this,hn))&&n.searchTagsInCategories){let e=t.locations.reduce(((t,e)=>{var n;return t+(null==(n=e.tags)?void 0:n.reduce(((t,e)=>t+" ".concat(Hc," ")+e),""))+" ".concat(Hc)}),"");B(this,Bs).call(this,(()=>B(this,Jo).add({"category.locations.tags":Ds(e),id:"MappedinCategory_"+t.id,weight:i})))}B(this,Bs).call(this,(()=>B(this,Jo).add({"category.locations.name":Ds(s),id:"MappedinCategory_"+t.id,weight:o})))}),"#processCategory")),Ne(this,yu,void 0),Ne(this,id,void 0),Ne(this,sm,a((t=>{var e;let n=t.score,{object:r,id:i,weight:o,rank:a}=t,[s,u]=i.split("_"),l=r||B(this,Fs).getCollectionItemById(_4[s],u);return a&&null!=(e=B(this,hn))&&e.useLocationRank&&(n+=a),o&&(n*=o),{score:n,type:s,object:l}}),"#processSearchResult")),Ne(this,um,a(((t,e)=>{for(let n in t.match)t.match[n].forEach((r=>{let i=t.ref||t[r]||e.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let e=new RegExp("[^".concat(Hc,"]* ")+n+" [^".concat(Hc,"]*"),"ig").exec(t[r]);null!=e&&(i=e[0].slice(1,-1))}e.matches.push({term:n,weight:t.weight,matchesOn:r,value:i})}))}),"#addMatches")),De(this,Kc,Kh.create({...t.options,testMode:!1===(null==e?void 0:e.emitAnalyticsEvents)})),De(this,hn,{...b4,...e}),De(this,Fs,t),De(this,$h,new Set(null==(n=B(this,hn))?void 0:n.stopWords));let r=B(this,Fs).venue.slug;B(this,Fs).on(0,this.buildIndices),this.buildIndices(),De(this,td,Xl((t=>{B(this,Kc).trackSearchSuggest({query:t}),cn.addPendingEvent(new Jf({venue:r}))}),300)),De(this,rd,Xl((t=>{B(this,Kc).trackSearch({query:t}),cn.addPendingEvent(new Kf({venue:r}))}),300)),De(this,nd,Xl((()=>{cn.addPendingEvent(new Wf({venue:r}))}),300)),cn.addPendingEvent(new Hf({search_descriptions:B(this,hn).searchDescriptions,search_tags:B(this,hn).searchTags,search_descriptions_in_categories:B(this,hn).searchDescriptionsInCategories,search_tags_in_categories:B(this,hn).searchTagsInCategories,use_location_rank:B(this,hn).useLocationRank,venue:r}))}async suggest(t){await B(this,yu);let{PRIMARY_INDEX_FUZZYNESS:e,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=B(this,hn).constants,a=B(this,Va).autoSuggest(t,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:e,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return B(this,td).call(this,t),{total:a.length,hits:a.map((t=>({text:t.suggestion})))}}async search(t){await B(this,yu);let e=Hr(this,lm,SN).call(this,t);return B(this,rd).call(this,t),e}async toJSON(){return await B(this,yu),JSON.stringify({primary:B(this,Va),secondary:B(this,mu),extra:B(this,Jo)})}async addQuery(t){let e,n,{query:r,object:i,weight:o=1}=t;await B(this,yu),e=i instanceof ds?"MappedinLocation":i instanceof Bu?"MappedinCategory":"Custom","MappedinLocation"===e||"MappedinCategory"===e?n=e+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=B(this,ed).get(i),n||(n="Custom_"+vs(),B(this,ed).set(i,n))),B(this,Va).add({id:n,weight:o,object:i,query:Ds(r)}),B(this,nd).call(this)}};Fs=new WeakMap,Va=new WeakMap,mu=new WeakMap,Jo=new WeakMap,hn=new WeakMap,Qh=new WeakMap,$h=new WeakMap,Kc=new WeakMap,ed=new WeakMap,td=new WeakMap,rd=new WeakMap,nd=new WeakMap,Jc=new WeakMap,Bs=new WeakMap,am=new WeakMap,om=new WeakMap,yu=new WeakMap,id=new WeakMap,sm=new WeakMap,um=new WeakMap,lm=new WeakSet,SN=a((function(t){let e=[],n=Ds(t);e=[...B(this,Va).search(n),...B(this,mu).search(n),...B(this,Jo).search(n)].sort(((t,e)=>e.score-t.score));let r={};for(let t of e){let e=B(this,sm).call(this,t);r[t.id]?r[t.id].score+=e.score:r[t.id]={...e,matches:[]},B(this,um).call(this,t,r[t.id])}return Object.keys(r).map((t=>({...r[t],matches:r[t].matches.sort(((t,e)=>e.weight-t.weight))}))).sort(((t,e)=>e.score-t.score))}),"#doSearch"),a(LE,"OfflineSearch");var Zh=LE;m();var RE=globalThis.fetch;function hs(){if(null==RE)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return RE}function CN(t){RE=t}a(hs,"isomorphicFetch"),a(CN,"setFetchFn");var IN,w4=null==(IN=null==G?void 0:G.env)?void 0:IN.npm_package_version;globalThis.btoa||(globalThis.btoa=PN.encode);var E4=["ar"];function DE(t){let e={..._N,things:wN,...t};return e.headers={...e.headers,"mappedin-sdk-version":w4},t.platformString&&(e.headers={...e.headers,"mappedin-platform-version":t.platformString}),e.noAuth||(e.accessToken?e.authorization="Bearer ".concat(e.accessToken):e.clientId&&e.clientSecret&&(e.authorization="Basic ".concat(globalThis.btoa("".concat(e.clientId,":").concat(e.clientSecret))))),e}async function FE(t){let e={emitAnalyticsEvents:!0,secure:!0,...t},n=DE({baseUrl:"https://api-gateway.mappedin.com/",...e}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new ms({...n,baseUrl:n.baseUrl+r});return await i.fetch(),e.emitAnalyticsEvents,cn.addPendingEvent(new Bf({venue:n.venue})),i}a(DE,"parseOptions"),a(FE,"getVenue");var kN={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function BE(t){let e=DE({baseUrl:"https://api-gateway.mappedin.com/",...kN,...t}),{url:n,updated_at:r}=await x4(t),i=await hs()(n,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new ms(e);return await s.hydrate(o,e.shouldPopulateBundledImagesAsBlobs),s.updatedAt=r,s}async function x4(t){let e=DE({baseUrl:"https://api-gateway.mappedin.com/",...kN,...t}),{version:n,venue:r}=t,i="".concat(t.bundleBaseUri||e.baseUrl+"exports/legacy".concat(null!=e.language&&E4.includes(e.language)?"-"+e.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return e.language=void 0,await rb(e,i)}a(BE,"getVenueBundle"),a(x4,"getVenueBundleURL");var M4=!1;function S4(t){t.things=t.things||{},t.things.venue=t.things.venue||[],t.things.venue.push("slug","defaultMap"),t.things.nodes=t.things.nodes||[],t.things.nodes.push("x","y","paths","map"),t.things.polygons=t.things.polygons||[],t.things.locations=t.things.locations||[],t.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),t.things.maps=t.things.maps||[],t.things.maps.push("height","width","georeference"),t.perspective=t.perspective3D||t.perspective||void 0,t.things.maps.push("scene","layers"),t.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),M4&&t.things.polygons.push("layer","geometry","vertexes")}a(S4,"parseOptions");var I4=a((function(t){return null==t.mapView&&(t.mapView={}),new Promise((function(e,n){function r(r,i){if(r)n(r);else{let r={};try{t.firstMapSelector&&(t.mapView=t.mapView||{},t.mapView.firstMap=t.firstMapSelector(i))}catch(t){He.error("Failure in firstMapSelector! Loading default map instead."),He.error(t),n(t)}r.venue=i,e(r)}}a(r,"handleInit"),S4(t.venue),t.venue.useVenueBundle?BE(t.venue).then((t=>r(null,t))).catch((t=>r(t,null))):FE(t.venue).then((t=>r(null,t))).catch((t=>r(t,null)))}))}),"initialize");
1
+ "use strict";var D,Yv=Object.create,Ir=Object.defineProperty,Xv=Object.getOwnPropertyDescriptor,Hv=Object.getOwnPropertyNames,$v=Object.getPrototypeOf,Kv=Object.prototype.hasOwnProperty,Jv=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o=(e,t)=>Ir(e,"name",{value:t,configurable:!0}),To=(e,t)=>()=>(e&&(t=e(e=0)),t),fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),So=(e,t)=>{for(var r in t)Ir(e,r,{get:t[r],enumerable:!0})},zf=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Hv(t))!Kv.call(e,i)&&i!==r&&Ir(e,i,{get:()=>t[i],enumerable:!(n=Xv(t,i))||n.enumerable});return e},rn=(e,t,r)=>(r=null!=e?Yv($v(e)):{},zf(!t&&e&&e.__esModule?r:Ir(r,"default",{value:e,enumerable:!0}),e)),We=e=>zf(Ir({},"__esModule",{value:!0}),e),g=(e,t,r)=>(Jv(e,"symbol"!=typeof t?t+"":t,r),r),mu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},m=(e,t,r)=>(mu(e,t,"read from private field"),r?r.call(e):t.get(e)),W=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},X=(e,t,r,n)=>(mu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),vu=(e,t,r,n)=>({set _(n){X(e,t,n,r)},get _(){return m(e,t,n)}}),$e=(e,t,r)=>(mu(e,t,"access private method"),r),y=To((()=>{D={env:{NODE_ENV:"production",npm_package_version:"5.30.1"}}})),Bf=fe(((e,t)=>{y(),function(r){var n="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==n&&t,a="object"==typeof global&&global;(a.global===a||a.window===a)&&(r=a);var s=o((function(e){this.message=e}),"InvalidCharacterError");s.prototype=new Error,s.prototype.name="InvalidCharacterError";var l=o((function(e){throw new s(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,d=o((function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,i=0,o="",a=-1;++a<t;)n=u.indexOf(e.charAt(a)),r=i%4?64*r+n:n,i++%4&&(o+=String.fromCharCode(255&r>>(-2*i&6)));return o}),"decode"),h={encode:o((function(e){e=String(e),/[^\0-\xFF]/.test(e)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,r=e.charCodeAt(++s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+r+n)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+r)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(s),a+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),a}),"encode"),decode:d,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(n&&!n.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(n[p]=h[p]);else r.base64=h}(e)})),Vf=fe(((e,t)=>{var r,n;y(),r=typeof self<"u"?self:e,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return o(r,"r"),r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){r.r(t),r.d(t,"computeDestinationPoint",(function(){return j})),r.d(t,"convertArea",(function(){return L})),r.d(t,"convertDistance",(function(){return R})),r.d(t,"convertSpeed",(function(){return D})),r.d(t,"decimalToSexagesimal",(function(){return V})),r.d(t,"findNearest",(function(){return X})),r.d(t,"getAreaOfPolygon",(function(){return Y})),r.d(t,"getBounds",(function(){return J})),r.d(t,"getBoundsOfDistance",(function(){return K})),r.d(t,"getCenter",(function(){return H})),r.d(t,"getCenterOfBounds",(function(){return Z})),r.d(t,"getCompassDirection",(function(){return Q})),r.d(t,"getCoordinateKey",(function(){return v})),r.d(t,"getCoordinateKeys",(function(){return x})),r.d(t,"getDistance",(function(){return G})),r.d(t,"getDistanceFromLine",(function(){return ee})),r.d(t,"getGreatCircleBearing",(function(){return te})),r.d(t,"getLatitude",(function(){return A})),r.d(t,"getLongitude",(function(){return P})),r.d(t,"getPathLength",(function(){return ne})),r.d(t,"getPreciseDistance",(function(){return ie})),r.d(t,"getRhumbLineBearing",(function(){return $})),r.d(t,"getRoughCompassDirection",(function(){return oe})),r.d(t,"getSpeed",(function(){return ae})),r.d(t,"isDecimal",(function(){return y})),r.d(t,"isPointInLine",(function(){return se})),r.d(t,"isPointInPolygon",(function(){return le})),r.d(t,"isPointNearLine",(function(){return ue})),r.d(t,"isPointWithinRadius",(function(){return ce})),r.d(t,"isSexagesimal",(function(){return m})),r.d(t,"isValidCoordinate",(function(){return I})),r.d(t,"isValidLatitude",(function(){return E})),r.d(t,"isValidLongitude",(function(){return S})),r.d(t,"orderByDistance",(function(){return q})),r.d(t,"sexagesimalToDecimal",(function(){return b})),r.d(t,"toDecimal",(function(){return T})),r.d(t,"toRad",(function(){return F})),r.d(t,"toDeg",(function(){return N})),r.d(t,"wktToPolygon",(function(){return pe})),r.d(t,"sexagesimalPattern",(function(){return n})),r.d(t,"earthRadius",(function(){return i})),r.d(t,"MINLAT",(function(){return a})),r.d(t,"MAXLAT",(function(){return s})),r.d(t,"MINLON",(function(){return l})),r.d(t,"MAXLON",(function(){return u})),r.d(t,"longitudeKeys",(function(){return c})),r.d(t,"latitudeKeys",(function(){return d})),r.d(t,"altitudeKeys",(function(){return h})),r.d(t,"distanceConversion",(function(){return p})),r.d(t,"timeConversion",(function(){return f})),r.d(t,"areaConversion",(function(){return g}));var n=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,a=-90,s=90,l=-180,u=180,c=["lng","lon","longitude",0],d=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],p={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144},f={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var v=o((function(e,t){return t.reduce((function(t,r){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,r)&&void 0!==r&&void 0===t?(t=r,r):t}),void 0)}),"m"),y=o((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=o((function(e){return n.test(e.toString().trim())}),"p"),b=o((function(e){var t=new RegExp(n).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var r=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+r+i;return["S","W"].includes(t[7])?-o:o}),"y");function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}o(_,"b"),o(w,"M"),o(M,"O");var x=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},r=v(e,t.longitude),n=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:n,longitude:r},i?{altitude:i}:{})}),"S"),E=o((function e(t){return y(t)?!(parseFloat(t)>s||t<a):!!m(t)&&e(b(t))}),"t"),S=o((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(b(t))}),"t"),I=o((function(e){var t=x(e),r=t.latitude,n=t.longitude;if(Array.isArray(e)&&e.length>=2)return S(e[0])&&E(e[1]);if(void 0===r||void 0===n)return!1;var i=e[n],o=e[r];return void 0!==o&&void 0!==i&&!1!==E(o)&&!1!==S(i)}),"j");function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}o(k,"w"),o(C,"x"),o(O,"E");var T=o((function e(t){if(y(t))return Number(t);if(m(t))return b(t);if(I(t)){var r=x(t);return Array.isArray(t)?t.map((function(t,r){return[0,1].includes(r)?e(t):t})):C(C(C({},t),r.latitude&&O({},r.latitude,e(t[r.latitude]))),r.longitude&&O({},r.longitude,e(t[r.longitude])))}return Array.isArray(t)?t.map((function(t){return I(t)?e(t):t})):t}),"t"),A=o((function(e,t){var r=v(e,d);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"A"),P=o((function(e,t){var r=v(e,c);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"I"),F=o((function(e){return e*Math.PI/180}),"W"),N=o((function(e){return 180*e/Math.PI}),"D"),j=o((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/n,s=F(r),c=F(i),d=F(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=d+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),f=N(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=N(p)),{latitude:N(h),longitude:f}}),"F"),L=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=g[t];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"C"),R=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=p[t];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"k"),D=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(t){case"kmh":return e*f.h*p.km;case"mph":return e*f.h*p.mi;default:return e}}),"T");function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}o(B,"q"),o(W,"$");var U=o((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),V=o((function(e){var t=B(e.toString().split("."),2),r=t[0],n=t[1],i=Math.abs(Number(r)),o=U(60*+("0."+(n||0))),a=Math.floor(o),s=U(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"R"),z=o((function(e){return e>1?1:e<-1?-1:e}),"X"),G=o((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(z(Math.sin(F(a))*Math.sin(F(n))+Math.cos(F(a))*Math.cos(F(n))*Math.cos(F(o)-F(s))))*i;return Math.round(l/r)*r}),"_"),q=o((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G;return r="function"==typeof r?r:G,t.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"K"),X=o((function(e,t){return q(e,t)[0]}),"Y"),Y=o((function(e){var t=0;if(e.length>2){for(var r,n,o,a=0;a<e.length;a++){a===e.length-2?(r=e.length-2,n=e.length-1,o=0):a===e.length-1?(r=e.length-1,n=0,o=1):(r=a,n=a+1,o=a+2);var s=P(e[r]),l=A(e[n]),u=P(e[o]);t+=(F(u)-F(s))*Math.sin(F(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),J=o((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var r=A(t),n=P(t);return{maxLat:Math.max(r,e.maxLat),minLat:Math.min(r,e.minLat),maxLng:Math.max(n,e.maxLng),minLng:Math.min(n,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),K=o((function(e,t){var r,n,o=A(e),c=P(e),d=F(o),h=F(c),p=t/i,f=d-p,g=d+p,v=F(s),y=F(a),m=F(u),b=F(l);if(f>y&&g<v){var _=Math.asin(Math.sin(p)/Math.cos(d));(r=h-_)<b&&(r+=2*Math.PI),(n=h+_)>m&&(n-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),r=b,n=m;return[{latitude:N(f),longitude:N(r)},{latitude:N(g),longitude:N(n)}]}),"V"),H=o((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,r=e.reduce((function(e,t){var r=F(A(t)),n=F(P(t));return{X:e.X+Math.cos(r)*Math.cos(n),Y:e.Y+Math.cos(r)*Math.sin(n),Z:e.Z+Math.sin(r)}}),{X:0,Y:0,Z:0}),n=r.X/t,i=r.Y/t,o=r.Z/t;return{longitude:N(Math.atan2(i,n)),latitude:N(Math.atan2(o,Math.sqrt(n*n+i*i)))}}),"U"),Z=o((function(e){var t=J(e),r=t.minLat+(t.maxLat-t.minLat)/2,n=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(n.toFixed(6))}}),"z"),$=o((function(e,t){var r=F(P(t))-F(P(e)),n=Math.log(Math.tan(F(A(t))/2+Math.PI/4)/Math.tan(F(A(e))/2+Math.PI/4));return Math.abs(r)>Math.PI&&(r=r>0?-1*(2*Math.PI-r):2*Math.PI+r),(N(Math.atan2(r,n))+360)%360}),"H"),Q=o((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$,n="function"==typeof r?r(e,t):$(e,t);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}),"J"),ee=o((function(e,t,r){var n=G(t,e),i=G(e,r),o=G(t,r),a=Math.acos(z((n*n+o*o-i*i)/(2*n*o))),s=Math.acos(z((i*i+o*o-n*n)/(2*i*o)));return a>Math.PI/2?n:s>Math.PI/2?i:Math.sin(a)*n}),"Q"),te=o((function(e,t){var r=A(t),n=P(t),i=A(e),o=P(e);return(N(Math.atan2(Math.sin(F(n)-F(o))*Math.cos(F(r)),Math.cos(F(i))*Math.sin(F(r))-Math.sin(F(i))*Math.cos(F(r))*Math.cos(F(n)-F(o))))+360)%360}),"tt");function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o(re,"nt");var ne=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G;return e.reduce((function(e,r){return"object"===re(e)&&null!==e.last&&(e.distance+=t(r,e.last)),e.last=r,e}),{last:null,distance:0}).distance}),"rt"),ie=o((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n,o,a,s,l,u,c,d=A(e),h=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=F(f-h),m=Math.atan((1-v)*Math.tan(F(parseFloat(d)))),b=Math.atan((1-v)*Math.tan(F(parseFloat(p)))),_=Math.sin(m),w=Math.cos(m),M=Math.sin(b),x=Math.cos(b),E=y,S=100;do{var I=Math.sin(E),k=Math.cos(E);if(0===(u=Math.sqrt(x*I*(x*I)+(w*M-_*x*k)*(w*M-_*x*k))))return 0;n=_*M+w*x*k,o=Math.atan2(u,n),l=n-2*_*M/(s=1-(a=w*x*I/u)*a),isNaN(l)&&(l=0);var C=v/16*s*(4+v*(4-3*s));c=E,E=y+(1-C)*v*a*(o+C*u*(l+C*n*(2*l*l-1)))}while(Math.abs(E-c)>1e-12&&--S>0);if(0===S)return NaN;var O=s*(i*i-g*g)/(g*g),T=1+O/16384*(4096+O*(O*(320-175*O)-768)),N=O/1024*(256+O*(O*(74-47*O)-128)),j=N*u*(l+N/4*(n*(2*l*l-1)-N/6*l*(4*u*u-3)*(4*l*l-3))),L=g*T*(o-j);return Math.round(L/r)*r}),"et"),oe=o((function(e){return/^NNE|NE|NNW|N$/.test(e)?"N":/^ENE|E|ESE|SE$/.test(e)?"E":/^SSE|S|SSW|SW$/.test(e)?"S":/^WSW|W|WNW|NW$/.test(e)?"W":void 0}),"it"),ae=o((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G,n=r(e,t),i=Number(t.time)-Number(e.time),o=n/i*1e3;return o}),"ot"),se=o((function(e,t,r){return G(t,e)+G(e,r)===G(t,r)}),"ut"),le=o((function(e,t){for(var r=!1,n=t.length,i=-1,o=n-1;++i<n;o=i)(P(t[i])<=P(e)&&P(e)<P(t[o])||P(t[o])<=P(e)&&P(e)<P(t[i]))&&A(e)<(A(t[o])-A(t[i]))*(P(e)-P(t[i]))/(P(t[o])-P(t[i]))+A(t[i])&&(r=!r);return r}),"at"),ue=o((function(e,t,r,n){return ee(e,t,r)<n}),"ct"),ce=o((function(e,t,r){return G(e,t)<r}),"ft");function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}o(de,"st"),o(he,"lt");var pe=o((function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");return e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", ").map((function(e){var t=de(e.split(" "),2),r=t[0],n=t[1];return{longitude:parseFloat(r),latitude:parseFloat(n)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.geolib=n():r.geolib=n()})),wn={};function ry(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Cu(e,t),o(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function iy(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ay(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function oy(e,t){return function(r,n){t(r,n,e)}}function sy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function uy(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return o(i,"adopt"),new(r||(r=Promise))((function(r,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,l)}o(s,"fulfilled"),o(l,"rejected"),o(u,"step"),u((n=n.apply(e,t||[])).next())}))}function ly(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function cy(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Lu(t,e,r)}function Fu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function dy(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Hf(arguments[t]));return e}function py(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function fy(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function wi(e){return this instanceof wi?(this.v=e,this):new wi(e)}function hy(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof wi?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function gy(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:wi(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function my(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Fu?Fu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function vy(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function by(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Lu(t,e,r);return yy(t,e),t}function wy(e){return e&&e.__esModule?e:{default:e}}function _y(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function ky(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function My(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(wn,{__assign:()=>ju,__asyncDelegator:()=>gy,__asyncGenerator:()=>hy,__asyncValues:()=>my,__await:()=>wi,__awaiter:()=>uy,__classPrivateFieldGet:()=>_y,__classPrivateFieldIn:()=>My,__classPrivateFieldSet:()=>ky,__createBinding:()=>Lu,__decorate:()=>ay,__exportStar:()=>cy,__extends:()=>ry,__generator:()=>ly,__importDefault:()=>wy,__importStar:()=>by,__makeTemplateObject:()=>vy,__metadata:()=>sy,__param:()=>oy,__read:()=>Hf,__rest:()=>iy,__spread:()=>dy,__spreadArray:()=>fy,__spreadArrays:()=>py,__values:()=>Fu});var Cu,ju,Lu,yy,_n=To((()=>{y(),Cu=o((function(e,t){return(Cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),o(ry,"__extends"),ju=o((function(){return ju=Object.assign||o((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),ju.apply(this,arguments)}),"__assign"),o(iy,"__rest"),o(ay,"__decorate"),o(oy,"__param"),o(sy,"__metadata"),o(uy,"__awaiter"),o(ly,"__generator"),Lu=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o(cy,"__exportStar"),o(Fu,"__values"),o(Hf,"__read"),o(dy,"__spread"),o(py,"__spreadArrays"),o(fy,"__spreadArray"),o(wi,"__await"),o(hy,"__asyncGenerator"),o(gy,"__asyncDelegator"),o(my,"__asyncValues"),o(vy,"__makeTemplateObject"),yy=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o(by,"__importStar"),o(wy,"__importDefault"),o(_y,"__classPrivateFieldGet"),o(ky,"__classPrivateFieldSet"),o(My,"__classPrivateFieldIn")})),Xt={};function xy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nu(e,t),o(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Ey(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Ty(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Sy(e,t){return function(r,n){t(r,n,e)}}function Oy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Py(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return o(i,"adopt"),new(r||(r=Promise))((function(r,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,l)}o(s,"fulfilled"),o(l,"rejected"),o(u,"step"),u((n=n.apply(e,t||[])).next())}))}function Iy(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Ay(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&zu(t,e,r)}function Du(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $f(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Cy(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($f(arguments[t]));return e}function jy(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function Fy(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function _i(e){return this instanceof _i?(this.v=e,this):new _i(e)}function Ly(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof _i?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Ny(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:_i(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function Ry(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Du?Du(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Dy(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function By(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&zu(t,e,r);return zy(t,e),t}function Vy(e){return e&&e.__esModule?e:{default:e}}function qy(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Uy(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Gy(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(Xt,{__assign:()=>Ru,__asyncDelegator:()=>Ny,__asyncGenerator:()=>Ly,__asyncValues:()=>Ry,__await:()=>_i,__awaiter:()=>Py,__classPrivateFieldGet:()=>qy,__classPrivateFieldIn:()=>Gy,__classPrivateFieldSet:()=>Uy,__createBinding:()=>zu,__decorate:()=>Ty,__exportStar:()=>Ay,__extends:()=>xy,__generator:()=>Iy,__importDefault:()=>Vy,__importStar:()=>By,__makeTemplateObject:()=>Dy,__metadata:()=>Oy,__param:()=>Sy,__read:()=>$f,__rest:()=>Ey,__spread:()=>Cy,__spreadArray:()=>Fy,__spreadArrays:()=>jy,__values:()=>Du});var Nu,Ru,zu,zy,Ht=To((()=>{y(),Nu=o((function(e,t){return(Nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),o(xy,"__extends"),Ru=o((function(){return Ru=Object.assign||o((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Ru.apply(this,arguments)}),"__assign"),o(Ey,"__rest"),o(Ty,"__decorate"),o(Sy,"__param"),o(Oy,"__metadata"),o(Py,"__awaiter"),o(Iy,"__generator"),zu=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o(Ay,"__exportStar"),o(Du,"__values"),o($f,"__read"),o(Cy,"__spread"),o(jy,"__spreadArrays"),o(Fy,"__spreadArray"),o(_i,"__await"),o(Ly,"__asyncGenerator"),o(Ny,"__asyncDelegator"),o(Ry,"__asyncValues"),o(Dy,"__makeTemplateObject"),zy=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o(By,"__importStar"),o(Vy,"__importDefault"),o(qy,"__classPrivateFieldGet"),o(Uy,"__classPrivateFieldSet"),o(Gy,"__classPrivateFieldIn")})),Kf=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Jf=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SpecialEventType=e.RevenueProperty=e.IdentifyOperation=void 0,(t=e.IdentifyOperation||(e.IdentifyOperation={})).SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll",function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(e.RevenueProperty||(e.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(e.SpecialEventType||(e.SpecialEventType={}))})),Zf=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})),Qf=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),eh=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(t=e.Status||(e.Status={})).Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})),th=fe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),vt=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=e.Status=e.PluginType=e.LogLevel=e.RevenueProperty=e.IdentifyOperation=e.SpecialEventType=e.ServerZone=void 0;var t=Kf();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var r=Jf();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return r.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return r.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return r.RevenueProperty}});var n=Zf();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var i=Qf();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=eh();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=th();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),Si=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.EU_AMPLITUDE_BATCH_SERVER_URL=e.AMPLITUDE_BATCH_SERVER_URL=e.EU_AMPLITUDE_SERVER_URL=e.AMPLITUDE_SERVER_URL=e.STORAGE_PREFIX=e.AMPLITUDE_PREFIX=e.UNSET_VALUE=void 0,e.UNSET_VALUE="-",e.AMPLITUDE_PREFIX="AMP",e.STORAGE_PREFIX="".concat(e.AMPLITUDE_PREFIX,"_unsent"),e.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",e.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",e.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",e.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),Vu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=(Ht(),We(Xt)),r=o((function(t){if(Object.keys(t).length>1e3)return!1;for(var r in t){var n=t[r];if(!(0,e.isValidProperties)(r,n))return!1}return!0}),"isValidObject");e.isValidObject=r;var n=o((function(r,n){var i,o;if("string"!=typeof r)return!1;if(Array.isArray(n)){var a=!0;try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)a=a&&(0,e.isValidObject)(u);else if(!["number","string"].includes(typeof u))return!1;if(!a)return!1}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return(0,e.isValidObject)(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0}),"isValidProperties");e.isValidProperties=n})),qu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=(Ht(),We(Xt)),r=vt(),n=Si(),i=Vu(),a=function(){function e(){this._propertySet=new Set,this._properties={}}return o(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.IdentifyOperation.UNSET,e,n.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.IdentifyOperation.CLEAR_ALL]=n.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[r.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===r.IdentifyOperation.ADD?"number"==typeof n:e===r.IdentifyOperation.UNSET||e===r.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,n))},e}();e.Identify=a})),Uu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=(Ht(),We(Xt)),r=vt(),n=qu(),i=o((function(e,r,n){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),n),r&&{event_properties:r})}),"createTrackEvent");e.createTrackEvent=i;var a=o((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=a;var s=o((function(e,n,i,o){var a;return t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=n,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=s;var l=o((function(e,i,o){var a,s=new n.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=o((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),No=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=vt(),r=o((function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=t.Status.Unknown),{event:e,code:r,message:n}}),"buildResult");e.buildResult=r})),rh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=(Ht(),We(Xt)),r=vt(),n=No(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return o(e,"Timeline"),e.prototype.register=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(r)];case 1:return t.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise((function(r){t.queue.push([e,r]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w;return t.__generator(this,(function(M){switch(M.label){case 0:if(!e)return[2];i=t.__read(e,1),o=i[0],a=t.__read(e,2),s=a[1],l=this.plugins.filter((function(e){return e.type===r.PluginType.BEFORE})),M.label=1;case 1:M.trys.push([1,6,7,8]),u=t.__values(l),c=u.next(),M.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(t.__assign({},o))];case 3:o=M.sent(),M.label=4;case 4:return c=u.next(),[3,2];case 5:return[3,8];case 6:return d=M.sent(),m={error:d},[3,8];case 7:try{c&&!c.done&&(b=u.return)&&b.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===r.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(h),f=p.next(),M.label=10;case 10:return f.done?[3,13]:[4,f.value.execute(t.__assign({},o))];case 11:o=M.sent(),M.label=12;case 12:return f=p.next(),[3,10];case 13:return[3,16];case 14:return g=M.sent(),_={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(_)throw _.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),y=v.map((function(e){var r=t.__assign({},o);return e.execute(r).catch((function(e){return(0,n.buildResult)(r,0,String(e))}))})),Promise.all(y).then((function(e){var r=t.__read(e,1)[0];s(r)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return o.apply(e)})))];case 1:return t.sent(),n=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),i=n.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),Gu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CLIENT_NOT_INITIALIZED=e.INVALID_API_KEY=e.MISSING_API_KEY_MESSAGE=e.OPT_OUT_MESSAGE=e.MAX_RETRIES_EXCEEDED_MESSAGE=e.UNEXPECTED_ERROR_MESSAGE=e.SUCCESS_MESSAGE=void 0,e.SUCCESS_MESSAGE="Event tracked successfully",e.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",e.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",e.OPT_OUT_MESSAGE="Event skipped due to optOut config",e.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",e.INVALID_API_KEY="Invalid API key",e.CLIENT_NOT_INITIALIZED="Client not initialized"})),ah=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=(Ht(),We(Xt)),r=Uu(),n=rh(),i=No(),a=Gu(),s=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new n.Timeline,this.name=e}return o(e,"AmplitudeCore"),e.prototype._init=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:r=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),n=t.__values(r),i=n.next(),l.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var i=(0,r.createTrackEvent)(e,t,n);return this.dispatch(i)},e.prototype.identify=function(e,t){var n=(0,r.createIdentifyEvent)(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,i){var o=(0,r.createGroupIdentifyEvent)(e,t,n,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,n){var i=(0,r.createGroupEvent)(e,t,n);return this.dispatch(i)},e.prototype.revenue=function(e,t){var n=(0,r.createRevenueEvent)(e,t);return this.dispatch(n)},e.prototype.add=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])}))}))},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t((0,i.buildResult)(e,0,a.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,o;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(e,0,a.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(o=t.sent()).code?this.config.loggerProvider.log(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=t.sent(),n=String(r),this.config.loggerProvider.error(n),[2,o=(0,i.buildResult)(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();e.AmplitudeCore=s})),oh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=(Ht(),We(Xt)),r=vt(),n=Vu(),i=function(){function e(){this.productId="",this.quantity=1,this.price=0}return o(e,"Revenue"),e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return(0,n.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[r.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[r.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[r.RevenueProperty.REVENUE_PRICE]=this.price,e[r.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[r.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),sh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=o((function(e,t){var r=Math.max(t,1);return e.reduce((function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),Yu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=vt(),r="Amplitude Logger ",n=function(){function e(){this.logLevel=t.LogLevel.None}return o(e,"Logger"),e.prototype.disable=function(){this.logLevel=t.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=t.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Verbose||console.log("".concat(r,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Warn||console.warn("".concat(r,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Error||console.error("".concat(r,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Debug||console.log("".concat(r,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=n})),Xu=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=vt(),r=Si(),n=Yu(),i=o((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new n.Logger,optOut:!1,serverUrl:r.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var a=function(){function t(t){var r,n,i;this._optOut=!1;var o=(0,e.getDefaultConfig)();this.apiKey=t.apiKey,this.flushIntervalMillis=t.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||o.flushQueueSize,this.loggerProvider=t.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=t.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(n=t.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||o.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=null!==(i=t.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,e.createServerConfig)(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return o(t,"Config"),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();e.Config=a;var s=o((function(e,n){return e===t.ServerZone.EU?n?r.EU_AMPLITUDE_BATCH_SERVER_URL:r.EU_AMPLITUDE_SERVER_URL:n?r.AMPLITUDE_BATCH_SERVER_URL:r.AMPLITUDE_SERVER_URL}),"getServerUrl");e.getServerUrl=s;var l=o((function(r,n,i){if(void 0===r&&(r=""),void 0===n&&(n=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),r)return{serverUrl:r,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(n)?n:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),uh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=(Ht(),We(Xt)),r=vt(),n=Gu(),i=Si(),a=sh(),s=No(),l=Xu(),u=function(){function e(){this.name="amplitude",this.type=r.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return o(e,"Destination"),e.prototype.setup=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var n,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(r=this.config.storageProvider)||void 0===r?void 0:r.get(this.storageKey)];case 1:return n=t.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return o.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(r){var n={event:e,attempts:0,callback:function(e){return r(e)},timeout:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,n.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(e.config.flushIntervalMillis)})),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return r=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?r.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,a.chunk)(r,this.config.flushQueueSize),[4,Promise.all(i.map((function(t){return o.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,r){return void 0===r&&(r=!0),t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return t.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,n.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var r=e.event;r.extra;return t.__rest(r,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,l.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(e,0,n.UNEXPECTED_ERROR_MESSAGE),[2];if(!r){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch{}this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(e,a.statusCode,a.status);return[2]}return this.handleReponse(a,e),[3,4];case 3:return u=c.sent(),this.fulfillRequest(e,0,String(u)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case r.Status.Success:this.handleSuccessResponse(e,t);break;case r.Status.Invalid:this.handleInvalidResponse(e,t);break;case r.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,n.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,r){var i=this;if(e.body.missingField||e.body.error.startsWith(n.INVALID_API_KEY))this.fulfillRequest(r,e.statusCode,e.body.error);else{var o=t.__spreadArray(t.__spreadArray(t.__spreadArray(t.__spreadArray([],t.__read(Object.values(e.body.eventsWithInvalidFields)),!1),t.__read(Object.values(e.body.eventsWithMissingFields)),!1),t.__read(Object.values(e.body.eventsWithInvalidIdLengths)),!1),t.__read(e.body.silencedEvents),!1).flat(),a=new Set(o),s=r.filter((function(t,r){if(!a.has(r))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(s),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,r){1!==r.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(r),!1))):this.fulfillRequest(r,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,s=new Set(i),l=new Set(o),u=new Set(a),c=r.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var r=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*r.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,r){this.saveEvents(),e.forEach((function(e){return e.callback((0,s.buildResult)(e.event,t,r))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}();e.Destination=u})),ch=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=(Ht(),We(Xt)),r=o((function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(r),!1))}}}),"returnWrapper");e.returnWrapper=r})),dh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=(Ht(),We(Xt)),r=vt(),n=o((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace");e.getStacktrace=n;var i=o((function(e){return function(){var r=t.__assign({},e.config);return{logger:r.loggerProvider,logLevel:r.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var a=o((function(e,r){var n,i;r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(r.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}),"getValueByStringPath");e.getValueByStringPath=a;var s=o((function(r,n){return function(){var i,o,a={};try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(r,u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");e.getClientStates=s;var l=o((function(t,n,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=i(),c=u.logger,d=u.logLevel;if(d&&d<r.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:n,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),ph=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=o((function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e.UUID)}),"UUID");e.UUID=t})),fh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=(Ht(),We(Xt)),r=function(){function e(){this.memoryStorage=new Map}return o(e,"MemoryStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(r=t.sent())?JSON.stringify(r):void 0]}}))}))},e.prototype.set=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,r),[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();e.MemoryStorage=r})),hh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=vt(),r=function(){function e(){}return o(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w,M,x;if("object"!=typeof e)return null;var E=e.code||0,S=this.buildStatus(E);switch(S){case t.Status.Success:return{status:S,statusCode:E,body:{eventsIngested:null!==(r=e.events_ingested)&&void 0!==r?r:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:S,statusCode:E,body:{error:null!==(o=e.error)&&void 0!==o?o:"",missingField:null!==(a=e.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(d=e.exceeded_daily_quota_devices)&&void 0!==d?d:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(g=e.throttled_events)&&void 0!==g?g:[]}};case t.Status.PayloadTooLarge:return{status:S,statusCode:E,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:S,statusCode:E,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(_=e.throttled_users)&&void 0!==_?_:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(M=e.exceeded_daily_quota_users)&&void 0!==M?M:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case t.Status.Timeout:default:return{status:S,statusCode:E}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?t.Status.Success:429===e?t.Status.RateLimit:413===e?t.Status.PayloadTooLarge:408===e?t.Status.Timeout:e>=400&&e<500?t.Status.Invalid:e>=500?t.Status.Failed:t.Status.Unknown},e}();e.BaseTransport=r})),on=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createIdentifyEvent=e.BaseTransport=e.MemoryStorage=e.UUID=e.getClientStates=e.getClientLogConfig=e.debugWrapper=e.returnWrapper=e.AMPLITUDE_PREFIX=e.Logger=e.Config=e.Destination=e.Revenue=e.Identify=e.AmplitudeCore=void 0;var t=ah();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var r=qu();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return r.Identify}});var n=oh();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return n.Revenue}});var i=uh();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=Xu();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=Yu();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=Si();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=ch();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=dh();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:function(){return u.debugWrapper}}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:function(){return u.getClientLogConfig}}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:function(){return u.getClientStates}});var c=ph();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=fh();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=hh();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=Uu();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),ur={};function ow(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ku(e,t),o(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function sw(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function uw(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function lw(e,t){return function(r,n){t(r,n,e)}}function cw(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function dw(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return o(i,"adopt"),new(r||(r=Promise))((function(r,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,l)}o(s,"fulfilled"),o(l,"rejected"),o(u,"step"),u((n=n.apply(e,t||[])).next())}))}function pw(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function fw(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Qu(t,e,r)}function Zu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gh(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function hw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(gh(arguments[t]));return e}function gw(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function mw(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Li(e){return this instanceof Li?(this.v=e,this):new Li(e)}function vw(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Li?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function yw(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Li(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function bw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Zu?Zu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function ww(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function kw(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Qu(t,e,r);return _w(t,e),t}function Mw(e){return e&&e.__esModule?e:{default:e}}function xw(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Ew(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Tw(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(ur,{__assign:()=>Ju,__asyncDelegator:()=>yw,__asyncGenerator:()=>vw,__asyncValues:()=>bw,__await:()=>Li,__awaiter:()=>dw,__classPrivateFieldGet:()=>xw,__classPrivateFieldIn:()=>Tw,__classPrivateFieldSet:()=>Ew,__createBinding:()=>Qu,__decorate:()=>uw,__exportStar:()=>fw,__extends:()=>ow,__generator:()=>pw,__importDefault:()=>Mw,__importStar:()=>kw,__makeTemplateObject:()=>ww,__metadata:()=>cw,__param:()=>lw,__read:()=>gh,__rest:()=>sw,__spread:()=>hw,__spreadArray:()=>mw,__spreadArrays:()=>gw,__values:()=>Zu});var Ku,Ju,Qu,_w,lr=To((()=>{y(),Ku=o((function(e,t){return(Ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),o(ow,"__extends"),Ju=o((function(){return Ju=Object.assign||o((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Ju.apply(this,arguments)}),"__assign"),o(sw,"__rest"),o(uw,"__decorate"),o(lw,"__param"),o(cw,"__metadata"),o(dw,"__awaiter"),o(pw,"__generator"),Qu=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o(fw,"__exportStar"),o(Zu,"__values"),o(gh,"__read"),o(hw,"__spread"),o(gw,"__spreadArrays"),o(mw,"__spreadArray"),o(Li,"__await"),o(vw,"__asyncGenerator"),o(yw,"__asyncDelegator"),o(bw,"__asyncValues"),o(ww,"__makeTemplateObject"),_w=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o(kw,"__importStar"),o(Mw,"__importDefault"),o(xw,"__classPrivateFieldGet"),o(Ew,"__classPrivateFieldSet"),o(Tw,"__classPrivateFieldIn")})),$o=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=o((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),el=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=$o(),r=o((function(){var r,n=(0,t.getGlobalScope)();return null!==(r=null==n?void 0:n.location)&&void 0!==r&&r.search?n.location.search.substring(1).split("&").filter(Boolean).reduce((function(t,r){var n=r.split("=",2),i=(0,e.tryDecodeURIComponent)(n[0]),o=(0,e.tryDecodeURIComponent)(n[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=r;var n=o((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=n})),Ko=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MKTG=e.BASE_CAMPAIGN=e.EMPTY_VALUE=e.WBRAID=e.TWCLID=e.TTCLID=e.MSCLKID=e.KO_CLICK_ID=e.GCLID=e.GBRAID=e.FBCLID=e.DCLID=e.UTM_TERM=e.UTM_SOURCE=e.UTM_MEDIUM=e.UTM_ID=e.UTM_CONTENT=e.UTM_CAMPAIGN=void 0,e.UTM_CAMPAIGN="utm_campaign",e.UTM_CONTENT="utm_content",e.UTM_ID="utm_id",e.UTM_MEDIUM="utm_medium",e.UTM_SOURCE="utm_source",e.UTM_TERM="utm_term",e.DCLID="dclid",e.FBCLID="fbclid",e.GBRAID="gbraid",e.GCLID="gclid",e.KO_CLICK_ID="ko_click_id",e.MSCLKID="msclkid",e.TTCLID="ttclid",e.TWCLID="twclid",e.WBRAID="wbraid",e.EMPTY_VALUE="EMPTY",e.BASE_CAMPAIGN={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},e.MKTG="MKTG"})),tl=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=(lr(),We(ur)),r=el(),n=Ko(),i=function(){function e(){}return o(e,"CampaignParser"),e.prototype.parse=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,t.__assign(t.__assign(t.__assign(t.__assign({},n.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,r.getQueryParams)();return{utm_campaign:e[n.UTM_CAMPAIGN],utm_content:e[n.UTM_CONTENT],utm_id:e[n.UTM_ID],utm_medium:e[n.UTM_MEDIUM],utm_source:e[n.UTM_SOURCE],utm_term:e[n.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return r},e.prototype.getClickIds=function(){var e,t=(0,r.getQueryParams)();return(e={})[n.DCLID]=t[n.DCLID],e[n.FBCLID]=t[n.FBCLID],e[n.GBRAID]=t[n.GBRAID],e[n.GCLID]=t[n.GCLID],e[n.KO_CLICK_ID]=t[n.KO_CLICK_ID],e[n.MSCLKID]=t[n.MSCLKID],e[n.TTCLID]=t[n.TTCLID],e[n.TWCLID]=t[n.TWCLID],e[n.WBRAID]=t[n.WBRAID],e},e}();e.CampaignParser=i})),Zo=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=on(),r=o((function(e,r,n){return void 0===r&&(r=""),void 0===n&&(n=10),[t.AMPLITUDE_PREFIX,r,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=r;var n=o((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=n})),wh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=(lr(),We(ur)),r=on(),n=Zo(),i=tl(),a=Ko(),s=function(){function e(e,t){var r,o;this.storage=t.storage,this.storageKey=(0,n.getCookieName)(e,a.MKTG),this.parser=new i.CampaignParser,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(r=t.excludeReferrers)&&void 0!==r?r:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(o=t.initialEmptyValue)&&void 0!==o?o:a.EMPTY_VALUE}return o(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,r,n){void 0===n&&(n=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=r||{},s=(a.referrer,a.referring_domain),u=t.__rest(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(u),d=n?l(i||"")!==l(s||""):i!==s;return!r||c||d},e.prototype.saveCampaignToStorage=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getCampaignFromStorage=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.createCampaignEvent=function(e){var n=this,i=t.__assign(t.__assign({},a.BASE_CAMPAIGN),e),o=Object.entries(i).reduce((function(e,r){var i=t.__read(r,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||n.initialEmptyValue),a?e.set(o,a):e.unset(o)}),new r.Identify),s={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return t.__assign(t.__assign({},(0,r.createIdentifyEvent)(o)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return r=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(r,n))return[2];this.onNewCampaign(r)}return[4,this.track(this.createCampaignEvent(r))];case 3:return t.sent(),[4,this.saveCampaignToStorage(r)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=s;var l=o((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),_h=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=(lr(),We(ur)),r=$o(),n=function(){function e(e){this.options=t.__assign({},e)}return o(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e(this.options),o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=t.sent()))return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,r.getGlobalScope)(),o=null!==(n=null==i?void 0:i.document.cookie.split("; "))&&void 0!==n?n:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,u,c;return t.__generator(this,(function(t){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==n?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(c=(0,r.getGlobalScope)())&&(c.document.cookie=u)}catch{}return[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2]}))}))},e}();e.CookieStorage=n})),kh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=(lr(),We(ur)),r=Zo(),n=function(){function e(e,t){this.storage=e,this.storageKey=(0,r.getCookieName)(t),this.cache={optOut:!1}}return o(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return r=this,[4,this.storage.get(this.storageKey)];case 1:return r.cache=null!==(e=t.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=t.__assign(t.__assign({},this.cache),e),this.storage.set(this.storageKey,this.cache)},e.prototype.getSessionId=function(){return this.cache.sessionId},e.prototype.setSessionId=function(e){this.setSession({sessionId:e})},e.prototype.getDeviceId=function(){return this.cache.deviceId},e.prototype.setDeviceId=function(e){this.setSession({deviceId:e})},e.prototype.getUserId=function(){return this.cache.userId},e.prototype.setUserId=function(e){this.setSession({userId:e})},e.prototype.getLastEventTime=function(){return this.cache.lastEventTime},e.prototype.setLastEventTime=function(e){this.setSession({lastEventTime:e})},e.prototype.getOptOut=function(){return this.cache.optOut},e.prototype.setOptOut=function(e){this.setSession({optOut:e})},e.prototype.getLastEventId=function(){return this.cache.lastEventId},e.prototype.setLastEventId=function(e){this.setSession({lastEventId:e})},e}();e.SessionManager=n})),Mh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=(lr(),We(ur)),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),o(r,"FetchTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n,i;return t.__generator(this,(function(t){switch(t.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(e,n)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},r}(on().BaseTransport);e.FetchTransport=r})),Eh=fe(((e,t)=>{var r,n;y(),r=e,n=function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return n(null==t&&r.path)}},r.exports),r.exports}function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}o(r,"createCommonjsModule"),o(n,"commonjsRequire");var i=r((function(e,r){!function(t,n){var i="function",a="undefined",s="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",N="Samsung",j="Sony",L="Xiaomi",R="Zebra",D="Facebook",B=o((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),W=o((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),U=o((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=o((function(e){return e.toLowerCase()}),"lowerize"),z=o((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=o((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===a?e:e.substring(0,275)}),"trim"),q=o((function(e,t){for(var r,o,a,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].exec(e))for(a=0;a<p.length;a++)c=u[++o],typeof(l=p[a])===s&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),X=o((function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(U(t[r][i],e))return"?"===r?n:r}else if(U(t[r],e))return"?"===r?n:r;return e}),"strMapper"),Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[c,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,D],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,V]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,j],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,j],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,R],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,R],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,j],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,j],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,R],[d,b]],[/(quest( 2)?)/i],[u,[h,D],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,X,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,Y]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},K=o((function(e,r){if(typeof e===s&&(r=e,e=n),!(this instanceof K))return new K(e,r).getResult();var i=e||(typeof t!==a&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),o=r?B(J,r):J;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?G(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=W([c,p,"major"]),K.CPU=W([f]),K.DEVICE=W([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=W([c,p]),e.exports&&(r=e.exports=K),r.UAParser=K;var H=typeof t!==a&&(t.jQuery||t.Zepto);if(H&&!H.ua){var Z=new K;H.ua=Z.getResult(),H.ua.get=function(){return Z.getUA()},H.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)H.ua[r]=t[r]}}}("object"==typeof window?window:t)})),a=function(){function e(){this.ua=new i.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return o(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:s(this.ua),deviceModel:l(this.ua)}},e}(),s=o((function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=o((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=o((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=function(){function e(){this.queue=[]}return o(e,"EventBridgeImpl"),e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),d=o((function(){return d=Object.assign||o((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=o((function(e,t){var r=typeof e;if(r!==typeof t)return!1;for(var n=0,i=["string","number","boolean","undefined"];n<i.length;n++)if(i[n]===r)return e===t;if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),a=Array.isArray(t);if(o!==a)return!1;if(!o||!a){var s=Object.keys(e).sort(),l=Object.keys(t).sort();if(!h(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(r){h(e[r],t[r])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!h(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return o(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),r=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},updateUserProperties:function(e){for(var t=r.userProperties||{},n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],a=o[0],s=o[1];switch(a){case"$set":for(var l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],d=c[0],h=c[1];t[d]=h}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[d=f[p]];break;case"$clearAll":t={}}}return r.userProperties=t,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return d({},this.identity)},e.prototype.setIdentity=function(e){var t=d({},this.identity);this.identity=d({},e),h(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,g=function(){function e(){this.identityStore=new p,this.eventBridge=new c,this.applicationContextProvider=new a}return o(e,"AnalyticsConnector"),e.getInstance=function(t){return f.analyticsConnectorInstances||(f.analyticsConnectorInstances={}),f.analyticsConnectorInstances[t]||(f.analyticsConnectorInstances[t]=new e),f.analyticsConnectorInstances[t]},e}();e.AnalyticsConnector=g,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r=typeof globalThis<"u"?globalThis:r||self).Experiment={})})),al=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=Eh(),r=o((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=r})),Sh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=(lr(),We(ur)),r=vt(),n=al(),i=function(){function e(){this.name="identity",this.type=r.PluginType.BEFORE,this.identityStore=(0,n.getAnalyticsConnector)().identityStore}return o(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){return(r=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),Oh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=o((function(){var e,t,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""}),"getLanguage");e.getLanguage=t})),cr=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=e.BASE_CAMPAIGN=e.getLanguage=e.IdentityEventSender=e.getAnalyticsConnector=e.FetchTransport=e.SessionManager=e.CookieStorage=e.getOldCookieName=e.getCookieName=e.getQueryParams=e.CampaignTracker=e.CampaignParser=void 0;var t=tl();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var r=wh();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return r.CampaignTracker}});var n=el();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return n.getQueryParams}});var i=Zo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=_h();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=kh();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=Mh();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=al();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=Sh();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=Oh();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=Ko();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=$o();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),ol=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=o((function(t,r){(0,e.convertProxyObjectToRealObject)(t,r)}),"runQueuedFunctions");e.runQueuedFunctions=t;var r=o((function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject");e.convertProxyObjectToRealObject=r;var n=o((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=n})),Ih=fe(((e,t)=>{y(),function(r,n){var i="function",a="undefined",s="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",N="Samsung",j="Sony",L="Xiaomi",R="Zebra",D="Facebook",B=o((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),W=o((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),U=o((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=o((function(e){return e.toLowerCase()}),"lowerize"),z=o((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=o((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===a?e:e.substring(0,275)}),"trim"),q=o((function(e,t){for(var r,o,a,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].exec(e))for(a=0;a<p.length;a++)c=u[++o],typeof(l=p[a])===s&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),X=o((function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(U(t[r][i],e))return"?"===r?n:r}else if(U(t[r],e))return"?"===r?n:r;return e}),"strMapper"),Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[c,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,D],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,V]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,j],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,j],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,R],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,R],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,j],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,j],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,R],[d,b]],[/(quest( 2)?)/i],[u,[h,D],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,X,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,Y]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},K=o((function(e,t){if(typeof e===s&&(t=e,e=n),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof r!==a&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),o=t?B(J,t):J;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,o.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?G(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=W([c,p,"major"]),K.CPU=W([f]),K.DEVICE=W([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=W([c,p]),typeof e!==a?(typeof t!==a&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof r!==a&&(r.UAParser=K);var H=typeof r!==a&&(r.jQuery||r.Zepto);if(H&&!H.ua){var Z=new K;H.ua=Z.getResult(),H.ua.get=function(){return Z.getUA()},H.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)H.ua[r]=t[r]}}}("object"==typeof window?window:e)})),Ah=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),Ch=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=(_n(),We(wn)),r=vt(),n=t.__importDefault(Ih()),i=on(),a=cr(),s=Ah(),l=function(){function e(){var e;this.name="context",this.type=r.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(s.VERSION),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new n.default(e).getResult()}return o(e,"Context"),e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,o,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),r=(new Date).getTime(),n=this.uaResult.browser.name,o=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,l=this.uaResult.device.vendor,[2,t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:o}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:l}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,a.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library})]}))}))},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}();e.Context=l})),sl=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=(_n(),We(wn)),r=cr(),n=function(){function e(){}return o(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e,o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(r=t.sent())?[2,JSON.parse(r)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(n=(0,r.getGlobalScope)())||void 0===n?void 0:n.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,r.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(n))}catch{}return[2]}))}))},e.prototype.remove=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(n=(0,r.getGlobalScope)())||void 0===n||n.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(e=(0,r.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();e.LocalStorage=n})),jh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=(_n(),We(wn)),r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(r,e),o(r,"XHRTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,r=JSON.parse(e),a=n.buildResponse(r);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(r))}))]}))}))},r}(on().BaseTransport);e.XHRTransport=r})),Fh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=(_n(),We(wn)),r=cr(),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),o(n,"SendBeaconTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,o){var a=(0,r.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(n);return t(a.navigator.sendBeacon(e,JSON.stringify(n))?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(e){o(e)}}))]}))}))},n}(on().BaseTransport);e.SendBeaconTransport=n})),Rh=fe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.getTopLevelDomain=e.createTransport=e.createDeviceId=e.createEventsStorage=e.createFlexibleStorage=e.createCookieStorage=e.useBrowserConfig=e.BrowserConfig=e.getDefaultConfig=void 0;var r=(_n(),We(wn)),n=vt(),i=on(),a=cr(),s=sl(),l=jh(),u=Fh(),c=o((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new a.SessionManager(e,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new a.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function n(n,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,b=(0,e.getDefaultConfig)();return(m=t.call(this,r.__assign(r.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:n,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:b.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:b.transportProvider}))||this).cookieStorage=null!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:b.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:b.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:b.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:b.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:b.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:b.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:b.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:b.domain,m.lastEventTime=null!==(v=m.lastEventTime)&&void 0!==v?v:null==o?void 0:o.lastEventTime,m.optOut=!(null==o||!o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(y=null==o?void 0:o.trackingOptions)&&void 0!==y?y:b.trackingOptions,m.userId=i,m}return r.__extends(n,t),o(n,"BrowserConfig"),Object.defineProperty(n.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),n}(i.Config);e.BrowserConfig=d;var h=o((function(n,i,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,b,_,w,M,x;return r.__generator(this,(function(E){switch(E.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(b=null==o?void 0:o.domain)&&void 0!==b?(l=b,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=E.sent(),E.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(r.__assign(r.__assign({},o),{domain:s}))];case 4:return u=E.sent(),c=(0,a.getCookieName)(n),[4,u.get(c)];case 5:return h=E.sent(),p=(0,a.getQueryParams)(),[4,new a.SessionManager(u,n).load()];case 6:return f=E.sent(),g=d.bind,v=[void 0,n,null!=i?i:null==h?void 0:h.userId],y=[r.__assign({},o)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==o?void 0:o.deviceId,p.deviceId),domain:s,optOut:null!==(_=null==o?void 0:o.optOut)&&void 0!==_?_:!(null==h||!h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=E.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==o?void 0:o.sessionId,[4,(0,e.createEventsStorage)(o)];case 8:return[2,new(g.apply(d,v.concat([r.__assign.apply(void 0,y.concat([(m.storageProvider=E.sent(),m.trackingOptions=r.__assign(r.__assign({},t.trackingOptions),null==o?void 0:o.trackingOptions),m.transportProvider=null!==(x=null==o?void 0:o.transportProvider)&&void 0!==x?x:(0,e.createTransport)(null==o?void 0:o.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=o((function(n,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(s){switch(s.label){case 0:return t=r.__assign(r.__assign({},i),n),o=null==n?void 0:n.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=o((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return t=new a.CookieStorage({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new s.LocalStorage).isEnabled()]:[3,4];case 3:r.sent()||(t=new i.MemoryStorage),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=o((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,a,l,u;return r.__generator(this,(function(c){switch(c.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),t=r.__values([null==e?void 0:e.storageProvider,new s.LocalStorage]),n=t.next(),c.label=2;case 2:return n.done?[3,6]:(i=n.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return a=c.sent(),l={error:a},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(l)throw l.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");e.createEventsStorage=g;var v=o((function(e,t,r){return t||r||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=v;var m=o((function(t){return t===n.TransportType.XHR?new l.XHRTransport:t===n.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var b=o((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,s,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,(new a.CookieStorage).isEnabled()];case 1:if(!r.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),i=[],o="AMP_TLDTEST",s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));s=0,r.label=2;case 2:return s<i.length?(l=i[s],u={domain:"."+l},[4,(c=new a.CookieStorage(u)).set(o,1)]):[3,7];case 3:return r.sent(),[4,c.get(o)];case 4:return r.sent()?[4,c.remove(o)]:[3,6];case 5:return r.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=b})),zh=fe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var r=(_n(),We(wn)),n=cr(),i=sl(),a=o((function(o,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return r.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new n.CookieStorage).isEnabled()];case 1:return(!g.sent()||null!=a&&a.disableCookies)&&(t=new i.LocalStorage),[4,t.isEnabled()];case 2:return g.sent()?(s=(0,n.getOldCookieName)(o),[4,t.getRaw(s)]):[2,{optOut:!1}];case 3:return(l=g.sent())?[4,t.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),u=r.__read(l.split("."),5),c=u[0],d=u[1],h=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(d),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:!!h}]}}))}))}),"parseOldCookies");e.parseOldCookies=a;var s=o((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=s;var l=o((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode");e.decode=l})),hl=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=(_n(),We(wn)),r=on(),n=cr(),i=ol(),a=Ch(),s=Rh(),l=zh(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),o(u,"AmplitudeBrowser"),u.prototype.init=function(i,o,u){var c,d,h;return void 0===i&&(i=""),t.__awaiter(this,void 0,void 0,(function(){var p,f,g,v,y=this;return t.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,l.parseOldCookies)(i,u)]);case 1:return p=m.sent(),[4,(0,s.useBrowserConfig)(i,o||p.userId,t.__assign(t.__assign({},u),{deviceId:null!==(c=p.deviceId)&&void 0!==c?c:null==u?void 0:u.deviceId,sessionId:null!==(d=p.sessionId)&&void 0!==d?d:null==u?void 0:u.sessionId,optOut:null!==(h=null==u?void 0:u.optOut)&&void 0!==h?h:p.optOut,lastEventTime:p.lastEventTime}))];case 2:return f=m.sent(),[4,e.prototype._init.call(this,f)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(v=(0,n.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(e){y.track(e.eventType,e.eventProperties)})),v.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new a.Context)];case 4:return m.sent(),[4,this.add(new n.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new r.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,r){return void 0===r&&(r=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(l){switch(l.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,s.createFlexibleStorage)(this.config)];case 1:return a=l.sent(),[4,new n.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:a,track:i,onNewCampaign:o})).send(r)];case 2:return l.sent(),[2]}}))}))},u.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},u.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},u.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},u.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},u.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,r.UUID)())},u.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},u.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},u.prototype.setTransport=function(e){this.config?this.config.transportProvider=(0,s.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Identify,o)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},u.prototype.groupIdentify=function(t,n,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new r.Identify,s)}return e.prototype.groupIdentify.call(this,t,n,o,a)},u.prototype.revenue=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Revenue,o)}return e.prototype.revenue.call(this,t,n)},u}(r.AmplitudeCore);e.AmplitudeBrowser=u;var c=o((function(){var e=new u;return{init:(0,r.debugWrapper)((0,r.returnWrapper)(e.init.bind(e)),"init",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),add:(0,r.debugWrapper)((0,r.returnWrapper)(e.add.bind(e)),"add",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,r.debugWrapper)((0,r.returnWrapper)(e.remove.bind(e)),"remove",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,r.debugWrapper)((0,r.returnWrapper)(e.track.bind(e)),"track",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,r.debugWrapper)((0,r.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,r.debugWrapper)((0,r.returnWrapper)(e.identify.bind(e)),"identify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,r.debugWrapper)((0,r.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,r.debugWrapper)((0,r.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,r.debugWrapper)((0,r.returnWrapper)(e.revenue.bind(e)),"revenue",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,r.debugWrapper)((0,r.returnWrapper)(e.flush.bind(e)),"flush",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,r.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),setUserId:(0,r.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,r.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,r.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),reset:(0,r.debugWrapper)(e.reset.bind(e),"reset",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,r.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setSessionId:(0,r.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setOptOut:(0,r.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setTransport:(0,r.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Uh=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Types=e.Identify=e.Revenue=e.runQueuedFunctions=e.track=e.setUserId=e.setTransport=e.setSessionId=e.setOptOut=e.setGroup=e.setDeviceId=e.revenue=e.reset=e.remove=e.logEvent=e.init=e.identify=e.groupIdentify=e.getUserId=e.getSessionId=e.getDeviceId=e.flush=e.add=e.createInstance=void 0;var t=(_n(),We(wn)),r=t.__importDefault(hl()),n=hl();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return n.createInstance}}),e.add=r.default.add,e.flush=r.default.flush,e.getDeviceId=r.default.getDeviceId,e.getSessionId=r.default.getSessionId,e.getUserId=r.default.getUserId,e.groupIdentify=r.default.groupIdentify,e.identify=r.default.identify,e.init=r.default.init,e.logEvent=r.default.logEvent,e.remove=r.default.remove,e.reset=r.default.reset,e.revenue=r.default.revenue,e.setDeviceId=r.default.setDeviceId,e.setGroup=r.default.setGroup,e.setOptOut=r.default.setOptOut,e.setSessionId=r.default.setSessionId,e.setTransport=r.default.setTransport,e.setUserId=r.default.setUserId,e.track=r.default.track;var i=ol();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=on();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}}),e.Types=t.__importStar(vt())})),xg=fe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E[i]=E[a]=E[_]=E[s]=E[w]=E[l]=E[u]=E[c]=E[d]=E[h]=E[p]=E[g]=E[v]=E[m]=E[b]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,I="object"==typeof self&&self&&self.Object===Object&&self,k=S||I||Function("return this")(),C="object"==typeof e&&e&&!e.nodeType&&e,O=C&&"object"==typeof t&&t&&!t.nodeType&&t,T=O&&O.exports===C,A=T&&S.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch{}}(),F=P&&P.isTypedArray;function N(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function j(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function L(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function R(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function D(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function W(e,t){return null==e?void 0:e[t]}function U(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function V(e,t){return function(r){return e(t(r))}}function z(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}o(N,"arrayFilter"),o(j,"arrayPush"),o(L,"arraySome"),o(R,"baseTimes"),o(D,"baseUnary"),o(B,"cacheHas"),o(W,"getValue"),o(U,"mapToArray"),o(V,"overArg"),o(z,"setToArray");var G,q=Array.prototype,X=Function.prototype,Y=Object.prototype,J=k["__core-js_shared__"],K=X.toString,H=Y.hasOwnProperty,Z=(G=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",$=Y.toString,Q=RegExp("^"+K.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=T?k.Buffer:void 0,te=k.Symbol,re=k.Uint8Array,ne=Y.propertyIsEnumerable,ie=q.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=V(Object.keys,Object),ue=ct(k,"DataView"),ce=ct(k,"Map"),de=ct(k,"Promise"),he=ct(k,"Set"),pe=ct(k,"WeakMap"),fe=ct(Object,"create"),ge=bt(ue),ve=bt(ce),ye=bt(de),me=bt(he),be=bt(pe),_e=te?te.prototype:void 0,we=_e?_e.valueOf:void 0;function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ee(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Se(e){var t=this.__data__;if(fe){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0}function Ie(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function ke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&void 0===t?r:t,this}function Ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(){this.__data__=[],this.size=0}function Te(e){var t=this.__data__,r=He(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),--this.size,!0)}function Ae(e){var t=this.__data__,r=He(t,e);return r<0?void 0:t[r][1]}function Pe(e){return He(this.__data__,e)>-1}function Fe(e,t){var r=this.__data__,n=He(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function je(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ce),string:new Me}}function Le(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Re(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function We(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Ne;++t<r;)this.add(e[t])}function Ue(e){return this.__data__.set(e,r),this}function Ve(e){return this.__data__.has(e)}function ze(e){var t=this.__data__=new Ce(e);this.size=t.size}function Ge(){this.__data__=new Ce,this.size=0}function qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Xe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}function Je(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ne(n)}return r.set(e,t),this.size=r.size,this}function Ke(e,t){var r=Mt(e),n=!r&&wt(e),i=!r&&!n&&Et(e),o=!r&&!n&&!i&&Tt(e),a=r||n||i||o,s=a?R(e.length,String):[],l=s.length;for(var u in e)(t||H.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&s.push(u);return s}function He(e,t){for(var r=e.length;r--;)if(_t(e[r][0],t))return r;return-1}function Ze(e,t,r){var n=t(e);return Mt(e)?n:j(n,r(e))}function $e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?dt(e):mt(e)}function Qe(e){return Ot(e)&&$e(e)==i}function et(e,t,r,n,i){return e===t||(null==e||null==t||!Ot(e)&&!Ot(t)?e!=e&&t!=t:tt(e,t,r,n,et,i))}function tt(e,t,r,n,o,s){var l=Mt(e),u=Mt(t),c=l?a:pt(e),d=u?a:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&Et(e)){if(!Et(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new ze),l||Tt(e)?ot(e,t,r,n,o,s):at(e,t,c,r,n,o,s);if(!(1&r)){var v=h&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,b=y?t.value():t;return s||(s=new ze),o(m,b,r,n,s)}}return!!g&&(s||(s=new ze),st(e,t,r,n,o,s))}function rt(e){return!(!Ct(e)||vt(e))&&(It(e)?Q:M).test(bt(e))}function nt(e){return Ot(e)&&kt(e.length)&&!!E[$e(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var r in Object(e))H.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ot(e,t,r,n,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=2&r?new We:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(n)var g=a?n(f,p,c,t,e,o):n(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!L(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,r,n,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,r,n,i,o,a){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new re(e),new re(t)));case s:case l:case h:return _t(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=U;case v:var p=1&n;if(c||(c=z),e.size!=t.size&&!p)return!1;var f=a.get(e);if(f)return f==t;n|=2,a.set(e,t);var y=ot(c(e),c(t),n,i,o,a);return a.delete(e),y;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,r,n,i,o){var a=1&r,s=lt(e),l=s.length;if(l!=lt(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:H.call(t,c)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var f=e[c=s[u]],g=t[c];if(n)var v=a?n(g,f,c,t,e,o):n(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,r,n,o):v)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(h=!1)}return o.delete(e),o.delete(t),h}function lt(e){return Ze(e,At,ht)}function ut(e,t){var r=e.__data__;return gt(t)?r["string"==typeof t?"string":"hash"]:r.map}function ct(e,t){var r=W(e,t);return rt(r)?r:void 0}function dt(e){var t=H.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch{}var i=$.call(e);return n&&(t?e[oe]=r:delete e[oe]),i}o(Me,"Hash"),o(xe,"hashClear"),o(Ee,"hashDelete"),o(Se,"hashGet"),o(Ie,"hashHas"),o(ke,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ee,Me.prototype.get=Se,Me.prototype.has=Ie,Me.prototype.set=ke,o(Ce,"ListCache"),o(Oe,"listCacheClear"),o(Te,"listCacheDelete"),o(Ae,"listCacheGet"),o(Pe,"listCacheHas"),o(Fe,"listCacheSet"),Ce.prototype.clear=Oe,Ce.prototype.delete=Te,Ce.prototype.get=Ae,Ce.prototype.has=Pe,Ce.prototype.set=Fe,o(Ne,"MapCache"),o(je,"mapCacheClear"),o(Le,"mapCacheDelete"),o(Re,"mapCacheGet"),o(De,"mapCacheHas"),o(Be,"mapCacheSet"),Ne.prototype.clear=je,Ne.prototype.delete=Le,Ne.prototype.get=Re,Ne.prototype.has=De,Ne.prototype.set=Be,o(We,"SetCache"),o(Ue,"setCacheAdd"),o(Ve,"setCacheHas"),We.prototype.add=We.prototype.push=Ue,We.prototype.has=Ve,o(ze,"Stack"),o(Ge,"stackClear"),o(qe,"stackDelete"),o(Xe,"stackGet"),o(Ye,"stackHas"),o(Je,"stackSet"),ze.prototype.clear=Ge,ze.prototype.delete=qe,ze.prototype.get=Xe,ze.prototype.has=Ye,ze.prototype.set=Je,o(Ke,"arrayLikeKeys"),o(He,"assocIndexOf"),o(Ze,"baseGetAllKeys"),o($e,"baseGetTag"),o(Qe,"baseIsArguments"),o(et,"baseIsEqual"),o(tt,"baseIsEqualDeep"),o(rt,"baseIsNative"),o(nt,"baseIsTypedArray"),o(it,"baseKeys"),o(ot,"equalArrays"),o(at,"equalByTag"),o(st,"equalObjects"),o(lt,"getAllKeys"),o(ut,"getMapData"),o(ct,"getNative"),o(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),N(ae(e),(function(t){return ne.call(e,t)})))}:Pt,pt=$e;function ft(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function gt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function vt(e){return!!Z&&Z in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function mt(e){return $.call(e)}function bt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function _t(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=d||de&&pt(de.resolve())!=f||he&&pt(new he)!=v||pe&&pt(new pe)!=b)&&(pt=o((function(e){var t=$e(e),r=t==p?e.constructor:void 0,n=r?bt(r):"";if(n)switch(n){case ge:return w;case ve:return d;case ye:return f;case me:return v;case be:return b}return t}),"getTag")),o(ft,"isIndex"),o(gt,"isKeyable"),o(vt,"isMasked"),o(yt,"isPrototype"),o(mt,"objectToString"),o(bt,"toSource"),o(_t,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return Ot(e)&&H.call(e,"callee")&&!ne.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&kt(e.length)&&!It(e)}o(xt,"isArrayLike");var Et=se||Ft;function St(e,t){return et(e,t)}function It(e){if(!Ct(e))return!1;var t=$e(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function kt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Ct(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ot(e){return null!=e&&"object"==typeof e}o(St,"isEqual"),o(It,"isFunction"),o(kt,"isLength"),o(Ct,"isObject"),o(Ot,"isObjectLike");var Tt=F?D(F):nt;function At(e){return xt(e)?Ke(e):it(e)}function Pt(){return[]}function Ft(){return!1}o(At,"keys"),o(Pt,"stubArray"),o(Ft,"stubFalse"),t.exports=St})),Qg=fe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[a]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,v=g&&g.exports===f,m=v&&d.process,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),_=b&&b.isTypedArray;function w(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)}function M(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function x(e){return function(t){return e(t)}}function E(e,t){return null==e?void 0:e[t]}function S(e,t){return function(r){return e(t(r))}}o(w,"apply"),o(M,"baseTimes"),o(x,"baseUnary"),o(E,"getValue"),o(S,"overArg");var I,k=Array.prototype,C=Function.prototype,O=Object.prototype,T=p["__core-js_shared__"],A=C.toString,P=O.hasOwnProperty,F=(I=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",N=O.toString,j=A.call(Object),L=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=v?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,W=R?R.allocUnsafe:void 0,U=S(Object.getPrototypeOf,Object),V=Object.create,z=O.propertyIsEnumerable,G=k.splice,q=D?D.toStringTag:void 0,X=function(){try{var e=Xe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Y=R?R.isBuffer:void 0,J=Math.max,K=Date.now,H=Xe(p,"Map"),Z=Xe(Object,"create"),$=function(){function e(){}return o(e,"object"),function(t){if(!gt(t))return{};if(V)return V(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(){this.__data__=Z?Z(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function re(e){var t=this.__data__;if(Z){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0}function ne(e){var t=this.__data__;return Z?void 0!==t[e]:P.call(t,e)}function ie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Z&&void 0===t?r:t,this}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,r=Ie(t,e);return!(r<0)&&(r==t.length-1?t.pop():G.call(t,r,1),--this.size,!0)}function le(e){var t=this.__data__,r=Ie(t,e);return r<0?void 0:t[r][1]}function ue(e){return Ie(this.__data__,e)>-1}function ce(e,t){var r=this.__data__,n=Ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new(H||oe),string:new Q}}function pe(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return qe(this,e).get(e)}function ge(e){return qe(this,e).has(e)}function ve(e,t){var r=qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ye(e){var t=this.__data__=new oe(e);this.size=t.size}function me(){this.__data__=new oe,this.size=0}function be(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function _e(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var r=this.__data__;if(r instanceof oe){var n=r.__data__;if(!H||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new de(n)}return r.set(e,t),this.size=r.size,this}function xe(e,t){var r=ut(e),n=!r&&lt(e),i=!r&&!n&&ht(e),o=!r&&!n&&!i&&mt(e),a=r||n||i||o,s=a?M(e.length,String):[],l=s.length;for(var u in e)(t||P.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&s.push(u);return s}function Ee(e,t,r){(void 0!==r&&!st(e[t],r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Se(e,t,r){var n=e[t];(!P.call(e,t)||!st(n,r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Ie(e,t){for(var r=e.length;r--;)if(st(e[r][0],t))return r;return-1}function ke(e,t,r){"__proto__"==t&&X?X(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}o(Q,"Hash"),o(ee,"hashClear"),o(te,"hashDelete"),o(re,"hashGet"),o(ne,"hashHas"),o(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=re,Q.prototype.has=ne,Q.prototype.set=ie,o(oe,"ListCache"),o(ae,"listCacheClear"),o(se,"listCacheDelete"),o(le,"listCacheGet"),o(ue,"listCacheHas"),o(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,o(de,"MapCache"),o(he,"mapCacheClear"),o(pe,"mapCacheDelete"),o(fe,"mapCacheGet"),o(ge,"mapCacheHas"),o(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,o(ye,"Stack"),o(me,"stackClear"),o(be,"stackDelete"),o(_e,"stackGet"),o(we,"stackHas"),o(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=_e,ye.prototype.has=we,ye.prototype.set=Me,o(xe,"arrayLikeKeys"),o(Ee,"assignMergeValue"),o(Se,"assignValue"),o(Ie,"assocIndexOf"),o(ke,"baseAssignValue");var Ce=Ge();function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?Ye(e):tt(e)}function Te(e){return vt(e)&&Oe(e)==i}function Ae(e){return!(!gt(e)||$e(e))&&(pt(e)?L:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[Oe(e)]}function Fe(e){if(!gt(e))return et(e);var t=Qe(e),r=[];for(var n in e)"constructor"==n&&(t||!P.call(e,n))||r.push(n);return r}function Ne(e,t,r,n,i){e!==t&&Ce(t,(function(o,a){if(i||(i=new ye),gt(o))je(e,t,a,r,Ne,n,i);else{var s=n?n(nt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Ee(e,a,s)}}),_t)}function je(e,t,r,n,i,o,a){var s=nt(e,r),l=nt(t,r),u=a.get(l);if(u)Ee(e,r,u);else{var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var h=ut(l),p=!h&&ht(l),f=!h&&!p&&mt(l);c=l,h||p||f?ut(s)?c=s:dt(s)?c=Ue(s):p?(d=!1,c=De(l,!0)):f?(d=!1,c=We(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=bt(s):(!gt(s)||pt(s))&&(c=Je(l))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),Ee(e,r,c)}}function Le(e,t){return it(rt(e,t,xt),e+"")}o(Oe,"baseGetTag"),o(Te,"baseIsArguments"),o(Ae,"baseIsNative"),o(Pe,"baseIsTypedArray"),o(Fe,"baseKeysIn"),o(Ne,"baseMerge"),o(je,"baseMergeDeep"),o(Le,"baseRest");var Re=X?function(e,t){return X(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function De(e,t){if(t)return e.slice();var r=e.length,n=W?W(r):new e.constructor(r);return e.copy(n),n}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function We(e,t){var r=t?Be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ue(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Ve(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),i?ke(r,s,l):Se(r,s,l)}return r}function ze(e){return Le((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&He(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function Ge(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function qe(e,t){var r=e.__data__;return Ze(t)?r["string"==typeof t?"string":"hash"]:r.map}function Xe(e,t){var r=E(e,t);return Ae(r)?r:void 0}function Ye(e){var t=P.call(e,q),r=e[q];try{e[q]=void 0;var n=!0}catch{}var i=N.call(e);return n&&(t?e[q]=r:delete e[q]),i}function Je(e){return"function"!=typeof e.constructor||Qe(e)?{}:$(U(e))}function Ke(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,r){if(!gt(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Ke(t,r.length):"string"==n&&t in r)&&st(r[t],e)}function Ze(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function $e(e){return!!F&&F in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function et(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function tt(e){return N.call(e)}function rt(e,t,r){return t=J(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=J(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}function nt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}o(De,"cloneBuffer"),o(Be,"cloneArrayBuffer"),o(We,"cloneTypedArray"),o(Ue,"copyArray"),o(Ve,"copyObject"),o(ze,"createAssigner"),o(Ge,"createBaseFor"),o(qe,"getMapData"),o(Xe,"getNative"),o(Ye,"getRawTag"),o(Je,"initCloneObject"),o(Ke,"isIndex"),o(He,"isIterateeCall"),o(Ze,"isKeyable"),o($e,"isMasked"),o(Qe,"isPrototype"),o(et,"nativeKeysIn"),o(tt,"objectToString"),o(rt,"overRest"),o(nt,"safeGet");var it=ot(Re);function ot(e){var t=0,r=0;return function(){var n=K(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function at(e){if(null!=e){try{return A.call(e)}catch{}try{return e+""}catch{}}return""}function st(e,t){return e===t||e!=e&&t!=t}o(ot,"shortOut"),o(at,"toSource"),o(st,"eq");var lt=Te(function(){return arguments}())?Te:function(e){return vt(e)&&P.call(e,"callee")&&!z.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function dt(e){return vt(e)&&ct(e)}o(ct,"isArrayLike"),o(dt,"isArrayLikeObject");var ht=Y||Et;function pt(e){if(!gt(e))return!1;var t=Oe(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function gt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function vt(e){return null!=e&&"object"==typeof e}function yt(e){if(!vt(e)||Oe(e)!=s)return!1;var t=U(e);if(null===t)return!0;var r=P.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==j}o(pt,"isFunction"),o(ft,"isLength"),o(gt,"isObject"),o(vt,"isObjectLike"),o(yt,"isPlainObject");var mt=_?x(_):Pe;function bt(e){return Ve(e,_t(e))}function _t(e){return ct(e)?xe(e,!0):Fe(e)}o(bt,"toPlainObject"),o(_t,"keysIn");var wt=ze((function(e,t,r){Ne(e,t,r)}));function Mt(e){return function(){return e}}function xt(e){return e}function Et(){return!1}o(Mt,"constant"),o(xt,"identity"),o(Et,"stubFalse"),t.exports=wt})),em=fe(((e,t)=>{y(),function(r,n){var i="function",a="undefined",s="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",N="Samsung",j="Sharp",L="Sony",R="Xiaomi",D="Zebra",B="Facebook",W=o((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=o((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),V=o((function(e,t){return typeof e===l&&-1!==z(t).indexOf(z(e))}),"has"),z=o((function(e){return e.toLowerCase()}),"lowerize"),G=o((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),q=o((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)}),"trim"),X=o((function(e,t){for(var r,o,a,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].exec(e))for(a=0;a<p.length;a++)c=u[++o],typeof(l=p[a])===s&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),Y=o((function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[c,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,z]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/(macintosh);/i],[u,[h,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,L],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,L],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,j],[d,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,L],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,j],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,L],[d,m]],[/(mitv-\w{5}) bui/i],[u,[h,R],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,q],[u,q],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,b]],[/(quest( 2)?)/i],[u,[h,B],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,Y,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,Y,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=o((function(e,t){if(typeof e===s&&(t=e,e=n),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof r!==a&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),o=t?W(K,t):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,X.call(e,i,o.browser),e.major=G(e.version),e},this.getCPU=function(){var e={};return e[f]=n,X.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,X.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,X.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,X.call(e,i,o.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>350?q(e,350):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.33",H.BROWSER=U([c,p,"major"]),H.CPU=U([f]),H.DEVICE=U([u,h,d,g,v,m,y,b,_]),H.ENGINE=H.OS=U([c,p]),typeof e!==a?(typeof t!==a&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof r!==a&&(r.UAParser=H);var Z=typeof r!==a&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var $=new H;Z.ua=$.getResult(),Z.ua.get=function(){return $.getUA()},Z.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var r in t)Z.ua[r]=t[r]}}}("object"==typeof window?window:e)})),pm=fe(((e,t)=>{y(),t.exports=o((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,r=-1;r++<t;)for(var n=r+1;n<e.length;++n)e[r]===e[n]&&e.splice(n--,1);return e}),"unique"),t.exports.immutable=o((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var r=e.length,n=new Array(r),i=0;i<r;i++)n[i]=e[i];return t.exports(n)}),"uniqueImmutable")})),Cm=fe(((e,t)=>{var r,n;y(),r=e,n=function(){function e(e,r,i,o,a){t(e,r,i||0,o||e.length-1,a||n)}function t(e,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-l*c/s+d)),Math.min(o,Math.floor(n+(s-l)*c/s+d)),a)}var h=e[n],p=i,f=o;for(r(e,i,n),a(e[o],h)>0&&r(e,i,o);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,o),f<=n&&(i=f+1),n<=f&&(o=f-1)}}function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t){return e<t?-1:e>t?1:0}o(e,"quickselect"),o(t,"quickselectStep"),o(r,"swap"),o(n,"defaultCompare");var i=o((function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"RBush");function a(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function s(e,t){l(e,0,e.children.length,t,e)}function l(e,t,r,n,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<r;o++){var a=e.children[o];u(i,e.leaf?n(a):a)}return i}function u(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(t,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;e(t,s,r,n,o),a.push(r,s,s,n)}}return i.prototype.all=o((function(){return this._all(this.data,[])}),"all"),i.prototype.search=o((function(e){var t=this.data,r=[];if(!y(e,t))return r;for(var n=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?n(a):a;y(e,s)&&(t.leaf?r.push(a):v(e,s)?this._all(a,r):i.push(a))}t=i.pop()}return r}),"search"),i.prototype.collides=o((function(e){var t=this.data;if(!y(e,t))return!1;for(var r=[];t;){for(var n=0;n<t.children.length;n++){var i=t.children[n],o=t.leaf?this.toBBox(i):i;if(y(e,o)){if(t.leaf||v(e,o))return!0;r.push(i)}}t=r.pop()}return!1}),"collides"),i.prototype.load=o((function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this}),"load"),i.prototype.insert=o((function(e){return e&&this._insert(e,this.data.height-1),this}),"insert"),i.prototype.clear=o((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=o((function(e,t){if(!e)return this;for(var r,n,i,o=this.data,s=this.toBBox(e),l=[],u=[];o||l.length;){if(o||(o=l.pop(),n=l[l.length-1],r=u.pop(),i=!0),o.leaf){var c=a(e,o.children,t);if(-1!==c)return o.children.splice(c,1),l.push(o),this._condense(l),this}i||o.leaf||!v(o,s)?n?(r++,o=n.children[r],i=!1):o=null:(l.push(o),u.push(r),r=0,n=o,o=o.children[0])}return this}),"remove"),i.prototype.toBBox=o((function(e){return e}),"toBBox"),i.prototype.compareMinX=o((function(e,t){return e.minX-t.minX}),"compareMinX"),i.prototype.compareMinY=o((function(e,t){return e.minY-t.minY}),"compareMinY"),i.prototype.toJSON=o((function(){return this.data}),"toJSON"),i.prototype.fromJSON=o((function(e){return this.data=e,this}),"fromJSON"),i.prototype._all=o((function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t}),"_all"),i.prototype._build=o((function(e,t,r,n){var i,o=r-t+1,a=this._maxEntries;if(o<=a)return s(i=m(e.slice(t,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(i=m([])).leaf=!1,i.height=n;var l=Math.ceil(o/a),u=l*Math.ceil(Math.sqrt(a));b(e,t,r,u,this.compareMinX);for(var c=t;c<=r;c+=u){var d=Math.min(c+u-1,r);b(e,c,d,l,this.compareMinY);for(var h=c;h<=d;h+=l){var p=Math.min(h+l-1,d);i.children.push(this._build(e,h,p,n-1))}}return s(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=o((function(e,t,r,n){for(;n.push(t),!t.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=h(l),c=f(e,l)-u;c<o?(o=c,i=u<i?u:i,a=l):c===o&&u<i&&(i=u,a=l)}t=a||t.children[0]}return t}),"_chooseSubtree"),i.prototype._insert=o((function(e,t,r){var n=r?e:this.toBBox(e),i=[],o=this._chooseSubtree(n,this.data,t,i);for(o.children.push(e),u(o,n);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(n,i,t)}),"_insert"),i.prototype._split=o((function(e,t){var r=e[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),a=m(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,s(r,this.toBBox),s(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(r,a)}),"_split"),i.prototype._splitRoot=o((function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,s(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=o((function(e,t,r){for(var n,i=1/0,o=1/0,a=t;a<=r-t;a++){var s=l(e,0,a,this.toBBox),u=l(e,a,r,this.toBBox),c=g(s,u),d=h(s)+h(u);c<i?(i=c,n=a,o=d<o?d:o):c===i&&d<o&&(o=d,n=a)}return n||r-t}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=o((function(e,t,r){var n=e.leaf?this.compareMinX:c,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}),"_chooseSplitAxis"),i.prototype._allDistMargin=o((function(e,t,r,n){e.children.sort(n);for(var i=this.toBBox,o=l(e,0,t,i),a=l(e,r-t,r,i),s=p(o)+p(a),c=t;c<r-t;c++){var d=e.children[c];u(o,e.leaf?i(d):d),s+=p(o)}for(var h=r-t-1;h>=t;h--){var f=e.children[h];u(a,e.leaf?i(f):f),s+=p(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=o((function(e,t,r){for(var n=r;n>=0;n--)u(t[n],e)}),"_adjustParentBBoxes"),i.prototype._condense=o((function(e){for(var t=e.length-1,r=void 0;t>=0;t--)0===e[t].children.length?t>0?(r=e[t-1].children).splice(r.indexOf(e[t]),1):this.clear():s(e[t],this.toBBox)}),"_condense"),o(a,"findItem"),o(s,"calcBBox"),o(l,"distBBox"),o(u,"extend"),o(c,"compareNodeMinX"),o(d,"compareNodeMinY"),o(h,"bboxArea"),o(p,"bboxMargin"),o(f,"enlargedArea"),o(g,"intersectionArea"),o(v,"contains"),o(y,"intersects"),o(m,"createNode"),o(b,"multiSelect"),i},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self).RBush=n()})),of=fe((e=>{function t(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function r(e,t,r){switch(void 0===r&&(r={}),e){case"Point":return n(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return h(t).geometry;case"MultiLineString":return d(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function n(e,r,n){if(void 0===n&&(n={}),!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(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},r,n)}function i(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return n(e,t)})),r)}function a(e,r,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},r,n)}function s(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return a(e,t)})),r)}function l(e,r,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},r,n)}function u(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return l(e,t)})),r)}function c(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function d(e,r,n){return void 0===n&&(n={}),t({type:"MultiLineString",coordinates:e},r,n)}function h(e,r,n){return void 0===n&&(n={}),t({type:"MultiPoint",coordinates:e},r,n)}function p(e,r,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:e},r,n)}function f(e,r,n){return void 0===n&&(n={}),t({type:"GeometryCollection",geometries:e},r,n)}function g(e,t){if(void 0===t&&(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}function v(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function m(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function b(e,t){return w(m(e,t))}function _(e){var t=e%360;return t<0&&(t+=360),t}function w(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return v(m(e,t),r)}function E(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function I(e){return!!e&&e.constructor===Object}function k(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!S(e))throw new Error("bbox must only contain numbers")}))}function C(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}y(),Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.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},o(t,"feature"),e.feature=t,o(r,"geometry"),e.geometry=r,o(n,"point"),e.point=n,o(i,"points"),e.points=i,o(a,"polygon"),e.polygon=a,o(s,"polygons"),e.polygons=s,o(l,"lineString"),e.lineString=l,o(u,"lineStrings"),e.lineStrings=u,o(c,"featureCollection"),e.featureCollection=c,o(d,"multiLineString"),e.multiLineString=d,o(h,"multiPoint"),e.multiPoint=h,o(p,"multiPolygon"),e.multiPolygon=p,o(f,"geometryCollection"),e.geometryCollection=f,o(g,"round"),e.round=g,o(v,"radiansToLength"),e.radiansToLength=v,o(m,"lengthToRadians"),e.lengthToRadians=m,o(b,"lengthToDegrees"),e.lengthToDegrees=b,o(_,"bearingToAzimuth"),e.bearingToAzimuth=_,o(w,"radiansToDegrees"),e.radiansToDegrees=w,o(M,"degreesToRadians"),e.degreesToRadians=M,o(x,"convertLength"),e.convertLength=x,o(E,"convertArea"),e.convertArea=E,o(S,"isNumber"),e.isNumber=S,o(I,"isObject"),e.isObject=I,o(k,"validateBBox"),e.validateBBox=k,o(C,"validateId"),e.validateId=C})),uf=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=of();function r(e,t,n){if(null!==e)for(var i,o,a,s,l,u,c,d,h=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(d=!!(c=g?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var _=0,w=0;if(null!==(s=d?c.geometries[b]:c)){u=s.coordinates;var M=s.type;switch(h=!n||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,_,w))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,_,w))return!1;p++,"MultiPoint"===M&&_++}"LineString"===M&&_++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-h;o++){if(!1===t(u[i][o],p,m,_,w))return!1;p++}"MultiLineString"===M&&_++,"Polygon"===M&&w++}"Polygon"===M&&_++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(w=0,o=0;o<u[i].length;o++){for(a=0;a<u[i][o].length-h;a++){if(!1===t(u[i][o][a],p,m,_,w))return!1;p++}w++}_++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===r(s.geometries[i],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(e,t,n,i){var o=n;return r(e,(function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)}),i),o}function i(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function a(e,t,r){var n=r;return i(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function s(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function l(e,t,r){var n=r;return s(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function u(e){var t=[];return r(e,(function(e){t.push(e)})),t}function c(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function d(e,t,r){var n=r;return c(e,(function(e,i,o,a,s){n=0===i&&void 0===r?e:t(n,e,i,o,a,s)})),n}function h(e,r){c(e,(function(e,n,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==r(t.feature(e,i,{bbox:o,id:a}),n,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:s,coordinates:e.coordinates[u]};if(!1===r(t.feature(c,i),n,u))return!1}}))}function p(e,t,r){var n=r;return h(e,(function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)})),n}function f(e,n){h(e,(function(e,i,o){var a=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,d=0;if(!1===r(e,(function(r,s,h,p,f){if(void 0===l||i>u||p>c||f>d)return l=r,u=i,c=p,d=f,void(a=0);var g=t.lineString([l,r],e.properties);if(!1===n(g,i,o,f,a))return!1;a++,l=r})))return!1}}}))}function g(e,t,r){var n=r,i=!1;return f(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function v(e,r){if(!e)throw new Error("geojson is required");h(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===r(t.lineString(a[s],e.properties),n,i,s))return!1}}}))}function m(e,t,r){var n=r;return v(e,(function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)})),n}function b(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.segmentIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),t.lineString([u[s],u[s+1]],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),t.lineString([u[a][s],u[a][s+1]],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),t.lineString([u[o][s],u[o][s+1]],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s-1),t.lineString([u[o][a][s],u[o][a][s+1]],l,r)}throw new Error("geojson is invalid")}function _(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.coordIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return t.point(u,l,r);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,r);case"LineString":return s<0&&(s=u.length+s),t.point(u[s],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),t.point(u[a][s],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),t.point(u[o][s],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s),t.point(u[o][a][s],l,r)}throw new Error("geojson is invalid")}o(r,"coordEach"),o(n,"coordReduce"),o(i,"propEach"),o(a,"propReduce"),o(s,"featureEach"),o(l,"featureReduce"),o(u,"coordAll"),o(c,"geomEach"),o(d,"geomReduce"),o(h,"flattenEach"),o(p,"flattenReduce"),o(f,"segmentEach"),o(g,"segmentReduce"),o(v,"lineEach"),o(m,"lineReduce"),o(b,"findSegment"),o(_,"findPoint"),e.coordAll=u,e.coordEach=r,e.coordReduce=n,e.featureEach=s,e.featureReduce=l,e.findPoint=_,e.findSegment=b,e.flattenEach=h,e.flattenReduce=p,e.geomEach=c,e.geomReduce=d,e.lineEach=v,e.lineReduce=m,e.propEach=i,e.propReduce=a,e.segmentEach=f,e.segmentReduce=g})),qm=fe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=uf();function r(e){var r=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){r[0]>e[0]&&(r[0]=e[0]),r[1]>e[1]&&(r[1]=e[1]),r[2]<e[0]&&(r[2]=e[0]),r[3]<e[1]&&(r[3]=e[1])})),r}o(r,"bbox"),r.default=r,e.default=r})),Xm=fe(((e,t)=>{y();var r=Cm(),n=of(),i=uf(),a=qm().default,s=i.featureEach,l=(i.coordEach,n.polygon,n.featureCollection);function u(e){var t=new r(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),r.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})):s(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})),r.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),r.prototype.remove.call(this,e,t)},t.clear=function(){return r.prototype.clear.call(this)},t.search=function(e){var t=r.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return r.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=r.prototype.all.call(this);return l(e)},t.toJSON=function(){return r.prototype.toJSON.call(this)},t.fromJSON=function(e){return r.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=a(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=a(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}o(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),pv=fe(((e,t)=>{y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),vv=fe(((e,t)=>{y();var r="%[a-f0-9]{2}",n=new RegExp("("+r+")|([^%]+?)","gi"),i=new RegExp("("+r+")+","gi");function a(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function s(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=s(r[0]);n!==r[0]&&(t[r[0]]=n)}r=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var l=o[a];e=e.replace(new RegExp(l,"g"),t[l])}return e}o(a,"decodeComponents"),o(s,"decode"),o(l,"customDecodeURIComponent"),t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return l(e)}}})),bv=fe(((e,t)=>{y(),t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),_v=fe(((e,t)=>{y(),t.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var a=n[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),Pv=fe((e=>{y();var t=pv(),r=vv(),n=bv(),i=_v(),a=o((e=>null==e),"isNullOrUndefined"),s=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[",i,"]"].join("")]:[...r,[d(t,e),"[",d(i,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[]"].join("")]:[...r,[d(t,e),"[]=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[d(r,e),t,d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,d(t,e)]:[...r,[d(t,e),"=",d(n,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&h(r,e).includes(e.arrayFormatSeparator);r=o?h(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===r?r:h(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r&&h(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?r(e):e}function p(e){return Array.isArray(e)?e.sort():"object"==typeof e?p(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){let t="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}function v(e){let t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function b(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=u(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let o of e.split("&")){if(""===o)continue;let[e,a]=n(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else i[e]=m(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let r=i[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=p(r):e[t]=r,e}),Object.create(null))}o(l,"encoderForArrayFormat"),o(u,"parserForArrayFormat"),o(c,"validateArrayFormatSeparator"),o(d,"encode"),o(h,"decode"),o(p,"keysSorter"),o(f,"removeHash"),o(g,"getHash"),o(v,"extract"),o(m,"parseValue"),o(b,"parse"),e.extract=v,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=o((r=>t.skipNull&&a(e[r])||t.skipEmptyString&&""===e[r]),"shouldFilter"),n=l(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((r=>{let i=e[r];return void 0===i?"":null===i?d(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":i.reduce(n(r),[]).join("&"):d(r,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,i]=n(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);let n=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),a=Object.assign(o,t.query),l=e.stringify(a,r);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(r[s]?d(t.fragmentIdentifier,r):t.fragmentIdentifier)),"".concat(n).concat(l).concat(u)},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);let{url:o,query:a,fragmentIdentifier:l}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:i(a,r),fragmentIdentifier:l},n)},e.exclude=(t,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,i,n)}})),Lv=fe(((e,t)=>{var r,n;y(),r=e,n=function(){var e=o((function(){return e=Object.assign||o((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),e.apply(this,arguments)}),"__assign");function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}o(t,"__values"),o(r,"__read");var n,i="KEYS",a="VALUES",s="",l=function(){function e(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}return o(e,"TreeIterator"),e.prototype.next=function(){var e=this.dive();return this.backtrack(),e},e.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var e=u(this._path),t=e.node,r=e.keys;if(u(r)===s)return{done:!1,value:this.result()};var n=t.get(u(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=u(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},e.prototype.key=function(){return this.set._prefix+this._path.map((function(e){var t=e.keys;return u(t)})).filter((function(e){return e!==s})).join("")},e.prototype.value=function(){return u(this._path).node.get(s)},e.prototype.result=function(){switch(this._type){case a:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=o((function(e){return e[e.length-1]}),"last$1"),c=o((function(e,t,r){var n=new Map;if(void 0===t)return n;for(var i=t.length+1,o=i+r,a=new Uint8Array(o*i).fill(r+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,r,n,a,1,i,""),n}),"fuzzySearch"),d=o((function(e,r,n,i,o,a,l,u){var c,h,p=a*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===s){var y=o[p-1];y<=n&&i.set(u,[e.get(v),y])}else{for(var m=a,b=0;b<v.length;++b,++m){for(var _=v[b],w=l*m,M=w-l,x=o[w],E=Math.max(0,m-n-1),S=Math.min(l-1,m+n),I=E;I<S;++I){var k=_!==r[I],C=o[M+I]+ +k,O=o[M+I+1]+1,T=o[w+I]+1,A=o[w+I+1]=Math.min(C,O,T);A<x&&(x=A)}if(x>n)continue e}d(e.get(v),r,n,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(c)throw c.error}}}),"recurse"),h=function(){function e(e,t){void 0===e&&(e=new Map),void 0===t&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return o(e,"SearchableMap"),e.prototype.atPrefix=function(n){var i,o;if(!n.startsWith(this._prefix))throw new Error("Mismatched prefix");var a=r(p(this._tree,n.slice(this._prefix.length)),2),l=a[0],u=a[1];if(void 0===l){var c=r(b(u),2),d=c[0],h=c[1];try{for(var f=t(d.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==s&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,n)}}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}return new e(l,n)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,v(this._tree,e)},e.prototype.entries=function(){return new l(this,"ENTRIES")},e.prototype.forEach=function(e){var n,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=r(a.value,2);e(s[0],s[1],this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.fuzzyGet=function(e,t){return c(this._tree,e,t)},e.prototype.get=function(e){var t=f(this._tree,e);return void 0!==t?t.get(s):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(s)},e.prototype.keys=function(){return new l(this,i)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,g(this._tree,e).set(s,t),this},Object.defineProperty(e.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e);return r.set(s,t(r.get(s))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e),n=r.get(s);return void 0===n&&r.set(s,n=t()),n},e.prototype.values=function(){return new l(this,a)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(n){var i,o,a=new e;try{for(var s=t(n),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1];a.set(c,d)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),p=o((function(e,r,n){var i,o;if(void 0===n&&(n=[]),0===r.length||null==e)return[e,n];try{for(var a=t(e.keys()),l=a.next();!l.done;l=a.next()){var u=l.value;if(u!==s&&r.startsWith(u))return n.push([e,u]),p(e.get(u),r.slice(u.length),n)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n.push([e,r]),p(void 0,"",n)}),"trackDown"),f=o((function(e,r){var n,i;if(0===r.length||null==e)return e;try{for(var o=t(e.keys()),a=o.next();!a.done;a=o.next()){var l=a.value;if(l!==s&&r.startsWith(l))return f(e.get(l),r.slice(l.length))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"lookup"),g=o((function(e,r){var n,i,o=r.length;e:for(var a=0;e&&a<o;){try{for(var l=(n=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==s&&r[a]===c[0]){for(var d=Math.min(o-a,c.length),h=1;h<d&&r[a+h]===c[h];)++h;var p=e.get(c);if(h===c.length)e=p;else{var f=new Map;f.set(c.slice(h),p),e.set(r.slice(a,a+h),f),e.delete(c),e=f}a+=h;continue e}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var g=new Map;return e.set(r.slice(a),g),g}return e}),"createPath"),v=o((function(e,t){var n=r(p(e,t),2),i=n[0],o=n[1];if(void 0!==i)if(i.delete(s),0===i.size)y(o);else if(1===i.size){var a=r(i.entries().next().value,2),l=a[0],u=a[1];m(o,l,u)}}),"remove"),y=o((function(e){if(0!==e.length){var t=r(b(e),2),n=t[0],i=t[1];if(n.delete(i),0===n.size)y(e.slice(0,-1));else if(1===n.size){var o=r(n.entries().next().value,2),a=o[0],l=o[1];a!==s&&m(e.slice(0,-1),a,l)}}}),"cleanup"),m=o((function(e,t,n){if(0!==e.length){var i=r(b(e),2),o=i[0],a=i[1];o.set(a+t,n),o.delete(a)}}),"merge"),b=o((function(e){return e[e.length-1]}),"last"),_="or",w=function(){function n(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},I),t),{searchOptions:e(e({},k),t.searchOptions||{})}),this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return o(n,"MiniSearch"),n.prototype.add=function(e){var r,n,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,d=a.idField,h=s(e,d);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));var p=this.addDocumentId(h);this.saveStoredFields(p,e);try{for(var f=t(c),g=f.next();!g.done;g=f.next()){var v=g.value,y=s(e,v);if(null!=y){var m=l(y.toString(),v),b=this._fieldIds[v],_=new Set(m).size;this.addFieldLength(p,b,this._documentCount-1,_);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var x=u(M.value,v);x&&this.addTerm(b,p,x)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},n.prototype.addAll=function(e){var r,n;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.addAllAsync=function(e,t){var r=this;void 0===t&&(t={});var n=t.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,n){var o=e.chunk,a=e.promise;return o.push(t),(n+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return r.addAll(s)}))},n.prototype.remove=function(e){var n,i,o,a,s,l,u=this._options,c=u.tokenize,d=u.processTerm,h=u.extractField,p=u.fields,f=u.idField,g=h(e,f);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));try{for(var v=t(this._documentIds),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0];if(g===m[1]){try{for(var _=(o=void 0,t(p)),w=_.next();!w.done;w=_.next()){var M=w.value,x=h(e,M);if(null!=x){var E=c(x.toString(),M),S=this._fieldIds[M],I=new Set(E).size;this.removeFieldLength(b,S,this._documentCount,I);try{for(var k=(s=void 0,t(E)),C=k.next();!C.done;C=k.next()){var O=d(C.value,M);O&&this.removeTerm(S,b,O)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=k.return)&&l.call(k)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return this._storedFields.delete(b),this._documentIds.delete(b),this._fieldLength.delete(b),void(this._documentCount-=1)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},n.prototype.removeAll=function(e){var r,n;if(e)try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},n.prototype.search=function(e,n){var i,o;void 0===n&&(n={});var a=this.executeQuery(e,n),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=r(u.value,2),d=c[0],h=c[1],p=h.score,f=h.terms,g=h.match,v=f.length,y={id:this._documentIds.get(d),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(d)),(null==n.filter||n.filter(y))&&s.push(y)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s.sort(A),s},n.prototype.autoSuggest=function(n,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},C),i);var u=new Map;try{for(var c=t(this.search(n,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(b=u.get(f))?(b.score+=p,b.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var v=t(u),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0],_=m[1],w=(p=_.score,_.terms),M=_.count;g.push({suggestion:b,terms:w,score:p/M})}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}return g.sort(A),g},Object.defineProperty(n.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),n.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return n.loadJS(JSON.parse(e),t)},n.getDefault=function(e){if(I.hasOwnProperty(e))return M(I,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},n.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,d=e.nextId,p=e.documentIds,f=e.fieldIds,g=e.fieldLength,v=e.averageFieldLength,y=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var b=new n(i);b._documentCount=c,b._nextId=d,b._documentIds=F(p),b._fieldIds=f,b._fieldLength=F(g),b._avgFieldLength=v,b._storedFields=F(y),b._index=new h;try{for(var _=t(u),w=_.next();!w.done;w=_.next()){var M=r(w.value,2),x=M[0],E=M[1],S=new Map;try{for(var I=(s=void 0,t(Object.keys(E))),k=I.next();!k.done;k=I.next()){var C=k.value,O=E[C];1===m&&(O=O.ds),S.set(parseInt(C,10),F(O))}}catch(e){s={error:e}}finally{try{k&&!k.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}b._index.set(x,S)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return b},n.prototype.executeQuery=function(t,r){var n=this;if(void 0===r&&(r={}),"string"!=typeof t){var i=e(e(e({},r),t),{queries:void 0}),o=t.queries.map((function(e){return n.executeQuery(e,i)}));return this.combineResults(o,t.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,u=a.searchOptions,c=e(e({tokenize:s,processTerm:l},u),r),d=c.tokenize,h=c.processTerm,p=d(t).map((function(e){return h(e)})).filter((function(e){return!!e})).map(S(c)).map((function(e){return n.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},n.prototype.executeQuerySpec=function(n,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,r){var n;return e(e({},t),((n={})[r]=M(t,r)||1,n))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},k.weights),f),y=v.fuzzy,m=v.prefix,b=this._index.get(n.term),_=this.termResults(n.term,n.term,1,b,h,p);if(n.prefix&&(u=this._index.atPrefix(n.term)),n.fuzzy){var w=!0===n.fuzzy?.2:n.fuzzy,x=w<1?Math.min(g,Math.round(n.term.length*w)):w;x&&(c=this._index.fuzzyGet(n.term,x))}if(u)try{for(var E=t(u),S=E.next();!S.done;S=E.next()){var I=r(S.value,2),C=I[0],O=I[1];if(F=C.length-n.term.length){null==c||c.delete(C);var T=m*C.length/(C.length+.3*F);this.termResults(n.term,C,T,O,h,p,_)}}}catch(e){o={error:e}}finally{try{S&&!S.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){C=P.value;var F,N=r(c.get(C),2),j=N[0];(F=N[1])&&(T=y*C.length/(C.length+F),this.termResults(n.term,C,T,j,h,p,_))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return _},n.prototype.combineResults=function(e,t){if(void 0===t&&(t=_),0===e.length)return new Map;var r=t.toLowerCase();return e.reduce(x[r])||new Map},n.prototype.toJSON=function(){var e,n,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1],h={};try{for(var p=(i=void 0,t(d)),f=p.next();!f.done;f=p.next()){var g=r(f.value,2),v=g[0],y=g[1];h[v]=Object.fromEntries(y)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}a.push([c,h])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:a,serializationVersion:2}},n.prototype.termResults=function(e,r,n,i,o,a,s){var l,u,c,d,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var p=t(Object.keys(o)),f=p.next();!f.done;f=p.next()){var g=f.value,v=o[g],y=this._fieldIds[g],m=i.get(y);if(null!=m){var b=m.size,_=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),x=w.next();!x.done;x=w.next()){var S=x.value,I=a?a(this._documentIds.get(S),r):1;if(I){var k=m.get(S),C=this._fieldLength.get(S)[y],T=n*v*I*E(k,b,this._documentCount,C,_),A=s.get(S);if(A){A.score+=T,O(A.terms,e);var P=M(A.match,r);P?P.push(g):A.match[r]=[g]}else s.set(S,{score:T,terms:[e],match:(h={},h[r]=[g],h)})}}}catch(e){c={error:e}}finally{try{x&&!x.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}}}}catch(e){l={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}return s},n.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,P),i=n.get(e);if(null==i)(i=new Map).set(t,1),n.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},n.prototype.removeTerm=function(e,t,r){if(this._index.has(r)){var n=this._index.fetch(r,P),i=n.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,r):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(t,e,r)},n.prototype.warnDocumentChanged=function(e,r,n){var i,o;if(null!=console&&null!=console.warn)try{for(var a=t(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var l=s.value;if(this._fieldIds[l]===r)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(l,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},n.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},n.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},n.prototype.addFieldLength=function(e,t,r,n){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=n;var o=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=o/(r+1)},n.prototype.removeFieldLength=function(e,t,r,n){var i=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=i/(r-1)},n.prototype.saveStoredFields=function(e,r){var n,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var l=this._storedFields.get(e);null==l&&this._storedFields.set(e,l={});try{for(var u=t(a),c=u.next();!c.done;c=u.next()){var d=c.value,h=s(r,d);void 0!==h&&(l[d]=h)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},n}(),M=o((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),x=((n={}).or=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,r.get(s));else{var u=r.get(s),c=u.score,d=u.terms,h=u.match;l.score=l.score+c,l.match=Object.assign(l.match,h),T(l.terms,d)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n.and=function(e,r){var n,i,o=new Map;try{for(var a=t(r.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=r.get(l),d=c.score,h=c.terms,p=c.match;T(u.terms,h),o.set(l,{score:u.score+d,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},n.and_not=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n),E=o((function(e,t,r,n,i){return Math.log(1+(r-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*n/i)))}),"calcBM25Score"),S=o((function(e){return function(t,r,n){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix}}}),"termToQuerySpec"),I={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(N)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},k={combineWith:_,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},C={prefix:function(e,t,r){return t===r.length-1}},O=o((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),T=o((function(e,r){var n,i;try{for(var o=t(r),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),A=o((function(e,t){var r=e.score;return t.score-r}),"byScore"),P=o((function(){return new Map}),"createMap"),F=o((function(e){var r,n,i=new Map;try{for(var o=t(Object.keys(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),e[s])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}),"objectToNumericMap"),N=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;return w},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).MiniSearch=n()})),iT={};So(iT,{Mappedin:()=>Fn,MappedinDestinationSet:()=>xt,OfflineSearch:()=>mo,getVenue:()=>Nf,getVenueBundle:()=>Rf,initialize:()=>rT,setFetchFn:()=>Vv}),module.exports=We(iT),y(),y();var Bv=rn(Bf());y(),y(),y();var Uf=rn(Vf());y();var wu=class{constructor({origin:e,destination:t,vortex:r,elevationDelta:n=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,l;if(g(this,"origin"),g(this,"destination"),g(this,"vortex"),g(this,"distance"),g(this,"angle"),g(this,"weight"),this.origin=e,this.destination=t,this.vortex=r,this.distance=i,this.angle=o,r)this.distance=0,this.angle=0,s=void 0!==r.weight&&r.weight>0?r.weight:"elevator"===r.type?2e3:1e3,l=r.multiplier&&r.multiplier>=1?r.multiplier:1,this.weight=n*l+s;else{let e=a||t.weight;s=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+s}if(isNaN(this.angle))throw new Error("nan angle")}};o(wu,"Edge");var bu=wu,ar=bu;y();var qf="mi-debug",Qv={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)}},le=Qv;function ey(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error("map ".concat(e.name||e.shortName||e.id," does not have a georeference field"));if(e.georeference.length<3)throw new Error("map ".concat(e.name||e.shortName||e.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let t=e.georeference[0],r=e.georeference[2],n=(0,Uf.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:r.target.x,longitude:r.target.y}),i=t.control.x-r.control.x,o=t.control.y-r.control.y;return Math.sqrt(i*i+o*o)/n}catch(e){return le.error(e),1}}function Po(e,t){let r=e.x-t.x,n=e.y-t.y;return(Math.atan2(n,r)+2.5*Math.PI)%(2*Math.PI)}o(ey,"getMapScale"),o(Po,"getAngle");var Mu=class{constructor({nodes:e,vortexes:t,maps:r,showVortexNames:n=!1}){g(this,"edges"),g(this,"nodesById"),g(this,"mapsById"),this.edges={},this.mapsById=r.map((e=>({...e,_scale:ey(e)}))).reduce(((e,t)=>(e[t.id]=t,e)),{});let i=e.filter((e=>!!this.mapsById[e.map])).map((e=>({...e,paths:e.paths?e.paths.filter((({map:t})=>t===e.map)):[]})));this.nodesById=i.reduce(((e,t)=>(e[t.id]=t,e)),{});for(let e in this.nodesById)this.nodesById.hasOwnProperty(e)&&(this.nodesById[e].paths=this.nodesById[e].paths.filter((({node:e})=>!!this.nodesById[e])));let o=t.map((e=>({...e,name:n?e.name:e.type,nodes:e.nodes?e.nodes.filter((e=>!!this.nodesById[e])):[]})));i.forEach((e=>{this.edges[e.id]=e.paths.map((({node:t,weight:r})=>{let n=this.nodesById[t];return new ar({angle:Po(e,n),destination:n,distance:this.getDistance(e,n),origin:e,pathWeight:r})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let r=this.nodesById[e.nodes[t]];if(t++,null==r)continue;let n=t;for(;n<e.nodes.length;){let t=this.nodesById[e.nodes[n]];if(n++,null==t)continue;let i=this.mapsById[r.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[r.id].push(new ar({destination:t,elevationDelta:a,origin:r,vortex:e})),this.edges[t.id].push(new ar({destination:r,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:n,excludedVortexIds:i}){let o=e.map((e=>this.nodesById[e])).filter((e=>e)),a=t.map((e=>this.nodesById[e])).filter((e=>e));if(0===o.length||0===a.length)return[];let s=[],l={},u={};for(o.forEach((e=>{let t=this.getShortestEuclideanDistance(e,a);s.push({origin:e,priority:t}),l[e.id]=null,u[e.id]=0})),s.sort(((e,t)=>e.priority-t.priority));s.length>0;){let e=s[0];if(a.includes(e.origin)){let t=[],r=l[e.origin.id];for(;null!=r;){t.push(r);let e=l[r.origin.id];r=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let o=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,c=t.vortex&&(n&&!n.has(t.vortex.id)||i&&i.has(t.vortex.id));if(r&&o||c)continue;let d=u[e.origin.id]+t.weight;if(null==u[t.destination.id]||d<u[t.destination.id]){u[t.destination.id]=d;let e=d+this.getShortestEuclideanDistance(t.destination,a);s.push({origin:t.destination,priority:e}),l[t.destination.id]=t}}s.splice(0,1),s.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let r,n=e.x-t.x,i=e.y-t.y,o=n*n+i*i;return r=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/r}getShortestEuclideanDistance(e,t){return t.reduce(((t,r)=>{let n=this.getDistance(e,r);return Math.min(t,n)}),Number.MAX_VALUE)}};o(Mu,"NavigationGraph");var _u=Mu,ku=_u;function ty(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}y(),y(),o(ty,"vortexDirectionTest");var Eu=class{constructor({origin:e,action:t,distance:r,atLocation:n,instruction:i}){g(this,"node"),g(this,"instruction"),g(this,"action"),g(this,"atLocation"),g(this,"type"),g(this,"distance",0),this.node=e,this.action=t,this.distance=r||0,this.atLocation=n,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=n?"Depart from ".concat(n.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=n?"Arrive at ".concat(n.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(n&&n.name," ").concat(ty(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(n&&n.name," at ").concat(t.toMap.name):null!=t&&"bearing"in t&&"Right"===t.bearing?this.instruction="Turn right":null!=t&&"bearing"in t&&"SlightRight"===t.bearing?this.instruction="Turn slightly right":null!=t&&"bearing"in t&&"Straight"===t.bearing?this.instruction="Head straight":null!=t&&"bearing"in t&&"SlightLeft"===t.bearing?this.instruction="Turn slightly left":null!=t&&"bearing"in t&&"Left"===t.bearing&&(this.instruction="Turn left"),null!=t&&"Turn"===t.type&&n&&(this.instruction+=" at ".concat(n.name)))}};o(Eu,"Directive");var xu=Eu,Gn=xu;function Tu(e,t,r,n){if(!(e&&t&&r&&n))return null;let i=e.x,o=e.y,a=t.x,s=t.y,l=r.x,u=r.y,c=n.x,d=n.y;if(i===a&&o===s||l===c&&u===d)return null;let h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;let p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p<0||p>1||f<0||f>1?null:{x:i+p*(a-i),y:o+p*(s-o)}}function Gf(e,t,r){if(e.x===t.x)return[{x:e.x+r,y:e.y},{x:t.x+r,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+r},{x:t.x,y:t.y+r}];let n=-1/((t.y-e.y)/(t.x-e.x)),i=r*Math.sqrt(1/(1+n*n)),o=n*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Wf(e,t,r=[],n=0){let i=!0;return r.forEach((r=>{if(n>0){let o=Gf(e,t,-n),a=Gf(e,t,n);if(Tu(o[0],o[1],r[0],r[1])||Tu(a[0],a[1],r[0],r[1]))return void(i=!1)}else if(Tu(e,t,r[0],r[1]))return void(i=!1)})),i}y(),o(Tu,"getLineIntersection"),o(Gf,"getOffsetLine"),o(Wf,"hasLineOfSight");var Io=.1*Math.PI;function Ao(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}o(Ao,"differenceBetweenAngles");var Pu=class{constructor({locations:e,nodes:t,vortexes:r,maps:n,polygons:i,showVortexNames:o}){g(this,"graph"),g(this,"locationsByNodeId"),g(this,"geometryEdgesByMapId",new Map),this.graph=new ku({maps:n,nodes:t,showVortexNames:o,vortexes:r}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((r=>{e[r.node]=t})),t.polygons&&t.polygons.forEach((r=>{r.entrances&&r.entrances.forEach((r=>{e[r]=t}))})),e)),{}),i&&i.forEach((e=>{this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),e.vertexes.forEach(((t,r)=>{e.vertexes[r+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[r+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,r=10){let n=0,i=0,o=e;for(;Math.abs(n)<t&&i<r;){let e=this.graph.edges[o.destination.id],a=null,s=0;for(let t of e)if(t.distance>0)if(null!=a){let e=-Ao(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-Ao(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(n+=s,i+=a.distance,Math.abs(n)>=t||i>r))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:r,departFrom:n,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,simplify:s}){var l,u,c;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:o,excludedVortexIds:a});if(0===d.length)return{distance:0,instructions:[new Gn({distance:0,instruction:"No Valid Path Available"})],path:[]};let h=0,p=[],f=[];if(null!=s&&s.enabled){let e=null!=(l=null==s?void 0:s.bufferRadius)?l:1.8,t=[d[0]];for(let r=1;r<d.length;r++){if(d[r].origin.map!==d[r-1].origin.map){let n=null!=(u=this.geometryEdgesByMapId.get(d[r-1].origin.map))?u:[];f.push(...this.simplifySteps(t,n,e)),t=[d[r]]}t.push(d[r])}let r=d[d.length-1],n=null!=(c=this.geometryEdgesByMapId.get(r.origin.map))?c:[];f.push(...this.simplifySteps(t,n,e)),d=f}for(let e=0;e<d.length;e++)p.push(d[e].origin);p.push(d[d.length-1].destination);let g=[],v=null,y=null,m=0,b=0;for(let e=0;e<d.length;e++){let t=d[e],r=t.origin,o=t.destination;if(h+=t.distance,m+=(null==y?void 0:y.distance)||0,0===e&&g.push(new Gn({action:{type:"Departure"},atLocation:n,distance:0,origin:r})),null!=t.vortex){let e=this.graph.mapsById[r.map],n=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=n.elevation){let t=e.elevation-n.elevation;t>0?i="down":t<0&&(i="up")}g.push(new Gn({action:{direction:i,fromMap:e,toMap:n,type:"TakeVortex"},atLocation:t.vortex,distance:m,origin:r})),b+=m,m=0}else if(null!=v&&null!=y)if(null!=y.vortex){let e=this.graph.mapsById[v.map],t=this.graph.mapsById[y.destination.map];g.push(new Gn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:y.vortex,distance:m,origin:r})),b+=m,m=0}else{let e=this.graph.edges[r.id].filter((e=>e.destination!==v&&e.destination!==t.destination));if(e.length>0){let n=-Ao(y.angle,t.angle),i=e.reduce(((e,r)=>{let n=-Ao(t.angle,r.angle);return Math.min(e,Math.abs(n))}),Math.PI);if(Math.abs(n)>=Io||Math.abs(i)<=Io){let e;e=n<=-Math.PI/4?"Right":n<=-Io?"SlightRight":n<=Io?"Straight":n<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[r.id];if(t||(t=this.getClosestLocationInRay(y,.5*Math.PI,10)),null!=t){let n=new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:m,origin:r});n.type=e,g.push(n)}else g.push(new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:m,origin:r}));b+=m,m=0}}}e===d.length-1&&(g.push(new Gn({action:{type:"Arrival"},atLocation:i,distance:h-b<0?0:h-b,origin:t.destination})),b+=m,m=0),v=r,y=t}let _=[],w=null;for(let e=g.length-1;e>=0;e--){let t=g[e],{action:r}=t;r&&"TakeVortex"===r.type?(w=t.node,_.unshift(t)):r&&"Turn"===r.type&&null!=w?this.graph.getDistance(t.node,w)>5&&_.unshift(t):_.unshift(t)}return{distance:h,instructions:_,path:p}}simplifySteps(e,t,r){if(e.length<3)return e;let n=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Wf(e[i].origin,e[o].origin,t,r)){let t=o-1;n.push(new ar({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Po(e[i].origin,e[t].origin)})),i=t}return n.push(new ar({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Po(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),n}};o(Pu,"Navigator");var Su=Pu,Ou=Su;y(),y();var bn,bi,Iu,Co,Xf,Au=class{constructor(e){W(this,bi),W(this,Co),W(this,bn,void 0),X(this,bn,e)}directionsTo(e,t){let r=m(this,bn).analytics;return e instanceof xt?0===e.destinations.length?[]:(r.getDirections(this,e.destinations[e.destinations.length-1]),$e(this,Co,Xf).call(this,e,t)):(r.getDirections(this,e),$e(this,bi,Iu).call(this,e,t))}distanceTo(e,t){let r=$e(this,bi,Iu).call(this,e,t);return(null==r?void 0:r.distance)||0}};bn=new WeakMap,bi=new WeakSet,Iu=o((function(e,t){let r=yi(this),n=yi(e),i=m(this,bn).navigator.getDirections({originIds:r,destinationNodeIds:n,accessible:(null==t?void 0:t.accessible)||!1,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,simplify:null==t?void 0:t.simplify});return new or(m(this,bn),i)}),"#directionsToSingleDestination"),Co=new WeakSet,Xf=o((function(e,t){let r,n=[],i=yi(this);for(let o=0;o<e.destinations.length;o++){r=yi(e.destinations[o]);let a=m(this,bn).navigator.getDirections({originIds:i,destinationNodeIds:r,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,accessible:(null==t?void 0:t.accessible)||!1,simplify:null==t?void 0:t.simplify}),s=new or(m(this,bn),a);n.push(s),i=0===s.path.length?r:[s.path[s.path.length-1].id]}return n}),"#directionsToDestinationSet"),o(Au,"MappedinNavigatable");var an=Au;y(),y();var ms=rn(Uh()),Tc={production:"40ead723d18886045e302513245edb27",development:""},Fr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Sc=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};o(Sc,"AnalyticsCategorySelectedCall");var Bi=Sc,Oc=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};o(Oc,"AnalyticsLocationSelectedCall");var Vi=Oc,Pc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};o(Pc,"BlueDotDisableCall");var gl=Pc,Ic=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};o(Ic,"BlueDotEnableCall");var ml=Ic,Ac=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:off-call"),this.event_properties=e}};o(Ac,"BlueDotOffCall");var vl=Ac,Cc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:on-call"),this.event_properties=e}};o(Cc,"BlueDotOnCall");var yl=Cc,jc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:animate-call"),this.event_properties=e}};o(jc,"CameraAnimateCall");var bl=jc,Fc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};o(Fc,"CameraCancelAnimationCall");var wl=Fc,Lc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};o(Lc,"CameraFocusOnCall");var _l=Lc,Nc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};o(Nc,"CameraGetSafeAreaInsetsCall");var kl=Nc,Rc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};o(Rc,"CameraInteractionDisableCall");var Ml=Rc,Dc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};o(Dc,"CameraInteractionEnableCall");var xl=Dc,zc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:set-call"),this.event_properties=e}};o(zc,"CameraSetCall");var El=zc,Bc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};o(Bc,"CameraSetSafeAreaInsetsCall");var Tl=Bc,Vc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:translate-call"),this.event_properties=e}};o(Vc,"CameraTranslateCall");var Sl=Vc,qc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};o(qc,"FlatLabelsAddCall");var Ol=qc,Uc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};o(Uc,"FlatLabelsLabelAllLocationsCall");var Pl=Uc,Gc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};o(Gc,"FlatLabelsRemoveCall");var Il=Gc,Wc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};o(Wc,"FlatLabelsRemoveAllCall");var Al=Wc,Yc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};o(Yc,"FlatLabelsSetAppearanceCall");var Cl=Yc,Xc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};o(Xc,"FloatingLabelsAddCall");var jl=Xc,Hc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};o(Hc,"FloatingLabelsLabelAllLocationsCall");var Fl=Hc,$c=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};o($c,"FloatingLabelsRemoveCall");var Ll=$c,Kc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};o(Kc,"FloatingLabelsRemoveAllCall");var Nl=Kc,Jc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};o(Jc,"FloatingLabelsResetPriorityCall");var Rl=Jc,Zc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};o(Zc,"FloatingLabelsSetAppearanceCall");var Dl=Zc,Qc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};o(Qc,"FloatingLabelsSetPriorityCall");var zl=Qc,ed=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenue-call"),this.event_properties=e}};o(ed,"GlobalGetVenueCall");var qi=ed,td=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};o(td,"GlobalGetVenueMvfCall");var gs=td,nd=class{constructor(e){this.event_properties=e,g(this,"event_type","global:showVenue-call"),this.event_properties=e}};o(nd,"GlobalShowVenueCall");var Bl=nd,rd=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:clear-call"),this.event_properties=e}};o(rd,"JourneyClearCall");var Vl=rd,id=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:draw-call"),this.event_properties=e}};o(id,"JourneyDrawCall");var ql=id,ad=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:setStep-call"),this.event_properties=e}};o(ad,"JourneySetStepCall");var Ul=ad,od=class{constructor(e){this.event_properties=e,g(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};o(od,"MappedinGetCollectionItemByIdCall");var Gl=od,sd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};o(sd,"MappedinCoordinateAbsoluteDistanceToCall");var Wl=sd,ud=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};o(ud,"MappedinCoordinateNearestNodeCall");var Yl=ud,ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};o(ld,"MappedinLocationCloneCall");var Ui=ld,cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};o(cd,"MappedinLocationDirectionsToCall");var Gi=cd,dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};o(dd,"MappedinLocationDistanceToCall");var Wi=dd,pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};o(pd,"MappedinMapCreateCoordinateCall");var Xl=pd,fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};o(fd,"MappedinMapCreateCoordinateByXyCall");var Hl=fd,hd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};o(hd,"MappedinMapGetNorthCall");var $l=hd,gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};o(gd,"MappedinNodeDirectionsToCall");var Yi=gd,md=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};o(md,"MappedinNodeDistanceToCall");var Xi=md,vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};o(vd,"MappedinPolygonDirectionsToCall");var Hi=vd,yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};o(yd,"MappedinPolygonDistanceToCall");var $i=yd,bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};o(bd,"MappedinVenueMetadataRead");var Ki=bd,wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};o(wd,"MapViewAddInteractivePolygonCall");var Kl=wd,_d=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};o(_d,"MapViewAddInteractivePolygonsForAllLocationsCall");var Jl=_d,kd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};o(kd,"MapViewClearPolygonColorCall");var Zl=kd,Md=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};o(Md,"MapViewCreateCustomTooltipCall");var Ql=Md,xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};o(xd,"MapViewCreateMarkerCall");var ec=xd,Ed=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};o(Ed,"MapViewCreateTooltipCall");var tc=Ed,Td=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:destroy-call"),this.event_properties=e}};o(Td,"MapViewDestroyCall");var nc=Td,Sd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};o(Sd,"MapViewDisableImageFlippingForAllPolygonsCall");var rc=Sd,Od=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};o(Od,"MapViewDrawPathCall");var ic=Od,Pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};o(Pd,"MapViewEnableImageFlippingForAllLocationsCall");var ac=Pd,Id=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};o(Id,"MapViewEnableImageFlippingForPolygonCall");var oc=Id,Ad=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};o(Ad,"MapViewGetNearestNodeByScreenCoordinatesCall");var sc=Ad,Cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};o(Cd,"MapViewGetPolygonAtCoordinateCall");var uc=Cd,jd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};o(jd,"MapViewGetPrimaryLocationForPolygonCall");var lc=jd,Fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};o(Fd,"MapViewLabelAllLocationsCall");var cc=Fd,Ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};o(Ld,"MapViewRemoveAllInteractivePolygonsCall");var dc=Ld,Nd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};o(Nd,"MapViewRemoveAllMarkersCall");var pc=Nd,Rd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};o(Rd,"MapViewRemoveAllPathsCall");var fc=Rd,Dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};o(Dd,"MapViewRemoveAllTooltipsCall");var hc=Dd,zd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};o(zd,"MapViewRemoveInteractivePolygonCall");var gc=zd,Bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};o(Bd,"MapViewRemoveMarkerCall");var mc=Bd,Vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removePath-call"),this.event_properties=e}};o(Vd,"MapViewRemovePathCall");var vc=Vd,qd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};o(qd,"MapViewRemoveTooltipCall");var yc=qd,Ud=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};o(Ud,"MapViewSetBackgroundColorCall");var bc=Ud,Gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};o(Gd,"MapViewSetHoverColorCall");var wc=Gd,Wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setMap-call"),this.event_properties=e}};o(Wd,"MapViewSetMapCall");var _c=Wd,Yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};o(Yd,"MapViewSetPolygonColorCall");var kc=Yd,Xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setState-call"),this.event_properties=e}};o(Xd,"MapViewSetStateCall");var Mc=Xd,Hd=class{constructor(e){this.event_properties=e,g(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};o(Hd,"MetricsMapLoadEvent");var xc=Hd,$d=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};o($d,"OfflineSearchAddQueryCall");var Ji=$d,Kd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};o(Kd,"OfflineSearchConstructorCall");var Zi=Kd,Jd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};o(Jd,"OfflineSearchSearchCall");var Qi=Jd,Zd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};o(Zd,"OfflineSearchSuggestCall");var ea=Zd,hs=o((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),Qd=class{constructor(){g(this,"disabled",!1),g(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){var t,r;if(this.disabled=null!=(t=e.disabled)&&t,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),hs();let n=null;if(e.client&&"apiKey"in e.client?n=e.client.apiKey:"environment"in e&&(n=Tc[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(n)return this.amplitude=ms.createInstance(),this.amplitude.init(n,void 0,{...Fr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(r=e.client)?void 0:r.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return hs()}identify(e,t,r){if(!this.isInitializedAndEnabled())return hs();e&&(r={...r,user_id:e});let n=new ms.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))n.set(e,t);return this.amplitude.identify(n,r)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):hs()}analyticsCategorySelectedCall(e,t){return this.track(new Bi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Vi(e),t)}blueDotDisableCall(e,t){return this.track(new gl(e),t)}blueDotEnableCall(e,t){return this.track(new ml(e),t)}blueDotOffCall(e,t){return this.track(new vl(e),t)}blueDotOnCall(e,t){return this.track(new yl(e),t)}cameraAnimateCall(e,t){return this.track(new bl(e),t)}cameraCancelAnimationCall(e,t){return this.track(new wl(e),t)}cameraFocusOnCall(e,t){return this.track(new _l(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new kl(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Ml(e),t)}cameraInteractionEnableCall(e,t){return this.track(new xl(e),t)}cameraSetCall(e,t){return this.track(new El(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Tl(e),t)}cameraTranslateCall(e,t){return this.track(new Sl(e),t)}flatLabelsAddCall(e,t){return this.track(new Ol(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Pl(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Il(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Al(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Cl(e),t)}floatingLabelsAddCall(e,t){return this.track(new jl(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Fl(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Ll(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Nl(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Rl(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Dl(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new zl(e),t)}globalGetVenueCall(e,t){return this.track(new qi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new gs(e),t)}globalShowVenueCall(e,t){return this.track(new Bl(e),t)}journeyClearCall(e,t){return this.track(new Vl(e),t)}journeyDrawCall(e,t){return this.track(new ql(e),t)}journeySetStepCall(e,t){return this.track(new Ul(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Gl(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new Wl(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Yl(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Ui(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Gi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Wi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new Xl(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Hl(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new $l(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new Yi(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new Xi(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new Hi(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new $i(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new Ki(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Kl(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Jl(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new Zl(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new Ql(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new ec(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new tc(e),t)}mapViewDestroyCall(e,t){return this.track(new nc(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new rc(e),t)}mapViewDrawPathCall(e,t){return this.track(new ic(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new ac(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new oc(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new sc(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new uc(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new lc(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new cc(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new dc(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new pc(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new fc(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new hc(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new gc(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new mc(e),t)}mapViewRemovePathCall(e,t){return this.track(new vc(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new yc(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new bc(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new wc(e),t)}mapViewSetMapCall(e,t){return this.track(new _c(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new kc(e),t)}mapViewSetStateCall(e,t){return this.track(new Mc(e),t)}metricsMapLoadEvent(e,t){return this.track(new xc(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new Ji(e),t)}offlineSearchConstructorCall(e,t){return this.track(new Zi(e),t)}offlineSearchSearchCall(e,t){return this.track(new Qi(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ea(e),t)}};o(Qd,"Ampli");var Ec=Qd,ta=new Ec;y();var Pn,yr,Jt,Vr,un,Rs,am,Ds,om,fa,Mp,ha,xp,Zt,nm=rn(xg()),rm=rn(Qg()),im=rn(em()),tm="5.30.1",dx="https://api2.amplitude.com/2/httpapi",px="https://api2.amplitude.com/batch",fx="__unspecified__",_p={branch:"main",version:"0",source:"websdk"},bt=class e{constructor(){W(this,Rs),W(this,Ds),W(this,fa),W(this,ha),W(this,Jt,{}),W(this,Vr,!1),W(this,un,void 0),W(this,Zt,o((async e=>{gx(e.type)&&(window.removeEventListener("visibilitychange",m(this,Zt)),window.removeEventListener("pagehide",m(this,Zt)),window.removeEventListener("beforeunload",m(this,Zt)),window.removeEventListener("unload",m(this,Zt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==m(e,yr)&&X(e,yr,tm),typeof navigator<"u"&&null!=navigator.userAgent&&X(this,un,new im.UAParser(navigator.userAgent).getResult())}static setContext(t){X(e,Pn,t)}static setVersion(t){X(e,yr,t)}addPendingEvent(t){var r;if(null==m(e,Pn))return;let n=t.event_type;if(!$e(this,Ds,om).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=m(this,Jt)[n];(0,rm.default)(t.event_properties,null!=(r=null==i?void 0:i.event_properties)?r:{}),m(this,Jt)[n]=t}async sendAllPendingEvents(){if(null==m(e,Pn)||Object.keys(m(this,Jt)).length<1)return;if(m(this,Vr))return void le.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in m(this,Jt)){let r=m(this,Jt)[e],n=$e(this,fa,Mp).call(this,r);null!=n&&t.push(n)}if(!(t.length<1))try{X(this,Vr,!0),200===(await $e(this,ha,xp).call(this,px,t)).status&&X(this,Jt,{})}catch(e){le.warn("Error sending batch product analytics!",e)}finally{X(this,Vr,!1)}}async load(){if(!ta.isLoaded){let{promise:e}=ta.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",m(this,Zt)),window.addEventListener("beforeunload",m(this,Zt)),window.addEventListener("unload",m(this,Zt)),window.addEventListener("visibilitychange",m(this,Zt))}))}}async sendEventNow(t){if(null==m(e,Pn))return;let r=$e(this,fa,Mp).call(this,t);if(null!=r)try{await $e(this,ha,xp).call(this,dx,[r])}catch(e){le.warn("Error sending single product analytics event!",e)}}};Pn=new WeakMap,yr=new WeakMap,Jt=new WeakMap,Vr=new WeakMap,un=new WeakMap,Rs=new WeakSet,am=o((function(e){let t=e.event_type;return null!=m(this,Jt)[t]}),"#isEventTypePending"),Ds=new WeakSet,om=o((function(e){if(!$e(this,Rs,am).call(this,e))return!0;let t=e.event_type,r=m(this,Jt)[t];return!(0,nm.default)(r.event_properties,e.event_properties)}),"#didEventPropertiesChange"),fa=new WeakSet,Mp=o((function(e){var t,r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y;if(null!=m(bt,Pn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&le.warn("Error processing product analytics event! Unspecified venue slug",e),null==Fr.plan&&le.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(r=ta.client.getSessionId())?r:Bs(),device_id:null!=(n=ta.client.getDeviceId())?n:zs(),plan:{branch:null!=(o=null==(i=Fr.plan)?void 0:i.branch)?o:_p.branch,version:null!=(s=null==(a=Fr.plan)?void 0:a.version)?s:_p.version,source:null!=(u=null==(l=Fr.plan)?void 0:l.source)?u:_p.source},os_name:null==(c=m(this,un))?void 0:c.browser.name,os_version:null==(d=m(this,un))?void 0:d.browser.version,device_manufacturer:null==(h=m(this,un))?void 0:h.device.vendor,device_model:null==(p=m(this,un))?void 0:p.device.model,event_properties:{...e.event_properties,context:m(bt,Pn),sdk_version:m(bt,yr),browser_name:null==(f=m(this,un))?void 0:f.browser.name,browser_version:null==(g=m(this,un))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:fx},time:e.time}}),"#makeBatchFormattedEvent"),ha=new WeakSet,xp=o((async function(e,t){return await In()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Tc.production,events:t})})}),"#batchSend"),Zt=new WeakMap,o(bt,"ProductAnalytics"),W(bt,Pn,void 0),W(bt,yr,void 0);var kp=bt,hx=new kp,et=hx;function gx(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}o(gx,"areWeLeavingThePage");var Gt,qr,pt,va,ga=class e extends an{constructor(e,t){super(e),W(this,Gt,void 0),W(this,qr,void 0),W(this,pt,{}),g(this,"id",""),g(this,"x",0),g(this,"y",0),g(this,"operationHours"),g(this,"externalId"),W(this,va,void 0),X(this,Gt,e),X(this,qr,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,pt).map;if(typeof e<"u")return e;let t=m(this,Gt).getCollectionItemById("maps",m(this,qr).map);return m(this,pt).map=t,t}get lat(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lat;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lat}get lon(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lon;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lon}get paths(){let e=m(this,pt).paths;if(typeof e<"u")return e;let t=[],r=m(this,Gt)._nodesById,n=m(this,va);if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return m(this,pt).paths=t,t}set paths(e){X(this,va,e)}get locations(){var e,t,r;let n=m(this,pt).locations;if(typeof n<"u")return n;let i=[],o=null!=(r=null==(t=null==(e=gt.instances.get(m(this,Gt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],r=t.nodes;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)if(r[e].id===a){i.push(t);break}}return m(this,pt).locations=i,i}get polygon(){var e,t,r;let n=m(this,pt).polygon;if(typeof n<"u")return n;let i,o=null!=(r=null==(t=null==(e=gt.instances.get(m(this,Gt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e];t.entrances.map((e=>e.id)).includes(a)&&(i=t)}return m(this,pt).polygon=i,i}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.nodes.slice();t.options.things.maps&&tt(r,"map"),["weight","multiplier","accessible"].forEach((function(e){tt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await nt(t.options,"node",n)).map((r=>new e(t,r)))}catch(e){return le.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Gt).venue.slug,i=new Yi({with_destination_set:r||void 0,venue:n});return et.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Gt).venue.slug;return et.addPendingEvent(new Xi({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,qr)}};Gt=new WeakMap,qr=new WeakMap,pt=new WeakMap,va=new WeakMap,o(ga,"MappedinNode");var ma=ga;y();var ln,Ur,Wt,ba,ya=class e extends an{constructor(e,t){super(e),W(this,ln,void 0),W(this,Ur,void 0),W(this,Wt,{}),g(this,"geometry"),g(this,"perspectives"),g(this,"image"),g(this,"holes"),g(this,"textures"),g(this,"material"),g(this,"label"),g(this,"id",""),g(this,"layer"),g(this,"layerId"),g(this,"name"),g(this,"externalId"),g(this,"vertexes"),g(this,"center"),g(this,"canvasBounds"),g(this,"categoryRank"),W(this,ba,void 0),X(this,ln,e),X(this,Ur,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,Wt).map;if(typeof e<"u")return e;let t=m(this,ln).getCollectionItemById("maps",m(this,Ur).map);return m(this,Wt).map=t,t}get locations(){var e,t;let r=m(this,Wt).locations;if(typeof r<"u")return r;let n=[],i=null!=(t=null==(e=gt.instances.get(m(this,ln)))?void 0:e.locationsByMapId.get(this.map.id))?t:[],{id:o}=this;for(let e=0,t=i.length;e<t;++e){let t=i[e],r=t.polygons;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e)if(r[e].id===o){n.push(t);break}}return m(this,Wt).locations=n,n}get entrances(){let e=m(this,Wt).entrances;if(typeof e<"u")return e;let t=[],r=m(this,ba),n=m(this,ln)._nodesById;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Wt).entrances=t,t}return[]}set entrances(e){X(this,ba,e)}get rank(){let e=m(this,Wt).rank;if(typeof e<"u")return e;let{rankings:t}=m(this,ln);if(!t||!t.polygons)return null;let r=t.polygons.find((e=>e.polygonId===this.id));return r?(m(this,Wt).rank={score:r.score,node:r.entranceNodeId},{score:r.score,node:r.entranceNodeId}):(m(this,Wt).rank=null,null)}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.polygons.slice();t.options.things.maps&&tt(r,"map"),t.options.things.nodes&&tt(r,"entrances");let n={fields:r,venue:t.options.venue};try{return(await nt(t.options,"polygon",n)).map((r=>new e(t,r)))}catch(e){return le.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,ln).venue.slug,i=new Hi({with_destination_set:r||void 0,venue:n});return et.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,ln).venue.slug;return et.addPendingEvent(new $i({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,Ur)}};ln=new WeakMap,Ur=new WeakMap,Wt=new WeakMap,ba=new WeakMap,o(ya,"MappedinPolygon");var br=ya;y();var mx=0,vx="9999-12-31T00:00:00.000Z";function yx(e,t,r=new Date){if(!e.states)return;let n=r||new Date,i=e.states.find((e=>{let t=new Date(e.start||mx),r=new Date(e.end||vx);return t<n&&r>n}));return i?t.find((e=>e.value===i.type)):void 0}o(yx,"getCurrentLocationState");var Nt,Kn,Rt,wa,_a,ka,Gr=class e extends an{constructor(e,t){super(e),W(this,Nt,void 0),W(this,Kn,void 0),W(this,Rt,{}),g(this,"states"),g(this,"id",""),g(this,"name",""),g(this,"type",""),g(this,"description"),g(this,"sortOrder"),g(this,"logo"),g(this,"phone"),g(this,"social"),g(this,"color"),g(this,"shortName"),g(this,"detailsUrl"),g(this,"tags"),g(this,"toMap"),g(this,"externalId"),g(this,"showLabelWhenImagePresent"),g(this,"showSmartLabelWhenImagePresent"),g(this,"picture"),g(this,"operationHours"),g(this,"siblingGroups"),g(this,"gallery"),g(this,"amenity"),g(this,"filterFlags"),W(this,wa,void 0),W(this,_a,[]),W(this,ka,void 0),X(this,Nt,e),X(this,Kn,t);let r=Object.assign({},t);delete r.categories,Object.assign(this,r)}get polygons(){let e=m(this,Rt).polygons;if(typeof e<"u")return e;let t=[],r=m(this,wa),n=m(this,Nt)._polygonsById;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Rt).polygons=t,t}set polygons(e){X(this,wa,e)}get nodes(){let e=m(this,Rt).nodes;if(typeof e<"u")return e;let t=[],r=m(this,_a),n=m(this,Nt)._nodesById;if(r&&r.length)for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return m(this,Rt).nodes=t,t}set nodes(e){X(this,_a,e)}get parent(){let e=m(this,Rt).parent;if(typeof e<"u")return e;let t,r=m(this,Nt)._locationsById,n=m(this,ka);return void 0!==n&&(t=r[n]),m(this,Rt).parent=t,t}set parent(e){X(this,ka,e)}get categories(){let e=m(this,Rt).categories;if(typeof e<"u")return e;let t=[];return m(this,Kn).categories.forEach((e=>{let r=m(this,Nt).getCollectionItemById("categories",e);r&&t.push(r)})),m(this,Rt).categories=t,t}get state(){return yx(this,m(this,Nt).locationStates)}clone(){let t=m(this,Nt).venue.slug;return et.addPendingEvent(new Ui({venue:t})),new e(m(this,Nt),m(this,Kn))}get nodeOperationHours(){let e=m(this,Rt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=m(this,Kn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return m(this,Rt).nodeOperationHours=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.locations.slice();t.options.things.categories&&tt(r,"categories"),t.options.things.nodes&&tt(r,"nodes"),t.options.things.polygons&&tt(r,"polygons"),t.options.things.locationStates&&tt(r,"states");let n={fields:r,venue:t.options.venue};try{let r=await nt(t.options,"location",n);return t.options.includeHidden||(r=r.filter((e=>!e.hidden))),r.map((r=>new e(t,r)))}catch(e){return le.error("Fetch Locations:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Nt).venue.slug,i=new Gi({with_destination_set:r||void 0,venue:n});return et.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Nt).venue.slug;return et.addPendingEvent(new Wi({venue:r})),super.distanceTo(e,t)}toJSON(){let e=m(this,Kn);return delete e.color,e}};Nt=new WeakMap,Kn=new WeakMap,Rt=new WeakMap,wa=new WeakMap,_a=new WeakMap,ka=new WeakMap,o(Gr,"MappedinLocation");var An=Gr;y();var Wr,wr,xa,Ma=class e{constructor(e,t){W(this,Wr,void 0),W(this,wr,{}),W(this,xa,void 0),g(this,"name"),g(this,"externalId"),g(this,"parents"),g(this,"id"),g(this,"icon"),g(this,"iconFromDefaultList"),g(this,"sortOrder"),this.id=t.id,X(this,xa,t),X(this,Wr,e),Object.assign(this,t)}get locations(){var e;let t=m(this,wr).locations;if(typeof t<"u")return t;let r=[],{locations:n}=m(this,Wr),{id:i}=this;for(let t=0,o=n.length;t<o;++t){let o=n[t],a=o.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if((null==(e=a[t])?void 0:e.id)===i){r.push(o);break}}return m(this,wr).locations=r,r}get children(){var e;let t=m(this,wr).children;if(typeof t<"u")return t;let{categories:r}=m(this,Wr),{id:n}=this,i=[];for(let t=0;t<r.length;t++)n&&null!=(e=r[t].parents)&&e.includes(n)&&i.push(r[t]);return m(this,wr).children=i,i}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r={fields:t.options.things.categories,venue:t.options.venue};try{return(await nt(t.options,"category",r)).map((r=>new e(t,r)))}catch(e){return le.error("Fetch Categories:",e),[]}}toJSON(){return m(this,xa)}};Wr=new WeakMap,wr=new WeakMap,xa=new WeakMap,o(Ma,"MappedinCategory");var _r=Ma;y();var Ea,Cn,Tp=class{constructor(e,t){W(this,Ea,void 0),W(this,Cn,void 0),g(this,"distance",0),g(this,"path",[]),g(this,"instructions",[]),X(this,Cn,e),X(this,Ea,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,r,n,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(n=null==(r=m(this,Cn))?void 0:r._vortexesById)?void 0:n[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(a=null==(o=m(this,Cn))?void 0:o._nodesById)?void 0:a[e.node.id]:void 0};if("TakeVortex"===(null==(s=p.action)?void 0:s.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=m(this,Cn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(h=m(this,Cn)._mapsById)?void 0:h[null==(d=p.action)?void 0:d.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var r,n;let i=null==(n=null==(r=m(this,Cn))?void 0:r._nodesById)?void 0:n[t];return i&&e.push(i),e}),[])}toJSON(){return m(this,Ea)}};Ea=new WeakMap,Cn=new WeakMap,o(Tp,"MappedinDirections");var or=Tp;y();var Sp=class{constructor(e){g(this,"destinations",[]),this.destinations=e}};o(Sp,"MappedinDestinationSet");var xt=Sp;y();var Oa,Ta=class e{constructor(e){g(this,"id",""),W(this,Oa,void 0),g(this,"accessible"),g(this,"name"),g(this,"type"),g(this,"weight"),g(this,"multiplier"),g(this,"nodes"),g(this,"filterFlags"),X(this,Oa,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){tt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await nt(t.options,"vortex",n)).map((t=>new e(t)))}catch(e){return le.error("Fetch Vortexes:",e),[]}}toJSON(){return m(this,Oa)}};Oa=new WeakMap,o(Ta,"MappedinVortex");var Sa=Ta;y();var Ia,Aa,Ca,Yr,Pa=class e{constructor(e,t){W(this,Ia,void 0),W(this,Aa,void 0),W(this,Ca,void 0),W(this,Yr,{}),g(this,"defaultMap",""),g(this,"address",""),g(this,"city",""),g(this,"countrycode",""),g(this,"externalId",""),g(this,"id",""),g(this,"latitude"),g(this,"logo"),g(this,"longitude"),g(this,"name",""),g(this,"operationHours"),g(this,"postal",""),g(this,"slug",""),g(this,"state",""),g(this,"telephone",""),g(this,"tzid",""),g(this,"tzidOverride",""),g(this,"utcOffset",""),g(this,"website",""),g(this,"secureContentStorage",!1),g(this,"defaultLanguage"),g(this,"languages",[]),g(this,"topLocations",[]),X(this,Aa,e),X(this,Ia,t),Object.assign(this,t)}get metadata(){return et.addPendingEvent(new Ki({venue:this.slug})),m(this,Ca)}set metadata(e){X(this,Ca,e)}static hydrate(t,r){return new e(r,t)}static async fetch(t){let r={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let n=await nt(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return le.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==m(this,Yr).isMultiBuilding){let e=m(this,Aa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),r=e.length!==t.size;m(this,Yr).isMultiBuilding=r}return m(this,Yr).isMultiBuilding}toJSON(){return m(this,Ia)}};Ia=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,Yr=new WeakMap,o(Pa,"MappedinVenue");var Xr=Pa;y();var Fa,ja=class e{constructor(e){g(this,"id",""),W(this,Fa,void 0),X(this,Fa,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await nt(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return le.error("Fetch Theme:",e),[]}}toJSON(){return m(this,Fa)}};Fa=new WeakMap,o(ja,"MappedinTheme");var Vs=ja;y();var Ra,La=class e{constructor(e){W(this,Ra,void 0),g(this,"polygons",[]),X(this,Ra,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let r=await Hr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(r)}catch(e){return le.error("Fetch Rankings:",e),null}}toJSON(){return m(this,Ra)}};Ra=new WeakMap,o(La,"MappedinRankings");var Na=La;y(),y();var Ba,$r,Va,Da=class e{constructor(e,t){W(this,Ba,void 0),W(this,$r,void 0),W(this,Va,{}),g(this,"id",""),g(this,"type",""),g(this,"name",""),g(this,"description"),g(this,"image"),g(this,"startDate"),g(this,"endDate"),g(this,"showDate"),X(this,$r,t),X(this,Ba,e),Object.assign(this,t)}location(){let e=m(this,Va).location;if(typeof e<"u")return e;let t,r=m(this,Ba)._locationsById,n=m(this,$r).location;if(null!=n){let e=r[n];null!=e&&(t=e)}return m(this,Va).location=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.events.slice();t.options.things.locations&&tt(r,"location");let n={fields:r,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await nt(t.options,"event",n)).map((r=>new e(t,r)))}catch(e){return le.error("Fetch Events:",e),[]}}toJSON(){return m(this,$r)}};Ba=new WeakMap,$r=new WeakMap,Va=new WeakMap,o(Da,"MappedinEvent");var za=Da;y();var Ga,qa=class e{constructor(e){W(this,Ga,void 0),g(this,"id",""),g(this,"name",""),g(this,"value",""),X(this,Ga,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await nt(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return le.error("Fetch Location States:",e),[]}}toJSON(){return m(this,Ga)}};Ga=new WeakMap,o(qa,"MappedinLocationState");var Ua=qa;y(),y(),y();var sm=" ",wt=class e{static get separator(){return sm}static set separator(e){sm=e}static parse(e){if(!isNaN(parseFloat(e))&&isFinite(e))return Number(e);let t=String(e).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==t[t.length-1]&&t.splice(t.length-1),""==t)return NaN;let r=null;switch(t.length){case 3:r=t[0]/1+t[1]/60+t[2]/3600;break;case 2:r=t[0]/1+t[1]/60;break;case 1:r=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(r=-r),Number(r)}static toDms(t,r="d",n){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===n)switch(r){case"d":case"deg":n=4;break;case"dm":case"deg+min":n=2;break;case"dms":case"deg+min+sec":n=0;break;default:r="d",n=4}t=Math.abs(t);let i=null,o=null,a=null,s=null;switch(r){default:case"d":case"deg":o=t.toFixed(n),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),a=(60*t%60).toFixed(n),60==a&&(a=(0).toFixed(n),o++),o=("000"+o).slice(-3),a<10&&(a="0"+a),i=o+"°"+e.separator+a+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),a=Math.floor(3600*t/60)%60,s=(3600*t%60).toFixed(n),60==s&&(s=(0).toFixed(n),a++),60==a&&(a=0,o++),o=("000"+o).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),i=o+"°"+e.separator+a+"′"+e.separator+s+"″"}return i}static toLat(t,r,n){let i=e.toDms(e.wrap90(t),r,n);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,r,n){let i=e.toDms(e.wrap180(t),r,n);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,r,n){let i=e.toDms(e.wrap360(t),r,n);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(t,r=3){if(![1,2,3].includes(Number(r)))throw new RangeError("invalid precision ‘".concat(r,"’"));t=e.wrap360(t);let n=4*2**(r-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*n/360)%n*16/n]}static wrap360(e){return 0<=e&&e<360?e:(e%360+360)%360}static wrap180(e){return-180<e&&e<=180?e:(e+540)%360-180}static wrap90(e){return-90<=e&&e<=90?e:Math.abs((e%360+270)%360-180)-90}};o(wt,"Dms");var Op=wt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Ne=Op,Ze=Math.PI,Ae=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=Ne.wrap90(Number(e)),this._lon=Ne.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Ne.wrap90(Ne.parse(e)):Ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?Ne.wrap90(Ne.parse(e)):Ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?Ne.wrap180(Ne.parse(e)):Ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?Ne.wrap180(Ne.parse(e)):Ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?Ne.wrap180(Ne.parse(e)):Ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let r,n;if(2==t.length&&([r,n]=t,r=Ne.wrap90(Ne.parse(r)),n=Ne.wrap180(Ne.parse(n)),isNaN(r)||isNaN(n)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([r,n]=t[0].split(","),r=Ne.wrap90(Ne.parse(r)),n=Ne.wrap180(Ne.parse(n)),isNaN(r)||isNaN(n)))throw new TypeError("invalid point ‘".concat(t[0],"’"));if(1==t.length&&"object"==typeof t[0]){let e=t[0];if("Point"==e.type&&Array.isArray(e.coordinates)?[n,r]=e.coordinates:(null!=e.latitude&&(r=e.latitude),null!=e.lat&&(r=e.lat),null!=e.longitude&&(n=e.longitude),null!=e.lng&&(n=e.lng),null!=e.lon&&(n=e.lon),r=Ne.wrap90(Ne.parse(r)),n=Ne.wrap180(Ne.parse(n))),isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(r,n)}distanceTo(t,r=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(r))throw new TypeError("invalid radius ‘".concat(r,"’"));let n=r,i=this.lat.toRadians(),o=this.lon.toRadians(),a=t.lat.toRadians(),s=a-i,l=t.lon.toRadians()-o,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(i)*Math.cos(a)*Math.sin(l/2)*Math.sin(l/2);return n*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))}initialBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(r)*Math.sin(n)-Math.sin(r)*Math.cos(n)*Math.cos(i),a=Math.sin(i)*Math.cos(n),s=Math.atan2(a,o).toDegrees();return Ne.wrap360(s)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let r=t.initialBearingTo(this)+180;return Ne.wrap360(r)}midpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),a=Math.cos(r),s=0,l=Math.sin(r),u={x:a+Math.cos(i)*Math.cos(o),y:s+Math.cos(i)*Math.sin(o),z:l+Math.sin(i)},c=Math.atan2(u.z,Math.sqrt(u.x*u.x+u.y*u.y)),d=n+Math.atan2(u.y,u.x),h=c.toDegrees(),p=d.toDegrees();return new e(h,p)}intermediatePointTo(t,r){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let n=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),a=t.lon.toRadians(),s=o-n,l=a-i,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),d=Math.sin((1-r)*c)/Math.sin(c),h=Math.sin(r*c)/Math.sin(c),p=d*Math.cos(n)*Math.cos(i)+h*Math.cos(o)*Math.cos(a),f=d*Math.cos(n)*Math.sin(i)+h*Math.cos(o)*Math.sin(a),g=d*Math.sin(n)+h*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),b=y.toDegrees();return new e(m,b)}destinationPoint(t,r,n=6371e3){let i=t/n,o=Number(r).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),l=Math.sin(a)*Math.cos(i)+Math.cos(a)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(a),d=Math.cos(i)-Math.sin(a)*l,h=s+Math.atan2(c,d),p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}static intersection(t,r,n,i){if(t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n)),isNaN(r))throw new TypeError("invalid brng1 ‘".concat(r,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),a=t.lon.toRadians(),s=n.lat.toRadians(),l=n.lon.toRadians(),u=Number(r).toRadians(),c=Number(i).toRadians(),d=s-o,h=l-a,p=2*Math.asin(Math.sqrt(Math.sin(d/2)*Math.sin(d/2)+Math.cos(o)*Math.cos(s)*Math.sin(h/2)*Math.sin(h/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(s)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(s)*Math.cos(p))/(Math.sin(p)*Math.cos(s)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(g,-1),1)),m=u-(Math.sin(l-a)>0?v:2*Ze-v),b=(Math.sin(l-a)>0?2*Ze-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let _=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),w=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*_),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(u),-1),1)),x=a+Math.atan2(Math.sin(u)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(M)),E=M.toDegrees(),S=x.toDegrees();return new e(E,S)}crossTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(a-s));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(s-a))*i}maxLatitude(e){let t=Number(e).toRadians(),r=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(r))).toDegrees()}static crossingParallels(e,t,r){if(e.equals(t))return null;let n=Number(r).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=t.lat.toRadians(),s=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.sin(s),u=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(n),c=Math.cos(i)*Math.cos(a)*Math.sin(n)*Math.sin(s);if(c*c>l*l+u*u)return null;let d=Math.atan2(-u,l),h=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+d+h,f=(o+d-h).toDegrees(),g=p.toDegrees();return{lon1:Ne.wrap180(f),lon2:Ne.wrap180(g)}}rhumbDistanceTo(t,r=6371e3){t instanceof e||(t=e.parse(t));let n=r,i=this.lat.toRadians(),o=t.lat.toRadians(),a=o-i,s=Math.abs(t.lon-this.lon).toRadians();Math.abs(s)>Ze&&(s=s>0?-(2*Ze-s):2*Ze+s);let l=Math.log(Math.tan(o/2+Ze/4)/Math.tan(i/2+Ze/4)),u=Math.abs(l)>1e-11?a/l:Math.cos(i);return Math.sqrt(a*a+u*u*s*s)*n}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>Ze&&(i=i>0?-(2*Ze-i):2*Ze+i);let o=Math.log(Math.tan(n/2+Ze/4)/Math.tan(r/2+Ze/4)),a=Math.atan2(i,o).toDegrees();return Ne.wrap360(a)}rhumbDestinationPoint(t,r,n=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(r).toRadians(),s=t/n,l=s*Math.cos(a),u=i+l;Math.abs(u)>Ze/2&&(u=u>0?Ze-u:-Ze-u);let c=Math.log(Math.tan(u/2+Ze/4)/Math.tan(i/2+Ze/4)),d=Math.abs(c)>1e-11?l/c:Math.cos(i),h=o+s*Math.sin(a)/d,p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-n)>Ze&&(n+=2*Ze);let a=(r+i)/2,s=Math.tan(Ze/4+r/2),l=Math.tan(Ze/4+i/2),u=Math.tan(Ze/4+a/2),c=((o-n)*Math.log(u)+n*Math.log(l)-o*Math.log(s))/Math.log(l/s);isFinite(c)||(c=(n+o)/2);let d=a.toDegrees(),h=c.toDegrees();return new e(d,h)}static areaOf(e,t=6371e3){let r=t,n=e[0].equals(e[e.length-1]);n||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let r=e[t].lat.toRadians(),n=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(r/2)+Math.tan(n/2)),1+Math.tan(r/2)*Math.tan(n/2))}s(e)&&(o=Math.abs(o)-2*Ze);let a=Math.abs(o*r*r);return n||e.pop(),a;function s(e){let t=0,r=e[0].initialBearingTo(e[1]);for(let n=0;n<e.length-1;n++){let i=e[n].initialBearingTo(e[n+1]),o=e[n].finalBearingTo(e[n+1]);t+=(i-r+540)%360-180,t+=(o-i+540)%360-180,r=o}return t+=(e[0].initialBearingTo(e[1])-r+540)%360-180,Math.abs(t)<90}}equals(t){return t instanceof e||(t=e.parse(t)),!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(e="d",t){if(!["d","dm","dms","n"].includes(e))throw new RangeError("invalid format ‘".concat(e,"’"));if("n"==e)return null==t&&(t=4),"".concat(this.lat.toFixed(t),",").concat(this.lon.toFixed(t));let r=Ne.toLat(this.lat,e,t),n=Ne.toLon(this.lon,e,t);return"".concat(r,", ").concat(n)}};o(Ae,"LatLonSpherical");var cn,Jn,Xa,it=Ae,Wa=class e{constructor(e,t){W(this,cn,void 0),W(this,Jn,{}),W(this,Xa,void 0),g(this,"id",""),g(this,"group",""),g(this,"name",""),g(this,"shortName",""),g(this,"elevation",0),g(this,"subtitle"),g(this,"scale",0),g(this,"layers"),g(this,"x_scale"),g(this,"perspectiveId"),g(this,"scene"),g(this,"width",0),g(this,"height",0),g(this,"georeference",[]),g(this,"_scale",0),X(this,cn,e),X(this,Xa,t),Object.assign(this,t),this._scale=um(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,r;return null!=(r=null==(t=null==(e=gt.instances.get(m(this,cn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?r:[]}get locations(){var e,t,r;return null!=(r=null==(t=null==(e=gt.instances.get(m(this,cn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?r:[]}get nodes(){var e,t,r;return null!=(r=null==(t=null==(e=gt.instances.get(m(this,cn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?r:[]}get mapGroup(){let e=m(this,Jn).mapGroup;if(typeof e<"u")return e;let t=this.group,r=t&&m(this,cn)._mapGroupsById[t]||null;return m(this,Jn).mapGroup=r,r}createCoordinateByXY(e,t){return new kr({x:e,y:t,map:this,mappedin:m(this,cn)})}createCoordinate(e,t){return new kr({lat:e,lon:t,map:this,mappedin:m(this,cn)})}getNorth(){let e;try{let t=this.georeference[0],r=this.georeference[2],n=new it(t.target.x,t.target.y),i=new it(r.target.x,r.target.y);e=-((n.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(r.control.y-t.control.y,r.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,le.warn(t),le.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){var r;let n=t.options.things.maps.slice();t.options.perspective&&tt(n,"perspectives"),t.options.things.mapGroups&&tt(n,"group"),tt(n,"elevation"),tt(n,"x_scale"),tt(n,"scale"),tt(n,"georeference");let i={fields:n,perspective:t.options.perspective,venue:t.options.venue};try{let s=await nt(t.options,"map",i),l=o((e=>{let t=a.layers.find((t=>t.id===e));t?t.visible=!0:a.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,o=s.length;i<o;++i){var a=s[i];if(a){let e=a.perspective;null!=e&&(a.perspectiveId=e.id,n.indexOf("scene")>-1&&(a.scene=e.scene),e.layers?(a.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):a.layers.forEach((e=>{e.visible=!0}))),delete a.perspective}if(t.options.preloadMapGeometry&&null!=(r=a.scene)&&r.polygons&&"string"==typeof a.scene.polygons){let e=await In()(a.scene.polygons);a.scene.polygons=await e.json()}s[i]=new e(t,a)}return s}catch(e){return le.error("Fetch Maps:",e),[]}}get center(){if(m(this,Jn).center)return m(this,Jn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[r,n]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:a,lon:s}=this.createCoordinateByXY(r,n),l=new it(i,o),u=new it(a,s),c=l.midPointTo(u);return m(this,Jn).center=c,c}toJSON(){return m(this,Xa)}};cn=new WeakMap,Jn=new WeakMap,Xa=new WeakMap,o(Wa,"MappedinMap");var Ya=Wa;y();var Ha,Pp,$a,Ip,Ka,Ja,qs,lm,Us,cm,dn,pn,fn,hn,Ap=class{constructor(e){W(this,Ha),W(this,$a),W(this,qs),W(this,Us),g(this,"map"),W(this,Ka,{}),W(this,Ja,void 0),W(this,dn,void 0),W(this,pn,void 0),W(this,fn,void 0),W(this,hn,void 0);let{map:t,mappedin:r}=e;null!=e.lat&&null!=e.lon&&(X(this,dn,e.lat),X(this,pn,e.lon)),null!=e.x&&null!=e.y&&(X(this,fn,e.x),X(this,hn,e.y)),this.map=t,X(this,Ja,r)}get x(){return $e(this,$a,Ip).call(this,"x")}get y(){return $e(this,$a,Ip).call(this,"y")}get lat(){return $e(this,Ha,Pp).call(this,"lat")}get lon(){return $e(this,Ha,Pp).call(this,"lon")}absoluteDistanceTo(e){return dm([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=m(this,Ka).nearestNode;if(typeof e<"u")return e;let t=gt.instances.get(m(this,Ja)).findNearestNodeOnMap(this.map.id,this);return m(this,Ka).nearestNode=t,t}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Ha=new WeakSet,Pp=o((function(e){if(typeof m(this,dn)<"u"&&typeof m(this,pn)<"u")return m(this,"lat"===e?dn:pn);if(typeof m(this,fn)<"u"&&typeof m(this,hn)<"u"){let[t,r]=$e(this,Us,cm).call(this,m(this,fn),m(this,hn));return X(this,dn,t),X(this,pn,r),m(this,"lat"===e?dn:pn)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),$a=new WeakSet,Ip=o((function(e){if(m(this,fn)&&m(this,hn))return m(this,"x"===e?fn:hn);if(null!=m(this,dn)&&null!=m(this,pn)){let[t,r]=$e(this,qs,lm).call(this,m(this,dn),m(this,pn));return X(this,fn,t),X(this,hn,r),m(this,"x"===e?fn:hn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Ka=new WeakMap,Ja=new WeakMap,qs=new WeakSet,lm=o((function(e,t){let r=this.map.georeference[0],n=new it(r.target.x,r.target.y),i=new it(e,t),o=n.distanceTo(i),a=(n.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),l=a+this.map.getNorth(),u=Math.sin(l)*s,c=Math.cos(l)*s;return[r.control.x+u,r.control.y-c]}),"#latLonToXY"),Us=new WeakSet,cm=o((function(e,t){let r,n=this.map.georeference[0],i=new it(n.target.x,n.target.y),o=e-n.control.x,a=n.control.y-t,s=Math.atan2(o,a);r=0===o&&0===a?0:0===o?a:o/Math.sin(s);let l=s-this.map.getNorth(),u=r/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),dn=new WeakMap,pn=new WeakMap,fn=new WeakMap,hn=new WeakMap,o(Ap,"MappedinCoordinate");var kr=Ap;y();var eo,Kr,to,Za=class e{constructor(e,t){W(this,eo,void 0),W(this,Kr,void 0),W(this,to,{}),g(this,"id",""),g(this,"name",""),X(this,Kr,t),X(this,eo,e),Object.assign(this,t)}get maps(){let e=m(this,to).maps;if(typeof e<"u")return e;let t=[],{maps:r}=m(this,eo),{id:n}=m(this,Kr);for(let e=0,i=r.length;e<i;++e){let i=r[e];i.group===n&&t.push(i)}return m(this,to).maps=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await nt(t.options,"map-group",r)).map((r=>new e(t,r)))}catch(e){return le.error("Fetch Map Groups:",e),[]}}toJSON(){return m(this,Kr)}};eo=new WeakMap,Kr=new WeakMap,to=new WeakMap,o(Za,"MappedinMapGroup");var Qa=Za;y();var mm=rn(pm());y(),y();var Mr,Qt,en,Cp=[0,4,6,8,10],jn=o((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let r=0;r<e.length;r++)r>0&&!(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;let r=e.map((e=>e.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],Cp.map(((e,t)=>r.slice(e,t===Cp.length-1?void 0:Cp[t+1]).join(""))).join("-")}),"randomId"),fm="mi-session-data",hm="mi-local-data",no=class e{constructor(){W(this,Qt,void 0),W(this,en,void 0);try{let e=sessionStorage.getItem(fm);X(this,Qt,e?JSON.parse(e):{id:jn()})}catch{X(this,Qt,{id:jn()})}try{let e=localStorage.getItem(hm);X(this,en,e?JSON.parse(e):{deviceId:jn()})}catch{X(this,en,{deviceId:jn()})}m(this,Qt).id||(m(this,Qt).id=jn()),m(this,en).deviceId||(m(this,en).deviceId=jn())}static getInstance(){return m(this,Mr)||X(this,Mr,new e),m(this,Mr)}static ___clearInstance(){X(this,Mr,void 0)}saveSessionData(e,t){m(this,Qt)[e]=t;try{return sessionStorage.setItem(fm,JSON.stringify(m(this,Qt))),!0}catch{return!1}}loadSessionData(e){let t=m(this,Qt)[e];if(null!=t)return t}saveLocalData(e,t){m(this,en)[e]=t;try{return localStorage.setItem(hm,JSON.stringify(m(this,en))),!0}catch{return!1}}loadLocalData(e){let t=m(this,en)[e];if(null!=t)return t}};Mr=new WeakMap,Qt=new WeakMap,en=new WeakMap,o(no,"SafeStorage"),W(no,Mr,void 0);var ro=no;y();var jp={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Ws(e){return/^[\da-f]{24}$/i.test(e)}function gm(e,t=!1){let r="";if(null!=e){let n="?",i=t?Object.keys(e).filter((e=>!["slug","venue"].includes(e))):Object.keys(e);for(let t=0,o=i.length;t<o;++t){let o=i[t],a=e[o];null!=a&&(r+="".concat(n+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),n="&")}}return r}function bx(e,t,r,n=!1){var i,o;return n?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(r.venue||r.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(r.venue||r.slug).concat(gm(r,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+gm(r)}async function nt(e,t,r,n=!1){return Hr(e,t,r,n,!0)}async function Hr(e,t,r,n=!1,i=!1){let o=bx(e,t,r,n),a=await Fp(e,o,n);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function wx(e,t,r=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};r&&delete n.language,n.language&&(t+="&lang=".concat(encodeURIComponent(n.language)));let{headers:i}=e;i["Content-Type"]=i["Content-Type"]||"text/json",e.accessToken?i.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(i["x-mappedin-key"]=btoa(e.clientId),i["x-mappedin-secret"]=btoa(e.clientSecret)),n.language&&(i["Accept-Language"]=n.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Fp(e,t,r=!1){let n=wx(e,t,r),i=await In()(n.url,n.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function tt(e,t){e.indexOf(t)<0&&e.push(t)}function dm([e,t],[r,n]){let i=new it(e,t),o=new it(r,n);return i.distanceTo(o)}function um(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let r=e.georeference[0],n=e.georeference[2],i=new it(r.target.x,r.target.y),o=new it(n.target.x,n.target.y),a=i.distanceTo(o),s=r.control.x-n.control.x,l=r.control.y-n.control.y;t=Math.sqrt(s*s+l*l)/a}catch(r){t=1,le.warn(r),le.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function yi(e){var t;return e instanceof br?e.entrances.map((e=>e.id)):e instanceof An?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function vm(e){let t={},{maps:r,images:n,scenes:i,polygons:o}=e;if(null!=n)try{let e=Object.keys(n).map((e=>fetch("data:image/png;base64,".concat(n[e])).then((e=>e.blob())).then((r=>{t[e]=r})).catch((e=>{le.error(e)}))));await Promise.all(e)}catch(e){le.error(e)}return r.forEach((e=>{var r;(null!=(r=e.scene)&&r.polygons||i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=n&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var r,n;if(null!=(r=null==e?void 0:e.image)&&r.url&&null!=(n=null==e?void 0:e.image)&&n.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}}))))})),null!=n&&o.forEach((e=>{var r;if(null!=(r=null==e?void 0:e.image)&&r.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function Jr(e,t,r){let n;return function(...i){let a=this,s=o((function(){n=null,r||e.apply(a,i)}),"later"),l=r&&!n;clearTimeout(n),n=setTimeout(s,t),l&&e.apply(a,i)}}function ym(e,t,r,n=0){if(!e||e<=0)return 0;let i=0;n>=0&&n<=1&&(i=n/10);let o=1e-5,a=1+(r-e)/(r-t)+i;return Math.max(1+o,Math.min(2-o,a))}function zs(){return ro.getInstance().loadLocalData("deviceId")}function Bs(){return ro.getInstance().loadSessionData("id")}o(Ws,"isGatewayKey"),o(gm,"stringifyQuery"),o(bx,"buildUrl"),o(nt,"getArray"),o(Hr,"getObject"),o(wx,"constructParamsForRequest"),o(Fp,"generateAPIRequest"),o(tt,"addToSet"),o(dm,"getDistanceBetweenLatLon"),o(um,"getMapScale"),o(yi,"getNodesForNavigatable"),o(vm,"populateBundledImagesAsBlobs"),o(Jr,"debounce"),o(ym,"normalizeCategoryRank"),o(zs,"getDeviceID"),o(Bs,"getSessionID");var bm=o(((e,t)=>{if("string"==typeof e){if(void 0===t||!Array.isArray(t.polygons))return null;e=t.polygons.find((function(t){return t.id===e}))}let r=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){r=e.locations[0];for(let t=0,n=e.locations.length;t<n;t++){let n=e.locations[t];for(;void 0!==n.parent;)n=n.parent,n.polygons.includes(e)&&(r=n);if(void 0===n.parent&&n.polygons.includes(e))return n}}return r}),"getPrimaryLocationForPolygon");function wm(e){var t;let r={...e};for(let[e,n]of Object.entries(jp))r[e]=(0,mm.default)(n.concat(null!=(t=r[e])?t:[]));return r}function Lp(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return _m(this.cover(t,r),t,r,e)}function _m(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:n},g=e._x0,v=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[d=c<<1|u]))return i[d]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a}while((d=c<<1|u)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[d]=f,e}function km(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<l&&(l=n),n>c&&(c=n),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),r=0;r<o;++r)_m(this,a[r],s[r],e[r]);return this}function Np(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,l=i-r||1,u=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function Rp(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Dp(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]]}function st(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function zp(e,t,r){var n,i,o,a,s,l,u,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new st(g,c,d,h,p)),null==r?r=1/0:(c=e-r,d=t-r,h=e+r,p=t+r,r*=r);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new st(g[3],v,y,a,s),new st(g[2],i,y,v,s),new st(g[1],v,o,a,y),new st(g[0],i,o,v,y)),(u=(t>=y)<<1|e>=v)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-u],f[f.length-1-u]=l)}else{var m=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),_=m*m+b*b;if(_<r){var w=Math.sqrt(r=_);c=e-w,d=t-w,h=e+w,p=t+w,n=g.data}}return n}function Bp(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,l,u,c,d,h,p=this._root,f=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(s=(f+v)/2))?f=s:v=s,(c=a>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,h=d)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)}function Mm(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Vp(){return this._root}function qp(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Up(e){var t,r,n,i,o,a,s=[],l=this._root;for(l&&s.push(new st(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(n+o)/2,c=(i+a)/2;(r=l[3])&&s.push(new st(r,u,c,o,a)),(r=l[2])&&s.push(new st(r,n,c,u,a)),(r=l[1])&&s.push(new st(r,u,i,o,c)),(r=l[0])&&s.push(new st(r,n,i,u,c))}return this}function Gp(e){var t,r=[],n=[];for(this._root&&r.push(new st(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,u=t.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&r.push(new st(o,a,s,c,d)),(o=i[1])&&r.push(new st(o,c,s,l,d)),(o=i[2])&&r.push(new st(o,a,d,c,u)),(o=i[3])&&r.push(new st(o,c,d,l,u))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function xm(e){return e[0]}function Wp(e){return arguments.length?(this._x=e,this):this._x}function Em(e){return e[1]}function Yp(e){return arguments.length?(this._y=e,this):this._y}function io(e,t,r){var n=new Xp(null==t?xm:t,null==r?Em:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Xp(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function Tm(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}o(wm,"mergeThings"),y(),y(),y(),y(),o(Lp,"default"),o(_m,"add"),o(km,"addAll"),y(),o(Np,"default"),y(),o(Rp,"default"),y(),o(Dp,"default"),y(),y(),o(st,"default"),o(zp,"default"),y(),o(Bp,"default"),o(Mm,"removeAll"),y(),o(Vp,"default"),y(),o(qp,"default"),y(),o(Up,"default"),y(),o(Gp,"default"),y(),o(xm,"defaultX"),o(Wp,"default"),y(),o(Em,"defaultY"),o(Yp,"default"),o(io,"quadtree"),o(Xp,"Quadtree"),o(Tm,"leaf_copy");var _t=io.prototype=Xp.prototype;_t.copy=function(){var e,t,r=new Xp(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Tm(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=Tm(t));return r},_t.add=Lp,_t.addAll=km,_t.cover=Np,_t.data=Rp,_t.extent=Dp,_t.find=zp,_t.remove=Bp,_t.removeAll=Mm,_t.root=Vp,_t.size=qp,_t.visit=Up,_t.visitAfter=Gp,_t.x=Wp,_t.y=Yp;var gn,at,tn=class e{constructor(e){W(this,gn,void 0),g(this,"categories"),g(this,"locations"),g(this,"vortexes"),g(this,"maps"),g(this,"nodes"),g(this,"polygons"),g(this,"events"),g(this,"mapGroups"),g(this,"locationStates"),g(this,"rankings"),g(this,"languages",{}),W(this,at,{}),X(this,gn,e)}get polygonsByMapId(){if(m(this,at).polygonsByMapId)return m(this,at).polygonsByMapId;let e,t={};for(let r=0,n=m(this,gn).polygons.length;r<n;++r)e=m(this,gn).polygons[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,at).polygonsByMapId=r,m(this,at).polygonsByMapId}get nodesByMapId(){if(m(this,at).nodesByMapId)return m(this,at).nodesByMapId;let e,t={};for(let r=0,n=m(this,gn).nodes.length;r<n;++r)e=m(this,gn).nodes[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,at).nodesByMapId=r,m(this,at).nodesByMapId}findNearestNodeOnMap(e,t){var r;if(m(this,at).nodeTreesByMap||(m(this,at).nodeTreesByMap=new Map),!m(this,at).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=io();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),m(this,at).nodeTreesByMap.set(e,n)}return m(this,at).nodeTreesByMap.get(e).find(t.x,t.y)}get locationsByMapId(){if(m(this,at).locationsByMapId)return m(this,at).locationsByMapId;let e,t={};for(let r=0,n=m(this,gn).locations.length;r<n;++r){e=m(this,gn).locations[r];for(let r=0,n=e.polygons.length;r<n;++r)t[e.polygons[r].map.id]||(t[e.polygons[r].map.id]=[]),-1===t[e.polygons[r].map.id].indexOf(e)&&t[e.polygons[r].map.id].push(e);for(let r=0,n=e.nodes.length;r<n;++r){let n=e.nodes[r];t[n.map.id]||(t[n.map.id]=[]),-1===t[n.map.id].indexOf(e)&&t[n.map.id].push(e)}}let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,at).locationsByMapId=r,m(this,at).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};gn=new WeakMap,at=new WeakMap,o(tn,"MappedinCache"),g(tn,"instances",new Map);var Hp=tn,gt=Hp,xr={categories:_r,locations:An,vortexes:Sa,maps:Ya,nodes:ma,polygons:br,venue:Xr,events:za,mapGroups:Qa,themes:Vs,locationStates:Ua,rankings:Na};y(),y(),y(),y();var kt=6371008.8,Sm={centimeters:100*kt,centimetres:100*kt,degrees:kt/111325,feet:3.28084*kt,inches:39.37*kt,kilometers:kt/1e3,kilometres:kt/1e3,meters:kt,metres:kt,miles:kt/1609.344,millimeters:1e3*kt,millimetres:1e3*kt,nauticalmiles:kt/1852,radians:1,yards:1.0936*kt},rj={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/kt,yards:1.0936133};function Zn(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Mt(e,t,r){if(void 0===r&&(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(!$p(e[0])||!$p(e[1]))throw new Error("coordinates must contain numbers");return Zn({type:"Point",coordinates:e},t,r)}function Ln(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Zn({type:"LineString",coordinates:e},t,r)}function Er(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function Om(e,t){void 0===t&&(t="kilometers");var r=Sm[t];if(!r)throw new Error(t+" units is invalid");return e*r}function Pm(e,t){void 0===t&&(t="kilometers");var r=Sm[t];if(!r)throw new Error(t+" units is invalid");return e/r}function ao(e){return 180*(e%(2*Math.PI))/Math.PI}function Ot(e){return e%360*Math.PI/180}function $p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Ys(e,t,r){if(null!==e)for(var n,i,o,a,s,l,u,c,d=0,h=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){s=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<s;m++){var b=0,_=0;if(null!==(a=c?u.geometries[m]:u)){l=a.coordinates;var w=a.type;switch(d=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(!1===t(l[n],h,y,b,_))return!1;h++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-d;i++){if(!1===t(l[n][i],h,y,b,_))return!1;h++}"MultiLineString"===w&&b++,"Polygon"===w&&_++}"Polygon"===w&&b++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(_=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-d;o++){if(!1===t(l[n][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Ys(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Kp(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function _x(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function oo(e,t){_x(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Zn(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Zn({type:a,coordinates:u},n),r,l))return!1}}))}function kx(e,t){oo(e,(function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;if(!1===Ys(e,(function(o,c,d,h,p){if(void 0===a||r>s||h>l||p>u)return a=o,s=r,l=h,u=p,void(i=0);var f=Ln([a,o],e.properties);if(!1===t(f,r,n,p,i))return!1;i++,a=o})))return!1}}}))}function Im(e,t,r){var n=r,i=!1;return kx(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function Jp(e){var t=[1/0,1/0,-1/0,-1/0];return Ys(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}o(Zn,"feature"),o(Mt,"point"),o(Ln,"lineString"),o(Er,"featureCollection"),o(Om,"radiansToLength"),o(Pm,"lengthToRadians"),o(ao,"radiansToDegrees"),o(Ot,"degreesToRadians"),o($p,"isNumber"),o(Ys,"coordEach"),o(Kp,"featureEach"),o(_x,"geomEach"),o(oo,"flattenEach"),o(kx,"segmentEach"),o(Im,"segmentReduce"),o(Jp,"bbox"),Jp.default=Jp;var Xs=Jp;function mn(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Dt(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Am(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function Mx(e,t,r){void 0===r&&(r={});var n=mn(e),i=mn(t),o=Ot(i[1]-n[1]),a=Ot(i[0]-n[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return Om(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}y(),y(),y(),y(),o(mn,"getCoord"),o(Dt,"getCoords"),o(Am,"getType"),o(Mx,"distance");var Qn=Mx;function Hs(e,t){return void 0===t&&(t={}),Im(e,(function(e,r){var n=r.geometry.coordinates;return e+Qn(n[0],n[1],t)}),0)}function $s(e,t,r){if(void 0===r&&(r={}),!0===r.final)return xx(e,t);var n=mn(e),i=mn(t),o=Ot(n[0]),a=Ot(i[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.sin(a-o)*Math.cos(l),c=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-o);return ao(Math.atan2(u,c))}function xx(e,t){var r=$s(t,e);return r=(r+180)%360}function Ks(e,t,r,n){void 0===n&&(n={});var i=mn(e),o=Ot(i[0]),a=Ot(i[1]),s=Ot(r),l=Pm(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return Mt([ao(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),ao(u)],n.properties)}function Ex(e){if(!e)throw new Error("geojson is required");var t=[];return oo(e,(function(e){Tx(e,t)})),Er(t)}function Tx(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=Dt(n);break;case"LineString":r=[Dt(n)]}r.forEach((function(r){Sx(r,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function Sx(e,t){var r=[];return e.reduce((function(e,n){var i=Ln([e,n],t);return i.bbox=Ox(e,n),r.push(i),n})),r}function Ox(e,t){var r=e[0],n=e[1],i=t[0],o=t[1];return[r<i?r:i,n<o?n:o,r>i?r:i,n>o?n:o]}o(Hs,"length"),y(),y(),y(),o($s,"bearing"),o(xx,"calculateFinalBearing"),y(),o(Ks,"destination"),y(),y(),o(Ex,"lineSegment"),o(Tx,"lineSegmentFeature"),o(Sx,"createSegments"),o(Ox,"bbox");var Zp=Ex,$m=rn(Xm(),1);function tE(e,t){var r={},n=[];if("LineString"===e.type&&(e=Zn(e)),"LineString"===t.type&&(t=Zn(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=Hm(e,t);return i&&n.push(i),Er(n)}var o=(0,$m.default)();return o.load(Zp(t)),Kp(Zp(e),(function(e){Kp(o.search(e),(function(t){var i=Hm(e,t);if(i){var o=Dt(i).join(",");r[o]||(r[o]=!0,n.push(i))}}))})),Er(n)}function Hm(e,t){var r=Dt(e),n=Dt(t);if(2!==r.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],o=r[0][1],a=r[1][0],s=r[1][1],l=n[0][0],u=n[0][1],c=n[1][0],d=n[1][1],h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;var p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p>=0&&p<=1&&f>=0&&f<=1?Mt([i+p*(a-i),o+p*(s-o)]):null}o(tE,"lineIntersect"),o(Hm,"intersects");var Km=tE;function nE(e,t,r){void 0===r&&(r={});var n=Mt([1/0,1/0],{dist:1/0}),i=0;return oo(e,(function(e){for(var o=Dt(e),a=0;a<o.length-1;a++){var s=Mt(o[a]);s.properties.dist=Qn(t,s,r);var l=Mt(o[a+1]);l.properties.dist=Qn(t,l,r);var u=Qn(s,l,r),c=Math.max(s.properties.dist,l.properties.dist),d=$s(s,l),h=Ks(t,c,d+90,r),p=Ks(t,c,d-90,r),f=Km(Ln([h.geometry.coordinates,p.geometry.coordinates]),Ln([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Qn(t,g,r),g.properties.location=i+Qn(s,g,r)),s.properties.dist<n.properties.dist&&((n=s).properties.index=a,n.properties.location=i),l.properties.dist<n.properties.dist&&((n=l).properties.index=a+1,n.properties.location=i+u),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=u}})),n}o(nE,"nearestPointOnLine");var uo=nE;function rE(e,t,r){var n=Dt(r);if("LineString"!==Am(r))throw new Error("line must be a LineString");for(var i,o=uo(r,e),a=uo(r,t),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)s.push(n[l]);return s.push(i[1].geometry.coordinates),Ln(s,r.properties)}o(rE,"lineSlice");var pf=rE;function iE(e,t){void 0===t&&(t={});var r=Xs(e);return Mt([(r[0]+r[2])/2,(r[1]+r[3])/2],t.properties,t)}y(),o(iE,"center");var Jm=iE;function aE(e,t,r){void 0===r&&(r={});for(var n=mn(e),i=Dt(t),o=0;o<i.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),oE(i[o],i[o+1],n,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function oE(e,t,r,n,i){var o=r[0],a=r[1],s=e[0],l=e[1],u=t[0],c=t[1],d=u-s,h=c-l,p=(r[0]-s)*h-(r[1]-l)*d;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return n?"start"===n?Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<=u:u<=o&&o<s:h>0?l<a&&a<=c:c<=a&&a<l:"end"===n?Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<u:u<o&&o<=s:h>0?l<=a&&a<c:c<a&&a<=l:"both"===n&&(Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<u:u<o&&o<s:h>0?l<a&&a<c:c<a&&a<l):Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<=u:u<=o&&o<=s:h>0?l<=a&&a<=c:c<=a&&a<=l}y(),o(aE,"booleanPointOnLine"),o(oE,"isPointOnLineSegment");var Zm=aE,sE=1e-7,Qm=.005;function ff(e,t){let r=dE(t);return Er(e.features.reduce(((e,t)=>{let n=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(r.has(t)&&e.push(r.get(t)),e)),[]);return o.length&&(n=uE(t,o)),e.push(...n),e}),[]))}function uE(e,t){return t.reduce(((e,t)=>{let r={epsilon:sE},n=e.findIndex((e=>Zm(Jm(t),e,r))),i=e[n];if(i){let[r,o]=cE(i,t);e.splice(n,1,r,o)}return e}),[e])}function lE(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function cE(e,t){let{coordinates:r}=t.geometry,{coordinates:n}=e.geometry,i=r.map((t=>uo(e,Mt(t))));return n.reduce(((t,r)=>{let n=pf(Mt(r),i[0],e),o=pf(Mt(r),i[1],e),a=Hs(n)<Hs(o)?n:o;return a.properties={...e.properties,entrances:[]},t.concat([a])}),[])}function ev(e){let t=new Map;for(let r in e){let n=e[r];if(!lE(n))continue;let{altitude:i,color:o,width:a,height:s,opacity:l}=n,u={altitude:i,color:o,width:a,height:s,opacity:l,type:r};(n.polygons||n.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function dE(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:r}=t;return[r,e]})))}function tv(e){if(0===e.length)return;let t;for(let r of e)if("number"==typeof r.elevation){if(!t){t=r;continue}"number"==typeof t.elevation&&(t=Math.abs(r.elevation)===Math.abs(t.elevation)?r.elevation>t.elevation?r:t:Math.abs(r.elevation)<Math.abs(t.elevation)?r:t)}return t}function iv(e){let[t,r,n,i]=Xs(e);return{minLat:r,minLong:t,maxLat:i,maxLong:n}}function pE(e,t,r){let n=r.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",a=e.externalId||o||"",s=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/r.mapScale;return{id:o,georeference:n,name:a,shortName:a,scene:{polygons:t},elevation:s,scale:u,x_scale:u,layers:l,width:r.widthInMapUnits,height:r.heightInMapUnits}}o(ff,"processObstructions"),o(uE,"splitObstructionByAllEntrances"),o(lE,"isPolygonStyle"),o(cE,"splitObstructionByEntrance"),o(ev,"getStylesMap"),o(dE,"getEntranceMap"),y(),y(),o(tv,"findMapWithElevationClosestToZero"),o(iv,"getMapExtent"),o(pE,"convertMap");var gf=class{constructor(e){g(this,"mapExtent"),g(this,"stretchRatio"),g(this,"midLat"),g(this,"midLong"),g(this,"mapUnitRatio",1e6),g(this,"latDistance"),g(this,"longDistance"),g(this,"mapScale"),g(this,"widthInMapUnits"),g(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:r,maxLat:n,maxLong:i}=e,o=(t+n)/2,a=(r+i)/2,s=new it(o,i),l=new it(o,r),u=new it(t,a),c=new it(n,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(n-t)/(i-r);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-r)*this.mapUnitRatio,this.heightInMapUnits=(n-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],r=(e[0]-this.midLong)*this.mapUnitRatio,n=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:r+this.widthInMapUnits/2,y:n+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:r,maxLong:n}=this.mapExtent;return[[e,t],[e,n],[r,n],[r,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};o(gf,"CoordinateConverter");var eu=gf;function fE(e,t){let r=new Map,n=[];return e.features.forEach((e=>{let t=e.properties.id;t&&!r.has(t)&&r.set(t,e)})),r.forEach(((e,i)=>{let o=e.properties.map||"",a=t.get(o);if(a){let t=a.convert(e.geometry.coordinates),s=e.properties.externalId||"",l=[];e.properties.neighbors.forEach((e=>{var t;let n=null!=(t=e.weight)?t:0,i=r.get(e.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:n})})),n.push({id:i,map:o,externalId:s,paths:l,...t})}})),n}function hE(e,t,r){let n=[];return e.features.forEach((e=>{let i=r.convert(e.geometry.coordinates);n.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),n}o(fE,"convertNodes"),o(hE,"convertNodes_MVFv1");var nv=o(((e,t,r,n,i,o)=>{var a,s;let l,u=[],c=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,h=i.ExteriorWalls,p={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/c},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},f={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/c},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let d=t.features[i];if("Point"===d.geometry.type)continue;let h="desk-entrance"===(null==(a=d.properties.kind)?void 0:a.toLowerCase()),g=(h?d.properties.externalId:d.properties.id)||"",v=d.properties.externalId||"",y=r.get(g)||[];if("destinationNodes"in d.properties&&d.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),h)r.set(v,y);else{let r=n.get(d.properties.id),a=d.properties.center?o.convert(d.properties.center):void 0,h=d.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=d.properties.kind||"",b="void"===m.toLowerCase(),_=1-(i+1)/t.features.length*Qm;"LineString"===d.geometry.type&&"wall"===(null==(s=d.properties.kind)?void 0:s.toLowerCase())?(l=d.geometry.coordinates.map((e=>o.convert(e))),d.properties.footprintComponent?f.vertexes.push(l):p.vertexes.push(l)):(l=d.geometry.coordinates[0].map((e=>o.convert(e))),u.push({entrances:y,map:e,id:g,externalId:v,layer:m,geometry:{visible:!b,position:{x:0,y:0,z:((null==r?void 0:r.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==r?void 0:r.height)||1)*o.mapScale/c*_},width:null==r?void 0:r.width},material:{color:(null==r?void 0:r.color)||"#000000"},vertexes:l,center:a,holes:h}))}}return p.vertexes.length>0&&u.push(p),f.vertexes.length>0&&u.push(f),u}),"generateMappedinPolygons"),rv=o(((e,t,r)=>{let n=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>r.convert(e))),a=t.geometry.coordinates.slice(1).map((e=>e.map((e=>r.convert(e))))),s=Math.max(r.widthInMapUnits,r.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),n.push({entrances:null!=l?l:[],map:e,id:t.properties.id||"",externalId:t.properties.externalId||"",layer:t.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*r.mapScale/s},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*r.mapScale/s}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:a})})),n}),"generateMappedinPolygons_MVFv1");function gE(e,t,r,n,i,o,a){let s=nv(e,r,n,i,o,a),l=nv(e,t,n,i,o,a);return s.concat(l)}function mE(e){let t=[];return e.forEach((e=>{var r;t.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),t}function vE(e){let t=new Map;return e.features.forEach((e=>{var r,n,i,o,a,s,l;let u="",c=["n_".concat(e.properties.id)];e.properties.destinations.forEach((e=>{let t=e.split("-");u=t[0],c.push("n_".concat(t[1]))}));let d=null!=(n=null==(r=t.get(u))?void 0:r.nodes)?n:[],h=new Set([...d,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(a=e.properties.weight)?a:1e3,multiplier:null!=(s=e.properties.multiplier)?s:1,nodes:Array.from(h),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function av(e,t){var r;let n=null!=(r=t.properties.externalId)?r:"";return 0===n.length&&(n=t.properties.id),"location-".concat(e,"-").concat(n.toLowerCase().replace(" ","-"))}function ov(e,t){var r;let n=new Set;if("entrance"===e)n.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add(e),t.properties.footprintComponent&&n.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add("default"===e?"Room":e);let i=null!=(r=t.properties.tags)?r:[];if(i.length>0)for(let e of i)n.add(e)}return Array.from(n).filter((e=>e.length>0))}function sv(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function hf(e,t,r){let n=ov(e,t);for(let e of n){let t=sv(e);null==r[t]&&(r[t]={id:t,name:e})}}function uv(e){var t,r,n;return null!=(n=null==(r=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:r.startsWith("connection"))&&n}function yE(e){var t;let r=null!=(t=e.properties.externalId)?t:"";return uv(e)&&0===r.length&&(r="unnamed-connection-"+e.properties.id),r}function lo(e,t,r,n){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!uv(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=yE(t),a=av(e,t);if(null==n[a]){let e={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};n[a]=e}if("space"===e||"obstruction"===e){let e={map:r.id,id:t.properties.id};n[a].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:r.id,node:e};n[a].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:r.id,node:t.properties.node};n[a].nodes.push(e)}let s=ov(e,t);for(let e of s){let t=sv(e);n[a].categories.push(t)}}function bE(e,t=new Map){var r,n,i,o,a,s,l,u,c;let d={},h={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(n=null==(r=p[e.id])?void 0:r.features)?n:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(s=null==(a=v[e.id])?void 0:a.features)?s:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(hf("space",t,h),lo("space",t,e,d));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(hf("entrance",t,h),lo("entrance",t,e,d));let _={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};lo("entrance",_,e,d);for(let r of m){if(hf("obstruction",r,h),lo("obstruction",r,e,d),r.properties.footprintComponent){let t=r.properties.entrances;for(let r of t){let t=b.get(r);t&&lo("entrance",{...t,properties:{...t.properties,externalId:_.properties.externalId}},e,d)}}if("desks"===(null==(u=r.properties.kind)?void 0:u.toLowerCase())&&r.properties.externalId.length>0){let e=null!=(c=t.get(r.properties.id))?c:[];for(let t of e){let e=av("obstruction",r);null!=d[e]&&d[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(d),categories:Object.values(h)}}function lv(e){var t,r,n,i,o,a,s,l,u,c;let d=null!=(t=e.obstruction)?t:[],h=null!=(r=e.space)?r:[],p=null!=(n=e.entrance)?n:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(a=e["styles.json"])?a:{},y=null!=(s=e["manifest.geojson"])?s:{},m=null!=(l=e["node.geojson"])?l:[],b=null!=(u=e["connection.json"])?u:[],_={},w=new Map,M=[],x=ev(v),E=new Map,S=new Map;g.forEach((e=>{let t=e.id;t&&!S.has(t)&&S.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!S.has(e))return;let t=ff(d[e],p[e]);if(t.features.length){let r=iv(t),n=new eu(r);w.set(e,n),_[e]=gE(e,t,h[e],E,x,v,n),M.push(pE(S.get(e),_[e],n))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let I=Object.values(_).flat(),k=mE(b),C=fE(m,w),O=y.features[0],T=O.properties.name,A=O.geometry.coordinates[0],P=O.geometry.coordinates[1],F=(null==(c=tv(M))?void 0:c.id)||"",{locations:N,categories:j}=bE(e,E);return{polygons:I,venue:{name:T,latitude:P,longitude:A,defaultMap:F},maps:M,vortexes:k,nodes:C,locations:N,mapGroups:[],locationStates:[],categories:j,themes:[],imageBinaries:new Map}}function cv(e){var t,r,n,i,o,a,s;let l=null!=(t=e.obstruction)?t:{},u=null!=(r=e.space)?r:{},c=null!=(n=e.node)?n:{},d=null!=(i=e.level)?i:{},h=null!=(o=e["manifest.geojson"])?o:{},p=null!=(a=e.connection)?a:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(d).forEach((e=>{let t=ff(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let r=iv(t),n=new eu(r);g.set(e,n);let i=rv(e,u[e],n),o=rv(e,t,n);f[e]=i.concat(o),y=y.concat(hE(c[e],e,n)),v.push(wE(d[e],f[e],n))}m=m.concat(vE(p[e]))}));let b=Object.values(f).flat(),_=h.features[0],w=_.properties.name,M=_.geometry.coordinates[0],x=_.geometry.coordinates[1],E=(null==(s=v[0])?void 0:s.id)||"",S=new Map;b.forEach((e=>S.set(e.id,e)));let I=[],k=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>S.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),I=e}}return{...e.properties,nodes:I,polygons:e.properties.spaces}})),C=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:w,latitude:x,longitude:M,defaultMap:E},maps:v,vortexes:m,nodes:y,locations:k,mapGroups:[],locationStates:[],categories:C,themes:[],imageBinaries:new Map}}function wE(e,t,r){let n=r.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let a=[...i].map((e=>({id:e,visible:!0}))),s=1/r.mapScale;return{id:o.id,georeference:n,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:r.widthInMapUnits,height:r.heightInMapUnits}}o(gE,"convertPolygons"),o(mE,"convertVortexes"),o(vE,"convertVortexes_MVFv1"),o(av,"getLocationId"),o(ov,"getFeatureCategories"),o(sv,"getCategoryIdFromName"),o(hf,"mutateCategoriesWithNewFeature"),o(uv,"isFeatureConnection"),o(yE,"getLocationLabel"),o(lo,"mutateLocationsWithNewFeature"),o(bE,"createMetaDataFromMVF"),o(lv,"convertMVFToMappedin"),o(cv,"convertMVFv1ToMappedin"),o(wE,"convertMap_MVFv1"),y();var Iv,co,Qr,ei,po,ti,ni,ri,tr,ii,ai,oi,fo,si,Tr,Av=rn(Pv()),IE=null==(Iv=null==D?void 0:D.env)?void 0:Iv.npm_package_version,tu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],yf=tu[0],AE=!1,nn=class e{constructor(e){var t;W(this,co,void 0),W(this,Qr,void 0),W(this,ei,void 0),W(this,po,void 0),W(this,ti,void 0),W(this,ni,void 0),W(this,ri,void 0),W(this,tr,void 0),W(this,ii,void 0),W(this,ai,void 0),W(this,oi,void 0),W(this,fo,void 0),W(this,si,void 0),W(this,Tr,void 0),X(this,tr,e.clientId),X(this,ii,e.clientSecret),X(this,ai,e.accessToken),X(this,ri,e.noAuth||!1);let r="https://api-gateway.mappedin.com/track-analytics/a/";!m(this,ri)&&m(this,tr)&&!Ws(m(this,tr))&&(r="https://web-proxy.mappedin.com/a/"),X(this,ei,r),X(this,ei,m(this,ei)+(e.venue+"/")),X(this,si,e.venue),X(this,Qr,!1),X(this,co,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),X(this,po,tu.find((t=>t===e.context))||tu[0]),X(this,ti,zs()),X(this,ni,Bs()),X(this,oi,new Set),X(this,fo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Jr(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let r={...t,g:m(this,Qr)};m(this,Tr)&&(r={...r,...m(this,Tr)});let n=m(this,ei)+e+"?"+Av.default.stringify(r,{skipEmptyString:!0,skipNull:!0});if(AE&&le.log("Analytics.track",n),m(this,co))return;let i={"mi-context":yf||m(this,po),"mi-session":m(this,ni),"mi-device":m(this,ti),"mappedin-sdk-version":IE,"mappedin-platform-version":m(this,fo)};m(this,ai)?i.Authorization="Bearer ".concat(m(this,ai)):m(this,ri)||m(this,ii)&&m(this,tr)&&(i["x-mappedin-key"]=btoa(m(this,tr)),i["x-mappedin-secret"]=btoa(m(this,ii))),In()(n,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){X(this,Tr,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;et.addPendingEvent(new Vi({venue:m(this,si)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;et.addPendingEvent(new Bi({venue:m(this,si)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,r,n){this.track("load-mapview",{type:e,force:t,benchmark:r||-1,reason:n||"success"})}getDirections(e,t){let r={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",r)}getSessionID(){return m(this,ni)}getDeviceID(){return m(this,ti)}setGeolocationMode(e){X(this,Qr,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!m(this,oi).has(t)&&(this.track(t),m(this,oi).add(t))}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=tu.find((t=>t===e));t&&(yf=t)}static clearContext(){yf=void 0}static destroy(){e.instance=null}};co=new WeakMap,Qr=new WeakMap,ei=new WeakMap,po=new WeakMap,ti=new WeakMap,ni=new WeakMap,ri=new WeakMap,tr=new WeakMap,ii=new WeakMap,ai=new WeakMap,oi=new WeakMap,fo=new WeakMap,si=new WeakMap,Tr=new WeakMap,o(nn,"Analytics"),g(nn,"instance",null),g(nn,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var bf=nn,ho=bf;y();var wf=class{constructor(){g(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach((function(e){"function"==typeof e&&e(t)}))}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||null==this._subscribers[e])return;let r=this._subscribers[e].indexOf(t);-1!==r&&this._subscribers[e].splice(r,1)}destroy(){this._subscribers={}}};o(wf,"PubSub");var Rn,ui,Sr,li,go,_f,ru,Fv,nu=wf,jv={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},kf=class extends nu{constructor(e){super(),W(this,go),W(this,ru),g(this,"perspective"),g(this,"things"),g(this,"options"),W(this,Rn,void 0),W(this,ui,""),g(this,"updatedAt"),g(this,"categories",[]),g(this,"locations",[]),g(this,"vortexes",[]),g(this,"maps",[]),g(this,"nodes",[]),g(this,"polygons",[]),g(this,"venue",{}),g(this,"events",[]),g(this,"mapGroups",[]),g(this,"themes",[]),g(this,"locationStates",[]),g(this,"rankings"),g(this,"currentLanguage"),W(this,Sr,{}),g(this,"_categoriesById"),g(this,"_locationsById"),g(this,"_vortexesById"),g(this,"_mapsById"),g(this,"_nodesById"),g(this,"_polygonsById"),g(this,"_eventsById"),g(this,"_mapGroupsById"),g(this,"_locationStatesById"),g(this,"_locationRankingsById"),g(this,"_rankingsById"),g(this,"_categoriesByExternalId"),g(this,"_locationsByExternalId"),g(this,"_vortexesByExternalId"),g(this,"_mapsByExternalId"),g(this,"_nodesByExternalId"),g(this,"_polygonsByExternalId"),g(this,"_eventsByExternalId"),g(this,"_mapGroupsByExternalId"),g(this,"_locationStatesByExternalId"),g(this,"_locationRankingsByExternalId"),g(this,"_rankingsByExternalId"),W(this,li,void 0),g(this,"images"),g(this,"imageBinaries"),g(this,"scenes"),g(this,"analytics"),g(this,"navigator"),this.options=e,X(this,Rn,gt.create(this));let t=ho.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(qf,"true")}})}generateGetters(e){try{for(let t=0,r=e.length;t<r;++t){let r=e[t];Array.isArray(this[r])&&(Object.defineProperty(this,"_".concat(r,"ByExternalId"),{configurable:!0,get(){let e=m(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.externalId]=e)),m(this,Rn)[r]=t,t}}),Object.defineProperty(this,"_".concat(r,"ById"),{configurable:!0,get(){let e=m(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.id]=e)),m(this,Rn)[r]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let r="_".concat(e,"ById"),n="_".concat(e,"ByExternalId"),i=this[r];return null!=i&&null!=i[t]||(i=this[n],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=lv(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=cv(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var r;if(this.currentLanguage.code!==e){if(null==(r=this.venue.languages)||!r.find((t=>t.code===e)))return void le.error("Language ".concat(e," not found in venue ").concat(this.venue.slug));if(t&&!m(this,Sr)[this.currentLanguage.code]&&(m(this,Sr)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),gt.clearInstance(this),X(this,Rn,gt.create(this)),this.currentLanguage=this.venue.languages.find((t=>t.code===e)),null!=m(this,Sr)[e]){let t=JSON.parse(m(this,Sr)[e]);await this.hydrate(t)}else this.options.language=this.currentLanguage.code,await this.fetch();this.publish(0,this.currentLanguage)}}async hydrate(e,t){let r;if("string"==typeof e)try{X(this,ui,e),r=JSON.parse(e)}catch(e){return void le.error("Unable to parse JSON",e)}else r=e,X(this,ui,JSON.stringify(r));let n=Object.keys(r);for(let e=0,t=n.length;e<t;++e){let t=n[e],i=r[t];null!=xr[t]&&"function"==typeof xr[t].hydrate&&(this[t]=xr[t].hydrate(i,this))}t&&await vm(r);let{images:i,scenes:o,imageBinaries:a}=r;this.images=i,this.scenes=o,this.imageBinaries=a,this.generateGetters(n),$e(this,go,_f).call(this),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Ws(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:e}=this.options,t=[],r=Object.keys(e);for(let e=0,n=r.length;e<n;++e){let n=r[e];xr[n]&&t.push(xr[n].fetch(this).then((e=>(this[n]=e,Promise.resolve()))))}return t.push(Hr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>X(this,li,e.token)),(()=>Promise.resolve()))),this.generateGetters(r),Promise.all(t).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,$e(this,go,_f).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Ou({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}toJSON(){var e;let t={};for(let e in xr)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let r={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(r.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete r.locationRankings,r}toString(){return m(this,ui)||JSON.stringify(this.toJSON())}};Rn=new WeakMap,ui=new WeakMap,Sr=new WeakMap,li=new WeakMap,go=new WeakSet,_f=o((function(){m(this,li)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(m(this,li)))})),$e(this,ru,Fv).call(this)}),"#transformData"),ru=new WeakSet,Fv=o((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),r=Math.max(...e);this.polygons.forEach((e=>{var n,i;let o=bm(e,this);if(o){let a=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(a.length>0){let o=Math.min(...a);e.categoryRank=ym(o,t,r,null!=(i=null==(n=e.rank)?void 0:n.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),o(kf,"Mappedin");var Fn=kf;y();var Or=rn(Lv());y();var CE=["0","1","2","3","4","5","6","7","8","9"],jE=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],FE=["0","1","2","3","4","5","6","7","8","9"],LE=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],QL=[...CE,...jE,...FE,...LE],Nv=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];y();var NE=32,It=!1,RE=120,Ef=0,Sf=class{constructor(e){g(this,"_callback"),g(this,"_frameCount"),g(this,"_ordering"),g(this,"_supersededBy"),g(this,"name"),g(this,"_remainingFrameCount"),g(this,"_lastFrameTime"),g(this,"userdata"),this._callback=e.callback,this._frameCount=null!=e.frameCount?e.frameCount:1,this._ordering=null!=e.ordering?e.ordering:0,this._supersededBy=null!=e.supersededBy?new Set(e.supersededBy):new Set,this.name=e.name,this.userdata=e.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,It&&le.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};o(Sf,"FrameUpdate");var iu=Sf,Of=class{constructor(e){if(g(this,"_postponed"),g(this,"userdata"),g(this,"_priority"),g(this,"_group"),g(this,"name"),g(this,"_lastFrameTime"),g(this,"_callback"),g(this,"_complete"),g(this,"_scheduled"),g(this,"_cancelled"),null!=e.group&&null!=e.priority)throw new Error("cannot specify task priority individually within group");if(null!=e.group&&null!=e.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=e.callback,this._group=null!=e.group?e.group:null,this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,It&&le.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};o(Of,"FrameTask");var Dn=Of,Pf=class{constructor(e){g(this,"_postponed"),g(this,"_onComplete"),g(this,"_priority"),g(this,"userdata"),g(this,"name"),g(this,"_tasks"),g(this,"_scheduledTasks"),g(this,"_scheduled"),g(this,"_cancelled"),this._onComplete=null!=e.onComplete?e.onComplete:()=>{},this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,It&&le.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let e of this._scheduledTasks)return this._scheduledTasks.delete(e),e}};o(Pf,"FrameTaskGroup");var au=Pf,If=class{constructor(e){g(this,"_maxMillisecondsPerFrame"),g(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:NE,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};o(If,"RealTimeTimer");var Tf=If,Af=class{constructor(e){var t;g(this,"_raf"),g(this,"options"),g(this,"_timer"),g(this,"_performance"),g(this,"_scheduledUpdatesByOrdering"),g(this,"_scheduledTasksByPriority"),g(this,"_postponedTasks"),g(this,"_requestAnimationFrameHandle"),g(this,"_updatesToRunThisFrame"),g(this,"_lastFrameTime",0),g(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new Tf,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new ci,this._scheduledTasksByPriority=new ci,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),It&&le.log("task scheduler instantiated"),null!=(t=globalThis.MappedinDebug)&&t.TEST_IOS&&(this._raf=e=>setTimeout(e,16))}clear(){for(let e of this._scheduledTasksByPriority.values())e._cancelled=!0;for(let e of this._postponedTasks.values())e._cancelled=!0;this._scheduledUpdatesByOrdering=new ci,this._scheduledTasksByPriority=new ci,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),It&&le.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(e){var t;let r;this._timer.beginFrame(),this._performance&&(r=performance.now());let n=!1;It&&(0===Ef&&(n=!0),++Ef,Ef%=RE);let i=this._scheduledUpdatesByOrdering.keys();for(let e=i.length-1;e>=0;--e){let t=i[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),n&&le.log("update scheduled to run this frame",e.name)}for(let e of this._updatesToRunThisFrame){--e._remainingFrameCount,e._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(e._ordering,e),e._superseded=!1;for(let t of this._updatesToRunThisFrame)e._supersededBy.has(t)&&(e._superseded=!0,n&&le.log("update superseded",e.name,t.name))}for(let e=0;e<this._updatesToRunThisFrame.length;++e)this._updatesToRunThisFrame[e]._superseded&&(this._updatesToRunThisFrame.splice(e,1),--e);for(let t of this._updatesToRunThisFrame){let r;this._performance&&(r=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-r),n&&le.log("update completed",t.name)}this._updatesRunLastFrame.clear();for(let e of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(e);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(e)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-r),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(t=this.options)&&t.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,r=this._scheduledTasksByPriority.popFromMaxKey(),n=null;le.assert(void 0!==r),Object.getPrototypeOf(r)===au.prototype&&(n=r,r=n._popTask()),le.assert(void 0!==r),le.assert(Object.getPrototypeOf(r)===Dn.prototype),this._performance&&(t=performance.now()),r._callback(e),r._complete=!0,this._performance&&(r._lastFrameTime=performance.now()-t),It&&le.log("task completed",r.name),null!=n&&(n.isComplete()?(n.clear(),n._onComplete(),It&&le.log("group completed",n.name)):this._scheduledTasksByPriority.insert(n._priority,n))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===au)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+e.name);if(e._scheduled)throw new Error("cannot schedule already scheduled task: "+e.name);if(e._cancelled)throw new Error("cannot schedule cancelled task: "+e.name);let t=e;"_group"in e&&null!=e._group&&(e._group._tasks.add(e),e._group._scheduledTasks.add(e),t=e._group),t._postponed?this._postponedTasks.add(t):this._scheduledTasksByPriority.insert(t._priority,t),e._scheduled=!0,t._scheduled=!0,It&&le.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),It&&le.log("update cancelled",e.name)}cancelTask(e){if(!e._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+e.name);if(e._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+e.name);if("_group"in e&&null!=e._group){let t=e._group.isComplete();e._group._tasks.delete(e),e._group._scheduledTasks.delete(e),e._group.isComplete()&&(this._scheduledTasksByPriority.delete(e._group._priority,e._group),t||e._group._onComplete())}else this._scheduledTasksByPriority.delete(e._priority,e),this._postponedTasks.delete(e);Object.getPrototypeOf(e)===Dn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),It&&le.log("task cancelled",e.name)}postponeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot postpone individual tasks in group: "+e.name);if(e._cancelled)throw new Error("cannot postpone cancelled task: "+e.name);if(!e._postponed){if(Object.getPrototypeOf(e)===Dn.prototype){if("_complete"in e)return;if(!e._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+e.name)}this._scheduledTasksByPriority.delete(e._priority,e),(Object.getPrototypeOf(e)===Dn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,It&&le.log("task postponed",e.name)}}resumeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot resume individual tasks in groups");if(e._cancelled)throw new Error("cannot resume cancelled task");if(e._postponed){if(Object.getPrototypeOf(e)===Dn.prototype){if("_complete"in e&&e._complete)return;if(!e._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(e),(Object.getPrototypeOf(e)===Dn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),It&&le.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Dn.prototype&&!e._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(e._priority,e)&&(this._scheduledTasksByPriority.delete(e._priority,e),this._scheduledTasksByPriority.insert(t,e)),e._priority=t,It&&le.log("task priority changed",e.name,t)}};o(Af,"TaskScheduler");var ou=Af,Cf=class{constructor(){g(this,"_map"),g(this,"_size"),g(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(e,t){return null!=this._map.get(e)&&this._map.get(e).has(t)}get(e){return this._map.get(e)}insert(e,t){if(le.assert("number"==typeof e&&Number.isFinite(e)),null==this._map.get(e)){this._map.set(e,new Set);for(let t=0;t<=this._sortedKeys.length;++t)if(t===this._sortedKeys.length||e<this._sortedKeys[t]){this._sortedKeys.splice(t,0,e);break}}this._map.get(e).has(t)||(this._map.get(e).add(t),++this._size)}delete(e,t){null!=this._map.get(e)&&this._map.get(e).has(t)&&(this._map.get(e).delete(t),--this._size,0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)))}pop(e){if(null!=this._map.get(e)){let t;for(t of this._map.get(e).values()){this._map.get(e).delete(t),--this._size;break}return 0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)),t}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let e=this._map.keys(),t=null,r={[Symbol.iterator]:()=>r,next:()=>{if(null==t){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values()}let r=t.next();for(;r.done;){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values(),r=t.next()}return r}};return r}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return le.assert(e===this._size),e}};o(Cf,"Multimap");var ci=Cf,zn=o((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),DE=/([!-/:-@])|(?:[\n\r [-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+)/u;function zE(e){return e.split(DE).filter(Boolean)}o(zE,"tokenizeAndCaptureDelimiters");var Bn,Yt,nr,yn,rt,vo,yo,pi,bo,wo,_o,ko,fi,Vn,su,uu,rr,Mo,lu,cu,du,Dv,di="",BE=.09,VE=1,qE=.025,UE=.5,GE=5e-4,WE=5e-4,YE=.01,XE=.05,Rv=1,HE=.01,$E=.2,KE={MappedinCategory:"categories",MappedinLocation:"locations"},JE={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:Nv,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===D.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:BE,PRIMARY_INDEX_WEIGHT:VE,SECONDARY_INDEX_WEIGHT:qE,CATEGORY_NAME_WEIGHT:UE,LOCATION_NAME_WEIGHT:Rv,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:GE,CATEGORY_LOCATION_TAGS_WEIGHT:WE,CATEGORY_LOCATION_NAME_WEIGHT:YE,PRIMARY_INDEX_TAGS_NAME_WEIGHT:XE,LOCATION_DEFAULT_RANK:Rv,RATIO_OF_FUZZY_TO_EXACT:HE,RATIO_OF_PREFIX_TO_EXACT:$E}},jf=class{constructor(e,t){var r;W(this,du),W(this,Bn,void 0),W(this,Yt,void 0),W(this,nr,void 0),W(this,yn,void 0),W(this,rt,void 0),W(this,vo,new ou({performance:!0})),W(this,yo,void 0),W(this,pi,void 0),W(this,bo,new Map),W(this,wo,void 0),W(this,_o,void 0),W(this,ko,void 0),g(this,"buildIndices",o((()=>{var e,t;X(this,rr,new Promise((e=>{X(this,Mo,e)})));let{PRIMARY_INDEX_FUZZYNESS:r,PRIMARY_INDEX_WEIGHT:n,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:a,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=m(this,rt).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:r},boost:{name:n,query:n,tag:s},weights:{fuzzy:o,prefix:a},boostDocument:e=>e.includes("MappedinLocation")?n:e.includes("MappedinCategory")?i:n,tokenize:zE},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var r;return null!=(r=m(this,yo))&&r.has(e.toLowerCase())?null:e.toLowerCase()}},d={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...l,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(null!=(e=m(this,rt))&&e.jsonIndex){let{primary:e,secondary:r,extra:n}=JSON.parse(null==(t=m(this,rt))?void 0:t.jsonIndex);X(this,Yt,Or.default.loadJS(e,u)),X(this,nr,Or.default.loadJS(r,c)),X(this,yn,Or.default.loadJS(n,d))}else X(this,Yt,new Or.default(u)),X(this,nr,new Or.default(c)),X(this,yn,new Or.default(d)),m(this,Bn).locations.forEach(m(this,su)),m(this,Bn).categories.forEach(m(this,uu));m(this,vo).update(performance.now())}),"buildIndices")),W(this,fi,0),W(this,Vn,o((e=>{vu(this,fi)._++,m(this,vo).scheduleUpdate(new iu({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),vu(this,fi)._--,0===m(this,fi)&&m(this,Mo).call(this)}}))}),"#addTask")),W(this,su,o((e=>{var t,r,n;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=m(this,rt).constants,s=o;null!=(t=m(this,rt))&&t.useLocationRank&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,r;return null!=(t=e.rank)&&t.score?null==(r=e.rank)?void 0:r.score:o})),o):o),m(this,Vn).call(this,(()=>{m(this,Yt).add({name:zn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:s})})),null!=(r=m(this,rt))&&r.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{m(this,Yt).add({name:"",tag:zn(t),id:"MappedinLocation_"+e.id,weight:a,rank:s})})),null!=(n=m(this,rt))&&n.searchDescriptions&&m(this,Vn).call(this,(()=>m(this,nr).add({description:zn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:s})))}),"#processLocation")),W(this,uu,o((e=>{var t,r;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:n,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=m(this,rt).constants;m(this,Vn).call(this,(()=>m(this,Yt).add({name:zn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+" ".concat(di," ")+t.name),"")+" ".concat(di);if(null!=(t=m(this,rt))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&m(this,Vn).call(this,(()=>m(this,yn).add({id:"MappedinCategory_"+e.id,"category.locations.description":zn(t.description),ref:t.name,weight:n})))})),null!=(r=m(this,rt))&&r.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var r;return e+(null==(r=t.tags)?void 0:r.reduce(((e,t)=>e+" ".concat(di," ")+t),""))+" ".concat(di)}),"");m(this,Vn).call(this,(()=>m(this,yn).add({"category.locations.tags":zn(t),id:"MappedinCategory_"+e.id,weight:i})))}m(this,Vn).call(this,(()=>m(this,yn).add({"category.locations.name":zn(s),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),W(this,rr,void 0),W(this,Mo,void 0),W(this,lu,o((e=>{var t;let r=e.score,{object:n,id:i,weight:o,rank:a}=e,[s,l]=i.split("_"),u=n||m(this,Bn).getCollectionItemById(KE[s],l);return a&&null!=(t=m(this,rt))&&t.useLocationRank&&(r+=a),o&&(r*=o),{score:r,type:s,object:u}}),"#processSearchResult")),W(this,cu,o(((e,t)=>{for(let r in e.match)e.match[r].forEach((n=>{let i=e.ref||e[n]||t.object[n];if("category.locations.tags"===n||"category.locations.name"===n){let t=new RegExp("[^".concat(di,"]* ")+r+" [^".concat(di,"]*"),"ig").exec(e[n]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:r,weight:e.weight,matchesOn:n,value:i})}))}),"#addMatches")),X(this,pi,ho.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),X(this,rt,{...JE,...t}),X(this,Bn,e),X(this,yo,new Set(null==(r=m(this,rt))?void 0:r.stopWords));let n=m(this,Bn).venue.slug;m(this,Bn).on(0,this.buildIndices),this.buildIndices(),X(this,wo,Jr((e=>{m(this,pi).trackSearchSuggest({query:e}),et.addPendingEvent(new ea({venue:n}))}),300)),X(this,_o,Jr((e=>{m(this,pi).trackSearch({query:e}),et.addPendingEvent(new Qi({venue:n}))}),300)),X(this,ko,Jr((()=>{et.addPendingEvent(new Ji({venue:n}))}),300)),et.addPendingEvent(new Zi({search_descriptions:m(this,rt).searchDescriptions,search_tags:m(this,rt).searchTags,search_descriptions_in_categories:m(this,rt).searchDescriptionsInCategories,search_tags_in_categories:m(this,rt).searchTagsInCategories,use_location_rank:m(this,rt).useLocationRank,venue:n}))}async suggest(e){await m(this,rr);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:r,PRIMARY_INDEX_TAGS_NAME_WEIGHT:n,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=m(this,rt).constants,a=m(this,Yt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:r,query:r,tag:n},weights:{fuzzy:i,prefix:o}});return m(this,wo).call(this,e),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await m(this,rr);let t=$e(this,du,Dv).call(this,e);return m(this,_o).call(this,e),t}async toJSON(){return await m(this,rr),JSON.stringify({primary:m(this,Yt),secondary:m(this,nr),extra:m(this,yn)})}async addQuery(e){let t,r,{query:n,object:i,weight:o=1}=e;await m(this,rr),t=i instanceof An?"MappedinLocation":i instanceof _r?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?r=t+"_"+i.id:"string"==typeof i.id?r="Custom_"+i.id:(r=m(this,bo).get(i),r||(r="Custom_"+jn(),m(this,bo).set(i,r))),m(this,Yt).add({id:r,weight:o,object:i,query:zn(n)}),m(this,ko).call(this)}};Bn=new WeakMap,Yt=new WeakMap,nr=new WeakMap,yn=new WeakMap,rt=new WeakMap,vo=new WeakMap,yo=new WeakMap,pi=new WeakMap,bo=new WeakMap,wo=new WeakMap,_o=new WeakMap,ko=new WeakMap,fi=new WeakMap,Vn=new WeakMap,su=new WeakMap,uu=new WeakMap,rr=new WeakMap,Mo=new WeakMap,lu=new WeakMap,cu=new WeakMap,du=new WeakSet,Dv=o((function(e){let t=[],r=zn(e);t=[...m(this,Yt).search(r),...m(this,nr).search(r),...m(this,yn).search(r)].sort(((e,t)=>t.score-e.score));let n={};for(let e of t){let t=m(this,lu).call(this,e);n[e.id]?n[e.id].score+=t.score:n[e.id]={...t,matches:[]},m(this,cu).call(this,e,n[e.id])}return Object.keys(n).map((e=>({...n[e],matches:n[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),o(jf,"OfflineSearch");var mo=jf;y();var Ff=globalThis.fetch;function In(){if(null==Ff)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Ff}function Vv(e){Ff=e}o(In,"isomorphicFetch"),o(Vv,"setFetchFn");var zv,ZE=null==(zv=null==D?void 0:D.env)?void 0:zv.npm_package_version;globalThis.btoa||(globalThis.btoa=Bv.encode);var QE=["ar"];function Lf(e){let t={...jv,...e};return t.headers={...t.headers,"mappedin-sdk-version":ZE},t.things=wm("things"in e?e.things:void 0),"platformString"in e&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization="Bearer ".concat(t.accessToken):t.clientId&&t.clientSecret&&(t.authorization="Basic ".concat(globalThis.btoa("".concat(t.clientId,":").concat(t.clientSecret))))),t}async function Nf(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},r=Lf({baseUrl:"https://api-gateway.mappedin.com/",...t}),n="public/1/".concat(r.useDraftData?"draft/":""),i=new Fn({...r,baseUrl:r.baseUrl+n});return await i.fetch(),t.emitAnalyticsEvents,et.addPendingEvent(new qi({venue:r.venue})),i}o(Lf,"parseOptions"),o(Nf,"getVenue");var qv={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function Rf(e){let t=Lf({baseUrl:"https://api-gateway.mappedin.com/",...qv,...e}),{url:r,updated_at:n}=await eT(e),i=await In()(r,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new Fn(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=n,s}async function eT(e){let t=Lf({baseUrl:"https://api-gateway.mappedin.com/",...qv,...e}),{version:r,venue:n}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&QE.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(n,"&version=1.0.0");return t.language=void 0,await Fp(t,i)}o(Rf,"getVenueBundle"),o(eT,"getVenueBundleURL");var tT=!1;function nT(e){e.things=e.things||{},e.things.venue=e.things.venue||[],e.things.venue.push("slug","defaultMap"),e.things.nodes=e.things.nodes||[],e.things.nodes.push("x","y","paths","map"),e.things.polygons=e.things.polygons||[],e.things.locations=e.things.locations||[],e.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),e.things.maps=e.things.maps||[],e.things.maps.push("height","width","georeference"),e.perspective=e.perspective3D||e.perspective||void 0,e.things.maps.push("scene","layers"),e.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),tT&&e.things.polygons.push("layer","geometry","vertexes")}o(nT,"parseOptions");var rT=o((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,r){function n(n,i){if(n)r(n);else{let n={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){le.error("Failure in firstMapSelector! Loading default map instead."),le.error(e),r(e)}n.venue=i,t(n)}}o(n,"handleInit"),nT(e.venue),e.venue.useVenueBundle?Rf(e.venue).then((e=>n(null,e))).catch((e=>n(e,null))):Nf(e.venue).then((e=>n(null,e))).catch((e=>n(e,null)))}))}),"initialize");