@mappedin/mappedin-js 5.50.0 → 5.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/lib/esm/get-venue/index.js +1 -1
  2. package/lib/esm/navigator/index.js +1 -1
  3. package/lib/esm/renderer/{Arrival-KLIH5LTH.js → Arrival-UP4PJA4U.js} +1 -1
  4. package/lib/esm/renderer/{Chalet-ZU2FPU2K.js → Chalet-O3KLVJGV.js} +1 -1
  5. package/lib/esm/renderer/{GLTFExporter-AEQQSSOJ.js → GLTFExporter-KVV5NEYC.js} +1 -1
  6. package/lib/esm/renderer/{HelveticaNeue-PHK3JE5I.js → HelveticaNeue-WLGRUQWN.js} +1 -1
  7. package/lib/esm/renderer/{Helvetiker-JVUX4WK7.js → Helvetiker-UU7LFERE.js} +1 -1
  8. package/lib/esm/renderer/{Lato-BX5JVWZI.js → Lato-2SXEYW4V.js} +1 -1
  9. package/lib/esm/renderer/{MyriadPro-3UATSCWU.js → MyriadPro-BSXPENY5.js} +1 -1
  10. package/lib/esm/renderer/{PerformanceController-I6QAT4EJ.js → PerformanceController-YVNIJI6Z.js} +1 -1
  11. package/lib/esm/renderer/{ProximaNova-54WAWGUY.js → ProximaNova-H6MTSMLS.js} +1 -1
  12. package/lib/esm/renderer/{SimonCircular-ETZIFPSM.js → SimonCircular-TSBYW4PJ.js} +1 -1
  13. package/lib/esm/renderer/browser-BZGW63NG.js +1 -0
  14. package/lib/esm/renderer/chunk-CJV777AH.js +1 -0
  15. package/lib/esm/renderer/chunk-ORJYYHGW.js +1 -0
  16. package/lib/esm/renderer/chunk-STFZ7NKJ.js +1 -0
  17. package/lib/esm/renderer/index.css +1 -1
  18. package/lib/esm/renderer/index.d.ts +81 -81
  19. package/lib/esm/renderer/index.js +1 -1
  20. package/lib/esm/renderer/maplibre-worker.csp.js +1 -1
  21. package/lib/esm/renderer/outdoor-context-JAORAG47.js +1 -0
  22. package/lib/mappedin.css +1 -1
  23. package/lib/mappedin.js +1 -1
  24. package/lib/node/index.js +1 -1
  25. package/package.json +2 -2
  26. package/lib/esm/renderer/browser-327UAZTD.js +0 -1
  27. package/lib/esm/renderer/chunk-3XZX75KS.js +0 -1
  28. package/lib/esm/renderer/chunk-OHPDU25U.js +0 -1
  29. package/lib/esm/renderer/chunk-ZRT45YCM.js +0 -1
  30. package/lib/esm/renderer/outdoor-context-XOOYHZLY.js +0 -1
package/lib/node/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var R,Rv=Object.create,jr=Object.defineProperty,Dv=Object.getOwnPropertyDescriptor,Bv=Object.getOwnPropertyNames,zv=Object.getPrototypeOf,Vv=Object.prototype.hasOwnProperty,qv=(e,t,n)=>t in e?jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>jr(e,"name",{value:t,configurable:!0}),xf=(e,t)=>()=>(e&&(t=e(e=0)),t),oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tf=(e,t)=>{for(var n in t)jr(e,n,{get:t[n],enumerable:!0})},If=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Bv(t))!Vv.call(e,i)&&i!==n&&jr(e,i,{get:()=>t[i],enumerable:!(r=Dv(t,i))||r.enumerable});return e},on=(e,t,n)=>(n=null!=e?Rv(zv(e)):{},If(!t&&e&&e.__esModule?n:jr(n,"default",{value:e,enumerable:!0}),e)),Ue=e=>If(jr({},"__esModule",{value:!0}),e),f=(e,t,n)=>(qv(e,"symbol"!=typeof t?t+"":t,n),n),uu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},g=(e,t,n)=>(uu(e,t,"read from private field"),n?n.call(e):t.get(e)),G=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},X=(e,t,n,r)=>(uu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),lu=(e,t,n,r)=>({set _(r){X(e,t,r,n)},get _(){return g(e,t,r)}}),Je=(e,t,n)=>(uu(e,t,"access private method"),n),v=xf((()=>{R={env:{NODE_ENV:"production",npm_package_version:"5.50.0"}}})),Sf=oe(((e,t)=>{v(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var a=s((function(e){this.message=e}),"InvalidCharacterError");a.prototype=new Error,a.prototype.name="InvalidCharacterError";var l=s((function(e){throw new a(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,d=s((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 n,r,i=0,o="",a=-1;++a<t;)r=u.indexOf(e.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),h={encode:s((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,n,r,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,n=e.charCodeAt(++s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+n)>>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(r&&!r.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(r[p]=h[p]);else n.base64=h}(e)})),Pf=oe(((e,t)=>{var n,r;v(),n=typeof self<"u"?self:e,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return s(n,"r"),n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n.r(t),n.d(t,"computeDestinationPoint",(function(){return N})),n.d(t,"convertArea",(function(){return R})),n.d(t,"convertDistance",(function(){return j})),n.d(t,"convertSpeed",(function(){return D})),n.d(t,"decimalToSexagesimal",(function(){return W})),n.d(t,"findNearest",(function(){return q})),n.d(t,"getAreaOfPolygon",(function(){return Y})),n.d(t,"getBounds",(function(){return K})),n.d(t,"getBoundsOfDistance",(function(){return J})),n.d(t,"getCenter",(function(){return H})),n.d(t,"getCenterOfBounds",(function(){return Z})),n.d(t,"getCompassDirection",(function(){return Q})),n.d(t,"getCoordinateKey",(function(){return v})),n.d(t,"getCoordinateKeys",(function(){return E})),n.d(t,"getDistance",(function(){return z})),n.d(t,"getDistanceFromLine",(function(){return ee})),n.d(t,"getGreatCircleBearing",(function(){return te})),n.d(t,"getLatitude",(function(){return A})),n.d(t,"getLongitude",(function(){return P})),n.d(t,"getPathLength",(function(){return re})),n.d(t,"getPreciseDistance",(function(){return ie})),n.d(t,"getRhumbLineBearing",(function(){return $})),n.d(t,"getRoughCompassDirection",(function(){return oe})),n.d(t,"getSpeed",(function(){return ae})),n.d(t,"isDecimal",(function(){return y})),n.d(t,"isPointInLine",(function(){return se})),n.d(t,"isPointInPolygon",(function(){return le})),n.d(t,"isPointNearLine",(function(){return ue})),n.d(t,"isPointWithinRadius",(function(){return ce})),n.d(t,"isSexagesimal",(function(){return m})),n.d(t,"isValidCoordinate",(function(){return I})),n.d(t,"isValidLatitude",(function(){return x})),n.d(t,"isValidLongitude",(function(){return S})),n.d(t,"orderByDistance",(function(){return X})),n.d(t,"sexagesimalToDecimal",(function(){return _})),n.d(t,"toDecimal",(function(){return T})),n.d(t,"toRad",(function(){return F})),n.d(t,"toDeg",(function(){return L})),n.d(t,"wktToPolygon",(function(){return pe})),n.d(t,"sexagesimalPattern",(function(){return r})),n.d(t,"earthRadius",(function(){return i})),n.d(t,"MINLAT",(function(){return o})),n.d(t,"MAXLAT",(function(){return a})),n.d(t,"MINLON",(function(){return l})),n.d(t,"MAXLON",(function(){return u})),n.d(t,"longitudeKeys",(function(){return c})),n.d(t,"latitudeKeys",(function(){return d})),n.d(t,"altitudeKeys",(function(){return h})),n.d(t,"distanceConversion",(function(){return p})),n.d(t,"timeConversion",(function(){return f})),n.d(t,"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,a=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=s((function(e,t){return t.reduce((function(t,n){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&void 0!==n&&void 0===t?(t=n,n):t}),void 0)}),"m"),y=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=s((function(e){return r.test(e.toString().trim())}),"p"),_=s((function(e){var t=new RegExp(r).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var n=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+n+i;return["S","W"].includes(t[7])?-o:o}),"y");function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(b,"b"),s(w,"M"),s(M,"O");var E=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},n=v(e,t.longitude),r=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:r,longitude:n},i?{altitude:i}:{})}),"S"),x=s((function e(t){return y(t)?!(parseFloat(t)>a||t<o):!!m(t)&&e(_(t))}),"t"),S=s((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(_(t))}),"t"),I=s((function(e){var t=E(e),n=t.latitude,r=t.longitude;if(Array.isArray(e)&&e.length>=2)return S(e[0])&&x(e[1]);if(void 0===n||void 0===r)return!1;var i=e[r],o=e[n];return void 0!==o&&void 0!==i&&!1!==x(o)&&!1!==S(i)}),"j");function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(k,"w"),s(C,"x"),s(O,"E");var T=s((function e(t){if(y(t))return Number(t);if(m(t))return _(t);if(I(t)){var n=E(t);return Array.isArray(t)?t.map((function(t,n){return[0,1].includes(n)?e(t):t})):C(C(C({},t),n.latitude&&O({},n.latitude,e(t[n.latitude]))),n.longitude&&O({},n.longitude,e(t[n.longitude])))}return Array.isArray(t)?t.map((function(t){return I(t)?e(t):t})):t}),"t"),A=s((function(e,t){var n=v(e,d);if(null!=n){var r=e[n];return!0===t?r:T(r)}}),"A"),P=s((function(e,t){var n=v(e,c);if(null!=n){var r=e[n];return!0===t?r:T(r)}}),"I"),F=s((function(e){return e*Math.PI/180}),"W"),L=s((function(e){return 180*e/Math.PI}),"D"),N=s((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/r,s=F(n),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=L(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=L(p)),{latitude:L(h),longitude:f}}),"F"),R=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=g[t];if(n)return e*n;throw new Error("Invalid unit used for area conversion.")}),"C"),j=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=p[t];if(n)return e*n;throw new Error("Invalid unit used for distance conversion.")}),"k"),D=s((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 n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}s(B,"q"),s(U,"$");var G=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),W=s((function(e){var t=B(e.toString().split("."),2),n=t[0],r=t[1],i=Math.abs(Number(n)),o=G(60*+("0."+(r||0))),a=Math.floor(o),s=G(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"),V=s((function(e){return e>1?1:e<-1?-1:e}),"X"),z=s((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n=void 0===n||isNaN(n)?1:n;var r=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(V(Math.sin(F(a))*Math.sin(F(r))+Math.cos(F(a))*Math.cos(F(r))*Math.cos(F(o)-F(s))))*i;return Math.round(l/n)*n}),"_"),X=s((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;return n="function"==typeof n?n:z,t.slice().sort((function(t,r){return n(e,t)-n(e,r)}))}),"K"),q=s((function(e,t){return X(e,t)[0]}),"Y"),Y=s((function(e){var t=0;if(e.length>2){for(var n,r,o,a=0;a<e.length;a++){a===e.length-2?(n=e.length-2,r=e.length-1,o=0):a===e.length-1?(n=e.length-1,r=0,o=1):(n=a,r=a+1,o=a+2);var s=P(e[n]),l=A(e[r]),u=P(e[o]);t+=(F(u)-F(s))*Math.sin(F(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),K=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var n=A(t),r=P(t);return{maxLat:Math.max(n,e.maxLat),minLat:Math.min(n,e.minLat),maxLng:Math.max(r,e.maxLng),minLng:Math.min(r,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),J=s((function(e,t){var n,r,s=A(e),c=P(e),d=F(s),h=F(c),p=t/i,f=d-p,g=d+p,v=F(a),y=F(o),m=F(u),_=F(l);if(f>y&&g<v){var b=Math.asin(Math.sin(p)/Math.cos(d));(n=h-b)<_&&(n+=2*Math.PI),(r=h+b)>m&&(r-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),n=_,r=m;return[{latitude:L(f),longitude:L(n)},{latitude:L(g),longitude:L(r)}]}),"V"),H=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,n=e.reduce((function(e,t){var n=F(A(t)),r=F(P(t));return{X:e.X+Math.cos(n)*Math.cos(r),Y:e.Y+Math.cos(n)*Math.sin(r),Z:e.Z+Math.sin(n)}}),{X:0,Y:0,Z:0}),r=n.X/t,i=n.Y/t,o=n.Z/t;return{longitude:L(Math.atan2(i,r)),latitude:L(Math.atan2(o,Math.sqrt(r*r+i*i)))}}),"U"),Z=s((function(e){var t=K(e),n=t.minLat+(t.maxLat-t.minLat)/2,r=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(n.toFixed(6)),longitude:parseFloat(r.toFixed(6))}}),"z"),$=s((function(e,t){var n=F(P(t))-F(P(e)),r=Math.log(Math.tan(F(A(t))/2+Math.PI/4)/Math.tan(F(A(e))/2+Math.PI/4));return Math.abs(n)>Math.PI&&(n=n>0?-1*(2*Math.PI-n):2*Math.PI+n),(L(Math.atan2(n,r))+360)%360}),"H"),Q=s((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$,r="function"==typeof n?n(e,t):$(e,t);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"),ee=s((function(e,t,n){var r=z(t,e),i=z(e,n),o=z(t,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"),te=s((function(e,t){var n=A(t),r=P(t),i=A(e),o=P(e);return(L(Math.atan2(Math.sin(F(r)-F(o))*Math.cos(F(n)),Math.cos(F(i))*Math.sin(F(n))-Math.sin(F(i))*Math.cos(F(n))*Math.cos(F(r)-F(o))))+360)%360}),"tt");function ne(e){return(ne="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)}s(ne,"nt");var re=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return e.reduce((function(e,n){return"object"===ne(e)&&null!==e.last&&(e.distance+=t(n,e.last)),e.last=n,e}),{last:null,distance:0}).distance}),"rt"),ie=s((function(e,t){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,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)))),_=Math.atan((1-v)*Math.tan(F(parseFloat(p)))),b=Math.sin(m),w=Math.cos(m),M=Math.sin(_),E=Math.cos(_),x=y,S=100;do{var I=Math.sin(x),k=Math.cos(x);if(0===(u=Math.sqrt(E*I*(E*I)+(w*M-b*E*k)*(w*M-b*E*k))))return 0;r=b*M+w*E*k,o=Math.atan2(u,r),l=r-2*b*M/(s=1-(a=w*E*I/u)*a),isNaN(l)&&(l=0);var C=v/16*s*(4+v*(4-3*s));c=x,x=y+(1-C)*v*a*(o+C*u*(l+C*r*(2*l*l-1)))}while(Math.abs(x-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)),L=O/1024*(256+O*(O*(74-47*O)-128)),N=L*u*(l+L/4*(r*(2*l*l-1)-L/6*l*(4*u*u-3)*(4*l*l-3))),R=g*T*(o-N);return Math.round(R/n)*n}),"et"),oe=s((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=s((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z,r=n(e,t),i=Number(t.time)-Number(e.time),o=r/i*1e3;return o}),"ot"),se=s((function(e,t,n){return z(t,e)+z(e,n)===z(t,n)}),"ut"),le=s((function(e,t){for(var n=!1,r=t.length,i=-1,o=r-1;++i<r;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])&&(n=!n);return n}),"at"),ue=s((function(e,t,n,r){return ee(e,t,n)<r}),"ct"),ce=s((function(e,t,n){return z(e,t)<n}),"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 n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))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 n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}s(de,"st"),s(he,"lt");var pe=s((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),n=t[0],r=t[1];return{longitude:parseFloat(n),latitude:parseFloat(r)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof e?e.geolib=r():n.geolib=r()})),We={};function Hv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xu(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $v(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Kv(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function Jv(e,t){return function(n,r){t(n,r,e)}}function Qv(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Zv(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function ey(e,t){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(l){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=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function ty(e,t){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(t,n)&&Su(t,e,n)}function Iu(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ff(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ny(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ff(arguments[t]));return e}function ry(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function iy(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function xi(e){return this instanceof xi?(this.v=e,this):new xi(e)}function ay(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof xi?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 oy(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:xi(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function sy(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof Iu?Iu(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function uy(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function cy(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Su(t,e,n);return ly(t,e),t}function dy(e){return e&&e.__esModule?e:{default:e}}function py(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function fy(e,t,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 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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function hy(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)}Tf(We,{__assign:()=>Tu,__asyncDelegator:()=>oy,__asyncGenerator:()=>ay,__asyncValues:()=>sy,__await:()=>xi,__awaiter:()=>Zv,__classPrivateFieldGet:()=>py,__classPrivateFieldIn:()=>hy,__classPrivateFieldSet:()=>fy,__createBinding:()=>Su,__decorate:()=>Kv,__exportStar:()=>ty,__extends:()=>Hv,__generator:()=>ey,__importDefault:()=>dy,__importStar:()=>cy,__makeTemplateObject:()=>uy,__metadata:()=>Qv,__param:()=>Jv,__read:()=>Ff,__rest:()=>$v,__spread:()=>ny,__spreadArray:()=>iy,__spreadArrays:()=>ry,__values:()=>Iu});var xu,Tu,Su,ly,Ye=xf((()=>{v(),xu=s((function(e,t){return(xu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics"),s(Hv,"__extends"),Tu=s((function(){return Tu=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Tu.apply(this,arguments)}),"__assign"),s($v,"__rest"),s(Kv,"__decorate"),s(Jv,"__param"),s(Qv,"__metadata"),s(Zv,"__awaiter"),s(ey,"__generator"),Su=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},s(ty,"__exportStar"),s(Iu,"__values"),s(Ff,"__read"),s(ny,"__spread"),s(ry,"__spreadArrays"),s(iy,"__spreadArray"),s(xi,"__await"),s(ay,"__asyncGenerator"),s(oy,"__asyncDelegator"),s(sy,"__asyncValues"),s(uy,"__makeTemplateObject"),ly=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(cy,"__importStar"),s(dy,"__importDefault"),s(py,"__classPrivateFieldGet"),s(fy,"__classPrivateFieldSet"),s(hy,"__classPrivateFieldIn")})),Rf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Df=oe((e=>{var t;v(),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={}))})),Bf=oe((e=>{var t;v(),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"})),zf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),Vf=oe((e=>{var t;v(),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"})),qf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),_t=oe((e=>{v(),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=Rf();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var n=Df();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return n.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return n.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return n.RevenueProperty}});var r=Bf();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}});var i=zf();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=Vf();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=qf();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),Ai=oe((e=>{v(),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"})),Ou=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=(Ye(),Ue(We)),n=s((function(t){if(Object.keys(t).length>1e3)return!1;for(var n in t){var r=t[n];if(!(0,e.isValidProperties)(n,r))return!1}return!0}),"isValidObject");e.isValidObject=n;var r=s((function(n,r){var i,o;if("string"!=typeof n)return!1;if(Array.isArray(r)){var a=!0;try{for(var s=t.__values(r),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==r)return!1;if("object"==typeof r)return(0,e.isValidObject)(r);if(!["number","string","boolean"].includes(typeof r))return!1}return!0}),"isValidProperties");e.isValidProperties=r})),Au=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Ai(),i=Ou(),o=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(n.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(n.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(n.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(n.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(n.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(n.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(n.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(n.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(n.IdentifyOperation.UNSET,e,r.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[n.IdentifyOperation.CLEAR_ALL]=r.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return void 0===this._properties[n.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===n.IdentifyOperation.ADD?"number"==typeof r:e===n.IdentifyOperation.UNSET||e===n.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,r))},e}();e.Identify=o})),Cu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Au(),i=s((function(e,n,r){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),r),n&&{event_properties:n})}),"createTrackEvent");e.createTrackEvent=i;var o=s((function(e,r){return t.__assign(t.__assign({},r),{event_type:n.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=o;var a=s((function(e,r,i,o){var a;return t.__assign(t.__assign({},o),{event_type:n.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=r,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=a;var l=s((function(e,i,o){var a,s=new r.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:n.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=s((function(e,r){return t.__assign(t.__assign({},r),{event_type:n.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),So=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=_t(),n=s((function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=t.Status.Unknown),{event:e,code:n,message:r}}),"buildResult");e.buildResult=n})),Uf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=(Ye(),Ue(We)),n=_t(),r=So(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(n)];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(n){t.queue.push([e,n]),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===n.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&&(_=u.return)&&_.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===n.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(),b={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(b)throw b.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===n.PluginType.DESTINATION})),y=v.map((function(e){var n=t.__assign({},o);return e.execute(n).catch((function(e){return(0,r.buildResult)(n,0,String(e))}))})),Promise.all(y).then((function(e){var n=t.__read(e,1)[0];s(n)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,r,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(),r=this.plugins.filter((function(e){return e.type===n.PluginType.DESTINATION})),i=r.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),ju=oe((e=>{v(),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"})),Yf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=(Ye(),Ue(We)),n=Cu(),r=Uf(),i=So(),o=ju(),a=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 r.Timeline,this.name=e}return s(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 n,r,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:n=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),r=t.__values(n),i=r.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=r.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=r.return)&&s.call(r)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,r){var i=(0,n.createTrackEvent)(e,t,r);return this.dispatch(i)},e.prototype.identify=function(e,t){var r=(0,n.createIdentifyEvent)(e,t);return this.dispatch(r)},e.prototype.groupIdentify=function(e,t,r,i){var o=(0,n.createGroupIdentifyEvent)(e,t,r,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,r){var i=(0,n.createGroupEvent)(e,t,r);return this.dispatch(i)},e.prototype.revenue=function(e,t){var r=(0,n.createRevenueEvent)(e,t);return this.dispatch(r)},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,o.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){n.dispatchQ.push(n.dispatchWithCallback.bind(n,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n,r,a;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,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(a=t.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return n=t.sent(),r=String(n),this.config.loggerProvider.error(r),[2,a=(0,i.buildResult)(e,0,r)];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=a})),Xf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Ou(),i=function(){function e(){this.productId="",this.quantity=1,this.price=0}return s(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,r.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[n.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[n.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[n.RevenueProperty.REVENUE_PRICE]=this.price,e[n.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[n.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),Hf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=s((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),Nu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=_t(),n="Amplitude Logger ",r=function(){function e(){this.logLevel=t.LogLevel.None}return s(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=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Verbose||console.log("".concat(n,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Warn||console.warn("".concat(n,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Error||console.error("".concat(n,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Debug||console.log("".concat(n,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=r})),Fu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=_t(),n=Ai(),r=Nu(),i=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new r.Logger,optOut:!1,serverUrl:n.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var o=function(){function t(t){var n,r,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!==(n=t.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(r=t.optOut)&&void 0!==r?r: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 s(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=o;var a=s((function(e,r){return e===t.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");e.getServerUrl=a;var l=s((function(n,r,i){if(void 0===n&&(n=""),void 0===r&&(r=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),n)return{serverUrl:n,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(r)?r:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),$f=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=(Ye(),Ue(We)),n=_t(),r=ju(),i=Ai(),o=Hf(),a=So(),l=Fu(),u=function(){function e(){this.name="amplitude",this.type=n.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var r,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===(n=this.config.storageProvider)||void 0===n?void 0:n.get(this.storageKey)];case 1:return r=t.sent(),this.saveEvents(),r&&r.length>0&&Promise.all(r.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(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,r.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 n,r,i,a=this;return t.__generator(this,(function(t){switch(t.label){case 0:return n=[],r=[],this.queue.forEach((function(e){return 0===e.timeout?n.push(e):r.push(e)})),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(t){return a.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,n){return void 0===n&&(n=!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,r.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var n=e.event;n.extra;return t.__rest(n,["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,r.UNEXPECTED_ERROR_MESSAGE),[2];if(!n){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 n.Status.Success:this.handleSuccessResponse(e,t);break;case n.Status.Invalid:this.handleInvalidResponse(e,t);break;case n.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case n.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,r.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,n){var i=this;if(e.body.missingField||e.body.error.startsWith(r.INVALID_API_KEY))this.fulfillRequest(n,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=n.filter((function(t,n){if(!a.has(n))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,n){1!==n.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(n),!1))):this.fulfillRequest(n,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,n){var r=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=n.filter((function(t,n){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(n)&&(t.timeout=r.throttleTimeout),!0;r.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var n=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*n.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback((0,a.buildResult)(e.event,t,n))}))},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})),Jf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=(Ye(),Ue(We)),n=s((function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(n),!1))}}}),"returnWrapper");e.returnWrapper=n})),Qf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=(Ye(),Ue(We)),n=_t(),r=s((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=r;var i=s((function(e){return function(){var n=t.__assign({},e.config);return{logger:n.loggerProvider,logLevel:n.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var o=s((function(e,n){var r,i;n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(n.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e}),"getValueByStringPath");e.getValueByStringPath=o;var a=s((function(n,r){return function(){var i,o,a={};try{for(var s=t.__values(r),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(n,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=a;var l=s((function(t,r,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<n.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:r,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})),Zf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=s((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})),eh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=(Ye(),Ue(We)),n=function(){function e(){this.memoryStorage=new Map}return s(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 n;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(n=t.sent())?JSON.stringify(n):void 0]}}))}))},e.prototype.set=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,n),[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=n})),th=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=_t(),n=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var n,r,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,_,b,w,M,E;if("object"!=typeof e)return null;var x=e.code||0,S=this.buildStatus(x);switch(S){case t.Status.Success:return{status:S,statusCode:x,body:{eventsIngested:null!==(n=e.events_ingested)&&void 0!==n?n:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:S,statusCode:x,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:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:S,statusCode:x,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(_=e.throttled_devices)&&void 0!==_?_:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},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!==(E=e.throttled_events)&&void 0!==E?E:[]}};case t.Status.Timeout:default:return{status:S,statusCode:x}}},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=n})),ln=oe((e=>{v(),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=Yf();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var n=Au();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return n.Identify}});var r=Xf();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return r.Revenue}});var i=$f();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=Fu();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=Nu();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=Ai();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=Jf();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=Qf();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=Zf();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=eh();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=th();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=Cu();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),Vo=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),Bu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=Vo(),n=s((function(){var n,r=(0,t.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(t,n){var r=n.split("=",2),i=(0,e.tryDecodeURIComponent)(r[0]),o=(0,e.tryDecodeURIComponent)(r[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=n;var r=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=r})),qo=oe((e=>{v(),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"})),zu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=(Ye(),Ue(We)),n=Bu(),r=qo(),i=function(){function e(){}return s(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({},r.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,n.getQueryParams)();return{utm_campaign:e[r.UTM_CAMPAIGN],utm_content:e[r.UTM_CONTENT],utm_id:e[r.UTM_ID],utm_medium:e[r.UTM_MEDIUM],utm_source:e[r.UTM_SOURCE],utm_term:e[r.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=(0,n.getQueryParams)();return(e={})[r.DCLID]=t[r.DCLID],e[r.FBCLID]=t[r.FBCLID],e[r.GBRAID]=t[r.GBRAID],e[r.GCLID]=t[r.GCLID],e[r.KO_CLICK_ID]=t[r.KO_CLICK_ID],e[r.MSCLKID]=t[r.MSCLKID],e[r.TTCLID]=t[r.TTCLID],e[r.TWCLID]=t[r.TWCLID],e[r.WBRAID]=t[r.WBRAID],e},e}();e.CampaignParser=i})),Uo=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=ln(),n=s((function(e,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[t.AMPLITUDE_PREFIX,n,e.substring(0,r)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=n;var r=s((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=r})),oh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=(Ye(),Ue(We)),n=ln(),r=Uo(),i=zu(),o=qo(),a=function(){function e(e,t){var n,a;this.storage=t.storage,this.storageKey=(0,r.getCookieName)(e,o.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!==(n=t.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=t.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,n,r){void 0===r&&(r=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=n||{},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=r?l(i||"")!==l(s||""):i!==s;return!n||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 r=this,i=t.__assign(t.__assign({},o.BASE_CAMPAIGN),e),a=Object.entries(i).reduce((function(e,n){var i=t.__read(n,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||r.initialEmptyValue),a?e.set(o,a):e.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 t.__assign(t.__assign({},(0,n.createIdentifyEvent)(a)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n,r;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return n=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(r=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(n,r))return[2];this.onNewCampaign(n)}return[4,this.track(this.createCampaignEvent(n))];case 3:return t.sent(),[4,this.saveCampaignToStorage(n)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=a;var l=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),sh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=(Ye(),Ue(We)),n=Vo(),r=function(){function e(e){this.options=t.__assign({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var r,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=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,r)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===r];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 n;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(n=t.sent()))return[2,void 0];try{try{n=decodeURIComponent(atob(n))}catch{}return[2,JSON.parse(n)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,n.getGlobalScope)(),o=null!==(r=null==i?void 0:i.document.cookie.split("; "))&&void 0!==r?r:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,r){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!==r?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),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,n.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=r})),uh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=(Ye(),Ue(We)),n=Uo(),r=function(){function e(e,t){this.storage=e,this.storageKey=(0,n.getCookieName)(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var n;return t.__generator(this,(function(t){switch(t.label){case 0:return n=this,[4,this.storage.get(this.storageKey)];case 1:return n.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=r})),lh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=(Ye(),Ue(We)),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),s(n,"FetchTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var r,i;return t.__generator(this,(function(t){switch(t.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(e,r)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},n}(ln().BaseTransport);e.FetchTransport=n})),dh=oe(((e,t)=>{var n,r;v(),n=e,r=function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return r(null==t&&n.path)}},n.exports),n.exports}function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}s(n,"createCommonjsModule"),s(r,"commonjsRequire");var i=n((function(e,n){!function(t,r){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",E="ASUS",x="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",L="Samsung",N="Sony",R="Xiaomi",j="Zebra",D="Facebook",B=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),U=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),G=s((function(e,t){return typeof e===l&&-1!==W(t).indexOf(W(e))}),"has"),W=s((function(e){return e.toLowerCase()}),"lowerize"),V=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),z=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),X=s((function(e,t){for(var n,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(n=o=0;n<h.length&&!u;)if(u=h[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&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]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;d+=2}}),"rgxMapper"),q=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;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"},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)\/([-\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,q,{"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,W]],[/((?: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/,"",W]],[/(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,W]]],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,L],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,L],[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,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,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[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,x],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,E],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,E],[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,j],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,j],[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,N],[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,L],[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,N],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,C],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,j],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/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,q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,q,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,x]],[/(?: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]]},J=s((function(e,n){if(typeof e===a&&(n=e,e=r),!(this instanceof J))return new J(e,n).getResult();var i=e||(typeof t!==o&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),s=n?B(K,n):K;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=r,X.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[u]=r,e[d]=r,X.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");J.VERSION="0.7.31",J.BROWSER=U([c,p,"major"]),J.CPU=U([f]),J.DEVICE=U([u,h,d,g,v,m,y,_,b]),J.ENGINE=J.OS=U([c,p]),e.exports&&(n=e.exports=J),n.UAParser=J;var H=typeof t!==o&&(t.jQuery||t.Zepto);if(H&&!H.ua){var Z=new J;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 n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:t)})),o=function(){function e(){this.ua=new i.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:a(this.ua),deviceModel:l(this.ua)}},e}(),a=s((function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=function(){function e(){this.queue=[]}return s(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=s((function(){return d=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=s((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++)if(i[r]===n)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(n){h(e[n],t[n])||(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),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),n=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],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 n.userProperties=t,this},commit:function(){return e.setIdentity(n),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 o}return s(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"?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).Experiment={})})),Uu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=dh(),n=s((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=n})),fh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Uu(),i=function(){function e(){this.name="identity",this.type=n.PluginType.BEFORE,this.identityStore=(0,r.getAnalyticsConnector)().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n;return t.__generator(this,(function(t){return(n=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),hh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=s((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");e.getLanguage=t})),hr=oe((e=>{v(),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=zu();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var n=oh();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return n.CampaignTracker}});var r=Bu();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return r.getQueryParams}});var i=Uo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=sh();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=uh();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=lh();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=Uu();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=fh();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=hh();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=qo();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=Vo();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),Wu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=s((function(t,n){(0,e.convertProxyObjectToRealObject)(t,n)}),"runQueuedFunctions");e.runQueuedFunctions=t;var n=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,a=r.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=n;var r=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=r})),Yu=oe(((e,t)=>{v(),function(n,r){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",E="ASUS",x="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",L="Samsung",N="Sony",R="Xiaomi",j="Zebra",D="Facebook",B=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),U=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),G=s((function(e,t){return typeof e===l&&-1!==W(t).indexOf(W(e))}),"has"),W=s((function(e){return e.toLowerCase()}),"lowerize"),V=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),z=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),X=s((function(e,t){for(var n,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(n=o=0;n<h.length&&!u;)if(u=h[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&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]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;d+=2}}),"rgxMapper"),q=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;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"},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)\/([-\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,q,{"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,W]],[/((?: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/,"",W]],[/(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,W]]],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,L],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,L],[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,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,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[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,x],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,E],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,E],[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,j],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,j],[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,N],[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,L],[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,N],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,C],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,j],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/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,q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,q,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,x]],[/(?: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]]},J=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof J))return new J(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?B(K,t):K;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=r,X.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[u]=r,e[d]=r,X.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");J.VERSION="0.7.31",J.BROWSER=U([c,p,"major"]),J.CPU=U([f]),J.DEVICE=U([u,h,d,g,v,m,y,_,b]),J.ENGINE=J.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=J),e.UAParser=J):typeof define===i&&define.amd?define((function(){return J})):typeof n!==o&&(n.UAParser=J);var H=typeof n!==o&&(n.jQuery||n.Zepto);if(H&&!H.ua){var Z=new J;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 n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),mh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),vh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=(Ye(),Ue(We)),n=_t(),r=t.__importDefault(Yu()),i=ln(),o=hr(),a=mh(),l=function(){function e(){var e;this.name="context",this.type=n.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(a.VERSION),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new r.default(e).getResult()}return s(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 n,r,a,s,l;return t.__generator(this,(function(u){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,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: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:l}),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}}),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})),Xu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=(Ye(),Ue(We)),n=hr(),r=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var r,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=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,r)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===r];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 n;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(n=t.sent())?[2,JSON.parse(n)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(r=(0,n.getGlobalScope)())||void 0===r?void 0:r.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,r){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,n.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(r))}catch{}return[2]}))}))},e.prototype.remove=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(r=(0,n.getGlobalScope)())||void 0===r||r.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,n.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();e.LocalStorage=r})),yh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=(Ye(),Ue(We)),n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(n,e),s(n,"XHRTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var r=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===r.state.done)try{var e=o.responseText,n=JSON.parse(e),a=r.buildResponse(n);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(n))}))]}))}))},n}(ln().BaseTransport);e.XHRTransport=n})),bh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=(Ye(),Ue(We)),n=hr(),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),s(r,"SendBeaconTransport"),r.prototype.send=function(e,r){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,n.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(r);return t(a.navigator.sendBeacon(e,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(e){o(e)}}))]}))}))},r}(ln().BaseTransport);e.SendBeaconTransport=r})),kh=oe((e=>{v();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 n=(Ye(),Ue(We)),r=_t(),i=ln(),o=hr(),a=Xu(),l=yh(),u=bh(),c=s((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new o.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 o.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function r(r,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,_=(0,e.getDefaultConfig)();return(m=t.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!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:_.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:_.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!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:_.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:_.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:_.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:_.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:_.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:_.trackingOptions,m.userId=i,m}return n.__extends(r,t),s(r,"BrowserConfig"),Object.defineProperty(r.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.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(r.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),r}(i.Config);e.BrowserConfig=d;var h=s((function(r,i,a){return n.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,_,b,w,M,E;return n.__generator(this,(function(x){switch(x.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(_=null==a?void 0:a.domain)&&void 0!==_?(l=_,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=x.sent(),x.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(n.__assign(n.__assign({},a),{domain:s}))];case 4:return u=x.sent(),c=(0,o.getCookieName)(r),[4,u.get(c)];case 5:return h=x.sent(),p=(0,o.getQueryParams)(),[4,new o.SessionManager(u,r).load()];case 6:return f=x.sent(),g=d.bind,v=[void 0,r,null!=i?i:null==h?void 0:h.userId],y=[n.__assign({},a)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,p.deviceId),domain:s,optOut:null!==(b=null==a?void 0:a.optOut)&&void 0!==b?b:!(null==h||!h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=x.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==a?void 0:a.sessionId,[4,(0,e.createEventsStorage)(a)];case 8:return[2,new(g.apply(d,v.concat([n.__assign.apply(void 0,y.concat([(m.storageProvider=x.sent(),m.trackingOptions=n.__assign(n.__assign({},t.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(E=null==a?void 0:a.transportProvider)&&void 0!==E?E:(0,e.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=s((function(r,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),n.__awaiter(t,void 0,void 0,(function(){var t,o,a;return n.__generator(this,(function(s){switch(s.label){case 0:return t=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,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=s((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){switch(n.label){case 0:return t=new o.CookieStorage({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(r=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:r=!n.sent(),n.label=2;case 2:return r?[4,(t=new a.LocalStorage).isEnabled()]:[3,4];case 3:n.sent()||(t=new i.MemoryStorage),n.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=s((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r,i,o,s,l,u;return n.__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=n.__values([null==e?void 0:e.storageProvider,new a.LocalStorage]),r=t.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=t.next(),[3,2];case 6:return[3,9];case 7:return s=c.sent(),l={error:s},[3,9];case 8:try{r&&!r.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 y=s((function(e,t,n){return t||n||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=y;var m=s((function(t){return t===r.TransportType.XHR?new l.XHRTransport:t===r.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var _=s((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r,i,a,s,l,u,c;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!n.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,r=t.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?(l=i[s],u={domain:"."+l},[4,(c=new o.CookieStorage(u)).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,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=_})),Eh=oe((e=>{v();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var n=(Ye(),Ue(We)),r=hr(),i=Xu(),o=s((function(o,a){return n.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return n.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new r.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,r.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=n.__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=o;var a=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=a;var l=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode");e.decode=l})),el=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=(Ye(),Ue(We)),n=ln(),r=hr(),i=Wu(),o=vh(),a=kh(),l=Eh(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),s(u,"AmplitudeBrowser"),u.prototype.init=function(i,s,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,a.useBrowserConfig)(i,s||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,r.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 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(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,n){return void 0===n&&(n=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,s;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,a.createFlexibleStorage)(this.config)];case 1:return s=l.sent(),[4,new r.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:s,track:i,onNewCampaign:o})).send(n)];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,n.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,a.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,r){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(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),e.prototype.identify.call(this,t,r)},u.prototype.groupIdentify=function(t,r,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new n.Identify,s)}return e.prototype.groupIdentify.call(this,t,r,o,a)},u.prototype.revenue=function(t,r){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new n.Revenue,o)}return e.prototype.revenue.call(this,t,r)},u}(n.AmplitudeCore);e.AmplitudeBrowser=u;var c=s((function(){var e=new u;return{init:(0,n.debugWrapper)((0,n.returnWrapper)(e.init.bind(e)),"init",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),add:(0,n.debugWrapper)((0,n.returnWrapper)(e.add.bind(e)),"add",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,n.debugWrapper)((0,n.returnWrapper)(e.remove.bind(e)),"remove",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,n.debugWrapper)((0,n.returnWrapper)(e.track.bind(e)),"track",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,n.debugWrapper)((0,n.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,n.debugWrapper)((0,n.returnWrapper)(e.identify.bind(e)),"identify",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,n.debugWrapper)((0,n.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,n.debugWrapper)((0,n.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,n.debugWrapper)((0,n.returnWrapper)(e.revenue.bind(e)),"revenue",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,n.debugWrapper)((0,n.returnWrapper)(e.flush.bind(e)),"flush",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,n.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId"])),setUserId:(0,n.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,n.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,n.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.deviceId"])),reset:(0,n.debugWrapper)(e.reset.bind(e),"reset",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,n.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setSessionId:(0,n.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setOptOut:(0,n.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setTransport:(0,n.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Sh=oe((e=>{v(),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=(Ye(),Ue(We)),n=t.__importDefault(el()),r=el();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return r.createInstance}}),e.add=n.default.add,e.flush=n.default.flush,e.getDeviceId=n.default.getDeviceId,e.getSessionId=n.default.getSessionId,e.getUserId=n.default.getUserId,e.groupIdentify=n.default.groupIdentify,e.identify=n.default.identify,e.init=n.default.init,e.logEvent=n.default.logEvent,e.remove=n.default.remove,e.reset=n.default.reset,e.revenue=n.default.revenue,e.setDeviceId=n.default.setDeviceId,e.setGroup=n.default.setGroup,e.setOptOut=n.default.setOptOut,e.setSessionId=n.default.setSessionId,e.setTransport=n.default.setTransport,e.setUserId=n.default.setUserId,e.track=n.default.track;var i=Wu();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=ln();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(_t())})),lg=oe(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[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]",y="[object Set]",m="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[o]=x[b]=x[a]=x[w]=x[l]=x[u]=x[c]=x[d]=x[h]=x[p]=x[g]=x[y]=x[m]=x[_]=!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 L(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function R(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function j(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function D(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function U(e,t){return null==e?void 0:e[t]}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(L,"arrayFilter"),s(N,"arrayPush"),s(R,"arraySome"),s(j,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(G,"mapToArray"),s(W,"overArg"),s(V,"setToArray");var z,X=Array.prototype,q=Function.prototype,Y=Object.prototype,K=k["__core-js_shared__"],J=q.toString,H=Y.hasOwnProperty,Z=(z=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",$=Y.toString,Q=RegExp("^"+J.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=T?k.Buffer:void 0,te=k.Symbol,ne=k.Uint8Array,re=Y.propertyIsEnumerable,ie=X.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=W(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=_t(ue),ve=_t(ce),ye=_t(de),me=_t(he),_e=_t(pe),be=te?te.prototype:void 0,we=be?be.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(){this.__data__=fe?fe(null):{},this.size=0}function xe(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 r=t[e];return r===n?void 0:r}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 r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(){this.__data__=[],this.size=0}function Te(e){var t=this.__data__,n=He(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Ae(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function Pe(e){return He(this.__data__,e)>-1}function Fe(e,t){var n=this.__data__,r=He(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ce),string:new Me}}function Re(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function je(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ue(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}function Ge(e){return this.__data__.set(e,n),this}function We(e){return this.__data__.has(e)}function Ve(e){var t=this.__data__=new Ce(e);this.size=t.size}function ze(){this.__data__=new Ce,this.size=0}function Xe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}function Ke(e,t){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this}function Je(e,t){var n=Mt(e),r=!n&&wt(e),i=!n&&!r&&xt(e),o=!n&&!r&&!i&&Tt(e),a=n||r||i||o,s=a?j(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 n=e.length;n--;)if(bt(e[n][0],t))return n;return-1}function Ze(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(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,n,r,i){return e===t||(null==e||null==t||!Ot(e)&&!Ot(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,a,s){var l=Mt(e),u=Mt(t),c=l?o:pt(e),d=u?o:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&xt(e)){if(!xt(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new Ve),l||Tt(e)?ot(e,t,n,r,a,s):at(e,t,c,n,r,a,s);if(!(1&n)){var v=h&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,_=y?t.value():t;return s||(s=new Ve),a(m,_,n,r,s)}}return!!g&&(s||(s=new Ve),st(e,t,n,r,a,s))}function nt(e){return!(!Ct(e)||vt(e))&&(It(e)?Q:M).test(_t(e))}function rt(e){return Ot(e)&&kt(e.length)&&!!x[$e(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var a=1&n,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&n?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(r)var g=a?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!R(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,n,r,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,n,r,i,o,s){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case h:return bt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=G;case y:var p=1&r;if(c||(c=V),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var v=ot(c(e),c(t),r,i,o,s);return s.delete(e),v;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,n,r,i,o){var a=1&n,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(r)var v=a?r(g,f,c,t,e,o):r(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,n,r,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 n=e.__data__;return gt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=U(e,t);return nt(n)?n:void 0}function dt(e){var t=H.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=$.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(Ee,"hashClear"),s(xe,"hashDelete"),s(Se,"hashGet"),s(Ie,"hashHas"),s(ke,"hashSet"),Me.prototype.clear=Ee,Me.prototype.delete=xe,Me.prototype.get=Se,Me.prototype.has=Ie,Me.prototype.set=ke,s(Ce,"ListCache"),s(Oe,"listCacheClear"),s(Te,"listCacheDelete"),s(Ae,"listCacheGet"),s(Pe,"listCacheHas"),s(Fe,"listCacheSet"),Ce.prototype.clear=Oe,Ce.prototype.delete=Te,Ce.prototype.get=Ae,Ce.prototype.has=Pe,Ce.prototype.set=Fe,s(Le,"MapCache"),s(Ne,"mapCacheClear"),s(Re,"mapCacheDelete"),s(je,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),Le.prototype.clear=Ne,Le.prototype.delete=Re,Le.prototype.get=je,Le.prototype.has=De,Le.prototype.set=Be,s(Ue,"SetCache"),s(Ge,"setCacheAdd"),s(We,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=Ge,Ue.prototype.has=We,s(Ve,"Stack"),s(ze,"stackClear"),s(Xe,"stackDelete"),s(qe,"stackGet"),s(Ye,"stackHas"),s(Ke,"stackSet"),Ve.prototype.clear=ze,Ve.prototype.delete=Xe,Ve.prototype.get=qe,Ve.prototype.has=Ye,Ve.prototype.set=Ke,s(Je,"arrayLikeKeys"),s(He,"assocIndexOf"),s(Ze,"baseGetAllKeys"),s($e,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(at,"equalByTag"),s(st,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),L(ae(e),(function(t){return re.call(e,t)})))}:Pt,pt=$e;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||E.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 _t(e){if(null!=e){try{return J.call(e)}catch{}try{return e+""}catch{}}return""}function bt(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)!=y||pe&&pt(new pe)!=_)&&(pt=s((function(e){var t=$e(e),n=t==p?e.constructor:void 0,r=n?_t(n):"";if(r)switch(r){case ge:return w;case ve:return d;case ye:return f;case me:return y;case _e:return _}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(_t,"toSource"),s(bt,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return Ot(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function Et(e){return null!=e&&kt(e.length)&&!It(e)}s(Et,"isArrayLike");var xt=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<=r}function Ct(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ot(e){return null!=e&&"object"==typeof e}s(St,"isEqual"),s(It,"isFunction"),s(kt,"isLength"),s(Ct,"isObject"),s(Ot,"isObjectLike");var Tt=F?D(F):rt;function At(e){return Et(e)?Je(e):it(e)}function Pt(){return[]}function Ft(){return!1}s(At,"keys"),s(Pt,"stubArray"),s(Ft,"stubFalse"),t.exports=St})),Dg=oe(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[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[o]=c["[object Map]"]=c["[object Number]"]=c[a]=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,y=g&&g.exports===f,m=y&&d.process,_=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),b=_&&_.isTypedArray;function w(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function E(e){return function(t){return e(t)}}function x(e,t){return null==e?void 0:e[t]}function S(e,t){return function(n){return e(t(n))}}s(w,"apply"),s(M,"baseTimes"),s(E,"baseUnary"),s(x,"getValue"),s(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:"",L=O.toString,N=A.call(Object),R=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,U=j?j.allocUnsafe:void 0,G=S(Object.getPrototypeOf,Object),W=Object.create,V=O.propertyIsEnumerable,z=k.splice,X=D?D.toStringTag:void 0,q=function(){try{var e=qe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,H=qe(p,"Map"),Z=qe(Object,"create"),$=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(W)return W(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[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 ne(e){var t=this.__data__;if(Z){var r=t[e];return r===n?void 0:r}return P.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return Z?void 0!==t[e]:P.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,n=Ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():z.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]}function ue(e){return Ie(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function de(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new(H||oe),string:new Q}}function pe(e){var t=Xe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Xe(this,e).get(e)}function ge(e){return Xe(this,e).has(e)}function ve(e,t){var n=Xe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?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 _e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function be(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new de(r)}return n.set(e,t),this.size=n.size,this}function Ee(e,t){var n=ut(e),r=!n&&lt(e),i=!n&&!r&&ht(e),o=!n&&!r&&!i&&mt(e),a=n||r||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)||Je(u,l)))&&s.push(u);return s}function xe(e,t,n){(void 0!==n&&!st(e[t],n)||void 0===n&&!(t in e))&&ke(e,t,n)}function Se(e,t,n){var r=e[t];(!P.call(e,t)||!st(r,n)||void 0===n&&!(t in e))&&ke(e,t,n)}function Ie(e,t){for(var n=e.length;n--;)if(st(e[n][0],t))return n;return-1}function ke(e,t,n){"__proto__"==t&&q?q(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(ne,"hashGet"),s(re,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,Q.prototype.set=ie,s(oe,"ListCache"),s(ae,"listCacheClear"),s(se,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(de,"MapCache"),s(he,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(_e,"stackDelete"),s(be,"stackGet"),s(we,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=_e,ye.prototype.get=be,ye.prototype.has=we,ye.prototype.set=Me,s(Ee,"arrayLikeKeys"),s(xe,"assignMergeValue"),s(Se,"assignValue"),s(Ie,"assocIndexOf"),s(ke,"baseAssignValue");var Ce=ze();function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X 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)?R: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),n=[];for(var r in e)"constructor"==r&&(t||!P.call(e,r))||n.push(r);return n}function Le(e,t,n,r,i){e!==t&&Ce(t,(function(o,a){if(i||(i=new ye),gt(o))Ne(e,t,a,n,Le,r,i);else{var s=r?r(rt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),xe(e,a,s)}}),bt)}function Ne(e,t,n,r,i,o,a){var s=rt(e,n),l=rt(t,n),u=a.get(l);if(u)xe(e,n,u);else{var c=o?o(s,l,n+"",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=Ge(s):p?(d=!1,c=De(l,!0)):f?(d=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=_t(s):(!gt(s)||pt(s))&&(c=Ke(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),xe(e,n,c)}}function Re(e,t){return it(nt(e,t,Et),e+"")}s(Oe,"baseGetTag"),s(Te,"baseIsArguments"),s(Ae,"baseIsNative"),s(Pe,"baseIsTypedArray"),s(Fe,"baseKeysIn"),s(Le,"baseMerge"),s(Ne,"baseMergeDeep"),s(Re,"baseRest");var je=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:Et;function De(e,t){if(t)return e.slice();var n=e.length,r=U?U(n):new e.constructor(n);return e.copy(r),r}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ge(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function We(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ke(n,s,l):Se(n,s,l)}return n}function Ve(e){return Re((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&He(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))}function ze(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Xe(e,t){var n=e.__data__;return Ze(t)?n["string"==typeof t?"string":"hash"]:n.map}function qe(e,t){var n=x(e,t);return Ae(n)?n:void 0}function Ye(e){var t=P.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch{}var i=L.call(e);return r&&(t?e[X]=n:delete e[X]),i}function Ke(e){return"function"!=typeof e.constructor||Qe(e)?{}:$(G(e))}function Je(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,n){if(!gt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Je(t,n.length):"string"==r&&t in n)&&st(n[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 n in Object(e))t.push(n);return t}function tt(e){return L.call(e)}function nt(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=K(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),w(e,this,s)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(Ge,"copyArray"),s(We,"copyObject"),s(Ve,"createAssigner"),s(ze,"createBaseFor"),s(Xe,"getMapData"),s(qe,"getNative"),s(Ye,"getRawTag"),s(Ke,"initCloneObject"),s(Je,"isIndex"),s(He,"isIterateeCall"),s(Ze,"isKeyable"),s($e,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(je);function ot(e){var t=0,n=0;return function(){var r=J(),i=16-(r-n);if(n=r,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}s(ot,"shortOut"),s(at,"toSource"),s(st,"eq");var lt=Te(function(){return arguments}())?Te:function(e){return vt(e)&&P.call(e,"callee")&&!V.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)}s(ct,"isArrayLike"),s(dt,"isArrayLikeObject");var ht=Y||xt;function pt(e){if(!gt(e))return!1;var t=Oe(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}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)!=a)return!1;var t=G(e);if(null===t)return!0;var n=P.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&A.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=b?E(b):Pe;function _t(e){return We(e,bt(e))}function bt(e){return ct(e)?Ee(e,!0):Fe(e)}s(_t,"toPlainObject"),s(bt,"keysIn");var wt=Ve((function(e,t,n){Le(e,t,n)}));function Mt(e){return function(){return e}}function Et(e){return e}function xt(){return!1}s(Mt,"constant"),s(Et,"identity"),s(xt,"stubFalse"),t.exports=wt})),nm=oe(((e,t)=>{v(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),km=oe(((e,t)=>{var n,r;v(),n=e,r=function(){function e(e,n,i,o,a){t(e,n,i||0,o||e.length-1,a||r)}function t(e,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-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,r,Math.max(i,Math.floor(r-l*c/s+d)),Math.min(o,Math.floor(r+(s-l)*c/s+d)),a)}var h=e[r],p=i,f=o;for(n(e,i,r),a(e[o],h)>0&&n(e,i,o);p<f;){for(n(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?n(e,i,f):n(e,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t){return e<t?-1:e>t?1:0}s(e,"quickselect"),s(t,"quickselectStep"),s(n,"swap"),s(r,"defaultCompare");var i=s((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 o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,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=t;o<n;o++){var a=e.children[o];u(i,e.leaf?r(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 n=Math.max(e.minX,t.minX),r=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-n)*Math.max(0,o-r)}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 _(t,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;e(t,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=s((function(){return this._all(this.data,[])}),"all"),i.prototype.search=s((function(e){var t=this.data,n=[];if(!y(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?r(a):a;y(e,s)&&(t.leaf?n.push(a):v(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n}),"search"),i.prototype.collides=s((function(e){var t=this.data;if(!y(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(y(e,o)){if(t.leaf||v(e,o))return!0;n.push(i)}}t=n.pop()}return!1}),"collides"),i.prototype.load=s((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 n=this._build(e.slice(),0,e.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=s((function(e){return e&&this._insert(e,this.data.height-1),this}),"insert"),i.prototype.clear=s((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=s((function(e,t){if(!e)return this;for(var n,r,i,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=u.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}i||a.leaf||!v(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(l.push(a),u.push(n),n=0,r=a,a=a.children[0])}return this}),"remove"),i.prototype.toBBox=s((function(e){return e}),"toBBox"),i.prototype.compareMinX=s((function(e,t){return e.minX-t.minX}),"compareMinX"),i.prototype.compareMinY=s((function(e,t){return e.minY-t.minY}),"compareMinY"),i.prototype.toJSON=s((function(){return this.data}),"toJSON"),i.prototype.fromJSON=s((function(e){return this.data=e,this}),"fromJSON"),i.prototype._all=s((function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t}),"_all"),i.prototype._build=s((function(e,t,n,r){var i,o=n-t+1,s=this._maxEntries;if(o<=s)return a(i=m(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),(i=m([])).leaf=!1,i.height=r;var l=Math.ceil(o/s),u=l*Math.ceil(Math.sqrt(s));_(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var d=Math.min(c+u-1,n);_(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,r-1))}}return a(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=s((function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){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=s((function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),u(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)}),"_insert"),i.prototype._split=s((function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}),"_split"),i.prototype._splitRoot=s((function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=s((function(e,t,n){for(var r,i=1/0,o=1/0,a=t;a<=n-t;a++){var s=l(e,0,a,this.toBBox),u=l(e,a,n,this.toBBox),c=g(s,u),d=h(s)+h(u);c<i?(i=c,r=a,o=d<o?d:o):c===i&&d<o&&(o=d,r=a)}return r||n-t}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=s((function(e,t,n){var r=e.leaf?this.compareMinX:c,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}),"_chooseSplitAxis"),i.prototype._allDistMargin=s((function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=l(e,0,t,i),a=l(e,n-t,n,i),s=p(o)+p(a),c=t;c<n-t;c++){var d=e.children[c];u(o,e.leaf?i(d):d),s+=p(o)}for(var h=n-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=s((function(e,t,n){for(var r=n;r>=0;r--)u(t[r],e)}),"_adjustParentBBoxes"),i.prototype._condense=s((function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():a(e[t],this.toBBox)}),"_condense"),s(o,"findItem"),s(a,"calcBBox"),s(l,"distBBox"),s(u,"extend"),s(c,"compareNodeMinX"),s(d,"compareNodeMinY"),s(h,"bboxArea"),s(p,"bboxMargin"),s(f,"enlargedArea"),s(g,"intersectionArea"),s(v,"contains"),s(y,"intersects"),s(m,"createNode"),s(_,"multiSelect"),i},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),Up=oe((e=>{function t(e,t,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=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(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 r(e,n,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(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function o(e,n,r){void 0===r&&(r={});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},n,r)}function a(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return o(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function _(e,t){return w(m(e,t))}function b(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 E(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return y(m(e,t),n)}function x(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];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")}v(),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},s(t,"feature"),e.feature=t,s(n,"geometry"),e.geometry=n,s(r,"point"),e.point=r,s(i,"points"),e.points=i,s(o,"polygon"),e.polygon=o,s(a,"polygons"),e.polygons=a,s(l,"lineString"),e.lineString=l,s(u,"lineStrings"),e.lineStrings=u,s(c,"featureCollection"),e.featureCollection=c,s(d,"multiLineString"),e.multiLineString=d,s(h,"multiPoint"),e.multiPoint=h,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(y,"radiansToLength"),e.radiansToLength=y,s(m,"lengthToRadians"),e.lengthToRadians=m,s(_,"lengthToDegrees"),e.lengthToDegrees=_,s(b,"bearingToAzimuth"),e.bearingToAzimuth=b,s(w,"radiansToDegrees"),e.radiansToDegrees=w,s(M,"degreesToRadians"),e.degreesToRadians=M,s(E,"convertLength"),e.convertLength=E,s(x,"convertArea"),e.convertArea=x,s(S,"isNumber"),e.isNumber=S,s(I,"isObject"),e.isObject=I,s(k,"validateBBox"),e.validateBBox=k,s(C,"validateId"),e.validateId=C})),Yp=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0});var t=Up();function n(e,t,r){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 _=0;_<l;_++){var b=0,w=0;if(null!==(s=d?c.geometries[_]:c)){u=s.coordinates;var M=s.type;switch(h=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,b,w))return!1;p++,"MultiPoint"===M&&b++}"LineString"===M&&b++;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,b,w))return!1;p++}"MultiLineString"===M&&b++,"Polygon"===M&&w++}"Polygon"===M&&b++;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,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===n(s.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,a,s){o=0===n&&void 0===r?e:t(o,e,n,i,a,s)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,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(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,d=p?e.features[n].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(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],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,n){var r=n;return c(e,(function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)})),r}function h(e,n){c(e,(function(e,r,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:a}),r,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===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return h(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){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===n(e,(function(n,s,h,p,f){if(void 0===l||i>u||p>c||f>d)return l=n,u=i,c=p,d=f,void(a=0);var g=t.lineString([l,n],e.properties);if(!1===r(g,i,o,f,a))return!1;a++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function y(e,n){if(!e)throw new Error("geojson is required");h(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===n(t.lineString(a[s],e.properties),r,i,s))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)})),r}function _(e,n){if(n=n||{},!t.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,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.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,n);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,n);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,n);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,n)}throw new Error("geojson is invalid")}function b(e,n){if(n=n||{},!t.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,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return s<0&&(s=u.length+s),t.point(u[s],l,n);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),t.point(u[a][s],l,n);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),t.point(u[o][s],l,n);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,n)}throw new Error("geojson is invalid")}s(n,"coordEach"),s(r,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(d,"geomReduce"),s(h,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(y,"lineEach"),s(m,"lineReduce"),s(_,"findSegment"),s(b,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=b,e.findSegment=_,e.flattenEach=h,e.flattenReduce=p,e.geomEach=c,e.geomReduce=d,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Cm=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0});var t=Yp();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}s(n,"bbox"),n.default=n,e.default=n})),Rm=oe(((e,t)=>{v();var n=km(),r=Up(),i=Yp(),o=Cm().default,a=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.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:o(e),t.push(e)})):a(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),n.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:o(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.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=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}s(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),nv=oe(((e,t)=>{v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),sv=oe(((e,t)=>{v();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=a(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}s(o,"decodeComponents"),s(a,"decode"),s(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)}}})),lv=oe(((e,t)=>{v(),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 n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),dv=oe(((e,t)=>{v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}})),bv=oe((e=>{v();var t=nv(),n=sv(),r=lv(),i=dv(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[d(t,e),"[",i,"]"].join("")]:[...n,[d(t,e),"[",d(i,e),"]=",d(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[d(t,e),"[]"].join("")]:[...n,[d(t,e),"[]=",d(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[d(n,e),t,d(i,e)].join("")]:[[r,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,d(t,e)]:[...n,[d(t,e),"=",d(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&h(n,e).includes(e.arrayFormatSeparator);n=o?h(n,e):n;let a=i||o?n.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===n?n:h(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&h(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?n(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="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function y(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 _(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=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]=r(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),n(h(e,t),a,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=m(n[e],t);else i[e]=m(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(d,"encode"),s(h,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(y,"extract"),s(m,"parseValue"),s(_,"parse"),e.extract=y,e.parse=_,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=s((n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{let i=e[n];return void 0===i?"":null===i?d(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(n,t)+"[]":i.reduce(r(n),[]).join("&"):d(n,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:_(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),l=e.stringify(s,n);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(n[a]?d(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),Tv=oe(((e,t)=>{var n,r;v(),n=e,r=function(){var e=s((function(){return e=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])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,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}s(t,"__values"),s(n,"__read");var r,i="KEYS",o="VALUES",a="",l=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}return s(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,n=e.keys;if(u(n)===a)return{done:!1,value:this.result()};var r=t.get(u(n));return this._path.push({node:r,keys:Array.from(r.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!==a})).join("")},e.prototype.value=function(){return u(this._path).node.get(a)},e.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=s((function(e){return e[e.length-1]}),"last$1"),c=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,a=new Uint8Array(o*i).fill(n+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,n,r,a,1,i,""),r}),"fuzzySearch"),d=s((function(e,n,r,i,o,s,l,u){var c,h,p=s*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===a){var y=o[p-1];y<=r&&i.set(u,[e.get(v),y])}else{for(var m=s,_=0;_<v.length;++_,++m){for(var b=v[_],w=l*m,M=w-l,E=o[w],x=Math.max(0,m-r-1),S=Math.min(l-1,m+r),I=x;I<S;++I){var k=b!==n[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<E&&(E=A)}if(E>r)continue e}d(e.get(v),n,r,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 s(e,"SearchableMap"),e.prototype.atPrefix=function(r){var i,o;if(!r.startsWith(this._prefix))throw new Error("Mismatched prefix");var s=n(p(this._tree,r.slice(this._prefix.length)),2),l=s[0],u=s[1];if(void 0===l){var c=n(_(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!==a&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,r)}}}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,r)},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 r,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=n(a.value,2);e(s[0],s[1],this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.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(a):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(a)},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(a,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 n=g(this._tree,e);return n.set(a,t(n.get(a))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=g(this._tree,e),r=n.get(a);return void 0===r&&n.set(a,r=t()),r},e.prototype.values=function(){return new l(this,o)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(r){var i,o,a=new e;try{for(var s=t(r),l=s.next();!l.done;l=s.next()){var u=n(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=s((function(e,n,r){var i,o;if(void 0===r&&(r=[]),0===n.length||null==e)return[e,r];try{for(var s=t(e.keys()),l=s.next();!l.done;l=s.next()){var u=l.value;if(u!==a&&n.startsWith(u))return r.push([e,u]),p(e.get(u),n.slice(u.length),r)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return r.push([e,n]),p(void 0,"",r)}),"trackDown"),f=s((function(e,n){var r,i;if(0===n.length||null==e)return e;try{for(var o=t(e.keys()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!==a&&n.startsWith(l))return f(e.get(l),n.slice(l.length))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"lookup"),g=s((function(e,n){var r,i,o=n.length;e:for(var s=0;e&&s<o;){try{for(var l=(r=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==a&&n[s]===c[0]){for(var d=Math.min(o-s,c.length),h=1;h<d&&n[s+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(n.slice(s,s+h),f),e.delete(c),e=f}s+=h;continue e}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}var g=new Map;return e.set(n.slice(s),g),g}return e}),"createPath"),v=s((function(e,t){var r=n(p(e,t),2),i=r[0],o=r[1];if(void 0!==i)if(i.delete(a),0===i.size)y(o);else if(1===i.size){var s=n(i.entries().next().value,2),l=s[0],u=s[1];m(o,l,u)}}),"remove"),y=s((function(e){if(0!==e.length){var t=n(_(e),2),r=t[0],i=t[1];if(r.delete(i),0===r.size)y(e.slice(0,-1));else if(1===r.size){var o=n(r.entries().next().value,2),s=o[0],l=o[1];s!==a&&m(e.slice(0,-1),s,l)}}}),"cleanup"),m=s((function(e,t,r){if(0!==e.length){var i=n(_(e),2),o=i[0],a=i[1];o.set(a+t,r),o.delete(a)}}),"merge"),_=s((function(e){return e[e.length-1]}),"last"),b="or",w=function(){function r(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 s(r,"MiniSearch"),r.prototype.add=function(e){var n,r,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),_=this._fieldIds[v],b=new Set(m).size;this.addFieldLength(p,_,this._documentCount-1,b);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var E=u(M.value,v);E&&this.addTerm(_,p,E)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}},r.prototype.addAll=function(e){var n,r;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},r.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,r){var o=e.chunk,a=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,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(e){var r,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=n(y.value,2),_=m[0];if(g===m[1]){try{for(var b=(o=void 0,t(p)),w=b.next();!w.done;w=b.next()){var M=w.value,E=h(e,M);if(null!=E){var x=c(E.toString(),M),S=this._fieldIds[M],I=new Set(x).size;this.removeFieldLength(_,S,this._documentCount,I);try{for(var k=(s=void 0,t(x)),C=k.next();!C.done;C=k.next()){var O=d(C.value,M);O&&this.removeTerm(S,_,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=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(e){r={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}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(e){var n,r;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){n={error:e}}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(e,r){var i,o;void 0===r&&(r={});var a=this.executeQuery(e,r),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=n(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==r.filter||r.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},r.prototype.autoSuggest=function(r,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(r,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(_=u.get(f))?(_.score+=p,_.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=n(y.value,2),_=m[0],b=m[1],w=(p=b.score,b.terms),M=b.count;g.push({suggestion:_,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(r.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),r.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return r.loadJS(JSON.parse(e),t)},r.getDefault=function(e){if(I.hasOwnProperty(e))return M(I,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},r.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 _=new r(i);_._documentCount=c,_._nextId=d,_._documentIds=F(p),_._fieldIds=f,_._fieldLength=F(g),_._avgFieldLength=v,_._storedFields=F(y),_._index=new h;try{for(var b=t(u),w=b.next();!w.done;w=b.next()){var M=n(w.value,2),E=M[0],x=M[1],S=new Map;try{for(var I=(s=void 0,t(Object.keys(x))),k=I.next();!k.done;k=I.next()){var C=k.value,O=x[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}}_._index.set(E,S)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return _},r.prototype.executeQuery=function(t,n){var r=this;if(void 0===n&&(n={}),"string"!=typeof t){var i=e(e(e({},n),t),{queries:void 0}),o=t.queries.map((function(e){return r.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),n),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 r.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},r.prototype.executeQuerySpec=function(r,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,n){var r;return e(e({},t),((r={})[n]=M(t,n)||1,r))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},k.weights),f),y=v.fuzzy,m=v.prefix,_=this._index.get(r.term),b=this.termResults(r.term,r.term,1,_,h,p);if(r.prefix&&(u=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(u)try{for(var x=t(u),S=x.next();!S.done;S=x.next()){var I=n(S.value,2),C=I[0],O=I[1];if(F=C.length-r.term.length){null==c||c.delete(C);var T=m*C.length/(C.length+.3*F);this.termResults(r.term,C,T,O,h,p,b)}}}catch(e){o={error:e}}finally{try{S&&!S.done&&(a=x.return)&&a.call(x)}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,L=n(c.get(C),2),N=L[0];(F=L[1])&&(T=y*C.length/(C.length+F),this.termResults(r.term,C,T,N,h,p,b))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return b},r.prototype.combineResults=function(e,t){if(void 0===t&&(t=b),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(E[n])||new Map},r.prototype.toJSON=function(){var e,r,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=n(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=n(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&&(r=s.return)&&r.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}},r.prototype.termResults=function(e,n,r,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 _=m.size,b=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),E=w.next();!E.done;E=w.next()){var S=E.value,I=a?a(this._documentIds.get(S),n):1;if(I){var k=m.get(S),C=this._fieldLength.get(S)[y],T=r*v*I*x(k,_,this._documentCount,C,b),A=s.get(S);if(A){A.score+=T,O(A.terms,e);var P=M(A.match,n);P?P.push(g):A.match[n]=[g]}else s.set(S,{score:T,terms:[e],match:(h={},h[n]=[g],h)})}}}catch(e){c={error:e}}finally{try{E&&!E.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},r.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,P),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},r.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,P),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},r.prototype.warnDocumentChanged=function(e,n,r){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]===n)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(r,'" 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}}},r.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},r.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},r.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},r.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},r.prototype.saveStoredFields=function(e,n){var r,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(n,d);void 0!==h&&(l[d]=h)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}},r}(),M=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),E=((r={}).or=function(e,n){var r,i;try{for(var o=t(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,n.get(s));else{var u=n.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){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e},r.and=function(e,n){var r,i,o=new Map;try{for(var a=t(n.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=n.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){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},r.and_not=function(e,n){var r,i;try{for(var o=t(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e},r),x=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*r/i)))}),"calcBM25Score"),S=s((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),I={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(L)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},k={combineWith:b,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},C={prefix:function(e,t,n){return t===n.length-1}},O=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),T=s((function(e,n){var r,i;try{for(var o=t(n),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"assignUniqueTerms"),A=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),P=s((function(){return new Map}),"createMap"),F=s((function(e){var n,r,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){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}),"objectToNumericMap"),L=/[\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=r():"function"==typeof define&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self).MiniSearch=r()})),ux={};Tf(ux,{Mappedin:()=>Bn,MappedinDestinationSet:()=>Pt,OfflineSearch:()=>lo,getVenue:()=>kf,getVenueBundle:()=>Mf,initialize:()=>sx,setFetchFn:()=>Cv}),module.exports=Ue(ux),v(),v();var Av=on(Sf());v(),v(),v();var Af=on(Pf());v();var pu=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,l;if(f(this,"origin"),f(this,"destination"),f(this,"vortex"),f(this,"distance"),f(this,"angle"),f(this,"weight"),this.origin=e,this.destination=t,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,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*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")}};s(pu,"Edge");var du=pu,dr=du;v();var Of="mi-debug",Uv={logState:"test"===R.env.NODE_ENV?3: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)}},te=Uv;function Wv(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],n=e.georeference[2],r=(0,Af.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return te.error(e),1}}function _o(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}s(Wv,"getMapScale"),s(_o,"getAngle");var gu=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){f(this,"edges"),f(this,"nodesById"),f(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:Wv(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:r?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:n})=>{let r=this.nodesById[t];return new dr({angle:_o(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[n.id].push(new dr({destination:t,elevationDelta:a,origin:n,vortex:e})),this.edges[t.id].push(new dr({destination:n,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let a=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),s=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===a.length||0===s.length)return[];let l=[],u={},c={};for(a.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(s.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let a=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,d=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),h=o&&o.has(t.destination.id);if(n&&a||d||h)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,s);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};s(gu,"NavigationGraph");var fu=gu,hu=fu;function Yv(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),s(Yv,"vortexDirectionTest");var vu=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){f(this,"node"),f(this,"instruction"),f(this,"action"),f(this,"atLocation"),f(this,"type"),f(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(Yv(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.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&&r&&(this.instruction+=" at ".concat(r.name)))}};s(vu,"Directive");var mu=vu,Hn=mu;function yu(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,a=t.x,s=t.y,l=n.x,u=n.y,c=r.x,d=r.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 Cf(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function jf(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Cf(e,t,-r),a=Cf(e,t,r);if(yu(o[0],o[1],n[0],n[1])||yu(a[0],a[1],n[0],n[1]))return void(i=!1)}else if(yu(e,t,n[0],n[1]))return void(i=!1)})),i}v(),s(yu,"getLineIntersection"),s(Cf,"getOffsetLine"),s(jf,"hasLineOfSight");var ko=.1*Math.PI;function Mo(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Mo,"differenceBetweenAngles");var _u=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){f(this,"graph"),f(this,"locationsByNodeId"),f(this,"geometryEdgesByMapId",new Map),this.graph=new hu({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){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=-Mo(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-Mo(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(r+=s,i+=a.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s,simplify:l}){var u,c,d;let h=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s});if(0===h.length)return{distance:0,instructions:[new Hn({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],g=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[h[0]];for(let n=1;n<h.length;n++){if(h[n].origin.map!==h[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(h[n-1].origin.map))?c:[];g.push(...this.simplifySteps(t,r,e)),t=[h[n]]}t.push(h[n])}let n=h[h.length-1],r=null!=(d=this.geometryEdgesByMapId.get(n.origin.map))?d:[];g.push(...this.simplifySteps(t,r,e)),h=g}for(let e=0;e<h.length;e++)f.push(h[e].origin);f.push(h[h.length-1].destination);let v=[],y=null,m=null,_=0,b=0;for(let e=0;e<h.length;e++){let t=h[e],n=t.origin,o=t.destination;if(p+=t.distance,_+=(null==m?void 0:m.distance)||0,0===e&&v.push(new Hn({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}v.push(new Hn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:_,origin:n})),b+=_,_=0}else if(null!=y&&null!=m)if(null!=m.vortex){let e=this.graph.mapsById[y.map],t=this.graph.mapsById[m.destination.map];v.push(new Hn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:_,origin:n})),b+=_,_=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let r=-Mo(m.angle,t.angle),i=e.reduce(((e,n)=>{let r=-Mo(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=ko||Math.abs(i)<=ko){let e;e=r<=-Math.PI/4?"Right":r<=-ko?"SlightRight":r<=ko?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let r=new Hn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:_,origin:n});r.type=e,v.push(r)}else v.push(new Hn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:_,origin:n}));b+=_,_=0}}}e===h.length-1&&(v.push(new Hn({action:{type:"Arrival"},atLocation:i,distance:p-b<0?0:p-b,origin:t.destination})),b+=_,_=0),y=n,m=t}let w=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,w.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?w.unshift(t):w[0].distance+=t.distance:w.unshift(t)}return{distance:p,instructions:w,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!jf(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new dr({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:_o(e[i].origin,e[t].origin)})),i=t}return r.push(new dr({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:_o(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(_u,"Navigator");var bu=_u,wu=bu;v(),v();var sn,Mi,ku,Ei,Mu,Eo,Nf,Eu=class{constructor(e){G(this,Mi),G(this,Ei),G(this,Eo),G(this,sn,void 0),X(this,sn,e)}directionsTo(e,t){let n=g(this,sn).analytics;return e instanceof Pt?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),Je(this,Eo,Nf).call(this,e,t)):(n.getDirections(this,e),Je(this,Ei,Mu).call(this,e,t))}distanceTo(e,t){let n=Je(this,Ei,Mu).call(this,e,t);return(null==n?void 0:n.distance)||0}};sn=new WeakMap,Mi=new WeakSet,ku=s((function(){var e;return null!=(e=g(this,sn).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Ei=new WeakSet,Mu=s((function(e,t){let n=ki(this),r=ki(e),i=g(this,sn).navigator.getDirections({originIds:n,destinationNodeIds:r,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,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||g(this,Mi,ku)});return new pr(g(this,sn),i)}),"#directionsToSingleDestination"),Eo=new WeakSet,Nf=s((function(e,t){let n,r=[],i=ki(this);for(let o=0;o<e.destinations.length;o++){n=ki(e.destinations[o]);let a=g(this,sn).navigator.getDirections({originIds:i,destinationNodeIds:n,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)||g(this,Mi,ku)}),s=new pr(g(this,sn),a);r.push(s),i=0===s.path.length?n:[s.path[s.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(Eu,"MappedinNavigatable");var un=Eu;v(),v();var us=on(Sh()),pc={production:"40ead723d18886045e302513245edb27",development:""},Rr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},fc=class{constructor(e){this.event_properties=e,f(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(fc,"AnalyticsCategorySelectedCall");var Gi=fc,hc=class{constructor(e){this.event_properties=e,f(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(hc,"AnalyticsLocationSelectedCall");var Ui=hc,gc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(gc,"BlueDotDisableCall");var tl=gc,mc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(mc,"BlueDotEnableCall");var nl=mc,vc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(vc,"BlueDotOffCall");var rl=vc,yc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(yc,"BlueDotOnCall");var il=yc,bc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(bc,"CameraAnimateCall");var al=bc,wc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(wc,"CameraCancelAnimationCall");var ol=wc,_c=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(_c,"CameraFocusOnCall");var sl=_c,kc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(kc,"CameraGetSafeAreaInsetsCall");var ul=kc,Mc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Mc,"CameraInteractionDisableCall");var ll=Mc,Ec=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Ec,"CameraInteractionEnableCall");var cl=Ec,xc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:set-call"),this.event_properties=e}};s(xc,"CameraSetCall");var dl=xc,Tc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Tc,"CameraSetSafeAreaInsetsCall");var pl=Tc,Ic=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Ic,"CameraTranslateCall");var fl=Ic,Sc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Sc,"FlatLabelsAddCall");var hl=Sc,Pc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Pc,"FlatLabelsLabelAllLocationsCall");var gl=Pc,Oc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Oc,"FlatLabelsRemoveCall");var ml=Oc,Ac=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Ac,"FlatLabelsRemoveAllCall");var vl=Ac,Cc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Cc,"FlatLabelsSetAppearanceCall");var yl=Cc,jc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(jc,"FloatingLabelsAddCall");var bl=jc,Lc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Lc,"FloatingLabelsLabelAllLocationsCall");var wl=Lc,Nc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(Nc,"FloatingLabelsRemoveCall");var _l=Nc,Fc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(Fc,"FloatingLabelsRemoveAllCall");var kl=Fc,Rc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(Rc,"FloatingLabelsResetPriorityCall");var Ml=Rc,Dc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(Dc,"FloatingLabelsSetAppearanceCall");var El=Dc,Bc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(Bc,"FloatingLabelsSetPriorityCall");var xl=Bc,zc=class{constructor(e){this.event_properties=e,f(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(zc,"GlobalGetVenueCall");var Wi=zc,Vc=class{constructor(e){this.event_properties=e,f(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(Vc,"GlobalGetVenueMvfCall");var ss=Vc,qc=class{constructor(e){this.event_properties=e,f(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(qc,"GlobalShowVenueCall");var Tl=qc,Gc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(Gc,"JourneyClearCall");var Il=Gc,Uc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(Uc,"JourneyDrawCall");var Sl=Uc,Wc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(Wc,"JourneySetStepCall");var Pl=Wc,Yc=class{constructor(e){this.event_properties=e,f(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(Yc,"MappedinGetCollectionItemByIdCall");var Ol=Yc,Xc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(Xc,"MappedinCoordinateAbsoluteDistanceToCall");var Al=Xc,Hc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(Hc,"MappedinCoordinateNearestNodeCall");var Cl=Hc,$c=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s($c,"MappedinLocationCloneCall");var Yi=$c,Kc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(Kc,"MappedinLocationDirectionsToCall");var Xi=Kc,Jc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(Jc,"MappedinLocationDistanceToCall");var Hi=Jc,Qc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(Qc,"MappedinMapCreateCoordinateCall");var jl=Qc,Zc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(Zc,"MappedinMapCreateCoordinateByXyCall");var Ll=Zc,ed=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(ed,"MappedinMapGetNorthCall");var Nl=ed,td=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(td,"MappedinNodeDirectionsToCall");var $i=td,nd=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(nd,"MappedinNodeDistanceToCall");var Ki=nd,rd=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(rd,"MappedinPolygonDirectionsToCall");var Ji=rd,id=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(id,"MappedinPolygonDistanceToCall");var Qi=id,ad=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(ad,"MappedinVenueMetadataRead");var Zi=ad,od=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(od,"MapViewAddInteractivePolygonCall");var Fl=od,sd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(sd,"MapViewAddInteractivePolygonsForAllLocationsCall");var Rl=sd,ud=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(ud,"MapViewClearPolygonColorCall");var Dl=ud,ld=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(ld,"MapViewCreateCustomTooltipCall");var Bl=ld,cd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(cd,"MapViewCreateMarkerCall");var zl=cd,dd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(dd,"MapViewCreateTooltipCall");var Vl=dd,pd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(pd,"MapViewDestroyCall");var ql=pd,fd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(fd,"MapViewDisableImageFlippingForAllPolygonsCall");var Gl=fd,hd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(hd,"MapViewDrawPathCall");var Ul=hd,gd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(gd,"MapViewEnableImageFlippingForAllLocationsCall");var Wl=gd,md=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(md,"MapViewEnableImageFlippingForPolygonCall");var Yl=md,vd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(vd,"MapViewGetNearestNodeByScreenCoordinatesCall");var Xl=vd,yd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(yd,"MapViewGetPolygonAtCoordinateCall");var Hl=yd,bd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(bd,"MapViewGetPrimaryLocationForPolygonCall");var $l=bd,wd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(wd,"MapViewLabelAllLocationsCall");var Kl=wd,_d=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(_d,"MapViewRemoveAllInteractivePolygonsCall");var Jl=_d,kd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(kd,"MapViewRemoveAllMarkersCall");var Ql=kd,Md=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Md,"MapViewRemoveAllPathsCall");var Zl=Md,Ed=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Ed,"MapViewRemoveAllTooltipsCall");var ec=Ed,xd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(xd,"MapViewRemoveInteractivePolygonCall");var tc=xd,Td=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Td,"MapViewRemoveMarkerCall");var nc=Td,Id=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Id,"MapViewRemovePathCall");var rc=Id,Sd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Sd,"MapViewRemoveTooltipCall");var ic=Sd,Pd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Pd,"MapViewSetBackgroundColorCall");var ac=Pd,Od=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Od,"MapViewSetHoverColorCall");var oc=Od,Ad=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Ad,"MapViewSetMapCall");var sc=Ad,Cd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(Cd,"MapViewSetPolygonColorCall");var uc=Cd,jd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(jd,"MapViewSetStateCall");var lc=jd,Ld=class{constructor(e){this.event_properties=e,f(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Ld,"MetricsMapLoadEvent");var cc=Ld,Nd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Nd,"OfflineSearchAddQueryCall");var ea=Nd,Fd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(Fd,"OfflineSearchConstructorCall");var ta=Fd,Rd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Rd,"OfflineSearchSearchCall");var na=Rd,Dd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(Dd,"OfflineSearchSuggestCall");var ra=Dd,os=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),Bd=class{constructor(){f(this,"disabled",!1),f(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,n;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."),os();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=pc[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=us.createInstance(),this.amplitude.init(r,void 0,{...Rr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return os()}identify(e,t,n){if(!this.isInitializedAndEnabled())return os();e&&(n={...n,user_id:e});let r=new us.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):os()}analyticsCategorySelectedCall(e,t){return this.track(new Gi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Ui(e),t)}blueDotDisableCall(e,t){return this.track(new tl(e),t)}blueDotEnableCall(e,t){return this.track(new nl(e),t)}blueDotOffCall(e,t){return this.track(new rl(e),t)}blueDotOnCall(e,t){return this.track(new il(e),t)}cameraAnimateCall(e,t){return this.track(new al(e),t)}cameraCancelAnimationCall(e,t){return this.track(new ol(e),t)}cameraFocusOnCall(e,t){return this.track(new sl(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new ul(e),t)}cameraInteractionDisableCall(e,t){return this.track(new ll(e),t)}cameraInteractionEnableCall(e,t){return this.track(new cl(e),t)}cameraSetCall(e,t){return this.track(new dl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new pl(e),t)}cameraTranslateCall(e,t){return this.track(new fl(e),t)}flatLabelsAddCall(e,t){return this.track(new hl(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new gl(e),t)}flatLabelsRemoveCall(e,t){return this.track(new ml(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new vl(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new yl(e),t)}floatingLabelsAddCall(e,t){return this.track(new bl(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new wl(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new _l(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new kl(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Ml(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new El(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new xl(e),t)}globalGetVenueCall(e,t){return this.track(new Wi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new ss(e),t)}globalShowVenueCall(e,t){return this.track(new Tl(e),t)}journeyClearCall(e,t){return this.track(new Il(e),t)}journeyDrawCall(e,t){return this.track(new Sl(e),t)}journeySetStepCall(e,t){return this.track(new Pl(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Ol(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new Al(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Cl(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Yi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Xi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Hi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new jl(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Ll(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Nl(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new $i(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new Ki(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new Ji(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new Qi(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new Zi(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Fl(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Rl(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new Dl(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new Bl(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new zl(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new Vl(e),t)}mapViewDestroyCall(e,t){return this.track(new ql(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new Gl(e),t)}mapViewDrawPathCall(e,t){return this.track(new Ul(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new Wl(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new Yl(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new Xl(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new Hl(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new $l(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Kl(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new Jl(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Ql(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Zl(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new ec(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new tc(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new nc(e),t)}mapViewRemovePathCall(e,t){return this.track(new rc(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new ic(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new ac(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new oc(e),t)}mapViewSetMapCall(e,t){return this.track(new sc(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new uc(e),t)}mapViewSetStateCall(e,t){return this.track(new lc(e),t)}metricsMapLoadEvent(e,t){return this.track(new cc(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new ea(e),t)}offlineSearchConstructorCall(e,t){return this.track(new ta(e),t)}offlineSearchSearchCall(e,t){return this.track(new na(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ra(e),t)}};s(Bd,"Ampli");var dc=Bd,ia=new dc;v();var An,kr,Zt,Ur,dn,Ss,Gg,Ps,Ug,ga,lp,ma,cp,en,zg=on(lg()),Vg=on(Dg()),qg=on(Yu()),Bg="5.50.0",hM="https://api2.amplitude.com/2/httpapi",gM="https://api2.amplitude.com/batch",mM="__unspecified__",sp={branch:"main",version:"0",source:"websdk"},Mt=class e{constructor(){G(this,Ss),G(this,Ps),G(this,ga),G(this,ma),G(this,Zt,{}),G(this,Ur,!1),G(this,dn,void 0),G(this,en,s((async e=>{yM(e.type)&&(window.removeEventListener("visibilitychange",g(this,en)),window.removeEventListener("pagehide",g(this,en)),window.removeEventListener("beforeunload",g(this,en)),window.removeEventListener("unload",g(this,en)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==g(e,kr)&&X(e,kr,Bg),typeof navigator<"u"&&null!=navigator.userAgent&&X(this,dn,new qg.UAParser(navigator.userAgent).getResult())}static setContext(t){X(e,An,t)}static setVersion(t){X(e,kr,t)}addPendingEvent(t){var n;if(null==g(e,An))return;let r=t.event_type;if(!Je(this,Ps,Ug).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=g(this,Zt)[r];(0,Vg.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),g(this,Zt)[r]=t}async sendAllPendingEvents(){if(null==g(e,An)||Object.keys(g(this,Zt)).length<1)return;if(g(this,Ur))return void te.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in g(this,Zt)){let n=g(this,Zt)[e],r=Je(this,ga,lp).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{X(this,Ur,!0),200===(await Je(this,ma,cp).call(this,gM,t)).status&&X(this,Zt,{})}catch(e){te.warn("Error sending batch product analytics!",e)}finally{X(this,Ur,!1)}}async load(){if(!ia.isLoaded){let{promise:e}=ia.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",g(this,en)),window.addEventListener("beforeunload",g(this,en)),window.addEventListener("unload",g(this,en)),window.addEventListener("visibilitychange",g(this,en))}))}}async sendEventNow(t){if(null==g(e,An))return;let n=Je(this,ga,lp).call(this,t);if(null!=n)try{await Je(this,ma,cp).call(this,hM,[n])}catch(e){te.warn("Error sending single product analytics event!",e)}}};An=new WeakMap,kr=new WeakMap,Zt=new WeakMap,Ur=new WeakMap,dn=new WeakMap,Ss=new WeakSet,Gg=s((function(e){let t=e.event_type;return null!=g(this,Zt)[t]}),"#isEventTypePending"),Ps=new WeakSet,Ug=s((function(e){if(!Je(this,Ss,Gg).call(this,e))return!0;let t=e.event_type,n=g(this,Zt)[t];return!(0,zg.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),ga=new WeakSet,lp=s((function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p,f,v,y,m;if(null!=g(Mt,An))return null==(null==(t=e.event_properties)?void 0:t.venue)&&te.warn("Error processing product analytics event! Unspecified venue slug",e),null==Rr.plan&&te.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=ia.client.getSessionId())?n:As(),device_id:null!=(r=ia.client.getDeviceId())?r:Os(),plan:{branch:null!=(o=null==(i=Rr.plan)?void 0:i.branch)?o:sp.branch,version:null!=(s=null==(a=Rr.plan)?void 0:a.version)?s:sp.version,source:null!=(u=null==(l=Rr.plan)?void 0:l.source)?u:sp.source},os_name:null==(c=g(this,dn))?void 0:c.browser.name,os_version:null==(d=g(this,dn))?void 0:d.browser.version,device_manufacturer:null==(h=g(this,dn))?void 0:h.device.vendor,device_model:null==(p=g(this,dn))?void 0:p.device.model,event_properties:{...e.event_properties,context:g(Mt,An),sdk_version:g(Mt,kr),browser_name:null==(f=g(this,dn))?void 0:f.browser.name,browser_version:null==(v=g(this,dn))?void 0:v.browser.version,venue:null!=(m=null==(y=e.event_properties)?void 0:y.venue)?m:mM},time:e.time}}),"#makeBatchFormattedEvent"),ma=new WeakSet,cp=s((async function(e,t){return await Cn()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:pc.production,events:t})})}),"#batchSend"),en=new WeakMap,s(Mt,"ProductAnalytics"),G(Mt,An,void 0),G(Mt,kr,void 0);var up=Mt,vM=new up,nt=vM;function yM(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(yM,"areWeLeavingThePage");var Xt,Wr,gt,ya,er=class e extends un{constructor(t,n){super(t),f(this,"__type",e.__type),G(this,Xt,void 0),G(this,Wr,void 0),G(this,gt,{}),f(this,"id",""),f(this,"x",0),f(this,"y",0),f(this,"operationHours"),f(this,"externalId"),G(this,ya,void 0),X(this,Xt,t),X(this,Wr,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=g(this,gt).map;if(typeof e<"u")return e;let t=g(this,Xt).getCollectionItemById("maps",g(this,Wr).map);return g(this,gt).map=t,t}get lat(){var e;let t=g(this,gt).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=g(this,Xt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return g(this,gt).cachedLatLon=n.createCoordinateByXY(this.x,this.y),g(this,gt).cachedLatLon.lat}get lon(){var e;let t=g(this,gt).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=g(this,Xt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return g(this,gt).cachedLatLon=n.createCoordinateByXY(this.x,this.y),g(this,gt).cachedLatLon.lon}get paths(){let e=g(this,gt).paths;if(typeof e<"u")return e;let t=[],n=g(this,Xt)._nodesById,r=g(this,ya);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return g(this,gt).paths=t,t}set paths(e){X(this,ya,e)}get locations(){var e,t,n;let r=g(this,gt).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=mt.instances.get(g(this,Xt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===a){i.push(t);break}}return g(this,gt).locations=i,i}get polygon(){var e,t,n,r;let i=g(this,gt).polygon;if(typeof i<"u")return i;let o,a=null!=(r=null==(n=null==(e=mt.instances.get(g(this,Xt)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],s=this.id;for(let e=0,t=a.length;e<t;++e){let t=a[e];t.entrances.map((e=>e.id)).includes(s)&&(o=t)}return g(this,gt).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.nodes.slice();null!=(r=t.options.things)&&r.maps&&rt(i,"map"),["weight","multiplier","accessible"].forEach((function(e){rt(i,e)}));let o={fields:i,venue:t.options.venue};try{return(await it(t.options,"node",o)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,Xt).venue.slug,i=new $i({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,Xt).venue.slug;return nt.addPendingEvent(new Ki({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...g(this,Wr)},t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Xt=new WeakMap,Wr=new WeakMap,gt=new WeakMap,ya=new WeakMap,s(er,"MappedinNode"),f(er,"__type","MappedinNode");var va=er;v();var pn,Yr,Ht,ba,tr=class e extends un{constructor(t,n){super(t),f(this,"__type",e.__type),G(this,pn,void 0),G(this,Yr,void 0),G(this,Ht,{}),f(this,"geometry"),f(this,"perspectives"),f(this,"image"),f(this,"holes"),f(this,"textures"),f(this,"material"),f(this,"label"),f(this,"id",""),f(this,"layer"),f(this,"layerId"),f(this,"name"),f(this,"externalId"),f(this,"vertexes"),f(this,"center"),f(this,"canvasBounds"),f(this,"categoryRank"),G(this,ba,void 0),f(this,"boundingBox",null),X(this,pn,t),X(this,Yr,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=g(this,Ht).map;if(typeof e<"u")return e;let t=g(this,pn).getCollectionItemById("maps",g(this,Yr).map);return g(this,Ht).map=t,t}get locations(){var e,t;let n=g(this,Ht).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=mt.instances.get(g(this,pn)))?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],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return g(this,Ht).locations=r,r}get entrances(){let e=g(this,Ht).entrances;if(typeof e<"u")return e;let t=[],n=g(this,ba),r=g(this,pn)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return g(this,Ht).entrances=t,t}return[]}set entrances(e){X(this,ba,e)}get rank(){let e=g(this,Ht).rank;if(typeof e<"u")return e;let{rankings:t}=g(this,pn);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(g(this,Ht).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(g(this,Ht).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r,i;let o=null==(n=t.options.things)?void 0:n.polygons.slice();null!=(r=t.options.things)&&r.maps&&rt(o,"map"),null!=(i=t.options.things)&&i.nodes&&rt(o,"entrances");let a={fields:o,venue:t.options.venue};try{return(await it(t.options,"polygon",a)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,pn).venue.slug,i=new Ji({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,pn).venue.slug;return nt.addPendingEvent(new Qi({venue:n})),super.distanceTo(e,t)}containsCoordinate(e){let t=e;e.map!==this.map&&(t=this.map.createCoordinate(e.lat,e.lon));let{x:n,y:r}=t,{vertexes:i}=this;if(!i)return!1;if(null==this.boundingBox){let e=Math.min(...i.map((e=>e.x))),t=Math.max(...i.map((e=>e.x))),n=Math.min(...i.map((e=>e.y))),r=Math.max(...i.map((e=>e.y)));this.boundingBox={minX:e,minY:n,maxX:t,maxY:r}}if(n<this.boundingBox.minX||n>this.boundingBox.maxX||r<this.boundingBox.minY||r>this.boundingBox.maxY)return!1;let o=!1;for(let e=0,t=i.length-1;e<i.length;t=e++){let a=i[e].x,s=i[e].y,l=i[t].x,u=i[t].y;s>r!=u>r&&n<(l-a)*(r-s)/(u-s)+a&&(o=!o)}return o}toJSON(){return g(this,Yr)}};pn=new WeakMap,Yr=new WeakMap,Ht=new WeakMap,ba=new WeakMap,s(tr,"MappedinPolygon"),f(tr,"__type","MappedinPolygon");var Mr=tr;v();var bM=0,wM="9999-12-31T00:00:00.000Z";function _M(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||bM),n=new Date(e.end||wM);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(_M,"getCurrentLocationState");var ut,bt,Et,wa,_a,ka,Wg=["name","description","shortName","tags"],$t=class e extends un{constructor(t,n){super(t),f(this,"__type",e.__type),G(this,ut,void 0),G(this,bt,void 0),G(this,Et,{}),f(this,"states"),f(this,"id",""),f(this,"name",""),f(this,"type",""),f(this,"description"),f(this,"sortOrder"),f(this,"logo"),f(this,"phone"),f(this,"social"),f(this,"color"),f(this,"shortName"),f(this,"detailsUrl"),f(this,"tags"),f(this,"toMap"),f(this,"externalId"),f(this,"showLabelWhenImagePresent"),f(this,"showSmartLabelWhenImagePresent"),f(this,"picture"),f(this,"operationHours"),f(this,"siblingGroups"),f(this,"gallery"),f(this,"amenity"),f(this,"filterFlags"),G(this,wa,void 0),G(this,_a,[]),G(this,ka,void 0),X(this,ut,t),X(this,bt,n);let r=Object.assign({},n);delete r.categories,Object.assign(this,r)}static is(t){return t.__type===e.__type}get polygons(){let e=g(this,Et).polygons;if(typeof e<"u")return e;let t=[],n=g(this,wa),r=g(this,ut)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return g(this,Et).polygons=t,t}set polygons(e){X(this,wa,e)}get nodes(){let e=g(this,Et).nodes;if(typeof e<"u")return e;let t=[],n=g(this,_a),r=g(this,ut)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return g(this,Et).nodes=t,t}set nodes(e){X(this,_a,e)}get parent(){let e=g(this,Et).parent;if(typeof e<"u")return e;let t,n=g(this,ut)._locationsById,r=g(this,ka);return void 0!==r&&(t=n[r]),g(this,Et).parent=t,t}set parent(e){X(this,ka,e)}get instances(){let t=g(this,Et).instances;if(typeof t<"u")return t;let n=[];for(let t of g(this,bt).polygons)if(Object.keys(t).length>2){let{id:r,map:i,...o}=t,a=g(this,ut).getCollectionItemById("polygons",r),s=null!=a&&Array.isArray(null==a?void 0:a.entrances)&&a.entrances.length>0?a.entrances.map((e=>({node:e.id,map:e.map}))):[];n.push(new e(g(this,ut),{...g(this,bt),...o,parent:this.id,nodes:s,polygons:[t]}))}for(let t of g(this,bt).nodes)if(Object.keys(t).length>2){let{node:r,map:i,...o}=t,a=g(this,ut).getCollectionItemById("nodes",r),s=null!=a&&a.polygon?[{id:a.polygon.id,map:a.polygon.map}]:[];n.push(new e(g(this,ut),{...g(this,bt),...o,parent:this.id,nodes:[{node:r,map:i}],polygons:s}))}return g(this,Et).instances=n,n}get categories(){let e=g(this,Et).categories;if(typeof e<"u")return e;let t=[];return g(this,bt).categories.forEach((e=>{let n=g(this,ut).getCollectionItemById("categories",e);n&&t.push(n)})),g(this,Et).categories=t,t}get state(){return _M(this,g(this,ut).locationStates)}clone(){let t=g(this,ut).venue.slug;return nt.addPendingEvent(new Yi({venue:t})),new e(g(this,ut),g(this,bt))}get nodeOperationHours(){let e=g(this,Et).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=g(this,bt).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return g(this,Et).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of Wg)r[t]=i[e][t]}}static async fetch(t){var n,r,i,o,a;let s=null==(n=t.options.things)?void 0:n.locations.slice();null!=(r=t.options.things)&&r.categories&&rt(s,"categories"),null!=(i=t.options.things)&&i.nodes&&rt(s,"nodes"),null!=(o=t.options.things)&&o.polygons&&rt(s,"polygons"),null!=(a=t.options.things)&&a.locationStates&&rt(s,"states");let l={fields:s,venue:t.options.venue};try{let n=await it(t.options,"location",l);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return te.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,ut).venue.slug,i=new Xi({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,ut).venue.slug;return nt.addPendingEvent(new Hi({venue:n})),super.distanceTo(e,t)}toJSON(){var e,t;let n={...g(this,bt)};for(let e of Wg)n[e]=this[e];let r={};for(let e in this)e.includes("x_")&&(r[e.split("x_")[1]]=this[e]);n.extra=JSON.stringify(r),delete n.color;let i=[],o=[];if(null!=(e=g(this,bt))&&e.polygons)for(let e of g(this,bt).polygons)if(e&&Object.keys(e).some((e=>"id"!==e&&"map"!==e))){let{id:t,map:n}=e,r=g(this,ut).getCollectionItemById("polygons",t),i=null!=r&&Array.isArray(null==r?void 0:r.entrances)&&r.entrances.length>0?r.entrances.map((e=>({node:e.id,map:e.map.id}))):[];o.push({type:"polygon",mapId:n,nodeOrPolygonId:t,nodes:i,polygons:[{id:t,type:"polygon"}],description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup,extra:null==e?void 0:e.extra})}if(o.length>0&&(n.polygonInstances=o),null!=(t=g(this,bt))&&t.nodes)for(let e of g(this,bt).nodes)if(e&&Object.keys(e).some((e=>"node"!==e&&"map"!==e))){let{node:t,map:n}=e,r=g(this,ut).getCollectionItemById("nodes",t),o=null!=r&&r.polygon?{id:r.polygon.id,map:r.polygon.map.id}:void 0;i.push({type:"node",mapId:n,nodeOrPolygonId:t,nodes:[{node:t,map:n}],...(null==o?void 0:o.id)&&{polygons:[{id:o.id,type:"polygon"}]},description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup,extra:null==e?void 0:e.extra})}return i.length>0&&(n.nodeInstances=i),n}};ut=new WeakMap,bt=new WeakMap,Et=new WeakMap,wa=new WeakMap,_a=new WeakMap,ka=new WeakMap,s($t,"MappedinLocation"),f($t,"__type","MappedinLocation");var jn=$t;v();var Xr,Er,Ma,Yg=["name"],Ln=class e{constructor(t,n){f(this,"__type",e.__type),G(this,Xr,void 0),G(this,Er,{}),G(this,Ma,void 0),f(this,"name"),f(this,"externalId"),f(this,"parents"),f(this,"id"),f(this,"icon"),f(this,"iconFromDefaultList"),f(this,"sortOrder"),this.id=n.id,X(this,Ma,n),X(this,Xr,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get locations(){var e;let t=g(this,Er).locations;if(typeof t<"u")return t;let n=[],{locations:r}=g(this,Xr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],a=o.categories;if(Array.isArray(a))for(let t=0,r=a.length;t<r;++t)if((null==(e=a[t])?void 0:e.id)===i){n.push(o);break}}return g(this,Er).locations=n,n}get children(){var e;let t=g(this,Er).children;if(typeof t<"u")return t;let{categories:n}=g(this,Xr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return g(this,Er).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Yg)t.categories[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.categories,venue:t.options.venue};try{return(await it(t.options,"category",r)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Categories:",e),[]}}toJSON(){let e={...g(this,Ma)};for(let t of Yg)e[t]=this[t];let t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Xr=new WeakMap,Er=new WeakMap,Ma=new WeakMap,s(Ln,"MappedinCategory"),f(Ln,"__type","MappedinCategory");var xr=Ln;v();var Ea,Nn,pp=class{constructor(e,t){G(this,Ea,void 0),G(this,Nn,void 0),f(this,"distance",0),f(this,"path",[]),f(this,"instructions",[]),X(this,Nn,e),X(this,Ea,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=g(this,Nn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(a=null==(o=g(this,Nn))?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=g(this,Nn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(h=g(this,Nn)._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 n,r;let i=null==(r=null==(n=g(this,Nn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return g(this,Ea)}};Ea=new WeakMap,Nn=new WeakMap,s(pp,"MappedinDirections");var pr=pp;v();var fp=class{constructor(e){f(this,"destinations",[]),this.destinations=e}};s(fp,"MappedinDestinationSet");var Pt=fp;v();var Ta,nr=class e{constructor(t){f(this,"__type",e.__type),f(this,"id",""),G(this,Ta,void 0),f(this,"accessible"),f(this,"name"),f(this,"type"),f(this,"weight"),f(this,"multiplier"),f(this,"nodes"),f(this,"filterFlags"),X(this,Ta,t),Object.assign(this,t)}static is(t){return t.__type===e.__type}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r=null==(n=t.options.things)?void 0:n.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){rt(r,e)}));let i={fields:r,venue:t.options.venue};try{return(await it(t.options,"vortex",i)).map((t=>new e(t)))}catch(e){return te.error("Fetch Vortexes:",e),[]}}toJSON(){return g(this,Ta)}};Ta=new WeakMap,s(nr,"MappedinVortex"),f(nr,"__type","MappedinVortex");var xa=nr;v();var Sa,Pa,Oa,Hr,Ia=class e{constructor(e,t){G(this,Sa,void 0),G(this,Pa,void 0),G(this,Oa,void 0),G(this,Hr,{}),f(this,"defaultMap",""),f(this,"address",""),f(this,"city",""),f(this,"countrycode",""),f(this,"externalId",""),f(this,"id",""),f(this,"latitude"),f(this,"logo"),f(this,"longitude"),f(this,"name",""),f(this,"operationHours"),f(this,"postal",""),f(this,"slug",""),f(this,"state",""),f(this,"telephone",""),f(this,"tzid",""),f(this,"tzidOverride",""),f(this,"utcOffset",""),f(this,"website",""),f(this,"secureContentStorage",!1),f(this,"defaultLanguage"),f(this,"languages",[]),f(this,"topLocations",[]),f(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),X(this,Pa,e),X(this,Sa,t),Object.assign(this,t)}get metadata(){return nt.addPendingEvent(new Zi({venue:this.slug})),g(this,Oa)}set metadata(e){X(this,Oa,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.venue,slug:t.options.venue,limit:1};try{let n=await it(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return te.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==g(this,Hr).isMultiBuilding){let e=g(this,Pa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;g(this,Hr).isMultiBuilding=n}return g(this,Hr).isMultiBuilding}toJSON(){let e={...g(this,Sa)},t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Sa=new WeakMap,Pa=new WeakMap,Oa=new WeakMap,Hr=new WeakMap,s(Ia,"MappedinVenue");var $r=Ia;v();var Ca,Aa=class e{constructor(e){f(this,"id",""),G(this,Ca,void 0),X(this,Ca,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.themes.slice(),venue:t.options.venue};try{return(await it(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return te.error("Fetch Theme:",e),[]}}toJSON(){return g(this,Ca)}};Ca=new WeakMap,s(Aa,"MappedinTheme");var Cs=Aa;v();var Na,ja=class e{constructor(e){G(this,Na,void 0),f(this,"polygons",[]),X(this,Na,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await Kr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return te.error("Fetch Rankings:",e),null}}toJSON(){return g(this,Na)}};Na=new WeakMap,s(ja,"MappedinRankings");var La=ja;v(),v();var Ra,Qr,Da,Xg=["name","description"],Jr=class e{constructor(e,t){G(this,Ra,void 0),G(this,Qr,void 0),G(this,Da,{}),f(this,"id",""),f(this,"type",""),f(this,"name",""),f(this,"description"),f(this,"image"),f(this,"startDate"),f(this,"endDate"),f(this,"showDate"),X(this,Qr,t),X(this,Ra,e),Object.assign(this,t)}location(){let e=g(this,Da).location;if(typeof e<"u")return e;let t,n=g(this,Ra)._locationsById,r=g(this,Qr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return g(this,Da).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Xg)t.events[e][n]=r[e][n]}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.events.slice();null!=(r=t.options.things)&&r.locations&&rt(i,"location");let o={fields:i,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await it(t.options,"event",o)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Events:",e),[]}}toJSON(){let e={...g(this,Qr)};for(let t of Xg)e[t]=this[t];return e}};Ra=new WeakMap,Qr=new WeakMap,Da=new WeakMap,s(Jr,"MappedinEvent");var Fa=Jr;v();var za,Hg=["name"],Zr=class e{constructor(e){G(this,za,void 0),f(this,"id",""),f(this,"name",""),f(this,"value",""),X(this,za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Hg)t.locationStates[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.locationStates.slice(),venue:t.options.venue};try{return(await it(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return te.error("Fetch Location States:",e),[]}}toJSON(){let e={...g(this,za)};for(let t of Hg)e[t]=this[t];return e}};za=new WeakMap,s(Zr,"MappedinLocationState");var Ba=Zr;v(),v(),v();var $g=" ",xt=class e{static get separator(){return $g}static set separator(e){$g=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 n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)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}t=Math.abs(t);let i=null,o=null,a=null,s=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),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(r),60==a&&(a=(0).toFixed(r),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(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+"°"+e.separator+a+"′"+e.separator+s+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);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(t*r/360)%r*16/r]}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}};s(xt,"Dms");var hp=xt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Fe=hp,Ze=Math.PI,Pe=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=Fe.wrap90(Number(e)),this._lon=Fe.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Fe.wrap90(Fe.parse(e)):Fe.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?Fe.wrap90(Fe.parse(e)):Fe.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)?Fe.wrap180(Fe.parse(e)):Fe.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?Fe.wrap180(Fe.parse(e)):Fe.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?Fe.wrap180(Fe.parse(e)):Fe.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 n,r;if(2==t.length&&([n,r]=t,n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r)),isNaN(n)||isNaN(r)))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)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,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 r*(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 n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.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 Fe.wrap360(s)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return Fe.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),a=Math.cos(n),s=0,l=Math.sin(n),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=r+Math.atan2(u.y,u.x),h=c.toDegrees(),p=d.toDegrees();return new e(h,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),a=t.lon.toRadians(),s=o-r,l=a-i,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*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-n)*c)/Math.sin(c),h=Math.sin(n*c)/Math.sin(c),p=d*Math.cos(r)*Math.cos(i)+h*Math.cos(o)*Math.cos(a),f=d*Math.cos(r)*Math.sin(i)+h*Math.cos(o)*Math.sin(a),g=d*Math.sin(r)+h*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),_=y.toDegrees();return new e(m,_)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).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,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),a=t.lon.toRadians(),s=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).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),_=(Math.sin(l-a)>0?2*Ze-y:y)-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(p),w=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(_),Math.cos(_)+Math.cos(m)*b),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(u),-1),1)),E=a+Math.atan2(Math.sin(u)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(M)),x=M.toDegrees(),S=E.toDegrees();return new e(x,S)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(n).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(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).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(r)*Math.sin(s),u=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>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:Fe.wrap180(f),lon2:Fe.wrap180(g)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,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)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=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(r/2+Ze/4)/Math.tan(n/2+Ze/4)),a=Math.atan2(i,o).toDegrees();return Fe.wrap360(a)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(n).toRadians(),s=t/r,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 n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>Ze&&(r+=2*Ze);let a=(n+i)/2,s=Math.tan(Ze/4+n/2),l=Math.tan(Ze/4+i/2),u=Math.tan(Ze/4+a/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(s))/Math.log(l/s);isFinite(c)||(c=(r+o)/2);let d=a.toDegrees(),h=c.toDegrees();return new e(d,h)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].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(e)&&(o=Math.abs(o)-2*Ze);let a=Math.abs(o*n*n);return r||e.pop(),a;function s(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+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 n=Fe.toLat(this.lat,e,t),r=Fe.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(Pe,"LatLonSpherical");var fn,rr,qa,ot=Pe,Kg=["name","shortName","subtitle"],Fn=class e{constructor(t,n){f(this,"__type",e.__type),G(this,fn,void 0),G(this,rr,{}),G(this,qa,void 0),f(this,"id",""),f(this,"group",""),f(this,"name",""),f(this,"shortName",""),f(this,"elevation",0),f(this,"subtitle"),f(this,"scale",0),f(this,"layers"),f(this,"x_scale"),f(this,"perspectiveId"),f(this,"scene"),f(this,"width",0),f(this,"height",0),f(this,"georeference",[]),f(this,"_scale",0),X(this,fn,t),X(this,qa,n),Object.assign(this,n),this._scale=Jg(this),this.scale=this.x_scale||1/this._scale}static is(t){return t.__type===e.__type}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,fn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,fn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,fn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=g(this,rr).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&g(this,fn)._mapGroupsById[t]||null;return g(this,rr).mapGroup=n,n}createCoordinateByXY(e,t){return new Tr({x:e,y:t,map:this,mappedin:g(this,fn)})}createCoordinate(e,t){return new Tr({lat:e,lon:t,map:this,mappedin:g(this,fn)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new ot(t.target.x,t.target.y),i=new ot(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,te.warn(t),te.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Kg)t.maps[e][n]=r[e][n]}static async fetch(t){var n,r,i;let o=null==(n=t.options.things)?void 0:n.maps.slice();t.options.perspective&&rt(o,"perspectives"),null!=(r=t.options.things)&&r.mapGroups&&rt(o,"group"),rt(o,"elevation"),rt(o,"x_scale"),rt(o,"scale"),rt(o,"georeference");let a={fields:o,perspective:t.options.perspective,venue:t.options.venue};try{let n=await it(t.options,"map",a),r=s((e=>{let t=l.layers.find((t=>t.id===e));t?t.visible=!0:l.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let a=0,s=n.length;a<s;++a){var l=n[a];if(l){let e=l.perspective;null!=e&&(l.perspectiveId=e.id,o.indexOf("scene")>-1&&(l.scene=e.scene),e.layers?(l.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(r)):l.layers.forEach((e=>{e.visible=!0}))),delete l.perspective}if(t.options.preloadMapGeometry&&null!=(i=l.scene)&&i.polygons&&"string"==typeof l.scene.polygons){let e=await Cn()(l.scene.polygons);l.scene.polygons=await e.json()}n[a]=new e(t,l)}return n}catch(e){return te.error("Fetch Maps:",e),[]}}get center(){if(g(this,rr).center)return g(this,rr).center;let[e,t]=[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(e,t),{lat:a,lon:s}=this.createCoordinateByXY(n,r),l=new ot(i,o),u=new ot(a,s),c=l.midpointTo(u),d=this.createCoordinate(c.lat,c.lon);return g(this,rr).center=d,d}toJSON(){let e={...g(this,qa)};for(let t of Kg)e[t]=this[t];let t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};fn=new WeakMap,rr=new WeakMap,qa=new WeakMap,s(Fn,"MappedinMap"),f(Fn,"__type","MappedinMap");var Va=Fn;v();var Ga,gp,Ua,mp,tn,ti,js,Qg,Ls,Zg,hn,gn,mn,vn,ei=class e{constructor(t){G(this,Ga),G(this,Ua),G(this,js),G(this,Ls),f(this,"__type",e.__type),f(this,"map"),G(this,tn,{}),G(this,ti,void 0),G(this,hn,void 0),G(this,gn,void 0),G(this,mn,void 0),G(this,vn,void 0);let{map:n,mappedin:r}=t;null!=t.lat&&null!=t.lon&&(X(this,hn,t.lat),X(this,gn,t.lon)),null!=t.x&&null!=t.y&&(X(this,mn,t.x),X(this,vn,t.y)),this.map=n,X(this,ti,r)}static is(t){return t.__type===e.__type}get x(){return Je(this,Ua,mp).call(this,"x")}get y(){return Je(this,Ua,mp).call(this,"y")}get lat(){return Je(this,Ga,gp).call(this,"lat")}get lon(){return Je(this,Ga,gp).call(this,"lon")}absoluteDistanceTo(e){return em([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=g(this,tn).nearestNode;if(typeof e<"u")return e;let t=mt.instances.get(g(this,ti)).findNearestNodeOnMap(this.map.id,this);return g(this,tn).nearestNode=t,t}nodesInRadius(e){if(e<=0)return te.error("Radius must be greater than 0."),[];let t=g(this,tn).radius,n=g(this,tn).nodesInRadius;if(t&&n&&g(this,tn).radius===e)return g(this,tn).nodesInRadius;let r=mt.instances.get(g(this,ti)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return g(this,tn).radius=e,g(this,tn).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Ga=new WeakSet,gp=s((function(e){if(typeof g(this,hn)<"u"&&typeof g(this,gn)<"u")return g(this,"lat"===e?hn:gn);if(typeof g(this,mn)<"u"&&typeof g(this,vn)<"u"){let[t,n]=Je(this,Ls,Zg).call(this,g(this,mn),g(this,vn));return X(this,hn,t),X(this,gn,n),g(this,"lat"===e?hn:gn)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Ua=new WeakSet,mp=s((function(e){if(g(this,mn)&&g(this,vn))return g(this,"x"===e?mn:vn);if(null!=g(this,hn)&&null!=g(this,gn)){let[t,n]=Je(this,js,Qg).call(this,g(this,hn),g(this,gn));return X(this,mn,t),X(this,vn,n),g(this,"x"===e?mn:vn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),tn=new WeakMap,ti=new WeakMap,js=new WeakSet,Qg=s((function(e,t){let n=this.map.georeference[0],r=new ot(n.target.x,n.target.y),i=new ot(e,t),o=r.distanceTo(i),a=(r.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[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Ls=new WeakSet,Zg=s((function(e,t){let n,r=this.map.georeference[0],i=new ot(r.target.x,r.target.y),o=e-r.control.x,a=r.control.y-t,s=Math.atan2(o,a);n=0===o&&0===a?0:0===o?a/Math.cos(s):o/Math.sin(s);let l=s-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),hn=new WeakMap,gn=new WeakMap,mn=new WeakMap,vn=new WeakMap,s(ei,"MappedinCoordinate"),f(ei,"__type","MappedinCoordinate");var Tr=ei;v();var Ya,ni,Xa,tm=["name"],Rn=class e{constructor(t,n){f(this,"__type",e.__type),G(this,Ya,void 0),G(this,ni,void 0),G(this,Xa,{}),f(this,"id",""),f(this,"name",""),X(this,ni,n),X(this,Ya,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get maps(){let e=g(this,Xa).maps;if(typeof e<"u")return e;let t=[],{maps:n}=g(this,Ya),{id:r}=g(this,ni);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return g(this,Xa).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of tm)t.mapGroups[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.mapGroups.slice(),venue:t.options.venue};try{return(await it(t.options,"map-group",r)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...g(this,ni)};for(let t of tm)e[t]=this[t];return e}};Ya=new WeakMap,ni=new WeakMap,Xa=new WeakMap,s(Rn,"MappedinMapGroup"),f(Rn,"__type","MappedinMapGroup");var Wa=Rn;v();var om=on(nm());v(),v();var Ir,nn,rn,vp=[0,4,6,8,10],Dn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&!(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.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],vp.map(((e,t)=>n.slice(e,t===vp.length-1?void 0:vp[t+1]).join(""))).join("-")}),"randomId"),rm="mi-session-data",im="mi-local-data",Ha=class e{constructor(){G(this,nn,void 0),G(this,rn,void 0);try{let e=sessionStorage.getItem(rm);X(this,nn,e?JSON.parse(e):{id:Dn()})}catch{X(this,nn,{id:Dn()})}try{let e=localStorage.getItem(im);X(this,rn,e?JSON.parse(e):{deviceId:Dn()})}catch{X(this,rn,{deviceId:Dn()})}g(this,nn).id||(g(this,nn).id=Dn()),g(this,rn).deviceId||(g(this,rn).deviceId=Dn())}static getInstance(){return g(this,Ir)||X(this,Ir,new e),g(this,Ir)}static ___clearInstance(){X(this,Ir,void 0)}saveSessionData(e,t){g(this,nn)[e]=t;try{return sessionStorage.setItem(rm,JSON.stringify(g(this,nn))),!0}catch{return!1}}loadSessionData(e){let t=g(this,nn)[e];if(null!=t)return t}saveLocalData(e,t){g(this,rn)[e]=t;try{return localStorage.setItem(im,JSON.stringify(g(this,rn))),!0}catch{return!1}}loadLocalData(e){let t=g(this,rn)[e];if(null!=t)return t}};Ir=new WeakMap,nn=new WeakMap,rn=new WeakMap,s(Ha,"SafeStorage"),G(Ha,Ir,void 0);var $a=Ha;v();var yp={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],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 Fs(e){return/^[\da-f]{24}$/i.test(e)}function am(e,t=!1){let n="";if(null!=e){let r="?",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&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),r="&")}}return n}function kM(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(am(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+am(n)}async function it(e,t,n,r=!1){return Kr(e,t,n,r,!0)}async function Kr(e,t,n,r=!1,i=!1){let o=kM(e,t,n,r),a=await bp(e,o,r);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function MM(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.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)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function bp(e,t,n=!1){let r=MM(e,t,n),i=await Cn()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function rt(e,t){e.indexOf(t)<0&&e.push(t)}function em([e,t],[n,r]){let i=new ot(e,t),o=new ot(n,r);return i.distanceTo(o)}function Jg(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new ot(n.target.x,n.target.y),o=new ot(r.target.x,r.target.y),a=i.distanceTo(o),s=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(s*s+l*l)/a}catch(n){t=1,te.warn(n),te.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function ki(e){var t;return e instanceof Mr?e.entrances.map((e=>e.id)):e instanceof jn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function sm(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{te.error(e)}))));await Promise.all(e)}catch(e){te.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ri(e,t,n){let r;return function(...i){let o=this,a=s((function(){r=null,n||e.apply(o,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(o,i)}}function um(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,a=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,a))}function Os(){return $a.getInstance().loadLocalData("deviceId")}function As(){return $a.getInstance().loadSessionData("id")}s(Fs,"isGatewayKey"),s(am,"stringifyQuery"),s(kM,"buildUrl"),s(it,"getArray"),s(Kr,"getObject"),s(MM,"constructParamsForRequest"),s(bp,"generateAPIRequest"),s(rt,"addToSet"),s(em,"getDistanceBetweenLatLon"),s(Jg,"getMapScale"),s(ki,"getNodesForNavigatable"),s(sm,"populateBundledImagesAsBlobs"),s(ri,"debounce"),s(um,"normalizeCategoryRank"),s(Os,"getDeviceIDFromStorage"),s(As,"getSessionIDFromStorage");var lm=s(((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 n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function cm(e){var t;let n={...e};for(let[e,r]of Object.entries(yp))n[e]=(0,om.default)(r.concat(null!=(t=n[e])?t:[]));return n}function wp(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return dm(this.cover(t,n),t,n,e)}function dm(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:r},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=n>=(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&&n===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=n>=(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 pm(e){var t,n,r,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(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(a[n]=r,s[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),n=0;n<o;++n)dm(this,a[n],s[n],e[n]);return this}function _p(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function kp(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Mp(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 lt(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Ep(e,t,n){var r,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 lt(g,c,d,h,p)),null==n?n=1/0:(c=e-n,d=t-n,h=e+n,p=t+n,n*=n);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 lt(g[3],v,y,a,s),new lt(g[2],i,y,v,s),new lt(g[1],v,o,a,y),new lt(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),_=t-+this._y.call(null,g.data),b=m*m+_*_;if(b<n){var w=Math.sqrt(n=b);c=e-w,d=t-w,h=e+w,p=t+w,r=g.data}}return r}function xp(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,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])&&(n=t,h=d)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.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&&(n?n[h]=p:this._root=p),this):(this._root=i,this)}function fm(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Tp(){return this._root}function Ip(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Sp(e){var t,n,r,i,o,a,s=[],l=this._root;for(l&&s.push(new lt(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(r+o)/2,c=(i+a)/2;(n=l[3])&&s.push(new lt(n,u,c,o,a)),(n=l[2])&&s.push(new lt(n,r,c,u,a)),(n=l[1])&&s.push(new lt(n,u,i,o,c)),(n=l[0])&&s.push(new lt(n,r,i,u,c))}return this}function Pp(e){var t,n=[],r=[];for(this._root&&n.push(new lt(this._root,this._x0,this._y0,this._x1,this._y1));t=n.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])&&n.push(new lt(o,a,s,c,d)),(o=i[1])&&n.push(new lt(o,c,s,l,d)),(o=i[2])&&n.push(new lt(o,a,d,c,u)),(o=i[3])&&n.push(new lt(o,c,d,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function hm(e){return e[0]}function Op(e){return arguments.length?(this._x=e,this):this._x}function gm(e){return e[1]}function Ap(e){return arguments.length?(this._y=e,this):this._y}function ii(e,t,n){var r=new Cp(null==t?hm:t,null==n?gm:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Cp(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function mm(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(cm,"mergeThings"),v(),v(),v(),v(),s(wp,"default"),s(dm,"add"),s(pm,"addAll"),v(),s(_p,"default"),v(),s(kp,"default"),v(),s(Mp,"default"),v(),v(),s(lt,"default"),s(Ep,"default"),v(),s(xp,"default"),s(fm,"removeAll"),v(),s(Tp,"default"),v(),s(Ip,"default"),v(),s(Sp,"default"),v(),s(Pp,"default"),v(),s(hm,"defaultX"),s(Op,"default"),v(),s(gm,"defaultY"),s(Ap,"default"),s(ii,"quadtree"),s(Cp,"Quadtree"),s(mm,"leaf_copy");var Tt=ii.prototype=Cp.prototype;Tt.copy=function(){var e,t,n=new Cp(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=mm(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=mm(t));return n},Tt.add=wp,Tt.addAll=pm,Tt.cover=_p,Tt.data=kp,Tt.extent=Mp,Tt.find=Ep,Tt.remove=xp,Tt.removeAll=fm,Tt.root=Tp,Tt.size=Ip,Tt.visit=Sp,Tt.visitAfter=Pp,Tt.x=Op,Tt.y=Ap;var bn,Ke,yn=class e{constructor(e){G(this,bn,void 0),f(this,"categories"),f(this,"categoriesByExternalId"),f(this,"locations"),f(this,"locationsByExternalId"),f(this,"vortexes"),f(this,"vortexesByExternalId"),f(this,"maps"),f(this,"mapsByExternalId"),f(this,"nodes"),f(this,"nodesByExternalId"),f(this,"polygons"),f(this,"polygonsByExternalId"),f(this,"events"),f(this,"eventsByExternalId"),f(this,"mapGroups"),f(this,"mapGroupsByExternalId"),f(this,"locationStates"),f(this,"rankings"),f(this,"languages",{}),G(this,Ke,{}),X(this,bn,e)}get polygonsByMapId(){if(g(this,Ke).polygonsByMapId)return g(this,Ke).polygonsByMapId;let e,t={};for(let n=0,r=g(this,bn).polygons.length;n<r;++n)e=g(this,bn).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).polygonsByMapId=n,g(this,Ke).polygonsByMapId}get nodesByMapId(){if(g(this,Ke).nodesByMapId)return g(this,Ke).nodesByMapId;let e,t={};for(let n=0,r=g(this,bn).nodes.length;n<r;++n)e=g(this,bn).nodes[n],e.map&&(t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e));let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).nodesByMapId=n,g(this,Ke).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(g(this,Ke).nodeTreesByMap||(g(this,Ke).nodeTreesByMap=new Map),!g(this,Ke).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=ii();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),g(this,Ke).nodeTreesByMap.set(e,r)}return g(this,Ke).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(g(this,Ke).nodeTreesByMap||(g(this,Ke).nodeTreesByMap=new Map),!g(this,Ke).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=ii();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),g(this,Ke).nodeTreesByMap.set(e,n)}let i=g(this,Ke).nodeTreesByMap.get(e),o=[],a=t.x,s=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-a)**2+(t.y-s)**2)<=n&&o.push(t)}while(e=e.next);let u=a-Math.max(t,Math.min(i,a)),c=s-Math.max(r,Math.min(l,s));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(g(this,Ke).locationsByMapId)return g(this,Ke).locationsByMapId;let e,t={};for(let n=0,r=g(this,bn).locations.length;n<r;++n){e=g(this,bn).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).locationsByMapId=n,g(this,Ke).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};bn=new WeakMap,Ke=new WeakMap,s(yn,"MappedinCache"),f(yn,"instances",new WeakMap);var jp=yn,mt=jp,Ka={categories:xr,locations:jn,vortexes:xa,maps:Va,nodes:va,polygons:Mr,venue:$r,events:Fa,mapGroups:Wa,themes:Cs,locationStates:Ba,rankings:La};v(),v(),v(),v();var It=6371008.8,vm={centimeters:100*It,centimetres:100*It,degrees:It/111325,feet:3.28084*It,inches:39.37*It,kilometers:It/1e3,kilometres:It/1e3,meters:It,metres:It,miles:It/1609.344,millimeters:1e3*It,millimetres:1e3*It,nauticalmiles:It/1852,radians:1,yards:1.0936*It},tC={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/It,yards:1.0936133};function ir(e,t,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=t||{},r.geometry=e,r}function St(e,t,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(!Lp(e[0])||!Lp(e[1]))throw new Error("coordinates must contain numbers");return ir({type:"Point",coordinates:e},t,n)}function zn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return ir({type:"LineString",coordinates:e},t,n)}function Sr(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function ym(e,t){void 0===t&&(t="kilometers");var n=vm[t];if(!n)throw new Error(t+" units is invalid");return e*n}function bm(e,t){void 0===t&&(t="kilometers");var n=vm[t];if(!n)throw new Error(t+" units is invalid");return e/n}function Ja(e){return 180*(e%(2*Math.PI))/Math.PI}function jt(e){return e%360*Math.PI/180}function Lp(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Ds(e,t,n){if(null!==e)for(var r,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 _=0,b=0;if(null!==(a=c?u.geometries[m]:u)){l=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,h,y,_,b))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],h,y,_,b))return!1;h++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-d;i++){if(!1===t(l[r][i],h,y,_,b))return!1;h++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-d;o++){if(!1===t(l[r][i][o],h,y,_,b))return!1;h++}b++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Ds(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Np(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function EM(e,t){var n,r,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(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,d=p?e.features[n].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(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],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 Qa(e,t){EM(e,(function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(ir(e,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 l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(ir({type:a,coordinates:u},r),n,l))return!1}}))}function xM(e,t){Qa(e,(function(e,n,r){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===Ds(e,(function(o,c,d,h,p){if(void 0===a||n>s||h>l||p>u)return a=o,s=n,l=h,u=p,void(i=0);var f=zn([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})))return!1}}}))}function wm(e,t,n){var r=n,i=!1;return xM(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function Fp(e){var t=[1/0,1/0,-1/0,-1/0];return Ds(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}s(ir,"feature"),s(St,"point"),s(zn,"lineString"),s(Sr,"featureCollection"),s(ym,"radiansToLength"),s(bm,"lengthToRadians"),s(Ja,"radiansToDegrees"),s(jt,"degreesToRadians"),s(Lp,"isNumber"),s(Ds,"coordEach"),s(Np,"featureEach"),s(EM,"geomEach"),s(Qa,"flattenEach"),s(xM,"segmentEach"),s(wm,"segmentReduce"),s(Fp,"bbox"),Fp.default=Fp;var Bs=Fp;function wn(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 Vt(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 _m(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function TM(e,t,n){void 0===n&&(n={});var r=wn(e),i=wn(t),o=jt(i[1]-r[1]),a=jt(i[0]-r[0]),s=jt(r[1]),l=jt(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return ym(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),s(wn,"getCoord"),s(Vt,"getCoords"),s(_m,"getType"),s(TM,"distance");var ar=TM;function zs(e,t){return void 0===t&&(t={}),wm(e,(function(e,n){var r=n.geometry.coordinates;return e+ar(r[0],r[1],t)}),0)}function Vs(e,t,n){if(void 0===n&&(n={}),!0===n.final)return IM(e,t);var r=wn(e),i=wn(t),o=jt(r[0]),a=jt(i[0]),s=jt(r[1]),l=jt(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 Ja(Math.atan2(u,c))}function IM(e,t){var n=Vs(t,e);return n=(n+180)%360}function qs(e,t,n,r){void 0===r&&(r={});var i=wn(e),o=jt(i[0]),a=jt(i[1]),s=jt(n),l=bm(t,r.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return St([Ja(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),Ja(u)],r.properties)}function SM(e){if(!e)throw new Error("geojson is required");var t=[];return Qa(e,(function(e){PM(e,t)})),Sr(t)}function PM(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=Vt(r);break;case"LineString":n=[Vt(r)]}n.forEach((function(n){OM(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function OM(e,t){var n=[];return e.reduce((function(e,r){var i=zn([e,r],t);return i.bbox=AM(e,r),n.push(i),r})),n}function AM(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}s(zs,"length"),v(),v(),v(),s(Vs,"bearing"),s(IM,"calculateFinalBearing"),v(),s(qs,"destination"),v(),v(),s(SM,"lineSegment"),s(PM,"lineSegmentFeature"),s(OM,"createSegments"),s(AM,"bbox");var Rp=SM,Bm=on(Rm(),1);function iE(e,t){var n={},r=[];if("LineString"===e.type&&(e=ir(e)),"LineString"===t.type&&(t=ir(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=Dm(e,t);return i&&r.push(i),Sr(r)}var o=(0,Bm.default)();return o.load(Rp(t)),Np(Rp(e),(function(e){Np(o.search(e),(function(t){var i=Dm(e,t);if(i){var o=Vt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Sr(r)}function Dm(e,t){var n=Vt(e),r=Vt(t);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],l=r[0][0],u=r[0][1],c=r[1][0],d=r[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?St([i+p*(a-i),o+p*(s-o)]):null}s(iE,"lineIntersect"),s(Dm,"intersects");var zm=iE;function aE(e,t,n){void 0===n&&(n={});var r=St([1/0,1/0],{dist:1/0}),i=0;return Qa(e,(function(e){for(var o=Vt(e),a=0;a<o.length-1;a++){var s=St(o[a]);s.properties.dist=ar(t,s,n);var l=St(o[a+1]);l.properties.dist=ar(t,l,n);var u=ar(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),d=Vs(s,l),h=qs(t,c,d+90,n),p=qs(t,c,d-90,n),f=zm(zn([h.geometry.coordinates,p.geometry.coordinates]),zn([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=ar(t,g,n),g.properties.location=i+ar(s,g,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=a),i+=u}})),r}s(aE,"nearestPointOnLine");var eo=aE;function oE(e,t,n){var r=Vt(n);if("LineString"!==_m(n))throw new Error("line must be a LineString");for(var i,o=eo(n,e),a=eo(n,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(r[l]);return s.push(i[1].geometry.coordinates),zn(s,n.properties)}s(oE,"lineSlice");var Kp=oE;function sE(e,t){void 0===t&&(t={});var n=Bs(e);return St([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),s(sE,"center");var Vm=sE;function uE(e,t,n){void 0===n&&(n={});for(var r=wn(e),i=Vt(t),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")),lE(i[o],i[o+1],r,a,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function lE(e,t,n,r,i){var o=n[0],a=n[1],s=e[0],l=e[1],u=t[0],c=t[1],d=u-s,h=c-l,p=(n[0]-s)*h-(n[1]-l)*d;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?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"===r?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"===r&&(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}v(),s(uE,"booleanPointOnLine"),s(lE,"isPointOnLineSegment");var qm=uE,cE=1e-7,Gm=.005;function Jp(e,t){let n=hE(t);return Sr(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=dE(t,o)),e.push(...r),e}),[]))}function dE(e,t){return t.reduce(((e,t)=>{let n={epsilon:cE},r=e.findIndex((e=>qm(Vm(t),e,n))),i=e[r];if(i){let[n,o]=fE(i,t);e.splice(r,1,n,o)}return e}),[e])}function pE(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function fE(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>eo(e,St(t))));return r.reduce(((t,n)=>{let r=Kp(St(n),i[0],e),o=Kp(St(n),i[1],e),a=zs(r)<zs(o)?r:o;return a.properties={...e.properties,entrances:[]},t.concat([a])}),[])}function Um(e){let t=new Map;for(let n in e){let r=e[n];if(!pE(r))continue;let{altitude:i,color:o,width:a,height:s,opacity:l}=r,u={altitude:i,color:o,width:a,height:s,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function hE(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Wm(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function Hm(e){let[t,n,r,i]=Bs(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function gE(e,t,n){let r=n.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/n.mapScale;return{id:o,georeference:r,name:a,shortName:a,scene:{polygons:t},elevation:s,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(Jp,"processObstructions"),s(dE,"splitObstructionByAllEntrances"),s(pE,"isPolygonStyle"),s(fE,"splitObstructionByEntrance"),s(Um,"getStylesMap"),s(hE,"getEntranceMap"),v(),v(),s(Wm,"findMapWithElevationClosestToZero"),v(),s(Hm,"getMapExtent"),s(gE,"convertMap");var Zp=class{constructor(e){f(this,"mapExtent"),f(this,"stretchRatio"),f(this,"midLat"),f(this,"midLong"),f(this,"mapUnitRatio",1e6),f(this,"latDistance"),f(this,"longDistance"),f(this,"mapScale"),f(this,"widthInMapUnits"),f(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,a=(n+i)/2,s=new ot(o,i),l=new ot(o,n),u=new ot(t,a),c=new ot(r,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(r-t)/(i-n);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(Zp,"CoordinateConverter");var Ys=Zp;function mE(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",a=t.get(o);if(a){let t=a.convert(r.geometry.coordinates),s=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:s,paths:l,...t})}})),n}function vE(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}s(mE,"convertNodes"),s(vE,"convertNodes_MVFv1");var Ym=s(((e,t,n,r,i,o)=>{var a,s,l;let u,c=[],d=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,h=i.Walls,p=null!=(a=i.ExteriorWalls)?a:h,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/d},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.color)||"#000000"},vertexes:[]},g={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/d},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let a=t.features[i];if("Point"===a.geometry.type)continue;let h="desk-entrance"===(null==(s=a.properties.kind)?void 0:s.toLowerCase()),p=(h?a.properties.externalId:a.properties.id)||"",v=a.properties.externalId||"",y=n.get(p)||[];if("destinationNodes"in a.properties&&a.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),h)n.set(v,y);else{let n=r.get(a.properties.id),s=a.properties.center?o.convert(a.properties.center):void 0,h=a.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=a.properties.kind||"",_="void"===m.toLowerCase(),b=1-(i+1)/t.features.length*Gm;"LineString"===a.geometry.type&&"wall"===(null==(l=a.properties.kind)?void 0:l.toLowerCase())?(u=a.geometry.coordinates.map((e=>o.convert(e))),a.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=a.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:y,map:e,id:p,externalId:v,layer:m,geometry:{visible:!_,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/d*b},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:s,holes:h}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),Xm=s(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),a=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),s=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.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)*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 yE(e,t,n,r,i,o,a){let s=Ym(e,n,r,i,o,a),l=Ym(e,t,r,i,o,a);return s.concat(l)}function bE(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function wE(e){let t=new Map;return e.features.forEach((e=>{var n,r,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!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],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 $m(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function Km(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function Jm(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Qp(e,t,n){let r=Km(e,t);for(let e of r){let t=Jm(e);null==n[t]&&(n[t]={id:t,name:e})}}function Qm(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function _E(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return Qm(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function to(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!Qm(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=_E(t),a=$m(e,t);if(null==r[a]){let e={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};r[a]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[a].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[a].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[a].nodes.push(e)}let s=Km(e,t);for(let e of s){let t=Jm(e);r[a].categories.push(t)}}function kE(e,t=new Map){var n,r,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!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],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())&&(Qp("space",t,h),to("space",t,e,d));let _=new Map;for(let t of y)_.set(t.properties.id,t),t.properties.externalId&&(Qp("entrance",t,h),to("entrance",t,e,d));let b={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};to("entrance",b,e,d);for(let n of m){if(Qp("obstruction",n,h),to("obstruction",n,e,d),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=_.get(n);t&&to("entrance",{...t,properties:{...t.properties,externalId:b.properties.externalId}},e,d)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=$m("obstruction",n);null!=d[e]&&d[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(d),categories:Object.values(h)}}function Zm(e){var t,n,r,i,o,a,s,l,u,c;let d=null!=(t=e.obstruction)?t:[],h=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],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:{},_=null!=(u=e["connection.json"])?u:[],b={},w=new Map,M=[],E=Um(v),x=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=Jp(d[e],p[e]);if(t.features.length){let n=Hm(t),r=new Ys(n);w.set(e,r),b[e]=yE(e,t,h[e],x,E,v,r),M.push(gE(S.get(e),b[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let I=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!I.has(t)&&I.set(t,e)}));let k=Object.values(b).flat(),C=bE(_,I),O=mE(I,w),T=y.features[0],A=T.properties.name,P=T.geometry.coordinates[0],F=T.geometry.coordinates[1],L=(null==(c=Wm(M))?void 0:c.id)||"",{locations:N,categories:R}=kE(e,x);return{polygons:k,venue:{name:A,latitude:F,longitude:P,defaultMap:L},maps:M,vortexes:C,nodes:O,locations:N,mapGroups:[],locationStates:[],categories:R,themes:[],imageBinaries:new Map}}function ev(e){var t,n,r,i,o,a,s;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},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=Jp(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=Hm(t),r=new Ys(n);g.set(e,r);let i=Xm(e,u[e],r),o=Xm(e,t,r);f[e]=i.concat(o),y=y.concat(vE(c[e],e,r)),v.push(ME(d[e],f[e],r))}m=m.concat(wE(p[e]))}));let _=Object.values(f).flat(),b=h.features[0],w=b.properties.name,M=b.geometry.coordinates[0],E=b.geometry.coordinates[1],x=(null==(s=v[0])?void 0:s.id)||"",S=new Map;_.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:_,venue:{name:w,latitude:E,longitude:M,defaultMap:x},maps:v,vortexes:m,nodes:y,locations:k,mapGroups:[],locationStates:[],categories:C,themes:[],imageBinaries:new Map}}function ME(e,t,n){let r=n.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/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(yE,"convertPolygons"),s(bE,"convertVortexes"),s(wE,"convertVortexes_MVFv1"),s($m,"getLocationId"),s(Km,"getFeatureCategories"),s(Jm,"getCategoryIdFromName"),s(Qp,"mutateCategoriesWithNewFeature"),s(Qm,"isFeatureConnection"),s(_E,"getLocationLabel"),s(to,"mutateLocationsWithNewFeature"),s(kE,"createMetaDataFromMVF"),s(Zm,"convertMVFToMappedin"),s(ev,"convertMVFv1ToMappedin"),s(ME,"convertMap_MVFv1"),v();var _v,rf,wv,no,oi,si,ro,io,ao,ui,sr,li,ci,di,oo,pi,Pr,kv=on(bv()),jE=null==(_v=null==R?void 0:R.env)?void 0:_v.npm_package_version,Xs=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke"],nf=Xs[0],LE=!1,an=class e{constructor(e){var t;G(this,no,void 0),G(this,oi,void 0),G(this,si,void 0),G(this,ro,void 0),G(this,io,void 0),G(this,ao,void 0),G(this,ui,void 0),G(this,sr,void 0),G(this,li,void 0),G(this,ci,void 0),G(this,di,void 0),G(this,oo,void 0),G(this,pi,void 0),G(this,Pr,void 0),X(this,sr,e.clientId),X(this,li,e.clientSecret),X(this,ci,e.accessToken),X(this,ui,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!g(this,ui)&&g(this,sr)&&!Fs(g(this,sr))&&(n="https://web-proxy.mappedin.com/a/"),X(this,si,n),X(this,si,g(this,si)+(e.venue+"/")),X(this,pi,e.venue),X(this,oi,!1),X(this,no,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),X(this,ro,Xs.find((t=>t===e.context))||Xs[0]),X(this,io,Os()),X(this,ao,As()),X(this,di,new Set),X(this,oo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=ri(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:g(this,oi)};g(this,Pr)&&(n={...n,...g(this,Pr)});let r=g(this,si)+e+"?"+kv.default.stringify(n,{skipEmptyString:!0,skipNull:!0}),i={"mi-context":nf||g(this,ro),"mi-session":this.getSessionID(),"mi-device":this.getDeviceID(),"mappedin-sdk-version":jE,"mappedin-platform-version":g(this,oo)};LE&&te.log("Analytics.track",r,i),!g(this,no)&&(g(this,ci)?i.Authorization="Bearer ".concat(g(this,ci)):g(this,ui)||g(this,li)&&g(this,sr)&&(i["x-mappedin-key"]=btoa(g(this,sr)),i["x-mappedin-secret"]=btoa(g(this,li))),Cn()(r,{method:"GET",mode:"cors",headers:i}))}updateAnalyticsUserPosition(e){X(this,Pr,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;nt.addPendingEvent(new Ui({venue:g(this,pi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;nt.addPendingEvent(new Gi({venue:g(this,pi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return rf||g(this,ao)}static setSessionID(e){rf=e}static setDeviceID(e){wv=e}static clearSessionID(){rf=void 0}getDeviceID(){return wv||g(this,io)}setGeolocationMode(e){X(this,oi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!g(this,di).has(t)&&(this.track(t),g(this,di).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=Xs.find((t=>t===e));t&&(nf=t)}static clearContext(){nf=void 0}static destroy(){e.instance=null}};no=new WeakMap,oi=new WeakMap,si=new WeakMap,ro=new WeakMap,io=new WeakMap,ao=new WeakMap,ui=new WeakMap,sr=new WeakMap,li=new WeakMap,ci=new WeakMap,di=new WeakMap,oo=new WeakMap,pi=new WeakMap,Pr=new WeakMap,s(an,"Analytics"),f(an,"instance",null),f(an,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var af=an,so=af;v();var of=class{constructor(){f(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 n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};s(of,"PubSub");var Hs=of,Ev={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Of,"true")}});var qn,Or,fi,uo,sf,$s,xv,uf=class extends Hs{constructor(e){super(),G(this,uo),G(this,$s),f(this,"perspective"),f(this,"things"),f(this,"options"),G(this,qn,void 0),f(this,"updatedAt"),f(this,"categories",[]),f(this,"locations",[]),f(this,"vortexes",[]),f(this,"maps",[]),f(this,"nodes",[]),f(this,"polygons",[]),f(this,"venue",{}),f(this,"events",[]),f(this,"mapGroups",[]),f(this,"themes",[]),f(this,"locationStates",[]),f(this,"rankings"),f(this,"currentLanguage"),G(this,Or,{}),f(this,"_categoriesById"),f(this,"_locationsById"),f(this,"_vortexesById"),f(this,"_mapsById"),f(this,"_nodesById"),f(this,"_polygonsById"),f(this,"_eventsById"),f(this,"_mapGroupsById"),f(this,"_locationStatesById"),f(this,"_locationRankingsById"),f(this,"_rankingsById"),f(this,"_categoriesByExternalId"),f(this,"_locationsByExternalId"),f(this,"_vortexesByExternalId"),f(this,"_mapsByExternalId"),f(this,"_nodesByExternalId"),f(this,"_polygonsByExternalId"),f(this,"_eventsByExternalId"),f(this,"_mapGroupsByExternalId"),f(this,"_locationStatesByExternalId"),f(this,"_locationRankingsByExternalId"),f(this,"_rankingsByExternalId"),G(this,fi,void 0),f(this,"changeLanguage",s((async(e,t=!0)=>{var n,r,i,o,a;let s=e.toLowerCase();if((null==(n=this.currentLanguage)?void 0:n.code.toLowerCase())===s)return Promise.resolve();if(null==(r=this.venue.languages)||!r.find((e=>e.code.toLowerCase()===s)))return te.error("Language ".concat(s," not found in venue ").concat(this.venue.slug)),Promise.reject("Language ".concat(s," not found in venue ").concat(this.venue.slug));if(t&&null!=(i=this.currentLanguage)&&i.code&&!g(this,Or)[null==(o=this.currentLanguage)?void 0:o.code]&&(g(this,Or)[null==(a=this.currentLanguage)?void 0:a.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===s)),this.options.language=this.currentLanguage.code,null!=g(this,Or)[s]){let e=JSON.parse(g(this,Or)[s]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}),"changeLanguage")),f(this,"hydrate",s((async(e,t=!1,n=!1)=>{var r,i;let o;if("string"==typeof e)try{o=JSON.parse(e)}catch(e){return void te.error("Unable to parse JSON",e)}else o=e;let a=Object.keys(o);for(let e=0,t=a.length;e<t;++e){let t=a[e],r=o[t],i=Ka[t];null!=i&&"function"==typeof i.hydrate&&(n?"updateInPlace"in i&&"function"==typeof i.updateInPlace&&i.updateInPlace(this,r):this[t]=i.hydrate(r,this))}t&&await sm(o);let{images:s,scenes:l,imageBinaries:u,options:c}=o;c&&(this.options=c),this.images=s,this.scenes=l,this.imageBinaries=u,n||(mt.clearInstance(this),X(this,qn,mt.create(this)),this.generateGetters(a)),this.currentLanguage=null!=(r=this.currentLanguage)?r:Rs(this.venue,this.options),this.options.language=null==(i=this.currentLanguage)?void 0:i.code,Je(this,uo,sf).call(this),this.initNavigator()}),"hydrate")),f(this,"images"),f(this,"imageBinaries"),f(this,"scenes"),f(this,"analytics"),f(this,"navigator"),f(this,"toJSON",s(((e=!1)=>{var t;let n={};for(let e in Ka)Array.isArray(this[e])&&(n[e]=this[e].map((e=>e.toJSON())));let r={...n,venue:this.venue.toJSON()};return e&&(r.options=this.options),null!=this.rankings&&(r.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete r.locationRankings,r}),"toJSON")),f(this,"toString",s(((e=!1)=>JSON.stringify(this.toJSON(e))),"toString")),this.options=e,X(this,qn,mt.create(this));let t=so.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections}}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e="".concat(n,"ByExternalId"),t=g(this,qn)[e];if(null!=t)return t;let r={};return this[n].forEach((e=>r[e.externalId]=e)),g(this,qn)[e]=r,r}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=g(this,qn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),g(this,qn)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=Zm(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=ev(e);return this.hydrate(t)}async fetch(e=!1){"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"]),Fs(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);if(r.includes("venue")){let t=Ka.venue,n=Promise.resolve();e?"updateInPlace"in t&&"function"==typeof t.updateInPlace&&(n=t.updateInPlace(this)):n=t.fetch(this).then((e=>{var t;this.venue=e;let n=Rs(e,this.options);return n&&(this.currentLanguage=n,this.options.language=null==(t=this.currentLanguage)?void 0:t.code),Promise.resolve()})),n&&await n,r.splice(r.indexOf("venue"),1)}for(let t=0,i=r.length;t<i;++t){let i=r[t],o=Ka[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(Kr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>X(this,fi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{Je(this,uo,sf).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new wu({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()))})}};qn=new WeakMap,Or=new WeakMap,fi=new WeakMap,uo=new WeakSet,sf=s((function(){g(this,fi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(g(this,fi)))})),Je(this,$s,xv).call(this)}),"#transformData"),$s=new WeakSet,xv=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=lm(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=um(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(uf,"Mappedin");var Bn=uf;function NE(e){var t;if(e.languages)for(let n=0;n<navigator.languages.length;n++){let r=null==(t=e.languages)?void 0:t.find((e=>e.code.toLowerCase()===navigator.languages[n].toLowerCase()));if(r)return r}}function Rs(e,t){var n,r;let i,o=null==(n=e.languages)?void 0:n.find((e=>e.code.toLowerCase()===t.language));if(o)i=o;else{if(null==(r=t.fallbackToNavigatorLanguages)||r)if(window.navigator.languages&&window.navigator.languages.length>0){let t=NE(e);t&&(i=t)}else te.warn("fallbackToNavigatorLanguage is set however navigator.languages is empty");!i&&e.languages&&(i=e.languages.find((t=>t.code===e.defaultLanguage.code)))}return i}s(NE,"findPreferredLangaugeFromNavigator"),s(Rs,"findPreferredLanguage"),v();var Ar=on(Tv());v();var FE=["0","1","2","3","4","5","6","7","8","9"],RE=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],DE=["0","1","2","3","4","5","6","7","8","9"],BE=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],KL=[...FE,...RE,...DE,...BE],Iv=["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"];v();var zE=32,Nt=!1,VE=120,df=0,ff=class{constructor(e){f(this,"_callback"),f(this,"_frameCount"),f(this,"_ordering"),f(this,"_supersededBy"),f(this,"name"),f(this,"_remainingFrameCount"),f(this,"_lastFrameTime"),f(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,Nt&&te.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(ff,"FrameUpdate");var Ks=ff,hf=class{constructor(e){if(f(this,"_postponed"),f(this,"userdata"),f(this,"_priority"),f(this,"_group"),f(this,"name"),f(this,"_lastFrameTime"),f(this,"_callback"),f(this,"_complete"),f(this,"_scheduled"),f(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,Nt&&te.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(hf,"FrameTask");var Gn=hf,gf=class{constructor(e){f(this,"_postponed"),f(this,"_onComplete"),f(this,"_priority"),f(this,"userdata"),f(this,"name"),f(this,"_tasks"),f(this,"_scheduledTasks"),f(this,"_scheduled"),f(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,Nt&&te.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}};s(gf,"FrameTaskGroup");var Js=gf,mf=class{constructor(e){f(this,"_maxMillisecondsPerFrame"),f(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:zE,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(mf,"RealTimeTimer");var pf=mf,vf=class{constructor(e){var t;f(this,"_raf"),f(this,"options"),f(this,"_timer"),f(this,"_performance"),f(this,"_scheduledUpdatesByOrdering"),f(this,"_scheduledTasksByPriority"),f(this,"_postponedTasks"),f(this,"_requestAnimationFrameHandle"),f(this,"_updatesToRunThisFrame"),f(this,"_lastFrameTime",0),f(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new pf,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new hi,this._scheduledTasksByPriority=new hi,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),Nt&&te.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 hi,this._scheduledTasksByPriority=new hi,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),Nt&&te.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 n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;Nt&&(0===df&&(r=!0),++df,df%=VE);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),r&&te.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,r&&te.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 n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&te.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()-n),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,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;te.assert(void 0!==n),Object.getPrototypeOf(n)===Js.prototype&&(r=n,n=r._popTask()),te.assert(void 0!==n),te.assert(Object.getPrototypeOf(n)===Gn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),Nt&&te.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),Nt&&te.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===Js)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,Nt&&te.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),Nt&&te.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)===Gn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),Nt&&te.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)===Gn.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)===Gn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,Nt&&te.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)===Gn.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)===Gn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),Nt&&te.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Gn.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,Nt&&te.log("task priority changed",e.name,t)}};s(vf,"TaskScheduler");var Qs=vf,yf=class{constructor(){f(this,"_map"),f(this,"_size"),f(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(te.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,n={[Symbol.iterator]:()=>n,next:()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return te.assert(e===this._size),e}};s(yf,"Multimap");var hi=yf,Un=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),qE=/([!-/:-@])|(?:[\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 GE(e){return e.split(qE).filter(Boolean)}s(GE,"tokenizeAndCaptureDelimiters");var kn,Kt,ur,Mn,at,co,po,mi,fo,ho,go,mo,vi,Wn,Zs,eu,lr,vo,tu,nu,ru,Pv,gi="",UE=.09,WE=1,YE=.025,XE=.5,HE=5e-4,$E=5e-4,KE=.01,JE=.05,Sv=1,QE=.01,ZE=.2,ex={MappedinCategory:"categories",MappedinLocation:"locations"},tx={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:Iv,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===R.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:UE,PRIMARY_INDEX_WEIGHT:WE,SECONDARY_INDEX_WEIGHT:YE,CATEGORY_NAME_WEIGHT:XE,LOCATION_NAME_WEIGHT:Sv,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:HE,CATEGORY_LOCATION_TAGS_WEIGHT:$E,CATEGORY_LOCATION_NAME_WEIGHT:KE,PRIMARY_INDEX_TAGS_NAME_WEIGHT:JE,LOCATION_DEFAULT_RANK:Sv,RATIO_OF_FUZZY_TO_EXACT:QE,RATIO_OF_PREFIX_TO_EXACT:ZE}},bf=class{constructor(e,t){var n;G(this,ru),G(this,kn,void 0),G(this,Kt,void 0),G(this,ur,void 0),G(this,Mn,void 0),G(this,at,void 0),G(this,co,new Qs({performance:!0})),G(this,po,void 0),G(this,mi,void 0),G(this,fo,new Map),G(this,ho,void 0),G(this,go,void 0),G(this,mo,void 0),f(this,"buildIndices",s((()=>{var e,t;X(this,lr,new Promise((e=>{X(this,vo,e)})));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}=g(this,at).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:s},weights:{fuzzy:o,prefix:a},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:GE},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=g(this,po))&&n.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=g(this,at))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=g(this,at))?void 0:t.jsonIndex);X(this,Kt,Ar.default.loadJS(e,u)),X(this,ur,Ar.default.loadJS(n,c)),X(this,Mn,Ar.default.loadJS(r,d))}else X(this,Kt,new Ar.default(u)),X(this,ur,new Ar.default(c)),X(this,Mn,new Ar.default(d)),g(this,kn).locations.forEach(g(this,Zs)),g(this,kn).categories.forEach(g(this,eu));g(this,co).update(performance.now())}),"buildIndices")),G(this,vi,0),G(this,Wn,s((e=>{lu(this,vi)._++,g(this,co).scheduleUpdate(new Ks({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{try{e()}catch(e){te.warn("faild updating index due to",e)}lu(this,vi)._--,0===g(this,vi)&&g(this,vo).call(this)}}))}),"#addTask")),G(this,Zs,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=g(this,at).constants,s=o;null!=(t=g(this,at))&&t.useLocationRank&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),g(this,Wn).call(this,(()=>{g(this,Kt).add({name:Un(e.name),tags:"",id:"MappedinLocation#"+e.id,weight:o,rank:s})})),null!=(n=g(this,at))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{g(this,Kt).add({name:"",tag:Un(t),id:"MappedinLocation#"+e.id,weight:a,rank:s})})),null!=(r=g(this,at))&&r.searchDescriptions&&g(this,Wn).call(this,(()=>g(this,ur).add({description:Un(e.description||""),id:"MappedinLocation#"+e.id,weight:i,rank:s})))}),"#processLocation")),G(this,eu,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=g(this,at).constants;g(this,Wn).call(this,(()=>g(this,Kt).add({name:Un(e.name||""),description:"",id:"MappedinCategory#"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+" ".concat(gi," ")+t.name),"")+" ".concat(gi);if(null!=(t=g(this,at))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&g(this,Wn).call(this,(()=>g(this,Mn).add({id:"MappedinCategory#"+e.id,"category.locations.description":Un(t.description),ref:t.name,weight:r})))})),null!=(n=g(this,at))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(gi," ")+t),""))+" ".concat(gi)}),"");g(this,Wn).call(this,(()=>g(this,Mn).add({"category.locations.tags":Un(t),id:"MappedinCategory#"+e.id,weight:i})))}g(this,Wn).call(this,(()=>g(this,Mn).add({"category.locations.name":Un(s),id:"MappedinCategory#"+e.id,weight:o})))}),"#processCategory")),G(this,lr,void 0),G(this,vo,void 0),G(this,tu,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:a}=e,[s,l]=i.split("#"),u=r||g(this,kn).getCollectionItemById(ex[s],l);return a&&null!=(t=g(this,at))&&t.useLocationRank&&(n+=a),o&&(n*=o),{score:n,type:s,object:u}}),"#processSearchResult")),G(this,nu,s(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(gi,"]* ")+n+" [^".concat(gi,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),X(this,mi,so.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),X(this,at,{...tx,...t}),X(this,kn,e),X(this,po,new Set(null==(n=g(this,at))?void 0:n.stopWords));let r=g(this,kn).venue.slug;g(this,kn).on(0,this.buildIndices),this.buildIndices(),X(this,ho,ri((e=>{g(this,mi).trackSearchSuggest({query:e}),nt.addPendingEvent(new ra({venue:r}))}),2e3)),X(this,go,ri((e=>{g(this,mi).trackSearch({query:e}),nt.addPendingEvent(new na({venue:r}))}),2e3)),X(this,mo,ri((()=>{nt.addPendingEvent(new ea({venue:r}))}),2e3)),nt.addPendingEvent(new ta({search_descriptions:g(this,at).searchDescriptions,search_tags:g(this,at).searchTags,search_descriptions_in_categories:g(this,at).searchDescriptionsInCategories,search_tags_in_categories:g(this,at).searchTagsInCategories,use_location_rank:g(this,at).useLocationRank,venue:r}))}async suggest(e){await g(this,lr);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=g(this,at).constants,a=g(this,Kt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return g(this,ho).call(this,e),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await g(this,lr);let t=Je(this,ru,Pv).call(this,e);return g(this,go).call(this,e),t}async toJSON(){return await g(this,lr),JSON.stringify({primary:g(this,Kt),secondary:g(this,ur),extra:g(this,Mn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await g(this,lr),t=jn.is(i)?"MappedinLocation":xr.is(i)?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"#"+i.id:"string"==typeof i.id?n="Custom#"+i.id:(n=g(this,fo).get(i),n||(n="Custom#"+Dn(),g(this,fo).set(i,n))),g(this,Kt).add({id:n,weight:o,object:i,query:Un(r)}),g(this,mo).call(this)}destroy(){g(this,kn).off(0,this.buildIndices)}};kn=new WeakMap,Kt=new WeakMap,ur=new WeakMap,Mn=new WeakMap,at=new WeakMap,co=new WeakMap,po=new WeakMap,mi=new WeakMap,fo=new WeakMap,ho=new WeakMap,go=new WeakMap,mo=new WeakMap,vi=new WeakMap,Wn=new WeakMap,Zs=new WeakMap,eu=new WeakMap,lr=new WeakMap,vo=new WeakMap,tu=new WeakMap,nu=new WeakMap,ru=new WeakSet,Pv=s((function(e){let t=[],n=Un(e);t=[...g(this,Kt).search(n),...g(this,ur).search(n),...g(this,Mn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=g(this,tu).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},g(this,nu).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(bf,"OfflineSearch");var lo=bf;v();var wf=globalThis.fetch;function Cn(){if(null==wf)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return wf}function Cv(e){wf=e}s(Cn,"isomorphicFetch"),s(Cv,"setFetchFn");var Ov,nx=null==(Ov=null==R?void 0:R.env)?void 0:Ov.npm_package_version;globalThis.btoa||(globalThis.btoa=Av.encode);var rx=["ar"];function _f(e){var t;let n={...Ev,...e};return n.headers={...n.headers,"mappedin-sdk-version":nx},n.things=cm("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}async function kf(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=_f({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new Bn({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,nt.addPendingEvent(new Wi({venue:n.venue})),i}s(_f,"parseOptions"),s(kf,"getVenue");var jv={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function Mf(e){let t=_f({baseUrl:"https://api-gateway.mappedin.com/",...jv,...e}),{url:n,updated_at:r}=await ix(e),i=await Cn()(n,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new Bn(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=r,s}async function ix(e){let t=_f({baseUrl:"https://api-gateway.mappedin.com/",...jv,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&rx.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await bp(t,i)}s(Mf,"getVenueBundle"),s(ix,"getVenueBundleURL");var ax=!1;function ox(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"),ax&&e.things.polygons.push("layer","geometry","vertexes")}s(ox,"parseOptions");var sx=s((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,n){function r(r,i){if(r)n(r);else{let r={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){te.error("Failure in firstMapSelector! Loading default map instead."),te.error(e),n(e)}r.venue=i,t(r)}}s(r,"handleInit"),ox(e.venue),e.venue.useVenueBundle?Mf(e.venue).then((e=>r(null,e))).catch((e=>r(e,null))):kf(e.venue).then((e=>r(null,e))).catch((e=>r(e,null)))}))}),"initialize");
1
+ "use strict";var R,Pv=Object.create,Rr=Object.defineProperty,Ov=Object.getOwnPropertyDescriptor,Av=Object.getOwnPropertyNames,Cv=Object.getPrototypeOf,jv=Object.prototype.hasOwnProperty,mf=e=>{throw TypeError(e)},Lv=(e,t,n)=>t in e?Rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o=(e,t)=>Rr(e,"name",{value:t,configurable:!0}),vf=(e,t)=>()=>(e&&(t=e(e=0)),t),oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yf=(e,t)=>{for(var n in t)Rr(e,n,{get:t[n],enumerable:!0})},bf=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Av(t))!jv.call(e,i)&&i!==n&&Rr(e,i,{get:()=>t[i],enumerable:!(r=Ov(t,i))||r.enumerable});return e},un=(e,t,n)=>(n=null!=e?Pv(Cv(e)):{},bf(!t&&e&&e.__esModule?n:Rr(n,"default",{value:e,enumerable:!0}),e)),Ue=e=>bf(Rr({},"__esModule",{value:!0}),e),f=(e,t,n)=>Lv(e,"symbol"!=typeof t?t+"":t,n),Zs=(e,t,n)=>t.has(e)||mf("Cannot "+n),g=(e,t,n)=>(Zs(e,t,"read from private field"),n?n.call(e):t.get(e)),W=(e,t,n)=>t.has(e)?mf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(Zs(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Je=(e,t,n)=>(Zs(e,t,"access private method"),n),eu=(e,t,n,r)=>({set _(r){X(e,t,r,n)},get _(){return g(e,t,r)}}),v=vf((()=>{R={env:{NODE_ENV:"production",npm_package_version:"5.51.0"}}})),wf=oe(((e,t)=>{v(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,a="object"==typeof global&&global;(a.global===a||a.window===a)&&(n=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,h=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 n,r,i=0,o="",a=-1;++a<t;)r=u.indexOf(e.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={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,n,r,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,n=e.charCodeAt(++s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+n)>>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:h,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return d}));else if(r&&!r.nodeType)if(i)i.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(r[p]=d[p]);else n.base64=d}(e)})),_f=oe(((e,t)=>{var n,r;v(),n=typeof self<"u"?self:e,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return o(n,"r"),n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n.r(t),n.d(t,"computeDestinationPoint",(function(){return N})),n.d(t,"convertArea",(function(){return R})),n.d(t,"convertDistance",(function(){return j})),n.d(t,"convertSpeed",(function(){return D})),n.d(t,"decimalToSexagesimal",(function(){return V})),n.d(t,"findNearest",(function(){return q})),n.d(t,"getAreaOfPolygon",(function(){return Y})),n.d(t,"getBounds",(function(){return J})),n.d(t,"getBoundsOfDistance",(function(){return K})),n.d(t,"getCenter",(function(){return H})),n.d(t,"getCenterOfBounds",(function(){return Z})),n.d(t,"getCompassDirection",(function(){return Q})),n.d(t,"getCoordinateKey",(function(){return v})),n.d(t,"getCoordinateKeys",(function(){return E})),n.d(t,"getDistance",(function(){return G})),n.d(t,"getDistanceFromLine",(function(){return ee})),n.d(t,"getGreatCircleBearing",(function(){return te})),n.d(t,"getLatitude",(function(){return A})),n.d(t,"getLongitude",(function(){return P})),n.d(t,"getPathLength",(function(){return re})),n.d(t,"getPreciseDistance",(function(){return ie})),n.d(t,"getRhumbLineBearing",(function(){return $})),n.d(t,"getRoughCompassDirection",(function(){return oe})),n.d(t,"getSpeed",(function(){return ae})),n.d(t,"isDecimal",(function(){return y})),n.d(t,"isPointInLine",(function(){return se})),n.d(t,"isPointInPolygon",(function(){return le})),n.d(t,"isPointNearLine",(function(){return ue})),n.d(t,"isPointWithinRadius",(function(){return ce})),n.d(t,"isSexagesimal",(function(){return m})),n.d(t,"isValidCoordinate",(function(){return S})),n.d(t,"isValidLatitude",(function(){return x})),n.d(t,"isValidLongitude",(function(){return I})),n.d(t,"orderByDistance",(function(){return X})),n.d(t,"sexagesimalToDecimal",(function(){return _})),n.d(t,"toDecimal",(function(){return O})),n.d(t,"toRad",(function(){return F})),n.d(t,"toDeg",(function(){return L})),n.d(t,"wktToPolygon",(function(){return pe})),n.d(t,"sexagesimalPattern",(function(){return r})),n.d(t,"earthRadius",(function(){return i})),n.d(t,"MINLAT",(function(){return a})),n.d(t,"MAXLAT",(function(){return s})),n.d(t,"MINLON",(function(){return l})),n.d(t,"MAXLON",(function(){return u})),n.d(t,"longitudeKeys",(function(){return c})),n.d(t,"latitudeKeys",(function(){return h})),n.d(t,"altitudeKeys",(function(){return d})),n.d(t,"distanceConversion",(function(){return p})),n.d(t,"timeConversion",(function(){return f})),n.d(t,"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,a=-90,s=90,l=-180,u=180,c=["lng","lon","longitude",0],h=["lat","latitude",1],d=["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,n){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&void 0!==n&&void 0===t?(t=n,n):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 r.test(e.toString().trim())}),"p"),_=o((function(e){var t=new RegExp(r).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var n=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+n+i;return["S","W"].includes(t[7])?-o:o}),"y");function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o(b,"b"),o(w,"M"),o(M,"O");var E=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:h,altitude:d},n=v(e,t.longitude),r=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:r,longitude:n},i?{altitude:i}:{})}),"S"),x=o((function e(t){return y(t)?!(parseFloat(t)>s||t<a):!!m(t)&&e(_(t))}),"t"),I=o((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(_(t))}),"t"),S=o((function(e){var t=E(e),n=t.latitude,r=t.longitude;if(Array.isArray(e)&&e.length>=2)return I(e[0])&&x(e[1]);if(void 0===n||void 0===r)return!1;var i=e[r],o=e[n];return void 0!==o&&void 0!==i&&!1!==x(o)&&!1!==I(i)}),"j");function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o(C,"w"),o(k,"x"),o(T,"E");var O=o((function e(t){if(y(t))return Number(t);if(m(t))return _(t);if(S(t)){var n=E(t);return Array.isArray(t)?t.map((function(t,n){return[0,1].includes(n)?e(t):t})):k(k(k({},t),n.latitude&&T({},n.latitude,e(t[n.latitude]))),n.longitude&&T({},n.longitude,e(t[n.longitude])))}return Array.isArray(t)?t.map((function(t){return S(t)?e(t):t})):t}),"t"),A=o((function(e,t){var n=v(e,h);if(null!=n){var r=e[n];return!0===t?r:O(r)}}),"A"),P=o((function(e,t){var n=v(e,c);if(null!=n){var r=e[n];return!0===t?r:O(r)}}),"I"),F=o((function(e){return e*Math.PI/180}),"W"),L=o((function(e){return 180*e/Math.PI}),"D"),N=o((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/r,s=F(n),c=F(i),h=F(o),d=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=h+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(d)),f=L(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=L(p)),{latitude:L(d),longitude:f}}),"F"),R=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=g[t];if(n)return e*n;throw new Error("Invalid unit used for area conversion.")}),"C"),j=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",n=p[t];if(n)return e*n;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 n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))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 n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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),n=t[0],r=t[1],i=Math.abs(Number(n)),o=U(60*+("0."+(r||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 n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n=void 0===n||isNaN(n)?1:n;var r=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(z(Math.sin(F(a))*Math.sin(F(r))+Math.cos(F(a))*Math.cos(F(r))*Math.cos(F(o)-F(s))))*i;return Math.round(l/n)*n}),"_"),X=o((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G;return n="function"==typeof n?n:G,t.slice().sort((function(t,r){return n(e,t)-n(e,r)}))}),"K"),q=o((function(e,t){return X(e,t)[0]}),"Y"),Y=o((function(e){var t=0;if(e.length>2){for(var n,r,o,a=0;a<e.length;a++){a===e.length-2?(n=e.length-2,r=e.length-1,o=0):a===e.length-1?(n=e.length-1,r=0,o=1):(n=a,r=a+1,o=a+2);var s=P(e[n]),l=A(e[r]),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 n=A(t),r=P(t);return{maxLat:Math.max(n,e.maxLat),minLat:Math.min(n,e.minLat),maxLng:Math.max(r,e.maxLng),minLng:Math.min(r,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),K=o((function(e,t){var n,r,o=A(e),c=P(e),h=F(o),d=F(c),p=t/i,f=h-p,g=h+p,v=F(s),y=F(a),m=F(u),_=F(l);if(f>y&&g<v){var b=Math.asin(Math.sin(p)/Math.cos(h));(n=d-b)<_&&(n+=2*Math.PI),(r=d+b)>m&&(r-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),n=_,r=m;return[{latitude:L(f),longitude:L(n)},{latitude:L(g),longitude:L(r)}]}),"V"),H=o((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,n=e.reduce((function(e,t){var n=F(A(t)),r=F(P(t));return{X:e.X+Math.cos(n)*Math.cos(r),Y:e.Y+Math.cos(n)*Math.sin(r),Z:e.Z+Math.sin(n)}}),{X:0,Y:0,Z:0}),r=n.X/t,i=n.Y/t,o=n.Z/t;return{longitude:L(Math.atan2(i,r)),latitude:L(Math.atan2(o,Math.sqrt(r*r+i*i)))}}),"U"),Z=o((function(e){var t=J(e),n=t.minLat+(t.maxLat-t.minLat)/2,r=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(n.toFixed(6)),longitude:parseFloat(r.toFixed(6))}}),"z"),$=o((function(e,t){var n=F(P(t))-F(P(e)),r=Math.log(Math.tan(F(A(t))/2+Math.PI/4)/Math.tan(F(A(e))/2+Math.PI/4));return Math.abs(n)>Math.PI&&(n=n>0?-1*(2*Math.PI-n):2*Math.PI+n),(L(Math.atan2(n,r))+360)%360}),"H"),Q=o((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$,r="function"==typeof n?n(e,t):$(e,t);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"),ee=o((function(e,t,n){var r=G(t,e),i=G(e,n),o=G(t,n),a=Math.acos(z((r*r+o*o-i*i)/(2*r*o))),s=Math.acos(z((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"),te=o((function(e,t){var n=A(t),r=P(t),i=A(e),o=P(e);return(L(Math.atan2(Math.sin(F(r)-F(o))*Math.cos(F(n)),Math.cos(F(i))*Math.sin(F(n))-Math.sin(F(i))*Math.cos(F(n))*Math.cos(F(r)-F(o))))+360)%360}),"tt");function ne(e){return(ne="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(ne,"nt");var re=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G;return e.reduce((function(e,n){return"object"===ne(e)&&null!==e.last&&(e.distance+=t(n,e.last)),e.last=n,e}),{last:null,distance:0}).distance}),"rt"),ie=o((function(e,t){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,l,u,c,h=A(e),d=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=F(f-d),m=Math.atan((1-v)*Math.tan(F(parseFloat(h)))),_=Math.atan((1-v)*Math.tan(F(parseFloat(p)))),b=Math.sin(m),w=Math.cos(m),M=Math.sin(_),E=Math.cos(_),x=y,I=100;do{var S=Math.sin(x),C=Math.cos(x);if(0===(u=Math.sqrt(E*S*(E*S)+(w*M-b*E*C)*(w*M-b*E*C))))return 0;r=b*M+w*E*C,o=Math.atan2(u,r),l=r-2*b*M/(s=1-(a=w*E*S/u)*a),isNaN(l)&&(l=0);var k=v/16*s*(4+v*(4-3*s));c=x,x=y+(1-k)*v*a*(o+k*u*(l+k*r*(2*l*l-1)))}while(Math.abs(x-c)>1e-12&&--I>0);if(0===I)return NaN;var T=s*(i*i-g*g)/(g*g),O=1+T/16384*(4096+T*(T*(320-175*T)-768)),L=T/1024*(256+T*(T*(74-47*T)-128)),N=L*u*(l+L/4*(r*(2*l*l-1)-L/6*l*(4*u*u-3)*(4*l*l-3))),R=g*O*(o-N);return Math.round(R/n)*n}),"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 n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G,r=n(e,t),i=Number(t.time)-Number(e.time),o=r/i*1e3;return o}),"ot"),se=o((function(e,t,n){return G(t,e)+G(e,n)===G(t,n)}),"ut"),le=o((function(e,t){for(var n=!1,r=t.length,i=-1,o=r-1;++i<r;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])&&(n=!n);return n}),"at"),ue=o((function(e,t,n,r){return ee(e,t,n)<r}),"ct"),ce=o((function(e,t,n){return G(e,t)<n}),"ft");function he(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 n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return de(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return de(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 de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}o(he,"st"),o(de,"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=he(e.split(" "),2),n=t[0],r=t[1];return{longitude:parseFloat(n),latitude:parseFloat(r)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof e?e.geolib=r():n.geolib=r()})),We={};function zv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}mu(e,t),o(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Vv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function qv(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function Gv(e,t){return function(n,r){t(n,r,e)}}function Uv(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Wv(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return o(i,"adopt"),new(n||(n=Promise))((function(n,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,l)}o(s,"fulfilled"),o(l,"rejected"),o(u,"step"),u((r=r.apply(e,t||[])).next())}))}function Yv(e,t){var n,r,i,a,s={label:0,sent:o((function(){if(1&i[0])throw i[1];return i[1]}),"sent"),trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}function Xv(e,t){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(t,n)&&bu(t,e,n)}function yu(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:o((function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}),"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sf(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Hv(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Sf(arguments[t]));return e}function $v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function Kv(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Ii(e){return this instanceof Ii?(this.v=e,this):new Ii(e)}function Jv(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Ii?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 Qv(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Ii(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function Zv(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof yu?yu(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function ey(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function ny(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&bu(t,e,n);return ty(t,e),t}function ry(e){return e&&e.__esModule?e:{default:e}}function iy(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function ay(e,t,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 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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function oy(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)}yf(We,{__assign:()=>vu,__asyncDelegator:()=>Qv,__asyncGenerator:()=>Jv,__asyncValues:()=>Zv,__await:()=>Ii,__awaiter:()=>Wv,__classPrivateFieldGet:()=>iy,__classPrivateFieldIn:()=>oy,__classPrivateFieldSet:()=>ay,__createBinding:()=>bu,__decorate:()=>qv,__exportStar:()=>Xv,__extends:()=>zv,__generator:()=>Yv,__importDefault:()=>ry,__importStar:()=>ny,__makeTemplateObject:()=>ey,__metadata:()=>Uv,__param:()=>Gv,__read:()=>Sf,__rest:()=>Vv,__spread:()=>Hv,__spreadArray:()=>Kv,__spreadArrays:()=>$v,__values:()=>yu});var mu,vu,bu,ty,Ye=vf((()=>{v(),mu=o((function(e,t){return(mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics"),o(zv,"__extends"),vu=o((function(){return vu=Object.assign||o((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),vu.apply(this,arguments)}),"__assign"),o(Vv,"__rest"),o(qv,"__decorate"),o(Gv,"__param"),o(Uv,"__metadata"),o(Wv,"__awaiter"),o(Yv,"__generator"),bu=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o((function(){return t[n]}),"get")}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o(Xv,"__exportStar"),o(yu,"__values"),o(Sf,"__read"),o(Hv,"__spread"),o($v,"__spreadArrays"),o(Kv,"__spreadArray"),o(Ii,"__await"),o(Jv,"__asyncGenerator"),o(Qv,"__asyncDelegator"),o(Zv,"__asyncValues"),o(ey,"__makeTemplateObject"),ty=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o(ny,"__importStar"),o(ry,"__importDefault"),o(iy,"__classPrivateFieldGet"),o(ay,"__classPrivateFieldSet"),o(oy,"__classPrivateFieldIn")})),Pf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Of=oe((e=>{var t;v(),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={}))})),Af=oe((e=>{var t;v(),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"})),Cf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),jf=oe((e=>{var t;v(),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"})),Lf=oe((e=>{var t;v(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),_t=oe((e=>{v(),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=Pf();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:o((function(){return t.ServerZone}),"get")});var n=Of();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:o((function(){return n.SpecialEventType}),"get")}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:o((function(){return n.IdentifyOperation}),"get")}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:o((function(){return n.RevenueProperty}),"get")});var r=Af();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:o((function(){return r.LogLevel}),"get")});var i=Cf();Object.defineProperty(e,"PluginType",{enumerable:!0,get:o((function(){return i.PluginType}),"get")});var a=jf();Object.defineProperty(e,"Status",{enumerable:!0,get:o((function(){return a.Status}),"get")});var s=Lf();Object.defineProperty(e,"TransportType",{enumerable:!0,get:o((function(){return s.TransportType}),"get")})})),ji=oe((e=>{v(),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"})),_u=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=(Ye(),Ue(We)),n=o((function(t){if(Object.keys(t).length>1e3)return!1;for(var n in t){var r=t[n];if(!(0,e.isValidProperties)(n,r))return!1}return!0}),"isValidObject");e.isValidObject=n;var r=o((function(n,r){var i,o;if("string"!=typeof n)return!1;if(Array.isArray(r)){var a=!0;try{for(var s=t.__values(r),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==r)return!1;if("object"==typeof r)return(0,e.isValidObject)(r);if(!["number","string","boolean"].includes(typeof r))return!1}return!0}),"isValidProperties");e.isValidProperties=r})),ku=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=(Ye(),Ue(We)),n=_t(),r=ji(),i=_u(),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(n.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(n.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(n.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(n.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(n.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(n.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(n.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(n.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(n.IdentifyOperation.UNSET,e,r.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[n.IdentifyOperation.CLEAR_ALL]=r.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return void 0===this._properties[n.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===n.IdentifyOperation.ADD?"number"==typeof r:e===n.IdentifyOperation.UNSET||e===n.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,r))},e}();e.Identify=a})),Mu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=(Ye(),Ue(We)),n=_t(),r=ku(),i=o((function(e,n,r){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),r),n&&{event_properties:n})}),"createTrackEvent");e.createTrackEvent=i;var a=o((function(e,r){return t.__assign(t.__assign({},r),{event_type:n.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=a;var s=o((function(e,r,i,o){var a;return t.__assign(t.__assign({},o),{event_type:n.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=r,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=s;var l=o((function(e,i,o){var a,s=new r.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:n.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=o((function(e,r){return t.__assign(t.__assign({},r),{event_type:n.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),Eo=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=_t(),n=o((function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=t.Status.Unknown),{event:e,code:n,message:r}}),"buildResult");e.buildResult=n})),Ff=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Eo(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return o(e,"Timeline"),e.prototype.register=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(n)];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(n){t.queue.push([e,n]),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,h,d,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===n.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 h=M.sent(),m={error:h},[3,8];case 7:try{c&&!c.done&&(_=u.return)&&_.call(u)}finally{if(m)throw m.error}return[7];case 8:d=this.plugins.filter((function(e){return e.type===n.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(d),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(),b={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(b)throw b.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===n.PluginType.DESTINATION})),y=v.map((function(e){var n=t.__assign({},o);return e.execute(n).catch((function(e){return(0,r.buildResult)(n,0,String(e))}))})),Promise.all(y).then((function(e){var n=t.__read(e,1)[0];s(n)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,r,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(),r=this.plugins.filter((function(e){return e.type===n.PluginType.DESTINATION})),i=r.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),Eu=oe((e=>{v(),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"})),Df=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=(Ye(),Ue(We)),n=Mu(),r=Ff(),i=Eo(),a=Eu(),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 r.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 n,r,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:n=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),r=t.__values(n),i=r.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=r.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=r.return)&&s.call(r)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,r){var i=(0,n.createTrackEvent)(e,t,r);return this.dispatch(i)},e.prototype.identify=function(e,t){var r=(0,n.createIdentifyEvent)(e,t);return this.dispatch(r)},e.prototype.groupIdentify=function(e,t,r,i){var o=(0,n.createGroupIdentifyEvent)(e,t,r,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,r){var i=(0,n.createGroupEvent)(e,t,r);return this.dispatch(i)},e.prototype.revenue=function(e,t){var r=(0,n.createRevenueEvent)(e,t);return this.dispatch(r)},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 n=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){n.dispatchQ.push(n.dispatchWithCallback.bind(n,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n,r,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 n=t.sent(),r=String(n),this.config.loggerProvider.error(r),[2,o=(0,i.buildResult)(e,0,r)];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})),Bf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=(Ye(),Ue(We)),n=_t(),r=_u(),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,r.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[n.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[n.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[n.RevenueProperty.REVENUE_PRICE]=this.price,e[n.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[n.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),zf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=o((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),Tu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=_t(),n="Amplitude Logger ",r=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=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Verbose||console.log("".concat(n,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Warn||console.warn("".concat(n,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Error||console.error("".concat(n,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<t.LogLevel.Debug||console.log("".concat(n,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=r})),Iu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=_t(),n=ji(),r=Tu(),i=o((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new r.Logger,optOut:!1,serverUrl:n.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var a=function(){function t(t){var n,r,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!==(n=t.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(r=t.optOut)&&void 0!==r?r: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:o((function(){return this._optOut}),"get"),set:o((function(e){this._optOut=e}),"set"),enumerable:!1,configurable:!0}),t}();e.Config=a;var s=o((function(e,r){return e===t.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");e.getServerUrl=s;var l=o((function(n,r,i){if(void 0===n&&(n=""),void 0===r&&(r=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),n)return{serverUrl:n,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(r)?r:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),Vf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Eu(),i=ji(),a=zf(),s=Eo(),l=Iu(),u=function(){function e(){this.name="amplitude",this.type=n.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 n;return t.__awaiter(this,void 0,void 0,(function(){var r,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===(n=this.config.storageProvider)||void 0===n?void 0:n.get(this.storageKey)];case 1:return r=t.sent(),this.saveEvents(),r&&r.length>0&&Promise.all(r.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(n){var r={event:e,attempts:0,callback:o((function(e){return n(e)}),"callback"),timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,r.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 n,r,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return n=[],r=[],this.queue.forEach((function(e){return 0===e.timeout?n.push(e):r.push(e)})),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,a.chunk)(n,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,n){return void 0===n&&(n=!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,r.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var n=e.event;n.extra;return t.__rest(n,["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,r.UNEXPECTED_ERROR_MESSAGE),[2];if(!n){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 n.Status.Success:this.handleSuccessResponse(e,t);break;case n.Status.Invalid:this.handleInvalidResponse(e,t);break;case n.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case n.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,r.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,n){var i=this;if(e.body.missingField||e.body.error.startsWith(r.INVALID_API_KEY))this.fulfillRequest(n,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=n.filter((function(t,n){if(!a.has(n))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,n){1!==n.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(n),!1))):this.fulfillRequest(n,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,n){var r=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=n.filter((function(t,n){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(n)&&(t.timeout=r.throttleTimeout),!0;r.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var n=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*n.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback((0,s.buildResult)(e.event,t,n))}))},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})),Gf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=(Ye(),Ue(We)),n=o((function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(n),!1))}}}),"returnWrapper");e.returnWrapper=n})),Uf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=(Ye(),Ue(We)),n=_t(),r=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=r;var i=o((function(e){return function(){var n=t.__assign({},e.config);return{logger:n.loggerProvider,logLevel:n.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var a=o((function(e,n){var r,i;n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(n.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e}),"getValueByStringPath");e.getValueByStringPath=a;var s=o((function(n,r){return function(){var i,o,a={};try{for(var s=t.__values(r),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(n,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,r,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,h=u.logLevel;if(h&&h<n.LogLevel.Debug||!h||!c)return t.apply(a,s);var d={type:"invoke public method",name:r,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&d.states&&(d.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&d.states&&(d.states.after=o()),d.time&&(d.time.end=(new Date).toISOString()),c.debug(JSON.stringify(d,null,2))})):(o&&d.states&&(d.states.after=o()),d.time&&(d.time.end=(new Date).toISOString()),c.debug(JSON.stringify(d,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),Wf=oe((e=>{v(),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})),Yf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=(Ye(),Ue(We)),n=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 n;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(n=t.sent())?JSON.stringify(n):void 0]}}))}))},e.prototype.set=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,n),[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=n})),Xf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=_t(),n=function(){function e(){}return o(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var n,r,i,o,a,s,l,u,c,h,d,p,f,g,v,y,m,_,b,w,M,E;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case t.Status.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(n=e.events_ingested)&&void 0!==n?n:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:I,statusCode:x,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!==(h=e.exceeded_daily_quota_devices)&&void 0!==h?h:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],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:I,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:I,statusCode:x,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(_=e.throttled_devices)&&void 0!==_?_:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},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!==(E=e.throttled_events)&&void 0!==E?E:[]}};case t.Status.Timeout:default:return{status:I,statusCode:x}}},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=n})),pn=oe((e=>{v(),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=Df();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:o((function(){return t.AmplitudeCore}),"get")});var n=ku();Object.defineProperty(e,"Identify",{enumerable:!0,get:o((function(){return n.Identify}),"get")});var r=Bf();Object.defineProperty(e,"Revenue",{enumerable:!0,get:o((function(){return r.Revenue}),"get")});var i=Vf();Object.defineProperty(e,"Destination",{enumerable:!0,get:o((function(){return i.Destination}),"get")});var a=Iu();Object.defineProperty(e,"Config",{enumerable:!0,get:o((function(){return a.Config}),"get")});var s=Tu();Object.defineProperty(e,"Logger",{enumerable:!0,get:o((function(){return s.Logger}),"get")});var l=ji();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:o((function(){return l.AMPLITUDE_PREFIX}),"get")});var u=Gf();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:o((function(){return u.returnWrapper}),"get")});var c=Uf();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:o((function(){return c.debugWrapper}),"get")}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:o((function(){return c.getClientLogConfig}),"get")}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:o((function(){return c.getClientStates}),"get")});var h=Wf();Object.defineProperty(e,"UUID",{enumerable:!0,get:o((function(){return h.UUID}),"get")});var d=Yf();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:o((function(){return d.MemoryStorage}),"get")});var p=Xf();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:o((function(){return p.BaseTransport}),"get")});var f=Mu();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:o((function(){return f.createIdentifyEvent}),"get")})})),Ro=oe((e=>{v(),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})),Ou=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=Ro(),n=o((function(){var n,r=(0,t.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(t,n){var r=n.split("=",2),i=(0,e.tryDecodeURIComponent)(r[0]),o=(0,e.tryDecodeURIComponent)(r[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=n;var r=o((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=r})),Do=oe((e=>{v(),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"})),Au=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=(Ye(),Ue(We)),n=Ou(),r=Do(),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({},r.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,n.getQueryParams)();return{utm_campaign:e[r.UTM_CAMPAIGN],utm_content:e[r.UTM_CONTENT],utm_id:e[r.UTM_ID],utm_medium:e[r.UTM_MEDIUM],utm_source:e[r.UTM_SOURCE],utm_term:e[r.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=(0,n.getQueryParams)();return(e={})[r.DCLID]=t[r.DCLID],e[r.FBCLID]=t[r.FBCLID],e[r.GBRAID]=t[r.GBRAID],e[r.GCLID]=t[r.GCLID],e[r.KO_CLICK_ID]=t[r.KO_CLICK_ID],e[r.MSCLKID]=t[r.MSCLKID],e[r.TTCLID]=t[r.TTCLID],e[r.TWCLID]=t[r.TWCLID],e[r.WBRAID]=t[r.WBRAID],e},e}();e.CampaignParser=i})),zo=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=pn(),n=o((function(e,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[t.AMPLITUDE_PREFIX,n,e.substring(0,r)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=n;var r=o((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=r})),Qf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=(Ye(),Ue(We)),n=pn(),r=zo(),i=Au(),a=Do(),s=function(){function e(e,t){var n,o;this.storage=t.storage,this.storageKey=(0,r.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!==(n=t.excludeReferrers)&&void 0!==n?n:[],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,n,r){void 0===r&&(r=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=n||{},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),h=r?l(i||"")!==l(s||""):i!==s;return!n||c||h},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 r=this,i=t.__assign(t.__assign({},a.BASE_CAMPAIGN),e),o=Object.entries(i).reduce((function(e,n){var i=t.__read(n,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||r.initialEmptyValue),a?e.set(o,a):e.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 t.__assign(t.__assign({},(0,n.createIdentifyEvent)(o)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n,r;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return n=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(r=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(n,r))return[2];this.onNewCampaign(n)}return[4,this.track(this.createCampaignEvent(n))];case 3:return t.sent(),[4,this.saveCampaignToStorage(n)];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")})),Zf=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=(Ye(),Ue(We)),n=Ro(),r=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 r,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=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,r)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===r];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 n;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(n=t.sent()))return[2,void 0];try{try{n=decodeURIComponent(atob(n))}catch{}return[2,JSON.parse(n)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,n.getGlobalScope)(),o=null!==(r=null==i?void 0:i.document.cookie.split("; "))&&void 0!==r?r:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,r){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!==r?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),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,n.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=r})),eh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=(Ye(),Ue(We)),n=zo(),r=function(){function e(e,t){this.storage=e,this.storageKey=(0,n.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 n;return t.__generator(this,(function(t){switch(t.label){case 0:return n=this,[4,this.storage.get(this.storageKey)];case 1:return n.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=r})),th=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=(Ye(),Ue(We)),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),o(n,"FetchTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var r,i;return t.__generator(this,(function(t){switch(t.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(e,r)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},n}(pn().BaseTransport);e.FetchTransport=n})),rh=oe(((e,t)=>{var n,r;v(),n=e,r=function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:o((function(e,t){return r(null==t&&n.path)}),"require")},n.exports),n.exports}function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}o(n,"createCommonjsModule"),o(r,"commonjsRequire");var i=n((function(e,n){!function(t,r){var i="function",a="undefined",s="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",E="ASUS",x="BlackBerry",I="Browser",S="Chrome",C="Firefox",k="Google",T="Huawei",O="LG",A="Microsoft",P="Motorola",F="Opera",L="Samsung",N="Sony",R="Xiaomi",j="Zebra",D="Facebook",B=o((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),W=o((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];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]:r}),"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"),X=o((function(e,t){for(var n,o,a,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].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]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),q=o((function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;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"+I]],[/\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 "+I],p],[/\bfocus\/([\w\.]+)/i],[p,[c,C+" 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 "+I]],[/fxios\/([-\w\.]+)/i],[p,[c,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+I]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+I],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,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+I]],[/(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,q,{"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,C+" 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,[d,L],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,L],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,v]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,T],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,T],[h,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," "],[d,R],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,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,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,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,[d,P],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,P],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,O],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,O],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,k],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,k],[h,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,[d,N],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,w],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,w],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,x],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,E],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,E],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,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],[d,u,[h,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],[d,u,[h,y]],[/(surface duo)/i],[u,[d,A],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,A],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,j],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,j],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,A],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,L],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,O],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,S+"cast"],[d,k],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,w],[h,m]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,m]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,G],[u,G],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,_]],[/droid.+; (glass) \d/i],[u,[d,k],[h,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,j],[h,_]],[/(quest( 2)?)/i],[u,[d,D],[h,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"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,q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,q,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,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,S+"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,n){if(typeof e===s&&(n=e,e=r),!(this instanceof K))return new K(e,n).getResult();var i=e||(typeof t!==a&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),o=n?B(J,n):J;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,o.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=r,X.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,X.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,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>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,d,h,g,v,m,y,_,b]),K.ENGINE=K.OS=W([c,p]),e.exports&&(n=e.exports=K),n.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 n in t)H.ua[n]=t[n]}}}("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,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.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}(),h=o((function(){return h=Object.assign||o((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),h.apply(this,arguments)}),"__assign"),d=o((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++)if(i[r]===n)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(!d(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){d(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!d(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return o(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=h({},this.identity.userProperties),n=h(h({},this.identity),{userProperties:t});return{setUserId:o((function(e){return n.userId=e,this}),"setUserId"),setDeviceId:o((function(e){return n.deviceId=e,this}),"setDeviceId"),setUserProperties:o((function(e){return n.userProperties=e,this}),"setUserProperties"),updateUserProperties:o((function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],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],h=c[0],d=c[1];t[h]=d}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[h=f[p]];break;case"$clearAll":t={}}}return n.userProperties=t,this}),"updateUserProperties"),commit:o((function(){return e.setIdentity(n),this}),"commit")}},e.prototype.getIdentity=function(){return h({},this.identity)},e.prototype.setIdentity=function(e){var t=h({},this.identity);this.identity=h({},e),d(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"?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).Experiment={})})),Nu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=rh(),n=o((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=n})),ah=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=(Ye(),Ue(We)),n=_t(),r=Nu(),i=function(){function e(){this.name="identity",this.type=n.PluginType.BEFORE,this.identityStore=(0,r.getAnalyticsConnector)().identityStore}return o(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var n;return t.__generator(this,(function(t){return(n=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),oh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=o((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");e.getLanguage=t})),vr=oe((e=>{v(),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=Au();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:o((function(){return t.CampaignParser}),"get")});var n=Qf();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:o((function(){return n.CampaignTracker}),"get")});var r=Ou();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:o((function(){return r.getQueryParams}),"get")});var i=zo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:o((function(){return i.getCookieName}),"get")}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:o((function(){return i.getOldCookieName}),"get")});var a=Zf();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:o((function(){return a.CookieStorage}),"get")});var s=eh();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:o((function(){return s.SessionManager}),"get")});var l=th();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:o((function(){return l.FetchTransport}),"get")});var u=Nu();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:o((function(){return u.getAnalyticsConnector}),"get")});var c=ah();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:o((function(){return c.IdentityEventSender}),"get")});var h=oh();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:o((function(){return h.getLanguage}),"get")});var d=Do();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:o((function(){return d.BASE_CAMPAIGN}),"get")});var p=Ro();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:o((function(){return p.getGlobalScope}),"get")})})),Fu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=o((function(t,n){(0,e.convertProxyObjectToRealObject)(t,n)}),"runQueuedFunctions");e.runQueuedFunctions=t;var n=o((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,a=r.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=n;var r=o((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=r})),Ru=oe(((e,t)=>{v(),function(n,r){var i="function",a="undefined",s="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",E="ASUS",x="BlackBerry",I="Browser",S="Chrome",C="Firefox",k="Google",T="Huawei",O="LG",A="Microsoft",P="Motorola",F="Opera",L="Samsung",N="Sony",R="Xiaomi",j="Zebra",D="Facebook",B=o((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),W=o((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];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]:r}),"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"),X=o((function(e,t){for(var n,o,a,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].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]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),q=o((function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;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"+I]],[/\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 "+I],p],[/\bfocus\/([\w\.]+)/i],[p,[c,C+" 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 "+I]],[/fxios\/([-\w\.]+)/i],[p,[c,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+I]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+I],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,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+I]],[/(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,q,{"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,C+" 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,[d,L],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,L],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,v]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,T],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,T],[h,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," "],[d,R],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,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,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,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,[d,P],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,P],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,O],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,O],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,k],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,k],[h,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,[d,N],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,w],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,w],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,x],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,E],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,E],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,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],[d,u,[h,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],[d,u,[h,y]],[/(surface duo)/i],[u,[d,A],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,A],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,j],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,j],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,A],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,L],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,O],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,S+"cast"],[d,k],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,w],[h,m]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,m]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,G],[u,G],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,_]],[/droid.+; (glass) \d/i],[u,[d,k],[h,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,j],[h,_]],[/(quest( 2)?)/i],[u,[d,D],[h,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"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,q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,q,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,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,S+"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=r),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof n!==a&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),o=t?B(J,t):J;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,o.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=r,X.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,X.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,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>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,d,h,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 n!==a&&(n.UAParser=K);var H=typeof n!==a&&(n.jQuery||n.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 n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),uh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),lh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=(Ye(),Ue(We)),n=_t(),r=t.__importDefault(Ru()),i=pn(),a=vr(),s=uh(),l=function(){function e(){var e;this.name="context",this.type=n.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(s.VERSION),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new r.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 n,r,o,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),n=(new Date).getTime(),r=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: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: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})),Du=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=(Ye(),Ue(We)),n=vr(),r=function(){function e(){}return o(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var r,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,n.getGlobalScope)())return[2,!1];r=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,r)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===r];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 n;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(n=t.sent())?[2,JSON.parse(n)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(r=(0,n.getGlobalScope)())||void 0===r?void 0:r.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,r){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,n.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(r))}catch{}return[2]}))}))},e.prototype.remove=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(r=(0,n.getGlobalScope)())||void 0===r||r.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,n.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();e.LocalStorage=r})),ch=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=(Ye(),Ue(We)),n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(n,e),o(n,"XHRTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var r=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===r.state.done)try{var e=o.responseText,n=JSON.parse(e),a=r.buildResponse(n);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(n))}))]}))}))},n}(pn().BaseTransport);e.XHRTransport=n})),dh=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=(Ye(),Ue(We)),n=vr(),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),o(r,"SendBeaconTransport"),r.prototype.send=function(e,r){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,n.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(r);return t(a.navigator.sendBeacon(e,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(e){o(e)}}))]}))}))},r}(pn().BaseTransport);e.SendBeaconTransport=r})),hh=oe((e=>{v();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 n=(Ye(),Ue(We)),r=_t(),i=pn(),a=vr(),s=Du(),l=ch(),u=dh(),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 h=function(t){function r(r,i,o){var a,s,l,u,c,h,d,p,f,g,v,y,m=this,_=(0,e.getDefaultConfig)();return(m=t.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!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:_.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:_.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!==(h=null==o?void 0:o.cookieExpiration)&&void 0!==h?h:_.cookieExpiration,m.cookieSameSite=null!==(d=null==o?void 0:o.cookieSameSite)&&void 0!==d?d:_.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:_.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:_.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:_.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:_.trackingOptions,m.userId=i,m}return n.__extends(r,t),o(r,"BrowserConfig"),Object.defineProperty(r.prototype,"deviceId",{get:o((function(){return this.sessionManager.getDeviceId()}),"get"),set:o((function(e){this.sessionManager.setDeviceId(e)}),"set"),enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"userId",{get:o((function(){return this.sessionManager.getUserId()}),"get"),set:o((function(e){this.sessionManager.setUserId(e)}),"set"),enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sessionId",{get:o((function(){return this.sessionManager.getSessionId()}),"get"),set:o((function(e){this.sessionManager.setSessionId(e)}),"set"),enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"optOut",{get:o((function(){return this.sessionManager.getOptOut()}),"get"),set:o((function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)}),"set"),enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastEventTime",{get:o((function(){return this.sessionManager.getLastEventTime()}),"get"),set:o((function(e){this.sessionManager.setLastEventTime(e)}),"set"),enumerable:!1,configurable:!0}),r}(i.Config);e.BrowserConfig=h;var d=o((function(r,i,o){return n.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,p,f,g,v,y,m,_,b,w,M,E;return n.__generator(this,(function(x){switch(x.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(_=null==o?void 0:o.domain)&&void 0!==_?(l=_,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=x.sent(),x.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(n.__assign(n.__assign({},o),{domain:s}))];case 4:return u=x.sent(),c=(0,a.getCookieName)(r),[4,u.get(c)];case 5:return d=x.sent(),p=(0,a.getQueryParams)(),[4,new a.SessionManager(u,r).load()];case 6:return f=x.sent(),g=h.bind,v=[void 0,r,null!=i?i:null==d?void 0:d.userId],y=[n.__assign({},o)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==d?void 0:d.deviceId,null==o?void 0:o.deviceId,p.deviceId),domain:s,optOut:null!==(b=null==o?void 0:o.optOut)&&void 0!==b?b:!(null==d||!d.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=x.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(h,v.concat([n.__assign.apply(void 0,y.concat([(m.storageProvider=x.sent(),m.trackingOptions=n.__assign(n.__assign({},t.trackingOptions),null==o?void 0:o.trackingOptions),m.transportProvider=null!==(E=null==o?void 0:o.transportProvider)&&void 0!==E?E:(0,e.createTransport)(null==o?void 0:o.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=d;var p=o((function(r,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),n.__awaiter(t,void 0,void 0,(function(){var t,o,a;return n.__generator(this,(function(s){switch(s.label){case 0:return t=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,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=o((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){switch(n.label){case 0:return t=new a.CookieStorage({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(r=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:r=!n.sent(),n.label=2;case 2:return r?[4,(t=new s.LocalStorage).isEnabled()]:[3,4];case 3:n.sent()||(t=new i.MemoryStorage),n.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=o((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r,i,o,a,l,u;return n.__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=n.__values([null==e?void 0:e.storageProvider,new s.LocalStorage]),r=t.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=t.next(),[3,2];case 6:return[3,9];case 7:return a=c.sent(),l={error:a},[3,9];case 8:try{r&&!r.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 y=o((function(e,t,n){return t||n||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=y;var m=o((function(t){return t===r.TransportType.XHR?new l.XHRTransport:t===r.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var _=o((function(e){return n.__awaiter(t,void 0,void 0,(function(){var t,r,i,o,s,l,u,c;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,(new a.CookieStorage).isEnabled()];case 1:if(!n.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,r=t.split("."),i=[],o="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?(l=i[s],u={domain:"."+l},[4,(c=new a.CookieStorage(u)).set(o,1)]):[3,7];case 3:return n.sent(),[4,c.get(o)];case 4:return n.sent()?[4,c.remove(o)]:[3,6];case 5:return n.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=_})),mh=oe((e=>{v();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var n=(Ye(),Ue(We)),r=vr(),i=Du(),a=o((function(o,a){return n.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,d,p,f;return n.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new r.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,r.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=n.__read(l.split("."),5),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(h),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:!!d}]}}))}))}),"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})),Wu=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=(Ye(),Ue(We)),n=pn(),r=vr(),i=Fu(),a=lh(),s=hh(),l=mh(),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,h,d;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!==(h=p.sessionId)&&void 0!==h?h:null==u?void 0:u.sessionId,optOut:null!==(d=null==u?void 0:u.optOut)&&void 0!==d?d: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,r.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 r.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new n.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,n){return void 0===n&&(n=!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 r.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:a,track:i,onNewCampaign:o})).send(n)];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,n.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,r){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(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),e.prototype.identify.call(this,t,r)},u.prototype.groupIdentify=function(t,r,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new n.Identify,s)}return e.prototype.groupIdentify.call(this,t,r,o,a)},u.prototype.revenue=function(t,r){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new n.Revenue,o)}return e.prototype.revenue.call(this,t,r)},u}(n.AmplitudeCore);e.AmplitudeBrowser=u;var c=o((function(){var e=new u;return{init:(0,n.debugWrapper)((0,n.returnWrapper)(e.init.bind(e)),"init",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),add:(0,n.debugWrapper)((0,n.returnWrapper)(e.add.bind(e)),"add",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,n.debugWrapper)((0,n.returnWrapper)(e.remove.bind(e)),"remove",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,n.debugWrapper)((0,n.returnWrapper)(e.track.bind(e)),"track",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,n.debugWrapper)((0,n.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,n.debugWrapper)((0,n.returnWrapper)(e.identify.bind(e)),"identify",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,n.debugWrapper)((0,n.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,n.debugWrapper)((0,n.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,n.debugWrapper)((0,n.returnWrapper)(e.revenue.bind(e)),"revenue",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,n.debugWrapper)((0,n.returnWrapper)(e.flush.bind(e)),"flush",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,n.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId"])),setUserId:(0,n.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,n.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,n.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.deviceId"])),reset:(0,n.debugWrapper)(e.reset.bind(e),"reset",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,n.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setSessionId:(0,n.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setOptOut:(0,n.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"])),setTransport:(0,n.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,n.getClientLogConfig)(e),(0,n.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),wh=oe((e=>{v(),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=(Ye(),Ue(We)),n=t.__importDefault(Wu()),r=Wu();Object.defineProperty(e,"createInstance",{enumerable:!0,get:o((function(){return r.createInstance}),"get")}),e.add=n.default.add,e.flush=n.default.flush,e.getDeviceId=n.default.getDeviceId,e.getSessionId=n.default.getSessionId,e.getUserId=n.default.getUserId,e.groupIdentify=n.default.groupIdentify,e.identify=n.default.identify,e.init=n.default.init,e.logEvent=n.default.logEvent,e.remove=n.default.remove,e.reset=n.default.reset,e.revenue=n.default.revenue,e.setDeviceId=n.default.setDeviceId,e.setGroup=n.default.setGroup,e.setOptOut=n.default.setOptOut,e.setSessionId=n.default.setSessionId,e.setTransport=n.default.setTransport,e.setUserId=n.default.setUserId,e.track=n.default.track;var i=Fu();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:o((function(){return i.runQueuedFunctions}),"get")});var a=pn();Object.defineProperty(e,"Revenue",{enumerable:!0,get:o((function(){return a.Revenue}),"get")}),Object.defineProperty(e,"Identify",{enumerable:!0,get:o((function(){return a.Identify}),"get")}),e.Types=t.__importStar(_t())})),tg=oe(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[a]=x[b]=x[s]=x[w]=x[l]=x[u]=x[c]=x[h]=x[d]=x[p]=x[g]=x[y]=x[m]=x[_]=!1;var I="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,C=I||S||Function("return this")(),k="object"==typeof e&&e&&!e.nodeType&&e,T=k&&"object"==typeof t&&t&&!t.nodeType&&t,O=T&&T.exports===k,A=O&&I.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch{}}(),F=P&&P.isTypedArray;function L(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function R(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function j(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}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,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}o(L,"arrayFilter"),o(N,"arrayPush"),o(R,"arraySome"),o(j,"baseTimes"),o(D,"baseUnary"),o(B,"cacheHas"),o(W,"getValue"),o(U,"mapToArray"),o(V,"overArg"),o(z,"setToArray");var G,X=Array.prototype,q=Function.prototype,Y=Object.prototype,J=C["__core-js_shared__"],K=q.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=O?C.Buffer:void 0,te=C.Symbol,ne=C.Uint8Array,re=Y.propertyIsEnumerable,ie=X.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=V(Object.keys,Object),ue=ct(C,"DataView"),ce=ct(C,"Map"),he=ct(C,"Promise"),de=ct(C,"Set"),pe=ct(C,"WeakMap"),fe=ct(Object,"create"),ge=_t(ue),ve=_t(ce),ye=_t(he),me=_t(de),_e=_t(pe),be=te?te.prototype:void 0,we=be?be.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(){this.__data__=fe?fe(null):{},this.size=0}function xe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ie(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return H.call(t,e)?t[e]:void 0}function Se(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function Ce(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function ke(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(){this.__data__=[],this.size=0}function Oe(e){var t=this.__data__,n=He(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Ae(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function Pe(e){return He(this.__data__,e)>-1}function Fe(e,t){var n=this.__data__,r=He(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||ke),string:new Me}}function Re(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function je(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function We(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}function Ue(e){return this.__data__.set(e,n),this}function Ve(e){return this.__data__.has(e)}function ze(e){var t=this.__data__=new ke(e);this.size=t.size}function Ge(){this.__data__=new ke,this.size=0}function Xe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}function Je(e,t){var n=this.__data__;if(n instanceof ke){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this}function Ke(e,t){var n=Mt(e),r=!n&&wt(e),i=!n&&!r&&xt(e),o=!n&&!r&&!i&&Ot(e),a=n||r||i||o,s=a?j(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 n=e.length;n--;)if(bt(e[n][0],t))return n;return-1}function Ze(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function $e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return Tt(e)&&$e(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!Tt(e)&&!Tt(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,o,s){var l=Mt(e),u=Mt(t),c=l?a:pt(e),h=u?a:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,g=c==h;if(g&&xt(e)){if(!xt(t))return!1;l=!0,d=!1}if(g&&!d)return s||(s=new ze),l||Ot(e)?ot(e,t,n,r,o,s):at(e,t,c,n,r,o,s);if(!(1&n)){var v=d&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,_=y?t.value():t;return s||(s=new ze),o(m,_,n,r,s)}}return!!g&&(s||(s=new ze),st(e,t,n,r,o,s))}function nt(e){return!(!kt(e)||vt(e))&&(St(e)?Q:M).test(_t(e))}function rt(e){return Tt(e)&&Ct(e.length)&&!!x[$e(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var a=1&n,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,h=!0,d=2&n?new We:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(r)var g=a?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!R(t,(function(e,t){if(!B(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function at(e,t,n,r,i,o,a){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case s:case l:case d:return bt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case h:var c=U;case y:var p=1&r;if(c||(c=z),e.size!=t.size&&!p)return!1;var f=a.get(e);if(f)return f==t;r|=2,a.set(e,t);var v=ot(c(e),c(t),r,i,o,a);return a.delete(e),v;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,n,r,i,o){var a=1&n,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 h=o.get(e);if(h&&o.get(t))return h==t;var d=!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(r)var v=a?r(g,f,c,t,e,o):r(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,n,r,o):v)){d=!1;break}p||(p="constructor"==c)}if(d&&!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)&&(d=!1)}return o.delete(e),o.delete(t),d}function lt(e){return Ze(e,At,dt)}function ut(e,t){var n=e.__data__;return gt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=W(e,t);return nt(n)?n:void 0}function ht(e){var t=H.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=$.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}o(Me,"Hash"),o(Ee,"hashClear"),o(xe,"hashDelete"),o(Ie,"hashGet"),o(Se,"hashHas"),o(Ce,"hashSet"),Me.prototype.clear=Ee,Me.prototype.delete=xe,Me.prototype.get=Ie,Me.prototype.has=Se,Me.prototype.set=Ce,o(ke,"ListCache"),o(Te,"listCacheClear"),o(Oe,"listCacheDelete"),o(Ae,"listCacheGet"),o(Pe,"listCacheHas"),o(Fe,"listCacheSet"),ke.prototype.clear=Te,ke.prototype.delete=Oe,ke.prototype.get=Ae,ke.prototype.has=Pe,ke.prototype.set=Fe,o(Le,"MapCache"),o(Ne,"mapCacheClear"),o(Re,"mapCacheDelete"),o(je,"mapCacheGet"),o(De,"mapCacheHas"),o(Be,"mapCacheSet"),Le.prototype.clear=Ne,Le.prototype.delete=Re,Le.prototype.get=je,Le.prototype.has=De,Le.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(Xe,"stackDelete"),o(qe,"stackGet"),o(Ye,"stackHas"),o(Je,"stackSet"),ze.prototype.clear=Ge,ze.prototype.delete=Xe,ze.prototype.get=qe,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(nt,"baseIsNative"),o(rt,"baseIsTypedArray"),o(it,"baseKeys"),o(ot,"equalArrays"),o(at,"equalByTag"),o(st,"equalObjects"),o(lt,"getAllKeys"),o(ut,"getMapData"),o(ct,"getNative"),o(ht,"getRawTag");var dt=ae?function(e){return null==e?[]:(e=Object(e),L(ae(e),(function(t){return re.call(e,t)})))}:Pt,pt=$e;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||E.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 _t(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function bt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=y||pe&&pt(new pe)!=_)&&(pt=o((function(e){var t=$e(e),n=t==p?e.constructor:void 0,r=n?_t(n):"";if(r)switch(r){case ge:return w;case ve:return h;case ye:return f;case me:return y;case _e:return _}return t}),"getTag")),o(ft,"isIndex"),o(gt,"isKeyable"),o(vt,"isMasked"),o(yt,"isPrototype"),o(mt,"objectToString"),o(_t,"toSource"),o(bt,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return Tt(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function Et(e){return null!=e&&Ct(e.length)&&!St(e)}o(Et,"isArrayLike");var xt=se||Ft;function It(e,t){return et(e,t)}function St(e){if(!kt(e))return!1;var t=$e(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ct(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function kt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Tt(e){return null!=e&&"object"==typeof e}o(It,"isEqual"),o(St,"isFunction"),o(Ct,"isLength"),o(kt,"isObject"),o(Tt,"isObjectLike");var Ot=F?D(F):rt;function At(e){return Et(e)?Ke(e):it(e)}function Pt(){return[]}function Ft(){return!1}o(At,"keys"),o(Pt,"stubArray"),o(Ft,"stubFalse"),t.exports=It})),Og=oe(((e,t)=>{v();var n="__lodash_hash_undefined__",r=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 h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,y=g&&g.exports===f,m=y&&h.process,_=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),b=_&&_.isTypedArray;function w(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function E(e){return function(t){return e(t)}}function x(e,t){return null==e?void 0:e[t]}function I(e,t){return function(n){return e(t(n))}}o(w,"apply"),o(M,"baseTimes"),o(E,"baseUnary"),o(x,"getValue"),o(I,"overArg");var S,C=Array.prototype,k=Function.prototype,T=Object.prototype,O=p["__core-js_shared__"],A=k.toString,P=T.hasOwnProperty,F=(S=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",L=T.toString,N=A.call(Object),R=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,W=j?j.allocUnsafe:void 0,U=I(Object.getPrototypeOf,Object),V=Object.create,z=T.propertyIsEnumerable,G=C.splice,X=D?D.toStringTag:void 0,q=function(){try{var e=qe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Y=j?j.isBuffer:void 0,J=Math.max,K=Date.now,H=qe(p,"Map"),Z=qe(Object,"create"),$=function(){function e(){}return o(e,"object"),function(t){if(!gt(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[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 ne(e){var t=this.__data__;if(Z){var r=t[e];return r===n?void 0:r}return P.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return Z?void 0!==t[e]:P.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,n=Se(t,e);return!(n<0)&&(n==t.length-1?t.pop():G.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]}function ue(e){return Se(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function de(){this.size=0,this.__data__={hash:new Q,map:new(H||oe),string:new Q}}function pe(e){var t=Xe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Xe(this,e).get(e)}function ge(e){return Xe(this,e).has(e)}function ve(e,t){var n=Xe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?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 _e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function be(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(e,t),this.size=n.size,this}function Ee(e,t){var n=ut(e),r=!n&&lt(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),a=n||r||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 xe(e,t,n){(void 0!==n&&!st(e[t],n)||void 0===n&&!(t in e))&&Ce(e,t,n)}function Ie(e,t,n){var r=e[t];(!P.call(e,t)||!st(r,n)||void 0===n&&!(t in e))&&Ce(e,t,n)}function Se(e,t){for(var n=e.length;n--;)if(st(e[n][0],t))return n;return-1}function Ce(e,t,n){"__proto__"==t&&q?q(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}o(Q,"Hash"),o(ee,"hashClear"),o(te,"hashDelete"),o(ne,"hashGet"),o(re,"hashHas"),o(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,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(he,"MapCache"),o(de,"mapCacheClear"),o(pe,"mapCacheDelete"),o(fe,"mapCacheGet"),o(ge,"mapCacheHas"),o(ve,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ge,he.prototype.set=ve,o(ye,"Stack"),o(me,"stackClear"),o(_e,"stackDelete"),o(be,"stackGet"),o(we,"stackHas"),o(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=_e,ye.prototype.get=be,ye.prototype.has=we,ye.prototype.set=Me,o(Ee,"arrayLikeKeys"),o(xe,"assignMergeValue"),o(Ie,"assignValue"),o(Se,"assocIndexOf"),o(Ce,"baseAssignValue");var ke=Ge();function Te(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?Ye(e):tt(e)}function Oe(e){return vt(e)&&Te(e)==i}function Ae(e){return!(!gt(e)||$e(e))&&(pt(e)?R:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[Te(e)]}function Fe(e){if(!gt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!P.call(e,r))||n.push(r);return n}function Le(e,t,n,r,i){e!==t&&ke(t,(function(o,a){if(i||(i=new ye),gt(o))Ne(e,t,a,n,Le,r,i);else{var s=r?r(rt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),xe(e,a,s)}}),bt)}function Ne(e,t,n,r,i,o,a){var s=rt(e,n),l=rt(t,n),u=a.get(l);if(u)xe(e,n,u);else{var c=o?o(s,l,n+"",e,t,a):void 0,h=void 0===c;if(h){var d=ut(l),p=!d&&dt(l),f=!d&&!p&&mt(l);c=l,d||p||f?ut(s)?c=s:ht(s)?c=Ue(s):p?(h=!1,c=De(l,!0)):f?(h=!1,c=We(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=_t(s):(!gt(s)||pt(s))&&(c=Je(l))):h=!1}h&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),xe(e,n,c)}}function Re(e,t){return it(nt(e,t,Et),e+"")}o(Te,"baseGetTag"),o(Oe,"baseIsArguments"),o(Ae,"baseIsNative"),o(Pe,"baseIsTypedArray"),o(Fe,"baseKeysIn"),o(Le,"baseMerge"),o(Ne,"baseMergeDeep"),o(Re,"baseRest");var je=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:Et;function De(e,t){if(t)return e.slice();var n=e.length,r=W?W(n):new e.constructor(n);return e.copy(r),r}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function We(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ve(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Ce(n,s,l):Ie(n,s,l)}return n}function ze(e){return Re((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&He(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))}function Ge(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Xe(e,t){var n=e.__data__;return Ze(t)?n["string"==typeof t?"string":"hash"]:n.map}function qe(e,t){var n=x(e,t);return Ae(n)?n:void 0}function Ye(e){var t=P.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch{}var i=L.call(e);return r&&(t?e[X]=n:delete e[X]),i}function Je(e){return"function"!=typeof e.constructor||Qe(e)?{}:$(U(e))}function Ke(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,n){if(!gt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ke(t,n.length):"string"==r&&t in n)&&st(n[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||T)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return L.call(e)}function nt(e,t,n){return t=J(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=J(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),w(e,this,s)}}function rt(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(Xe,"getMapData"),o(qe,"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(nt,"overRest"),o(rt,"safeGet");var it=ot(je);function ot(e){var t=0,n=0;return function(){var r=K(),i=16-(r-n);if(n=r,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=Oe(function(){return arguments}())?Oe: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 ht(e){return vt(e)&&ct(e)}o(ct,"isArrayLike"),o(ht,"isArrayLikeObject");var dt=Y||xt;function pt(e){if(!gt(e))return!1;var t=Te(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<=r}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)||Te(e)!=s)return!1;var t=U(e);if(null===t)return!0;var n=P.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&A.call(n)==N}o(pt,"isFunction"),o(ft,"isLength"),o(gt,"isObject"),o(vt,"isObjectLike"),o(yt,"isPlainObject");var mt=b?E(b):Pe;function _t(e){return Ve(e,bt(e))}function bt(e){return ct(e)?Ee(e,!0):Fe(e)}o(_t,"toPlainObject"),o(bt,"keysIn");var wt=ze((function(e,t,n){Le(e,t,n)}));function Mt(e){return function(){return e}}function Et(e){return e}function xt(){return!1}o(Mt,"constant"),o(Et,"identity"),o(xt,"stubFalse"),t.exports=wt})),Hg=oe(((e,t)=>{v(),t.exports=o((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=o((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),hm=oe(((e,t)=>{var n,r;v(),n=e,r=function(){function e(e,n,i,o,a){t(e,n,i||0,o||e.length-1,a||r)}function t(e,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-l*c/s+h)),Math.min(o,Math.floor(r+(s-l)*c/s+h)),a)}var d=e[r],p=i,f=o;for(n(e,i,r),a(e[o],d)>0&&n(e,i,o);p<f;){for(n(e,p,f),p++,f--;a(e[p],d)<0;)p++;for(;a(e[f],d)>0;)f--}0===a(e[i],d)?n(e,i,f):n(e,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t){return e<t?-1:e>t?1:0}o(e,"quickselect"),o(t,"quickselectStep"),o(n,"swap"),o(r,"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,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function s(e,t){l(e,0,e.children.length,t,e)}function l(e,t,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=t;o<n;o++){var a=e.children[o];u(i,e.leaf?r(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 h(e,t){return e.minY-t.minY}function d(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 n=Math.max(e.minX,t.minX),r=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-n)*Math.max(0,o-r)}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 _(t,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;e(t,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=o((function(){return this._all(this.data,[])}),"all"),i.prototype.search=o((function(e){var t=this.data,n=[];if(!y(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?r(a):a;y(e,s)&&(t.leaf?n.push(a):v(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n}),"search"),i.prototype.collides=o((function(e){var t=this.data;if(!y(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(y(e,o)){if(t.leaf||v(e,o))return!0;n.push(i)}}t=n.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 n=this._build(e.slice(),0,e.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=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 n,r,i,o=this.data,s=this.toBBox(e),l=[],u=[];o||l.length;){if(o||(o=l.pop(),r=l[l.length-1],n=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)?r?(n++,o=r.children[n],i=!1):o=null:(l.push(o),u.push(n),n=0,r=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 n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t}),"_all"),i.prototype._build=o((function(e,t,n,r){var i,o=n-t+1,a=this._maxEntries;if(o<=a)return s(i=m(e.slice(t,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 l=Math.ceil(o/a),u=l*Math.ceil(Math.sqrt(a));_(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);_(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,p,r-1))}}return s(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=o((function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=d(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,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),u(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)}),"_insert"),i.prototype._split=o((function(e,t){var n=e[t],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),t?e[t-1].children.push(a):this._splitRoot(n,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,n){for(var r,i=1/0,o=1/0,a=t;a<=n-t;a++){var s=l(e,0,a,this.toBBox),u=l(e,a,n,this.toBBox),c=g(s,u),h=d(s)+d(u);c<i?(i=c,r=a,o=h<o?h:o):c===i&&h<o&&(o=h,r=a)}return r||n-t}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=o((function(e,t,n){var r=e.leaf?this.compareMinX:c,i=e.leaf?this.compareMinY:h;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}),"_chooseSplitAxis"),i.prototype._allDistMargin=o((function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=l(e,0,t,i),a=l(e,n-t,n,i),s=p(o)+p(a),c=t;c<n-t;c++){var h=e.children[c];u(o,e.leaf?i(h):h),s+=p(o)}for(var d=n-t-1;d>=t;d--){var f=e.children[d];u(a,e.leaf?i(f):f),s+=p(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=o((function(e,t,n){for(var r=n;r>=0;r--)u(t[r],e)}),"_adjustParentBBoxes"),i.prototype._condense=o((function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.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(h,"compareNodeMinY"),o(d,"bboxArea"),o(p,"bboxMargin"),o(f,"enlargedArea"),o(g,"intersectionArea"),o(v,"contains"),o(y,"intersects"),o(m,"createNode"),o(_,"multiSelect"),i},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),Np=oe((e=>{function t(e,t,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=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return d(t).geometry;case"MultiLineString":return h(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function r(e,n,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(!I(e[0])||!I(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function a(e,n,r){void 0===r&&(r={});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},n,r)}function s(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return a(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function _(e,t){return w(m(e,t))}function b(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 E(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return y(m(e,t),n)}function x(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function I(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function S(e){return!!e&&e.constructor===Object}function C(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(!I(e))throw new Error("bbox must only contain numbers")}))}function k(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")}v(),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(n,"geometry"),e.geometry=n,o(r,"point"),e.point=r,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(h,"multiLineString"),e.multiLineString=h,o(d,"multiPoint"),e.multiPoint=d,o(p,"multiPolygon"),e.multiPolygon=p,o(f,"geometryCollection"),e.geometryCollection=f,o(g,"round"),e.round=g,o(y,"radiansToLength"),e.radiansToLength=y,o(m,"lengthToRadians"),e.lengthToRadians=m,o(_,"lengthToDegrees"),e.lengthToDegrees=_,o(b,"bearingToAzimuth"),e.bearingToAzimuth=b,o(w,"radiansToDegrees"),e.radiansToDegrees=w,o(M,"degreesToRadians"),e.degreesToRadians=M,o(E,"convertLength"),e.convertLength=E,o(x,"convertArea"),e.convertArea=x,o(I,"isNumber"),e.isNumber=I,o(S,"isObject"),e.isObject=S,o(C,"validateBBox"),e.validateBBox=C,o(k,"validateId"),e.validateId=k})),Rp=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0});var t=Np();function n(e,t,r){if(null!==e)for(var i,o,a,s,l,u,c,h,d=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=g?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(s=h?c.geometries[_]:c)){u=s.coordinates;var M=s.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,b,w))return!1;p++,"MultiPoint"===M&&b++}"LineString"===M&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-d;o++){if(!1===t(u[i][o],p,m,b,w))return!1;p++}"MultiLineString"===M&&b++,"Polygon"===M&&w++}"Polygon"===M&&b++;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-d;a++){if(!1===t(u[i][o][a],p,m,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===n(s.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,a,s){o=0===n&&void 0===r?e:t(o,e,n,i,a,s)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function a(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function s(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return s(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].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,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function h(e,t,n){var r=n;return c(e,(function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)})),r}function d(e,n){c(e,(function(e,r,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:a}),r,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===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return d(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){d(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,h=0;if(!1===n(e,(function(n,s,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(a=0);var g=t.lineString([l,n],e.properties);if(!1===r(g,i,o,f,a))return!1;a++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function y(e,n){if(!e)throw new Error("geojson is required");d(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===n(t.lineString(a[s],e.properties),r,i,s))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)})),r}function _(e,n){if(n=n||{},!t.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,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.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,n);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,n);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,n);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,n)}throw new Error("geojson is invalid")}function b(e,n){if(n=n||{},!t.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,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return s<0&&(s=u.length+s),t.point(u[s],l,n);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),t.point(u[a][s],l,n);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),t.point(u[o][s],l,n);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,n)}throw new Error("geojson is invalid")}o(n,"coordEach"),o(r,"coordReduce"),o(i,"propEach"),o(a,"propReduce"),o(s,"featureEach"),o(l,"featureReduce"),o(u,"coordAll"),o(c,"geomEach"),o(h,"geomReduce"),o(d,"flattenEach"),o(p,"flattenReduce"),o(f,"segmentEach"),o(g,"segmentReduce"),o(y,"lineEach"),o(m,"lineReduce"),o(_,"findSegment"),o(b,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=s,e.featureReduce=l,e.findPoint=b,e.findSegment=_,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=a,e.segmentEach=f,e.segmentReduce=g})),Em=oe((e=>{v(),Object.defineProperty(e,"__esModule",{value:!0});var t=Rp();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}o(n,"bbox"),n.default=n,e.default=n})),Pm=oe(((e,t)=>{v();var n=hm(),r=Np(),i=Rp(),a=Em().default,s=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),n.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)})),n.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),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.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})),Hm=oe(((e,t)=>{v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),Zm=oe(((e,t)=>{v();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function a(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function s(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=a(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=s(n[0]);r!==n[0]&&(t[n[0]]=r)}n=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)}}})),tv=oe(((e,t)=>{v(),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 n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),rv=oe(((e,t)=>{v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}})),dv=oe((e=>{v();var t=Hm(),n=Zm(),r=tv(),i=rv(),a=o((e=>null==e),"isNullOrUndefined"),s=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[",i,"]"].join("")]:[...n,[h(t,e),"[",h(i,e),"]=",h(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[]"].join("")]:[...n,[h(t,e),"[]=",h(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[h(n,e),t,h(i,e)].join("")]:[[r,h(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,h(t,e)]:[...n,[h(t,e),"=",h(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=o?d(n,e):n;let a=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&d(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function h(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(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="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function y(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 _(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=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]=r(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:d(a,t),n(d(e,t),a,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=m(n[e],t);else i[e]=m(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}o(l,"encoderForArrayFormat"),o(u,"parserForArrayFormat"),o(c,"validateArrayFormatSeparator"),o(h,"encode"),o(d,"decode"),o(p,"keysSorter"),o(f,"removeHash"),o(g,"getHash"),o(y,"extract"),o(m,"parseValue"),o(_,"parse"),e.extract=y,e.parse=_,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=o((n=>t.skipNull&&a(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((n=>{let i=e[n];return void 0===i?"":null===i?h(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?h(n,t)+"[]":i.reduce(r(n),[]).join("&"):h(n,t)+"="+h(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:_(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);let r=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,n);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(n[s]?h(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);let{url:o,query:a,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(a,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),yv=oe(((e,t)=>{var n,r;v(),n=e,r=function(){var e=o((function(){return e=Object.assign||o((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])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,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:o((function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}),"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}o(t,"__values"),o(n,"__read");var r,i="KEYS",a="VALUES",s="",l=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}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,n=e.keys;if(u(n)===s)return{done:!1,value:this.result()};var r=t.get(u(n));return this._path.push({node:r,keys:Array.from(r.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,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,a=new Uint8Array(o*i).fill(n+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return h(e,t,n,r,a,1,i,""),r}),"fuzzySearch"),h=o((function(e,n,r,i,o,a,l,u){var c,d,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<=r&&i.set(u,[e.get(v),y])}else{for(var m=a,_=0;_<v.length;++_,++m){for(var b=v[_],w=l*m,M=w-l,E=o[w],x=Math.max(0,m-r-1),I=Math.min(l-1,m+r),S=x;S<I;++S){var C=b!==n[S],k=o[M+S]+ +C,T=o[M+S+1]+1,O=o[w+S]+1,A=o[w+S+1]=Math.min(k,T,O);A<E&&(E=A)}if(E>r)continue e}h(e.get(v),n,r,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(d=f.return)&&d.call(f)}finally{if(c)throw c.error}}}),"recurse"),d=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(r){var i,o;if(!r.startsWith(this._prefix))throw new Error("Mismatched prefix");var a=n(p(this._tree,r.slice(this._prefix.length)),2),l=a[0],u=a[1];if(void 0===l){var c=n(_(u),2),h=c[0],d=c[1];try{for(var f=t(h.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==s&&v.startsWith(d)){var y=new Map;return y.set(v.slice(d.length),h.get(v)),new e(y,r)}}}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,r)},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 r,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=n(a.value,2);e(s[0],s[1],this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.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:o((function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size}),"get"),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 n=g(this._tree,e);return n.set(s,t(n.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 n=g(this._tree,e),r=n.get(s);return void 0===r&&n.set(s,r=t()),r},e.prototype.values=function(){return new l(this,a)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(r){var i,o,a=new e;try{for(var s=t(r),l=s.next();!l.done;l=s.next()){var u=n(l.value,2),c=u[0],h=u[1];a.set(c,h)}}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,n,r){var i,o;if(void 0===r&&(r=[]),0===n.length||null==e)return[e,r];try{for(var a=t(e.keys()),l=a.next();!l.done;l=a.next()){var u=l.value;if(u!==s&&n.startsWith(u))return r.push([e,u]),p(e.get(u),n.slice(u.length),r)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return r.push([e,n]),p(void 0,"",r)}),"trackDown"),f=o((function(e,n){var r,i;if(0===n.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&&n.startsWith(l))return f(e.get(l),n.slice(l.length))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"lookup"),g=o((function(e,n){var r,i,o=n.length;e:for(var a=0;e&&a<o;){try{for(var l=(r=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==s&&n[a]===c[0]){for(var h=Math.min(o-a,c.length),d=1;d<h&&n[a+d]===c[d];)++d;var p=e.get(c);if(d===c.length)e=p;else{var f=new Map;f.set(c.slice(d),p),e.set(n.slice(a,a+d),f),e.delete(c),e=f}a+=d;continue e}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}var g=new Map;return e.set(n.slice(a),g),g}return e}),"createPath"),v=o((function(e,t){var r=n(p(e,t),2),i=r[0],o=r[1];if(void 0!==i)if(i.delete(s),0===i.size)y(o);else if(1===i.size){var a=n(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=n(_(e),2),r=t[0],i=t[1];if(r.delete(i),0===r.size)y(e.slice(0,-1));else if(1===r.size){var o=n(r.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,r){if(0!==e.length){var i=n(_(e),2),o=i[0],a=i[1];o.set(a+t,r),o.delete(a)}}),"merge"),_=o((function(e){return e[e.length-1]}),"last"),b="or",w=function(){function r(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},S),t),{searchOptions:e(e({},C),t.searchOptions||{})}),this._index=new d,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(r,"MiniSearch"),r.prototype.add=function(e){var n,r,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,h=a.idField,d=s(e,h);if(null==d)throw new Error('MiniSearch: document does not have ID field "'.concat(h,'"'));var p=this.addDocumentId(d);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),_=this._fieldIds[v],b=new Set(m).size;this.addFieldLength(p,_,this._documentCount-1,b);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var E=u(M.value,v);E&&this.addTerm(_,p,E)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}},r.prototype.addAll=function(e){var n,r;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},r.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,r){var o=e.chunk,a=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,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(e){var r,i,o,a,s,l,u=this._options,c=u.tokenize,h=u.processTerm,d=u.extractField,p=u.fields,f=u.idField,g=d(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=n(y.value,2),_=m[0];if(g===m[1]){try{for(var b=(o=void 0,t(p)),w=b.next();!w.done;w=b.next()){var M=w.value,E=d(e,M);if(null!=E){var x=c(E.toString(),M),I=this._fieldIds[M],S=new Set(x).size;this.removeFieldLength(_,I,this._documentCount,S);try{for(var C=(s=void 0,t(x)),k=C.next();!k.done;k=C.next()){var T=h(k.value,M);T&&this.removeTerm(I,_,T)}}catch(e){s={error:e}}finally{try{k&&!k.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}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(e){r={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}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(e){var n,r;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){n={error:e}}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 d,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},r.prototype.search=function(e,r){var i,o;void 0===r&&(r={});var a=this.executeQuery(e,r),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=n(u.value,2),h=c[0],d=c[1],p=d.score,f=d.terms,g=d.match,v=f.length,y={id:this._documentIds.get(h),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(h)),(null==r.filter||r.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},r.prototype.autoSuggest=function(r,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},k),i);var u=new Map;try{for(var c=t(this.search(r,i)),h=c.next();!h.done;h=c.next()){var d=h.value,p=d.score,f=(w=d.terms).join(" ");null!=(_=u.get(f))?(_.score+=p,_.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{h&&!h.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=n(y.value,2),_=m[0],b=m[1],w=(p=b.score,b.terms),M=b.count;g.push({suggestion:_,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(r.prototype,"documentCount",{get:o((function(){return this._documentCount}),"get"),enumerable:!1,configurable:!0}),r.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return r.loadJS(JSON.parse(e),t)},r.getDefault=function(e){if(S.hasOwnProperty(e))return M(S,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},r.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,h=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 _=new r(i);_._documentCount=c,_._nextId=h,_._documentIds=F(p),_._fieldIds=f,_._fieldLength=F(g),_._avgFieldLength=v,_._storedFields=F(y),_._index=new d;try{for(var b=t(u),w=b.next();!w.done;w=b.next()){var M=n(w.value,2),E=M[0],x=M[1],I=new Map;try{for(var S=(s=void 0,t(Object.keys(x))),C=S.next();!C.done;C=S.next()){var k=C.value,T=x[k];1===m&&(T=T.ds),I.set(parseInt(k,10),F(T))}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=S.return)&&l.call(S)}finally{if(s)throw s.error}}_._index.set(E,I)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return _},r.prototype.executeQuery=function(t,n){var r=this;if(void 0===n&&(n={}),"string"!=typeof t){var i=e(e(e({},n),t),{queries:void 0}),o=t.queries.map((function(e){return r.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),n),h=c.tokenize,d=c.processTerm,p=h(t).map((function(e){return d(e)})).filter((function(e){return!!e})).map(I(c)).map((function(e){return r.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},r.prototype.executeQuerySpec=function(r,i){var o,a,s,l,u,c,h=e(e({},this._options.searchOptions),i),d=(h.fields||this._options.fields).reduce((function(t,n){var r;return e(e({},t),((r={})[n]=M(t,n)||1,r))}),h.boost||{}),p=h.boostDocument,f=h.weights,g=h.maxFuzzy,v=e(e({},C.weights),f),y=v.fuzzy,m=v.prefix,_=this._index.get(r.term),b=this.termResults(r.term,r.term,1,_,d,p);if(r.prefix&&(u=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(u)try{for(var x=t(u),I=x.next();!I.done;I=x.next()){var S=n(I.value,2),k=S[0],T=S[1];if(F=k.length-r.term.length){null==c||c.delete(k);var O=m*k.length/(k.length+.3*F);this.termResults(r.term,k,O,T,d,p,b)}}}catch(e){o={error:e}}finally{try{I&&!I.done&&(a=x.return)&&a.call(x)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){k=P.value;var F,L=n(c.get(k),2),N=L[0];(F=L[1])&&(O=y*k.length/(k.length+F),this.termResults(r.term,k,O,N,d,p,b))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return b},r.prototype.combineResults=function(e,t){if(void 0===t&&(t=b),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(E[n])||new Map},r.prototype.toJSON=function(){var e,r,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=n(l.value,2),c=u[0],h=u[1],d={};try{for(var p=(i=void 0,t(h)),f=p.next();!f.done;f=p.next()){var g=n(f.value,2),v=g[0],y=g[1];d[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,d])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.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}},r.prototype.termResults=function(e,n,r,i,o,a,s){var l,u,c,h,d;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 _=m.size,b=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),E=w.next();!E.done;E=w.next()){var I=E.value,S=a?a(this._documentIds.get(I),n):1;if(S){var C=m.get(I),k=this._fieldLength.get(I)[y],O=r*v*S*x(C,_,this._documentCount,k,b),A=s.get(I);if(A){A.score+=O,T(A.terms,e);var P=M(A.match,n);P?P.push(g):A.match[n]=[g]}else s.set(I,{score:O,terms:[e],match:(d={},d[n]=[g],d)})}}}catch(e){c={error:e}}finally{try{E&&!E.done&&(h=w.return)&&h.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},r.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,P),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},r.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,P),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},r.prototype.warnDocumentChanged=function(e,n,r){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]===n)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(r,'" 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}}},r.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},r.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},r.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},r.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},r.prototype.saveStoredFields=function(e,n){var r,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 h=c.value,d=s(n,h);void 0!==d&&(l[h]=d)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}},r}(),M=o((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),E=((r={}).or=function(e,n){var r,i;try{for(var o=t(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,n.get(s));else{var u=n.get(s),c=u.score,h=u.terms,d=u.match;l.score=l.score+c,l.match=Object.assign(l.match,d),O(l.terms,h)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e},r.and=function(e,n){var r,i,o=new Map;try{for(var a=t(n.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=n.get(l),h=c.score,d=c.terms,p=c.match;O(u.terms,d),o.set(l,{score:u.score+h,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},r.and_not=function(e,n){var r,i;try{for(var o=t(n.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e},r),x=o((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*r/i)))}),"calcBM25Score"),I=o((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),S={idField:"id",extractField:o((function(e,t){return e[t]}),"extractField"),tokenize:o((function(e,t){return e.split(L)}),"tokenize"),processTerm:o((function(e,t){return e.toLowerCase()}),"processTerm"),fields:void 0,searchOptions:void 0,storeFields:[]},C={combineWith:b,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},k={prefix:o((function(e,t,n){return t===n.length-1}),"prefix")},T=o((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),O=o((function(e,n){var r,i;try{for(var o=t(n),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}),"assignUniqueTerms"),A=o((function(e,t){var n=e.score;return t.score-n}),"byScore"),P=o((function(){return new Map}),"createMap"),F=o((function(e){var n,r,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){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}),"objectToNumericMap"),L=/[\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=r():"function"==typeof define&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self).MiniSearch=r()})),ex={};yf(ex,{Mappedin:()=>qn,MappedinDestinationSet:()=>Pt,OfflineSearch:()=>oo,getVenue:()=>ff,getVenueBundle:()=>hf,initialize:()=>ZE,setFetchFn:()=>Ev}),module.exports=Ue(ex),v(),v();var Mv=un(wf());v(),v(),v();var Mf=un(_f());v();var ru=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,l;if(f(this,"origin"),f(this,"destination"),f(this,"vortex"),f(this,"distance"),f(this,"angle"),f(this,"weight"),this.origin=e,this.destination=t,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,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*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(ru,"Edge");var nu=ru,hr=nu;v();var kf="mi-debug",Fv={logState:"test"===R.env.NODE_ENV?3: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)}},te=Fv;function Rv(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],n=e.georeference[2],r=(0,Mf.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return te.error(e),1}}function yo(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}o(Rv,"getMapScale"),o(yo,"getAngle");var ou=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){f(this,"edges"),f(this,"nodesById"),f(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:Rv(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:r?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:n})=>{let r=this.nodesById[t];return new hr({angle:yo(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[n.id].push(new hr({destination:t,elevationDelta:a,origin:n,vortex:e})),this.edges[t.id].push(new hr({destination:n,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let a=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),s=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===a.length||0===s.length)return[];let l=[],u={},c={};for(a.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(s.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let a=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,h=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),d=o&&o.has(t.destination.id);if(n&&a||h||d)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,s);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};o(ou,"NavigationGraph");var iu=ou,au=iu;function Dv(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),o(Dv,"vortexDirectionTest");var uu=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){f(this,"node"),f(this,"instruction"),f(this,"action"),f(this,"atLocation"),f(this,"type"),f(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(Dv(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.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&&r&&(this.instruction+=" at ".concat(r.name)))}};o(uu,"Directive");var su=uu,Jn=su;function lu(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,a=t.x,s=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===a&&o===s||l===c&&u===h)return null;let d=(h-u)*(a-i)-(c-l)*(s-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((a-i)*(o-u)-(s-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(a-i),y:o+p*(s-o)}}function Ef(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function xf(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Ef(e,t,-r),a=Ef(e,t,r);if(lu(o[0],o[1],n[0],n[1])||lu(a[0],a[1],n[0],n[1]))return void(i=!1)}else if(lu(e,t,n[0],n[1]))return void(i=!1)})),i}v(),o(lu,"getLineIntersection"),o(Ef,"getOffsetLine"),o(xf,"hasLineOfSight");var bo=.1*Math.PI;function wo(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}o(wo,"differenceBetweenAngles");var pu=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){f(this,"graph"),f(this,"locationsByNodeId"),f(this,"geometryEdgesByMapId",new Map),this.graph=new au({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){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=-wo(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-wo(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(r+=s,i+=a.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s,simplify:l}){var u,c,h;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s});if(0===d.length)return{distance:0,instructions:[new Jn({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],g=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[d[0]];for(let n=1;n<d.length;n++){if(d[n].origin.map!==d[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(d[n-1].origin.map))?c:[];g.push(...this.simplifySteps(t,r,e)),t=[d[n]]}t.push(d[n])}let n=d[d.length-1],r=null!=(h=this.geometryEdgesByMapId.get(n.origin.map))?h:[];g.push(...this.simplifySteps(t,r,e)),d=g}for(let e=0;e<d.length;e++)f.push(d[e].origin);f.push(d[d.length-1].destination);let v=[],y=null,m=null,_=0,b=0;for(let e=0;e<d.length;e++){let t=d[e],n=t.origin,o=t.destination;if(p+=t.distance,_+=(null==m?void 0:m.distance)||0,0===e&&v.push(new Jn({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}v.push(new Jn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:_,origin:n})),b+=_,_=0}else if(null!=y&&null!=m)if(null!=m.vortex){let e=this.graph.mapsById[y.map],t=this.graph.mapsById[m.destination.map];v.push(new Jn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:_,origin:n})),b+=_,_=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let r=-wo(m.angle,t.angle),i=e.reduce(((e,n)=>{let r=-wo(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=bo||Math.abs(i)<=bo){let e;e=r<=-Math.PI/4?"Right":r<=-bo?"SlightRight":r<=bo?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let r=new Jn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:_,origin:n});r.type=e,v.push(r)}else v.push(new Jn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:_,origin:n}));b+=_,_=0}}}e===d.length-1&&(v.push(new Jn({action:{type:"Arrival"},atLocation:i,distance:p-b<0?0:p-b,origin:t.destination})),b+=_,_=0),y=n,m=t}let w=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,w.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?w.unshift(t):w[0].distance+=t.distance:w.unshift(t)}return{distance:p,instructions:w,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!xf(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new hr({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:yo(e[i].origin,e[t].origin)})),i=t}return r.push(new hr({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:yo(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};o(pu,"Navigator");var cu=pu,du=cu;v(),v();var ln,dn,fu,hu,If,gu=class{constructor(e){W(this,dn),W(this,ln),X(this,ln,e)}directionsTo(e,t){let n=g(this,ln).analytics;return e instanceof Pt?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),Je(this,dn,If).call(this,e,t)):(n.getDirections(this,e),Je(this,dn,hu).call(this,e,t))}distanceTo(e,t){let n=Je(this,dn,hu).call(this,e,t);return(null==n?void 0:n.distance)||0}};ln=new WeakMap,dn=new WeakSet,fu=o((function(){var e;return null!=(e=g(this,ln).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),hu=o((function(e,t){let n=Ti(this),r=Ti(e),i=g(this,ln).navigator.getDirections({originIds:n,destinationNodeIds:r,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,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||g(this,dn,fu)});return new gr(g(this,ln),i)}),"#directionsToSingleDestination"),If=o((function(e,t){let n,r=[],i=Ti(this);for(let o=0;o<e.destinations.length;o++){n=Ti(e.destinations[o]);let a=g(this,ln).navigator.getDirections({originIds:i,destinationNodeIds:n,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)||g(this,dn,fu)}),s=new gr(g(this,ln),a);r.push(s),i=0===s.path.length?n:[s.path[s.path.length-1].id]}return r}),"#directionsToDestinationSet"),o(gu,"MappedinNavigatable");var cn=gu;v(),v();var is=un(wh()),rc={production:"40ead723d18886045e302513245edb27",development:""},Vr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},ic=class{constructor(e){this.event_properties=e,f(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};o(ic,"AnalyticsCategorySelectedCall");var Wi=ic,ac=class{constructor(e){this.event_properties=e,f(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};o(ac,"AnalyticsLocationSelectedCall");var Yi=ac,oc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};o(oc,"BlueDotDisableCall");var Yu=oc,sc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};o(sc,"BlueDotEnableCall");var Xu=sc,uc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:off-call"),this.event_properties=e}};o(uc,"BlueDotOffCall");var Hu=uc,lc=class{constructor(e){this.event_properties=e,f(this,"event_type","BlueDot:on-call"),this.event_properties=e}};o(lc,"BlueDotOnCall");var $u=lc,cc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:animate-call"),this.event_properties=e}};o(cc,"CameraAnimateCall");var Ku=cc,dc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};o(dc,"CameraCancelAnimationCall");var Ju=dc,pc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};o(pc,"CameraFocusOnCall");var Qu=pc,fc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};o(fc,"CameraGetSafeAreaInsetsCall");var Zu=fc,hc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};o(hc,"CameraInteractionDisableCall");var el=hc,gc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};o(gc,"CameraInteractionEnableCall");var tl=gc,mc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:set-call"),this.event_properties=e}};o(mc,"CameraSetCall");var nl=mc,vc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};o(vc,"CameraSetSafeAreaInsetsCall");var rl=vc,yc=class{constructor(e){this.event_properties=e,f(this,"event_type","Camera:translate-call"),this.event_properties=e}};o(yc,"CameraTranslateCall");var il=yc,bc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};o(bc,"FlatLabelsAddCall");var al=bc,wc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};o(wc,"FlatLabelsLabelAllLocationsCall");var ol=wc,_c=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};o(_c,"FlatLabelsRemoveCall");var sl=_c,kc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};o(kc,"FlatLabelsRemoveAllCall");var ul=kc,Mc=class{constructor(e){this.event_properties=e,f(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};o(Mc,"FlatLabelsSetAppearanceCall");var ll=Mc,Ec=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};o(Ec,"FloatingLabelsAddCall");var cl=Ec,xc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};o(xc,"FloatingLabelsLabelAllLocationsCall");var dl=xc,Tc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};o(Tc,"FloatingLabelsRemoveCall");var pl=Tc,Ic=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};o(Ic,"FloatingLabelsRemoveAllCall");var fl=Ic,Sc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};o(Sc,"FloatingLabelsResetPriorityCall");var hl=Sc,Pc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};o(Pc,"FloatingLabelsSetAppearanceCall");var gl=Pc,Oc=class{constructor(e){this.event_properties=e,f(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};o(Oc,"FloatingLabelsSetPriorityCall");var ml=Oc,Ac=class{constructor(e){this.event_properties=e,f(this,"event_type","global:getVenue-call"),this.event_properties=e}};o(Ac,"GlobalGetVenueCall");var Xi=Ac,Cc=class{constructor(e){this.event_properties=e,f(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};o(Cc,"GlobalGetVenueMvfCall");var rs=Cc,jc=class{constructor(e){this.event_properties=e,f(this,"event_type","global:showVenue-call"),this.event_properties=e}};o(jc,"GlobalShowVenueCall");var vl=jc,Lc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:clear-call"),this.event_properties=e}};o(Lc,"JourneyClearCall");var yl=Lc,Nc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:draw-call"),this.event_properties=e}};o(Nc,"JourneyDrawCall");var bl=Nc,Fc=class{constructor(e){this.event_properties=e,f(this,"event_type","Journey:setStep-call"),this.event_properties=e}};o(Fc,"JourneySetStepCall");var wl=Fc,Rc=class{constructor(e){this.event_properties=e,f(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};o(Rc,"MappedinGetCollectionItemByIdCall");var _l=Rc,Dc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};o(Dc,"MappedinCoordinateAbsoluteDistanceToCall");var kl=Dc,Bc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};o(Bc,"MappedinCoordinateNearestNodeCall");var Ml=Bc,zc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};o(zc,"MappedinLocationCloneCall");var Hi=zc,Vc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};o(Vc,"MappedinLocationDirectionsToCall");var $i=Vc,qc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};o(qc,"MappedinLocationDistanceToCall");var Ki=qc,Gc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};o(Gc,"MappedinMapCreateCoordinateCall");var El=Gc,Uc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};o(Uc,"MappedinMapCreateCoordinateByXyCall");var xl=Uc,Wc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};o(Wc,"MappedinMapGetNorthCall");var Tl=Wc,Yc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};o(Yc,"MappedinNodeDirectionsToCall");var Ji=Yc,Xc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};o(Xc,"MappedinNodeDistanceToCall");var Qi=Xc,Hc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};o(Hc,"MappedinPolygonDirectionsToCall");var Zi=Hc,$c=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};o($c,"MappedinPolygonDistanceToCall");var ea=$c,Kc=class{constructor(e){this.event_properties=e,f(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};o(Kc,"MappedinVenueMetadataRead");var ta=Kc,Jc=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};o(Jc,"MapViewAddInteractivePolygonCall");var Il=Jc,Qc=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};o(Qc,"MapViewAddInteractivePolygonsForAllLocationsCall");var Sl=Qc,Zc=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};o(Zc,"MapViewClearPolygonColorCall");var Pl=Zc,ed=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};o(ed,"MapViewCreateCustomTooltipCall");var Ol=ed,td=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};o(td,"MapViewCreateMarkerCall");var Al=td,nd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};o(nd,"MapViewCreateTooltipCall");var Cl=nd,rd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:destroy-call"),this.event_properties=e}};o(rd,"MapViewDestroyCall");var jl=rd,id=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};o(id,"MapViewDisableImageFlippingForAllPolygonsCall");var Ll=id,ad=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};o(ad,"MapViewDrawPathCall");var Nl=ad,od=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};o(od,"MapViewEnableImageFlippingForAllLocationsCall");var Fl=od,sd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};o(sd,"MapViewEnableImageFlippingForPolygonCall");var Rl=sd,ud=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};o(ud,"MapViewGetNearestNodeByScreenCoordinatesCall");var Dl=ud,ld=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};o(ld,"MapViewGetPolygonAtCoordinateCall");var Bl=ld,cd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};o(cd,"MapViewGetPrimaryLocationForPolygonCall");var zl=cd,dd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};o(dd,"MapViewLabelAllLocationsCall");var Vl=dd,pd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};o(pd,"MapViewRemoveAllInteractivePolygonsCall");var ql=pd,fd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};o(fd,"MapViewRemoveAllMarkersCall");var Gl=fd,hd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};o(hd,"MapViewRemoveAllPathsCall");var Ul=hd,gd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};o(gd,"MapViewRemoveAllTooltipsCall");var Wl=gd,md=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};o(md,"MapViewRemoveInteractivePolygonCall");var Yl=md,vd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};o(vd,"MapViewRemoveMarkerCall");var Xl=vd,yd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removePath-call"),this.event_properties=e}};o(yd,"MapViewRemovePathCall");var Hl=yd,bd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};o(bd,"MapViewRemoveTooltipCall");var $l=bd,wd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};o(wd,"MapViewSetBackgroundColorCall");var Kl=wd,_d=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};o(_d,"MapViewSetHoverColorCall");var Jl=_d,kd=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setMap-call"),this.event_properties=e}};o(kd,"MapViewSetMapCall");var Ql=kd,Md=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};o(Md,"MapViewSetPolygonColorCall");var Zl=Md,Ed=class{constructor(e){this.event_properties=e,f(this,"event_type","MapView:setState-call"),this.event_properties=e}};o(Ed,"MapViewSetStateCall");var ec=Ed,xd=class{constructor(e){this.event_properties=e,f(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};o(xd,"MetricsMapLoadEvent");var tc=xd,Td=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};o(Td,"OfflineSearchAddQueryCall");var na=Td,Id=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};o(Id,"OfflineSearchConstructorCall");var ra=Id,Sd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};o(Sd,"OfflineSearchSearchCall");var ia=Sd,Pd=class{constructor(e){this.event_properties=e,f(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};o(Pd,"OfflineSearchSuggestCall");var aa=Pd,ns=o((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),Od=class{constructor(){f(this,"disabled",!1),f(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,n;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."),ns();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=rc[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=is.createInstance(),this.amplitude.init(r,void 0,{...Vr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return ns()}identify(e,t,n){if(!this.isInitializedAndEnabled())return ns();e&&(n={...n,user_id:e});let r=new is.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):ns()}analyticsCategorySelectedCall(e,t){return this.track(new Wi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Yi(e),t)}blueDotDisableCall(e,t){return this.track(new Yu(e),t)}blueDotEnableCall(e,t){return this.track(new Xu(e),t)}blueDotOffCall(e,t){return this.track(new Hu(e),t)}blueDotOnCall(e,t){return this.track(new $u(e),t)}cameraAnimateCall(e,t){return this.track(new Ku(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Ju(e),t)}cameraFocusOnCall(e,t){return this.track(new Qu(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Zu(e),t)}cameraInteractionDisableCall(e,t){return this.track(new el(e),t)}cameraInteractionEnableCall(e,t){return this.track(new tl(e),t)}cameraSetCall(e,t){return this.track(new nl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new rl(e),t)}cameraTranslateCall(e,t){return this.track(new il(e),t)}flatLabelsAddCall(e,t){return this.track(new al(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new ol(e),t)}flatLabelsRemoveCall(e,t){return this.track(new sl(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new ul(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new ll(e),t)}floatingLabelsAddCall(e,t){return this.track(new cl(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new dl(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new pl(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new fl(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new hl(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new gl(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new ml(e),t)}globalGetVenueCall(e,t){return this.track(new Xi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new rs(e),t)}globalShowVenueCall(e,t){return this.track(new vl(e),t)}journeyClearCall(e,t){return this.track(new yl(e),t)}journeyDrawCall(e,t){return this.track(new bl(e),t)}journeySetStepCall(e,t){return this.track(new wl(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new _l(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new kl(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Ml(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Hi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new $i(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Ki(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new El(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new xl(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Tl(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new Ji(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new Qi(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new Zi(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new ea(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ta(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Il(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Sl(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new Pl(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new Ol(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new Al(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new Cl(e),t)}mapViewDestroyCall(e,t){return this.track(new jl(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new Ll(e),t)}mapViewDrawPathCall(e,t){return this.track(new Nl(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new Fl(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new Rl(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new Dl(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new Bl(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new zl(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Vl(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new ql(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Gl(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Ul(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Wl(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Yl(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Xl(e),t)}mapViewRemovePathCall(e,t){return this.track(new Hl(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new $l(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new Kl(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Jl(e),t)}mapViewSetMapCall(e,t){return this.track(new Ql(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Zl(e),t)}mapViewSetStateCall(e,t){return this.track(new ec(e),t)}metricsMapLoadEvent(e,t){return this.track(new tc(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new na(e),t)}offlineSearchConstructorCall(e,t){return this.track(new ra(e),t)}offlineSearchSearchCall(e,t){return this.track(new ia(e),t)}offlineSearchSuggestCall(e,t){return this.track(new aa(e),t)}};o(Od,"Ampli");var nc=Od,oa=new nc;v();var Ln,xr,tn,Hr,hn,Xt,Ng,Fg,ep,tp,nn,Cg=un(tg()),jg=un(Og()),Lg=un(Ru()),Ag="5.51.0",oM="https://api2.amplitude.com/2/httpapi",sM="https://api2.amplitude.com/batch",uM="__unspecified__",Qd={branch:"main",version:"0",source:"websdk"},Mt=class e{constructor(){W(this,Xt),W(this,tn,{}),W(this,Hr,!1),W(this,hn),W(this,nn,o((async e=>{cM(e.type)&&(window.removeEventListener("visibilitychange",g(this,nn)),window.removeEventListener("pagehide",g(this,nn)),window.removeEventListener("beforeunload",g(this,nn)),window.removeEventListener("unload",g(this,nn)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==g(e,xr)&&X(e,xr,Ag),typeof navigator<"u"&&null!=navigator.userAgent&&X(this,hn,new Lg.UAParser(navigator.userAgent).getResult())}static setContext(t){X(e,Ln,t)}static setVersion(t){X(e,xr,t)}addPendingEvent(t){var n;if(null==g(e,Ln))return;let r=t.event_type;if(!Je(this,Xt,Fg).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=g(this,tn)[r];(0,jg.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),g(this,tn)[r]=t}async sendAllPendingEvents(){if(null==g(e,Ln)||Object.keys(g(this,tn)).length<1)return;if(g(this,Hr))return void te.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in g(this,tn)){let n=g(this,tn)[e],r=Je(this,Xt,ep).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{X(this,Hr,!0),200===(await Je(this,Xt,tp).call(this,sM,t)).status&&X(this,tn,{})}catch(e){te.warn("Error sending batch product analytics!",e)}finally{X(this,Hr,!1)}}async load(){if(!oa.isLoaded){let{promise:e}=oa.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",g(this,nn)),window.addEventListener("beforeunload",g(this,nn)),window.addEventListener("unload",g(this,nn)),window.addEventListener("visibilitychange",g(this,nn))}))}}async sendEventNow(t){if(null==g(e,Ln))return;let n=Je(this,Xt,ep).call(this,t);if(null!=n)try{await Je(this,Xt,tp).call(this,oM,[n])}catch(e){te.warn("Error sending single product analytics event!",e)}}};Ln=new WeakMap,xr=new WeakMap,tn=new WeakMap,Hr=new WeakMap,hn=new WeakMap,Xt=new WeakSet,Ng=o((function(e){let t=e.event_type;return null!=g(this,tn)[t]}),"#isEventTypePending"),Fg=o((function(e){if(!Je(this,Xt,Ng).call(this,e))return!0;let t=e.event_type,n=g(this,tn)[t];return!(0,Cg.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),ep=o((function(e){var t,n,r,i,o,a,s,l,u,c,h,d,p,f,v,y,m;if(null!=g(Mt,Ln))return null==(null==(t=e.event_properties)?void 0:t.venue)&&te.warn("Error processing product analytics event! Unspecified venue slug",e),null==Vr.plan&&te.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=oa.client.getSessionId())?n:xs(),device_id:null!=(r=oa.client.getDeviceId())?r:Es(),plan:{branch:null!=(o=null==(i=Vr.plan)?void 0:i.branch)?o:Qd.branch,version:null!=(s=null==(a=Vr.plan)?void 0:a.version)?s:Qd.version,source:null!=(u=null==(l=Vr.plan)?void 0:l.source)?u:Qd.source},os_name:null==(c=g(this,hn))?void 0:c.browser.name,os_version:null==(h=g(this,hn))?void 0:h.browser.version,device_manufacturer:null==(d=g(this,hn))?void 0:d.device.vendor,device_model:null==(p=g(this,hn))?void 0:p.device.model,event_properties:{...e.event_properties,context:g(Mt,Ln),sdk_version:g(Mt,xr),browser_name:null==(f=g(this,hn))?void 0:f.browser.name,browser_version:null==(v=g(this,hn))?void 0:v.browser.version,venue:null!=(m=null==(y=e.event_properties)?void 0:y.venue)?m:uM},time:e.time}}),"#makeBatchFormattedEvent"),tp=o((async function(e,t){return await Nn()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:rc.production,events:t})})}),"#batchSend"),nn=new WeakMap,o(Mt,"ProductAnalytics"),W(Mt,Ln),W(Mt,xr);var Zd=Mt,lM=new Zd,nt=lM;function cM(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}o(cM,"areWeLeavingThePage");var Ht,$r,gt,ya,rr=class e extends cn{constructor(t,n){super(t),f(this,"__type",e.__type),W(this,Ht),W(this,$r),W(this,gt,{}),f(this,"id",""),f(this,"x",0),f(this,"y",0),f(this,"operationHours"),f(this,"externalId"),W(this,ya),X(this,Ht,t),X(this,$r,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=g(this,gt).map;if(typeof e<"u")return e;let t=g(this,Ht).getCollectionItemById("maps",g(this,$r).map);return g(this,gt).map=t,t}get lat(){var e;let t=g(this,gt).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=g(this,Ht)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return g(this,gt).cachedLatLon=n.createCoordinateByXY(this.x,this.y),g(this,gt).cachedLatLon.lat}get lon(){var e;let t=g(this,gt).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=g(this,Ht)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return g(this,gt).cachedLatLon=n.createCoordinateByXY(this.x,this.y),g(this,gt).cachedLatLon.lon}get paths(){let e=g(this,gt).paths;if(typeof e<"u")return e;let t=[],n=g(this,Ht)._nodesById,r=g(this,ya);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return g(this,gt).paths=t,t}set paths(e){X(this,ya,e)}get locations(){var e,t,n;let r=g(this,gt).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=mt.instances.get(g(this,Ht)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===a){i.push(t);break}}return g(this,gt).locations=i,i}get polygon(){var e,t,n,r;let i=g(this,gt).polygon;if(typeof i<"u")return i;let o,a=null!=(r=null==(n=null==(e=mt.instances.get(g(this,Ht)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],s=this.id;for(let e=0,t=a.length;e<t;++e){let t=a[e];t.entrances.map((e=>e.id)).includes(s)&&(o=t)}return g(this,gt).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.nodes.slice();null!=(r=t.options.things)&&r.maps&&rt(i,"map"),["weight","multiplier","accessible"].forEach((function(e){rt(i,e)}));let o={fields:i,venue:t.options.venue};try{return(await it(t.options,"node",o)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,Ht).venue.slug,i=new Ji({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,Ht).venue.slug;return nt.addPendingEvent(new Qi({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...g(this,$r)},t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Ht=new WeakMap,$r=new WeakMap,gt=new WeakMap,ya=new WeakMap,o(rr,"MappedinNode"),f(rr,"__type","MappedinNode");var va=rr;v();var gn,Kr,$t,ba,ir=class e extends cn{constructor(t,n){super(t),f(this,"__type",e.__type),W(this,gn),W(this,Kr),W(this,$t,{}),f(this,"geometry"),f(this,"perspectives"),f(this,"image"),f(this,"holes"),f(this,"textures"),f(this,"material"),f(this,"label"),f(this,"id",""),f(this,"layer"),f(this,"layerId"),f(this,"name"),f(this,"externalId"),f(this,"vertexes"),f(this,"center"),f(this,"canvasBounds"),f(this,"categoryRank"),W(this,ba),f(this,"boundingBox",null),X(this,gn,t),X(this,Kr,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=g(this,$t).map;if(typeof e<"u")return e;let t=g(this,gn).getCollectionItemById("maps",g(this,Kr).map);return g(this,$t).map=t,t}get locations(){var e,t;let n=g(this,$t).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=mt.instances.get(g(this,gn)))?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],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return g(this,$t).locations=r,r}get entrances(){let e=g(this,$t).entrances;if(typeof e<"u")return e;let t=[],n=g(this,ba),r=g(this,gn)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return g(this,$t).entrances=t,t}return[]}set entrances(e){X(this,ba,e)}get rank(){let e=g(this,$t).rank;if(typeof e<"u")return e;let{rankings:t}=g(this,gn);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(g(this,$t).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(g(this,$t).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r,i;let o=null==(n=t.options.things)?void 0:n.polygons.slice();null!=(r=t.options.things)&&r.maps&&rt(o,"map"),null!=(i=t.options.things)&&i.nodes&&rt(o,"entrances");let a={fields:o,venue:t.options.venue};try{return(await it(t.options,"polygon",a)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,gn).venue.slug,i=new Zi({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,gn).venue.slug;return nt.addPendingEvent(new ea({venue:n})),super.distanceTo(e,t)}containsCoordinate(e){let t=e;e.map!==this.map&&(t=this.map.createCoordinate(e.lat,e.lon));let{x:n,y:r}=t,{vertexes:i}=this;if(!i)return!1;if(null==this.boundingBox){let e=Math.min(...i.map((e=>e.x))),t=Math.max(...i.map((e=>e.x))),n=Math.min(...i.map((e=>e.y))),r=Math.max(...i.map((e=>e.y)));this.boundingBox={minX:e,minY:n,maxX:t,maxY:r}}if(n<this.boundingBox.minX||n>this.boundingBox.maxX||r<this.boundingBox.minY||r>this.boundingBox.maxY)return!1;let o=!1;for(let e=0,t=i.length-1;e<i.length;t=e++){let a=i[e].x,s=i[e].y,l=i[t].x,u=i[t].y;s>r!=u>r&&n<(l-a)*(r-s)/(u-s)+a&&(o=!o)}return o}toJSON(){return g(this,Kr)}};gn=new WeakMap,Kr=new WeakMap,$t=new WeakMap,ba=new WeakMap,o(ir,"MappedinPolygon"),f(ir,"__type","MappedinPolygon");var Tr=ir;v();var dM=0,pM="9999-12-31T00:00:00.000Z";function fM(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||dM),n=new Date(e.end||pM);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}o(fM,"getCurrentLocationState");var ut,bt,Et,wa,_a,ka,Rg=["name","description","shortName","tags"],Kt=class e extends cn{constructor(t,n){super(t),f(this,"__type",e.__type),W(this,ut),W(this,bt),W(this,Et,{}),f(this,"states"),f(this,"id",""),f(this,"name",""),f(this,"type",""),f(this,"description"),f(this,"sortOrder"),f(this,"logo"),f(this,"phone"),f(this,"social"),f(this,"color"),f(this,"shortName"),f(this,"detailsUrl"),f(this,"tags"),f(this,"toMap"),f(this,"externalId"),f(this,"showLabelWhenImagePresent"),f(this,"showSmartLabelWhenImagePresent"),f(this,"picture"),f(this,"operationHours"),f(this,"siblingGroups"),f(this,"gallery"),f(this,"amenity"),f(this,"filterFlags"),W(this,wa),W(this,_a,[]),W(this,ka),X(this,ut,t),X(this,bt,n);let r=Object.assign({},n);delete r.categories,Object.assign(this,r)}static is(t){return t.__type===e.__type}get polygons(){let e=g(this,Et).polygons;if(typeof e<"u")return e;let t=[],n=g(this,wa),r=g(this,ut)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return g(this,Et).polygons=t,t}set polygons(e){X(this,wa,e)}get nodes(){let e=g(this,Et).nodes;if(typeof e<"u")return e;let t=[],n=g(this,_a),r=g(this,ut)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return g(this,Et).nodes=t,t}set nodes(e){X(this,_a,e)}get parent(){let e=g(this,Et).parent;if(typeof e<"u")return e;let t,n=g(this,ut)._locationsById,r=g(this,ka);return void 0!==r&&(t=n[r]),g(this,Et).parent=t,t}set parent(e){X(this,ka,e)}get instances(){let t=g(this,Et).instances;if(typeof t<"u")return t;let n=[];for(let t of g(this,bt).polygons)if(Object.keys(t).length>2){let{id:r,map:i,...o}=t,a=g(this,ut).getCollectionItemById("polygons",r),s=null!=a&&Array.isArray(null==a?void 0:a.entrances)&&a.entrances.length>0?a.entrances.map((e=>({node:e.id,map:e.map}))):[];n.push(new e(g(this,ut),{...g(this,bt),...o,parent:this.id,nodes:s,polygons:[t]}))}for(let t of g(this,bt).nodes)if(Object.keys(t).length>2){let{node:r,map:i,...o}=t,a=g(this,ut).getCollectionItemById("nodes",r),s=null!=a&&a.polygon?[{id:a.polygon.id,map:a.polygon.map}]:[];n.push(new e(g(this,ut),{...g(this,bt),...o,parent:this.id,nodes:[{node:r,map:i}],polygons:s}))}return g(this,Et).instances=n,n}get categories(){let e=g(this,Et).categories;if(typeof e<"u")return e;let t=[];return g(this,bt).categories.forEach((e=>{let n=g(this,ut).getCollectionItemById("categories",e);n&&t.push(n)})),g(this,Et).categories=t,t}get state(){return fM(this,g(this,ut).locationStates)}clone(){let t=g(this,ut).venue.slug;return nt.addPendingEvent(new Hi({venue:t})),new e(g(this,ut),g(this,bt))}get nodeOperationHours(){let e=g(this,Et).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=g(this,bt).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return g(this,Et).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of Rg)r[t]=i[e][t]}}static async fetch(t){var n,r,i,o,a;let s=null==(n=t.options.things)?void 0:n.locations.slice();null!=(r=t.options.things)&&r.categories&&rt(s,"categories"),null!=(i=t.options.things)&&i.nodes&&rt(s,"nodes"),null!=(o=t.options.things)&&o.polygons&&rt(s,"polygons"),null!=(a=t.options.things)&&a.locationStates&&rt(s,"states");let l={fields:s,venue:t.options.venue};try{let n=await it(t.options,"location",l);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return te.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof Pt,r=g(this,ut).venue.slug,i=new $i({with_destination_set:n||void 0,venue:r});return nt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=g(this,ut).venue.slug;return nt.addPendingEvent(new Ki({venue:n})),super.distanceTo(e,t)}toJSON(){var e,t;let n={...g(this,bt)};for(let e of Rg)n[e]=this[e];let r={};for(let e in this)e.includes("x_")&&(r[e.split("x_")[1]]=this[e]);n.extra=JSON.stringify(r),delete n.color;let i=[],o=[];if(null!=(e=g(this,bt))&&e.polygons)for(let e of g(this,bt).polygons)if(e&&Object.keys(e).some((e=>"id"!==e&&"map"!==e))){let{id:t,map:n}=e,r=g(this,ut).getCollectionItemById("polygons",t),i=null!=r&&Array.isArray(null==r?void 0:r.entrances)&&r.entrances.length>0?r.entrances.map((e=>({node:e.id,map:e.map.id}))):[];o.push({type:"polygon",mapId:n,nodeOrPolygonId:t,nodes:i,polygons:[{id:t,type:"polygon"}],description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup,extra:null==e?void 0:e.extra})}if(o.length>0&&(n.polygonInstances=o),null!=(t=g(this,bt))&&t.nodes)for(let e of g(this,bt).nodes)if(e&&Object.keys(e).some((e=>"node"!==e&&"map"!==e))){let{node:t,map:n}=e,r=g(this,ut).getCollectionItemById("nodes",t),o=null!=r&&r.polygon?{id:r.polygon.id,map:r.polygon.map.id}:void 0;i.push({type:"node",mapId:n,nodeOrPolygonId:t,nodes:[{node:t,map:n}],...(null==o?void 0:o.id)&&{polygons:[{id:o.id,type:"polygon"}]},description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup,extra:null==e?void 0:e.extra})}return i.length>0&&(n.nodeInstances=i),n}};ut=new WeakMap,bt=new WeakMap,Et=new WeakMap,wa=new WeakMap,_a=new WeakMap,ka=new WeakMap,o(Kt,"MappedinLocation"),f(Kt,"__type","MappedinLocation");var Fn=Kt;v();var Jr,Ir,Ma,Dg=["name"],Rn=class e{constructor(t,n){f(this,"__type",e.__type),W(this,Jr),W(this,Ir,{}),W(this,Ma),f(this,"name"),f(this,"externalId"),f(this,"parents"),f(this,"id"),f(this,"icon"),f(this,"iconFromDefaultList"),f(this,"sortOrder"),this.id=n.id,X(this,Ma,n),X(this,Jr,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get locations(){var e;let t=g(this,Ir).locations;if(typeof t<"u")return t;let n=[],{locations:r}=g(this,Jr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],a=o.categories;if(Array.isArray(a))for(let t=0,r=a.length;t<r;++t)if((null==(e=a[t])?void 0:e.id)===i){n.push(o);break}}return g(this,Ir).locations=n,n}get children(){var e;let t=g(this,Ir).children;if(typeof t<"u")return t;let{categories:n}=g(this,Jr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return g(this,Ir).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Dg)t.categories[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.categories,venue:t.options.venue};try{return(await it(t.options,"category",r)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Categories:",e),[]}}toJSON(){let e={...g(this,Ma)};for(let t of Dg)e[t]=this[t];let t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Jr=new WeakMap,Ir=new WeakMap,Ma=new WeakMap,o(Rn,"MappedinCategory"),f(Rn,"__type","MappedinCategory");var Sr=Rn;v();var Ea,Dn,rp=class{constructor(e,t){W(this,Ea),W(this,Dn),f(this,"distance",0),f(this,"path",[]),f(this,"instructions",[]),X(this,Dn,e),X(this,Ea,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,a,s,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=g(this,Dn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(a=null==(o=g(this,Dn))?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=g(this,Dn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=g(this,Dn)._mapsById)?void 0:d[null==(h=p.action)?void 0:h.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var n,r;let i=null==(r=null==(n=g(this,Dn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return g(this,Ea)}};Ea=new WeakMap,Dn=new WeakMap,o(rp,"MappedinDirections");var gr=rp;v();var ip=class{constructor(e){f(this,"destinations",[]),this.destinations=e}};o(ip,"MappedinDestinationSet");var Pt=ip;v();var Ta,ar=class e{constructor(t){f(this,"__type",e.__type),f(this,"id",""),W(this,Ta),f(this,"accessible"),f(this,"name"),f(this,"type"),f(this,"weight"),f(this,"multiplier"),f(this,"nodes"),f(this,"filterFlags"),X(this,Ta,t),Object.assign(this,t)}static is(t){return t.__type===e.__type}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r=null==(n=t.options.things)?void 0:n.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){rt(r,e)}));let i={fields:r,venue:t.options.venue};try{return(await it(t.options,"vortex",i)).map((t=>new e(t)))}catch(e){return te.error("Fetch Vortexes:",e),[]}}toJSON(){return g(this,Ta)}};Ta=new WeakMap,o(ar,"MappedinVortex"),f(ar,"__type","MappedinVortex");var xa=ar;v();var Sa,Pa,Oa,Qr,Ia=class e{constructor(e,t){W(this,Sa),W(this,Pa),W(this,Oa),W(this,Qr,{}),f(this,"defaultMap",""),f(this,"address",""),f(this,"city",""),f(this,"countrycode",""),f(this,"externalId",""),f(this,"id",""),f(this,"latitude"),f(this,"logo"),f(this,"longitude"),f(this,"name",""),f(this,"operationHours"),f(this,"postal",""),f(this,"slug",""),f(this,"state",""),f(this,"telephone",""),f(this,"tzid",""),f(this,"tzidOverride",""),f(this,"utcOffset",""),f(this,"website",""),f(this,"secureContentStorage",!1),f(this,"defaultLanguage"),f(this,"languages",[]),f(this,"topLocations",[]),f(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),X(this,Pa,e),X(this,Sa,t),Object.assign(this,t)}get metadata(){return nt.addPendingEvent(new ta({venue:this.slug})),g(this,Oa)}set metadata(e){X(this,Oa,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.venue,slug:t.options.venue,limit:1};try{let n=await it(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return te.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==g(this,Qr).isMultiBuilding){let e=g(this,Pa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;g(this,Qr).isMultiBuilding=n}return g(this,Qr).isMultiBuilding}toJSON(){let e={...g(this,Sa)},t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};Sa=new WeakMap,Pa=new WeakMap,Oa=new WeakMap,Qr=new WeakMap,o(Ia,"MappedinVenue");var Zr=Ia;v();var Ca,Aa=class e{constructor(e){f(this,"id",""),W(this,Ca),X(this,Ca,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.themes.slice(),venue:t.options.venue};try{return(await it(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return te.error("Fetch Theme:",e),[]}}toJSON(){return g(this,Ca)}};Ca=new WeakMap,o(Aa,"MappedinTheme");var Ts=Aa;v();var Na,ja=class e{constructor(e){W(this,Na),f(this,"polygons",[]),X(this,Na,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await ei({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return te.error("Fetch Rankings:",e),null}}toJSON(){return g(this,Na)}};Na=new WeakMap,o(ja,"MappedinRankings");var La=ja;v(),v();var Ra,ni,Da,Bg=["name","description"],ti=class e{constructor(e,t){W(this,Ra),W(this,ni),W(this,Da,{}),f(this,"id",""),f(this,"type",""),f(this,"name",""),f(this,"description"),f(this,"image"),f(this,"startDate"),f(this,"endDate"),f(this,"showDate"),X(this,ni,t),X(this,Ra,e),Object.assign(this,t)}location(){let e=g(this,Da).location;if(typeof e<"u")return e;let t,n=g(this,Ra)._locationsById,r=g(this,ni).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return g(this,Da).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Bg)t.events[e][n]=r[e][n]}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.events.slice();null!=(r=t.options.things)&&r.locations&&rt(i,"location");let o={fields:i,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await it(t.options,"event",o)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Events:",e),[]}}toJSON(){let e={...g(this,ni)};for(let t of Bg)e[t]=this[t];return e}};Ra=new WeakMap,ni=new WeakMap,Da=new WeakMap,o(ti,"MappedinEvent");var Fa=ti;v();var za,zg=["name"],ri=class e{constructor(e){W(this,za),f(this,"id",""),f(this,"name",""),f(this,"value",""),X(this,za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of zg)t.locationStates[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.locationStates.slice(),venue:t.options.venue};try{return(await it(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return te.error("Fetch Location States:",e),[]}}toJSON(){let e={...g(this,za)};for(let t of zg)e[t]=this[t];return e}};za=new WeakMap,o(ri,"MappedinLocationState");var Ba=ri;v(),v(),v();var Vg=" ",xt=class e{static get separator(){return Vg}static set separator(e){Vg=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 n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)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}t=Math.abs(t);let i=null,o=null,a=null,s=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),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(r),60==a&&(a=(0).toFixed(r),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(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+"°"+e.separator+a+"′"+e.separator+s+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);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(t*r/360)%r*16/r]}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(xt,"Dms");var ap=xt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Fe=ap,Ze=Math.PI,Pe=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=Fe.wrap90(Number(e)),this._lon=Fe.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Fe.wrap90(Fe.parse(e)):Fe.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?Fe.wrap90(Fe.parse(e)):Fe.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)?Fe.wrap180(Fe.parse(e)):Fe.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?Fe.wrap180(Fe.parse(e)):Fe.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?Fe.wrap180(Fe.parse(e)):Fe.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 n,r;if(2==t.length&&([n,r]=t,n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r)),isNaN(n)||isNaN(r)))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)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=Fe.wrap90(Fe.parse(n)),r=Fe.wrap180(Fe.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,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 r*(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 n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.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 Fe.wrap360(s)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return Fe.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),a=Math.cos(n),s=0,l=Math.sin(n),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)),h=r+Math.atan2(u.y,u.x),d=c.toDegrees(),p=h.toDegrees();return new e(d,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),a=t.lon.toRadians(),s=o-r,l=a-i,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),h=Math.sin((1-n)*c)/Math.sin(c),d=Math.sin(n*c)/Math.sin(c),p=h*Math.cos(r)*Math.cos(i)+d*Math.cos(o)*Math.cos(a),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(a),g=h*Math.sin(r)+d*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),_=y.toDegrees();return new e(m,_)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).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),h=Math.cos(i)-Math.sin(a)*l,d=s+Math.atan2(c,h),p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}static intersection(t,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),a=t.lon.toRadians(),s=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=s-o,d=l-a,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(s)*Math.sin(d/2)*Math.sin(d/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),_=(Math.sin(l-a)>0?2*Ze-y:y)-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(p),w=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(_),Math.cos(_)+Math.cos(m)*b),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(u),-1),1)),E=a+Math.atan2(Math.sin(u)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(M)),x=M.toDegrees(),I=E.toDegrees();return new e(x,I)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(n).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(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).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(r)*Math.sin(s),u=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>l*l+u*u)return null;let h=Math.atan2(-u,l),d=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+h+d,f=(o+h-d).toDegrees(),g=p.toDegrees();return{lon1:Fe.wrap180(f),lon2:Fe.wrap180(g)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,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)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=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(r/2+Ze/4)/Math.tan(n/2+Ze/4)),a=Math.atan2(i,o).toDegrees();return Fe.wrap360(a)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(n).toRadians(),s=t/r,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)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+s*Math.sin(a)/h,p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>Ze&&(r+=2*Ze);let a=(n+i)/2,s=Math.tan(Ze/4+n/2),l=Math.tan(Ze/4+i/2),u=Math.tan(Ze/4+a/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(s))/Math.log(l/s);isFinite(c)||(c=(r+o)/2);let h=a.toDegrees(),d=c.toDegrees();return new e(h,d)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].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(e)&&(o=Math.abs(o)-2*Ze);let a=Math.abs(o*n*n);return r||e.pop(),a;function s(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+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 n=Fe.toLat(this.lat,e,t),r=Fe.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};o(Pe,"LatLonSpherical");var mn,or,qa,ot=Pe,qg=["name","shortName","subtitle"],Bn=class e{constructor(t,n){f(this,"__type",e.__type),W(this,mn),W(this,or,{}),W(this,qa),f(this,"id",""),f(this,"group",""),f(this,"name",""),f(this,"shortName",""),f(this,"elevation",0),f(this,"subtitle"),f(this,"scale",0),f(this,"layers"),f(this,"x_scale"),f(this,"perspectiveId"),f(this,"scene"),f(this,"width",0),f(this,"height",0),f(this,"georeference",[]),f(this,"_scale",0),X(this,mn,t),X(this,qa,n),Object.assign(this,n),this._scale=Gg(this),this.scale=this.x_scale||1/this._scale}static is(t){return t.__type===e.__type}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,mn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,mn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=mt.instances.get(g(this,mn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=g(this,or).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&g(this,mn)._mapGroupsById[t]||null;return g(this,or).mapGroup=n,n}createCoordinateByXY(e,t){return new Pr({x:e,y:t,map:this,mappedin:g(this,mn)})}createCoordinate(e,t){return new Pr({lat:e,lon:t,map:this,mappedin:g(this,mn)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new ot(t.target.x,t.target.y),i=new ot(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,te.warn(t),te.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of qg)t.maps[e][n]=r[e][n]}static async fetch(t){var n,r,i;let a=null==(n=t.options.things)?void 0:n.maps.slice();t.options.perspective&&rt(a,"perspectives"),null!=(r=t.options.things)&&r.mapGroups&&rt(a,"group"),rt(a,"elevation"),rt(a,"x_scale"),rt(a,"scale"),rt(a,"georeference");let s={fields:a,perspective:t.options.perspective,venue:t.options.venue};try{let n=await it(t.options,"map",s),r=o((e=>{let t=l.layers.find((t=>t.id===e));t?t.visible=!0:l.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let o=0,s=n.length;o<s;++o){var l=n[o];if(l){let e=l.perspective;null!=e&&(l.perspectiveId=e.id,a.indexOf("scene")>-1&&(l.scene=e.scene),e.layers?(l.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(r)):l.layers.forEach((e=>{e.visible=!0}))),delete l.perspective}if(t.options.preloadMapGeometry&&null!=(i=l.scene)&&i.polygons&&"string"==typeof l.scene.polygons){let e=await Nn()(l.scene.polygons);l.scene.polygons=await e.json()}n[o]=new e(t,l)}return n}catch(e){return te.error("Fetch Maps:",e),[]}}get center(){if(g(this,or).center)return g(this,or).center;let[e,t]=[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(e,t),{lat:a,lon:s}=this.createCoordinateByXY(n,r),l=new ot(i,o),u=new ot(a,s),c=l.midpointTo(u),h=this.createCoordinate(c.lat,c.lon);return g(this,or).center=h,h}toJSON(){let e={...g(this,qa)};for(let t of qg)e[t]=this[t];let t={};for(let e in this)e.includes("x_")&&(t[e.split("x_")[1]]=this[e]);return e.extra=JSON.stringify(t),e}};mn=new WeakMap,or=new WeakMap,qa=new WeakMap,o(Bn,"MappedinMap"),f(Bn,"__type","MappedinMap");var Va=Bn;v();var Jt,op,sp,rn,ai,Ug,Wg,vn,yn,bn,wn,ii=class e{constructor(t){W(this,Jt),f(this,"__type",e.__type),f(this,"map"),W(this,rn,{}),W(this,ai),W(this,vn),W(this,yn),W(this,bn),W(this,wn);let{map:n,mappedin:r}=t;null!=t.lat&&null!=t.lon&&(X(this,vn,t.lat),X(this,yn,t.lon)),null!=t.x&&null!=t.y&&(X(this,bn,t.x),X(this,wn,t.y)),this.map=n,X(this,ai,r)}static is(t){return t.__type===e.__type}get x(){return Je(this,Jt,sp).call(this,"x")}get y(){return Je(this,Jt,sp).call(this,"y")}get lat(){return Je(this,Jt,op).call(this,"lat")}get lon(){return Je(this,Jt,op).call(this,"lon")}absoluteDistanceTo(e){return Yg([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=g(this,rn).nearestNode;if(typeof e<"u")return e;let t=mt.instances.get(g(this,ai)).findNearestNodeOnMap(this.map.id,this);return g(this,rn).nearestNode=t,t}nodesInRadius(e){if(e<=0)return te.error("Radius must be greater than 0."),[];let t=g(this,rn).radius,n=g(this,rn).nodesInRadius;if(t&&n&&g(this,rn).radius===e)return g(this,rn).nodesInRadius;let r=mt.instances.get(g(this,ai)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return g(this,rn).radius=e,g(this,rn).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Jt=new WeakSet,op=o((function(e){if(typeof g(this,vn)<"u"&&typeof g(this,yn)<"u")return g(this,"lat"===e?vn:yn);if(typeof g(this,bn)<"u"&&typeof g(this,wn)<"u"){let[t,n]=Je(this,Jt,Wg).call(this,g(this,bn),g(this,wn));return X(this,vn,t),X(this,yn,n),g(this,"lat"===e?vn:yn)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),sp=o((function(e){if(g(this,bn)&&g(this,wn))return g(this,"x"===e?bn:wn);if(null!=g(this,vn)&&null!=g(this,yn)){let[t,n]=Je(this,Jt,Ug).call(this,g(this,vn),g(this,yn));return X(this,bn,t),X(this,wn,n),g(this,"x"===e?bn:wn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),rn=new WeakMap,ai=new WeakMap,Ug=o((function(e,t){let n=this.map.georeference[0],r=new ot(n.target.x,n.target.y),i=new ot(e,t),o=r.distanceTo(i),a=(r.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[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Wg=o((function(e,t){let n,r=this.map.georeference[0],i=new ot(r.target.x,r.target.y),o=e-r.control.x,a=r.control.y-t,s=Math.atan2(o,a);n=0===o&&0===a?0:0===o?a/Math.cos(s):o/Math.sin(s);let l=s-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),vn=new WeakMap,yn=new WeakMap,bn=new WeakMap,wn=new WeakMap,o(ii,"MappedinCoordinate"),f(ii,"__type","MappedinCoordinate");var Pr=ii;v();var Ua,oi,Wa,Xg=["name","shortName"],zn=class e{constructor(t,n){f(this,"__type",e.__type),W(this,Ua),W(this,oi),W(this,Wa,{}),f(this,"id",""),f(this,"name",""),X(this,oi,n),X(this,Ua,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get maps(){let e=g(this,Wa).maps;if(typeof e<"u")return e;let t=[],{maps:n}=g(this,Ua),{id:r}=g(this,oi);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return g(this,Wa).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Xg)t.mapGroups[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.mapGroups.slice(),venue:t.options.venue};try{return(await it(t.options,"map-group",r)).map((n=>new e(t,n)))}catch(e){return te.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...g(this,oi)};for(let t of Xg)e[t]=this[t];return e}};Ua=new WeakMap,oi=new WeakMap,Wa=new WeakMap,o(zn,"MappedinMapGroup"),f(zn,"__type","MappedinMapGroup");var Ga=zn;v();var Qg=un(Hg());v(),v();var Or,an,on,up=[0,4,6,8,10],Vn=o((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&0==(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.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],up.map(((e,t)=>n.slice(e,t===up.length-1?void 0:up[t+1]).join(""))).join("-")}),"randomId"),$g="mi-session-data",Kg="mi-local-data",Ya=class e{constructor(){W(this,an),W(this,on);try{let e=sessionStorage.getItem($g);X(this,an,e?JSON.parse(e):{id:Vn()})}catch{X(this,an,{id:Vn()})}try{let e=localStorage.getItem(Kg);X(this,on,e?JSON.parse(e):{deviceId:Vn()})}catch{X(this,on,{deviceId:Vn()})}g(this,an).id||(g(this,an).id=Vn()),g(this,on).deviceId||(g(this,on).deviceId=Vn())}static getInstance(){return g(this,Or)||X(this,Or,new e),g(this,Or)}static ___clearInstance(){X(this,Or,void 0)}saveSessionData(e,t){g(this,an)[e]=t;try{return sessionStorage.setItem($g,JSON.stringify(g(this,an))),!0}catch{return!1}}loadSessionData(e){let t=g(this,an)[e];if(null!=t)return t}saveLocalData(e,t){g(this,on)[e]=t;try{return localStorage.setItem(Kg,JSON.stringify(g(this,on))),!0}catch{return!1}}loadLocalData(e){let t=g(this,on)[e];if(null!=t)return t}};Or=new WeakMap,an=new WeakMap,on=new WeakMap,o(Ya,"SafeStorage"),W(Ya,Or);var Xa=Ya;v();var lp={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],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 Ss(e){return/^[\da-f]{24}$/i.test(e)}function Jg(e,t=!1){let n="";if(null!=e){let r="?",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&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),r="&")}}return n}function hM(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(Jg(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Jg(n)}async function it(e,t,n,r=!1){return ei(e,t,n,r,!0)}async function ei(e,t,n,r=!1,i=!1){let o=hM(e,t,n,r),a=await cp(e,o,r);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function gM(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.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)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function cp(e,t,n=!1){let r=gM(e,t,n),i=await Nn()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function rt(e,t){e.indexOf(t)<0&&e.push(t)}function Yg([e,t],[n,r]){let i=new ot(e,t),o=new ot(n,r);return i.distanceTo(o)}function Gg(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new ot(n.target.x,n.target.y),o=new ot(r.target.x,r.target.y),a=i.distanceTo(o),s=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(s*s+l*l)/a}catch(n){t=1,te.warn(n),te.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Ti(e){var t;return e instanceof Tr?e.entrances.map((e=>e.id)):e instanceof Fn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function Zg(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{te.error(e)}))));await Promise.all(e)}catch(e){te.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function si(e,t,n){let r;return function(...i){let a=this,s=o((function(){r=null,n||e.apply(a,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(s,t),l&&e.apply(a,i)}}function em(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,a=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,a))}function Es(){return Xa.getInstance().loadLocalData("deviceId")}function xs(){return Xa.getInstance().loadSessionData("id")}o(Ss,"isGatewayKey"),o(Jg,"stringifyQuery"),o(hM,"buildUrl"),o(it,"getArray"),o(ei,"getObject"),o(gM,"constructParamsForRequest"),o(cp,"generateAPIRequest"),o(rt,"addToSet"),o(Yg,"getDistanceBetweenLatLon"),o(Gg,"getMapScale"),o(Ti,"getNodesForNavigatable"),o(Zg,"populateBundledImagesAsBlobs"),o(si,"debounce"),o(em,"normalizeCategoryRank"),o(Es,"getDeviceIDFromStorage"),o(xs,"getSessionIDFromStorage");var tm=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 n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function nm(e){var t;let n={...e};for(let[e,r]of Object.entries(lp))n[e]=(0,Qg.default)(r.concat(null!=(t=n[e])?t:[]));return n}function dp(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return rm(this.cover(t,n),t,n,e)}function rm(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,u,c,h,d,p=e._root,f={data:r},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=n>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&n===l)return f.next=p,i?i[h]=f:e._root=f,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(v+m)/2))?v=a:m=a}while((h=c<<1|u)==(d=(l>=a)<<1|s>=o));return i[d]=p,i[h]=f,e}function im(e){var t,n,r,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(a[n]=r,s[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>h&&(h=i));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<o;++n)rm(this,a[n],s[n],e[n]);return this}function pp(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function fp(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function hp(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 lt(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function gp(e,t,n){var r,i,o,a,s,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new lt(g,c,h,d,p)),null==n?n=1/0:(c=e-n,h=t-n,d=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<h))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new lt(g[3],v,y,a,s),new lt(g[2],i,y,v,s),new lt(g[1],v,o,a,y),new lt(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),_=t-+this._y.call(null,g.data),b=m*m+_*_;if(b<n){var w=Math.sqrt(n=b);c=e-w,h=t-w,d=e+w,p=t+w,r=g.data}}return r}function mp(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,u,c,h,d,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[h=c<<1|u]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[d]=p:this._root=p),this):(this._root=i,this)}function am(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function vp(){return this._root}function yp(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function bp(e){var t,n,r,i,o,a,s=[],l=this._root;for(l&&s.push(new lt(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(r+o)/2,c=(i+a)/2;(n=l[3])&&s.push(new lt(n,u,c,o,a)),(n=l[2])&&s.push(new lt(n,r,c,u,a)),(n=l[1])&&s.push(new lt(n,u,i,o,c)),(n=l[0])&&s.push(new lt(n,r,i,u,c))}return this}function wp(e){var t,n=[],r=[];for(this._root&&n.push(new lt(this._root,this._x0,this._y0,this._x1,this._y1));t=n.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,h=(s+u)/2;(o=i[0])&&n.push(new lt(o,a,s,c,h)),(o=i[1])&&n.push(new lt(o,c,s,l,h)),(o=i[2])&&n.push(new lt(o,a,h,c,u)),(o=i[3])&&n.push(new lt(o,c,h,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function om(e){return e[0]}function _p(e){return arguments.length?(this._x=e,this):this._x}function sm(e){return e[1]}function kp(e){return arguments.length?(this._y=e,this):this._y}function ui(e,t,n){var r=new Mp(null==t?om:t,null==n?sm:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Mp(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function um(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}o(nm,"mergeThings"),v(),v(),v(),v(),o(dp,"default"),o(rm,"add"),o(im,"addAll"),v(),o(pp,"default"),v(),o(fp,"default"),v(),o(hp,"default"),v(),v(),o(lt,"default"),o(gp,"default"),v(),o(mp,"default"),o(am,"removeAll"),v(),o(vp,"default"),v(),o(yp,"default"),v(),o(bp,"default"),v(),o(wp,"default"),v(),o(om,"defaultX"),o(_p,"default"),v(),o(sm,"defaultY"),o(kp,"default"),o(ui,"quadtree"),o(Mp,"Quadtree"),o(um,"leaf_copy");var Tt=ui.prototype=Mp.prototype;Tt.copy=function(){var e,t,n=new Mp(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=um(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=um(t));return n},Tt.add=dp,Tt.addAll=im,Tt.cover=pp,Tt.data=fp,Tt.extent=hp,Tt.find=gp,Tt.remove=mp,Tt.removeAll=am,Tt.root=vp,Tt.size=yp,Tt.visit=bp,Tt.visitAfter=wp,Tt.x=_p,Tt.y=kp;var kn,Ke,_n=class e{constructor(e){W(this,kn),f(this,"categories"),f(this,"categoriesByExternalId"),f(this,"locations"),f(this,"locationsByExternalId"),f(this,"vortexes"),f(this,"vortexesByExternalId"),f(this,"maps"),f(this,"mapsByExternalId"),f(this,"nodes"),f(this,"nodesByExternalId"),f(this,"polygons"),f(this,"polygonsByExternalId"),f(this,"events"),f(this,"eventsByExternalId"),f(this,"mapGroups"),f(this,"mapGroupsByExternalId"),f(this,"locationStates"),f(this,"rankings"),f(this,"languages",{}),W(this,Ke,{}),X(this,kn,e)}get polygonsByMapId(){if(g(this,Ke).polygonsByMapId)return g(this,Ke).polygonsByMapId;let e,t={};for(let n=0,r=g(this,kn).polygons.length;n<r;++n)e=g(this,kn).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).polygonsByMapId=n,g(this,Ke).polygonsByMapId}get nodesByMapId(){if(g(this,Ke).nodesByMapId)return g(this,Ke).nodesByMapId;let e,t={};for(let n=0,r=g(this,kn).nodes.length;n<r;++n)e=g(this,kn).nodes[n],e.map&&(t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e));let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).nodesByMapId=n,g(this,Ke).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(g(this,Ke).nodeTreesByMap||(g(this,Ke).nodeTreesByMap=new Map),!g(this,Ke).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=ui();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),g(this,Ke).nodeTreesByMap.set(e,r)}return g(this,Ke).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(g(this,Ke).nodeTreesByMap||(g(this,Ke).nodeTreesByMap=new Map),!g(this,Ke).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=ui();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),g(this,Ke).nodeTreesByMap.set(e,n)}let i=g(this,Ke).nodeTreesByMap.get(e),o=[],a=t.x,s=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-a)**2+(t.y-s)**2)<=n&&o.push(t)}while(e=e.next);let u=a-Math.max(t,Math.min(i,a)),c=s-Math.max(r,Math.min(l,s));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(g(this,Ke).locationsByMapId)return g(this,Ke).locationsByMapId;let e,t={};for(let n=0,r=g(this,kn).locations.length;n<r;++n){e=g(this,kn).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return g(this,Ke).locationsByMapId=n,g(this,Ke).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};kn=new WeakMap,Ke=new WeakMap,o(_n,"MappedinCache"),f(_n,"instances",new WeakMap);var Ep=_n,mt=Ep,Ha={categories:Sr,locations:Fn,vortexes:xa,maps:Va,nodes:va,polygons:Tr,venue:Zr,events:Fa,mapGroups:Ga,themes:Ts,locationStates:Ba,rankings:La};v(),v(),v(),v();var It=6371008.8,lm={centimeters:100*It,centimetres:100*It,degrees:It/111325,feet:3.28084*It,inches:39.37*It,kilometers:It/1e3,kilometres:It/1e3,meters:It,metres:It,miles:It/1609.344,millimeters:1e3*It,millimetres:1e3*It,nauticalmiles:It/1852,radians:1,yards:1.0936*It},JA={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/It,yards:1.0936133};function sr(e,t,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=t||{},r.geometry=e,r}function St(e,t,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(!xp(e[0])||!xp(e[1]))throw new Error("coordinates must contain numbers");return sr({type:"Point",coordinates:e},t,n)}function Gn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return sr({type:"LineString",coordinates:e},t,n)}function Ar(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function cm(e,t){void 0===t&&(t="kilometers");var n=lm[t];if(!n)throw new Error(t+" units is invalid");return e*n}function dm(e,t){void 0===t&&(t="kilometers");var n=lm[t];if(!n)throw new Error(t+" units is invalid");return e/n}function $a(e){return 180*(e%(2*Math.PI))/Math.PI}function jt(e){return e%360*Math.PI/180}function xp(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Os(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=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 _=0,b=0;if(null!==(a=c?u.geometries[m]:u)){l=a.coordinates;var w=a.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,d,y,_,b))return!1;d++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,_,b))return!1;d++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,y,_,b))return!1;d++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,y,_,b))return!1;d++}b++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Os(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Tp(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function mM(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].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,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function Ka(e,t){mM(e,(function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(sr(e,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 l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(sr({type:a,coordinates:u},r),n,l))return!1}}))}function vM(e,t){Ka(e,(function(e,n,r){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===Os(e,(function(o,c,h,d,p){if(void 0===a||n>s||d>l||p>u)return a=o,s=n,l=d,u=p,void(i=0);var f=Gn([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})))return!1}}}))}function pm(e,t,n){var r=n,i=!1;return vM(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function Ip(e){var t=[1/0,1/0,-1/0,-1/0];return Os(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(sr,"feature"),o(St,"point"),o(Gn,"lineString"),o(Ar,"featureCollection"),o(cm,"radiansToLength"),o(dm,"lengthToRadians"),o($a,"radiansToDegrees"),o(jt,"degreesToRadians"),o(xp,"isNumber"),o(Os,"coordEach"),o(Tp,"featureEach"),o(mM,"geomEach"),o(Ka,"flattenEach"),o(vM,"segmentEach"),o(pm,"segmentReduce"),o(Ip,"bbox"),Ip.default=Ip;var As=Ip;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 Vt(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 fm(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function yM(e,t,n){void 0===n&&(n={});var r=Mn(e),i=Mn(t),o=jt(i[1]-r[1]),a=jt(i[0]-r[0]),s=jt(r[1]),l=jt(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return cm(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),o(Mn,"getCoord"),o(Vt,"getCoords"),o(fm,"getType"),o(yM,"distance");var ur=yM;function Cs(e,t){return void 0===t&&(t={}),pm(e,(function(e,n){var r=n.geometry.coordinates;return e+ur(r[0],r[1],t)}),0)}function js(e,t,n){if(void 0===n&&(n={}),!0===n.final)return bM(e,t);var r=Mn(e),i=Mn(t),o=jt(r[0]),a=jt(i[0]),s=jt(r[1]),l=jt(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 $a(Math.atan2(u,c))}function bM(e,t){var n=js(t,e);return n=(n+180)%360}function Ls(e,t,n,r){void 0===r&&(r={});var i=Mn(e),o=jt(i[0]),a=jt(i[1]),s=jt(n),l=dm(t,r.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return St([$a(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),$a(u)],r.properties)}function wM(e){if(!e)throw new Error("geojson is required");var t=[];return Ka(e,(function(e){_M(e,t)})),Ar(t)}function _M(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=Vt(r);break;case"LineString":n=[Vt(r)]}n.forEach((function(n){kM(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function kM(e,t){var n=[];return e.reduce((function(e,r){var i=Gn([e,r],t);return i.bbox=MM(e,r),n.push(i),r})),n}function MM(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}o(Cs,"length"),v(),v(),v(),o(js,"bearing"),o(bM,"calculateFinalBearing"),v(),o(Ls,"destination"),v(),v(),o(wM,"lineSegment"),o(_M,"lineSegmentFeature"),o(kM,"createSegments"),o(MM,"bbox");var Sp=wM,Am=un(Pm(),1);function KM(e,t){var n={},r=[];if("LineString"===e.type&&(e=sr(e)),"LineString"===t.type&&(t=sr(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=Om(e,t);return i&&r.push(i),Ar(r)}var o=(0,Am.default)();return o.load(Sp(t)),Tp(Sp(e),(function(e){Tp(o.search(e),(function(t){var i=Om(e,t);if(i){var o=Vt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Ar(r)}function Om(e,t){var n=Vt(e),r=Vt(t);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],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(a-i)-(c-l)*(s-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((a-i)*(o-u)-(s-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?St([i+p*(a-i),o+p*(s-o)]):null}o(KM,"lineIntersect"),o(Om,"intersects");var Cm=KM;function JM(e,t,n){void 0===n&&(n={});var r=St([1/0,1/0],{dist:1/0}),i=0;return Ka(e,(function(e){for(var o=Vt(e),a=0;a<o.length-1;a++){var s=St(o[a]);s.properties.dist=ur(t,s,n);var l=St(o[a+1]);l.properties.dist=ur(t,l,n);var u=ur(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),h=js(s,l),d=Ls(t,c,h+90,n),p=Ls(t,c,h-90,n),f=Cm(Gn([d.geometry.coordinates,p.geometry.coordinates]),Gn([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=ur(t,g,n),g.properties.location=i+ur(s,g,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=a),i+=u}})),r}o(JM,"nearestPointOnLine");var Qa=JM;function QM(e,t,n){var r=Vt(n);if("LineString"!==fm(n))throw new Error("line must be a LineString");for(var i,o=Qa(n,e),a=Qa(n,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(r[l]);return s.push(i[1].geometry.coordinates),Gn(s,n.properties)}o(QM,"lineSlice");var Vp=QM;function ZM(e,t){void 0===t&&(t={});var n=As(e);return St([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),o(ZM,"center");var jm=ZM;function eE(e,t,n){void 0===n&&(n={});for(var r=Mn(e),i=Vt(t),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")),tE(i[o],i[o+1],r,a,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function tE(e,t,n,r,i){var o=n[0],a=n[1],s=e[0],l=e[1],u=t[0],c=t[1],h=u-s,d=c-l,p=(n[0]-s)*d-(n[1]-l)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(d)?h>0?s<o&&o<=u:u<=o&&o<s:d>0?l<a&&a<=c:c<=a&&a<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?s<=o&&o<u:u<o&&o<=s:d>0?l<=a&&a<c:c<a&&a<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?s<o&&o<u:u<o&&o<s:d>0?l<a&&a<c:c<a&&a<l):Math.abs(h)>=Math.abs(d)?h>0?s<=o&&o<=u:u<=o&&o<=s:d>0?l<=a&&a<=c:c<=a&&a<=l}v(),o(eE,"booleanPointOnLine"),o(tE,"isPointOnLineSegment");var Lm=eE,nE=1e-7,Nm=.005;function qp(e,t){let n=oE(t);return Ar(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=rE(t,o)),e.push(...r),e}),[]))}function rE(e,t){return t.reduce(((e,t)=>{let n={epsilon:nE},r=e.findIndex((e=>Lm(jm(t),e,n))),i=e[r];if(i){let[n,o]=aE(i,t);e.splice(r,1,n,o)}return e}),[e])}function iE(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function aE(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>Qa(e,St(t))));return r.reduce(((t,n)=>{let r=Vp(St(n),i[0],e),o=Vp(St(n),i[1],e),a=Cs(r)<Cs(o)?r:o;return a.properties={...e.properties,entrances:[]},t.concat([a])}),[])}function Fm(e){let t=new Map;for(let n in e){let r=e[n];if(!iE(r))continue;let{altitude:i,color:o,width:a,height:s,opacity:l}=r,u={altitude:i,color:o,width:a,height:s,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function oE(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Rm(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function zm(e){let[t,n,r,i]=As(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function sE(e,t,n){let r=n.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/n.mapScale;return{id:o,georeference:r,name:a,shortName:a,scene:{polygons:t},elevation:s,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}o(qp,"processObstructions"),o(rE,"splitObstructionByAllEntrances"),o(iE,"isPolygonStyle"),o(aE,"splitObstructionByEntrance"),o(Fm,"getStylesMap"),o(oE,"getEntranceMap"),v(),v(),o(Rm,"findMapWithElevationClosestToZero"),v(),o(zm,"getMapExtent"),o(sE,"convertMap");var Up=class{constructor(e){f(this,"mapExtent"),f(this,"stretchRatio"),f(this,"midLat"),f(this,"midLong"),f(this,"mapUnitRatio",1e6),f(this,"latDistance"),f(this,"longDistance"),f(this,"mapScale"),f(this,"widthInMapUnits"),f(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,a=(n+i)/2,s=new ot(o,i),l=new ot(o,n),u=new ot(t,a),c=new ot(r,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};o(Up,"CoordinateConverter");var Ds=Up;function uE(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",a=t.get(o);if(a){let t=a.convert(r.geometry.coordinates),s=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:s,paths:l,...t})}})),n}function lE(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}o(uE,"convertNodes"),o(lE,"convertNodes_MVFv1");var Dm=o(((e,t,n,r,i,o)=>{var a,s,l;let u,c=[],h=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,p=null!=(a=i.ExteriorWalls)?a:d,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/h},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},g={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/h},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let a=t.features[i];if("Point"===a.geometry.type)continue;let d="desk-entrance"===(null==(s=a.properties.kind)?void 0:s.toLowerCase()),p=(d?a.properties.externalId:a.properties.id)||"",v=a.properties.externalId||"",y=n.get(p)||[];if("destinationNodes"in a.properties&&a.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(v,y);else{let n=r.get(a.properties.id),s=a.properties.center?o.convert(a.properties.center):void 0,d=a.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=a.properties.kind||"",_="void"===m.toLowerCase(),b=1-(i+1)/t.features.length*Nm;"LineString"===a.geometry.type&&"wall"===(null==(l=a.properties.kind)?void 0:l.toLowerCase())?(u=a.geometry.coordinates.map((e=>o.convert(e))),a.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=a.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:y,map:e,id:p,externalId:v,layer:m,geometry:{visible:!_,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/h*b},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:s,holes:d}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),Bm=o(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),a=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),s=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.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)*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 cE(e,t,n,r,i,o,a){let s=Dm(e,n,r,i,o,a),l=Dm(e,t,r,i,o,a);return s.concat(l)}function dE(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function pE(e){let t=new Map;return e.features.forEach((e=>{var n,r,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 h=null!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],d=new Set([...h,...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(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function Vm(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function qm(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function Gm(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Gp(e,t,n){let r=qm(e,t);for(let e of r){let t=Gm(e);null==n[t]&&(n[t]={id:t,name:e})}}function Um(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function fE(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return Um(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function Za(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!Um(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=fE(t),a=Vm(e,t);if(null==r[a]){let e={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};r[a]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[a].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[a].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[a].nodes.push(e)}let s=qm(e,t);for(let e of s){let t=Gm(e);r[a].categories.push(t)}}function hE(e,t=new Map){var n,r,i,o,a,s,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],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())&&(Gp("space",t,d),Za("space",t,e,h));let _=new Map;for(let t of y)_.set(t.properties.id,t),t.properties.externalId&&(Gp("entrance",t,d),Za("entrance",t,e,h));let b={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};Za("entrance",b,e,h);for(let n of m){if(Gp("obstruction",n,d),Za("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=_.get(n);t&&Za("entrance",{...t,properties:{...t.properties,externalId:b.properties.externalId}},e,h)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=Vm("obstruction",n);null!=h[e]&&h[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(h),categories:Object.values(d)}}function Wm(e){var t,n,r,i,o,a,s,l,u,c;let h=null!=(t=e.obstruction)?t:[],d=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],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:{},_=null!=(u=e["connection.json"])?u:[],b={},w=new Map,M=[],E=Fm(v),x=new Map,I=new Map;g.forEach((e=>{let t=e.id;t&&!I.has(t)&&I.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!I.has(e))return;let t=qp(h[e],p[e]);if(t.features.length){let n=zm(t),r=new Ds(n);w.set(e,r),b[e]=cE(e,t,d[e],x,E,v,r),M.push(sE(I.get(e),b[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let S=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!S.has(t)&&S.set(t,e)}));let C=Object.values(b).flat(),k=dE(_,S),T=uE(S,w),O=y.features[0],A=O.properties.name,P=O.geometry.coordinates[0],F=O.geometry.coordinates[1],L=(null==(c=Rm(M))?void 0:c.id)||"",{locations:N,categories:R}=hE(e,x);return{polygons:C,venue:{name:A,latitude:F,longitude:P,defaultMap:L},maps:M,vortexes:k,nodes:T,locations:N,mapGroups:[],locationStates:[],categories:R,themes:[],imageBinaries:new Map}}function Ym(e){var t,n,r,i,o,a,s;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},h=null!=(i=e.level)?i:{},d=null!=(o=e["manifest.geojson"])?o:{},p=null!=(a=e.connection)?a:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=qp(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=zm(t),r=new Ds(n);g.set(e,r);let i=Bm(e,u[e],r),o=Bm(e,t,r);f[e]=i.concat(o),y=y.concat(lE(c[e],e,r)),v.push(gE(h[e],f[e],r))}m=m.concat(pE(p[e]))}));let _=Object.values(f).flat(),b=d.features[0],w=b.properties.name,M=b.geometry.coordinates[0],E=b.geometry.coordinates[1],x=(null==(s=v[0])?void 0:s.id)||"",I=new Map;_.forEach((e=>I.set(e.id,e)));let S=[],C=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>I.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),S=e}}return{...e.properties,nodes:S,polygons:e.properties.spaces}})),k=e["category.geojson"].features.map((e=>e.properties));return{polygons:_,venue:{name:w,latitude:E,longitude:M,defaultMap:x},maps:v,vortexes:m,nodes:y,locations:C,mapGroups:[],locationStates:[],categories:k,themes:[],imageBinaries:new Map}}function gE(e,t,n){let r=n.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/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:n.widthInMapUnits,height:n.heightInMapUnits}}o(cE,"convertPolygons"),o(dE,"convertVortexes"),o(pE,"convertVortexes_MVFv1"),o(Vm,"getLocationId"),o(qm,"getFeatureCategories"),o(Gm,"getCategoryIdFromName"),o(Gp,"mutateCategoriesWithNewFeature"),o(Um,"isFeatureConnection"),o(fE,"getLocationLabel"),o(Za,"mutateLocationsWithNewFeature"),o(hE,"createMetaDataFromMVF"),o(Wm,"convertMVFToMappedin"),o(Ym,"convertMVFv1ToMappedin"),o(gE,"convertMap_MVFv1"),v();var fv,Hp,pv,eo,ci,di,to,no,ro,pi,cr,fi,hi,gi,io,mi,Cr,hv=un(dv()),xE=null==(fv=null==R?void 0:R.env)?void 0:fv.npm_package_version,Bs=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke"],Xp=Bs[0],TE=!1,sn=class e{constructor(e){var t;W(this,eo),W(this,ci),W(this,di),W(this,to),W(this,no),W(this,ro),W(this,pi),W(this,cr),W(this,fi),W(this,hi),W(this,gi),W(this,io),W(this,mi),W(this,Cr),X(this,cr,e.clientId),X(this,fi,e.clientSecret),X(this,hi,e.accessToken),X(this,pi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!g(this,pi)&&g(this,cr)&&!Ss(g(this,cr))&&(n="https://web-proxy.mappedin.com/a/"),X(this,di,n),X(this,di,g(this,di)+(e.venue+"/")),X(this,mi,e.venue),X(this,ci,!1),X(this,eo,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),X(this,to,Bs.find((t=>t===e.context))||Bs[0]),X(this,no,Es()),X(this,ro,xs()),X(this,gi,new Set),X(this,io,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=si(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:g(this,ci)};g(this,Cr)&&(n={...n,...g(this,Cr)});let r=g(this,di)+e+"?"+hv.default.stringify(n,{skipEmptyString:!0,skipNull:!0}),i={"mi-context":Xp||g(this,to),"mi-session":this.getSessionID(),"mi-device":this.getDeviceID(),"mappedin-sdk-version":xE,"mappedin-platform-version":g(this,io)};TE&&te.log("Analytics.track",r,i),!g(this,eo)&&(g(this,hi)?i.Authorization="Bearer ".concat(g(this,hi)):g(this,pi)||g(this,fi)&&g(this,cr)&&(i["x-mappedin-key"]=btoa(g(this,cr)),i["x-mappedin-secret"]=btoa(g(this,fi))),Nn()(r,{method:"GET",mode:"cors",headers:i}))}updateAnalyticsUserPosition(e){X(this,Cr,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;nt.addPendingEvent(new Yi({venue:g(this,mi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;nt.addPendingEvent(new Wi({venue:g(this,mi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return Hp||g(this,ro)}static setSessionID(e){Hp=e}static setDeviceID(e){pv=e}static clearSessionID(){Hp=void 0}getDeviceID(){return pv||g(this,no)}setGeolocationMode(e){X(this,ci,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!g(this,gi).has(t)&&(this.track(t),g(this,gi).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=Bs.find((t=>t===e));t&&(Xp=t)}static clearContext(){Xp=void 0}static destroy(){e.instance=null}};eo=new WeakMap,ci=new WeakMap,di=new WeakMap,to=new WeakMap,no=new WeakMap,ro=new WeakMap,pi=new WeakMap,cr=new WeakMap,fi=new WeakMap,hi=new WeakMap,gi=new WeakMap,io=new WeakMap,mi=new WeakMap,Cr=new WeakMap,o(sn,"Analytics"),f(sn,"instance",null),f(sn,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var $p=sn,ao=$p;v();var Kp=class{constructor(){f(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 n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};o(Kp,"PubSub");var zs=Kp,mv={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(kf,"true")}});var Wn,jr,vi,Lr,Jp,vv,Qp=class extends zs{constructor(e){super(),W(this,Lr),f(this,"perspective"),f(this,"things"),f(this,"options"),W(this,Wn),f(this,"updatedAt"),f(this,"categories",[]),f(this,"locations",[]),f(this,"vortexes",[]),f(this,"maps",[]),f(this,"nodes",[]),f(this,"polygons",[]),f(this,"venue",{}),f(this,"events",[]),f(this,"mapGroups",[]),f(this,"themes",[]),f(this,"locationStates",[]),f(this,"rankings"),f(this,"currentLanguage"),W(this,jr,{}),f(this,"_categoriesById"),f(this,"_locationsById"),f(this,"_vortexesById"),f(this,"_mapsById"),f(this,"_nodesById"),f(this,"_polygonsById"),f(this,"_eventsById"),f(this,"_mapGroupsById"),f(this,"_locationStatesById"),f(this,"_locationRankingsById"),f(this,"_rankingsById"),f(this,"_categoriesByExternalId"),f(this,"_locationsByExternalId"),f(this,"_vortexesByExternalId"),f(this,"_mapsByExternalId"),f(this,"_nodesByExternalId"),f(this,"_polygonsByExternalId"),f(this,"_eventsByExternalId"),f(this,"_mapGroupsByExternalId"),f(this,"_locationStatesByExternalId"),f(this,"_locationRankingsByExternalId"),f(this,"_rankingsByExternalId"),W(this,vi),f(this,"changeLanguage",o((async(e,t=!0)=>{var n,r,i,o,a;let s=e.toLowerCase();if((null==(n=this.currentLanguage)?void 0:n.code.toLowerCase())===s)return Promise.resolve();if(null==(r=this.venue.languages)||!r.find((e=>e.code.toLowerCase()===s)))return te.error("Language ".concat(s," not found in venue ").concat(this.venue.slug)),Promise.reject("Language ".concat(s," not found in venue ").concat(this.venue.slug));if(t&&null!=(i=this.currentLanguage)&&i.code&&!g(this,jr)[null==(o=this.currentLanguage)?void 0:o.code]&&(g(this,jr)[null==(a=this.currentLanguage)?void 0:a.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===s)),this.options.language=this.currentLanguage.code,null!=g(this,jr)[s]){let e=JSON.parse(g(this,jr)[s]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}),"changeLanguage")),f(this,"hydrate",o((async(e,t=!1,n=!1)=>{var r,i;let o;if("string"==typeof e)try{o=JSON.parse(e)}catch(e){return void te.error("Unable to parse JSON",e)}else o=e;let a=Object.keys(o);for(let e=0,t=a.length;e<t;++e){let t=a[e],r=o[t],i=Ha[t];null!=i&&"function"==typeof i.hydrate&&(n?"updateInPlace"in i&&"function"==typeof i.updateInPlace&&i.updateInPlace(this,r):this[t]=i.hydrate(r,this))}t&&await Zg(o);let{images:s,scenes:l,imageBinaries:u,options:c}=o;c&&(this.options=c),this.images=s,this.scenes=l,this.imageBinaries=u,n||(mt.clearInstance(this),X(this,Wn,mt.create(this)),this.generateGetters(a)),this.currentLanguage=null!=(r=this.currentLanguage)?r:Ps(this.venue,this.options),this.options.language=null==(i=this.currentLanguage)?void 0:i.code,Je(this,Lr,Jp).call(this),this.initNavigator()}),"hydrate")),f(this,"images"),f(this,"imageBinaries"),f(this,"scenes"),f(this,"analytics"),f(this,"navigator"),f(this,"toJSON",o(((e=!1)=>{var t;let n={};for(let e in Ha)Array.isArray(this[e])&&(n[e]=this[e].map((e=>e.toJSON())));let r={...n,venue:this.venue.toJSON()};return e&&(r.options=this.options),null!=this.rankings&&(r.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete r.locationRankings,r}),"toJSON")),f(this,"toString",o(((e=!1)=>JSON.stringify(this.toJSON(e))),"toString")),this.options=e,X(this,Wn,mt.create(this));let t=ao.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections}}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e="".concat(n,"ByExternalId"),t=g(this,Wn)[e];if(null!=t)return t;let r={};return this[n].forEach((e=>r[e.externalId]=e)),g(this,Wn)[e]=r,r}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=g(this,Wn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),g(this,Wn)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=Wm(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=Ym(e);return this.hydrate(t)}async fetch(e=!1){"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"]),Ss(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);if(r.includes("venue")){let t=Ha.venue,n=Promise.resolve();e?"updateInPlace"in t&&"function"==typeof t.updateInPlace&&(n=t.updateInPlace(this)):n=t.fetch(this).then((e=>{var t;this.venue=e;let n=Ps(e,this.options);return n&&(this.currentLanguage=n,this.options.language=null==(t=this.currentLanguage)?void 0:t.code),Promise.resolve()})),n&&await n,r.splice(r.indexOf("venue"),1)}for(let t=0,i=r.length;t<i;++t){let i=r[t],o=Ha[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(ei(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>X(this,vi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{Je(this,Lr,Jp).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new du({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()))})}};Wn=new WeakMap,jr=new WeakMap,vi=new WeakMap,Lr=new WeakSet,Jp=o((function(){g(this,vi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(g(this,vi)))})),Je(this,Lr,vv).call(this)}),"#transformData"),vv=o((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=tm(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=em(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),o(Qp,"Mappedin");var qn=Qp;function IE(e){var t;if(e.languages)for(let n=0;n<navigator.languages.length;n++){let r=null==(t=e.languages)?void 0:t.find((e=>e.code.toLowerCase()===navigator.languages[n].toLowerCase()));if(r)return r}}function Ps(e,t){var n,r,i,o;let a,s=null==(n=e.languages)?void 0:n.find((e=>e.code.toLowerCase()===t.language));if(s)a=s;else{if(null==(r=t.fallbackToNavigatorLanguages)||r)if(null!=(i=globalThis.navigator)&&i.languages&&(null==(o=globalThis.navigator)?void 0:o.languages.length)>0){let t=IE(e);t&&(a=t)}else te.warn("fallbackToNavigatorLanguage is set however navigator.languages is empty");!a&&e.languages&&(a=e.languages.find((t=>t.code===e.defaultLanguage.code)))}return a}o(IE,"findPreferredLangaugeFromNavigator"),o(Ps,"findPreferredLanguage"),v();var Nr=un(yv());v();var SE=["0","1","2","3","4","5","6","7","8","9"],PE=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],OE=["0","1","2","3","4","5","6","7","8","9"],AE=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],YL=[...SE,...PE,...OE,...AE],bv=["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"];v();var CE=32,Nt=!1,jE=120,tf=0,rf=class{constructor(e){f(this,"_callback"),f(this,"_frameCount"),f(this,"_ordering"),f(this,"_supersededBy"),f(this,"name"),f(this,"_remainingFrameCount"),f(this,"_lastFrameTime"),f(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,Nt&&te.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};o(rf,"FrameUpdate");var Vs=rf,af=class{constructor(e){if(f(this,"_postponed"),f(this,"userdata"),f(this,"_priority"),f(this,"_group"),f(this,"name"),f(this,"_lastFrameTime"),f(this,"_callback"),f(this,"_complete"),f(this,"_scheduled"),f(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,Nt&&te.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};o(af,"FrameTask");var Yn=af,of=class{constructor(e){f(this,"_postponed"),f(this,"_onComplete"),f(this,"_priority"),f(this,"userdata"),f(this,"name"),f(this,"_tasks"),f(this,"_scheduledTasks"),f(this,"_scheduled"),f(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,Nt&&te.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(of,"FrameTaskGroup");var qs=of,sf=class{constructor(e){f(this,"_maxMillisecondsPerFrame"),f(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:CE,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};o(sf,"RealTimeTimer");var nf=sf,uf=class{constructor(e){var t;f(this,"_raf"),f(this,"options"),f(this,"_timer"),f(this,"_performance"),f(this,"_scheduledUpdatesByOrdering"),f(this,"_scheduledTasksByPriority"),f(this,"_postponedTasks"),f(this,"_requestAnimationFrameHandle"),f(this,"_updatesToRunThisFrame"),f(this,"_lastFrameTime",0),f(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new nf,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new yi,this._scheduledTasksByPriority=new yi,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),Nt&&te.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 yi,this._scheduledTasksByPriority=new yi,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),Nt&&te.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 n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;Nt&&(0===tf&&(r=!0),++tf,tf%=jE);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),r&&te.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,r&&te.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 n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&te.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()-n),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,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;te.assert(void 0!==n),Object.getPrototypeOf(n)===qs.prototype&&(r=n,n=r._popTask()),te.assert(void 0!==n),te.assert(Object.getPrototypeOf(n)===Yn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),Nt&&te.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),Nt&&te.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===qs)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,Nt&&te.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),Nt&&te.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)===Yn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),Nt&&te.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)===Yn.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)===Yn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,Nt&&te.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)===Yn.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)===Yn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),Nt&&te.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Yn.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,Nt&&te.log("task priority changed",e.name,t)}};o(uf,"TaskScheduler");var Gs=uf,lf=class{constructor(){f(this,"_map"),f(this,"_size"),f(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(te.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,n={[Symbol.iterator]:()=>n,next:o((()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}),"next")};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return te.assert(e===this._size),e}};o(lf,"Multimap");var yi=lf,Xn=o((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),LE=/([!-/:-@])|(?:[\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 NE(e){return e.split(LE).filter(Boolean)}o(NE,"tokenizeAndCaptureDelimiters");var xn,Qt,dr,Tn,at,so,uo,wi,lo,co,po,fo,_i,Hn,Us,Ws,pr,ho,Ys,Xs,Hs,_v,bi="",FE=.09,RE=1,DE=.025,BE=.5,zE=5e-4,VE=5e-4,qE=.01,GE=.05,wv=1,UE=.01,WE=.2,YE={MappedinCategory:"categories",MappedinLocation:"locations"},XE={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:bv,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===R.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:FE,PRIMARY_INDEX_WEIGHT:RE,SECONDARY_INDEX_WEIGHT:DE,CATEGORY_NAME_WEIGHT:BE,LOCATION_NAME_WEIGHT:wv,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:zE,CATEGORY_LOCATION_TAGS_WEIGHT:VE,CATEGORY_LOCATION_NAME_WEIGHT:qE,PRIMARY_INDEX_TAGS_NAME_WEIGHT:GE,LOCATION_DEFAULT_RANK:wv,RATIO_OF_FUZZY_TO_EXACT:UE,RATIO_OF_PREFIX_TO_EXACT:WE}},cf=class{constructor(e,t){var n;W(this,Hs),W(this,xn),W(this,Qt),W(this,dr),W(this,Tn),W(this,at),W(this,so,new Gs({performance:!0})),W(this,uo),W(this,wi),W(this,lo,new Map),W(this,co),W(this,po),W(this,fo),f(this,"buildIndices",o((()=>{var e,t;X(this,pr,new Promise((e=>{X(this,ho,e)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:a,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:l}=g(this,at).constants,u=["object","query","weight","tag","rank"],c={fields:["query","name","tag"],storeFields:u,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:l},weights:{fuzzy:a,prefix:s},boostDocument:o((e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r),"boostDocument"),tokenize:NE},h={fields:["description"],storeFields:u,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:o(((e,t)=>{var n;return null!=(n=g(this,uo))&&n.has(e.toLowerCase())?null:e.toLowerCase()}),"processTerm")},d={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!=(e=g(this,at))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=g(this,at))?void 0:t.jsonIndex);X(this,Qt,Nr.default.loadJS(e,c)),X(this,dr,Nr.default.loadJS(n,h)),X(this,Tn,Nr.default.loadJS(r,d))}else X(this,Qt,new Nr.default(c)),X(this,dr,new Nr.default(h)),X(this,Tn,new Nr.default(d)),g(this,xn).locations.forEach(g(this,Us)),g(this,xn).categories.forEach(g(this,Ws));g(this,so).update(performance.now())}),"buildIndices")),W(this,_i,0),W(this,Hn,o((e=>{eu(this,_i)._++,g(this,so).scheduleUpdate(new Vs({name:"updateIndex",ordering:0,frameCount:1,callback:o((()=>{try{e()}catch(e){te.warn("faild updating index due to",e)}eu(this,_i)._--,0===g(this,_i)&&g(this,ho).call(this)}),"callback")}))}),"#addTask")),W(this,Us,o((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=g(this,at).constants,s=o;null!=(t=g(this,at))&&t.useLocationRank&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),g(this,Hn).call(this,(()=>{g(this,Qt).add({name:Xn(e.name),tags:"",id:"MappedinLocation#"+e.id,weight:o,rank:s})})),null!=(n=g(this,at))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{g(this,Qt).add({name:"",tag:Xn(t),id:"MappedinLocation#"+e.id,weight:a,rank:s})})),null!=(r=g(this,at))&&r.searchDescriptions&&g(this,Hn).call(this,(()=>g(this,dr).add({description:Xn(e.description||""),id:"MappedinLocation#"+e.id,weight:i,rank:s})))}),"#processLocation")),W(this,Ws,o((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=g(this,at).constants;g(this,Hn).call(this,(()=>g(this,Qt).add({name:Xn(e.name||""),description:"",id:"MappedinCategory#"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+" ".concat(bi," ")+t.name),"")+" ".concat(bi);if(null!=(t=g(this,at))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&g(this,Hn).call(this,(()=>g(this,Tn).add({id:"MappedinCategory#"+e.id,"category.locations.description":Xn(t.description),ref:t.name,weight:r})))})),null!=(n=g(this,at))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(bi," ")+t),""))+" ".concat(bi)}),"");g(this,Hn).call(this,(()=>g(this,Tn).add({"category.locations.tags":Xn(t),id:"MappedinCategory#"+e.id,weight:i})))}g(this,Hn).call(this,(()=>g(this,Tn).add({"category.locations.name":Xn(s),id:"MappedinCategory#"+e.id,weight:o})))}),"#processCategory")),W(this,pr),W(this,ho),W(this,Ys,o((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:a}=e,[s,l]=i.split("#"),u=r||g(this,xn).getCollectionItemById(YE[s],l);return a&&null!=(t=g(this,at))&&t.useLocationRank&&(n+=a),o&&(n*=o),{score:n,type:s,object:u}}),"#processSearchResult")),W(this,Xs,o(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(bi,"]* ")+n+" [^".concat(bi,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),X(this,wi,ao.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),X(this,at,{...XE,...t}),X(this,xn,e),X(this,uo,new Set(null==(n=g(this,at))?void 0:n.stopWords));let r=g(this,xn).venue.slug;g(this,xn).on(0,this.buildIndices),this.buildIndices(),X(this,co,si((e=>{g(this,wi).trackSearchSuggest({query:e}),nt.addPendingEvent(new aa({venue:r}))}),2e3)),X(this,po,si((e=>{g(this,wi).trackSearch({query:e}),nt.addPendingEvent(new ia({venue:r}))}),2e3)),X(this,fo,si((()=>{nt.addPendingEvent(new na({venue:r}))}),2e3)),nt.addPendingEvent(new ra({search_descriptions:g(this,at).searchDescriptions,search_tags:g(this,at).searchTags,search_descriptions_in_categories:g(this,at).searchDescriptionsInCategories,search_tags_in_categories:g(this,at).searchTagsInCategories,use_location_rank:g(this,at).useLocationRank,venue:r}))}async suggest(e){await g(this,pr);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=g(this,at).constants,a=g(this,Qt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return g(this,co).call(this,e),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await g(this,pr);let t=Je(this,Hs,_v).call(this,e);return g(this,po).call(this,e),t}async toJSON(){return await g(this,pr),JSON.stringify({primary:g(this,Qt),secondary:g(this,dr),extra:g(this,Tn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await g(this,pr),t=Fn.is(i)?"MappedinLocation":Sr.is(i)?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"#"+i.id:"string"==typeof i.id?n="Custom#"+i.id:(n=g(this,lo).get(i),n||(n="Custom#"+Vn(),g(this,lo).set(i,n))),g(this,Qt).add({id:n,weight:o,object:i,query:Xn(r)}),g(this,fo).call(this)}destroy(){g(this,xn).off(0,this.buildIndices)}};xn=new WeakMap,Qt=new WeakMap,dr=new WeakMap,Tn=new WeakMap,at=new WeakMap,so=new WeakMap,uo=new WeakMap,wi=new WeakMap,lo=new WeakMap,co=new WeakMap,po=new WeakMap,fo=new WeakMap,_i=new WeakMap,Hn=new WeakMap,Us=new WeakMap,Ws=new WeakMap,pr=new WeakMap,ho=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Hs=new WeakSet,_v=o((function(e){let t=[],n=Xn(e);t=[...g(this,Qt).search(n),...g(this,dr).search(n),...g(this,Tn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=g(this,Ys).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},g(this,Xs).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),o(cf,"OfflineSearch");var oo=cf;v();var df=globalThis.fetch;function Nn(){if(null==df)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return df}function Ev(e){df=e}o(Nn,"isomorphicFetch"),o(Ev,"setFetchFn");var kv,HE=null==(kv=null==R?void 0:R.env)?void 0:kv.npm_package_version;globalThis.btoa||(globalThis.btoa=Mv.encode);var $E=["ar"];function pf(e){var t;let n={...mv,...e};return n.headers={...n.headers,"mappedin-sdk-version":HE},n.things=nm("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}async function ff(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=pf({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new qn({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,nt.addPendingEvent(new Xi({venue:n.venue})),i}o(pf,"parseOptions"),o(ff,"getVenue");var xv={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function hf(e){let t=pf({baseUrl:"https://api-gateway.mappedin.com/",...xv,...e}),{url:n,updated_at:r}=await KE(e),i=await Nn()(n,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new qn(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=r,s}async function KE(e){let t=pf({baseUrl:"https://api-gateway.mappedin.com/",...xv,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&$E.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await cp(t,i)}o(hf,"getVenueBundle"),o(KE,"getVenueBundleURL");var JE=!1;function QE(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"),JE&&e.things.polygons.push("layer","geometry","vertexes")}o(QE,"parseOptions");var ZE=o((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,n){function r(r,i){if(r)n(r);else{let r={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){te.error("Failure in firstMapSelector! Loading default map instead."),te.error(e),n(e)}r.venue=i,t(r)}}o(r,"handleInit"),QE(e.venue),e.venue.useVenueBundle?hf(e.venue).then((e=>r(null,e))).catch((e=>r(e,null))):ff(e.venue).then((e=>r(null,e))).catch((e=>r(e,null)))}))}),"initialize");