@mappedin/mappedin-js 5.30.0 → 5.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/renderer/{GLTFExporter-DEQSEN7W.js → GLTFExporter-E6XJBCL5.js} +1 -1
- package/lib/esm/renderer/{PerformanceController-LQTUIR66.js → PerformanceController-CPAYXKVK.js} +1 -1
- package/lib/esm/renderer/{browser-6JBS3BDJ.js → browser-HGUFUVKK.js} +1 -1
- package/lib/esm/renderer/chunk-ELQY2PFM.js +1 -0
- package/lib/esm/renderer/{chunk-GZCZ637T.js → chunk-JULCUMFX.js} +1 -1
- package/lib/esm/renderer/index.d.ts +6 -22
- package/lib/esm/renderer/index.js +1 -1
- package/lib/esm/renderer/{outdoor-context-2JOJVQ2X.js → outdoor-context-BWFYJL4H.js} +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-RTK5KAPJ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var T,kw=Object.create,Ci=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,Mw=Object.getOwnPropertyNames,xw=Object.getPrototypeOf,Ew=Object.prototype.hasOwnProperty,Tw=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>Ci(e,"name",{value:t,configurable:!0}),Om=(e,t)=>()=>(e&&(t=e(e=0)),t),G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pw=(e,t)=>{for(var n in t)Ci(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Mw(t))!Ew.call(e,i)&&i!==n&&Ci(e,i,{get:()=>t[i],enumerable:!(r=_w(t,i))||r.enumerable});return e},Xt=(e,t,n)=>(n=null!=e?kw(xw(e)):{},Ow(!t&&e&&e.__esModule?n:Ci(n,"default",{value:e,enumerable:!0}),e)),b=(e,t,n)=>(Tw(e,"symbol"!=typeof t?t+"":t,n),n),vl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},w=(e,t,n)=>(vl(e,t,"read from private field"),n?n.call(e):t.get(e)),I=(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)},j=(e,t,n,r)=>(vl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),yl=(e,t,n,r)=>({set _(r){j(e,t,r,n)},get _(){return w(e,t,r)}}),ye=(e,t,n)=>(vl(e,t,"access private method"),n),v=Om((()=>{T={env:{NODE_ENV:"production",npm_package_version:"5.30.0"}}})),Sm=G(((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,h=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="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={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,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=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(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"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)})),Ye=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.distanceConversion={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};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Fi=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),Li=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Ni=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Di=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);if(typeof n>"u"||null===n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),Xo=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=r(Fi());function r(e){return e&&e.__esModule?e:{default:e}}function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),_l=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Li()),n=o(Ni()),r=o(Di()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),xl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Li()),n=o(Ni()),r=o(Di()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),Tl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(Xo()),n=i(_l()),r=i(xl());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),es=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Li()),n=a(Ni()),r=a(Di()),i=a(Tl()),o=a(Xo());function a(e){return e&&e.__esModule?e:{default:e}}function l(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),Et=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=i(Fi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),Tt=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=i(Fi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),Kt=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),sr=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),Bm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(sr()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),v=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),g=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(v)),y=(0,i.default)(g);return(y<o.MINLON||y>o.MAXLON)&&(g=(g+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(g)),{latitude:(0,i.default)(v),longitude:y}}),"computeDestinationPoint");e.default=l})),Vm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),qm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),Um=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),Ym=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(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 i(e,t)}}function i(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}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),Al=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),zn=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(Al()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),Cl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),Km=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Cl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),Qm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Kt()),n=o(Et()),r=o(Tt()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Ll=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Et()),n=r(Tt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),tg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(sr()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,v=h+p,g=(0,r.default)(o.MAXLAT),y=(0,r.default)(o.MINLAT),m=(0,r.default)(o.MAXLON),b=(0,r.default)(o.MINLON);if(f>y&&v<g){var w=Math.asin(Math.sin(p)/Math.cos(h));(a=d-w)<b&&(a+=2*Math.PI),(l=d+w)>m&&(l-=2*Math.PI)}else f=Math.max(f,y),v=Math.min(v,g),a=b,l=m;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(v),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),ig=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),ag=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ll());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Nl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,a))+360)%360}),"getRhumbLineBearing");e.default=a})),lg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Nl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/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"}}),"getCompassDirection");e.default=r})),Rl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(zn()),n=r(Al());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),hg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),mg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),bg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),v=(0,n.default)(e),g=(0,t.default)(o),y=(0,n.default)(o),m=6356752.314245,b=1/298.257223563,w=(0,r.default)(y-v),_=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(g)))),x=Math.sin(_),S=Math.cos(_),k=Math.sin(M),O=Math.cos(M),I=w,E=100;do{var A=Math.sin(I),C=Math.cos(I);if(0===(d=Math.sqrt(O*A*(O*A)+(S*k-x*O*C)*(S*k-x*O*C))))return 0;a=x*k+S*O*C,l=Math.atan2(d,a),h=a-2*x*k/(c=1-(u=S*O*A/d)*u),isNaN(h)&&(h=0);var P=b/16*c*(4+b*(4-3*c));p=I,I=w+(1-P)*b*u*(l+P*d*(h+P*a*(2*h*h-1)))}while(Math.abs(I-p)>1e-12&&--E>0);if(0===E)return NaN;var T=c*(i.earthRadius*i.earthRadius-m*m)/(m*m),j=1+T/16384*(4096+T*(T*(320-175*T)-768)),F=T/1024*(256+T*(T*(74-47*T)-128)),N=F*d*(h+F/4*(a*(2*h*h-1)-F/6*h*(4*d*d-3)*(4*h*h-3))),L=m*j*(l-N);return Math.round(L/s)*s}),"getDistance");e.default=a})),wg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=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}),"getRoughCompassDirection");e.default=t})),kg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),_g=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),xg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Et()),n=r(Tt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),Eg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Rl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),Tg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),Og=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(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 i(e,t)}}function i(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}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=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 n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),Ig=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return g.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return y.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return V.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return U.default}),"get")});var n=q(Bm()),r=q(Vm()),i=q(qm()),o=q(Um()),a=q(Ym()),l=q(Km()),u=q(Qm()),c=q(Ll()),h=q(tg()),d=q(ig()),p=q(ag()),f=q(lg()),g=q(Fi()),y=q(Xo()),m=q(zn()),b=q(Rl()),w=q(hg()),_=q(Et()),M=q(Tt()),x=q(mg()),S=q(bg()),k=q(Nl()),O=q(wg()),I=q(kg()),E=q(Li()),A=q(_g()),C=q(xg()),P=q(Eg()),T=q(Tg()),j=q(Ni()),F=q(Tl()),N=q(_l()),L=q(xl()),R=q(Cl()),D=q(Di()),B=q(es()),z=q(Kt()),V=q(sr()),U=q(Og()),G=Ye();function q(e){return e&&e.__esModule?e:{default:e}}Object.keys(G).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return G[n]}),"get")})})),s(q,"_interopRequireDefault")})),Mc=G(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",v="console",g="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",I="Firefox",E="Google",A="Huawei",C="LG",P="Microsoft",T="Motorola",j="Opera",F="Samsung",N="Sony",L="Xiaomi",R="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"),z=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==U(t).indexOf(U(e))}),"has"),U=s((function(e){return e.toLowerCase()}),"lowerize"),G=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),q=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"),W=s((function(e,t){for(var n,o,s,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(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;h+=2}}),"rgxMapper"),Y=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(V(t[n][i],e))return"?"===n?r:n}else if(V(t[n],e))return"?"===n?r:n;return e}),"strMapper"),X={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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"+k]],[/\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 "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],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,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,I+" 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,U]],[/((?: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/,"",U]],[/(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,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[h,g]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,g]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,g]],[/\((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,A],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,A],[h,g]],[/\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,L],[h,g]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,L],[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,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,g]],[/\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,T],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[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,C],[h,g]],[/(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,g]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,g]],[/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,g]],[/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,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,g]],[/(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,g]],[/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,g]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,g]],[/(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,g]],[/(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,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[u,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,g]],[/\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,g]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,g]],[/\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,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,g]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,g]],[/\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,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,R],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,R],[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,v]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,v]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,v]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[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,q],[u,q],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,E],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,R],[h,b]],[/(quest( 2)?)/i],[u,[d,D],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,g]],[/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,g]],[/(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,Y,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,Y,X]],[/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,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"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=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?B(J,t):J;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,W.call(e,i,s.browser),e.major=G(e.version),e},this.getCPU=function(){var e={};return e[f]=r,W.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,W.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,W.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,W.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?q(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=z([c,p,"major"]),K.CPU=z([f]),K.DEVICE=z([u,d,h,v,g,m,y,b,w]),K.ENGINE=K.OS=z([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof n!==o&&(n.UAParser=K);var H=typeof n!==o&&(n.jQuery||n.Zepto);if(H&&!H.ua){var $=new K;H.ua=$.getResult(),H.ua.get=function(){return $.getUA()},H.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),uy=G(((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]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[i]=S[o]=S[w]=S[a]=S[_]=S[l]=S[u]=S[c]=S[h]=S[d]=S[p]=S[g]=S[y]=S[m]=S[b]=!1;var k="object"==typeof global&&global&&global.Object===Object&&global,O="object"==typeof self&&self&&self.Object===Object&&self,I=k||O||Function("return this")(),E="object"==typeof e&&e&&!e.nodeType&&e,A=E&&"object"==typeof t&&t&&!t.nodeType&&t,C=A&&A.exports===E,P=C&&k.process,T=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),j=T&&T.isTypedArray;function F(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}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 L(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 R(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 z(e,t){return null==e?void 0:e[t]}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(F,"arrayFilter"),s(N,"arrayPush"),s(L,"arraySome"),s(R,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(z,"getValue"),s(V,"mapToArray"),s(U,"overArg"),s(G,"setToArray");var q,W=Array.prototype,Y=Function.prototype,X=Object.prototype,J=I["__core-js_shared__"],K=Y.toString,H=X.hasOwnProperty,$=(q=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=X.toString,Q=RegExp("^"+K.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=C?I.Buffer:void 0,te=I.Symbol,ne=I.Uint8Array,re=X.propertyIsEnumerable,ie=W.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=U(Object.keys,Object),ue=ct(I,"DataView"),ce=ct(I,"Map"),he=ct(I,"Promise"),de=ct(I,"Set"),pe=ct(I,"WeakMap"),fe=ct(Object,"create"),ve=bt(ue),ge=bt(ce),ye=bt(he),me=bt(de),be=bt(pe),we=te?te.prototype:void 0,_e=we?we.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 xe(){this.__data__=fe?fe(null):{},this.size=0}function Se(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ke(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 Oe(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function Ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ee(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 Ce(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 Pe(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function Te(e){return He(this.__data__,e)>-1}function je(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 Fe(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||Ee),string:new Me}}function Le(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Re(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fe;++t<n;)this.add(e[t])}function Ve(e){return this.__data__.set(e,n),this}function Ue(e){return this.__data__.has(e)}function Ge(e){var t=this.__data__=new Ee(e);this.size=t.size}function qe(){this.__data__=new Ee,this.size=0}function We(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ye(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}function Je(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this}function Ke(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&St(e),o=!n&&!r&&!i&&Ct(e),s=n||r||i||o,a=s?R(e.length,String):[],l=a.length;for(var u in e)(t||H.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function He(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function $e(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return At(e)&&Ze(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!At(e)&&!At(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,v=c==h;if(v&&St(e)){if(!St(t))return!1;l=!0,d=!1}if(v&&!d)return a||(a=new Ge),l||Ct(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var g=d&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(g||y){var m=g?e.value():e,b=y?t.value():t;return a||(a=new Ge),s(m,b,n,r,a)}}return!!v&&(a||(a=new Ge),at(e,t,n,r,s,a))}function nt(e){return!(!Et(e)||gt(e))&&(Ot(e)?Q:M).test(bt(e))}function rt(e){return At(e)&&It(e.length)&&!!S[Ze(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 s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new ze:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var v=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==v){if(v)continue;h=!1;break}if(d){if(!L(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 st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return wt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case h:var c=V;case y:var p=1&r;if(c||(c=G),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(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?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=s;++u<l;){var f=e[c=a[u]],v=t[c];if(r)var g=s?r(v,f,c,t,e,o):r(f,v,c,e,t,o);if(!(void 0===g?f===v||i(f,v,n,r,o):g)){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 $e(e,Pt,dt)}function ut(e,t){var n=e.__data__;return vt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=z(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=Z.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Se,"hashDelete"),s(ke,"hashGet"),s(Oe,"hashHas"),s(Ie,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Se,Me.prototype.get=ke,Me.prototype.has=Oe,Me.prototype.set=Ie,s(Ee,"ListCache"),s(Ae,"listCacheClear"),s(Ce,"listCacheDelete"),s(Pe,"listCacheGet"),s(Te,"listCacheHas"),s(je,"listCacheSet"),Ee.prototype.clear=Ae,Ee.prototype.delete=Ce,Ee.prototype.get=Pe,Ee.prototype.has=Te,Ee.prototype.set=je,s(Fe,"MapCache"),s(Ne,"mapCacheClear"),s(Le,"mapCacheDelete"),s(Re,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),Fe.prototype.clear=Ne,Fe.prototype.delete=Le,Fe.prototype.get=Re,Fe.prototype.has=De,Fe.prototype.set=Be,s(ze,"SetCache"),s(Ve,"setCacheAdd"),s(Ue,"setCacheHas"),ze.prototype.add=ze.prototype.push=Ve,ze.prototype.has=Ue,s(Ge,"Stack"),s(qe,"stackClear"),s(We,"stackDelete"),s(Ye,"stackGet"),s(Xe,"stackHas"),s(Je,"stackSet"),Ge.prototype.clear=qe,Ge.prototype.delete=We,Ge.prototype.get=Ye,Ge.prototype.has=Xe,Ge.prototype.set=Je,s(Ke,"arrayLikeKeys"),s(He,"assocIndexOf"),s($e,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),F(se(e),(function(t){return re.call(e,t)})))}:Tt,pt=Ze;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function vt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function gt(e){return!!$&&$ in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function wt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=y||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),n=t==p?e.constructor:void 0,r=n?bt(n):"";if(r)switch(r){case ve:return _;case ge:return h;case ye:return f;case me:return y;case be:return b}return t}),"getTag")),s(ft,"isIndex"),s(vt,"isKeyable"),s(gt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(bt,"toSource"),s(wt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return At(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&It(e.length)&&!Ot(e)}s(xt,"isArrayLike");var St=ae||jt;function kt(e,t){return et(e,t)}function Ot(e){if(!Et(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function It(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Et(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function At(e){return null!=e&&"object"==typeof e}s(kt,"isEqual"),s(Ot,"isFunction"),s(It,"isLength"),s(Et,"isObject"),s(At,"isObjectLike");var Ct=j?D(j):rt;function Pt(e){return xt(e)?Ke(e):it(e)}function Tt(){return[]}function jt(){return!1}s(Pt,"keys"),s(Tt,"stubArray"),s(jt,"stubFalse"),t.exports=kt})),Dy=G(((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 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,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),w=b&&b.isTypedArray;function _(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 x(e){return function(t){return e(t)}}function S(e,t){return null==e?void 0:e[t]}function k(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(S,"getValue"),s(k,"overArg");var O,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=p["__core-js_shared__"],P=E.toString,T=A.hasOwnProperty,j=(O=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",F=A.toString,N=P.call(Object),L=RegExp("^"+P.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,z=R?R.allocUnsafe:void 0,V=k(Object.getPrototypeOf,Object),U=Object.create,G=A.propertyIsEnumerable,q=I.splice,W=D?D.toStringTag:void 0,Y=function(){try{var e=Ye(Object,"defineProperty");return e({},"",{}),e}catch{}}(),X=R?R.isBuffer:void 0,J=Math.max,K=Date.now,H=Ye(p,"Map"),$=Ye(Object,"create"),Z=function(){function e(){}return s(e,"object"),function(t){if(!vt(t))return{};if(U)return U(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__=$?$(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($){var r=t[e];return r===n?void 0:r}return T.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return $?void 0!==t[e]:T.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$&&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 se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():q.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]}function ue(e){return Oe(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Oe(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=We(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return We(this,e).get(e)}function ve(e){return We(this,e).has(e)}function ge(e,t){var n=We(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 be(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function we(e){return this.__data__.get(e)}function _e(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 xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||T.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&a.push(u);return a}function Se(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&Ie(e,t,n)}function ke(e,t,n){var r=e[t];(!T.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&Ie(e,t,n)}function Oe(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function Ie(e,t,n){"__proto__"==t&&Y?Y(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(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ve,"mapCacheHas"),s(ge,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ve,he.prototype.set=ge,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(we,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=we,ye.prototype.has=_e,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Se,"assignMergeValue"),s(ke,"assignValue"),s(Oe,"assocIndexOf"),s(Ie,"baseAssignValue");var Ee=qe();function Ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?Xe(e):tt(e)}function Ce(e){return gt(e)&&Ae(e)==i}function Pe(e){return!(!vt(e)||Ze(e))&&(pt(e)?L:l).test(st(e))}function Te(e){return gt(e)&&ft(e.length)&&!!c[Ae(e)]}function je(e){if(!vt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!T.call(e,r))||n.push(r);return n}function Fe(e,t,n,r,i){e!==t&&Ee(t,(function(o,s){if(i||(i=new ye),vt(o))Ne(e,t,s,n,Fe,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Se(e,s,a)}}),wt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Se(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):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(a)?c=a:ht(a)?c=Ve(a):p?(h=!1,c=De(l,!0)):f?(h=!1,c=ze(l,!0)):c=[]:yt(l)||lt(l)?(c=a,lt(a)?c=bt(a):(!vt(a)||pt(a))&&(c=Je(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Se(e,n,c)}}function Le(e,t){return it(nt(e,t,xt),e+"")}s(Ae,"baseGetTag"),s(Ce,"baseIsArguments"),s(Pe,"baseIsNative"),s(Te,"baseIsTypedArray"),s(je,"baseKeysIn"),s(Fe,"baseMerge"),s(Ne,"baseMergeDeep"),s(Le,"baseRest");var Re=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function De(e,t){if(t)return e.slice();var n=e.length,r=z?z(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 ze(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ve(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ue(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Ie(n,a,l):ke(n,a,l)}return n}function Ge(e){return Le((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&He(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function qe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function We(e,t){var n=e.__data__;return $e(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ye(e,t){var n=S(e,t);return Pe(n)?n:void 0}function Xe(e){var t=T.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch{}var i=F.call(e);return r&&(t?e[W]=n:delete e[W]),i}function Je(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(V(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(!vt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ke(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function $e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!j&&j in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||A)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return F.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),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(ze,"cloneTypedArray"),s(Ve,"copyArray"),s(Ue,"copyObject"),s(Ge,"createAssigner"),s(qe,"createBaseFor"),s(We,"getMapData"),s(Ye,"getNative"),s(Xe,"getRawTag"),s(Je,"initCloneObject"),s(Ke,"isIndex"),s(He,"isIterateeCall"),s($e,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(Re);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 st(e){if(null!=e){try{return P.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Ce(function(){return arguments}())?Ce:function(e){return gt(e)&&T.call(e,"callee")&&!G.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return gt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=X||St;function pt(e){if(!vt(e))return!1;var t=Ae(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 vt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function gt(e){return null!=e&&"object"==typeof e}function yt(e){if(!gt(e)||Ae(e)!=a)return!1;var t=V(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(vt,"isObject"),s(gt,"isObjectLike"),s(yt,"isPlainObject");var mt=w?x(w):Te;function bt(e){return Ue(e,wt(e))}function wt(e){return ct(e)?xe(e,!0):je(e)}s(bt,"toPlainObject"),s(wt,"keysIn");var _t=Ge((function(e,t,n){Fe(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function St(){return!1}s(Mt,"constant"),s(xt,"identity"),s(St,"stubFalse"),t.exports=_t})),Ry=G(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",v="console",g="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",I="Firefox",E="Google",A="Huawei",C="LG",P="Microsoft",T="Motorola",j="Opera",F="Samsung",N="Sharp",L="Sony",R="Xiaomi",D="Zebra",B="Facebook",z=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"),V=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),U=s((function(e,t){return typeof e===l&&-1!==G(t).indexOf(G(e))}),"has"),G=s((function(e){return e.toLowerCase()}),"lowerize"),q=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),W=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),Y=s((function(e,t){for(var n,o,s,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(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;h+=2}}),"rgxMapper"),X=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(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,G]],[/((?: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/,"",G]],[/(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,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[h,g]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/(macintosh);/i],[u,[d,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,A],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,A],[h,g]],[/\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,g]],[/\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,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,g]],[/\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,T],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[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,C],[h,g]],[/(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,g]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,g]],[/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,L],[h,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,L],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,g]],[/(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,g]],[/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,g]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,N],[h,g]],[/(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,g]],[/(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,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[u,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,g]],[/\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,g]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,g]],[/\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,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,g]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,g]],[/\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,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,D],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,D],[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,v]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,v]],[/(playstation [345portablevi]+)/i],[u,[d,L],[h,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,v]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,N],[h,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,L],[h,m]],[/(mitv-\w{5}) bui/i],[u,[d,R],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,W],[u,W],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,E],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,D],[h,b]],[/(quest( 2)?)/i],[u,[d,B],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,g]],[/(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,X,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?z(K,t):K;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,Y.call(e,i,s.browser),e.major=q(e.version),e},this.getCPU=function(){var e={};return e[f]=r,Y.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,Y.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,Y.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,Y.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>350?W(e,350):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.33",H.BROWSER=V([c,p,"major"]),H.CPU=V([f]),H.DEVICE=V([u,d,h,v,g,m,y,b,w]),H.ENGINE=H.OS=V([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof n!==o&&(n.UAParser=H);var $=typeof n!==o&&(n.jQuery||n.Zepto);if($&&!$.ua){var Z=new H;$.ua=Z.getResult(),$.ua.get=function(){return Z.getUA()},$.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"==typeof window?window:e)})),Ky=G(((e,t)=>{"use strict";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")})),gb=G(((e,t)=>{var n,r;v(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=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()}),"r");function i(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 o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(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 u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(v,"p"),s(g,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(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(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=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},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=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},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=v(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=v([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);g(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 o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=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),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=v(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var v=a(e,0,f,this.toBBox),g=a(e,f,n,this.toBBox),y=(i=v,o=g,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),m=h(v)+h(g);y<d?(d=y,r=f,p=m<p?m:p):y===d&&m<p&&(p=m,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=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():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),vh=G((e=>{"use strict";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 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(!k(e[0])||!k(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 s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])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 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 b(e,t){return _(m(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(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 S(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 k(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function O(e){return!!e&&e.constructor===Object}function I(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(!k(e))throw new Error("bbox must only contain numbers")}))}function E(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(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,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(b,"lengthToDegrees"),e.lengthToDegrees=b,s(w,"bearingToAzimuth"),e.bearingToAzimuth=w,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(S,"convertArea"),e.convertArea=S,s(k,"isNumber"),e.isNumber=k,s(O,"isObject"),e.isObject=O,s(I,"validateBBox"),e.validateBBox=I,s(E,"validateId"),e.validateId=E})),bh=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=vh();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,v="FeatureCollection"===f,g="Feature"===f,y=v?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=v?e.features[m].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var w=0,_=0;if(null!==(a=h?c.geometries[b]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,w,_))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,w,_))return!1;p++,"MultiPoint"===M&&w++}"LineString"===M&&w++;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,w,_))return!1;p++}"MultiLineString"===M&&w++,"Polygon"===M&&_++}"Polygon"===M&&w++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,m,w,_))return!1;p++}_++}w++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.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,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),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,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=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,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))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,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,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:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,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 s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var v=t.lineString([l,n],e.properties);if(!1===r(v,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,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,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}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,s=n.geometryIndex||0,a=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 a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=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 a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],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(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(y,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(w,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=w,e.findSegment=b,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Tb=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=bh();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})),Ab=G(((e,t)=>{v();var n=gb(),r=vh(),i=bh(),o=Tb().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})),$h={};function Vh(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function c0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci],(function(e){return nr(Po(e.data[0],e.data[1]))}),0,n)}function Po(e,t){return Sr(e,t||{},0,0)}function Uh(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li],(function(e){return nr(fi(e.data[0],Nh(e.data[1])))}),1,n)}function fi(e,t){return Eo(e,t)}function sO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci,r0,function(){return[Ih]}],(function(e){return nr(Ih(e.data[0],e.data[1]))}),2,n)}function Ih(e,t){t||(t={});var n=ui(),r=e.length;n.p(e);var i=Sr(e,t,zh(t),8),o=i.length;return Dh(i,t),pe(i,o-8,n.d()),pe(i,o-4,r),i}function p0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li,i0,function(){return[Qu]}],(function(e){return nr(Qu(e.data[0]))}),3,n)}function Qu(e,t){return Eo(e.subarray(Rh(e),-8),t||new ie(s0(e)))}function lO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci,a0,function(){return[Ch]}],(function(e){return nr(Ch(e.data[0],e.data[1]))}),4,n)}function Ch(e,t){t||(t={});var n=Lh();n.p(e);var r=Sr(e,t,2,4);return Bh(r,t),pe(r,r.length-4,n.d()),r}function h0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li,o0,function(){return[tl]}],(function(e){return nr(tl(e.data[0],Nh(e.data[1])))}),5,n)}function tl(e,t){return Eo((u0(e),e.subarray(2,-4)),t)}function dO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),31==e[0]&&139==e[1]&&8==e[2]?p0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Uh(e,t,n):h0(e,t,n)}function pO(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Qu(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?fi(e,t):tl(e,t)}function tr(e,t){if(t){for(var n=new ie(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Ub)return Ub.encode(e);var i=e.length,o=new ie(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new ie(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Ft(o,0,a)}function Wh(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(jh)return jh.decode(e);var i=v0(e),o=i[0];return i[1].length&&Y(8),o}function yO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Y(7);var r={};Gh(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){nl((function(){n(e,t)}))}),"cbd");nl((function(){p=n}));var f=s((function(){var e=new ie(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;ii(e,l,i,i.f,i.u,o);var s=30+i.f.length+er(i.extra),h=l+s;e.set(i.c,h),ii(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}Yh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var v=s((function(e){var t=i[e],n=r[t],u=n[0],v=n[1],g=ui(),y=u.length;g.p(u);var m=tr(t),b=m.length,w=v.comment,_=w&&tr(w),M=_&&_.length,x=er(v.extra),S=0==v.level?0:8,k=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=To(v,{size:y,crc:g.d(),c:r,f:m,m:_,u:b!=t.length||_&&w.length!=M,compression:S}),a+=30+b+x+i,l+=76+2*(b+x)+(M||0)+i,--o||f()}}),"cbl");if(b>65535&&k(Y(11,0,1),null),S)if(y<16e4)try{k(null,Po(u,v))}catch(e){k(e,null)}else h.push(c0(u,v,k));else k(null,u)}),"_loop_1"),g=0;g<u;++g)v(g);return d}function bO(e,t){t||(t={});var n={},r=[];Gh(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=tr(s)).length,d=u.comment,p=d&&tr(d),f=p&&p.length,v=er(u.extra);h>65535&&Y(11);var g=c?Po(l,u):l,y=g.length,m=ui();m.p(l),r.push(To(u,{size:l.length,crc:m.d(),c:g,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+v+y,o+=76+2*(h+v)+(f||0)+y}for(var b=new ie(o+22),w=i,_=o-i,M=0;M<r.length;++M){var x=r[M];ii(b,x.o,x,x.f,x.u,x.c.length);var S=30+x.f.length+er(x.extra);b.set(x.c,x.o+S),ii(b,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+S+(x.m?x.m.length:0)}return Yh(b,i,r.length,_,w),b}function MO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Y(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){nl((function(){n(e,t)}))}),"cbd");nl((function(){a=n}));for(var l=e.length-22;101010256!=Le(e,l);--l)if(!l||e.length-l>65558)return a(Y(13,0,1),null),i;var u=ct(e,l+8);if(u){var c=u,h=Le(e,l+16),d=4294967295==h;if(d){if(l=Le(e,l-12),101075792!=Le(e,l))return a(Y(13,0,1),null),i;c=u=Le(e,l+32),h=Le(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=w0(e,h,d),l=n[0],c=n[1],f=n[2],v=n[3],g=n[4],y=n[5],m=b0(e,y);h=g;var b=s((function(e,t){e?(i(),a(e,null)):(t&&(o[v]=t),--u||a(null,o))}),"cbl");if(!p||p({name:v,size:c,originalSize:f,compression:l}))if(l)if(8==l){var w=e.subarray(m,m+c);if(c<32e4)try{b(null,fi(w,new ie(f)))}catch(e){b(e,null)}else r.push(Uh(w,{size:f},b))}else b(Y(14,"unknown compression type "+l,1),null);else b(null,Ft(e,m,m+c));else b(null,null)}),"_loop_3"),v=0;v<c;++v)f(v)}else a(null,{});return i}function xO(e,t){for(var n={},r=e.length-22;101010256!=Le(e,r);--r)(!r||e.length-r>65558)&&Y(13);var i=ct(e,r+8);if(!i)return{};var o=Le(e,r+16),s=4294967295==o;s&&(r=Le(e,r-12),101075792!=Le(e,r)&&Y(13),i=Le(e,r+32),o=Le(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=w0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],v=u[5],g=b0(e,v);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=fi(e.subarray(g,g+h),new ie(d)):Y(14,"unknown compression type "+c):n[p]=Ft(e,g,g+h))}return n}Pw($h,{AsyncCompress:()=>oO,AsyncDecompress:()=>cO,AsyncDeflate:()=>l0,AsyncGunzip:()=>d0,AsyncGzip:()=>oO,AsyncInflate:()=>qh,AsyncUnzipInflate:()=>kO,AsyncUnzlib:()=>f0,AsyncZipDeflate:()=>gO,AsyncZlib:()=>uO,Compress:()=>Sh,DecodeUTF8:()=>fO,Decompress:()=>m0,Deflate:()=>pn,EncodeUTF8:()=>hO,FlateErrorCode:()=>iO,Gunzip:()=>Zu,Gzip:()=>Sh,Inflate:()=>mt,Unzip:()=>_O,UnzipInflate:()=>wO,UnzipPassThrough:()=>_0,Unzlib:()=>el,Zip:()=>vO,ZipDeflate:()=>mO,ZipPassThrough:()=>Mo,Zlib:()=>Ah,compress:()=>sO,compressSync:()=>Ih,decompress:()=>dO,decompressSync:()=>pO,deflate:()=>c0,deflateSync:()=>Po,gunzip:()=>p0,gunzipSync:()=>Qu,gzip:()=>sO,gzipSync:()=>Ih,inflate:()=>Uh,inflateSync:()=>fi,strFromU8:()=>Wh,strToU8:()=>tr,unzip:()=>MO,unzipSync:()=>xO,unzlib:()=>h0,unzlibSync:()=>tl,zip:()=>yO,zipSync:()=>bO,zlib:()=>lO,zlibSync:()=>Ch});var Vb,rO,ie,tt,ai,oi,si,ko,Gb,Wb,Fh,Xu,Yb,$b,Th,_o,Sn,jt,An,ri,ce,Hb,Xb,Kb,Jb,Yu,Ct,$u,xo,Ft,iO,Zb,Y,Eo,dn,ti,Hu,Ku,Ph,ni,Ju,Oh,Qb,In,e0,t0,ui,Lh,Sr,To,qb,Wu,aO,n0,li,ci,r0,i0,a0,o0,nr,Nh,di,Lt,pi,ct,Le,Eh,pe,Dh,Rh,s0,zh,Bh,u0,pn,l0,mt,qh,Sh,oO,Zu,d0,Ah,uO,el,f0,m0,cO,Gh,Ub,jh,g0,v0,fO,hO,y0,b0,w0,k0,er,ii,Yh,Mo,mO,gO,vO,_0,wO,kO,_O,nl,Hh=Om((()=>{for(v(),Vb={},rO=s((function(e,t,n,r,i){var o=new Worker(Vb[t]||(Vb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),ie=Uint8Array,tt=Uint16Array,ai=Uint32Array,oi=new ie([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),si=new ie([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ko=new ie([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gb=s((function(e,t){for(var n=new tt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ai(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Wb=Gb(oi,2),Fh=Wb[0],Xu=Wb[1],Fh[28]=258,Xu[258]=28,Yb=Gb(si,0),$b=Yb[0],Th=Yb[1],_o=new tt(32768),ce=0;ce<32768;++ce)Sn=(61680&(Sn=(52428&(Sn=(43690&ce)>>>1|(21845&ce)<<1))>>>2|(13107&Sn)<<2))>>>4|(3855&Sn)<<4,_o[ce]=((65280&Sn)>>>8|(255&Sn)<<8)>>>1;for(jt=s((function(e,t,n){for(var r=e.length,i=0,o=new tt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new tt(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new tt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[_o[h]>>>l]=u}else for(s=new tt(r),i=0;i<r;++i)e[i]&&(s[i]=_o[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),An=new ie(288),ce=0;ce<144;++ce)An[ce]=8;for(ce=144;ce<256;++ce)An[ce]=9;for(ce=256;ce<280;++ce)An[ce]=7;for(ce=280;ce<288;++ce)An[ce]=8;for(ri=new ie(32),ce=0;ce<32;++ce)ri[ce]=5;Hb=jt(An,9,0),Xb=jt(An,9,1),Kb=jt(ri,5,0),Jb=jt(ri,5,1),Yu=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),Ct=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),$u=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),xo=s((function(e){return(e+7)/8|0}),"shft"),Ft=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?tt:4==e.BYTES_PER_ELEMENT?ai:ie)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),iO={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Zb=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Y=s((function(e,t,n){var r=new Error(t||Zb[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Y),!n)throw r;return r}),"err"),Eo=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ie(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ie(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new ie(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,v=8*r;do{if(!h){l=Ct(e,u,1);var g=Ct(e,u+1,3);if(u+=3,!g){var y=e[(E=xo(u)+4)-4]|e[E-3]<<8,m=E+y;if(m>r){o&&Y(0);break}i&&a(c+y),t.set(e.subarray(E,m),c),n.b=c+=y,n.p=u=8*m,n.f=l;continue}if(1==g)h=Xb,d=Jb,p=9,f=5;else if(2==g){var b=Ct(e,u,31)+257,w=Ct(e,u+10,15)+4,_=b+Ct(e,u+5,31)+1;u+=14;for(var M=new ie(_),x=new ie(19),S=0;S<w;++S)x[ko[S]]=Ct(e,u+3*S,7);u+=3*w;var k=Yu(x),O=(1<<k)-1,I=jt(x,k,1);for(S=0;S<_;){var E,A=I[Ct(e,u,O)];if(u+=15&A,(E=A>>>4)<16)M[S++]=E;else{var C=0,P=0;for(16==E?(P=3+Ct(e,u,3),u+=2,C=M[S-1]):17==E?(P=3+Ct(e,u,7),u+=3):18==E&&(P=11+Ct(e,u,127),u+=7);P--;)M[S++]=C}}var T=M.subarray(0,b),j=M.subarray(b);p=Yu(T),f=Yu(j),h=jt(T,p,1),d=jt(j,f,1)}else Y(1);if(u>v){o&&Y(0);break}}i&&a(c+131072);for(var F=(1<<p)-1,N=(1<<f)-1,L=u;;L=u){var R=(C=h[$u(e,u)&F])>>>4;if((u+=15&C)>v){o&&Y(0);break}if(C||Y(2),R<256)t[c++]=R;else{if(256==R){L=u,h=null;break}var D=R-254;if(R>264){var B=oi[S=R-257];D=Ct(e,u,(1<<B)-1)+Fh[S],u+=B}var z=d[$u(e,u)&N],V=z>>>4;z||Y(3),u+=15&z;j=$b[V];if(V>3){B=si[V];j+=$u(e,u)&(1<<B)-1,u+=B}if(u>v){o&&Y(0);break}i&&a(c+131072);for(var U=c+D;c<U;c+=4)t[c]=t[c-j],t[c+1]=t[c+1-j],t[c+2]=t[c+2-j],t[c+3]=t[c+3-j];c=U}}n.l=h,n.p=L,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Ft(t,0,c)}),"inflt"),dn=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),ti=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),Hu=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[In,0];if(1==i){var s=new ie(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new tt(d+1),f=Ku(n[c-1],p,0);if(f>t){r=0;var v=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;v+=y-(1<<f-p[m]),p[m]=t}for(v>>>=g;v>0;){var b=o[r].s;p[b]<t?v-=1<<t-p[b]++-1:++r}for(;r>=0&&v;--r){var w=o[r].s;p[w]==t&&(--p[w],++v)}f=t}return[new ie(p),f]}),"hTree"),Ku=s((function(e,t,n){return-1==e.s?Math.max(Ku(e.l,t,n+1),Ku(e.r,t,n+1)):t[e.s]=n}),"ln"),Ph=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new tt(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),ni=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),Ju=s((function(e,t,n){var r=n.length,i=xo(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),Oh=s((function(e,t,n,r,i,o,s,a,l,u,c){dn(t,c++,n),++i[256];for(var h=Hu(i,15),d=h[0],p=h[1],f=Hu(o,15),v=f[0],g=f[1],y=Ph(d),m=y[0],b=y[1],w=Ph(v),_=w[0],M=w[1],x=new tt(19),S=0;S<m.length;++S)x[31&m[S]]++;for(S=0;S<_.length;++S)x[31&_[S]]++;for(var k=Hu(x,7),O=k[0],I=k[1],E=19;E>4&&!O[ko[E-1]];--E);var A,C,P,T,j=u+5<<3,F=ni(i,An)+ni(o,ri)+s,N=ni(i,d)+ni(o,v)+s+14+3*E+ni(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(j<=F&&j<=N)return Ju(t,c,e.subarray(l,l+u));if(dn(t,c,1+(N<F)),c+=2,N<F){A=jt(d,p,0),C=d,P=jt(v,g,0),T=v;var L=jt(O,I,0);dn(t,c,b-257),dn(t,c+5,M-1),dn(t,c+10,E-4),c+=14;for(S=0;S<E;++S)dn(t,c+3*S,O[ko[S]]);c+=3*E;for(var R=[m,_],D=0;D<2;++D){var B=R[D];for(S=0;S<B.length;++S){var z=31&B[S];dn(t,c,L[z]),c+=O[z],z>15&&(dn(t,c,B[S]>>>5&127),c+=B[S]>>>12)}}}else A=Hb,C=An,P=Kb,T=ri;for(S=0;S<a;++S)if(r[S]>255){z=r[S]>>>18&31;ti(t,c,A[z+257]),c+=C[z+257],z>7&&(dn(t,c,r[S]>>>23&31),c+=oi[z]);var V=31&r[S];ti(t,c,P[V]),c+=T[V],V>3&&(ti(t,c,r[S]>>>5&8191),c+=si[V])}else ti(t,c,A[r[S]]),c+=C[r[S]];return ti(t,c,A[256]),c+C[256]}),"wblk"),Qb=new ai([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),In=new ie(0),e0=s((function(e,t,n,r,i,o){var a=e.length,l=new ie(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=Ju(u,c+1,e.subarray(h,d))}else{for(var p=Qb[t-1],f=p>>>13,v=8191&p,g=(1<<n)-1,y=new tt(32768),m=new tt(g+1),b=Math.ceil(n/3),w=2*b,_=s((function(t){return(e[t]^e[t+1]<<b^e[t+2]<<w)&g}),"hsh"),M=new ai(25e3),x=new tt(288),S=new tt(32),k=0,O=0,I=(h=0,0),E=0,A=0;h<a;++h){var C=_(h),P=32767&h,T=m[C];if(y[P]=T,m[C]=P,E<=h){var j=a-h;if((k>7e3||I>24576)&&j>423){c=Oh(e,u,0,M,x,S,O,I,A,h-A,c),I=k=O=0,A=h;for(var F=0;F<286;++F)x[F]=0;for(F=0;F<30;++F)S[F]=0}var N=2,L=0,R=v,D=P-T&32767;if(j>2&&C==_(h-D))for(var B=Math.min(f,j)-1,z=Math.min(32767,h),V=Math.min(258,j);D<=z&&--R&&P!=T;){if(e[h+N]==e[h+N-D]){for(var U=0;U<V&&e[h+U]==e[h+U-D];++U);if(U>N){if(N=U,L=D,U>B)break;var G=Math.min(D,U-2),q=0;for(F=0;F<G;++F){var W=h-D+F+32768&32767,Y=W-y[W]+32768&32767;Y>q&&(q=Y,T=W)}}}D+=(P=T)-(T=y[P])+32768&32767}if(L){M[I++]=268435456|Xu[N]<<18|Th[L];var X=31&Xu[N],J=31&Th[L];O+=oi[X]+si[J],++x[257+X],++S[J],E=h+N,++k}else M[I++]=e[h],++x[e[h]]}}c=Oh(e,u,o,M,x,S,O,I,A,h-A,c),!o&&7&c&&(c=Ju(u,c+1,In))}return Ft(l,0,r+xo(c)+i)}),"dflt"),t0=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ui=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=t0[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),Lh=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),Sr=s((function(e,t,n,r,i){return e0(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),To=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),qb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Wu=[],aO=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),n0=s((function(e,t,n,r){var i;if(!Wu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=qb(e[l],o,s))[0],s=i[1];Wu[n]=qb(e[a],o,s)}var u=To({},Wu[n][1]);return rO(Wu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,aO(u),r)}),"wrkr"),li=s((function(){return[ie,tt,ai,oi,si,ko,Fh,$b,Xb,Jb,_o,Zb,jt,Yu,Ct,$u,xo,Ft,Y,Eo,fi,nr,Nh]}),"bInflt"),ci=s((function(){return[ie,tt,ai,oi,si,ko,Xu,Th,Hb,An,Kb,ri,_o,Qb,In,jt,dn,ti,Hu,Ku,Ph,ni,Ju,Oh,xo,Ft,e0,Sr,Po,nr]}),"bDflt"),r0=s((function(){return[Dh,zh,pe,ui,t0]}),"gze"),i0=s((function(){return[Rh,s0]}),"guze"),a0=s((function(){return[Bh,pe,Lh]}),"zle"),o0=s((function(){return[u0]}),"zule"),nr=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),Nh=s((function(e){return e&&e.size&&new ie(e.size)}),"gu8"),di=s((function(e,t,n,r,i,o){var s=n0(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),Lt=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),pi=s((function(e,t,n,r,i){var o,s=n0(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||Y(5),o&&t.ondata(Y(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),ct=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Le=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),Eh=s((function(e,t){return Le(e,t)+4294967296*Le(e,t+4)}),"b8"),pe=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),Dh=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Rh=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&Y(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),s0=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),zh=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),Bh=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),u0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&Y(6,"invalid zlib data"),32&e[1]&&Y(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Vh,"AsyncCmpStrm"),pn=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(Sr(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.d&&Y(4),this.d=t,this.p(e,t||!1)},e}(),l0=function(){function e(e,t){pi([ci,function(){return[Lt,pn]}],this,Vh.call(this,e,t),(function(e){var t=new pn(e.data);onmessage=Lt(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(c0,"deflate"),s(Po,"deflateSync"),mt=function(){function e(e){this.s={},this.p=new ie(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||Y(5),this.d&&Y(4);var t=this.p.length,n=new ie(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=Eo(this.p,this.o,this.s);this.ondata(Ft(n,t,this.s.b),this.d),this.o=Ft(n,this.s.b-32768),this.s.b=this.o.length,this.p=Ft(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),qh=function(){function e(e){this.ondata=e,pi([li,function(){return[Lt,mt]}],this,0,(function(){var e=new mt;onmessage=Lt(e)}),7)}return s(e,"AsyncInflate"),e}(),s(Uh,"inflate"),s(fi,"inflateSync"),Sh=function(){function e(e,t){this.c=ui(),this.l=0,this.v=1,pn.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){pn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=Sr(e,this.o,this.v&&zh(this.o),t&&8,!t);this.v&&(Dh(n,this.o),this.v=0),t&&(pe(n,n.length-8,this.c.d()),pe(n,n.length-4,this.l)),this.ondata(n,t)},e}(),oO=function(){function e(e,t){pi([ci,r0,function(){return[Lt,pn,Sh]}],this,Vh.call(this,e,t),(function(e){var t=new Sh(e.data);onmessage=Lt(t)}),8)}return s(e,"AsyncGzip"),e}(),s(sO,"gzip"),s(Ih,"gzipSync"),Zu=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){var n=this.p.length>3?Rh(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&Y(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),mt.prototype.c.call(this,t)},e}(),d0=function(){function e(e){this.ondata=e,pi([li,i0,function(){return[Lt,mt,Zu]}],this,0,(function(){var e=new Zu;onmessage=Lt(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(p0,"gunzip"),s(Qu,"gunzipSync"),Ah=function(){function e(e,t){this.c=Lh(),this.v=1,pn.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){pn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=Sr(e,this.o,this.v&&2,t&&4,!t);this.v&&(Bh(n,this.o),this.v=0),t&&pe(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),uO=function(){function e(e,t){pi([ci,a0,function(){return[Lt,pn,Ah]}],this,Vh.call(this,e,t),(function(e){var t=new Ah(e.data);onmessage=Lt(t)}),10)}return s(e,"AsyncZlib"),e}(),s(lO,"zlib"),s(Ch,"zlibSync"),el=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&Y(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),mt.prototype.c.call(this,t)},e}(),f0=function(){function e(e){this.ondata=e,pi([li,o0,function(){return[Lt,mt,el]}],this,0,(function(){var e=new el;onmessage=Lt(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(h0,"unzlib"),s(tl,"unzlibSync"),m0=function(){function e(e){this.G=Zu,this.I=mt,this.Z=el,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||Y(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new ie(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},e}(),cO=function(){function e(e){this.G=d0,this.I=qh,this.Z=f0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){m0.prototype.push.call(this,e,t)},e}(),s(dO,"decompress"),s(pO,"decompressSync"),Gh=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=To(r,o[1]),o=o[0]),o instanceof ie?n[s]=[o,a]:(n[s+="/"]=[new ie(0),a],Gh(o,s,n,r))}}),"fltn"),Ub=typeof TextEncoder<"u"&&new TextEncoder,jh=typeof TextDecoder<"u"&&new TextDecoder,g0=0;try{jh.decode(In,{stream:!0}),g0=1}catch{}v0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Ft(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),fO=function(){function e(e){this.ondata=e,g0?this.t=new TextDecoder:this.p=In}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||Y(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&Y(8),this.t=null));this.p||Y(4);var n=new ie(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=v0(n),i=r[0],o=r[1];t?(o.length&&Y(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),hO=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||Y(5),this.d&&Y(4),this.ondata(tr(e),this.d=t||!1)},e}(),s(tr,"strToU8"),s(Wh,"strFromU8"),y0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),b0=s((function(e,t){return t+30+ct(e,t+26)+ct(e,t+28)}),"slzh"),w0=s((function(e,t,n){var r=ct(e,t+28),i=Wh(e.subarray(t+46,t+46+r),!(2048&ct(e,t+8))),o=t+46+r,s=Le(e,t+20),a=n&&4294967295==s?k0(e,o):[s,Le(e,t+24),Le(e,t+42)],l=a[0],u=a[1],c=a[2];return[ct(e,t+10),l,u,i,o+ct(e,t+30)+ct(e,t+32),c]}),"zh"),k0=s((function(e,t){for(;1!=ct(e,t);t+=4+ct(e,t+2));return[Eh(e,t+12),Eh(e,t+4),Eh(e,t+20)]}),"z64e"),er=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Y(9),t+=r+4}return t}),"exfl"),ii=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=er(u);pe(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&Y(10),pe(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(pe(e,t,n.crc),pe(e,t+4,o),pe(e,t+8,n.size)),pe(e,t+12,l),pe(e,t+14,h),t+=16,null!=s&&(pe(e,t,c),pe(e,t+6,n.attrs),pe(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var v=u[f],g=v.length;pe(e,t,+f),pe(e,t+2,g),e.set(v,t+4),t+=4+g}return c&&(e.set(a,t),t+=c),t}),"wzh"),Yh=s((function(e,t,n,r,i){pe(e,t,101010256),pe(e,t+8,n),pe(e,t+10,n),pe(e,t+12,r),pe(e,t+16,i)}),"wzf"),Mo=function(){function e(e){this.filename=e,this.c=ui(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),mO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new pn(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=y0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),gO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new l0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=y0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),vO=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||Y(5),2&this.d)this.ondata(Y(4+8*(1&this.d),0,1),null,!1);else{var n=tr(e.filename),r=n.length,i=e.comment,o=i&&tr(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+er(e.extra)+30;r>65535&&this.ondata(Y(11,0,1),null,!1);var u=new ie(l);ii(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=To(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),v=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(v+=r.length,c.push(r),i){var o=new ie(16);pe(o,0,134695760),pe(o,4,e.crc),pe(o,8,v),pe(o,12,e.size),c.push(o),f.c=v,f.b=l+v+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(Y(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+er(l.extra)+(l.o?l.o.length:0)}for(var o=new ie(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];ii(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+er(l.extra)+(l.o?l.o.length:0),t+=l.b}Yh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(yO,"zip"),s(bO,"zipSync"),_0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),wO=function(){function e(){var e=this;this.i=new mt((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),kO=function(){function e(e,t){var n=this;t<32e4?this.i=new mt((function(e,t){n.ondata(null,e,t)})):(this.i=new qh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Ft(e,0)),this.i.push(e,t)},e.compression=8,e}(),_O=function(){function e(e){this.onfile=e,this.k=[],this.o={0:_0},this.p=In}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||Y(5),this.p||Y(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new ie(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Le(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=ct(u,a+6),i=ct(u,a+8),s=2048&r,d=8&r,p=ct(u,a+26),v=ct(u,a+28);if(c>a+30+p+v){var g=[];f.k.unshift(g),o=2;var y=Le(u,a+18),m=Le(u,a+22),b=Wh(u.subarray(a+30,a+=30+p),!s);4294967295==y?(e=d?[-2]:k0(u,a),y=e[0],m=e[1]):d&&(y=-1),a+=v,f.c=y;var w,_={name:b,compression:i,start:function(){if(_.ondata||Y(5),y){var e=n.o[i];e||_.ondata(Y(14,"unknown compression type "+i,1),null,!1),(w=y<0?new e(b):new e(b,y,m)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var o=r[t];w.push(o,!1)}n.k[0]==g&&n.c?n.d=w:w.push(In,!0)}else _.ondata(null,In,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};y>=0&&(_.size=y,_.originalSize=m),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=In,h<0){var v=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Le(u,l-16)&&4)):u.subarray(0,a);d?d.push(v,!!o):this.k[+(2==o)].push(v)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&Y(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),nl="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(MO,"unzip"),s(xO,"unzipSync")})),N0=G(((e,t)=>{"use strict";v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),V0=G(((e,t)=>{"use strict";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)}}})),U0=G(((e,t)=>{"use strict";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)]}})),W0=G(((e,t)=>{"use strict";v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),Q0=G((e=>{"use strict";v();var t=N0(),n=V0(),r=U0(),i=W0(),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,[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 s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};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 b(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,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,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(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(y,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=y,e.parse=b,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?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:b(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(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]?h(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)}}));v();var bw=Xt(Sm());v(),v(),v();var Cg=Xt(Ig());v();var Ul=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(b(this,"origin"),b(this,"destination"),b(this,"vortex"),b(this,"distance"),b(this,"angle"),b(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=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+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(Ul,"Edge");var ql=Ul,ur=ql;v();var Ag="mi-debug",sx={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},R=sx;function ux(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,Cg.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 R.error(e),1}}function Us(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(ux,"getMapScale"),s(Us,"getAngle");var Yl=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){b(this,"edges"),b(this,"nodesById"),b(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:ux(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 ur({angle:Us(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,s=Math.abs(i-o);this.edges[n.id].push(new ur({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new ur({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i}){let o=e.map((e=>this.nodesById[e])).filter((e=>e)),s=t.map((e=>this.nodesById[e])).filter((e=>e));if(0===o.length||0===s.length)return[];let a=[],l={},u={};for(o.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);a.push({origin:e,priority:t}),l[e.id]=null,u[e.id]=0})),a.sort(((e,t)=>e.priority-t.priority));a.length>0;){let e=a[0];if(s.includes(e.origin)){let t=[],n=l[e.origin.id];for(;null!=n;){t.push(n);let e=l[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let o=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,c=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id));if(n&&o||c)continue;let h=u[e.origin.id]+t.weight;if(null==u[t.destination.id]||h<u[t.destination.id]){u[t.destination.id]=h;let e=h+this.getShortestEuclideanDistance(t.destination,s);a.push({origin:t.destination,priority:e}),l[t.destination.id]=t}}a.splice(0,1),a.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(Yl,"NavigationGraph");var Gl=Yl,Wl=Gl;function lx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),s(lx,"vortexDirectionTest");var Hl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){b(this,"node"),b(this,"instruction"),b(this,"action"),b(this,"atLocation"),b(this,"type"),b(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(lx(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(Hl,"Directive");var $l=Hl,Bn=$l;function Xl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function jg(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 Fg(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=jg(e,t,-r),s=jg(e,t,r);if(Xl(o[0],o[1],n[0],n[1])||Xl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Xl(e,t,n[0],n[1]))return void(i=!1)})),i}v(),s(Xl,"getLineIntersection"),s(jg,"getOffsetLine"),s(Fg,"hasLineOfSight");var Gs=.1*Math.PI;function Ws(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ws,"differenceBetweenAngles");var Zl=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){b(this,"graph"),b(this,"locationsByNodeId"),b(this,"geometryEdgesByMapId",new Map),this.graph=new Wl({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=>{this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),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],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-Ws(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-Ws(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,simplify:a}){var l,u,c;let h=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s});if(0===h.length)return{distance:0,instructions:[new Bn({distance:0,instruction:"No Valid Path Available"})],path:[]};let d=0,p=[],f=[];if(null!=a&&a.enabled){let e=null!=(l=null==a?void 0:a.bufferRadius)?l: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!=(u=this.geometryEdgesByMapId.get(h[n-1].origin.map))?u:[];f.push(...this.simplifySteps(t,r,e)),t=[h[n]]}t.push(h[n])}let n=h[h.length-1],r=null!=(c=this.geometryEdgesByMapId.get(n.origin.map))?c:[];f.push(...this.simplifySteps(t,r,e)),h=f}for(let e=0;e<h.length;e++)p.push(h[e].origin);p.push(h[h.length-1].destination);let v=[],g=null,y=null,m=0,b=0;for(let e=0;e<h.length;e++){let t=h[e],n=t.origin,o=t.destination;if(d+=t.distance,m+=(null==y?void 0:y.distance)||0,0===e&&v.push(new Bn({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 Bn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:m,origin:n})),b+=m,m=0}else if(null!=g&&null!=y)if(null!=y.vortex){let e=this.graph.mapsById[g.map],t=this.graph.mapsById[y.destination.map];v.push(new Bn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:y.vortex,distance:m,origin:n})),b+=m,m=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==g&&e.destination!==t.destination));if(e.length>0){let r=-Ws(y.angle,t.angle),i=e.reduce(((e,n)=>{let r=-Ws(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Gs||Math.abs(i)<=Gs){let e;e=r<=-Math.PI/4?"Right":r<=-Gs?"SlightRight":r<=Gs?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(y,.5*Math.PI,10)),null!=t){let r=new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:m,origin:n});r.type=e,v.push(r)}else v.push(new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:m,origin:n}));b+=m,m=0}}}e===h.length-1&&(v.push(new Bn({action:{type:"Arrival"},atLocation:i,distance:d-b<0?0:d-b,origin:t.destination})),b+=m,m=0),g=n,y=t}let w=[],_=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(_=t.node,w.unshift(t)):n&&"Turn"===n.type&&null!=_?this.graph.getDistance(t.node,_)>5&&w.unshift(t):w.unshift(t)}return{distance:d,instructions:w,path:p}}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(!Fg(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new ur({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Us(e[i].origin,e[t].origin)})),i=t}return r.push(new ur({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Us(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Zl,"Navigator");var Kl=Zl,Jl=Kl;v(),v();var yn,Vi,Ql,Ys,Ng,ec=class{constructor(e){I(this,Vi),I(this,Ys),I(this,yn,void 0),j(this,yn,e)}directionsTo(e,t){let n=w(this,yn).analytics;return e instanceof Ot?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),ye(this,Ys,Ng).call(this,e,t)):(n.getDirections(this,e),ye(this,Vi,Ql).call(this,e,t))}distanceTo(e,t){let n=ye(this,Vi,Ql).call(this,e,t);return(null==n?void 0:n.distance)||0}};yn=new WeakMap,Vi=new WeakSet,Ql=s((function(e,t){let n=Bi(this),r=Bi(e),i=w(this,yn).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,simplify:null==t?void 0:t.simplify});return new lr(w(this,yn),i)}),"#directionsToSingleDestination"),Ys=new WeakSet,Ng=s((function(e,t){let n,r=[],i=Bi(this);for(let o=0;o<e.destinations.length;o++){n=Bi(e.destinations[o]);let s=w(this,yn).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}),a=new lr(w(this,yn),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(ec,"MappedinNavigatable");var Jt=ec;v(),v(),v(),v(),v();var tc=s((function(e,t){return(tc=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");function Vn(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}tc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(Vn,"__extends");var le=s((function(){return le=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"),le.apply(this,arguments)}),"__assign");function be(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 we(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Dg(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 Rg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(be,"__awaiter"),s(we,"__generator"),s(Dg,"__values"),s(Rg,"__read"),v(),v(),v();var qn,Ge,bn,Un,rt,pt,_e,Lr,ke=s((function(){return ke=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"),ke.apply(this,arguments)}),"__assign");function zg(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 Te(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 Pe(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Zt(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 nt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}function zt(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))}s(zg,"__rest"),s(Te,"__awaiter"),s(Pe,"__generator"),s(Zt,"__values"),s(nt,"__read"),s(zt,"__spreadArray"),v(),v(),v(),function(e){e.US="US",e.EU="EU"}(qn||(qn={})),v(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Ge||(Ge={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(bn||(bn={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Un||(Un={})),v(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(rt||(rt={})),v(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(pt||(pt={})),v(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(_e||(_e={})),v(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Lr||(Lr={})),v(),v();var nc="-",qi="AMP",Bg="".concat(qi,"_unsent"),rc="https://api2.amplitude.com/2/httpapi",Vg="https://api.eu.amplitude.com/2/httpapi",qg="https://api2.amplitude.com/batch",Ug="https://api.eu.amplitude.com/batch";v();var dx=1e3,$s=s((function(e){if(Object.keys(e).length>dx)return!1;for(var t in e){var n=e[t];if(!ic(t,n))return!1}return!0}),"isValidObject"),ic=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Zt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&$s(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return $s(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),Bt=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return ke({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Ge.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Ge.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Ge.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Ge.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Ge.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Ge.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Ge.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Ge.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Ge.UNSET,e,nc),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Ge.CLEAR_ALL]=nc,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,n){return void 0===this._properties[Ge.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Ge.ADD?"number"==typeof n:e===Ge.UNSET||e===Ge.REMOVE||ic(t,n))},e}(),Gg=s((function(e,t,n){return ke(ke(ke({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Ui=s((function(e,t){return ke(ke({},t),{event_type:Un.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),Wg=s((function(e,t,n,r){var i;return ke(ke({},r),{event_type:Un.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Yg=s((function(e,t,n){var r,i=new Bt;return i.set(e,t),ke(ke({},n),{event_type:Un.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),$g=s((function(e,t){return ke(ke({},t),{event_type:Un.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");v(),v();var Gn=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=_e.Unknown),{event:e,code:t,message:n}}),"buildResult"),Hg=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return Te(this,void 0,void 0,(function(){return Pe(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.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 Te(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m;return Pe(this,(function(b){switch(b.label){case 0:if(!e)return[2];t=nt(e,1),n=t[0],r=nt(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===pt.BEFORE})),b.label=1;case 1:b.trys.push([1,6,7,8]),s=Zt(o),a=s.next(),b.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(ke({},n))];case 3:n=b.sent(),b.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),v={error:l},[3,8];case 7:try{a&&!a.done&&(g=s.return)&&g.call(s)}finally{if(v)throw v.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===pt.ENRICHMENT})),b.label=9;case 9:b.trys.push([9,14,15,16]),c=Zt(u),h=c.next(),b.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(ke({},n))];case 11:n=b.sent(),b.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=b.sent(),y={error:d},[3,16];case 15:try{h&&!h.done&&(m=c.return)&&m.call(c)}finally{if(y)throw y.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),f=p.map((function(e){var t=ke({},n);return e.execute(t).catch((function(e){return Gn(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=nt(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return Te(this,void 0,void 0,(function(){var e,t,n,r=this;return Pe(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();v();var Xg="Event tracked successfully",Kg="Unexpected error occurred",Jg="Event rejected due to exceeded retry count",Zg="Event skipped due to optOut config",Qg="Event rejected due to missing API key",ev="Invalid API key",tv="Client not initialized",ac=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 Hg,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return Te(this,void 0,void 0,(function(){return Pe(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 Te(this,void 0,void 0,(function(){var t,n,r,i,o,s;return Pe(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=Zt(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=Gg(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Ui(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=Wg(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Yg(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=$g(e,t);return this.dispatch(n)},e.prototype.add=function(e){return Te(this,void 0,void 0,(function(){return Pe(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 Te(this,void 0,void 0,(function(){return Pe(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(Gn(e,0,tv));this.process(e).then(t)},e.prototype.dispatch=function(e){return Te(this,void 0,void 0,(function(){var t=this;return Pe(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return Te(this,void 0,void 0,(function(){var t,n,r;return Pe(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,Gn(e,0,Zg)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=Gn(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();v();var Hs=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 $s(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?ke({},this.properties):{};return e[bn.REVENUE_PRODUCT_ID]=this.productId,e[bn.REVENUE_QUANTITY]=this.quantity,e[bn.REVENUE_PRICE]=this.price,e[bn.REVENUE_TYPE]=this.revenueType,e[bn.REVENUE]=this.revenue,e},e}();v(),v();var nv=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");v(),v();var Xs="Amplitude Logger ",rv=function(){function e(){this.logLevel=rt.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=rt.None},e.prototype.enable=function(e){void 0===e&&(e=rt.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Verbose||console.log("".concat(Xs,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Warn||console.warn("".concat(Xs,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Error||console.error("".concat(Xs,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Debug||console.log("".concat(Xs,"[Debug]: ").concat(e.join(" ")))},e}(),Ks=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:rt.Warn,loggerProvider:new rv,optOut:!1,serverUrl:rc,serverZone:qn.US,useBatch:!1}}),"getDefaultConfig"),oc=function(){function e(e){var t,n,r;this._optOut=!1;var i=Ks();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=sc(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),px=s((function(e,t){return e===qn.EU?t?Ug:Vg:t?qg:rc}),"getServerUrl"),sc=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Ks().serverZone),void 0===n&&(n=Ks().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[qn.US,qn.EU].includes(t)?t:Ks().serverZone;return{serverZone:r,serverUrl:px(r,n)}}),"createServerConfig"),uc=function(){function e(){this.name="amplitude",this.type=pt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return Te(this,void 0,void 0,(function(){var n,r=this;return Pe(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(Bg,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.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 r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Jg),!1)}));r.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),Te(this,void 0,void 0,(function(){var t,n,r,i=this;return Pe(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=nv(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Te(this,void 0,void 0,(function(){var n,r,i,o,s;return Pe(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,Qg)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return zg(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=sc(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,Kg),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case _e.Success:this.handleSuccessResponse(e,t);break;case _e.Invalid:this.handleInvalidResponse(e,t);break;case _e.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case _e.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,Xg)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(ev))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=zt(zt(zt(zt([],nt(Object.values(e.body.eventsWithInvalidFields)),!1),nt(Object.values(e.body.eventsWithMissingFields)),!1),nt(Object.values(e.body.eventsWithInvalidIdLengths)),!1),nt(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,zt([],nt(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,zt([],nt(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,zt([],nt(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,zt([],nt(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(Gn(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}();v();var St=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,zt([],nt(t),!1))}}}),"returnWrapper");v();var fx=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Ae=s((function(e){return function(){var t=ke({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),hx=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=Zt(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),Ce=s((function(e,t){return function(){var n,r,i={};try{for(var o=Zt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=hx(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),je=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<rt.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:fx(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");v();var Wn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Wn)}),"UUID");v();var Gi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return Te(this,void 0,void 0,(function(){return Pe(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return Te(this,void 0,void 0,(function(){return Pe(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return Te(this,void 0,void 0,(function(){var t;return Pe(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return Te(this,void 0,void 0,(function(){return Pe(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return Te(this,void 0,void 0,(function(){return Pe(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return Te(this,void 0,void 0,(function(){return Pe(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();v();var cr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m,b,w,_,M;if("object"!=typeof e)return null;var x=e.code||0,S=this.buildStatus(x);switch(S){case _e.Success:return{status:S,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case _e.Invalid:return{status:S,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case _e.PayloadTooLarge:return{status:S,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case _e.RateLimit:return{status:S,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case _e.Timeout:default:return{status:S,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?_e.Success:429===e?_e.RateLimit:413===e?_e.PayloadTooLarge:408===e?_e.Timeout:e>=400&&e<500?_e.Invalid:e>=500?_e.Failed:_e.Unknown},e}();v(),v(),v();var lc=s((function(e,t){return(lc=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");function iv(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}lc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(iv,"__extends");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 cc(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 Be(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 Ve(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function av(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(cc,"__rest"),s(Be,"__awaiter"),s(Ve,"__generator"),s(av,"__read"),v(),v();var it=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Nr=s((function(){var e,t=it();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=ov(n[0]),i=ov(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),ov=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");v();var sv="utm_campaign",uv="utm_content",lv="utm_id",cv="utm_medium",dv="utm_source",pv="utm_term",dc="dclid",pc="fbclid",fc="gbraid",hc="gclid",mc="ko_click_id",gc="msclkid",vc="ttclid",yc="twclid",bc="wbraid",fv="EMPTY",Js={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},hv="MKTG",mv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2,$e($e($e($e({},Js),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Nr();return{utm_campaign:e[sv],utm_content:e[uv],utm_id:e[lv],utm_medium:e[cv],utm_source:e[dv],utm_term:e[pv]}},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=Nr();return(e={})[dc]=t[dc],e[pc]=t[pc],e[fc]=t[fc],e[hc]=t[hc],e[mc]=t[mc],e[gc]=t[gc],e[vc]=t[vc],e[yc]=t[yc],e[bc]=t[bc],e},e}();v(),v();var dr=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[qi,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),wc=s((function(e){return"".concat(qi.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),kc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=dr(e,hv),this.parser=new mv,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!==(r=t.initialEmptyValue)&&void 0!==r?r:fv}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=cc(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=cc(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?gv(r||"")!==gv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return Be(this,void 0,void 0,(function(){return Ve(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 Be(this,void 0,void 0,(function(){return Ve(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 t=this,n=$e($e({},Js),e),r=Object.entries(n).reduce((function(e,n){var r=av(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new Bt),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return $e($e({},Ui(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return Be(this,void 0,void 0,(function(){var t,n;return Ve(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),gv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");v();var pr=function(){function e(e){this.options=$e({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return Be(this,void 0,void 0,(function(){var t,n,r;return Ve(this,(function(i){switch(i.label){case 0:if(!it())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return Be(this,void 0,void 0,(function(){var n,r,i;return Ve(this,(function(o){return n=it(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return Be(this,void 0,void 0,(function(){var r,i,o,s,a,l;return Ve(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=it())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return Be(this,void 0,void 0,(function(){return Ve(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 Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2]}))}))},e}();v();var Zs=function(){function e(e,t){this.storage=e,this.storageKey=dr(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=$e($e({},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}();v();var _c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iv(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return Be(this,void 0,void 0,(function(){var n,r;return Ve(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(cr);v(),v();var vv=Xt(Mc()),mx=function(){function e(){this.ua=new vv.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:yx(),platform:"Web",os:gx(this.ua),deviceModel:vx(this.ua)}},e}(),gx=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"),vx=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),yx=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),bx=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}(),Yn=s((function(){return Yn=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"),Yn.apply(this,arguments)}),"__assign"),eu=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),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!eu(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){eu(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!eu(e[c],t[c]))return!1;return!0}),"isEqual"),wx="$set",kx="$unset",_x="$clearAll";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 Mx=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Yn({},this.identity.userProperties),n=Yn(Yn({},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],s=o[0],a=o[1];switch(s){case wx:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case kx:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case _x:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Yn({},this.identity)},e.prototype.setIdentity=function(e){var t=Yn({},this.identity);this.identity=Yn({},e),eu(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}(),Yi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,yv=function(){function e(){this.identityStore=new Mx,this.eventBridge=new bx,this.applicationContextProvider=new mx}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return Yi.analyticsConnectorInstances||(Yi.analyticsConnectorInstances={}),Yi.analyticsConnectorInstances[t]||(Yi.analyticsConnectorInstances[t]=new e),Yi.analyticsConnectorInstances[t]},e}(),$i=s((function(){return yv.getInstance("$default_instance")}),"getAnalyticsConnector");v();var xc=function(){function e(){this.name="identity",this.type=pt.BEFORE,this.identityStore=$i().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();v();var Ec=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");v();var tu=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),nu=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");v();var wv=Xt(Mc());v();var bv="1.6.8",xx="Web",Ex="$remote",kv=function(){function e(){var e;this.name="context",this.type=pt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(bv),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new wv.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 be(this,void 0,void 0,(function(){var t,n,r,i,o;return we(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,le(le(le(le(le(le(le(le(le(le(le(le({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:xx}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:Ec()}),this.config.trackingOptions.ipAddress&&{ip:Ex}),{insert_id:Wn(),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}();v(),v();var Hi=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return be(this,void 0,void 0,(function(){var t,n,r;return we(this,(function(i){switch(i.label){case 0:if(!it())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return be(this,void 0,void 0,(function(){var t;return we(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return be(this,void 0,void 0,(function(){return we(this,(function(n){return[2,(null===(t=it())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return be(this,void 0,void 0,(function(){return we(this,(function(r){try{null===(n=it())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return be(this,void 0,void 0,(function(){return we(this,(function(n){try{null===(t=it())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return be(this,void 0,void 0,(function(){return we(this,(function(t){try{null===(e=it())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();v();var _v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return Vn(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return be(this,void 0,void 0,(function(){var n=this;return we(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(cr);v();var Mv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return be(this,void 0,void 0,(function(){var n=this;return we(this,(function(r){return[2,new Promise((function(r,i){var o=it();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(cr),ru=s((function(){var e=new Gi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new Zs(e,""),sessionTimeout:18e5,storageProvider:new Gi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new _c}}),"getDefaultConfig"),xv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,v,g=this,y=ru();return(g=e.call(this,le(le({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:y.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:y.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:y.cookieStorage,g.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:y.sessionManager,g.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:y.sessionTimeout,g.appVersion=null==r?void 0:r.appVersion,g.attribution=null==r?void 0:r.attribution,g.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:y.cookieExpiration,g.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:y.cookieSameSite,g.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:y.cookieSecure,g.deviceId=null==r?void 0:r.deviceId,g.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:y.disableCookies,g.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:y.domain,g.lastEventTime=null!==(f=g.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,g.optOut=!(null==r||!r.optOut),g.partnerId=null==r?void 0:r.partnerId,g.sessionId=null==r?void 0:r.sessionId,g.trackingOptions=null!==(v=null==r?void 0:r.trackingOptions)&&void 0!==v?v:y.trackingOptions,g.userId=n,g}return Vn(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.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(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(oc),Ev=s((function(e,t,n){return be(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m,b;return we(this,(function(w){switch(w.label){case 0:return r=ru(),null!==(v=null==n?void 0:n.domain)&&void 0!==v?(o=v,[3,3]):[3,1];case 1:return[4,Sx()];case 2:o=w.sent(),w.label=3;case 3:return i=o,[4,Tx(le(le({},n),{domain:i}))];case 4:return s=w.sent(),a=dr(e),[4,s.get(a)];case 5:return l=w.sent(),u=Nr(),[4,new Zs(s,e).load()];case 6:return c=w.sent(),h=xv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[le({},n)],f={cookieStorage:s,sessionManager:c,deviceId:Ox(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(g=null==n?void 0:n.optOut)&&void 0!==g?g:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(m=null===(y=w.sent())||void 0===y?void 0:y.sessionId)&&void 0!==m?m:null==n?void 0:n.sessionId,[4,Px(n)];case 8:return[2,new(h.apply(xv,d.concat([le.apply(void 0,p.concat([(f.storageProvider=w.sent(),f.trackingOptions=le(le({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(b=null==n?void 0:n.transportProvider)&&void 0!==b?b:Pc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),Tx=s((function(e,t){return void 0===t&&(t=ru()),be(void 0,void 0,void 0,(function(){var n,r,i;return we(this,(function(o){switch(o.label){case 0:return n=le(le({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,Tc(n)]:[2,r]}}))}))}),"createCookieStorage"),Tc=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n;return we(this,(function(r){switch(r.label){case 0:return t=new pr({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new Hi).isEnabled()]:[3,4];case 3:r.sent()||(t=new Gi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),Px=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return we(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=Dg([null==e?void 0:e.storageProvider,new Hi]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),Ox=s((function(e,t,n){return t||n||e||Wn()}),"createDeviceId"),Pc=s((function(e){return e===Lr.XHR?new _v:e===Lr.SendBeacon?new Mv:ru().transportProvider}),"createTransport"),Sx=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return we(this,(function(l){switch(l.label){case 0:return[4,(new pr).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new pr({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");v();var Pv=s((function(e,t){return be(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return we(this,(function(h){switch(h.label){case 0:return[4,(n=new pr).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new Hi),[4,n.isEnabled()];case 2:return h.sent()?(r=wc(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=Rg(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:Ix(a),sessionId:Tv(u),lastEventTime:Tv(c),optOut:!!l}]}}))}))}),"parseOldCookies"),Tv=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),Ix=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),Ax=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),be(this,void 0,void 0,(function(){var a,l,u,c,h=this;return we(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Pv(t,r)]);case 1:return a=d.sent(),[4,Ev(t,n||a.userId,le(le({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=$i()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new kv)];case 4:return d.sent(),[4,this.add(new xc)];case 5:return d.sent(),[4,this.add(new uc)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),be(this,void 0,void 0,(function(){var n,r,i;return we(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,Tc(this.config)];case 1:return i=o.sent(),[4,new kc(this.config.apiKey,le(le({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Wn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Pc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Bt,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(nu(r)){var o=r._q;r._q=[],r=tu(new Bt,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Hs,r)}return e.prototype.revenue.call(this,t,n)},t}(ac),iu=s((function(){var e=new Ax;return{init:je(St(e.init.bind(e)),"init",Ae(e),Ce(e,["config"])),add:je(St(e.add.bind(e)),"add",Ae(e),Ce(e,["config.apiKey","timeline.plugins"])),remove:je(St(e.remove.bind(e)),"remove",Ae(e),Ce(e,["config.apiKey","timeline.plugins"])),track:je(St(e.track.bind(e)),"track",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),logEvent:je(St(e.logEvent.bind(e)),"logEvent",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),identify:je(St(e.identify.bind(e)),"identify",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),groupIdentify:je(St(e.groupIdentify.bind(e)),"groupIdentify",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),setGroup:je(St(e.setGroup.bind(e)),"setGroup",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),revenue:je(St(e.revenue.bind(e)),"revenue",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),flush:je(St(e.flush.bind(e)),"flush",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),getUserId:je(e.getUserId.bind(e),"getUserId",Ae(e),Ce(e,["config","config.userId"])),setUserId:je(e.setUserId.bind(e),"setUserId",Ae(e),Ce(e,["config","config.userId"])),getDeviceId:je(e.getDeviceId.bind(e),"getDeviceId",Ae(e),Ce(e,["config","config.deviceId"])),setDeviceId:je(e.setDeviceId.bind(e),"setDeviceId",Ae(e),Ce(e,["config","config.deviceId"])),reset:je(e.reset.bind(e),"reset",Ae(e),Ce(e,["config","config.userId","config.deviceId"])),getSessionId:je(e.getSessionId.bind(e),"getSessionId",Ae(e),Ce(e,["config"])),setSessionId:je(e.setSessionId.bind(e),"setSessionId",Ae(e),Ce(e,["config"])),setOptOut:je(e.setOptOut.bind(e),"setOptOut",Ae(e),Ce(e,["config"])),setTransport:je(e.setTransport.bind(e),"setTransport",Ae(e),Ce(e,["config"]))}}),"createInstance"),De=iu(),AN=De.add,CN=De.flush,jN=De.getDeviceId,FN=De.getSessionId,LN=De.getUserId,NN=De.groupIdentify,DN=De.identify,RN=De.init,zN=De.logEvent,BN=De.remove,VN=De.reset,qN=De.revenue,UN=De.setDeviceId,GN=De.setGroup,WN=De.setOptOut,YN=De.setSessionId,$N=De.setTransport,HN=De.setUserId,XN=De.track,zd={production:"40ead723d18886045e302513245edb27",development:""},Dr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Bd=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Bd,"AnalyticsCategorySelectedCall");var Xi=Bd,Vd=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Vd,"AnalyticsLocationSelectedCall");var Ki=Vd,qd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(qd,"BlueDotDisableCall");var Oc=qd,Ud=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Ud,"BlueDotEnableCall");var Sc=Ud,Gd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Gd,"BlueDotOffCall");var Ic=Gd,Wd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Wd,"BlueDotOnCall");var Ac=Wd,Yd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Yd,"CameraAnimateCall");var Cc=Yd,$d=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s($d,"CameraCancelAnimationCall");var jc=$d,Hd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Hd,"CameraFocusOnCall");var Fc=Hd,Xd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Xd,"CameraGetSafeAreaInsetsCall");var Lc=Xd,Kd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Kd,"CameraInteractionDisableCall");var Nc=Kd,Jd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Jd,"CameraInteractionEnableCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Zd,"CameraSetCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Qd,"CameraSetSafeAreaInsetsCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(ep,"CameraTranslateCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(tp,"FlatLabelsAddCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(np,"FlatLabelsLabelAllLocationsCall");var qc=np,rp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(rp,"FlatLabelsRemoveCall");var Uc=rp,ip=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(ip,"FlatLabelsRemoveAllCall");var Gc=ip,ap=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(ap,"FlatLabelsSetAppearanceCall");var Wc=ap,op=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(op,"FloatingLabelsAddCall");var Yc=op,sp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(sp,"FloatingLabelsLabelAllLocationsCall");var $c=sp,up=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(up,"FloatingLabelsRemoveCall");var Hc=up,lp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(lp,"FloatingLabelsRemoveAllCall");var Xc=lp,cp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(cp,"FloatingLabelsResetPriorityCall");var Kc=cp,dp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(dp,"FloatingLabelsSetAppearanceCall");var Jc=dp,pp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(pp,"FloatingLabelsSetPriorityCall");var Zc=pp,fp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(fp,"GlobalGetVenueCall");var Ji=fp,hp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(hp,"GlobalGetVenueMvfCall");var Zi=hp,mp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(mp,"GlobalShowVenueCall");var Qc=mp,gp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(gp,"JourneyClearCall");var ed=gp,vp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(vp,"JourneyDrawCall");var td=vp,yp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(yp,"JourneySetStepCall");var nd=yp,bp=class{constructor(e){this.event_properties=e,b(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(bp,"MappedinGetCollectionItemByIdCall");var rd=bp,wp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(wp,"MappedinCoordinateAbsoluteDistanceToCall");var id=wp,kp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(kp,"MappedinCoordinateNearestNodeCall");var ad=kp,_p=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(_p,"MappedinLocationCloneCall");var Qi=_p,Mp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(Mp,"MappedinLocationDirectionsToCall");var ea=Mp,xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(xp,"MappedinLocationDistanceToCall");var ta=xp,Ep=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(Ep,"MappedinMapCreateCoordinateCall");var od=Ep,Tp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(Tp,"MappedinMapCreateCoordinateByXyCall");var sd=Tp,Pp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(Pp,"MappedinMapGetNorthCall");var ud=Pp,Op=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(Op,"MappedinNodeDirectionsToCall");var na=Op,Sp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(Sp,"MappedinNodeDistanceToCall");var ra=Sp,Ip=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(Ip,"MappedinPolygonDirectionsToCall");var ia=Ip,Ap=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(Ap,"MappedinPolygonDistanceToCall");var aa=Ap,Cp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Cp,"MappedinVenueMetadataRead");var oa=Cp,jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(jp,"MapViewAddInteractivePolygonCall");var ld=jp,Fp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Fp,"MapViewAddInteractivePolygonsForAllLocationsCall");var cd=Fp,Lp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(Lp,"MapViewClearPolygonColorCall");var dd=Lp,Np=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Np,"MapViewCreateCustomTooltipCall");var pd=Np,Dp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Dp,"MapViewCreateMarkerCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Rp,"MapViewCreateTooltipCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(zp,"MapViewDestroyCall");var md=zp,Bp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Bp,"MapViewDisableImageFlippingForAllPolygonsCall");var gd=Bp,Vp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Vp,"MapViewDrawPathCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(qp,"MapViewEnableImageFlippingForAllLocationsCall");var yd=qp,Up=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Up,"MapViewEnableImageFlippingForPolygonCall");var bd=Up,Gp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Gp,"MapViewGetNearestNodeByScreenCoordinatesCall");var wd=Gp,Wp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Wp,"MapViewGetPolygonAtCoordinateCall");var kd=Wp,Yp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Yp,"MapViewGetPrimaryLocationForPolygonCall");var _d=Yp,$p=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s($p,"MapViewLabelAllLocationsCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Hp,"MapViewRemoveAllInteractivePolygonsCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Xp,"MapViewRemoveAllMarkersCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Kp,"MapViewRemoveAllPathsCall");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Jp,"MapViewRemoveAllTooltipsCall");var Pd=Jp,Zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Zp,"MapViewRemoveInteractivePolygonCall");var Od=Zp,Qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Qp,"MapViewRemoveMarkerCall");var Sd=Qp,ef=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(ef,"MapViewRemovePathCall");var Id=ef,tf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(tf,"MapViewRemoveTooltipCall");var Ad=tf,nf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(nf,"MapViewSetBackgroundColorCall");var Cd=nf,rf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(rf,"MapViewSetHoverColorCall");var jd=rf,af=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(af,"MapViewSetMapCall");var Fd=af,of=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(of,"MapViewSetPolygonColorCall");var Ld=of,sf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(sf,"MapViewSetStateCall");var Nd=sf,uf=class{constructor(e){this.event_properties=e,b(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(uf,"MetricsMapLoadEvent");var Dd=uf,lf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(lf,"OfflineSearchAddQueryCall");var sa=lf,cf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(cf,"OfflineSearchConstructorCall");var ua=cf,df=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(df,"OfflineSearchSearchCall");var la=df,pf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(pf,"OfflineSearchSuggestCall");var ca=pf,au=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),ff=class{constructor(){b(this,"disabled",!1),b(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."),au();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=zd[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=iu(),this.amplitude.init(r,void 0,{...Dr,...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 au()}identify(e,t,n){if(!this.isInitializedAndEnabled())return au();e&&(n={...n,user_id:e});let r=new Bt,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):au()}analyticsCategorySelectedCall(e,t){return this.track(new Xi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Ki(e),t)}blueDotDisableCall(e,t){return this.track(new Oc(e),t)}blueDotEnableCall(e,t){return this.track(new Sc(e),t)}blueDotOffCall(e,t){return this.track(new Ic(e),t)}blueDotOnCall(e,t){return this.track(new Ac(e),t)}cameraAnimateCall(e,t){return this.track(new Cc(e),t)}cameraCancelAnimationCall(e,t){return this.track(new jc(e),t)}cameraFocusOnCall(e,t){return this.track(new Fc(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Lc(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Nc(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Dc(e),t)}cameraSetCall(e,t){return this.track(new Rc(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new zc(e),t)}cameraTranslateCall(e,t){return this.track(new Bc(e),t)}flatLabelsAddCall(e,t){return this.track(new Vc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new qc(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Uc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Gc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Wc(e),t)}floatingLabelsAddCall(e,t){return this.track(new Yc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new $c(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Hc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Xc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Kc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Jc(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Zc(e),t)}globalGetVenueCall(e,t){return this.track(new Ji(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Zi(e),t)}globalShowVenueCall(e,t){return this.track(new Qc(e),t)}journeyClearCall(e,t){return this.track(new ed(e),t)}journeyDrawCall(e,t){return this.track(new td(e),t)}journeySetStepCall(e,t){return this.track(new nd(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new rd(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new id(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new ad(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Qi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new ea(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new ta(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new od(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new sd(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new ud(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new na(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ra(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new ia(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new aa(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new oa(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new ld(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new cd(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new dd(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new pd(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new fd(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new hd(e),t)}mapViewDestroyCall(e,t){return this.track(new md(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new gd(e),t)}mapViewDrawPathCall(e,t){return this.track(new vd(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new yd(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new bd(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new wd(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new kd(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new _d(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Md(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new xd(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Ed(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Td(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Pd(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Od(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Sd(e),t)}mapViewRemovePathCall(e,t){return this.track(new Id(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new Ad(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new Cd(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new jd(e),t)}mapViewSetMapCall(e,t){return this.track(new Fd(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Ld(e),t)}mapViewSetStateCall(e,t){return this.track(new Nd(e),t)}metricsMapLoadEvent(e,t){return this.track(new Dd(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new sa(e),t)}offlineSearchConstructorCall(e,t){return this.track(new ua(e),t)}offlineSearchSearchCall(e,t){return this.track(new la(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ca(e),t)}};s(ff,"Ampli");var Rd=ff,da=new Rd;v();var xn,wr,Vt,Gr,en,Tu,Uy,Pu,Gy,Ma,Df,xa,Rf,qt,By=Xt(uy()),Vy=Xt(Dy()),qy=Xt(Ry()),zy="5.30.0",nP="https://api2.amplitude.com/2/httpapi",rP="https://api2.amplitude.com/batch",iP="__unspecified__",Lf={branch:"main",version:"0",source:"websdk"},at=class e{constructor(){I(this,Tu),I(this,Pu),I(this,Ma),I(this,xa),I(this,Vt,{}),I(this,Gr,!1),I(this,en,void 0),I(this,qt,s((async e=>{oP(e.type)&&(window.removeEventListener("visibilitychange",w(this,qt)),window.removeEventListener("pagehide",w(this,qt)),window.removeEventListener("beforeunload",w(this,qt)),window.removeEventListener("unload",w(this,qt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==w(e,wr)&&j(e,wr,zy),typeof navigator<"u"&&null!=navigator.userAgent&&j(this,en,new qy.UAParser(navigator.userAgent).getResult())}static setContext(t){j(e,xn,t)}static setVersion(t){j(e,wr,t)}addPendingEvent(t){var n;if(null==w(e,xn))return;let r=t.event_type;if(!ye(this,Pu,Gy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=w(this,Vt)[r];(0,Vy.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),w(this,Vt)[r]=t}async sendAllPendingEvents(){if(null==w(e,xn)||Object.keys(w(this,Vt)).length<1)return;if(w(this,Gr))return void R.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in w(this,Vt)){let n=w(this,Vt)[e],r=ye(this,Ma,Df).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{j(this,Gr,!0),200===(await ye(this,xa,Rf).call(this,rP,t)).status&&j(this,Vt,{})}catch(e){R.warn("Error sending batch product analytics!",e)}finally{j(this,Gr,!1)}}async load(){if(!da.isLoaded){let{promise:e}=da.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",w(this,qt)),window.addEventListener("beforeunload",w(this,qt)),window.addEventListener("unload",w(this,qt)),window.addEventListener("visibilitychange",w(this,qt))}))}}async sendEventNow(t){if(null==w(e,xn))return;let n=ye(this,Ma,Df).call(this,t);if(null!=n)try{await ye(this,xa,Rf).call(this,nP,[n])}catch(e){R.warn("Error sending single product analytics event!",e)}}};xn=new WeakMap,wr=new WeakMap,Vt=new WeakMap,Gr=new WeakMap,en=new WeakMap,Tu=new WeakSet,Uy=s((function(e){let t=e.event_type;return null!=w(this,Vt)[t]}),"#isEventTypePending"),Pu=new WeakSet,Gy=s((function(e){if(!ye(this,Tu,Uy).call(this,e))return!0;let t=e.event_type,n=w(this,Vt)[t];return!(0,By.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),Ma=new WeakSet,Df=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y;if(null!=w(at,xn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&R.warn("Error processing product analytics event! Unspecified venue slug",e),null==Dr.plan&&R.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=da.client.getSessionId())?n:Su(),device_id:null!=(r=da.client.getDeviceId())?r:Ou(),plan:{branch:null!=(o=null==(i=Dr.plan)?void 0:i.branch)?o:Lf.branch,version:null!=(a=null==(s=Dr.plan)?void 0:s.version)?a:Lf.version,source:null!=(u=null==(l=Dr.plan)?void 0:l.source)?u:Lf.source},os_name:null==(c=w(this,en))?void 0:c.browser.name,os_version:null==(h=w(this,en))?void 0:h.browser.version,device_manufacturer:null==(d=w(this,en))?void 0:d.device.vendor,device_model:null==(p=w(this,en))?void 0:p.device.model,event_properties:{...e.event_properties,context:w(at,xn),sdk_version:w(at,wr),browser_name:null==(f=w(this,en))?void 0:f.browser.name,browser_version:null==(v=w(this,en))?void 0:v.browser.version,venue:null!=(y=null==(g=e.event_properties)?void 0:g.venue)?y:iP},time:e.time}}),"#makeBatchFormattedEvent"),xa=new WeakSet,Rf=s((async function(e,t){return await ft()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:zd.production,events:t})})}),"#batchSend"),qt=new WeakMap,s(at,"ProductAnalytics"),I(at,xn,void 0),I(at,wr,void 0);var Nf=at,aP=new Nf,Me=aP;function oP(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(oP,"areWeLeavingThePage");var It,Wr,He,Pa,Ea=class e extends Jt{constructor(e,t){super(e),I(this,It,void 0),I(this,Wr,void 0),I(this,He,{}),b(this,"id",""),b(this,"x",0),b(this,"y",0),b(this,"operationHours"),b(this,"externalId"),I(this,Pa,void 0),j(this,It,e),j(this,Wr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,He).map;if(typeof e<"u")return e;let t=w(this,It).getCollectionItemById("maps",w(this,Wr).map);return w(this,He).map=t,t}get lat(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lat}get lon(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lon}get paths(){let e=w(this,He).paths;if(typeof e<"u")return e;let t=[],n=w(this,It)._nodesById,r=w(this,Pa);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 w(this,He).paths=t,t}set paths(e){j(this,Pa,e)}get locations(){var e,t,n;let r=w(this,He).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=Qe.instances.get(w(this,It)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=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===s){i.push(t);break}}return w(this,He).locations=i,i}get polygon(){var e,t,n;let r=w(this,He).polygon;if(typeof r<"u")return r;let i,o=null!=(n=null==(t=null==(e=Qe.instances.get(w(this,It)))?void 0:e.polygonsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e];t.entrances.map((e=>e.id)).includes(s)&&(i=t)}return w(this,He).polygon=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.nodes.slice();t.options.things.maps&&Oe(n,"map"),["weight","multiplier","accessible"].forEach((function(e){Oe(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"node",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,It).venue.slug,i=new na({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,It).venue.slug;return Me.addPendingEvent(new ra({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Wr)}};It=new WeakMap,Wr=new WeakMap,He=new WeakMap,Pa=new WeakMap,s(Ea,"MappedinNode");var Ta=Ea;v();var tn,Yr,At,Ia,Sa=class e extends Jt{constructor(e,t){super(e),I(this,tn,void 0),I(this,Yr,void 0),I(this,At,{}),b(this,"geometry"),b(this,"perspectives"),b(this,"image"),b(this,"holes"),b(this,"textures"),b(this,"material"),b(this,"label"),b(this,"id",""),b(this,"layer"),b(this,"layerId"),b(this,"name"),b(this,"externalId"),b(this,"vertexes"),b(this,"center"),b(this,"canvasBounds"),b(this,"categoryRank"),I(this,Ia,void 0),j(this,tn,e),j(this,Yr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,At).map;if(typeof e<"u")return e;let t=w(this,tn).getCollectionItemById("maps",w(this,Yr).map);return w(this,At).map=t,t}get locations(){var e,t;let n=w(this,At).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=Qe.instances.get(w(this,tn)))?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 w(this,At).locations=r,r}get entrances(){let e=w(this,At).entrances;if(typeof e<"u")return e;let t=[],n=w(this,Ia),r=w(this,tn)._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 w(this,At).entrances=t,t}return[]}set entrances(e){j(this,Ia,e)}get rank(){let e=w(this,At).rank;if(typeof e<"u")return e;let{rankings:t}=w(this,tn);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(w(this,At).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(w(this,At).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.polygons.slice();t.options.things.maps&&Oe(n,"map"),t.options.things.nodes&&Oe(n,"entrances");let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"polygon",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,tn).venue.slug,i=new ia({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,tn).venue.slug;return Me.addPendingEvent(new aa({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Yr)}};tn=new WeakMap,Yr=new WeakMap,At=new WeakMap,Ia=new WeakMap,s(Sa,"MappedinPolygon");var kr=Sa;v();var sP=0,uP="9999-12-31T00:00:00.000Z";function lP(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||sP),n=new Date(e.end||uP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(lP,"getCurrentLocationState");var bt,Xn,wt,Aa,Ca,ja,$r=class e extends Jt{constructor(e,t){super(e),I(this,bt,void 0),I(this,Xn,void 0),I(this,wt,{}),b(this,"states"),b(this,"id",""),b(this,"name",""),b(this,"type",""),b(this,"description"),b(this,"sortOrder"),b(this,"logo"),b(this,"phone"),b(this,"social"),b(this,"color"),b(this,"shortName"),b(this,"detailsUrl"),b(this,"tags"),b(this,"toMap"),b(this,"externalId"),b(this,"showLabelWhenImagePresent"),b(this,"showSmartLabelWhenImagePresent"),b(this,"picture"),b(this,"operationHours"),b(this,"siblingGroups"),b(this,"gallery"),b(this,"amenity"),b(this,"filterFlags"),I(this,Aa,void 0),I(this,Ca,[]),I(this,ja,void 0),j(this,bt,e),j(this,Xn,t);let n=Object.assign({},t);delete n.categories,Object.assign(this,n)}get polygons(){let e=w(this,wt).polygons;if(typeof e<"u")return e;let t=[],n=w(this,Aa),r=w(this,bt)._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 w(this,wt).polygons=t,t}set polygons(e){j(this,Aa,e)}get nodes(){let e=w(this,wt).nodes;if(typeof e<"u")return e;let t=[],n=w(this,Ca),r=w(this,bt)._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 w(this,wt).nodes=t,t}set nodes(e){j(this,Ca,e)}get parent(){let e=w(this,wt).parent;if(typeof e<"u")return e;let t,n=w(this,bt)._locationsById,r=w(this,ja);return void 0!==r&&(t=n[r]),w(this,wt).parent=t,t}set parent(e){j(this,ja,e)}get categories(){let e=w(this,wt).categories;if(typeof e<"u")return e;let t=[];return w(this,Xn).categories.forEach((e=>{let n=w(this,bt).getCollectionItemById("categories",e);n&&t.push(n)})),w(this,wt).categories=t,t}get state(){return lP(this,w(this,bt).locationStates)}clone(){let t=w(this,bt).venue.slug;return Me.addPendingEvent(new Qi({venue:t})),new e(w(this,bt),w(this,Xn))}get nodeOperationHours(){let e=w(this,wt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=w(this,Xn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return w(this,wt).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.locations.slice();t.options.things.categories&&Oe(n,"categories"),t.options.things.nodes&&Oe(n,"nodes"),t.options.things.polygons&&Oe(n,"polygons"),t.options.things.locationStates&&Oe(n,"states");let r={fields:n,venue:t.options.venue};try{let n=await Se(t.options,"location",r);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return R.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,bt).venue.slug,i=new ea({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,bt).venue.slug;return Me.addPendingEvent(new ta({venue:n})),super.distanceTo(e,t)}toJSON(){let e=w(this,Xn);return delete e.color,e}};bt=new WeakMap,Xn=new WeakMap,wt=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,ja=new WeakMap,s($r,"MappedinLocation");var En=$r;v();var Hr,_r,La,Fa=class e{constructor(e,t){I(this,Hr,void 0),I(this,_r,{}),I(this,La,void 0),b(this,"name"),b(this,"externalId"),b(this,"parents"),b(this,"id"),b(this,"icon"),b(this,"iconFromDefaultList"),b(this,"sortOrder"),this.id=t.id,j(this,La,t),j(this,Hr,e),Object.assign(this,t)}get locations(){var e;let t=w(this,_r).locations;if(typeof t<"u")return t;let n=[],{locations:r}=w(this,Hr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return w(this,_r).locations=n,n}get children(){var e;let t=w(this,_r).children;if(typeof t<"u")return t;let{categories:n}=w(this,Hr),{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 w(this,_r).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n={fields:t.options.things.categories,venue:t.options.venue};try{return(await Se(t.options,"category",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Categories:",e),[]}}toJSON(){return w(this,La)}};Hr=new WeakMap,_r=new WeakMap,La=new WeakMap,s(Fa,"MappedinCategory");var Mr=Fa;v();var Na,Tn,zf=class{constructor(e,t){I(this,Na,void 0),I(this,Tn,void 0),b(this,"distance",0),b(this,"path",[]),b(this,"instructions",[]),j(this,Tn,e),j(this,Na,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=w(this,Tn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=w(this,Tn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=w(this,Tn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=w(this,Tn)._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=w(this,Tn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return w(this,Na)}};Na=new WeakMap,Tn=new WeakMap,s(zf,"MappedinDirections");var lr=zf;v();var Bf=class{constructor(e){b(this,"destinations",[]),this.destinations=e}};s(Bf,"MappedinDestinationSet");var Ot=Bf;v();var za,Da=class e{constructor(e){b(this,"id",""),I(this,za,void 0),b(this,"accessible"),b(this,"name"),b(this,"type"),b(this,"weight"),b(this,"multiplier"),b(this,"nodes"),b(this,"filterFlags"),j(this,za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Oe(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"vortex",r)).map((t=>new e(t)))}catch(e){return R.error("Fetch Vortexes:",e),[]}}toJSON(){return w(this,za)}};za=new WeakMap,s(Da,"MappedinVortex");var Ra=Da;v();var Va,qa,Ua,Xr,Ba=class e{constructor(e,t){I(this,Va,void 0),I(this,qa,void 0),I(this,Ua,void 0),I(this,Xr,{}),b(this,"defaultMap",""),b(this,"address",""),b(this,"city",""),b(this,"countrycode",""),b(this,"externalId",""),b(this,"id",""),b(this,"latitude"),b(this,"logo"),b(this,"longitude"),b(this,"name",""),b(this,"operationHours"),b(this,"postal",""),b(this,"slug",""),b(this,"state",""),b(this,"telephone",""),b(this,"tzid",""),b(this,"tzidOverride",""),b(this,"utcOffset",""),b(this,"website",""),b(this,"secureContentStorage",!1),b(this,"defaultLanguage"),b(this,"languages",[]),b(this,"topLocations",[]),j(this,qa,e),j(this,Va,t),Object.assign(this,t)}get metadata(){return Me.addPendingEvent(new oa({venue:this.slug})),w(this,Ua)}set metadata(e){j(this,Ua,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){let n={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let r=await Se(t.options,"venue",n);return new e(t,Array.isArray(r)?r[0]:r)}catch(e){return R.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==w(this,Xr).isMultiBuilding){let e=w(this,qa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;w(this,Xr).isMultiBuilding=n}return w(this,Xr).isMultiBuilding}toJSON(){return w(this,Va)}};Va=new WeakMap,qa=new WeakMap,Ua=new WeakMap,Xr=new WeakMap,s(Ba,"MappedinVenue");var xr=Ba;v();var Wa,Ga=class e{constructor(e){b(this,"id",""),I(this,Wa,void 0),j(this,Wa,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await Se(t.options,"apollo-theme",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Theme:",e),[]}}toJSON(){return w(this,Wa)}};Wa=new WeakMap,s(Ga,"MappedinTheme");var Iu=Ga;v();var Ha,Ya=class e{constructor(e){I(this,Ha,void 0),b(this,"polygons",[]),j(this,Ha,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 R.error("Fetch Rankings:",e),null}}toJSON(){return w(this,Ha)}};Ha=new WeakMap,s(Ya,"MappedinRankings");var $a=Ya;v(),v();var Ja,Jr,Za,Xa=class e{constructor(e,t){I(this,Ja,void 0),I(this,Jr,void 0),I(this,Za,{}),b(this,"id",""),b(this,"type",""),b(this,"name",""),b(this,"description"),b(this,"image"),b(this,"startDate"),b(this,"endDate"),b(this,"showDate"),j(this,Jr,t),j(this,Ja,e),Object.assign(this,t)}location(){let e=w(this,Za).location;if(typeof e<"u")return e;let t,n=w(this,Ja)._locationsById,r=w(this,Jr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return w(this,Za).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.events.slice();t.options.things.locations&&Oe(n,"location");let r={fields:n,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Se(t.options,"event",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Events:",e),[]}}toJSON(){return w(this,Jr)}};Ja=new WeakMap,Jr=new WeakMap,Za=new WeakMap,s(Xa,"MappedinEvent");var Ka=Xa;v();var to,Qa=class e{constructor(e){I(this,to,void 0),b(this,"id",""),b(this,"name",""),b(this,"value",""),j(this,to,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await Se(t.options,"location-state",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Location States:",e),[]}}toJSON(){return w(this,to)}};to=new WeakMap,s(Qa,"MappedinLocationState");var eo=Qa;v(),v(),v();var Wy=" ",ot=class e{static get separator(){return Wy}static set separator(e){Wy=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,s=null,a=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),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}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(ot,"Dms");var Vf=ot;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var ne=Vf,xe=Math.PI,J=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=ne.wrap90(Number(e)),this._lon=ne.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?ne.wrap90(ne.parse(e)):ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?ne.wrap90(ne.parse(e)):ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let n,r;if(2==t.length&&([n,r]=t,n=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*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),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return ne.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return ne.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(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+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(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/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(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),v=h*Math.sin(r)+d*Math.sin(o),g=Math.atan2(v,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=g.toDegrees(),b=y.toDegrees();return new e(m,b)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+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(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*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(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),v=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),g=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(v,-1),1)),m=u-(Math.sin(l-s)>0?g:2*xe-g),b=(Math.sin(l-s)>0?2*xe-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let w=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*w),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),S=M.toDegrees(),k=x.toDegrees();return new e(S,k)}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,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*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,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*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(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);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(),v=p.toDegrees();return{lon1:ne.wrap180(f),lon2:ne.wrap180(v)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>xe&&(a=a>0?-(2*xe-a):2*xe+a);let l=Math.log(Math.tan(o/2+xe/4)/Math.tan(i/2+xe/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*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)>xe&&(i=i>0?-(2*xe-i):2*xe+i);let o=Math.log(Math.tan(r/2+xe/4)/Math.tan(n/2+xe/4)),s=Math.atan2(i,o).toDegrees();return ne.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>xe/2&&(u=u>0?xe-u:-xe-u);let c=Math.log(Math.tan(u/2+xe/4)/Math.tan(i/2+xe/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/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)>xe&&(r+=2*xe);let s=(n+i)/2,a=Math.tan(xe/4+n/2),l=Math.tan(xe/4+i/2),u=Math.tan(xe/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.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))}a(e)&&(o=Math.abs(o)-2*xe);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(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=ne.toLat(this.lat,e,t),r=ne.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(J,"LatLonSpherical");var nn,Kn,io,Fe=J,no=class e{constructor(e,t){I(this,nn,void 0),I(this,Kn,{}),I(this,io,void 0),b(this,"id",""),b(this,"group",""),b(this,"name",""),b(this,"shortName",""),b(this,"elevation",0),b(this,"subtitle"),b(this,"scale",0),b(this,"layers"),b(this,"x_scale"),b(this,"perspectiveId"),b(this,"scene"),b(this,"width",0),b(this,"height",0),b(this,"georeference",[]),b(this,"_scale",0),j(this,nn,e),j(this,io,t),Object.assign(this,t),this._scale=Yy(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=w(this,Kn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&w(this,nn)._mapGroupsById[t]||null;return w(this,Kn).mapGroup=n,n}createCoordinateByXY(e,t){return new Er({x:e,y:t,map:this,mappedin:w(this,nn)})}createCoordinate(e,t){return new Er({lat:e,lon:t,map:this,mappedin:w(this,nn)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new Fe(t.target.x,t.target.y),i=new Fe(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,R.warn(t),R.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 fetch(t){var n;let r=t.options.things.maps.slice();t.options.perspective&&Oe(r,"perspectives"),t.options.things.mapGroups&&Oe(r,"group"),Oe(r,"elevation"),Oe(r,"x_scale"),Oe(r,"scale"),Oe(r,"georeference");let i={fields:r,perspective:t.options.perspective,venue:t.options.venue};try{let a=await Se(t.options,"map",i),l=s((e=>{let t=o.layers.find((t=>t.id===e));t?t.visible=!0:o.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,s=a.length;i<s;++i){var o=a[i];if(o){let e=o.perspective;null!=e&&(o.perspectiveId=e.id,r.indexOf("scene")>-1&&(o.scene=e.scene),e.layers?(o.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):o.layers.forEach((e=>{e.visible=!0}))),delete o.perspective}if(t.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let e=await ft()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return R.error("Fetch Maps:",e),[]}}get center(){if(w(this,Kn).center)return w(this,Kn).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:s,lon:a}=this.createCoordinateByXY(n,r),l=new Fe(i,o),u=new Fe(s,a),c=l.midPointTo(u);return w(this,Kn).center=c,c}toJSON(){return w(this,io)}};nn=new WeakMap,Kn=new WeakMap,io=new WeakMap,s(no,"MappedinMap");var ro=no;v();var ao,qf,oo,Uf,so,uo,Au,$y,Cu,Hy,rn,an,on,sn,Gf=class{constructor(e){I(this,ao),I(this,oo),I(this,Au),I(this,Cu),b(this,"map"),I(this,so,{}),I(this,uo,void 0),I(this,rn,void 0),I(this,an,void 0),I(this,on,void 0),I(this,sn,void 0);let{map:t,mappedin:n}=e;null!=e.lat&&null!=e.lon&&(j(this,rn,e.lat),j(this,an,e.lon)),null!=e.x&&null!=e.y&&(j(this,on,e.x),j(this,sn,e.y)),this.map=t,j(this,uo,n)}get x(){return ye(this,oo,Uf).call(this,"x")}get y(){return ye(this,oo,Uf).call(this,"y")}get lat(){return ye(this,ao,qf).call(this,"lat")}get lon(){return ye(this,ao,qf).call(this,"lon")}absoluteDistanceTo(e){return Xy([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=w(this,so).nearestNode;if(typeof e<"u")return e;let t=Qe.instances.get(w(this,uo)).findNearestNodeOnMap(this.map.id,this);return w(this,so).nearestNode=t,t}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};ao=new WeakSet,qf=s((function(e){if(typeof w(this,rn)<"u"&&typeof w(this,an)<"u")return w(this,"lat"===e?rn:an);if(typeof w(this,on)<"u"&&typeof w(this,sn)<"u"){let[t,n]=ye(this,Cu,Hy).call(this,w(this,on),w(this,sn));return j(this,rn,t),j(this,an,n),w(this,"lat"===e?rn:an)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),oo=new WeakSet,Uf=s((function(e){if(w(this,on)&&w(this,sn))return w(this,"x"===e?on:sn);if(null!=w(this,rn)&&null!=w(this,an)){let[t,n]=ye(this,Au,$y).call(this,w(this,rn),w(this,an));return j(this,on,t),j(this,sn,n),w(this,"x"===e?on:sn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),so=new WeakMap,uo=new WeakMap,Au=new WeakSet,$y=s((function(e,t){let n=this.map.georeference[0],r=new Fe(n.target.x,n.target.y),i=new Fe(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Cu=new WeakSet,Hy=s((function(e,t){let n,r=this.map.georeference[0],i=new Fe(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s:o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),rn=new WeakMap,an=new WeakMap,on=new WeakMap,sn=new WeakMap,s(Gf,"MappedinCoordinate");var Er=Gf;v();var po,Zr,fo,lo=class e{constructor(e,t){I(this,po,void 0),I(this,Zr,void 0),I(this,fo,{}),b(this,"id",""),b(this,"name",""),j(this,Zr,t),j(this,po,e),Object.assign(this,t)}get maps(){let e=w(this,fo).maps;if(typeof e<"u")return e;let t=[],{maps:n}=w(this,po),{id:r}=w(this,Zr);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return w(this,fo).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await Se(t.options,"map-group",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Map Groups:",e),[]}}toJSON(){return w(this,Zr)}};po=new WeakMap,Zr=new WeakMap,fo=new WeakMap,s(lo,"MappedinMapGroup");var co=lo;v();var eb=Xt(Ky());v(),v();var Tr,Ut,Gt,Wf=[0,4,6,8,10],Pn=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],Wf.map(((e,t)=>n.slice(e,t===Wf.length-1?void 0:Wf[t+1]).join(""))).join("-")}),"randomId"),Jy="mi-session-data",Zy="mi-local-data",ho=class e{constructor(){I(this,Ut,void 0),I(this,Gt,void 0);try{let e=sessionStorage.getItem(Jy);j(this,Ut,e?JSON.parse(e):{id:Pn()})}catch{j(this,Ut,{id:Pn()})}try{let e=localStorage.getItem(Zy);j(this,Gt,e?JSON.parse(e):{deviceId:Pn()})}catch{j(this,Gt,{deviceId:Pn()})}w(this,Ut).id||(w(this,Ut).id=Pn()),w(this,Gt).deviceId||(w(this,Gt).deviceId=Pn())}static getInstance(){return w(this,Tr)||j(this,Tr,new e),w(this,Tr)}static ___clearInstance(){j(this,Tr,void 0)}saveSessionData(e,t){w(this,Ut)[e]=t;try{return sessionStorage.setItem(Jy,JSON.stringify(w(this,Ut))),!0}catch{return!1}}loadSessionData(e){let t=w(this,Ut)[e];if(null!=t)return t}saveLocalData(e,t){w(this,Gt)[e]=t;try{return localStorage.setItem(Zy,JSON.stringify(w(this,Gt))),!0}catch{return!1}}loadLocalData(e){let t=w(this,Gt)[e];if(null!=t)return t}};Tr=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,s(ho,"SafeStorage"),I(ho,Tr,void 0);var mo=ho;v();var Yf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Fu(e){return/^[\da-f]{24}$/i.test(e)}function Qy(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],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function cP(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(Qy(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Qy(n)}async function Se(e,t,n,r=!1){return Kr(e,t,n,r,!0)}async function Kr(e,t,n,r=!1,i=!1){let o=cP(e,t,n,r),s=await Lu(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function dP(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 Lu(e,t,n=!1){let r=dP(e,t,n),i=await ft()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function Oe(e,t){e.indexOf(t)<0&&e.push(t)}function Xy([e,t],[n,r]){let i=new Fe(e,t),o=new Fe(n,r);return i.distanceTo(o)}function Yy(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 Fe(n.target.x,n.target.y),o=new Fe(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,R.warn(n),R.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Bi(e){var t;return e instanceof kr?e.entrances.map((e=>e.id)):e instanceof En?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function tb(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=>{R.error(e)}))));await Promise.all(e)}catch(e){R.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||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 Qr(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 nb(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,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function Ou(){return mo.getInstance().loadLocalData("deviceId")}function Su(){return mo.getInstance().loadSessionData("id")}s(Fu,"isGatewayKey"),s(Qy,"stringifyQuery"),s(cP,"buildUrl"),s(Se,"getArray"),s(Kr,"getObject"),s(dP,"constructParamsForRequest"),s(Lu,"generateAPIRequest"),s(Oe,"addToSet"),s(Xy,"getDistanceBetweenLatLon"),s(Yy,"getMapScale"),s(Bi,"getNodesForNavigatable"),s(tb,"populateBundledImagesAsBlobs"),s(Qr,"debounce"),s(nb,"normalizeCategoryRank"),s(Ou,"getDeviceID"),s(Su,"getSessionID");var rb=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 ib(e){var t;let n={...e};for(let[e,r]of Object.entries(Yf))n[e]=(0,eb.default)(r.concat(null!=(t=n[e])?t:[]));return n}function $f(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return ab(this.cover(t,n),t,n,e)}function ab(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},v=e._x0,g=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(v+y)/2))?v=o:y=o,(c=n>=(s=(g+m)/2))?g=s:m=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&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=(v+y)/2))?v=o:y=o,(c=n>=(s=(g+m)/2))?g=s:m=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function ob(e){var t,n,r,i,o=e.length,s=new Array(o),a=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))||(s[n]=r,a[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)ab(this,s[n],a[n],e[n]);return this}function Hf(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 s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){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 Xf(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Kf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Jf(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],v=this._root;for(v&&f.push(new qe(v,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(!(!(v=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(v.length){var g=(i+s)/2,y=(o+a)/2;f.push(new qe(v[3],g,y,s,a),new qe(v[2],i,y,g,a),new qe(v[1],g,o,s,y),new qe(v[0],i,o,g,y)),(u=(t>=y)<<1|e>=g)&&(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,v.data),b=t-+this._y.call(null,v.data),w=m*m+b*b;if(w<n){var _=Math.sqrt(n=w);c=e-_,h=t-_,d=e+_,p=t+_,r=v.data}}return r}function Zf(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,v=this._y0,g=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+g)/2))?f=a:g=a,(c=s>=(l=(v+y)/2))?v=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 sb(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Qf(){return this._root}function eh(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function th(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new qe(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new qe(n,u,c,o,s)),(n=l[2])&&a.push(new qe(n,r,c,u,s)),(n=l[1])&&a.push(new qe(n,u,i,o,c)),(n=l[0])&&a.push(new qe(n,r,i,u,c))}return this}function nh(e){var t,n=[],r=[];for(this._root&&n.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new qe(o,s,a,c,h)),(o=i[1])&&n.push(new qe(o,c,a,l,h)),(o=i[2])&&n.push(new qe(o,s,h,c,u)),(o=i[3])&&n.push(new qe(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 ub(e){return e[0]}function rh(e){return arguments.length?(this._x=e,this):this._x}function lb(e){return e[1]}function ih(e){return arguments.length?(this._y=e,this):this._y}function go(e,t,n){var r=new ah(null==t?ub:t,null==n?lb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function ah(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 cb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(ib,"mergeThings"),v(),v(),v(),v(),s($f,"default"),s(ab,"add"),s(ob,"addAll"),v(),s(Hf,"default"),v(),s(Xf,"default"),v(),s(Kf,"default"),v(),v(),s(qe,"default"),s(Jf,"default"),v(),s(Zf,"default"),s(sb,"removeAll"),v(),s(Qf,"default"),v(),s(eh,"default"),v(),s(th,"default"),v(),s(nh,"default"),v(),s(ub,"defaultX"),s(rh,"default"),v(),s(lb,"defaultY"),s(ih,"default"),s(go,"quadtree"),s(ah,"Quadtree"),s(cb,"leaf_copy");var st=go.prototype=ah.prototype;st.copy=function(){var e,t,n=new ah(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=cb(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]=cb(t));return n},st.add=$f,st.addAll=ob,st.cover=Hf,st.data=Xf,st.extent=Kf,st.find=Jf,st.remove=Zf,st.removeAll=sb,st.root=Qf,st.size=eh,st.visit=th,st.visitAfter=nh,st.x=rh,st.y=ih;var un,Re,Wt=class e{constructor(e){I(this,un,void 0),b(this,"categories"),b(this,"locations"),b(this,"vortexes"),b(this,"maps"),b(this,"nodes"),b(this,"polygons"),b(this,"events"),b(this,"mapGroups"),b(this,"locationStates"),b(this,"rankings"),b(this,"languages",{}),I(this,Re,{}),j(this,un,e)}get polygonsByMapId(){if(w(this,Re).polygonsByMapId)return w(this,Re).polygonsByMapId;let e,t={};for(let n=0,r=w(this,un).polygons.length;n<r;++n)e=w(this,un).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 w(this,Re).polygonsByMapId=n,w(this,Re).polygonsByMapId}get nodesByMapId(){if(w(this,Re).nodesByMapId)return w(this,Re).nodesByMapId;let e,t={};for(let n=0,r=w(this,un).nodes.length;n<r;++n)e=w(this,un).nodes[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 w(this,Re).nodesByMapId=n,w(this,Re).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(w(this,Re).nodeTreesByMap||(w(this,Re).nodeTreesByMap=new Map),!w(this,Re).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=go();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),w(this,Re).nodeTreesByMap.set(e,r)}return w(this,Re).nodeTreesByMap.get(e).find(t.x,t.y)}get locationsByMapId(){if(w(this,Re).locationsByMapId)return w(this,Re).locationsByMapId;let e,t={};for(let n=0,r=w(this,un).locations.length;n<r;++n){e=w(this,un).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 w(this,Re).locationsByMapId=n,w(this,Re).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};un=new WeakMap,Re=new WeakMap,s(Wt,"MappedinCache"),b(Wt,"instances",new Map);var oh=Wt,Qe=oh,Oa=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Oa||{}),Pr={categories:Mr,locations:En,vortexes:Ra,maps:ro,nodes:Ta,polygons:kr,venue:xr,events:Ka,mapGroups:co,themes:Iu,locationStates:eo,rankings:$a},Nu=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Nu||{});v(),v(),v(),v();var ut=6371008.8,db={centimeters:100*ut,centimetres:100*ut,degrees:ut/111325,feet:3.28084*ut,inches:39.37*ut,kilometers:ut/1e3,kilometres:ut/1e3,meters:ut,metres:ut,miles:ut/1609.344,millimeters:1e3*ut,millimetres:1e3*ut,nauticalmiles:ut/1852,radians:1,yards:1.0936*ut},M3={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/ut,yards:1.0936133};function Jn(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 lt(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(!sh(e[0])||!sh(e[1]))throw new Error("coordinates must contain numbers");return Jn({type:"Point",coordinates:e},t,n)}function On(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 Jn({type:"LineString",coordinates:e},t,n)}function Or(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 pb(e,t){void 0===t&&(t="kilometers");var n=db[t];if(!n)throw new Error(t+" units is invalid");return e*n}function fb(e,t){void 0===t&&(t="kilometers");var n=db[t];if(!n)throw new Error(t+" units is invalid");return e/n}function vo(e){return 180*(e%(2*Math.PI))/Math.PI}function ht(e){return e%360*Math.PI/180}function sh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Du(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,v="Feature"===p,g=f?e.features.length:1,y=0;y<g;y++){a=(c=!!(u=f?e.features[y].geometry:v?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<a;m++){var b=0,w=0;if(null!==(s=c?u.geometries[m]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,y,b,w))return!1;d++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,b,w))return!1;d++,"MultiPoint"===_&&b++}"LineString"===_&&b++;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,w))return!1;d++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(w=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,w))return!1;d++}w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Du(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function uh(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 pP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=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,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))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 yo(e,t){pP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Jn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Jn({type:s,coordinates:u},r),n,l))return!1}}))}function fP(e,t){yo(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Du(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=On([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function hb(e,t,n){var r=n,i=!1;return fP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function lh(e){var t=[1/0,1/0,-1/0,-1/0];return Du(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(Jn,"feature"),s(lt,"point"),s(On,"lineString"),s(Or,"featureCollection"),s(pb,"radiansToLength"),s(fb,"lengthToRadians"),s(vo,"radiansToDegrees"),s(ht,"degreesToRadians"),s(sh,"isNumber"),s(Du,"coordEach"),s(uh,"featureEach"),s(pP,"geomEach"),s(yo,"flattenEach"),s(fP,"segmentEach"),s(hb,"segmentReduce"),s(lh,"bbox"),lh.default=lh;var Ru=lh;function ln(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 _t(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 mb(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function hP(e,t,n){void 0===n&&(n={});var r=ln(e),i=ln(t),o=ht(i[1]-r[1]),s=ht(i[0]-r[0]),a=ht(r[1]),l=ht(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return pb(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),s(ln,"getCoord"),s(_t,"getCoords"),s(mb,"getType"),s(hP,"distance");var Zn=hP;function zu(e,t){return void 0===t&&(t={}),hb(e,(function(e,n){var r=n.geometry.coordinates;return e+Zn(r[0],r[1],t)}),0)}function Bu(e,t,n){if(void 0===n&&(n={}),!0===n.final)return mP(e,t);var r=ln(e),i=ln(t),o=ht(r[0]),s=ht(i[0]),a=ht(r[1]),l=ht(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return vo(Math.atan2(u,c))}function mP(e,t){var n=Bu(t,e);return n=(n+180)%360}function Vu(e,t,n,r){void 0===r&&(r={});var i=ln(e),o=ht(i[0]),s=ht(i[1]),a=ht(n),l=fb(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return lt([vo(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),vo(u)],r.properties)}function gP(e){if(!e)throw new Error("geojson is required");var t=[];return yo(e,(function(e){vP(e,t)})),Or(t)}function vP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=_t(r);break;case"LineString":n=[_t(r)]}n.forEach((function(n){yP(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function yP(e,t){var n=[];return e.reduce((function(e,r){var i=On([e,r],t);return i.bbox=bP(e,r),n.push(i),r})),n}function bP(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(zu,"length"),v(),v(),v(),s(Bu,"bearing"),s(mP,"calculateFinalBearing"),v(),s(Vu,"destination"),v(),v(),s(gP,"lineSegment"),s(vP,"lineSegmentFeature"),s(yP,"createSegments"),s(bP,"bbox");var ch=gP,jb=Xt(Ab(),1);function YP(e,t){var n={},r=[];if("LineString"===e.type&&(e=Jn(e)),"LineString"===t.type&&(t=Jn(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=Cb(e,t);return i&&r.push(i),Or(r)}var o=(0,jb.default)();return o.load(ch(t)),uh(ch(e),(function(e){uh(o.search(e),(function(t){var i=Cb(e,t);if(i){var o=_t(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Or(r)}function Cb(e,t){var n=_t(e),r=_t(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],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?lt([i+p*(s-i),o+p*(a-o)]):null}s(YP,"lineIntersect"),s(Cb,"intersects");var Fb=YP;function $P(e,t,n){void 0===n&&(n={});var r=lt([1/0,1/0],{dist:1/0}),i=0;return yo(e,(function(e){for(var o=_t(e),s=0;s<o.length-1;s++){var a=lt(o[s]);a.properties.dist=Zn(t,a,n);var l=lt(o[s+1]);l.properties.dist=Zn(t,l,n);var u=Zn(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Bu(a,l),d=Vu(t,c,h+90,n),p=Vu(t,c,h-90,n),f=Fb(On([d.geometry.coordinates,p.geometry.coordinates]),On([a.geometry.coordinates,l.geometry.coordinates])),v=null;f.features.length>0&&((v=f.features[0]).properties.dist=Zn(t,v,n),v.properties.location=i+Zn(a,v,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),v&&v.properties.dist<r.properties.dist&&((r=v).properties.index=s),i+=u}})),r}s($P,"nearestPointOnLine");var wo=$P;function HP(e,t,n){var r=_t(n);if("LineString"!==mb(n))throw new Error("line must be a LineString");for(var i,o=wo(n,e),s=wo(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),On(a,n.properties)}s(HP,"lineSlice");var Mh=HP;function XP(e,t){void 0===t&&(t={});var n=Ru(e);return lt([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),s(XP,"center");var Lb=XP;function KP(e,t,n){void 0===n&&(n={});for(var r=ln(e),i=_t(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),JP(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function JP(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*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?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}v(),s(KP,"booleanPointOnLine"),s(JP,"isPointOnLineSegment");var Nb=KP,ZP=1e-7,Db=.005,Rb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function xh(e,t){let n=nO(t);return Or(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=QP(t,o)),e.push(...r),e}),[]))}function QP(e,t){return t.reduce(((e,t)=>{let n={epsilon:ZP},r=e.findIndex((e=>Nb(Lb(t),e,n))),i=e[r];if(i){let[n,o]=tO(i,t);e.splice(r,1,n,o)}return e}),[e])}function eO(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function tO(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>wo(e,lt(t))));return r.reduce(((t,n)=>{let r=Mh(lt(n),i[0],e),o=Mh(lt(n),i[1],e),s=zu(r)<zu(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function zb(e){let t=new Map;for(let n in e){let r=e[n];if(!eO(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function nO(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Bb(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 EO(e){if(null==e||"object"!=typeof e)return!1;for(let t of Rb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function TO(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function E0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Hh(),$h)))).unzipSync(e);if(!TO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function Kh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Hh(),$h)))).unzipSync(e);if(!EO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function T0(e){let[t,n,r,i]=Ru(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function PO(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(xh,"processObstructions"),s(QP,"splitObstructionByAllEntrances"),s(eO,"isPolygonStyle"),s(tO,"splitObstructionByEntrance"),s(zb,"getStylesMap"),s(nO,"getEntranceMap"),v(),v(),s(Bb,"findMapWithElevationClosestToZero"),s(EO,"validateStaticMVFFiles"),s(TO,"validateStaticMVFv1Files"),s(E0,"unzipMVFv1"),s(Kh,"unzipMVF"),s(T0,"getMapExtent"),s(PO,"convertMap");var Zh=class{constructor(e){b(this,"mapExtent"),b(this,"stretchRatio"),b(this,"midLat"),b(this,"midLong"),b(this,"mapUnitRatio",1e6),b(this,"latDistance"),b(this,"longDistance"),b(this,"mapScale"),b(this,"widthInMapUnits"),b(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new Fe(o,i),l=new Fe(o,n),u=new Fe(t,s),c=new Fe(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,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(Zh,"CoordinateConverter");var rl=Zh;function OO(e,t){let n=new Map,r=[];return e.features.forEach((e=>{let t=e.properties.id;t&&!n.has(t)&&n.set(t,e)})),n.forEach(((e,i)=>{let o=e.properties.map||"",s=t.get(o);if(s){let t=s.convert(e.geometry.coordinates),a=e.properties.externalId||"",l=[];e.properties.neighbors.forEach((e=>{var t;let r=null!=(t=e.weight)?t:0,i=n.get(e.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),r.push({id:i,map:o,externalId:a,paths:l,...t})}})),r}function SO(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(OO,"convertNodes"),s(SO,"convertNodes_MVFv1");var M0=s(((e,t,n,r,i,o)=>{var s,a;let l,u=[],c=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,h=i.Walls,d=i.ExteriorWalls,p={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/c},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.color)||"#000000"},vertexes:[]},f={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/c},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let h=t.features[i];if("Point"===h.geometry.type)continue;let d="desk-entrance"===(null==(s=h.properties.kind)?void 0:s.toLowerCase()),v=(d?h.properties.externalId:h.properties.id)||"",g=h.properties.externalId||"",y=n.get(v)||[];if("destinationNodes"in h.properties&&h.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(g,y);else{let n=r.get(h.properties.id),s=h.properties.center?o.convert(h.properties.center):void 0,d=h.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=h.properties.kind||"",b="void"===m.toLowerCase(),w=1-(i+1)/t.features.length*Db;"LineString"===h.geometry.type&&"wall"===(null==(a=h.properties.kind)?void 0:a.toLowerCase())?(l=h.geometry.coordinates.map((e=>o.convert(e))),h.properties.footprintComponent?f.vertexes.push(l):p.vertexes.push(l)):(l=h.geometry.coordinates[0].map((e=>o.convert(e))),u.push({entrances:y,map:e,id:v,externalId:g,layer:m,geometry:{visible:!b,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/c*w},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:l,center:s,holes:d}))}}return p.vertexes.length>0&&u.push(p),f.vertexes.length>0&&u.push(f),u}),"generateMappedinPolygons"),x0=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))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=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/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function IO(e,t,n,r,i,o,s){let a=M0(e,n,r,i,o,s),l=M0(e,t,r,i,o,s);return a.concat(l)}function AO(e){let t=[];return e.forEach((e=>{var n;t.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(n=e.accessible)&&n})})),t}function CO(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,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!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function P0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function Jh(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function O0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function S0(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 I0(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 A0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Xh(e,t,n){let r=I0(e,t);for(let e of r){let t=A0(e);null==n[t]&&(n[t]={id:t,name:e})}}function C0(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 jO(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return C0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function Oo(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!C0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=jO(t),s=S0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=I0(e,t);for(let e of a){let t=A0(e);r[s].categories.push(t)}}function FO(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:v,obstruction:g}=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=v[e.id])?void 0:i.features)?o:[],m=null!=(a=null==(s=g[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Xh("space",t,d),Oo("space",t,e,h));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(Xh("entrance",t,d),Oo("entrance",t,e,h));let w={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};Oo("entrance",w,e,h);for(let n of m){if(Xh("obstruction",n,d),Oo("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=b.get(n);t&&Oo("entrance",{...t,properties:{...t.properties,externalId:w.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=S0("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 j0(e){var t,n,r,i,o,s,a,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:[],v=null!=(o=e["map.geojson"])?o:[],g=null!=(s=e["styles.json"])?s:{},y=null!=(a=e["manifest.geojson"])?a:{},m=null!=(l=e["node.geojson"])?l:[],b=null!=(u=e["connection.json"])?u:[],w={},_=new Map,M=[],x=zb(g),S=new Map,k=new Map;v.forEach((e=>{let t=e.id;t&&!k.has(t)&&k.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!k.has(e))return;let t=xh(h[e],p[e]);if(t.features.length){let n=T0(t),r=new rl(n);_.set(e,r),w[e]=IO(e,t,d[e],S,x,g,r),M.push(PO(k.get(e),w[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let O=Object.values(w).flat(),I=AO(b),E=OO(m,_),A=y.features[0],C=A.properties.name,P=A.geometry.coordinates[0],T=A.geometry.coordinates[1],j=(null==(c=Bb(M))?void 0:c.id)||"",{locations:F,categories:N}=FO(e,S);return{polygons:O,venue:{name:C,latitude:T,longitude:P,defaultMap:j},maps:M,vortexes:I,nodes:E,locations:F,mapGroups:[],locationStates:[],categories:N,themes:[],imageBinaries:new Map}}function F0(e){var t,n,r,i,o,s,a;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!=(s=e.connection)?s:{},f={},v=new Map,g=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=xh(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=T0(t),r=new rl(n);v.set(e,r);let i=x0(e,u[e],r),o=x0(e,t,r);f[e]=i.concat(o),y=y.concat(SO(c[e],e,r)),g.push(LO(h[e],f[e],r))}m=m.concat(CO(p[e]))}));let b=Object.values(f).flat(),w=d.features[0],_=w.properties.name,M=w.geometry.coordinates[0],x=w.geometry.coordinates[1],S=(null==(a=g[0])?void 0:a.id)||"",k=new Map;b.forEach((e=>k.set(e.id,e)));let O=[],I=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>k.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),O=e}}return{...e.properties,nodes:O,polygons:e.properties.spaces}})),E=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:_,latitude:x,longitude:M,defaultMap:S},maps:g,vortexes:m,nodes:y,locations:I,mapGroups:[],locationStates:[],categories:E,themes:[],imageBinaries:new Map}}function LO(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 s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(IO,"convertPolygons"),s(AO,"convertVortexes"),s(CO,"convertVortexes_MVFv1"),s(P0,"overrideMVF"),s(Jh,"parseMVF"),s(O0,"parseMVFv1"),s(S0,"getLocationId"),s(I0,"getFeatureCategories"),s(A0,"getCategoryIdFromName"),s(Xh,"mutateCategoriesWithNewFeature"),s(C0,"isFeatureConnection"),s(jO,"getLocationLabel"),s(Oo,"mutateLocationsWithNewFeature"),s(FO,"createMetaDataFromMVF"),s(j0,"convertMVFToMappedin"),s(F0,"convertMVFv1ToMappedin"),s(LO,"convertMap_MVFv1"),v();var ew,So,hi,mi,Io,gi,vi,yi,rr,bi,wi,ki,Ao,_i,Ir,tw=Xt(Q0()),WO=null==(ew=null==T?void 0:T.env)?void 0:ew.npm_package_version,il=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],tm=il[0],YO=!1,Yt=class e{constructor(e){var t;I(this,So,void 0),I(this,hi,void 0),I(this,mi,void 0),I(this,Io,void 0),I(this,gi,void 0),I(this,vi,void 0),I(this,yi,void 0),I(this,rr,void 0),I(this,bi,void 0),I(this,wi,void 0),I(this,ki,void 0),I(this,Ao,void 0),I(this,_i,void 0),I(this,Ir,void 0),j(this,rr,e.clientId),j(this,bi,e.clientSecret),j(this,wi,e.accessToken),j(this,yi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!w(this,yi)&&w(this,rr)&&!Fu(w(this,rr))&&(n="https://web-proxy.mappedin.com/a/"),j(this,mi,n),j(this,mi,w(this,mi)+(e.venue+"/")),j(this,_i,e.venue),j(this,hi,!1),j(this,So,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),j(this,Io,il.find((t=>t===e.context))||il[0]),j(this,gi,Ou()),j(this,vi,Su()),j(this,ki,new Set),j(this,Ao,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Qr(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:w(this,hi)};w(this,Ir)&&(n={...n,...w(this,Ir)});let r=w(this,mi)+e+"?"+tw.default.stringify(n,{skipEmptyString:!0,skipNull:!0});if(YO&&R.log("Analytics.track",r),w(this,So))return;let i={"mi-context":tm||w(this,Io),"mi-session":w(this,vi),"mi-device":w(this,gi),"mappedin-sdk-version":WO,"mappedin-platform-version":w(this,Ao)};w(this,wi)?i.Authorization="Bearer ".concat(w(this,wi)):w(this,yi)||w(this,bi)&&w(this,rr)&&(i["x-mappedin-key"]=btoa(w(this,rr)),i["x-mappedin-secret"]=btoa(w(this,bi))),ft()(r,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){j(this,Ir,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;Me.addPendingEvent(new Ki({venue:w(this,_i)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;Me.addPendingEvent(new Xi({venue:w(this,_i)})),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 w(this,vi)}getDeviceID(){return w(this,gi)}setGeolocationMode(e){j(this,hi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!w(this,ki).has(t)&&(this.track(t),w(this,ki).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=il.find((t=>t===e));t&&(tm=t)}static clearContext(){tm=void 0}static destroy(){e.instance=null}};So=new WeakMap,hi=new WeakMap,mi=new WeakMap,Io=new WeakMap,gi=new WeakMap,vi=new WeakMap,yi=new WeakMap,rr=new WeakMap,bi=new WeakMap,wi=new WeakMap,ki=new WeakMap,Ao=new WeakMap,_i=new WeakMap,Ir=new WeakMap,s(Yt,"Analytics"),b(Yt,"instance",null),b(Yt,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var nm=Yt,Co=nm;v();var rm=class{constructor(){b(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(rm,"PubSub");var jn,Mi,Ar,xi,jo,im,ol,nw,al=rm,am={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},om=class extends al{constructor(e){super(),I(this,jo),I(this,ol),b(this,"perspective"),b(this,"things"),b(this,"options"),I(this,jn,void 0),I(this,Mi,""),b(this,"updatedAt"),b(this,"categories",[]),b(this,"locations",[]),b(this,"vortexes",[]),b(this,"maps",[]),b(this,"nodes",[]),b(this,"polygons",[]),b(this,"venue",{}),b(this,"events",[]),b(this,"mapGroups",[]),b(this,"themes",[]),b(this,"locationStates",[]),b(this,"rankings"),b(this,"currentLanguage"),I(this,Ar,{}),b(this,"_categoriesById"),b(this,"_locationsById"),b(this,"_vortexesById"),b(this,"_mapsById"),b(this,"_nodesById"),b(this,"_polygonsById"),b(this,"_eventsById"),b(this,"_mapGroupsById"),b(this,"_locationStatesById"),b(this,"_locationRankingsById"),b(this,"_rankingsById"),b(this,"_categoriesByExternalId"),b(this,"_locationsByExternalId"),b(this,"_vortexesByExternalId"),b(this,"_mapsByExternalId"),b(this,"_nodesByExternalId"),b(this,"_polygonsByExternalId"),b(this,"_eventsByExternalId"),b(this,"_mapGroupsByExternalId"),b(this,"_locationStatesByExternalId"),b(this,"_locationRankingsByExternalId"),b(this,"_rankingsByExternalId"),I(this,xi,void 0),b(this,"images"),b(this,"imageBinaries"),b(this,"scenes"),b(this,"analytics"),b(this,"navigator"),this.options=e,j(this,jn,Qe.create(this));let t=Co.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Ag,"true")}})}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=w(this,jn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.externalId]=e)),w(this,jn)[n]=t,t}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=w(this,jn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),w(this,jn)[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=j0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=F0(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var n;if(this.currentLanguage.code!==e){if(null==(n=this.venue.languages)||!n.find((t=>t.code===e)))return void R.error("Language ".concat(e," not found in venue ").concat(this.venue.slug));if(t&&!w(this,Ar)[this.currentLanguage.code]&&(w(this,Ar)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),Qe.clearInstance(this),j(this,jn,Qe.create(this)),this.currentLanguage=this.venue.languages.find((t=>t.code===e)),null!=w(this,Ar)[e]){let t=JSON.parse(w(this,Ar)[e]);await this.hydrate(t)}else this.options.language=this.currentLanguage.code,await this.fetch();this.publish(0,this.currentLanguage)}}async hydrate(e,t){let n;if("string"==typeof e)try{j(this,Mi,e),n=JSON.parse(e)}catch(e){return void R.error("Unable to parse JSON",e)}else n=e,j(this,Mi,JSON.stringify(n));let r=Object.keys(n);for(let e=0,t=r.length;e<t;++e){let t=r[e],i=n[t];null!=Pr[t]&&"function"==typeof Pr[t].hydrate&&(this[t]=Pr[t].hydrate(i,this))}t&&await tb(n);let{images:i,scenes:o,imageBinaries:s}=n;this.images=i,this.scenes=o,this.imageBinaries=s,this.generateGetters(r),ye(this,jo,im).call(this),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Fu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:e}=this.options,t=[],n=Object.keys(e);for(let e=0,r=n.length;e<r;++e){let r=n[e];Pr[r]&&t.push(Pr[r].fetch(this).then((e=>(this[r]=e,Promise.resolve()))))}return t.push(Kr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>j(this,xi,e.token)),(()=>Promise.resolve()))),this.generateGetters(n),Promise.all(t).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,ye(this,jo,im).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Jl({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}toJSON(){var e;let t={};for(let e in Pr)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let n={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(n.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete n.locationRankings,n}toString(){return w(this,Mi)||JSON.stringify(this.toJSON())}};jn=new WeakMap,Mi=new WeakMap,Ar=new WeakMap,xi=new WeakMap,jo=new WeakSet,im=s((function(){w(this,xi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(w(this,xi)))})),ye(this,ol,nw).call(this)}),"#transformData"),ol=new WeakSet,nw=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=rb(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=nb(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(om,"Mappedin");var kt=om;v(),v();var ze=s((function(){return ze=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"),ze.apply(this,arguments)}),"__assign");function oe(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 Xe(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(oe,"__values"),s(Xe,"__read");var Fo,$O="ENTRIES",lw="KEYS",cw="VALUES",Ke="",sm=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=Ei(this._path),t=e.node,n=e.keys;if(Ei(n)===Ke)return{done:!1,value:this.result()};var r=t.get(Ei(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=Ei(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 Ei(t)})).filter((function(e){return e!==Ke})).join("")},e.prototype.value=function(){return Ei(this._path).node.get(Ke)},e.prototype.result=function(){switch(this._type){case cw:return this.value();case lw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),Ei=s((function(e){return e[e.length-1]}),"last$1"),HO=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return dw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),dw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=oe(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===Ke){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var v=o,g=0;g<p.length;++g,++v){for(var y=p[g],m=s*v,b=m-s,w=i[m],_=Math.max(0,v-n-1),M=Math.min(s-1,v+n),x=_;x<M;++x){var S=y!==t[x],k=i[b+x]+ +S,O=i[b+x+1]+1,I=i[m+x]+1,E=i[m+x+1]=Math.min(k,O,I);E<w&&(w=E)}if(w>n)continue e}dw(e.get(p),t,n,r,i,v,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),um=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(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=Xe(ul(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=Xe(fm(s),2),l=a[0],u=a[1];try{for(var c=oe(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==Ke&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,XO(this._tree,e)},e.prototype.entries=function(){return new sm(this,$O)},e.prototype.forEach=function(e){var t,n;try{for(var r=oe(this),i=r.next();!i.done;i=r.next()){var o=Xe(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return HO(this._tree,e,t)},e.prototype.get=function(e){var t=pm(this._tree,e);return void 0!==t?t.get(Ke):void 0},e.prototype.has=function(e){var t=pm(this._tree,e);return void 0!==t&&t.has(Ke)},e.prototype.keys=function(){return new sm(this,lw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,lm(this._tree,e).set(Ke,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=lm(this._tree,e);return n.set(Ke,t(n.get(Ke))),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=lm(this._tree,e),r=n.get(Ke);return void 0===r&&n.set(Ke,r=t()),r},e.prototype.values=function(){return new sm(this,cw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),ul=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=oe(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==Ke&&t.startsWith(a))return n.push([e,a]),ul(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),ul(void 0,"",n)}),"trackDown"),pm=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=oe(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==Ke&&t.startsWith(s))return pm(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),lm=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,oe(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==Ke&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),XO=s((function(e,t){var n=Xe(ul(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(Ke),0===r.size)pw(i);else if(1===r.size){var o=Xe(r.entries().next().value,2),s=o[0],a=o[1];fw(i,s,a)}}),"remove"),pw=s((function(e){if(0!==e.length){var t=Xe(fm(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)pw(e.slice(0,-1));else if(1===n.size){var i=Xe(n.entries().next().value,2),o=i[0],s=i[1];o!==Ke&&fw(e.slice(0,-1),o,s)}}}),"cleanup"),fw=s((function(e,t,n){if(0!==e.length){var r=Xe(fm(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),fm=s((function(e){return e[e.length-1]}),"last"),hm="or",KO="and",JO="and_not",Cr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=ze(ze(ze({},dm),e),{searchOptions:ze(ze({},aw),e.searchOptions||{})}),this._index=new um,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(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=oe(u),f=p.next();!f.done;f=p.next()){var v=f.value,g=s(e,v);if(null!=g){var y=a(g.toString(),v),m=this._fieldIds[v],b=new Set(y).size;this.addFieldLength(d,m,this._documentCount-1,b);try{for(var w=(r=void 0,oe(y)),_=w.next();!_.done;_=w.next()){var M=l(_.value,v);M&&this.addTerm(m,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.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()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=oe(this._documentIds),v=f.next();!v.done;v=f.next()){var g=Xe(v.value,2),y=g[0];if(p===g[1]){try{for(var m=(r=void 0,oe(h)),b=m.next();!b.done;b=m.next()){var w=b.value,_=c(e,w);if(null!=_){var M=l(_.toString(),w),x=this._fieldIds[w],S=new Set(M).size;this.removeFieldLength(y,x,this._documentCount,S);try{for(var k=(o=void 0,oe(M)),O=k.next();!O.done;O=k.next()){var I=u(O.value,w);I&&this.removeTerm(x,y,I)}}catch(e){o={error:e}}finally{try{O&&!O.done&&(s=k.return)&&s.call(k)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new um,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=oe(i),a=s.next();!a.done;a=s.next()){var l=Xe(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,v={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(v,this._storedFields.get(u)),(null==t.filter||t.filter(v))&&o.push(v)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(sw),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=ze(ze({},nS),t);var s=new Map;try{for(var a=oe(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(m=u.terms).join(" ");null!=(g=s.get(h))?(g.score+=c,g.count+=1):s.set(h,{score:c,terms:m,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=oe(s),f=p.next();!f.done;f=p.next()){var v=Xe(f.value,2),g=v[0],y=v[1],m=(c=y.score,y.terms),b=y.count;d.push({suggestion:g,terms:m,score:c/b})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(sw),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(dm.hasOwnProperty(e))return cm(dm,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,v=t.serializationVersion;if(1!==v&&2!==v)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var g=new e(n);g._documentCount=l,g._nextId=u,g._documentIds=sl(c),g._fieldIds=h,g._fieldLength=sl(d),g._avgFieldLength=p,g._storedFields=sl(f),g._index=new um;try{for(var y=oe(a),m=y.next();!m.done;m=y.next()){var b=Xe(m.value,2),w=b[0],_=b[1],M=new Map;try{for(var x=(o=void 0,oe(Object.keys(_))),S=x.next();!S.done;S=x.next()){var k=S.value,O=_[k];1===v&&(O=O.ds),M.set(parseInt(k,10),sl(O))}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}g._index.set(w,M)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return g},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=ze(ze(ze({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=ze(ze({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(tS(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=ze(ze({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return ze(ze({},e),((n={})[t]=cm(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=ze(ze({},aw.weights),h),f=p.fuzzy,v=p.prefix,g=this._index.get(e.term),y=this.termResults(e.term,e.term,1,g,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var m=!0===e.fuzzy?.2:e.fuzzy,b=m<1?Math.min(d,Math.round(e.term.length*m)):m;b&&(a=this._index.fuzzyGet(e.term,b))}if(s)try{for(var w=oe(s),_=w.next();!_.done;_=w.next()){var M=Xe(_.value,2),x=M[0],S=M[1];if(E=x.length-e.term.length){null==a||a.delete(x);var k=v*x.length/(x.length+.3*E);this.termResults(e.term,x,k,S,u,c,y)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(a)try{for(var O=oe(a.keys()),I=O.next();!I.done;I=O.next()){x=I.value;var E,A=Xe(a.get(x),2),C=A[0];if(E=A[1]){k=f*x.length/(x.length+E);this.termResults(e.term,x,k,C,u,c,y)}}}catch(e){i={error:e}}finally{try{I&&!I.done&&(o=O.return)&&o.call(O)}finally{if(i)throw i.error}}return y},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=hm),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(ZO[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=oe(this._index),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,oe(u)),d=h.next();!d.done;d=h.next()){var p=Xe(d.value,2),f=p[0],v=p[1];c[f]=Object.fromEntries(v)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}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:i,serializationVersion:2}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=oe(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,v=i[f],g=this._fieldIds[f],y=r.get(g);if(null!=y){var m=y.size,b=this._avgFieldLength[g];try{for(var w=(u=void 0,oe(y.keys())),_=w.next();!_.done;_=w.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var S=y.get(M),k=this._fieldLength.get(M)[g],O=n*v*x*eS(S,m,this._documentCount,k,b),I=s.get(M);if(I){I.score+=O,rS(I.terms,e);var E=cm(I.match,t);E?E.push(f):I.match[t]=[f]}else s.set(M,{score:O,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,uw),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)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,uw),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)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=oe(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.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)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=oe(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),cm=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),ZO=((Fo={})[hm]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),ow(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Fo[KO]=function(e,t){var n,r,i=new Map;try{for(var o=oe(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;ow(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Fo[JO]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Fo),rw=1.2,iw=.7,QO=.5,eS=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(QO+e*(rw+1)/(e+rw*(1-iw+iw*r/i)))}),"calcBM25Score"),tS=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"),dm={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(iS)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},aw={combineWith:hm,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},nS={prefix:function(e,t,n){return t===n.length-1}},rS=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),ow=s((function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),sw=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),uw=s((function(){return new Map}),"createMap"),sl=s((function(e){var t,n,r=new Map;try{for(var i=oe(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),iS=/[\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;v();var aS=["0","1","2","3","4","5","6","7","8","9"],oS=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],sS=["0","1","2","3","4","5","6","7","8","9"],uS=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],k6=[...aS,...oS,...sS,...uS],hw=["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 lS=32,vt=!1,cS=120,mm=0,vm=class{constructor(e){b(this,"_callback"),b(this,"_frameCount"),b(this,"_ordering"),b(this,"_supersededBy"),b(this,"name"),b(this,"_remainingFrameCount"),b(this,"_lastFrameTime"),b(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,vt&&R.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(vm,"FrameUpdate");var ll=vm,ym=class{constructor(e){if(b(this,"_postponed"),b(this,"userdata"),b(this,"_priority"),b(this,"_group"),b(this,"name"),b(this,"_lastFrameTime"),b(this,"_callback"),b(this,"_complete"),b(this,"_scheduled"),b(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,vt&&R.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(ym,"FrameTask");var Fn=ym,bm=class{constructor(e){b(this,"_postponed"),b(this,"_onComplete"),b(this,"_priority"),b(this,"userdata"),b(this,"name"),b(this,"_tasks"),b(this,"_scheduledTasks"),b(this,"_scheduled"),b(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,vt&&R.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(bm,"FrameTaskGroup");var cl=bm,wm=class{constructor(e){b(this,"_maxMillisecondsPerFrame"),b(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:lS,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(wm,"RealTimeTimer");var gm=wm,km=class{constructor(e){var t;b(this,"_raf"),b(this,"options"),b(this,"_timer"),b(this,"_performance"),b(this,"_scheduledUpdatesByOrdering"),b(this,"_scheduledTasksByPriority"),b(this,"_postponedTasks"),b(this,"_requestAnimationFrameHandle"),b(this,"_updatesToRunThisFrame"),b(this,"_lastFrameTime",0),b(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new gm,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),vt&&R.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 Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),vt&&R.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;vt&&(0===mm&&(r=!0),++mm,mm%=cS);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&&R.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&&R.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&&R.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;R.assert(void 0!==n),Object.getPrototypeOf(n)===cl.prototype&&(r=n,n=r._popTask()),R.assert(void 0!==n),R.assert(Object.getPrototypeOf(n)===Fn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),vt&&R.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),vt&&R.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)===cl)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,vt&&R.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),vt&&R.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)===Fn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),vt&&R.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)===Fn.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)===Fn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,vt&&R.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)===Fn.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)===Fn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),vt&&R.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Fn.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,vt&&R.log("task priority changed",e.name,t)}};s(km,"TaskScheduler");var dl=km,_m=class{constructor(){b(this,"_map"),b(this,"_size"),b(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(R.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 R.assert(e===this._size),e}};s(_m,"Multimap");var Ti=_m,Ln=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),dS=/([!-/:-@])|(?:[\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 pS(e){return e.split(dS).filter(Boolean)}s(pS,"tokenizeAndCaptureDelimiters");var Nn,Nt,ir,fn,Ie,Lo,No,Oi,Do,Ro,zo,Bo,Si,Dn,pl,fl,ar,Vo,hl,ml,gl,gw,Pi="",fS=.09,hS=1,mS=.025,gS=.5,vS=5e-4,yS=5e-4,bS=.01,wS=.05,mw=1,kS=.01,_S=.2,MS={MappedinCategory:"categories",MappedinLocation:"locations"},xS={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:hw,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===T.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:fS,PRIMARY_INDEX_WEIGHT:hS,SECONDARY_INDEX_WEIGHT:mS,CATEGORY_NAME_WEIGHT:gS,LOCATION_NAME_WEIGHT:mw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:vS,CATEGORY_LOCATION_TAGS_WEIGHT:yS,CATEGORY_LOCATION_NAME_WEIGHT:bS,PRIMARY_INDEX_TAGS_NAME_WEIGHT:wS,LOCATION_DEFAULT_RANK:mw,RATIO_OF_FUZZY_TO_EXACT:kS,RATIO_OF_PREFIX_TO_EXACT:_S}},xm=class{constructor(e,t){var n;I(this,gl),I(this,Nn,void 0),I(this,Nt,void 0),I(this,ir,void 0),I(this,fn,void 0),I(this,Ie,void 0),I(this,Lo,new dl({performance:!0})),I(this,No,void 0),I(this,Oi,void 0),I(this,Do,new Map),I(this,Ro,void 0),I(this,zo,void 0),I(this,Bo,void 0),b(this,"buildIndices",s((()=>{var e,t;j(this,ar,new Promise((e=>{j(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:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=w(this,Ie).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:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:pS},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=w(this,No))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={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=w(this,Ie))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=w(this,Ie))?void 0:t.jsonIndex);j(this,Nt,Cr.loadJS(e,u)),j(this,ir,Cr.loadJS(n,c)),j(this,fn,Cr.loadJS(r,h))}else j(this,Nt,new Cr(u)),j(this,ir,new Cr(c)),j(this,fn,new Cr(h)),w(this,Nn).locations.forEach(w(this,pl)),w(this,Nn).categories.forEach(w(this,fl));w(this,Lo).update(performance.now())}),"buildIndices")),I(this,Si,0),I(this,Dn,s((e=>{yl(this,Si)._++,w(this,Lo).scheduleUpdate(new ll({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),yl(this,Si)._--,0===w(this,Si)&&w(this,Vo).call(this)}}))}),"#addTask")),I(this,pl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=w(this,Ie).constants,a=o;null!=(t=w(this,Ie))&&t.useLocationRank&&(a=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),w(this,Dn).call(this,(()=>{w(this,Nt).add({name:Ln(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:a})})),null!=(n=w(this,Ie))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{w(this,Nt).add({name:"",tag:Ln(t),id:"MappedinLocation_"+e.id,weight:s,rank:a})})),null!=(r=w(this,Ie))&&r.searchDescriptions&&w(this,Dn).call(this,(()=>w(this,ir).add({description:Ln(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:a})))}),"#processLocation")),I(this,fl,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=w(this,Ie).constants;w(this,Dn).call(this,(()=>w(this,Nt).add({name:Ln(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(Pi," ")+t.name),"")+" ".concat(Pi);if(null!=(t=w(this,Ie))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&w(this,Dn).call(this,(()=>w(this,fn).add({id:"MappedinCategory_"+e.id,"category.locations.description":Ln(t.description),ref:t.name,weight:r})))})),null!=(n=w(this,Ie))&&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(Pi," ")+t),""))+" ".concat(Pi)}),"");w(this,Dn).call(this,(()=>w(this,fn).add({"category.locations.tags":Ln(t),id:"MappedinCategory_"+e.id,weight:i})))}w(this,Dn).call(this,(()=>w(this,fn).add({"category.locations.name":Ln(a),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),I(this,ar,void 0),I(this,Vo,void 0),I(this,hl,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("_"),u=r||w(this,Nn).getCollectionItemById(MS[a],l);return s&&null!=(t=w(this,Ie))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),I(this,ml,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(Pi,"]* ")+n+" [^".concat(Pi,"]*"),"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")),j(this,Oi,Co.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),j(this,Ie,{...xS,...t}),j(this,Nn,e),j(this,No,new Set(null==(n=w(this,Ie))?void 0:n.stopWords));let r=w(this,Nn).venue.slug;w(this,Nn).on(0,this.buildIndices),this.buildIndices(),j(this,Ro,Qr((e=>{w(this,Oi).trackSearchSuggest({query:e}),Me.addPendingEvent(new ca({venue:r}))}),300)),j(this,zo,Qr((e=>{w(this,Oi).trackSearch({query:e}),Me.addPendingEvent(new la({venue:r}))}),300)),j(this,Bo,Qr((()=>{Me.addPendingEvent(new sa({venue:r}))}),300)),Me.addPendingEvent(new ua({search_descriptions:w(this,Ie).searchDescriptions,search_tags:w(this,Ie).searchTags,search_descriptions_in_categories:w(this,Ie).searchDescriptionsInCategories,search_tags_in_categories:w(this,Ie).searchTagsInCategories,use_location_rank:w(this,Ie).useLocationRank,venue:r}))}async suggest(e){await w(this,ar);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}=w(this,Ie).constants,s=w(this,Nt).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 w(this,Ro).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await w(this,ar);let t=ye(this,gl,gw).call(this,e);return w(this,zo).call(this,e),t}async toJSON(){return await w(this,ar),JSON.stringify({primary:w(this,Nt),secondary:w(this,ir),extra:w(this,fn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await w(this,ar),t=i instanceof En?"MappedinLocation":i instanceof Mr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=w(this,Do).get(i),n||(n="Custom_"+Pn(),w(this,Do).set(i,n))),w(this,Nt).add({id:n,weight:o,object:i,query:Ln(r)}),w(this,Bo).call(this)}};Nn=new WeakMap,Nt=new WeakMap,ir=new WeakMap,fn=new WeakMap,Ie=new WeakMap,Lo=new WeakMap,No=new WeakMap,Oi=new WeakMap,Do=new WeakMap,Ro=new WeakMap,zo=new WeakMap,Bo=new WeakMap,Si=new WeakMap,Dn=new WeakMap,pl=new WeakMap,fl=new WeakMap,ar=new WeakMap,Vo=new WeakMap,hl=new WeakMap,ml=new WeakMap,gl=new WeakSet,gw=s((function(e){let t=[],n=Ln(e);t=[...w(this,Nt).search(n),...w(this,ir).search(n),...w(this,fn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=w(this,hl).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},w(this,ml).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(xm,"OfflineSearch");var Mm=xm;v();var vw=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(vw||{}),Em=globalThis.fetch;function ft(){if(null==Em)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Em}function H6(e){Em=e}s(ft,"isomorphicFetch"),s(H6,"setFetchFn");var yw,ES=null==(yw=null==T?void 0:T.env)?void 0:yw.npm_package_version;globalThis.btoa||(globalThis.btoa=bw.encode);var TS=["ar"];function or(e){let t={...am,...e};return t.headers={...t.headers,"mappedin-sdk-version":ES},t.things=ib("things"in e?e.things:void 0),"platformString"in e&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization="Bearer ".concat(t.accessToken):t.clientId&&t.clientSecret&&(t.authorization="Basic ".concat(globalThis.btoa("".concat(t.clientId,":").concat(t.clientSecret))))),t}function ww(e){return e.endsWith("/")?e:"".concat(e,"/")}async function e4(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=or(t),r=new kt(n),i=await IS(n);if("1.0.0"===n.version){let e=O0(await E0(i));return r.hydrateFromMVFv1(e),r}let o=P0(Jh(await Kh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),Me.addPendingEvent(new Zi({venue:n.venue})),r}async function t4(e){let t={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,...e},n=or({...t}),r=new kt(n);try{if(!n.key)throw new Error("key is required.");if(!n.secret)throw new Error("secret is required.");if(!n.mapId)throw new Error("mapId is required.");let{access_token:i}=await AS(e),o=await jS(n,i),s=Jh(await Kh(o));"function"==typeof t.onMVFParsed&&t.onMVFParsed(s),r.hydrateFromMVF(s)}catch(e){R.error("Failed to get Maker map data.",e)}return r}async function PS(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=or({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new kt({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,Me.addPendingEvent(new Ji({venue:n.venue})),i}async function n4(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new kt({...t,baseUrl:t.baseUrl+n}),i=await xr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function r4(e){PS=e}s(or,"parseOptions"),s(ww,"normalizeUrl"),s(e4,"getVenueMVF"),s(t4,"getVenueMaker"),s(PS,"getVenue"),s(n4,"getVenueMetadata"),s(r4,"__setGetVenueMock");var Tm={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function i4(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),{url:n,updated_at:r}=await OS(e),i=await ft()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new kt(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function OS(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&TS.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await Lu(t,i)}async function a4(e,{url:t,updated_at:n}){let r=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),i=await ft()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new kt(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function SS(e){var t;let n=or({baseUrl:"https://api-gateway.mappedin.com/",...am,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await Lu(n,r)}async function IS(e){return new Promise((async(t,n)=>{try{let{url:n}=await SS(e),r=await ft()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function AS(e){let t="".concat(e.authBaseUri?ww(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await ft()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function CS(e,t){let n="".concat(e.bundleBaseUri?ww(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await ft()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function jS(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await CS(e,t),i=await ft()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function o4(e,t=!0){let n=new kt({venue:""});return await n.hydrate(e,t),n}async function s4(e){let t=new kt({venue:""});return await t.hydrateFromMVF(e),t}s(i4,"getVenueBundle"),s(OS,"getVenueBundleURL"),s(a4,"downloadBundle"),s(SS,"getVenueMVFURL"),s(IS,"downloadVenueBundleMVF"),s(AS,"getMakerAccessToken"),s(CS,"getMakerBundleURL"),s(jS,"downloadMVF"),s(o4,"hydrateVenue"),s(s4,"hydrateVenueMVF");export{Co as CustomerAnalytics,Nu as GET_VENUE_EVENT,vw as MAP_RENDER_MODE,kt as Mappedin,Mr as MappedinCategory,Oa as MappedinCollectionType,Er as MappedinCoordinate,Ot as MappedinDestinationSet,lr as MappedinDirections,Ka as MappedinEvent,En as MappedinLocation,eo as MappedinLocationState,ro as MappedinMap,co as MappedinMapGroup,Jt as MappedinNavigatable,Ta as MappedinNode,kr as MappedinPolygon,$a as MappedinRankings,xr as MappedinVenue,Ra as MappedinVortex,Mm as OfflineSearch,r4 as __setGetVenueMock,Yf as defaultThings,a4 as downloadBundle,jS as downloadMVF,IS as downloadVenueBundleMVF,AS as getMakerAccessToken,CS as getMakerBundleURL,PS as getVenue,i4 as getVenueBundle,OS as getVenueBundleURL,e4 as getVenueMVF,SS as getVenueMVFURL,t4 as getVenueMaker,n4 as getVenueMetadata,o4 as hydrateVenue,s4 as hydrateVenueMVF,ft as isomorphicFetch,or as parseOptions,H6 as setFetchFn};
|
|
1
|
+
var T,kw=Object.create,Ci=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,Mw=Object.getOwnPropertyNames,xw=Object.getPrototypeOf,Ew=Object.prototype.hasOwnProperty,Tw=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>Ci(e,"name",{value:t,configurable:!0}),Om=(e,t)=>()=>(e&&(t=e(e=0)),t),G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pw=(e,t)=>{for(var n in t)Ci(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Mw(t))!Ew.call(e,i)&&i!==n&&Ci(e,i,{get:()=>t[i],enumerable:!(r=_w(t,i))||r.enumerable});return e},Xt=(e,t,n)=>(n=null!=e?kw(xw(e)):{},Ow(!t&&e&&e.__esModule?n:Ci(n,"default",{value:e,enumerable:!0}),e)),b=(e,t,n)=>(Tw(e,"symbol"!=typeof t?t+"":t,n),n),vl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},w=(e,t,n)=>(vl(e,t,"read from private field"),n?n.call(e):t.get(e)),I=(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)},j=(e,t,n,r)=>(vl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),yl=(e,t,n,r)=>({set _(r){j(e,t,r,n)},get _(){return w(e,t,r)}}),ye=(e,t,n)=>(vl(e,t,"access private method"),n),v=Om((()=>{T={env:{NODE_ENV:"production",npm_package_version:"5.30.1"}}})),Sm=G(((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,h=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="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={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,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=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(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"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)})),Ye=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.distanceConversion={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};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Fi=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),Li=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Ni=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Di=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);if(typeof n>"u"||null===n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),Xo=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=r(Fi());function r(e){return e&&e.__esModule?e:{default:e}}function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),_l=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Li()),n=o(Ni()),r=o(Di()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),xl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Li()),n=o(Ni()),r=o(Di()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),Tl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(Xo()),n=i(_l()),r=i(xl());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),es=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Li()),n=a(Ni()),r=a(Di()),i=a(Tl()),o=a(Xo());function a(e){return e&&e.__esModule?e:{default:e}}function l(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),Et=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=i(Fi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),Tt=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=i(Fi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),Kt=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),sr=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),Bm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(sr()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),v=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),g=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(v)),y=(0,i.default)(g);return(y<o.MINLON||y>o.MAXLON)&&(g=(g+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(g)),{latitude:(0,i.default)(v),longitude:y}}),"computeDestinationPoint");e.default=l})),Vm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),qm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),Um=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ye(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),Ym=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(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 i(e,t)}}function i(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}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),Al=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),zn=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(Al()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),Cl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),Km=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Cl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),Qm=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Kt()),n=o(Et()),r=o(Tt()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Ll=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Et()),n=r(Tt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),tg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Et()),n=a(Tt()),r=a(Kt()),i=a(sr()),o=Ye();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,v=h+p,g=(0,r.default)(o.MAXLAT),y=(0,r.default)(o.MINLAT),m=(0,r.default)(o.MAXLON),b=(0,r.default)(o.MINLON);if(f>y&&v<g){var w=Math.asin(Math.sin(p)/Math.cos(h));(a=d-w)<b&&(a+=2*Math.PI),(l=d+w)>m&&(l-=2*Math.PI)}else f=Math.max(f,y),v=Math.min(v,g),a=b,l=m;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(v),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),ig=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),ag=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ll());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Nl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,a))+360)%360}),"getRhumbLineBearing");e.default=a})),lg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Nl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/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"}}),"getCompassDirection");e.default=r})),Rl=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(zn()),n=r(Al());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),hg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),mg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),bg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Et()),n=o(Tt()),r=o(Kt()),i=Ye();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),v=(0,n.default)(e),g=(0,t.default)(o),y=(0,n.default)(o),m=6356752.314245,b=1/298.257223563,w=(0,r.default)(y-v),_=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(g)))),x=Math.sin(_),S=Math.cos(_),k=Math.sin(M),O=Math.cos(M),I=w,E=100;do{var A=Math.sin(I),C=Math.cos(I);if(0===(d=Math.sqrt(O*A*(O*A)+(S*k-x*O*C)*(S*k-x*O*C))))return 0;a=x*k+S*O*C,l=Math.atan2(d,a),h=a-2*x*k/(c=1-(u=S*O*A/d)*u),isNaN(h)&&(h=0);var P=b/16*c*(4+b*(4-3*c));p=I,I=w+(1-P)*b*u*(l+P*d*(h+P*a*(2*h*h-1)))}while(Math.abs(I-p)>1e-12&&--E>0);if(0===E)return NaN;var T=c*(i.earthRadius*i.earthRadius-m*m)/(m*m),j=1+T/16384*(4096+T*(T*(320-175*T)-768)),F=T/1024*(256+T*(T*(74-47*T)-128)),N=F*d*(h+F/4*(a*(2*h*h-1)-F/6*h*(4*d*d-3)*(4*h*h-3))),L=m*j*(l-N);return Math.round(L/s)*s}),"getDistance");e.default=a})),wg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=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}),"getRoughCompassDirection");e.default=t})),kg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),_g=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),xg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Et()),n=r(Tt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),Eg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Rl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),Tg=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),Og=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(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 i(e,t)}}function i(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}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=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 n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),Ig=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return g.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return y.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return V.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return U.default}),"get")});var n=q(Bm()),r=q(Vm()),i=q(qm()),o=q(Um()),a=q(Ym()),l=q(Km()),u=q(Qm()),c=q(Ll()),h=q(tg()),d=q(ig()),p=q(ag()),f=q(lg()),g=q(Fi()),y=q(Xo()),m=q(zn()),b=q(Rl()),w=q(hg()),_=q(Et()),M=q(Tt()),x=q(mg()),S=q(bg()),k=q(Nl()),O=q(wg()),I=q(kg()),E=q(Li()),A=q(_g()),C=q(xg()),P=q(Eg()),T=q(Tg()),j=q(Ni()),F=q(Tl()),N=q(_l()),L=q(xl()),R=q(Cl()),D=q(Di()),B=q(es()),z=q(Kt()),V=q(sr()),U=q(Og()),G=Ye();function q(e){return e&&e.__esModule?e:{default:e}}Object.keys(G).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return G[n]}),"get")})})),s(q,"_interopRequireDefault")})),Mc=G(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",v="console",g="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",I="Firefox",E="Google",A="Huawei",C="LG",P="Microsoft",T="Motorola",j="Opera",F="Samsung",N="Sony",L="Xiaomi",R="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"),z=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==U(t).indexOf(U(e))}),"has"),U=s((function(e){return e.toLowerCase()}),"lowerize"),G=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),q=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"),W=s((function(e,t){for(var n,o,s,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(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;h+=2}}),"rgxMapper"),Y=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(V(t[n][i],e))return"?"===n?r:n}else if(V(t[n],e))return"?"===n?r:n;return e}),"strMapper"),X={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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"+k]],[/\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 "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],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,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,I+" 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,U]],[/((?: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/,"",U]],[/(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,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[h,g]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,g]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,g]],[/\((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,A],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,A],[h,g]],[/\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,L],[h,g]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,L],[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,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,g]],[/\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,T],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[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,C],[h,g]],[/(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,g]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,g]],[/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,g]],[/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,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,g]],[/(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,g]],[/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,g]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,g]],[/(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,g]],[/(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,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[u,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,g]],[/\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,g]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,g]],[/\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,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,g]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,g]],[/\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,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,R],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,R],[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,v]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,v]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,v]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[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,q],[u,q],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,E],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,R],[h,b]],[/(quest( 2)?)/i],[u,[d,D],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,g]],[/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,g]],[/(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,Y,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,Y,X]],[/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,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"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=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?B(J,t):J;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,W.call(e,i,s.browser),e.major=G(e.version),e},this.getCPU=function(){var e={};return e[f]=r,W.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,W.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,W.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,W.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?q(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=z([c,p,"major"]),K.CPU=z([f]),K.DEVICE=z([u,d,h,v,g,m,y,b,w]),K.ENGINE=K.OS=z([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof n!==o&&(n.UAParser=K);var H=typeof n!==o&&(n.jQuery||n.Zepto);if(H&&!H.ua){var $=new K;H.ua=$.getResult(),H.ua.get=function(){return $.getUA()},H.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),uy=G(((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]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[i]=S[o]=S[w]=S[a]=S[_]=S[l]=S[u]=S[c]=S[h]=S[d]=S[p]=S[g]=S[y]=S[m]=S[b]=!1;var k="object"==typeof global&&global&&global.Object===Object&&global,O="object"==typeof self&&self&&self.Object===Object&&self,I=k||O||Function("return this")(),E="object"==typeof e&&e&&!e.nodeType&&e,A=E&&"object"==typeof t&&t&&!t.nodeType&&t,C=A&&A.exports===E,P=C&&k.process,T=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),j=T&&T.isTypedArray;function F(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}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 L(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 R(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 z(e,t){return null==e?void 0:e[t]}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(F,"arrayFilter"),s(N,"arrayPush"),s(L,"arraySome"),s(R,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(z,"getValue"),s(V,"mapToArray"),s(U,"overArg"),s(G,"setToArray");var q,W=Array.prototype,Y=Function.prototype,X=Object.prototype,J=I["__core-js_shared__"],K=Y.toString,H=X.hasOwnProperty,$=(q=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=X.toString,Q=RegExp("^"+K.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=C?I.Buffer:void 0,te=I.Symbol,ne=I.Uint8Array,re=X.propertyIsEnumerable,ie=W.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=U(Object.keys,Object),ue=ct(I,"DataView"),ce=ct(I,"Map"),he=ct(I,"Promise"),de=ct(I,"Set"),pe=ct(I,"WeakMap"),fe=ct(Object,"create"),ve=bt(ue),ge=bt(ce),ye=bt(he),me=bt(de),be=bt(pe),we=te?te.prototype:void 0,_e=we?we.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 xe(){this.__data__=fe?fe(null):{},this.size=0}function Se(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ke(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 Oe(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function Ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ee(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 Ce(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 Pe(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function Te(e){return He(this.__data__,e)>-1}function je(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 Fe(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||Ee),string:new Me}}function Le(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Re(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fe;++t<n;)this.add(e[t])}function Ve(e){return this.__data__.set(e,n),this}function Ue(e){return this.__data__.has(e)}function Ge(e){var t=this.__data__=new Ee(e);this.size=t.size}function qe(){this.__data__=new Ee,this.size=0}function We(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ye(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}function Je(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this}function Ke(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&St(e),o=!n&&!r&&!i&&Ct(e),s=n||r||i||o,a=s?R(e.length,String):[],l=a.length;for(var u in e)(t||H.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function He(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function $e(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return At(e)&&Ze(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!At(e)&&!At(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,v=c==h;if(v&&St(e)){if(!St(t))return!1;l=!0,d=!1}if(v&&!d)return a||(a=new Ge),l||Ct(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var g=d&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(g||y){var m=g?e.value():e,b=y?t.value():t;return a||(a=new Ge),s(m,b,n,r,a)}}return!!v&&(a||(a=new Ge),at(e,t,n,r,s,a))}function nt(e){return!(!Et(e)||gt(e))&&(Ot(e)?Q:M).test(bt(e))}function rt(e){return At(e)&&It(e.length)&&!!S[Ze(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 s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new ze:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var v=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==v){if(v)continue;h=!1;break}if(d){if(!L(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 st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return wt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case h:var c=V;case y:var p=1&r;if(c||(c=G),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(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?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=s;++u<l;){var f=e[c=a[u]],v=t[c];if(r)var g=s?r(v,f,c,t,e,o):r(f,v,c,e,t,o);if(!(void 0===g?f===v||i(f,v,n,r,o):g)){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 $e(e,Pt,dt)}function ut(e,t){var n=e.__data__;return vt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=z(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=Z.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Se,"hashDelete"),s(ke,"hashGet"),s(Oe,"hashHas"),s(Ie,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Se,Me.prototype.get=ke,Me.prototype.has=Oe,Me.prototype.set=Ie,s(Ee,"ListCache"),s(Ae,"listCacheClear"),s(Ce,"listCacheDelete"),s(Pe,"listCacheGet"),s(Te,"listCacheHas"),s(je,"listCacheSet"),Ee.prototype.clear=Ae,Ee.prototype.delete=Ce,Ee.prototype.get=Pe,Ee.prototype.has=Te,Ee.prototype.set=je,s(Fe,"MapCache"),s(Ne,"mapCacheClear"),s(Le,"mapCacheDelete"),s(Re,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),Fe.prototype.clear=Ne,Fe.prototype.delete=Le,Fe.prototype.get=Re,Fe.prototype.has=De,Fe.prototype.set=Be,s(ze,"SetCache"),s(Ve,"setCacheAdd"),s(Ue,"setCacheHas"),ze.prototype.add=ze.prototype.push=Ve,ze.prototype.has=Ue,s(Ge,"Stack"),s(qe,"stackClear"),s(We,"stackDelete"),s(Ye,"stackGet"),s(Xe,"stackHas"),s(Je,"stackSet"),Ge.prototype.clear=qe,Ge.prototype.delete=We,Ge.prototype.get=Ye,Ge.prototype.has=Xe,Ge.prototype.set=Je,s(Ke,"arrayLikeKeys"),s(He,"assocIndexOf"),s($e,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),F(se(e),(function(t){return re.call(e,t)})))}:Tt,pt=Ze;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function vt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function gt(e){return!!$&&$ in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function wt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=y||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),n=t==p?e.constructor:void 0,r=n?bt(n):"";if(r)switch(r){case ve:return _;case ge:return h;case ye:return f;case me:return y;case be:return b}return t}),"getTag")),s(ft,"isIndex"),s(vt,"isKeyable"),s(gt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(bt,"toSource"),s(wt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return At(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&It(e.length)&&!Ot(e)}s(xt,"isArrayLike");var St=ae||jt;function kt(e,t){return et(e,t)}function Ot(e){if(!Et(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function It(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Et(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function At(e){return null!=e&&"object"==typeof e}s(kt,"isEqual"),s(Ot,"isFunction"),s(It,"isLength"),s(Et,"isObject"),s(At,"isObjectLike");var Ct=j?D(j):rt;function Pt(e){return xt(e)?Ke(e):it(e)}function Tt(){return[]}function jt(){return!1}s(Pt,"keys"),s(Tt,"stubArray"),s(jt,"stubFalse"),t.exports=kt})),Dy=G(((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 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,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),w=b&&b.isTypedArray;function _(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 x(e){return function(t){return e(t)}}function S(e,t){return null==e?void 0:e[t]}function k(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(S,"getValue"),s(k,"overArg");var O,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=p["__core-js_shared__"],P=E.toString,T=A.hasOwnProperty,j=(O=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",F=A.toString,N=P.call(Object),L=RegExp("^"+P.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,z=R?R.allocUnsafe:void 0,V=k(Object.getPrototypeOf,Object),U=Object.create,G=A.propertyIsEnumerable,q=I.splice,W=D?D.toStringTag:void 0,Y=function(){try{var e=Ye(Object,"defineProperty");return e({},"",{}),e}catch{}}(),X=R?R.isBuffer:void 0,J=Math.max,K=Date.now,H=Ye(p,"Map"),$=Ye(Object,"create"),Z=function(){function e(){}return s(e,"object"),function(t){if(!vt(t))return{};if(U)return U(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__=$?$(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($){var r=t[e];return r===n?void 0:r}return T.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return $?void 0!==t[e]:T.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$&&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 se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():q.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]}function ue(e){return Oe(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Oe(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=We(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return We(this,e).get(e)}function ve(e){return We(this,e).has(e)}function ge(e,t){var n=We(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 be(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function we(e){return this.__data__.get(e)}function _e(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 xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||T.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&a.push(u);return a}function Se(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&Ie(e,t,n)}function ke(e,t,n){var r=e[t];(!T.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&Ie(e,t,n)}function Oe(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function Ie(e,t,n){"__proto__"==t&&Y?Y(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(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ve,"mapCacheHas"),s(ge,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ve,he.prototype.set=ge,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(we,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=we,ye.prototype.has=_e,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Se,"assignMergeValue"),s(ke,"assignValue"),s(Oe,"assocIndexOf"),s(Ie,"baseAssignValue");var Ee=qe();function Ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?Xe(e):tt(e)}function Ce(e){return gt(e)&&Ae(e)==i}function Pe(e){return!(!vt(e)||Ze(e))&&(pt(e)?L:l).test(st(e))}function Te(e){return gt(e)&&ft(e.length)&&!!c[Ae(e)]}function je(e){if(!vt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!T.call(e,r))||n.push(r);return n}function Fe(e,t,n,r,i){e!==t&&Ee(t,(function(o,s){if(i||(i=new ye),vt(o))Ne(e,t,s,n,Fe,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Se(e,s,a)}}),wt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Se(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):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(a)?c=a:ht(a)?c=Ve(a):p?(h=!1,c=De(l,!0)):f?(h=!1,c=ze(l,!0)):c=[]:yt(l)||lt(l)?(c=a,lt(a)?c=bt(a):(!vt(a)||pt(a))&&(c=Je(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Se(e,n,c)}}function Le(e,t){return it(nt(e,t,xt),e+"")}s(Ae,"baseGetTag"),s(Ce,"baseIsArguments"),s(Pe,"baseIsNative"),s(Te,"baseIsTypedArray"),s(je,"baseKeysIn"),s(Fe,"baseMerge"),s(Ne,"baseMergeDeep"),s(Le,"baseRest");var Re=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function De(e,t){if(t)return e.slice();var n=e.length,r=z?z(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 ze(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ve(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ue(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Ie(n,a,l):ke(n,a,l)}return n}function Ge(e){return Le((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&He(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function qe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function We(e,t){var n=e.__data__;return $e(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ye(e,t){var n=S(e,t);return Pe(n)?n:void 0}function Xe(e){var t=T.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch{}var i=F.call(e);return r&&(t?e[W]=n:delete e[W]),i}function Je(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(V(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(!vt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ke(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function $e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!j&&j in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||A)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return F.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),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(ze,"cloneTypedArray"),s(Ve,"copyArray"),s(Ue,"copyObject"),s(Ge,"createAssigner"),s(qe,"createBaseFor"),s(We,"getMapData"),s(Ye,"getNative"),s(Xe,"getRawTag"),s(Je,"initCloneObject"),s(Ke,"isIndex"),s(He,"isIterateeCall"),s($e,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(Re);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 st(e){if(null!=e){try{return P.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Ce(function(){return arguments}())?Ce:function(e){return gt(e)&&T.call(e,"callee")&&!G.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return gt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=X||St;function pt(e){if(!vt(e))return!1;var t=Ae(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 vt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function gt(e){return null!=e&&"object"==typeof e}function yt(e){if(!gt(e)||Ae(e)!=a)return!1;var t=V(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(vt,"isObject"),s(gt,"isObjectLike"),s(yt,"isPlainObject");var mt=w?x(w):Te;function bt(e){return Ue(e,wt(e))}function wt(e){return ct(e)?xe(e,!0):je(e)}s(bt,"toPlainObject"),s(wt,"keysIn");var _t=Ge((function(e,t,n){Fe(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function St(){return!1}s(Mt,"constant"),s(xt,"identity"),s(St,"stubFalse"),t.exports=_t})),Ry=G(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",v="console",g="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",I="Firefox",E="Google",A="Huawei",C="LG",P="Microsoft",T="Motorola",j="Opera",F="Samsung",N="Sharp",L="Sony",R="Xiaomi",D="Zebra",B="Facebook",z=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"),V=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),U=s((function(e,t){return typeof e===l&&-1!==G(t).indexOf(G(e))}),"has"),G=s((function(e){return e.toLowerCase()}),"lowerize"),q=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),W=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),Y=s((function(e,t){for(var n,o,s,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(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;h+=2}}),"rgxMapper"),X=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(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,G]],[/((?: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/,"",G]],[/(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,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[h,g]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/(macintosh);/i],[u,[d,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,A],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,A],[h,g]],[/\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,g]],[/\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,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,g]],[/\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,T],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[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,C],[h,g]],[/(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,g]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,g]],[/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,L],[h,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,L],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,g]],[/(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,g]],[/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,g]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,N],[h,g]],[/(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,g]],[/(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,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[u,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,g]],[/\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,g]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,g]],[/\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,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,g]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,g]],[/\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,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,D],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,D],[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,v]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,v]],[/(playstation [345portablevi]+)/i],[u,[d,L],[h,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,v]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,N],[h,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,L],[h,m]],[/(mitv-\w{5}) bui/i],[u,[d,R],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,W],[u,W],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,E],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,D],[h,b]],[/(quest( 2)?)/i],[u,[d,B],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,g]],[/(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,X,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?z(K,t):K;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,Y.call(e,i,s.browser),e.major=q(e.version),e},this.getCPU=function(){var e={};return e[f]=r,Y.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,Y.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,Y.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,Y.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>350?W(e,350):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.33",H.BROWSER=V([c,p,"major"]),H.CPU=V([f]),H.DEVICE=V([u,d,h,v,g,m,y,b,w]),H.ENGINE=H.OS=V([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof n!==o&&(n.UAParser=H);var $=typeof n!==o&&(n.jQuery||n.Zepto);if($&&!$.ua){var Z=new H;$.ua=Z.getResult(),$.ua.get=function(){return Z.getUA()},$.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"==typeof window?window:e)})),Ky=G(((e,t)=>{"use strict";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")})),gb=G(((e,t)=>{var n,r;v(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=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()}),"r");function i(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 o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(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 u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(v,"p"),s(g,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(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(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=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},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=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},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=v(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=v([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);g(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 o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=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),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=v(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var v=a(e,0,f,this.toBBox),g=a(e,f,n,this.toBBox),y=(i=v,o=g,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),m=h(v)+h(g);y<d?(d=y,r=f,p=m<p?m:p):y===d&&m<p&&(p=m,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=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():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),vh=G((e=>{"use strict";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 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(!k(e[0])||!k(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 s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])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 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 b(e,t){return _(m(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(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 S(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 k(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function O(e){return!!e&&e.constructor===Object}function I(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(!k(e))throw new Error("bbox must only contain numbers")}))}function E(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(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,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(b,"lengthToDegrees"),e.lengthToDegrees=b,s(w,"bearingToAzimuth"),e.bearingToAzimuth=w,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(S,"convertArea"),e.convertArea=S,s(k,"isNumber"),e.isNumber=k,s(O,"isObject"),e.isObject=O,s(I,"validateBBox"),e.validateBBox=I,s(E,"validateId"),e.validateId=E})),bh=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=vh();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,v="FeatureCollection"===f,g="Feature"===f,y=v?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=v?e.features[m].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var w=0,_=0;if(null!==(a=h?c.geometries[b]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,w,_))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,w,_))return!1;p++,"MultiPoint"===M&&w++}"LineString"===M&&w++;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,w,_))return!1;p++}"MultiLineString"===M&&w++,"Polygon"===M&&_++}"Polygon"===M&&w++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,m,w,_))return!1;p++}_++}w++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.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,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),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,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=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,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))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,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,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:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,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 s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var v=t.lineString([l,n],e.properties);if(!1===r(v,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,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,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}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,s=n.geometryIndex||0,a=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 a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=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 a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],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(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(y,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(w,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=w,e.findSegment=b,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Tb=G((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=bh();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})),Ab=G(((e,t)=>{v();var n=gb(),r=vh(),i=bh(),o=Tb().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})),$h={};function Vh(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function c0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci],(function(e){return nr(Po(e.data[0],e.data[1]))}),0,n)}function Po(e,t){return Sr(e,t||{},0,0)}function Uh(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li],(function(e){return nr(fi(e.data[0],Nh(e.data[1])))}),1,n)}function fi(e,t){return Eo(e,t)}function sO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci,r0,function(){return[Ih]}],(function(e){return nr(Ih(e.data[0],e.data[1]))}),2,n)}function Ih(e,t){t||(t={});var n=ui(),r=e.length;n.p(e);var i=Sr(e,t,zh(t),8),o=i.length;return Dh(i,t),pe(i,o-8,n.d()),pe(i,o-4,r),i}function p0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li,i0,function(){return[Qu]}],(function(e){return nr(Qu(e.data[0]))}),3,n)}function Qu(e,t){return Eo(e.subarray(Rh(e),-8),t||new ie(s0(e)))}function lO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[ci,a0,function(){return[Ch]}],(function(e){return nr(Ch(e.data[0],e.data[1]))}),4,n)}function Ch(e,t){t||(t={});var n=Lh();n.p(e);var r=Sr(e,t,2,4);return Bh(r,t),pe(r,r.length-4,n.d()),r}function h0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),di(e,t,[li,o0,function(){return[tl]}],(function(e){return nr(tl(e.data[0],Nh(e.data[1])))}),5,n)}function tl(e,t){return Eo((u0(e),e.subarray(2,-4)),t)}function dO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Y(7),31==e[0]&&139==e[1]&&8==e[2]?p0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Uh(e,t,n):h0(e,t,n)}function pO(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Qu(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?fi(e,t):tl(e,t)}function tr(e,t){if(t){for(var n=new ie(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Ub)return Ub.encode(e);var i=e.length,o=new ie(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new ie(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Ft(o,0,a)}function Wh(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(jh)return jh.decode(e);var i=v0(e),o=i[0];return i[1].length&&Y(8),o}function yO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Y(7);var r={};Gh(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){nl((function(){n(e,t)}))}),"cbd");nl((function(){p=n}));var f=s((function(){var e=new ie(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;ii(e,l,i,i.f,i.u,o);var s=30+i.f.length+er(i.extra),h=l+s;e.set(i.c,h),ii(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}Yh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var v=s((function(e){var t=i[e],n=r[t],u=n[0],v=n[1],g=ui(),y=u.length;g.p(u);var m=tr(t),b=m.length,w=v.comment,_=w&&tr(w),M=_&&_.length,x=er(v.extra),S=0==v.level?0:8,k=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=To(v,{size:y,crc:g.d(),c:r,f:m,m:_,u:b!=t.length||_&&w.length!=M,compression:S}),a+=30+b+x+i,l+=76+2*(b+x)+(M||0)+i,--o||f()}}),"cbl");if(b>65535&&k(Y(11,0,1),null),S)if(y<16e4)try{k(null,Po(u,v))}catch(e){k(e,null)}else h.push(c0(u,v,k));else k(null,u)}),"_loop_1"),g=0;g<u;++g)v(g);return d}function bO(e,t){t||(t={});var n={},r=[];Gh(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=tr(s)).length,d=u.comment,p=d&&tr(d),f=p&&p.length,v=er(u.extra);h>65535&&Y(11);var g=c?Po(l,u):l,y=g.length,m=ui();m.p(l),r.push(To(u,{size:l.length,crc:m.d(),c:g,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+v+y,o+=76+2*(h+v)+(f||0)+y}for(var b=new ie(o+22),w=i,_=o-i,M=0;M<r.length;++M){var x=r[M];ii(b,x.o,x,x.f,x.u,x.c.length);var S=30+x.f.length+er(x.extra);b.set(x.c,x.o+S),ii(b,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+S+(x.m?x.m.length:0)}return Yh(b,i,r.length,_,w),b}function MO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Y(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){nl((function(){n(e,t)}))}),"cbd");nl((function(){a=n}));for(var l=e.length-22;101010256!=Le(e,l);--l)if(!l||e.length-l>65558)return a(Y(13,0,1),null),i;var u=ct(e,l+8);if(u){var c=u,h=Le(e,l+16),d=4294967295==h;if(d){if(l=Le(e,l-12),101075792!=Le(e,l))return a(Y(13,0,1),null),i;c=u=Le(e,l+32),h=Le(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=w0(e,h,d),l=n[0],c=n[1],f=n[2],v=n[3],g=n[4],y=n[5],m=b0(e,y);h=g;var b=s((function(e,t){e?(i(),a(e,null)):(t&&(o[v]=t),--u||a(null,o))}),"cbl");if(!p||p({name:v,size:c,originalSize:f,compression:l}))if(l)if(8==l){var w=e.subarray(m,m+c);if(c<32e4)try{b(null,fi(w,new ie(f)))}catch(e){b(e,null)}else r.push(Uh(w,{size:f},b))}else b(Y(14,"unknown compression type "+l,1),null);else b(null,Ft(e,m,m+c));else b(null,null)}),"_loop_3"),v=0;v<c;++v)f(v)}else a(null,{});return i}function xO(e,t){for(var n={},r=e.length-22;101010256!=Le(e,r);--r)(!r||e.length-r>65558)&&Y(13);var i=ct(e,r+8);if(!i)return{};var o=Le(e,r+16),s=4294967295==o;s&&(r=Le(e,r-12),101075792!=Le(e,r)&&Y(13),i=Le(e,r+32),o=Le(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=w0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],v=u[5],g=b0(e,v);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=fi(e.subarray(g,g+h),new ie(d)):Y(14,"unknown compression type "+c):n[p]=Ft(e,g,g+h))}return n}Pw($h,{AsyncCompress:()=>oO,AsyncDecompress:()=>cO,AsyncDeflate:()=>l0,AsyncGunzip:()=>d0,AsyncGzip:()=>oO,AsyncInflate:()=>qh,AsyncUnzipInflate:()=>kO,AsyncUnzlib:()=>f0,AsyncZipDeflate:()=>gO,AsyncZlib:()=>uO,Compress:()=>Sh,DecodeUTF8:()=>fO,Decompress:()=>m0,Deflate:()=>pn,EncodeUTF8:()=>hO,FlateErrorCode:()=>iO,Gunzip:()=>Zu,Gzip:()=>Sh,Inflate:()=>mt,Unzip:()=>_O,UnzipInflate:()=>wO,UnzipPassThrough:()=>_0,Unzlib:()=>el,Zip:()=>vO,ZipDeflate:()=>mO,ZipPassThrough:()=>Mo,Zlib:()=>Ah,compress:()=>sO,compressSync:()=>Ih,decompress:()=>dO,decompressSync:()=>pO,deflate:()=>c0,deflateSync:()=>Po,gunzip:()=>p0,gunzipSync:()=>Qu,gzip:()=>sO,gzipSync:()=>Ih,inflate:()=>Uh,inflateSync:()=>fi,strFromU8:()=>Wh,strToU8:()=>tr,unzip:()=>MO,unzipSync:()=>xO,unzlib:()=>h0,unzlibSync:()=>tl,zip:()=>yO,zipSync:()=>bO,zlib:()=>lO,zlibSync:()=>Ch});var Vb,rO,ie,tt,ai,oi,si,ko,Gb,Wb,Fh,Xu,Yb,$b,Th,_o,Sn,jt,An,ri,ce,Hb,Xb,Kb,Jb,Yu,Ct,$u,xo,Ft,iO,Zb,Y,Eo,dn,ti,Hu,Ku,Ph,ni,Ju,Oh,Qb,In,e0,t0,ui,Lh,Sr,To,qb,Wu,aO,n0,li,ci,r0,i0,a0,o0,nr,Nh,di,Lt,pi,ct,Le,Eh,pe,Dh,Rh,s0,zh,Bh,u0,pn,l0,mt,qh,Sh,oO,Zu,d0,Ah,uO,el,f0,m0,cO,Gh,Ub,jh,g0,v0,fO,hO,y0,b0,w0,k0,er,ii,Yh,Mo,mO,gO,vO,_0,wO,kO,_O,nl,Hh=Om((()=>{for(v(),Vb={},rO=s((function(e,t,n,r,i){var o=new Worker(Vb[t]||(Vb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),ie=Uint8Array,tt=Uint16Array,ai=Uint32Array,oi=new ie([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),si=new ie([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ko=new ie([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gb=s((function(e,t){for(var n=new tt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ai(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Wb=Gb(oi,2),Fh=Wb[0],Xu=Wb[1],Fh[28]=258,Xu[258]=28,Yb=Gb(si,0),$b=Yb[0],Th=Yb[1],_o=new tt(32768),ce=0;ce<32768;++ce)Sn=(61680&(Sn=(52428&(Sn=(43690&ce)>>>1|(21845&ce)<<1))>>>2|(13107&Sn)<<2))>>>4|(3855&Sn)<<4,_o[ce]=((65280&Sn)>>>8|(255&Sn)<<8)>>>1;for(jt=s((function(e,t,n){for(var r=e.length,i=0,o=new tt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new tt(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new tt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[_o[h]>>>l]=u}else for(s=new tt(r),i=0;i<r;++i)e[i]&&(s[i]=_o[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),An=new ie(288),ce=0;ce<144;++ce)An[ce]=8;for(ce=144;ce<256;++ce)An[ce]=9;for(ce=256;ce<280;++ce)An[ce]=7;for(ce=280;ce<288;++ce)An[ce]=8;for(ri=new ie(32),ce=0;ce<32;++ce)ri[ce]=5;Hb=jt(An,9,0),Xb=jt(An,9,1),Kb=jt(ri,5,0),Jb=jt(ri,5,1),Yu=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),Ct=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),$u=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),xo=s((function(e){return(e+7)/8|0}),"shft"),Ft=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?tt:4==e.BYTES_PER_ELEMENT?ai:ie)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),iO={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Zb=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Y=s((function(e,t,n){var r=new Error(t||Zb[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Y),!n)throw r;return r}),"err"),Eo=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ie(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ie(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new ie(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,v=8*r;do{if(!h){l=Ct(e,u,1);var g=Ct(e,u+1,3);if(u+=3,!g){var y=e[(E=xo(u)+4)-4]|e[E-3]<<8,m=E+y;if(m>r){o&&Y(0);break}i&&a(c+y),t.set(e.subarray(E,m),c),n.b=c+=y,n.p=u=8*m,n.f=l;continue}if(1==g)h=Xb,d=Jb,p=9,f=5;else if(2==g){var b=Ct(e,u,31)+257,w=Ct(e,u+10,15)+4,_=b+Ct(e,u+5,31)+1;u+=14;for(var M=new ie(_),x=new ie(19),S=0;S<w;++S)x[ko[S]]=Ct(e,u+3*S,7);u+=3*w;var k=Yu(x),O=(1<<k)-1,I=jt(x,k,1);for(S=0;S<_;){var E,A=I[Ct(e,u,O)];if(u+=15&A,(E=A>>>4)<16)M[S++]=E;else{var C=0,P=0;for(16==E?(P=3+Ct(e,u,3),u+=2,C=M[S-1]):17==E?(P=3+Ct(e,u,7),u+=3):18==E&&(P=11+Ct(e,u,127),u+=7);P--;)M[S++]=C}}var T=M.subarray(0,b),j=M.subarray(b);p=Yu(T),f=Yu(j),h=jt(T,p,1),d=jt(j,f,1)}else Y(1);if(u>v){o&&Y(0);break}}i&&a(c+131072);for(var F=(1<<p)-1,N=(1<<f)-1,L=u;;L=u){var R=(C=h[$u(e,u)&F])>>>4;if((u+=15&C)>v){o&&Y(0);break}if(C||Y(2),R<256)t[c++]=R;else{if(256==R){L=u,h=null;break}var D=R-254;if(R>264){var B=oi[S=R-257];D=Ct(e,u,(1<<B)-1)+Fh[S],u+=B}var z=d[$u(e,u)&N],V=z>>>4;z||Y(3),u+=15&z;j=$b[V];if(V>3){B=si[V];j+=$u(e,u)&(1<<B)-1,u+=B}if(u>v){o&&Y(0);break}i&&a(c+131072);for(var U=c+D;c<U;c+=4)t[c]=t[c-j],t[c+1]=t[c+1-j],t[c+2]=t[c+2-j],t[c+3]=t[c+3-j];c=U}}n.l=h,n.p=L,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Ft(t,0,c)}),"inflt"),dn=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),ti=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),Hu=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[In,0];if(1==i){var s=new ie(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new tt(d+1),f=Ku(n[c-1],p,0);if(f>t){r=0;var v=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;v+=y-(1<<f-p[m]),p[m]=t}for(v>>>=g;v>0;){var b=o[r].s;p[b]<t?v-=1<<t-p[b]++-1:++r}for(;r>=0&&v;--r){var w=o[r].s;p[w]==t&&(--p[w],++v)}f=t}return[new ie(p),f]}),"hTree"),Ku=s((function(e,t,n){return-1==e.s?Math.max(Ku(e.l,t,n+1),Ku(e.r,t,n+1)):t[e.s]=n}),"ln"),Ph=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new tt(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),ni=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),Ju=s((function(e,t,n){var r=n.length,i=xo(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),Oh=s((function(e,t,n,r,i,o,s,a,l,u,c){dn(t,c++,n),++i[256];for(var h=Hu(i,15),d=h[0],p=h[1],f=Hu(o,15),v=f[0],g=f[1],y=Ph(d),m=y[0],b=y[1],w=Ph(v),_=w[0],M=w[1],x=new tt(19),S=0;S<m.length;++S)x[31&m[S]]++;for(S=0;S<_.length;++S)x[31&_[S]]++;for(var k=Hu(x,7),O=k[0],I=k[1],E=19;E>4&&!O[ko[E-1]];--E);var A,C,P,T,j=u+5<<3,F=ni(i,An)+ni(o,ri)+s,N=ni(i,d)+ni(o,v)+s+14+3*E+ni(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(j<=F&&j<=N)return Ju(t,c,e.subarray(l,l+u));if(dn(t,c,1+(N<F)),c+=2,N<F){A=jt(d,p,0),C=d,P=jt(v,g,0),T=v;var L=jt(O,I,0);dn(t,c,b-257),dn(t,c+5,M-1),dn(t,c+10,E-4),c+=14;for(S=0;S<E;++S)dn(t,c+3*S,O[ko[S]]);c+=3*E;for(var R=[m,_],D=0;D<2;++D){var B=R[D];for(S=0;S<B.length;++S){var z=31&B[S];dn(t,c,L[z]),c+=O[z],z>15&&(dn(t,c,B[S]>>>5&127),c+=B[S]>>>12)}}}else A=Hb,C=An,P=Kb,T=ri;for(S=0;S<a;++S)if(r[S]>255){z=r[S]>>>18&31;ti(t,c,A[z+257]),c+=C[z+257],z>7&&(dn(t,c,r[S]>>>23&31),c+=oi[z]);var V=31&r[S];ti(t,c,P[V]),c+=T[V],V>3&&(ti(t,c,r[S]>>>5&8191),c+=si[V])}else ti(t,c,A[r[S]]),c+=C[r[S]];return ti(t,c,A[256]),c+C[256]}),"wblk"),Qb=new ai([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),In=new ie(0),e0=s((function(e,t,n,r,i,o){var a=e.length,l=new ie(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=Ju(u,c+1,e.subarray(h,d))}else{for(var p=Qb[t-1],f=p>>>13,v=8191&p,g=(1<<n)-1,y=new tt(32768),m=new tt(g+1),b=Math.ceil(n/3),w=2*b,_=s((function(t){return(e[t]^e[t+1]<<b^e[t+2]<<w)&g}),"hsh"),M=new ai(25e3),x=new tt(288),S=new tt(32),k=0,O=0,I=(h=0,0),E=0,A=0;h<a;++h){var C=_(h),P=32767&h,T=m[C];if(y[P]=T,m[C]=P,E<=h){var j=a-h;if((k>7e3||I>24576)&&j>423){c=Oh(e,u,0,M,x,S,O,I,A,h-A,c),I=k=O=0,A=h;for(var F=0;F<286;++F)x[F]=0;for(F=0;F<30;++F)S[F]=0}var N=2,L=0,R=v,D=P-T&32767;if(j>2&&C==_(h-D))for(var B=Math.min(f,j)-1,z=Math.min(32767,h),V=Math.min(258,j);D<=z&&--R&&P!=T;){if(e[h+N]==e[h+N-D]){for(var U=0;U<V&&e[h+U]==e[h+U-D];++U);if(U>N){if(N=U,L=D,U>B)break;var G=Math.min(D,U-2),q=0;for(F=0;F<G;++F){var W=h-D+F+32768&32767,Y=W-y[W]+32768&32767;Y>q&&(q=Y,T=W)}}}D+=(P=T)-(T=y[P])+32768&32767}if(L){M[I++]=268435456|Xu[N]<<18|Th[L];var X=31&Xu[N],J=31&Th[L];O+=oi[X]+si[J],++x[257+X],++S[J],E=h+N,++k}else M[I++]=e[h],++x[e[h]]}}c=Oh(e,u,o,M,x,S,O,I,A,h-A,c),!o&&7&c&&(c=Ju(u,c+1,In))}return Ft(l,0,r+xo(c)+i)}),"dflt"),t0=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ui=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=t0[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),Lh=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),Sr=s((function(e,t,n,r,i){return e0(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),To=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),qb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Wu=[],aO=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),n0=s((function(e,t,n,r){var i;if(!Wu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=qb(e[l],o,s))[0],s=i[1];Wu[n]=qb(e[a],o,s)}var u=To({},Wu[n][1]);return rO(Wu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,aO(u),r)}),"wrkr"),li=s((function(){return[ie,tt,ai,oi,si,ko,Fh,$b,Xb,Jb,_o,Zb,jt,Yu,Ct,$u,xo,Ft,Y,Eo,fi,nr,Nh]}),"bInflt"),ci=s((function(){return[ie,tt,ai,oi,si,ko,Xu,Th,Hb,An,Kb,ri,_o,Qb,In,jt,dn,ti,Hu,Ku,Ph,ni,Ju,Oh,xo,Ft,e0,Sr,Po,nr]}),"bDflt"),r0=s((function(){return[Dh,zh,pe,ui,t0]}),"gze"),i0=s((function(){return[Rh,s0]}),"guze"),a0=s((function(){return[Bh,pe,Lh]}),"zle"),o0=s((function(){return[u0]}),"zule"),nr=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),Nh=s((function(e){return e&&e.size&&new ie(e.size)}),"gu8"),di=s((function(e,t,n,r,i,o){var s=n0(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),Lt=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),pi=s((function(e,t,n,r,i){var o,s=n0(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||Y(5),o&&t.ondata(Y(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),ct=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Le=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),Eh=s((function(e,t){return Le(e,t)+4294967296*Le(e,t+4)}),"b8"),pe=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),Dh=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Rh=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&Y(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),s0=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),zh=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),Bh=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),u0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&Y(6,"invalid zlib data"),32&e[1]&&Y(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Vh,"AsyncCmpStrm"),pn=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(Sr(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.d&&Y(4),this.d=t,this.p(e,t||!1)},e}(),l0=function(){function e(e,t){pi([ci,function(){return[Lt,pn]}],this,Vh.call(this,e,t),(function(e){var t=new pn(e.data);onmessage=Lt(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(c0,"deflate"),s(Po,"deflateSync"),mt=function(){function e(e){this.s={},this.p=new ie(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||Y(5),this.d&&Y(4);var t=this.p.length,n=new ie(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=Eo(this.p,this.o,this.s);this.ondata(Ft(n,t,this.s.b),this.d),this.o=Ft(n,this.s.b-32768),this.s.b=this.o.length,this.p=Ft(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),qh=function(){function e(e){this.ondata=e,pi([li,function(){return[Lt,mt]}],this,0,(function(){var e=new mt;onmessage=Lt(e)}),7)}return s(e,"AsyncInflate"),e}(),s(Uh,"inflate"),s(fi,"inflateSync"),Sh=function(){function e(e,t){this.c=ui(),this.l=0,this.v=1,pn.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){pn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=Sr(e,this.o,this.v&&zh(this.o),t&&8,!t);this.v&&(Dh(n,this.o),this.v=0),t&&(pe(n,n.length-8,this.c.d()),pe(n,n.length-4,this.l)),this.ondata(n,t)},e}(),oO=function(){function e(e,t){pi([ci,r0,function(){return[Lt,pn,Sh]}],this,Vh.call(this,e,t),(function(e){var t=new Sh(e.data);onmessage=Lt(t)}),8)}return s(e,"AsyncGzip"),e}(),s(sO,"gzip"),s(Ih,"gzipSync"),Zu=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){var n=this.p.length>3?Rh(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&Y(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),mt.prototype.c.call(this,t)},e}(),d0=function(){function e(e){this.ondata=e,pi([li,i0,function(){return[Lt,mt,Zu]}],this,0,(function(){var e=new Zu;onmessage=Lt(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(p0,"gunzip"),s(Qu,"gunzipSync"),Ah=function(){function e(e,t){this.c=Lh(),this.v=1,pn.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){pn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=Sr(e,this.o,this.v&&2,t&&4,!t);this.v&&(Bh(n,this.o),this.v=0),t&&pe(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),uO=function(){function e(e,t){pi([ci,a0,function(){return[Lt,pn,Ah]}],this,Vh.call(this,e,t),(function(e){var t=new Ah(e.data);onmessage=Lt(t)}),10)}return s(e,"AsyncZlib"),e}(),s(lO,"zlib"),s(Ch,"zlibSync"),el=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&Y(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),mt.prototype.c.call(this,t)},e}(),f0=function(){function e(e){this.ondata=e,pi([li,o0,function(){return[Lt,mt,el]}],this,0,(function(){var e=new el;onmessage=Lt(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(h0,"unzlib"),s(tl,"unzlibSync"),m0=function(){function e(e){this.G=Zu,this.I=mt,this.Z=el,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||Y(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new ie(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},e}(),cO=function(){function e(e){this.G=d0,this.I=qh,this.Z=f0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){m0.prototype.push.call(this,e,t)},e}(),s(dO,"decompress"),s(pO,"decompressSync"),Gh=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=To(r,o[1]),o=o[0]),o instanceof ie?n[s]=[o,a]:(n[s+="/"]=[new ie(0),a],Gh(o,s,n,r))}}),"fltn"),Ub=typeof TextEncoder<"u"&&new TextEncoder,jh=typeof TextDecoder<"u"&&new TextDecoder,g0=0;try{jh.decode(In,{stream:!0}),g0=1}catch{}v0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Ft(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),fO=function(){function e(e){this.ondata=e,g0?this.t=new TextDecoder:this.p=In}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||Y(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&Y(8),this.t=null));this.p||Y(4);var n=new ie(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=v0(n),i=r[0],o=r[1];t?(o.length&&Y(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),hO=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||Y(5),this.d&&Y(4),this.ondata(tr(e),this.d=t||!1)},e}(),s(tr,"strToU8"),s(Wh,"strFromU8"),y0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),b0=s((function(e,t){return t+30+ct(e,t+26)+ct(e,t+28)}),"slzh"),w0=s((function(e,t,n){var r=ct(e,t+28),i=Wh(e.subarray(t+46,t+46+r),!(2048&ct(e,t+8))),o=t+46+r,s=Le(e,t+20),a=n&&4294967295==s?k0(e,o):[s,Le(e,t+24),Le(e,t+42)],l=a[0],u=a[1],c=a[2];return[ct(e,t+10),l,u,i,o+ct(e,t+30)+ct(e,t+32),c]}),"zh"),k0=s((function(e,t){for(;1!=ct(e,t);t+=4+ct(e,t+2));return[Eh(e,t+12),Eh(e,t+4),Eh(e,t+20)]}),"z64e"),er=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Y(9),t+=r+4}return t}),"exfl"),ii=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=er(u);pe(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&Y(10),pe(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(pe(e,t,n.crc),pe(e,t+4,o),pe(e,t+8,n.size)),pe(e,t+12,l),pe(e,t+14,h),t+=16,null!=s&&(pe(e,t,c),pe(e,t+6,n.attrs),pe(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var v=u[f],g=v.length;pe(e,t,+f),pe(e,t+2,g),e.set(v,t+4),t+=4+g}return c&&(e.set(a,t),t+=c),t}),"wzh"),Yh=s((function(e,t,n,r,i){pe(e,t,101010256),pe(e,t+8,n),pe(e,t+10,n),pe(e,t+12,r),pe(e,t+16,i)}),"wzf"),Mo=function(){function e(e){this.filename=e,this.c=ui(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),mO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new pn(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=y0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),gO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new l0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=y0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),vO=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||Y(5),2&this.d)this.ondata(Y(4+8*(1&this.d),0,1),null,!1);else{var n=tr(e.filename),r=n.length,i=e.comment,o=i&&tr(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+er(e.extra)+30;r>65535&&this.ondata(Y(11,0,1),null,!1);var u=new ie(l);ii(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=To(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),v=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(v+=r.length,c.push(r),i){var o=new ie(16);pe(o,0,134695760),pe(o,4,e.crc),pe(o,8,v),pe(o,12,e.size),c.push(o),f.c=v,f.b=l+v+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(Y(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+er(l.extra)+(l.o?l.o.length:0)}for(var o=new ie(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];ii(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+er(l.extra)+(l.o?l.o.length:0),t+=l.b}Yh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(yO,"zip"),s(bO,"zipSync"),_0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),wO=function(){function e(){var e=this;this.i=new mt((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),kO=function(){function e(e,t){var n=this;t<32e4?this.i=new mt((function(e,t){n.ondata(null,e,t)})):(this.i=new qh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Ft(e,0)),this.i.push(e,t)},e.compression=8,e}(),_O=function(){function e(e){this.onfile=e,this.k=[],this.o={0:_0},this.p=In}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||Y(5),this.p||Y(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new ie(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Le(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=ct(u,a+6),i=ct(u,a+8),s=2048&r,d=8&r,p=ct(u,a+26),v=ct(u,a+28);if(c>a+30+p+v){var g=[];f.k.unshift(g),o=2;var y=Le(u,a+18),m=Le(u,a+22),b=Wh(u.subarray(a+30,a+=30+p),!s);4294967295==y?(e=d?[-2]:k0(u,a),y=e[0],m=e[1]):d&&(y=-1),a+=v,f.c=y;var w,_={name:b,compression:i,start:function(){if(_.ondata||Y(5),y){var e=n.o[i];e||_.ondata(Y(14,"unknown compression type "+i,1),null,!1),(w=y<0?new e(b):new e(b,y,m)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var o=r[t];w.push(o,!1)}n.k[0]==g&&n.c?n.d=w:w.push(In,!0)}else _.ondata(null,In,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};y>=0&&(_.size=y,_.originalSize=m),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=In,h<0){var v=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Le(u,l-16)&&4)):u.subarray(0,a);d?d.push(v,!!o):this.k[+(2==o)].push(v)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&Y(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),nl="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(MO,"unzip"),s(xO,"unzipSync")})),N0=G(((e,t)=>{"use strict";v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),V0=G(((e,t)=>{"use strict";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)}}})),U0=G(((e,t)=>{"use strict";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)]}})),W0=G(((e,t)=>{"use strict";v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),Q0=G((e=>{"use strict";v();var t=N0(),n=V0(),r=U0(),i=W0(),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,[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 s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};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 b(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,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,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(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(y,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=y,e.parse=b,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?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:b(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(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]?h(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)}}));v();var bw=Xt(Sm());v(),v(),v();var Cg=Xt(Ig());v();var Ul=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(b(this,"origin"),b(this,"destination"),b(this,"vortex"),b(this,"distance"),b(this,"angle"),b(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=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+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(Ul,"Edge");var ql=Ul,ur=ql;v();var Ag="mi-debug",sx={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},R=sx;function ux(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,Cg.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 R.error(e),1}}function Us(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(ux,"getMapScale"),s(Us,"getAngle");var Yl=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){b(this,"edges"),b(this,"nodesById"),b(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:ux(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 ur({angle:Us(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,s=Math.abs(i-o);this.edges[n.id].push(new ur({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new ur({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i}){let o=e.map((e=>this.nodesById[e])).filter((e=>e)),s=t.map((e=>this.nodesById[e])).filter((e=>e));if(0===o.length||0===s.length)return[];let a=[],l={},u={};for(o.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);a.push({origin:e,priority:t}),l[e.id]=null,u[e.id]=0})),a.sort(((e,t)=>e.priority-t.priority));a.length>0;){let e=a[0];if(s.includes(e.origin)){let t=[],n=l[e.origin.id];for(;null!=n;){t.push(n);let e=l[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let o=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,c=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id));if(n&&o||c)continue;let h=u[e.origin.id]+t.weight;if(null==u[t.destination.id]||h<u[t.destination.id]){u[t.destination.id]=h;let e=h+this.getShortestEuclideanDistance(t.destination,s);a.push({origin:t.destination,priority:e}),l[t.destination.id]=t}}a.splice(0,1),a.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(Yl,"NavigationGraph");var Gl=Yl,Wl=Gl;function lx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),s(lx,"vortexDirectionTest");var Hl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){b(this,"node"),b(this,"instruction"),b(this,"action"),b(this,"atLocation"),b(this,"type"),b(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(lx(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(Hl,"Directive");var $l=Hl,Bn=$l;function Xl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function jg(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 Fg(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=jg(e,t,-r),s=jg(e,t,r);if(Xl(o[0],o[1],n[0],n[1])||Xl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Xl(e,t,n[0],n[1]))return void(i=!1)})),i}v(),s(Xl,"getLineIntersection"),s(jg,"getOffsetLine"),s(Fg,"hasLineOfSight");var Gs=.1*Math.PI;function Ws(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ws,"differenceBetweenAngles");var Zl=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){b(this,"graph"),b(this,"locationsByNodeId"),b(this,"geometryEdgesByMapId",new Map),this.graph=new Wl({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=>{this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),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],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-Ws(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-Ws(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,simplify:a}){var l,u,c;let h=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s});if(0===h.length)return{distance:0,instructions:[new Bn({distance:0,instruction:"No Valid Path Available"})],path:[]};let d=0,p=[],f=[];if(null!=a&&a.enabled){let e=null!=(l=null==a?void 0:a.bufferRadius)?l: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!=(u=this.geometryEdgesByMapId.get(h[n-1].origin.map))?u:[];f.push(...this.simplifySteps(t,r,e)),t=[h[n]]}t.push(h[n])}let n=h[h.length-1],r=null!=(c=this.geometryEdgesByMapId.get(n.origin.map))?c:[];f.push(...this.simplifySteps(t,r,e)),h=f}for(let e=0;e<h.length;e++)p.push(h[e].origin);p.push(h[h.length-1].destination);let v=[],g=null,y=null,m=0,b=0;for(let e=0;e<h.length;e++){let t=h[e],n=t.origin,o=t.destination;if(d+=t.distance,m+=(null==y?void 0:y.distance)||0,0===e&&v.push(new Bn({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 Bn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:m,origin:n})),b+=m,m=0}else if(null!=g&&null!=y)if(null!=y.vortex){let e=this.graph.mapsById[g.map],t=this.graph.mapsById[y.destination.map];v.push(new Bn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:y.vortex,distance:m,origin:n})),b+=m,m=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==g&&e.destination!==t.destination));if(e.length>0){let r=-Ws(y.angle,t.angle),i=e.reduce(((e,n)=>{let r=-Ws(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Gs||Math.abs(i)<=Gs){let e;e=r<=-Math.PI/4?"Right":r<=-Gs?"SlightRight":r<=Gs?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(y,.5*Math.PI,10)),null!=t){let r=new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:m,origin:n});r.type=e,v.push(r)}else v.push(new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:m,origin:n}));b+=m,m=0}}}e===h.length-1&&(v.push(new Bn({action:{type:"Arrival"},atLocation:i,distance:d-b<0?0:d-b,origin:t.destination})),b+=m,m=0),g=n,y=t}let w=[],_=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(_=t.node,w.unshift(t)):n&&"Turn"===n.type&&null!=_?this.graph.getDistance(t.node,_)>5&&w.unshift(t):w.unshift(t)}return{distance:d,instructions:w,path:p}}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(!Fg(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new ur({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Us(e[i].origin,e[t].origin)})),i=t}return r.push(new ur({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Us(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Zl,"Navigator");var Kl=Zl,Jl=Kl;v(),v();var yn,Vi,Ql,Ys,Ng,ec=class{constructor(e){I(this,Vi),I(this,Ys),I(this,yn,void 0),j(this,yn,e)}directionsTo(e,t){let n=w(this,yn).analytics;return e instanceof Ot?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),ye(this,Ys,Ng).call(this,e,t)):(n.getDirections(this,e),ye(this,Vi,Ql).call(this,e,t))}distanceTo(e,t){let n=ye(this,Vi,Ql).call(this,e,t);return(null==n?void 0:n.distance)||0}};yn=new WeakMap,Vi=new WeakSet,Ql=s((function(e,t){let n=Bi(this),r=Bi(e),i=w(this,yn).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,simplify:null==t?void 0:t.simplify});return new lr(w(this,yn),i)}),"#directionsToSingleDestination"),Ys=new WeakSet,Ng=s((function(e,t){let n,r=[],i=Bi(this);for(let o=0;o<e.destinations.length;o++){n=Bi(e.destinations[o]);let s=w(this,yn).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}),a=new lr(w(this,yn),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(ec,"MappedinNavigatable");var Jt=ec;v(),v(),v(),v(),v();var tc=s((function(e,t){return(tc=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");function Vn(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}tc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(Vn,"__extends");var le=s((function(){return le=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"),le.apply(this,arguments)}),"__assign");function be(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 we(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Dg(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 Rg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(be,"__awaiter"),s(we,"__generator"),s(Dg,"__values"),s(Rg,"__read"),v(),v(),v();var qn,Ge,bn,Un,rt,pt,_e,Lr,ke=s((function(){return ke=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"),ke.apply(this,arguments)}),"__assign");function zg(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 Te(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 Pe(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Zt(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 nt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}function zt(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))}s(zg,"__rest"),s(Te,"__awaiter"),s(Pe,"__generator"),s(Zt,"__values"),s(nt,"__read"),s(zt,"__spreadArray"),v(),v(),v(),function(e){e.US="US",e.EU="EU"}(qn||(qn={})),v(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Ge||(Ge={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(bn||(bn={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Un||(Un={})),v(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(rt||(rt={})),v(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(pt||(pt={})),v(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(_e||(_e={})),v(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Lr||(Lr={})),v(),v();var nc="-",qi="AMP",Bg="".concat(qi,"_unsent"),rc="https://api2.amplitude.com/2/httpapi",Vg="https://api.eu.amplitude.com/2/httpapi",qg="https://api2.amplitude.com/batch",Ug="https://api.eu.amplitude.com/batch";v();var dx=1e3,$s=s((function(e){if(Object.keys(e).length>dx)return!1;for(var t in e){var n=e[t];if(!ic(t,n))return!1}return!0}),"isValidObject"),ic=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Zt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&$s(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return $s(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),Bt=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return ke({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Ge.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Ge.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Ge.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Ge.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Ge.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Ge.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Ge.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Ge.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Ge.UNSET,e,nc),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Ge.CLEAR_ALL]=nc,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,n){return void 0===this._properties[Ge.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Ge.ADD?"number"==typeof n:e===Ge.UNSET||e===Ge.REMOVE||ic(t,n))},e}(),Gg=s((function(e,t,n){return ke(ke(ke({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Ui=s((function(e,t){return ke(ke({},t),{event_type:Un.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),Wg=s((function(e,t,n,r){var i;return ke(ke({},r),{event_type:Un.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Yg=s((function(e,t,n){var r,i=new Bt;return i.set(e,t),ke(ke({},n),{event_type:Un.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),$g=s((function(e,t){return ke(ke({},t),{event_type:Un.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");v(),v();var Gn=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=_e.Unknown),{event:e,code:t,message:n}}),"buildResult"),Hg=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return Te(this,void 0,void 0,(function(){return Pe(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.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 Te(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m;return Pe(this,(function(b){switch(b.label){case 0:if(!e)return[2];t=nt(e,1),n=t[0],r=nt(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===pt.BEFORE})),b.label=1;case 1:b.trys.push([1,6,7,8]),s=Zt(o),a=s.next(),b.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(ke({},n))];case 3:n=b.sent(),b.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),v={error:l},[3,8];case 7:try{a&&!a.done&&(g=s.return)&&g.call(s)}finally{if(v)throw v.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===pt.ENRICHMENT})),b.label=9;case 9:b.trys.push([9,14,15,16]),c=Zt(u),h=c.next(),b.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(ke({},n))];case 11:n=b.sent(),b.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=b.sent(),y={error:d},[3,16];case 15:try{h&&!h.done&&(m=c.return)&&m.call(c)}finally{if(y)throw y.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),f=p.map((function(e){var t=ke({},n);return e.execute(t).catch((function(e){return Gn(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=nt(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return Te(this,void 0,void 0,(function(){var e,t,n,r=this;return Pe(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();v();var Xg="Event tracked successfully",Kg="Unexpected error occurred",Jg="Event rejected due to exceeded retry count",Zg="Event skipped due to optOut config",Qg="Event rejected due to missing API key",ev="Invalid API key",tv="Client not initialized",ac=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 Hg,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return Te(this,void 0,void 0,(function(){return Pe(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 Te(this,void 0,void 0,(function(){var t,n,r,i,o,s;return Pe(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=Zt(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=Gg(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Ui(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=Wg(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Yg(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=$g(e,t);return this.dispatch(n)},e.prototype.add=function(e){return Te(this,void 0,void 0,(function(){return Pe(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 Te(this,void 0,void 0,(function(){return Pe(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(Gn(e,0,tv));this.process(e).then(t)},e.prototype.dispatch=function(e){return Te(this,void 0,void 0,(function(){var t=this;return Pe(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return Te(this,void 0,void 0,(function(){var t,n,r;return Pe(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,Gn(e,0,Zg)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=Gn(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();v();var Hs=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 $s(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?ke({},this.properties):{};return e[bn.REVENUE_PRODUCT_ID]=this.productId,e[bn.REVENUE_QUANTITY]=this.quantity,e[bn.REVENUE_PRICE]=this.price,e[bn.REVENUE_TYPE]=this.revenueType,e[bn.REVENUE]=this.revenue,e},e}();v(),v();var nv=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");v(),v();var Xs="Amplitude Logger ",rv=function(){function e(){this.logLevel=rt.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=rt.None},e.prototype.enable=function(e){void 0===e&&(e=rt.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Verbose||console.log("".concat(Xs,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Warn||console.warn("".concat(Xs,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Error||console.error("".concat(Xs,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<rt.Debug||console.log("".concat(Xs,"[Debug]: ").concat(e.join(" ")))},e}(),Ks=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:rt.Warn,loggerProvider:new rv,optOut:!1,serverUrl:rc,serverZone:qn.US,useBatch:!1}}),"getDefaultConfig"),oc=function(){function e(e){var t,n,r;this._optOut=!1;var i=Ks();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=sc(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),px=s((function(e,t){return e===qn.EU?t?Ug:Vg:t?qg:rc}),"getServerUrl"),sc=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Ks().serverZone),void 0===n&&(n=Ks().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[qn.US,qn.EU].includes(t)?t:Ks().serverZone;return{serverZone:r,serverUrl:px(r,n)}}),"createServerConfig"),uc=function(){function e(){this.name="amplitude",this.type=pt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return Te(this,void 0,void 0,(function(){var n,r=this;return Pe(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(Bg,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.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 r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Jg),!1)}));r.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),Te(this,void 0,void 0,(function(){var t,n,r,i=this;return Pe(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=nv(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Te(this,void 0,void 0,(function(){var n,r,i,o,s;return Pe(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,Qg)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return zg(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=sc(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,Kg),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case _e.Success:this.handleSuccessResponse(e,t);break;case _e.Invalid:this.handleInvalidResponse(e,t);break;case _e.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case _e.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,Xg)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(ev))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=zt(zt(zt(zt([],nt(Object.values(e.body.eventsWithInvalidFields)),!1),nt(Object.values(e.body.eventsWithMissingFields)),!1),nt(Object.values(e.body.eventsWithInvalidIdLengths)),!1),nt(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,zt([],nt(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,zt([],nt(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,zt([],nt(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,zt([],nt(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(Gn(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}();v();var St=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,zt([],nt(t),!1))}}}),"returnWrapper");v();var fx=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Ae=s((function(e){return function(){var t=ke({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),hx=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=Zt(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),Ce=s((function(e,t){return function(){var n,r,i={};try{for(var o=Zt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=hx(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),je=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<rt.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:fx(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");v();var Wn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Wn)}),"UUID");v();var Gi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return Te(this,void 0,void 0,(function(){return Pe(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return Te(this,void 0,void 0,(function(){return Pe(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return Te(this,void 0,void 0,(function(){var t;return Pe(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return Te(this,void 0,void 0,(function(){return Pe(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return Te(this,void 0,void 0,(function(){return Pe(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return Te(this,void 0,void 0,(function(){return Pe(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();v();var cr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m,b,w,_,M;if("object"!=typeof e)return null;var x=e.code||0,S=this.buildStatus(x);switch(S){case _e.Success:return{status:S,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case _e.Invalid:return{status:S,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case _e.PayloadTooLarge:return{status:S,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case _e.RateLimit:return{status:S,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case _e.Timeout:default:return{status:S,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?_e.Success:429===e?_e.RateLimit:413===e?_e.PayloadTooLarge:408===e?_e.Timeout:e>=400&&e<500?_e.Invalid:e>=500?_e.Failed:_e.Unknown},e}();v(),v(),v();var lc=s((function(e,t){return(lc=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");function iv(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}lc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(iv,"__extends");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 cc(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 Be(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 Ve(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function av(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(cc,"__rest"),s(Be,"__awaiter"),s(Ve,"__generator"),s(av,"__read"),v(),v();var it=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Nr=s((function(){var e,t=it();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=ov(n[0]),i=ov(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),ov=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");v();var sv="utm_campaign",uv="utm_content",lv="utm_id",cv="utm_medium",dv="utm_source",pv="utm_term",dc="dclid",pc="fbclid",fc="gbraid",hc="gclid",mc="ko_click_id",gc="msclkid",vc="ttclid",yc="twclid",bc="wbraid",fv="EMPTY",Js={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},hv="MKTG",mv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2,$e($e($e($e({},Js),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Nr();return{utm_campaign:e[sv],utm_content:e[uv],utm_id:e[lv],utm_medium:e[cv],utm_source:e[dv],utm_term:e[pv]}},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=Nr();return(e={})[dc]=t[dc],e[pc]=t[pc],e[fc]=t[fc],e[hc]=t[hc],e[mc]=t[mc],e[gc]=t[gc],e[vc]=t[vc],e[yc]=t[yc],e[bc]=t[bc],e},e}();v(),v();var dr=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[qi,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),wc=s((function(e){return"".concat(qi.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),kc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=dr(e,hv),this.parser=new mv,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!==(r=t.initialEmptyValue)&&void 0!==r?r:fv}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=cc(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=cc(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?gv(r||"")!==gv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return Be(this,void 0,void 0,(function(){return Ve(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 Be(this,void 0,void 0,(function(){return Ve(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 t=this,n=$e($e({},Js),e),r=Object.entries(n).reduce((function(e,n){var r=av(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new Bt),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return $e($e({},Ui(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return Be(this,void 0,void 0,(function(){var t,n;return Ve(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),gv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");v();var pr=function(){function e(e){this.options=$e({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return Be(this,void 0,void 0,(function(){var t,n,r;return Ve(this,(function(i){switch(i.label){case 0:if(!it())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return Be(this,void 0,void 0,(function(){var n,r,i;return Ve(this,(function(o){return n=it(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return Be(this,void 0,void 0,(function(){var r,i,o,s,a,l;return Ve(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=it())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return Be(this,void 0,void 0,(function(){return Ve(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 Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2]}))}))},e}();v();var Zs=function(){function e(e,t){this.storage=e,this.storageKey=dr(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=$e($e({},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}();v();var _c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iv(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return Be(this,void 0,void 0,(function(){var n,r;return Ve(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(cr);v(),v();var vv=Xt(Mc()),mx=function(){function e(){this.ua=new vv.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:yx(),platform:"Web",os:gx(this.ua),deviceModel:vx(this.ua)}},e}(),gx=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"),vx=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),yx=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),bx=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}(),Yn=s((function(){return Yn=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"),Yn.apply(this,arguments)}),"__assign"),eu=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),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!eu(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){eu(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!eu(e[c],t[c]))return!1;return!0}),"isEqual"),wx="$set",kx="$unset",_x="$clearAll";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 Mx=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Yn({},this.identity.userProperties),n=Yn(Yn({},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],s=o[0],a=o[1];switch(s){case wx:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case kx:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case _x:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Yn({},this.identity)},e.prototype.setIdentity=function(e){var t=Yn({},this.identity);this.identity=Yn({},e),eu(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}(),Yi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,yv=function(){function e(){this.identityStore=new Mx,this.eventBridge=new bx,this.applicationContextProvider=new mx}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return Yi.analyticsConnectorInstances||(Yi.analyticsConnectorInstances={}),Yi.analyticsConnectorInstances[t]||(Yi.analyticsConnectorInstances[t]=new e),Yi.analyticsConnectorInstances[t]},e}(),$i=s((function(){return yv.getInstance("$default_instance")}),"getAnalyticsConnector");v();var xc=function(){function e(){this.name="identity",this.type=pt.BEFORE,this.identityStore=$i().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();v();var Ec=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");v();var tu=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),nu=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");v();var wv=Xt(Mc());v();var bv="1.6.8",xx="Web",Ex="$remote",kv=function(){function e(){var e;this.name="context",this.type=pt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(bv),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new wv.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 be(this,void 0,void 0,(function(){var t,n,r,i,o;return we(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,le(le(le(le(le(le(le(le(le(le(le(le({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:xx}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:Ec()}),this.config.trackingOptions.ipAddress&&{ip:Ex}),{insert_id:Wn(),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}();v(),v();var Hi=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return be(this,void 0,void 0,(function(){var t,n,r;return we(this,(function(i){switch(i.label){case 0:if(!it())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return be(this,void 0,void 0,(function(){var t;return we(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return be(this,void 0,void 0,(function(){return we(this,(function(n){return[2,(null===(t=it())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return be(this,void 0,void 0,(function(){return we(this,(function(r){try{null===(n=it())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return be(this,void 0,void 0,(function(){return we(this,(function(n){try{null===(t=it())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return be(this,void 0,void 0,(function(){return we(this,(function(t){try{null===(e=it())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();v();var _v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return Vn(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return be(this,void 0,void 0,(function(){var n=this;return we(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(cr);v();var Mv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return be(this,void 0,void 0,(function(){var n=this;return we(this,(function(r){return[2,new Promise((function(r,i){var o=it();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(cr),ru=s((function(){var e=new Gi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new Zs(e,""),sessionTimeout:18e5,storageProvider:new Gi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new _c}}),"getDefaultConfig"),xv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,v,g=this,y=ru();return(g=e.call(this,le(le({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:y.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:y.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:y.cookieStorage,g.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:y.sessionManager,g.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:y.sessionTimeout,g.appVersion=null==r?void 0:r.appVersion,g.attribution=null==r?void 0:r.attribution,g.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:y.cookieExpiration,g.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:y.cookieSameSite,g.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:y.cookieSecure,g.deviceId=null==r?void 0:r.deviceId,g.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:y.disableCookies,g.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:y.domain,g.lastEventTime=null!==(f=g.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,g.optOut=!(null==r||!r.optOut),g.partnerId=null==r?void 0:r.partnerId,g.sessionId=null==r?void 0:r.sessionId,g.trackingOptions=null!==(v=null==r?void 0:r.trackingOptions)&&void 0!==v?v:y.trackingOptions,g.userId=n,g}return Vn(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.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(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(oc),Ev=s((function(e,t,n){return be(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,v,g,y,m,b;return we(this,(function(w){switch(w.label){case 0:return r=ru(),null!==(v=null==n?void 0:n.domain)&&void 0!==v?(o=v,[3,3]):[3,1];case 1:return[4,Sx()];case 2:o=w.sent(),w.label=3;case 3:return i=o,[4,Tx(le(le({},n),{domain:i}))];case 4:return s=w.sent(),a=dr(e),[4,s.get(a)];case 5:return l=w.sent(),u=Nr(),[4,new Zs(s,e).load()];case 6:return c=w.sent(),h=xv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[le({},n)],f={cookieStorage:s,sessionManager:c,deviceId:Ox(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(g=null==n?void 0:n.optOut)&&void 0!==g?g:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(m=null===(y=w.sent())||void 0===y?void 0:y.sessionId)&&void 0!==m?m:null==n?void 0:n.sessionId,[4,Px(n)];case 8:return[2,new(h.apply(xv,d.concat([le.apply(void 0,p.concat([(f.storageProvider=w.sent(),f.trackingOptions=le(le({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(b=null==n?void 0:n.transportProvider)&&void 0!==b?b:Pc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),Tx=s((function(e,t){return void 0===t&&(t=ru()),be(void 0,void 0,void 0,(function(){var n,r,i;return we(this,(function(o){switch(o.label){case 0:return n=le(le({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,Tc(n)]:[2,r]}}))}))}),"createCookieStorage"),Tc=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n;return we(this,(function(r){switch(r.label){case 0:return t=new pr({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new Hi).isEnabled()]:[3,4];case 3:r.sent()||(t=new Gi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),Px=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return we(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=Dg([null==e?void 0:e.storageProvider,new Hi]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),Ox=s((function(e,t,n){return t||n||e||Wn()}),"createDeviceId"),Pc=s((function(e){return e===Lr.XHR?new _v:e===Lr.SendBeacon?new Mv:ru().transportProvider}),"createTransport"),Sx=s((function(e){return be(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return we(this,(function(l){switch(l.label){case 0:return[4,(new pr).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new pr({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");v();var Pv=s((function(e,t){return be(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return we(this,(function(h){switch(h.label){case 0:return[4,(n=new pr).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new Hi),[4,n.isEnabled()];case 2:return h.sent()?(r=wc(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=Rg(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:Ix(a),sessionId:Tv(u),lastEventTime:Tv(c),optOut:!!l}]}}))}))}),"parseOldCookies"),Tv=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),Ix=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),Ax=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),be(this,void 0,void 0,(function(){var a,l,u,c,h=this;return we(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Pv(t,r)]);case 1:return a=d.sent(),[4,Ev(t,n||a.userId,le(le({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=$i()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new kv)];case 4:return d.sent(),[4,this.add(new xc)];case 5:return d.sent(),[4,this.add(new uc)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),be(this,void 0,void 0,(function(){var n,r,i;return we(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,Tc(this.config)];case 1:return i=o.sent(),[4,new kc(this.config.apiKey,le(le({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Wn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Pc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Bt,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(nu(r)){var o=r._q;r._q=[],r=tu(new Bt,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Hs,r)}return e.prototype.revenue.call(this,t,n)},t}(ac),iu=s((function(){var e=new Ax;return{init:je(St(e.init.bind(e)),"init",Ae(e),Ce(e,["config"])),add:je(St(e.add.bind(e)),"add",Ae(e),Ce(e,["config.apiKey","timeline.plugins"])),remove:je(St(e.remove.bind(e)),"remove",Ae(e),Ce(e,["config.apiKey","timeline.plugins"])),track:je(St(e.track.bind(e)),"track",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),logEvent:je(St(e.logEvent.bind(e)),"logEvent",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),identify:je(St(e.identify.bind(e)),"identify",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),groupIdentify:je(St(e.groupIdentify.bind(e)),"groupIdentify",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),setGroup:je(St(e.setGroup.bind(e)),"setGroup",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),revenue:je(St(e.revenue.bind(e)),"revenue",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),flush:je(St(e.flush.bind(e)),"flush",Ae(e),Ce(e,["config.apiKey","timeline.queue.length"])),getUserId:je(e.getUserId.bind(e),"getUserId",Ae(e),Ce(e,["config","config.userId"])),setUserId:je(e.setUserId.bind(e),"setUserId",Ae(e),Ce(e,["config","config.userId"])),getDeviceId:je(e.getDeviceId.bind(e),"getDeviceId",Ae(e),Ce(e,["config","config.deviceId"])),setDeviceId:je(e.setDeviceId.bind(e),"setDeviceId",Ae(e),Ce(e,["config","config.deviceId"])),reset:je(e.reset.bind(e),"reset",Ae(e),Ce(e,["config","config.userId","config.deviceId"])),getSessionId:je(e.getSessionId.bind(e),"getSessionId",Ae(e),Ce(e,["config"])),setSessionId:je(e.setSessionId.bind(e),"setSessionId",Ae(e),Ce(e,["config"])),setOptOut:je(e.setOptOut.bind(e),"setOptOut",Ae(e),Ce(e,["config"])),setTransport:je(e.setTransport.bind(e),"setTransport",Ae(e),Ce(e,["config"]))}}),"createInstance"),De=iu(),AN=De.add,CN=De.flush,jN=De.getDeviceId,FN=De.getSessionId,LN=De.getUserId,NN=De.groupIdentify,DN=De.identify,RN=De.init,zN=De.logEvent,BN=De.remove,VN=De.reset,qN=De.revenue,UN=De.setDeviceId,GN=De.setGroup,WN=De.setOptOut,YN=De.setSessionId,$N=De.setTransport,HN=De.setUserId,XN=De.track,zd={production:"40ead723d18886045e302513245edb27",development:""},Dr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Bd=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Bd,"AnalyticsCategorySelectedCall");var Xi=Bd,Vd=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Vd,"AnalyticsLocationSelectedCall");var Ki=Vd,qd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(qd,"BlueDotDisableCall");var Oc=qd,Ud=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Ud,"BlueDotEnableCall");var Sc=Ud,Gd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Gd,"BlueDotOffCall");var Ic=Gd,Wd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Wd,"BlueDotOnCall");var Ac=Wd,Yd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Yd,"CameraAnimateCall");var Cc=Yd,$d=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s($d,"CameraCancelAnimationCall");var jc=$d,Hd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Hd,"CameraFocusOnCall");var Fc=Hd,Xd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Xd,"CameraGetSafeAreaInsetsCall");var Lc=Xd,Kd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Kd,"CameraInteractionDisableCall");var Nc=Kd,Jd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Jd,"CameraInteractionEnableCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Zd,"CameraSetCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Qd,"CameraSetSafeAreaInsetsCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(ep,"CameraTranslateCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(tp,"FlatLabelsAddCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(np,"FlatLabelsLabelAllLocationsCall");var qc=np,rp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(rp,"FlatLabelsRemoveCall");var Uc=rp,ip=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(ip,"FlatLabelsRemoveAllCall");var Gc=ip,ap=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(ap,"FlatLabelsSetAppearanceCall");var Wc=ap,op=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(op,"FloatingLabelsAddCall");var Yc=op,sp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(sp,"FloatingLabelsLabelAllLocationsCall");var $c=sp,up=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(up,"FloatingLabelsRemoveCall");var Hc=up,lp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(lp,"FloatingLabelsRemoveAllCall");var Xc=lp,cp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(cp,"FloatingLabelsResetPriorityCall");var Kc=cp,dp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(dp,"FloatingLabelsSetAppearanceCall");var Jc=dp,pp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(pp,"FloatingLabelsSetPriorityCall");var Zc=pp,fp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(fp,"GlobalGetVenueCall");var Ji=fp,hp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(hp,"GlobalGetVenueMvfCall");var Zi=hp,mp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(mp,"GlobalShowVenueCall");var Qc=mp,gp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(gp,"JourneyClearCall");var ed=gp,vp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(vp,"JourneyDrawCall");var td=vp,yp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(yp,"JourneySetStepCall");var nd=yp,bp=class{constructor(e){this.event_properties=e,b(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(bp,"MappedinGetCollectionItemByIdCall");var rd=bp,wp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(wp,"MappedinCoordinateAbsoluteDistanceToCall");var id=wp,kp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(kp,"MappedinCoordinateNearestNodeCall");var ad=kp,_p=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(_p,"MappedinLocationCloneCall");var Qi=_p,Mp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(Mp,"MappedinLocationDirectionsToCall");var ea=Mp,xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(xp,"MappedinLocationDistanceToCall");var ta=xp,Ep=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(Ep,"MappedinMapCreateCoordinateCall");var od=Ep,Tp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(Tp,"MappedinMapCreateCoordinateByXyCall");var sd=Tp,Pp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(Pp,"MappedinMapGetNorthCall");var ud=Pp,Op=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(Op,"MappedinNodeDirectionsToCall");var na=Op,Sp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(Sp,"MappedinNodeDistanceToCall");var ra=Sp,Ip=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(Ip,"MappedinPolygonDirectionsToCall");var ia=Ip,Ap=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(Ap,"MappedinPolygonDistanceToCall");var aa=Ap,Cp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Cp,"MappedinVenueMetadataRead");var oa=Cp,jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(jp,"MapViewAddInteractivePolygonCall");var ld=jp,Fp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Fp,"MapViewAddInteractivePolygonsForAllLocationsCall");var cd=Fp,Lp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(Lp,"MapViewClearPolygonColorCall");var dd=Lp,Np=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Np,"MapViewCreateCustomTooltipCall");var pd=Np,Dp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Dp,"MapViewCreateMarkerCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Rp,"MapViewCreateTooltipCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(zp,"MapViewDestroyCall");var md=zp,Bp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Bp,"MapViewDisableImageFlippingForAllPolygonsCall");var gd=Bp,Vp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Vp,"MapViewDrawPathCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(qp,"MapViewEnableImageFlippingForAllLocationsCall");var yd=qp,Up=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Up,"MapViewEnableImageFlippingForPolygonCall");var bd=Up,Gp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Gp,"MapViewGetNearestNodeByScreenCoordinatesCall");var wd=Gp,Wp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Wp,"MapViewGetPolygonAtCoordinateCall");var kd=Wp,Yp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Yp,"MapViewGetPrimaryLocationForPolygonCall");var _d=Yp,$p=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s($p,"MapViewLabelAllLocationsCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Hp,"MapViewRemoveAllInteractivePolygonsCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Xp,"MapViewRemoveAllMarkersCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Kp,"MapViewRemoveAllPathsCall");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Jp,"MapViewRemoveAllTooltipsCall");var Pd=Jp,Zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Zp,"MapViewRemoveInteractivePolygonCall");var Od=Zp,Qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Qp,"MapViewRemoveMarkerCall");var Sd=Qp,ef=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(ef,"MapViewRemovePathCall");var Id=ef,tf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(tf,"MapViewRemoveTooltipCall");var Ad=tf,nf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(nf,"MapViewSetBackgroundColorCall");var Cd=nf,rf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(rf,"MapViewSetHoverColorCall");var jd=rf,af=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(af,"MapViewSetMapCall");var Fd=af,of=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(of,"MapViewSetPolygonColorCall");var Ld=of,sf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(sf,"MapViewSetStateCall");var Nd=sf,uf=class{constructor(e){this.event_properties=e,b(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(uf,"MetricsMapLoadEvent");var Dd=uf,lf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(lf,"OfflineSearchAddQueryCall");var sa=lf,cf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(cf,"OfflineSearchConstructorCall");var ua=cf,df=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(df,"OfflineSearchSearchCall");var la=df,pf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(pf,"OfflineSearchSuggestCall");var ca=pf,au=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),ff=class{constructor(){b(this,"disabled",!1),b(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."),au();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=zd[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=iu(),this.amplitude.init(r,void 0,{...Dr,...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 au()}identify(e,t,n){if(!this.isInitializedAndEnabled())return au();e&&(n={...n,user_id:e});let r=new Bt,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):au()}analyticsCategorySelectedCall(e,t){return this.track(new Xi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Ki(e),t)}blueDotDisableCall(e,t){return this.track(new Oc(e),t)}blueDotEnableCall(e,t){return this.track(new Sc(e),t)}blueDotOffCall(e,t){return this.track(new Ic(e),t)}blueDotOnCall(e,t){return this.track(new Ac(e),t)}cameraAnimateCall(e,t){return this.track(new Cc(e),t)}cameraCancelAnimationCall(e,t){return this.track(new jc(e),t)}cameraFocusOnCall(e,t){return this.track(new Fc(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Lc(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Nc(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Dc(e),t)}cameraSetCall(e,t){return this.track(new Rc(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new zc(e),t)}cameraTranslateCall(e,t){return this.track(new Bc(e),t)}flatLabelsAddCall(e,t){return this.track(new Vc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new qc(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Uc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Gc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Wc(e),t)}floatingLabelsAddCall(e,t){return this.track(new Yc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new $c(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Hc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Xc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Kc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Jc(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Zc(e),t)}globalGetVenueCall(e,t){return this.track(new Ji(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Zi(e),t)}globalShowVenueCall(e,t){return this.track(new Qc(e),t)}journeyClearCall(e,t){return this.track(new ed(e),t)}journeyDrawCall(e,t){return this.track(new td(e),t)}journeySetStepCall(e,t){return this.track(new nd(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new rd(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new id(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new ad(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Qi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new ea(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new ta(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new od(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new sd(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new ud(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new na(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ra(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new ia(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new aa(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new oa(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new ld(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new cd(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new dd(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new pd(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new fd(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new hd(e),t)}mapViewDestroyCall(e,t){return this.track(new md(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new gd(e),t)}mapViewDrawPathCall(e,t){return this.track(new vd(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new yd(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new bd(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new wd(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new kd(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new _d(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Md(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new xd(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Ed(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Td(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Pd(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Od(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Sd(e),t)}mapViewRemovePathCall(e,t){return this.track(new Id(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new Ad(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new Cd(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new jd(e),t)}mapViewSetMapCall(e,t){return this.track(new Fd(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Ld(e),t)}mapViewSetStateCall(e,t){return this.track(new Nd(e),t)}metricsMapLoadEvent(e,t){return this.track(new Dd(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new sa(e),t)}offlineSearchConstructorCall(e,t){return this.track(new ua(e),t)}offlineSearchSearchCall(e,t){return this.track(new la(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ca(e),t)}};s(ff,"Ampli");var Rd=ff,da=new Rd;v();var xn,wr,Vt,Gr,en,Tu,Uy,Pu,Gy,Ma,Df,xa,Rf,qt,By=Xt(uy()),Vy=Xt(Dy()),qy=Xt(Ry()),zy="5.30.1",nP="https://api2.amplitude.com/2/httpapi",rP="https://api2.amplitude.com/batch",iP="__unspecified__",Lf={branch:"main",version:"0",source:"websdk"},at=class e{constructor(){I(this,Tu),I(this,Pu),I(this,Ma),I(this,xa),I(this,Vt,{}),I(this,Gr,!1),I(this,en,void 0),I(this,qt,s((async e=>{oP(e.type)&&(window.removeEventListener("visibilitychange",w(this,qt)),window.removeEventListener("pagehide",w(this,qt)),window.removeEventListener("beforeunload",w(this,qt)),window.removeEventListener("unload",w(this,qt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==w(e,wr)&&j(e,wr,zy),typeof navigator<"u"&&null!=navigator.userAgent&&j(this,en,new qy.UAParser(navigator.userAgent).getResult())}static setContext(t){j(e,xn,t)}static setVersion(t){j(e,wr,t)}addPendingEvent(t){var n;if(null==w(e,xn))return;let r=t.event_type;if(!ye(this,Pu,Gy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=w(this,Vt)[r];(0,Vy.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),w(this,Vt)[r]=t}async sendAllPendingEvents(){if(null==w(e,xn)||Object.keys(w(this,Vt)).length<1)return;if(w(this,Gr))return void R.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in w(this,Vt)){let n=w(this,Vt)[e],r=ye(this,Ma,Df).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{j(this,Gr,!0),200===(await ye(this,xa,Rf).call(this,rP,t)).status&&j(this,Vt,{})}catch(e){R.warn("Error sending batch product analytics!",e)}finally{j(this,Gr,!1)}}async load(){if(!da.isLoaded){let{promise:e}=da.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",w(this,qt)),window.addEventListener("beforeunload",w(this,qt)),window.addEventListener("unload",w(this,qt)),window.addEventListener("visibilitychange",w(this,qt))}))}}async sendEventNow(t){if(null==w(e,xn))return;let n=ye(this,Ma,Df).call(this,t);if(null!=n)try{await ye(this,xa,Rf).call(this,nP,[n])}catch(e){R.warn("Error sending single product analytics event!",e)}}};xn=new WeakMap,wr=new WeakMap,Vt=new WeakMap,Gr=new WeakMap,en=new WeakMap,Tu=new WeakSet,Uy=s((function(e){let t=e.event_type;return null!=w(this,Vt)[t]}),"#isEventTypePending"),Pu=new WeakSet,Gy=s((function(e){if(!ye(this,Tu,Uy).call(this,e))return!0;let t=e.event_type,n=w(this,Vt)[t];return!(0,By.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),Ma=new WeakSet,Df=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,y;if(null!=w(at,xn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&R.warn("Error processing product analytics event! Unspecified venue slug",e),null==Dr.plan&&R.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=da.client.getSessionId())?n:Su(),device_id:null!=(r=da.client.getDeviceId())?r:Ou(),plan:{branch:null!=(o=null==(i=Dr.plan)?void 0:i.branch)?o:Lf.branch,version:null!=(a=null==(s=Dr.plan)?void 0:s.version)?a:Lf.version,source:null!=(u=null==(l=Dr.plan)?void 0:l.source)?u:Lf.source},os_name:null==(c=w(this,en))?void 0:c.browser.name,os_version:null==(h=w(this,en))?void 0:h.browser.version,device_manufacturer:null==(d=w(this,en))?void 0:d.device.vendor,device_model:null==(p=w(this,en))?void 0:p.device.model,event_properties:{...e.event_properties,context:w(at,xn),sdk_version:w(at,wr),browser_name:null==(f=w(this,en))?void 0:f.browser.name,browser_version:null==(v=w(this,en))?void 0:v.browser.version,venue:null!=(y=null==(g=e.event_properties)?void 0:g.venue)?y:iP},time:e.time}}),"#makeBatchFormattedEvent"),xa=new WeakSet,Rf=s((async function(e,t){return await ft()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:zd.production,events:t})})}),"#batchSend"),qt=new WeakMap,s(at,"ProductAnalytics"),I(at,xn,void 0),I(at,wr,void 0);var Nf=at,aP=new Nf,Me=aP;function oP(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(oP,"areWeLeavingThePage");var It,Wr,He,Pa,Ea=class e extends Jt{constructor(e,t){super(e),I(this,It,void 0),I(this,Wr,void 0),I(this,He,{}),b(this,"id",""),b(this,"x",0),b(this,"y",0),b(this,"operationHours"),b(this,"externalId"),I(this,Pa,void 0),j(this,It,e),j(this,Wr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,He).map;if(typeof e<"u")return e;let t=w(this,It).getCollectionItemById("maps",w(this,Wr).map);return w(this,He).map=t,t}get lat(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lat}get lon(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lon}get paths(){let e=w(this,He).paths;if(typeof e<"u")return e;let t=[],n=w(this,It)._nodesById,r=w(this,Pa);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 w(this,He).paths=t,t}set paths(e){j(this,Pa,e)}get locations(){var e,t,n;let r=w(this,He).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=Qe.instances.get(w(this,It)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=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===s){i.push(t);break}}return w(this,He).locations=i,i}get polygon(){var e,t,n;let r=w(this,He).polygon;if(typeof r<"u")return r;let i,o=null!=(n=null==(t=null==(e=Qe.instances.get(w(this,It)))?void 0:e.polygonsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e];t.entrances.map((e=>e.id)).includes(s)&&(i=t)}return w(this,He).polygon=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.nodes.slice();t.options.things.maps&&Oe(n,"map"),["weight","multiplier","accessible"].forEach((function(e){Oe(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"node",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,It).venue.slug,i=new na({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,It).venue.slug;return Me.addPendingEvent(new ra({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Wr)}};It=new WeakMap,Wr=new WeakMap,He=new WeakMap,Pa=new WeakMap,s(Ea,"MappedinNode");var Ta=Ea;v();var tn,Yr,At,Ia,Sa=class e extends Jt{constructor(e,t){super(e),I(this,tn,void 0),I(this,Yr,void 0),I(this,At,{}),b(this,"geometry"),b(this,"perspectives"),b(this,"image"),b(this,"holes"),b(this,"textures"),b(this,"material"),b(this,"label"),b(this,"id",""),b(this,"layer"),b(this,"layerId"),b(this,"name"),b(this,"externalId"),b(this,"vertexes"),b(this,"center"),b(this,"canvasBounds"),b(this,"categoryRank"),I(this,Ia,void 0),j(this,tn,e),j(this,Yr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,At).map;if(typeof e<"u")return e;let t=w(this,tn).getCollectionItemById("maps",w(this,Yr).map);return w(this,At).map=t,t}get locations(){var e,t;let n=w(this,At).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=Qe.instances.get(w(this,tn)))?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 w(this,At).locations=r,r}get entrances(){let e=w(this,At).entrances;if(typeof e<"u")return e;let t=[],n=w(this,Ia),r=w(this,tn)._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 w(this,At).entrances=t,t}return[]}set entrances(e){j(this,Ia,e)}get rank(){let e=w(this,At).rank;if(typeof e<"u")return e;let{rankings:t}=w(this,tn);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(w(this,At).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(w(this,At).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.polygons.slice();t.options.things.maps&&Oe(n,"map"),t.options.things.nodes&&Oe(n,"entrances");let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"polygon",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,tn).venue.slug,i=new ia({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,tn).venue.slug;return Me.addPendingEvent(new aa({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Yr)}};tn=new WeakMap,Yr=new WeakMap,At=new WeakMap,Ia=new WeakMap,s(Sa,"MappedinPolygon");var kr=Sa;v();var sP=0,uP="9999-12-31T00:00:00.000Z";function lP(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||sP),n=new Date(e.end||uP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(lP,"getCurrentLocationState");var bt,Xn,wt,Aa,Ca,ja,$r=class e extends Jt{constructor(e,t){super(e),I(this,bt,void 0),I(this,Xn,void 0),I(this,wt,{}),b(this,"states"),b(this,"id",""),b(this,"name",""),b(this,"type",""),b(this,"description"),b(this,"sortOrder"),b(this,"logo"),b(this,"phone"),b(this,"social"),b(this,"color"),b(this,"shortName"),b(this,"detailsUrl"),b(this,"tags"),b(this,"toMap"),b(this,"externalId"),b(this,"showLabelWhenImagePresent"),b(this,"showSmartLabelWhenImagePresent"),b(this,"picture"),b(this,"operationHours"),b(this,"siblingGroups"),b(this,"gallery"),b(this,"amenity"),b(this,"filterFlags"),I(this,Aa,void 0),I(this,Ca,[]),I(this,ja,void 0),j(this,bt,e),j(this,Xn,t);let n=Object.assign({},t);delete n.categories,Object.assign(this,n)}get polygons(){let e=w(this,wt).polygons;if(typeof e<"u")return e;let t=[],n=w(this,Aa),r=w(this,bt)._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 w(this,wt).polygons=t,t}set polygons(e){j(this,Aa,e)}get nodes(){let e=w(this,wt).nodes;if(typeof e<"u")return e;let t=[],n=w(this,Ca),r=w(this,bt)._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 w(this,wt).nodes=t,t}set nodes(e){j(this,Ca,e)}get parent(){let e=w(this,wt).parent;if(typeof e<"u")return e;let t,n=w(this,bt)._locationsById,r=w(this,ja);return void 0!==r&&(t=n[r]),w(this,wt).parent=t,t}set parent(e){j(this,ja,e)}get categories(){let e=w(this,wt).categories;if(typeof e<"u")return e;let t=[];return w(this,Xn).categories.forEach((e=>{let n=w(this,bt).getCollectionItemById("categories",e);n&&t.push(n)})),w(this,wt).categories=t,t}get state(){return lP(this,w(this,bt).locationStates)}clone(){let t=w(this,bt).venue.slug;return Me.addPendingEvent(new Qi({venue:t})),new e(w(this,bt),w(this,Xn))}get nodeOperationHours(){let e=w(this,wt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=w(this,Xn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return w(this,wt).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.locations.slice();t.options.things.categories&&Oe(n,"categories"),t.options.things.nodes&&Oe(n,"nodes"),t.options.things.polygons&&Oe(n,"polygons"),t.options.things.locationStates&&Oe(n,"states");let r={fields:n,venue:t.options.venue};try{let n=await Se(t.options,"location",r);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return R.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof Ot,r=w(this,bt).venue.slug,i=new ea({with_destination_set:n||void 0,venue:r});return Me.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,bt).venue.slug;return Me.addPendingEvent(new ta({venue:n})),super.distanceTo(e,t)}toJSON(){let e=w(this,Xn);return delete e.color,e}};bt=new WeakMap,Xn=new WeakMap,wt=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,ja=new WeakMap,s($r,"MappedinLocation");var En=$r;v();var Hr,_r,La,Fa=class e{constructor(e,t){I(this,Hr,void 0),I(this,_r,{}),I(this,La,void 0),b(this,"name"),b(this,"externalId"),b(this,"parents"),b(this,"id"),b(this,"icon"),b(this,"iconFromDefaultList"),b(this,"sortOrder"),this.id=t.id,j(this,La,t),j(this,Hr,e),Object.assign(this,t)}get locations(){var e;let t=w(this,_r).locations;if(typeof t<"u")return t;let n=[],{locations:r}=w(this,Hr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return w(this,_r).locations=n,n}get children(){var e;let t=w(this,_r).children;if(typeof t<"u")return t;let{categories:n}=w(this,Hr),{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 w(this,_r).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n={fields:t.options.things.categories,venue:t.options.venue};try{return(await Se(t.options,"category",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Categories:",e),[]}}toJSON(){return w(this,La)}};Hr=new WeakMap,_r=new WeakMap,La=new WeakMap,s(Fa,"MappedinCategory");var Mr=Fa;v();var Na,Tn,zf=class{constructor(e,t){I(this,Na,void 0),I(this,Tn,void 0),b(this,"distance",0),b(this,"path",[]),b(this,"instructions",[]),j(this,Tn,e),j(this,Na,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=w(this,Tn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=w(this,Tn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=w(this,Tn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=w(this,Tn)._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=w(this,Tn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return w(this,Na)}};Na=new WeakMap,Tn=new WeakMap,s(zf,"MappedinDirections");var lr=zf;v();var Bf=class{constructor(e){b(this,"destinations",[]),this.destinations=e}};s(Bf,"MappedinDestinationSet");var Ot=Bf;v();var za,Da=class e{constructor(e){b(this,"id",""),I(this,za,void 0),b(this,"accessible"),b(this,"name"),b(this,"type"),b(this,"weight"),b(this,"multiplier"),b(this,"nodes"),b(this,"filterFlags"),j(this,za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Oe(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Se(t.options,"vortex",r)).map((t=>new e(t)))}catch(e){return R.error("Fetch Vortexes:",e),[]}}toJSON(){return w(this,za)}};za=new WeakMap,s(Da,"MappedinVortex");var Ra=Da;v();var Va,qa,Ua,Xr,Ba=class e{constructor(e,t){I(this,Va,void 0),I(this,qa,void 0),I(this,Ua,void 0),I(this,Xr,{}),b(this,"defaultMap",""),b(this,"address",""),b(this,"city",""),b(this,"countrycode",""),b(this,"externalId",""),b(this,"id",""),b(this,"latitude"),b(this,"logo"),b(this,"longitude"),b(this,"name",""),b(this,"operationHours"),b(this,"postal",""),b(this,"slug",""),b(this,"state",""),b(this,"telephone",""),b(this,"tzid",""),b(this,"tzidOverride",""),b(this,"utcOffset",""),b(this,"website",""),b(this,"secureContentStorage",!1),b(this,"defaultLanguage"),b(this,"languages",[]),b(this,"topLocations",[]),j(this,qa,e),j(this,Va,t),Object.assign(this,t)}get metadata(){return Me.addPendingEvent(new oa({venue:this.slug})),w(this,Ua)}set metadata(e){j(this,Ua,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){let n={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let r=await Se(t.options,"venue",n);return new e(t,Array.isArray(r)?r[0]:r)}catch(e){return R.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==w(this,Xr).isMultiBuilding){let e=w(this,qa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;w(this,Xr).isMultiBuilding=n}return w(this,Xr).isMultiBuilding}toJSON(){return w(this,Va)}};Va=new WeakMap,qa=new WeakMap,Ua=new WeakMap,Xr=new WeakMap,s(Ba,"MappedinVenue");var xr=Ba;v();var Wa,Ga=class e{constructor(e){b(this,"id",""),I(this,Wa,void 0),j(this,Wa,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await Se(t.options,"apollo-theme",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Theme:",e),[]}}toJSON(){return w(this,Wa)}};Wa=new WeakMap,s(Ga,"MappedinTheme");var Iu=Ga;v();var Ha,Ya=class e{constructor(e){I(this,Ha,void 0),b(this,"polygons",[]),j(this,Ha,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 R.error("Fetch Rankings:",e),null}}toJSON(){return w(this,Ha)}};Ha=new WeakMap,s(Ya,"MappedinRankings");var $a=Ya;v(),v();var Ja,Jr,Za,Xa=class e{constructor(e,t){I(this,Ja,void 0),I(this,Jr,void 0),I(this,Za,{}),b(this,"id",""),b(this,"type",""),b(this,"name",""),b(this,"description"),b(this,"image"),b(this,"startDate"),b(this,"endDate"),b(this,"showDate"),j(this,Jr,t),j(this,Ja,e),Object.assign(this,t)}location(){let e=w(this,Za).location;if(typeof e<"u")return e;let t,n=w(this,Ja)._locationsById,r=w(this,Jr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return w(this,Za).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.events.slice();t.options.things.locations&&Oe(n,"location");let r={fields:n,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Se(t.options,"event",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Events:",e),[]}}toJSON(){return w(this,Jr)}};Ja=new WeakMap,Jr=new WeakMap,Za=new WeakMap,s(Xa,"MappedinEvent");var Ka=Xa;v();var to,Qa=class e{constructor(e){I(this,to,void 0),b(this,"id",""),b(this,"name",""),b(this,"value",""),j(this,to,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await Se(t.options,"location-state",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Location States:",e),[]}}toJSON(){return w(this,to)}};to=new WeakMap,s(Qa,"MappedinLocationState");var eo=Qa;v(),v(),v();var Wy=" ",ot=class e{static get separator(){return Wy}static set separator(e){Wy=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,s=null,a=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),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}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(ot,"Dms");var Vf=ot;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var ne=Vf,xe=Math.PI,J=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=ne.wrap90(Number(e)),this._lon=ne.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?ne.wrap90(ne.parse(e)):ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?ne.wrap90(ne.parse(e)):ne.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?ne.wrap180(ne.parse(e)):ne.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let n,r;if(2==t.length&&([n,r]=t,n=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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=ne.wrap90(ne.parse(n)),r=ne.wrap180(ne.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(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*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),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return ne.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return ne.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(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+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(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/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(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),v=h*Math.sin(r)+d*Math.sin(o),g=Math.atan2(v,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=g.toDegrees(),b=y.toDegrees();return new e(m,b)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+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(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*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(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),v=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),g=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(v,-1),1)),m=u-(Math.sin(l-s)>0?g:2*xe-g),b=(Math.sin(l-s)>0?2*xe-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let w=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*w),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),S=M.toDegrees(),k=x.toDegrees();return new e(S,k)}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,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*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,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*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(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);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(),v=p.toDegrees();return{lon1:ne.wrap180(f),lon2:ne.wrap180(v)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>xe&&(a=a>0?-(2*xe-a):2*xe+a);let l=Math.log(Math.tan(o/2+xe/4)/Math.tan(i/2+xe/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*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)>xe&&(i=i>0?-(2*xe-i):2*xe+i);let o=Math.log(Math.tan(r/2+xe/4)/Math.tan(n/2+xe/4)),s=Math.atan2(i,o).toDegrees();return ne.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>xe/2&&(u=u>0?xe-u:-xe-u);let c=Math.log(Math.tan(u/2+xe/4)/Math.tan(i/2+xe/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/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)>xe&&(r+=2*xe);let s=(n+i)/2,a=Math.tan(xe/4+n/2),l=Math.tan(xe/4+i/2),u=Math.tan(xe/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.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))}a(e)&&(o=Math.abs(o)-2*xe);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(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=ne.toLat(this.lat,e,t),r=ne.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(J,"LatLonSpherical");var nn,Kn,io,Fe=J,no=class e{constructor(e,t){I(this,nn,void 0),I(this,Kn,{}),I(this,io,void 0),b(this,"id",""),b(this,"group",""),b(this,"name",""),b(this,"shortName",""),b(this,"elevation",0),b(this,"subtitle"),b(this,"scale",0),b(this,"layers"),b(this,"x_scale"),b(this,"perspectiveId"),b(this,"scene"),b(this,"width",0),b(this,"height",0),b(this,"georeference",[]),b(this,"_scale",0),j(this,nn,e),j(this,io,t),Object.assign(this,t),this._scale=Yy(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=Qe.instances.get(w(this,nn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=w(this,Kn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&w(this,nn)._mapGroupsById[t]||null;return w(this,Kn).mapGroup=n,n}createCoordinateByXY(e,t){return new Er({x:e,y:t,map:this,mappedin:w(this,nn)})}createCoordinate(e,t){return new Er({lat:e,lon:t,map:this,mappedin:w(this,nn)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new Fe(t.target.x,t.target.y),i=new Fe(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,R.warn(t),R.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 fetch(t){var n;let r=t.options.things.maps.slice();t.options.perspective&&Oe(r,"perspectives"),t.options.things.mapGroups&&Oe(r,"group"),Oe(r,"elevation"),Oe(r,"x_scale"),Oe(r,"scale"),Oe(r,"georeference");let i={fields:r,perspective:t.options.perspective,venue:t.options.venue};try{let a=await Se(t.options,"map",i),l=s((e=>{let t=o.layers.find((t=>t.id===e));t?t.visible=!0:o.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,s=a.length;i<s;++i){var o=a[i];if(o){let e=o.perspective;null!=e&&(o.perspectiveId=e.id,r.indexOf("scene")>-1&&(o.scene=e.scene),e.layers?(o.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):o.layers.forEach((e=>{e.visible=!0}))),delete o.perspective}if(t.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let e=await ft()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return R.error("Fetch Maps:",e),[]}}get center(){if(w(this,Kn).center)return w(this,Kn).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:s,lon:a}=this.createCoordinateByXY(n,r),l=new Fe(i,o),u=new Fe(s,a),c=l.midPointTo(u);return w(this,Kn).center=c,c}toJSON(){return w(this,io)}};nn=new WeakMap,Kn=new WeakMap,io=new WeakMap,s(no,"MappedinMap");var ro=no;v();var ao,qf,oo,Uf,so,uo,Au,$y,Cu,Hy,rn,an,on,sn,Gf=class{constructor(e){I(this,ao),I(this,oo),I(this,Au),I(this,Cu),b(this,"map"),I(this,so,{}),I(this,uo,void 0),I(this,rn,void 0),I(this,an,void 0),I(this,on,void 0),I(this,sn,void 0);let{map:t,mappedin:n}=e;null!=e.lat&&null!=e.lon&&(j(this,rn,e.lat),j(this,an,e.lon)),null!=e.x&&null!=e.y&&(j(this,on,e.x),j(this,sn,e.y)),this.map=t,j(this,uo,n)}get x(){return ye(this,oo,Uf).call(this,"x")}get y(){return ye(this,oo,Uf).call(this,"y")}get lat(){return ye(this,ao,qf).call(this,"lat")}get lon(){return ye(this,ao,qf).call(this,"lon")}absoluteDistanceTo(e){return Xy([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=w(this,so).nearestNode;if(typeof e<"u")return e;let t=Qe.instances.get(w(this,uo)).findNearestNodeOnMap(this.map.id,this);return w(this,so).nearestNode=t,t}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};ao=new WeakSet,qf=s((function(e){if(typeof w(this,rn)<"u"&&typeof w(this,an)<"u")return w(this,"lat"===e?rn:an);if(typeof w(this,on)<"u"&&typeof w(this,sn)<"u"){let[t,n]=ye(this,Cu,Hy).call(this,w(this,on),w(this,sn));return j(this,rn,t),j(this,an,n),w(this,"lat"===e?rn:an)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),oo=new WeakSet,Uf=s((function(e){if(w(this,on)&&w(this,sn))return w(this,"x"===e?on:sn);if(null!=w(this,rn)&&null!=w(this,an)){let[t,n]=ye(this,Au,$y).call(this,w(this,rn),w(this,an));return j(this,on,t),j(this,sn,n),w(this,"x"===e?on:sn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),so=new WeakMap,uo=new WeakMap,Au=new WeakSet,$y=s((function(e,t){let n=this.map.georeference[0],r=new Fe(n.target.x,n.target.y),i=new Fe(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Cu=new WeakSet,Hy=s((function(e,t){let n,r=this.map.georeference[0],i=new Fe(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s:o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),rn=new WeakMap,an=new WeakMap,on=new WeakMap,sn=new WeakMap,s(Gf,"MappedinCoordinate");var Er=Gf;v();var po,Zr,fo,lo=class e{constructor(e,t){I(this,po,void 0),I(this,Zr,void 0),I(this,fo,{}),b(this,"id",""),b(this,"name",""),j(this,Zr,t),j(this,po,e),Object.assign(this,t)}get maps(){let e=w(this,fo).maps;if(typeof e<"u")return e;let t=[],{maps:n}=w(this,po),{id:r}=w(this,Zr);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return w(this,fo).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await Se(t.options,"map-group",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Map Groups:",e),[]}}toJSON(){return w(this,Zr)}};po=new WeakMap,Zr=new WeakMap,fo=new WeakMap,s(lo,"MappedinMapGroup");var co=lo;v();var eb=Xt(Ky());v(),v();var Tr,Ut,Gt,Wf=[0,4,6,8,10],Pn=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],Wf.map(((e,t)=>n.slice(e,t===Wf.length-1?void 0:Wf[t+1]).join(""))).join("-")}),"randomId"),Jy="mi-session-data",Zy="mi-local-data",ho=class e{constructor(){I(this,Ut,void 0),I(this,Gt,void 0);try{let e=sessionStorage.getItem(Jy);j(this,Ut,e?JSON.parse(e):{id:Pn()})}catch{j(this,Ut,{id:Pn()})}try{let e=localStorage.getItem(Zy);j(this,Gt,e?JSON.parse(e):{deviceId:Pn()})}catch{j(this,Gt,{deviceId:Pn()})}w(this,Ut).id||(w(this,Ut).id=Pn()),w(this,Gt).deviceId||(w(this,Gt).deviceId=Pn())}static getInstance(){return w(this,Tr)||j(this,Tr,new e),w(this,Tr)}static ___clearInstance(){j(this,Tr,void 0)}saveSessionData(e,t){w(this,Ut)[e]=t;try{return sessionStorage.setItem(Jy,JSON.stringify(w(this,Ut))),!0}catch{return!1}}loadSessionData(e){let t=w(this,Ut)[e];if(null!=t)return t}saveLocalData(e,t){w(this,Gt)[e]=t;try{return localStorage.setItem(Zy,JSON.stringify(w(this,Gt))),!0}catch{return!1}}loadLocalData(e){let t=w(this,Gt)[e];if(null!=t)return t}};Tr=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,s(ho,"SafeStorage"),I(ho,Tr,void 0);var mo=ho;v();var Yf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Fu(e){return/^[\da-f]{24}$/i.test(e)}function Qy(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],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function cP(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(Qy(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Qy(n)}async function Se(e,t,n,r=!1){return Kr(e,t,n,r,!0)}async function Kr(e,t,n,r=!1,i=!1){let o=cP(e,t,n,r),s=await Lu(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function dP(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 Lu(e,t,n=!1){let r=dP(e,t,n),i=await ft()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function Oe(e,t){e.indexOf(t)<0&&e.push(t)}function Xy([e,t],[n,r]){let i=new Fe(e,t),o=new Fe(n,r);return i.distanceTo(o)}function Yy(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 Fe(n.target.x,n.target.y),o=new Fe(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,R.warn(n),R.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Bi(e){var t;return e instanceof kr?e.entrances.map((e=>e.id)):e instanceof En?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function tb(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=>{R.error(e)}))));await Promise.all(e)}catch(e){R.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||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 Qr(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 nb(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,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function Ou(){return mo.getInstance().loadLocalData("deviceId")}function Su(){return mo.getInstance().loadSessionData("id")}s(Fu,"isGatewayKey"),s(Qy,"stringifyQuery"),s(cP,"buildUrl"),s(Se,"getArray"),s(Kr,"getObject"),s(dP,"constructParamsForRequest"),s(Lu,"generateAPIRequest"),s(Oe,"addToSet"),s(Xy,"getDistanceBetweenLatLon"),s(Yy,"getMapScale"),s(Bi,"getNodesForNavigatable"),s(tb,"populateBundledImagesAsBlobs"),s(Qr,"debounce"),s(nb,"normalizeCategoryRank"),s(Ou,"getDeviceID"),s(Su,"getSessionID");var rb=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 ib(e){var t;let n={...e};for(let[e,r]of Object.entries(Yf))n[e]=(0,eb.default)(r.concat(null!=(t=n[e])?t:[]));return n}function $f(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return ab(this.cover(t,n),t,n,e)}function ab(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},v=e._x0,g=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(v+y)/2))?v=o:y=o,(c=n>=(s=(g+m)/2))?g=s:m=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&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=(v+y)/2))?v=o:y=o,(c=n>=(s=(g+m)/2))?g=s:m=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function ob(e){var t,n,r,i,o=e.length,s=new Array(o),a=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))||(s[n]=r,a[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)ab(this,s[n],a[n],e[n]);return this}function Hf(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 s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){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 Xf(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Kf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Jf(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],v=this._root;for(v&&f.push(new qe(v,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(!(!(v=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(v.length){var g=(i+s)/2,y=(o+a)/2;f.push(new qe(v[3],g,y,s,a),new qe(v[2],i,y,g,a),new qe(v[1],g,o,s,y),new qe(v[0],i,o,g,y)),(u=(t>=y)<<1|e>=g)&&(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,v.data),b=t-+this._y.call(null,v.data),w=m*m+b*b;if(w<n){var _=Math.sqrt(n=w);c=e-_,h=t-_,d=e+_,p=t+_,r=v.data}}return r}function Zf(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,v=this._y0,g=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+g)/2))?f=a:g=a,(c=s>=(l=(v+y)/2))?v=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 sb(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Qf(){return this._root}function eh(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function th(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new qe(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new qe(n,u,c,o,s)),(n=l[2])&&a.push(new qe(n,r,c,u,s)),(n=l[1])&&a.push(new qe(n,u,i,o,c)),(n=l[0])&&a.push(new qe(n,r,i,u,c))}return this}function nh(e){var t,n=[],r=[];for(this._root&&n.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new qe(o,s,a,c,h)),(o=i[1])&&n.push(new qe(o,c,a,l,h)),(o=i[2])&&n.push(new qe(o,s,h,c,u)),(o=i[3])&&n.push(new qe(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 ub(e){return e[0]}function rh(e){return arguments.length?(this._x=e,this):this._x}function lb(e){return e[1]}function ih(e){return arguments.length?(this._y=e,this):this._y}function go(e,t,n){var r=new ah(null==t?ub:t,null==n?lb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function ah(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 cb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(ib,"mergeThings"),v(),v(),v(),v(),s($f,"default"),s(ab,"add"),s(ob,"addAll"),v(),s(Hf,"default"),v(),s(Xf,"default"),v(),s(Kf,"default"),v(),v(),s(qe,"default"),s(Jf,"default"),v(),s(Zf,"default"),s(sb,"removeAll"),v(),s(Qf,"default"),v(),s(eh,"default"),v(),s(th,"default"),v(),s(nh,"default"),v(),s(ub,"defaultX"),s(rh,"default"),v(),s(lb,"defaultY"),s(ih,"default"),s(go,"quadtree"),s(ah,"Quadtree"),s(cb,"leaf_copy");var st=go.prototype=ah.prototype;st.copy=function(){var e,t,n=new ah(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=cb(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]=cb(t));return n},st.add=$f,st.addAll=ob,st.cover=Hf,st.data=Xf,st.extent=Kf,st.find=Jf,st.remove=Zf,st.removeAll=sb,st.root=Qf,st.size=eh,st.visit=th,st.visitAfter=nh,st.x=rh,st.y=ih;var un,Re,Wt=class e{constructor(e){I(this,un,void 0),b(this,"categories"),b(this,"locations"),b(this,"vortexes"),b(this,"maps"),b(this,"nodes"),b(this,"polygons"),b(this,"events"),b(this,"mapGroups"),b(this,"locationStates"),b(this,"rankings"),b(this,"languages",{}),I(this,Re,{}),j(this,un,e)}get polygonsByMapId(){if(w(this,Re).polygonsByMapId)return w(this,Re).polygonsByMapId;let e,t={};for(let n=0,r=w(this,un).polygons.length;n<r;++n)e=w(this,un).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 w(this,Re).polygonsByMapId=n,w(this,Re).polygonsByMapId}get nodesByMapId(){if(w(this,Re).nodesByMapId)return w(this,Re).nodesByMapId;let e,t={};for(let n=0,r=w(this,un).nodes.length;n<r;++n)e=w(this,un).nodes[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 w(this,Re).nodesByMapId=n,w(this,Re).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(w(this,Re).nodeTreesByMap||(w(this,Re).nodeTreesByMap=new Map),!w(this,Re).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=go();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),w(this,Re).nodeTreesByMap.set(e,r)}return w(this,Re).nodeTreesByMap.get(e).find(t.x,t.y)}get locationsByMapId(){if(w(this,Re).locationsByMapId)return w(this,Re).locationsByMapId;let e,t={};for(let n=0,r=w(this,un).locations.length;n<r;++n){e=w(this,un).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 w(this,Re).locationsByMapId=n,w(this,Re).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};un=new WeakMap,Re=new WeakMap,s(Wt,"MappedinCache"),b(Wt,"instances",new Map);var oh=Wt,Qe=oh,Oa=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Oa||{}),Pr={categories:Mr,locations:En,vortexes:Ra,maps:ro,nodes:Ta,polygons:kr,venue:xr,events:Ka,mapGroups:co,themes:Iu,locationStates:eo,rankings:$a},Nu=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Nu||{});v(),v(),v(),v();var ut=6371008.8,db={centimeters:100*ut,centimetres:100*ut,degrees:ut/111325,feet:3.28084*ut,inches:39.37*ut,kilometers:ut/1e3,kilometres:ut/1e3,meters:ut,metres:ut,miles:ut/1609.344,millimeters:1e3*ut,millimetres:1e3*ut,nauticalmiles:ut/1852,radians:1,yards:1.0936*ut},M3={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/ut,yards:1.0936133};function Jn(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 lt(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(!sh(e[0])||!sh(e[1]))throw new Error("coordinates must contain numbers");return Jn({type:"Point",coordinates:e},t,n)}function On(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 Jn({type:"LineString",coordinates:e},t,n)}function Or(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 pb(e,t){void 0===t&&(t="kilometers");var n=db[t];if(!n)throw new Error(t+" units is invalid");return e*n}function fb(e,t){void 0===t&&(t="kilometers");var n=db[t];if(!n)throw new Error(t+" units is invalid");return e/n}function vo(e){return 180*(e%(2*Math.PI))/Math.PI}function ht(e){return e%360*Math.PI/180}function sh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Du(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,v="Feature"===p,g=f?e.features.length:1,y=0;y<g;y++){a=(c=!!(u=f?e.features[y].geometry:v?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<a;m++){var b=0,w=0;if(null!==(s=c?u.geometries[m]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,y,b,w))return!1;d++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,b,w))return!1;d++,"MultiPoint"===_&&b++}"LineString"===_&&b++;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,w))return!1;d++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(w=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,w))return!1;d++}w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Du(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function uh(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 pP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=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,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))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 yo(e,t){pP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Jn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Jn({type:s,coordinates:u},r),n,l))return!1}}))}function fP(e,t){yo(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Du(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=On([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function hb(e,t,n){var r=n,i=!1;return fP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function lh(e){var t=[1/0,1/0,-1/0,-1/0];return Du(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(Jn,"feature"),s(lt,"point"),s(On,"lineString"),s(Or,"featureCollection"),s(pb,"radiansToLength"),s(fb,"lengthToRadians"),s(vo,"radiansToDegrees"),s(ht,"degreesToRadians"),s(sh,"isNumber"),s(Du,"coordEach"),s(uh,"featureEach"),s(pP,"geomEach"),s(yo,"flattenEach"),s(fP,"segmentEach"),s(hb,"segmentReduce"),s(lh,"bbox"),lh.default=lh;var Ru=lh;function ln(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 _t(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 mb(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function hP(e,t,n){void 0===n&&(n={});var r=ln(e),i=ln(t),o=ht(i[1]-r[1]),s=ht(i[0]-r[0]),a=ht(r[1]),l=ht(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return pb(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),s(ln,"getCoord"),s(_t,"getCoords"),s(mb,"getType"),s(hP,"distance");var Zn=hP;function zu(e,t){return void 0===t&&(t={}),hb(e,(function(e,n){var r=n.geometry.coordinates;return e+Zn(r[0],r[1],t)}),0)}function Bu(e,t,n){if(void 0===n&&(n={}),!0===n.final)return mP(e,t);var r=ln(e),i=ln(t),o=ht(r[0]),s=ht(i[0]),a=ht(r[1]),l=ht(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return vo(Math.atan2(u,c))}function mP(e,t){var n=Bu(t,e);return n=(n+180)%360}function Vu(e,t,n,r){void 0===r&&(r={});var i=ln(e),o=ht(i[0]),s=ht(i[1]),a=ht(n),l=fb(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return lt([vo(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),vo(u)],r.properties)}function gP(e){if(!e)throw new Error("geojson is required");var t=[];return yo(e,(function(e){vP(e,t)})),Or(t)}function vP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=_t(r);break;case"LineString":n=[_t(r)]}n.forEach((function(n){yP(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function yP(e,t){var n=[];return e.reduce((function(e,r){var i=On([e,r],t);return i.bbox=bP(e,r),n.push(i),r})),n}function bP(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(zu,"length"),v(),v(),v(),s(Bu,"bearing"),s(mP,"calculateFinalBearing"),v(),s(Vu,"destination"),v(),v(),s(gP,"lineSegment"),s(vP,"lineSegmentFeature"),s(yP,"createSegments"),s(bP,"bbox");var ch=gP,jb=Xt(Ab(),1);function YP(e,t){var n={},r=[];if("LineString"===e.type&&(e=Jn(e)),"LineString"===t.type&&(t=Jn(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=Cb(e,t);return i&&r.push(i),Or(r)}var o=(0,jb.default)();return o.load(ch(t)),uh(ch(e),(function(e){uh(o.search(e),(function(t){var i=Cb(e,t);if(i){var o=_t(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Or(r)}function Cb(e,t){var n=_t(e),r=_t(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],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?lt([i+p*(s-i),o+p*(a-o)]):null}s(YP,"lineIntersect"),s(Cb,"intersects");var Fb=YP;function $P(e,t,n){void 0===n&&(n={});var r=lt([1/0,1/0],{dist:1/0}),i=0;return yo(e,(function(e){for(var o=_t(e),s=0;s<o.length-1;s++){var a=lt(o[s]);a.properties.dist=Zn(t,a,n);var l=lt(o[s+1]);l.properties.dist=Zn(t,l,n);var u=Zn(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Bu(a,l),d=Vu(t,c,h+90,n),p=Vu(t,c,h-90,n),f=Fb(On([d.geometry.coordinates,p.geometry.coordinates]),On([a.geometry.coordinates,l.geometry.coordinates])),v=null;f.features.length>0&&((v=f.features[0]).properties.dist=Zn(t,v,n),v.properties.location=i+Zn(a,v,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),v&&v.properties.dist<r.properties.dist&&((r=v).properties.index=s),i+=u}})),r}s($P,"nearestPointOnLine");var wo=$P;function HP(e,t,n){var r=_t(n);if("LineString"!==mb(n))throw new Error("line must be a LineString");for(var i,o=wo(n,e),s=wo(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),On(a,n.properties)}s(HP,"lineSlice");var Mh=HP;function XP(e,t){void 0===t&&(t={});var n=Ru(e);return lt([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),s(XP,"center");var Lb=XP;function KP(e,t,n){void 0===n&&(n={});for(var r=ln(e),i=_t(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),JP(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function JP(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*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?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}v(),s(KP,"booleanPointOnLine"),s(JP,"isPointOnLineSegment");var Nb=KP,ZP=1e-7,Db=.005,Rb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function xh(e,t){let n=nO(t);return Or(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=QP(t,o)),e.push(...r),e}),[]))}function QP(e,t){return t.reduce(((e,t)=>{let n={epsilon:ZP},r=e.findIndex((e=>Nb(Lb(t),e,n))),i=e[r];if(i){let[n,o]=tO(i,t);e.splice(r,1,n,o)}return e}),[e])}function eO(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function tO(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>wo(e,lt(t))));return r.reduce(((t,n)=>{let r=Mh(lt(n),i[0],e),o=Mh(lt(n),i[1],e),s=zu(r)<zu(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function zb(e){let t=new Map;for(let n in e){let r=e[n];if(!eO(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function nO(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Bb(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 EO(e){if(null==e||"object"!=typeof e)return!1;for(let t of Rb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function TO(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function E0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Hh(),$h)))).unzipSync(e);if(!TO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function Kh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Hh(),$h)))).unzipSync(e);if(!EO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function T0(e){let[t,n,r,i]=Ru(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function PO(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(xh,"processObstructions"),s(QP,"splitObstructionByAllEntrances"),s(eO,"isPolygonStyle"),s(tO,"splitObstructionByEntrance"),s(zb,"getStylesMap"),s(nO,"getEntranceMap"),v(),v(),s(Bb,"findMapWithElevationClosestToZero"),s(EO,"validateStaticMVFFiles"),s(TO,"validateStaticMVFv1Files"),s(E0,"unzipMVFv1"),s(Kh,"unzipMVF"),s(T0,"getMapExtent"),s(PO,"convertMap");var Zh=class{constructor(e){b(this,"mapExtent"),b(this,"stretchRatio"),b(this,"midLat"),b(this,"midLong"),b(this,"mapUnitRatio",1e6),b(this,"latDistance"),b(this,"longDistance"),b(this,"mapScale"),b(this,"widthInMapUnits"),b(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new Fe(o,i),l=new Fe(o,n),u=new Fe(t,s),c=new Fe(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,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(Zh,"CoordinateConverter");var rl=Zh;function OO(e,t){let n=new Map,r=[];return e.features.forEach((e=>{let t=e.properties.id;t&&!n.has(t)&&n.set(t,e)})),n.forEach(((e,i)=>{let o=e.properties.map||"",s=t.get(o);if(s){let t=s.convert(e.geometry.coordinates),a=e.properties.externalId||"",l=[];e.properties.neighbors.forEach((e=>{var t;let r=null!=(t=e.weight)?t:0,i=n.get(e.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),r.push({id:i,map:o,externalId:a,paths:l,...t})}})),r}function SO(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(OO,"convertNodes"),s(SO,"convertNodes_MVFv1");var M0=s(((e,t,n,r,i,o)=>{var s,a;let l,u=[],c=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,h=i.Walls,d=i.ExteriorWalls,p={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/c},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.color)||"#000000"},vertexes:[]},f={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/c},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let h=t.features[i];if("Point"===h.geometry.type)continue;let d="desk-entrance"===(null==(s=h.properties.kind)?void 0:s.toLowerCase()),v=(d?h.properties.externalId:h.properties.id)||"",g=h.properties.externalId||"",y=n.get(v)||[];if("destinationNodes"in h.properties&&h.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(g,y);else{let n=r.get(h.properties.id),s=h.properties.center?o.convert(h.properties.center):void 0,d=h.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=h.properties.kind||"",b="void"===m.toLowerCase(),w=1-(i+1)/t.features.length*Db;"LineString"===h.geometry.type&&"wall"===(null==(a=h.properties.kind)?void 0:a.toLowerCase())?(l=h.geometry.coordinates.map((e=>o.convert(e))),h.properties.footprintComponent?f.vertexes.push(l):p.vertexes.push(l)):(l=h.geometry.coordinates[0].map((e=>o.convert(e))),u.push({entrances:y,map:e,id:v,externalId:g,layer:m,geometry:{visible:!b,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/c},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/c*w},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:l,center:s,holes:d}))}}return p.vertexes.length>0&&u.push(p),f.vertexes.length>0&&u.push(f),u}),"generateMappedinPolygons"),x0=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))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=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/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function IO(e,t,n,r,i,o,s){let a=M0(e,n,r,i,o,s),l=M0(e,t,r,i,o,s);return a.concat(l)}function AO(e){let t=[];return e.forEach((e=>{var n;t.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(n=e.accessible)&&n})})),t}function CO(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,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!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function P0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function Jh(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function O0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function S0(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 I0(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 A0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Xh(e,t,n){let r=I0(e,t);for(let e of r){let t=A0(e);null==n[t]&&(n[t]={id:t,name:e})}}function C0(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 jO(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return C0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function Oo(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!C0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=jO(t),s=S0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=I0(e,t);for(let e of a){let t=A0(e);r[s].categories.push(t)}}function FO(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:v,obstruction:g}=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=v[e.id])?void 0:i.features)?o:[],m=null!=(a=null==(s=g[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Xh("space",t,d),Oo("space",t,e,h));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(Xh("entrance",t,d),Oo("entrance",t,e,h));let w={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};Oo("entrance",w,e,h);for(let n of m){if(Xh("obstruction",n,d),Oo("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=b.get(n);t&&Oo("entrance",{...t,properties:{...t.properties,externalId:w.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=S0("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 j0(e){var t,n,r,i,o,s,a,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:[],v=null!=(o=e["map.geojson"])?o:[],g=null!=(s=e["styles.json"])?s:{},y=null!=(a=e["manifest.geojson"])?a:{},m=null!=(l=e["node.geojson"])?l:[],b=null!=(u=e["connection.json"])?u:[],w={},_=new Map,M=[],x=zb(g),S=new Map,k=new Map;v.forEach((e=>{let t=e.id;t&&!k.has(t)&&k.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!k.has(e))return;let t=xh(h[e],p[e]);if(t.features.length){let n=T0(t),r=new rl(n);_.set(e,r),w[e]=IO(e,t,d[e],S,x,g,r),M.push(PO(k.get(e),w[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let O=Object.values(w).flat(),I=AO(b),E=OO(m,_),A=y.features[0],C=A.properties.name,P=A.geometry.coordinates[0],T=A.geometry.coordinates[1],j=(null==(c=Bb(M))?void 0:c.id)||"",{locations:F,categories:N}=FO(e,S);return{polygons:O,venue:{name:C,latitude:T,longitude:P,defaultMap:j},maps:M,vortexes:I,nodes:E,locations:F,mapGroups:[],locationStates:[],categories:N,themes:[],imageBinaries:new Map}}function F0(e){var t,n,r,i,o,s,a;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!=(s=e.connection)?s:{},f={},v=new Map,g=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=xh(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=T0(t),r=new rl(n);v.set(e,r);let i=x0(e,u[e],r),o=x0(e,t,r);f[e]=i.concat(o),y=y.concat(SO(c[e],e,r)),g.push(LO(h[e],f[e],r))}m=m.concat(CO(p[e]))}));let b=Object.values(f).flat(),w=d.features[0],_=w.properties.name,M=w.geometry.coordinates[0],x=w.geometry.coordinates[1],S=(null==(a=g[0])?void 0:a.id)||"",k=new Map;b.forEach((e=>k.set(e.id,e)));let O=[],I=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>k.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),O=e}}return{...e.properties,nodes:O,polygons:e.properties.spaces}})),E=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:_,latitude:x,longitude:M,defaultMap:S},maps:g,vortexes:m,nodes:y,locations:I,mapGroups:[],locationStates:[],categories:E,themes:[],imageBinaries:new Map}}function LO(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 s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(IO,"convertPolygons"),s(AO,"convertVortexes"),s(CO,"convertVortexes_MVFv1"),s(P0,"overrideMVF"),s(Jh,"parseMVF"),s(O0,"parseMVFv1"),s(S0,"getLocationId"),s(I0,"getFeatureCategories"),s(A0,"getCategoryIdFromName"),s(Xh,"mutateCategoriesWithNewFeature"),s(C0,"isFeatureConnection"),s(jO,"getLocationLabel"),s(Oo,"mutateLocationsWithNewFeature"),s(FO,"createMetaDataFromMVF"),s(j0,"convertMVFToMappedin"),s(F0,"convertMVFv1ToMappedin"),s(LO,"convertMap_MVFv1"),v();var ew,So,hi,mi,Io,gi,vi,yi,rr,bi,wi,ki,Ao,_i,Ir,tw=Xt(Q0()),WO=null==(ew=null==T?void 0:T.env)?void 0:ew.npm_package_version,il=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],tm=il[0],YO=!1,Yt=class e{constructor(e){var t;I(this,So,void 0),I(this,hi,void 0),I(this,mi,void 0),I(this,Io,void 0),I(this,gi,void 0),I(this,vi,void 0),I(this,yi,void 0),I(this,rr,void 0),I(this,bi,void 0),I(this,wi,void 0),I(this,ki,void 0),I(this,Ao,void 0),I(this,_i,void 0),I(this,Ir,void 0),j(this,rr,e.clientId),j(this,bi,e.clientSecret),j(this,wi,e.accessToken),j(this,yi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!w(this,yi)&&w(this,rr)&&!Fu(w(this,rr))&&(n="https://web-proxy.mappedin.com/a/"),j(this,mi,n),j(this,mi,w(this,mi)+(e.venue+"/")),j(this,_i,e.venue),j(this,hi,!1),j(this,So,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),j(this,Io,il.find((t=>t===e.context))||il[0]),j(this,gi,Ou()),j(this,vi,Su()),j(this,ki,new Set),j(this,Ao,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Qr(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:w(this,hi)};w(this,Ir)&&(n={...n,...w(this,Ir)});let r=w(this,mi)+e+"?"+tw.default.stringify(n,{skipEmptyString:!0,skipNull:!0});if(YO&&R.log("Analytics.track",r),w(this,So))return;let i={"mi-context":tm||w(this,Io),"mi-session":w(this,vi),"mi-device":w(this,gi),"mappedin-sdk-version":WO,"mappedin-platform-version":w(this,Ao)};w(this,wi)?i.Authorization="Bearer ".concat(w(this,wi)):w(this,yi)||w(this,bi)&&w(this,rr)&&(i["x-mappedin-key"]=btoa(w(this,rr)),i["x-mappedin-secret"]=btoa(w(this,bi))),ft()(r,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){j(this,Ir,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;Me.addPendingEvent(new Ki({venue:w(this,_i)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;Me.addPendingEvent(new Xi({venue:w(this,_i)})),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 w(this,vi)}getDeviceID(){return w(this,gi)}setGeolocationMode(e){j(this,hi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!w(this,ki).has(t)&&(this.track(t),w(this,ki).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=il.find((t=>t===e));t&&(tm=t)}static clearContext(){tm=void 0}static destroy(){e.instance=null}};So=new WeakMap,hi=new WeakMap,mi=new WeakMap,Io=new WeakMap,gi=new WeakMap,vi=new WeakMap,yi=new WeakMap,rr=new WeakMap,bi=new WeakMap,wi=new WeakMap,ki=new WeakMap,Ao=new WeakMap,_i=new WeakMap,Ir=new WeakMap,s(Yt,"Analytics"),b(Yt,"instance",null),b(Yt,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var nm=Yt,Co=nm;v();var rm=class{constructor(){b(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(rm,"PubSub");var jn,Mi,Ar,xi,jo,im,ol,nw,al=rm,am={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},om=class extends al{constructor(e){super(),I(this,jo),I(this,ol),b(this,"perspective"),b(this,"things"),b(this,"options"),I(this,jn,void 0),I(this,Mi,""),b(this,"updatedAt"),b(this,"categories",[]),b(this,"locations",[]),b(this,"vortexes",[]),b(this,"maps",[]),b(this,"nodes",[]),b(this,"polygons",[]),b(this,"venue",{}),b(this,"events",[]),b(this,"mapGroups",[]),b(this,"themes",[]),b(this,"locationStates",[]),b(this,"rankings"),b(this,"currentLanguage"),I(this,Ar,{}),b(this,"_categoriesById"),b(this,"_locationsById"),b(this,"_vortexesById"),b(this,"_mapsById"),b(this,"_nodesById"),b(this,"_polygonsById"),b(this,"_eventsById"),b(this,"_mapGroupsById"),b(this,"_locationStatesById"),b(this,"_locationRankingsById"),b(this,"_rankingsById"),b(this,"_categoriesByExternalId"),b(this,"_locationsByExternalId"),b(this,"_vortexesByExternalId"),b(this,"_mapsByExternalId"),b(this,"_nodesByExternalId"),b(this,"_polygonsByExternalId"),b(this,"_eventsByExternalId"),b(this,"_mapGroupsByExternalId"),b(this,"_locationStatesByExternalId"),b(this,"_locationRankingsByExternalId"),b(this,"_rankingsByExternalId"),I(this,xi,void 0),b(this,"images"),b(this,"imageBinaries"),b(this,"scenes"),b(this,"analytics"),b(this,"navigator"),this.options=e,j(this,jn,Qe.create(this));let t=Co.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Ag,"true")}})}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=w(this,jn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.externalId]=e)),w(this,jn)[n]=t,t}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=w(this,jn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),w(this,jn)[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=j0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=F0(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var n;if(this.currentLanguage.code!==e){if(null==(n=this.venue.languages)||!n.find((t=>t.code===e)))return void R.error("Language ".concat(e," not found in venue ").concat(this.venue.slug));if(t&&!w(this,Ar)[this.currentLanguage.code]&&(w(this,Ar)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),Qe.clearInstance(this),j(this,jn,Qe.create(this)),this.currentLanguage=this.venue.languages.find((t=>t.code===e)),null!=w(this,Ar)[e]){let t=JSON.parse(w(this,Ar)[e]);await this.hydrate(t)}else this.options.language=this.currentLanguage.code,await this.fetch();this.publish(0,this.currentLanguage)}}async hydrate(e,t){let n;if("string"==typeof e)try{j(this,Mi,e),n=JSON.parse(e)}catch(e){return void R.error("Unable to parse JSON",e)}else n=e,j(this,Mi,JSON.stringify(n));let r=Object.keys(n);for(let e=0,t=r.length;e<t;++e){let t=r[e],i=n[t];null!=Pr[t]&&"function"==typeof Pr[t].hydrate&&(this[t]=Pr[t].hydrate(i,this))}t&&await tb(n);let{images:i,scenes:o,imageBinaries:s}=n;this.images=i,this.scenes=o,this.imageBinaries=s,this.generateGetters(r),ye(this,jo,im).call(this),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Fu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:e}=this.options,t=[],n=Object.keys(e);for(let e=0,r=n.length;e<r;++e){let r=n[e];Pr[r]&&t.push(Pr[r].fetch(this).then((e=>(this[r]=e,Promise.resolve()))))}return t.push(Kr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>j(this,xi,e.token)),(()=>Promise.resolve()))),this.generateGetters(n),Promise.all(t).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,ye(this,jo,im).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Jl({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}toJSON(){var e;let t={};for(let e in Pr)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let n={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(n.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete n.locationRankings,n}toString(){return w(this,Mi)||JSON.stringify(this.toJSON())}};jn=new WeakMap,Mi=new WeakMap,Ar=new WeakMap,xi=new WeakMap,jo=new WeakSet,im=s((function(){w(this,xi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(w(this,xi)))})),ye(this,ol,nw).call(this)}),"#transformData"),ol=new WeakSet,nw=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=rb(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=nb(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(om,"Mappedin");var kt=om;v(),v();var ze=s((function(){return ze=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"),ze.apply(this,arguments)}),"__assign");function oe(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 Xe(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.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 s}s(oe,"__values"),s(Xe,"__read");var Fo,$O="ENTRIES",lw="KEYS",cw="VALUES",Ke="",sm=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=Ei(this._path),t=e.node,n=e.keys;if(Ei(n)===Ke)return{done:!1,value:this.result()};var r=t.get(Ei(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=Ei(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 Ei(t)})).filter((function(e){return e!==Ke})).join("")},e.prototype.value=function(){return Ei(this._path).node.get(Ke)},e.prototype.result=function(){switch(this._type){case cw:return this.value();case lw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),Ei=s((function(e){return e[e.length-1]}),"last$1"),HO=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return dw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),dw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=oe(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===Ke){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var v=o,g=0;g<p.length;++g,++v){for(var y=p[g],m=s*v,b=m-s,w=i[m],_=Math.max(0,v-n-1),M=Math.min(s-1,v+n),x=_;x<M;++x){var S=y!==t[x],k=i[b+x]+ +S,O=i[b+x+1]+1,I=i[m+x]+1,E=i[m+x+1]=Math.min(k,O,I);E<w&&(w=E)}if(w>n)continue e}dw(e.get(p),t,n,r,i,v,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),um=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(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=Xe(ul(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=Xe(fm(s),2),l=a[0],u=a[1];try{for(var c=oe(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==Ke&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,XO(this._tree,e)},e.prototype.entries=function(){return new sm(this,$O)},e.prototype.forEach=function(e){var t,n;try{for(var r=oe(this),i=r.next();!i.done;i=r.next()){var o=Xe(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return HO(this._tree,e,t)},e.prototype.get=function(e){var t=pm(this._tree,e);return void 0!==t?t.get(Ke):void 0},e.prototype.has=function(e){var t=pm(this._tree,e);return void 0!==t&&t.has(Ke)},e.prototype.keys=function(){return new sm(this,lw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,lm(this._tree,e).set(Ke,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=lm(this._tree,e);return n.set(Ke,t(n.get(Ke))),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=lm(this._tree,e),r=n.get(Ke);return void 0===r&&n.set(Ke,r=t()),r},e.prototype.values=function(){return new sm(this,cw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),ul=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=oe(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==Ke&&t.startsWith(a))return n.push([e,a]),ul(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),ul(void 0,"",n)}),"trackDown"),pm=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=oe(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==Ke&&t.startsWith(s))return pm(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),lm=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,oe(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==Ke&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),XO=s((function(e,t){var n=Xe(ul(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(Ke),0===r.size)pw(i);else if(1===r.size){var o=Xe(r.entries().next().value,2),s=o[0],a=o[1];fw(i,s,a)}}),"remove"),pw=s((function(e){if(0!==e.length){var t=Xe(fm(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)pw(e.slice(0,-1));else if(1===n.size){var i=Xe(n.entries().next().value,2),o=i[0],s=i[1];o!==Ke&&fw(e.slice(0,-1),o,s)}}}),"cleanup"),fw=s((function(e,t,n){if(0!==e.length){var r=Xe(fm(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),fm=s((function(e){return e[e.length-1]}),"last"),hm="or",KO="and",JO="and_not",Cr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=ze(ze(ze({},dm),e),{searchOptions:ze(ze({},aw),e.searchOptions||{})}),this._index=new um,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(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=oe(u),f=p.next();!f.done;f=p.next()){var v=f.value,g=s(e,v);if(null!=g){var y=a(g.toString(),v),m=this._fieldIds[v],b=new Set(y).size;this.addFieldLength(d,m,this._documentCount-1,b);try{for(var w=(r=void 0,oe(y)),_=w.next();!_.done;_=w.next()){var M=l(_.value,v);M&&this.addTerm(m,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.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()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=oe(this._documentIds),v=f.next();!v.done;v=f.next()){var g=Xe(v.value,2),y=g[0];if(p===g[1]){try{for(var m=(r=void 0,oe(h)),b=m.next();!b.done;b=m.next()){var w=b.value,_=c(e,w);if(null!=_){var M=l(_.toString(),w),x=this._fieldIds[w],S=new Set(M).size;this.removeFieldLength(y,x,this._documentCount,S);try{for(var k=(o=void 0,oe(M)),O=k.next();!O.done;O=k.next()){var I=u(O.value,w);I&&this.removeTerm(x,y,I)}}catch(e){o={error:e}}finally{try{O&&!O.done&&(s=k.return)&&s.call(k)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new um,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=oe(i),a=s.next();!a.done;a=s.next()){var l=Xe(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,v={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(v,this._storedFields.get(u)),(null==t.filter||t.filter(v))&&o.push(v)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(sw),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=ze(ze({},nS),t);var s=new Map;try{for(var a=oe(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(m=u.terms).join(" ");null!=(g=s.get(h))?(g.score+=c,g.count+=1):s.set(h,{score:c,terms:m,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=oe(s),f=p.next();!f.done;f=p.next()){var v=Xe(f.value,2),g=v[0],y=v[1],m=(c=y.score,y.terms),b=y.count;d.push({suggestion:g,terms:m,score:c/b})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(sw),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(dm.hasOwnProperty(e))return cm(dm,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,v=t.serializationVersion;if(1!==v&&2!==v)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var g=new e(n);g._documentCount=l,g._nextId=u,g._documentIds=sl(c),g._fieldIds=h,g._fieldLength=sl(d),g._avgFieldLength=p,g._storedFields=sl(f),g._index=new um;try{for(var y=oe(a),m=y.next();!m.done;m=y.next()){var b=Xe(m.value,2),w=b[0],_=b[1],M=new Map;try{for(var x=(o=void 0,oe(Object.keys(_))),S=x.next();!S.done;S=x.next()){var k=S.value,O=_[k];1===v&&(O=O.ds),M.set(parseInt(k,10),sl(O))}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}g._index.set(w,M)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return g},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=ze(ze(ze({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=ze(ze({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(tS(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=ze(ze({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return ze(ze({},e),((n={})[t]=cm(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=ze(ze({},aw.weights),h),f=p.fuzzy,v=p.prefix,g=this._index.get(e.term),y=this.termResults(e.term,e.term,1,g,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var m=!0===e.fuzzy?.2:e.fuzzy,b=m<1?Math.min(d,Math.round(e.term.length*m)):m;b&&(a=this._index.fuzzyGet(e.term,b))}if(s)try{for(var w=oe(s),_=w.next();!_.done;_=w.next()){var M=Xe(_.value,2),x=M[0],S=M[1];if(E=x.length-e.term.length){null==a||a.delete(x);var k=v*x.length/(x.length+.3*E);this.termResults(e.term,x,k,S,u,c,y)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(a)try{for(var O=oe(a.keys()),I=O.next();!I.done;I=O.next()){x=I.value;var E,A=Xe(a.get(x),2),C=A[0];if(E=A[1]){k=f*x.length/(x.length+E);this.termResults(e.term,x,k,C,u,c,y)}}}catch(e){i={error:e}}finally{try{I&&!I.done&&(o=O.return)&&o.call(O)}finally{if(i)throw i.error}}return y},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=hm),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(ZO[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=oe(this._index),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,oe(u)),d=h.next();!d.done;d=h.next()){var p=Xe(d.value,2),f=p[0],v=p[1];c[f]=Object.fromEntries(v)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}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:i,serializationVersion:2}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=oe(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,v=i[f],g=this._fieldIds[f],y=r.get(g);if(null!=y){var m=y.size,b=this._avgFieldLength[g];try{for(var w=(u=void 0,oe(y.keys())),_=w.next();!_.done;_=w.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var S=y.get(M),k=this._fieldLength.get(M)[g],O=n*v*x*eS(S,m,this._documentCount,k,b),I=s.get(M);if(I){I.score+=O,rS(I.terms,e);var E=cm(I.match,t);E?E.push(f):I.match[t]=[f]}else s.set(M,{score:O,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,uw),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)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,uw),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)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=oe(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.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)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=oe(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),cm=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),ZO=((Fo={})[hm]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),ow(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Fo[KO]=function(e,t){var n,r,i=new Map;try{for(var o=oe(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;ow(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Fo[JO]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Fo),rw=1.2,iw=.7,QO=.5,eS=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(QO+e*(rw+1)/(e+rw*(1-iw+iw*r/i)))}),"calcBM25Score"),tS=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"),dm={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(iS)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},aw={combineWith:hm,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},nS={prefix:function(e,t,n){return t===n.length-1}},rS=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),ow=s((function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),sw=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),uw=s((function(){return new Map}),"createMap"),sl=s((function(e){var t,n,r=new Map;try{for(var i=oe(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),iS=/[\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;v();var aS=["0","1","2","3","4","5","6","7","8","9"],oS=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],sS=["0","1","2","3","4","5","6","7","8","9"],uS=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],k6=[...aS,...oS,...sS,...uS],hw=["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 lS=32,vt=!1,cS=120,mm=0,vm=class{constructor(e){b(this,"_callback"),b(this,"_frameCount"),b(this,"_ordering"),b(this,"_supersededBy"),b(this,"name"),b(this,"_remainingFrameCount"),b(this,"_lastFrameTime"),b(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,vt&&R.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(vm,"FrameUpdate");var ll=vm,ym=class{constructor(e){if(b(this,"_postponed"),b(this,"userdata"),b(this,"_priority"),b(this,"_group"),b(this,"name"),b(this,"_lastFrameTime"),b(this,"_callback"),b(this,"_complete"),b(this,"_scheduled"),b(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,vt&&R.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(ym,"FrameTask");var Fn=ym,bm=class{constructor(e){b(this,"_postponed"),b(this,"_onComplete"),b(this,"_priority"),b(this,"userdata"),b(this,"name"),b(this,"_tasks"),b(this,"_scheduledTasks"),b(this,"_scheduled"),b(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,vt&&R.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(bm,"FrameTaskGroup");var cl=bm,wm=class{constructor(e){b(this,"_maxMillisecondsPerFrame"),b(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:lS,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(wm,"RealTimeTimer");var gm=wm,km=class{constructor(e){var t;b(this,"_raf"),b(this,"options"),b(this,"_timer"),b(this,"_performance"),b(this,"_scheduledUpdatesByOrdering"),b(this,"_scheduledTasksByPriority"),b(this,"_postponedTasks"),b(this,"_requestAnimationFrameHandle"),b(this,"_updatesToRunThisFrame"),b(this,"_lastFrameTime",0),b(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new gm,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),vt&&R.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 Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),vt&&R.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;vt&&(0===mm&&(r=!0),++mm,mm%=cS);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&&R.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&&R.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&&R.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;R.assert(void 0!==n),Object.getPrototypeOf(n)===cl.prototype&&(r=n,n=r._popTask()),R.assert(void 0!==n),R.assert(Object.getPrototypeOf(n)===Fn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),vt&&R.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),vt&&R.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)===cl)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,vt&&R.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),vt&&R.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)===Fn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),vt&&R.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)===Fn.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)===Fn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,vt&&R.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)===Fn.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)===Fn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),vt&&R.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Fn.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,vt&&R.log("task priority changed",e.name,t)}};s(km,"TaskScheduler");var dl=km,_m=class{constructor(){b(this,"_map"),b(this,"_size"),b(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(R.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 R.assert(e===this._size),e}};s(_m,"Multimap");var Ti=_m,Ln=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),dS=/([!-/:-@])|(?:[\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 pS(e){return e.split(dS).filter(Boolean)}s(pS,"tokenizeAndCaptureDelimiters");var Nn,Nt,ir,fn,Ie,Lo,No,Oi,Do,Ro,zo,Bo,Si,Dn,pl,fl,ar,Vo,hl,ml,gl,gw,Pi="",fS=.09,hS=1,mS=.025,gS=.5,vS=5e-4,yS=5e-4,bS=.01,wS=.05,mw=1,kS=.01,_S=.2,MS={MappedinCategory:"categories",MappedinLocation:"locations"},xS={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:hw,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===T.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:fS,PRIMARY_INDEX_WEIGHT:hS,SECONDARY_INDEX_WEIGHT:mS,CATEGORY_NAME_WEIGHT:gS,LOCATION_NAME_WEIGHT:mw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:vS,CATEGORY_LOCATION_TAGS_WEIGHT:yS,CATEGORY_LOCATION_NAME_WEIGHT:bS,PRIMARY_INDEX_TAGS_NAME_WEIGHT:wS,LOCATION_DEFAULT_RANK:mw,RATIO_OF_FUZZY_TO_EXACT:kS,RATIO_OF_PREFIX_TO_EXACT:_S}},xm=class{constructor(e,t){var n;I(this,gl),I(this,Nn,void 0),I(this,Nt,void 0),I(this,ir,void 0),I(this,fn,void 0),I(this,Ie,void 0),I(this,Lo,new dl({performance:!0})),I(this,No,void 0),I(this,Oi,void 0),I(this,Do,new Map),I(this,Ro,void 0),I(this,zo,void 0),I(this,Bo,void 0),b(this,"buildIndices",s((()=>{var e,t;j(this,ar,new Promise((e=>{j(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:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=w(this,Ie).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:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:pS},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=w(this,No))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={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=w(this,Ie))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=w(this,Ie))?void 0:t.jsonIndex);j(this,Nt,Cr.loadJS(e,u)),j(this,ir,Cr.loadJS(n,c)),j(this,fn,Cr.loadJS(r,h))}else j(this,Nt,new Cr(u)),j(this,ir,new Cr(c)),j(this,fn,new Cr(h)),w(this,Nn).locations.forEach(w(this,pl)),w(this,Nn).categories.forEach(w(this,fl));w(this,Lo).update(performance.now())}),"buildIndices")),I(this,Si,0),I(this,Dn,s((e=>{yl(this,Si)._++,w(this,Lo).scheduleUpdate(new ll({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),yl(this,Si)._--,0===w(this,Si)&&w(this,Vo).call(this)}}))}),"#addTask")),I(this,pl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=w(this,Ie).constants,a=o;null!=(t=w(this,Ie))&&t.useLocationRank&&(a=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),w(this,Dn).call(this,(()=>{w(this,Nt).add({name:Ln(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:a})})),null!=(n=w(this,Ie))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{w(this,Nt).add({name:"",tag:Ln(t),id:"MappedinLocation_"+e.id,weight:s,rank:a})})),null!=(r=w(this,Ie))&&r.searchDescriptions&&w(this,Dn).call(this,(()=>w(this,ir).add({description:Ln(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:a})))}),"#processLocation")),I(this,fl,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=w(this,Ie).constants;w(this,Dn).call(this,(()=>w(this,Nt).add({name:Ln(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(Pi," ")+t.name),"")+" ".concat(Pi);if(null!=(t=w(this,Ie))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&w(this,Dn).call(this,(()=>w(this,fn).add({id:"MappedinCategory_"+e.id,"category.locations.description":Ln(t.description),ref:t.name,weight:r})))})),null!=(n=w(this,Ie))&&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(Pi," ")+t),""))+" ".concat(Pi)}),"");w(this,Dn).call(this,(()=>w(this,fn).add({"category.locations.tags":Ln(t),id:"MappedinCategory_"+e.id,weight:i})))}w(this,Dn).call(this,(()=>w(this,fn).add({"category.locations.name":Ln(a),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),I(this,ar,void 0),I(this,Vo,void 0),I(this,hl,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("_"),u=r||w(this,Nn).getCollectionItemById(MS[a],l);return s&&null!=(t=w(this,Ie))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),I(this,ml,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(Pi,"]* ")+n+" [^".concat(Pi,"]*"),"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")),j(this,Oi,Co.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),j(this,Ie,{...xS,...t}),j(this,Nn,e),j(this,No,new Set(null==(n=w(this,Ie))?void 0:n.stopWords));let r=w(this,Nn).venue.slug;w(this,Nn).on(0,this.buildIndices),this.buildIndices(),j(this,Ro,Qr((e=>{w(this,Oi).trackSearchSuggest({query:e}),Me.addPendingEvent(new ca({venue:r}))}),300)),j(this,zo,Qr((e=>{w(this,Oi).trackSearch({query:e}),Me.addPendingEvent(new la({venue:r}))}),300)),j(this,Bo,Qr((()=>{Me.addPendingEvent(new sa({venue:r}))}),300)),Me.addPendingEvent(new ua({search_descriptions:w(this,Ie).searchDescriptions,search_tags:w(this,Ie).searchTags,search_descriptions_in_categories:w(this,Ie).searchDescriptionsInCategories,search_tags_in_categories:w(this,Ie).searchTagsInCategories,use_location_rank:w(this,Ie).useLocationRank,venue:r}))}async suggest(e){await w(this,ar);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}=w(this,Ie).constants,s=w(this,Nt).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 w(this,Ro).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await w(this,ar);let t=ye(this,gl,gw).call(this,e);return w(this,zo).call(this,e),t}async toJSON(){return await w(this,ar),JSON.stringify({primary:w(this,Nt),secondary:w(this,ir),extra:w(this,fn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await w(this,ar),t=i instanceof En?"MappedinLocation":i instanceof Mr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=w(this,Do).get(i),n||(n="Custom_"+Pn(),w(this,Do).set(i,n))),w(this,Nt).add({id:n,weight:o,object:i,query:Ln(r)}),w(this,Bo).call(this)}};Nn=new WeakMap,Nt=new WeakMap,ir=new WeakMap,fn=new WeakMap,Ie=new WeakMap,Lo=new WeakMap,No=new WeakMap,Oi=new WeakMap,Do=new WeakMap,Ro=new WeakMap,zo=new WeakMap,Bo=new WeakMap,Si=new WeakMap,Dn=new WeakMap,pl=new WeakMap,fl=new WeakMap,ar=new WeakMap,Vo=new WeakMap,hl=new WeakMap,ml=new WeakMap,gl=new WeakSet,gw=s((function(e){let t=[],n=Ln(e);t=[...w(this,Nt).search(n),...w(this,ir).search(n),...w(this,fn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=w(this,hl).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},w(this,ml).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(xm,"OfflineSearch");var Mm=xm;v();var vw=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(vw||{}),Em=globalThis.fetch;function ft(){if(null==Em)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Em}function H6(e){Em=e}s(ft,"isomorphicFetch"),s(H6,"setFetchFn");var yw,ES=null==(yw=null==T?void 0:T.env)?void 0:yw.npm_package_version;globalThis.btoa||(globalThis.btoa=bw.encode);var TS=["ar"];function or(e){let t={...am,...e};return t.headers={...t.headers,"mappedin-sdk-version":ES},t.things=ib("things"in e?e.things:void 0),"platformString"in e&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization="Bearer ".concat(t.accessToken):t.clientId&&t.clientSecret&&(t.authorization="Basic ".concat(globalThis.btoa("".concat(t.clientId,":").concat(t.clientSecret))))),t}function ww(e){return e.endsWith("/")?e:"".concat(e,"/")}async function e4(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=or(t),r=new kt(n),i=await IS(n);if("1.0.0"===n.version){let e=O0(await E0(i));return r.hydrateFromMVFv1(e),r}let o=P0(Jh(await Kh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),Me.addPendingEvent(new Zi({venue:n.venue})),r}async function t4(e){let t={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,...e},n=or({...t}),r=new kt(n);try{if(!n.key)throw new Error("key is required.");if(!n.secret)throw new Error("secret is required.");if(!n.mapId)throw new Error("mapId is required.");let{access_token:i}=await AS(e),o=await jS(n,i),s=Jh(await Kh(o));"function"==typeof t.onMVFParsed&&t.onMVFParsed(s),r.hydrateFromMVF(s)}catch(e){R.error("Failed to get Maker map data.",e)}return r}async function PS(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=or({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new kt({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,Me.addPendingEvent(new Ji({venue:n.venue})),i}async function n4(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new kt({...t,baseUrl:t.baseUrl+n}),i=await xr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function r4(e){PS=e}s(or,"parseOptions"),s(ww,"normalizeUrl"),s(e4,"getVenueMVF"),s(t4,"getVenueMaker"),s(PS,"getVenue"),s(n4,"getVenueMetadata"),s(r4,"__setGetVenueMock");var Tm={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function i4(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),{url:n,updated_at:r}=await OS(e),i=await ft()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new kt(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function OS(e){let t=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&TS.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await Lu(t,i)}async function a4(e,{url:t,updated_at:n}){let r=or({baseUrl:"https://api-gateway.mappedin.com/",...Tm,...e}),i=await ft()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new kt(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function SS(e){var t;let n=or({baseUrl:"https://api-gateway.mappedin.com/",...am,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await Lu(n,r)}async function IS(e){return new Promise((async(t,n)=>{try{let{url:n}=await SS(e),r=await ft()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function AS(e){let t="".concat(e.authBaseUri?ww(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await ft()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function CS(e,t){let n="".concat(e.bundleBaseUri?ww(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await ft()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function jS(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await CS(e,t),i=await ft()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function o4(e,t=!0){let n=new kt({venue:""});return await n.hydrate(e,t),n}async function s4(e){let t=new kt({venue:""});return await t.hydrateFromMVF(e),t}s(i4,"getVenueBundle"),s(OS,"getVenueBundleURL"),s(a4,"downloadBundle"),s(SS,"getVenueMVFURL"),s(IS,"downloadVenueBundleMVF"),s(AS,"getMakerAccessToken"),s(CS,"getMakerBundleURL"),s(jS,"downloadMVF"),s(o4,"hydrateVenue"),s(s4,"hydrateVenueMVF");export{Co as CustomerAnalytics,Nu as GET_VENUE_EVENT,vw as MAP_RENDER_MODE,kt as Mappedin,Mr as MappedinCategory,Oa as MappedinCollectionType,Er as MappedinCoordinate,Ot as MappedinDestinationSet,lr as MappedinDirections,Ka as MappedinEvent,En as MappedinLocation,eo as MappedinLocationState,ro as MappedinMap,co as MappedinMapGroup,Jt as MappedinNavigatable,Ta as MappedinNode,kr as MappedinPolygon,$a as MappedinRankings,xr as MappedinVenue,Ra as MappedinVortex,Mm as OfflineSearch,r4 as __setGetVenueMock,Yf as defaultThings,a4 as downloadBundle,jS as downloadMVF,IS as downloadVenueBundleMVF,AS as getMakerAccessToken,CS as getMakerBundleURL,PS as getVenue,i4 as getVenueBundle,OS as getVenueBundleURL,e4 as getVenueMVF,SS as getVenueMVFURL,t4 as getVenueMaker,n4 as getVenueMetadata,o4 as hydrateVenue,s4 as hydrateVenueMVF,ft as isomorphicFetch,or as parseOptions,H6 as setFetchFn};
|